48struct golioth_settings;
126 const char *setting_name,
133 const char *setting_name,
141 const char *setting_name,
147 const char *setting_name,
153 const char *setting_name,
enum golioth_status golioth_settings_register_string(struct golioth_settings *settings, const char *setting_name, golioth_string_setting_cb callback, void *callback_arg)
Same as golioth_settings_register_int, but for type string.
enum golioth_status golioth_settings_register_bool(struct golioth_settings *settings, const char *setting_name, golioth_bool_setting_cb callback, void *callback_arg)
Same as golioth_settings_register_int, but for type bool.
enum golioth_status golioth_settings_register_float(struct golioth_settings *settings, const char *setting_name, golioth_float_setting_cb callback, void *callback_arg)
Same as golioth_settings_register_int, but for type float.
struct golioth_settings * golioth_settings_init(struct golioth_client *client)
enum golioth_settings_status(* golioth_string_setting_cb)(const char *new_value, size_t new_value_len, void *arg)
enum golioth_settings_status(* golioth_int_setting_cb)(int32_t new_value, void *arg)
enum golioth_settings_status(* golioth_bool_setting_cb)(bool new_value, void *arg)
enum golioth_settings_status(* golioth_float_setting_cb)(float new_value, void *arg)
golioth_settings_status
Enumeration of Settings status codes.
golioth_settings_value_type
Different types of setting values.
enum golioth_status golioth_settings_register_int_with_range(struct golioth_settings *settings, const char *setting_name, int32_t min_val, int32_t max_val, golioth_int_setting_cb callback, void *callback_arg)
enum golioth_status golioth_settings_register_int(struct golioth_settings *settings, const char *setting_name, golioth_int_setting_cb callback, void *callback_arg)
enum golioth_status golioth_settings_deinit(struct golioth_settings *settings)
@ GOLIOTH_SETTINGS_GENERAL_ERROR
Other general error (e.g. I/O error)
@ GOLIOTH_SETTINGS_VALUE_OUTSIDE_RANGE
The setting value is outside of allowed range.
@ GOLIOTH_SETTINGS_VALUE_STRING_TOO_LONG
The setting value string is too long, exceeds max length.
@ GOLIOTH_SETTINGS_KEY_NOT_VALID
The setting key is too long, ill-formatted.
@ GOLIOTH_SETTINGS_KEY_NOT_RECOGNIZED
The setting key is not recognized, this setting is unknown.
@ GOLIOTH_SETTINGS_SUCCESS
Setting applied successfully to the device, stored in NVS.
@ GOLIOTH_SETTINGS_VALUE_FORMAT_NOT_VALID
The setting value is improperly formatted.
@ GOLIOTH_SETTINGS_VALUE_TYPE_STRING
@ GOLIOTH_SETTINGS_VALUE_TYPE_UNKNOWN
@ GOLIOTH_SETTINGS_VALUE_TYPE_INT
@ GOLIOTH_SETTINGS_VALUE_TYPE_BOOL
@ GOLIOTH_SETTINGS_VALUE_TYPE_FLOAT