From f0db6a4e4e6b3059c6553b819ac8788b62486103 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Tue, 4 Jan 2011 03:17:45 +0100 Subject: Added Doxyfile and documentation comments in various places. --- music.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'music.cpp') diff --git a/music.cpp b/music.cpp index 3faca9c..eb16226 100644 --- a/music.cpp +++ b/music.cpp @@ -24,6 +24,10 @@ void music::init(std::string root) { root_directory = root; } +/** Fetches a MusicListing object from the given path. + * Prefixes the given path with the music root directory. + * This can be either a track (file) or a directory. + */ MusicListing::p music::get(const HTTP::Connection::PathList& path) { // prefix path with our root_directory fs::path p = root_directory; @@ -48,12 +52,18 @@ MusicListing::p music::get(const HTTP::Connection::PathList& path) { return MusicListing::p(); } +/** Fetches a MusicListing object from the given path. + * Splits the given string and calls the above function. + */ MusicListing::p music::get(const std::string& path) { HTTP::Connection::PathList path_vector; boost::algorithm::split(path_vector, path, boost::algorithm::is_any_of("/\\")); return get(path_vector); } +/** Fetches a directory. + * This is a helper function which returns a null pointer if the fetched MusicListing isn't a directory. + */ MusicDirectory::p music::get_directory(const std::string& path) { MusicListing::p ml = get(path); if(!ml || !fs::is_directory(ml->path)) { -- cgit v1.2.3