aboutsummaryrefslogtreecommitdiffstats
path: root/src/directory.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-01-24 21:38:31 +0100
committerMax Kellermann <max@duempel.org>2012-01-24 22:26:43 +0100
commit3c75963352734dc33a0d6c833e9d5e1493d0e0d9 (patch)
tree0908f617f5e6c415b5765bfc06fa2804d378dc67 /src/directory.h
parent5f9dd8287cf8f77824273a3ab4e87dc80abeb46f (diff)
downloadmpd-3c75963352734dc33a0d6c833e9d5e1493d0e0d9.tar.gz
mpd-3c75963352734dc33a0d6c833e9d5e1493d0e0d9.tar.xz
mpd-3c75963352734dc33a0d6c833e9d5e1493d0e0d9.zip
directory: add function directory_get_song(), ...
Wrap songvec_find() and other songvec methods.
Diffstat (limited to '')
-rw-r--r--src/directory.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/directory.h b/src/directory.h
index b6e199555..b866295ae 100644
--- a/src/directory.h
+++ b/src/directory.h
@@ -181,6 +181,28 @@ struct directory *
directory_lookup_directory(struct directory *directory, const char *uri);
/**
+ * Add a song object to this directory. Its "parent" attribute must
+ * be set already.
+ */
+void
+directory_add_song(struct directory *directory, struct song *song);
+
+/**
+ * Remove a song object from this directory (which effectively
+ * invalidates the song object, because the "parent" attribute becomes
+ * stale), but does not free it.
+ */
+void
+directory_remove_song(struct directory *directory, struct song *song);
+
+/**
+ * Look up a song in this directory by its name.
+ */
+G_GNUC_PURE
+struct song *
+directory_get_song(const struct directory *directory, const char *name_utf8);
+
+/**
* Looks up a song by its relative URI.
*
* @param directory the parent (or grandparent, ...) directory