2 * Copyright (c) 2011 - 2015 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_RUNTIME_INFO_PRIVATE_H__
19 #define __TIZEN_SYSTEM_RUNTIME_INFO_PRIVATE_H__
29 #define API __attribute__ ((visibility("default")))
35 #define LOG_TAG "CAPI_SYSTEM_RUNTIME_INFO"
37 #define _E(fmt, arg...) LOGE("[%s,%d] "fmt, __FUNCTION__, __LINE__, ##arg)
38 #define _D(fmt, arg...) LOGD("[%s,%d] "fmt, __FUNCTION__, __LINE__, ##arg)
39 #define _I(fmt, arg...) LOGI("[%s,%d] "fmt, __FUNCTION__, __LINE__, ##arg)
42 RUNTIME_INFO_DATA_TYPE_STRING,
43 RUNTIME_INFO_DATA_TYPE_INT,
44 RUNTIME_INFO_DATA_TYPE_DOUBLE,
45 RUNTIME_INFO_DATA_TYPE_BOOL
46 } runtime_info_data_type_e;
53 } runtime_info_value_u;
55 typedef runtime_info_value_u * runtime_info_value_h;
64 struct app_usage_s *list;
67 typedef int (*runtime_info_func_get_value) (runtime_info_value_h value);
68 typedef int (*runtime_info_func_set_event_cb) (void);
69 typedef void (*runtime_info_func_unset_event_cb) (void);
71 void runtime_info_updated(runtime_info_key_e key);
73 int runtime_info_vconf_get_value_int(const char *vconf_key, int *value);
74 int runtime_info_vconf_get_value_bool(const char *vconf_key, int *value);
76 int runtime_info_vconf_set_event_cb(const char *vconf_key, runtime_info_key_e runtime_info_key, int slot);
77 void runtime_info_vconf_unset_event_cb(const char *vconf_key, int slot);
79 int runtime_info_flightmode_get_value(runtime_info_value_h);
80 int runtime_info_flightmode_set_event_cb(void);
81 void runtime_info_flightmode_unset_event_cb(void);
83 int runtime_info_audiojack_get_value(runtime_info_value_h);
84 int runtime_info_audiojack_set_event_cb(void);
85 void runtime_info_audiojack_unset_event_cb(void);
87 int runtime_info_wifi_status_get_value(runtime_info_value_h);
88 int runtime_info_wifi_status_set_event_cb(void);
89 void runtime_info_wifi_status_unset_event_cb(void);
91 int runtime_info_bt_enabled_get_value(runtime_info_value_h);
92 int runtime_info_bt_enabled_set_event_cb(void);
93 void runtime_info_bt_enabled_unset_event_cb(void);
95 int runtime_info_wifi_hotspot_get_value(runtime_info_value_h);
96 int runtime_info_wifi_hotspot_set_event_cb(void);
97 void runtime_info_wifi_hotspot_unset_event_cb(void);
99 int runtime_info_bt_hotspot_get_value(runtime_info_value_h);
100 int runtime_info_bt_hotspot_set_event_cb(void);
101 void runtime_info_bt_hotspot_unset_event_cb(void);
103 int runtime_info_usb_hotspot_get_value(runtime_info_value_h);
104 int runtime_info_usb_hotspot_set_event_cb(void);
105 void runtime_info_usb_hotspot_unset_event_cb(void);
107 int runtime_info_location_service_get_value(runtime_info_value_h);
108 int runtime_info_location_service_set_event_cb(void);
109 void runtime_info_location_service_unset_event_cb(void);
111 int runtime_info_location_agps_get_value(runtime_info_value_h);
112 int runtime_info_location_agps_set_event_cb(void);
113 void runtime_info_location_agps_unset_event_cb(void);
115 int runtime_info_location_network_get_value(runtime_info_value_h);
116 int runtime_info_location_network_set_event_cb(void);
117 void runtime_info_location_network_unset_event_cb(void);
119 int runtime_info_packet_data_get_value(runtime_info_value_h);
120 int runtime_info_packet_data_set_event_cb(void);
121 void runtime_info_packet_data_unset_event_cb(void);
123 int runtime_info_data_roaming_get_value(runtime_info_value_h);
124 int runtime_info_data_roaming_set_event_cb(void);
125 void runtime_info_data_roaming_unset_event_cb(void);
127 int runtime_info_silent_mode_get_value(runtime_info_value_h);
128 int runtime_info_silent_mode_set_event_cb(void);
129 void runtime_info_silent_mode_unset_event_cb(void);
131 int runtime_info_vibration_enabled_get_value(runtime_info_value_h);
132 int runtime_info_vibration_enabled_set_event_cb(void);
133 void runtime_info_vibration_enabled_unset_event_cb(void);
135 int runtime_info_24hour_format_get_value(runtime_info_value_h);
136 int runtime_info_24hour_format_set_event_cb(void);
137 void runtime_info_24hour_format_unset_event_cb(void);
139 int runtime_info_first_day_of_week_get_value(runtime_info_value_h);
140 int runtime_info_first_day_of_week_set_event_cb(void);
141 void runtime_info_first_day_of_week_unset_event_cb(void);
143 int runtime_info_language_get_value(runtime_info_value_h);
144 int runtime_info_language_set_event_cb(void);
145 void runtime_info_language_unset_event_cb(void);
147 int runtime_info_region_get_value(runtime_info_value_h);
148 int runtime_info_region_set_event_cb(void);
149 void runtime_info_region_unset_event_cb(void);
151 int runtime_info_gps_status_get_value(runtime_info_value_h);
152 int runtime_info_gps_status_set_event_cb(void);
153 void runtime_info_gps_status_unset_event_cb(void);
155 int runtime_info_battery_charging_get_value(runtime_info_value_h);
156 int runtime_info_battery_charging_set_event_cb(void);
157 void runtime_info_battery_charging_unset_event_cb(void);
159 int runtime_info_tvout_connected_get_value(runtime_info_value_h value);
160 int runtime_info_tvout_connected_set_event_cb(void);
161 void runtime_info_tvout_connected_unset_event_cb(void);
163 int runtime_info_audio_jack_status_get_value(runtime_info_value_h value);
164 int runtime_info_audio_jack_status_set_event_cb(void);
165 void runtime_info_audio_jack_status_unset_event_cb(void);
167 int runtime_info_sliding_keyboard_opened_get_value(runtime_info_value_h value);
168 int runtime_info_sliding_keyboard_opened_set_event_cb(void);
169 void runtime_info_sliding_keyboard_opened_unset_event_cb(void);
171 int runtime_info_usb_connected_get_value(runtime_info_value_h value);
172 int runtime_info_usb_connected_set_event_cb(void);
173 void runtime_info_usb_connected_unset_event_cb(void);
175 int runtime_info_charger_connected_get_value(runtime_info_value_h value);
176 int runtime_info_charger_connected_set_event_cb(void);
177 void runtime_info_charger_connected_unset_event_cb(void);
179 int runtime_info_vibration_level_haptic_feedback_get_value(runtime_info_value_h value);
180 int runtime_info_vibration_level_haptic_feedback_set_event_cb(void);
181 void runtime_info_vibration_level_haptic_feedback_unset_event_cb(void);
183 int runtime_info_auto_rotation_enabled_get_value(runtime_info_value_h);
184 int runtime_info_auto_rotation_enabled_set_event_cb(void);
185 void runtime_info_auto_rotation_enabled_unset_event_cb(void);
187 int runtime_info_get_frequency_cpufreq(int core_idx, char *type, int *cpu_freq);
188 int runtime_info_get_frequency_cpuinfo(int core_idx, int *cpu_freq);
194 #endif /* __TIZEN_SYSTEM_RUNTIME_INFO_PRIVATE_H__ */