15 #import <Foundation/Foundation.h> 17 #import "EMCommonDefs.h" 18 #import "EMContactManagerDelegate.h" 33 #pragma mark - Delegate 49 delegateQueue:(dispatch_queue_t)aQueue;
62 - (void)removeDelegate:(
id)aDelegate;
65 #pragma mark - Contact Operations 92 - (void)getContactsFromServerWithCompletion:(
void (^)(NSArray *aList,
EMError *aError))aCompletionBlock;
113 - (NSArray *)getContactsFromServerWithError:(
EMError **)pError;
136 - (
EMError *)addContact:(NSString *)aUsername
137 message:(NSString *)aMessage;
155 - (void)addContact:(NSString *)aUsername
156 message:(NSString *)aMessage
157 completion:(
void (^)(NSString *aUsername,
EMError *aError))aCompletionBlock;
180 - (
EMError *)deleteContact:(NSString *)aUsername
181 isDeleteConversation:(BOOL)aIsDeleteConversation;
199 - (void)deleteContact:(NSString *)aUsername
200 isDeleteConversation:(BOOL)aIsDeleteConversation
201 completion:(
void (^)(NSString *aUsername,
EMError *aError))aCompletionBlock;
217 - (void)approveFriendRequestFromUser:(NSString *)aUsername
218 completion:(
void (^)(NSString *aUsername,
EMError *aError))aCompletionBlock;
234 - (void)declineFriendRequestFromUser:(NSString *)aUsername
235 completion:(
void (^)(NSString *aUsername,
EMError *aError))aCompletionBlock;
238 #pragma mark - Blacklist Operations 266 - (void)getBlackListFromServerWithCompletion:(
void (^)(NSArray *aList,
EMError *aError))aCompletionBlock;
287 - (NSArray *)getBlackListFromServerWithError:(
EMError **)pError;
310 - (
EMError *)addUserToBlackList:(NSString *)aUsername
311 relationshipBoth:(BOOL)aBoth;
327 - (void)addUserToBlackList:(NSString *)aUsername
328 completion:(
void (^)(NSString *aUsername,
EMError *aError))aCompletionBlock;
349 - (
EMError *)removeUserFromBlackList:(NSString *)aUsername;
365 - (void)removeUserFromBlackList:(NSString *)aUsername
366 completion:(
void (^)(NSString *aUsername,
EMError *aError))aCompletionBlock;
387 - (
EMError *)acceptInvitationForUsername:(NSString *)aUsername;
412 - (
EMError *)declineInvitationForUsername:(NSString *)aUsername;
414 #pragma mark - Other platform 434 - (NSArray *)getSelfIdsOnOtherPlatformWithError:(
EMError **)pError;
450 - (void)getSelfIdsOnOtherPlatformWithCompletion:(
void (^)(NSArray *aList,
EMError *aError))aCompletionBlock;
452 #pragma mark - EM_DEPRECATED_IOS 3.2.3 467 #pragma mark - EM_DEPRECATED_IOS < 3.2.3 509 - (void)asyncGetContactsFromServer:(
void (^)(NSArray *aList))aSuccessBlock
510 failure:(
void (^)(
EMError *aError))aFailureBlock __deprecated_msg("Use -getContactsFromServerWithCompletion:");
530 - (void)asyncAddContact:(NSString *)aUsername
531 message:(NSString *)aMessage
532 success:(
void (^)())aSuccessBlock
533 failure:(
void (^)(
EMError *aError))aFailureBlock __deprecated_msg("Use -addContact:message:completion:");
554 - (
EMError *)deleteContact:(NSString *)aUsername __deprecated_msg("Use -deleteContact:username:isDeleteConversation:");
571 - (void)deleteContact:(NSString *)aUsername
572 completion:(
void (^)(NSString *aUsername,
EMError *aError))aCompletionBlock __deprecated_msg("Use -deleteContact:username:isDeleteConversation:");
590 - (void)asyncDeleteContact:(NSString *)aUsername
591 success:(
void (^)())aSuccessBlock
592 failure:(
void (^)(
EMError *aError))aFailureBlock __deprecated_msg("Use -deleteContact:completion:");
608 - (void)asyncGetBlackListFromServer:(
void (^)(NSArray *aList))aSuccessBlock
609 failure:(
void (^)(
EMError *aError))aFailureBlock __deprecated_msg("Use -getBlackListFromServerWithCompletion:");
629 - (void)asyncAddUserToBlackList:(NSString *)aUsername
630 relationshipBoth:(BOOL)aBoth
631 success:(
void (^)())aSuccessBlock
632 failure:(
void (^)(
EMError *aError))aFailureBlock __deprecated_msg("Use -addUserToBlackList:completion:");
650 - (void)asyncRemoveUserFromBlackList:(NSString *)aUsername
651 success:(
void (^)())aSuccessBlock
652 failure:(
void (^)(
EMError *aError))aFailureBlock __deprecated_msg("Use -removeUserFromBlackList:completion:");
670 - (void)asyncAcceptInvitationForUsername:(NSString *)aUsername
671 success:(
void (^)())aSuccessBlock
672 failure:(
void (^)(
EMError *aError))aFailureBlock __deprecated_msg("Use -approveFriendRequestFromUser:completion:");
690 - (void)asyncDeclineInvitationForUsername:(NSString *)aUsername
691 success:(
void (^)())aSuccessBlock
692 failure:(
void (^)(
EMError *aError))aFailureBlock __deprecated_msg("Use -declineFriendRequestFromUser:completion:");