+ load content manager per default if not local content detected (first start use case)

This commit is contained in:
kelson42 2011-08-25 06:39:53 +00:00
parent 03a0316ed6
commit 215300f206
2 changed files with 11 additions and 0 deletions

View File

@ -321,6 +321,16 @@ namespace kiwix {
}
}
unsigned int Manager::getBookCount(const bool localBooks, const bool remoteBooks) {
unsigned int result = 0;
std::vector<kiwix::Book>::iterator itr;
for ( itr = library.books.begin(); itr != library.books.end(); ++itr ) {
if (!itr->path.empty() && localBooks || itr->path.empty() && remoteBooks)
result++;
}
return result;
}
bool Manager::listBooks(const supportedListMode mode) {
this->bookIdList.clear();
std::vector<kiwix::Book>::iterator itr;

View File

@ -58,6 +58,7 @@ namespace kiwix {
bool addBookFromPath(const string path, const string url = "", const bool checkMetaData = false);
Library cloneLibrary();
bool getBookById(const string id, Book &book);
unsigned int getBookCount(const bool localBooks, const bool remoteBooks);
bool updateBookLastOpenDateById(const string id);
void removeBookPaths();
bool listBooks(const supportedListMode);