2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #ifndef __TIZEN_SYSTEM_SYSTEM_INFO_H__
19 #define __TIZEN_SYSTEM_SYSTEM_INFO_H__
29 * @addtogroup CAPI_SYSTEM_SYSTEM_INFO_MODULE
34 * @brief Enumeration of error code for system information
37 SYSTEM_INFO_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */
38 SYSTEM_INFO_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
39 SYSTEM_INFO_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
40 SYSTEM_INFO_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR, /**< An input/output error occurred when read value from system */
41 } system_info_error_e;
44 * @brief Enumeration of key for system information
47 SYSTEM_INFO_KEY_MODEL, /**< The model of the device */
48 SYSTEM_INFO_KEY_TIZEN_VERSION, /**< The version of the Tizen API */
49 SYSTEM_INFO_KEY_CAMERA_COUNT, /**< The number of cameras in the device */
50 SYSTEM_INFO_KEY_KEYBOARD_TYPE, /**< The type of the keyboard */
51 SYSTEM_INFO_KEY_MULTI_POINT_TOUCH_COUNT, /**< The maximum number of concurrent touch points supported in the device */
52 SYSTEM_INFO_KEY_NETWORK_TYPE, /**< The supported network type */
53 SYSTEM_INFO_KEY_OPENGLES_VERSION, /**< The supported version of the OpenGL ES */
54 SYSTEM_INFO_KEY_SCREEN_BITS_PER_PIXEL, /**< The number of bits per pixel */
55 SYSTEM_INFO_KEY_SCREEN_HEIGHT, /**< The height of the screen in pixels */
56 SYSTEM_INFO_KEY_SCREEN_WIDTH, /**< The width of the screen in pixels */
57 SYSTEM_INFO_KEY_MOBILE_DEVICE_ID, /**< The unique ID to identify GSM, UMTS and CDMA mobile devices */
58 SYSTEM_INFO_KEY_CSC_SALES_CODE, /**< The sales code of CSC */
59 SYSTEM_INFO_KEY_PLATFORM_NAME, /**< The name of platform */
60 SYSTEM_INFO_KEY_TIZEN_VERSION_NAME, /**< The name of tizen version */
61 SYSTEM_INFO_KEY_SCREEN_DPI, /**< The width of the screen DPI */
62 SYSTEM_INFO_KEY_DEVICE_UUID, /**< The Device unique ID to identify */
63 SYSTEM_INFO_KEY_CORE_CPU_ARCH, /**< The CORE CPU architecture of model */
64 SYSTEM_INFO_KEY_CORE_FPU_ARCH, /**< The CORE FPU architecture of model */
65 SYSTEM_INFO_KEY_OPENGLES_TEXTURE_FORMAT, /**< The supported texture format of the OpenGL ES */
66 SYSTEM_INFO_KEY_CORE_CPU_FREQ, /**< The CORE CPU frequency of model */
67 SYSTEM_INFO_KEY_PHYSICAL_SCREEN_HEIGHT, /**< The physical screen height in millimeters */
68 SYSTEM_INFO_KEY_PHYSICAL_SCREEN_WIDTH, /**< The physical screen width in millimeters */
69 SYSTEM_INFO_KEY_BUILD_STRING, /**< The build string of platform binary */
70 SYSTEM_INFO_KEY_BUILD_DATE, /**< The build date of platform binary */
71 SYSTEM_INFO_KEY_BUILD_TIME, /**< The build time of platform binary */
72 SYSTEM_INFO_KEY_BLUETOOTH_SUPPORTED, /**< Indicates whether the device supports Bluetooth */
73 SYSTEM_INFO_KEY_FMRADIO_SUPPORTED, /**< Indicates whether the device supports FM radio */
74 SYSTEM_INFO_KEY_GPS_SUPPORTED, /**< Indicates whether the device supports GPS */
75 SYSTEM_INFO_KEY_NFC_SUPPORTED, /**< Indicates whether the device supports NFC */
76 SYSTEM_INFO_KEY_TVOUT_SUPPORTED, /**< Indicates whether the device supports TV-out */
77 SYSTEM_INFO_KEY_WIFI_SUPPORTED, /**< Indicates whether the device supports Wi-Fi */
78 SYSTEM_INFO_KEY_HAPTIC_SUPPORTED, /**< Indicates whether the device supports Haptic */
79 SYSTEM_INFO_KEY_WIFI_DIRECT_SUPPORTED, /**< Indicates whether the device supports Wi-Fi Direct */
80 SYSTEM_INFO_KEY_CPS_SUPPORTED, /**< Indicates whether the device supports CPS */
81 SYSTEM_INFO_KEY_WPS_SUPPORTED, /**< Indicates whether the device supports WPS */
82 SYSTEM_INFO_KEY_USB_HOST_SUPPORTED, /**< Indicates whether the device supports USB host */
83 SYSTEM_INFO_KEY_USB_ACCESSORY_SUPPORTED, /**< Indicates whether the device supports USB accessory */
84 SYSTEM_INFO_KEY_FRONT_CAMERA_SUPPORTED, /**< Indicates whether the device supports front camera */
85 SYSTEM_INFO_KEY_FRONT_CAMERA_AF_SUPPORTED, /**< Indicates whether the device supports front camera auto focus */
86 SYSTEM_INFO_KEY_FRONT_CAMERA_FLASH_SUPPORTED, /**< Indicates whether the device supports front camera flash */
87 SYSTEM_INFO_KEY_BACK_CAMERA_SUPPORTED, /**< Indicates whether the device supports back camera */
88 SYSTEM_INFO_KEY_BACK_CAMERA_AF_SUPPORTED, /**< Indicates whether the device supports back camera auto focus */
89 SYSTEM_INFO_KEY_BACK_CAMERA_FLASH_SUPPORTED, /**< Indicates whether the device supports back camera flash */
90 SYSTEM_INFO_KEY_HDMI_SUPPORTED, /**< Indicates whether the device supports HDMI */
91 SYSTEM_INFO_KEY_RCA_SUPPORTED, /**< Indicates whether the device supports RCA */
92 SYSTEM_INFO_KEY_SIP_VOIP_SUPPORTED, /**< Indicates whether the device supports SIP VOIP */
93 SYSTEM_INFO_KEY_MICROPHONE_SUPPORTED, /**< Indicates whether the device supports Microphone */
94 SYSTEM_INFO_KEY_SPEECH_RECOGNITION_SUPPORTED, /**< Indicates whether the device supports stt */
95 SYSTEM_INFO_KEY_BAROMETER_SENSOR_SUPPORTED, /**< Indicates whether the device supports barometer sensor */
96 SYSTEM_INFO_KEY_MANUFACTURER, /**< The manufacturer of the device */
97 SYSTEM_INFO_KEY_CP_INTERFACE, /**< The method of interface with CP */
98 SYSTEM_INFO_KEY_MMS_SUPPORTED, /**< Indicates whether the device supports MMS */
99 SYSTEM_INFO_KEY_SMS_SUPPORTED, /**< Indicates whether the device supports SMS */
100 SYSTEM_INFO_KEY_CBS_SUPPORTED, /**< Indicates whether the device supports CBS */
101 SYSTEM_INFO_KEY_NFC_RESERVED_PUSH_SUPPORTED, /**< Indicates whether the device supports nfc-reserved push */
102 SYSTEM_INFO_KEY_TETHERING_SUPPORTED, /**< Indicates whether the device supports tethering */
106 * @brief Gets the integer value of the system information
107 * @param[in] key The name of the system information to get
108 * @param[out] value The value of the given system information
109 * @return 0 on success, otherwise a negative error value.
110 * @retval #SYSTEM_INFO_ERROR_NONE Successful
111 * @retval #SYSTEM_INFO_ERROR_INVALID_PARAMETER Invalid parameter
112 * @retval #SYSTEM_INFO_ERROR_IO_ERROR An input/output error occurred when read value from system
114 int system_info_get_value_int(system_info_key_e key, int *value);
117 * @brief Gets the boolean value of the system information
118 * @param[in] key The name of the system information to get
119 * @param[out] value The value of the given system information
120 * @return 0 on success, otherwise a negative error value.
121 * @retval #SYSTEM_INFO_ERROR_NONE Successful
122 * @retval #SYSTEM_INFO_ERROR_INVALID_PARAMETER Invalid parameter
123 * @retval #SYSTEM_INFO_ERROR_IO_ERROR An input/output error occurred when read value from system
125 int system_info_get_value_bool(system_info_key_e key, bool *value);
128 * @brief Gets the double value of the system information
129 * @param[in] key The name of the system information to get
130 * @param[out] value The value of the given system information
131 * @return 0 on success, otherwise a negative error value.
132 * @retval #SYSTEM_INFO_ERROR_NONE Successful
133 * @retval #SYSTEM_INFO_ERROR_INVALID_PARAMETER Invalid parameter
134 * @retval #SYSTEM_INFO_ERROR_IO_ERROR An input/output error occurred when read value from system
136 int system_info_get_value_double(system_info_key_e key, double *value);
139 * @brief Gets the string value of the system information
140 * @remarks The @a value must be released with free() by you.
141 * @param[in] key The name of the system information to get
142 * @param[out] value The value of the given system information
143 * @return 0 on success, otherwise a negative error value.
144 * @retval #SYSTEM_INFO_ERROR_NONE Successful
145 * @retval #SYSTEM_INFO_ERROR_INVALID_PARAMETER Invalid parameter
146 * @retval #SYSTEM_INFO_ERROR_OUT_OF_MEMORY Out of memory
147 * @retval #SYSTEM_INFO_ERROR_IO_ERROR An input/output error occurred when read value from system
149 int system_info_get_value_string(system_info_key_e key, char **value);
151 int system_info_get_external_bool(const char *key, bool *value);
152 int system_info_get_external_int(const char *key, int *value);
153 int system_info_get_external_double(const char *key, double *value);
154 int system_info_get_external_string(const char *key, char **value);
164 #endif /* __TIZEN_SYSTEM_SYSTEM_INFO_H__ */