bt_hal_mesh_auth_variant_e auth_type;
};
+struct mesh_remote_node_info {
+ uint16_t unicast;
+ uint8_t num_elements;
+};
+
static struct mesh_provision_auth_action auth_table[] = {
{ "blink", BT_HAL_MESH_AUTH_REQ_BLINK_COUNT_INPUT},
{ "beep", BT_HAL_MESH_AUTH_REQ_BEEP_COUNT_INPUT},
return BT_STATUS_SUCCESS;
}
+static void __bt_hal_mesh_delete_node_setup(struct l_dbus_message *msg,
+ void *user_data)
+{
+ struct mesh_remote_node_info *node_info = \
+ (struct mesh_remote_node_info*) user_data;
+
+ l_dbus_message_set_arguments(msg, "qy",
+ node_info->unicast, node_info->num_elements);
+ INFO("Mesh: Delete Remote Node Setup params passed");
+ g_free(node_info);
+}
+
+static void __bt_hal_mesh_delete_node_reply(
+ struct l_dbus_proxy *proxy,
+ struct l_dbus_message *msg, void *user_data)
+{
+ INFO("Mesh: Delete Remote Node Reply from DBUS");
+}
+
+bt_status_t _bt_hal_mesh_node_delete(bt_uuid_t *network,
+ uint16_t unicast, uint16_t num_elements)
+{
+ GSList *l;
+ meshcfg_app *app;
+ struct mesh_remote_node_info *node_info;
+ INFO("Mesh: Delete Remote Node");
+ l = g_slist_find_custom(mesh_apps, network->uu, __mesh_compare_network_uuid);
+ if (l) {
+ app = l->data;
+ if (!__bt_mesh_proxy_check(app)) {
+ ERR("Mesh: Proxy check failed!!");
+ return BT_STATUS_FAIL;
+ }
+ INFO("Mesh: Delete Remote Node Unicast [0x%2.2x] Num els [%u]",
+ unicast, num_elements);
+
+ /* Delete Remote Node Request */
+ node_info = g_malloc0(sizeof(struct mesh_remote_node_info));
+ node_info->unicast = unicast;
+ node_info->num_elements = num_elements;
+
+ if (!l_dbus_proxy_method_call(app->mgmt_proxy, "DeleteRemoteNode",
+ __bt_hal_mesh_delete_node_setup,
+ __bt_hal_mesh_delete_node_reply, node_info,
+ l_free)) {
+ ERR("Mesh: Delete Remote Node Request failed!!");
+ g_free(node_info);
+ return BT_STATUS_FAIL;
+ }
+ } else {
+ ERR("Mesh: App not found!!");
+ return BT_STATUS_PARM_INVALID;
+ }
+ INFO("Mesh: Delete Remote Node Call issued successfully!!");
+ return BT_STATUS_SUCCESS;
+}
+
bt_status_t _bt_hal_mesh_network_destroy(bt_uuid_t *net_uuid)
{
GSList *l;
return _bt_hal_mesh_network_destroy(network);
}
+static bt_status_t mesh_delete_node(bt_uuid_t *network, uint16_t unicast,
+ uint16_t num_elements)
+{
+ DBG("");
+ return _bt_hal_mesh_node_delete(network, unicast, num_elements);
+}
+
static bt_status_t mesh_scan(bt_uuid_t *network, bt_hal_mesh_scan_param_t *param)
{
DBG("");
.init = init,
.create = mesh_create_network,
.destroy = mesh_destroy_network,
+ .delete_node = mesh_delete_node,
.scan = mesh_scan,
.scan_cancel = mesh_scan_cancel,
.capability = mesh_set_prov_caps,
bt_status_t (*create)(bt_hal_mesh_node_t *node,
GSList *model_list, bool is_prov);
bt_status_t (*destroy)(bt_uuid_t *network);
+ bt_status_t (*delete_node)(bt_uuid_t *network, uint16_t unicast,
+ uint16_t elem_cnt);
bt_status_t (*scan)(bt_uuid_t *network,
bt_hal_mesh_scan_param_t *param);
bt_status_t (*scan_cancel)(bt_uuid_t *network);
return OAL_STATUS_SUCCESS;
}
+oal_status_t mesh_delete_remote_node(oal_uuid_t* network_uuid,
+ uint16_t unicast, uint16_t num_elements)
+{
+ int ret = BT_STATUS_SUCCESS;
+ API_TRACE();
+ CHECK_OAL_MESH_ENABLED();
+
+ ret = mesh_api->delete_node((bt_uuid_t*)network_uuid, unicast, num_elements);
+ if (ret != BT_STATUS_SUCCESS) {
+ BT_ERR("Mesh: Remote Node Deletion failed: %s", status2string(ret));
+ return convert_to_oal_status(ret);
+ }
+
+ return OAL_STATUS_SUCCESS;
+}
+
oal_status_t mesh_network_start_scan(oal_uuid_t* network_uuid,
oal_mesh_scan_params_t *params)
{