+ last improvement in the download manager

This commit is contained in:
kelson42 2011-06-02 15:43:46 +00:00
parent acf0294e78
commit bf9bed56d7
2 changed files with 13 additions and 0 deletions

View File

@ -297,6 +297,18 @@ namespace kiwix {
return false;
}
bool Manager::setBookPath(const string id, const string path) {
std::vector<kiwix::Book>::iterator itr;
for ( itr = library.books.begin(); itr != library.books.end(); ++itr ) {
if ( itr->id == id) {
itr->path = path;
return true;
}
}
return false;
}
void Manager::removeBookPaths() {
std::vector<kiwix::Book>::iterator itr;
for ( itr = library.books.begin(); itr != library.books.end(); ++itr ) {

View File

@ -54,6 +54,7 @@ namespace kiwix {
bool removeBookById(const string id);
bool setCurrentBookId(const string id);
bool setBookIndex(const string id, const string path, const supportedIndexType type);
bool setBookPath(const string id, const string path);
string getCurrentBookId();
bool addBookFromPath(const string path, const string url = "");
Library cloneLibrary();