![]() |
SDK
2.1.4
CloudBackend Software Development Kit - SDK API for C++
|
A group of members. More...
#include <Group.h>
Public Member Functions | |
std::string | name () const |
cbe::GroupId | id () const |
cbe::GroupId | parentId () const |
cbe::Container | groupContainer () const |
cbe::Visibility | getVisibility () const |
bool | joined () const |
Requests | requests () const |
cbe::Group | createGroup (std::string name, std::string memberAlias, cbe::Visibility visibility, CreateGroupDelegatePtr delegate) |
Create a new Group. More... | |
cbe::Group | createGroup (std::string name, std::string memberAlias, cbe::Visibility visibility) |
Synchronous [exception] creates a new group Synchronous version of createGroup(name, memberAlias, delegate, visibility = cbe::Visibility::Public, CreateGroupDelegatePtr) , and throws an exception, CreateGroupException, in case of a failed call. See createGroup(CreateGroupDelegatePtr) More... | |
cbe::util::Optional< cbe::Group > | createGroup (std::string name, std::string memberAlias, cbe::Visibility visibility, CreateGroupError &error) |
void | join (std::string alias, cbe::Visibility memberVisibility, std::string applicationComment, JoinDelegatePtr delegate) |
Synchronous [exception] Ask to join a group. In this first version All members will be Public, meaning visible for other member inside the group. All groups will also be open so all join requests should be accepted directly. More... | |
cbe::Group | join (std::string alias, cbe::Visibility memberVisibility, std::string applicationComment) |
Synchronous [exception] Ask to join a group. Synchronous version of join(std::string, cbe::Visibility, std::string) , and throws an exception, JoinException, in case of a failed call. See join(JoinDelegatePtr) More... | |
cbe::util::Optional< cbe::Group > | join (std::string alias, cbe::Visibility memberVisibility, std::string applicationComment, JoinError &error) |
Synchronous [non-throwing] Ask to join a group. Synchronous version of join(alias, memberVisibility, applicationComment, JoinError&,JoinDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call. See join(alias, memberVisibility, applicationComment, JoinError&, JoinDelegatePtr) More... | |
void | leave (LeaveDelegatePtr delegate) |
Leave group. More... | |
delegate::LeaveSuccess | leave () |
Synchronous [exception] leaves the specified group. Synchronous version of leave(LeaveDelegatePtr) , and throws an exception, LeaveException, in case of a failed call. See leave(LeaveDelegatePtr) More... | |
cbe::util::Optional< delegate::LeaveSuccess > | leave (LeaveError &error) |
Synchronous [non-throwing] leaves the specified group. Synchronous version of leave(LeaveDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call. See leave(LeaveDelegatePtr) More... | |
void | remove (RemoveDelegatePtr delegate) |
Remove group. More... | |
delegate::group::RemoveSuccess | remove () |
Synchronous [exception] removes the specified group. Synchronous version of remove(RemoveDelegatePtr) , and throws an exception, RemoveException, in case of a failed call. See remove(RemoveDelegatePtr) More... | |
cbe::util::Optional< delegate::group::RemoveSuccess > | remove (RemoveError &error) |
Synchronous [non-throwing] removes the specified group. Synchronous version of remove(RemoveDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call. See remove(RemoveDelegatePtr) More... | |
void | rename (std::string newName, RenameDelegatePtr delegate) |
Rename the Group; group id does not change. More... | |
delegate::group::RenameSuccess | rename (std::string newName) |
Synchronous [exception] renames a group Synchronous version of rename(std::string ,RenameDelegatePtr) , and throws an exception, RenameException, in case of a failed call. See rename(RenameDelegatePtr) More... | |
cbe::util::Optional< delegate::group::RenameSuccess > | rename (std::string newName, RenameError &error) |
Synchronous [non-throwing] renames a group Synchronous version of rename(newName,RenameDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call. See rename(newName, RenameDelegatePtr) More... | |
void | listMembers (ListMembersDelegatePtr delegate) |
List all members in the group. More... | |
delegate::ListMembersDelegate::Members | listMembers () |
Synchronous [exception] list members of the specifed group. Synchronous version of listMembers(ListMembersDelegatePtr) , and throws an exception, ListMembersException, in case of a failed call. See listMembers(ListMembersDelegatePtr) More... | |
cbe::util::Optional< delegate::ListMembersDelegate::Members > | listMembers (ListMembersError &error) |
Synchronous [non-throwing] list members of the specifed group. Synchronous version of listMembers(ListMembersDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call. See listMembers(ListMembersDelegatePtr) More... | |
void | listBannedMembers (ListBannedMembersDelegatePtr delegate) |
Lists all banned former members, or users. More... | |
std::vector< cbe::Member > | listBannedMembers () |
Synchronous [exception] list the banned members of the specified group. Synchronous version of listBannedMembers(ListMembersDelegatePtr) , and throws an exception, ListBannedMembersException, in case of a failed call. See listBannedMembers(ListMembersDelegatePtr) More... | |
cbe::util::Optional< std::vector< cbe::Member > > | listBannedMembers (ListBannedMembersError &error) |
Synchronous [non-throwing] list the banned members of the specified group. Synchronous version of listBannedMembers(ListMembersDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call. See listBannedMembers(ListMembersDelegatePtr) More... | |
void | listRoles (ListRolesDelegatePtr delegate) |
Lists all roles in the group. More... | |
delegate::ListRolesDelegate::Roles | listRoles () |
Synchronous [exception] list roles of a group. Synchronous version of listRoles(ListRolesDelegatePtr) , and throws an exception, ListRolesException, in case of a failed call. See listRoles(ListRolesDelegatePtr) More... | |
cbe::util::Optional< delegate::ListRolesDelegate::Roles > | listRoles (ListRolesError &error) |
Synchronous [non-throwing] list roles of a group. Synchronous version of listRoles(ListRolesDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call. See listRoles(ListRolesDelegatePtr) More... | |
void | createRole (std::string name, CreateRoleDelegatePtr delegate) |
Creates a new role in the group. More... | |
cbe::Role | createRole (std::string name) |
Synchronous [exception] creates a new role in the specified group. Synchronous version of createRole(std::string, CreateRoleDelegatePtr) , and throws an exception, CreateRoleException, in case of a failed call. See createRole(CreateRoleDelegatePtr) More... | |
cbe::util::Optional< cbe::Role > | createRole (std::string name, CreateRoleError &error) |
Synchronous [non-throwing] creates a new role in the specified group. Synchronous version of createRole(name,CreateRoleDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call. See createRole(name, CreateRoleDelegatePtr) More... | |
void | removeRole (RoleId roleId, RemoveRoleDelegatePtr delegate) |
cbe::RoleId | removeRole (RoleId roleId) |
Synchronous [exception] removes a role in the specified group. Synchronous version of removeRole(RoleId roleId, RemoveRoleDelegatePtr) , and throws an exception, RemoveRoleException, in case of a failed call. See removeRole(RemoveRoleDelegatePtr) More... | |
cbe::util::Optional< cbe::RoleId > | removeRole (RoleId roleId, RemoveRoleError &error) |
Synchronous [non-throwing] removes a role in the specified group. Synchronous version of removeRole(roleId, RemoveRoleDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call. See removeRole(roleId, RemoveRoleDelegatePtr) More... | |
Group (cbe::DefaultCtor) | |
Default constructor. More... | |
operator bool () const | |
Checks if the current instance is real. More... | |
Friends | |
class | GroupManager |
class | GroupQueryResult |
A group of members.
Pointer to CreateGroupDelegate that is passed into:
Group::createGroup(std::string,std::string,CreateGroupDelegatePtr,cbe::Visibility).
See delegate::group::CreateGroupDelegate::Exception
Forms the type of the error
return parameter for the synchronous version of method createGroup()
See delegate::CreateGroupDelegate::ErrorInfo
Pointer to cbe::delegate::group::JoinDelegate that is passed into asynchronous version of method join()
Forms the type of the error
return parameter for the synchronous version of method join()
See delegate::JoinDelegate::ErrorInfo
Pointer to cbe::delegate::LeaveDelegate that is passed into asynchronous version of method leave()
See delegate::group::LeaveDelegate::Exception
Forms the type of the error
return parameter for the synchronous version of method leave()
See delegate::LeaveDelegate::ErrorInfo
Pointer to cbe::delegate::RemoveDelegate that is passed into asynchronous version of method remove()
Forms the type of the error
return parameter for the synchronous version of method remove()
See delegate::group::RemoveDelegate::ErrorInfo
Pointer to cbe::delegate::RenameDelegate that is passed into asynchronous version of method rename()
Forms the type of the error
return parameter for the synchronous version of method rename()
See delegate::group::RenameDelegate::ErrorInfo
Pointer to cbe::delegate::ListMembersDelegate that is passed into asynchronous version of method listMembers()
See delegate::object::ListMembersDelegate::Exception
Forms the type of the error
return parameter for the synchronous version of method listMembers()
See delegate::ListMembersDelegate::ErrorInfo
Pointer to cbe::delegate::ListMembersDelegate that is passed into asynchronous version of method listBannedMembers()
See delegate::object::ListMembersDelegate::Exception
Forms the type of the error
return parameter for the synchronous version of method listBannedMembers()
See delegate::ListMembersDelegate::ErrorInfo
Pointer to cbe::delegate::ListRolesDelegate that is passed into asynchronous version of method listRoles()
See delegate::object::ListRolesDelegate::Exception
Forms the type of the error
return parameter for the synchronous version of method listRoles()
See delegate::ListRolesDelegate::ErrorInfo
Pointer to cbe::delegate::CreateRoleDelegate that is passed into asynchronous version of method createRole()
See delegate::object::CreateRoleDelegate::Exception
Forms the type of the error
return parameter for the synchronous version of method createRole()
See delegate::CreateRoleDelegate::ErrorInfo
Pointer to cbe::delegate::RemoveRoleDelegate that is passed into asynchronous version of method removeRole()
See delegate::object::RemoveRoleDelegate::Exception
Forms the type of the error
return parameter for the synchronous version of method removeRole()
See delegate::RemoveRoleDelegate::ErrorInfo
cbe::Group::Group | ( | cbe::DefaultCtor | ) |
Default constructor.
Construct a new object with the DefaultCtor
to enable the operator bool() test
std::string cbe::Group::name | ( | ) | const |
Returns the name of the group.
cbe::GroupId cbe::Group::id | ( | ) | const |
Returns the id number of the group.
cbe::GroupId cbe::Group::parentId | ( | ) | const |
Group's Parent id number.
cbe::Container cbe::Group::groupContainer | ( | ) | const |
Every group has a drive/container where resources can be shared with the members of the group. Works like a shared container.
cbe::Visibility cbe::Group::getVisibility | ( | ) | const |
Visibility of the Group, Public is searchable and Private is not. In this early version you can create Private groups but the ability to invite has been blocked. (work in progress)
bool cbe::Group::joined | ( | ) | const |
Searched groups are obtained through the GroupQuery response. This list of groups have non-joined and joined groups. Already joined groups can be found on the groupManager.groups()
and they are also cached. The joined bool is used to easily sort out groups in the GroupQuery.
Requests cbe::Group::requests | ( | ) | const |
Requests to join the group. To retrieve the list call listJoinRequests(cbe::GroupDelegatePtr delegate) on the group object.
cbe::Group cbe::Group::createGroup | ( | std::string | name, |
std::string | memberAlias, | ||
cbe::Visibility | visibility, | ||
CreateGroupDelegatePtr | delegate | ||
) |
Create a new Group.
name | of the group |
memberAlias | another popular name |
delegate | Pointer to a delegate::CreateGroupDelegate instance that is implemented by the user. |
visibility | default: public |
cbe::Group cbe::Group::createGroup | ( | std::string | name, |
std::string | memberAlias, | ||
cbe::Visibility | visibility | ||
) |
Synchronous [exception] creates a new group Synchronous version of createGroup(name, memberAlias, delegate, visibility = cbe::Visibility::Public, CreateGroupDelegatePtr) , and throws an exception, CreateGroupException, in case of a failed call.
See createGroup(CreateGroupDelegatePtr)
CreateGroupException |
cbe::util::Optional<cbe::Group> cbe::Group::createGroup | ( | std::string | name, |
std::string | memberAlias, | ||
cbe::Visibility | visibility, | ||
CreateGroupError & | error | ||
) |
Synchronous version of createGroup(name, memberAlias, delegate, visibility, CreateGroupDelegatePtr) , and throws no exception on error, instead the out/return parameter error
is used to provide the error information in connection with a failed call.
See createGroup(name, memberAlias, delegate, visibility, CreateGroupDelegatePtr)
[out] | error | Return parameter containing the error information in case of a failed call. An empty return value will indicate failure, and the CreateGroupError object passed in will we be populated with the error information. |
false
— indicating a failed call, and the error information is passed out via the error
out/return parameter. void cbe::Group::join | ( | std::string | alias, |
cbe::Visibility | memberVisibility, | ||
std::string | applicationComment, | ||
JoinDelegatePtr | delegate | ||
) |
Synchronous [exception] Ask to join a group. In this first version All members will be Public, meaning visible for other member inside the group. All groups will also be open so all join requests should be accepted directly.
alias | name |
delegate | Pointer to a delegate::group::JoinDelegate instance that is implemented by the user. |
memberVisibility | default: public |
applicationComment | message to the owner regarding the application to join |
cbe::Group cbe::Group::join | ( | std::string | alias, |
cbe::Visibility | memberVisibility, | ||
std::string | applicationComment | ||
) |
Synchronous [exception] Ask to join a group. Synchronous version of join(std::string, cbe::Visibility, std::string) , and throws an exception, JoinException, in case of a failed call.
See join(JoinDelegatePtr)
JoinException |
cbe::util::Optional<cbe::Group> cbe::Group::join | ( | std::string | alias, |
cbe::Visibility | memberVisibility, | ||
std::string | applicationComment, | ||
JoinError & | error | ||
) |
Synchronous [non-throwing] Ask to join a group. Synchronous version of join(alias, memberVisibility, applicationComment, JoinError&,JoinDelegatePtr) , and throws no exception on error, instead the out/return parameter error
is used to provide the error information in connection with a failed call.
See join(alias, memberVisibility, applicationComment, JoinError&, JoinDelegatePtr)
[out] | error | Return parameter containing the error information in case of a failed call. An empty return value will indicate failure, and the JoinError object passed in will we be populated with the error information. |
false
— indicating a failed call, and the error information is passed out via the error
out/return parameter. void cbe::Group::leave | ( | LeaveDelegatePtr | delegate | ) |
Leave group.
delegate | Pointer to a delegate::LeaveDelegate instance that is implemented by the user. |
delegate::LeaveSuccess cbe::Group::leave | ( | ) |
Synchronous [exception] leaves the specified group. Synchronous version of leave(LeaveDelegatePtr) , and throws an exception, LeaveException, in case of a failed call.
See leave(LeaveDelegatePtr)
LeaveException |
cbe::util::Optional<delegate::LeaveSuccess> cbe::Group::leave | ( | LeaveError & | error | ) |
Synchronous [non-throwing] leaves the specified group. Synchronous version of leave(LeaveDelegatePtr) , and throws no exception on error, instead the out/return parameter error
is used to provide the error information in connection with a failed call.
See leave(LeaveDelegatePtr)
[out] | error | Return parameter containing the error information in case of a failed call. An empty return value will indicate failure, and the LeaveError object passed in will we be populated with the error information. |
false
— indicating a failed call, and the error information is passed out via the error
out/return parameter. void cbe::Group::remove | ( | RemoveDelegatePtr | delegate | ) |
Remove group.
delegate | Pointer to a delegate::group::RemoveDelegate instance that is implemented by the user. |
delegate::group::RemoveSuccess cbe::Group::remove | ( | ) |
Synchronous [exception] removes the specified group. Synchronous version of remove(RemoveDelegatePtr) , and throws an exception, RemoveException, in case of a failed call.
See remove(RemoveDelegatePtr)
RemoveException |
cbe::util::Optional<delegate::group::RemoveSuccess> cbe::Group::remove | ( | RemoveError & | error | ) |
Synchronous [non-throwing] removes the specified group. Synchronous version of remove(RemoveDelegatePtr) , and throws no exception on error, instead the out/return parameter error
is used to provide the error information in connection with a failed call.
See remove(RemoveDelegatePtr)
[out] | error | Return parameter containing the error information in case of a failed call. An empty return value will indicate failure, and the RemoveError object passed in will we be populated with the error information. |
false
— indicating a failed call, and the error information is passed out via the error
out/return parameter. void cbe::Group::rename | ( | std::string | newName, |
RenameDelegatePtr | delegate | ||
) |
Rename the Group; group id does not change.
newName | the new name for the group |
delegate | Pointer to a delegate::group::RenameDelegate instance that is implemented by the user. |
delegate::group::RenameSuccess cbe::Group::rename | ( | std::string | newName | ) |
Synchronous [exception] renames a group Synchronous version of rename(std::string ,RenameDelegatePtr) , and throws an exception, RenameException, in case of a failed call.
See rename(RenameDelegatePtr)
RenameException |
cbe::util::Optional<delegate::group::RenameSuccess> cbe::Group::rename | ( | std::string | newName, |
RenameError & | error | ||
) |
Synchronous [non-throwing] renames a group Synchronous version of rename(newName,RenameDelegatePtr) , and throws no exception on error, instead the out/return parameter error
is used to provide the error information in connection with a failed call.
See rename(newName, RenameDelegatePtr)
[out] | error | Return parameter containing the error information in case of a failed call. An empty return value will indicate failure, and the RenameError object passed in will we be populated with the error information. |
false
— indicating a failed call, and the error information is passed out via the error
out/return parameter. void cbe::Group::listMembers | ( | ListMembersDelegatePtr | delegate | ) |
List all members in the group.
The member list is then retrieved via the delegate callback function cbe::delegate::ListMembersDelegate::onListMembersSuccess()
delegate | Pointer to a delegate::ListMembersDelegate instance that is implemented by the user. |
delegate::ListMembersDelegate::Members cbe::Group::listMembers | ( | ) |
Synchronous [exception] list members of the specifed group. Synchronous version of listMembers(ListMembersDelegatePtr) , and throws an exception, ListMembersException, in case of a failed call.
See listMembers(ListMembersDelegatePtr)
ListMembersException |
cbe::util::Optional<delegate::ListMembersDelegate::Members> cbe::Group::listMembers | ( | ListMembersError & | error | ) |
Synchronous [non-throwing] list members of the specifed group. Synchronous version of listMembers(ListMembersDelegatePtr) , and throws no exception on error, instead the out/return parameter error
is used to provide the error information in connection with a failed call.
See listMembers(ListMembersDelegatePtr)
[out] | error | Return parameter containing the error information in case of a failed call. An empty return value will indicate failure, and the ListMembersError object passed in will we be populated with the error information. |
false
— indicating a failed call, and the error information is passed out via the error
out/return parameter. void cbe::Group::listBannedMembers | ( | ListBannedMembersDelegatePtr | delegate | ) |
Lists all banned former members, or users.
delegate | Pointer to a delegate::ListMembersDelegate instance that is implemented by the user. |
std::vector<cbe::Member> cbe::Group::listBannedMembers | ( | ) |
Synchronous [exception] list the banned members of the specified group. Synchronous version of listBannedMembers(ListMembersDelegatePtr) , and throws an exception, ListBannedMembersException, in case of a failed call.
See listBannedMembers(ListMembersDelegatePtr)
ListBannedMembersException |
cbe::util::Optional<std::vector<cbe::Member> > cbe::Group::listBannedMembers | ( | ListBannedMembersError & | error | ) |
Synchronous [non-throwing] list the banned members of the specified group. Synchronous version of listBannedMembers(ListMembersDelegatePtr) , and throws no exception on error, instead the out/return parameter error
is used to provide the error information in connection with a failed call.
See listBannedMembers(ListMembersDelegatePtr)
[out] | error | Return parameter containing the error information in case of a failed call. An empty return value will indicate failure, and the ListBannedMembersError object passed in will we be populated with the error information. |
false
— indicating a failed call, and the error information is passed out via the error
out/return parameter. void cbe::Group::listRoles | ( | ListRolesDelegatePtr | delegate | ) |
Lists all roles in the group.
delegate | Pointer to a delegate::ListRolesDelegate instance that is implemented by the user. |
delegate::ListRolesDelegate::Roles cbe::Group::listRoles | ( | ) |
Synchronous [exception] list roles of a group. Synchronous version of listRoles(ListRolesDelegatePtr) , and throws an exception, ListRolesException, in case of a failed call.
See listRoles(ListRolesDelegatePtr)
ListRolesException |
cbe::util::Optional<delegate::ListRolesDelegate::Roles> cbe::Group::listRoles | ( | ListRolesError & | error | ) |
Synchronous [non-throwing] list roles of a group. Synchronous version of listRoles(ListRolesDelegatePtr) , and throws no exception on error, instead the out/return parameter error
is used to provide the error information in connection with a failed call.
See listRoles(ListRolesDelegatePtr)
[out] | error | Return parameter containing the error information in case of a failed call. An empty return value will indicate failure, and the ListRolesError object passed in will we be populated with the error information. |
false
— indicating a failed call, and the error information is passed out via the error
out/return parameter. void cbe::Group::createRole | ( | std::string | name, |
CreateRoleDelegatePtr | delegate | ||
) |
Creates a new role in the group.
name | The name of the role. |
delegate | Pointer to a delegate::CreateRoleDelegate instance that is implemented by the user. |
cbe::Role cbe::Group::createRole | ( | std::string | name | ) |
Synchronous [exception] creates a new role in the specified group. Synchronous version of createRole(std::string, CreateRoleDelegatePtr) , and throws an exception, CreateRoleException, in case of a failed call.
See createRole(CreateRoleDelegatePtr)
CreateRoleException |
cbe::util::Optional<cbe::Role> cbe::Group::createRole | ( | std::string | name, |
CreateRoleError & | error | ||
) |
Synchronous [non-throwing] creates a new role in the specified group. Synchronous version of createRole(name,CreateRoleDelegatePtr) , and throws no exception on error, instead the out/return parameter error
is used to provide the error information in connection with a failed call.
See createRole(name, CreateRoleDelegatePtr)
[out] | error | Return parameter containing the error information in case of a failed call. An empty return value will indicate failure, and the CreateRoleError object passed in will we be populated with the error information. |
false
— indicating a failed call, and the error information is passed out via the error
out/return parameter. void cbe::Group::removeRole | ( | RoleId | roleId, |
RemoveRoleDelegatePtr | delegate | ||
) |
@brief Removes a role in the group. @param roleId The id of the role to remove. @param delegate Pointer to a delegate::RemoveRoleDelegate instance
that is implemented by the user.
cbe::RoleId cbe::Group::removeRole | ( | RoleId | roleId | ) |
Synchronous [exception] removes a role in the specified group. Synchronous version of removeRole(RoleId roleId, RemoveRoleDelegatePtr) , and throws an exception, RemoveRoleException, in case of a failed call.
See removeRole(RemoveRoleDelegatePtr)
RemoveRoleException |
cbe::util::Optional<cbe::RoleId> cbe::Group::removeRole | ( | RoleId | roleId, |
RemoveRoleError & | error | ||
) |
Synchronous [non-throwing] removes a role in the specified group. Synchronous version of removeRole(roleId, RemoveRoleDelegatePtr) , and throws no exception on error, instead the out/return parameter error
is used to provide the error information in connection with a failed call.
See removeRole(roleId, RemoveRoleDelegatePtr)
[out] | error | Return parameter containing the error information in case of a failed call. An empty return value will indicate failure, and the RemoveRoleError object passed in will we be populated with the error information. |
false
— indicating a failed call, and the error information is passed out via the error
out/return parameter.
|
explicit |
Checks if the current instance is real.
An "unreal" instance implies typically a failed event.
Relies on the Default
constructor
Group(cbe::DefaultCtor)
true
: is real false
: unreal; got nullptr; if current instance is unbound/undefined. I.e., if it is only default constructed.