Zephyr API Documentation 4.0.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

Backend handler functions. More...

#include <settings.h>

Data Fields

int(* csi_load )(struct settings_store *cs, const struct settings_load_arg *arg)
 Loads values from storage limited to subtree defined by subtree.
 
int(* csi_save_start )(struct settings_store *cs)
 Handler called before an export operation.
 
int(* csi_save )(struct settings_store *cs, const char *name, const char *value, size_t val_len)
 Save a single key-value pair to storage.
 
int(* csi_save_end )(struct settings_store *cs)
 Handler called after an export operation.
 
void *(* csi_storage_get )(struct settings_store *cs)
 

Detailed Description

Backend handler functions.

Sources are registered using a call to settings_src_register. Destinations are registered using a call to settings_dst_register.

Field Documentation

◆ csi_load

int(* settings_store_itf::csi_load) (struct settings_store *cs, const struct settings_load_arg *arg)

Loads values from storage limited to subtree defined by subtree.

Parameters:

  • cs - Corresponding backend handler node,
  • arg - Structure that holds additional data for data loading.
Note
Backend is expected not to provide duplicates of the entities. It means that if the backend does not contain any functionality to really delete old keys, it has to filter out old entities and call load callback only on the final entity.

◆ csi_save

int(* settings_store_itf::csi_save) (struct settings_store *cs, const char *name, const char *value, size_t val_len)

Save a single key-value pair to storage.

Parameters:

  • cs - Corresponding backend handler node
  • name - Key in string format
  • value - Binary value
  • val_len - Length of value in bytes.

◆ csi_save_end

int(* settings_store_itf::csi_save_end) (struct settings_store *cs)

Handler called after an export operation.

Parameters:

  • cs - Corresponding backend handler node Get pointer to the storage instance used by the backend.

Parameters:

  • cs - Corresponding backend handler node

◆ csi_save_start

int(* settings_store_itf::csi_save_start) (struct settings_store *cs)

Handler called before an export operation.

Parameters:

  • cs - Corresponding backend handler node

◆ csi_storage_get

void *(* settings_store_itf::csi_storage_get) (struct settings_store *cs)

The documentation for this struct was generated from the following file: