9#import <Foundation/Foundation.h>
12#import "EMCircleUser.h"
13#import "EMCircleServer.h"
14#import "EMCircleChannel.h"
15#import "EMCircleManagerServerDelegate.h"
16#import "EMCircleManagerChannelDelegate.h"
17#import "EMCursorResult.h"
18#import "EMCircleServerAttribute.h"
19#import "EMCircleChannelAttribute.h"
20#import "EMCircleCategory.h"
21#import "EMCircleVoiceChannel.h"
22#import "EMCircleManagerCategoryDelegate.h"
29typedef NS_ENUM(NSUInteger, EMCircleServerSearchType) {
30 EMCircleServerSearchTypeName,
31 EMCircleServerSearchTypeTag,
34NS_ASSUME_NONNULL_BEGIN
47 queue:(nullable dispatch_queue_t)queue NS_SWIFT_NAME(add(serverDelegate:queue:));
64 queue:(nullable dispatch_queue_t)queue NS_SWIFT_NAME(add(channelDelegate:queue:));
81- (void)addCategoryDelegate:(
id<
EMCircleManagerCategoryDelegate>)delegate queue:(nullable dispatch_queue_t)queue NS_SWIFT_NAME(add(categoryDelegate:queue:));
109- (void)destroyServer:(NSString *)serverId completion:(
void(^)(
EMError * _Nullable error))completion;
130- (void)joinServer:(NSString *)serverId completion:(
void(^)(
EMCircleServer * _Nullable server,
EMError * _Nullable error))completion;
143- (void)leaveServer:(NSString *)serverId completion:(
void(^)(
EMError * _Nullable error))completion;
155- (void)removeUserFromServer:(NSString *)serverId userId:(NSString *)userId completion:(
void(^)(
EMError * _Nullable error))completion;
165- (void)inviteUserToServer:(NSString *)serverId userId:(NSString *)userId welcome:(nullable NSString *)welcome completion:(
void(^)(
EMError * _Nullable error))completion NS_SWIFT_NAME(inviteUserToServer(serverId:userId:welcome:completion:));;
175- (void)acceptServerInvitation:(NSString *)serverId inviter:(NSString *)invite completion:(
void(^)(
EMCircleServer * _Nullable server,
EMError * _Nullable error))completion;
185- (void)declineServerInvitation:(NSString *)serverId inviter:(NSString *)invite completion:(
void(^)(
EMError * _Nullable error))completion;
197- (void)addTagsToServer:(NSString *)serverId tags:(NSArray<NSString *> *)tags completion:(
void(^)(NSArray<
EMCircleServerTag *> * _Nullable tags,
EMError * _Nullable error))completion;
209- (void)removeTagsFromServer:(NSString *)serverId tagIds:(NSArray <NSString *>*)tagIds completion:(
void(^)(
EMError * _Nullable error))completion;
221- (void)addModeratorToServer:(NSString *)serverId userId:(NSString *)userId completion:(
void(^)(
EMError * _Nullable error))completion;
233- (void)removeModeratorFromServer:(NSString *)serverId userId:(NSString *)userId completion:(
void(^)(
EMError * _Nullable error))completion;
242- (void)fetchSelfServerRole:(NSString *)serverId completion:(
void(^)(EMCircleUserRole role,
EMError * _Nullable error))completion;
254- (void)fetchJoinedServers:(NSUInteger)limit cursor:(nullable NSString *)cursor completion:(
void(^)(
EMCursorResult<
EMCircleServer *> * _Nullable result,
EMError * _Nullable error))completion;
263- (void)fetchServerDetail:(NSString *)serverId completion:(
void(^)(
EMCircleServer * _Nullable server,
EMError * _Nullable error))completion;
272- (void)fetchServersWithKeyword:(NSString *)keyword completion:(
void (^)(NSArray<
EMCircleServer *> * _Nullable result,
EMError * _Nullable error))completion;
289- (void)fetchServersWithType:(EMCircleServerSearchType)type keyword:(NSString *)keyword limit:(NSUInteger)limit cursor:(nullable NSString *)cursor completion:(
void (^)(
EMCursorResult<
EMCircleServer *> * _Nullable result,
EMError * _Nullable error))completion;
302- (void)fetchServerMembers:(NSString *)serverId limit:(NSUInteger)limit cursor:(nullable NSString *)cursor completion:(
void(^)(
EMCursorResult<
EMCircleUser *> * _Nullable result,
EMError * _Nullable error))completion;
311- (void)checkSelfIsInServer:(NSString *)serverId completion:(
void(^)(BOOL isJoined,
EMError * _Nullable error))completion;
320- (void)fetchServerTags:(NSString *)serverId completion:(
void(^)(NSArray<
EMCircleServerTag *> * _Nullable result,
EMError * _Nullable error))completion;
322#pragma mark - channel
335- (void)createChannel:(NSString *)serverId categoryId:(nullable NSString *)categoryId attribute:(
EMCircleChannelAttribute *)attribute mode:(EMCircleChannelMode)mode completion:(
void(^)(
EMCircleChannel * _Nullable channel,
EMError * _Nullable error))completion;
347- (void)destroyChannel:(NSString *)serverId channelId:(NSString *)channelId completion:(
void(^)(
EMError * _Nullable error))completion;
370- (void)joinChannel:(NSString *)serverId channelId:(NSString *)channelId completion:(
void(^)(
EMCircleChannel * _Nullable channel,
EMError * _Nullable error))completion;
384- (void)leaveChannel:(NSString *)serverId channelId:(NSString *)channelId completion:(
void(^)(
EMError * _Nullable error))completion;
399- (void)removeUserFromChannel:(NSString *)serverId channelId:(NSString *)channelId userId:(NSString *)userId completion:(
void(^)(
EMError * _Nullable error))completion;
410- (void)inviteUserToChannel:(NSString *)serverId channelId:(NSString *)channelId userId:(NSString *)userId welcome:(nullable NSString *)welcome completion:(
void(^)(
EMError * _Nullable error))completion NS_SWIFT_NAME(inviteUserToChannel(serverId:channelId:userId:welcome:completion:));
421- (void)acceptChannelInvitation:(NSString *)serverId channelId:(NSString *)channelId inviter:(NSString *)inviter completion:(
void(^)(
EMCircleChannel * _Nullable channel,
EMError * _Nullable error))completion;
432- (void)declineChannelInvitation:(NSString *)serverId channelId:(NSString *)channelId inviter:(NSString *)inviter completion:(
void(^)(
EMError * _Nullable error))completion;
446- (void)muteUserInChannel:(NSString *)userId serverId:(NSString *)serverId channelId:(NSString *)channelId duration:(NSUInteger)duration completion:(
void(^)(
EMError * _Nullable error))completion NS_SWIFT_NAME(muteUserInChannel(userId:serverId:channelId:duration:completion:));
459- (void)unmuteUserInChannel:(NSString *)userId serverId:(NSString *)serverId channelId:(NSString *)channelId completion:(
void(^)(
EMError * _Nullable error))completion NS_SWIFT_NAME(unmuteUserInChannel(userId:serverId:channelId:completion:));
469- (void)fetchChannelDetail:(NSString *)serverId channelId:(NSString *)channelId completion:(
void(^)(
EMCircleChannel * _Nullable channel,
EMError * _Nullable error))completion;
482- (void)fetchPublicChannelsInServer:(NSString *)serverId limit:(NSUInteger)limit cursor:(nullable NSString *)cursor completion:(
void(^)(
EMCursorResult<
EMCircleChannel *> * _Nullable result,
EMError * _Nullable error))completion;
495- (void)fetchPrivateChannelsInServer:(NSString *)serverId limit:(NSUInteger)limit cursor:(nullable NSString *)cursor completion:(
void(^)(
EMCursorResult<
EMCircleChannel *> * _Nullable result,
EMError * _Nullable error))completion;
509- (void)fetchPublicChannelsInCategory:(NSString *)serverId categoryId:(NSString *)categoryId limit:(NSUInteger)limit cursor:(nullable NSString *)cursor completion:(
void (^)(
EMCursorResult<
EMCircleChannel *> * _Nullable,
EMError * _Nullable))completion;
523- (void)fetchPrivateChannelsInCategory:(NSString *)serverId categoryId:(NSString *)categoryId limit:(NSUInteger)limit cursor:(nullable NSString *)cursor completion:(
void (^)(
EMCursorResult<
EMCircleChannel *> * _Nullable,
EMError * _Nullable))completion;
537- (void)fetchChannelMembers:(NSString *)serverId channelId:(NSString *)channelId limit:(NSUInteger)limit cursor:(nullable NSString *)cursor completion:(
void(^)(
EMCursorResult<
EMCircleUser *> * _Nullable result,
EMError * _Nullable error))completion;
551- (void)fetchJoinedChannelIdsInServer:(NSString *)serverId limit:(NSUInteger)limit cursor:(nullable NSString *)cursor completion:(
void(^)(
EMCursorResult<NSString *> * _Nullable result,
EMError * _Nullable error))completion;
561- (void)checkSelfIsInChannel:(NSString *)serverId channelId:(NSString *)channelId completion:(
void(^)(BOOL isJoined,
EMError * _Nullable error))completion NS_SWIFT_NAME(checkSelfIsInChannel(serverId:channelId:completion:));
571- (void)fetchChannelMuteUsers:(NSString *)serverId channelId:(NSString *)channelId completion:(
void(^)(NSDictionary<NSString *, NSNumber *> * _Nullable muteInfo,
EMError * _Nullable error))completion;
573#pragma mark - category
584- (void)createCategory:(NSString *)serverId name:(NSString *)name completion:(
void(^)(
EMCircleCategory * _Nullable category,
EMError * _Nullable error))completion;
598- (void)destroyCategory:(NSString *)serverId categoryId:(NSString *)categoryId completion:(
void(^)(
EMError * _Nullable error))completion;
611- (void)updateCategory:(NSString *)serverId categoryId:(NSString *)categoryId name:(NSString *)name completion:(
void(^)(
EMCircleCategory * _Nullable category,
EMError * _Nullable error))completion;
624- (void)transferChannel:(NSString *)serverId channelId:(NSString *)channelId newCategoryId:(nullable NSString *)newCategoryId completion:(
void(^)(
EMError * _Nullable error))completion;
637- (void)fetchCategoriesInServer:(NSString *)serverId limit:(NSUInteger)limit cursor:(nullable NSString *)cursor completion:(
void(^)(
EMCursorResult<
EMCircleCategory *> * _Nullable result,
EMError * _Nullable error))completion;
Definition: EMCircleCategory.h:14
Definition: EMCircleChannelAttribute.h:17
Definition: EMCircleChannel.h:30
Definition: EMCircleServerAttribute.h:14
Definition: EMCircleServer.h:26
Definition: EMCircleServerTag.h:14
Definition: EMCircleUser.h:20
Definition: EMCursorResult.h:27
Definition: EMCircleManagerCategoryDelegate.h:14
Definition: EMCircleManagerChannelDelegate.h:16
Definition: EMCircleManagerServerDelegate.h:16
Definition: IEMCircleManager.h:36