QOAuth 1.0.1
qoauth_namespace.h
Go to the documentation of this file.
1/***************************************************************************
2 * Copyright (C) 2009 by Dominik Kapusta <d@ayoy.net> *
3 * *
4 * This library is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU Lesser General Public License as *
6 * published by the Free Software Foundation; either version 2.1 of *
7 * the License, or (at your option) any later version. *
8 * *
9 * This library is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
12 * Lesser General Public License for more details. *
13 * *
14 * You should have received a copy of the GNU Lesser General Public *
15 * License along with this library; if not, write to *
16 * the Free Software Foundation, Inc., *
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
18 ***************************************************************************/
19
20
28#ifndef QOAUTH_NAMESPACE_H
29#define QOAUTH_NAMESPACE_H
30
31#include <QMultiMap>
32#include <QByteArray>
33
34#include "qoauth_global.h"
35
40namespace QOAuth {
41
46 typedef QMultiMap<QByteArray,QByteArray> ParamMap;
47
63 };
64
84 PUT
85#ifndef Q_WS_WIN
87#endif
88 };
89
112 };
113
125 NoError = 200,
128 Forbidden = 403,
129 Timeout = 1001,
138 // RSAPassphraseError, //!< RSA passphrase is incorrect (or has not been provided)
143 };
144
145
149 QOAUTH_EXPORT QByteArray supportedOAuthVersion();
150
169 QOAUTH_EXPORT QByteArray tokenParameterName();
170
176 QOAUTH_EXPORT QByteArray tokenSecretParameterName();
177
178} // namespace QOAuth
179
180#endif // QOAUTH_NAMESPACE_H
This namespace encapsulates all classes and definitions provided by libqoauth.
Definition: interface.h:41
ErrorCode
This enum type defines error types that are assigned to the QOAuth::Interface::error property.
Definition: qoauth_namespace.h:124
@ BadRequest
Represents HTTP status code 400 (Bad Request)
Definition: qoauth_namespace.h:126
@ Unauthorized
Represents HTTP status code 401 (Unauthorized)
Definition: qoauth_namespace.h:127
@ RSAPrivateKeyEmpty
RSA private key has not been provided.
Definition: qoauth_namespace.h:137
@ ConsumerKeyEmpty
Consumer key has not been provided.
Definition: qoauth_namespace.h:130
@ Timeout
Represents a request timeout error.
Definition: qoauth_namespace.h:129
@ RSADecodingError
Definition: qoauth_namespace.h:139
@ RSAKeyFileError
The provided key file either doesn't exist or is unreadable.
Definition: qoauth_namespace.h:141
@ UnsupportedHttpMethod
Definition: qoauth_namespace.h:132
@ OtherError
A network-related error not specified above.
Definition: qoauth_namespace.h:142
@ NoError
No error occured (so far :-) )
Definition: qoauth_namespace.h:125
@ ConsumerSecretEmpty
Consumer secret has not been provided.
Definition: qoauth_namespace.h:131
@ Forbidden
Represents HTTP status code 403 (Forbidden)
Definition: qoauth_namespace.h:128
ParsingMode
This enum type specifies the method of parsing parameters into a parameter string.
Definition: qoauth_namespace.h:106
@ ParseForHeaderArguments
HTTP request header format (parameters to be put inside a request header)
Definition: qoauth_namespace.h:110
@ ParseForSignatureBaseString
Signature Base String format, meant for internal use.
Definition: qoauth_namespace.h:111
@ ParseForRequestContent
Inline query format (foo=bar&bar=baz&baz=foo ...), suitable for POST requests.
Definition: qoauth_namespace.h:107
@ ParseForInlineQuery
Definition: qoauth_namespace.h:108
QMultiMap< QByteArray, QByteArray > ParamMap
A typedef for the data structure for storing request parameters.
Definition: qoauth_namespace.h:46
SignatureMethod
This enum type describes the signature method used by the request.
Definition: qoauth_namespace.h:59
@ HMAC_SHA1
Sets the signature method to HMAC-SHA1.
Definition: qoauth_namespace.h:60
@ PLAINTEXT
Sets the signature method to PLAINTEXT (not implemented yet)
Definition: qoauth_namespace.h:62
@ RSA_SHA1
Sets the signature method to RSA-SHA1 (not implemented yet)
Definition: qoauth_namespace.h:61
QOAUTH_EXPORT QByteArray tokenParameterName()
Returns the name of the Access Token argument parameter (oauth_token in current implementation)
Definition: interface.cpp:183
HttpMethod
This enum type specifies the HTTP method used for creating a Signature Base String and/or sending a r...
Definition: qoauth_namespace.h:80
@ DELETE
Sets the HTTP method to DELETE.
Definition: qoauth_namespace.h:86
@ HEAD
Sets the HTTP method to HEAD.
Definition: qoauth_namespace.h:83
@ GET
Sets the HTTP method to GET.
Definition: qoauth_namespace.h:81
@ PUT
Sets the HTTP method to PUT.
Definition: qoauth_namespace.h:84
@ POST
Sets the HTTP method to POST.
Definition: qoauth_namespace.h:82
QOAUTH_EXPORT QByteArray supportedOAuthVersion()
Returns the supported OAuth protocol version.
Definition: interface.cpp:178
QOAUTH_EXPORT QByteArray tokenSecretParameterName()
Returns the name of the Token Secret argument parameter (oauth_token_secret in current implementation...
Definition: interface.cpp:188