1// Copyright (C) 2017 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QABSTRACTOAUTHREPLYHANDLER_H
5#define QABSTRACTOAUTHREPLYHANDLER_H
6
7#include <QtNetworkAuth/qoauthglobal.h>
8
9#ifndef QT_NO_HTTP
10
11#include <QtNetworkAuth/qabstractoauth.h>
12
13#include <QtCore/qobject.h>
14
15QT_BEGIN_NAMESPACE
16
17class Q_OAUTH_EXPORT QAbstractOAuthReplyHandler : public QObject
18{
19 Q_OBJECT
20
21public:
22 explicit QAbstractOAuthReplyHandler(QObject *parent = nullptr);
23 virtual ~QAbstractOAuthReplyHandler();
24
25 virtual QString callback() const = 0;
26
27public Q_SLOTS:
28 virtual void networkReplyFinished(QNetworkReply *reply) = 0;
29
30Q_SIGNALS:
31 void callbackReceived(const QVariantMap &values);
32 void tokensReceived(const QVariantMap &tokens);
33 void tokenRequestErrorOccurred(QAbstractOAuth::Error error, const QString& errorString);
34
35 void replyDataReceived(const QByteArray &data);
36 void callbackDataReceived(const QByteArray &data);
37
38protected:
39 QAbstractOAuthReplyHandler(QObjectPrivate &d, QObject *parent = nullptr);
40
41private:
42 Q_DISABLE_COPY(QAbstractOAuthReplyHandler)
43};
44
45QT_END_NAMESPACE
46
47#endif // QT_NO_HTTP
48
49#endif // QABSTRACTOAUTHREPLYHANDLER_H
50

Provided by KDAB

Privacy Policy
Learn Advanced QML with KDAB
Find out more

source code of qtnetworkauth/src/oauth/qabstractoauthreplyhandler.h