summaryrefslogtreecommitdiff
path: root/include/user-awareness-private.h
blob: a4e878be866be60d47d5a05345034d88ebd7b474 (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
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
/*
 * Copyright (c) 2018 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 __TIZEN_CAPI_NETWORK_USER_AWARENESS_PRIVATE_H__
#define __TIZEN_CAPI_NETWORK_USER_AWARENESS_PRIVATE_H__

#include <user-awareness-log.h>
#include <glib.h>

#ifdef __cplusplus
extern "C" {
#endif

/**
 * @brief Returns if expr is true.
 * @since_tizen 5.5
 */
#define ret_if(expr) \
	do { \
		if (expr) { \
			UA_DBG("(%s) return", #expr); \
			return; \
		} \
	} while (0)

/**
 * @brief Returns val if expr is true.
 * @since_tizen 5.5
 */
#define retv_if(expr, val) \
	do { \
		if (expr) { \
			UA_DBG("(%s) return", #expr); \
			return (val); \
		} \
	} while (0)

/**
 * @brief Returns error code if expr is NULL.
 * @since_tizen 5.5
 */
#define UA_VALIDATE_INPUT_PARAMETER(arg) \
	if (arg == NULL) { \
		UA_ERR("INVALID_PARAMETER(%s is NULL)", #arg); \
		return UA_ERROR_INVALID_PARAMETER; \
	}

/**
 * @brief Prints arg.
 * @since_tizen 5.5
 */
#define UA_PRINT_DEVICE_HANDLE(arg) \
		UA_INFO("Device Handle [%p]", #arg); \

/**
 * @brief Prints arg.
 * @since_tizen 5.5
 */
#define UA_PRINT_USER_HANDLE(arg) \
		UA_INFO("User Handle [%p]", #arg); \

/**
 * @brief Checks if h1 is not in the list.
 * @since_tizen 5.5
 */
#define UA_VALIDATE_HANDLE(h1, list) \
	{ \
		GSList *l; \
		bool valid = FALSE; \
		for (l = list; l; l = g_slist_next(l)) { \
			void *h2 = (void *)l->data; \
			if (h1 == h2) { \
				UA_INFO("Handle matched [%p]", h2); \
				valid = TRUE; break; \
			} \
		} \
		if (valid == FALSE) { \
			UA_ERR("Handle [%p] did not match with any stored handles!!", h1); \
			return UA_ERROR_INVALID_PARAMETER; \
		} \
	} \

/**
 * @brief Returns true if h1 is in the list, else return false.
 * @since_tizen 5.5
 */
#define UA_EXIST_HANDLE(h1, list) \
	{ \
		GSList *l; \
		bool valid = FALSE; \
		for (l = list; l; l = g_slist_next(l)) { \
			void *h2 = (void *)l->data; \
			if (h1 == h2) { \
				UA_INFO("Handle matched [%p]", h2); \
				valid = TRUE; break; \
			} \
		} \
		if (valid == TRUE) { \
			UA_ERR("Handle [%p] match with any stored handles!!", h1); \
			return UA_ERROR_ALREADY_DONE; \
		} \
	} \

#define UA_ALL_SENSOR_PRESENCE_DETECTION_WAIT_TIME 65 /**< All sensor presence detection wait time */

/**
 * @brief Minimum detection window size.
 * @since_tizen 5.5
 */
#define UA_MAX_DETECTION_WINDOW 50 /**< 50 seconds */

/**
 * @brief Minimum detection cycle.
 * @since_tizen 5.5
 */
#define UA_MIN_DETECTION_CYCLE 60 /**< 1 min */

/**
 * @brief Default service name.
 * @since_tizen 5.5
 */
#define UA_SERVICE_DEFAULT "ua.service.default" /**< Default service name */

/**
 * @brief Callback data structure.
 * @since_tizen 5.5
 */
typedef struct {
	const void *callback; /**< Callback function pointer */
	void *user_data; /**< User data */
} ua_callback_s;

/**
 * @brief Monitor data structure.
 * @since_tizen 5.5
 */
typedef struct {
	unsigned int sensor_bitmask; /**< Bit-mask for sensors which be supported */
	unsigned int presence_detected_bitmask; /**< Detetected presence bitmask */
	unsigned int absence_detected_bitmask; /**< Detected Absence bitmask */
	ua_detection_mode_e presence_mode; /**< Presence mode */
	ua_detection_mode_e absence_mode; /**< Absence mode */
	gboolean presence_detection_started; /**< Is presence detection started */
	gboolean absence_detection_started; /**< Is absence detection started */
	gboolean scan_device_started; /**< Is scan device started */
	gboolean internal_presence_started; /**< Is Internally scan device started */
	unsigned int presence_detection_timer; /**< Presence detection timer */
	unsigned int absence_detection_timer; /**< Absence detection timer */
	ua_callback_s sensor_state_cb; /**< Callback to let apps know sensors added or not */
	ua_callback_s absence_user_cb; /**< Callback to let apps know user is absence */
	ua_callback_s presence_user_cb; /**< Callback to let apps know user is presence */
	ua_scan_completed_cb scan_device_cb; /**< Callback to let apps know scanned registered devices */
	ua_presence_detected_cb presence_cb; /**< User presence detection callback */
	ua_absence_detected_cb absence_cb; /**< Absence detection callback */
	char *service; /**< Service name */
	GSList *user_state; /**< User current state i.e presence or absence */
	void *user_data; /**< User data */
} ua_monitor_s;

/**
 * @brief User state data structure.
 * @since_tizen 5.5
 */
typedef struct {
	char *account; /**< Account */
	unsigned int sensor_bitmask; /**< Detected sensor type bit mask */
} ua_user_state_info_s;

/**
 * @brief Sensor state data structure.
 * @since_tizen 5.5
 */
typedef struct {
	ua_monitor_s *monitor; /**< Monitor handle */
	ua_sensor_e type; /**< Bitmask to express the supported sensors */
	unsigned short absence_period; /**< Absence period */
	unsigned int absence_timer; /**< Absence timer */
	unsigned int detection_timer; /**< Detection timer */
} ua_sensors_s;

/**
 * @brief User info. data structure.
 * @since_tizen 5.5
 */
typedef struct {
	ua_user_h user_handle; /**< User handle */
	ua_presence_state_e state; /**< Presence state */
	unsigned int sensor_bitmask; /**< Detected user devices bitmask */
	char *account; /**< Account */
	char *name; /**< User name */
	gboolean isadded; /**< Is the user addition completed? */
	gboolean default_user; /**< Is it a default user? */
	gboolean create_by_app; /**< Did app add this user information? */
	long last_presence_timestamp; /**< timestamp of last presence */
} ua_user_info_s;

/**
 * @brief Service info. data structure.
 * @since_tizen 5.5
 */
typedef struct {
	ua_service_h service_handle; /**< Service handle */
	char *name; /**< Service name */
	gboolean isadded; /**< Is the service addition completed? */
	gboolean default_service; /**< Is it a default service? */
	gboolean create_by_app; /**< Did app add this service information? */
} ua_service_info_s;

/**
 * @brief Detection type.
 * @since_tizen 5.5
 */
typedef enum {
	UA_PRESENCE_DETECTION = 0x00, /**< Presence detcection */
	UA_ABSENCE_DETECTION /**< Absence detection */
} ua_detection_type_e;

/**
 * @brief Device info data structure.
 * @since_tizen 5.5
 */
typedef struct {
	ua_user_h user; /**< User handle */
	ua_device_h handle; /**< Device handle */
	char *mac; /**< MAC address */
	char *bssid; /**< BSSID */
	char *ipv4; /**< IPv4 address */
	char *ipv6; /**< IPv6 address */
	char *mobile_id; /**< Mobile id (e.g. BT MAC or UUID) */
	ua_mac_type_e type; /**< Connectivity technology type using this MAC address */
	bool pairing_required; /**< Does it need pairing? */
	ua_presence_state_e state; /**< Presence state */
	ua_os_type_e os; /**< OS type */
	gboolean isadded; /**< Is the device addition completed? */
	gboolean create_by_app; /**< Did app add this device information? */
} ua_dev_info_s;

/**
 * @brief Calls the scan callback when the scan is complete.
 * @since_tizen 5.5
 *
 * @param[in] result Result code
 * @param[in] uam_info Device information
 *
 * @exception
 * @pre
 * @post
 */
void _ua_monitor_handle_scanned_device(int result, uam_device_info_s *uam_info);

/**
 * @brief Clears data related to scan in the monitor.
 * @since_tizen 5.5
 *
 * @param[in] result Result code.
 *
 * @exception
 * @pre
 * @post
 */
void _ua_monitor_handle_scan_complete(int result);

/**
 * @brief Calls the presence callback when detected registerd devices.
 * @since_tizen 5.5
 *
 * @param[in] bitmask Bitmask for sensors.
 * @param[in] service Service information.
 * @param[in] account Account information.
 *
 * @exception
 * @pre
 * @post
 */
void _ua_monitor_handle_user_presence_detected(unsigned int bitmask,
					 	char *service, char *account,
						long timestamp);

/**
 * @brief Stops monitoring detection.
 * @since_tizen 5.5
 *
 * @exception
 * @pre
 * @post
 */
void _ua_monitor_handle_detection_stopped(void);

/**
 * @brief Changes sensor state.
 * @since_tizen 5.5
 *
 * @param[in] bitmask Bitmask for sensors.
 * @param[in] ready Ready or not.
 *
 * @exception
 * @pre
 * @post
 */
void _ua_monitor_handle_sensor_state(unsigned int bitmask, gboolean ready);

/**
 * @brief Calls the absence callback when detected registerd devices.
 * @since_tizen 5.5
 *
 * @param[in] bitmask Bitmask for sensors
 * @param[in] service Service information
 * @param[in] account Account information
 *
 * @exception
 * @pre
 * @post
 */
void _ua_monitor_handle_user_absence_detected(
		unsigned int bitmask, char *service, char *account);

/**
 * @brief Destroys a monitor handle.
 * @since_tizen 5.5
 *
 * @param[in] data Monitor handle.
 *
 * @exception
 * @pre
 * @post
 */
void __ua_free_ua_monitor_t(gpointer data);

/**
 * @brief Destroys a user handle.
 * @since_tizen 5.5
 *
 * @param[in] user User handle.
 *
 * @exception
 * @pre
 * @post
 */
void _ua_free_ua_user_info_t(ua_user_info_s *user);

/**
 * @brief Destroys a service handle.
 * @since_tizen 5.5
 *
 * @param[in] service Service handle.
 *
 * @exception
 * @pre
 * @post
 */
void _ua_free_ua_service_info_s(ua_service_info_s *service);

/**
 * @brief Destroys a device handle.
 * @since_tizen 5.5
 *
 * @param[in] data Device handle.
 *
 * @exception
 * @pre
 * @post
 */
void _ua_free_ua_device_info_t(gpointer data);

/**
 * @brief Gets a device handle.
 * @since_tizen 5.5
 *
 * @remarks The returned value should not be released.
 * @remarks The returned value is managed by the platform and will be released when destrying user list.
 *
 * @param[in] uam_info Device info. handle
 *
 * @return not null on success, otherwise error
 *
 * @exception
 * @pre
 * @post
 */
ua_dev_info_s* __ua_get_device_info_from_uam(uam_device_info_s *uam_info);

/**
 * @brief Sets data in user info. state callback.
 * @since_tizen 5.5
 *
 * @param[in] account Account.
 * @param[in] state #UA_PRESENCE_STATE_ACTIVE or #UA_PRESECE_STATE_INACTIVE.
 * @param[in] sensor_bitmask Sensor bitmask.
 *
 * @return 0 on success, otherwise a negative error value
 * @retval #UA_ERROR_NONE Successful
 * @retval #UA_ERROR_NO_DATA No data
 *
 * @exception
 * @pre
 * @post
 */
int _ua_mark_user_info_state_db(char *account, int state, unsigned sensor_bitmask);

/**
 * @brief Checks whether user's detection type.
 * @since_tizen 5.5
 *
 * @param[in] bitmask Sensor bitmask.
 *
 * @return true on success, otherwise error
 * @retval true Successful
 * @retval false Failed
 *
 * @exception
 * @pre
 * @post
 */
bool _ua_check_all_users_absence_any(unsigned int bitmask);

/**
 * @brief Adds a user info to the list.
 * @since_tizen 5.5
 *
 * @param[in] ua_info User info.
 *
 * @return 0 on success, otherwise a negative error value
 * @retval #UA_ERROR_NONE Successful
 * @retval #UA_ERROR_OUT_OF_MEMORY Out of memory
 *
 * @exception
 * @pre
 * @post
 */
int _ua_user_add_info_to_list(ua_user_info_s* ua_info);

/**
 * @brief Adds a user info to the list in ua-manager.
 * @since_tizen 5.5
 *
 * @param[in] uam_info User info.
 *
 * @return 0 on success, otherwise a negative error value
 * @retval #UA_ERROR_NONE Successful
 * @retval #UA_ERROR_OUT_OF_MEMORY Out of memory
 *
 * @exception
 * @pre
 * @post
 */
int _ua_user_add_info_to_list_from_uapi_data(uam_user_info_s *uam_info);

/**
 * @brief Removes a user info to the list.
 * @since_tizen 5.5
 *
 * @param[in] account User account.
 *
 * @return 0 on success, otherwise a negative error value
 * @retval #UA_ERROR_NONE Successful
 * @retval #UA_ERROR_NO_DATA No data
 *
 * @exception
 * @pre
 * @post
 */
int _ua_remove_user_info_from_list(char *account);

/**
 * @brief Adds a service info to the list.
 * @since_tizen 5.5
 *
 * @param[in] ua_info Service info.
 *
 * @return 0 on success, otherwise a negative error value
 * @retval #UA_ERROR_NONE Successful
 * @retval #UA_ERROR_OUT_OF_MEMORY Out of memory
 *
 * @exception
 * @pre
 * @post
 */
int _ua_service_add_info_to_list(ua_service_info_s* ua_info);

/**
 * @brief Adds a service info of initial type as uam_service_info_s to the list.
 * @since_tizen 5.5
 *
 * @param[in] uam_info Service info.
 *
 * @return 0 on success, otherwise a negative error value
 * @retval #UA_ERROR_NONE Successful
 * @retval #UA_ERROR_OUT_OF_MEMORY Out of memory
 *
 * @exception
 * @pre
 * @post
 */
int _ua_service_add_info_to_list_from_uam_data(uam_service_info_s *uam_info);

/**
 * @brief Removes a service info from the list.
 * @since_tizen 5.5
 *
 * @param[in] uam_info Service info.
 *
 * @return 0 on success, otherwise a negative error value
 * @retval #UA_ERROR_NONE Successful
 * @retval #UA_ERROR_NO_DATA No data
 *
 * @exception
 * @pre
 * @post
 */
int _ua_service_remove_info_from_list(uam_service_info_s *uam_info);

/**
 * @brief Adds a device info. to DB in ua-manager.
 * @since_tizen 5.5
 *
 * @param[in] result Result code.
 * @param[in] uam_info Device information.
 *
 * @exception
 * @pre
 * @post
 */
void _ua_handle_device_added(int result, uam_device_info_s *uam_info);

/**
 * @brief Removes a device info. from DB in ua-manager.
 * @since_tizen 5.5
 *
 * @param[in] result Result code.
 * @param[in] uam_info Device information.
 *
 * @exception
 * @pre
 * @post
 */
void _ua_handle_device_removed(int result, uam_device_info_s *uam_info);

/**
 * @brief Callback to get the service handle.
 * @since_tizen 5.5
 *
 * @remarks The @a service_handle should not be released.
 * @remarks The @a service_handle can be used only in the callback.
 *
 * @param[in] service_handle The service handle.
 * @param[in] user_data User data passed in _ua_intr_foreach_registered_services().
 *
 * @exception
 * @pre
 * @post
 *
 * @see _ua_intr_foreach_registered_services()
 */
typedef bool (*_ua_intr_registered_service_cb)(ua_service_h service_handle, void *user_data);

/**
 * @brief Retrieves the service handle of all the registered services in ua-manager.
 * @since_tizen 5.5
 *
 * @param[in] foreach_cb Callback function to be invoked with service handle.
 * @param[in] user_data The user data to be passed when callback is called.
 *
 * @return 0 on success, otherwise a negative error value
 * @retval #UA_ERROR_NONE Successful
 * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
 *
 * @exception
 * @pre
 * @post
 *
 * @see _ua_intr_registered_service_cb()
 */
int _ua_intr_foreach_registered_services(_ua_intr_registered_service_cb foreach_cb,
		void *user_data);

/**
 * @brief Retrieves the service handle of all the registered services.
 * @since_tizen 5.5
 *
 * @param[in] foreach_cb Callback function to be invoked with service handle.
 * @param[in] user_data The user data to be passed when callback is called.
 *
 * @return 0 on success, otherwise a negative error value
 * @retval #UA_ERROR_NONE Successful
 * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
 *
 * @exception
 * @pre
 * @post
 *
 * @see ua_service_added_service_cb()
 */
int _ua_foreach_registered_services(ua_service_added_service_cb foreach_cb,
		void *user_data);

/**
 * @brief Gets default service data.
 * @since_tizen 5.5
 *
 * @return 0 on success, otherwise a negative error value
 * @retval #UA_ERROR_NONE Successful
 * @retval #UA_ERROR_OUT_OF_MEMORY Out of memory
 *
 * @exception
 * @pre
 * @post
 */
int _ua_intr_get_default_service(void);

/**
 * @brief Callback to get the user handle added to the service.
 * @since_tizen 5.5
 *
 * @remarks The @a user_handle should not be released.
 * @remarks The @a user_handle can be used only in the callback.
 *
 * @param[in] user_handle The user handle.
 * @param[in] user_data User data passed in _ua_intr_foreach_registered_users().
 *
 * @exception
 * @pre
 * @post
 */
typedef bool (*_ua_intr_registered_user_cb)(ua_user_h user_handle, void *user_data);

/**
 * @brief Retrieves the user handle of all the registered users in ua-manager.
 * @since_tizen 5.5
 *
 * @param[in] foreach_cb Callback function to be invoked with user handle.
 * @param[in] user_data The user data to be passed when callback is called.
 *
 * @return 0 on success, otherwise a negative error value
 * @retval #UA_ERROR_NONE Successful
 * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
 *
 * @exception
 * @pre
 * @post
 *
 * @see _ua_intr_registered_user_cb()
 */
int _ua_intr_foreach_registered_users(_ua_intr_registered_user_cb foreach_cb,
		void *user_data);

/**
 * @brief Retrieves the user handle of all the registered users.
 * @since_tizen 5.5
 *
 * @param[in] foreach_cb Callback function to be invoked with user handle.
 * @param[in] user_data The user data to be passed when callback is called.
 *
 * @return 0 on success, otherwise a negative error value
 * @retval #UA_ERROR_NONE Successful
 * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
 *
 * @exception
 * @pre
 * @post
 *
 * @see ua_registered_user_cb()
 */
int _ua_foreach_registered_users(ua_registered_user_cb foreach_cb,
		void *user_data);

/**
 * @brief Gets default user data.
 * @since_tizen 5.5
 *
 * @return 0 on success, otherwise a negative error value
 * @retval #UA_ERROR_NONE Successful
 * @retval #UA_ERROR_OUT_OF_MEMORY Out of memory
 *
 * @exception
 * @pre
 * @post
 */
int _ua_intr_get_default_user(void);

/**
 * @brief Gets a user handle by the account.
 * @since_tizen 5.5
 *
 * @remarks The returned value should not be released.
 * @remarks The returned value is managed by the platform and will be released when destrying user list.
 *
 * @param[in] account Account
 *
 * @return not null on success, otherwise error
 *
 * @exception
 * @pre
 * @post
 */
ua_user_h _ua_get_user_handle_by_account(const char *account);

/**
 * @brief set last presence timestamp in user handle.
 * @since_tizen 5.5
 *
 * @param[in] user_handle User handle.
 * @param[in] timestamp The timestamp to be updated in user handle.
 *
 * @return not null on success, otherwise error
 *
 * @exception
 * @pre
 * @post
 */
void _ua_set_user_last_presence_timestamp(ua_user_h user_handle,
					  long timestamp);

/**
 * @brief Checks whether a device exists in device list.
 * @since_tizen 5.5
 *
 * @param[in] mobile_id The mobile id for devices.
 * @param[in] mac The device MAC address.
 * @param[in] type The device type.
 * @param[in] is_exist Whether exists or not.
 *
 * @return 0 on success, otherwise a negative error value
 * @retval #UA_ERROR_NONE Successful
 * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
 *
 * @exception
 * @pre
 * @post
 */
int _ua_is_device_exist(char *mobile_id, char *mac, ua_mac_type_e type,
		gboolean *is_exist);

/**
 * @brief Gets the service list.
 * @since_tizen 5.5
 *
 * @remarks The returned value should not be released.
 * @remarks The returned value is managed by the platform and will be released when destroying service list.
 *
 * @return not null on success, otherwise error
 *
 * @exception
 * @pre
 * @post
 */
GSList *_ua_service_get_services(void);

/**
 * @brief Gets the user list.
 * @since_tizen 5.5
 *
 * @remarks The returned value should not be released.
 * @remarks The returned value is managed by the platform and will be released when destroying user list.
 *
 * @return not null on success, otherwise error
 *
 * @exception
 * @pre
 * @post
 */
GSList *_ua_user_get_users(void);

#ifdef __cplusplus
}
#endif
#endif /* __TIZEN_CAPI_NETWORK_USER_AWARENESS_PRIVATE_H__ */