aboutsummaryrefslogtreecommitdiff
path: root/src/song.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-08-09 21:20:24 +0200
committerMax Kellermann <max@duempel.org>2012-08-15 23:06:59 +0200
commitc2e4fe983da690907316dac9cd1838fc713dec1b (patch)
treedee356597f2d63fe66c92b6a49a7ada1e75010e4 /src/song.h
parent81e898375bed0eeed43170629972d8cbc8e4231e (diff)
Song: add function song_equals()
decoder_is_current_song() now recognizes different instances of the same physical song.
Diffstat (limited to 'src/song.h')
-rw-r--r--src/song.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/song.h b/src/song.h
index 1834b36e..366ffc1a 100644
--- a/src/song.h
+++ b/src/song.h
@@ -21,6 +21,7 @@
#define MPD_SONG_H
#include "util/list.h"
+#include "gcc.h"
#include <stddef.h>
#include <stdbool.h>
@@ -100,6 +101,13 @@ song_is_file(const struct song *song)
return song_in_database(song) || song->uri[0] == '/';
}
+/**
+ * Returns true if both objects refer to the same physical song.
+ */
+gcc_pure
+bool
+song_equals(const struct song *a, const struct song *b);
+
bool
song_file_update(struct song *song);