Make the library create the reader.

This commit is contained in:
Matthieu Gautier
2019-08-08 15:52:19 +02:00
parent e56335109c
commit ce8fff0b42
2 changed files with 19 additions and 0 deletions

View File

@ -23,6 +23,7 @@
#include <string>
#include <vector>
#include <map>
#include <memory>
#include "book.h"
#include "bookmark.h"
@ -110,6 +111,7 @@ class Filter {
class Library
{
std::map<std::string, kiwix::Book> m_books;
std::map<std::string, std::shared_ptr<Reader>> m_readers;
std::vector<kiwix::Bookmark> m_bookmarks;
public:
@ -145,6 +147,7 @@ class Library
bool removeBookmark(const std::string& zimId, const std::string& url);
Book& getBookById(const std::string& id);
std::shared_ptr<Reader> getReaderById(const std::string& id);
/**
* Remove a book from the library.