Static Public Member Functions
Tonido::Util::MessageUtil Class Reference

Tonido::Data::Message Formatting and Creation Functions. More...

List of all members.

Static Public Member Functions

static
Tonido::Data::Message::SharedPtr 
createNewMessage (const std::string &a_toService, const std::string &a_operation)
 Create new message to send to a service.
static
Tonido::Data::Message::SharedPtr 
createNewNetworkMessage (const std::string &a_toService, const std::string &a_operation, const Tonido::Data::PeerID &a_toPeer, const std::string &a_fromService)
 Create new network message to send to a service.
static
Tonido::Data::Message::SharedPtr 
createNewEventMessage (const std::string &a_event)
 Create new event message to send.
static
Tonido::Data::Message::SharedPtr 
createNewEventNotifierSubscribeMessage (const std::string &a_serviceName, const std::string &a_event)
 Create new message for the notifier service to subscribe to an event ???
static
Tonido::Data::Message::SharedPtr 
createNewEventNotifierUnSubscribeMessage (const std::string &a_serviceName, const std::string &a_event)
 Create new message for the notifier service to unsubscribe from an event ???
static
Tonido::Data::Message::SharedPtr 
createNewEventNotifierUnSubscribeAllMessage (const std::string &a_serviceName)
 Create new message for the notifier service to unsubscribe from all events ???
static
Tonido::Data::Message::SharedPtr 
createNewTimerStartMessage (const std::string &a_serviceName, const std::string &a_tag, uint64_bt a_increment, int a_numRepeats)
 Create new timer start message.
static
Tonido::Data::Message::SharedPtr 
createNewTimerStopMessage (const std::string &a_serviceName, const std::string &a_tag)
 Create new timer stop message.
static void addHTTPRequest (Tonido::Data::Message::SharedPtr &a_pMessage, const std::string &a_HTTPRequest, const std::string &a_HTTPMethod, const std::string &a_fullURL)
 Add HTTP request to a message.
static void addHTTPResponse (Tonido::Data::Message::SharedPtr &a_pMessage, int a_status, const std::string &a_contentType)
 Add HTTP response to a message.
static void addSyncProxy (Tonido::Data::Message::SharedPtr &a_pMessage, const std::string &a_syncToken)
 Add SyncProxyService to a message ???
static void addFileTransferRequest (Tonido::Data::Message::SharedPtr &a_pMessage, const std::string &a_sourceFilePath, const std::string &a_destinationFilePath, const Tonido::Data::PeerID &a_targetPeer, const Tonido::Data::PeerID &a_orignalOwningPeer, const Tonido::Data::PeerID &a_sourcePeer, const std::string &a_groupId, const std::string &a_chunk_checksum, const int64_bt &a_offset, const int64_bt &a_length, const std::string &a_full_file_checksum, const std::string &a_svcname, const std::string &a_optToken=std::string("DEFAULT"))
 Add file transfer request to a message.
static
Tonido::Data::Message::SharedPtr 
prepareNetworkMessage (Tonido::Data::Message::SharedPtr &a_pMessage, Tonido::Data::AuthKey::AuthRole a_role, const std::string &a_authID="")
 Prepare network message.
static
Tonido::Data::Message::SharedPtr 
createNewSyncMessage (const std::string &a_toService, const std::string &a_operation, const Tonido::Data::PeerID &a_toPeer, const std::string &a_fromService, Tonido::DataSync::DataSyncStore &a_store)
 Create new sync message.
static
Tonido::Data::Message::SharedPtr 
createDeltaRecordsMessage (Tonido::Data::Message::SharedPtr &a_pRequestMessage, const std::string &a_toService, const std::string &a_operation, const Tonido::Data::PeerID &a_toPeer, const std::string &a_fromService, Tonido::DataSync::DataSyncStore &a_store)
 ???
static
Tonido::Data::Message::SharedPtr 
createPluginIconMessage (Tonido::Data::Message::SharedPtr &a_pRequestMessage, const std::string &a_fileName)
 Create new plugin icon message.
