summaryrefslogtreecommitdiff
path: root/tests/unittest/tct-user-awareness-core.h
blob: 22745ced225fbc82c392919f6d1e8eacbc9a7c79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
/*
 * Copyright (c) 2021 Samsung Electronics Co., Ltd. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

#ifndef __TCT_USER_AWARENESS_NATIVE_H__
#define __TCT_USER_AWARENESS_NATIVE_H__

#include "testcase.h"
#include "tct_common.h"

extern void utc_startup(void);
extern void utc_cleanup(void);

/* User Awareness Common APIs */
extern int utc_ua_foreach_service_p(void);
extern int utc_ua_foreach_service_n(void);
extern int utc_ua_get_default_service_p(void);
extern int utc_ua_get_default_service_n(void);
extern int utc_ua_get_service_by_name_p(void);
extern int utc_ua_get_service_by_name_n(void);

/* User Awareness Monitor APIs */
extern int utc_ua_monitor_create_p(void);
extern int utc_ua_monitor_create_n(void);
extern int utc_ua_monitor_destroy_p(void);
extern int utc_ua_monitor_destroy_n(void);
extern int utc_ua_monitor_add_sensor_p(void);
extern int utc_ua_monitor_add_sensor_n(void);
extern int utc_ua_monitor_remove_sensor_p(void);
extern int utc_ua_monitor_remove_sensor_n(void);
extern int utc_ua_monitor_foreach_sensor_p(void);
extern int utc_ua_monitor_foreach_sensor_n(void);
extern int utc_ua_monitor_is_sensor_available_p(void);
extern int utc_ua_monitor_is_sensor_available_n(void);
extern int utc_ua_monitor_set_sensor_status_changed_cb_p(void);
extern int utc_ua_monitor_set_sensor_status_changed_cb_n(void);
extern int utc_ua_monitor_unset_sensor_status_changed_cb_p(void);
extern int utc_ua_monitor_unset_sensor_status_changed_cb_n(void);
extern int utc_ua_monitor_start_scan_p(void);
extern int utc_ua_monitor_start_scan_n(void);
extern int utc_ua_monitor_stop_scan_p(void);
extern int utc_ua_monitor_stop_scan_n(void);
extern int utc_ua_monitor_start_presence_detection_p(void);
extern int utc_ua_monitor_start_presence_detection_n(void);
extern int utc_ua_monitor_stop_presence_detection_p(void);
extern int utc_ua_monitor_stop_presence_detection_n(void);
extern int utc_ua_monitor_start_absence_detection_p(void);
extern int utc_ua_monitor_start_absence_detection_n(void);
extern int utc_ua_monitor_stop_absence_detection_p(void);
extern int utc_ua_monitor_stop_absence_detection_n(void);
extern int utc_ua_monitor_set_location_period_p(void);
extern int utc_ua_monitor_set_location_period_n(void);
extern int utc_ua_location_get_distance_n(void);
extern int utc_ua_location_get_position_n(void);
extern int utc_ua_monitor_start_location_detection_n(void);
extern int utc_ua_monitor_stop_location_detection_n(void);

/* User Awareness User APIs */
extern int utc_ua_user_create_p(void);
extern int utc_ua_user_create_n(void);
extern int utc_ua_user_destroy_p(void);
extern int utc_ua_user_destroy_n(void);
extern int utc_ua_user_add_p(void);
extern int utc_ua_user_add_n(void);
extern int utc_ua_user_remove_p(void);
extern int utc_ua_user_remove_n(void);
extern int utc_ua_user_get_account_p(void);
extern int utc_ua_user_get_account_n(void);
extern int utc_ua_user_add_device_p(void);
extern int utc_ua_user_add_device_n(void);
extern int utc_ua_user_remove_device_p(void);
extern int utc_ua_user_remove_device_n(void);
extern int utc_ua_user_foreach_devices_p(void);
extern int utc_ua_user_foreach_devices_n(void);

