diff options
Diffstat (limited to 'music.h')
-rw-r--r-- | music.h | 20 |
1 files changed, 15 insertions, 5 deletions
@@ -3,30 +3,40 @@ #include <boost/filesystem.hpp> #include <vector> +#include <iostream> namespace fs = boost::filesystem; -class MusicTrack { +class MusicListing { public: - MusicTrack(const fs::path path); fs::path path; + virtual void render(std::ostream& os) = 0; +}; + +class MusicTrack : public MusicListing { + public: + MusicTrack(const fs::path path); + virtual void render(std::ostream& os); }; class MusicDirectory; typedef std::vector<MusicDirectory> MusicDirectories; typedef std::vector<MusicTrack> MusicTracks; -class MusicDirectory { +class MusicDirectory : public MusicListing { public: - MusicDirectory(const fs::path root); - fs::path path; MusicDirectories directories; MusicTracks tracks; + + MusicDirectory(const fs::path root); + virtual void render(std::ostream& os); }; namespace music { extern MusicDirectory *root_directory; void init(const fs::path root); + MusicListing *find(const std::string path, MusicDirectory& root); + MusicListing *find(const std::string path); }; #endif |