Tizen Native API
System Information

The System Information API provides functions which can be used to obtain device information. This section provides more information about the System Information API.

Required Header

#include <system_info.h>

Overview

The System Information API provides functions which can be used to obtain system information such as the device API and platform versions, device model number, supported device features, and device screen dimensions. The available system information is stored in key/value pairs. Depending on their respective keys, values can have different data types. The keys for the platform functions are specified by the Tizen platform and can be seen here. The keys for the custom functions are specified by OEM's and vendors. Developers should check with their OEM's Tizen OS support if they wish to use a custom function.

Functions

int system_info_get_platform_bool (const char *key, bool *value)
 Gets the boolean value of the platform feature.
int system_info_get_platform_int (const char *key, int *value)
 Gets the integer value of the platform feature.
int system_info_get_platform_double (const char *key, double *value)
 Gets the double value of the platform feature.
int system_info_get_platform_string (const char *key, char **value)
 Gets the string value of the platform feature.
int system_info_get_custom_bool (const char *key, bool *value)
 Gets the boolean value of the custom feature.
int system_info_get_custom_int (const char *key, int *value)
 Gets the integer value of the custom feature.
int system_info_get_custom_double (const char *key, double *value)
 Gets the double value of the custom feature.
int system_info_get_custom_string (const char *key, char **value)
 Gets the string value of the custom feature.

Enumeration Type Documentation

Enumeration for system information error codes.

Enumerator:
SYSTEM_INFO_ERROR_NONE 

Successful

SYSTEM_INFO_ERROR_INVALID_PARAMETER 

Invalid parameter

SYSTEM_INFO_ERROR_OUT_OF_MEMORY 

Out of memory

SYSTEM_INFO_ERROR_IO_ERROR 

An input/output error occurred when reading value from system

SYSTEM_INFO_ERROR_PERMISSION_DENIED 

No permission to use the API

SYSTEM_INFO_ERROR_NOT_SUPPORTED 

Not supported parameter (Since 3.0)


Function Documentation

int system_info_get_custom_bool ( const char *  key,
bool *  value 
)

Gets the boolean value of the custom feature.

Since :
2.3
Parameters:
[in]keyThe name of the custom feature to get. NOTE: This custom function uses a custom key which is provided by OEM's
[out]valueThe value of the given custom feature
Returns:
0 on success, otherwise a negative error value
Return values:
SYSTEM_INFO_ERROR_NONESuccessful
SYSTEM_INFO_ERROR_INVALID_PARAMETERCannot find the key in the model config file
SYSTEM_INFO_ERROR_IO_ERRORAn input/output error occurred while reading the value from the model config file
SYSTEM_INFO_ERROR_PERMISSION_DENIEDNo permission to use the API
int system_info_get_custom_double ( const char *  key,
double *  value 
)

Gets the double value of the custom feature.

Since :
2.3
Parameters:
[in]keyThe name of the custom feature to get. NOTE: This custom function uses a custom key which is provided by OEM's
[out]valueThe value of the given custom feature
Returns:
0 on success, otherwise a negative error value
Return values:
SYSTEM_INFO_ERROR_NONESuccessful
SYSTEM_INFO_ERROR_INVALID_PARAMETERCannot find the key in the model config file
SYSTEM_INFO_ERROR_IO_ERRORAn input/output error occurred while reading the value from the model config file
SYSTEM_INFO_ERROR_PERMISSION_DENIEDNo permission to use the API
int system_info_get_custom_int ( const char *  key,
int *  value 
)

Gets the integer value of the custom feature.

Since :
2.3
Parameters:
[in]keyThe name of the custom feature to get. NOTE: This custom function uses a custom key which is provided by OEM's
[out]valueThe value of the given custom feature
Returns:
0 on success, otherwise a negative error value
Return values:
SYSTEM_INFO_ERROR_NONESuccessful
SYSTEM_INFO_ERROR_INVALID_PARAMETERCannot the find key in the model config file
SYSTEM_INFO_ERROR_IO_ERRORAn input/output error occurred while reading the value from the model config file
SYSTEM_INFO_ERROR_PERMISSION_DENIEDNo permission to use the API
int system_info_get_custom_string ( const char *  key,
char **  value 
)

Gets the string value of the custom feature.

Since :
2.3
Remarks:
You must release the value using free().
Parameters:
[in]keyThe name of the custom feature to get. NOTE: This custom function uses a custom key which is provided by OEM's
[out]valueThe value of the given custom feature
Returns:
0 on success, otherwise a negative error value
Return values:
SYSTEM_INFO_ERROR_NONESuccessful
SYSTEM_INFO_ERROR_OUT_OF_MEMORYOut of memory
SYSTEM_INFO_ERROR_INVALID_PARAMETERCannot find the key in the model config file
SYSTEM_INFO_ERROR_IO_ERRORAn input/output error occurred while reading the value from the model config file
SYSTEM_INFO_ERROR_PERMISSION_DENIEDNo permission to use the API
int system_info_get_platform_bool ( const char *  key,
bool *  value 
)

Gets the boolean value of the platform feature.

Since :
2.3
Parameters:
[in]keyThe name of the platform feature to get
[out]valueThe value of the given platform feature
Returns:
0 on success, otherwise a negative error value
Return values:
SYSTEM_INFO_ERROR_NONESuccessful
SYSTEM_INFO_ERROR_INVALID_PARAMETERCannot find the key in the model config file
SYSTEM_INFO_ERROR_IO_ERRORAn input/output error occurred while reading the value from the model config file
SYSTEM_INFO_ERROR_PERMISSION_DENIEDNo permission to use the API
int system_info_get_platform_double ( const char *  key,
double *  value 
)

Gets the double value of the platform feature.

Since :
2.3
Parameters:
[in]keyThe name of the platform feature to get
[out]valueThe value of the given platform feature
Returns:
0 on success, otherwise a negative error value
Return values:
SYSTEM_INFO_ERROR_NONESuccessful
SYSTEM_INFO_ERROR_INVALID_PARAMETERCannot find the key in the model config file
SYSTEM_INFO_ERROR_IO_ERRORAn input/output error occurred while reading the value from the model config file
SYSTEM_INFO_ERROR_PERMISSION_DENIEDNo permission to use the API
int system_info_get_platform_int ( const char *  key,
int *  value 
)

Gets the integer value of the platform feature.

Since :
2.3
Parameters:
[in]keyThe name of the platform feature to get
[out]valueThe value of the given platform feature
Returns:
0 on success, otherwise a negative error value
Return values:
SYSTEM_INFO_ERROR_NONESuccessful
SYSTEM_INFO_ERROR_INVALID_PARAMETERCannot find the key in the model config file
SYSTEM_INFO_ERROR_IO_ERRORAn input/output error occurred while reading the value from the model config file
SYSTEM_INFO_ERROR_PERMISSION_DENIEDNo permission to use the API
int system_info_get_platform_string ( const char *  key,
char **  value 
)

Gets the string value of the platform feature.

Since :
2.3
Remarks:
You must release the value using free().
Parameters:
[in]keyThe name of the platform feature to get
[out]valueThe value of the given platform feature
Returns:
0 on success, otherwise a negative error value
Return values:
SYSTEM_INFO_ERROR_NONESuccessful
SYSTEM_INFO_ERROR_OUT_OF_MEMORYOut of memory
SYSTEM_INFO_ERROR_INVALID_PARAMETERCannot find the key in the model config file
SYSTEM_INFO_ERROR_IO_ERRORAn input/output error occurred while reading the value from the model config file
SYSTEM_INFO_ERROR_PERMISSION_DENIEDNo permission to use the API