libquentier 0.8.0
The library for rich desktop clients of Evernote service
Loading...
Searching...
No Matches
ILocalStorageNotifier.h
1/*
2 * Copyright 2020-2024 Dmitry Ivanov
3 *
4 * This file is part of libquentier
5 *
6 * libquentier is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation, version 3 of the License.
9 *
10 * libquentier is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with libquentier. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#pragma once
20
21#include <quentier/local_storage/ILocalStorage.h>
22
23#include <QObject>
24
25namespace quentier::local_storage {
26
28{
30protected:
31 explicit ILocalStorageNotifier(QObject * parent = nullptr);
32
33public:
34 ~ILocalStorageNotifier() override;
35
37 // Notifications about user related events
38 void userPut(qevercloud::User user);
39 void userExpunged(qevercloud::UserID userId);
40
41 // Notifications about notebook related events
42 void notebookPut(qevercloud::Notebook notebook);
43 void notebookExpunged(QString notebookLocalId);
44
45 // Notifications about linked notebooks
46 void linkedNotebookPut(qevercloud::LinkedNotebook linkedNotebook);
47 void linkedNotebookExpunged(qevercloud::Guid linkedNotebookGuid);
48
49 // Notifications about note related events
50 void notePut(qevercloud::Note note);
51
52 void noteUpdated(
53 qevercloud::Note note, ILocalStorage::UpdateNoteOptions options);
54
55 void noteExpunged(QString noteLocalId);
56
57 // Notifications about tag related events
58 void tagPut(qevercloud::Tag tag);
59
61
62 // Notifications about resource related events
63 void resourcePut(qevercloud::Resource resource);
64 void resourceMetadataPut(qevercloud::Resource resource);
65 void resourceExpunged(QString resourceLocalId);
66
67 // Notifications about saved search related events
68 void savedSearchPut(qevercloud::SavedSearch savedSearch);
69 void savedSearchExpunged(QString savedSearchLocalId);
70};
71
72} // namespace quentier::local_storage
The Result template class represents the bare bones result monad implementation which either contains...
Definition Result.h:38
Definition ILocalStorageNotifier.h:28