mirror of https://github.com/kiwix/libkiwix.git
+ fix a few things for the 0.9 alpha4
This commit is contained in:
parent
19ac4741e6
commit
a69aac50bc
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue