aboutsummaryrefslogtreecommitdiffstats
path: root/src/directory.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-04-01 18:41:37 +0200
committerMax Kellermann <max@duempel.org>2009-04-01 18:41:37 +0200
commit7f38c3fc78f7dd3c542cdb73bcd45bfe2208a5a8 (patch)
tree9f3c8de9b5f3ef58960268aab0c2cf8d9e6e0591 /src/directory.h
parent36ec2edacfbf17b5308312ad5617117685004174 (diff)
downloadmpd-7f38c3fc78f7dd3c542cdb73bcd45bfe2208a5a8.tar.gz
mpd-7f38c3fc78f7dd3c542cdb73bcd45bfe2208a5a8.tar.xz
mpd-7f38c3fc78f7dd3c542cdb73bcd45bfe2208a5a8.zip
directory: added directory_lookup_song()
Moved code from db_get_song().
Diffstat (limited to '')
-rw-r--r--src/directory.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/directory.h b/src/directory.h
index cd5c53dfb..8207bd3a2 100644
--- a/src/directory.h
+++ b/src/directory.h
@@ -108,6 +108,16 @@ directory_prune_empty(struct directory *directory);
struct directory *
directory_lookup_directory(struct directory *directory, const char *uri);
+/**
+ * Looks up a song by its relative URI.
+ *
+ * @param directory the parent (or grandparent, ...) directory
+ * @param uri the relative URI
+ * @return the song, or NULL if none was found
+ */
+struct song *
+directory_lookup_song(struct directory *directory, const char *uri);
+
void
directory_sort(struct directory *directory);