You.i Engine
CYIOAuthRequest Class Reference

Detailed Description

This class prepares an OAuth HTTP Request over HTTP.

#include <network/YiOAuthRequest.h>

Inheritance diagram for CYIOAuthRequest:

Public Member Functions

 CYIOAuthRequest ()
 
 CYIOAuthRequest (const CYIServer &server)
 
 CYIOAuthRequest (const CYIServer &server, const CYIUrl &url, CYIHTTPRequest::METHOD eMethod)
 
virtual ~CYIOAuthRequest ()
 
void AddOAuthParameter (const CYIString &rKeyword, const CYIString &rValue)
 
void AddOAuthSignature (const CYIString &rSecret)
 
void ClearURLParameters ()
 
void FinalizeOAuthParameters (const CYIString &rUserAccessToken, const CYIString &rUserAccessTokenSecret)
 
- Public Member Functions inherited from CYIHTTPRequest
 CYIHTTPRequest ()
 
 CYIHTTPRequest (const CYIUrl &url, CYIHTTPRequest::METHOD eMethod)
 
 CYIHTTPRequest (const CYIServer &server)
 
 CYIHTTPRequest (const CYIServer &server, const CYIUrl &url, CYIHTTPRequest::METHOD eMethod)
 
virtual ~CYIHTTPRequest ()
 
void SetMethod (CYIHTTPRequest::METHOD eMethod)
 
void SetServer (const CYIServer &server)
 
void SetPostData (const CYIString &postData)
 
const std::vector< char > & GetPostData () const
 
void AddHeader (const CYIString &header)
 
const std::vector< CYIString > & GetHeaders () const
 
uint64_t GetUniqueID () const
 
uint32_t GetID () const
 
void SetID (uint32_t uRequestID)
 
void SetContextID (uint32_t uContextID)
 
uint32_t GetContextID () const
 
void SetCompressionType (COMPRESSION_TYPE eCompressionType)
 
CYIHTTPRequest::COMPRESSION_TYPE GetCompressionType () const
 
METHOD GetMethod () const
 
void SetURL (const CYIUrl &url)
 
const CYIUrlGetURL () const
 
const CYIServer GetServer () const
 
void SetNetworkTimeoutMs (uint32_t uNetworkTimeoutMs)
 
uint32_t GetNetworkTimeoutMs () const
 
void SetConnectionTimeoutMs (uint32_t uConnectionTimeoutMs)
 
uint32_t GetConnectionTimeoutMs () const
 
void SetOpaqueCleanupObject (OpaqueCleanup *pCleanup)
 
void SetIsConnectivityProbe (bool bIsConnectivityProbe)
 
bool IsConnectivityProbe () const
 
void SetUseCookies (bool bUseCookies)
 
bool IsUsingCookies () const
 
void * GetPriv () const
 
bool operator== (const CYIHTTPRequest &other) const
 
bool operator!= (const CYIHTTPRequest &other) const
 
- Public Member Functions inherited from CYIScriptableObject
 CYIScriptableObject ()
 
 CYIScriptableObject (const CYIScriptableObject &other)
 
CYIScriptableObjectoperator= (const CYIScriptableObject &other)
 
virtual ~CYIScriptableObject ()
 
CYIBindingImplementationGetBindingImplementation () const
 
void SetBindingImplementation (CYIBindingImplementation *pBindingImplementation)
 
virtual const CYIRuntimeTypeInfoGetRuntimeTypeInfoForScriptObject () const
 

Additional Inherited Members

- Public Types inherited from CYIHTTPRequest
enum  METHOD {
  GET,
  PUT,
  POST,
  DELETE
}
 Supported HTTP request methods. More...
 
enum  COMPRESSION_TYPE {
  UNCOMPRESSED,
  GZIP
}
 Provides a hint to the server if compression can be used on the response data. More...
 
- Public Attributes inherited from CYIHTTPRequest
CYISignal< const std::shared_ptr< CYIHTTPRequest > &, const std::shared_ptr< CYIHTTPResponse > &, bool > NotifyResponse
 Emitted when a response has been received for this request. The bool parameter will be true if the response is a cached response and false if the response is a server response. More...
 
CYISignal< const std::shared_ptr< CYIHTTPRequest > &, const HTTP_STATUS_CODE, const CYIString & > NotifyError
 Emitted when an error occured processing this request, and no response is available. Parameters included are the status code (which may be from the server or locally generated if an error occured during processing) and an error string. More...
 
CYISignal< const std::shared_ptr< CYIHTTPRequest > &, const std::shared_ptr< CYIHTTPResponse > &, const HTTP_STATUS_CODENotifyComplete
 Emitted when a success or failure response is received, or no response is available. Parameters included are request, response and status code. More...
 

Constructor & Destructor Documentation

CYIOAuthRequest::CYIOAuthRequest ( )
CYIOAuthRequest::CYIOAuthRequest ( const CYIServer server)
CYIOAuthRequest::CYIOAuthRequest ( const CYIServer server,
const CYIUrl url,
CYIHTTPRequest::METHOD  eMethod 
)
virtual CYIOAuthRequest::~CYIOAuthRequest ( )
virtual

Member Function Documentation

void CYIOAuthRequest::AddOAuthParameter ( const CYIString rKeyword,
const CYIString rValue 
)

Adds an OAuth-specific keyword/value pair to the request. This pair will be used in computing the OAuth signature.

void CYIOAuthRequest::AddOAuthSignature ( const CYIString rSecret)

Adds an OAuth-signature to the request.

The URI including the of oauth keyword/value pairs will be encoded as the signature data.

The application secret along with the optional sSecret will be used as the signature key.

void CYIOAuthRequest::ClearURLParameters ( )

Clears all parameters.

void CYIOAuthRequest::FinalizeOAuthParameters ( const CYIString rUserAccessToken,
const CYIString rUserAccessTokenSecret 
)

This has to be the last call after all other OAuth Parameters are specified using AddOAuthParameter(). This function will add necessary fields based on Get/Post method information and finalize the OAuth query with the signature. Token information will be retrieved from userData.


The documentation for this class was generated from the following file: