LANYINGDevelopers
Web & Mini ProgramiOSAndroidC++Server API

floo::BMXSDKConfig#

SDK settings management

#include <bmx_sdk_config.h>

Public Functions#

Name
BMXSDKConfig(BMXClientType type, const std::string & vsn, const std::string & dataDir, const std::string & cacheDir, const std::string & SDKVersion, const std::string & pushCertName, const std::string & userAgent, bool deliveryAck =false)
Constructor
BMXSDKConfig(BMXClientType type, const std::string & vsn, const std::string & dataDir, const std::string & cacheDir, const std::string & SDKVersion, const std::string & pushCertName, const std::string & userAgent, const std::string & appId, const std::string & appSecret, bool deliveryAck =false)
Constructor
virtual~BMXSDKConfig()
Destructor
const std::string &getDataDir()
Get storage path of chat data, including messages, attachments, and more
const std::string &getCacheDir()
Get storage path of cached data, including user avatar and more
BMXClientTypegetClientType()
Client type
const std::string &getVsn()
Client OS version
const std::string &getSDKVersion()
SDK version
const std::string &getPushCertName()
Get Push certificate name
voidsetPushCertName(const std::string & )
Set Push certificate name
const std::string &getUserAgent()
Get user proxy information
boolcarryUsernameInMessage()
Whether the config sends message carrying
voidsetCarryUsernameInMessage(bool )
Set whether the config sends message carrying username
boolenableDeliveryAck()
Whether to send message delivery acknowledgement
voidsetEnableDeliveryAck(bool )
Set whether to send message delivery acknowledgement
BMXLogLevelgetLogLevel()
Log output level
voidsetLogLevel(BMXLogLevel )
Set Log output level
boolgetConsoleOutput()
Whether to output Log to Console.
voidsetConsoleOutput(bool )
Set whether to output Log to Console
voidsetHostConfig(const [HostConfig] & config)
Set server configuration
const [HostConfig] &getHostConfig()
Get server configuration
boolgetLoadAllServerConversations()
Whether to create all conversations based on the unread list returned by server.
voidsetLoadAllServerConversations(bool enable =false)
Whether to create all conversations based on the unread list returned by server, default false to create conversations with unread only.
const std::string &getDeviceUuid()
Get the unique identifier of device
voidsetDeviceUuid(const std::string & uuid)
Set the unique ID of the device, which should always be consistent before the app is uninstalled. Different device IDs can be generated when the app is deleted and installed again.
const std::string &getDBCryptoKey()
Get the local database encryption key for the device.
voidsetDBCryptoKey(const std::string & cryptoKey)
Set the encryption key of the local database, which should always be kept until the app is uninstalled, and a different key can be generated when the app is deleted and installed again. Used for local database encryption.
boolgetVerifyCertificate()
Whether need to verify server-side certificate when get https request.
voidsetVerifyCertificate(bool verify =true)
Set whether https request verify server-side certificate.
boolgetEnableDNS()
Whether to enable dns function for get.
voidsetEnableDNS(bool enable =true)
Set whether to enable dns function for get, default enabled.
std::stringgetUserDNSAddress()
Get user-defined dns server address.
voidsetUserDNSAddress(const std::string & dns)
Set user-defined dns server address, preferring user dns if dns server has been set.
std::stringgetAppID()
Get user's appID.
voidsetAppID(const std::string & appID)
Set user's appID.
std::stringgetAppSecret()
Get user's appSecret.
voidsetAppSecret(const std::string & appSecret)
Set user's appSecret.
BMXPushProviderTypegetPushProviderType()
Get user's Push provider type.
voidsetPushProviderType(BMXPushProviderType type)
Set user's Push provider type.
BMXPushEnvironmentTypegetPushEnvironmentType()
Get user's Push environment type.
voidsetEnvironmentType(BMXPushEnvironmentType type)
Set user's Push environment type.
int64_tgetDebugLogReceiverId()
Get debug log receiving account (for SDK debugging only, used for receiving client log)
voidsetDebugLogReceiverId(int64_t uid)
Set debug log receiving account (for SDK debugging only, used for receiving client log)

Public Functions Documentation#

function BMXSDKConfig#

BMXSDKConfig(
    BMXClientType type,
    const std::string & vsn,
    const std::string & dataDir,
    const std::string & cacheDir,
    const std::string & SDKVersion,
    const std::string & pushCertName,
    const std::string & userAgent,
    bool deliveryAck =false
)

Constructor

Parameters:

  • type Client type
  • vsn Client OS version
  • dataDir Storage path of chat data
  • cacheDir Storage path of cached data
  • SDKVersion SDK version
  • pushCertName Push certificate name
  • userAgent User agent information
  • deliveryAck Whether to send message delivery acknowledgement

function BMXSDKConfig#

BMXSDKConfig(
    BMXClientType type,
    const std::string & vsn,
    const std::string & dataDir,
    const std::string & cacheDir,
    const std::string & SDKVersion,
    const std::string & pushCertName,
    const std::string & userAgent,
    const std::string & appId,
    const std::string & appSecret,
    bool deliveryAck =false
)

Constructor

Parameters:

  • type Client type
  • vsn Client OS version
  • dataDir Storage path of chat data
  • cacheDir Storage path of cached data
  • SDKVersion SDK version
  • pushCertName Push certificate name
  • userAgent User agent information
  • appId User's appId
  • appSecret User's appSecret (for users using push, both appId and appSecret must be set)
  • deliveryAck Whether to send message delivery acknowledgement

function ~BMXSDKConfig#

virtual ~BMXSDKConfig()

Destructor

function getDataDir#

const std::string & getDataDir()

Get storage path of chat data, including messages, attachments, and more