/* User Awareness Service APIs */
extern int utc_ua_service_create_p(void);
extern int utc_ua_service_create_n(void);
extern int utc_ua_service_destroy_p(void);
extern int utc_ua_service_destroy_n(void);
extern int utc_ua_service_add_p(void);
extern int utc_ua_service_add_n(void);
extern int utc_ua_service_update_p(void);
extern int utc_ua_service_update_n(void);
extern int utc_ua_service_remove_p(void);
extern int utc_ua_service_remove_n(void);
extern int utc_ua_service_get_name_p(void);
extern int utc_ua_service_get_name_n(void);
extern int utc_ua_service_set_detection_threshold_p(void);
extern int utc_ua_service_set_detection_threshold_n(void);
extern int utc_ua_service_get_detection_threshold_p(void);
extern int utc_ua_service_get_detection_threshold_n(void);
extern int utc_ua_service_get_user_by_account_p(void);
extern int utc_ua_service_get_user_by_account_n(void);
extern int utc_ua_service_add_user_p(void);
extern int utc_ua_service_add_user_n(void);
extern int utc_ua_service_remove_user_p(void);
extern int utc_ua_service_remove_user_n(void);
extern int utc_ua_service_foreach_users_p(void);
extern int utc_ua_service_foreach_users_n(void);

/* User Awareness Device APIs */
extern int utc_ua_device_create_p(void);
extern int utc_ua_device_create_n(void);
extern int utc_ua_device_destroy_p(void);
extern int utc_ua_device_destroy_n(void);
extern int utc_ua_device_get_mac_type_p(void);
extern int utc_ua_device_get_mac_type_n(void);
extern int utc_ua_device_set_os_info_p(void);
extern int utc_ua_device_set_os_info_n(void);
extern int utc_ua_device_get_os_info_p(void);
extern int utc_ua_device_get_os_info_n(void);
extern int utc_ua_device_get_mac_address_p(void);
extern int utc_ua_device_get_mac_address_n(void);
extern int utc_ua_device_get_device_id_p(void);
extern int utc_ua_device_get_device_id_n(void);
extern int utc_ua_device_set_wifi_bssid_p(void);
extern int utc_ua_device_set_wifi_bssid_n(void);
extern int utc_ua_device_get_wifi_bssid_p(void);
extern int utc_ua_device_get_wifi_bssid_n(void);
extern int utc_ua_device_set_wifi_ipv4_address_p(void);
extern int utc_ua_device_set_wifi_ipv4_address_n(void);
extern int utc_ua_device_get_wifi_ipv4_address_p(void);
extern int utc_ua_device_get_wifi_ipv4_address_n(void);
extern int utc_ua_device_get_last_presence_p(void);
extern int utc_ua_device_get_last_presence_n(void);
extern int utc_ua_device_get_pairing_required_p(void);
extern int utc_ua_device_get_pairing_required_n(void);
extern int utc_ua_device_update_p(void);
extern int utc_ua_device_update_n(void);
extern int utc_ua_device_get_by_mac_address_p(void);
extern int utc_ua_device_get_by_mac_address_n(void);
extern int utc_ua_device_get_by_device_id_p(void);
extern int utc_ua_device_get_by_device_id_n(void);

/* User Awareness Sensor APIs */
extern int utc_ua_sensor_get_status_p(void);
extern int utc_ua_sensor_get_status_n(void);
extern int utc_ua_sensor_get_timestamp_p(void);
extern int utc_ua_sensor_get_timestamp_n(void);
extern int utc_ua_sensor_get_type_p(void);
extern int utc_ua_sensor_get_type_n(void);

