diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/song.c | 2 | ||||
-rw-r--r-- | src/song.h | 11 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/song.c b/src/song.c index 943adfe73..3bd6fa52e 100644 --- a/src/song.c +++ b/src/song.c @@ -29,7 +29,7 @@ #include "os_compat.h" -Song *newSong(const char *url, int type, Directory * parentDir) +Song *newSong(const char *url, enum song_type type, Directory * parentDir) { Song *song; diff --git a/src/song.h b/src/song.h index 9bb96aba0..6de962493 100644 --- a/src/song.h +++ b/src/song.h @@ -29,21 +29,24 @@ #define SONG_BEGIN "songList begin" #define SONG_END "songList end" -#define SONG_TYPE_FILE 1 -#define SONG_TYPE_URL 2 +enum song_type { + SONG_TYPE_FILE = 1, + SONG_TYPE_URL = 2 +}; #define SONG_FILE "file: " #define SONG_TIME "Time: " typedef struct _Song { char *url; - int8_t type; struct mpd_tag *tag; + enum song_type type; struct _Directory *parentDir; time_t mtime; } Song; -Song *newSong(const char *url, int songType, struct _Directory *parentDir); +Song *newSong(const char *url, enum song_type type, + struct _Directory *parentDir); void freeSong(Song *); |