runtime-info: Merge Tizen 2.3 source code into tizen branch
[platform/core/api/runtime-info.git] / include / runtime_info_private.h
1 /*
2  * Copyright (c) 2011 - 2015 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17
18 #ifndef __TIZEN_SYSTEM_RUNTIME_INFO_PRIVATE_H__
19 #define __TIZEN_SYSTEM_RUNTIME_INFO_PRIVATE_H__
20
21 #include <vconf.h>
22
23 #ifdef __cplusplus
24 extern "C"
25 {
26 #endif
27
28 #ifndef API
29 #define API __attribute__ ((visibility("default")))
30 #endif
31
32 typedef enum {
33         RUNTIME_INFO_DATA_TYPE_STRING,
34         RUNTIME_INFO_DATA_TYPE_INT,
35         RUNTIME_INFO_DATA_TYPE_DOUBLE,
36         RUNTIME_INFO_DATA_TYPE_BOOL
37 } runtime_info_data_type_e;
38
39 typedef union {
40         int i;
41         bool b;
42         double d;
43         char *s;
44 } runtime_info_value_u;
45
46 typedef runtime_info_value_u * runtime_info_value_h;
47
48 typedef int (*runtime_info_func_get_value) (runtime_info_value_h value);
49 typedef int (*runtime_info_func_set_event_cb) (void);
50 typedef void (*runtime_info_func_unset_event_cb) (void);
51
52 void runtime_info_updated(runtime_info_key_e key);
53
54 int runtime_info_vconf_get_value_int(const char *vconf_key, int *value);
55 int runtime_info_vconf_get_value_bool(const char *vconf_key, int *value);
56 int runtime_info_vconf_get_value_double(const char *vconf_key, double *value);
57 int runtime_info_vconf_get_value_string(const char *vconf_key, char **value);
58
59 int runtime_info_vconf_set_event_cb(const char *vconf_key, runtime_info_key_e runtime_info_key, int slot);
60 void runtime_info_vconf_unset_event_cb(const char *vconf_key, int slot);
61
62 int runtime_info_flightmode_get_value(runtime_info_value_h);
63 int runtime_info_flightmode_set_event_cb(void);
64 void runtime_info_flightmode_unset_event_cb(void);
65
66 int runtime_info_audiojack_get_value(runtime_info_value_h);
67 int runtime_info_audiojack_set_event_cb(void);
68 void runtime_info_audiojack_unset_event_cb(void);
69
70 int runtime_info_wifi_status_get_value(runtime_info_value_h);
71 int runtime_info_wifi_status_set_event_cb(void);
72 void runtime_info_wifi_status_unset_event_cb(void);
73
74 int runtime_info_bt_enabled_get_value(runtime_info_value_h);
75 int runtime_info_bt_enabled_set_event_cb(void);
76 void runtime_info_bt_enabled_unset_event_cb(void);
77
78 int runtime_info_wifi_hotspot_get_value(runtime_info_value_h);
79 int runtime_info_wifi_hotspot_set_event_cb(void);
80 void runtime_info_wifi_hotspot_unset_event_cb (void);
81
82 int runtime_info_bt_hotspot_get_value(runtime_info_value_h);
83 int runtime_info_bt_hotspot_set_event_cb(void);
84 void runtime_info_bt_hotspot_unset_event_cb(void);
85
86 int runtime_info_usb_hotspot_get_value(runtime_info_value_h);
87 int runtime_info_usb_hotspot_set_event_cb(void);
88 void runtime_info_usb_hotspot_unset_event_cb(void);
89
90 int runtime_info_location_service_get_value(runtime_info_value_h);
91 int runtime_info_location_service_set_event_cb(void);
92 void runtime_info_location_service_unset_event_cb(void);
93
94 int runtime_info_location_agps_get_value(runtime_info_value_h);
95 int runtime_info_location_agps_set_event_cb(void);
96 void runtime_info_location_agps_unset_event_cb(void);
97
98 int runtime_info_location_network_get_value(runtime_info_value_h);
99 int runtime_info_location_network_set_event_cb(void);
100 void runtime_info_location_network_unset_event_cb(void);
101
102 int runtime_info_packet_data_get_value(runtime_info_value_h);
103 int runtime_info_packet_data_set_event_cb(void);
104 void runtime_info_packet_data_unset_event_cb(void);
105
106 int runtime_info_data_roaming_get_value(runtime_info_value_h);
107 int runtime_info_data_roaming_set_event_cb(void);
108 void runtime_info_data_roaming_unset_event_cb(void);
109
110 int runtime_info_silent_mode_get_value(runtime_info_value_h);
111 int runtime_info_silent_mode_set_event_cb(void);
112 void runtime_info_silent_mode_unset_event_cb(void);
113
114 int runtime_info_vibration_enabled_get_value(runtime_info_value_h);
115 int runtime_info_vibration_enabled_set_event_cb(void);
116 void runtime_info_vibration_enabled_unset_event_cb(void);
117
118 int runtime_info_24hour_format_get_value(runtime_info_value_h);
119 int runtime_info_24hour_format_set_event_cb(void);
120 void runtime_info_24hour_format_unset_event_cb(void);
121
122 int runtime_info_first_day_of_week_get_value(runtime_info_value_h);
123 int runtime_info_first_day_of_week_set_event_cb(void);
124 void runtime_info_first_day_of_week_unset_event_cb(void);
125
126 int runtime_info_language_get_value(runtime_info_value_h);
127 int runtime_info_language_set_event_cb(void);
128 void runtime_info_language_unset_event_cb(void);
129
130 int runtime_info_region_get_value(runtime_info_value_h);
131 int runtime_info_region_set_event_cb(void);
132 void runtime_info_region_unset_event_cb(void);
133
134 int runtime_info_gps_status_get_value(runtime_info_value_h);
135 int runtime_info_gps_status_set_event_cb(void);
136 void runtime_info_gps_status_unset_event_cb(void);
137
138 int runtime_info_battery_charging_get_value(runtime_info_value_h);
139 int runtime_info_battery_charging_set_event_cb(void);
140 void runtime_info_battery_charging_unset_event_cb(void);
141
142 int runtime_info_tvout_connected_get_value(runtime_info_value_h value);
143 int runtime_info_tvout_connected_set_event_cb(void);
144 void runtime_info_tvout_connected_unset_event_cb(void);
145
146 int runtime_info_audio_jack_status_get_value (runtime_info_value_h value);
147 int runtime_info_audio_jack_status_set_event_cb(void);
148 void runtime_info_audio_jack_status_unset_event_cb(void);
149
150 int runtime_info_sliding_keyboard_opened_get_value(runtime_info_value_h value);
151 int runtime_info_sliding_keyboard_opened_set_event_cb(void);
152 void runtime_info_sliding_keyboard_opened_unset_event_cb(void);
153
154 int runtime_info_usb_connected_get_value(runtime_info_value_h value);
155 int runtime_info_usb_connected_set_event_cb(void);
156 void runtime_info_usb_connected_unset_event_cb(void);
157
158 int runtime_info_charger_connected_get_value(runtime_info_value_h value);
159 int runtime_info_charger_connected_set_event_cb(void);
160 void runtime_info_charger_connected_unset_event_cb(void);
161
162 int runtime_info_vibration_level_haptic_feedback_get_value(runtime_info_value_h value);
163 int runtime_info_vibration_level_haptic_feedback_set_event_cb(void);
164 void runtime_info_vibration_level_haptic_feedback_unset_event_cb(void);
165
166 int runtime_info_auto_rotation_enabled_get_value(runtime_info_value_h);
167 int runtime_info_auto_rotation_enabled_set_event_cb(void);
168 void runtime_info_auto_rotation_enabled_unset_event_cb(void);
169
170 #ifdef __cplusplus
171 }
172 #endif
173
174 #endif /* __TIZEN_SYSTEM_RUNTIME_INFO_PRIVATE_H__ */