testcase tc_array[] = {
	/* User Awareness Common APIs */
	{"utc_ua_foreach_service_p", utc_ua_foreach_service_p, utc_startup, utc_cleanup},
	{"utc_ua_foreach_service_n", utc_ua_foreach_service_n, utc_startup, utc_cleanup},
	{"utc_ua_get_default_service_p", utc_ua_get_default_service_p, utc_startup, utc_cleanup},
	{"utc_ua_get_default_service_n", utc_ua_get_default_service_n, utc_startup, utc_cleanup},
	{"utc_ua_get_service_by_name_p", utc_ua_get_service_by_name_p, utc_startup, utc_cleanup},
	{"utc_ua_get_service_by_name_n", utc_ua_get_service_by_name_n, utc_startup, utc_cleanup},
	/* User Awareness Monitor APIs */
	{"utc_ua_monitor_create_p", utc_ua_monitor_create_p, utc_startup, utc_cleanup},
	{"utc_ua_monitor_create_n", utc_ua_monitor_create_n, utc_startup, utc_cleanup},
	{"utc_ua_monitor_destroy_p", utc_ua_monitor_destroy_p, utc_startup, utc_cleanup},
	{"utc_ua_monitor_destroy_n", utc_ua_monitor_destroy_n, utc_startup, utc_cleanup},
	{"utc_ua_monitor_add_sensor_p", utc_ua_monitor_add_sensor_p, utc_startup, utc_cleanup},
	{"utc_ua_monitor_add_sensor_n", utc_ua_monitor_add_sensor_n, utc_startup, utc_cleanup},
	{"utc_ua_monitor_remove_sensor_p", utc_ua_monitor_remove_sensor_p, utc_startup, utc_cleanup},
	{"utc_ua_monitor_remove_sensor_n", utc_ua_monitor_remove_sensor_n, utc_startup, utc_cleanup},
	{"utc_ua_monitor_foreach_sensor_p", utc_ua_monitor_foreach_sensor_p, utc_startup, utc_cleanup},
	{"utc_ua_monitor_foreach_sensor_n", utc_ua_monitor_foreach_sensor_n, utc_startup, utc_cleanup},
	{"utc_ua_monitor_is_sensor_available_p", utc_ua_monitor_is_sensor_available_p, utc_startup, utc_cleanup},
	{"utc_ua_monitor_is_sensor_available_n", utc_ua_monitor_is_sensor_available_n, utc_startup, utc_cleanup},
	{"utc_ua_monitor_set_sensor_status_changed_cb_p", utc_ua_monitor_set_sensor_status_changed_cb_p, utc_startup, utc_cleanup},
	{"utc_ua_monitor_set_sensor_status_changed_cb_n", utc_ua_monitor_set_sensor_status_changed_cb_n, utc_startup, utc_cleanup},
	{"utc_ua_monitor_unset_sensor_status_changed_cb_p", utc_ua_monitor_unset_sensor_status_changed_cb_p, utc_startup, utc_cleanup},
	{"utc_ua_monitor_unset_sensor_status_changed_cb_n", utc_ua_monitor_unset_sensor_status_changed_cb_n, utc_startup, utc_cleanup},
	{"utc_ua_monitor_start_scan_p", utc_ua_monitor_start_scan_p, utc_startup, utc_cleanup},
	{"utc_ua_monitor_start_scan_n", utc_ua_monitor_start_scan_n, utc_startup, utc_cleanup},
	{"utc_ua_monitor_stop_scan_p", utc_ua_monitor_stop_scan_p, utc_startup, utc_cleanup},
	{"utc_ua_monitor_stop_scan_n", utc_ua_monitor_stop_scan_n, utc_startup, utc_cleanup},
	{"utc_ua_monitor_start_presence_detection_p", utc_ua_monitor_start_presence_detection_p, utc_startup, utc_cleanup},
	{"utc_ua_monitor_start_presence_detection_n", utc_ua_monitor_start_presence_detection_n, utc_startup, utc_cleanup},
	{"utc_ua_monitor_stop_presence_detection_p", utc_ua_monitor_stop_presence_detection_p, utc_startup, utc_cleanup},
	{"utc_ua_monitor_stop_presence_detection_n", utc_ua_monitor_stop_presence_detection_n, utc_startup, utc_cleanup},
	{"utc_ua_monitor_start_absence_detection_p", utc_ua_monitor_start_absence_detection_p, utc_startup, utc_cleanup},
	{"utc_ua_monitor_start_absence_detection_n", utc_ua_monitor_start_absence_detection_n, utc_startup, utc_cleanup},
	{"utc_ua_monitor_stop_absence_detection_p", utc_ua_monitor_stop_absence_detection_p, utc_startup, utc_cleanup},
	{"utc_ua_monitor_stop_absence_detection_n", utc_ua_monitor_stop_absence_detection_n, utc_startup, utc_cleanup},
	{"utc_ua_monitor_set_location_period_p", utc_ua_monitor_set_location_period_p, utc_startup, utc_cleanup},
	{"utc_ua_monitor_set_location_period_n", utc_ua_monitor_set_location_period_n, utc_startup, utc_cleanup},
	{"utc_ua_location_get_distance_n", utc_ua_location_get_distance_n, utc_startup, utc_cleanup},
	{"utc_ua_location_get_position_n", utc_ua_location_get_position_n, utc_startup, utc_cleanup},
	{"utc_ua_monitor_start_location_detection_n", utc_ua_monitor_start_location_detection_n, utc_startup, utc_cleanup},
	{"utc_ua_monitor_stop_location_detection_n", utc_ua_monitor_stop_location_detection_n, utc_startup, utc_cleanup},
	/* User Awareness User APIs */
	{"utc_ua_user_create_p", utc_ua_user_create_p, utc_startup, utc_cleanup},
	{"utc_ua_user_create_n", utc_ua_user_create_n, utc_startup, utc_cleanup},
	{"utc_ua_user_destroy_p", utc_ua_user_destroy_p, utc_startup, utc_cleanup},
	{"utc_ua_user_destroy_n", utc_ua_user_destroy_n, utc_startup, utc_cleanup},
	{"utc_ua_user_add_p", utc_ua_user_add_p, utc_startup, utc_cleanup},
	{"utc_ua_user_add_n", utc_ua_user_add_n, utc_startup, utc_cleanup},
	{"utc_ua_user_remove_p", utc_ua_user_remove_p, utc_startup, utc_cleanup},
	{"utc_ua_user_remove_n", utc_ua_user_remove_n, utc_startup, utc_cleanup},
	{"utc_ua_user_get_account_p", utc_ua_user_get_account_p, utc_startup, utc_cleanup},
	{"utc_ua_user_get_account_n", utc_ua_user_get_account_n, utc_startup, utc_cleanup},
	{"utc_ua_user_add_device_p", utc_ua_user_add_device_p, utc_startup, utc_cleanup},
	{"utc_ua_user_add_device_n", utc_ua_user_add_device_n, utc_startup, utc_cleanup},
	{"utc_ua_user_remove_device_p", utc_ua_user_remove_device_p, utc_startup, utc_cleanup},
	{"utc_ua_user_remove_device_n", utc_ua_user_remove_device_n, utc_startup, utc_cleanup},
	{"utc_ua_user_foreach_devices_p", utc_ua_user_foreach_devices_p, utc_startup, utc_cleanup},
	{"utc_ua_user_foreach_devices_n", utc_ua_user_foreach_devices_n, utc_startup, utc_cleanup},
	/* User Awareness Service APIs */
	{"utc_ua_service_create_p", utc_ua_service_create_p, utc_startup, utc_cleanup},
	{"utc_ua_service_create_n", utc_ua_service_create_n, utc_startup, utc_cleanup},
	{"utc_ua_service_destroy_p", utc_ua_service_destroy_p, utc_startup, utc_cleanup},
	{"utc_ua_service_destroy_n", utc_ua_service_destroy_n, utc_startup, utc_cleanup},
	{"utc_ua_service_add_p", utc_ua_service_add_p, utc_startup, utc_cleanup},
	{"utc_ua_service_add_n", utc_ua_service_add_n, utc_startup, utc_cleanup},
	{"utc_ua_service_update_p", utc_ua_service_update_p, utc_startup, utc_cleanup},
	{"utc_ua_service_update_n", utc_ua_service_update_n, utc_startup, utc_cleanup},
	{"utc_ua_service_remove_p", utc_ua_service_remove_p, utc_startup, utc_cleanup},
	{"utc_ua_service_remove_n", utc_ua_service_remove_n, utc_startup, utc_cleanup},
	{"utc_ua_service_get_name_p", utc_ua_service_get_name_p, utc_startup, utc_cleanup},
	{"utc_ua_service_get_name_n", utc_ua_service_get_name_n, utc_startup, utc_cleanup},
	{"utc_ua_service_set_detection_threshold_p", utc_ua_service_set_detection_threshold_p, utc_startup, utc_cleanup},
	{"utc_ua_service_set_detection_threshold_n", utc_ua_service_set_detection_threshold_n, utc_startup, utc_cleanup},
	{"utc_ua_service_get_detection_threshold_p", utc_ua_service_get_detection_threshold_p, utc_startup, utc_cleanup},
	{"utc_ua_service_get_detection_threshold_n", utc_ua_service_get_detection_threshold_n, utc_startup, utc_cleanup},
	{"utc_ua_service_get_user_by_account_p", utc_ua_service_get_user_by_account_p, utc_startup, utc_cleanup},
	{"utc_ua_service_get_user_by_account_n", utc_ua_service_get_user_by_account_n, utc_startup, utc_cleanup},
	{"utc_ua_service_add_user_p", utc_ua_service_add_user_p, utc_startup, utc_cleanup},
	{"utc_ua_service_add_user_n", utc_ua_service_add_user_n, utc_startup, utc_cleanup},
	{"utc_ua_service_remove_user_p", utc_ua_service_remove_user_p, utc_startup, utc_cleanup},
	{"utc_ua_service_remove_user_n", utc_ua_service_remove_user_n, utc_startup, utc_cleanup},
	{"utc_ua_service_foreach_users_p", utc_ua_service_foreach_users_p, utc_startup, utc_cleanup},
	{"utc_ua_service_foreach_users_n", utc_ua_service_foreach_users_n, utc_startup, utc_cleanup},
	/* User Awareness Device APIs */
	{"utc_ua_device_create_p", utc_ua_device_create_p, utc_startup, utc_cleanup},
	{"utc_ua_device_create_n", utc_ua_device_create_n, utc_startup, utc_cleanup},
	{"utc_ua_device_destroy_p", utc_ua_device_destroy_p, utc_startup, utc_cleanup},
	{"utc_ua_device_destroy_n", utc_ua_device_destroy_n, utc_startup, utc_cleanup},
	{"utc_ua_device_get_mac_type_p", utc_ua_device_get_mac_type_p, utc_startup, utc_cleanup},
	{"utc_ua_device_get_mac_type_n", utc_ua_device_get_mac_type_n, utc_startup, utc_cleanup},
	{"utc_ua_device_set_os_info_p", utc_ua_device_set_os_info_p, utc_startup, utc_cleanup},
	{"utc_ua_device_set_os_info_n", utc_ua_device_set_os_info_n, utc_startup, utc_cleanup},
	{"utc_ua_device_get_os_info_p", utc_ua_device_get_os_info_p, utc_startup, utc_cleanup},
	{"utc_ua_device_get_os_info_n", utc_ua_device_get_os_info_n, utc_startup, utc_cleanup},
	{"utc_ua_device_get_mac_address_p", utc_ua_device_get_mac_address_p, utc_startup, utc_cleanup},
	{"utc_ua_device_get_mac_address_n", utc_ua_device_get_mac_address_n, utc_startup, utc_cleanup},
	{"utc_ua_device_get_device_id_p", utc_ua_device_get_device_id_p, utc_startup, utc_cleanup},
	{"utc_ua_device_get_device_id_n", utc_ua_device_get_device_id_n, utc_startup, utc_cleanup},
	{"utc_ua_device_set_wifi_bssid_p", utc_ua_device_set_wifi_bssid_p, utc_startup, utc_cleanup},
	{"utc_ua_device_set_wifi_bssid_n", utc_ua_device_set_wifi_bssid_n, utc_startup, utc_cleanup},
	{"utc_ua_device_get_wifi_bssid_p", utc_ua_device_get_wifi_bssid_p, utc_startup, utc_cleanup},
	{"utc_ua_device_get_wifi_bssid_n", utc_ua_device_get_wifi_bssid_n, utc_startup, utc_cleanup},
	{"utc_ua_device_set_wifi_ipv4_address_p", utc_ua_device_set_wifi_ipv4_address_p, utc_startup, utc_cleanup},
	{"utc_ua_device_set_wifi_ipv4_address_n", utc_ua_device_set_wifi_ipv4_address_n, utc_startup, utc_cleanup},
	{"utc_ua_device_get_wifi_ipv4_address_p", utc_ua_device_get_wifi_ipv4_address_p, utc_startup, utc_cleanup},
	{"utc_ua_device_get_wifi_ipv4_address_n", utc_ua_device_get_wifi_ipv4_address_n, utc_startup, utc_cleanup},
	{"utc_ua_device_get_last_presence_p", utc_ua_device_get_last_presence_p, utc_startup, utc_cleanup},
	{"utc_ua_device_get_last_presence_n", utc_ua_device_get_last_presence_n, utc_startup, utc_cleanup},
	{"utc_ua_device_get_pairing_required_p", utc_ua_device_get_pairing_required_p, utc_startup, utc_cleanup},
	{"utc_ua_device_get_pairing_required_n", utc_ua_device_get_pairing_required_n, utc_startup, utc_cleanup},
	{"utc_ua_device_update_p", utc_ua_device_update_p, utc_startup, utc_cleanup},
	{"utc_ua_device_update_n", utc_ua_device_update_n, utc_startup, utc_cleanup},
	{"utc_ua_device_get_by_mac_address_p", utc_ua_device_get_by_mac_address_p, utc_startup, utc_cleanup},
	{"utc_ua_device_get_by_mac_address_n", utc_ua_device_get_by_mac_address_n, utc_startup, utc_cleanup},
	{"utc_ua_device_get_by_device_id_p", utc_ua_device_get_by_device_id_p, utc_startup, utc_cleanup},
	{"utc_ua_device_get_by_device_id_n", utc_ua_device_get_by_device_id_n, utc_startup, utc_cleanup},
	/* User Awareness Sensor APIs */
	{"utc_ua_sensor_get_status_p", utc_ua_sensor_get_status_p, utc_startup, utc_cleanup},
	{"utc_ua_sensor_get_status_n", utc_ua_sensor_get_status_n, utc_startup, utc_cleanup},
	{"utc_ua_sensor_get_timestamp_p", utc_ua_sensor_get_timestamp_p, utc_startup, utc_cleanup},
	{"utc_ua_sensor_get_timestamp_n", utc_ua_sensor_get_timestamp_n, utc_startup, utc_cleanup},
	{"utc_ua_sensor_get_type_p", utc_ua_sensor_get_type_p, utc_startup, utc_cleanup},
	{"utc_ua_sensor_get_type_n", utc_ua_sensor_get_type_n, utc_startup, utc_cleanup},

	{NULL, NULL}
};

#endif // __TCT_USER_AWARENESS_NATIVE_H__