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

2 years ago
//
// 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
* @{
*
*/
/**
2 years ago
*
*/
@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 任意一个参数传空就会出现调用异常"
2 years ago
*/
+(JCGroup* __nullable)create:(JCClient* __nonnull)client callback:(id<JCGroupCallback> __nonnull)callback;
2 years ago
/**
* JCGroup
*
* JCGroup 使 JCGroup <br>
* **** JCSDK JCGroup <br>
* JCGroup @ref destroy
2 years ago
*/
+(void)destroy;
2 years ago
/**
*
*
* @param updateTime
* @return
* - >0id {@link JCGroupCallback#onFetchGroups:result:reason:groups:updateTime:baseTime:fullUpdate: onFetchGroups}
* - -1
2 years ago
*/
-(int)fetchGroups:(long)updateTime;
2 years ago
/**
*
*
* @param groupId
* @param updateTime
* @return
* - >0id {@link JCGroupCallback#onFetchGroupInfo:result:reason:groupItem:members:updateTime:baseTime:fullUpdate: onFetchGroupInfo}
* - -1
2 years ago
*/
-(int)fetchGroupInfo:(NSString* __nonnull)groupId updateTime:(long)updateTime;
2 years ago
/**
*
*
* @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
2 years ago
*/
-(int)createGroup:(NSArray<JCGroupMember*>* __nonnull)members groupName:(NSString* __nonnull)groupName type:(JCGroupType)type customProperties:(NSDictionary<NSString*, NSObject*>* __nullable)customProperties;
2 years ago
/**
*
*
* @param groupItem JCGroupItem JCGroupItem @ref JCGroupItem.changeState "changeState"
* @return
* - >0id {@link JCGroupCallback#onCreateGroup:result:reason:groupItem:updateTime:baseTime: onCreateGroup}
* - -1
2 years ago
*/
-(int)updateGroup:(JCGroupItem* __nonnull)groupItem;
2 years ago
/**
*
*
* @note
*
* @param groupId
* @return
* - >0id {@link JCGroupCallback#onDissolve:result:reason:groupId: onDissolve}
* - -1
2 years ago
*/
-(int)dissolve:(NSString* __nonnull)groupId;
2 years ago
/**
*
*
* @param groupId
* @return
* - >0id {@link JCGroupCallback#onLeave:result:reason:groupId: onLeave}
* - -1
2 years ago
*/
-(int)leave:(NSString* __nonnull)groupId;
2 years ago
/**
*
*
* @param groupId
* @param members JCGroupMember @ref JCGroupItem.changeState "changeState"
* @return
* - >0id {@link JCGroupCallback#onDealMembers:result:reason:groupId: onDealMembers}
* - -1
2 years ago
*/
-(int)dealMembers:(NSString* __nonnull)groupId members:(NSArray<JCGroupMember*>* __nonnull)members;
2 years ago
/**
*
*
* @note
*
* @param groupId
* @param nickName
* @param tagMap
* @return
* - >0id {@link JCGroupCallback#onUpdateGroupComment:result:reason:groupId: onUpdateGroupComment}
* - -1
2 years ago
*/
-(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;
2 years ago
@end
/**
* @}
*/