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

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