8d57f07e5f87f9e8b256c5e1af3d837416716084
[platform/core/connectivity/ua-manager.git] / include / ua-api.h
1 /*
2  * Copyright (c) 2018 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_UA_NETWORK_UA_API_H__
19 #define __TIZEN_UA_NETWORK_UA_API_H__
20
21 #include <gmodule.h>
22 #include <tizen_error.h>
23
24 #ifndef TIZEN_ERROR_UA
25 #define TIZEN_ERROR_UA 0x11170000 /**< To-Do: This should move to tizen_error.h */
26 #endif
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31
32 /**
33  * @brief Bitmask for sensors.
34  * @since_tizen 5.5
35  */
36 typedef enum {
37         UAM_SENSOR_BITMASK_BT = 0x00000001, /**< Bitmask for BT */
38         UAM_SENSOR_BITMASK_BLE = 0x00000002, /**< Bitmask for BLE */
39         UAM_SENSOR_BITMASK_WIFI = 0x00000004, /**< Bitmask for Wi-Fi */
40         UAM_SENSOR_BITMASK_MOTION = 0x00000008, /**< Bitmask for motion */
41         UAM_SENSOR_BITMASK_LIGHT = 0x00000010, /**< Bitmask for light */
42         UAM_SENSOR_BITMASK_AUDIO = 0x00000020, /**< Bitmask for autio */
43         UAM_SENSOR_ALL = 0xFFFFFFFF, /**< Bitmask for all sensors */
44 } uam_sensor_bitmask_e;
45
46 /**
47  * @brief Max. MAC address length.
48  * @since_tizen 5.5
49  */
50 #define UAM_MAC_ADDRESS_STRING_LEN 18
51
52 /**
53  * @brief Max. device id length.
54  * @since_tizen 5.5
55  */
56 #define UAM_DEVICE_ID_MAX_STRING_LEN 50
57
58 /**
59  * @brief Device's BLE payload DUID length.
60  * @since_tizen 5.5
61  */
62 #define UAM_BLE_PAYLOAD_DUID_LEN 17
63
64 /**
65  * @brief Max. BT MAC address length.
66  * @since_tizen 5.5
67  */
68 #define UAM_BT_MAC_ADDRESS_STRING_LEN 18
69
70 /**
71  * @brief Max. IP address length.
72  * @since_tizen 5.5
73  */
74 #define UAM_IP_ADDRESS_MAX_STRING_LEN 50
75
76 /**
77  * @brief Max. user name length.
78  * @since_tizen 5.5
79  */
80 #define UAM_USER_NAME_MAX_STRING_LEN 254
81
82 /**
83  * @brief Max. user account length.
84  * @since_tizen 5.5
85  */
86 #define UAM_USER_ACCOUNT_MAX_STRING_LEN 254
87
88 /**
89  * @brief Max. application id length.
90  * @since_tizen 5.5
91  */
92 #define UAM_APP_ID_MAX_STRING_LEN 100
93
94 /**
95  * @brief Max. service id length.
96  * @since_tizen 5.5
97  */
98 #define UAM_SERVICE_MAX_STRING_LEN 50
99
100 /**
101  * @brief Default service name.
102  * @since_tizen 5.5
103  */
104 #define UAM_SERVICE_DEFAULT "ua.service.default"
105
106 /**
107  * @brief Default presence threshold.
108  * @since_tizen 5.5
109  */
110 #define UAM_PRESENCE_THRESHOLD_DEFAULT 2
111
112 /**
113  * @brief Default absence threshold.
114  * @since_tizen 5.5
115  */
116 #define UAM_ABSENCE_THRESHOLD_DEFAULT 0
117
118 /**
119  * @brief Macro for event enum.
120  * @since_tizen 5.5
121  */
122 #define GENERATE_EVENT_ENUM(ENUM) ENUM,
123
124 /**
125  * @brief Macro to print event string out.
126  * @since_tizen 5.5
127  */
128 #define GENERATE_EVENT_STRING(STRING) #STRING,
129
130 /**
131  * @brief Max. ibeacon adv length.
132  * @since_tizen 5.5
133  */
134 #define UAM_IBEACON_ADV_MAX_LEN 31
135
136 /**
137  * @brief Maximum number of values from sensor.
138  * @since_tizen 5.5
139  */
140 #define UAM_SENSOR_MAX_VALUES 4
141
142 /**
143  * @brief Enumerations macro of UA framework event codes.
144  * @since_tizen 5.5
145  */
146 typedef enum {
147         UAM_EVENT_USER_ADDED, /**< User added */
148         UAM_EVENT_USER_REMOVED, /**< User removed */
149         UAM_EVENT_DEVICE_ADDED, /**< Device added */
150         UAM_EVENT_DEVICE_REMOVED, /**< Device removed */
151         UAM_EVENT_PRESENCE_DETECTED, /**< Presence detected */
152         UAM_EVENT_USER_PRESENCE_DETECTED, /**< User presence detected */
153         UAM_EVENT_ABSENCE_DETECTED, /**< Absence detected */
154         UAM_EVENT_USER_ABSENCE_DETECTED, /**< User absence detected */
155         UAM_EVENT_AMBIANT_MODE_ENABLED, /**< Ambient mode enabled */
156         UAM_EVENT_AMBIANT_MODE_DISABLED, /**< Ambient mode disabled */
157         UAM_EVENT_SENSOR_STATE_READY, /**< Sensor state ready */
158         UAM_EVENT_SENSOR_STATE_NOT_READY, /**< Sensor state not ready */
159         UAM_EVENT_DETECTION_STARTED, /**< Detection started */
160         UAM_EVENT_DETECTION_STOPPED, /**< Detection stopped */
161         UAM_EVENT_DEVICE_FOUND, /**< Device found */
162         UAM_EVENT_SCAN_COMPLETED, /**< Scan completed */
163         UAM_EVENT_SERVICE_REGISTERED, /**< Service registered */
164         UAM_EVENT_SERVICE_UNREGISTERED, /**< Service registered */
165         UAM_EVENT_SENSOR_STATUS_CHANGED, /**< Sensor status changed */
166         UAM_EVENT_MAX, /**< Max. event number */
167 } uam_event_e;
168
169 /**
170  * @brief Macro to print error string out.
171  * @since_tizen 5.5
172  */
173 #define GENERATE_ERROR_CASE(STRING, offset) case STRING: return #STRING;
174
175 /**
176  * @brief Enumerations macro of UA framework error codes.
177  * @since_tizen 5.5
178  */
179 typedef enum {
180         UAM_ERROR_NONE = TIZEN_ERROR_NONE, /**< Succsssful */
181         UAM_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
182         UAM_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
183         UAM_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
184         UAM_ERROR_RESOURCE_BUSY = TIZEN_ERROR_RESOURCE_BUSY, /**< Resource busy */
185         UAM_ERROR_TIMED_OUT = TIZEN_ERROR_TIMED_OUT, /**< Time out */
186         UAM_ERROR_NOW_IN_PROGRESS = TIZEN_ERROR_NOW_IN_PROGRESS, /**< Now in progress */
187         UAM_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< Not supported */
188         UAM_ERROR_NOT_INITIALIZED = TIZEN_ERROR_UA | 0x01, /**< Not initiaized */
189         UAM_ERROR_NOT_IN_OPERATION = TIZEN_ERROR_UA | 0x02, /**< Not in progress */
190         UAM_ERROR_ALREADY_DONE = TIZEN_ERROR_UA | 0x03, /**< Already done */
191         UAM_ERROR_INTERNAL = TIZEN_ERROR_UA | 0x04, /**< Internal error */
192         UAM_ERROR_NOT_FOUND = TIZEN_ERROR_UA | 0x10, /**< Not found */
193         UAM_ERROR_ALREADY_REGISTERED = TIZEN_ERROR_UA | 0x11, /**< Already registered */
194         UAM_ERROR_DB_FAILED = TIZEN_ERROR_UA | 0x12, /**< DB operation failed */
195         UAM_ERROR_NOT_REGISTERED = TIZEN_ERROR_UA | 0x13, /**< Not registered */
196 } uam_error_e;
197
198 /**
199  * @brief Eevent data structure.
200  * @since_tizen 5.5
201  */
202 typedef struct {
203         int result; /**< Result code */
204         void *data; /**< Data pointer */
205 } uam_event_data_s;
206
207 /**
208  * @brief Callback to be invoked when receiving events.
209  * @since_tizen 5.5
210  *
211  * @remarks The @a event_param should not be released.
212  * @remarks The @a event_param can be used only in the callback.
213  *
214  * @param[in] event Event type.
215  * @param[in] event_param The event data structure.
216  * @param[in] user_data The user data passed in _uam_init()
217  *
218  * @exception
219  * @pre
220  * @post
221  *
222  * @see _uam_init()
223  */
224 typedef void (*uam_event_cb)(int event, uam_event_data_s *event_param, void *user_data);
225
226 /**
227  * @brief Initializes client library.
228  * @since_tizen 5.5
229  *
230  * @param[in] cb Callback handler
231  * @param[in] user_data The user data.
232  *
233  * @return 0 on success, otherwise a negative error value
234  * @retval #UAM_ERROR_NONE Successful
235  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
236  * @rerval #UAM_ERROR_ALREADY_REGISTERED Already registered
237  * @retval #UAM_ERROR_INTERNAL Internal error
238  *
239  * @exception
240  * @pre
241  * @post
242  */
243 int _uam_init(uam_event_cb cb, void *user_data);
244
245 /**
246  * @brief De-initializes client library.
247  * @since_tizen 5.5
248  *
249  * @return 0 on success, otherwise a negative error value
250  * @retval #UAM_ERROR_NONE Successful
251  * @rerval #UAM_ERROR_NOT_REGISTERED Not registered
252  * @retval #UAM_ERROR_INTERNAL Internal error
253  *
254  * @exception
255  * @pre
256  * @post
257  */
258 int _uam_deinit(void);
259
260 /**
261  * @brief Gets available sensor list.
262  * @since_tizen 5.5
263  *
264  * @param[out] bitmask Available sensor list
265  *
266  * @return 0 on success, otherwise a negative error value
267  * @retval #UAM_ERROR_NONE Successful
268  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
269  * @retval #UAM_ERROR_INTERNAL Internal error
270  *
271  * @exception
272  * @pre
273  * @post
274  */
275 int _uam_get_available_sensors(unsigned int *bitmask);
276
277 /**
278  * @brief Gets a specific sensor availability.
279  * @since_tizen 5.5
280  *
281  * @param[in] sensor Sensor type
282  * @param[out] status Sensor state
283  *
284  * @return 0 on success, otherwise a negative error value
285  * @retval #UAM_ERROR_NONE Successful
286  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
287  * @retval #UAM_ERROR_INTERNAL Internal error
288  *
289  * @exception
290  * @pre
291  * @post
292  */
293 int _uam_is_sensor_ready(unsigned int sensor, gboolean* status);
294
295 /**
296  * @brief Starts presence detection.
297  * @since_tizen 5.5
298  *
299  * @param[in] bitmask Bitmask to detect
300  * @param[in] service Service name
301  *
302  * @return 0 on success, otherwise a negative error value
303  * @retval #UAM_ERROR_NONE Successful
304  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
305  * @retval #UAM_ERROR_INTERNAL Internal error
306  *
307  * @exception
308  * @pre
309  * @post
310  */
311 int _uam_start_presence_detection(unsigned int bitmask, const char *service);
312
313 /**
314  * @brief Stops presence detection.
315  * @since_tizen 5.5
316  *
317  * @param[in] bitmask Bitmask to detect
318  * @param[in] service Service name
319  *
320  * @return 0 on success, otherwise a negative error value
321  * @retval #UAM_ERROR_NONE Successful
322  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
323  * @retval #UAM_ERROR_INTERNAL Internal error
324  *
325  * @exception
326  * @pre
327  * @post
328  */
329 int _uam_stop_presence_detection(unsigned int bitmask, const char *service);
330
331 /**
332  * @brief Starts absence detection.
333  * @since_tizen 5.5
334  *
335  * @param[in] bitmask Bitmask to detect
336  * @param[in] service Service name
337  *
338  * @return 0 on success, otherwise a negative error value
339  * @retval #UAM_ERROR_NONE Successful
340  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
341  * @retval #UAM_ERROR_INTERNAL Internal error
342  *
343  * @exception
344  * @pre
345  * @post
346  */
347 int _uam_start_absence_detection(unsigned int bitmask, const char *service);
348
349 /**
350  * @brief Stops absence detection.
351  * @since_tizen 5.5
352  *
353  * @param[in] bitmask Bitmask to detect
354  * @param[in] service Service name
355  *
356  * @return 0 on success, otherwise a negative error value
357  * @retval #UAM_ERROR_NONE Successful
358  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
359  * @retval #UAM_ERROR_INTERNAL Internal error
360  *
361  * @exception
362  * @pre
363  * @post
364  */
365 int _uam_stop_absence_detection(unsigned int bitmask, const char *service);
366
367 /**
368  * @brief Starts active devices searching.
369  * @since_tizen 5.5
370  *
371  * @param[in] bitmask Bitmask to detect
372  * @param[in] detection_period Detection period
373  *
374  * @return 0 on success, otherwise a negative error value
375  * @retval #UAM_ERROR_NONE Successful
376  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
377  * @retval #UAM_ERROR_INTERNAL Internal error
378  *
379  * @exception
380  * @pre
381  * @post
382  */
383 int _uam_start_search_active_devices(unsigned int bitmask, int detection_period);
384
385 /**
386  * @brief Stops active devices searching.
387  * @since_tizen 5.5
388  *
389  * @param[in] bitmask Bitmask to detect
390  *
391  * @return 0 on success, otherwise a negative error value
392  * @retval #UAM_ERROR_NONE Successful
393  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
394  * @retval #UAM_ERROR_INTERNAL Internal error
395  *
396  * @exception
397  * @pre
398  * @post
399  */
400 int _uam_stop_search_active_devices(unsigned int bitmask);
401
402 /**
403  * @brief Registers application id.
404  * @since_tizen 5.5
405  *
406  * @param[in] app_id Application id
407  * @param[in] uid User id
408  *
409  * @return 0 on success, otherwise a negative error value
410  * @retval #UAM_ERROR_NONE Successful
411  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
412  * @retval #UAM_ERROR_INTERNAL Internal error
413  *
414  * @exception
415  * @pre
416  * @post
417  */
418 int _uam_register_app(const char *app_id, unsigned short uid);
419
420 /**
421  * @brief Unregisters application id.
422  * @since_tizen 5.5
423  *
424  * @param[in] app_id Application id
425  * @param[in] uid User id
426  *
427  * @return 0 on success, otherwise a negative error value
428  * @retval #UAM_ERROR_NONE Successful
429  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
430  * @retval #UAM_ERROR_INTERNAL Internal error
431  *
432  * @exception
433  * @pre
434  * @post
435  */
436 int _uam_deregister_app(const char *app_id, unsigned short uid);
437
438 /**
439  * @brief Enumerations for presence state.
440  * @since_tizen 5.5
441  */
442 typedef enum {
443         UAM_PRESENCE_STATE_INVALID = 0x00, /**< Invaild state */
444         UAM_PRESENCE_STATE_PRESENT, /**< Presence state */
445         UAM_PRESENCE_STATE_ABSENT, /**< Absence state */
446 } uam_presence_state_e;
447
448 /**
449  * @brief Enumerations for detection cycle state.
450  * @since_tizen 5.5
451  */
452 typedef enum {
453         UAM_DETECTION_CYCLE_MID = 0x00, /**< Ongoing detection cycle in mid */
454         UAM_DETECTION_CYCLE_END, /**< Detection cycle ends */
455 } uam_cycle_state_e;
456
457 /**
458  * @brief Enumerations for OS type.
459  * @since_tizen 5.5
460  */
461 typedef enum {
462         UAM_OS_TYPE_UNDEFINED = 0x00, /**< Undefined */
463         UAM_OS_TYPE_TIZEN, /**< Tizen */
464         UAM_OS_TYPE_ANDROID, /**< Android */
465         UAM_OS_TYPE_IOS, /**< iOS */
466         UAM_OS_TYPE_INVALID /**< Invalid */
467 } uam_os_type_e;
468
469 /**
470  * @brief Enumerations for connectivity type.
471  * @since_tizen 5.5
472  */
473 typedef enum {
474         UAM_TECH_TYPE_NONE = 0x00, /**< None */
475         UAM_TECH_TYPE_BT = 0x01, /**< BT */
476         UAM_TECH_TYPE_BLE = 0x02, /**< BLE */
477         UAM_TECH_TYPE_WIFI = 0x04, /**< Wi-Fi */
478         UAM_TECH_TYPE_P2P = 0x08, /**< Wi-Fi p2p */
479         UAM_TECH_TYPE_MAX /**< Max. connectivity type */
480 } uam_tech_type_e;
481
482 /**
483  * @brief BLE Payload info structure.
484  * @since_tizen 5.5
485  */
486 typedef struct {
487         char service_id; /** Service Id */
488         char device_icon; /** Device icon */
489         char purpose; /** Purpose */
490         char duid[UAM_BLE_PAYLOAD_DUID_LEN + 1]; /** DUID */
491         char bt_mac[UAM_BT_MAC_ADDRESS_STRING_LEN]; /** BT MAC Address */
492 } uam_ble_payload_s;
493
494 /**
495  * @brief Device info structure.
496  * @since_tizen 5.5
497  */
498 typedef struct {
499         uam_os_type_e operating_system; /**< Operating system */
500         uam_tech_type_e type; /**< Device's mac address type (BT/BLE/WIFI/P2p/...) */
501         char mac[UAM_MAC_ADDRESS_STRING_LEN]; /**< Device's MAC ADDRESS */
502         char ipv4_addr[UAM_IP_ADDRESS_MAX_STRING_LEN];/**< Device's IPv4 address optional */
503         char device_id[UAM_DEVICE_ID_MAX_STRING_LEN]; /**< Device's uniquie ID */
504         uam_ble_payload_s payload; /**< BLE Payload to parse BLE devices*/
505         gboolean discriminant; /**< Determines whether to judge PRESENCE/ABSENCE */
506         unsigned long long last_seen; /**< Latest seen time when device was discoverd */
507 } uam_device_info_s;
508
509 /**
510  * @brief Sensor info structure.
511  * @since_tizen 5.5
512  */
513 typedef struct {
514         unsigned int status; /**< Sensor status */
515         unsigned int sensor_bitmask; /**< sensor bitmask of discovered sensor */
516         unsigned long long timestamp; /**< Latest timestamp when sensor was discoverd */
517         int accuracy; /**< Accuracy info from sensor sensor */
518         int count; /**< count of values from sensor sensor */
519         double values[UAM_SENSOR_MAX_VALUES]; /**< info from sensor */
520 } uam_sensor_info_s;
521
522 /**
523  * @brief User info structure.
524  * @since_tizen 5.5
525  */
526 typedef struct {
527         char account[UAM_USER_ACCOUNT_MAX_STRING_LEN]; /**< User account */
528         char name[UAM_USER_NAME_MAX_STRING_LEN]; /**< User name */
529 } uam_user_info_s;
530
531 /**
532  * @brief Service info structure.
533  * @since_tizen 5.5
534  */
535 typedef struct {
536         char name[UAM_SERVICE_MAX_STRING_LEN]; /**< Service name */
537         unsigned int presence_threshold;
538         unsigned int absence_threshold;
539 } uam_service_info_s;
540
541 /**
542  * @brief Detection event structure.
543  * @since_tizen 5.5
544  */
545 typedef struct {
546         unsigned int sensor_bitmask; /**< Detecting sensor's bitmask */
547         char account[UAM_USER_ACCOUNT_MAX_STRING_LEN]; /**< User account */
548         char service[UAM_SERVICE_MAX_STRING_LEN]; /**< Service name */
549         unsigned long long last_seen; /**< The last time of detection */
550         char device_id[UAM_DEVICE_ID_MAX_STRING_LEN]; /**< Device's unique ID */
551 } uam_detection_event_data_s;
552
553 /**
554  * @brief User event structure.
555  * @since_tizen 5.5
556  */
557 typedef struct {
558         char account[UAM_USER_ACCOUNT_MAX_STRING_LEN]; /**< User account */
559         char name[UAM_USER_NAME_MAX_STRING_LEN]; /**< User name */
560 } uam_user_event_data_s;
561
562 /**
563  * @brief Detection stopped event structure.
564  * @since_tizen 5.5
565  */
566 typedef struct {
567         char service[UAM_SERVICE_MAX_STRING_LEN]; /**< Service name */
568         uam_cycle_state_e cycle_state; /**< detection cycle state */
569 } uam_detection_stopped_event_data_s;
570
571 /**
572  * @brief Application info structure.
573  * @since_tizen 5.5
574  */
575 typedef struct {
576         char *sender; /**< Dbus sender */
577         unsigned short uid; /**< UID */
578         char app_id[UAM_APP_ID_MAX_STRING_LEN]; /**< Application id */
579 } uam_app_info_s;
580
581 /**
582  * @brief Gets registered user list.
583  * @since_tizen 5.5
584  *
585  * @remarks The @a user_list should be destroyed by using #g_free() and #g_ptr_array_free().
586  *
587  * @param[out] user_list User list array
588  *
589  * @return 0 on success, otherwise a negative error value
590  * @retval #UAM_ERROR_NONE Successful
591  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
592  * @retval #UAM_ERROR_INTERNAL Internal error
593  *
594  * @exception
595  * @pre
596  * @post
597  */
598 int _uam_get_registered_users(GPtrArray **user_list);
599
600 /**
601  * @brief Checks registerd device.
602  * @since_tizen 5.5
603  *
604  * @param[in] dev_info Device info
605  * @param[out] is_registered Registered or not
606  *
607  * @return 0 on success, otherwise a negative error value
608  * @retval #UAM_ERROR_NONE Successful
609  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
610  * @retval #UAM_ERROR_INTERNAL Internal error
611  *
612  * @exception
613  * @pre
614  * @post
615  */
616 int _uam_is_device_registered(
617                 uam_device_info_s *dev_info, gboolean *is_registered);
618
619 /**
620  * @brief Callback to be called when receiving events.
621  * @since_tizen 5.5
622  *
623  * @remarks The @a event_param should not be released.
624  * @remarks The @a event_param can be used only in the callback.
625  *
626  * @param[in] event Event type
627  * @param[in] event_param Event data
628  * @param[in] user_data User data passed in _uam_init().
629  *
630  * @return 0 on success, otherwise a negative error value
631  * @retval #UAM_ERROR_NONE Successful
632  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
633  * @retval #UAM_ERROR_INTERNAL Internal error
634  *
635  * @exception
636  * @pre
637  * @post
638  */
639 typedef void (*uam_event_cb)(int event, uam_event_data_s *event_param, void *user_data);
640
641 /**
642  * @brief Intializes a client library of ua-manager.
643  * @since_tizen 5.5
644  *
645  * @param[in] cb Event callback
646  * @param[in] user_data User data passed in _uam_init().
647  *
648  * @return 0 on success, otherwise a negative error value
649  * @retval #UAM_ERROR_NONE Successful
650  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
651  * @retval #UAM_ERROR_INTERNAL Internal error
652  *
653  * @exception
654  * @pre
655  * @post
656  */
657 int _uam_init(uam_event_cb cb, void *user_data);
658
659 /**
660  * @brief De-intializes a client library of ua-manager.
661  * @since_tizen 5.5
662  *
663  * @return 0 on success, otherwise a negative error value
664  * @retval #UAM_ERROR_NONE Successful
665  * @retval #UAM_ERROR_INTERNAL Internal error
666  *
667  * @exception
668  * @pre
669  * @post
670  */
671 int _uam_deinit(void);
672
673 /**
674  * @brief Retrieves available sensor list.
675  * @since_tizen 5.5
676  *
677  * @param[in] bitmask Available sensor list
678  *
679  * @return 0 on success, otherwise a negative error value
680  * @retval #UAM_ERROR_NONE Successful
681  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
682  * @retval #UAM_ERROR_INTERNAL Internal error
683  *
684  * @exception
685  * @pre
686  * @post
687  */
688 int _uam_get_available_sensors(unsigned int *bitmask);
689
690 /**
691  * @brief Gets default user info.
692  * @since_tizen 5.5
693  *
694  * @param[in] uam_user User information
695  *
696  * @return 0 on success, otherwise a negative error value
697  * @retval #UAM_ERROR_NONE Successful
698  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
699  * @retval #UAM_ERROR_INTERNAL Internal error
700  *
701  * @exception
702  * @pre
703  * @post
704  */
705 int _uam_get_default_user(uam_user_info_s *uam_user);
706
707 /**
708  * @brief Adds user info.
709  * @since_tizen 5.5
710  *
711  * @param[in] user User information.
712  *
713  * @return 0 on success, otherwise a negative error value
714  * @retval #UAM_ERROR_NONE Successful
715  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
716  * @retval #UAM_ERROR_INTERNAL Internal error
717  *
718  * @exception
719  * @pre
720  * @post
721  */
722 int _uam_add_user(uam_user_info_s *user);
723
724 /**
725  * @brief Removes user info.
726  * @since_tizen 5.5
727  *
728  * @param[in] account User account.
729  *
730  * @return 0 on success, otherwise a negative error value
731  * @retval #UAM_ERROR_NONE Successful
732  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
733  * @retval #UAM_ERROR_INTERNAL Internal error
734  *
735  * @exception
736  * @pre
737  * @post
738  */
739 int _uam_remove_user(char *account);
740
741 /**
742  * @brief Updates user info.
743  * @since_tizen 5.5
744  *
745  * @param[in] user User information.
746  *
747  * @return 0 on success, otherwise a negative error value
748  * @retval #UAM_ERROR_NONE Successful
749  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
750  * @retval #UAM_ERROR_INTERNAL Internal error
751  *
752  * @exception
753  * @pre
754  * @post
755  */
756 int _uam_update_user(uam_user_info_s *user);
757
758 /**
759  * @brief Brings user information that meet the user account.
760  * @since_tizen 5.5
761  *
762  * @remarks The @a user should not be released.
763  * @remarks The @a user can be used only in the function.
764  *
765  * @param[in] account User account.
766  * @param[out] user User information.
767  *
768  * @return 0 on success, otherwise a negative error value
769  * @retval #UAM_ERROR_NONE Successful
770  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
771  * @retval #UAM_ERROR_INTERNAL Internal error
772  *
773  * @exception
774  * @pre
775  * @post
776  */
777 int _uam_request_get_user_by_account(char *account, uam_user_info_s *user);
778
779 /**
780  * @brief Brings user information that meet the device id.
781  * @since_tizen 5.5
782  *
783  * @remarks The @a user should not be released.
784  * @remarks The @a user can be used only in the function.
785  *
786  * @param[in] device_id Device id.
787  * @param[out] user User information.
788  *
789  * @return 0 on success, otherwise a negative error value
790  * @retval #UAM_ERROR_NONE Successful
791  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
792  * @retval #UAM_ERROR_INTERNAL Internal error
793  *
794  * @exception
795  * @pre
796  * @post
797  */
798 int _uam_request_get_user_by_deviceid(char *device_id, uam_user_info_s *user);
799
800 /**
801  * @brief Brings user information that meet the MAC address.
802  * @since_tizen 5.5
803  *
804  * @remarks The @a user should not be released.
805  * @remarks The @a user can be used only in the function.
806  *
807  * @param[in] mac Mac address.
808  * @param[out] user User information.
809  *
810  * @return 0 on success, otherwise a negative error value
811  * @retval #UAM_ERROR_NONE Successful
812  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
813  * @retval #UAM_ERROR_INTERNAL Internal error
814  *
815  * @exception
816  * @pre
817  * @post
818  */
819 int _uam_request_get_user_by_mac(char *mac, uam_user_info_s *user);
820
821 /**
822  * @brief Requests to add a device info to the user.
823  * @since_tizen 5.5
824  *
825  * @param[in] account User account.
826  * @param[in] device Device information.
827  *
828  * @return 0 on success, otherwise a negative error value
829  * @retval #UAM_ERROR_NONE Successful
830  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
831  * @retval #UAM_ERROR_INTERNAL Internal error
832  *
833  * @exception
834  * @pre
835  * @post
836  */
837 int _uam_request_add_device(char *account, uam_device_info_s *device);
838
839 /**
840  * @brief Requests to remove a device info to the user.
841  * @since_tizen 5.5
842  *
843  * @param[in] account User account.
844  * @param[in] device Device information.
845  *
846  * @return 0 on success, otherwise a negative error value
847  * @retval #UAM_ERROR_NONE Successful
848  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
849  * @retval #UAM_ERROR_INTERNAL Internal error
850  *
851  * @exception
852  * @pre
853  * @post
854  */
855 int _uam_request_remove_device(char *account, uam_device_info_s *device);
856
857 /**
858  * @brief Deletes device information matching device id and sensor type.
859  * @since_tizen 5.5
860  *
861  * @param[in] device_id Device id.
862  * @param[in] tech_type Sensor type.
863  *
864  * @return 0 on success, otherwise a negative error value
865  * @retval #UAM_ERROR_NONE Successful
866  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
867  * @retval #UAM_ERROR_INTERNAL Internal error
868  *
869  * @exception
870  * @pre
871  * @post
872  */
873 int _uam_request_remove_device_by_deviceid(const char *device_id,
874         uam_tech_type_e tech_type);
875
876 /**
877  * @brief Deletes device information matching device MAC.
878  * @since_tizen 5.5
879  *
880  * @param[in] mac MAC address.
881  *
882  * @return 0 on success, otherwise a negative error value
883  * @retval #UAM_ERROR_NONE Successful
884  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
885  * @retval #UAM_ERROR_INTERNAL Internal error
886  *
887  * @exception
888  * @pre
889  * @post
890  */
891 int _uam_request_remove_device_by_mac(const char *mac);
892
893 /**
894  * @brief Retrieves device information matching device id.
895  * @since_tizen 5.5
896  *
897  * @remarks The @a device should not be released.
898  * @remarks The @a device can be used only in the function.
899  *
900  * @param[in] device_id Device id.
901  * @param[in] tech_type Sensor type.
902  * @param[out] device Device information.
903  *
904  * @return 0 on success, otherwise a negative error value
905  * @retval #UAM_ERROR_NONE Successful
906  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
907  * @retval #UAM_ERROR_INTERNAL Internal error
908  *
909  * @exception
910  * @pre
911  * @post
912  */
913 int _uam_request_get_device_by_deviceid(const char *device_id,
914         uam_tech_type_e tech_type, uam_device_info_s *device);
915
916 /**
917  * @brief Retrieves device information matching MAC address.
918  * @since_tizen 5.5
919  *
920  * @remarks The @a device should not be released.
921  * @remarks The @a device can be used only in the function.
922  *
923  * @param[in] mac MAC address.
924  * @param[out] device Device information.
925  *
926  * @return 0 on success, otherwise a negative error value
927  * @retval #UAM_ERROR_NONE Successful
928  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
929  * @retval #UAM_ERROR_INTERNAL Internal error
930  *
931  * @exception
932  * @pre
933  * @post
934  */
935 int _uam_request_get_device_by_mac(const char *mac, uam_device_info_s *device);
936
937 /**
938  * @brief Gets registered devices list.
939  * @since_tizen 5.5
940  *
941  * @remarks The @a devices_list should be destroyed by using #g_free() and #g_ptr_array_free().
942  *
943  * @param[out] devices_list Device list array
944  *
945  * @return 0 on success, otherwise a negative error value
946  * @retval #UAM_ERROR_NONE Successful
947  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
948  * @retval #UAM_ERROR_INTERNAL Internal error
949  *
950  * @exception
951  * @pre
952  * @post
953  */
954 int _uam_request_get_devices(GPtrArray **devices_list);
955
956 /**
957  * @brief Gets registered devices list per a user.
958  * @since_tizen 5.5
959  *
960  * @remarks The @a devices_list should be destroyed by using #g_free() and #g_ptr_array_free().
961  *
962  * @param[in] account User account.
963  * @param[out] devices_list Devices list
964  *
965  * @return 0 on success, otherwise a negative error value
966  * @retval #UAM_ERROR_NONE Successful
967  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
968  * @retval #UAM_ERROR_INTERNAL Internal error
969  *
970  * @exception
971  * @pre
972  * @post
973  */
974 int _uam_request_get_user_devices(char *account, GPtrArray **devices_list);
975
976 /**
977  * @brief Sets detection threshold.
978  * @since_tizen 5.5
979  *
980  * @param[in] sensor_type Sensor type.
981  * @param[in] presence_threshold Threshold value for presence.
982  * @param[in] absence_threshold Threshold value for absence.
983  *
984  * @return 0 on success, otherwise a negative error value
985  * @retval #UAM_ERROR_NONE Successful
986  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
987  * @retval #UAM_ERROR_INTERNAL Internal error
988  *
989  * @exception
990  * @pre
991  * @post
992  */
993 int _uam_request_set_detection_threshold(unsigned int sensor_type,
994         int presence_threshold, int absence_threshold);
995
996 /**
997  * @brief Sets low-power mode.
998  * @since_tizen 5.5
999  *
1000  * @param[in] sensor The sensor type
1001  * @param[in] on_off Low power mode enable or not
1002  *
1003  * @return 0 on success, otherwise a negative error value
1004  * @retval #UAM_ERROR_NONE Successful
1005  * @retval #UAM_ERROR_INTERNAL Internal error
1006  *
1007  * @exception
1008  * @pre
1009  * @post
1010  */
1011 int _uam_set_low_power_mode(unsigned int sensor_bitmask,
1012         gboolean mode);
1013
1014 /**
1015  * @brief Gets default service info.
1016  * @since_tizen 5.5
1017  *
1018  * @param[in] service Service information
1019  *
1020  * @return 0 on success, otherwise a negative error value
1021  * @retval #UAM_ERROR_NONE Successful
1022  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
1023  * @retval #UAM_ERROR_INTERNAL Internal error
1024  *
1025  * @exception
1026  * @pre
1027  * @post
1028 */
1029 int _uam_get_default_service(uam_service_info_s *service);
1030
1031 /**
1032  * @brief Registers service info.
1033  * @since_tizen 5.5
1034  *
1035  * @param[in] service Service information.
1036  *
1037  * @return 0 on success, otherwise a negative error value
1038  * @retval #UAM_ERROR_NONE Successful
1039  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
1040  * @retval #UAM_ERROR_INTERNAL Internal error
1041  *
1042  * @exception
1043  * @pre
1044  * @post
1045  */
1046 int _uam_register_service(uam_service_info_s *service);
1047
1048 /**
1049  * @brief Updates service info.
1050  * @since_tizen 5.5
1051  *
1052  * @param[in] service Service information.
1053  *
1054  * @return 0 on success, otherwise a negative error value
1055  * @retval #UAM_ERROR_NONE Successful
1056  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
1057  * @retval #UAM_ERROR_INTERNAL Internal error
1058  *
1059  * @exception
1060  * @pre
1061  * @post
1062  */
1063 int _uam_update_service(uam_service_info_s *service);
1064
1065 /**
1066  * @brief Unregisters service info.
1067  * @since_tizen 5.5
1068  *
1069  * @param[in] service Service information.
1070  *
1071  * @return 0 on success, otherwise a negative error value
1072  * @retval #UAM_ERROR_NONE Successful
1073  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
1074  * @retval #UAM_ERROR_INTERNAL Internal error
1075  *
1076  * @exception
1077  * @pre
1078  * @post
1079  */
1080 int _uam_unregister_service(uam_service_info_s *service);
1081
1082 /**
1083  * @brief Gets detction window size.
1084  * @since_tizen 5.5
1085  *
1086  * @param[out] window Window size
1087  *
1088  * @return 0 on success, otherwise a negative error value
1089  * @retval #UAM_ERROR_NONE Successful
1090  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
1091  * @retval #UAM_ERROR_INTERNAL Internal error
1092  *
1093  * @exception
1094  * @pre
1095  * @post
1096  */
1097 int _uam_get_detection_window(unsigned int *window);
1098
1099 /**
1100  * @brief Gets registered service list.
1101  * @since_tizen 5.5
1102  *
1103  * @remarks The @a service_list should be destroyed by using #g_free() and #g_ptr_array_free().
1104  *
1105  * @param[out] service_list Service list array
1106  *
1107  * @return 0 on success, otherwise a negative error value
1108  * @retval #UAM_ERROR_NONE Successful
1109  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
1110  * @retval #UAM_ERROR_INTERNAL Internal error
1111  *
1112  * @exception
1113  * @pre
1114  * @post
1115  */
1116 int _uam_get_registered_services(GPtrArray **service_list);
1117
1118 /**
1119  * @brief Gets registered users list for a service.
1120  * @since_tizen 5.5
1121  *
1122  * @remarks The @a users_list should be destroyed by using #g_free() and #g_ptr_array_free().
1123  *
1124  * @param[in] svc_name The service name
1125  * @param[out] users_list Users list array
1126  *
1127  * @return 0 on success, otherwise a negative error value
1128  * @retval #UAM_ERROR_NONE Successful
1129  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
1130  * @retval #UAM_ERROR_INTERNAL Internal error
1131  *
1132  * @exception
1133  * @pre
1134  * @post
1135  */
1136 int _uam_request_get_service_users(char *svc_name, GPtrArray **users_list);
1137
1138 /**
1139  * @brief Gets registered devices list for a service.
1140  * @since_tizen 5.5
1141  *
1142  * @remarks The @a devices_list should be destroyed by using #g_free() and #g_ptr_array_free().
1143  *
1144  * @param[in] svc_name The service name
1145  * @param[out] devices_list Devices list array
1146  *
1147  * @return 0 on success, otherwise a negative error value
1148  * @retval #UAM_ERROR_NONE Successful
1149  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
1150  * @retval #UAM_ERROR_INTERNAL Internal error
1151  *
1152  * @exception
1153  * @pre
1154  * @post
1155  */
1156 int _uam_request_get_service_devices(char *svc_name, GPtrArray **devices_list);
1157
1158 /**
1159  * @brief Sets detction window.
1160  * @since_tizen 5.5
1161  *
1162  * @param[in] window Window size
1163  *
1164  * @return 0 on success, otherwise a negative error value
1165  * @retval #UAM_ERROR_NONE Successful
1166  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
1167  * @retval #UAM_ERROR_INTERNAL Internal error
1168  *
1169  * @exception
1170  * @pre
1171  * @post
1172  */
1173 int _uam_set_detection_window(unsigned int window);
1174
1175 /**
1176  * @brief Adds a user to the service.
1177  * @since_tizen 5.5
1178  *
1179  * @param[in] service Service idt.
1180  * @param[in] account User account.
1181  *
1182  * @return 0 on success, otherwise a negative error value
1183  * @retval #UAM_ERROR_NONE Successful
1184  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
1185  * @retval #UAM_ERROR_INTERNAL Internal error
1186  *
1187  * @exception
1188  * @pre
1189  * @post
1190  */
1191 int _uam_service_add_user(const char *service, const char *account);
1192
1193 /**
1194  * @brief Removes a user from the service.
1195  * @since_tizen 5.5
1196  *
1197  * @param[in] service Service idt.
1198  * @param[in] account User account.
1199  *
1200  * @return 0 on success, otherwise a negative error value
1201  * @retval #UAM_ERROR_NONE Successful
1202  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
1203  * @retval #UAM_ERROR_INTERNAL Internal error
1204  *
1205  * @exception
1206  * @pre
1207  * @post
1208  */
1209 int _uam_service_remove_user(const char *service, const char *account);
1210
1211 /**
1212  * @brief Adds a device to the service.
1213  * @since_tizen 5.5
1214  *
1215  * @param[in] service Service idt.
1216  * @param[in] device_id Device id.
1217  * @param[in] tech_type Sensor type.
1218  *
1219  * @return 0 on success, otherwise a negative error value
1220  * @retval #UAM_ERROR_NONE Successful
1221  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
1222  * @retval #UAM_ERROR_INTERNAL Internal error
1223  *
1224  * @exception
1225  * @pre
1226  * @post
1227  */
1228 int _uam_service_add_device(const char *service, char *device_id,
1229         uam_tech_type_e tech_type);
1230
1231 /**
1232  * @brief Removes a device from the service.
1233  * @since_tizen 5.5
1234  *
1235  * @param[in] service Service idt.
1236  * @param[in] device_id Device id.
1237  * @param[in] tech_type Sensor type.
1238  *
1239  * @return 0 on success, otherwise a negative error value
1240  * @retval #UAM_ERROR_NONE Successful
1241  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
1242  * @retval #UAM_ERROR_INTERNAL Internal error
1243  *
1244  * @exception
1245  * @pre
1246  * @post
1247  */
1248 int _uam_service_remove_device(const char *service, char *device_id,
1249         uam_tech_type_e tech_type);
1250
1251 /**
1252  * @brief Sets a device discriminant for the service.
1253  * @since_tizen 5.5
1254  *
1255  * @param[in] service Service idt.
1256  * @param[in] device_id Device id.
1257  * @param[in] tech_type Sensor type.
1258  * @param[in] discriminant Device discriminant.
1259  *
1260  * @return 0 on success, otherwise a negative error value
1261  * @retval #UAM_ERROR_NONE Successful
1262  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
1263  * @retval #UAM_ERROR_INTERNAL Internal error
1264  *
1265  * @exception
1266  * @pre
1267  * @post
1268  */
1269 int _uam_service_set_device_discriminant(const char *service,
1270         const char *device_id, uam_tech_type_e tech_type, gboolean discriminant);
1271
1272 /**
1273  * @brief Gets a device discriminant for the service.
1274  * @since_tizen 5.5
1275  *
1276  * @param[in] service Service idt.
1277  * @param[in] device_id Device id.
1278  * @param[in] tech_type Sensor type.
1279  * @param[out] discriminant Device discriminant.
1280  *
1281  * @return 0 on success, otherwise a negative error value
1282  * @retval #UAM_ERROR_NONE Successful
1283  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
1284  * @retval #UAM_ERROR_INTERNAL Internal error
1285  *
1286  * @exception
1287  * @pre
1288  * @post
1289  */
1290 int _uam_service_get_device_discriminant(const char *service,
1291         const char *device_id, uam_tech_type_e tech_type, gboolean *discriminant);
1292
1293 /**
1294  * @brief Gets the last seen time for the device linked in the service.
1295  * @since_tizen 5.5
1296  *
1297  * @param[in] service Service idt.
1298  * @param[in] device_id Device id.
1299  * @param[in] tech_type Sensor type.
1300  * @param[out] last_seen The last seen time.
1301  *
1302  * @return 0 on success, otherwise a negative error value
1303  * @retval #UAM_ERROR_NONE Successful
1304  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
1305  * @retval #UAM_ERROR_INTERNAL Internal error
1306  *
1307  * @exception
1308  * @pre
1309  * @post
1310  */
1311 int _uam_service_get_device_last_seen(const char *service,
1312         const char *device_id, uam_tech_type_e tech_type, unsigned long long *last_seen);
1313
1314 /**
1315  * @brief Sets detction cycle per eash service.
1316  * @since_tizen 5.5
1317  *
1318  * @param[in] service Service id
1319  * @param[in] cycle The cycle number of the service.
1320  *
1321  * @return 0 on success, otherwise a negative error value
1322  * @retval #UAM_ERROR_NONE Successful
1323  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
1324  * @retval #UAM_ERROR_INTERNAL Internal error
1325  *
1326  * @exception
1327  * @pre
1328  * @post
1329  */
1330 int _uam_set_service_detection_cycle(const char *service, unsigned int cycle);
1331
1332 /**
1333  * @brief Gets detction cycle per eash service.
1334  * @since_tizen 5.5
1335  *
1336  * @param[in] service Service id
1337  * @param[out] cycle The cycle number of the service.
1338  *
1339  * @return 0 on success, otherwise a negative error value
1340  * @retval #UAM_ERROR_NONE Successful
1341  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
1342  * @retval #UAM_ERROR_INTERNAL Internal error
1343  *
1344  * @exception
1345  * @pre
1346  * @post
1347  */
1348 int _uam_get_service_detection_cycle(const char *service, unsigned int *cycle);
1349
1350 /**
1351  * @brief Resets contents in database.
1352  * @since_tizen 5.5
1353  *
1354  * @return 0 on success, otherwise a negative error value
1355  * @retval #UAM_ERROR_NONE Successful
1356  * @retval #UAM_ERROR_INTERNAL Internal error
1357  *
1358  * @exception
1359  * @pre
1360  * @post
1361  */
1362 int _uam_db_reset(void);
1363
1364 /**
1365  * @brief Updates the device.
1366  * @since_tizen 5.5
1367  *
1368  * @param[in] device Device information.
1369  *
1370  * @return 0 on success, otherwise a negative error value
1371  * @retval #UAM_ERROR_NONE Successful
1372  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
1373  * @retval #UAM_ERROR_INTERNAL Internal error
1374  *
1375  * @exception
1376  * @pre
1377  * @post
1378  */
1379 int _uam_request_update_device(uam_device_info_s *device);
1380
1381 /**
1382  * @brief Sets iBeacon ibeacon adevertising data.
1383  * @since_tizen 5.5
1384  *
1385  * @param[in] adv_len The iBeacon adevertising data's length.
1386  * @param[in] ibeacon_adv The iBeacon adevertising data.
1387  *
1388  * @return 0 on success, otherwise a negative error value
1389  * @retval #UAM_ERROR_NONE Successful
1390  * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameter
1391  *
1392  * @exception
1393  * @pre
1394  * @post
1395  */
1396 int _uam_add_ibeacon_adv_data(unsigned int adv_len, const char *ibeacon_adv);
1397
1398 #ifdef __cplusplus
1399 }
1400 #endif
1401 #endif /* __TIZEN_UA_NETWORK_UA_API_H__ */