a508b7ff72
The code was a bit messy and didn't make use of namespaces very well. By converting to a set of functions (instead of a class) I can use each function as a function pointer if I want to. I am also able to remove libsaria/library.cpp since this was just a set of wrapper functions to the old static class functions.
47 lines
818 B
C++
47 lines
818 B
C++
#ifndef LIBSARIA_LIBRARY_SOURCE_H
|
|
#define LIBSARIA_LIBRARY_SOURCE_H
|
|
|
|
#include <map>
|
|
#include <string>
|
|
using namespace std;
|
|
|
|
#include <libsaria/path.h>
|
|
|
|
class LibraryPath
|
|
{
|
|
private:
|
|
string path;
|
|
map <ino_t, TrackTag> file_map;
|
|
|
|
public:
|
|
LibraryPath(string);
|
|
LibraryPath(InFile &, string);
|
|
~LibraryPath();
|
|
|
|
void for_each(void (*)(Track &));
|
|
void insert_track(ino_t, 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();
|
|
};
|
|
|
|
map<string, LibraryPath> *get_library_map();
|
|
LibraryPath *get_library_path(string);
|
|
|
|
#endif /* LIBSARIA_LIBRARY_SOURCE_H */
|