LANYINGDevelopers
Web & Mini ProgramiOSAndroidC++Server API

im::floo::floolib::BMXClient#

Client

Inherits from im.floo.floolib.BMXNetworkListener

Public Functions#

Name
synchronized voiddelete()
BMXSDKConfiggetSDKConfig()
Get SDK settings
BMXUserServicegetUserService()
Get user Service
BMXChatServicegetChatService()
Get chat Service
BMXGroupServicegetGroupService()
Get group Service
BMXRosterServicegetRosterService()
Get roster Service
BMXPushServicegetPushService()
Get push Service
BMXUserManagergetUserManager()
Get user Manager
BMXChatManagergetChatManager()
Get chat Manager
BMXGroupManagergetGroupManager()
Get group Manager
BMXRosterManagergetRosterManager()
Get roster Manager
BMXPushManagergetPushManager()
Get push Manager
[BMXErrorCode]signUpNewUser(String username, String password, BMXUserProfile bmxUserProfilePtr)
To register a new user, username and password are required
[BMXErrorCode]signInByName(String name, String password)
Login by username
[BMXErrorCode]signInById(long arg0, String password)
Login by user ID
[BMXErrorCode]fastSignInByName(String name, String password)
Quick login by username (requires a successful previous login, faster login)
[BMXErrorCode]fastSignInById(long uid, String password)
Quick login by user ID (requires a successful previous login, faster login)
[BMXErrorCode]signOut(long uid, boolean ignoreUnbindDevice)
Log out
[BMXErrorCode]signOut(long uid)
[BMXErrorCode]signOut()
[BMXConnectStatus]connectStatus()
Get the current connection state with server
[BMXSignInStatus]signInStatus()
Get the current login state
voidreconnect()
Force reconnection
voidonNetworkChanged([BMXNetworkType] type, boolean reconnect)
Process network changes in messaging
voiddisconnect()
Disconnect
[BMXErrorCode]changeAppId(String appId, String appSecret)
Change the appId of SDK, which also update the appId in BMXConfig.
[BMXErrorCode]changeAppId(String appId)
Change the appId of SDK, which also update the appId in BMXConfig.
[BMXErrorCode]initializeServerConfig(boolean isLocal)
Get the server network configuration of app, which can be called after initializing SDK and before logging in, so as to get the server configuration in advance and speed up logging in.
voidsendMessage(BMXMessage msg)
When send a message, the change of message status will be notified by listener. In the case of sending a group message in a specified group with group read acknowledgement enabled, the interface will automatically obtain the group member list id and fill it in the message config, without the need for the client to fill the group member list by itself.
BMXClientcreate(BMXSDKConfig config)
Create BMXClient

Protected Functions#

Name
BMXClient(long cPtr, boolean cMemoryOwn)
voidfinalize()
longgetCPtr(BMXClient obj)

Additional inherited members#

Public Functions inherited from im.floo.floolib.BMXNetworkListener

Protected Functions inherited from im.floo.floolib.BMXNetworkListener

Name
BMXNetworkListener(long cPtr, boolean cMemoryOwn)
voidswigDirectorDisconnect()

Public Functions Documentation#

function delete#

inline synchronized void delete()

Reimplements: im::floo::floolib::BMXNetworkListener::delete

Example:

{% lanying_code_snippet repo="lanying-im-android",class="BMXClient",function="delete" %}{% endlanying_code_snippet %}

function getSDKConfig#

inline BMXSDKConfig getSDKConfig()

Get SDK settings

Return: BMXSDKConfigPtr

Example:

{% lanying_code_snippet repo="lanying-im-android",class="BMXClient",function="getSDKConfig" %}{% endlanying_code_snippet %}

function getUserService#

inline BMXUserService getUserService()

Get user Service

Return: BMXUserService

Example:

{% lanying_code_snippet repo="lanying-im-android",class="BMXClient",function="getUserService" %}{% endlanying_code_snippet %}

function getChatService#

inline BMXChatService getChatService()

Get chat Service

Return: BMXChatService

Example:

{% lanying_code_snippet repo="lanying-im-android",class="BMXClient",function="getChatService" %}{% endlanying_code_snippet %}

function getGroupService#

inline BMXGroupService getGroupService()

Get group Service

Return: BMXGroupService

Example:

{% lanying_code_snippet repo="lanying-im-android",class="BMXClient",function="getGroupService" %}{% endlanying_code_snippet %}

function getRosterService#

inline BMXRosterService getRosterService()

Get roster Service

Return: BMXRosterService

Example:

{% lanying_code_snippet repo="lanying-im-android",class="BMXClient",function="getRosterService" %}{% endlanying_code_snippet %}

function getPushService#

inline BMXPushService getPushService()

Get push Service

Return: BMXPushService

Example:

{% lanying_code_snippet repo="lanying-im-android",class="BMXClient",function="getPushService" %}{% endlanying_code_snippet %}

function getUserManager#

inline BMXUserManager getUserManager()

Get user Manager

Return: BMXUserManager

Example:

{% lanying_code_snippet repo="lanying-im-android",class="BMXClient",function="getUserManager" %}{% endlanying_code_snippet %}

function getChatManager#

inline BMXChatManager getChatManager()

Get chat Manager

Return: BMXChatManager

Example:

{% lanying_code_snippet repo="lanying-im-android",class="BMXClient",function="getChatManager" %}{% endlanying_code_snippet %}

function getGroupManager#

inline BMXGroupManager getGroupManager()

Get group Manager

Return: BMXGroupManager

Example:

{% lanying_code_snippet repo="lanying-im-android",class="BMXClient",function="getGroupManager" %}{% endlanying_code_snippet %}

function getRosterManager#

inline BMXRosterManager getRosterManager()

Get roster Manager

Return: BMXRosterManager

Example:

{% lanying_code_snippet repo="lanying-im-android",class="BMXClient",function="getRosterManager" %}{% endlanying_code_snippet %}

function getPushManager#

inline BMXPushManager getPushManager()

Get push Manager

Return: BMXPushManager

Example:

{% lanying_code_snippet repo="lanying-im-android",class="BMXClient",function="getPushManager" %}{% endlanying_code_snippet %}

function signUpNewUser#

inline BMXErrorCode signUpNewUser(
    String username,
    String password,
    BMXUserProfile bmxUserProfilePtr
)

To register a new user, username and password are required

Parameters:

  • username Username
  • password User password
  • bmxUserProfilePtr After successful registration, get the profile of the newly registered user from this function, and initially passed in a pointing-to-empty shared_ptr object.

Return: [BMXErrorCode]

Example:

{% lanying_code_snippet repo="lanying-im-android",class="BMXClient",function="signUpNewUser" %}{% endlanying_code_snippet %}

function signInByName#

inline BMXErrorCode signInByName(
    String name,
    String password
)

Login by username

Parameters:

  • name Username
  • password User password

Return: [BMXErrorCode]

Example:

{% lanying_code_snippet repo="lanying-im-android",class="BMXClient",function="signInByName" %}{% endlanying_code_snippet %}

function signInById#

inline BMXErrorCode signInById(
    long arg0,
    String password
)

Login by user ID

Parameters:

  • arg0 User id
  • password User password

Return: [BMXErrorCode]

Example:

{% lanying_code_snippet repo="lanying-im-android",class="BMXClient",function="signInById" %}{% endlanying_code_snippet %}

function fastSignInByName#

inline BMXErrorCode fastSignInByName(
    String name,
    String password
)

Quick login by username (requires a successful previous login, faster login)

Parameters:

  • name Username
  • password User password (for sdk to automatically update user token when internal token expires)

Return: [BMXErrorCode]

Example:

{% lanying_code_snippet repo="lanying-im-android",class="BMXClient",function="fastSignInByName" %}{% endlanying_code_snippet %}

function fastSignInById#

inline BMXErrorCode fastSignInById(
    long uid,
    String password
)

Quick login by user ID (requires a successful previous login, faster login)

Parameters:

  • uid User id
  • password User password (for sdk to automatically update user token when internal token expires)

Return: [BMXErrorCode]

Example:

{% lanying_code_snippet repo="lanying-im-android",class="BMXClient",function="fastSignInById" %}{% endlanying_code_snippet %}

function signOut#

inline BMXErrorCode signOut(
    long uid,
    boolean ignoreUnbindDevice
)

Log out

Parameters:

  • uid UID of logged out user (default 0 to logout the current user)
  • ignoreUnbindDevice Whether the unbind device operation is ignored when the user logout. Set to true when server's unbinding device operation is ignored and forced to logout directly when some servers are inaccessible.

Return: [BMXErrorCode]

Example:

{% lanying_code_snippet repo="lanying-im-android",class="BMXClient",function="signOut" %}{% endlanying_code_snippet %}

function signOut#

inline BMXErrorCode signOut(
    long uid
)

Example:

{% lanying_code_snippet repo="lanying-im-android",class="BMXClient",function="signOut" %}{% endlanying_code_snippet %}

