aboutsummaryrefslogtreecommitdiffstats
path: root/src/mpdclient.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-19 14:10:37 +0200
committerMax Kellermann <max@duempel.org>2008-09-19 14:10:37 +0200
commitb93a0bab1cfb0479c24963f649ae0de33b885289 (patch)
treed6f942d775da9c24a61fd981521c5aeaf43a84dd /src/mpdclient.c
parent4364a0bc8620e95f2fb63949f1f6f63aa233a649 (diff)
downloadmpd-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 'src/mpdclient.c')
-rw-r--r--src/mpdclient.c49
1 files changed, 0 insertions, 49 deletions
diff --git a/src/mpdclient.c b/src/mpdclient.c
index a2e272119..2f5591f60 100644
--- a/src/mpdclient.c
+++ b/src/mpdclient.c
@@ -736,31 +736,6 @@ mpdclient_playlist_update_changes(mpdclient_t *c)
/*** Filelist functions *****************************************************/
/****************************************************************************/
-void
-mpdclient_filelist_free(mpdclient_filelist_t *filelist)
-{
- GList *list = g_list_first(filelist->list);
-
- D("mpdclient_filelist_free()\n");
- if (list == NULL)
- return;
- while (list != NULL) {
- filelist_entry_t *entry = list->data;
-
- if (entry->entity)
- mpd_freeInfoEntity(entry->entity);
- g_free(entry);
- list=list->next;
- }
- g_list_free(filelist->list);
- g_free(filelist->path);
- filelist->path = NULL;
- filelist->list = NULL;
- filelist->length = 0;
- g_free(filelist);
-}
-
-
mpdclient_filelist_t *
mpdclient_filelist_get(mpdclient_t *c, const gchar *path)
{
@@ -874,30 +849,6 @@ mpdclient_filelist_update(mpdclient_t *c, mpdclient_filelist_t *filelist)
return NULL;
}
-filelist_entry_t *
-mpdclient_filelist_find_song(mpdclient_filelist_t *fl, struct mpd_song *song)
-{
- GList *list = g_list_first(fl->list);
-
- while( list && song)
- {
- filelist_entry_t *entry = list->data;
- mpd_InfoEntity *entity = entry->entity;
-
- if( entity && entity->type==MPD_INFO_ENTITY_TYPE_SONG )
- {
- struct mpd_song *song2 = entity->info.song;
-
- if( strcmp(song->file, song2->file) == 0 )
- {
- return entry;
- }
- }
- list = list->next;
- }
- return NULL;
-}
-
int
mpdclient_filelist_add_all(mpdclient_t *c, mpdclient_filelist_t *fl)
{