static
Tonido::Data::Message::SharedPtr 
createPluginUpdateMessage (Tonido::Data::Message::SharedPtr &a_pRequestMessage, bool a_updateAvailable)
 Create new plugin update message.

Detailed Description

Tonido::Data::Message Formatting and Creation Functions.


Member Function Documentation

void Tonido::Util::MessageUtil::addFileTransferRequest ( Tonido::Data::Message::SharedPtr &  a_pMessage,
const std::string &  a_sourceFilePath,
const std::string &  a_destinationFilePath,
const Tonido::Data::PeerID a_targetPeer,
const Tonido::Data::PeerID a_orignalOwningPeer,
const Tonido::Data::PeerID a_sourcePeer,
const std::string &  a_groupId,
const std::string &  a_chunk_checksum,
const int64_bt &  a_offset,
const int64_bt &  a_length,
const std::string &  a_full_file_checksum,
const std::string &  a_svcname,
const std::string &  a_optToken = std::string("DEFAULT") 
) [static]

Add file transfer request to a message.

Parameters:
[in,out]a_pMessagemessage to update
[in]a_sourceFilePathsource file path
[in]a_destinationFilePathdestination file path
[in]a_targetPeerfile target peer
[in]a_orignalOwningPeerfile owner peer
[in]a_sourcePeerfile source peer
[in]a_groupIdfile group id
[in]a_chunk_checksumchunk checksum of the file
[in]a_offsetchunk offset of the file
[in]a_lengthchunk size of the file
[in]a_full_file_checksumfull checksum
[in]a_svcnamefile source svc ???
[in]a_optTokenfile token
void Tonido::Util::MessageUtil::addHTTPRequest ( Tonido::Data::Message::SharedPtr &  a_pMessage,
const std::string &  a_HTTPRequest,
const std::string &  a_HTTPMethod,
const std::string &  a_fullURL 
) [static]

Add HTTP request to a message.

Parameters:
[in,out]a_pMessagemessage to update
[in]a_HTTPRequestHTTP request
[in]a_HTTPMethodmethod of HTTP request
[in]a_fullURLfull request URL
void Tonido::Util::MessageUtil::addHTTPResponse ( Tonido::Data::Message::SharedPtr &  a_pMessage,
int  a_status,
const std::string &  a_contentType 
) [static]

Add HTTP response to a message.

Parameters:
[in,out]a_pMessagemessage to update
[in]a_statusstatus of the response
[in]a_contentTypecontent type of the response
void Tonido::Util::MessageUtil::addSyncProxy ( Tonido::Data::Message::SharedPtr &  a_pMessage,
const std::string &  a_syncToken 
) [static]

Add SyncProxyService to a message ???

Parameters:
[out]a_pMessagemessage to update
[in]a_syncTokentoken
Message::SharedPtr Tonido::Util::MessageUtil::createDeltaRecordsMessage ( Tonido::Data::Message::SharedPtr &  a_pRequestMessage,
const std::string &  a_toService,
const std::string &  a_operation,
const Tonido::Data::PeerID a_toPeer,
const std::string &  a_fromService,
Tonido::DataSync::DataSyncStore a_store 
) [static]

???

Parameters:
[in]a_toServiceservice to which the message will be sent
[in]a_operationquery operation
[in]a_toPeerpeer id to send
[in]a_fromServiceservice from which the message will be sent
[in]a_storedata store name
Returns:
new message
Message::SharedPtr Tonido::Util::MessageUtil::createNewEventMessage ( const std::string &  a_event) [static]

Create new event message to send.

Parameters:
[in]a_eventevent name
Returns:
new event message
Message::SharedPtr Tonido::Util::MessageUtil::createNewEventNotifierSubscribeMessage ( const std::string &  a_serviceName,
const std::string &  a_event 
) [static]

Create new message for the notifier service to subscribe to an event ???

