Introduce readCategoriesFromFeed()

Added a function to load categories stored in an OPDS stream
This commit is contained in:
Nikhil Tanwar
2023-07-11 15:44:27 +05:30
parent a28c2973e9
commit 94d6bef402
2 changed files with 38 additions and 0 deletions

View File

@ -28,6 +28,7 @@
namespace kiwix {
typedef std::pair<std::string, std::string> LangNameCodePair;
typedef std::vector<LangNameCodePair> FeedLanguages;
typedef std::vector<std::string> FeedCategories;
/**
* Return the current directory.
@ -235,5 +236,13 @@ std::string beautifyFileSize(uint64_t number);
* @return vector containing pairs of language code and their corresponding full language name.
*/
FeedLanguages readLanguagesFromFeed(const std::string& content);
/**
* Load categories stored in an OPDS stream .
*
* @param content the OPDS stream.
* @return vector containing category strings.
*/
FeedCategories readCategoriesFromFeed(const std::string& content);
}
#endif // KIWIX_TOOLS_H