You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

163 lines
5.3 KiB

//
// JCGroup.h
// JCSDKOC
//
// Created by maikireton on 2017/8/15.
// Copyright © 2017年 juphoon. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "JCGroupCallback.h"
#import "JCGroupConstants.h"
#import "JCGroupItem.h"
/**
* @defgroup
* @{
*
*/
/**
*
*/
@interface JCGroup : NSObject
/**
* JCGroup
*
* JCGroup 线
*
* @note
* - JCGroup {@link destroy} JCGroup
* - JCClient @ref JCClient.state "state" @ref JCClientStateNotInit
*
* @param client JCClient
* @param callback JCGroupCallback
* @return JCGroup
* @exception "JCClient、JCGroupCallback 任意一个参数传空就会出现调用异常"
*/
+(JCGroup* __nullable)create:(JCClient* __nonnull)client callback:(id<JCGroupCallback> __nonnull)callback;
/**
* JCGroup
*
* JCGroup 使 JCGroup <br>
* **** JCSDK JCGroup <br>
* JCGroup @ref destroy
*/
+(void)destroy;
/**
*
*
* @param updateTime
* @return
* - >0id {@link JCGroupCallback#onFetchGroups:result:reason:groups:updateTime:baseTime:fullUpdate: onFetchGroups}
* - -1
*/
-(int)fetchGroups:(long)updateTime;
/**
*
*
* @param groupId
* @param updateTime
* @return
* - >0id {@link JCGroupCallback#onFetchGroupInfo:result:reason:groupItem:members:updateTime:baseTime:fullUpdate: onFetchGroupInfo}
* - -1
*/
-(int)fetchGroupInfo:(NSString* __nonnull)groupId updateTime:(long)updateTime;
/**
*
*
* @param members JCGroupMember
* @param groupName
* @param type
* - @ref JCGroupTypeDiscussion :
* - @ref JCGroupTypeNormal :
* @param customProperties
* @return
* - >0id {@link JCGroupCallback#onCreateGroup:result:reason:groupItem:updateTime:baseTime: onCreateGroup}
* - -1
*/
-(int)createGroup:(NSArray<JCGroupMember*>* __nonnull)members groupName:(NSString* __nonnull)groupName type:(JCGroupType)type customProperties:(NSDictionary<NSString*, NSObject*>* __nullable)customProperties;
/**
*
*
* @param groupItem JCGroupItem JCGroupItem @ref JCGroupItem.changeState "changeState"
* @return
* - >0id {@link JCGroupCallback#onCreateGroup:result:reason:groupItem:updateTime:baseTime: onCreateGroup}
* - -1
*/
-(int)updateGroup:(JCGroupItem* __nonnull)groupItem;
/**
*
*
* @note
*
* @param groupId
* @return
* - >0id {@link JCGroupCallback#onDissolve:result:reason:groupId: onDissolve}
* - -1
*/
-(int)dissolve:(NSString* __nonnull)groupId;
/**
*
*
* @param groupId
* @return
* - >0id {@link JCGroupCallback#onLeave:result:reason:groupId: onLeave}
* - -1
*/
-(int)leave:(NSString* __nonnull)groupId;
/**
*
*
* @param groupId
* @param members JCGroupMember @ref JCGroupItem.changeState "changeState"
* @return
* - >0id {@link JCGroupCallback#onDealMembers:result:reason:groupId: onDealMembers}
* - -1
*/
-(int)dealMembers:(NSString* __nonnull)groupId members:(NSArray<JCGroupMember*>* __nonnull)members;
/**
*
*
* @note
*
* @param groupId
* @param nickName
* @param tagMap
* @return
* - >0id {@link JCGroupCallback#onUpdateGroupComment:result:reason:groupId: onUpdateGroupComment}
* - -1
*/
-(int)updateGroupComment:(NSString* __nonnull)groupId nickName:(NSString* __nonnull)nickName tag:(NSDictionary<NSString*, NSObject*>* __nullable)tag;
/**
*
*
*
*
* @param groupId
* @param dnd
* - true:
* - false:
* @return
* - >0id {@link JCGroupCallback#onSetGroupDnd:result:reason:groupId: onSetGroupDnd}
* - -1
*/
-(int)setDnd:(NSString* __nonnull)groupId dnd:(bool)dnd;
@end
/**
* @}
*/