[PATCH BlueZ 6/9] mesh: Define storage format specific read/write routines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This adds the following generic APIs to mesh-config.h
    void *mesh_config_create_config(void);
    void mesh_config_release_config(void *config);
    void *mesh_config_get_config(const char *dir);
    void *mesh_config_get_config_backup(const char *dir);
    bool mesh_config_restore_backup(const char *dir);
    bool mesh_config_save_config(const char *dir, void *cfg);

The implementation of these API routines depends on the
underlying storage directory structure and can be specific to
a chosen configuration file format.
---
 mesh/mesh-config.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/mesh/mesh-config.h b/mesh/mesh-config.h
index ab101a331..077c59bbb 100644
--- a/mesh/mesh-config.h
+++ b/mesh/mesh-config.h
@@ -100,6 +100,13 @@ typedef bool (*mesh_config_app_key_cb)(uint16_t idx, uint16_t net_idx,
 typedef bool (*mesh_config_node_cb)(struct mesh_config_node *node,
 							void *user_data);
 
+void *mesh_config_create_config(void);
+void mesh_config_release_config(void *config);
+void *mesh_config_get_config(const char *dir);
+void *mesh_config_get_config_backup(const char *dir);
+bool mesh_config_restore_backup(const char *dir);
+bool mesh_config_save_config(const char *dir, void *cfg);
+
 bool mesh_config_read_node(void *cfg, mesh_config_node_cb cb, void *user_data);
 bool mesh_config_add_node(void *cfg, struct mesh_config_node *node);
 bool mesh_config_read_iv_index(void *cfg, uint32_t *idx, bool *update);
-- 
2.21.0




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux