summaryrefslogtreecommitdiff
path: root/mesh/model.h
diff options
context:
space:
mode:
authorInga Stotland <inga.stotland@intel.com>2020-06-30 11:56:15 -0700
committerBrian Gix <brian.gix@intel.com>2020-07-01 12:06:07 -0700
commite803b54864aa2d222eabc02f4814af9b467de34a (patch)
treeb01c71488ab6807ba2296411ae2df48a0fb91a34 /mesh/model.h
parent807886eb5717902cd10ff8ad13e91d9200f0549d (diff)
downloadbluez-e803b54864aa2d222eabc02f4814af9b467de34a.tar.gz
mesh: Check app model settings of pub/sub support
This adds handling of new options dictionary included with "Models" and "VendorModels" properties on org.bluez.mesh.Element1 interface. Supported (optional) dictionary entries: "Publish" - indicates whether the model supports publication mechanism. If not present, publication is enabled. "Subscribe" - indicates whether the model supports subscription mechanism. If not present, subscriptions are enabled. If a config message related to subscription state is received for a model that does not support subscription mechanism, an error code 0x08, ("Not A Subscribe Model") is sent in response. If a config message related to publication state is received for a model that does not support publication mechanism, an error code 0x07 ("Invalid Publish Parameters") is sent in response.
Diffstat (limited to 'mesh/model.h')
-rw-r--r--mesh/model.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/mesh/model.h b/mesh/model.h
index f8e0f9d37..f717fb00c 100644
--- a/mesh/model.h
+++ b/mesh/model.h
@@ -112,5 +112,11 @@ bool mesh_model_opcode_get(const uint8_t *buf, uint16_t size, uint32_t *opcode,
uint16_t *n);
void model_build_config(void *model, void *msg_builder);
+void mesh_model_enable_pub(struct mesh_model *mod, bool enable);
+bool mesh_model_is_pub_enabled(struct mesh_model *mod);
+void mesh_model_enable_sub(struct mesh_node *node, struct mesh_model *mod,
+ bool enable);
+bool mesh_model_is_sub_enabled(struct mesh_model *mod);
+
void mesh_model_init(void);
void mesh_model_cleanup(void);