15 #import <Foundation/Foundation.h>
16 #import "EMCommonDefs.h"
17 #import "EMContactManagerDelegate.h"
19 #import "EMCursorResult.h"
34 #pragma mark - Delegate
50 delegateQueue:(dispatch_queue_t)aQueue;
63 - (void)removeDelegate:(
id _Nonnull)aDelegate;
66 #pragma mark - Contact Operations
122 - (void)setContactRemark:(NSString* _Nonnull)userId remark:(NSString*_Nullable)remark completion:(
void (^_Nullable)(
EMContact* _Nullable contact,
EMError * _Nullable aError))aCompletionBlock;
142 - (
EMContact* _Nullable)getContact:(NSString* _Nonnull)userId;
160 - (void)getAllContactsFromServerWithCompletion:(
void (^_Nullable)(NSArray<
EMContact *>* _Nullable aList,
EMError* _Nullable aError))aCompletionBlock;
181 - (void)getContactsFromServerWithCursor:(NSString* _Nullable)cursor pageSize:(NSUInteger)pageSize completion:(
void (^_Nonnull)(
EMCursorResult<
EMContact*> * _Nullable aResult,
EMError * _Nullable aError))aCompletionBlock;
200 - (void)getContactsFromServerWithCompletion:(
void (^)(NSArray<NSString *> *_Nullable aList,
EMError *aError_Nullable ))aCompletionBlock;
221 - (NSArray<NSString *> *_Nullable )getContactsFromServerWithError:(
EMError **_Nullable )pError;
244 - (
EMError *_Nullable )addContact:(NSString *_Nonnull)aUsername
245 message:(NSString *_Nullable )aMessage;
267 - (void)addContact:(NSString *_Nonnull)aUsername
268 message:(NSString *_Nullable )aMessage
269 completion:(
void (^_Nullable )(NSString *_Nullable aUsername,
EMError *_Nullable aError))aCompletionBlock;
292 - (
EMError *_Nullable )deleteContact:(NSString *_Nonnull)aUsername
293 isDeleteConversation:(BOOL)aIsDeleteConversation;
315 - (void)deleteContact:(NSString *_Nonnull)aUsername
316 isDeleteConversation:(BOOL)aIsDeleteConversation
317 completion:(
void (^_Nullable )(NSString *_Nullable aUsername,
EMError *_Nullable aError))aCompletionBlock;
337 - (void)approveFriendRequestFromUser:(NSString *_Nonnull)aUsername
338 completion:(
void (^_Nullable )(NSString *_Nullable aUsername,
EMError *_Nullable aError))aCompletionBlock;
358 - (void)declineFriendRequestFromUser:(NSString *_Nonnull)aUsername
359 completion:(
void (^_Nullable )(NSString *aUsername,
EMError *_Nullable aError))aCompletionBlock;
362 #pragma mark - Blacklist Operations
395 - (void)getBlackListFromServerWithCompletion:(
void (^_Nullable )(NSArray<NSString *> *_Nullable aList,
EMError *_Nullable aError))aCompletionBlock;
416 - (NSArray<NSString *> *_Nullable )getBlackListFromServerWithError:(
EMError **_Nullable )pError;
438 - (
EMError *_Nullable )addUserToBlackList:(NSString *_Nonnull)aUsername;
459 - (void)addUserToBlackList:(NSString *_Nonnull)aUsername
460 completion:(
void (^_Nullable )(NSString *_Nullable aUsername,
EMError *_Nullable aError))aCompletionBlock;
481 - (
EMError *_Nullable )removeUserFromBlackList:(NSString *_Nonnull)aUsername;
501 - (void)removeUserFromBlackList:(NSString *_Nonnull)aUsername
502 completion:(
void (^_Nullable )(NSString *_Nullable aUsername,
EMError *_Nullable aError))aCompletionBlock;
523 - (
EMError *_Nullable )acceptInvitationForUsername:(NSString *_Nonnull)aUsername;
549 - (
EMError *_Nullable )declineInvitationForUsername:(NSString *_Nonnull)aUsername;
551 #pragma mark - Other platform
575 - (NSArray<NSString *> *_Nullable )getSelfIdsOnOtherPlatformWithError:(
EMError **_Nullable )pError;
595 - (void)getSelfIdsOnOtherPlatformWithCompletion:(
void (^_Nullable)(NSArray<NSString *> *_Nullable aList,
EMError *_Nullable aError))aCompletionBlock;
Definition: EMCursorResult.h:27