The Component Manager API provides functions to get information about installed or running components and manage the components.
Required Header
#include <component_manager.h>
Overview
The Component Manager API provides functions to retrieve components information and to manager components. There are two iterator functions that retrieve components. One is component_manager_foreach_component_context(), which gets the information of running components, the other is component_manager_foreach_component_info(), which gets the information of installed components. The registered callback function is called as much as components exist in the list. An application can get the component's properties such as a name, a type, an icon path in the callback function. Resuming components or terminating background components are also supported to handle components.
Typedef Documentation
Called whenever the application retrieves the context of running components.
- Since :
- 5.5
- Parameters:
-
[in] | handle | The component context of each running component |
[in] | user_data | The user data passed from the foreach function |
- Returns:
true
to continue with the next iteration of the loop,
otherwise false
to break out of the loop
- Precondition:
- component_manager_foreach_component_context() will invoke this callback.
- See also:
- component_manager_foreach_component_context()
Called whenever the application retrieves the information of installed components.
- Since :
- 5.5
- Parameters:
-
[in] | handle | The component information of each installed component |
[in] | user_data | The user data passed from the foreach function |
- Returns:
true
to continue with the next iteration of the loop,
otherwise false
to break out of the loop
- Precondition:
- component_manager_foreach_component_info() will invoke this callback.
- See also:
- component_manager_foreach_component_info()
Enumeration Type Documentation
Enumerations for Component Manager Error.
- Since :
- 5.5
- Enumerator:
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 |
Internal I/O error
|
COMPONENT_MANAGER_ERROR_NO_SUCH_COMPONENT |
No such component
|
COMPONENT_MANAGER_ERROR_DB_FAILED |
Database error
|
COMPONENT_MANAGER_ERROR_INVALID_APPLICATION |
Invalid application ID
|
COMPONENT_MANAGER_ERROR_NOT_RUNNING |
Component is not running
|
COMPONENT_MANAGER_ERROR_LABEL_NOT_FOUND |
Label not found
|
COMPONENT_MANAGER_ERROR_PERMISSION_DENIED |
Permission denied
|
Function Documentation
Retrieves all component contexts of running components.
- Since :
- 5.5
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/packagemanager.info
- Parameters:
-
[in] | callback | The 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:
-
- See also:
- component_manager_component_context_cb()
Retrieves all installed components information.
- Since :
- 5.5
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/packagemanager.info
- Parameters:
-
[in] | callback | The 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:
-
- See also:
- component_manager_component_info_cb()
Gets the component context for the given component ID.
- Since :
- 5.5
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/packagemanager.info
- Parameters:
-
[in] | comp_id | The component ID |
[out] | handle | The component context of the given component ID |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
Gets the component information for the given component ID.
- Since :
- 5.5
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/packagemanager.info
- Parameters:
-
[in] | comp_id | The component ID |
[out] | handle | The component information of the given component ID |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
Checks whether the component is running or not.
- Since :
- 5.5
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/packagemanager.info
- Parameters:
-
[in] | comp_id | The component ID |
[out] | running | true if the component is running,
otherwise false if not running |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
Resumes the component.
- Since :
- 5.5
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/appmanager.launch
- Parameters:
-
[in] | handle | The component context handle |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
Terminates the background component.
- Since :
- 5.5
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/appmanager.kill.bgapp
- Parameters:
-
[in] | handle | The component context handle |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-