summaryrefslogtreecommitdiff
path: root/music.h
diff options
context:
space:
mode:
Diffstat (limited to 'music.h')
-rw-r--r--music.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/music.h b/music.h
index 8ce93c1..4e790d8 100644
--- a/music.h
+++ b/music.h
@@ -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