libquentier 0.8.0
The library for rich desktop clients of Evernote service
Loading...
Searching...
No Matches
ISendStatus.h
1/*
2 * Copyright 2022-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/synchronization/types/Errors.h>
22#include <quentier/utility/Linkage.h>
23#include <quentier/utility/Printable.h>
24
25#include <qevercloud/types/Note.h>
26#include <qevercloud/types/Notebook.h>
27#include <qevercloud/types/SavedSearch.h>
28#include <qevercloud/types/Tag.h>
29#include <qevercloud/types/TypeAliases.h>
30
31#include <QException>
32#include <QList>
33
34#include <memory>
35#include <utility>
36
37namespace quentier::synchronization {
38
45{
46public:
47 using QExceptionPtr = std::shared_ptr<QException>;
48
49 using NoteWithException = std::pair<qevercloud::Note, QExceptionPtr>;
50
51 using NotebookWithException =
52 std::pair<qevercloud::Notebook, QExceptionPtr>;
53
54 using SavedSearchWithException =
55 std::pair<qevercloud::SavedSearch, QExceptionPtr>;
56
57 using TagWithException = std::pair<qevercloud::Tag, QExceptionPtr>;
58
59public:
60 // Total
61
66
71
76
81
82 // Notes
83
88
94 const = 0;
95
96 // Notebooks
97
102
108 const = 0;
109
110 // Saved searches
111
116 const = 0;
117
124
125 // Tags
126
131
137
138 // General
139
145 [[nodiscard]] virtual StopSynchronizationError stopSynchronizationError()
146 const = 0;
147
154 [[nodiscard]] virtual bool needToRepeatIncrementalSync() const = 0;
155};
156
157} // namespace quentier::synchronization
The Printable class is the interface for Quentier's internal classes which should be able to write th...
Definition Printable.h:38
The Result template class represents the bare bones result monad implementation which either contains...
Definition Result.h:38
The ISendStatus interface represents the information about the attempt to send information either fro...
Definition ISendStatus.h:45
virtual QList< SavedSearchWithException > failedToSendSavedSearches() const =0
virtual QList< NotebookWithException > failedToSendNotebooks() const =0
virtual QList< TagWithException > failedToSendTags() const =0
virtual quint64 totalSuccessfullySentNotebooks() const =0
virtual quint64 totalAttemptedToSendNotes() const =0
virtual StopSynchronizationError stopSynchronizationError() const =0
virtual quint64 totalSuccessfullySentSavedSearches() const =0
virtual quint64 totalSuccessfullySentNotes() const =0
virtual quint64 totalSuccessfullySentTags() const =0
virtual quint64 totalAttemptedToSendNotebooks() const =0
virtual bool needToRepeatIncrementalSync() const =0
virtual QList< NoteWithException > failedToSendNotes() const =0
virtual quint64 totalAttemptedToSendSavedSearches() const =0
virtual quint64 totalAttemptedToSendTags() const =0