Classes | |
| struct | GroupOwnerAssignData |
Public Types | |
| enum | GroupOwnerAssignmentStatus { ASSIGN_PENDING = 0, ASSIGN_NOTINPROGRESS } |
|
typedef boost::shared_ptr < GroupManager > | SharedPtr |
Public Member Functions | |
Ctors & Dtors | |
| GroupManager () | |
| Ctor. | |
| ~GroupManager () | |
| Dtor. | |
Group Management | |
| bool | groupAdd (const Group::SharedPtr &a_group, const std::string &a_memberStatus) |
| Add a new group. | |
| bool | groupUpdate (Group::SharedPtr a_group) |
| Update the given group. | |
| bool | groupRemove (const Poco::UUID &a_groupID) |
| Removes a Group. | |
| bool | addPeerToGroup (const PeerID &a_peerID, const Group::SharedPtr &a_group, const std::string &a_memberStatus) |
| Add a new peer to an existing group. | |
| Group::SharedPtr | groupGet (const Poco::UUID &a_groupID) |
| Get the specific group with a given group id. | |
| void | groupCollectionGet (Group::Collection &a_collection) |
| Get the collection of groups. | |
| void | groupCollectionGet (const PeerID &a_peerID, Group::Collection &a_collection) |
| Get the collection of groups to which a specific peer is part of. | |
| void | groupCollectionPeerNotPartOfGet (const PeerID &a_peerID, Group::Collection &a_collection) |
| Get the collection of groups to which a specific peer is not part of. | |
| void | getPeerGroupMembership (const PeerID &a_peerID, std::set< std::string > &a_groupSet) |
| Get all the groups that this peer is part of. | |
| std::string | getPeerGroupMemberStatus (const PeerID &a_peerID, const Poco::UUID &a_groupID) |
| Returns the member status of a specific peer for a specified group. | |
Internal Use Only | |
| void | processPeerConnect (const PeerID &a_peerID) |
| Processes Peer Connection Event. | |
| void | processNetworkOnline () |
| Processes Network Online Event. | |
| void | onSyncGroupListMessage (Message::SharedPtr &args) |
| Processes Sync Group List Message. | |
| void | onUnknownGroupMessage (Message::SharedPtr &args) |
| Processes Unknown Group Message. | |
| void | onApplyGroupListMessage (Message::SharedPtr &args) |
| Processes Apply Group List Message. | |
| void | onGroupInfoMessage (Message::SharedPtr &args) |
| Processes Group Info Message. | |
| void | onGroupHelloMessage (Message::SharedPtr &args) |
| Processes Group Hello Message. | |
| bool | assignGroupOwner (const Poco::UUID &a_groupID, const PeerID &a_peerID, const Tonido::Data::Message::SharedPtr &a_msg) |
| Assign Group Ownership to another peer. | |
| bool | removeGroupMember (const Poco::UUID &a_groupID, const PeerID &a_peerID, bool a_changePassword) |
| Remove Group Member from group for a private group. | |
| void | onBeginAssignGroupOwnerMessage (Message::SharedPtr &args) |
| Processes a Assign group ownership message. | |
| void | onBeginAssignGroupOwnerOKMessage (Message::SharedPtr &args) |
| Processes a Assign group ownership OK message. | |
| void | onBeginAssignGroupOwnerOKOKMessage (Message::SharedPtr &args) |
| Processes a Assign group ownership OK OK message. | |
| void | onRemoveGroupMessage (Message::SharedPtr &args) |
| Processes a remove group message. | |
| void | sendGroupHelloMessage (const PeerID &a_peerID, const Poco::UUID &a_groupID) |
| Sends a Group Hello message to specified Peer. | |
| void | onGroupOwnerAssignTimer () |
| Group Owner Assignment Timer. | |
| void | processLogin () |
| Process Login. | |
Manages Peer Groups.
| Tonido::Data::GroupManager::GroupManager | ( | ) |
Ctor.
details if needed ...
| Tonido::Data::GroupManager::~GroupManager | ( | ) |
Dtor.
details if needed ...
| bool Tonido::Data::GroupManager::addPeerToGroup | ( | const PeerID & | a_peerID, |
| const Group::SharedPtr & | a_group, | ||
| const std::string & | a_memberStatus | ||
| ) |
| bool Tonido::Data::GroupManager::assignGroupOwner | ( | const Poco::UUID & | a_groupID, |
| const PeerID & | a_peerID, | ||
| const Tonido::Data::Message::SharedPtr & | a_msg | ||
| ) |
Assign Group Ownership to another peer.
| [in] | a_groupID | group id to assign to |
| [in] | a_peerID | peer id to assign |
| [in] | a_msg | message |
| void Tonido::Data::GroupManager::getPeerGroupMembership | ( | const PeerID & | a_peerID, |
| std::set< std::string > & | a_groupSet | ||
| ) |
Get all the groups that this peer is part of.
| [in] | a_peerID | peerID of the peer we are interested in. |
| [out] | a_groupSet | set of groupIDs that this peer is part of |
| std::string Tonido::Data::GroupManager::getPeerGroupMemberStatus | ( | const PeerID & | a_peerID, |
| const Poco::UUID & | a_groupID | ||
| ) |
Returns the member status of a specific peer for a specified group.
| [in] | a_peerID | peer id to check |
| [out] | a_groupID | group id to check the peer status |
| bool Tonido::Data::GroupManager::groupAdd | ( | const Group::SharedPtr & | a_group, |
| const std::string & | a_memberStatus | ||
| ) |
Add a new group.
| [in] | a_group | group to add |
| [in] | a_memberStatus | status |
| void Tonido::Data::GroupManager::groupCollectionGet | ( | Group::Collection & | a_collection | ) |
Get the collection of groups.
| [out] | a_collection | collection of groups |
| void Tonido::Data::GroupManager::groupCollectionGet | ( | const PeerID & | a_peerID, |
| Group::Collection & | a_collection | ||
| ) |
Get the collection of groups to which a specific peer is part of.
| [in] | a_peerID | peer id |
| [out] | a_collection | collection of groups |
| void Tonido::Data::GroupManager::groupCollectionPeerNotPartOfGet | ( | const PeerID & | a_peerID, |
| Group::Collection & | a_collection | ||
| ) |
Get the collection of groups to which a specific peer is not part of.
| [in] | a_peerID | peer id |
| [out] | a_collection | collection of groups |
| Group::SharedPtr Tonido::Data::GroupManager::groupGet | ( | const Poco::UUID & | a_groupID | ) |
| bool Tonido::Data::GroupManager::groupRemove | ( | const Poco::UUID & | a_groupID | ) |
Removes a Group.
| [in] | a_group | ID of the group to remove |
| bool Tonido::Data::GroupManager::groupUpdate | ( | Group::SharedPtr | a_group | ) |
Update the given group.
| [in,out] | a_group | Group to update |
| void Tonido::Data::GroupManager::onApplyGroupListMessage | ( | Message::SharedPtr & | args | ) |
| void Tonido::Data::GroupManager::onBeginAssignGroupOwnerMessage | ( | Message::SharedPtr & | args | ) |
Processes a Assign group ownership message.
| [in] | args | message |
| void Tonido::Data::GroupManager::onBeginAssignGroupOwnerOKMessage | ( | Message::SharedPtr & | args | ) |
Processes a Assign group ownership OK message.
| [in] | args | message |
| void Tonido::Data::GroupManager::onBeginAssignGroupOwnerOKOKMessage | ( | Message::SharedPtr & | args | ) |
Processes a Assign group ownership OK OK message.
| [in] | args | message |
| void Tonido::Data::GroupManager::onGroupHelloMessage | ( | Message::SharedPtr & | args | ) |
| void Tonido::Data::GroupManager::onGroupInfoMessage | ( | Message::SharedPtr & | args | ) |
| void Tonido::Data::GroupManager::onRemoveGroupMessage | ( | Message::SharedPtr & | args | ) |
Processes a remove group message.
| [in] | args | message |
| void Tonido::Data::GroupManager::onSyncGroupListMessage | ( | Message::SharedPtr & | args | ) |
| void Tonido::Data::GroupManager::onUnknownGroupMessage | ( | Message::SharedPtr & | args | ) |
| void Tonido::Data::GroupManager::processPeerConnect | ( | const PeerID & | a_peerID | ) |
Processes Peer Connection Event.
| [in] | a_peerID | peer id |
| bool Tonido::Data::GroupManager::removeGroupMember | ( | const Poco::UUID & | a_groupID, |
| const PeerID & | a_peerID, | ||
| bool | a_changePassword | ||
| ) |
Remove Group Member from group for a private group.
| [in] | a_groupID | group id to remove from |
| [in] | a_peerID | peer id to remove |
| [in] | a_changePassword | true if change password is required, false otherwise |