Tizen Native API
9.0
|
The MMI Workflow API provides functions for creating MMI workflow modules.
Required Header
#include <mmi-workflow.h>
Overview
The MMI Workflow API provides functions to manage workflows in the MMI framework. Workflows consist of nodes connected together to form a graph representing a series of actions executed in response to certain data flows, events, or conditions.
This API set allows you to:
- create/destroy workflows
- set/get the standard type of a workflow
- add nodes to a workflow
- link nodes together by specifying input and output ports
- assign attributes to nodes within a workflow
- set default values for attributes
- assign signals to nodes within a workflow
- associate workflow output with a specific node and port
- register standard workflows
- create custom workflows from scripts
Functions | |
int | mmi_workflow_create (mmi_workflow_h *workflow) |
Creates a new workflow prototype. | |
int | mmi_workflow_set_type (mmi_workflow_h workflow, mmi_standard_workflow_type_e type) |
Sets the type of a workflow prototype. | |
int | mmi_workflow_get_type (mmi_workflow_h workflow, mmi_standard_workflow_type_e *type) |
Gets the type of a workflow prototype. | |
int | mmi_workflow_node_add (mmi_workflow_h workflow, const char *node_name, mmi_node_h node) |
Adds a node to a workflow prototype. | |
int | mmi_workflow_link_nodes_by_names (mmi_workflow_h workflow, const char *from_node_name, const char *from_port_name, const char *to_node_name, const char *to_port_name) |
Links two nodes in a workflow prototype using their names and port names. | |
int | mmi_workflow_attribute_assign (mmi_workflow_h workflow, const char *attribute_name, const char *target_node_name, const char *target_attribute_name) |
Assigns an attribute of a workflow to an attribute of a specific node. | |
int | mmi_workflow_attribute_set_default_value (mmi_workflow_h workflow, mmi_attribute_h default_value) |
Sets the default value of an attribute of a workflow. | |
int | mmi_workflow_signal_assign (mmi_workflow_h workflow, const char *signal_name, const char *target_node_name, const char *target_signal_name) |
Assigns a signal of a workflow to a signal of a specific node in a workflow prototype. | |
int | mmi_workflow_output_assign (mmi_workflow_h workflow, const char *workflow_output, const char *out_node_name, const char *node_out_port_name) |
Assigns an output of a workflow to a OUT port of a specific node in a workflow prototype. | |
int | mmi_workflow_output_assign_by_port (mmi_workflow_h workflow, const char *workflow_output, mmi_port_h port) |
Assigns an output of a workflow to a OUT port of a specific node in a workflow prototype using a port handle. | |
int | mmi_standard_workflow_register (mmi_workflow_h workflow) |
Registers a standard workflow prototype to the workflow manager. | |
int | mmi_workflow_clone (mmi_workflow_h workflow, mmi_workflow_h *cloned) |
Clones a workflow. | |
int | mmi_workflow_create_from_script (const char *script, mmi_workflow_h *workflow) |
Creates a workflow prototype from a script. | |
int | mmi_workflow_destroy (mmi_workflow_h workflow) |
Destroys a workflow prototype. | |
Typedefs | |
typedef struct mmi_workflow_s * | mmi_workflow_h |
Handle for MMI workflow prototypes. |
Typedef Documentation
typedef struct mmi_workflow_s* mmi_workflow_h |
Handle for MMI workflow prototypes.
This handle represents a workflow prototype created within the MMI framework.
- Since :
- 9.0
Enumeration Type Documentation
Enumeration for standard MMI workflows.
This enumeration defines the different types of standard workflows supported by the MMI framework.
- Since :
- 9.0
Function Documentation
int mmi_standard_workflow_register | ( | mmi_workflow_h | workflow | ) |
Registers a standard workflow prototype to the workflow manager.
This function registers a standard workflow prototype to the workflow manager for further use.
- Since :
- 9.0
- Parameters:
-
[in] workflow The handle to the workflow prototype to register.
- 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
- See also:
- mmi_workflow_h
int mmi_workflow_attribute_assign | ( | mmi_workflow_h | workflow, |
const char * | attribute_name, | ||
const char * | target_node_name, | ||
const char * | target_attribute_name | ||
) |
Assigns an attribute of a workflow to an attribute of a specific node.
This function assigns a workflow attribute to a target attribute of a specific node in the workflow prototype.
- Since :
- 9.0
- Parameters:
-
[in] workflow The handle of the workflow prototype. [in] attribute_name The name of the workflow attribute to be assigned. [in] target_node_name The name of the target node. [in] target_attribute_name The name of the target attribute in 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
- See also:
- mmi_attribute_h
int mmi_workflow_attribute_set_default_value | ( | mmi_workflow_h | workflow, |
mmi_attribute_h | default_value | ||
) |
Sets the default value of an attribute of a workflow.
This function sets the default value for a workflow attribute.
- Since :
- 9.0
- Parameters:
-
[in] workflow The handle of the workflow prototype. [in] default_value The handle of the default value 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
- See also:
- mmi_attribute_h
int mmi_workflow_clone | ( | mmi_workflow_h | workflow, |
mmi_workflow_h * | cloned | ||
) |
Clones a workflow.
This function creates a clone of the specified workflow.
- Since :
- 9.0
- Remarks:
- The cloned should be released using mmi_workflow_destroy().
- Parameters:
-
[in] workflow The handle to the workflow to clone. [out] cloned A pointer to store the handle of the cloned workflow.
- 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_workflow_h workflow; // Indicates the handle of the workflow mmi_workflow_h cloned = NULL; mmi_workflow_clone(workflow, &cloned); ... mmi_workflow_destroy(cloned);
- See also:
- mmi_workflow_h
int mmi_workflow_create | ( | mmi_workflow_h * | workflow | ) |
Creates a new workflow prototype.
This function allocates memory for a new workflow prototype and returns its handle.
- Since :
- 9.0
- Remarks:
- The workflow should be released using mmi_workflow_destroy().
- Parameters:
-
[out] workflow A pointer to store the handle of the newly created workflow prototype.
- 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_workflow_h workflow = NULL; mmi_workflow_create(&workflow); ... mmi_workflow_destroy(workflow);
- See also:
- mmi_workflow_destroy()
int mmi_workflow_create_from_script | ( | const char * | script, |
mmi_workflow_h * | workflow | ||
) |
Creates a workflow prototype from a script.
This function creates a workflow prototype from the provided script.
- Since :
- 9.0
- Remarks:
- The workflow should be released using mmi_workflow_destroy().
- Parameters:
-
[in] script The script to create the workflow prototype from. [out] workflow A pointer to store the handle of the created workflow prototype.
- 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_workflow_h workflow = NULL; mmi_workflow_create_from_script("@workflow", &workflow); ... mmi_workflow_destroy(workflow);
- See also:
- mmi_workflow_h
int mmi_workflow_destroy | ( | mmi_workflow_h | workflow | ) |
Destroys a workflow prototype.
This function destroys the specified workflow prototype.
- Since :
- 9.0
- Parameters:
-
[in] workflow The handle to the workflow prototype to destroy.
- 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
- See also:
- mmi_workflow_h
int mmi_workflow_get_type | ( | mmi_workflow_h | workflow, |
mmi_standard_workflow_type_e * | type | ||
) |
Gets the type of a workflow prototype.
This function retrieves the standard workflow type assigned to the given workflow prototype.
- Since :
- 9.0
- Parameters:
-
[in] workflow The handle of the workflow prototype. [out] type A pointer to store the retrieved standard workflow type.
- 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_workflow_link_nodes_by_names | ( | mmi_workflow_h | workflow, |
const char * | from_node_name, | ||
const char * | from_port_name, | ||
const char * | to_node_name, | ||
const char * | to_port_name | ||
) |
Links two nodes in a workflow prototype using their names and port names.
This function links the output port of one node to the input port of another node.
- Since :
- 9.0
- Parameters:
-
[in] workflow The handle of the workflow prototype. [in] from_node_name The name of the source node. [in] from_port_name The name of the output port of the source node. [in] to_node_name The name of the destination node. [in] to_port_name The name of the input port of the destination 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
- See also:
- mmi_node_h
int mmi_workflow_node_add | ( | mmi_workflow_h | workflow, |
const char * | node_name, | ||
mmi_node_h | node | ||
) |
Adds a node to a workflow prototype.
This function adds a node with a given name to the workflow prototype.
- Since :
- 9.0
- Parameters:
-
[in] workflow The handle of the workflow prototype. [in] node_name The name of the node to be added. [in] node The handle of the node to be added.
- 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_h
int mmi_workflow_output_assign | ( | mmi_workflow_h | workflow, |
const char * | workflow_output, | ||
const char * | out_node_name, | ||
const char * | node_out_port_name | ||
) |
Assigns an output of a workflow to a OUT port of a specific node in a workflow prototype.
This function assigns an output from a workflow to a target OUT port of a specific node in the workflow prototype.
- Since :
- 9.0
- Parameters:
-
[in] workflow The handle to the workflow. [in] workflow_output The name of the output to assign. [in] out_node_name The name of the target node where the output will be assigned. [in] node_out_port_name The name of the target OUT port in the target 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
- See also:
- mmi_workflow_h
int mmi_workflow_output_assign_by_port | ( | mmi_workflow_h | workflow, |
const char * | workflow_output, | ||
mmi_port_h | port | ||
) |
Assigns an output of a workflow to a OUT port of a specific node in a workflow prototype using a port handle.
This function assigns an output from a workflow to a target OUT port of a specific node in the workflow prototype using a port handle.
- Since :
- 9.0
- Parameters:
-
[in] workflow The handle to the workflow. [in] workflow_output The name of the output to assign. [in] port The handle to the target port where the output will be assigned.
- 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
- See also:
- mmi_workflow_h
- mmi_port_h
int mmi_workflow_set_type | ( | mmi_workflow_h | workflow, |
mmi_standard_workflow_type_e | type | ||
) |
Sets the type of a workflow prototype.
This function assigns a standard workflow type to the given workflow prototype.
- Since :
- 9.0
- Parameters:
-
[in] workflow The handle of the workflow prototype. [in] type The standard workflow type 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
int mmi_workflow_signal_assign | ( | mmi_workflow_h | workflow, |
const char * | signal_name, | ||
const char * | target_node_name, | ||
const char * | target_signal_name | ||
) |
Assigns a signal of a workflow to a signal of a specific node in a workflow prototype.
This function assigns a signal from a workflow to a target signal of a specific node in the workflow prototype.
- Since :
- 9.0
- Parameters:
-
[in] workflow The handle to the workflow. [in] signal_name The name of the signal to assign. [in] target_node_name The name of the target node where the signal will be assigned. [in] target_signal_name The name of the target signal in the target 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
- See also:
- mmi_workflow_h