File indexing completed on 2024-04-28 04:55:47
0001 /* 0002 This file is part of Choqok, the KDE micro-blogging client 0003 0004 SPDX-FileCopyrightText: 2017 Andrea Scarpino <scarpino@kde.org> 0005 0006 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0007 */ 0008 0009 #ifndef PUMPIOOAUTH_H 0010 #define PUMPIOOAUTH_H 0011 0012 #include <QOAuth1> 0013 0014 class PumpIOAccount; 0015 class PumpIOOAuthReplyHandler; 0016 0017 namespace KIO { 0018 class AccessManager; 0019 } 0020 0021 class PumpIOOAuth : public QOAuth1 0022 { 0023 Q_OBJECT 0024 public: 0025 explicit PumpIOOAuth(PumpIOAccount *account); 0026 ~PumpIOOAuth(); 0027 0028 QString authorizationHeader(const QUrl &requestUrl, QNetworkAccessManager::Operation method, 0029 const QVariantMap ¶ms = QVariantMap()); 0030 0031 private: 0032 PumpIOOAuthReplyHandler *m_replyHandler; 0033 KIO::AccessManager *m_networkAccessManager; 0034 }; 0035 0036 #endif // PUMPIOOAUTH_H