Easemob Windows SDK
Public Member Functions | List of all members
easemob::EMContactManagerInterface Class Referenceabstract
Collaboration diagram for easemob::EMContactManagerInterface:
Collaboration graph

Public Member Functions

virtual void registerContactListener (EMContactListener *listener)=0
 register contact status change listener More...
 
virtual void removeContactListener (EMContactListener *listener)=0
 remove registration of contact status change listener More...
 
virtual std::vector< std::string > allContacts (EMError &error)=0
 retrieve current user's friend list from server. More...
 
virtual std::vector< std::string > getContactsFromServer (EMError &error)=0
 retrieve current user's friend list from server. More...
 
virtual std::vector< std::string > getContactsFromDB (EMError &error)=0
 retrieve current user's friend list from local database. More...
 
virtual void inviteContact (const std::string &username, const std::string &message, EMError &error)=0
 invite contact to be friend, need contact accept. More...
 
virtual void deleteContact (const std::string &username, EMError &error)=0
 delete contact from contact list. contact part will auto be removed friend relationship. More...
 
virtual void acceptInvitation (const std::string &username, EMError &error)=0
 accept contact's invitation More...
 
virtual void declineInvitation (const std::string &username, EMError &error)=0
 decline contact's invitation More...
 
virtual std::vector< std::string > blacklist (EMError &error)=0
 retrieve black list from memory More...
 
virtual std::vector< std::string > getBlackListFromServer (EMError &error)=0
 retrieve black list from server More...
 
virtual std::vector< std::string > getBlackListFromDB (EMError &error)=0
 retrieve black list from local database More...
 
virtual void saveBlackList (const std::vector< std::string > &blacklist, EMError &error)=0
 save black list. More...
 
virtual void addToBlackList (std::string username, bool both, EMError &error)=0
 add contact to blacklist More...
 
virtual void removeFromBlackList (std::string username, EMError &error)=0
 remove contact from black list More...
 

Member Function Documentation

§ acceptInvitation()

virtual void easemob::EMContactManagerInterface::acceptInvitation ( const std::string &  username,
EMError error 
)
pure virtual

accept contact's invitation

Parameters
usernamecontact who initiate invitation.

§ addToBlackList()

virtual void easemob::EMContactManagerInterface::addToBlackList ( std::string  username,
bool  both,
EMError error 
)
pure virtual

add contact to blacklist

Note: sync operation new item will updated to remote server, and also update local database.

Parameters
usernamecontact to be added to blacklist
bothwhether both side will be blocked, if true user also can not subscribe contact's presense. both = false is not work yet, current behaviour is both side conmunication will be blocded.

§ allContacts()

virtual std::vector<std::string> easemob::EMContactManagerInterface::allContacts ( EMError error)
pure virtual

retrieve current user's friend list from server.

Returns
contact list

§ blacklist()

virtual std::vector<std::string> easemob::EMContactManagerInterface::blacklist ( EMError error)
pure virtual

retrieve black list from memory

Returns
black list of current user, contacts in the block list can not send message or inviation to user

§ declineInvitation()

virtual void easemob::EMContactManagerInterface::declineInvitation ( const std::string &  username,
EMError error 
)
pure virtual

decline contact's invitation

Parameters
usernamecontact who initiate invitation.

§ deleteContact()

virtual void easemob::EMContactManagerInterface::deleteContact ( const std::string &  username,
EMError error 
)
pure virtual

delete contact from contact list. contact part will auto be removed friend relationship.

Parameters
usernamecontact to be invited.

§ getBlackListFromDB()

virtual std::vector<std::string> easemob::EMContactManagerInterface::getBlackListFromDB ( EMError error)
pure virtual

retrieve black list from local database

Returns
black list of current user which stored in local database.

§ getBlackListFromServer()

virtual std::vector<std::string> easemob::EMContactManagerInterface::getBlackListFromServer ( EMError error)
pure virtual

retrieve black list from server

Note: sync operation. returned result will also be updated in database.

Returns
black list of current user, contacts in the block list can not send message or inviation to user

§ getContactsFromDB()

virtual std::vector<std::string> easemob::EMContactManagerInterface::getContactsFromDB ( EMError error)
pure virtual

retrieve current user's friend list from local database.

Returns
contact list

§ getContactsFromServer()

virtual std::vector<std::string> easemob::EMContactManagerInterface::getContactsFromServer ( EMError error)
pure virtual

retrieve current user's friend list from server.

Returns
contact list

§ inviteContact()

virtual void easemob::EMContactManagerInterface::inviteContact ( const std::string &  username,
const std::string &  message,
EMError error 
)
pure virtual

invite contact to be friend, need contact accept.

Parameters
usernamecontact to be invited.
messagecontact will receive the message when got invitation.

§ registerContactListener()

virtual void easemob::EMContactManagerInterface::registerContactListener ( EMContactListener listener)
pure virtual

register contact status change listener

Parameters
listenercontact status change listener

§ removeContactListener()

virtual void easemob::EMContactManagerInterface::removeContactListener ( EMContactListener listener)
pure virtual

remove registration of contact status change listener

Parameters
listenercontact status change listener

§ removeFromBlackList()

virtual void easemob::EMContactManagerInterface::removeFromBlackList ( std::string  username,
EMError error 
)
pure virtual

remove contact from black list

Note: sync operation new item will updated to remote server, and also update local database.

Parameters
usernamecontact to be removed from blacklist

§ saveBlackList()

virtual void easemob::EMContactManagerInterface::saveBlackList ( const std::vector< std::string > &  blacklist,
EMError error 
)
pure virtual

save black list.

Note: sync operation. black list will be sent to server and local database will also updated.

Parameters
blacklistcontacts in the block list can not send message inviation to user

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