| 1 | /** |
| 2 | * KQOAuth - An OAuth authentication library for Qt. |
| 3 | * |
| 4 | * Author: Johan Paul ([email protected]) |
| 5 | * http://www.johanpaul.com |
| 6 | * |
| 7 | * This library is free software; you can redistribute it and/or |
| 8 | * modify it under the terms of the GNU Lesser General Public |
| 9 | * License as published by the Free Software Foundation; either |
| 10 | * version 2.1 of the License, or (at your option) any later version. |
| 11 | * |
| 12 | * KQOAuth is distributed in the hope that it will be useful, |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | * GNU Lesser General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU Lesser General Public License |
| 18 | * along with KQOAuth. If not, see <http://www.gnu.org/licenses/>. |
| 19 | */ |
| 20 | #ifndef KQOAUTHREQUEST_XAUTH_H |
| 21 | #define KQOAUTHREQUEST_XAUTH_H |
| 22 | |
| 23 | #include "kqoauthrequest.h" |
| 24 | #include "kqoauthrequest_1.h" |
| 25 | |
| 26 | class KQOAuthRequest_XAuthPrivate; |
| 27 | class KQOAUTH_EXPORT KQOAuthRequest_XAuth : public KQOAuthRequest |
| 28 | { |
| 29 | Q_OBJECT |
| 30 | public: |
| 31 | KQOAuthRequest_XAuth(QObject *parent = 0); |
| 32 | |
| 33 | /** |
| 34 | * These methods can be overridden in child classes which are different types of |
| 35 | * OAuth requests. |
| 36 | */ |
| 37 | // Validate the request of this type. |
| 38 | bool isValid() const; |
| 39 | |
| 40 | // Give the xAuth specific parameters. |
| 41 | void setXAuthLogin(const QString &username = "", |
| 42 | const QString &password = ""); |
| 43 | |
| 44 | private: |
| 45 | KQOAuthRequest_XAuthPrivate * const d_ptr; |
| 46 | bool xauth_parameters_set; |
| 47 | }; |
| 48 | |
| 49 | #endif // KQOAUTHREQUEST_XAUTH_H |