Tizen Native API
5.5
|
The Component Based Common Registering action for Application Control and Launching request for Application Control.
Required Header
#include <component_common.h>
Overview
The Component Based Common API provides functions for registering and deregistering action for app-control and provides functions for launching request with the app-control synchronous or asynchronous.
Functions | |
int | component_get_id (component_h context, char **id) |
Gets the ID of the component. | |
int | component_get_instance_id (component_h context, char **instance_id) |
Gets the instance ID of the component. | |
int | component_register_action (component_h context, const char *action) |
Registers the app_control action. | |
int | component_deregister_action (component_h context, const char *action) |
Deregisters the registered app_control action. | |
int | component_send_launch_request_async (component_h context, app_control_h app_control, app_control_result_cb result_cb, app_control_reply_cb reply_cb, void *user_data) |
Sends the launch request asynchronously. | |
int | component_send_launch_request_sync (component_h context, app_control_h app_control, app_control_h *reply, app_control_result_e *result) |
Sends the launch request synchronously. | |
int | component_finish (component_h context) |
Finishes the component instance. | |
Typedefs | |
typedef void * | component_class_h |
The component class handle. | |
typedef void * | component_h |
The component context handle. |
Typedef Documentation
typedef void* component_class_h |
The component class handle.
- Since :
- 5.5
typedef void* component_h |
The component context handle.
- Since :
- 5.5
Enumeration Type Documentation
Enumeration for device orientation.
- Since :
- 5.5
enum component_error_e |
Enumeration for component error.
- Since :
- 5.5
- Enumerator:
Function Documentation
int component_deregister_action | ( | component_h | context, |
const char * | action | ||
) |
Deregisters the registered app_control action.
- Since :
- 5.5
- Parameters:
-
[in] context The context of the component instance [in] action The name of the app_control action
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
COMPONENT_ERROR_NONE Successful COMPONENT_ERROR_INVALID_PARAMETER Invalid parameter
int component_finish | ( | component_h | context | ) |
Finishes the component instance.
- Since :
- 5.5
- Parameters:
-
[in] context The context of the component instance
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
COMPONENT_ERROR_NONE Successful COMPONENT_ERROR_INVALID_PARAMETER Invalid parameter
int component_get_id | ( | component_h | context, |
char ** | id | ||
) |
Gets the ID of the component.
- Since :
- 5.5
- Remarks:
id
must be released using free().
- Parameters:
-
[in] context The context of the component instance [out] id The ID of the component
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
COMPONENT_ERROR_NONE Successful COMPONENT_ERROR_INVALID_PARAMETER Invalid parameter COMPONENT_ERROR_OUT_OF_MEMORY Out of memory
int component_get_instance_id | ( | component_h | context, |
char ** | instance_id | ||
) |
Gets the instance ID of the component.
- Since :
- 5.5
- Remarks:
instance_id
must be released using free().
- Parameters:
-
[in] context The context of the component instance [out] instance_id The instance ID of the component
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
COMPONENT_ERROR_NONE Successful COMPONENT_ERROR_INVALID_PARAMETER Invalid parameter COMPONENT_ERROR_OUT_OF_MEMORY Out of memory
int component_register_action | ( | component_h | context, |
const char * | action | ||
) |
Registers the app_control action.
This function is for handling each application control action. action must match id attribute of app_control element in the tizen-manifest.xml.
- Since :
- 5.5
- Parameters:
-
[in] context The context of the component instance [in] action The name of the app_control action
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
COMPONENT_ERROR_NONE Successful COMPONENT_ERROR_INVALID_PARAMETER Invalid parameter
int component_send_launch_request_async | ( | component_h | context, |
app_control_h | app_control, | ||
app_control_result_cb | result_cb, | ||
app_control_reply_cb | reply_cb, | ||
void * | user_data | ||
) |
Sends the launch request asynchronously.
To use group mode, you must use this function instead of app_control_send_launch_request_async().
- Since :
- 5.5
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/appmanager.launch
- Parameters:
-
[in] context The context of the component instance [in] app_control The app_control handle [in] result_cb The callback function to be called when the result is delivered [in] reply_cb The callback function to be called when the reply is delivered [in] user_data The user data to be passed to the callback function
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
COMPONENT_ERROR_NONE Successful COMPONENT_ERROR_PERMISSION_DENIED Permission denied COMPONENT_ERROR_INVALID_PARAMETER Invalid parameter COMPONENT_ERROR_OUT_OF_MEMORY Out of memory COMPONENT_ERROR_NOT_FOUND The application to run the given launch request is not found COMPONENT_ERROR_LAUNCH_REJECTED The application cannot be launched in current context COMPONENT_ERROR_LAUNCH_FAILED Failed to launch the application COMPONENT_ERROR_TIMED_OUT Failed due to timeout. The application that handles app_control may be busy
int component_send_launch_request_sync | ( | component_h | context, |
app_control_h | app_control, | ||
app_control_h * | reply, | ||
app_control_result_e * | result | ||
) |
Sends the launch request synchronously.
To use group mode, you must use this function instead of app_control_send_launch_request_sync().
- Since :
- 5.5
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/appmanager.launch
- Remarks:
- The reply must be released using app_control_destroy().
- Parameters:
-
[in] context The context of the component instance [in] app_control The app_control handle [out] reply The app_control handle in which the results of the callee are contained [out] result The result code of the launch request
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
COMPONENT_ERROR_NONE Successful COMPONENT_ERROR_PERMISSION_DENIED Permission denied COMPONENT_ERROR_INVALID_PARAMETER Invalid parameter COMPONENT_ERROR_OUT_OF_MEMORY Out of memory COMPONENT_ERROR_NOT_FOUND The application to run the given launch request is not found COMPONENT_ERROR_LAUNCH_REJECTED The application cannot be launched in current context COMPONENT_ERROR_LAUNCH_FAILED Failed to launch the application COMPONENT_ERROR_TIMED_OUT Failed due to timeout. The application that handles app_control may be busy