function signOut#

inline BMXErrorCode signOut()

Example:

{% lanying_code_snippet repo="lanying-im-android",class="BMXClient",function="signOut" %}{% endlanying_code_snippet %}

function connectStatus#

inline BMXConnectStatus connectStatus()

Get the current connection state with server

Return: [BMXConnectStatus]

Example:

{% lanying_code_snippet repo="lanying-im-android",class="BMXClient",function="connectStatus" %}{% endlanying_code_snippet %}

function signInStatus#

inline BMXSignInStatus signInStatus()

Get the current login state

Return: [BMXSignInStatus]

Example:

{% lanying_code_snippet repo="lanying-im-android",class="BMXClient",function="signInStatus" %}{% endlanying_code_snippet %}

function reconnect#

inline void reconnect()

Force reconnection

Example:

{% lanying_code_snippet repo="lanying-im-android",class="BMXClient",function="reconnect" %}{% endlanying_code_snippet %}

function onNetworkChanged#

inline void onNetworkChanged(
    BMXNetworkType type,
    boolean reconnect
)

Process network changes in messaging

Parameters:

  • type Changed network type
  • reconnect Network needs to reconnect or not

Reimplements: im::floo::floolib::BMXNetworkListener::onNetworkChanged

Example:

{% lanying_code_snippet repo="lanying-im-android",class="BMXClient",function="onNetworkChanged" %}{% endlanying_code_snippet %}

function disconnect#

inline void disconnect()

Disconnect

Example:

{% lanying_code_snippet repo="lanying-im-android",class="BMXClient",function="disconnect" %}{% endlanying_code_snippet %}

function changeAppId#

inline BMXErrorCode changeAppId(
    String appId,
    String appSecret
)

Change the appId of SDK, which also update the appId in BMXConfig.

Parameters:

  • appId Newly changed appId
  • appSecret Newly changed appSecret

Example:

{% lanying_code_snippet repo="lanying-im-android",class="BMXClient",function="changeAppId" %}{% endlanying_code_snippet %}

function changeAppId#

inline BMXErrorCode changeAppId(
    String appId
)

Change the appId of SDK, which also update the appId in BMXConfig.

Parameters:

  • appId Newly changed appId

Example:

{% lanying_code_snippet repo="lanying-im-android",class="BMXClient",function="changeAppId" %}{% endlanying_code_snippet %}

function initializeServerConfig#

inline BMXErrorCode initializeServerConfig(
    boolean isLocal
)

Get the server network configuration of app, which can be called after initializing SDK and before logging in, so as to get the server configuration in advance and speed up logging in.

Parameters:

  • isLocal True to use locally cached DNS configuration, false to get the latest configuration from server.

Example:

{% lanying_code_snippet repo="lanying-im-android",class="BMXClient",function="initializeServerConfig" %}{% endlanying_code_snippet %}

function sendMessage#

inline void sendMessage(
    BMXMessage msg
)

When send a message, the change of message status will be notified by listener. In the case of sending a group message in a specified group with group read acknowledgement enabled, the interface will automatically obtain the group member list id and fill it in the message config, without the need for the client to fill the group member list by itself.

Parameters:

  • msg Message to be sent

Example:

{% lanying_code_snippet repo="lanying-im-android",class="BMXClient",function="sendMessage" %}{% endlanying_code_snippet %}

function create#

static inline BMXClient create(
    BMXSDKConfig config
)

Create BMXClient

Parameters:

  • config BMXSDKConfig SDK configuration object created by local client-side already

Return: BMXClientPtr

Protected Functions Documentation#

Example:

{% lanying_code_snippet repo="lanying-im-android",class="BMXClient",function="create" %}{% endlanying_code_snippet %}

function BMXClient#

inline BMXClient(
    long cPtr,
    boolean cMemoryOwn
)

Example:

{% lanying_code_snippet repo="lanying-im-android",class="BMXClient",function="BMXClient" %}{% endlanying_code_snippet %}

function finalize#

inline void finalize()

Reimplements: im::floo::floolib::BMXNetworkListener::finalize

Example:

{% lanying_code_snippet repo="lanying-im-android",class="BMXClient",function="finalize" %}{% endlanying_code_snippet %}

function getCPtr#

static inline long getCPtr(
    BMXClient obj
)

Example:

{% lanying_code_snippet repo="lanying-im-android",class="BMXClient",function="getCPtr" %}{% endlanying_code_snippet %}

Updated on 2022-01-26 at 17:18:31 +0800

Generated API content with concise AI notes where context helps.