CSymbianTransportAgent Class Reference

CSymbianTransportAgent Provides simple interface to Symbian HTTP Client API. More...

#include <SymbianTransportAgent.h>

List of all members.

Public Member Functions

 ~CSymbianTransportAgent ()
 ~CSymbianTransportAgent() Destroy the object
void ConnectL ()
 ConnectL() Open an internet connection.
void SetIap (const TUint32 &aIap)
 SetIap() Set a preferred IAP.
char * sendMessage (const char *msg)
 sendMessage()
TBool GetNextDataPart (TPtrC8 &aDataChunk)
void ReleaseData ()
TInt OverallDataSize ()
TInt Reset ()

Static Public Member Functions

static CSymbianTransportAgentNewL (URL &aUrl, Proxy &aProxy, unsigned int aResponseTimeout=DEFAULT_MAX_TIMEOUT, unsigned int aMaxMsgSize=DEFAULT_MAX_MSG_SIZE)
 NewL() Create a CSymbianTransportAgent object.
static CSymbianTransportAgentNewLC (URL &aUrl, Proxy &aProxy, unsigned int aResponseTimeout=DEFAULT_MAX_TIMEOUT, unsigned int aMaxMsgSize=DEFAULT_MAX_MSG_SIZE)
 NewLC() Create a CSymbianTransportAgent object.

Private Member Functions

void ConstructL (URL &aUrl)
 ConstructL() Perform the second phase construction of a CSymbianTransportAgent object.
 CSymbianTransportAgent (URL &aUrl, Proxy &aProxy, unsigned int aResponseTimeout)
 CSymbianTransportAgent() Perform the first phase of two phase construction.
void SetHeaderL (RHTTPHeaders aHeaders, TInt aHdrField, const TDesC8 &aHdrValue)
 SetHeaderL() Set a field-value pair for the given HTTP header.
void reuseActiveConnection ()
 Uses an already active RConnection owned by singleton FConnection, this saves resources and memory.
void MHFRunL (RHTTPTransaction aTransaction, const THTTPEvent &aEvent)
 From MHTTPTransctionCallback.
TInt MHFRunError (TInt aError, RHTTPTransaction aTransaction, const THTTPEvent &aEvent)
 MHFRunError() Called by framework when *leave* occurs in handling of transaction event.
void SetHttpClientError (TInt aStatus)
 SetHttpClientError() Set the http client error (4xx) in Funambol client-api.
void SetHttpServerError (TInt aStatus)
 SetHttpServerError() Set the http server error (5xx) in Funambol client-api.

Private Attributes

TUint32 iIap
RHTTPSession iHttpSession
RHTTPTransaction iHttpTransaction
MHTTPDataSupplier * iDataSupplier
HBufC8 * iPostBody
HBufC8 * iResponseBody
TBool iTransFailed
CActiveSchedulerWait * iASWait


Detailed Description

CSymbianTransportAgent Provides simple interface to Symbian HTTP Client API.

Link against http.lib, commdb.lib


Member Function Documentation

TInt CSymbianTransportAgent::MHFRunError ( TInt  aError,
RHTTPTransaction  aTransaction,
const THTTPEvent &  aEvent 
) [private]

MHFRunError() Called by framework when *leave* occurs in handling of transaction event.

Parameters:
aError,: The leave code that occured.
aTransaction,: The transaction that was being processed when leave occured.
aEvent,: The event that was being processed when leave occured.
Returns:
KErrNone, if the error was handled. Otherwise the value of aError, or some other error value. Returning error value causes causes HTTP-CORE 6 panic.

void CSymbianTransportAgent::MHFRunL ( RHTTPTransaction  aTransaction,
const THTTPEvent &  aEvent 
) [private]

From MHTTPTransctionCallback.

MHFRunL() Called by framework to notify about transaction events.

Parameters:
aTransaction,: Transaction, where the event occured.
aEvent,: Occured event.

static CSymbianTransportAgent* CSymbianTransportAgent::NewL ( URL &  aUrl,
Proxy &  aProxy,
unsigned int  aResponseTimeout = DEFAULT_MAX_TIMEOUT,
unsigned int  aMaxMsgSize = DEFAULT_MAX_MSG_SIZE 
) [static]

NewL() Create a CSymbianTransportAgent object.

Returns:
A pointer to the created instance of CWebClientEngine

static CSymbianTransportAgent* CSymbianTransportAgent::NewLC ( URL &  aUrl,
Proxy &  aProxy,
unsigned int  aResponseTimeout = DEFAULT_MAX_TIMEOUT,
unsigned int  aMaxMsgSize = DEFAULT_MAX_MSG_SIZE 
) [static]

NewLC() Create a CSymbianTransportAgent object.

Returns:
A pointer to the created instance of CSymbianTransportAgent

void CSymbianTransportAgent::reuseActiveConnection (  )  [private]

Uses an already active RConnection owned by singleton FConnection, this saves resources and memory.

http://wiki.forum.nokia.com/index.php/CS000825_-_Using_an_already_active_connection

void CSymbianTransportAgent::SetHeaderL ( RHTTPHeaders  aHeaders,
TInt  aHdrField,
const TDesC8 &  aHdrValue 
) [private]

SetHeaderL() Set a field-value pair for the given HTTP header.

Parameters:
aHeaders header where field-value pair is written.
aHdrField field that is written to the header.
aHdrValue value that is assigned for the field.

void CSymbianTransportAgent::SetHttpClientError ( TInt  aStatus  )  [private]

SetHttpClientError() Set the http client error (4xx) in Funambol client-api.

Parameters:
aStatus response status code.

void CSymbianTransportAgent::SetHttpServerError ( TInt  aStatus  )  [private]

SetHttpServerError() Set the http server error (5xx) in Funambol client-api.

Parameters:
aStatus response status code.


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

Generated on Tue Apr 6 13:00:42 2010 for Funambol Outlook Plug-in Library by  doxygen 1.5.7.1