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
00036 namespace QOAuth {
00037
00042 typedef QMultiMap<QByteArray,QByteArray> ParamMap;
00043
00057 enum SignatureMethod {
00058 HMAC_SHA1,
00059 RSA_SHA1,
00060 PLAINTEXT
00061 };
00062
00078 enum HttpMethod {
00079 GET,
00080 POST,
00081 HEAD,
00082 PUT,
00083 DELETE
00084 };
00085
00102 enum ParsingMode {
00103 ParseForRequestContent,
00104 ParseForInlineQuery,
00106 ParseForHeaderArguments,
00107 ParseForSignatureBaseString
00108 };
00109
00120 enum ErrorCode {
00121 NoError = 200,
00122 BadRequest = 400,
00123 Unauthorized = 401,
00124 Forbidden = 403,
00125 Timeout = 1001,
00126 ConsumerKeyEmpty,
00127 ConsumerSecretEmpty,
00128 UnsupportedHttpMethod,
00132 RSAPrivateKeyEmpty = 1101,
00133
00134 RSADecodingError,
00136 RSAKeyFileError,
00137 OtherError
00138 };
00139
00140
00144 QByteArray supportedOAuthVersion();
00145
00163 QByteArray tokenParameterName();
00164
00169 QByteArray tokenSecretParameterName();
00170
00171 }
00172
00173 #endif // QOAUTH_NAMESPACE_H