Tizen Native API
|
Functions | |
int | vc_cmd_list_create (vc_cmd_list_h *vc_cmd_list) |
Creates a handle for command list. | |
int | vc_cmd_list_destroy (vc_cmd_list_h vc_cmd_list, bool free_command) |
Destroys the handle for command list. | |
int | vc_cmd_list_get_count (vc_cmd_list_h vc_cmd_list, int *count) |
Gets command count of list. | |
int | vc_cmd_list_add (vc_cmd_list_h vc_cmd_list, vc_cmd_h vc_command) |
Adds command to command list. | |
int | vc_cmd_list_remove (vc_cmd_list_h vc_cmd_list, vc_cmd_h vc_command) |
Removes command from command list. | |
int | vc_cmd_list_foreach_commands (vc_cmd_list_h vc_cmd_list, vc_cmd_list_cb callback, void *user_data) |
Retrieves all commands of command list using callback function. | |
int | vc_cmd_list_first (vc_cmd_list_h vc_cmd_list) |
Moves index to first command. | |
int | vc_cmd_list_last (vc_cmd_list_h vc_cmd_list) |
Moves index to last command. | |
int | vc_cmd_list_next (vc_cmd_list_h vc_cmd_list) |
Moves index to next command. | |
int | vc_cmd_list_prev (vc_cmd_list_h vc_cmd_list) |
Moves index to previous command. | |
int | vc_cmd_list_get_current (vc_cmd_list_h vc_cmd_list, vc_cmd_h *vc_command) |
Get current command from command list by index. | |
int | vc_cmd_create (vc_cmd_h *vc_command) |
Creates a handle for command. | |
int | vc_cmd_destroy (vc_cmd_h vc_command) |
Destroys the handle. | |
int | vc_cmd_set_command (vc_cmd_h vc_command, const char *command) |
Sets command. | |
int | vc_cmd_get_command (vc_cmd_h vc_command, char **command) |
Gets command. | |
int | vc_cmd_set_type (vc_cmd_h vc_command, int type) |
Sets command type. | |
int | vc_cmd_get_type (vc_cmd_h vc_command, int *type) |
Gets command type. | |
Typedefs | |
typedef struct vc_cmd_s * | vc_cmd_h |
The voice command handle. | |
typedef struct vc_cmd_list_s * | vc_cmd_list_h |
The voice command list handle. | |
typedef bool(* | vc_cmd_list_cb )(vc_cmd_h vc_command, void *user_data) |
Called to retrieve The commands in list. |
The Voice control command API provides functions for creating/destroying command list and add/remove/retrieve commands of list.
Typedef Documentation
typedef struct vc_cmd_s* vc_cmd_h |
The voice command handle.
- Since :
- 2.4
typedef bool(* vc_cmd_list_cb)(vc_cmd_h vc_command, void *user_data) |
Called to retrieve The commands in list.
- Since :
- 2.4
- Parameters:
-
[in] vc_command The command handle [in] user_data The user data passed from the foreach function
- Returns:
true
to continue with the next iteration of the loop,
false
to break out of the loop.
- Precondition:
- vc_cmd_list_foreach_commands() will invoke this callback.
- See also:
- vc_cmd_list_foreach_commands()
typedef struct vc_cmd_list_s* vc_cmd_list_h |
The voice command list handle.
- Since :
- 2.4
Function Documentation
int vc_cmd_create | ( | vc_cmd_h * | vc_command | ) |
Creates a handle for command.
- Since :
- 2.4
- Remarks:
- If the function succeeds, The command handle must be released with vc_cmd_destroy() or vc_cmd_list_destroy(). You should set command and type if command is valid
- Parameters:
-
[out] vc_command The command handle
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
VC_ERROR_NONE Successful VC_ERROR_OUT_OF_MEMORY Out of memory VC_ERROR_INVALID_PARAMETER Invalid parameter VC_ERROR_PERMISSION_DENIED Permission denied VC_ERROR_NOT_SUPPORTED Not supported
- See also:
- vc_cmd_destroy()
int vc_cmd_destroy | ( | vc_cmd_h | vc_command | ) |
Destroys the handle.
- Since :
- 2.4
- Parameters:
-
[in] vc_command The command handle
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
VC_ERROR_NONE Successful VC_ERROR_INVALID_PARAMETER Invalid parameter VC_ERROR_PERMISSION_DENIED Permission denied VC_ERROR_NOT_SUPPORTED Not supported
- See also:
- vc_cmd_create()
int vc_cmd_get_command | ( | vc_cmd_h | vc_command, |
char ** | command | ||
) |
Gets command.
- Since :
- 2.4
- Remarks:
- If the function succeeds, command must be released with free() by you if they are not NULL.
- Parameters:
-
[in] vc_command The command handle [out] command The command text
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
VC_ERROR_NONE Successful VC_ERROR_INVALID_PARAMETER Invalid parameter VC_ERROR_PERMISSION_DENIED Permission denied VC_ERROR_NOT_SUPPORTED Not supported
- See also:
- vc_cmd_set_command()
int vc_cmd_get_type | ( | vc_cmd_h | vc_command, |
int * | type | ||
) |
Gets command type.
- Since :
- 2.4
- Parameters:
-
[in] vc_command The command handle [out] type The command type
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
VC_ERROR_NONE Successful VC_ERROR_INVALID_PARAMETER Invalid parameter VC_ERROR_PERMISSION_DENIED Permission denied VC_ERROR_NOT_SUPPORTED Not supported
- See also:
- vc_cmd_set_type()
int vc_cmd_list_add | ( | vc_cmd_list_h | vc_cmd_list, |
vc_cmd_h | vc_command | ||
) |
Adds command to command list.
- Since :
- 2.4
- Parameters:
-
[in] vc_cmd_list The command list handle [in] vc_command The command handle
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
VC_ERROR_NONE Successful VC_ERROR_INVALID_PARAMETER Invalid parameter VC_ERROR_PERMISSION_DENIED Permission denied VC_ERROR_NOT_SUPPORTED Not supported
- See also:
- vc_cmd_list_remove()
int vc_cmd_list_create | ( | vc_cmd_list_h * | vc_cmd_list | ) |
Creates a handle for command list.
- Since :
- 2.4
- Remarks:
- If the function succeeds, The list handle must be released with vc_cmd_list_destroy().
- Parameters:
-
[out] vc_cmd_list The command list handle
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
VC_ERROR_NONE Successful VC_ERROR_OUT_OF_MEMORY Out of memory VC_ERROR_INVALID_PARAMETER Invalid parameter VC_ERROR_PERMISSION_DENIED Permission denied VC_ERROR_NOT_SUPPORTED Not supported
- See also:
- vc_cmd_list_destroy()
int vc_cmd_list_destroy | ( | vc_cmd_list_h | vc_cmd_list, |
bool | free_command | ||
) |
Destroys the handle for command list.
- Since :
- 2.4
- Parameters:
-
[in] vc_cmd_list The command list handle [in] free_command The command free option true
= release each commands in list,false
= remove command from list
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
VC_ERROR_NONE Successful VC_ERROR_INVALID_PARAMETER Invalid parameter VC_ERROR_PERMISSION_DENIED Permission denied VC_ERROR_NOT_SUPPORTED Not supported
- See also:
- vc_cmd_list_create()
int vc_cmd_list_first | ( | vc_cmd_list_h | vc_cmd_list | ) |
Moves index to first command.
- Since :
- 2.4
- Parameters:
-
[in] vc_cmd_list The command list handle
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
VC_ERROR_NONE Successful VC_ERROR_INVALID_PARAMETER Invalid parameter VC_ERROR_EMPTY List empty VC_ERROR_PERMISSION_DENIED Permission denied VC_ERROR_NOT_SUPPORTED Not supported
- See also:
- vc_cmd_list_last()
int vc_cmd_list_foreach_commands | ( | vc_cmd_list_h | vc_cmd_list, |
vc_cmd_list_cb | callback, | ||
void * | user_data | ||
) |
Retrieves all commands of command list using callback function.
- Since :
- 2.4
- Parameters:
-
[in] vc_cmd_list The command list handle [in] callback Callback function to invoke [in] user_data The user data to be passed to the callback function
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
VC_ERROR_NONE Successful VC_ERROR_INVALID_PARAMETER Invalid parameter VC_ERROR_PERMISSION_DENIED Permission denied VC_ERROR_NOT_SUPPORTED Not supported
- Postcondition:
- This function invokes vc_cmd_list_cb() repeatedly for getting commands.
- See also:
- vc_cmd_list_cb()
int vc_cmd_list_get_count | ( | vc_cmd_list_h | vc_cmd_list, |
int * | count | ||
) |
Gets command count of list.
- Since :
- 2.4
- Parameters:
-
[in] vc_cmd_list The command list handle [out] count The count
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
VC_ERROR_NONE Successful VC_ERROR_INVALID_PARAMETER Invalid parameter VC_ERROR_PERMISSION_DENIED Permission denied VC_ERROR_NOT_SUPPORTED Not supported
int vc_cmd_list_get_current | ( | vc_cmd_list_h | vc_cmd_list, |
vc_cmd_h * | vc_command | ||
) |
Get current command from command list by index.
- Since :
- 2.4
- Parameters:
-
[in] vc_cmd_list The command list handle [out] vc_command The command handle
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
VC_ERROR_NONE Successful VC_ERROR_INVALID_PARAMETER Invalid parameter VC_ERROR_EMPTY List empty VC_ERROR_PERMISSION_DENIED Permission denied VC_ERROR_NOT_SUPPORTED Not supported
int vc_cmd_list_last | ( | vc_cmd_list_h | vc_cmd_list | ) |
Moves index to last command.
- Since :
- 2.4
- Parameters:
-
[in] vc_cmd_list The command list handle
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
VC_ERROR_NONE Successful VC_ERROR_INVALID_PARAMETER Invalid parameter VC_ERROR_EMPTY List empty VC_ERROR_PERMISSION_DENIED Permission denied VC_ERROR_NOT_SUPPORTED Not supported
- See also:
- vc_cmd_list_first()
int vc_cmd_list_next | ( | vc_cmd_list_h | vc_cmd_list | ) |
Moves index to next command.
- Since :
- 2.4
- Parameters:
-
[in] vc_cmd_list The command list handle
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
VC_ERROR_NONE Successful VC_ERROR_INVALID_PARAMETER Invalid parameter VC_ERROR_EMPTY List empty VC_ERROR_ITERATION_END List reached end VC_ERROR_PERMISSION_DENIED Permission denied VC_ERROR_NOT_SUPPORTED Not supported
- See also:
- vc_cmd_list_prev()
int vc_cmd_list_prev | ( | vc_cmd_list_h | vc_cmd_list | ) |
Moves index to previous command.
- Since :
- 2.4
- Parameters:
-
[in] vc_cmd_list The command list handle
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
VC_ERROR_NONE Successful VC_ERROR_INVALID_PARAMETER Invalid parameter VC_ERROR_EMPTY List empty VC_ERROR_ITERATION_END List reached end VC_ERROR_PERMISSION_DENIED Permission denied VC_ERROR_NOT_SUPPORTED Not supported
- See also:
- vc_cmd_list_next()
int vc_cmd_list_remove | ( | vc_cmd_list_h | vc_cmd_list, |
vc_cmd_h | vc_command | ||
) |
Removes command from command list.
- Since :
- 2.4
- Parameters:
-
[in] vc_cmd_list The command list handle [in] vc_command The command handle
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
VC_ERROR_NONE Successful VC_ERROR_INVALID_PARAMETER Invalid parameter VC_ERROR_PERMISSION_DENIED Permission denied VC_ERROR_NOT_SUPPORTED Not supported
- See also:
- vc_cmd_list_add()
int vc_cmd_set_command | ( | vc_cmd_h | vc_command, |
const char * | command | ||
) |
Sets command.
- Since :
- 2.4
- Parameters:
-
[in] vc_command The command handle [in] command The command text
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
VC_ERROR_NONE Successful VC_ERROR_INVALID_PARAMETER Invalid parameter VC_ERROR_PERMISSION_DENIED Permission denied VC_ERROR_NOT_SUPPORTED Not supported
- See also:
- vc_cmd_get_command()
int vc_cmd_set_type | ( | vc_cmd_h | vc_command, |
int | type | ||
) |
Sets command type.
- Since :
- 2.4
- Remarks:
- If you do not set the command type, the default value is -1. You should set type if command is valid
- Parameters:
-
[in] vc_command The command handle [in] type The command type
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
VC_ERROR_NONE Successful VC_ERROR_INVALID_PARAMETER Invalid parameter VC_ERROR_PERMISSION_DENIED Permission denied VC_ERROR_NOT_SUPPORTED Not supported
- See also:
- vc_cmd_get_type()