Tonido::Data::Message Formatting and Creation Functions. More...
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. | |
Tonido::Data::Message Formatting and Creation Functions.
| 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.
| [in,out] | a_pMessage | message to update |
| [in] | a_sourceFilePath | source file path |
| [in] | a_destinationFilePath | destination file path |
| [in] | a_targetPeer | file target peer |
| [in] | a_orignalOwningPeer | file owner peer |
| [in] | a_sourcePeer | file source peer |
| [in] | a_groupId | file group id |
| [in] | a_chunk_checksum | chunk checksum of the file |
| [in] | a_offset | chunk offset of the file |
| [in] | a_length | chunk size of the file |
| [in] | a_full_file_checksum | full checksum |
| [in] | a_svcname | file source svc ??? |
| [in] | a_optToken | file 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] |
| 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.
| [in,out] | a_pMessage | message to update |
| [in] | a_status | status of the response |
| [in] | a_contentType | content 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 ???
| [out] | a_pMessage | message to update |
| [in] | a_syncToken | token |
| 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] |
???
| [in] | a_toService | service to which the message will be sent |
| [in] | a_operation | query operation |
| [in] | a_toPeer | peer id to send |
| [in] | a_fromService | service from which the message will be sent |
| [in] | a_store | data store name |
| Message::SharedPtr Tonido::Util::MessageUtil::createNewEventMessage | ( | const std::string & | a_event | ) | [static] |
Create new event message to send.
| [in] | a_event | event name |
| 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 ???
| [in] | a_serviceName | service name |
| [in] | a_event | event name |
| Message::SharedPtr Tonido::Util::MessageUtil::createNewEventNotifierUnSubscribeAllMessage | ( | const std::string & | a_serviceName | ) | [static] |
Create new message for the notifier service to unsubscribe from all events ???
| [in] | a_serviceName | service name |
| 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 ???
| [in] | a_serviceName | service name |
| [in] | a_event | event name |
| 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.
| [in] | a_toService | service to which the message will be sent |
| [in] | a_operation | query operation |
| 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.
| [in] | a_toService | service to which the message will be sent |
| [in] | a_operation | query operation |
| [in] | a_toPeer | peer id to send |
| [in] | a_fromService | service from which the message will be sent |
| 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.
| [in] | a_toService | service to which the message will be sent |
| [in] | a_operation | query operation |
| [in] | a_toPeer | peer id to send |
| [in] | a_fromService | service from which the message will be sent |
| [in] | a_store | data store name |
| 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.
| [in] | a_serviceName | service name |
| [in] | a_tag | timer tag |
| [in] | a_increment | timer interval |
| [in] | a_numRepeats | number of timer repeats |
| Message::SharedPtr Tonido::Util::MessageUtil::createNewTimerStopMessage | ( | const std::string & | a_serviceName, |
| const std::string & | a_tag | ||
| ) | [static] |
Create new timer stop message.
| [in] | a_serviceName | service name |
| [in] | a_tag | timer tag |
| Message::SharedPtr Tonido::Util::MessageUtil::createPluginIconMessage | ( | Tonido::Data::Message::SharedPtr & | a_pRequestMessage, |
| const std::string & | a_fileName | ||
| ) | [static] |
Create new plugin icon message.
| [in] | a_pRequestMessage | request message |
| [in] | a_fileName | file name of the icon to load |
| Message::SharedPtr Tonido::Util::MessageUtil::createPluginUpdateMessage | ( | Tonido::Data::Message::SharedPtr & | a_pRequestMessage, |
| bool | a_updateAvailable | ||
| ) | [static] |
Create new plugin update message.
| [in] | a_pRequestMessage | request message |
| [in] | a_updateAvailable | true if update is available, false otherwise |
| 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.
| [in,out] | a_pMessage | message to update |
| [in] | a_role | role of the message |
| [in] | a_authID | encryption context |