Tizen Native API  5.5
Component Information

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

Enumeration for component type.

Since :
5.5
See also:
component_info_get_component_type()
Enumerator:
COMPONENT_INFO_COMPONENT_TYPE_FRAME 

Frame component

COMPONENT_INFO_COMPONENT_TYPE_SERVICE 

Service component


Function Documentation

Clones the component information handle.

Since :
5.5
Remarks:
You must release clone using component_info_destroy().
Parameters:
[out]cloneA newly created component information handle, if successfully cloned
[in]handleThe component information
Returns:
0 on success, otherwise a negative error value
Return values:
COMPONENT_MANAGER_ERROR_NONESuccessful
COMPONENT_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
COMPONENT_MANAGER_ERROR_OUT_OF_MEMORYOut 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_idThe component ID
[out]handleThe component information handle
Returns:
0 on success, otherwise a negative error value
Return values:
COMPONENT_MANAGER_ERROR_NONESuccessful
COMPONENT_MANAGER_ERROR_PERMISSION_DENIEDPermission denied
COMPONENT_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
COMPONENT_MANAGER_ERROR_NO_SUCH_COMPONENTNo such component
COMPONENT_MANAGER_ERROR_OUT_OF_MEMORYOut of memory

Destroys the component handle.

Since :
5.5
Parameters:
[in]handleThe component information handle
Returns:
0 on success, otherwise a negative error value
Return values:
COMPONENT_MANAGER_ERROR_NONESuccessful
COMPONENT_MANAGER_ERROR_INVALID_PARAMETERInvalid 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]handleThe component information handle
[out]app_idThe application ID
Returns:
0 on success, otherwise a negative error value
Return values:
COMPONENT_MANAGER_ERROR_NONESuccessful
COMPONENT_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
COMPONENT_MANAGER_ERROR_IO_ERRORI/O error
COMPONENT_MANAGER_ERROR_OUT_OF_MEMORYOut 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]handleThe component information handle
[out]component_idThe component ID
Returns:
0 on success, otherwise a negative error value
Return values:
COMPONENT_MANAGER_ERROR_NONESuccessful
COMPONENT_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
COMPONENT_MANAGER_ERROR_IO_ERRORI/O error
COMPONENT_MANAGER_ERROR_OUT_OF_MEMORYOut of memory

Gets the type of component.

Since :
5.5
Parameters:
[in]handleThe component information handle
[out]typeThe component type
Returns:
0 on success, otherwise a negative error value
Return values:
COMPONENT_MANAGER_ERROR_NONESuccessful
COMPONENT_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
COMPONENT_MANAGER_ERROR_IO_ERRORI/O error
COMPONENT_MANAGER_ERROR_OUT_OF_MEMORYOut 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]handleThe component information handle
[out]pathThe icon path of the component
Returns:
0 on success, otherwise a negative error value
Return values:
COMPONENT_MANAGER_ERROR_NONESuccessful
COMPONENT_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
COMPONENT_MANAGER_ERROR_IO_ERRORI/O error
COMPONENT_MANAGER_ERROR_OUT_OF_MEMORYOut 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]handleThe component information handle
[out]labelThe label of the component
Returns:
0 on success, otherwise a negative error value
Return values:
COMPONENT_MANAGER_ERROR_NONESuccessful
COMPONENT_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
COMPONENT_MANAGER_ERROR_IO_ERRORI/O error
COMPONENT_MANAGER_ERROR_OUT_OF_MEMORYOut 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]handleThe component information handle
[in]localeThe locale information
[out]labelThe localized label of the component
Returns:
0 on success, otherwise a negative error value
Return values:
COMPONENT_MANAGER_ERROR_NONESuccessful
COMPONENT_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
COMPONENT_MANAGER_ERROR_IO_ERRORI/O error
COMPONENT_MANAGER_ERROR_LABEL_NOT_FOUNDThe localized label does not exist
COMPONENT_MANAGER_ERROR_OUT_OF_MEMORYOut 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]handleThe component information handle
[out]icon_displaytrue if the icon should be displayed,
otherwise false
Returns:
0 on success, otherwise a negative error value
Return values:
COMPONENT_MANAGER_ERROR_NONESuccessful
COMPONENT_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
COMPONENT_MANAGER_ERROR_IO_ERRORI/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]handleThe component information handle
[out]managedif the component should be managed by task-manager,
otherwise false
Returns:
0 on success, otherwise a negative error value
Return values:
COMPONENT_MANAGER_ERROR_NONESuccessful
COMPONENT_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
COMPONENT_MANAGER_ERROR_IO_ERRORI/O error