~jonas-drange/ubuntu-system-settings/lp1616800

« back to all changes in this revision

Viewing changes to plugins/system-update/network/accessmanager.h

  • Committer: Bileto Bot
  • Author(s): jonas-drange
  • Date: 2016-08-17 11:18:05 UTC
  • mfrom: (1631.6.245 updates-rewrite)
  • Revision ID: ci-train-bot@canonical.com-20160817111805-moyvik9wloy79ul3
rewrite the system update panel

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * This file is part of system-settings
 
3
 *
 
4
 * Copyright (C) 2016 Canonical Ltd.
 
5
 *
 
6
 * This program is free software: you can redistribute it and/or modify it
 
7
 * under the terms of the GNU General Public License version 3, as published
 
8
 * by the Free Software Foundation.
 
9
 *
 
10
 * This program is distributed in the hope that it will be useful, but
 
11
 * WITHOUT ANY WARRANTY; without even the implied warranties of
 
12
 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
 
13
 * PURPOSE.  See the GNU General Public License for more details.
 
14
 *
 
15
 * You should have received a copy of the GNU General Public License along
 
16
 * with this program.  If not, see <http://www.gnu.org/licenses/>.
 
17
 */
 
18
 
 
19
#ifndef NETWORK_ACCESS_MANAGER_H
 
20
#define NETWORK_ACCESS_MANAGER_H
 
21
 
 
22
#include <QObject>
 
23
#include <QByteArray>
 
24
#include <QtNetwork/QNetworkReply>
 
25
#include <QtNetwork/QNetworkRequest>
 
26
 
 
27
namespace UpdatePlugin
 
28
{
 
29
namespace Network
 
30
{
 
31
class Manager : public QObject
 
32
{
 
33
    Q_OBJECT
 
34
public:
 
35
    explicit Manager(QObject *parent = nullptr) : QObject(parent) {};
 
36
    virtual ~Manager() {};
 
37
    virtual QNetworkReply* post(const QNetworkRequest &request, const QByteArray &data) = 0;
 
38
    virtual QNetworkReply* head(const QNetworkRequest &request) = 0;
 
39
Q_SIGNALS:
 
40
    void finished(QNetworkReply *);
 
41
    void sslErrors(QNetworkReply *, const QList<QSslError>&);
 
42
};
 
43
} // Network
 
44
} // UpdatePlugin
 
45
 
 
46
#endif // NETWORK_ACCESS_MANAGER_H