Debian Codegraph @

Dekko/backend/network/ForbiddenReply.h

raw symbols SCIP
1 /* Copyright (C) 2016 - 2017 Dan Chapman <[email protected]>
2
3 This file is part of Dekko email client for Ubuntu devices
4
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License as
7 published by the Free Software Foundation; either version 2 of
8 the License or (at your option) version 3
9
10 This program 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 General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18 #ifndef FORBIDDENREPLY_H
19 #define FORBIDDENREPLY_H
20
21 #include <QNetworkReply>
22
23 /** @short A network reply which indicates that the request got denied by policy */
24 class ForbiddenReply : public QNetworkReply
25 {
26 Q_OBJECT
27 public:
28 explicit ForbiddenReply(QObject *parent);
29 ForbiddenReply(QObject *parent, const QString &reason);
30 protected:
31 virtual qint64 readData(char *data, qint64 maxSize) {
32 Q_UNUSED(data); Q_UNUSED(maxSize);
33 return -1;
34 }
35 virtual void abort() {}
36 private slots:
37 void slotFinish();
38 };
39
40 #endif // FORBIDDENREPLY_H