Group.h

Includes:
<Foundation/Foundation.h>
"CBEIOS/Container.h"
"CBEIOS/delegate/CreateGroupDelegate.h"
"CBEIOS/delegate/group/JoinDelegate.h"
"CBEIOS/delegate/group/RemoveDelegate.h"
"CBEIOS/delegate/group/RenameDelegate.h"
"CBEIOS/delegate/LeaveDelegate.h"
"CBEIOS/delegate/ListMembersDelegate.h"
"CBEIOS/Types.h"

Introduction

Use the links in the table of contents to the left to access the documentation.



Protocols

ListBannedMembersDelegatePtr

list of memberships to Group



Methods

+createGroup:memberAlias:delegate:visibility:

Create a new Group.

+getVisibility
+groupContainer
+id
+join:delegate:memberVisibility:applicationComment:

Asking to join a group.

+joined
+leave:

Leave group.

+listBannedMembers:

Lists all banned former members, or users.

+listMembers:

List all members in the group.

+name
+parentId
+remove:

Remove group.

+rename:delegate:

Rename the Group; group id does not change.


createGroup:memberAlias:delegate:visibility:


Create a new Group.

-(CBEGroup*) createGroup: (NSString*) name memberAlias: (NSString*) memberAlias 
        delegate: (id<CreateGroupDelegatePtr>) delegate visibility: (CBEVisibility) visibility;  
Parameters
name

of the group

memberAlias

another popular name

delegate

Pointer to a delegate::CreateGroupDelegate instance that is implemented by the user.

visibility

default: public

Return Value

cbe::Group \see Types.h for cbe::visibility enum cbe::Visibility::PublicGroup or cbe::Visibility::Private

Discussion

\note Can only be used by Tenant admin/owners to create new groups.


getVisibility


-(CBEVisibility) getVisibility;  
Discussion

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) \see Types.h for cbe::PublishVisibility enum


groupContainer


-(CBEContainer*) groupContainer;  
Discussion

Every group has a drive/container where resources can be shared with the members of the group. Works like a shared container.


id


-(CBEGroupId) id;  
Discussion

Returns the id number of the group.


join:delegate:memberVisibility:applicationComment:


Asking to join a group.

-(void) join: (NSString*) alias delegate: (id<JoinGroupDelegatePtr>) delegate 
        memberVisibility: (CBEVisibility) memberVisibility 
        applicationComment: (NSString*) applicationComment;  
Parameters
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

Discussion

In this first version All members will be Public, meaning visable for other member inside the group. All groups will also be open so all join requests should be accepted directly.

\note This is completetly different from the query chain join.


joined


-(bool) joined;  
Discussion

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.


leave:


Leave group.

-(void) leave:(id<LeaveDelegatePtr>) delegate;  
Parameters
delegate

Pointer to a delegate::LeaveDelegate instance that is implemented by the user.


listBannedMembers:


Lists all banned former members, or users.

- (void) listBannedMembers:(id<ListBannedMembersDelegatePtr>) delegate;  
Parameters
delegate

Pointer to a delegate::ListMembersDelegate instance that is implemented by the user.


listMembers:


List all members in the group.

-(void) listMembers:(id<ListMembersDelegatePtr>) delegate;  
Parameters
delegate

Pointer to a delegate::ListMembersDelegate instance that is implemented by the user.

Discussion

The member list is then retrieved via the delegate callback function cbe::delegate::ListMembersDelegate::onListMembersSuccess()


name


-(NSString*) name;  
Discussion

Returns the name of the group.


parentId


-(CBEGroupId) parentId;  
Discussion

Group's Parent id number.


remove:


Remove group.

-(void) remove:(id<RemoveGroupDelegatePtr>) delegate;  
Parameters
delegate

Pointer to a delegate::group::RemoveDelegate instance that is implemented by the user.

Discussion

\note This is exlusive for Tenant group owners.


rename:delegate:


Rename the Group; group id does not change.

-(void) rename: (NSString*) newName delegate: (id<RenameGroupDelegatePtr>) delegate;  
Parameters
newName

the new name for the group

delegate

Pointer to a delegate::group::RenameDelegate instance that is implemented by the user.