diff options
author | Max Kellermann <max@duempel.org> | 2008-09-19 14:10:37 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-09-19 14:10:37 +0200 |
commit | b93a0bab1cfb0479c24963f649ae0de33b885289 (patch) | |
tree | d6f942d775da9c24a61fd981521c5aeaf43a84dd /src/mpdclient.h | |
parent | 4364a0bc8620e95f2fb63949f1f6f63aa233a649 (diff) | |
download | mpd-b93a0bab1cfb0479c24963f649ae0de33b885289.tar.gz mpd-b93a0bab1cfb0479c24963f649ae0de33b885289.tar.xz mpd-b93a0bab1cfb0479c24963f649ae0de33b885289.zip |
mpdclient: moved code to filelist.c
Move everything which is solely filelist related to filelist.c and
filelist.h. Fix the indentation of that file, and provide the struct
name "filelist". Don't clear data in mpdclient_filelist_free() before
calling g_free(). Constify the "song" parameter to
mpdclient_filelist_find_song().
Diffstat (limited to '')
-rw-r--r-- | src/mpdclient.h | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/src/mpdclient.h b/src/mpdclient.h index 0698cbf45..c55e15453 100644 --- a/src/mpdclient.h +++ b/src/mpdclient.h @@ -3,6 +3,7 @@ #include "libmpdclient.h" #include "playlist.h" +#include "filelist.h" #define MPD_VERSION_EQ(c,x,y,z) (c->connection->version[0] == x && \ c->connection->version[1] == y && \ @@ -13,23 +14,6 @@ (c->connection->version[0]==x && c->connection->version[1]==y && \ c->connection->version[2]<z) ) -typedef struct filelist_entry { - guint flags; - mpd_InfoEntity *entity; -} filelist_entry_t; - -typedef struct mpdclient_filelist { - /* path */ - gchar *path; - /* list length */ - guint length; - /* true if the list is updated */ - gboolean updated; - /* the list */ - GList *list; - -} mpdclient_filelist_t; - typedef struct mpdclient { /* playlist */ mpdclient_playlist_t playlist; @@ -133,7 +117,7 @@ void mpdclient_playlist_callback(mpdclient_t *c, int event, gpointer data); /*** filelist functions ***************************************************/ -void mpdclient_filelist_free(mpdclient_filelist_t *filelist); + mpdclient_filelist_t *mpdclient_filelist_get(mpdclient_t *c, const gchar *path); mpdclient_filelist_t *mpdclient_filelist_search(mpdclient_t *c, int exact_match, @@ -146,16 +130,6 @@ mpdclient_filelist_t *mpdclient_filelist_search_utf8(mpdclient_t *c, mpdclient_filelist_t *mpdclient_filelist_update(mpdclient_t *c, mpdclient_filelist_t *flist); -#define HIGHLIGHT (0x01) -void mpdclient_filelist_set_flags(mpdclient_filelist_t *flist, - struct mpd_song *song, - guint flags); - -void mpdclient_filelist_clear_flags(mpdclient_filelist_t *flist); -void mpdclient_filelist_clear_flags(mpdclient_filelist_t *flist); -filelist_entry_t *mpdclient_filelist_find_song(mpdclient_filelist_t *flist, - struct mpd_song *song); - /* add all songs in filelist to the playlist */ int mpdclient_filelist_add_all(mpdclient_t *c, mpdclient_filelist_t *fl); |