2011-09-12 14:17:22 -04:00
|
|
|
#ifndef LIBSARIA_LIBRARY_H
|
|
|
|
#define LIBSARIA_LIBRARY_H
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
using namespace std;
|
|
|
|
|
2011-10-01 12:55:32 -04:00
|
|
|
namespace libsaria
|
|
|
|
{
|
2012-01-23 18:11:27 -05:00
|
|
|
|
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 {
|
|
|
|
string path;
|
|
|
|
};
|
|
|
|
|
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();
|
|
|
|
|
|
|
|
void add_path(string);
|
2012-03-12 08:21:32 -04:00
|
|
|
virtual void path_added(Path *) = 0;
|
|
|
|
};
|
2012-03-12 08:08:04 -04:00
|
|
|
|
2012-03-12 08:00:29 -04:00
|
|
|
/*namespace iter
|
2011-12-29 12:08:32 -05:00
|
|
|
{
|
|
|
|
void reset();
|
|
|
|
libsaria::Track *next();
|
|
|
|
bool end();
|
2012-03-12 08:00:29 -04:00
|
|
|
}*/ /* Namespace: iter */
|
2011-12-29 12:08:32 -05:00
|
|
|
|
2012-03-12 08:00:29 -04:00
|
|
|
/*namespace pathiter
|
2012-01-23 18:11:27 -05:00
|
|
|
{
|
|
|
|
void reset();
|
|
|
|
libsaria::LibraryPath *next();
|
|
|
|
bool end();
|
|
|
|
}
|
|
|
|
|
2011-10-20 10:23:35 -04:00
|
|
|
struct PathInfo {
|
|
|
|
string path;
|
|
|
|
unsigned int size;
|
|
|
|
};
|
|
|
|
|
2012-02-25 17:21:19 -05:00
|
|
|
void init();
|
2011-10-18 10:02:55 -04:00
|
|
|
void load();
|
|
|
|
void save();
|
2011-10-20 13:22:21 -04:00
|
|
|
void update();
|
2011-10-20 20:31:09 -04:00
|
|
|
void update_path(string);
|
2011-10-18 10:02:55 -04:00
|
|
|
void refresh();
|
|
|
|
|
2011-12-23 20:48:37 -05:00
|
|
|
string next_file();
|
2011-10-18 10:02:55 -04:00
|
|
|
void add_path(string);
|
2011-10-20 20:18:35 -04:00
|
|
|
void remove_path(string);
|
2012-02-20 09:44:57 -05:00
|
|
|
Track *lookup(sid_t &);
|
2011-10-20 10:23:35 -04:00
|
|
|
void for_each_path(void (*)(struct PathInfo &));
|
2011-10-19 09:58:30 -04:00
|
|
|
|
2011-12-30 15:45:09 -05:00
|
|
|
void list_track(libsaria::Track *);
|
2011-12-30 16:03:32 -05:00
|
|
|
void unlist_track(libsaria::Track *);
|
2011-10-19 09:58:30 -04:00
|
|
|
unsigned int size();
|
2012-02-23 09:26:02 -05:00
|
|
|
void sort_list();
|
2011-11-13 10:47:55 -05:00
|
|
|
void filter(string &text);
|
2011-12-25 23:29:35 -05:00
|
|
|
bool is_visible(sid_t &);
|
2012-02-25 09:45:27 -05:00
|
|
|
|
2012-03-12 08:00:29 -04:00
|
|
|
Playlist *get_playlist();*/
|
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 */
|