Easemob Windows SDK
|
#include <emclient.h>
Public Member Functions | |
EMErrorPtr | login (const std::string &username, const std::string &password) |
Login with user name and password. More... | |
void | logout () |
Logout current user. More... | |
const EMLoginInfo & | getLoginInfo () |
Get info of current logoin user. More... | |
void | addConnectionListener (EMConnectionListener *) |
register connection listener. More... | |
void | removeConnectionListener (EMConnectionListener *) |
remove connection listener. More... | |
EMErrorPtr | createAccount (const std::string &username, const std::string &password) |
Register a new account with user name and password. More... | |
EMChatConfigsPtr | getChatConfigs () |
get the chat configs. More... | |
EMChatManagerInterface & | getChatManager () |
Get chat manager to handle the message operation. More... | |
EMContactManagerInterface & | getContactManager () |
Get contact manager to manage the contacts. More... | |
EMGroupManagerInterface & | getGroupManager () |
Get group manager to manage the group. More... | |
EMChatroomManagerInterface & | getChatroomManager () |
Get chatroom manager to manage the chatroom. More... | |
virtual void | onNetworkChanged (EMNetworkListener::EMNetworkType to) |
Get call manager to handle the voice/video call. More... | |
void | reconnect () |
void | disconnect () |
void | onConnect () |
void | onDisconnect (EMErrorPtr error) |
void | onPong () |
Static Public Member Functions | |
static EMClient * | create (const EMChatConfigsPtr configs) |
Get the chat client with configs. More... | |
Additional Inherited Members | |
![]() | |
enum | EMNetworkType { NONE, CABLE, WIFI, MOBILE } |
Enjoy your IM journey!
Easemob Linux SDK is an SDK for you to create IM related applications on linux platform.
For your fast integration, here is an short guide.
Include emchatclient.h and call EMClient::create() to get your client, which is the start point of your IM.
Call register() to register a new account. Then you can call login() or logout() to login or logout.
Call getContactManager() to get contact manager to add/remove your contact.
Now you can call getChatManager() to chat with your friends.
That's it!
void easemob::EMClient::addConnectionListener | ( | EMConnectionListener * | ) |
register connection listener.
EMConnectionListenerPtr |
|
static |
Get the chat client with configs.
Note: Caller should delete the client when it is not used any more.
chat | configurations. |
EMErrorPtr easemob::EMClient::createAccount | ( | const std::string & | username, |
const std::string & | password | ||
) |
Register a new account with user name and password.
Note: Blocking and time consuming operation.
user | name and password |
EMChatConfigsPtr easemob::EMClient::getChatConfigs | ( | ) |
get the chat configs.
Note: NA.
NA |
EMChatManagerInterface& easemob::EMClient::getChatManager | ( | ) |
Get chat manager to handle the message operation.
NA |
EMChatroomManagerInterface& easemob::EMClient::getChatroomManager | ( | ) |
Get chatroom manager to manage the chatroom.
NA |
EMContactManagerInterface& easemob::EMClient::getContactManager | ( | ) |
Get contact manager to manage the contacts.
NA |
EMGroupManagerInterface& easemob::EMClient::getGroupManager | ( | ) |
Get group manager to manage the group.
NA |
const EMLoginInfo& easemob::EMClient::getLoginInfo | ( | ) |
Get info of current logoin user.
NA |
EMErrorPtr easemob::EMClient::login | ( | const std::string & | username, |
const std::string & | password | ||
) |
Login with user name and password.
Note: Blocking and time consuming operation.
void easemob::EMClient::logout | ( | ) |
Logout current user.
NA |
|
virtual |
Get call manager to handle the voice/video call.
Note: not release yet, coming soon
NA |
EMNetworkType |
Implements easemob::EMNetworkListener.
void easemob::EMClient::removeConnectionListener | ( | EMConnectionListener * | ) |
remove connection listener.
EMConnectionListenerPtr |