HyphenateChatSDK 3.9.9.1
IEMContactManager.h
15#import <Foundation/Foundation.h>
16#import "EMCommonDefs.h"
17#import "EMContactManagerDelegate.h"
18
19@class EMError;
20
28@protocol IEMContactManager <NSObject>
29
30@required
31
32#pragma mark - Delegate
33
47- (void)addDelegate:(id<EMContactManagerDelegate> _Nonnull)aDelegate
48 delegateQueue:(dispatch_queue_t)aQueue;
49
61- (void)removeDelegate:(id _Nonnull)aDelegate;
62
63
64#pragma mark - Contact Operations
65
81- (NSArray<NSString *> *_Nullable )getContacts;
82
99- (void)getContactsFromServerWithCompletion:(void (^)(NSArray<NSString *> *_Nullable aList, EMError *aError_Nullable ))aCompletionBlock;
100
120- (NSArray<NSString *> *_Nullable )getContactsFromServerWithError:(EMError **_Nullable )pError;
121
143- (EMError *_Nullable )addContact:(NSString *_Nonnull)aUsername
144 message:(NSString *_Nullable )aMessage;
145
166- (void)addContact:(NSString *_Nonnull)aUsername
167 message:(NSString *_Nullable )aMessage
168 completion:(void (^_Nullable )(NSString *_Nullable aUsername, EMError *_Nullable aError))aCompletionBlock;
169
191- (EMError *_Nullable )deleteContact:(NSString *_Nonnull)aUsername
192 isDeleteConversation:(BOOL)aIsDeleteConversation;
193
214- (void)deleteContact:(NSString *_Nonnull)aUsername
215 isDeleteConversation:(BOOL)aIsDeleteConversation
216 completion:(void (^_Nullable )(NSString *_Nullable aUsername, EMError *_Nullable aError))aCompletionBlock;
217
236- (void)approveFriendRequestFromUser:(NSString *_Nonnull)aUsername
237 completion:(void (^_Nullable )(NSString *_Nullable aUsername, EMError *_Nullable aError))aCompletionBlock;
238
257- (void)declineFriendRequestFromUser:(NSString *_Nonnull)aUsername
258 completion:(void (^_Nullable )(NSString *aUsername, EMError *_Nullable aError))aCompletionBlock;
259
260
261#pragma mark - Blacklist Operations
262
276- (NSArray<NSString *> *_Nullable )getBlackList;
277
294- (void)getBlackListFromServerWithCompletion:(void (^_Nullable )(NSArray<NSString *> *_Nullable aList, EMError *_Nullable aError))aCompletionBlock;
295
315- (NSArray<NSString *> *_Nullable )getBlackListFromServerWithError:(EMError **_Nullable )pError;
316
317
337- (EMError *_Nullable )addUserToBlackList:(NSString *_Nonnull)aUsername;
338
339
358- (void)addUserToBlackList:(NSString *_Nonnull)aUsername
359 completion:(void (^_Nullable )(NSString *_Nullable aUsername, EMError *_Nullable aError))aCompletionBlock;
360
380- (EMError *_Nullable )removeUserFromBlackList:(NSString *_Nonnull)aUsername;
381
400- (void)removeUserFromBlackList:(NSString *_Nonnull)aUsername
401 completion:(void (^_Nullable )(NSString *_Nullable aUsername, EMError *_Nullable aError))aCompletionBlock;
402
422- (EMError *_Nullable )acceptInvitationForUsername:(NSString *_Nonnull)aUsername;
423
448- (EMError *_Nullable )declineInvitationForUsername:(NSString *_Nonnull)aUsername;
449
450#pragma mark - Other platform
451
474- (NSArray<NSString *> *_Nullable )getSelfIdsOnOtherPlatformWithError:(EMError **_Nullable )pError;
475
494- (void)getSelfIdsOnOtherPlatformWithCompletion:(void (^_Nullable)(NSArray<NSString *> *_Nullable aList, EMError *_Nullable aError))aCompletionBlock;
495
496@end
Definition: EMError.h:27
Definition: EMContactManagerDelegate.h:26
Definition: IEMContactManager.h:28
NSArray< NSString * > *_Nullable getBlackList()
NSArray< NSString * > *_Nullable getContacts()