| Tizen Native API
    7.0
    | 
The Component Information API contains functions for obtaining information about installed components.
Required Header
#include <component_manager.h>
Overview
- Remarks:
- The Component Information API provides two types of functionality:- Provides installed component's information such as name, type, icon path.
 
| Functions | |
| int | component_info_create (const char *component_id, component_info_h *handle) | 
| Creates a component handle. | |
| int | component_info_destroy (component_info_h handle) | 
| Destroys the component handle. | |
| int | component_info_get_app_id (component_info_h handle, char **app_id) | 
| Gets the application ID of the component. | |
| int | component_info_get_component_id (component_info_h handle, char **component_id) | 
| Gets the component ID. | |
| int | component_info_get_component_type (component_info_h handle, component_info_component_type_e *type) | 
| Gets the type of component. | |
| int | component_info_is_icon_display (component_info_h handle, bool *icon_display) | 
| Gets whether the icon of the component is displayed on the home screen or not. | |
| int | component_info_is_managed_by_task_manager (component_info_h handle, bool *managed) | 
| Checks whether the component should be managed by task-manager or not. | |
| int | component_info_get_icon (component_info_h handle, char **path) | 
| Gets the icon path of the component. | |
| int | component_info_get_label (component_info_h handle, char **label) | 
| Gets the label of the component. | |
| int | component_info_get_localized_label (component_info_h handle, const char *locale, char **label) | 
| Gets the localized label of the component. | |
| int | component_info_clone (component_info_h *clone, component_info_h handle) | 
| Clones the component information handle. | |
| Typedefs | |
| typedef void * | component_info_h | 
| The component handle having own properties such name, path, and icons. | |
Typedef Documentation
| typedef void* component_info_h | 
The component handle having own properties such name, path, and icons.
- Since :
- 5.5
Enumeration Type Documentation
Function Documentation
| int component_info_clone | ( | component_info_h * | clone, | 
| component_info_h | handle | ||
| ) | 
Clones the component information handle.
- Since :
- 5.5
- Remarks:
- You must release clone using component_info_destroy().
- Parameters:
- 
  [out] clone A newly created component information handle, if successfully cloned [in] handle The component information 
- Returns:
- 0on 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_info_create | ( | const char * | component_id, | 
| component_info_h * | handle | ||
| ) | 
Creates a component handle.
- Since :
- 5.5
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/packagemanager.info
- Remarks:
- The handle should be released using component_info_destroy().
- Parameters:
- 
  [in] component_id The component ID [out] handle The component information handle 
- Returns:
- 0on success, otherwise a negative error value
- Return values:
- 
  COMPONENT_MANAGER_ERROR_NONE Successful COMPONENT_MANAGER_ERROR_PERMISSION_DENIED Permission denied COMPONENT_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter COMPONENT_MANAGER_ERROR_NO_SUCH_COMPONENT No such component COMPONENT_MANAGER_ERROR_OUT_OF_MEMORY Out of memory 
| int component_info_destroy | ( | component_info_h | handle | ) | 
Destroys the component handle.
- Since :
- 5.5
- Parameters:
- 
  [in] handle The component information handle 
- Returns:
- 0on success, otherwise a negative error value
- Return values:
- 
  COMPONENT_MANAGER_ERROR_NONE Successful COMPONENT_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter 
