Class OPDSDumper¶
Defined in File opds_dumper.h
Class Documentation¶
-
class
kiwix
::
OPDSDumper
¶ A tool to dump a
Library
into a opds stream.Public Functions
-
OPDSDumper
() = default¶
-
~OPDSDumper
()¶
-
std::string
dumpOPDSFeed
(const std::vector<std::string> &bookIds, const std::string &query) const¶ Dump the OPDS feed.
- Parameters
bookIds – the ids of the books to include in the feed
query – the query used to obtain the list of book ids
- Returns
The OPDS feed.
-
std::string
dumpOPDSFeedV2
(const std::vector<std::string> &bookIds, const std::string &query, bool partial) const¶ Dump the OPDS feed.
- Parameters
bookIds – the ids of the books to include in the feed
query – the query used to obtain the list of book ids
partial – whether the feed should include partial or complete entries
- Returns
The OPDS feed.
-
std::string
dumpOPDSCompleteEntry
(const std::string &bookId) const¶ Dump the OPDS complete entry document.
- Parameters
bookId – the id of the book
- Returns
The OPDS complete entry document.
-
std::string
categoriesOPDSFeed
() const¶ Dump the categories OPDS feed.
- Returns
The OPDS feed.
-
std::string
languagesOPDSFeed
() const¶ Dump the languages OPDS feed.
- Returns
The OPDS feed.
-
inline void
setLibraryId
(const std::string &id)¶ Set the id of the library.
- Parameters
id – the id to use.
-
inline void
setRootLocation
(const std::string &rootLocation)¶ Set the root location used when generating url.
- Parameters
rootLocation – the root location to use.
-
void
setOpenSearchInfo
(int totalResult, int startIndex, int count)¶ Set some informations about the search results.
- Parameters
totalResult – the total number of results of the search.
startIndex – the start index of the result.
count – the number of result of the current set (or page).
-