Tizen Native API
6.0
|
The Component Context API contains functions for obtaining information about running components.
Required Header
#include <component_manager.h>
Overview
- Remarks:
- The Component Context API provides information about running components.
Functions | |
int | component_context_destroy (component_context_h handle) |
Destroys the component context handle and releases all its resources. | |
int | component_context_get_app_id (component_context_h handle, char **app_id) |
Gets the application ID of the component. | |
int | component_context_get_component_id (component_context_h handle, char **component_id) |
Gets the ID of the component. | |
int | component_context_get_instance_id (component_context_h handle, char **instance_id) |
Gets the instance ID of the component. | |
int | component_context_get_component_state (component_context_h handle, component_state_e *state) |
Gets the state of the component. | |
int | component_context_is_terminated (component_context_h handle, bool *terminated) |
Checks whether the component is terminated or not. | |
int | component_context_is_subcomponent (component_context_h handle, bool *is_subcomponent) |
Checks whether the component is running as sub component of the group. | |
int | component_context_clone (component_context_h *clone, component_context_h handle) |
Clones the component context handle. | |
Typedefs | |
typedef void * | component_context_h |
Component context handle. |
Typedef Documentation
typedef void* component_context_h |
Component context handle.
- Since :
- 5.5
Enumeration Type Documentation
enum component_state_e |
Enumeration for the component state.
- Since :
- 5.5
- Enumerator:
Function Documentation
int component_context_clone | ( | component_context_h * | clone, |
component_context_h | handle | ||
) |
Clones the component context handle.
- Since :
- 5.5
- Remarks:
- The clone should be released using component_context_destroy().
- Parameters:
-
[out] clone A newly created component context handle, if cloning is successful [in] handle The component context handle
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
COMPONENT_MANAGER_ERROR_NONE Successful COMPONENT_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter COMPONENT_MANAGER_ERROR_OUT_OF_MEMORY Out of memory
int component_context_destroy | ( | component_context_h | handle | ) |
Destroys the component context handle and releases all its resources.
- Since :
- 5.5
- Parameters:
-
[in] handle The component context handle
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
COMPONENT_MANAGER_ERROR_NONE Successful COMPONENT_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
int component_context_get_app_id | ( | component_context_h | handle, |
char ** | app_id | ||
) |
Gets the application ID of the component.
- Since :
- 5.5
- Remarks:
- You MUST release
app_id
using free().
- Parameters:
-
[in] handle The component context handle [out] app_id The application ID
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
COMPONENT_MANAGER_ERROR_NONE Successful COMPONENT_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter COMPONENT_MANAGER_ERROR_OUT_OF_MEMORY Out of memory
int component_context_get_component_id | ( | component_context_h | handle, |
char ** | component_id | ||
) |
Gets the ID of the component.
- Since :
- 5.5
- Remarks:
- You MUST release
comp_id
using free().
- Parameters:
-
[in] handle The component context handle [out] component_id The component ID
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
COMPONENT_MANAGER_ERROR_NONE Successful COMPONENT_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter COMPONENT_MANAGER_ERROR_OUT_OF_MEMORY Out of memory
int component_context_get_component_state | ( | component_context_h | handle, |
component_state_e * | state | ||
) |
Gets the state of the component.
- Since :
- 5.5
- Parameters:
-
[in] handle The component context handle [out] state The component state
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
COMPONENT_MANAGER_ERROR_NONE Successful COMPONENT_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
int component_context_get_instance_id | ( | component_context_h | handle, |
char ** | instance_id | ||
) |
Gets the instance ID of the component.
- Since :
- 5.5
- Remarks:
- You MUST release
instance_id
using free().
- Parameters:
-
[in] handle The component context handle [out] instance_id The instance ID
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
COMPONENT_MANAGER_ERROR_NONE Successful COMPONENT_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter COMPONENT_MANAGER_ERROR_OUT_OF_MEMORY Out of memory
int component_context_is_subcomponent | ( | component_context_h | handle, |
bool * | is_subcomponent | ||
) |
Checks whether the component is running as sub component of the group.
- Since :
- 5.5
- Parameters:
-
[in] handle The component context handle [out] is_subcomponent true
if the sub component of the group,
otherwisefalse
if the main component of the group
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
COMPONENT_MANAGER_ERROR_NONE Successful COMPONENT_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
int component_context_is_terminated | ( | component_context_h | handle, |
bool * | terminated | ||
) |
Checks whether the component is terminated or not.
- Since :
- 5.5
- Parameters:
-
[in] handle The component context handle [out] terminated true
if the component is terminated,
otherwisefalse
if the component is running
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
COMPONENT_MANAGER_ERROR_NONE Successful COMPONENT_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter COMPONENT_MANAGER_ERROR_OUT_OF_MEMORY Out of memory COMPONENT_MANAGER_ERROR_IO_ERROR I/O error