Holds a peer group. More...
Public Types | |
| enum | GroupType { GROUP_PRIVATE = 0, GROUP_PUBLIC } |
| typedef boost::shared_ptr< Group > | SharedPtr |
|
typedef std::vector < Group::SharedPtr > | Collection |
Public Member Functions | |
| Group (const std::string &a_groupName, const std::string &a_description, const Data::RawData::SharedPtr &a_rawData, GroupType a_groupType) | |
| Ctor. | |
| Group (const Poco::UUID &a_groupId, const std::string &a_groupName, const std::string &a_description, const std::string &a_password, const Data::RawData::SharedPtr &a_rawData, const std::string &a_statusSet, GroupType a_groupType, const std::string &a_rootPassword, const std::string &a_rootSeed, const std::string &a_masterPassword) | |
| ~Group (void) | |
| Dtor. | |
| Poco::UUID | getGroupID () |
| Get Group Identifier. | |
| void | setGroupID (const Poco::UUID &value) |
| Set Group Identifier. | |
| const std::string & | getPassword () const |
| Get Group Password. | |
| const Data::RawData::SharedPtr & | getImage () |
| Get Group Image. | |
| bool | generateGroupPasswordToken (const std::string &a_seed, std::string &a_token) const |
| Generates a password based on the Group Password. | |
| bool | getPasswordAdminToken (const std::string &a_seed, std::string &a_token) const |
| Generates a password based on the Group Admin Password. | |
| void | setPassword (const std::string &a_password) |
| Set the group password. | |
| const std::string & | getGroupName () |
| Get the Group Name. | |
| void | setGroupName (const std::string &value) |
| Set the name for the group. | |
| const std::string & | getStatusSet () |
| Get the status set for the group. | |
| void | setStatusSet (const std::string &value) |
| Sets the status set for the group. | |
| const std::string & | getDescription () |
| Get the description for the group. | |
| void | setDescription (const std::string &value) |
| Set the description for the group. | |
| void | setImage (const Data::RawData::SharedPtr &a_rawData) |
| Set Group's Image. | |
| void | setGroupType (GroupType a_groupType) |
| Set the Group Type. | |
| GroupType | getGroupType () |
| Get the Group Type. | |
| void | initNewGroup () |
| Initializes all the required variables for a new group. | |
| bool | generateGroupAdminPasswordToken (const PeerID &a_peerID, const std::string &a_seed, std::string &a_token) |
| Generate Group Admin Password Token. | |
| const std::string & | getRootSeed () |
| Gets the current group admin seed. | |
| void | setRootSeed (const std::string &a_rootSeed) |
| Sets the current Group Admin seed. | |
| const std::string & | getRootPassword () |
| Gets the current Group Admin Password. | |
| void | setRootPassword (const std::string &a_rootPassword) |
| Sets the current Group Admin Password. | |
| const std::string & | getMasterPassword () |
| Gets the Master Password. | |
| void | changePassword () |
| Changes the password associated with the group. | |
| std::string | generateMasterPassword (const PeerID &a_peerID) |
| Generate Master Password for given Peer ID. | |
Static Public Member Functions | |
| static const Group::SharedPtr & | getFromCollection (const Group::Collection &a_collection, int index) |
| Script Helper to get a specific group from a collection. | |
Holds a peer group.
| Tonido::Data::Group::Group | ( | const std::string & | a_groupName, |
| const std::string & | a_description, | ||
| const Data::RawData::SharedPtr & | a_rawData, | ||
| GroupType | a_groupType | ||
| ) |
Ctor.
details if needed ...
| Tonido::Data::Group::~Group | ( | void | ) |
Dtor.
details if needed ...
| bool Tonido::Data::Group::generateGroupAdminPasswordToken | ( | const PeerID & | a_peerID, |
| const std::string & | a_seed, | ||
| std::string & | a_token | ||
| ) |
Generate Group Admin Password Token.
| [in] | a_peerID | peer id |
| [in] | a_seed | seed |
| [out] | a_token | generated password |
| bool Tonido::Data::Group::generateGroupPasswordToken | ( | const std::string & | a_seed, |
| std::string & | a_token | ||
| ) | const |
Generates a password based on the Group Password.
| [in] | a_seed | seed |
| [out] | a_token | new password |
| std::string Tonido::Data::Group::generateMasterPassword | ( | const PeerID & | a_peerID | ) |
Generate Master Password for given Peer ID.
| [in] | a_peerID | peer id to generate password for |
| const std::string& Tonido::Data::Group::getDescription | ( | ) |
Get the description for the group.
| static const Group::SharedPtr& Tonido::Data::Group::getFromCollection | ( | const Group::Collection & | a_collection, |
| int | index | ||
| ) | [static] |
Script Helper to get a specific group from a collection.
| [in] | a_collection | collection to get group from |
| [out] | index | index of the collection to get group |
| Poco::UUID Tonido::Data::Group::getGroupID | ( | ) |
Get Group Identifier.
| const std::string& Tonido::Data::Group::getGroupName | ( | ) |
Get the Group Name.
| GroupType Tonido::Data::Group::getGroupType | ( | ) |
Get the Group Type.
| const Data::RawData::SharedPtr& Tonido::Data::Group::getImage | ( | ) |
| const std::string& Tonido::Data::Group::getMasterPassword | ( | ) |
Gets the Master Password.
| const std::string& Tonido::Data::Group::getPassword | ( | ) | const |
Get Group Password.
| bool Tonido::Data::Group::getPasswordAdminToken | ( | const std::string & | a_seed, |
| std::string & | a_token | ||
| ) | const |
Generates a password based on the Group Admin Password.
| [in] | a_seed | seed |
| [out] | a_token | new password |
| const std::string& Tonido::Data::Group::getRootPassword | ( | ) |
Gets the current Group Admin Password.
| const std::string& Tonido::Data::Group::getRootSeed | ( | ) |
Gets the current group admin seed.
| const std::string& Tonido::Data::Group::getStatusSet | ( | ) |
Get the status set for the group.
| void Tonido::Data::Group::setDescription | ( | const std::string & | value | ) |
Set the description for the group.
| [in] | value | group description to set |
| void Tonido::Data::Group::setGroupID | ( | const Poco::UUID & | value | ) |
Set Group Identifier.
| [in] | value | group id to set |
| void Tonido::Data::Group::setGroupName | ( | const std::string & | value | ) |
Set the name for the group.
| [in] | value | group name to set |
| void Tonido::Data::Group::setGroupType | ( | GroupType | a_groupType | ) |
Set the Group Type.
| [in] | a_groupType | group type to set |
| void Tonido::Data::Group::setImage | ( | const Data::RawData::SharedPtr & | a_rawData | ) |
Set Group's Image.
| [in] | a_rawData | group image to set |
| void Tonido::Data::Group::setPassword | ( | const std::string & | a_password | ) |
Set the group password.
| [in] | a_password | new group password to set |
| void Tonido::Data::Group::setRootPassword | ( | const std::string & | a_rootPassword | ) |
Sets the current Group Admin Password.
| [in] | a_rootPassword | group admin password to set |
| void Tonido::Data::Group::setRootSeed | ( | const std::string & | a_rootSeed | ) |
Sets the current Group Admin seed.
| [out] | a_rootSeed | seed to set |
| void Tonido::Data::Group::setStatusSet | ( | const std::string & | value | ) |
Sets the status set for the group.
| [in] | value | group status to set |