libsaria: Introduce a rebuild_list() function

I am going to create a play list in memory based on the state of the
library.  To do this, I first need a way to trigger construction of a
list.
This commit is contained in:
Bryan Schumaker 2011-11-06 12:16:54 -05:00
parent 7507955018
commit b55ac22866
4 changed files with 16 additions and 0 deletions

View File

@ -46,6 +46,8 @@ namespace libsaria
dir = in.read_str(); dir = in.read_str();
path_list->push_back(LibraryPath(in, dir)); path_list->push_back(LibraryPath(in, dir));
} }
rebuild_list();
} }
void library::save() void library::save()

View File

@ -81,6 +81,7 @@ namespace libsaria
void library::refresh() void library::refresh()
{ {
rebuild_list();
trigger_callback(LIBRARY_REFRESH); trigger_callback(LIBRARY_REFRESH);
} }

View File

@ -53,6 +53,7 @@ namespace libsaria
{ {
list<LibraryPath> *get_path_list(); list<LibraryPath> *get_path_list();
LibraryPath *get_path(string); LibraryPath *get_path(string);
void rebuild_list();
} }
} }

12
libsaria/library/list.cpp Normal file
View File

@ -0,0 +1,12 @@
#include "library.h"
namespace libsaria
{
void library::rebuild_list()
{
println("Rebuilding play list");
}
}; /* Namespace: libsaria */