diff options
author | Max Kellermann <max@duempel.org> | 2008-09-16 19:11:39 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-09-16 19:11:39 +0200 |
commit | eee102e5ddd2c400d707bffe21d9c6ec74507371 (patch) | |
tree | 82a1f8db8290c2648849a60dd145098a3fd515a4 /src/mpdclient.h | |
parent | 9e94b7cb6eebcf40d2508cc365dbc7c221071454 (diff) | |
download | mpd-eee102e5ddd2c400d707bffe21d9c6ec74507371.tar.gz mpd-eee102e5ddd2c400d707bffe21d9c6ec74507371.tar.xz mpd-eee102e5ddd2c400d707bffe21d9c6ec74507371.zip |
mpdclient: moved code to playlist.c
Move everything which manipulates the mpdclient_playlist struct to
playlist.c. Many of the functions get a mpdclient pointer instead of
a playlist; this will be changed later.
The functions mpdclient_playlist_update() and
mpdclient_playlist_update_changes() stay in mpdclient.c for now, since
they are tightly connected to the client code.
Diffstat (limited to '')
-rw-r--r-- | src/mpdclient.h | 33 |
1 files changed, 4 insertions, 29 deletions
diff --git a/src/mpdclient.h b/src/mpdclient.h index f1b993756..2ce803e86 100644 --- a/src/mpdclient.h +++ b/src/mpdclient.h @@ -2,8 +2,7 @@ #define MPDCLIENT_H #include "libmpdclient.h" - -#include <glib.h> +#include "playlist.h" #define MPD_VERSION_EQ(c,x,y,z) (c->connection->version[0] == x && \ c->connection->version[1] == y && \ @@ -14,22 +13,6 @@ (c->connection->version[0]==x && c->connection->version[1]==y && \ c->connection->version[2]<z) ) - - -/****************************************************************************/ -/* Playlist */ -/****************************************************************************/ - -typedef struct mpdclient_playlist { - /* playlist id */ - long long id; - /* true if the list is updated */ - gboolean updated; - /* the list */ - GArray *list; - -} mpdclient_playlist_t; - typedef struct filelist_entry { guint flags; mpd_InfoEntity *entity; @@ -120,19 +103,11 @@ void mpdclient_remove_error_callback(mpdclient_t *c, mpdc_error_cb_t cb); /*** playlist functions **************************************************/ -/* free a playlist */ -gint mpdclient_playlist_free(mpdclient_playlist_t *playlist); /* update the complete playlist */ -gint mpdclient_playlist_update(mpdclient_t *c); -/* get playlist changes */ -gint mpdclient_playlist_update_changes(mpdclient_t *c); - -struct mpd_song *playlist_lookup_song(mpdclient_t *c, gint id); -struct mpd_song *playlist_get_song(mpdclient_t *c, gint index); -gint playlist_get_index(mpdclient_t *c, struct mpd_song *song); -gint playlist_get_index_from_id(mpdclient_t *c, gint id); -gint playlist_get_index_from_file(mpdclient_t *c, gchar *filename); +gint mpdclient_playlist_update(struct mpdclient *c); +/* get playlist changes */ +gint mpdclient_playlist_update_changes(struct mpdclient *c); /*** mpdclient playlist callbacks *****************************************/ |