PossibleErrors:
org.bluez.mesh.Error.InvalidArguments
+ void Release(uint64 token)
+
+ This removes the dbus resources of the mesh node
+ identified by the 64-bit token parameter. The token parameter
+ has been obtained as a result of successful Join() method call.
+ The mesh node whose dbus resources are removed can be attached back to
+ network by Attach() call.
+
+ PossibleErrors:
+ org.bluez.mesh.Error.InvalidArguments,
+ org.bluez.mesh.Error.NotFound
+
void CreateNetwork(object app_root, array{byte}[16] uuid)
This is the first method that an application calls to become
return l_dbus_message_new_method_return(msg);
}
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+static struct l_dbus_message *release_call(struct l_dbus *dbus,
+ struct l_dbus_message *msg,
+ void *user_data)
+{
+ uint64_t token;
+ struct mesh_node *node;
+
+ l_debug("Release");
+
+ if (!l_dbus_message_get_arguments(msg, "t", &token))
+ return dbus_error(msg, MESH_ERROR_INVALID_ARGS, NULL);
+
+ node = node_find_by_token(token);
+
+ if (!node)
+ return dbus_error(msg, MESH_ERROR_NOT_FOUND, NULL);
+
+ node_release_resources(node);
+ return l_dbus_message_new_method_return(msg);
+}
+#endif
+
static void create_join_complete_reply_cb(struct l_dbus_message *message,
void *user_data)
{
l_dbus_interface_method(iface, "Leave", 0, leave_call, "", "t",
"token");
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+ l_dbus_interface_method(iface, "Release", 0, release_call, "", "t",
+ "token");
+#endif
+
l_dbus_interface_method(iface, "CreateNetwork", 0, create_network_call,
"", "oay", "app", "uuid");
l_free(node);
}
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+/*
+ * This function is called to free resources
+ */
+void node_release_resources(struct mesh_node *node)
+{
+ if (!node)
+ return;
+
+ /* Free dynamic resources */
+ free_node_dbus_resources(node);
+
+ l_debug("Node DBUS Resources are removed");
+}
+#endif
+
/*
* This function is called to free resources and remove the
* configuration files for the specified node.
struct mesh_agent *agent);
void node_remove(struct mesh_node *node);
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+void node_release_resources(struct mesh_node *node);
+#endif
void node_join(const char *app_root, const char *sender, const uint8_t *uuid,
node_join_ready_func_t cb);
uint8_t *node_uuid_get(struct mesh_node *node);