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 | 8135d7dbf86043fb5f4e960ef4d976e4908631f3 (patch) | |
tree | 5c22757916b32212d47d16b3fc4f8a595df738d9 /src/libmpdclient.h | |
parent | 9653c35fe54e6c7b4a7764254d6a5283eb859039 (diff) | |
download | mpd-8135d7dbf86043fb5f4e960ef4d976e4908631f3.tar.gz mpd-8135d7dbf86043fb5f4e960ef4d976e4908631f3.tar.xz mpd-8135d7dbf86043fb5f4e960ef4d976e4908631f3.zip |
libmpdclient: moved code to song.c
Move everything which manipulates the mpd_Song struct to song.c.
Thousands of lines of too much for libmpdclient.c!
Diffstat (limited to 'src/libmpdclient.h')
-rw-r--r-- | src/libmpdclient.h | 68 |
1 files changed, 2 insertions, 66 deletions
diff --git a/src/libmpdclient.h b/src/libmpdclient.h index 1f044aabb..910699445 100644 --- a/src/libmpdclient.h +++ b/src/libmpdclient.h @@ -33,6 +33,8 @@ #ifndef LIBMPDCLIENT_H #define LIBMPDCLIENT_H +#include "song.h" + #ifdef WIN32 # define __W32API_USE_DLLIMPORT__ 1 #endif @@ -231,72 +233,6 @@ mpd_Stats * mpd_getStats(mpd_Connection * connection); void mpd_freeStats(mpd_Stats * stats); -/* SONG STUFF */ - -#define MPD_SONG_NO_TIME -1 -#define MPD_SONG_NO_NUM -1 -#define MPD_SONG_NO_ID -1 - -/* mpd_Song - * for storing song info returned by mpd - */ -typedef struct _mpd_Song { - /* filename of song */ - char * file; - /* artist, maybe NULL if there is no tag */ - char * artist; - /* title, maybe NULL if there is no tag */ - char * title; - /* album, maybe NULL if there is no tag */ - char * album; - /* track, maybe NULL if there is no tag */ - char * track; - /* name, maybe NULL if there is no tag; it's the name of the current - * song, f.e. the icyName of the stream */ - char * name; - /* date */ - char *date; - - /* added by qball */ - /* Genre */ - char *genre; - /* Composer */ - char *composer; - /* Disc */ - char *disc; - /* Comment */ - char *comment; - - /* length of song in seconds, check that it is not MPD_SONG_NO_TIME */ - int time; - /* if plchanges/playlistinfo/playlistid used, is the position of the - * song in the playlist */ - int pos; - /* song id for a song in the playlist */ - int id; -} mpd_Song; - -/* mpd_newSong - * use to allocate memory for a new mpd_Song - * file, artist, etc all initialized to NULL - * if your going to assign values to file, artist, etc - * be sure to malloc or strdup the memory - * use mpd_freeSong to free the memory for the mpd_Song, it will also - * free memory for file, artist, etc, so don't do it yourself - */ -mpd_Song * mpd_newSong(void); - -/* mpd_freeSong - * use to free memory allocated by mpd_newSong - * also it will free memory pointed to by file, artist, etc, so be careful - */ -void mpd_freeSong(mpd_Song * song); - -/* mpd_songDup - * works like strDup, but for a mpd_Song - */ -mpd_Song * mpd_songDup(const mpd_Song * song); - /* DIRECTORY STUFF */ /* mpd_Directory |