HyphenateSDK  3.1.4
Instance Methods | List of all members
<IEMContactManager> Protocol Reference

#import <IEMContactManager.h>

Inheritance diagram for <IEMContactManager>:

Instance Methods

(void) - addDelegate:delegateQueue:
 
(void) - removeDelegate:
 
(NSArray *) - getContacts
 
(NSArray *) - getContactsFromDB
 
(NSArray *) - getBlackList
 
(NSArray *) - getBlackListFromDB
 
(NSArray *) - getContactsFromServerWithError:
 
(EMError *) - addContact:message:
 
(EMError *) - deleteContact:
 
(NSArray *) - getBlackListFromServerWithError:
 
(EMError *) - addUserToBlackList:relationshipBoth:
 
(EMError *) - removeUserFromBlackList:
 
(EMError *) - acceptInvitationForUsername:
 
(EMError *) - declineInvitationForUsername:
 
(void) - asyncGetContactsFromServer:failure:
 
(void) - asyncAddContact:message:success:failure:
 
(void) - asyncDeleteContact:success:failure:
 
(void) - asyncGetBlackListFromServer:failure:
 
(void) - asyncAddUserToBlackList:relationshipBoth:success:failure:
 
(void) - asyncRemoveUserFromBlackList:success:failure:
 
(void) - asyncAcceptInvitationForUsername:success:failure:
 
(void) - asyncDeclineInvitationForUsername:success:failure:
 

Detailed Description

Operations of contact

Method Documentation

- (EMError *) acceptInvitationForUsername: (NSString *)  aUsername
required

Agree invitation

Synchronization method will block the current thread

Parameters
aUsernameApplicants
Returns
Error
- (EMError *) addContact: (NSString *)  aUsername
message: (NSString *)  aMessage 
required

Add a contact

Synchronization method will block the current thread

Parameters
aUsernameThe user to add
aMessageFriend invitation message
Returns
Error
- (void) addDelegate: (id< EMContactManagerDelegate >)  aDelegate
delegateQueue: (dispatch_queue_t)  aQueue 
required

Add delegate

Parameters
aDelegateDelegate
aQueueThe queue of call delegate method
- (EMError *) addUserToBlackList: (NSString *)  aUsername
relationshipBoth: (BOOL)  aBoth 
required

Add user to blacklist

Synchronization method will block the current thread

Parameters
aUsernameThe user to add
aBothWhether block messages from me to the user which is added to the black list
Returns
Error
- (void) asyncAcceptInvitationForUsername: (NSString *)  aUsername
success: (void(^)())  aSuccessBlock
failure: (void(^)(EMError *aError))  aFailureBlock 
required

Agree invitation

Parameters
aUsernameApplicants
aSuccessBlockThe callback block of success
aFailureBlockThe callback block of failure
- (void) asyncAddContact: (NSString *)  aUsername
message: (NSString *)  aMessage
success: (void(^)())  aSuccessBlock
failure: (void(^)(EMError *aError))  aFailureBlock 
required

Add a contact

Parameters
aUsernameThe user to add
aMessageFriend invitation message
aSuccessBlockThe callback block of success
aFailureBlockThe callback block of failure
- (void) asyncAddUserToBlackList: (NSString *)  aUsername
relationshipBoth: (BOOL)  aBoth
success: (void(^)())  aSuccessBlock
failure: (void(^)(EMError *aError))  aFailureBlock 
required

Add user to blacklist

Parameters
aUsernameThe user to add
aBothWhether block messages from me to the user which is added to the black list
aSuccessBlockThe callback block of success
aFailureBlockThe callback block of failure
- (void) asyncDeclineInvitationForUsername: (NSString *)  aUsername
success: (void(^)())  aSuccessBlock
failure: (void(^)(EMError *aError))  aFailureBlock 
required

Decline invitation

Parameters
aUsernameApplicants
aSuccessBlockThe callback block of success
aFailureBlockThe callback block of failure
- (void) asyncDeleteContact: (NSString *)  aUsername
success: (void(^)())  aSuccessBlock
failure: (void(^)(EMError *aError))  aFailureBlock 
required

Delete friend

Parameters
aUsernameThe user to delete
aSuccessBlockThe callback block of success
aFailureBlockThe callback block of failure
- (void) asyncGetBlackListFromServer: (void(^)(NSArray *aList))  aSuccessBlock
failure: (void(^)(EMError *aError))  aFailureBlock 
required

Get the blacklist from the server

Parameters
aSuccessBlockThe callback block of success
aFailureBlockThe callback block of failure
- (void) asyncGetContactsFromServer: (void(^)(NSArray *aList))  aSuccessBlock
failure: (void(^)(EMError *aError))  aFailureBlock 
required

Get all the friends from the server

Parameters
aSuccessBlockThe callback block of success
aFailureBlockThe callback block of failure
- (void) asyncRemoveUserFromBlackList: (NSString *)  aUsername
success: (void(^)())  aSuccessBlock
failure: (void(^)(EMError *aError))  aFailureBlock 
required

Remove user from blacklist

Parameters
aUsernameThe user to remove from blacklist
aSuccessBlockThe callback block of success
aFailureBlockThe callback block of failure
- (EMError *) declineInvitationForUsername: (NSString *)  aUsername
required

Decline invitation

Synchronization method will block the current thread

Parameters
aUsernameApplicants
Returns
Error
- (EMError *) deleteContact: (NSString *)  aUsername
required

Delete friend

Synchronization method will block the current thread

Parameters
aUsernameThe user to delete
Returns
Error
- (NSArray *) getBlackList
required

Get the blacklist from memory

Returns
Blacklist<EMGroup>
- (NSArray *) getBlackListFromDB
required

Get the blacklist from the DB

Returns
Blacklist<NSString>
- (NSArray *) getBlackListFromServerWithError: (EMError **)  pError
required

Get the blacklist from the server

Synchronization method will block the current thread

Parameters
pErrorError
Returns
Blacklist<NSString>
- (NSArray *) getContacts
required

Get all friends from memory

Returns
Contact list<EMGroup>
- (NSArray *) getContactsFromDB
required

Get all the friends from the DB

Returns
Contact list<NSString>
- (NSArray *) getContactsFromServerWithError: (EMError **)  pError
required

Get all the friends from the server

Synchronization method will block the current thread

Parameters
pErrorError
Returns
Contact list<NSString>
- (void) removeDelegate: (id)  aDelegate
required

Remove delegate

Parameters
aDelegateDelegate
- (EMError *) removeUserFromBlackList: (NSString *)  aUsername
required

Remove user from blacklist

Synchronization method will block the current thread

Parameters
aUsernameThe user to remove from blacklist
Returns
Error

The documentation for this protocol was generated from the following file: