#include <BookMarks.h>
Public Member Functions | |
BookMarks (const std::shared_ptr< AuxFunc > &af) | |
BookMarks constructor. | |
virtual | ~BookMarks () |
BookMarks destructor. | |
int | createBookMark (const std::string &col_name, const BookBaseEntry &bbe) |
Creates bookmark. | |
std::vector< std::tuple< std::string, BookBaseEntry > > | getBookMarks () |
Returns bookmarks. | |
void | removeBookMark (const std::string &col_name, const BookBaseEntry &bbe) |
Removes bookmark. | |
The BookMarks class.
This class keeps and operates collection bookmarks. Path to bookmarks base is "~/.local/share/MyLibrary/BookMarks/bookmarks".
BookMarks::BookMarks | ( | const std::shared_ptr< AuxFunc > & | af | ) |
int BookMarks::createBookMark | ( | const std::string & | col_name, |
const BookBaseEntry & | bbe ) |
Creates bookmark.
If bookmark already exists, returns 0, in case of success returns 1, otherwise returns -1.
col_name | collection name book came from. |
bbe | BookBaseEntry got from BaseKeeper::searchBook(). |
std::vector< std::tuple< std::string, BookBaseEntry > > BookMarks::getBookMarks | ( | ) |
Returns bookmarks.
void BookMarks::removeBookMark | ( | const std::string & | col_name, |
const BookBaseEntry & | bbe ) |
Removes bookmark.
col_name | collection name. |
bbe | book entry to be removed. |