-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsecure.h
48 lines (34 loc) · 936 Bytes
/
secure.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef SECURE_H
#define SECURE_H
#include <QObject>
#include <QNetworkReply>
class SecurePrivate;
class SecureKeyCallback {
public:
~SecureKeyCallback();
virtual void acceptKey(QByteArray key) = 0;
};
class Secure : public QObject
{
Q_OBJECT
Q_PROPERTY(SecureKeyCallback* delegate READ delegate WRITE setDelegate NOTIFY delegateChanged)
Q_PROPERTY(QUrl url READ url WRITE setUrl NOTIFY urlChanged)
public:
explicit Secure(QObject *parent = 0);
~Secure();
SecureKeyCallback* delegate() const;
QUrl url() const;
signals:
void delegateChanged(SecureKeyCallback* delegate);
void urlChanged(QUrl arg);
public slots:
void request();
void responseReceived(QNetworkReply *reply);
void setDelegate(SecureKeyCallback* delegate);
void setUrl(QUrl url);
private:
QScopedPointer<SecurePrivate> p;
SecureKeyCallback* m_delegate;
QUrl m_url;
};
#endif // SECURE_H