Manages Messages sent via Tonido. More...
Public Types | |
|
typedef boost::shared_ptr < MailManager > | SharedPtr |
Public Member Functions | |
| MailManager (void) | |
| Ctor. | |
| ~MailManager (void) | |
| Dtor. | |
| bool | messageAdd (Mail::SharedPtr &a_message) |
| Adds a Message. | |
| Mail::SharedPtr | messageGet (const Poco::UUID &a_messageID) |
| Gets a Message. | |
| bool | messageCollectionGet (Mail::Collection &a_collection, const std::string &status) |
| Gets the full list of Messages. | |
| bool | messageCollectionGet (Mail::Collection &a_collection, const std::string &status, int offset, int limit) |
| Gets the full list of Messages with specified limit, offset. | |
| bool | messageSearch (Mail::Collection &a_collection, const std::string &keyword, int offset, int limit, int &a_total) |
| Searches the message list for a specific keyword. | |
| int | messageCount (const std::string &a_status) |
| Gets the count of messages for a given message status. | |
| bool | messageDelete (const Poco::UUID &a_messageID) |
| Deletes the specified Message. | |
| bool | messageRead (const Poco::UUID &a_messageID) |
| Mark the specified message as read. | |
| bool | messageUnRead (const Poco::UUID &a_messageID) |
| Mark the specified message as UnRead. | |
| bool | messageSent (const Poco::UUID &a_messageID) |
| Mark the specified message as Sent. | |
| bool | messageDelivered (const Poco::UUID &a_messageID) |
| Mark the specified message as Delivered. | |
| bool | messageDeliveryFailed (const Poco::UUID &a_messageID) |
| Mark the specified message as Delivery Failed. | |
| bool | messageStatusUpdate (const Poco::UUID &a_messageID, const std::string &status) |
| Updates the status of a given message. | |
| bool | messageDateUpdate (const Poco::UUID &a_messageID, const std::string &a_date) |
| Changes the date of a message. | |
| uint32_bt | messagesUnreadCount () |
| Returns number of unread messages. | |
| void | sendMessage (const Mail::SharedPtr &a_message) |
| Sends a message to the intended reciepient. | |
| void | onMessageReceived (Message::SharedPtr &args) |
| Processes a Message Received Message from another Peer. | |
| void | onMailMessageOK (Message::SharedPtr &args) |
| Processes a Message Received OK Message from another Peer. | |
| void | processPeerConnect (const PeerID &a_peer) |
| Processes a Peer Connection Event. | |
| void | processNetworkOnline () |
| Processes a Network Online Event. | |
| void | onTimer () |
| Processes the Message Timer. | |
Manages Messages sent via Tonido.
| Tonido::Data::MailManager::MailManager | ( | void | ) |
Ctor.
details if needed ...
| Tonido::Data::MailManager::~MailManager | ( | void | ) |
Dtor.
details if needed ...
| bool Tonido::Data::MailManager::messageAdd | ( | Mail::SharedPtr & | a_message | ) |
| bool Tonido::Data::MailManager::messageCollectionGet | ( | Mail::Collection & | a_collection, |
| const std::string & | status | ||
| ) |
Gets the full list of Messages.
| [out] | a_collection | list of messages |
| [in] | status | message status |
| bool Tonido::Data::MailManager::messageCollectionGet | ( | Mail::Collection & | a_collection, |
| const std::string & | status, | ||
| int | offset, | ||
| int | limit | ||
| ) |
Gets the full list of Messages with specified limit, offset.
| [out] | a_collection | list of messages |
| [in] | status | message status |
| [in] | offset | first position to get |
| [in] | limit | message count |
| int Tonido::Data::MailManager::messageCount | ( | const std::string & | a_status | ) |
Gets the count of messages for a given message status.
| [in] | status | message status |
| bool Tonido::Data::MailManager::messageDateUpdate | ( | const Poco::UUID & | a_messageID, |
| const std::string & | a_date | ||
| ) |
Changes the date of a message.
| [in] | a_messageID | message id to update |
| [in] | a_date | new date |
| bool Tonido::Data::MailManager::messageDelete | ( | const Poco::UUID & | a_messageID | ) |
Deletes the specified Message.
| [in] | a_messageID | message id to delete |
| bool Tonido::Data::MailManager::messageDelivered | ( | const Poco::UUID & | a_messageID | ) |
Mark the specified message as Delivered.
| [in] | a_messageID | message id to mark |
| bool Tonido::Data::MailManager::messageDeliveryFailed | ( | const Poco::UUID & | a_messageID | ) |
Mark the specified message as Delivery Failed.
| [in] | a_messageID | message id to mark |
| Mail::SharedPtr Tonido::Data::MailManager::messageGet | ( | const Poco::UUID & | a_messageID | ) |
| bool Tonido::Data::MailManager::messageRead | ( | const Poco::UUID & | a_messageID | ) |
Mark the specified message as read.
| [in] | a_messageID | message id to mark |
| bool Tonido::Data::MailManager::messageSearch | ( | Mail::Collection & | a_collection, |
| const std::string & | keyword, | ||
| int | offset, | ||
| int | limit, | ||
| int & | a_total | ||
| ) |
Searches the message list for a specific keyword.
| [out] | a_collection | list of messages |
| [in] | keyword | string to search |
| [in] | offset | first position to get |
| [in] | limit | message count |
| [out] | a_total | total found messages |
| bool Tonido::Data::MailManager::messageSent | ( | const Poco::UUID & | a_messageID | ) |
Mark the specified message as Sent.
| [in] | a_messageID | message id to mark |
| bool Tonido::Data::MailManager::messageStatusUpdate | ( | const Poco::UUID & | a_messageID, |
| const std::string & | status | ||
| ) |
Updates the status of a given message.
| [in] | a_messageID | message id to update |
| [in] | status | message status |
| uint32_bt Tonido::Data::MailManager::messagesUnreadCount | ( | ) |
Returns number of unread messages.
| bool Tonido::Data::MailManager::messageUnRead | ( | const Poco::UUID & | a_messageID | ) |
Mark the specified message as UnRead.
| [in] | a_messageID | message id to mark |
| void Tonido::Data::MailManager::onMailMessageOK | ( | Message::SharedPtr & | args | ) |
| void Tonido::Data::MailManager::onMessageReceived | ( | Message::SharedPtr & | args | ) |
| void Tonido::Data::MailManager::onTimer | ( | ) |
Processes the Message Timer.
Internal Use Only
| void Tonido::Data::MailManager::processNetworkOnline | ( | ) |
Processes a Network Online Event.
Internal Use Only
| void Tonido::Data::MailManager::processPeerConnect | ( | const PeerID & | a_peer | ) |
| void Tonido::Data::MailManager::sendMessage | ( | const Mail::SharedPtr & | a_message | ) |
Sends a message to the intended reciepient.
| [in] | a_message | message to send |