2011-09-12 14:17:22 -04:00
|
|
|
#ifndef LIBSARIA_LIBRARY_H
|
|
|
|
#define LIBSARIA_LIBRARY_H
|
|
|
|
|
2012-03-15 08:12:22 -04:00
|
|
|
#include <libsaria/fs.h>
|
2012-03-20 08:30:00 -04:00
|
|
|
#include <libsaria/playlist.h>
|
2012-03-15 08:12:22 -04:00
|
|
|
|
2011-09-12 14:17:22 -04:00
|
|
|
#include <string>
|
|
|
|
using namespace std;
|
|
|
|
|
2011-10-01 12:55:32 -04:00
|
|
|
namespace libsaria
|
|
|
|
{
|
2012-01-23 18:11:27 -05:00
|
|
|
|
2012-03-18 13:27:49 -04:00
|
|
|
class Track;
|
|
|
|
|
2011-10-18 10:02:55 -04:00
|
|
|
namespace library
|
|
|
|
{
|
2011-12-29 12:08:32 -05:00
|
|
|
|
2012-03-12 08:21:32 -04:00
|
|
|
struct Path {
|
2012-03-15 08:12:22 -04:00
|
|
|
bool visible;
|
2012-03-24 09:44:08 -04:00
|
|
|
DataState data_state;
|
2012-03-24 09:00:44 -04:00
|
|
|
unsigned int id;
|
|
|
|
unsigned int next_track;
|
2012-03-12 08:21:32 -04:00
|
|
|
string path;
|
2012-03-18 10:18:20 -04:00
|
|
|
list<Track> tracks;
|
2012-03-12 08:21:32 -04:00
|
|
|
};
|
|
|
|
|
2012-03-12 08:31:53 -04:00
|
|
|
class Driver {
|
2012-03-12 08:21:32 -04:00
|
|
|
public:
|
2012-03-12 08:31:53 -04:00
|
|
|
Driver();
|
|
|
|
~Driver();
|
|
|
|
|
2012-03-18 09:22:24 -04:00
|
|
|
virtual void path_added(Path *) = 0;
|
2012-03-18 10:44:12 -04:00
|
|
|
virtual void path_updated(Path *) = 0;
|
2012-03-31 10:56:35 -04:00
|
|
|
virtual void path_removed(Path *) = 0;
|
2012-03-12 08:21:32 -04:00
|
|
|
};
|
2012-03-12 08:08:04 -04:00
|
|
|
|
2012-03-23 08:08:12 -04:00
|
|
|
void init();
|
2012-03-17 09:00:13 -04:00
|
|
|
void add_path(string);
|
2012-03-31 10:56:35 -04:00
|
|
|
void delete_path(Path *);
|
2012-03-20 08:30:00 -04:00
|
|
|
Playlist *get_playlist();
|
2012-03-17 09:00:13 -04:00
|
|
|
|
2011-10-18 10:02:55 -04:00
|
|
|
}
|
2011-10-01 12:55:32 -04:00
|
|
|
}
|
2011-09-12 14:17:22 -04:00
|
|
|
|
|
|
|
#endif /* LIBSARIA_LIBRARY_H */
|