Local
local_get_ios_notification_sound
Returns the setting indicating which sound should play when receiving a notification on iOS.
Declaration
Parameters
conf
— [in] Pointer to the config object
Returns
int64_t
— enum indicating the sound that should be played when receiving a notification on iOS.
local_get_notification_content
Returns the locally stored setting indicating what notification content should be displayed.
Declaration
Parameters
conf
— [in] Pointer to the config object
Returns
CLIENT_NOTIFY_CONTENT
— enum indicating the content that should be shown within a notification.
local_get_setting
Returns the setting for the provided key.
Declaration
Parameters
conf
— [in] Pointer to the config objectkey
— [in] Pointer to the key as a null-terminated C string
Returns
int
— Will be -1 if the config does not have the value explicitly set, 0 if the setting is explicitly disabled, and 1 if the setting is explicitly enabled.
local_get_theme
Returns the setting indicating which theme the client should use.
Declaration
Parameters
conf
— [in] Pointer to the config object
Returns
CLIENT_THEME
— enum indicating which theme the client should use.
local_get_theme_primary_color
Returns the setting indicating which primary color the client should use.
Declaration
Parameters
conf
— [in] Pointer to the config object
Returns
CLIENT_THEME
— enum indicating which primary color the client should use.
local_init
Constructs a local config object and sets a pointer to it in conf
.
When done with the object the config_object
must be destroyed by passing the pointer to
config_free() (in session/config/base.h
).
Declaration
INT local_init(
[out] config_object** conf,
[in] const unsigned char* ed25519_secretkey,
[in] const unsigned char* dump,
[in] size_t dumplen,
[out] char* error
);
Parameters
conf
— [in] Pointer to the config objected25519_secretkey
— [in] must be the 32-byte secret key seed value. (You can also pass the pointer to the beginning of the 64-byte value libsodium calls the "secret key" as the first 32 bytes of that are the seed). This field cannot be null.dump
— [in] if non-NULL this restores the state from the dumped byte string produced by a past instantiation's call todump()
. To construct a new, empty profile this should be NULL.dumplen
— [in] the length ofdump
when restoring from a dump, or 0 whendump
is NULL.error
— [out] the pointer to a buffer in which we will write an error string if an error occurs; error messages are discarded if this is given as NULL. If non-NULL this must be a buffer of at least 256 bytes.
Returns
int
— Returns 0 on success; returns a non-zero error code and write the exception message as a C-string intoerror
(if not NULL) on failure.
local_set_ios_notification_sound
Sets the setting indicating which sound should be played when receiving receiving a notification on iOS.
Declaration
Parameters
conf
— [in] Pointer to the config objectvalue
— [in] Updated notification sound setting
Returns
void
— Returns Nothing
local_set_notification_content
Sets the setting indicating what notification content should be displayed.
Declaration
void local_set_notification_content(
[in] const config_object* conf
[in[ CLIENT_NOTIFY_CONTENT value
);
Parameters
conf
— [in] Pointer to the config objectvalue
— [in] Updated notification content setting
Returns
void
— Returns Nothing
local_set_setting
Sets a setting for the provided key.
Declaration
Parameters
conf
— [in] Pointer to the config objectkey
— [in] Pointer to the key as a null-terminated C stringenabled
— [in] the value which should be stored
Returns
void
— Returns Nothing
local_set_theme
Sets the setting indicating which theme the client should use.
Declaration
Parameters
conf
— [in] Pointer to the config objectvalue
— [in] Updated theme setting
Returns
void
— Returns Nothing
local_set_theme_primary_color
Sets the setting indicating which primary color the client should use.
Declaration
void local_set_theme_primary_color(
[in] const config_object* conf
[in[ CLIENT_THEME_PRIMARY_COLOR value
);
Parameters
conf
— [in] Pointer to the config objectvalue
— [in] Updated primary color setting
Returns
void
— Returns Nothing
local_size_settings
Returns the number of settings.
Declaration
Parameters
conf
— [in] Pointer to config_object object
Returns
size_t
— Returns the number of settings