Parameters:
[in]a_serviceNameservice name
[in]a_eventevent name
Returns:
new message
Message::SharedPtr Tonido::Util::MessageUtil::createNewEventNotifierUnSubscribeAllMessage ( const std::string &  a_serviceName) [static]

Create new message for the notifier service to unsubscribe from all events ???

Parameters:
[in]a_serviceNameservice name
Returns:
new message
Message::SharedPtr Tonido::Util::MessageUtil::createNewEventNotifierUnSubscribeMessage ( const std::string &  a_serviceName,
const std::string &  a_event 
) [static]

Create new message for the notifier service to unsubscribe from an event ???

Parameters:
[in]a_serviceNameservice name
[in]a_eventevent name
Returns:
new message
Message::SharedPtr Tonido::Util::MessageUtil::createNewMessage ( const std::string &  a_toService,
const std::string &  a_operation 
) [static]

Create new message to send to a service.

Parameters:
[in]a_toServiceservice to which the message will be sent
[in]a_operationquery operation
Returns:
new message
Message::SharedPtr Tonido::Util::MessageUtil::createNewNetworkMessage ( const std::string &  a_toService,
const std::string &  a_operation,
const Tonido::Data::PeerID a_toPeer,
const std::string &  a_fromService 
) [static]

Create new network message to send to a service.

Parameters:
[in]a_toServiceservice to which the message will be sent
[in]a_operationquery operation
[in]a_toPeerpeer id to send
[in]a_fromServiceservice from which the message will be sent
Returns:
new network message
Message::SharedPtr Tonido::Util::MessageUtil::createNewSyncMessage ( const std::string &  a_toService,
const std::string &  a_operation,
const Tonido::Data::PeerID a_toPeer,
const std::string &  a_fromService,
Tonido::DataSync::DataSyncStore a_store 
) [static]

Create new sync message.

Parameters:
[in]a_toServiceservice to which the message will be sent
[in]a_operationquery operation
[in]a_toPeerpeer id to send
[in]a_fromServiceservice from which the message will be sent
[in]a_storedata store name
Returns:
new message
Message::SharedPtr Tonido::Util::MessageUtil::createNewTimerStartMessage ( const std::string &  a_serviceName,
const std::string &  a_tag,
uint64_bt  a_increment,
int  a_numRepeats 
) [static]

Create new timer start message.

Parameters:
[in]a_serviceNameservice name
[in]a_tagtimer tag
[in]a_incrementtimer interval
[in]a_numRepeatsnumber of timer repeats
Returns:
new message
Message::SharedPtr Tonido::Util::MessageUtil::createNewTimerStopMessage ( const std::string &  a_serviceName,
const std::string &  a_tag 
) [static]

Create new timer stop message.

Parameters:
[in]a_serviceNameservice name
[in]a_tagtimer tag
Returns:
new message
Message::SharedPtr Tonido::Util::MessageUtil::createPluginIconMessage ( Tonido::Data::Message::SharedPtr &  a_pRequestMessage,
const std::string &  a_fileName 
) [static]

Create new plugin icon message.

Parameters:
[in]a_pRequestMessagerequest message
[in]a_fileNamefile name of the icon to load
Returns:
new response message with icon
Message::SharedPtr Tonido::Util::MessageUtil::createPluginUpdateMessage ( Tonido::Data::Message::SharedPtr &  a_pRequestMessage,
bool  a_updateAvailable 
) [static]

Create new plugin update message.

Parameters:
[in]a_pRequestMessagerequest message
[in]a_updateAvailabletrue if update is available, false otherwise
Returns:
new response message
Message::SharedPtr Tonido::Util::MessageUtil::prepareNetworkMessage ( Tonido::Data::Message::SharedPtr &  a_pMessage,
Tonido::Data::AuthKey::AuthRole  a_role,
const std::string &  a_authID = "" 
) [static]

Prepare network message.

Parameters:
[in,out]a_pMessagemessage to update
[in]a_rolerole of the message
[in]a_authIDencryption context

Generated on Wed Oct 12 2011 21:46:54. © CodeLathe LLC 2007-2011. All Rights Reserved.