MLBookProc
2.1
Toggle main menu visibility
Loading...
Searching...
No Matches
BookmarksKeeper.h
1
/*
2
* Copyright (C) 2026 Yury Bobylev <bobilev_yury@mail.ru>
3
*
4
* This program is free software: you can redistribute it and/or modify it
5
* under the terms of the GNU General Public License as published by the Free
6
* Software Foundation, version 3.
7
*
8
* This program is distributed in the hope that it will be useful, but WITHOUT
9
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11
* more details.
12
*
13
* You should have received a copy of the GNU General Public License along with
14
* this program. If not, see <https://www.gnu.org/licenses/>.
15
*/
16
#ifndef BOOKMARKSKEEPER_H
17
#define BOOKMARKSKEEPER_H
18
19
#include <BaseID.h>
20
#include <MLBookProc.h>
21
#include <UDBase.h>
22
#include <filesystem>
23
#include <shared_mutex>
24
32
class
BookmarksKeeper
:
public
UDBase
33
{
34
public
:
39
BookmarksKeeper
(
const
std::shared_ptr<MLBookProc> &mlbp);
40
41
virtual
~BookmarksKeeper
();
42
50
void
51
loadBookmarksBase
(
const
std::filesystem::path &bookmarks_base_path);
52
58
void
59
addToBookmarks
(
const
UDBElement &book_search_result);
60
66
void
67
removeBookmark
(
const
UDBElement &bookmark);
68
74
std::shared_mutex *
75
getRawMutex
();
76
77
private
:
78
void
79
loadLegacyBase();
80
81
void
82
parseLegacyEntry(
const
std::string &entry);
83
84
std::shared_ptr<MLBookProc> mlbp;
85
86
std::filesystem::path base_path;
87
88
BaseID
bid;
89
90
std::shared_mutex base_mtx;
91
};
92
93
#endif
// BOOKMARKSKEEPER_H
BaseID
The BaseID class.
Definition
BaseID.h:28
BookmarksKeeper::addToBookmarks
void addToBookmarks(const UDBElement &book_search_result)
BookmarksKeeper::BookmarksKeeper
BookmarksKeeper(const std::shared_ptr< MLBookProc > &mlbp)
BookmarksKeeper constructor.
BookmarksKeeper::removeBookmark
void removeBookmark(const UDBElement &bookmark)
BookmarksKeeper::loadBookmarksBase
void loadBookmarksBase(const std::filesystem::path &bookmarks_base_path)
BookmarksKeeper::getRawMutex
std::shared_mutex * getRawMutex()
BookmarksKeeper.h
Generated by
1.17.0