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
The component class handle.
- Since :
- 5.5
The component context handle.
- Since :
- 5.5
Enumeration Type Documentation
Enumeration for device orientation.
- Since :
- 5.5
- Enumerator:
COMPONENT_DEVICE_ORIENTATION_0 |
The device is oriented in a natural position
|
COMPONENT_DEVICE_ORIENTATION_90 |
The device's left side is at the top
|
COMPONENT_DEVICE_ORIENTATION_180 |
The device is upside down
|
COMPONENT_DEVICE_ORIENTATION_270 |
The device's right side is at the top
|
Enumeration for display status.
- Since :
- 5.5
- Enumerator:
COMPONENT_DISPLAY_STATUS_ON |
The display status is on
|
COMPONENT_DISPLAY_STATUS_OFF |
The display status is off
|
Enumeration for component error.
- Since :
- 5.5
- Enumerator:
COMPONENT_ERROR_NONE |
Successful
|
COMPONENT_ERROR_INVALID_PARAMETER |
Invalid parameter
|
COMPONENT_ERROR_OUT_OF_MEMORY |
Out of memory
|
COMPONENT_ERROR_INVALID_CONTEXT |
Invalid component context
|
COMPONENT_ERROR_NOT_SUPPORTED |
Not supported
|
COMPONENT_ERROR_NOT_FOUND |
Not found
|
COMPONENT_ERROR_LAUNCH_REJECTED |
The application cannot be launched now
|
COMPONENT_ERROR_LAUNCH_FAILED |
Internal launch error
|
COMPONENT_ERROR_TIMED_OUT |
Time out
|
COMPONENT_ERROR_PERMISSION_DENIED |
Permission denied
|
Enumeration for battery status.
- Since :
- 5.5
- Enumerator:
COMPONENT_LOW_BATTERY_NONE |
None
|
COMPONENT_LOW_BATTERY_POWER_OFF |
The battery status is under 1%
|
COMPONENT_LOW_BATTERY_CRITICAL_LOW |
The battery status is under 5%
|
Enumeration for low memory status.
- Since :
- 5.5
- Enumerator:
COMPONENT_LOW_MEMORY_NONE |
None
|
COMPONENT_LOW_MEMORY_NORMAL |
Normal status
|
COMPONENT_LOW_MEMORY_SOFT_WARNING |
Soft warning status
|
COMPONENT_LOW_MEMORY_HARD_WARNING |
Hard warning status
|
Enumeration for suspended state.
- Since :
- 5.5
- Enumerator:
COMPONENT_SUSPENDED_STATE_WILL_ENTER |
The component will enter the suspended state
|
COMPONENT_SUSPENDED_STATE_DID_EXIT |
The component did exit from the suspended state
|
Function Documentation
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:
-
Gets the ID of the component.
- Since :
- 5.5
- 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:
-
Gets the instance ID of the component.
- Since :
- 5.5
- 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:
-
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:
-
- See also:
- frame_component_action_cb()
-
component_deregister_action()
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
- 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:
-
- See also:
- app_control_destroy()
-
app_control_send_launch_request_sync()