Return: std::string

function getCacheDir#

const std::string & getCacheDir()

Get storage path of cached data, including user avatar and more

Return: std::string

function getClientType#

BMXClientType getClientType()

Client type

Return: BMXClientType

function getVsn#

const std::string & getVsn()

Client OS version

Return: std::string

function getSDKVersion#

const std::string & getSDKVersion()

SDK version

Return: std::string

function getPushCertName#

const std::string & getPushCertName()

Get Push certificate name

Return: std::string

function setPushCertName#

void setPushCertName(
    const std::string & 
)

Set Push certificate name

Return: std::string

function getUserAgent#

const std::string & getUserAgent()

Get user proxy information

Return: std::string

function carryUsernameInMessage#

bool carryUsernameInMessage()

Whether the config sends message carrying

Return: bool

function setCarryUsernameInMessage#

void setCarryUsernameInMessage(
    bool 
)

Set whether the config sends message carrying username

Parameters:

  • bool Set whether the config sends message carrying username

function enableDeliveryAck#

bool enableDeliveryAck()

Whether to send message delivery receipts

Return: bool

function setEnableDeliveryAck#

void setEnableDeliveryAck(
    bool 
)

Set whether to send message delivery acknowledgement

Parameters:

  • bool Whether to send message delivery acknowledgement

function getLogLevel#

BMXLogLevel getLogLevel()

Log level

Return: BMXLogLevel

function setLogLevel#

void setLogLevel(
    BMXLogLevel 
)

Set Log output level

Parameters:

  • BMXLogLevel Log output level

function getConsoleOutput#

bool getConsoleOutput()

Whether to output Log to Console.

Return: bool

function setConsoleOutput#

void setConsoleOutput(
    bool 
)

Whether to write logs to the console

Parameters:

  • bool Set whether to output Log to Console

function setHostConfig#

void setHostConfig(
    const HostConfig & config
)

Set server configuration

Parameters:

  • config Server configuration

function getHostConfig#

const HostConfig & getHostConfig()

Get server configuration

Return: [HostConfig]

function getLoadAllServerConversations#

bool getLoadAllServerConversations()

Whether to create all conversations based on the unread list returned by server.

Return: bool

function setLoadAllServerConversations#

void setLoadAllServerConversations(
    bool enable =false
)

Whether to create all conversations based on the unread list returned by server, default false to create conversations with unread only.

Parameters:

  • enable Whether to create all conversations based on the unread list returned by server

function getDeviceUuid#

const std::string & getDeviceUuid()

Get the unique identifier of device

Return: std::string

function setDeviceUuid#

void setDeviceUuid(
    const std::string & uuid
)

Set the unique ID of the device, which should always be consistent before the app is uninstalled. Different device IDs can be generated when the app is deleted and installed again.

Parameters:

  • uuid Unique identifier of device.

function getDBCryptoKey#

const std::string & getDBCryptoKey()

Get the local database encryption key for the device.

Return: std::string

function setDBCryptoKey#

void setDBCryptoKey(
    const std::string & cryptoKey
)

Set the encryption key of the local database, which should always be kept until the app is uninstalled, and a different key can be generated when the app is deleted and installed again. Used for local database encryption.

Parameters:

  • cryptoKey Local database encryption key.

function getVerifyCertificate#

bool getVerifyCertificate()

Whether need to verify server-side certificate when get https request.

Return: bool

function setVerifyCertificate#

void setVerifyCertificate(
    bool verify =true
)

Set whether https request verify server-side certificate.

Parameters:

  • verify Whether https request verify server-side certificate

function getEnableDNS#

bool getEnableDNS()

Whether to enable dns function for get.

Return: bool

function setEnableDNS#

void setEnableDNS(
    bool enable =true
)

Set whether to enable dns function for get, default enabled.

Parameters:

  • enable Whether to enable dns function

function getUserDNSAddress#

std::string getUserDNSAddress()

Get user-defined dns server address.

Return: std::string

function setUserDNSAddress#

void setUserDNSAddress(
    const std::string & dns
)

Set user-defined dns server address, preferring user dns if dns server has been set.

Parameters:

  • dns User-defined dns server address

function getAppID#

std::string getAppID()

Get user's appID.

Return: std::string

function setAppID#

void setAppID(
    const std::string & appID
)

Set user's appID.

Parameters:

  • appID User's appID

function getAppSecret#

std::string getAppSecret()

Get user's appSecret.

Return: std::string

function setAppSecret#

void setAppSecret(
    const std::string & appSecret
)

Set user's appSecret.

Parameters:

  • appID User's appSecret

function getPushProviderType#

BMXPushProviderType getPushProviderType()

Get user's Push provider type.

Return: BMXPushProviderType

function setPushProviderType#

void setPushProviderType(
    BMXPushProviderType type
)

Set user's Push provider type.

Parameters:

  • type User's push provider type

function getPushEnvironmentType#

BMXPushEnvironmentType getPushEnvironmentType()

Get user's Push environment type.

Return: BMXPushEnvironmentType

function setEnvironmentType#

void setEnvironmentType(
    BMXPushEnvironmentType type
)

Set user's Push environment type.

Parameters:

  • type User's push environment type

function getDebugLogReceiverId#

int64_t getDebugLogReceiverId()

Get debug log receiving account (for SDK debugging only, used for receiving client log)

Return: int64_t

function setDebugLogReceiverId#

void setDebugLogReceiverId(
    int64_t uid
)

Set debug log receiving account (for SDK debugging only, used for receiving client log)

Parameters:

  • uid Debug log receiver id

Updated on 2022-01-26 at 17:20:40 +0800

Generated API content with concise AI notes where context helps.