00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00028 #ifndef QOAUTH_NAMESPACE_H
00029 #define QOAUTH_NAMESPACE_H
00030
00031 #include <QMultiMap>
00032 #include <QByteArray>
00033
00034 #include "qoauth_global.h"
00035
00040 namespace QOAuth {
00041
00046 typedef QMultiMap<QByteArray,QByteArray> ParamMap;
00047
00059 enum SignatureMethod {
00060 HMAC_SHA1,
00061 RSA_SHA1,
00062 PLAINTEXT
00063 };
00064
00080 enum HttpMethod {
00081 GET,
00082 POST,
00083 HEAD,
00084 PUT
00085 #ifndef Q_WS_WIN
00086 , DELETE
00087 #endif
00088 };
00089
00106 enum ParsingMode {
00107 ParseForRequestContent,
00108 ParseForInlineQuery,
00110 ParseForHeaderArguments,
00111 ParseForSignatureBaseString
00112 };
00113
00124 enum ErrorCode {
00125 NoError = 200,
00126 BadRequest = 400,
00127 Unauthorized = 401,
00128 Forbidden = 403,
00129 Timeout = 1001,
00130 ConsumerKeyEmpty,
00131 ConsumerSecretEmpty,
00132 UnsupportedHttpMethod,
00137 RSAPrivateKeyEmpty = 1101,
00138
00139 RSADecodingError,
00141 RSAKeyFileError,
00142 OtherError
00143 };
00144
00145
00149 QOAUTH_EXPORT QByteArray supportedOAuthVersion();
00150
00169 QOAUTH_EXPORT QByteArray tokenParameterName();
00170
00176 QOAUTH_EXPORT QByteArray tokenSecretParameterName();
00177
00178 }
00179
00180 #endif // QOAUTH_NAMESPACE_H