libquentier
0.5.0
The library for rich desktop clients of Evernote service
Toggle main menu visibility
Loading...
Searching...
No Matches
headers
quentier
utility
FileIOProcessorAsync.h
1
/*
2
* Copyright 2016-2020 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
#ifndef LIB_QUENTIER_UTILITY_FILE_IO_PROCESSOR_ASYNC_H
20
#define LIB_QUENTIER_UTILITY_FILE_IO_PROCESSOR_ASYNC_H
21
22
#include <quentier/types/ErrorString.h>
23
#include <quentier/utility/Linkage.h>
24
25
#include <QByteArray>
26
#include <QIODevice>
27
#include <QObject>
28
#include <QString>
29
#include <QUuid>
30
31
namespace
quentier {
32
33
QT_FORWARD_DECLARE_CLASS(FileIOProcessorAsyncPrivate)
34
35
39
class QUENTIER_EXPORT FileIOProcessorAsync : public QObject
40
{
41
Q_OBJECT
42
public
:
43
explicit
FileIOProcessorAsync(QObject * parent =
nullptr
);
44
54
void
setIdleTimePeriod
(qint32 seconds);
55
56
Q_SIGNALS:
63
void
readyForIO
();
64
75
void
writeFileRequestProcessed
(
76
bool
success,
ErrorString
errorDescription, QUuid requestId);
77
89
void
readFileRequestProcessed
(
90
bool
success,
ErrorString
errorDescription, QByteArray data,
91
QUuid requestId);
92
93
public
Q_SLOTS:
105
void
onWriteFileRequest
(
106
QString absoluteFilePath, QByteArray data, QUuid requestId,
107
bool
append);
108
116
void
onReadFileRequest
(QString absoluteFilePath, QUuid requestId);
117
118
private
:
119
FileIOProcessorAsyncPrivate *
const
d_ptr;
120
Q_DECLARE_PRIVATE(FileIOProcessorAsync)
121
};
122
123
}
// namespace quentier
124
125
#endif
// LIB_QUENTIER_UTILITY_FILE_IO_PROCESSOR_ASYNC_H
quentier::ErrorString
The ErrorString class encapsulates two (or more) strings which are meant to contain translatable (bas...
Definition
ErrorString.h:44
quentier::FileIOProcessorAsync::readFileRequestProcessed
void readFileRequestProcessed(bool success, ErrorString errorDescription, QByteArray data, QUuid requestId)
readFileRequestProcessed signal is emitted when the file read request with given id is finished
quentier::FileIOProcessorAsync::onWriteFileRequest
void onWriteFileRequest(QString absoluteFilePath, QByteArray data, QUuid requestId, bool append)
onWriteFileRequest slot processes file write requests with given request ids
quentier::FileIOProcessorAsync::readyForIO
void readyForIO()
readyForIO signal is emitted when the queue for file IO is empty for some time (30 seconds by default...
quentier::FileIOProcessorAsync::writeFileRequestProcessed
void writeFileRequestProcessed(bool success, ErrorString errorDescription, QUuid requestId)
writeFileRequestProcessed signal is emitted when the file write request with given id is finished
quentier::FileIOProcessorAsync::setIdleTimePeriod
void setIdleTimePeriod(qint32 seconds)
setIdleTimePeriod sets time period defining the idle state of FileIOProcessorAsync: once the time mea...
quentier::FileIOProcessorAsync::onReadFileRequest
void onReadFileRequest(QString absoluteFilePath, QUuid requestId)
onReadFileRequest slot processes file read requests with given request ids
Generated on
for libquentier by
1.17.0