Allow bookmark to be created from a Book and url/title.

This commit is contained in:
Matthieu Gautier
2024-01-16 17:15:02 +01:00
parent 699f96ca0d
commit a546effa15
3 changed files with 64 additions and 13 deletions

View File

@ -29,13 +29,25 @@ class xml_node;
namespace kiwix
{
class Book;
/**
* A class to store information about a bookmark (an article in a book)
*/
class Bookmark
{
public:
/**
* Create an empty bookmark.
*
* Bookmark must be populated with `set*` methods
*/
Bookmark();
/**
* Create a bookmark given a Book, a path and a title.
*/
Bookmark(const Book& book, const std::string& path, const std::string& title);
~Bookmark();
void updateFromXml(const pugi::xml_node& node);