diff options
author | anuj.bhumiya <anuj.bhumiya@samsung.com> | 2021-01-14 16:51:30 +0530 |
---|---|---|
committer | anuj.bhumiya <anuj.bhumiya@samsung.com> | 2021-01-28 11:04:38 +0530 |
commit | f775566a5a41a0274bad80224e2262b6f8c9b64c (patch) | |
tree | c754d471b773a7575728c5b57b409234165904bf | |
parent | 447bd3a7ef9c00c480e7365d5740f6d6a2bcce52 (diff) | |
download | bluetooth-f775566a5a41a0274bad80224e2262b6f8c9b64c.tar.gz bluetooth-f775566a5a41a0274bad80224e2262b6f8c9b64c.tar.bz2 bluetooth-f775566a5a41a0274bad80224e2262b6f8c9b64c.zip |
Mesh: Add Join Network API
This patch add support of Mesh Node Role,
this API create a fresh unprovisioned
Mesh Node available to attach/provision in
any Network.
Change-Id: Ief4e9f4c92f9934b6e074d728b3e0f74b1022874
Signed-off-by: anuj.bhumiya <anuj.bhumiya@samsung.com>
-rw-r--r-- | include/bluetooth_internal.h | 32 | ||||
-rw-r--r-- | include/bluetooth_type_internal.h | 3 |
2 files changed, 35 insertions, 0 deletions
diff --git a/include/bluetooth_internal.h b/include/bluetooth_internal.h index 16d1c17..433ac5a 100644 --- a/include/bluetooth_internal.h +++ b/include/bluetooth_internal.h @@ -4571,6 +4571,38 @@ int bt_mesh_network_destroy(bt_mesh_network_h network); /** * @internal * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE + * @brief Call to create a fresh Local unprovisioned Mesh Node. + * Mesh node created by join is ready for provisioning, + * + * @param: in: node_handle, Mesh node instance + * @param: in: callback, callback to be called when node provisioned successfully + * + * Once a fresh node is created successfully + * Node is available to attach to network. + * Note: A Node can be part of only one network at a time. + * + * @since_tizen 6.5 + * @privlevel platform + */ +int bt_mesh_network_join(bt_mesh_node_h node_handle, + bt_mesh_join_complete_cb cb, void *user_data); + +/** + * @internal + * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE + * @brief Call to cancel an ongoing join Network request. + * + * @param: in: node_handle, Local Mesh node + * + * @see bt_mesh_network_join + * @since_tizen 6.5 + * @privlevel platform + */ +int bt_mesh_cancel_join(bt_mesh_node_h node_handle); + +/** + * @internal + * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE * @brief Call to load a previously created Local Mesh Provisioner. * Each Mesh Network will be characterisized * by only one Mesh Provisioner. Mesh Provisioner will contain a diff --git a/include/bluetooth_type_internal.h b/include/bluetooth_type_internal.h index 5184759..22feb8c 100644 --- a/include/bluetooth_type_internal.h +++ b/include/bluetooth_type_internal.h @@ -1740,6 +1740,9 @@ typedef void (*bt_mesh_network_device_provision_cb) (int result, bt_mesh_network_h network, const char *dev_uuid, void *user_data); +typedef void (*bt_mesh_join_complete_cb) + (int result, bt_mesh_node_h node_handle, + char *token, void *user_data); typedef void (*bt_mesh_authentication_request_cb) (int result, bt_mesh_authentication_type_e auth_type, |