59 lines
1.0 KiB
C++
59 lines
1.0 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();
|
|
|
|
list<TrackTag> *get_list();
|
|
string get_path();
|
|
void get_info(void (*)(struct libsaria::library::PathInfo &));
|
|
void insert_track(ino_t &inode, TrackTag &);
|
|
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);
|
|
void rebuild_list();
|
|
}
|
|
}
|
|
|
|
#endif /* LIBSARIA_LIBRARY_SOURCE_H */
|