diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2011-01-04 03:17:45 +0100 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2011-01-04 03:17:45 +0100 |
commit | f0db6a4e4e6b3059c6553b819ac8788b62486103 (patch) | |
tree | c449ef54f745c4a4994d815579c69c0790bc26b1 /music.cpp | |
parent | 2b03b8ef2b5002f00960d17c8f1f634eb3a3a70f (diff) |
Added Doxyfile and documentation comments in various places.
Diffstat (limited to 'music.cpp')
-rw-r--r-- | music.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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)) { |