15#import <Foundation/Foundation.h>
16#import "EMCommonDefs.h"
17#import "EMContactManagerDelegate.h"
32#pragma mark - Delegate
48 delegateQueue:(dispatch_queue_t)aQueue;
61- (void)removeDelegate:(
id _Nonnull)aDelegate;
64#pragma mark - Contact Operations
99- (void)getContactsFromServerWithCompletion:(
void (^)(NSArray<NSString *> *_Nullable aList,
EMError *aError_Nullable ))aCompletionBlock;
120- (NSArray<NSString *> *_Nullable )getContactsFromServerWithError:(
EMError **_Nullable )pError;
143- (
EMError *_Nullable )addContact:(NSString *_Nonnull)aUsername
144 message:(NSString *_Nullable )aMessage;
166- (void)addContact:(NSString *_Nonnull)aUsername
167 message:(NSString *_Nullable )aMessage
168 completion:(
void (^_Nullable )(NSString *_Nullable aUsername,
EMError *_Nullable aError))aCompletionBlock;
191- (
EMError *_Nullable )deleteContact:(NSString *_Nonnull)aUsername
192 isDeleteConversation:(BOOL)aIsDeleteConversation;
214- (void)deleteContact:(NSString *_Nonnull)aUsername
215 isDeleteConversation:(BOOL)aIsDeleteConversation
216 completion:(
void (^_Nullable )(NSString *_Nullable aUsername,
EMError *_Nullable aError))aCompletionBlock;
236- (void)approveFriendRequestFromUser:(NSString *_Nonnull)aUsername
237 completion:(
void (^_Nullable )(NSString *_Nullable aUsername,
EMError *_Nullable aError))aCompletionBlock;
257- (void)declineFriendRequestFromUser:(NSString *_Nonnull)aUsername
258 completion:(
void (^_Nullable )(NSString *aUsername,
EMError *_Nullable aError))aCompletionBlock;
261#pragma mark - Blacklist Operations
294- (void)getBlackListFromServerWithCompletion:(
void (^_Nullable )(NSArray<NSString *> *_Nullable aList,
EMError *_Nullable aError))aCompletionBlock;
315- (NSArray<NSString *> *_Nullable )getBlackListFromServerWithError:(
EMError **_Nullable )pError;
337- (
EMError *_Nullable )addUserToBlackList:(NSString *_Nonnull)aUsername;
358- (void)addUserToBlackList:(NSString *_Nonnull)aUsername
359 completion:(
void (^_Nullable )(NSString *_Nullable aUsername,
EMError *_Nullable aError))aCompletionBlock;
380- (
EMError *_Nullable )removeUserFromBlackList:(NSString *_Nonnull)aUsername;
400- (void)removeUserFromBlackList:(NSString *_Nonnull)aUsername
401 completion:(
void (^_Nullable )(NSString *_Nullable aUsername,
EMError *_Nullable aError))aCompletionBlock;
422- (
EMError *_Nullable )acceptInvitationForUsername:(NSString *_Nonnull)aUsername;
448- (
EMError *_Nullable )declineInvitationForUsername:(NSString *_Nonnull)aUsername;
450#pragma mark - Other platform
474- (NSArray<NSString *> *_Nullable )getSelfIdsOnOtherPlatformWithError:(
EMError **_Nullable )pError;
494- (void)getSelfIdsOnOtherPlatformWithCompletion:(
void (^_Nullable)(NSArray<NSString *> *_Nullable aList,
EMError *_Nullable aError))aCompletionBlock;