public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Inga Stotland <inga.stotland@intel.com>
To: linux-bluetooth@vger.kernel.org
Cc: brian.gix@intel.com, michal.lowas-rzechonek@silvair.com,
	jakub.witowski@silvair.com,
	Inga Stotland <inga.stotland@intel.com>
Subject: [PATCH BlueZ 6/9] mesh: Define storage format specific read/write routines
Date: Tue,  9 Jul 2019 22:09:56 -0700	[thread overview]
Message-ID: <20190710050959.7321-7-inga.stotland@intel.com> (raw)
In-Reply-To: <20190710050959.7321-1-inga.stotland@intel.com>

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


  parent reply	other threads:[~2019-07-10  5:10 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-10  5:09 [PATCH BlueZ 0/9] mesh: Configuration storage re-org Inga Stotland
2019-07-10  5:09 ` [PATCH BlueZ 1/9] mesh: Move network config setup from storage.c to node.c Inga Stotland
2019-07-10  5:09 ` [PATCH BlueZ 2/9] mesh: Rename mesh-db.c to mesh-config-json.c Inga Stotland
2019-07-10  5:09 ` [PATCH BlueZ 3/9] mesh: Change mesh_db prefix to mesh_config Inga Stotland
2019-07-10  5:09 ` [PATCH BlueZ 4/9] mesh: Generalize mesh-config APIs Inga Stotland
2019-07-10  7:38   ` Michał Lowas-Rzechonek
2019-07-10 15:01     ` Michał Lowas-Rzechonek
2019-07-10 15:58       ` Stotland, Inga
2019-07-10  5:09 ` [PATCH BlueZ 5/9] mesh: Change variable prefix "jconfig" to "config" Inga Stotland
2019-07-10  8:29   ` Michał Lowas-Rzechonek
2019-07-10  5:09 ` Inga Stotland [this message]
2019-07-10  7:52   ` [PATCH BlueZ 6/9] mesh: Define storage format specific read/write routines Michał Lowas-Rzechonek
2019-07-10 16:53     ` Stotland, Inga
2019-07-10 17:00       ` michal.lowas-rzechonek
2019-07-10 17:20     ` Gix, Brian
2019-07-10 19:32       ` Michal Lowas-Rzechonek
2019-07-10  5:09 ` [PATCH BlueZ 7/9] mesh: Implement config read/write for mesh json format Inga Stotland
2019-07-10  5:09 ` [PATCH BlueZ 8/9] mesh: Switch to using mesh-config routines for storage Inga Stotland
2019-07-10  5:09 ` [PATCH BlueZ 9/9] mesh: Make storage.c json-c agnostic Inga Stotland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190710050959.7321-7-inga.stotland@intel.com \
    --to=inga.stotland@intel.com \
    --cc=brian.gix@intel.com \
    --cc=jakub.witowski@silvair.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=michal.lowas-rzechonek@silvair.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox