An opds feed can also be the openSearch result.

We must be able to set the correct entry in the feed for a searchResult.
This commit is contained in:
Matthieu Gautier
2018-10-24 11:51:38 +02:00
parent b1508c0b98
commit c20ae18bff
2 changed files with 27 additions and 0 deletions

View File

@ -84,6 +84,15 @@ class OPDSDumper
*/
void setSearchDescriptionUrl(const std::string& searchDescriptionUrl) { this->searchDescriptionUrl = searchDescriptionUrl; }
/**
* Set some informations about the search results.
*
* @param totalResult the total number of results of the search.
* @param startIndex the start index of the result.
* @param count the number of result of the current set (or page).
*/
void setOpenSearchInfo(int totalResult, int startIndex, int count);
/**
* Set the library to dump.
*
@ -98,6 +107,10 @@ class OPDSDumper
std::string date;
std::string rootLocation;
std::string searchDescriptionUrl;
int m_totalResults;
int m_startIndex;
int m_count;
bool m_isSearchResult = false;
private:
pugi::xml_node handleBook(Book book, pugi::xml_node root_node);