AgoraChatSDK 1.2.0
IAgoraChatContactManager.h
9#import <Foundation/Foundation.h>
10#import "AgoraChatCommonDefs.h"
11#import "AgoraChatContactManagerDelegate.h"
12
13@class AgoraChatError;
14
19@protocol IAgoraChatContactManager <NSObject>
20
21@required
22
23#pragma mark - Delegate
24
32- (void)addDelegate:(id<AgoraChatContactManagerDelegate> _Nonnull)aDelegate
33 delegateQueue:(dispatch_queue_t)aQueue;
34
41- (void)removeDelegate:(id _Nonnull)aDelegate;
42
43
44#pragma mark - Contact Operations
45
54- (NSArray<NSString *> *_Nullable )getContacts;
55
65- (void)getContactsFromServerWithCompletion:(void (^)(NSArray<NSString *> *_Nullable aList, AgoraChatError *aError_Nullable ))aCompletionBlock;
66
77- (NSArray<NSString *> *_Nullable )getContactsFromServerWithError:(AgoraChatError **_Nullable )pError;
78
90- (AgoraChatError *_Nullable )addContact:(NSString *_Nonnull)aUsername
91 message:(NSString *_Nullable )aMessage;
92
104- (void)addContact:(NSString *_Nonnull)aUsername
105 message:(NSString *_Nullable )aMessage
106 completion:(void (^_Nullable )(NSString *_Nullable aUsername, AgoraChatError *_Nullable aError))aCompletionBlock;
107
119- (AgoraChatError *_Nullable )deleteContact:(NSString *_Nonnull)aUsername
120 isDeleteConversation:(BOOL)aIsDeleteConversation;
121
133- (void)deleteContact:(NSString *_Nonnull)aUsername
134 isDeleteConversation:(BOOL)aIsDeleteConversation
135 completion:(void (^_Nullable )(NSString *_Nullable aUsername, AgoraChatError *_Nullable aError))aCompletionBlock;
136
147- (void)approveFriendRequestFromUser:(NSString *_Nonnull)aUsername
148 completion:(void (^_Nullable )(NSString *_Nullable aUsername, AgoraChatError *_Nullable aError))aCompletionBlock;
149
160- (void)declineFriendRequestFromUser:(NSString *_Nonnull)aUsername
161 completion:(void (^_Nullable )(NSString *aUsername, AgoraChatError *_Nullable aError))aCompletionBlock;
162
163
164#pragma mark - Blacklist Operations
165
172- (NSArray<NSString *> *_Nullable )getBlackList;
173
183- (void)getBlackListFromServerWithCompletion:(void (^_Nullable )(NSArray<NSString *> *_Nullable aList, AgoraChatError *_Nullable aError))aCompletionBlock;
184
195- (NSArray<NSString *> *_Nullable )getBlackListFromServerWithError:(AgoraChatError **_Nullable )pError;
196
197
208- (AgoraChatError *_Nullable )addUserToBlackList:(NSString *_Nonnull)aUsername;
209
210
221- (void)addUserToBlackList:(NSString *_Nonnull)aUsername
222 completion:(void (^_Nullable )(NSString *_Nullable aUsername, AgoraChatError *_Nullable aError))aCompletionBlock;
223
234- (AgoraChatError *_Nullable )removeUserFromBlackList:(NSString *_Nonnull)aUsername;
235
246- (void)removeUserFromBlackList:(NSString *_Nonnull)aUsername
247 completion:(void (^_Nullable )(NSString *_Nullable aUsername, AgoraChatError *_Nullable aError))aCompletionBlock;
248
259- (AgoraChatError *_Nullable )acceptInvitationForUsername:(NSString *_Nonnull)aUsername;
260
276- (AgoraChatError *_Nullable )declineInvitationForUsername:(NSString *_Nonnull)aUsername;
277
278#pragma mark - Other platform
279
292- (NSArray<NSString *> *_Nullable )getSelfIdsOnOtherPlatformWithError:(AgoraChatError **_Nullable )pError;
293
304- (void)getSelfIdsOnOtherPlatformWithCompletion:(void (^_Nullable)(NSArray<NSString *> *_Nullable aList, AgoraChatError *_Nullable aError))aCompletionBlock;
305
306@end
Definition: AgoraChatError.h:18
Definition: AgoraChatContactManagerDelegate.h:17
Definition: IAgoraChatContactManager.h:19
NSArray< NSString * > *_Nullable getContacts()
NSArray< NSString * > *_Nullable getBlackList()