libsaria: Call a dummy index function for each TrackTag

This function takes an inode and word list.  Soon it will add each
substring to an index.
This commit is contained in:
Bryan Schumaker 2011-11-12 19:31:42 -05:00
parent fc50ceb34f
commit 7fc4e22795
4 changed files with 34 additions and 1 deletions

View File

@ -49,6 +49,10 @@ class TrackTag
string get_album();
string get_filepath();
unsigned int get_year();
list<string> *get_title_words();
list<string> *get_artist_words();
list<string> *get_album_words();
};
#endif /* LIBSARIA_TAGS_H */

View File

@ -9,9 +9,21 @@ void IndexTask::index_track(TrackTag *tag)
track_list.push_back(tag);
}
void IndexTask::index_list(ino_t &inode, list<string> *word_list)
{
}
void IndexTask::run_task()
{
println("Indexing!");
list<TrackTag *>::iterator it;
ino_t inode;
for (it = track_list.begin(); it != track_list.end(); it++) {
inode = (*it)->get_inode();
index_list(inode, (*it)->get_title_words());
index_list(inode, (*it)->get_artist_words());
index_list(inode, (*it)->get_album_words());
}
}
static void reindex_path(list<TrackTag> *tag_list)

View File

@ -49,6 +49,8 @@ class IndexTask : public IdleTask
{
private:
list<TrackTag *> track_list;
void index_list(ino_t &, list<string> *);
public:
IndexTask();
~IndexTask();

View File

@ -216,3 +216,18 @@ string TrackTag::get_filepath()
{
return filepath;
}
list<string> *TrackTag::get_title_words()
{
return &title_words;
}
list<string> *TrackTag::get_artist_words()
{
return &artist_words;
}
list<string> *TrackTag::get_album_words()
{
return &album_words;
}