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

function getSDKConfig#

inline BMXSDKConfig getSDKConfig()

Get SDK settings

Return: BMXSDKConfigPtr

function getUserService#

inline BMXUserService getUserService()

Get user Service

Return: BMXUserService

function getChatService#

inline BMXChatService getChatService()

Get chat Service

Return: BMXChatService

function getGroupService#

inline BMXGroupService getGroupService()

Get group Service

Return: BMXGroupService

function getRosterService#

inline BMXRosterService getRosterService()

Get roster Service

Return: BMXRosterService

function getPushService#

inline BMXPushService getPushService()

Get push Service

Return: BMXPushService

function getUserManager#

inline BMXUserManager getUserManager()

Get user Manager

Return: BMXUserManager

function getChatManager#

inline BMXChatManager getChatManager()

Get chat Manager

Return: BMXChatManager

function getGroupManager#

inline BMXGroupManager getGroupManager()

Get group Manager

Return: BMXGroupManager

function getRosterManager#

inline BMXRosterManager getRosterManager()

Get roster Manager

Return: BMXRosterManager

function getPushManager#

inline BMXPushManager getPushManager()

Get push Manager

Return: BMXPushManager

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]

function signInByName#

inline BMXErrorCode signInByName(
    String name,
    String password
)

Login by username

Parameters:

  • name Username
  • password User password

Return: [BMXErrorCode]

function signInById#

inline BMXErrorCode signInById(
    long arg0,
    String password
)

Login by user ID

Parameters:

  • arg0 User id
  • password User password

Return: [BMXErrorCode]

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]

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]

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]

function signOut#

inline BMXErrorCode signOut(
    long uid
)

function signOut#

inline BMXErrorCode signOut()

function connectStatus#

inline BMXConnectStatus connectStatus()

Get the current connection state with server

Return: [BMXConnectStatus]

function signInStatus#

inline BMXSignInStatus signInStatus()

Get the current login state

Return: [BMXSignInStatus]

function reconnect#

inline void reconnect()

Force reconnection

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

function disconnect#

inline void disconnect()

Disconnect

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

function changeAppId#

inline BMXErrorCode changeAppId(
    String appId
)

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

Parameters:

  • appId Newly changed appId

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.

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

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#

function BMXClient#

inline BMXClient(
    long cPtr,
    boolean cMemoryOwn
)

function finalize#

inline void finalize()

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

function getCPtr#

static inline long getCPtr(
    BMXClient obj
)

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

Generated API content with concise AI notes where context helps.