blob: 4e790d8442dd42cc3177675c930d5e54b95795f1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
#ifndef MUSIC_H
#define MUSIC_H
#include <boost/filesystem.hpp>
#include <vector>
#include <iostream>
namespace fs = boost::filesystem;
class MusicListing {
public:
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 : public MusicListing {
public:
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
|