libsaria: Rename UpdateTask to ScanTask

I feel that ScanTask is a better name
This commit is contained in:
Bryan Schumaker 2011-09-13 08:04:59 -04:00
parent b84b7b415d
commit e94ca6b9d6
2 changed files with 15 additions and 11 deletions

View File

@ -15,19 +15,18 @@ class LibraryPath
LibraryPath(string);
~LibraryPath();
void set_dir(string);
void update();
};
class UpdateTask : public IdleTask
class ScanTask : public IdleTask
{
private:
LibraryPath *path;
string library;
string dir;
public:
UpdateTask(LibraryPath *, string);
~UpdateTask();
ScanTask(string, string);
~ScanTask();
void run_task();
};

View File

@ -20,20 +20,25 @@ void Library::update_path(string dir)
void LibraryPath::update()
{
UpdateTask *task = new UpdateTask(this, path);
ScanTask *task = new ScanTask(path, path);
libsaria_queue_task(task);
}
UpdateTask::UpdateTask(LibraryPath *lib_path, string scan_dir)
ScanTask::ScanTask(string base_dir, string scan_dir)
{
path = lib_path;
dir = scan_dir;
library = base_dir;
dir = scan_dir;
}
UpdateTask::~UpdateTask()
ScanTask::~ScanTask()
{
}
void UpdateTask::run_task()
/*
* 1) Read a directory
* 2) Create and queue a new UpdateTask for each subdirectory
* 3) Find tags for each music file
*/
void ScanTask::run_task()
{
}