libquentier  0.8.0
The library for rich desktop clients of Evernote service
ISyncEventsNotifier.h
1 /*
2  * Copyright 2023-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/Fwd.h>
22 #include <quentier/synchronization/types/Fwd.h>
23 #include <quentier/utility/Linkage.h>
24 
25 #include <qevercloud/types/LinkedNotebook.h>
26 
27 #include <QList>
28 #include <QObject>
29 
30 namespace quentier::synchronization {
31 
32 class QUENTIER_EXPORT ISyncEventsNotifier : public QObject
33 {
34  Q_OBJECT
35 protected:
36  explicit ISyncEventsNotifier(QObject * parent = nullptr);
37 
38 public:
39  ~ISyncEventsNotifier() override;
40 
41 Q_SIGNALS:
58  void syncChunksDownloadProgress(
59  qint32 highestDownloadedUsn, qint32 highestServerUsn,
60  qint32 lastPreviousUsn);
61 
66  void syncChunksDownloaded();
67 
72  void syncChunksDataProcessingProgress(ISyncChunksDataCountersPtr counters);
73 
81  void startLinkedNotebooksDataDownloading(
82  const QList<qevercloud::LinkedNotebook> & linkedNotebooks);
83 
103  void linkedNotebookSyncChunksDownloadProgress(
104  qint32 highestDownloadedUsn, qint32 highestServerUsn,
105  qint32 lastPreviousUsn,
106  const qevercloud::LinkedNotebook & linkedNotebook);
107 
114  void linkedNotebookSyncChunksDownloaded(
115  const qevercloud::LinkedNotebook & linkedNotebook);
116 
125  void linkedNotebookSyncChunksDataProcessingProgress(
126  ISyncChunksDataCountersPtr counters,
127  const qevercloud::LinkedNotebook & linkedNotebook);
128 
138  void notesDownloadProgress(
139  quint32 notesDownloaded, quint32 totalNotesToDownload);
140 
151  void linkedNotebookNotesDownloadProgress(
152  quint32 notesDownloaded, quint32 totalNotesToDownload,
153  const qevercloud::LinkedNotebook & linkedNotebook);
154 
165  void resourcesDownloadProgress(
166  quint32 resourcesDownloaded, quint32 totalResourcesToDownload);
167 
179  void linkedNotebookResourcesDownloadProgress(
180  quint32 resourcesDownloaded, quint32 totalResourcesToDownload,
181  const qevercloud::LinkedNotebook & linkedNotebook);
182 
191  void downloadFinished(bool dataDownloaded);
192 
199  void userOwnSendStatusUpdate(ISendStatusPtr sendStatus);
200 
209  void linkedNotebookSendStatusUpdate(
210  const qevercloud::Guid & linkedNotebookGuid, ISendStatusPtr sendStatus);
211 };
212 
213 } // namespace quentier::synchronization
Definition: synchronization/Factory.h:35
Definition: ISyncEventsNotifier.h:32