aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/song.c2
-rw-r--r--src/song.h11
2 files changed, 8 insertions, 5 deletions
diff --git a/src/song.c b/src/song.c
index 789e1cf1a..096b1afbd 100644
--- a/src/song.c
+++ b/src/song.c
@@ -40,7 +40,7 @@ Song *newNullSong(void)
return song;
}
-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 00629d702..5b1be84c0 100644
--- a/src/song.h
+++ b/src/song.h
@@ -25,8 +25,10 @@
#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: "
@@ -35,7 +37,7 @@ struct client;
typedef struct _Song {
char *url;
- int8_t type;
+ enum song_type type;
struct tag *tag;
struct _Directory *parentDir;
time_t mtime;
@@ -43,7 +45,8 @@ typedef struct _Song {
Song *newNullSong(void);
-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 *);