+ fix a few things for the 0.9 alpha4

This commit is contained in:
kelson42 2010-06-12 17:13:57 +00:00
parent 19ac4741e6
commit a69aac50bc
2 changed files with 13 additions and 0 deletions

View File

@ -79,6 +79,18 @@ string Reader::getMainPageUrl() {
}
/* Return the first page URL */
string Reader::getFirstPageUrl() {
string url = "";
zim::size_type firstPageOffset = zimFileHandler->getNamespaceBeginOffset('A');
zim::Article article = zimFileHandler->getArticle(firstPageOffset);
std::cout << article.getTitle() << std::endl;
url = article.getLongUrl();
return url;
}
/* Get a content from a zim file */
bool Reader::getContentByUrl(const string &urlStr, string &content, unsigned int &contentLength, string &contentType) {
bool retVal = false;

View File

@ -22,6 +22,7 @@ namespace kiwix {
unsigned int getArticleCount();
string getId();
string getRandomPageUrl();
string getFirstPageUrl();
string getMainPageUrl();
bool getContentByUrl(const string &url, string &content, unsigned int &contentLength, string &contentType);
bool searchSuggestions(const string &prefix, unsigned int suggestionsCount);