summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d1ec95c)
raw | patch | inline | side by side (parent: d1ec95c)
author | Max Kellermann <max@duempel.org> | |
Thu, 9 Jul 2009 17:20:25 +0000 (19:20 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Thu, 9 Jul 2009 17:20:25 +0000 (19:20 +0200) |
src/playlist.c | patch | blob | history | |
src/playlist.h | patch | blob | history |
diff --git a/src/playlist.c b/src/playlist.c
index 5f3dd4582abe5ae9c1ff38169956dc82cc93909d..0a448333c77a07f718b882a005bf6a48518307c0 100644 (file)
--- a/src/playlist.c
+++ b/src/playlist.c
}
gint
-playlist_get_index(mpdclient_t *c, struct mpd_song *song)
+playlist_get_index(const struct mpdclient *c, const struct mpd_song *song)
{
guint i;
}
gint
-playlist_get_index_from_id(mpdclient_t *c, gint id)
+playlist_get_index_from_id(const struct mpdclient *c, gint id)
{
guint i;
for (i = 0; i < c->playlist.list->len; ++i) {
- struct mpd_song *song = playlist_get(&c->playlist, i);
+ const struct mpd_song *song = playlist_get(&c->playlist, i);
if (song->id == id)
return (gint)i;
}
}
gint
-playlist_get_index_from_file(mpdclient_t *c, gchar *filename)
+playlist_get_index_from_file(const struct mpdclient *c, const gchar *filename)
{
guint i;
diff --git a/src/playlist.h b/src/playlist.h
index 454f1f05f50ed1016e36bd47cd94cc1e17ff03ea..77983f6ed6ec1b2a0beccd4e52d808e282dde286 100644 (file)
--- a/src/playlist.h
+++ b/src/playlist.h
struct mpd_song *playlist_get_song(struct mpdclient *c, gint index);
-gint playlist_get_index(struct mpdclient *c, struct mpd_song *song);
+gint
+playlist_get_index(const struct mpdclient *c, const struct mpd_song *song);
-gint playlist_get_index_from_id(struct mpdclient *c, gint id);
+gint
+playlist_get_index_from_id(const struct mpdclient *c, gint id);
-gint playlist_get_index_from_file(struct mpdclient *c, gchar *filename);
+gint
+playlist_get_index_from_file(const struct mpdclient *c, const gchar *filename);
#endif