| int component_info_get_app_id | ( | component_info_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 information handle [out] app_id The application ID 
- Returns:
- 0on success, otherwise a negative error value
- Return values:
- 
  COMPONENT_MANAGER_ERROR_NONE Successful COMPONENT_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter COMPONENT_MANAGER_ERROR_IO_ERROR I/O error COMPONENT_MANAGER_ERROR_OUT_OF_MEMORY Out of memory 
| int component_info_get_component_id | ( | component_info_h | handle, | 
| char ** | component_id | ||
| ) | 
Gets the component ID.
- Since :
- 5.5
- Remarks:
- You must release component_id using free().
- Parameters:
- 
  [in] handle The component information handle [out] component_id The component ID 
- Returns:
- 0on success, otherwise a negative error value
- Return values:
- 
  COMPONENT_MANAGER_ERROR_NONE Successful COMPONENT_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter COMPONENT_MANAGER_ERROR_IO_ERROR I/O error COMPONENT_MANAGER_ERROR_OUT_OF_MEMORY Out of memory 
| int component_info_get_component_type | ( | component_info_h | handle, | 
| component_info_component_type_e * | type | ||
| ) | 
Gets the type of component.
- Since :
- 5.5
- Parameters:
- 
  [in] handle The component information handle [out] type The component type 
- Returns:
- 0on success, otherwise a negative error value
- Return values:
- 
  COMPONENT_MANAGER_ERROR_NONE Successful COMPONENT_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter COMPONENT_MANAGER_ERROR_IO_ERROR I/O error COMPONENT_MANAGER_ERROR_OUT_OF_MEMORY Out of memory 
- See also:
- component_info_component_type_e
| int component_info_get_icon | ( | component_info_h | handle, | 
| char ** | path | ||
| ) | 
Gets the icon path of the component.
- Since :
- 5.5
- Remarks:
- You must release path using free().
- Parameters:
- 
  [in] handle The component information handle [out] path The icon path of the component 
- Returns:
- 0on success, otherwise a negative error value
- Return values:
- 
  COMPONENT_MANAGER_ERROR_NONE Successful COMPONENT_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter COMPONENT_MANAGER_ERROR_IO_ERROR I/O error COMPONENT_MANAGER_ERROR_OUT_OF_MEMORY Out of memory 
| int component_info_get_label | ( | component_info_h | handle, | 
| char ** | label | ||
| ) | 
Gets the label of the component.
- Since :
- 5.5
- Remarks:
- You must release label using free().
- Parameters:
- 
  [in] handle The component information handle [out] label The label of the component 
- Returns:
- 0on success, otherwise a negative error value
- Return values:
- 
  COMPONENT_MANAGER_ERROR_NONE Successful COMPONENT_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter COMPONENT_MANAGER_ERROR_IO_ERROR I/O error COMPONENT_MANAGER_ERROR_OUT_OF_MEMORY Out of memory 
| int component_info_get_localized_label | ( | component_info_h | handle, | 
| const char * | locale, | ||
| char ** | label | ||
| ) | 
Gets the localized label of the component.
- Since :
- 5.5
- Remarks:
- You must release label using free().
- Parameters:
- 
  [in] handle The component information handle [in] locale The locale information [out] label The localized label of the component 
- Returns:
- 0on success, otherwise a negative error value
- Return values:
- 
  COMPONENT_MANAGER_ERROR_NONE Successful COMPONENT_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter COMPONENT_MANAGER_ERROR_IO_ERROR I/O error COMPONENT_MANAGER_ERROR_LABEL_NOT_FOUND The localized label does not exist COMPONENT_MANAGER_ERROR_OUT_OF_MEMORY Out of memory 
| int component_info_is_icon_display | ( | component_info_h | handle, | 
| bool * | icon_display | ||
| ) | 
Gets whether the icon of the component is displayed on the home screen or not.
- Since :
- 5.5
- Parameters:
- 
  [in] handle The component information handle [out] icon_display trueif the icon should be displayed,
 otherwisefalse
- Returns:
- 0on success, otherwise a negative error value
- Return values:
- 
  COMPONENT_MANAGER_ERROR_NONE Successful COMPONENT_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter COMPONENT_MANAGER_ERROR_IO_ERROR I/O error 
| int component_info_is_managed_by_task_manager | ( | component_info_h | handle, | 
| bool * | managed | ||
| ) | 
Checks whether the component should be managed by task-manager or not.
- Since :
- 5.5
- Parameters:
- 
  [in] handle The component information handle [out] managed ifthe component should be managed by task-manager,
 otherwisefalse
- Returns:
- 0on success, otherwise a negative error value
- Return values:
- 
  COMPONENT_MANAGER_ERROR_NONE Successful COMPONENT_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter COMPONENT_MANAGER_ERROR_IO_ERROR I/O error