TransportAgentReplacement Class Reference

This is a replacement of the TransportAgent Class (platform dependent) that can be useful to check and modify every syncML message. More...

#include <TransportAgentReplacement.h>

Inheritance diagram for TransportAgentReplacement:
[legend]

List of all members.

Public Member Functions

 TransportAgentReplacement ()
 Creates a new real TransportAgent.
 TransportAgentReplacement (URL &url, Proxy &proxy, unsigned int responseTimeout=DEFAULT_MAX_TIMEOUT, unsigned int maxmsgsize=DEFAULT_MAX_MSG_SIZE)
 Creates a new real TransportAgent, passing all params.
virtual ~TransportAgentReplacement ()
 Deletes the internally owned realTransportAgent.
virtual char * sendMessage (const char *msg)
 Sends the message via the realTransportAgent->sendMessage().
virtual void setURL (URL &newURL)
virtual void setTimeout (unsigned int t)
virtual void setMaxMsgSize (unsigned int t)
virtual void setReadBufferSize (unsigned int t)
virtual void setUserAgent (const char *ua)
virtual void setCompression (bool newCompression)
virtual void setSSLServerCertificates (const char *value)
virtual void setSSLVerifyServer (bool value)
virtual void setSSLVerifyHost (bool value)

Protected Member Functions

virtual void beforeSendingMessage (StringBuffer &msgToSend)=0
 Can be reimplemented by derived classes, to execute actions before sending a SyncML message.
virtual void afterReceivingResponse (StringBuffer &msgReceived)=0
 Can be reimplemented by derived classes, to execute actions after receiving a SyncML message.

Private Attributes

TransportAgent * realTransportAgent
 This is the real transportAgent for this platform, created new in the cosntructor.


Detailed Description

This is a replacement of the TransportAgent Class (platform dependent) that can be useful to check and modify every syncML message.

Usage: extend this class and reimplement methods


Member Function Documentation

virtual void TransportAgentReplacement::afterReceivingResponse ( StringBuffer &  msgReceived  )  [protected, pure virtual]

Can be reimplemented by derived classes, to execute actions after receiving a SyncML message.

Parameters:
msgReceived [IN-OUT] the syncML message received from Server, to be returned to SyncManager

Implemented in TransportAgentTestError506, and TransportAgentTestLargeObject2.

Referenced by sendMessage().

virtual void TransportAgentReplacement::beforeSendingMessage ( StringBuffer &  msgToSend  )  [protected, pure virtual]

Can be reimplemented by derived classes, to execute actions before sending a SyncML message.

Parameters:
msgToSend [IN-OUT] the syncML message formatted by SyncManager, to send to the Server

Implemented in TransportAgentTestError506, and TransportAgentTestLargeObject2.

Referenced by sendMessage().

char * TransportAgentReplacement::sendMessage ( const char *  msg  )  [virtual]

Sends the message via the realTransportAgent->sendMessage().

Calls beforeSendingMessage() before sending data and afterReceivingResponse() when msg is returned by the Server.

Returns:
new allocated buffer with the response from the Server

Reimplemented in TransportAgentTestLargeObject2.

References afterReceivingResponse(), beforeSendingMessage(), and realTransportAgent.


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

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