60 lines
1.1 KiB
C++
60 lines
1.1 KiB
C++
#ifndef LIBSARIA_LIBRARY_SOURCE_H
|
|
#define LIBSARIA_LIBRARY_SOURCE_H
|
|
|
|
#include <list>
|
|
#include <string>
|
|
using namespace std;
|
|
|
|
#include <libsaria/library.h>
|
|
#include <libsaria/model.h>
|
|
#include <libsaria/path.h>
|
|
|
|
class LibraryPath
|
|
{
|
|
private:
|
|
string path;
|
|
list<TrackTag> file_list;
|
|
|
|
list<TrackTag>::iterator find_id(ino_t &);
|
|
|
|
public:
|
|
LibraryPath(string);
|
|
LibraryPath(InFile &, string);
|
|
~LibraryPath();
|
|
|
|
void for_each(libsaria::SourceModel *);
|
|
string get_path();
|
|
void get_info(void (*)(struct libsaria::library::PathInfo &));
|
|
bool get_info_id(ino_t &, void (*)(Track &));
|
|
void insert_track(ino_t &inode, TrackTag &);
|
|
bool play_id(ino_t &);
|
|
void save(OutFile &);
|
|
void update();
|
|
unsigned int size();
|
|
};
|
|
|
|
class ScanTask : public IdleTask
|
|
{
|
|
private:
|
|
LibraryPath *library;
|
|
string dir;
|
|
bool end_dir;
|
|
void tag_file(file);
|
|
|
|
public:
|
|
ScanTask(LibraryPath *, string, bool);
|
|
~ScanTask();
|
|
void run_task();
|
|
};
|
|
|
|
namespace libsaria
|
|
{
|
|
namespace library
|
|
{
|
|
list<LibraryPath> *get_path_list();
|
|
LibraryPath *get_path(string);
|
|
}
|
|
}
|
|
|
|
#endif /* LIBSARIA_LIBRARY_SOURCE_H */
|