summaryrefslogtreecommitdiff
path: root/mesh/mesh.h
diff options
context:
space:
mode:
authorInga Stotland <inga.stotland@intel.com>2018-12-14 14:01:50 -0800
committerBrian Gix <brian.gix@intel.com>2019-01-08 08:26:22 -0800
commit7c11237d9f83124fc53cbdd5aca7dc227f185432 (patch)
treec302ae2d2d53c09784ba358793929f35ca5656b3 /mesh/mesh.h
parent7005bb77bf43ab0d1cb01ad6a30261c1e1d10fee (diff)
downloadbluez-7c11237d9f83124fc53cbdd5aca7dc227f185432.tar.gz
mesh: Implement org.bluez.mesh.Network API
This implements the following methods of org.bluez.mesh.Network interface: Join(), Attach(), Cancel(). The methods are described in doc/mesh-api.txt document. Also, add changes to reflect that the single daemon now handles multiple local mesh nodes.
Diffstat (limited to 'mesh/mesh.h')
-rw-r--r--mesh/mesh.h28
1 files changed, 18 insertions, 10 deletions
diff --git a/mesh/mesh.h b/mesh/mesh.h
index 8d389883b..ff4e04fa1 100644
--- a/mesh/mesh.h
+++ b/mesh/mesh.h
@@ -15,18 +15,26 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
- *
*/
-struct bt_mesh;
-struct mesh_net;
+#define BLUEZ_MESH_NAME "org.bluez.mesh"
+
+#define MESH_NETWORK_INTERFACE "org.bluez.mesh.Network1"
+#define MESH_NODE_INTERFACE "org.bluez.mesh.Node1"
+#define MESH_ELEMENT_INTERFACE "org.bluez.mesh.Element1"
+#define MESH_APPLICATION_INTERFACE "org.bluez.mesh.Application1"
+#define MESH_PROVISION_AGENT_INTERFACE "org.bluez.mesh.ProvisionAgent1"
+#define ERROR_INTERFACE "org.bluez.mesh.Error"
-struct bt_mesh *mesh_new(uint16_t index, const char *in_config_name);
-struct bt_mesh *mesh_ref(struct bt_mesh *mesh);
-void mesh_unref(struct bt_mesh *mesh);
-bool mesh_set_output(struct bt_mesh *mesh, const char *out_config_name);
+typedef void (*prov_rx_cb_t)(void *user_data, const uint8_t *data,
+ uint16_t len);
+bool mesh_init(uint16_t index, const char *in_config_name);
void mesh_cleanup(void);
-const char *mesh_status_str(uint8_t err);
+bool mesh_dbus_init(struct l_dbus *dbus);
-/* Command line testing */
-struct mesh_net *mesh_get_net(struct bt_mesh *mesh);
+const char *mesh_status_str(uint8_t err);
+bool mesh_send_pkt(uint8_t count, uint16_t interval, uint8_t *data,
+ uint16_t len);
+bool mesh_send_cancel(const uint8_t *filter, uint8_t len);
+bool mesh_reg_prov_rx(prov_rx_cb_t cb, void *user_data);
+void mesh_unreg_prov_rx(prov_rx_cb_t cb);