Tizen Native API
9.0
|
The MMI Node API provides functions for creating and managing MMI node modules.
Required Header
#include <mmi-node.h>
Overview
The MMI API provides functions for creating and managing MMI node modules. Nodes represent distinct elements within the workflow, each fulfilling a particular role such as data acquisition, data transformation, or decision making. By integrating various types of nodes, workflows can support various multimodal interactions.
This API set allows you to:
- create/destroy nodes of various types
- retrieve the type of a given node
- add ports to a node for data exchange
- find ports by their names and types
- set initialization, deinitialization, activation, deactivation, and signal receiving callbacks for a node
- set input data processing callbacks for a port
- register nodes into the MMI framework to enable them to be used by workflows
Node Callback(Event) Operations
The callback mechanism is used to notify the MMI Node module about significant events.
SET | CALLBACK | DESCRIPTION |
---|---|---|
mmi_node_set_initialized_cb() | mmi_node_initialized_cb() | This callback function is called when a node instance is initialized |
mmi_node_set_deinitialized_cb() | mmi_node_deinitialized_cb() | This callback function is called when a node instance is deinitialized |
mmi_node_set_attribute_set_cb() | mmi_node_attribute_set_cb() | This callback function is called when an attribute is set on a node instance |
mmi_node_set_activated_cb() | mmi_node_activated_cb() | This callback function is called when a node instance is activated |
mmi_node_set_deactivated_cb() | mmi_node_deactivated_cb() | This callback function is called when a node instance is deactivated |
mmi_node_set_signal_received_cb() | mmi_node_signal_received_cb() | This callback function is called when a signal is received by a node instance |
Port Callback(Event) Operations
The callback mechanism is used to notify the MMI Node module about significant events on its port.
SET | CALLBACK | DESCRIPTION |
---|---|---|
mmi_port_set_input_data_received_cb() | mmi_port_input_data_received_cb() | This callback function is called whenever input data is received for a port instance |
Functions | |
int | mmi_node_create_source (mmi_node_source_type_e type, mmi_node_h *node) |
Creates a new source node. | |
int | mmi_node_get_source_type (mmi_node_h node, mmi_node_source_type_e *type) |
Gets the type of the source node. | |
int | mmi_node_create_processor (mmi_node_processor_type_e type, mmi_node_h *node) |
Creates a new processor node. | |
int | mmi_node_get_processor_type (mmi_node_h node, mmi_node_processor_type_e *type) |
Gets the type of the processor node. | |
int | mmi_node_create_logic (mmi_node_logic_type_e type, mmi_node_h *node) |
Creates a new logic node. | |
int | mmi_node_get_logic_type (mmi_node_h node, mmi_node_logic_type_e *type) |
Gets the type of the logic node. | |
int | mmi_node_create_controller (mmi_node_controller_type_e type, mmi_node_h *node) |
Creates a new MMI controller node. | |
int | mmi_node_get_controller_type (mmi_node_h node, mmi_node_controller_type_e *type) |
Gets the type of the MMI controller node. | |
int | mmi_node_create_action (mmi_node_action_type_e type, mmi_node_h *node) |
Creates a new MMI action node. | |
int | mmi_node_get_action_type (mmi_node_h node, mmi_node_action_type_e *type) |
Gets the type of the MMI action node. | |
int | mmi_node_create_custom (const char *custom_type_id, mmi_node_h *node) |
Creates a new MMI node with a custom type. | |
int | mmi_node_get_custom_type (mmi_node_h node, const char **custom_type_id) |
Gets the custom type identifier of the MMI node. | |
int | mmi_node_set_initialized_cb (mmi_node_h node, mmi_node_initialized_cb callback, void *user_data) |
Sets a callback function to be invoked when the node is initialized. | |
int | mmi_node_set_deinitialized_cb (mmi_node_h node, mmi_node_deinitialized_cb callback, void *user_data) |
Sets a callback function to be invoked when the node is deinitialized. | |
int | mmi_node_set_attribute_set_cb (mmi_node_h node, mmi_node_attribute_set_cb callback, void *user_data) |
Sets a callback function to be invoked when an attribute is set on the node. | |
int | mmi_node_set_activated_cb (mmi_node_h node, mmi_node_activated_cb callback, void *user_data) |
Sets a callback function to be invoked when the node is activated. | |
int | mmi_node_set_deactivated_cb (mmi_node_h node, mmi_node_deactivated_cb callback, void *user_data) |
Sets a callback function to be invoked when the specified MMI node is deactivated. | |
int | mmi_node_set_signal_received_cb (mmi_node_h node, mmi_node_signal_received_cb callback, void *user_data) |
Sets a callback function to be invoked when a signal is received by the specified MMI node. | |
int | mmi_node_add_port (mmi_node_h node, mmi_port_h port) |
Adds a static port to a static node. | |
int | mmi_node_find_port (mmi_node_h node, mmi_port_type_e port_type, const char *port_name, mmi_port_h *port) |
Finds a port in a node matching the given name and type. | |
int | mmi_node_get_type (mmi_node_h node, mmi_node_type_e *type) |
Retrieves the type of a node. | |
int | mmi_node_get_port_count (mmi_node_h node, size_t *port_count) |
Retrieves the number of ports in a node. | |
int | mmi_node_get_port (mmi_node_h node, size_t index, mmi_port_h *port) |
Retrieves the port at the given index. | |
int | mmi_node_register (mmi_node_h node) |
Registers a node. | |
int | mmi_node_clone (mmi_node_h node, mmi_node_h *cloned) |
Clones a node. | |
int | mmi_node_destroy (mmi_node_h node) |
Destroys a node. | |
int | mmi_node_instance_set_attribute (mmi_node_instance_h instance, mmi_attribute_h attribute) |
Provides an attribute to a node instance. | |
int | mmi_node_instance_find_port_instance (mmi_node_instance_h node_instance, mmi_port_type_e port_type, const char *port_name, mmi_port_instance_h *port_instance) |
Retrieves a port instance of a node instance. | |
int | mmi_node_instance_find_by_port_instance (mmi_port_instance_h port_instance, mmi_node_instance_h *node_instance) |
Finds a node instance that has the given port instance. | |
int | mmi_node_instance_find_sibling_port_instance (mmi_port_instance_h instance, const char *sibling_name, mmi_port_instance_h *sibling) |
Retrieves a sibling port instance of a port instance in a node. | |
int | mmi_node_instance_emit_signal (mmi_node_instance_h instance, mmi_signal_h signal) |
Emits a signal from a node instance. | |
int | mmi_node_instance_update_pending_activation_result (mmi_node_instance_h instance, mmi_error_e result) |
Updates the pending activation result of a node instance. | |
int | mmi_port_create (mmi_port_h *port) |
Creates a new port. | |
int | mmi_port_get_name (mmi_port_h port, char **name, size_t *length) |
Gets the name of a port. | |
int | mmi_port_get_type (mmi_port_h port, mmi_port_type_e *type) |
Gets the type of a port. | |
int | mmi_port_get_data_type (mmi_port_h port, mmi_data_type_e *data_type) |
Gets the data type of a port. | |
int | mmi_port_set_name (mmi_port_h port, const char *name) |
Sets the name of a port. | |
int | mmi_port_set_type (mmi_port_h port, mmi_port_type_e type) |
Sets the type of a port. | |
int | mmi_port_set_data_type (mmi_port_h port, mmi_data_type_e data_type) |
Sets the data type of a port. | |
int | mmi_port_set_input_data_received_cb (mmi_port_h port, mmi_port_input_data_received_cb callback, void *user_data) |
Sets the input data received callback function. | |
int | mmi_port_clone (mmi_port_h port, mmi_port_h *cloned) |
Clones a port. | |
int | mmi_port_destroy (mmi_port_h port) |
Destroys a port. | |
int | mmi_port_instance_generate_output (mmi_port_instance_h instance, mmi_data_h data) |
Generates data to the port with the given port instance. | |
Typedefs | |
typedef void * | mmi_node_instance_h |
Handle for MMI node instance. | |
typedef int(* | mmi_node_initialized_cb )(mmi_node_instance_h instance, void *user_data) |
Callback function type for MMI node initialization. | |
typedef int(* | mmi_node_deinitialized_cb )(mmi_node_instance_h instance, void *user_data) |
Callback function type for MMI node deinitialization. | |
typedef int(* | mmi_node_attribute_set_cb )(mmi_node_instance_h instance, mmi_attribute_h attribute, void *user_data) |
Callback function type for setting MMI node attributes. | |
typedef int(* | mmi_node_activated_cb )(mmi_node_instance_h instance, void *user_data) |
Callback function type for MMI node activation. | |
typedef int(* | mmi_node_deactivated_cb )(mmi_node_instance_h instance, void *user_data) |
Callback function type for MMI node deactivation. | |
typedef int(* | mmi_node_signal_received_cb )(mmi_node_instance_h instance, mmi_signal_h signal, void *user_data) |
Callback function type for receiving MMI signals. | |
typedef struct mmi_node_s * | mmi_node_h |
Handle for MMI node. | |
typedef void * | mmi_port_instance_h |
Handle for MMI port instance. | |
typedef int(* | mmi_port_input_data_received_cb )(mmi_port_instance_h instance, mmi_data_h data, void *user_data) |
Callback function type for input data reception. | |
typedef struct mmi_port_s * | mmi_port_h |
Handle for MMI port. |
Typedef Documentation
typedef int(* mmi_node_activated_cb)(mmi_node_instance_h instance, void *user_data) |
Callback function type for MMI node activation.
This callback function is called when a node instance is activated.
- Since :
- 9.0
- Remarks:
- The instance should not be released. The instance is available until the node instance is released.
- Parameters:
-
[in] instance The handle of the activated node instance. [in] user_data The user data passed from the callback registration function.
- Returns:
- An integer value indicating the result of the callback execution.
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter
typedef int(* mmi_node_attribute_set_cb)(mmi_node_instance_h instance, mmi_attribute_h attribute, void *user_data) |
Callback function type for setting MMI node attributes.
This callback function is called when an attribute is set on a node instance.
- Since :
- 9.0
- Remarks:
- The instance should not be released. The instance is available until the node instance is released.
- The attribute should not be released. The attribute can be used only in the callback. To use outside, make a copy.
- Parameters:
-
[in] instance The handle of the node instance. [in] attribute The handle of the attribute being set. [in] user_data The user data passed from the callback registration function.
- Returns:
- An integer value indicating the result of the callback execution.
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter
typedef int(* mmi_node_deactivated_cb)(mmi_node_instance_h instance, void *user_data) |
Callback function type for MMI node deactivation.
This callback function is called when a node instance is deactivated.
- Since :
- 9.0
- Remarks:
- The instance should not be released. The instance is available until the node instance is released.
- Parameters:
-
[in] instance The handle of the deactivated node instance. [in] user_data The user data passed from the callback registration function.
- Returns:
- An integer value indicating the result of the callback execution.
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter
typedef int(* mmi_node_deinitialized_cb)(mmi_node_instance_h instance, void *user_data) |
Callback function type for MMI node deinitialization.
This callback function is called when a node instance is deinitialized.
- Since :
- 9.0
- Remarks:
- The instance should not be released. The instance is available until the node instance is released.
- Parameters:
-
[in] instance The handle of the deinitialized node instance. [in] user_data The user data passed from the callback registration function.
- Returns:
- An integer value indicating the result of the callback execution.
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter
typedef struct mmi_node_s* mmi_node_h |
Handle for MMI node.
This handle represents a node created within the MMI framework.
- Since :
- 9.0
typedef int(* mmi_node_initialized_cb)(mmi_node_instance_h instance, void *user_data) |
Callback function type for MMI node initialization.
This callback function is called when a node instance is initialized.
- Since :
- 9.0
- Remarks:
- The instance should not be released. The instance is available until the node instance is released.
- Parameters:
-
[in] instance The handle of the initialized node instance. [in] user_data The user data passed from the callback registration function.
- Returns:
- An integer value indicating the result of the callback execution.
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter
typedef void* mmi_node_instance_h |
Handle for MMI node instance.
This handle represents an instance of a node created within the MMI framework.
- Since :
- 9.0
typedef int(* mmi_node_signal_received_cb)(mmi_node_instance_h instance, mmi_signal_h signal, void *user_data) |
Callback function type for receiving MMI signals.
This callback function is called when a signal is received by a node instance.
- Since :
- 9.0
- Remarks:
- The instance should not be released. The instance is available until the node instance is released.
- The signal should not be released. The signal can be used only in the callback. To use outside, make a copy.
- Parameters:
-
[in] instance The handle of the node instance receiving the signal. [in] signal The handle of the received signal. [in] user_data The user data passed from the callback registration function.
- Returns:
- An integer value indicating the result of the callback execution.
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter
typedef struct mmi_port_s* mmi_port_h |
Handle for MMI port.
This handle represents a port created within the MMI framework.
- Since :
- 9.0
typedef int(* mmi_port_input_data_received_cb)(mmi_port_instance_h instance, mmi_data_h data, void *user_data) |
Callback function type for input data reception.
This callback function is called whenever input data is received for a port instance.
- Since :
- 9.0
- Remarks:
- The instance should not be released. The instance is available until the port instance is released.
- The data should not be released. The data can be used only in the callback. To use outside, make a copy.
- Parameters:
-
[in] instance The port instance handle. [in] data The received input data. [in] user_data The user data passed from the registration function.
- Returns:
- An integer value indicating the result of the callback execution.
- Return values:
-
0 on success, otherwise a negative error value.
typedef void* mmi_port_instance_h |
Handle for MMI port instance.
This handle represents a port instance created within the MMI framework.
- Since :
- 9.0
Enumeration Type Documentation
Enumeration for MMI action node type.
This enumeration defines the different action node types supported by the MMI framework.
- Since :
- 9.0
Enumeration for MMI logic node type.
This enumeration defines the different logic node types supported by the MMI framework.
- Since :
- 9.0
enum mmi_node_type_e |
Enumeration for MMI node types.
This enumeration defines the different types of nodes in the MMI framework.
- Since :
- 9.0
- Enumerator:
enum mmi_port_type_e |
Function Documentation
int mmi_node_add_port | ( | mmi_node_h | node, |
mmi_port_h | port | ||
) |
Adds a static port to a static node.
This function adds an already created port to a node. The port must be created before calling this function.
- Since :
- 9.0
- Parameters:
-
[in] node The handle to the node where the port will be added. [in] port The handle to the port that will be added to the node.
- Returns:
- An integer value indicating the result of the operation.
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter
- Precondition:
- The port must be created before adding it to the node.
- Postcondition:
- The port is added to the node.
int mmi_node_clone | ( | mmi_node_h | node, |
mmi_node_h * | cloned | ||
) |
Clones a node.
This function creates a copy of the node and returns a handle to the cloned node.
- Since :
- 9.0
- Remarks:
- The cloned should be released using mmi_attribute_destroy().
- Parameters:
-
[in] node The handle to the node to be cloned. [out] cloned A pointer to store the handle of the cloned node.
- Returns:
- An integer value indicating the result of the operation.
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter
- Precondition:
- The node must exist.
- Postcondition:
- A clone of the node is created and its handle is stored in the provided pointer.
- Example
#include <mmi.h> ... mmi_node_h node; // Indicates the handle of the node mmi_node_h cloned = NULL; mmi_node_clone(node, &cloned); ... mmi_node_destroy(cloned);
int mmi_node_create_action | ( | mmi_node_action_type_e | type, |
mmi_node_h * | node | ||
) |
Creates a new MMI action node.
This function creates a new MMI action node of the specified type.
- Since :
- 9.0
- Remarks:
- The node should be released using mmi_node_destroy().
- Parameters:
-
[in] type The type of the action to be created. [out] node A pointer to the newly created node handle.
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter MMI_ERROR_OUT_OF_MEMORY Out of memory
- Example
#include <mmi.h> ... mmi_node_h node = NULL; mmi_node_create_action(MMI_NODE_ACTION_TYPE_NONE, &node); ... mmi_node_destroy(node);
int mmi_node_create_controller | ( | mmi_node_controller_type_e | type, |
mmi_node_h * | node | ||
) |
Creates a new MMI controller node.
This function creates a new MMI controller node of the specified type.
- Since :
- 9.0
- Remarks:
- The node should be released using mmi_node_destroy().
- Parameters:
-
[in] type The type of the controller to be created. [out] node A pointer to the newly created node handle.
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter MMI_ERROR_OUT_OF_MEMORY Out of memory
- Example
#include <mmi.h> ... mmi_node_h node = NULL; mmi_node_create_controller(MMI_NODE_CONTROLLER_TYPE_NONE, &node); ... mmi_node_destroy(node);
int mmi_node_create_custom | ( | const char * | custom_type_id, |
mmi_node_h * | node | ||
) |
Creates a new MMI node with a custom type.
This function creates a new MMI node with a custom type identifier.
- Since :
- 9.0
- Remarks:
- The node should be released using mmi_node_destroy().
- Parameters:
-
[in] custom_type_id The custom type identifier for the node. [out] node A pointer to the newly created node handle.
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter MMI_ERROR_OUT_OF_MEMORY Out of memory
- Example
#include <mmi.h> ... mmi_node_h node = NULL; mmi_node_create_custom("Test", &node); ... mmi_node_destroy(node);
int mmi_node_create_logic | ( | mmi_node_logic_type_e | type, |
mmi_node_h * | node | ||
) |
Creates a new logic node.
This function creates a new logic node of the specified type and returns a handle to it.
- Since :
- 9.0
- Remarks:
- The node should be released using mmi_node_destroy().
- Parameters:
-
[in] type The type of the logic node to be created. [out] node A pointer to store the handle of the newly created logic node.
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter MMI_ERROR_OUT_OF_MEMORY Out of memory
- Example
#include <mmi.h> ... mmi_node_h node = NULL; mmi_node_create_logic(MMI_NODE_LOGIC_TYPE_NONE, &node); ... mmi_node_destroy(node);
- See also:
- mmi_node_logic_type_e
- mmi_node_destroy()
int mmi_node_create_processor | ( | mmi_node_processor_type_e | type, |
mmi_node_h * | node | ||
) |
Creates a new processor node.
This function creates a new processor node of the specified type and returns a handle to it.
- Since :
- 9.0
- Remarks:
- The node should be released using mmi_node_destroy().
- Parameters:
-
[in] type The type of the processor node to be created. [out] node A pointer to store the handle of the newly created processor node.
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter MMI_ERROR_OUT_OF_MEMORY Out of memory
- Example
#include <mmi.h> ... mmi_node_h node = NULL; mmi_node_create_processor(MMI_NODE_PROCESSOR_TYPE_NONE, &node); ... mmi_node_destroy(node);
int mmi_node_create_source | ( | mmi_node_source_type_e | type, |
mmi_node_h * | node | ||
) |
Creates a new source node.
This function creates a new source node of the specified type and returns a handle to it.
- Since :
- 9.0
- Remarks:
- The node should be released using mmi_node_destroy().
- Parameters:
-
[in] type The type of the source node to be created. [out] node A pointer to store the handle of the newly created source node.
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter MMI_ERROR_OUT_OF_MEMORY Out of memory
- Example
#include <mmi.h> ... mmi_node_h node = NULL; mmi_node_create_source(MMI_NODE_SOURCE_TYPE_NONE, &node); ... mmi_node_destroy(node);
- See also:
- mmi_node_source_type_e
- mmi_node_destroy()
int mmi_node_destroy | ( | mmi_node_h | node | ) |
Destroys a node.
This function destroys the node and releases all associated resources.
- Since :
- 9.0
- Parameters:
-
[in] node The handle to the node to be destroyed.
- Returns:
- An integer value indicating the result of the operation.
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter
- Precondition:
- The node must exist.
- Postcondition:
- The node is destroyed and all associated resources are released.
int mmi_node_find_port | ( | mmi_node_h | node, |
mmi_port_type_e | port_type, | ||
const char * | port_name, | ||
mmi_port_h * | port | ||
) |
Finds a port in a node matching the given name and type.
This function searches for a port in a node that matches the specified name and type.
- Since :
- 9.0
- Remarks:
- The port should not be released. The port is available until node is released.
- Parameters:
-
[in] node The handle to the node where the search will be performed. [in] port_type The type of the port to be found. [in] port_name The name of the port to be found. [out] port A pointer to store the handle of the found port.
- Returns:
- An integer value indicating the result of the operation.
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter
- Precondition:
- The node must exist and contain ports.
- Postcondition:
- If the port is found, its handle is stored in the provided pointer.
- Example
#include <mmi.h> ... mmi_node_h node; // Indicates the data handle mmi_port_h port = NULL; mmi_node_find_port(node, MMI_PORT_TYPE_OUT, "OUTPUT", &port);
int mmi_node_get_action_type | ( | mmi_node_h | node, |
mmi_node_action_type_e * | type | ||
) |
Gets the type of the MMI action node.
This function retrieves the type of the specified MMI action node.
- Since :
- 9.0
- Parameters:
-
[in] node The handle of the node action. [out] type A pointer to store the type of the node action.
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter
int mmi_node_get_controller_type | ( | mmi_node_h | node, |
mmi_node_controller_type_e * | type | ||
) |
Gets the type of the MMI controller node.
This function retrieves the type of the specified MMI controller node.
- Since :
- 9.0
- Parameters:
-
[in] node The handle of the node controller. [out] type A pointer to store the type of the node controller.
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter
int mmi_node_get_custom_type | ( | mmi_node_h | node, |
const char ** | custom_type_id | ||
) |
Gets the custom type identifier of the MMI node.
This function retrieves the custom type identifier of the specified MMI node.
- Since :
- 9.0
- Remarks:
- The custom_type_id should not be released.
- The custom_type_id is available until node is released.
- Parameters:
-
[in] node The handle of the node. [out] custom_type_id A pointer to store the custom type identifier of the node.
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter
- Example
#include <mmi.h> ... mmi_node_h node; // Indicates the handle of the node const char *custom_type_id = NULL; mmi_node_get_custom_type(node, &custom_type_id);
int mmi_node_get_logic_type | ( | mmi_node_h | node, |
mmi_node_logic_type_e * | type | ||
) |
Gets the type of the logic node.
This function retrieves the type of the specified logic node.
- Since :
- 9.0
- Parameters:
-
[in] node The handle of the logic node. [out] type A pointer to store the type of the logic node.
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter
- Precondition:
- The logic node must be created using mmi_node_create_logic().
int mmi_node_get_port | ( | mmi_node_h | node, |
size_t | index, | ||
mmi_port_h * | port | ||
) |
Retrieves the port at the given index.
This function retrieves the port at the specified index in the node.
- Since :
- 9.0
- Remarks:
- The port should not be released. The port is available until node is released.
- Parameters:
-
[in] node The handle to the node from which the port will be retrieved. [in] index The index of the port to be retrieved. [out] port A pointer to store the handle of the retrieved port.
- Returns:
- An integer value indicating the result of the operation.
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter
- Precondition:
- The node must exist and contain ports.
- Postcondition:
- The handle of the port at the specified index is stored in the provided pointer.
- Example
#include <mmi.h> ... mmi_node_h node; // Indicates the data handle mmi_port_h port = NULL; mmi_node_get_port(node, 0, &port);
int mmi_node_get_port_count | ( | mmi_node_h | node, |
size_t * | port_count | ||
) |
Retrieves the number of ports in a node.
This function retrieves the total number of ports present in the node.
- Since :
- 9.0
- Parameters:
-
[in] node The handle the node whose port count will be retrieved. [out] port_count A pointer to store the number of ports in the node.
- Returns:
- An integer value indicating the result of the operation.
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter
- Precondition:
- The node must exist.
- Postcondition:
- The number of ports in the node is stored in the provided pointer.
int mmi_node_get_processor_type | ( | mmi_node_h | node, |
mmi_node_processor_type_e * | type | ||
) |
Gets the type of the processor node.
This function retrieves the type of the specified processor node.
- Since :
- 9.0
- Parameters:
-
[in] node The handle of the processor node. [out] type A pointer to store the type of the processor node.
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter
- Precondition:
- The processor node must be created using mmi_node_create_processor().
int mmi_node_get_source_type | ( | mmi_node_h | node, |
mmi_node_source_type_e * | type | ||
) |
Gets the type of the source node.
This function retrieves the type of the specified source node.
- Since :
- 9.0
- Parameters:
-
[in] node The handle of the source node. [out] type A pointer to store the type of the source node.
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter
- Precondition:
- The source node must be created using mmi_node_create_source().
int mmi_node_get_type | ( | mmi_node_h | node, |
mmi_node_type_e * | type | ||
) |
Retrieves the type of a node.
This function retrieves the type of the node represented by the given handle.
- Since :
- 9.0
- Parameters:
-
[in] node The handle to the node whose type will be retrieved. [out] type A pointer to store the type of the node.
- Returns:
- An integer value indicating the result of the operation.
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter
- Precondition:
- The node must exist.
- Postcondition:
- The type of the node is stored in the provided pointer.
int mmi_node_instance_emit_signal | ( | mmi_node_instance_h | instance, |
mmi_signal_h | signal | ||
) |
Emits a signal from a node instance.
This function emits a signal from a specified node instance.
- Since :
- 9.0
- Parameters:
-
[in] instance The handle to the node instance. [in] signal The handle to the signal to be emitted.
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter
int mmi_node_instance_find_by_port_instance | ( | mmi_port_instance_h | port_instance, |
mmi_node_instance_h * | node_instance | ||
) |
Finds a node instance that has the given port instance.
This function finds and retrieves the node instance that contains the specified port instance.
- Since :
- 9.0
- Remarks:
- The node_instance should not be released.
- The node_instance is available until port_instance is released.
- Parameters:
-
[in] port_instance The handle to the port instance. [out] node_instance The handle to the retrieved node instance.
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter
- Example
mmi_port_instance_h port; // Indicates the port instance of the node. mmi_node_instance_h node = NULL; mmi_node_instance_find_by_port_instance(port, &node);
int mmi_node_instance_find_port_instance | ( | mmi_node_instance_h | node_instance, |
mmi_port_type_e | port_type, | ||
const char * | port_name, | ||
mmi_port_instance_h * | port_instance | ||
) |
Retrieves a port instance of a node instance.
This function finds and retrieves a port instance of a specified node instance based on its type and name.
- Since :
- 9.0
- Remarks:
- The port_instance should not be released.
- The port_instance is available until node_instance is released.
- Parameters:
-
[in] node_instance The handle to the node instance. [in] port_type The type of the port (input or output). [in] port_name The name of the port. [out] port_instance The handle to the retrieved port instance.
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter
- Example
mmi_node_instance_h node; // Indicates the node instance handle. mmi_port_instance_h port = NULL; mmi_node_instance_find_port_instance(node, MMI_PORT_TYPE_OUT, "OUTPUT", &port);
int mmi_node_instance_find_sibling_port_instance | ( | mmi_port_instance_h | instance, |
const char * | sibling_name, | ||
mmi_port_instance_h * | sibling | ||
) |
Retrieves a sibling port instance of a port instance in a node.
This function finds and retrieves a sibling port instance of a specified port instance in a node, matching the given name.
- Since :
- 9.0
- Remarks:
- The sibling should not be released.
- The sibling is available until node is released.
- Parameters:
-
[in] instance The handle to the port instance. [in] sibling_name The name of the sibling port. [out] sibling The handle to the retrieved sibling port instance.
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter
- Example
mmi_port_instance_h port; // Indicates the port instance of the node. mmi_port_instance_h sibling = NULL; mmi_node_instance_find_sibling_port_instance(port, "PORT_2", &sibling);
int mmi_node_instance_set_attribute | ( | mmi_node_instance_h | instance, |
mmi_attribute_h | attribute | ||
) |
Provides an attribute to a node instance.
This function sets an attribute to a specified node instance.
- Since :
- 9.0
- Parameters:
-
[in] instance The handle to the node instance. [in] attribute The handle to the attribute to be set.
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter MMI_ERROR_OUT_OF_MEMORY Out of memory
int mmi_node_instance_update_pending_activation_result | ( | mmi_node_instance_h | instance, |
mmi_error_e | result | ||
) |
Updates the pending activation result of a node instance.
This function updates the result of the last activation callback call for a specified node instance.
- Since :
- 9.0
- Parameters:
-
[in] instance The handle to the node instance. [in] result The result to be updated.
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter
int mmi_node_register | ( | mmi_node_h | node | ) |
Registers a node.
This function registers the node within the MMI framework.
- Since :
- 9.0
- Parameters:
-
[in] node The handle to the node to be registered.
- Returns:
- An integer value indicating the result of the operation.
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter
- Precondition:
- The node must exist and be properly initialized.
- Postcondition:
- The node is registered within the MMI framework.
int mmi_node_set_activated_cb | ( | mmi_node_h | node, |
mmi_node_activated_cb | callback, | ||
void * | user_data | ||
) |
Sets a callback function to be invoked when the node is activated.
This function sets a callback function that will be called when the node is activated.
- Since :
- 9.0
- Parameters:
-
[in] node The handle of the node for which the activated callback function is to be set. [in] callback The callback function to be called when the node is activated. [in] user_data The user data to be passed to the callback function.
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter
- See also:
- mmi_node_activated_cb()
int mmi_node_set_attribute_set_cb | ( | mmi_node_h | node, |
mmi_node_attribute_set_cb | callback, | ||
void * | user_data | ||
) |
Sets a callback function to be invoked when an attribute is set on the node.
This function sets a callback function that will be called when an attribute is set on the node.
- Since :
- 9.0
- Parameters:
-
[in] node The handle of the node for which the attribute set callback function is to be set. [in] callback The callback function to be called when an attribute is set on the node. [in] user_data The user data to be passed to the callback function.
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter
- See also:
- mmi_node_attribute_set_cb()
int mmi_node_set_deactivated_cb | ( | mmi_node_h | node, |
mmi_node_deactivated_cb | callback, | ||
void * | user_data | ||
) |
Sets a callback function to be invoked when the specified MMI node is deactivated.
This function sets a callback function that will be called whenever the specified node is deactivated.
- Since :
- 9.0
- Parameters:
-
[in] node The handle of the MMI node. [in] callback The callback function to be called when the node is deactivated. [in] user_data The user data to be passed to the callback function.
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter
- See also:
- mmi_node_deactivated_cb()
- mmi_node_unset_deactivated_cb()
int mmi_node_set_deinitialized_cb | ( | mmi_node_h | node, |
mmi_node_deinitialized_cb | callback, | ||
void * | user_data | ||
) |
Sets a callback function to be invoked when the node is deinitialized.
This function sets a callback function that will be called when the node is deinitialized.
- Since :
- 9.0
- Parameters:
-
[in] node The handle of the node for which the deinitialized callback function is to be set. [in] callback The callback function to be called when the node is deinitialized. [in] user_data The user data to be passed to the callback function.
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter
- See also:
- mmi_node_deinitialized_cb()
int mmi_node_set_initialized_cb | ( | mmi_node_h | node, |
mmi_node_initialized_cb | callback, | ||
void * | user_data | ||
) |
Sets a callback function to be invoked when the node is initialized.
This function sets a callback function that will be called when the node is initialized.
- Since :
- 9.0
- Parameters:
-
[in] node The handle of the node for which the initialized callback function is to be set. [in] callback The callback function to be called when the node is initialized. [in] user_data The user data to be passed to the callback function.
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter
- See also:
- mmi_node_initialized_cb()
int mmi_node_set_signal_received_cb | ( | mmi_node_h | node, |
mmi_node_signal_received_cb | callback, | ||
void * | user_data | ||
) |
Sets a callback function to be invoked when a signal is received by the specified MMI node.
This function sets a callback function that will be called whenever a signal is received by the specified node.
- Since :
- 9.0
- Parameters:
-
[in] node The handle of the MMI node. [in] callback The callback function to be called when a signal is received. [in] user_data The user data to be passed to the callback function.
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter
- See also:
- mmi_node_signal_received_cb()
- mmi_node_unset_signal_received_cb()
int mmi_port_clone | ( | mmi_port_h | port, |
mmi_port_h * | cloned | ||
) |
Clones a port.
This function creates a copy of the specified port.
- Since :
- 9.0
- Remarks:
- The cloned should be released using mmi_port_destroy().
- Parameters:
-
[in] port The port handle to be cloned. [out] cloned A pointer to the newly created cloned port handle.
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter MMI_ERROR_OUT_OF_MEMORY Out of memory
- Precondition:
- The port handle must be valid and initialized.
- Postcondition:
- The cloned port handle must be destroyed using mmi_port_destroy() after use.
- Example
#include <mmi.h> ... mmi_port_h port; // Indicates the handle of the port mmi_port_h cloned = NULL; mmi_port_clone(port, &cloned); ... mmi_port_destroy(cloned);
- See also:
- mmi_port_create()
- mmi_port_destroy()
int mmi_port_create | ( | mmi_port_h * | port | ) |
Creates a new port.
This function creates a new port and initializes its resources.
- Since :
- 9.0
- Remarks:
- The port should be released using mmi_port_destroy().
- Parameters:
-
[out] port A pointer to the newly created port handle.
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter MMI_ERROR_OUT_OF_MEMORY Out of memory
- Example
#include <mmi.h> ... mmi_port_h port = NULL; mmi_port_create(&port); ... mmi_port_destroy(port);
- See also:
- mmi_port_destroy()
int mmi_port_destroy | ( | mmi_port_h | port | ) |
Destroys a port.
This function destroys the specified port, releasing all associated resources.
- Since :
- 9.0
- Parameters:
-
[in] port The handle of the port to be destroyed.
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter MMI_ERROR_OUT_OF_MEMORY Out of memory
int mmi_port_get_data_type | ( | mmi_port_h | port, |
mmi_data_type_e * | data_type | ||
) |
Gets the data type of a port.
This function retrieves the data type associated with the specified port.
- Since :
- 9.0
- Parameters:
-
[in] port The port handle. [out] data_type A pointer to the variable that will receive the data type of the port.
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter
- Precondition:
- The port handle must be valid and initialized.
- See also:
- mmi_port_set_data_type()
- mmi_data_type_e
int mmi_port_get_name | ( | mmi_port_h | port, |
char ** | name, | ||
size_t * | length | ||
) |
Gets the name of a port.
This function retrieves the name associated with the specified port.
- Since :
- 9.0
- Remarks:
- The name should be released using free().
- Parameters:
-
[in] port The port handle. [out] name A pointer to the buffer where the name will be stored. [out] length A pointer to the variable that will receive the length of the name.
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter
- Precondition:
- The port handle must be valid and initialized.
- Postcondition:
- The caller is responsible for freeing the allocated memory for the name.
- Example
#include <mmi.h> ... mmi_port_h port; // Indicates the handle of the port char *name = NULL; size_t length = 0; mmi_port_get_name(port, &name, &length); ... free(name);
- See also:
- mmi_port_set_name()
int mmi_port_get_type | ( | mmi_port_h | port, |
mmi_port_type_e * | type | ||
) |
Gets the type of a port.
This function retrieves the type associated with the specified port.
- Since :
- 9.0
- Parameters:
-
[in] port The port handle. [out] type A pointer to the variable that will receive the type of the port.
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter
- Precondition:
- The port handle must be valid and initialized.
- See also:
- mmi_port_set_type()
- mmi_port_type_e
int mmi_port_instance_generate_output | ( | mmi_port_instance_h | instance, |
mmi_data_h | data | ||
) |
Generates data to the port with the given port instance.
This function generates data to the specified port using the provided port instance and data handle.
- Since :
- 9.0
- Parameters:
-
[in] instance The handle of the port instance. [in] data The handle of the data to be generated.
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter MMI_ERROR_OUT_OF_MEMORY Out of memory
int mmi_port_set_data_type | ( | mmi_port_h | port, |
mmi_data_type_e | data_type | ||
) |
Sets the data type of a port.
This function sets the data type for the specified port.
- Since :
- 9.0
- Parameters:
-
[in] port The port handle. [in] data_type The new data type to be set for the port.
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter
- Precondition:
- The port handle must be valid and initialized.
- See also:
- mmi_port_get_data_type()
- mmi_data_type_e
int mmi_port_set_input_data_received_cb | ( | mmi_port_h | port, |
mmi_port_input_data_received_cb | callback, | ||
void * | user_data | ||
) |
Sets the input data received callback function.
This function sets the callback function that will be invoked when input data is received on the specified port.
- Since :
- 9.0
- Parameters:
-
[in] port The handle of the MMI port. [in] callback The callback function to set. [in] user_data The user data to be passed to the callback function.
- Returns:
0
on success, otherwise a negative error value.
- Return values:
-
MMI_ERROR_NONE Successful. MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter.
int mmi_port_set_name | ( | mmi_port_h | port, |
const char * | name | ||
) |
Sets the name of a port.
This function sets the name for the specified port.
- Since :
- 9.0
- Parameters:
-
[in] port The port handle. [in] name The new name to be set for the port.
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter
- Precondition:
- The port handle must be valid and initialized.
- See also:
- mmi_port_get_name()
int mmi_port_set_type | ( | mmi_port_h | port, |
mmi_port_type_e | type | ||
) |
Sets the type of a port.
This function sets the type for the specified port.
- Since :
- 9.0
- Parameters:
-
[in] port The port handle. [in] type The new type to be set for the port.
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
MMI_ERROR_NONE Successful MMI_ERROR_NOT_SUPPORTED Not supported MMI_ERROR_INVALID_PARAMETER Invalid parameter
- Precondition:
- The port handle must be valid and initialized.
- See also:
- mmi_port_get_type()
- mmi_port_type_e