Mesh: Add API for group message communication
[platform/core/api/bluetooth.git] / include / bluetooth_internal.h
1 /*
2  * Copyright (c) 2011 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_NETWORK_BLUETOOTH_INTERNAL_H__
19 #define __TIZEN_NETWORK_BLUETOOTH_INTERNAL_H__
20
21 #include <glib.h>
22 #include "bluetooth_type.h"
23 #include "bluetooth_type_internal.h"
24
25 #ifndef TIZEN_DEPRECATED_API
26 #define TIZEN_DEPRECATED_API __attribute__((__visibility__("default"), deprecated))
27 #endif
28
29 #ifdef __cplusplus
30 extern "C"
31 {
32 #endif /* __cplusplus */
33
34 /**
35  * @file        bluetooth_internal.h
36  */
37
38 /**
39  * @internal
40  * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
41  * @brief Enables the local Bluetooth adapter, asynchronously.
42  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
43  * @privlevel platform
44  * @privilege %http://tizen.org/privilege/bluetooth.admin
45  *
46  * @details This function enables Bluetooth protocol stack and hardware.
47  *
48  * @return 0 on success, otherwise a negative error value.
49  * @retval #BT_ERROR_NONE  Successful
50  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
51  * @retval #BT_ERROR_ALREADY_DONE  Already enabled
52  * @retval #BT_ERROR_NOW_IN_PROGRESS  Operation now in progress
53  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
54  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
55  *
56  * @pre Bluetooth service must be initialized with bt_initialize().
57  * @pre The state of local Bluetooth must be #BT_ADAPTER_DISABLED
58  * @post This function invokes bt_adapter_state_changed_cb().
59  *
60  * @see bt_initialize()
61  * @see bt_adapter_get_state()
62  * @see bt_adapter_set_state_changed_cb()
63  * @see bt_adapter_unset_state_changed_cb()
64  * @see bt_adapter_state_changed_cb()
65  *
66  */
67 int bt_adapter_enable(void);
68
69 /**
70  * @internal
71  * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
72  * @brief Synchronously provides details about bluetooth usage
73  * @since_tizen 5.5
74  * @privlevel platform
75  * @privilege %http://tizen.org/privilege/bluetooth.admin
76  *
77  * @details This function provides details such as session start time, session end time as well as total scan time and total connected time in a session
78  *
79  * @remarks An pointer of type bt_battery_info_s must be passed as argument which will contain the relevant information as the function returns.
80  *
81  * @return 0 on success, otherwise a negative error value.
82  * @retval #BT_ERROR_NONE  Successful
83  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
84  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
85  * @retval #BT_ERROR_NOW_IN_PROGRESS  Operation now in progress
86  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
87  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
88  *
89  * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED
90  * @post
91  *
92  */
93 int bt_adapter_read_battery_info(bt_battery_info_s *data);
94
95 /**
96  * @internal
97  * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
98  * @brief Disables the local Bluetooth adapter, asynchronously.
99  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
100  * @privlevel platform
101  * @privilege %http://tizen.org/privilege/bluetooth.admin
102  *
103  * @details This function disables Bluetooth protocol stack and hardware.
104  *
105  * @remarks You should disable Bluetooth adapter, which is helpful for saving power.
106  *
107  * @return 0 on success, otherwise a negative error value.
108  * @retval #BT_ERROR_NONE  Successful
109  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
110  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
111  * @retval #BT_ERROR_NOW_IN_PROGRESS  Operation now in progress
112  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
113  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
114  *
115  * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED
116  * @post This function invokes bt_adapter_state_changed_cb().
117  *
118  * @see bt_adapter_get_state()
119  * @see bt_adapter_state_changed_cb()
120  * @see bt_adapter_set_state_changed_cb()
121  * @see bt_adapter_unset_state_changed_cb ()
122  *
123  */
124 int bt_adapter_disable(void);
125
126 /**
127  * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
128  * @brief Initializes and activates battery monitor
129  * @since_tizen5.5
130  *
131  * @param[in] callback Address of callback function
132  * @param[in] user_data user
133  *
134  * @pre This function will initialize and activate the battery monitor feature.
135  * It sets a callback function that will be called when bluetooth adapter
136  * is disabled.
137  *
138  * @see *bt_adapter_disable_battery_cb
139  */
140 int bt_adapter_init_battery_monitor(bt_adapter_disable_battery_cb callback,
141                                                         void *user_data);
142
143 /**
144  * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
145  * @brief Deinitializes and disables battery monitor.
146  * @since_tizen5.5
147  *
148  * @pre This function will disable the battery monitor feature
149  * and unset the related callback function
150  *
151  * @see bt_adapter_init_battery_monitor
152  * @see *bt_adapter_disable_battery_cb
153  */
154 int bt_adapter_deinit_battery_monitor();
155
156 /**
157  * @internal
158  * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
159  * @brief Recover the local Bluetooth adapter, asynchronously.
160  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
161  * @privlevel platform
162  * @privilege %http://tizen.org/privilege/bluetooth.admin
163  *
164  * @details This function does recovery logic, disables Bluetooth protocol stack and hardware, then enables after a few seconds.
165  *
166  * @return 0 on success, otherwise a negative error value.
167  * @retval #BT_ERROR_NONE  Successful
168  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
169  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
170  * @retval #BT_ERROR_NOW_IN_PROGRESS  Operation now in progress
171  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
172  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
173  *
174  * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED
175  * @post This function invokes bt_adapter_state_changed_cb().
176  *
177  * @see bt_adapter_get_state()
178  * @see bt_adapter_state_changed_cb()
179  * @see bt_adapter_set_state_changed_cb()
180  * @see bt_adapter_unset_state_changed_cb ()
181  *
182  */
183 int bt_adapter_recover(void);
184
185 /**
186  * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_MODULE
187  * @brief  A2DP source/sink role is switched using this API
188  * @since_tizen 4.0
189  * @param[in] Role for A2DP
190  * @return @c 0 on success,
191  *         otherwise a negative error value
192  * @retval #BT_ERROR_NONE Successful
193  * @retval #BT_ERROR_NOT_INITIALIZED Not initialized
194  * @retval #BT_ERROR_NOT_SUPPORTED Not supported
195  * @retval #BT_ERROR_OPERATION_FAILED Internal Error
196  * @pre The Bluetooth service must be initialized with bt_initialize().
197  * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().
198  * @see bt_initialize()
199  * @see bt_audio_initialize()
200  */
201 int bt_audio_select_role(bt_audio_role_e role);
202
203 /**
204  * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_MODULE
205  * @brief  Absolute Volume of the remote headset is set using this API
206  * @since_tizen 6.0
207  * @param[in] The absolute volume of the remote headset (0 ~ 150)
208  * @return @c 0 on success,
209  *         otherwise a negative error value
210  * @retval #BT_ERROR_NONE Successful
211  * @retval #BT_ERROR_NOT_INITIALIZED Not initialized
212  * @retval #BT_ERROR_NOT_SUPPORTED Not supported
213  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
214  * @retval #BT_ERROR_OPERATION_FAILED Internal Error
215  * @pre The Bluetooth service must be initialized with bt_initialize().
216  * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().
217  * @see bt_initialize()
218  * @see bt_audio_initialize()
219  */
220 int bt_audio_set_absolute_volume(unsigned int volume);
221
222 /**
223  * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_MODULE
224  * @brief  Get Absolute Volume of the remote headset using this API
225  * @since_tizen 6.0
226  * @param[out] The absolute volume of the remote headset (0 ~ 150)
227  * @return @c 0 on success,
228  *         otherwise a negative error value
229  * @retval #BT_ERROR_NONE Successful
230  * @retval #BT_ERROR_NOT_INITIALIZED Not initialized
231  * @retval #BT_ERROR_NOT_SUPPORTED Not supported
232  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
233  * @retval #BT_ERROR_OPERATION_FAILED Internal Error
234  * @pre The Bluetooth service must be initialized with bt_initialize().
235  * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().
236  * @see bt_initialize()
237  * @see bt_audio_initialize()
238  */
239 int bt_audio_get_absolute_volume(unsigned int *volume);
240
241 /**
242  * @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE
243  * @brief  Registers a callback function that will be invoked when the volume is changed.
244  * @since_tizen 6.0
245  * @param[in] callback The callback function to register
246  * @param[in] user_data The user data to be passed to the callback function
247  * @return   0 on success, otherwise a negative error value.
248  * @retval #BT_ERROR_NONE  Successful
249  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
250  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
251  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
252  * @pre The Bluetooth service must be initialized with bt_initialize().
253  * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().
254  * @see bt_initialize()
255  * @see bt_audio_initialize()
256  */
257 int bt_audio_set_absolute_volume_changed_cb(bt_audio_absolute_volume_changed_cb callback, void *user_data);
258
259 /**
260  * @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE
261  * @brief  Unregisters a callback function that will be invoked when the volume is changed.
262  * @since_tizen 6.0
263  * @return   0 on success, otherwise a negative error value.
264  * @retval #BT_ERROR_NONE  Successful
265  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
266  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
267  *
268  * @pre The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize().
269  * @pre The Bluetooth service must be initialized with bt_initialize().
270  * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().
271  * @see bt_initialize()
272  * @see bt_audio_initialize()
273  */
274 int bt_audio_unset_absolute_volume_changed_cb(void);
275
276 /**
277  * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_MODULE
278  * @brief  Get Absolute Volume Control status using this API
279  * @since_tizen 6.0
280  * @param[out] Activated infomation
281  * @return @c 0 on success,
282  *         otherwise a negative error value
283  * @retval #BT_ERROR_NONE Successful
284  * @retval #BT_ERROR_NOT_INITIALIZED Not initialized
285  * @retval #BT_ERROR_NOT_SUPPORTED Not supported
286  * @retval #BT_ERROR_OPERATION_FAILED Internal Error
287  * @pre The Bluetooth service must be initialized with bt_initialize().
288  * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().
289  * @see bt_initialize()
290  * @see bt_audio_initialize()
291  */
292 int bt_audio_is_avc_activated(bool *activated);
293
294 /**
295  * @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE
296  * @brief  Registers a callback function that will be invoked when the absolute volume control status is changed.
297  * @since_tizen 6.0
298  * @param[in] callback The callback function to register
299  * @param[in] user_data The user data to be passed to the callback function
300  * @return   0 on success, otherwise a negative error value.
301  * @retval #BT_ERROR_NONE  Successful
302  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
303  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
304  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
305  * @pre The Bluetooth service must be initialized with bt_initialize().
306  * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().
307  * @see bt_initialize()
308  * @see bt_audio_initialize()
309  */
310 int bt_audio_set_avc_status_changed_cb(bt_audio_avc_status_changed_cb callback, void *user_data);
311
312 /**
313  * @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE
314  * @brief  Unregisters a callback function that will be invoked when the absolute volume control status is changed.
315  * @since_tizen 6.0
316  * @return   0 on success, otherwise a negative error value.
317  * @retval #BT_ERROR_NONE  Successful
318  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
319  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
320  * @pre The Bluetooth service must be initialized with bt_initialize().
321  * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().
322  * @see bt_initialize()
323  * @see bt_audio_initialize()
324  */
325 int bt_audio_unset_avc_status_changed_cb(void);
326
327 /**
328  * @internal
329  * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
330  * @brief Reset the local Bluetooth adapter, synchronously.
331  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
332  * @privlevel platform
333  * @privilege %http://tizen.org/privilege/bluetooth.admin
334  *
335  * @details This function resets Bluetooth protocol and values.
336  *
337  * @return 0 on success, otherwise a negative error value.
338  * @retval #BT_ERROR_NONE  Successful
339  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
340  * @retval #BT_ERROR_OPERATION_FAILED Operation failed
341  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
342  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
343  *
344  * @pre Bluetooth service must be initialized with bt_initialize().
345  * @post bt_adapter_state_changed_cb() will be invoked if The state of local Bluetooth was #BT_ADAPTER_ENABLED.
346  *
347  * @see bt_initialize()
348  * @see bt_adapter_get_state()
349  * @see bt_adapter_set_state_changed_cb()
350  * @see bt_adapter_unset_state_changed_cb()
351  * @see bt_adapter_state_changed_cb()
352  *
353  */
354 int bt_adapter_reset(void);
355
356 /**
357  * @internal
358  * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
359  * @brief Gets the version of local Bluetooth adapter.
360  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
361  * @remarks The @a local_version must be released with free() by you.
362  *
363  * @param[out] local_version The version of local Bluetooth adapter
364  *
365  * @return 0 on success, otherwise a negative error value.
366  * @retval #BT_ERROR_NONE Successful
367  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
368  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
369  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
370  * @retval #BT_ERROR_OUT_OF_MEMORY  Out of memory
371  * @retval #BT_ERROR_OPERATION_FAILED Operation failed
372  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
373  *
374  * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED.
375  */
376 int bt_adapter_get_version(char **local_version);
377
378 /**
379  * @internal
380  * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
381  * @brief Gets the information regarding local Bluetooth adapter.
382  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
383  * @remarks The @a all parameters must be released with free() by you.
384  *
385  * @param[out] chipset Chipset name of local Bluetooth adapter
386  * @param[out] firmware Firmware info. of local Bluetooth adapter
387  * @param[out] stack_version Bluetooth stack version
388  * @param[out] profiles The profile list of local Bluetooth adapter
389  *
390  * @return 0 on success, otherwise a negative error value.
391  * @retval #BT_ERROR_NONE Successful
392  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
393  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
394  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
395  * @retval #BT_ERROR_OUT_OF_MEMORY  Out of memory
396  * @retval #BT_ERROR_OPERATION_FAILED Operation failed
397  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
398  *
399  * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED.
400  */
401 int bt_adapter_get_local_info(char **chipset, char **firmware, char **stack_version, char **profiles);
402
403 /**
404  * @internal
405  * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
406  * @brief Sets the visibility mode.
407  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
408  * @privlevel platform
409  * @privilege %http://tizen.org/privilege/bluetooth.admin
410  *
411  * @remarks #BT_ADAPTER_VISIBILITY_MODE_LIMITED_DISCOVERABLE will change to #BT_ADAPTER_VISIBILITY_MODE_NON_DISCOVERABLE
412  * after the given @a duration goes.
413  *
414  * @param[in] discoverable_mode The Bluetooth visibility mode to set
415  * @param[in] duration The duration until the visibility mode is changed to #BT_ADAPTER_VISIBILITY_MODE_NON_DISCOVERABLE (in seconds).
416  * @a duration is used only for #BT_ADAPTER_VISIBILITY_MODE_LIMITED_DISCOVERABLE mode.
417  *
418  * @return 0 on success, otherwise a negative error value.
419  * @retval #BT_ERROR_NONE  Successful
420  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
421  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
422  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
423  * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
424  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
425  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
426  *
427  * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED.
428  * @post bt_adapter_visibility_mode_changed_cb() will be invoked if this function returns #BT_ERROR_NONE.
429  *
430  * @see bt_adapter_get_visibility()
431  * @see bt_adapter_visibility_mode_changed_cb()
432  * @see bt_adapter_set_visibility_mode_changed_cb()
433  * @see bt_adapter_unset_visibility_mode_changed_cb()
434  */
435 int bt_adapter_set_visibility(bt_adapter_visibility_mode_e discoverable_mode, int duration);
436
437 /**
438  * @deprecated Deprecated since 5.5
439  * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
440  * @brief Registers a callback function that will be invoked when remote device requests authentication.
441  * @return 0 on success, otherwise a negative error value.
442  * @retval #BT_ERROR_NONE Successful
443  * @retval #BT_ERROR_NOT_INITIALIZED Not initialized
444  * @pre The Bluetooth service must be initialized by bt_initialize().
445  * @param[in] callback  callback function to be set when a request is received.
446  * @param[in] user_data data from application which will be provided in callback.
447  * @retval #BT_ERROR_NONE  Successful
448  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
449  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
450  * @see bt_initialize()
451  * @see bt_adapter_set_authentication_req_cb()
452  */
453 int bt_adapter_set_authentication_req_cb(bt_adapter_authentication_req_cb callback, void *user_data);
454
455 /**
456  * @since_tizen 5.5
457  * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
458  * @brief Registers a callback with a incoming parameter to describe direction of pairing request that will be invoked when remote device requests authentication.
459  * @return 0 on success, otherwise a negative error value.
460  * @retval #BT_ERROR_NONE Successful
461  * @retval #BT_ERROR_NOT_INITIALIZED Not initialized
462  * @pre The Bluetooth service must be initialized by bt_initialize().
463  * @param[in] callback  callback function to be set when a request is received.
464  * @param[in] user_data data from application which will be provided in callback.
465  * @retval #BT_ERROR_NONE  Successful
466  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
467  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
468  * @see bt_initialize()
469  * @see bt_adapter_authentication_request_cb()
470  */
471
472 int bt_adapter_set_authentication_request_cb(bt_adapter_authentication_request_cb callback, void *user_data);
473
474 /**
475  * @deprecated Deprecated since 5.5
476  * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
477  * @brief Unregisters a callback function that will be invoked when remote device requests authentication.
478  * @return 0 on success, otherwise a negative error value.
479  * @retval #BT_ERROR_NONE Successful
480  * @retval #BT_ERROR_NOT_INITIALIZED Not initialized
481  * @pre The Bluetooth service must be initialized by bt_initialize().
482  * @see bt_initialize()
483  * @see bt_adapter_set_authentication_req_cb()
484  */
485 int bt_adapter_unset_authentication_req_cb(void);
486
487 /**
488  * @since_tizen 5.5
489  * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
490  * @brief Unregisters a callback function with incoming parameter that will be invoked when remote device requests authentication.
491  * @return 0 on success, otherwise a negative error value.
492  * @retval #BT_ERROR_NONE Successful
493  * @retval #BT_ERROR_NOT_INITIALIZED Not initialized
494  * @pre The Bluetooth service must be initialized by bt_initialize().
495  * @see bt_initialize()
496  * @see bt_adapter_set_authentication_request_cb()
497  */
498
499 int bt_adapter_unset_authentication_request_cb(void);
500
501
502 /**
503  * @ingroup  CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
504  * @brief  API to reply with PIN or PASSKEY with authentication type - TRUE or FALSE.
505  * @remarks  This function can be called by application when remote device requests PIN or PASSKEY from
506  *           local adapter.
507  * @param[in]  passkey  The passkey to be provided by application when remote devices requests for it.
508  * @param[in]  authentication_reply This indicates whether application wants to accept or cancel the on-going pairing
509  * @pre  This function can only be called when application receieves authentication event (BT_AUTH_PIN_REQUEST)
510  *       from remote device.
511  * @see  bt_adapter_set_authentication_req_cb()
512  */
513 int bt_adapter_passkey_reply(char *passkey, bool authentication_reply);
514
515 /**
516  * @ingroup  CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
517  * @brief  API to reply to the PASSKEY confirmation for on-going pairing with remote device.
518  * @remarks  This function can be called by application, when local adapter wants PASSKEY confirmation from user.
519  * @param[in]  confirmation_reply This indicates whether application wants to accepts or cancels the on-going pairing
520  *             confirmation_reply : TRUE will indicate that Application has confirmed the PASSKEY
521  *             confirmation_reply : FALSE will indicate that Application has failed to confirm the PASSKEY. In this situation
522  *             the pairing will be failed.
523  * @pre  This function can only be called when application receives authentication event (BT_AUTH_PASSKEY_CONFIRM_REQUEST)
524  *       from remote device.
525  * @see  bt_adapter_set_authentication_req_cb()
526  */
527 int bt_adapter_passkey_confirmation_reply(bool confirmation_reply);
528
529 /**
530  * @internal
531  * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
532  * @brief  Registers a callback function to be invoked when the connectable state changes.
533  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
534  *
535  * @param[in] callback The callback function to register
536  * @param[in] user_data The user data to be passed to the callback function
537  *
538  * @return   0 on success, otherwise a negative error value.
539  * @retval #BT_ERROR_NONE  Successful
540  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
541  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
542  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
543  *
544  * @pre The Bluetooth service must be initialized with bt_initialize().
545  * @post bt_adapter_connectable_changed_cb() will be invoked.
546  *
547  * @see bt_initialize()
548  * @see bt_adapter_connectable_changed_cb()
549  * @see bt_adapter_unset_connectable_changed_cb()
550  */
551 int bt_adapter_set_connectable_changed_cb(bt_adapter_connectable_changed_cb callback, void *user_data);
552
553 /**
554  * @internal
555  * @ingroup  CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
556  * @brief  Unregisters the callback function.
557  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
558  *
559  * @return  0 on success, otherwise a negative error value.
560  * @retval  #BT_ERROR_NONE  Successful
561  * @retval  #BT_ERROR_NOT_INITIALIZED  Not initialized
562  * @retval  #BT_ERROR_NOT_SUPPORTED  Not supported
563  *
564  * @pre  The Bluetooth service must be initialized with bt_initialize().
565  *
566  * @see  bt_initialize()
567  * @see  bt_adapter_set_connectable_changed_cb()
568  */
569 int bt_adapter_unset_connectable_changed_cb(void);
570
571 /**
572  * @internal
573  * @ingroup  CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
574  * @brief  Gets the connectable state of local Bluetooth adapter.
575  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
576  *
577  * @remarks When connectable state is false, no device can connect to this device and visibility mode cannot be changed.
578  *
579  * @param[out] connectable The connectable state of local Bluetooth adapter
580  *
581  * @return 0 on success, otherwise a negative error value.
582  * @retval #BT_ERROR_NONE  Successful
583  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
584  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
585  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
586  * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
587  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
588  *
589  * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED.
590  *
591  * @see bt_adapter_set_connectable()
592  */
593 int bt_adapter_get_connectable(bool *connectable);
594
595 /**
596  * @internal
597  * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
598  * @brief  Sets the connectable state of local Bluetooth adapter.
599  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
600  * @privlevel platform
601  * @privilege %http://tizen.org/privilege/bluetooth.admin
602  *
603  * @remarks When connectable state is false, no device can connect to this device and visibility mode cannot be changed.
604  *
605  * @param[in] connectable The connectable state to set
606  *
607  * @return 0 on success, otherwise a negative error value.
608  * @retval #BT_ERROR_NONE  Successful
609  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
610  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
611  * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
612  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
613  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
614  *
615  * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED.
616  * @post bt_adapter_connectable_changed_cb() will be invoked if this function returns #BT_ERROR_NONE.
617  *
618  * @see bt_adapter_get_connectable()
619  * @see bt_adapter_connectable_changed_cb()
620  * @see bt_adapter_set_connectable_changed_cb()
621  * @see bt_adapter_unset_connectable_changed_cb()
622  */
623 int bt_adapter_set_connectable(bool connectable);
624
625 /**
626  * @internal
627  * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
628  * @brief Sets the manufacturer data of local Bluetooth adapter.
629  * @since_tizen 2.3
630  * @privlevel platform
631  * @privilege %http://tizen.org/privilege/bluetooth.admin
632  *
633  * @param[in]   data    The manufacturer specific data of the Bluetooth device.
634  * @param[in]   len     The length of @a data.Maximaum length is 240 bytes.
635  *
636  * @return 0 on success, otherwise a negative error value.
637  * @retval #BT_ERROR_NONE  Successful
638  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
639  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
640  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
641  * @retval #BT_ERROR_OPERATION_FAILED Operation failed
642  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
643  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
644  *
645  * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED.
646  * @post bt_adapter_manufacturer_data_changed_cb() will be invoked
647  * if this function returns #BT_ERROR_NONE.
648  *
649  * @see bt_adapter_manufacturer_data_changed_cb
650  * @see bt_adapter_set_manufacturer_data_changed_cb()
651  * @see bt_adapter_unset_manufacturer_data_changed_cb()
652  */
653 int bt_adapter_set_manufacturer_data(char *data, int len);
654
655 /**
656  * @brief Checks scan filter feature is supported or not.
657  * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
658  *
659  * @param[out] is_supported The Scan Filter feature support: (@c true = supported , @c  false = not supported)
660  *
661  * @return 0 on success, otherwise a negative error value.
662  * @retval #BT_ERROR_NONE  Successful
663  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
664  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
665  * @retval #BT_ERROR_NOT_ENABLED  Adapter is not enabled
666  * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
667  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
668  *
669  * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED.
670  */
671 int bt_adapter_le_is_scan_filter_supported(bool *is_supported);
672
673 /**
674  * @internal
675  * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
676  * @brief Parse the samsung specific manufacturer data of discovered device.
677  *
678  * @remarks bt_adapter_free_manufacturer_data should be invoked
679  * to free the memory associated with parsed data
680  *
681  * @param[in]   manufacturer_data       The manufacturer specific data of the discovered Bluetooth device.
682  * @param[in]   len             length of the received manufacturer data
683  * @param[out] data Parsed manufacturer data
684  *
685  * @return 0 on success, otherwise a negative error value.
686  * @retval #BT_ERROR_NONE  Successful
687  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
688  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
689  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
690  *
691  * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED.
692  *
693  * @see bt_adapter_free_manufacturer_data()
694  */
695 int bt_adapter_parse_manufacturer_data(bt_manufacturer_data *data,
696                 char *manufacturer_data, int manufacturer_data_len);
697
698 /**
699  * @internal
700  * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
701  * @brief Free the memory associated with parsed manufacturer data
702  *
703  * @param[in] data parsed manufactrer data
704  *
705  * @return 0 on success, otherwise a negative error value.
706  * @retval #BT_ERROR_NONE  Successful
707  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
708  *
709  *
710  * @see bt_adapter_parse_manufacturer_data()
711  */
712 int bt_adapter_free_manufacturer_data(bt_manufacturer_data *data);
713
714 /**
715  * @internal
716  * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
717  * @brief  Registers a callback function to be invoked
718  * when the manufacturer data of Bluetooth adapter changes.
719  * @since_tizen 2.3
720  *
721  * @param[in]   callback        The callback function to invoke
722  * @param[in]   user_data       The user data to be passed to the callback function
723  *
724  * @return   0 on success, otherwise a negative error value.
725  * @retval #BT_ERROR_NONE  Successful
726  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
727  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
728  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
729  *
730  * @pre The Bluetooth service must be initialized with bt_initialize().
731  * @post  bt_adapter_manufacturer_data_changed_cb() will be invoked.
732  *
733  * @see bt_initialize()
734  * @see bt_adapter_unset_manufacturer_data_changed_cb()
735  */
736 int bt_adapter_set_manufacturer_data_changed_cb(
737                 bt_adapter_manufacturer_data_changed_cb callback,
738                 void *user_data);
739
740 /**
741  * @internal
742  * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
743  * @brief       Unregisters the callback function.
744  * @since_tizen 2.3
745  *
746  * @return      0 on success, otherwise a negative error value.
747  * @retval #BT_ERROR_NONE  Successful
748  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
749  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
750  *
751  * @pre The Bluetooth service must be initialized with bt_initialize().
752  *
753  * @see bt_initialize()
754  * @see bt_adapter_set_manufacturer_data_changed_cb()
755  */
756 int bt_adapter_unset_manufacturer_data_changed_cb(void);
757
758 /**
759  * @internal
760  * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
761  * @brief Enables the local Bluetooth le adapter, asynchronously.
762  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
763  * @privlevel platform
764  * @privilege %http://tizen.org/privilege/bluetooth.admin
765  *
766  * @details This function enables Bluetooth protocol stack and hardware.
767  *
768  * @return 0 on success, otherwise a negative error value.
769  * @retval #BT_ERROR_NONE  Successful
770  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
771  * @retval #BT_ERROR_ALREADY_DONE  Already enabled
772  * @retval #BT_ERROR_NOW_IN_PROGRESS  Operation now in progress
773  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
774  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
775  *
776  * @pre Bluetooth service must be initialized with bt_initialize().
777  * @post This function invokes bt_adapter_le_state_changed_cb().
778  *
779  * @see bt_initialize()
780  * @see bt_adapter_le_get_state()
781  * @see bt_adapter_le_set_state_changed_cb()
782  * @see bt_adapter_le_unset_state_changed_cb()
783  * @see bt_adapter_le_state_changed_cb()
784  *
785  */
786 int bt_adapter_le_enable(void);
787
788 /**
789  * @internal
790  * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
791  * @brief Disables the local Bluetooth le adapter, asynchronously.
792  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
793  * @privlevel platform
794  * @privilege %http://tizen.org/privilege/bluetooth.admin
795  *
796  * @details This function disables Bluetooth le protocol stack and hardware.
797  *
798  * @remarks
799  *
800  * @return 0 on success, otherwise a negative error value.
801  * @retval #BT_ERROR_NONE  Successful
802  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
803  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
804  * @retval #BT_ERROR_NOW_IN_PROGRESS  Operation now in progress
805  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
806  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
807  *
808  * @pre The state of local Bluetooth must be #BT_ADAPTER_LE_ENABLED
809  * @post This function invokes bt_adapter_le_state_changed_cb().
810  *
811  * @see bt_adapter_le_get_state()
812  * @see bt_adapter_le_state_changed_cb()
813  * @see bt_adapter_le_set_state_changed_cb()
814  * @see bt_adapter_le_unset_state_changed_cb ()
815  *
816  */
817 int bt_adapter_le_disable(void);
818
819 /**
820  * @internal
821  * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
822  * @brief Gets the current state of local Bluetooth adapter.
823  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
824  *
825  * @param[out] adapter_le_state The current adapter le state
826  *
827  * @return 0 on success, otherwise a negative error value.
828  * @retval #BT_ERROR_NONE  Successful
829  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
830  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
831  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
832  *
833  * @pre Bluetooth service must be initialized with bt_initialize().
834  *
835  * @see bt_initialize()
836  */
837 int bt_adapter_le_get_state(bt_adapter_le_state_e *adapter_le_state);
838
839 /**
840  * @internal
841  * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
842  * @brief  Registers a callback function to be invoked when the Bluetooth adapter le state changes.
843  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
844  *
845  * @param[in] callback  The callback function to invoke
846  * @param[in] user_data The user data to be passed to the callback function
847  *
848  * @return   0 on success, otherwise a negative error value.
849  * @retval #BT_ERROR_NONE  Successful
850  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
851  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
852  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
853  *
854  * @pre The Bluetooth service must be initialized with bt_initialize().
855  * @post bt_adapter_le_state_changed_cb() will be invoked.
856  *
857  * @see bt_initialize()
858  * @see bt_adapter_le_state_changed_cb()
859  * @see bt_adapter_le_unset_state_changed_cb()
860  */
861 int bt_adapter_le_set_state_changed_cb(bt_adapter_le_state_changed_cb callback, void *user_data);
862
863 /**
864  * @internal
865  * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
866  * @brief       Unregisters the callback function.
867  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
868  *
869  * @return      0 on success, otherwise a negative error value.
870  * @retval #BT_ERROR_NONE  Successful
871  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
872  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
873  *
874  * @pre The Bluetooth service must be initialized with bt_initialize().
875  *
876  * @see bt_initialize()
877  * @see bt_adapter_le_set_state_changed_cb()
878  */
879 int bt_adapter_le_unset_state_changed_cb(void);
880
881 /**
882  * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
883  * @brief Sets Bluetooth LE scan type
884  * @since_tizen 5.5
885  * @privlevel platform
886  * @privilege %http://tizen.org/privilege/bluetooth.admin
887  * @param[in]  scan_type  The scan type
888  *
889  * @return 0 on success, otherwise a negative error value.
890  * @retval #BT_ERROR_NONE Successful
891  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
892  * @retval #BT_ERROR_NOT_ENABLED Adapter is not enabled
893  * @retval #BT_ERROR_INVALID_PARAMETER Parameter is invalid
894  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
895  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
896  * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED.
897  * @pre The Bluetooth service must be initialized with bt_initialize().
898  */
899 int bt_adapter_le_set_scan_type(bt_adapter_le_scan_type_e scan_type);
900
901 /**
902  * @internal
903  * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
904  * @brief add address to whitelist for accepting scanning request.
905  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
906  * @privlevel platform
907  * @privilege %http://tizen.org/privilege/bluetooth.admin
908  *
909  * @remarks If the adress is in the whitelist then other LE devices are able to
910  * search this device. Before calling this API, make sure that the adapter is
911  * enabled. There is no callback event for this API.
912
913  * @param[in] address The other device's address
914  * @param[in] address_type The other device's address type
915  *
916  * @return 0 on success, otherwise a negative error value.
917  * @retval #BT_ERROR_NONE  Successful
918  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
919  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
920  * @retval #BT_ERROR_NOT_ENABLED  Adapter is not enabled
921  * @retval #BT_ERROR_RESOURCE_BUSY  Device or resource busy
922  * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
923  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
924  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
925  *
926  * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED.
927  *
928  * @see bt_adapter_le_start_advertising_new()
929  * @see bt_adapter_le_stop_advertising()
930  */
931 int bt_adapter_le_add_white_list(const char *address, bt_device_address_type_e address_type);
932
933 /**
934  * @internal
935  * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
936  * @brief remove address from the whitelist for not accepting scanning request.
937  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
938  * @privlevel platform
939  * @privilege %http://tizen.org/privilege/bluetooth.admin
940  *
941  * @remarks If the adress is in the whitelist then other LE devices are able to
942  * search this device. Before calling this API, make sure that the adapter is
943  * enabled. There is no callback event for this API.
944  *
945  * @param[in] address The other device's address
946  * @param[in] address_type The other device's address type
947  *
948  * @return 0 on success, otherwise a negative error value.
949  * @retval #BT_ERROR_NONE  Successful
950  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
951  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
952  * @retval #BT_ERROR_NOT_ENABLED  Adapter is not enabled
953  * @retval #BT_ERROR_RESOURCE_BUSY  Device or resource busy
954  * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
955  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
956  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
957  *
958  * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED.
959  *
960  * @see bt_adapter_le_start_advertising_new()
961  * @see bt_adapter_le_stop_advertising()
962  */
963 int bt_adapter_le_remove_white_list(const char *address, bt_device_address_type_e address_type);
964
965 /**
966  * @internal
967  * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
968  * @brief  Sets the Privacy feature state of local Bluetooth adapter.
969  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
970  * @privlevel platform
971  * @privilege %http://tizen.org/privilege/bluetooth.admin
972  *
973  * @param[in] enable_privacy The privacy feature to set/unset.
974  *
975  * @return 0 on success, otherwise a negative error value.
976  * @retval #BT_ERROR_NONE  Successful
977  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
978  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
979  * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
980  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
981  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
982  *
983  * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED.
984  * @pre The state of local Bluetooth must be #BT_ADAPTER_LE_ENABLED.
985  *
986  */
987 int bt_adapter_le_enable_privacy(bool enable_privacy);
988
989 /**
990  * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
991  * @brief Gets the Confirmation and Random value, synchronously.
992  * @since_tizen 5.5
993  * @privlevel platform
994  * @privilege %http://tizen.org/privilege/bluetooth.admin
995  *
996  * @remarks The @a local_address, confirmation and random must be released using free()
997  *
998  * @param[out] local_address Local device address
999  * @param[out] address_type Local device address type
1000  * @param[out] confirmation The confirmation value
1001  * @param[out] random The random value
1002  * @param[out] confirmation_len The length of @a confirmation
1003  * @param[out] random_len The length of @a random
1004  * @return 0 on success, otherwise a negative error value.
1005  * @retval #BT_ERROR_NONE  Successful
1006  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
1007  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
1008  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
1009  * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
1010  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
1011  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
1012  *
1013  * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED.
1014  * @pre The Bluetooth service must be initialized with bt_initialize().
1015  * @see bt_initialize()
1016  */
1017 int bt_adapter_le_get_local_oob_ext_data(char **local_address, bt_device_address_type_e *address_type,
1018                 unsigned char **confirmation, unsigned char **random,
1019                 int *confirmation_len, int *random_len);
1020
1021 /**
1022  * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
1023  * @brief Sets the Hash and Randomizer value, synchronously for LE OOB pairing.
1024  * @since_tizen 4.0
1025  * @privlevel platform
1026  * @privilege %http://tizen.org/privilege/bluetooth.admin
1027  *
1028  * @param[in] remote_address Remote device address
1029  * @param[in] address_type Remote device address type
1030  * @param[in] hash256 The P-256 hash value received via OOB from remote device
1031  * @param[in] randomizer256 The P-256 randomizer value received via OOB from remote device
1032  * @param[in] hash256_len The length of @a hash256
1033  * @param[in] randomizer256_len The length of @a randomizer256
1034  * @return 0 on success, otherwise a negative error value.
1035  * @retval #BT_ERROR_NONE  Successful
1036  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
1037  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
1038  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
1039  * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
1040  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
1041  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
1042  *
1043  * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED.
1044  * @pre The Bluetooth service must be initialized with bt_initialize().
1045  * @see bt_initialize()
1046  */
1047 int bt_adapter_le_set_remote_oob_ext_data(const char *remote_address,
1048                 bt_device_address_type_e address_type,
1049                 const unsigned char *hash256, const unsigned char *randomizer256,
1050                 int hash256_len, int randomizer256_len);
1051
1052 /**
1053  * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
1054  * @brief Set advertising filter policy to use white list
1055  * @since_tizen 2.4
1056  * @privlevel public
1057  * @privilege %http://tizen.org/privilege/bluetooth
1058  *
1059  * @param[in] advertiser The handle of advertiser
1060  * @param[in] filter_policy The filter policy of advertising
1061  *
1062  * @return 0 on success, otherwise a negative error value.
1063  * @retval #BT_ERROR_NONE  Successful
1064  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
1065  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
1066  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
1067  * @retval #BT_ERROR_NOW_IN_PROGRESS  Operation is now in progress
1068  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
1069  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
1070  *
1071  * @pre The Bluetooth service must be initialized with bt_initialize().
1072  *
1073  * @see bt_adapter_le_start_advertising_new()
1074  */
1075 int bt_adapter_le_set_advertising_filter_policy(bt_advertiser_h advertiser, bt_adapter_le_advertising_filter_policy_e filter_policy);
1076
1077
1078 /**
1079  * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
1080  * @brief Set advertise Tx power level to control the transmission power level for the advertising
1081  * @since_tizen 5.5
1082  * @privlevel platform
1083  * @privilege %http://tizen.org/privilege/bluetooth.admin
1084  *
1085  * @param[in] advertiser The handle of advertiser
1086  * @param[in] tx_power_level Transmission power level of advertising. The valid range is [-127 ~ 1]
1087  *                      Recommended values are bt_adapter_le_advertising_tx_power_level_e
1088  *
1089  * @return 0 on success, otherwise a negative error value.
1090  * @retval #BT_ERROR_NONE  Successful
1091  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
1092  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
1093  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
1094  * @retval #BT_ERROR_NOW_IN_PROGRESS  Operation is now in progress
1095  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
1096  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
1097  *
1098  * @pre The Bluetooth service must be initialized with bt_initialize().
1099  *
1100  * @see bt_adapter_le_start_advertising_new()
1101  * @see bt_adapter_le_advertising_tx_power_level_e
1102  */
1103 int bt_adapter_le_set_advertising_custom_tx_power_level(bt_advertiser_h advertiser, int tx_power_level);
1104
1105 /**
1106  * @internal
1107  * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
1108  * @brief Retrieves the address of the devices connected with the specific profile.
1109  * @since_tizen 4.0
1110  *
1111  * @param[in] profile_uuid The UUID of profile service uuid of the connected device
1112  * @param[in] callback The callback function to invoke
1113  * @param[in] user_data The user data passed from the foreach function
1114  *
1115  * @return 0 on success, otherwise a negative error value.
1116  * @retval #BT_ERROR_NONE  Successful
1117  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
1118  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
1119  * @retval #BT_ERROR_OUT_OF_MEMORY      Out of memory
1120  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
1121  * @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED  There is no connected device
1122  * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
1123  * @retval #BT_ERROR_NOT_SUPPORTED      Not supported
1124  *
1125  * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED.
1126  * @post This function invokes bt_adapter_profile_connected_devices_cb().
1127  *
1128  * @see bt_adapter_profile_connected_devices_cb()
1129  */
1130 int bt_adapter_foreach_profile_connected_devices(const char *profile_uuid,
1131         bt_adapter_profile_connected_devices_cb callback, void *user_data);
1132
1133 /**
1134  * @internal
1135  * @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE
1136  * @brief Disconnects a remote Bluetooth device.
1137  * @since_tizen 4.0
1138  * @privlevel platform
1139  * @privilege %http://tizen.org/privilege/bluetooth.admin
1140  *
1141  * @param[in] remote_address The address of the remote Bluetooth device
1142  *
1143  * @return 0 on success, otherwise a negative error value.
1144  * @retval #BT_ERROR_NONE  Successful
1145  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
1146  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
1147  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
1148  * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
1149  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
1150  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
1151  *
1152  * @see bt_device_set_connection_state_changed_cb()
1153  */
1154 int bt_device_disconnect(const char *remote_address);
1155
1156 /**
1157  * @internal
1158  * @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE
1159  * @brief Gets a connection state
1160  * @since_tizen @if WEARABLE @else 2.4 @endif
1161  *
1162  * @param[in] remote_address The address of the remote Bluetooth device
1163  * @param[in] link_type The link type to get a connection state
1164  * @param[out] connected The connection state
1165  *
1166  * @return 0 on success, otherwise a negative error value.
1167  * @retval #BT_ERROR_NONE  Successful
1168  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
1169  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
1170  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
1171  * @retval #BT_ERROR_OPERATION_FAILED   Operation failed
1172  */
1173 int bt_device_get_connection_state(const char *remote_address, bt_device_connection_link_type_e link_type, bool *connected);
1174
1175 /**
1176  * @internal
1177  * @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE
1178  * @brief Creates a bond with a remote Bluetooth device, asynchronously.
1179  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
1180  * @privlevel platform
1181  * @privilege %http://tizen.org/privilege/bluetooth.admin
1182  *
1183  * @remarks A bond can be destroyed by bt_device_destroy_bond().\n
1184  * The bonding request can be cancelled by bt_device_cancel_bonding().
1185  *
1186  * @param[in] remote_address The address of the remote Bluetooth device with which the bond should be created
1187  * @param[in] conn_type The connection type(LE or BREDR) to create bond with remote device
1188  *
1189  * @return 0 on success, otherwise a negative error value.
1190  * @retval #BT_ERROR_NONE  Successful
1191  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
1192  * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter
1193  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
1194  * @retval #BT_ERROR_RESOURCE_BUSY     Device or resource busy
1195  * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
1196  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
1197  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
1198  *
1199  * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED.
1200  * @pre The remote device must be discoverable with bt_adapter_start_device_discovery().
1201  * @post This function invokes bt_device_bond_created_cb().
1202  *
1203  * @see bt_adapter_start_device_discovery()
1204  * @see bt_device_create_bond()
1205  * @see bt_device_bond_created_cb()
1206  * @see bt_device_cancel_bonding()
1207  * @see bt_device_destroy_bond()
1208  * @see bt_device_set_bond_created_cb()
1209  * @see bt_device_unset_bond_created_cb()
1210  */
1211 int bt_device_create_bond_by_type(const char *remote_address,
1212                                   bt_device_connection_link_type_e conn_type);
1213
1214 /**
1215  * @internal
1216  * @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE
1217  * @brief Cancels service search process.
1218  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
1219  * @privlevel platform
1220  * @privilege %http://tizen.org/privilege/bluetooth.admin
1221  *
1222  * @return 0 on success, otherwise a negative error value.
1223  * @retval #BT_ERROR_NONE  Successful
1224  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
1225  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
1226  * @retval #BT_ERROR_REMOTE_DEVICE_NOT_BONDED  Remote device not bonded
1227  * @retval #BT_ERROR_NOT_IN_PROGRESS  Operation not in progress
1228  * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
1229  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
1230  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
1231  *
1232  * @pre The service search must be in progress by bt_device_start_service_search().
1233  *
1234  * @see bt_device_start_service_search()
1235  * @see bt_device_service_searched_cb()
1236  * @see bt_device_set_service_searched_cb()
1237  * @see bt_device_unset_service_searched_cb()
1238  */
1239 int bt_device_cancel_service_search(void);
1240
1241 /**
1242  * @internal
1243  * @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE
1244  * @brief Gets a connection state
1245  * @since_tizen @if WEARABLE 2.4 @endif
1246  *
1247  * @param[in] remote_address The address of the remote Bluetooth device
1248  * @param[in] link_type The link type to get a connection state
1249  * @param[out] connected The connection state
1250  *
1251  * @return 0 on success, otherwise a negative error value.
1252  * @retval #BT_ERROR_NONE  Successful
1253  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
1254  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
1255  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
1256  * @retval #BT_ERROR_OPERATION_FAILED   Operation failed
1257  */
1258 int bt_device_get_connection_state(const char *remote_address, bt_device_connection_link_type_e link_type, bool *connected);
1259
1260 /**
1261  * @internal
1262  * @deprecated Deprecated since 4.0. Use bt_device_set_profile_trusted instead.
1263  * @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE
1264  * @brief Sets a profile restricted connection for a device
1265  * @since_tizen 3.0
1266  * @privlevel platform
1267  * @privilege %http://tizen.org/privilege/bluetooth.admin
1268  *
1269  * @return 0 on success, otherwise a negative error value.
1270  * @retval #BT_ERROR_NONE  Successful
1271  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
1272  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
1273  * @retval #BT_ERROR_REMOTE_DEVICE_NOT_BONDED  Remote device not bonded
1274  * @retval #BT_ERROR_NOT_IN_PROGRESS  Operation not in progress
1275  * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
1276  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
1277  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
1278  */
1279 int bt_device_set_profile_restricted(const char *device_address, bt_restricted_profile_t profile, bool restricted);
1280
1281 /**
1282  * @internal
1283  * @deprecated Deprecated since 4.0. Use bt_device_get_profile_trusted instead.
1284  * @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE
1285  * @brief Gets a profile restricted connection for a device
1286  * @since_tizen 3.0
1287  *
1288  * @return 0 on success, otherwise a negative error value.
1289  * @retval #BT_ERROR_NONE  Successful
1290  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
1291  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
1292  * @retval #BT_ERROR_REMOTE_DEVICE_NOT_BONDED  Remote device not bonded
1293  * @retval #BT_ERROR_NOT_IN_PROGRESS  Operation not in progress
1294  * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
1295  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
1296  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
1297  */
1298 int bt_device_get_profile_restricted(const char *device_address, bt_restricted_profile_t profile, int *restricted);
1299
1300 /**
1301  * @internal
1302  * @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE
1303  * @brief   Set a profile trusted or untrusted for a device.
1304  * @since_tizen 4.0
1305  * @privlevel platform
1306  * @privilege %http://tizen.org/privilege/bluetooth.admin
1307  * @return 0 on success, otherwise a negative error value.
1308  * @retval #BT_ERROR_NONE  Successful
1309  * @retval #BT_ERROR_INTERNAL Internal Error
1310  * @retval #BT_ERROR_NOT_INITIALIZED  Not supported
1311  * @retval #BT_ERROR_INVALID_PARAMETER Invalid Parameter
1312  * @retval #BT_ERROR_NOT_ENABLED Invalid Parameter
1313  */
1314 int bt_device_set_profile_trusted(const char *device_address, bt_trusted_profile_t profile, bool trust);
1315
1316 /**
1317  * @internal
1318  * @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE
1319  * @brief   Gets a profile is trusted or untrusted for a device.
1320  * @since_tizen 4.0
1321  * @return 0 on success, otherwise a negative error value.
1322  * @retval #BT_ERROR_NONE  Successful
1323  * @retval #BT_ERROR_INTERNAL Internal Error
1324  * @retval #BT_ERROR_NOT_INITIALIZED  Not supported
1325  * @retval #BT_ERROR_NOT_ENABLED Invalid Parameter
1326  * @retval #BT_ERROR_INVALID_PARAMETER Invalid Parameter
1327  */
1328 int bt_device_get_profile_trusted(const char *device_address, bt_trusted_profile_t profile, int *trust);
1329
1330 /**
1331  * @internal
1332  * @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE
1333  * @brief   Registers a callback function to be invoked when Trusted Profiles are changed.
1334  * @since_tizen 2.4
1335  * @return 0 on success, otherwise a negative error value.
1336  * @retval #BT_ERROR_NONE  Successful
1337  * @retval #BT_ERROR_NOT_INITIALIZED  Not supported
1338  * @retval #BT_ERROR_INVALID_PARAMETER Invalid Parameter
1339  */
1340 int bt_device_set_trusted_profile_cb(bt_device_trusted_profiles_cb callback, void *user_data);
1341
1342 /**
1343  * @internal
1344  * @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE
1345  * @brief   Unregisters the callback function registered with bt_device_set_trusted_profile_cb().
1346  * @since_tizen 2.4
1347  * @return 0 on success, otherwise a negative error value.
1348  * @retval #BT_ERROR_NONE  Successful
1349  * @retval #BT_ERROR_NOT_INITIALIZED  Not supported
1350  */
1351 int bt_device_unset_trusted_profile_cb(void);
1352
1353 /**
1354  * @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE
1355  * @brief Gets the ID address of the remote device
1356  * @since_tizen 6.0
1357  *
1358  * @remarks The id_address must be released with free() by you.
1359  *
1360  * @param[in] remote_rpa The Resolvable private address of the remote device
1361  * @param[out] id_address The Identity address of the remote device
1362  *
1363  * @return 0 on success, otherwise a negative error value.
1364  * @retval #BT_ERROR_NONE  Successful
1365  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
1366  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
1367  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
1368  * @retval #BT_ERROR_OPERATION_FAILED   Operation failed
1369  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
1370  * @retval #BT_ERROR_NOT_SUPPORTED      Not supported
1371  */
1372 int bt_device_get_id_address(const char *remote_rpa, char **id_address);
1373
1374 /**
1375  * @internal
1376  * @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE
1377  * @brief Gets the rssi value when link loss occurs.
1378  * @since_tizen 6.0
1379  *
1380  * @remarks This function should be called in bt_device_connection_state_changed_cb()
1381  * when the device is disconnected
1382  *
1383  * @param[out] rssi Link loss rssi
1384  * @retval #BT_ERROR_NONE  Successful
1385  * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
1386  *
1387  * @see bt_device_set_connection_state_changed_cb()
1388  * @see bt_device_connection_state_changed_cb()
1389  */
1390 int bt_device_get_link_loss_rssi(int *rssi);
1391
1392 /**
1393  * @deprecated Deprecated since 4.0. Use bt_gatt_client_request_att_mtu_change instead.
1394  * @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE
1395  * @brief Request to change ATT MTU value
1396  * @since_tizen 3.0
1397  * @privlevel platform
1398  * @privilege %http://tizen.org/privilege/bluetooth.admin
1399  *
1400  * @param[in] remote_address The address of the remote Bluetooth device
1401  * @param[in] mtu New MTU value to be changed
1402  *
1403  * @return 0 on success, otherwise a negative error value.
1404  * @retval #BT_ERROR_NONE  Successful
1405  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
1406  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
1407  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
1408  * @retval #BT_ERROR_OPERATION_FAILED   Operation failed
1409  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
1410  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
1411  */
1412 int bt_device_request_att_mtu(const char *remote_address, unsigned int mtu) TIZEN_DEPRECATED_API;
1413
1414 /**
1415  * @deprecated Deprecated since 4.0. Use bt_gatt_client_get_att_mtu instead.
1416  * @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE
1417  * @brief Gets the ATT MTU value set for a connection
1418  * @since_tizen 3.0
1419  * @privlevel platform
1420  * @privilege %http://tizen.org/privilege/bluetooth.admin
1421  *
1422  * @param[in] remote_address The address of the remote Bluetooth device
1423  * @param[ot] mtu MTU value set for a connection
1424  *
1425  * @return 0 on success, otherwise a negative error value.
1426  * @retval #BT_ERROR_NONE  Successful
1427  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
1428  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
1429  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
1430  * @retval #BT_ERROR_OPERATION_FAILED   Operation failed
1431  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
1432  * @retval #BT_ERROR_NOT_SUPPORTED      Not supported
1433  */
1434 int bt_device_get_att_mtu(const char *remote_address, unsigned int *mtu) TIZEN_DEPRECATED_API;
1435
1436 /**
1437  * @deprecated Deprecated since 4.0. Use bt_gatt_client_set_att_mtu_changed_cb instead.
1438  * @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE
1439  * @brief  Registers a callback function to be invoked when the ATT MTU is changed.
1440  * @since_tizen 3.0
1441  * @param[in] callback The callback function to register
1442  * @param[in] user_data The user data to be passed to the callback function
1443  * @return 0 on success, otherwise a negative error value.
1444  * @retval #BT_ERROR_NONE  Successful
1445  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
1446  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
1447  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
1448  *
1449  * @pre The Bluetooth service must be initialized with bt_initialize().
1450  * @post bt_device_connection_state_changed_cb() will be invoked.
1451  * @see bt_initialize()
1452  * @see bt_device_unset_att_mtu_changed_cb()
1453  */
1454 int bt_device_set_att_mtu_changed_cb(bt_device_att_mtu_changed_cb callback, void *user_data) TIZEN_DEPRECATED_API;
1455
1456 /**
1457  * @deprecated Deprecated since 4.0. Use bt_gatt_client_unset_att_mtu_changed_cb instead.
1458  * @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE
1459  * @brief       Unregisters the callback function to be invoked when the ATT MTU is changed.
1460  * @since_tizen 3.0
1461  * @return 0 on success, otherwise a negative error value.
1462  * @retval #BT_ERROR_NONE  Successful
1463  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
1464  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
1465  *
1466  * @pre The Bluetooth service must be initialized with bt_initialize().
1467  * @see bt_initialize()
1468  * @see bt_device_set_att_mtu_changed_cb()
1469  */
1470 int bt_device_unset_att_mtu_changed_cb(void) TIZEN_DEPRECATED_API;
1471
1472 /**
1473  * @internal
1474  * @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE
1475  * @brief Registers a rfcomm server socket with a specific UUID. Activation by dbus is possible when the profile is connected.
1476  * @since_tizen 2.4
1477  * @privlevel platform
1478  * @privilege %http://tizen.org/privilege/bluetooth.admin
1479  *
1480  * @remarks A socket can be destroyed by bt_socket_destroy_rfcomm_ex().
1481  * Application should call this API to receive a connection event when launched again by dbus.
1482  *
1483  * @param[in] uuid The UUID of service to provide
1484  * @param[in] bus_name bus_name of the application which is provided in service file.
1485  * @param[in] object_path dbus of the application
1486  * @return 0 on success, otherwise a negative error value.
1487  *
1488  * @retval #BT_ERROR_NONE  Successful
1489  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
1490  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
1491  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
1492  * @retval #BT_ERROR_NOW_IN_PROGRESS  Already registered
1493  * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
1494  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
1495  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
1496  *
1497  * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED.
1498  *
1499  * @see bt_socket_listen_and_accept_rfcomm_ex()
1500  * @see bt_socket_destroy_rfcomm_ex()
1501  */
1502 int bt_socket_create_rfcomm_ex(const char *uuid, const char *bus_name, const char *object_path);
1503
1504 /**
1505  * @internal
1506  * @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE
1507  * @brief Removes the rfcomm server socket which was created using bt_socket_create_rfcomm_ex().
1508  * @since_tizen 2.4
1509  * @privlevel platform
1510  * @privilege %http://tizen.org/privilege/bluetooth.admin
1511  * @remarks If callback function bt_socket_connection_state_changed_cb() is set and the remote Bluetooth device is connected,
1512  * then bt_socket_connection_state_changed_cb() will be called when this function is finished successfully.
1513  *
1514  * @param[in] uuid The UUID (which was created using bt_socket_create_rfcomm()) to destroy
1515  * @return 0 on success, otherwise a negative error value.
1516  * @retval #BT_ERROR_NONE  Successful
1517  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
1518  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
1519  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
1520  * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
1521  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
1522  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
1523  *
1524  * @pre The socket must be created with bt_socket_create_rfcomm_ex().
1525  * @post If callback function bt_socket_connection_state_changed_cb() is set and the remote Bluetooth device is connected,
1526  * then bt_socket_connection_state_changed_cb() will be called.
1527  * @see bt_socket_create_rfcomm_ex()
1528  * @see bt_socket_connection_state_changed_cb()
1529  * @see bt_socket_set_connection_state_changed_cb()
1530  * @see bt_socket_unset_connection_state_changed_cb()
1531  */
1532 int bt_socket_destroy_rfcomm_ex(const char *uuid);
1533
1534 /**
1535  * @internal
1536  * @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE
1537  * @brief Starts listening on passed rfcomm socket and accepts connection requests. Activation by dbus is possible when the profile is connected.
1538  * @since_tizen 2.4
1539  * @privlevel platform
1540  * @privilege %http://tizen.org/privilege/bluetooth.admin
1541  * @details Pop-up is shown automatically when a RFCOMM connection is requested.
1542  * bt_socket_connection_state_changed_cb() will be called with
1543  * #BT_SOCKET_CONNECTED if you click "yes" and connection is finished successfully.
1544  * @param[in] uuid The UUID of service to provide
1545  * @param[in] max_pending_connections The maximum number of pending connections
1546  * @param[in] bus_name bus_name of the application which is provided in service file.
1547  * @param[in] object_path dbus of the application
1548  * @return 0 on success, otherwise a negative error value.
1549  * @retval #BT_ERROR_NONE  Successful
1550  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
1551  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
1552  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
1553  * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
1554  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
1555  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
1556  *
1557  * @pre The socket must be created with bt_socket_create_rfcomm_ex().
1558  * @post If callback function bt_socket_connection_state_changed_cb() is set,
1559  * then bt_socket_connection_state_changed_cb() will be called when the remote Bluetooth device is connected.
1560  * @see bt_socket_create_rfcomm_ex()
1561  * @see bt_socket_connection_state_changed_cb()
1562  * @see bt_socket_set_connection_state_changed_cb()
1563  * @see bt_socket_unset_connection_state_changed_cb()
1564  */
1565 int bt_socket_listen_and_accept_rfcomm_ex(const char *uuid, int max_pending_connections, const char* bus_name, const char *object_path);
1566
1567 /**
1568  * @internal
1569  * @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE
1570  * @brief Starts listening on passed rfcomm socket.
1571  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
1572  * @privlevel platform
1573  * @privilege %http://tizen.org/privilege/bluetooth.admin
1574  * @details bt_socket_connection_requested_cb() will be called when a RFCOMM connection is requested.
1575  *
1576  * @param[in] socket_fd  The file descriptor socket on which start to listen
1577  * @param[in] max_pending_connections  The number of pending connections
1578  *
1579  * @return 0 on success, otherwise a negative error value.
1580  * @retval #BT_ERROR_NONE  Successful
1581  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
1582  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
1583  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
1584  * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
1585  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
1586  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
1587  *
1588  * @pre The socket must be created with bt_socket_create_rfcomm().
1589  * @post This function invokes bt_socket_connection_state_changed_cb().
1590  *
1591  * @see bt_socket_create_rfcomm()
1592  * @see bt_socket_set_connection_requested_cb()
1593  * @see bt_socket_unset_connection_requested_cb()
1594  * @see bt_socket_connection_requested_cb()
1595  */
1596 int bt_socket_listen(int socket_fd, int max_pending_connections);
1597
1598 /**
1599  * @internal
1600  * @ingroup  CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE
1601  * @brief  Accepts a connection request.
1602  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
1603  * @privlevel platform
1604  * @privilege %http://tizen.org/privilege/bluetooth.admin
1605  * @param[in] requested_socket_fd  The file descriptor of socket on which a connection is requested
1606  * @return 0 on success, otherwise a negative error value.
1607  * @retval #BT_ERROR_NONE  Successful
1608  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
1609  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
1610  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
1611  * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
1612  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
1613  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
1614  *
1615  * @pre The connection is requested by bt_socket_connection_requested_cb().
1616  * @see bt_socket_create_rfcomm()
1617  * @see bt_socket_connection_requested_cb()
1618  * @see bt_socket_listen()
1619  * @see bt_socket_reject()
1620 */
1621 int bt_socket_accept(int requested_socket_fd);
1622
1623 /**
1624  * @internal
1625  * @ingroup  CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE
1626  * @brief  Rejects a connection request.
1627  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
1628  * @privlevel platform
1629  * @privilege %http://tizen.org/privilege/bluetooth.admin
1630  * @param[in] socket_fd  The file descriptor of socket on which a connection is requested
1631  * @return 0 on success, otherwise a negative error value.
1632  * @retval #BT_ERROR_NONE  Successful
1633  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
1634  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
1635  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
1636  * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
1637  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
1638  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
1639  *
1640  * @pre The connection is requested by bt_socket_connection_requested_cb().
1641  * @see bt_socket_create_rfcomm()
1642  * @see bt_socket_connection_requested_cb()
1643  * @see bt_socket_listen()
1644  * @see bt_socket_accept()
1645  */
1646 int bt_socket_reject(int socket_fd);
1647
1648 /**
1649  * @internal
1650  * @ingroup CAPI_NETWORK_BLUETOOTH_OPP_SERVER_MODULE
1651  * @brief Initializes the Bluetooth OPP server requested by bt_opp_server_push_requested_cb().
1652  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
1653  * @details The popup appears when an OPP connection is requested from a remote device.
1654  * If you accept the request, then connection will be established and bt_opp_server_push_requested_cb() will be called.
1655  * At that time, you can call either bt_opp_server_accept() or bt_opp_server_reject().
1656  * @remarks This function must be called to start Bluetooth OPP server. You must free all resources of the Bluetooth service
1657  * by calling bt_opp_server_deinitialize() if Bluetooth OPP service is no longer needed.
1658  * @param[in] destination  The destination path
1659  * @param[in] push_requested_cb  The callback called when a push is requested
1660  * @param[in] user_data The user data to be passed to the callback function
1661  * @return 0 on success, otherwise a negative error value.
1662  * @retval #BT_ERROR_NONE  Successful
1663  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
1664  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
1665  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
1666  * @retval #BT_ERROR_RESOURCE_BUSY  Device or resource busy
1667  * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
1668  * @retval #BT_ERROR_NOT_SUPPORTED   Not supported
1669  *
1670  * @see  bt_opp_server_push_requested_cb()
1671  * @see  bt_opp_server_deinitialize()
1672  * @see  bt_opp_server_accept()
1673  * @see  bt_opp_server_reject()
1674  */
1675 int bt_opp_server_initialize(const char *destination, bt_opp_server_push_requested_cb push_requested_cb, void *user_data);
1676
1677 /**
1678  * @internal
1679  * @ingroup CAPI_NETWORK_BLUETOOTH_OPP_MODULE
1680  * @brief Gets the percentage progress for ongoing transfers.
1681  * @since_tizen 3.0
1682  * @exception   None
1683  * @param[in] transfer_type     Transfer Type: (@c BLUETOOTH_TRANSFER_INBOUND = receiving , @c  BLUETOOTH_TRANSFER_OUTBOUND = sending)
1684  * @param[in] transfer_id       Transfer ID
1685  * @param[out] progress         Percentage Progress
1686  * @retval #BT_ERROR_NONE  Successful
1687  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
1688  * @retval #BT_ERROR_OPERATION_FAILED   Operation failed
1689  */
1690 int bt_opp_get_transfer_progress(bt_opp_transfer_type_t transfer_type,
1691                 int transfer_id, unsigned char *progress);
1692
1693 /**
1694  * @internal
1695  * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
1696  * @brief Notifies the call event to the remote bluetooth device.
1697  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
1698  * @privlevel platform
1699  * @privilege %http://tizen.org/privilege/bluetooth.admin
1700  * @remarks Before notifying #BT_AG_CALL_EVENT_ANSWERED or #BT_AG_CALL_EVENT_DIALING, you should open SCO(Synchronous Connection Oriented link)
1701  * if Bluetooth Hands-Free need SCO connection.
1702  * @param[in] event  The call event
1703  * @param[in] call_id  The call ID
1704  * @param[in] phone_number  The phone number. You must set this value in case of #BT_AG_CALL_EVENT_DIALING and #BT_AG_CALL_EVENT_INCOMING.
1705  * In other cases, this value can be NULL.
1706  * @return 0 on success, otherwise a negative error value.
1707  * @retval #BT_ERROR_NONE  Successful
1708  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
1709  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
1710  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
1711  * @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED  Remote device is not connected
1712  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
1713  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
1714  *
1715  * @pre The Bluetooth audio device must be connected with bt_audio_connect().
1716  * @see bt_audio_connect()
1717  */
1718 int bt_ag_notify_call_event(bt_ag_call_event_e event, unsigned int call_id, const char *phone_number);
1719
1720 /**
1721  * @internal
1722  * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
1723  * @brief Notifies the call list to the remote bluetooth device.
1724  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
1725  * @privlevel platform
1726  * @privilege %http://tizen.org/privilege/bluetooth.admin
1727  * @param[in] list  The call list
1728  * @return 0 on success, otherwise a negative error value.
1729  * @retval #BT_ERROR_NONE  Successful
1730  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
1731  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
1732  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
1733  * @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED  Remote device is not connected
1734  * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
1735  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
1736  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
1737  *
1738  * @pre The Bluetooth audio device must be connected with bt_audio_connect().
1739  * @see bt_audio_connect()
1740  */
1741 int bt_ag_notify_call_list(bt_call_list_h list);
1742
1743 /**
1744  * @internal
1745  * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
1746  * @brief Notifies the state of voice recognition.
1747  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
1748  * @privlevel platform
1749  * @privilege %http://tizen.org/privilege/bluetooth.admin
1750  * @param[in] state  The state of voice recognition: (@c true = enabled, @c  false = disabled)
1751  * @return 0 on success, otherwise a negative error value.
1752  * @retval #BT_ERROR_NONE  Successful
1753  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
1754  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
1755  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
1756  * @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED  Remote device is not connected
1757  * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
1758  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
1759  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
1760  *
1761  * @pre The Bluetooth audio device must be connected with bt_audio_connect().
1762  * @see bt_audio_connect()
1763  */
1764 int bt_ag_notify_voice_recognition_state(bool state);
1765
1766 /**
1767  * @internal
1768  * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
1769  * @brief  Registers a callback function that will be invoked when a call handling event happened from Hands-Free.
1770  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
1771  * @param[in] callback The callback function to register
1772  * @param[in] user_data The user data to be passed to the callback function
1773  * @return   0 on success, otherwise a negative error value.
1774  * @retval #BT_ERROR_NONE  Successful
1775  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
1776  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
1777  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
1778  *
1779  * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().
1780  * @see bt_audio_initialize()
1781  * @see bt_ag_call_handling_event_cb()
1782  * @see bt_ag_unset_call_handling_event_cb()
1783  */
1784 int bt_ag_set_call_handling_event_cb(bt_ag_call_handling_event_cb callback, void *user_data);
1785
1786 /**
1787  * @internal
1788  * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
1789  * @brief  Unregisters a callback function that will be invoked when a call handling event happened from Hands-Free.
1790  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
1791  * @return   0 on success, otherwise a negative error value.
1792  * @retval #BT_ERROR_NONE  Successful
1793  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
1794  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
1795  *
1796  * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().
1797  * @see bt_audio_initialize()
1798  * @see bt_ag_call_handling_event_cb()
1799  * @see bt_ag_set_call_handling_event_cb()
1800  */
1801 int bt_ag_unset_call_handling_event_cb(void);
1802
1803 /**
1804  * @internal
1805  * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
1806  * @brief  Registers a callback function that will be invoked when a multi call handling event happened from Hands-Free.
1807  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
1808  * @param[in] callback The callback function to register
1809  * @param[in] user_data The user data to be passed to the callback function
1810  * @return   0 on success, otherwise a negative error value.
1811  * @retval #BT_ERROR_NONE  Successful
1812  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
1813  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
1814  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
1815  *
1816  * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().
1817  * @see bt_audio_initialize()
1818  * @see bt_ag_multi_call_handling_event_cb()
1819  * @see bt_ag_unset_multi_call_handling_event_cb()
1820  */
1821 int bt_ag_set_multi_call_handling_event_cb(bt_ag_multi_call_handling_event_cb callback, void *user_data);
1822
1823 /**
1824  * @internal
1825  * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
1826  * @brief  Unregisters a callback function that will be invoked when a multi call handling event happened from Hands-Free.
1827  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
1828  * @return   0 on success, otherwise a negative error value.
1829  * @retval #BT_ERROR_NONE  Successful
1830  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
1831  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
1832  *
1833  * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().
1834  * @see bt_audio_initialize()
1835  * @see bt_ag_multi_call_handling_event_cb()
1836  * @see bt_ag_set_multi_call_handling_event_cb()
1837  */
1838 int bt_ag_unset_multi_call_handling_event_cb(void);
1839
1840 /**
1841  * @internal
1842  * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
1843  * @brief  Registers a callback function that will be invoked when a DTMF(Dual Tone Multi Frequency) is transmitted from Hands-Free.
1844  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
1845  * @param[in] callback The callback function to register
1846  * @param[in] user_data The user data to be passed to the callback function
1847  * @return   0 on success, otherwise a negative error value.
1848  * @retval #BT_ERROR_NONE  Successful
1849  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
1850  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
1851  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
1852  *
1853  * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().
1854  * @see bt_audio_initialize()
1855  * @see bt_ag_dtmf_transmitted_cb()
1856  * @see bt_ag_unset_dtmf_transmitted_cb()
1857  */
1858 int bt_ag_set_dtmf_transmitted_cb(bt_ag_dtmf_transmitted_cb callback, void *user_data);
1859
1860 /**
1861  * @internal
1862  * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
1863  * @brief  Unregisters a callback function that will be invoked when a DTMF(Dual Tone Multi Frequency) is transmitted from Hands-Free.
1864  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
1865  * @return   0 on success, otherwise a negative error value.
1866  * @retval #BT_ERROR_NONE  Successful
1867  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
1868  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
1869  *
1870  * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().
1871  * @see bt_audio_initialize()
1872  * @see bt_ag_dtmf_transmitted_cb()
1873  * @see bt_ag_set_dtmf_transmitted_cb()
1874  */
1875 int bt_ag_unset_dtmf_transmitted_cb(void);
1876
1877 /**
1878  * @internal
1879  * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
1880  * @brief Checks whether the remoted device enables NREC(Noise Reduction and Echo Canceling) or not.
1881  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
1882  * @param[out] enabled The NREC status: (@c true = enabled, @c  false = not enabled)
1883  * @return   0 on success, otherwise a negative error value.
1884  * @retval #BT_ERROR_NONE  Successful
1885  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
1886  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
1887  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
1888  * @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED  Remote device is not connected
1889  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
1890  *
1891  * @pre The remote device is connected by bt_audio_connect() with #BT_AUDIO_PROFILE_TYPE_HSP_HFP service.
1892  * @see bt_audio_connect()
1893  */
1894 int bt_ag_is_nrec_enabled(bool *enabled);
1895
1896 /**
1897  * @internal
1898  * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_CALL_MODULE
1899  * @brief Creates a handle of call list.
1900  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
1901  * @param[out] list  The handle of call list
1902  * @return 0 on success, otherwise a negative error value.
1903  * @retval #BT_ERROR_NONE  Successful
1904  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
1905  * @retval #BT_ERROR_OUT_OF_MEMORY  Out of memory
1906  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
1907  *
1908  * @see bt_call_list_destroy()
1909  */
1910 int bt_call_list_create(bt_call_list_h *list);
1911
1912 /**
1913  * @internal
1914  * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_CALL_MODULE
1915  * @brief Destroys the handle of call list.
1916  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
1917  * @param[in] list  The handle of call list
1918  * @return 0 on success, otherwise a negative error value.
1919  * @retval #BT_ERROR_NONE  Successful
1920  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
1921  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
1922  *
1923  * @see bt_call_list_create()
1924  */
1925 int bt_call_list_destroy(bt_call_list_h list);
1926
1927 /**
1928  * @internal
1929  * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_CALL_MODULE
1930  * @brief Resets the handle of call list.
1931  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
1932  * @param[in] list  The handle of call list
1933  * @return 0 on success, otherwise a negative error value.
1934  * @retval #BT_ERROR_NONE  Successful
1935  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
1936  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
1937  *
1938  * @see bt_call_list_create()
1939  */
1940 int bt_call_list_reset(bt_call_list_h list);
1941
1942 /**
1943  * @internal
1944  * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_CALL_MODULE
1945  * @brief Adds a call to the handle of call list.
1946  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
1947  * @param[in] list  The handle of call list
1948  * @param[in] call_id  The call ID
1949  * @param[in] state  The state of audio gate call
1950  * @param[in] phone_number The phone number. You must set this value in case of #BT_AG_CALL_EVENT_DIALING and      #BT_AG_CALL_EVENT_INCOMING.
1951  * @return 0 on success, otherwise a negative error value.
1952  * @retval #BT_ERROR_NONE  Successful
1953  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
1954  * @retval #BT_ERROR_OUT_OF_MEMORY  Out of memory
1955  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
1956  *
1957  * @see bt_call_list_create()
1958  */
1959 int bt_call_list_add(bt_call_list_h list, unsigned int call_id, bt_ag_call_state_e state, const char *phone_number);
1960
1961 /**
1962  * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
1963  * @brief  Registers a callback function that will be invoked when a XSATvendor AT command is transmitted from Hands-Free.
1964  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1965  * @param[in] callback The callback function to register
1966  * @param[in] user_data The user data to be passed to the callback function
1967  * @return   0 on success, otherwise a negative error value.
1968  * @retval #BT_ERROR_NONE  Successful
1969  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
1970  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
1971  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
1972  * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().
1973  * @see bt_audio_initialize()
1974  * @see bt_ag_vendor_cmd_cb()
1975  * @see bt_ag_unset_vendor_cmd_cb()
1976  */
1977 int bt_ag_set_vendor_cmd_cb(bt_ag_vendor_cmd_cb callback, void *user_data);
1978
1979 /**
1980  * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
1981  * @brief  Unregisters a callback function that will be invoked when a XSATvendor AT command is transmitted from Hands-Free
1982  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1983  * @return   0 on success, otherwise a negative error value.
1984  * @retval #BT_ERROR_NONE  Successful
1985  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
1986  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
1987  * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().
1988  * @see bt_audio_initialize()
1989  * @see bt_ag_vendor_cmd_cb()
1990  * @see bt_ag_set_vendor_cmd_cb()
1991  */
1992 int bt_ag_unset_vendor_cmd_cb(void);
1993
1994 /**
1995  * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
1996  * @brief Checks whether the remoted device is wbs (Wide Band Speech) mode or not.
1997  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1998  * @param[out] wbs_mode The wbs status: (@c true = wide band speech, @c  false = narrow band speech)
1999  * @return   0 on success, otherwise a negative error value.
2000  * @retval #BT_ERROR_NONE  Successful
2001  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
2002  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
2003  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
2004  * @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED  Remote device is not connected
2005  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
2006  * @pre The remote device is connected by bt_audio_connect() with #BT_AUDIO_PROFILE_TYPE_HSP_HFP service.
2007  * @see bt_audio_connect()
2008  */
2009 int bt_ag_is_wbs_mode(bool *wbs_mode);
2010
2011 /**
2012  * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
2013  * @brief Gets the HF(Hands-Free) profile connected status for AG role.
2014  * @since_tizen 2.4
2015  * @param[out] connected the connected status: (@c true = connected , @c  false = not connected )
2016  * @return 0 on success, otherwise a negative error value.
2017  * @retval #BT_ERROR_NONE  Successful
2018  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
2019  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
2020  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
2021  * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
2022  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
2023  * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED.
2024  */
2025 int bt_ag_is_connected(bool *connected);
2026
2027 /**
2028  * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
2029  * @brief Switch between the connected headsets for AG role.
2030  * @since_tizen 3.0
2031  * @param[out]
2032  * @return 0 on success, otherwise a negative error value.
2033  * @retval #BT_ERROR_NONE  Successful
2034  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
2035  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
2036  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
2037  * @retval #BT_ERROR_OPERATION_FAILED   Operation failed
2038  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
2039  * @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED  Not connected
2040  * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED.
2041  */
2042 int bt_ag_switch_headset(const char *remote_addr);
2043
2044 /**
2045  * @ingroup  CAPI_NETWORK_BLUETOOTH_AUDIO_A2DP_MODULE
2046  * @brief  Sets copy protection. streaming application that needs to have the copy protection for the streaming data, shall invoke this API.
2047  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2048  * @privlevel platform
2049  * @privilege %http://tizen.org/privilege/bluetooth.admin
2050  * @param[in] status - TRUE/FALSE
2051  * @return  0 on success, otherwise negative error value.
2052  * @retval #BT_ERROR_NONE  Successful
2053  * @retval #BT_ERROR_OPERATION_FAILED  on failure
2054  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
2055  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
2056  */
2057 int bt_a2dp_set_content_protection(bool status);
2058
2059
2060 /**
2061  * @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_CONTROL_MODULE
2062  * @brief Sends a command to the target device.
2063  * @since_tizen 5.5
2064  * @privlevel platform
2065  * @privilege %http://tizen.org/privilege/bluetooth.admin
2066  * @param[in] cmd The commands, one of: Play, Pause, Next, Rewind.
2067  * @param[in] remote_address The address of the remote Bluetooth device
2068  * @return 0 on success, otherwise a negative error value.
2069  * @retval #BT_ERROR_NONE  Successful
2070  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
2071  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
2072  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
2073  * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
2074  * @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED  Remote device is not connected
2075  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
2076  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
2077  * @pre The Bluetooth audio service must be initialized with bt_avrcp_control_initialize().
2078  * @see bt_avrcp_control_initialize()
2079  * @see bt_avrcp_control_connect()
2080  */
2081 int bt_avrcp_control_send_player_command_to(bt_avrcp_player_command_e cmd, char *remote_address);
2082
2083
2084 /**
2085  * @internal
2086  * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
2087  * @brief Gets the specification name from the UUID
2088  * @since_tizen 2.4
2089  *
2090  * @remarks @a name must be released with free() by you.
2091  *
2092  * @param[in] uuid The UUID
2093  * @param[out] name The specification name which defined from www.bluetooth.org
2094  * @return  0 on success, otherwise a negative error value.
2095  * @retval #BT_ERROR_NONE  Successful
2096  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
2097  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
2098  *
2099  * @see bt_gatt_get_uuid()
2100  */
2101 int bt_gatt_get_uuid_specification_name(const char *uuid, char **name);
2102
2103 /**
2104  * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE
2105  * @brief  Updates the permissions which a characteristic or descriptor's GATT handle has.
2106  * @since_tizen 3.0
2107  *
2108  * @param[in] gatt_handle The handle of a characteristic or descriptor
2109  * @param[in] permissions The permissions to be updated
2110  * @return  0 on success, otherwise a negative error value
2111  * @retval #BT_ERROR_NONE  Successful
2112  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
2113  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
2114  *
2115  * @see bt_gatt_characteristic_create()
2116  * @see bt_gatt_descriptor_create()
2117  * @see bt_gatt_permission_e
2118  */
2119 int bt_gatt_set_permissions(bt_gatt_h gatt_handle, int permissions);
2120
2121 /**
2122  * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE
2123  * @brief  Updates the properties which a characteristic's GATT handle has.
2124  * @since_tizen 3.0
2125  *
2126  * @param[in] characteristic The characteristic's GATT handle
2127  * @param[in] properties The properties to be updated
2128  * @return  0 on success, otherwise a negative error value
2129  * @retval #BT_ERROR_NONE Successful
2130  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
2131  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
2132  *
2133  * @see bt_gatt_property_e
2134  */
2135 int bt_gatt_characteristic_set_properties(bt_gatt_h characteristic, int properties);
2136
2137 /**
2138  * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
2139  * @brief Destroys the GATT handle
2140  * @since_tizen 2.4
2141  *
2142  * @param[in] gatt_handle The handle of service, characteristic or descriptor
2143  * @return  0 on success, otherwise a negative error value
2144  * @retval #BT_ERROR_NONE  Successful
2145  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
2146  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
2147  *
2148  * @see bt_gatt_service_create()
2149  * @see bt_gatt_characteristic_create()
2150  * @see bt_gatt_descriptor_create()
2151  */
2152 int bt_gatt_destroy(bt_gatt_h gatt_handle);
2153
2154 /**
2155  * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE
2156  * @brief  Registers a callback function to be invoked when the ATT MTU is changed.
2157  * @since_tizen 5.5
2158  * @param[in] server The created GATT server's handle
2159  * @param[in] callback The callback function to register
2160  * @param[in] user_data The user data to be passed to the callback function
2161  * @return 0 on success, otherwise a negative error value.
2162  * @retval #BT_ERROR_NONE  Successful
2163  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
2164  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
2165  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
2166  *
2167  * @pre The Bluetooth service must be initialized with bt_initialize().
2168  * @post bt_device_connection_state_changed_cb() will be invoked.
2169  * @see bt_initialize()
2170  * @see bt_gatt_server_initialize()
2171  * @see bt_gatt_server_create()
2172  * @see bt_gatt_server_unset_att_mtu_changed_cb()
2173  */
2174 int bt_gatt_server_set_att_mtu_changed_cb(bt_gatt_server_h server, bt_gatt_server_att_mtu_changed_cb callback, void *user_data);
2175
2176 /**
2177  * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE
2178  * @brief Unregisters the callback function to be invoked when the ATT MTU is changed.
2179  * @since_tizen 5.5
2180  * @param[in] server The created GATT server's handle
2181  * @return 0 on success, otherwise a negative error value.
2182  * @retval #BT_ERROR_NONE  Successful
2183  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
2184  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
2185  *
2186  * @pre The Bluetooth service must be initialized with bt_initialize().
2187  * @see bt_initialize()
2188  * @see bt_gatt_server_set_att_mtu_changed_cb()
2189  */
2190 int bt_gatt_server_unset_att_mtu_changed_cb(bt_gatt_server_h server);
2191
2192 /**
2193  * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_MODULE
2194  * @brief  Registers a callback function that will be invoked when the A2DP Source connection state is changed.
2195  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2196  * @param[in] callback The callback function to register
2197  * @param[in] user_data The user data to be passed to the callback function
2198  * @return   0 on success, otherwise a negative error value.
2199  * @retval #BT_ERROR_NONE  Successful
2200  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
2201  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
2202  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
2203  *
2204  * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().
2205  * @see bt_audio_initialize()
2206  * @see bt_audio_connection_state_changed_cb()
2207  */
2208 int bt_a2dp_source_audio_set_connection_state_changed_cb(bt_audio_connection_state_changed_cb callback, void *user_data);
2209
2210 /**
2211  * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_MODULE
2212  * @brief  Unregisters a callback function that will be invoked when the A2DP Source connection state is changed.
2213  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2214  * @return   0 on success, otherwise a negative error value.
2215  * @retval #BT_ERROR_NONE  Successful
2216  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
2217  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
2218  *
2219  * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().
2220  * @see bt_audio_initialize()
2221  * @see bt_audio_connection_state_changed_cb()
2222  * @see bt_audio_set_connection_state_changed_cb()
2223  */
2224 int bt_a2dp_source_audio_unset_connection_state_changed_cb(void);
2225
2226 /**
2227  * @internal
2228  * @ingroup CAPI_NETWORK_BLUETOOTH_PAN_NAP_MODULE
2229  * @brief Activates the NAP(Network Access Point).
2230  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
2231  * @privlevel public
2232  * @privilege %http://tizen.org/privilege/bluetooth
2233  * @return 0 on success, otherwise a negative error value.
2234  * @retval #BT_ERROR_NONE  Successful
2235  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
2236  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
2237  * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
2238  * @retval #BT_ERROR_ALREADY_DONE  Operation is already done
2239  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
2240  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
2241  *
2242  * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED
2243  * @see bt_nap_deactivate()
2244  */
2245 int bt_nap_activate(void);
2246
2247 /**
2248  * @internal
2249  * @ingroup CAPI_NETWORK_BLUETOOTH_PAN_NAP_MODULE
2250  * @brief Deactivates the NAP(Network Access Point).
2251  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
2252  * @privlevel public
2253  * @privilege %http://tizen.org/privilege/bluetooth
2254  * @return 0 on success, otherwise a negative error value.
2255  * @retval #BT_ERROR_NONE  Successful
2256  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
2257  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
2258  * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
2259  * @retval #BT_ERROR_ALREADY_DONE  Operation is already done
2260  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
2261  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
2262  *
2263  * @pre The Bluetooth NAP service must be activated with bt_nap_activate().
2264  * @see bt_nap_activate()
2265  */
2266 int bt_nap_deactivate(void);
2267
2268 /**
2269  * @internal
2270  * @ingroup CAPI_NETWORK_BLUETOOTH_PAN_NAP_MODULE
2271  * @brief Disconnects the all PANUs(Personal Area Networking User) which are connected to you.
2272  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
2273  * @privlevel public
2274  * @privilege %http://tizen.org/privilege/bluetooth
2275  * @return 0 on success, otherwise a negative error value.
2276  * @retval #BT_ERROR_NONE  Successful
2277  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
2278  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
2279  * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
2280  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
2281  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
2282  *
2283  * @pre The Bluetooth NAP service must be activated with bt_nap_activate().
2284  * @see bt_nap_activate()
2285  */
2286 int bt_nap_disconnect_all(void);
2287
2288 /**
2289  * @internal
2290  * @ingroup CAPI_NETWORK_BLUETOOTH_PAN_NAP_MODULE
2291  * @brief Disconnects the specified PANU(Personal Area Networking User) which is connected to you.
2292  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
2293  * @privlevel public
2294  * @privilege %http://tizen.org/privilege/bluetooth
2295  * @param[in] remote_address  The remote address
2296  * @return 0 on success, otherwise a negative error value.
2297  * @retval #BT_ERROR_NONE  Successful
2298  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
2299  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
2300  * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
2301  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
2302  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
2303  *
2304  * @pre The Bluetooth NAP service must be activated with bt_nap_activate().
2305  * @see bt_nap_activate()
2306  */
2307 int bt_nap_disconnect(const char *remote_address);
2308
2309 /**
2310  * @internal
2311  * @ingroup CAPI_NETWORK_BLUETOOTH_PAN_NAP_MODULE
2312  * @brief  Registers a callback function that will be invoked when the connection state changes.
2313  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
2314  * @param[in] callback The callback function to register
2315  * @param[in] user_data The user data to be passed to the callback function
2316  * @return   0 on success, otherwise a negative error value.
2317  * @retval #BT_ERROR_NONE  Successful
2318  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
2319  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
2320  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
2321  *
2322  * @pre The Bluetooth service must be initialized with bt_initialize().
2323  * @post bt_nap_connection_state_changed_cb() will be invoked.
2324  * @see bt_initialize()
2325  * @see bt_nap_connection_state_changed_cb()
2326  * @see bt_nap_unset_connection_state_changed_cb()
2327  */
2328 int bt_nap_set_connection_state_changed_cb(bt_nap_connection_state_changed_cb callback, void *user_data);
2329
2330 /**
2331  * @internal
2332  * @ingroup CAPI_NETWORK_BLUETOOTH_PAN_NAP_MODULE
2333  * @brief  Unregisters a callback function that will be invoked when the connection state changes.
2334  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
2335  * @return   0 on success, otherwise a negative error value.
2336  * @retval #BT_ERROR_NONE  Successful
2337  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
2338  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
2339  *
2340  * @pre The Bluetooth service must be initialized with bt_initialize().
2341  * @post bt_nap_connection_state_changed_cb() will be invoked.
2342  * @see bt_initialize()
2343  * @see bt_nap_connection_state_changed_cb()
2344  * @see bt_nap_set_connection_state_changed_cb()
2345  */
2346 int bt_nap_unset_connection_state_changed_cb(void);
2347
2348 /**
2349  * @internal
2350  * @ingroup CAPI_NETWORK_BLUETOOTH_PAN_PANU_MODULE
2351  * @brief  Registers a callback function that will be invoked when the connection state changes.
2352  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
2353  * @param[in] callback The callback function to register
2354  * @param[in] user_data The user data to be passed to the callback function
2355  * @return   0 on success, otherwise a negative error value.
2356  * @retval #BT_ERROR_NONE  Successful
2357  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
2358  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
2359  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
2360  *
2361  * @pre The Bluetooth service must be initialized with bt_initialize().
2362  * @post bt_nap_connection_state_changed_cb() will be invoked.
2363  * @see bt_initialize()
2364  * @see bt_panu_connection_state_changed_cb()
2365  * @see bt_panu_unset_connection_state_changed_cb()
2366  */
2367 int bt_panu_set_connection_state_changed_cb(bt_panu_connection_state_changed_cb callback, void *user_data);
2368
2369 /**
2370  * @internal
2371  * @ingroup CAPI_NETWORK_BLUETOOTH_PAN_PANU_MODULE
2372  * @brief  Unregisters a callback function that will be invoked when the connection state changes.
2373  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
2374  * @return   0 on success, otherwise a negative error value.
2375  * @retval #BT_ERROR_NONE  Successful
2376  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
2377  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
2378  *
2379  * @pre The Bluetooth service must be initialized with bt_initialize().
2380  * @post bt_nap_connection_state_changed_cb() will be invoked.
2381  * @see bt_initialize()
2382  * @see bt_panu_connection_state_changed_cb()
2383  * @see bt_panu_set_connection_state_changed_cb()
2384  */
2385 int bt_panu_unset_connection_state_changed_cb(void);
2386
2387 /**
2388  * @internal
2389  * @ingroup CAPI_NETWORK_BLUETOOTH_PAN_PANU_MODULE
2390  * @brief Connects the remote device with the PAN(Personal Area Networking) service, asynchronously.
2391  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
2392  * @privlevel public
2393  * @privilege %http://tizen.org/privilege/bluetooth
2394  * @param[in] remote_address  The remote address
2395  * @param[in] type  The type of PAN service
2396  * @return 0 on success, otherwise a negative error value.
2397  * @retval #BT_ERROR_NONE  Successful
2398  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
2399  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
2400  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
2401  * @retval #BT_ERROR_OUT_OF_MEMORY  Out of memory
2402  * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
2403  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
2404  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
2405  *
2406  * @pre The local device must be bonded with the remote device by bt_device_create_bond().
2407  * @post bt_panu_connection_state_changed_cb() will be invoked.
2408  * @see bt_panu_disconnect()
2409  * @see bt_panu_connection_state_changed_cb()
2410  */
2411 int bt_panu_connect(const char *remote_address, bt_panu_service_type_e type);
2412
2413 /**
2414  * @internal
2415  * @ingroup CAPI_NETWORK_BLUETOOTH_PAN_PANU_MODULE
2416  * @brief Disconnects the remote device with the PAN(Personal Area Networking) service, asynchronously.
2417  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
2418  * @privlevel public
2419  * @privilege %http://tizen.org/privilege/bluetooth
2420  * @param[in] remote_address  The remote address
2421  * @return 0 on success, otherwise a negative error value.
2422  * @retval #BT_ERROR_NONE  Successful
2423  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
2424  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
2425  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
2426  * @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED  Remote device is not connected
2427  * @retval #BT_ERROR_OUT_OF_MEMORY  Out of memory
2428  * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
2429  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
2430  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
2431  *
2432  * @pre The remote device must be connected by bt_panu_connect().
2433  * @post bt_panu_connection_state_changed_cb() will be invoked.
2434  * @see bt_panu_connect()
2435  * @see bt_panu_connection_state_changed_cb()
2436  */
2437 int bt_panu_disconnect(const char *remote_address);
2438
2439 /**
2440  * @internal
2441  * @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE
2442  * @brief   update LE connection.
2443  * @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
2444  * @privlevel platform
2445  * @privilege %http://tizen.org/privilege/bluetooth.admin
2446  * @return 0 on success, otherwise a negative error value.
2447  * @retval #BT_ERROR_NONE  Successful
2448  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
2449  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
2450  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
2451  *
2452  * @pre The Bluetooth service must be initialized by bt_initialize().
2453  * @pre The remote device must be connected with bt_gatt_connect().
2454  */
2455 int bt_device_le_conn_update(const char *device_address,
2456                              const bt_le_conn_update_s *parameters);
2457
2458 /**
2459  * @internal
2460  * @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE
2461  * @brief Gets the is_alias_set property of a bonded device.
2462  * @since_tizen 3.0
2463  *
2464  * @param[in] remote_address The address of remote device
2465  * @param[out] is_alias_set The is_alias_set property of device
2466  *
2467  * @return 0 on success, otherwise a negative error value.
2468  * @retval #BT_ERROR_NONE  Successful
2469  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
2470  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
2471  * @retval #BT_ERROR_OUT_OF_MEMORY  Out of memory
2472  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
2473   * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
2474  *
2475  * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED.
2476  */
2477 int bt_adapter_get_bonded_device_is_alias_set(const char *remote_address, gboolean *is_alias_set);
2478
2479 /**
2480  * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
2481  * @brief Sets Restriction for BT mode(BT allowed or not).
2482  * @since_tizen 3.0
2483  * @privlevel platform
2484  * @privilege %http://tizen.org/privilege/bluetooth.admin
2485  *
2486  * @param[in]   value - BT Allow value.
2487  *              BT_DPM_ERROR     = -1,   < bluetooth allowance error
2488  *              BT_DPM_BT_ALLOWED,               < bluetooth allowance allowed
2489  *              BT_DPM_HANDSFREE_ONLY,  < bluetooth allowance handsfree only
2490  *              BT_DPM_BT_RESTRICTED,  < bluetooth allowance restricted
2491  * @retval #BT_ERROR_NONE  Successful
2492  * @retval #BT_ERROR_INVALID_PARAMETER  invalid paramter
2493  * @retval #BT_ERROR_NOT_SUPPORTED  Not suported
2494  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
2495  * @retval #BT_ERROR_OPERATION_FAILED operation failed
2496  *
2497  * @pre none.
2498  * @see bt_dpm_get_allow_bluetooth_mode()
2499  */
2500 int bt_dpm_set_allow_bluetooth_mode(bt_dpm_allow_e value);
2501
2502 /**
2503  * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
2504  * @brief Reads Restriction for BT mode(BT allowed or not).
2505  * @since_tizen 3.0
2506  * @privlevel platform
2507  * @privilege %http://tizen.org/privilege/bluetooth.admin
2508  *
2509  * @param[in] none
2510  * @param[out]  value - BT Allow value.
2511  *              BT_DPM_ERROR     = -1,   < bluetooth allowance error
2512  *              BT_DPM_BT_ALLOWED,               < bluetooth allowance allowed
2513  *              BT_DPM_HANDSFREE_ONLY,  < bluetooth allowance handsfree only
2514  *              BT_DPM_BT_RESTRICTED,  < bluetooth allowance restricted
2515  * @retval #BT_ERROR_NONE  Successful
2516  * @retval #BT_ERROR_INVALID_PARAMETER  invalid paramter
2517  * @retval #BT_ERROR_NOT_SUPPORTED      Not suported
2518  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
2519  * @retval #BT_ERROR_OPERATION_FAILED operation failed
2520  *
2521  * @pre none.
2522  * @see bt_dpm_set_allow_bluetooth_mode()
2523  */
2524 int bt_dpm_get_allow_bluetooth_mode(bt_dpm_allow_e *value);
2525
2526 /**
2527  * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
2528  * @brief Sets the Restriction for device.
2529  * @since_tizen 3.0
2530  * @privlevel platform
2531  * @privilege %http://tizen.org/privilege/bluetooth.admin
2532  *
2533  * @param[in]   value - State value.
2534  *              BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
2535  *              BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
2536  * @retval #BT_ERROR_NONE  Successful
2537  * @retval #BT_ERROR_INVALID_PARAMETER  invalid paramter
2538  * @retval #BT_ERROR_NOT_SUPPORTED      Not suported
2539  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
2540  * @retval #BT_ERROR_OPERATION_FAILED operation failed
2541  *
2542  * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
2543  * @see bt_dpm_get_allow_bluetooth_mode()
2544  */
2545 int bt_dpm_activate_device_restriction(bt_dpm_status_e value);
2546
2547 /**
2548  * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
2549  * @brief Reads the Restriction for device.
2550  * @since_tizen 3.0
2551  * @privlevel platform
2552  * @privilege %http://tizen.org/privilege/bluetooth.admin
2553  *
2554  * @param[out]  value - State value.
2555  *              BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
2556  *              BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
2557  * @retval #BT_ERROR_NONE  Successful
2558  * @retval #BT_ERROR_INVALID_PARAMETER  invalid paramter
2559  * @retval #BT_ERROR_NOT_SUPPORTED      Not suported
2560  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
2561  * @retval #BT_ERROR_OPERATION_FAILED operation failed
2562  *
2563  * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
2564  * @see bt_dpm_get_allow_bluetooth_mode()
2565  */
2566 int bt_dpm_is_device_restriction_active(bt_dpm_status_e *value);
2567
2568 /**
2569  * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
2570  * @brief Sets the Restriction for uuid.
2571  * @since_tizen 3.0
2572  * @privlevel platform
2573  * @privilege %http://tizen.org/privilege/bluetooth.admin
2574  *
2575  * @param[in]   value - State value.
2576  *              BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
2577  *              BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
2578  * @retval #BT_ERROR_NONE  Successful
2579  * @retval #BT_ERROR_INVALID_PARAMETER  invalid paramter
2580  * @retval #BT_ERROR_NOT_SUPPORTED      Not suported
2581  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
2582  * @retval #BT_ERROR_OPERATION_FAILED operation failed
2583  *
2584  * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
2585  * @see bt_dpm_get_allow_bluetooth_mode()
2586  */
2587 int bt_dpm_activate_uuid_restriction(bt_dpm_status_e value);
2588
2589 /**
2590  * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
2591  * @brief Reads the Restriction for uuid.
2592  * @since_tizen 3.0
2593  * @privlevel platform
2594  * @privilege %http://tizen.org/privilege/bluetooth.admin
2595  *
2596  * @param[out]  value - State value.
2597  *              BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
2598  *              BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
2599  * @retval #BT_ERROR_NONE  Successful
2600  * @retval #BT_ERROR_INVALID_PARAMETER  invalid paramter
2601  * @retval #BT_ERROR_NOT_SUPPORTED      Not suported
2602  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
2603  * @retval #BT_ERROR_OPERATION_FAILED operation failed
2604  *
2605  * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
2606  * @see bt_dpm_get_allow_bluetooth_mode()
2607  */
2608 int bt_dpm_is_uuid_restriction_active(bt_dpm_status_e *value);
2609
2610 /**
2611  * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
2612  * @brief Adds the device to blacklist.
2613  * @since_tizen 3.0
2614  * @privlevel platform
2615  * @privilege %http://tizen.org/privilege/bluetooth.admin
2616  *
2617  * @param[in]   device_address - Device address
2618  * @retval #BT_ERROR_NONE  Successful
2619  * @retval #BT_ERROR_INVALID_PARAMETER  invalid paramter
2620  * @retval #BT_ERROR_NOT_SUPPORTED      Not suported
2621  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
2622  * @retval #BT_ERROR_OPERATION_FAILED operation failed
2623  *
2624  * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
2625  * @see bt_dpm_get_allow_bluetooth_mode()
2626  */
2627 int bt_dpm_add_devices_to_blacklist(const char *device_address);
2628
2629 /**
2630  * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
2631  * @brief Adds the device to whitelist.
2632  * @since_tizen 3.0
2633  * @privlevel platform
2634  * @privilege %http://tizen.org/privilege/bluetooth.admin
2635  *
2636  * @param[in]   device_address - Device address
2637  * @retval #BT_ERROR_NONE  Successful
2638  * @retval #BT_ERROR_INVALID_PARAMETER  invalid paramter
2639  * @retval #BT_ERROR_NOT_SUPPORTED      Not suported
2640  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
2641  * @retval #BT_ERROR_OPERATION_FAILED operation failed
2642  *
2643  * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
2644  * @see bt_dpm_get_allow_bluetooth_mode()
2645  */
2646 int bt_dpm_add_devices_to_whitelist(const char *device_address);
2647
2648 /**
2649  * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
2650  * @brief Adds the uuids to blacklist.
2651  * @since_tizen 3.0
2652  * @privlevel platform
2653  * @privilege %http://tizen.org/privilege/bluetooth.admin
2654  *
2655  * @param[in]   service_uuids - profile or custom service uuids
2656  * @retval #BT_ERROR_NONE  Successful
2657  * @retval #BT_ERROR_INVALID_PARAMETER  invalid paramter
2658  * @retval #BT_ERROR_NOT_SUPPORTED      Not suported
2659  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
2660  * @retval #BT_ERROR_OPERATION_FAILED operation failed
2661  *
2662  * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
2663  * @see bt_dpm_get_allow_bluetooth_mode()
2664  */
2665 int bt_dpm_add_uuids_to_blacklist(const char *service_uuid);
2666
2667 /**
2668  * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
2669  * @brief Adds the uuid to whitelist.
2670  * @since_tizen 3.0
2671  * @privlevel platform
2672  * @privilege %http://tizen.org/privilege/bluetooth.admin
2673  *
2674  * @param[in]   service_uuids - profile or custom service uuids
2675  * @retval #BT_ERROR_NONE  Successful
2676  * @retval #BT_ERROR_INVALID_PARAMETER  invalid paramter
2677  * @retval #BT_ERROR_NOT_SUPPORTED      Not suported
2678  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
2679  * @retval #BT_ERROR_OPERATION_FAILED operation failed
2680  *
2681  * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
2682  * @see bt_dpm_get_allow_bluetooth_mode()
2683  */
2684 int bt_dpm_add_uuids_to_whitelist(const char *service_uuid);
2685
2686 /**
2687  * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
2688  * @brief Clears the device from blacklist.
2689  * @since_tizen 3.0
2690  * @privlevel platform
2691  * @privilege %http://tizen.org/privilege/bluetooth.admin
2692  *
2693  * @param[in]   none
2694  * @retval #BT_ERROR_NONE  Successful
2695  * @retval #BT_ERROR_INVALID_PARAMETER  invalid paramter
2696  * @retval #BT_ERROR_NOT_SUPPORTED      Not suported
2697  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
2698  * @retval #BT_ERROR_OPERATION_FAILED operation failed
2699  *
2700  * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
2701  * @see bt_dpm_get_allow_bluetooth_mode()
2702  */
2703 int bt_dpm_clear_devices_from_blacklist(void);
2704
2705 /**
2706  * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
2707  * @brief Clears the device from whitelist.
2708  * @since_tizen 3.0
2709  * @privlevel platform
2710  * @privilege %http://tizen.org/privilege/bluetooth.admin
2711  *
2712  * @param[in]   none
2713  * @retval #BT_ERROR_NONE  Successful
2714  * @retval #BT_ERROR_INVALID_PARAMETER  invalid paramter
2715  * @retval #BT_ERROR_NOT_SUPPORTED      Not suported
2716  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
2717  * @retval #BT_ERROR_OPERATION_FAILED operation failed
2718  *
2719  * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
2720  * @see bt_dpm_get_allow_bluetooth_mode()
2721  */
2722 int bt_dpm_clear_devices_from_whitelist(void);
2723
2724 /**
2725  * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
2726  * @brief Clears the uuids from blacklist.
2727  * @since_tizen 3.0
2728  * @privlevel platform
2729  * @privilege %http://tizen.org/privilege/bluetooth.admin
2730  *
2731  * @param[in]   none
2732  * @retval #BT_ERROR_NONE  Successful
2733  * @retval #BT_ERROR_INVALID_PARAMETER  invalid paramter
2734  * @retval #BT_ERROR_NOT_SUPPORTED      Not suported
2735  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
2736  * @retval #BT_ERROR_OPERATION_FAILED operation failed
2737  *
2738  * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
2739  * @see bt_dpm_get_allow_bluetooth_mode()
2740  */
2741 int bt_dpm_clear_uuids_from_blacklist(void);
2742
2743 /**
2744  * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
2745  * @brief Clears the uuids from whitelist.
2746  * @since_tizen 3.0
2747  * @privlevel platform
2748  * @privilege %http://tizen.org/privilege/bluetooth.admin
2749  *
2750  * @param[in]   none
2751  * @retval #BT_ERROR_NONE  Successful
2752  * @retval #BT_ERROR_INVALID_PARAMETER  invalid paramter
2753  * @retval #BT_ERROR_NOT_SUPPORTED      Not suported
2754  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
2755  * @retval #BT_ERROR_OPERATION_FAILED operation failed
2756  *
2757  * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
2758  * @see bt_dpm_get_allow_bluetooth_mode()
2759  */
2760 int bt_dpm_clear_uuids_from_whitelist(void);
2761
2762 /**
2763  * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
2764  * @brief Reads the devices from blacklist.
2765  * @since_tizen 3.0
2766  * @privlevel platform
2767  * @privilege %http://tizen.org/privilege/bluetooth.admin
2768  *
2769  * @param[out] device_list - list of devices
2770  * @retval #BT_ERROR_NONE  Successful
2771  * @retval #BT_ERROR_INVALID_PARAMETER  invalid paramter
2772  * @retval #BT_ERROR_NOT_SUPPORTED      Not suported
2773  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
2774  * @retval #BT_ERROR_OPERATION_FAILED operation failed
2775  *
2776  * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
2777  * @see bt_dpm_get_allow_bluetooth_mode()
2778  */
2779 int bt_dpm_get_devices_from_blacklist(bt_dpm_device_list_s **device_list);
2780
2781 /**
2782  * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
2783  * @brief Reads the devices from whitelist.
2784  * @since_tizen 3.0
2785  * @privlevel platform
2786  * @privilege %http://tizen.org/privilege/bluetooth.admin
2787  *
2788  * @param[out] device_list - list of devices
2789  * @retval #BT_ERROR_NONE  Successful
2790  * @retval #BT_ERROR_INVALID_PARAMETER  invalid paramter
2791  * @retval #BT_ERROR_NOT_SUPPORTED      Not suported
2792  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
2793  * @retval #BT_ERROR_OPERATION_FAILED operation failed
2794  *
2795  * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
2796  * @see bt_dpm_get_allow_bluetooth_mode()
2797  */
2798 int bt_dpm_get_devices_from_whitelist(bt_dpm_device_list_s **device_list);
2799
2800 /**
2801  * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
2802  * @brief Reads the uuids from blacklist.
2803  * @since_tizen 3.0
2804  * @privlevel platform
2805  * @privilege %http://tizen.org/privilege/bluetooth.admin
2806  *
2807  * @param[out] uuid_list - list of uuids
2808  * @retval #BT_ERROR_NONE  Successful
2809  * @retval #BT_ERROR_INVALID_PARAMETER  invalid paramter
2810  * @retval #BT_ERROR_NOT_SUPPORTED      Not suported
2811  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
2812  * @retval #BT_ERROR_OPERATION_FAILED operation failed
2813  *
2814  * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
2815  * @see bt_dpm_get_allow_bluetooth_mode()
2816  */
2817 int bt_dpm_get_uuids_from_blacklist(bt_dpm_uuids_list_s **uuid_list);
2818
2819 /**
2820  * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
2821  * @brief Reads the uuids from whitelist.
2822  * @since_tizen 3.0
2823  * @privlevel platform
2824  * @privilege %http://tizen.org/privilege/bluetooth.admin
2825  *
2826  * @param[out] uuid_list - list of uuids
2827  * @retval #BT_ERROR_NONE  Successful
2828  * @retval #BT_ERROR_INVALID_PARAMETER  invalid paramter
2829  * @retval #BT_ERROR_NOT_SUPPORTED      Not suported
2830  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
2831  * @retval #BT_ERROR_OPERATION_FAILED operation failed
2832  *
2833  * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
2834  * @see bt_dpm_get_allow_bluetooth_mode()
2835  */
2836 int bt_dpm_get_uuids_from_whitelist(bt_dpm_uuids_list_s **uuid_list);
2837
2838 /**
2839  * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
2840  * @brief Removes the devices from whitelist.
2841  * @since_tizen 3.0
2842  * @privlevel platform
2843  * @privilege %http://tizen.org/privilege/bluetooth.admin
2844  *
2845  * @param[in]   device_address - Device address
2846  * @retval #BT_ERROR_NONE  Successful
2847  * @retval #BT_ERROR_INVALID_PARAMETER  invalid paramter
2848  * @retval #BT_ERROR_NOT_SUPPORTED      Not suported
2849  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
2850  * @retval #BT_ERROR_OPERATION_FAILED operation failed
2851  *
2852  * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
2853  * @see bt_dpm_get_allow_bluetooth_mode()
2854  */
2855 int bt_dpm_remove_device_from_whitelist(const char *device_address);
2856
2857 /**
2858  * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
2859  * @brief Removes the devices from blacklist.
2860  * @since_tizen 3.0
2861  * @privlevel platform
2862  * @privilege %http://tizen.org/privilege/bluetooth.admin
2863  *
2864  * @param[in]   device_address - Device address
2865  * @retval #BT_ERROR_NONE  Successful
2866  * @retval #BT_ERROR_INVALID_PARAMETER  invalid paramter
2867  * @retval #BT_ERROR_NOT_SUPPORTED      Not suported
2868  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
2869  * @retval #BT_ERROR_OPERATION_FAILED operation failed
2870  *
2871  * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
2872  * @see bt_dpm_get_allow_bluetooth_mode()
2873  */
2874 int bt_dpm_remove_device_from_blacklist(const char *device_address);
2875
2876 /**
2877  * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
2878  * @brief Removes the uuids from whitelist.
2879  * @since_tizen 3.0
2880  * @privlevel platform
2881  * @privilege %http://tizen.org/privilege/bluetooth.admin
2882  *
2883  * @param[in]   service_uuids - profile or custom service uuids
2884  * @retval #BT_ERROR_NONE  Successful
2885  * @retval #BT_ERROR_INVALID_PARAMETER  invalid paramter
2886  * @retval #BT_ERROR_NOT_SUPPORTED      Not suported
2887  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
2888  * @retval #BT_ERROR_OPERATION_FAILED operation failed
2889  *
2890  * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
2891  * @see bt_dpm_get_allow_bluetooth_mode()
2892  */
2893 int bt_dpm_remove_uuid_from_whitelist(const char *service_uuid);
2894
2895 /**
2896  * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
2897  * @brief Removes the uuids from blacklist.
2898  * @since_tizen 3.0
2899  * @privlevel platform
2900  * @privilege %http://tizen.org/privilege/bluetooth.admin
2901  *
2902  * @param[in]   service_uuids - profile or custom service uuids
2903  * @retval #BT_ERROR_NONE  Successful
2904  * @retval #BT_ERROR_INVALID_PARAMETER  invalid paramter
2905  * @retval #BT_ERROR_NOT_SUPPORTED      Not suported
2906  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
2907  * @retval #BT_ERROR_OPERATION_FAILED operation failed
2908  *
2909  * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
2910  * @see bt_dpm_get_allow_bluetooth_mode()
2911  */
2912 int bt_dpm_remove_uuid_from_blacklist(const char *service_uuid);
2913
2914 /**
2915  * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
2916  * @brief Sets the Restriction for  outgoing call.
2917  * @since_tizen 3.0
2918  * @privlevel platform
2919  * @privilege %http://tizen.org/privilege/bluetooth.admin
2920  *
2921  * @param[in]   value - State value.
2922  *              BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
2923  *              BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
2924  * @retval #BT_ERROR_NONE  Successful
2925  * @retval #BT_ERROR_INVALID_PARAMETER  invalid paramter
2926  * @retval #BT_ERROR_NOT_SUPPORTED      Not suported
2927  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
2928  * @retval #BT_ERROR_OPERATION_FAILED operation failed
2929  *
2930  * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
2931  * @see bt_dpm_get_allow_bluetooth_mode()
2932  */
2933 int bt_dpm_set_allow_outgoing_call(bt_dpm_status_e value);
2934
2935 /**
2936  * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
2937  * @brief Reads the Restriction for  outgoing call.
2938  * @since_tizen 3.0
2939  * @privlevel platform
2940  * @privilege %http://tizen.org/privilege/bluetooth.admin
2941  *
2942  * @param[out]  value - State value.
2943  *              BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
2944  *              BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
2945  * @retval #BT_ERROR_NONE  Successful
2946  * @retval #BT_ERROR_INVALID_PARAMETER  invalid paramter
2947  * @retval #BT_ERROR_NOT_SUPPORTED      Not suported
2948  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
2949  * @retval #BT_ERROR_OPERATION_FAILED operation failed
2950  *
2951  * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
2952  * @see bt_dpm_get_allow_bluetooth_mode()
2953  */
2954 int bt_dpm_get_allow_outgoing_call(bt_dpm_status_e *value);
2955
2956 /**
2957  * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
2958  * @brief Sets the Restriction for pairing.
2959  * @since_tizen 3.0
2960  * @privlevel platform
2961  * @privilege %http://tizen.org/privilege/bluetooth.admin
2962  *
2963  * @param[in]   value - State value.
2964  *              BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
2965  *              BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
2966  * @retval #BT_ERROR_NONE  Successful
2967  * @retval #BT_ERROR_INVALID_PARAMETER  invalid paramter
2968  * @retval #BT_ERROR_NOT_SUPPORTED      Not suported
2969  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
2970  * @retval #BT_ERROR_OPERATION_FAILED operation failed
2971  *
2972  * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
2973  * @see bt_dpm_get_allow_bluetooth_mode()
2974  */
2975 int bt_dpm_set_pairing_state(bt_dpm_status_e value);
2976
2977 /**
2978  * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
2979  * @brief Reads the Restriction for pairing.
2980  * @since_tizen 3.0
2981  * @privlevel platform
2982  * @privilege %http://tizen.org/privilege/bluetooth.admin
2983  *
2984  * @param[out]  value - State value.
2985  *              BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
2986  *              BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
2987  * @retval #BT_ERROR_NONE  Successful
2988  * @retval #BT_ERROR_INVALID_PARAMETER  invalid paramter
2989  * @retval #BT_ERROR_NOT_SUPPORTED      Not suported
2990  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
2991  * @retval #BT_ERROR_OPERATION_FAILED operation failed
2992  *
2993  * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
2994  * @see bt_dpm_get_allow_bluetooth_mode()
2995  */
2996 int bt_dpm_get_pairing_state(bt_dpm_status_e *value);
2997
2998 /**
2999  * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
3000  * @brief Sets the Restriction for profiles.
3001  * @since_tizen 3.0
3002  * @privlevel platform
3003  * @privilege %http://tizen.org/privilege/bluetooth.admin
3004  *
3005  * @param[in]profile - Profile.
3006  *              BT_DPM_POLICY_A2DP_PROFILE_STATE,
3007  *              BT_DPM_POLICY_AVRCP_PROFILE_STATE,
3008  *              BT_DPM_POLICY_BPP_PROFILE_STATE,
3009  *              BT_DPM_POLICY_DUN_PROFILE_STATE,
3010  *              BT_DPM_POLICY_FTP_PROFILE_STATE,
3011  *              BT_DPM_POLICY_HFP_PROFILE_STATE,
3012  *              BT_DPM_POLICY_HSP_PROFILE_STATE,
3013  *              BT_DPM_POLICY_PBAP_PROFILE_STATE,
3014  *              BT_DPM_POLICY_SAP_PROFILE_STATE,
3015  *              BT_DPM_POLICY_SPP_PROFILE_STATE,
3016  *              BT_DPM_PROFILE_NONE
3017  * @retval #BT_ERROR_NONE  Successful
3018  * @retval #BT_ERROR_INVALID_PARAMETER  invalid paramter
3019  * @retval #BT_ERROR_NOT_SUPPORTED      Not suported
3020  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
3021  * @retval #BT_ERROR_OPERATION_FAILED operation failed
3022  *
3023  * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
3024  * @see bt_dpm_get_allow_bluetooth_mode()
3025  */
3026 int bt_dpm_set_profile_state(bt_dpm_profile_e profile, bt_dpm_status_e value);
3027
3028 /**
3029  * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
3030  * @brief Reads the Restriction for profiles.
3031  * @since_tizen 3.0
3032  * @privlevel platform
3033  * @privilege %http://tizen.org/privilege/bluetooth.admin
3034  *
3035  * @param[in]profile - Profile.
3036  *              BT_DPM_POLICY_A2DP_PROFILE_STATE,
3037  *              BT_DPM_POLICY_AVRCP_PROFILE_STATE,
3038  *              BT_DPM_POLICY_BPP_PROFILE_STATE,
3039  *              BT_DPM_POLICY_DUN_PROFILE_STATE,
3040  *              BT_DPM_POLICY_FTP_PROFILE_STATE,
3041  *              BT_DPM_POLICY_HFP_PROFILE_STATE,
3042  *              BT_DPM_POLICY_HSP_PROFILE_STATE,
3043  *              BT_DPM_POLICY_PBAP_PROFILE_STATE,
3044  *              BT_DPM_POLICY_SAP_PROFILE_STATE,
3045  *              BT_DPM_POLICY_SPP_PROFILE_STATE,
3046  *              BT_DPM_PROFILE_NONE
3047  * @param[out]  value - State value.
3048  *              BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
3049  *              BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
3050  * @retval #BT_ERROR_NONE  Successful
3051  * @retval #BT_ERROR_INVALID_PARAMETER  invalid paramter
3052  * @retval #BT_ERROR_NOT_SUPPORTED      Not suported
3053  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
3054  * @retval #BT_ERROR_OPERATION_FAILED operation failed
3055  *
3056  * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
3057  * @see bt_dpm_get_allow_bluetooth_mode()
3058  */
3059 int bt_dpm_get_profile_state(bt_dpm_profile_e profile, bt_dpm_status_e *value);
3060
3061 /**
3062  * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
3063  * @brief Sets the Restriction for desktop connectivity.
3064  * @since_tizen 3.0
3065  * @privlevel platform
3066  * @privilege %http://tizen.org/privilege/bluetooth.admin
3067  *
3068  * @param[in]   value - State value.
3069  *              BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
3070  *              BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
3071  * @retval #BT_ERROR_NONE  Successful
3072  * @retval #BT_ERROR_INVALID_PARAMETER  invalid paramter
3073  * @retval #BT_ERROR_NOT_SUPPORTED      Not suported
3074  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
3075  * @retval #BT_ERROR_OPERATION_FAILED operation failed
3076  *
3077  * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
3078  * @see bt_dpm_get_allow_bluetooth_mode()
3079  */
3080 int bt_dpm_set_desktop_connectivity_state(bt_dpm_status_e value);
3081
3082 /**
3083  * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
3084  * @brief Reads the Restriction for desktop connectivity.
3085  * @since_tizen 3.0
3086  * @privlevel platform
3087  * @privilege %http://tizen.org/privilege/bluetooth.admin
3088  *
3089  * @param[out]  value - State value.
3090  *              BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
3091  *              BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
3092  * @retval #BT_ERROR_NONE  Successful
3093  * @retval #BT_ERROR_INVALID_PARAMETER  invalid paramter
3094  * @retval #BT_ERROR_NOT_SUPPORTED      Not suported
3095  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
3096  * @retval #BT_ERROR_OPERATION_FAILED operation failed
3097  *
3098  * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
3099  * @see bt_dpm_get_allow_bluetooth_mode()
3100  */
3101 int bt_dpm_get_desktop_connectivity_state(bt_dpm_status_e *value);
3102
3103 /**
3104  * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
3105  * @brief Sets the Restriction for discoverable mode.
3106  * @since_tizen 3.0
3107  * @privlevel platform
3108  * @privilege %http://tizen.org/privilege/bluetooth.admin
3109  *
3110  * @param[in]   value - State value.
3111  *              BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
3112  *              BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
3113  * @retval #BT_ERROR_NONE  Successful
3114  * @retval #BT_ERROR_INVALID_PARAMETER  invalid paramter
3115  * @retval #BT_ERROR_NOT_SUPPORTED      Not suported
3116  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
3117  * @retval #BT_ERROR_OPERATION_FAILED operation failed
3118  *
3119  * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
3120  * @see bt_dpm_get_allow_bluetooth_mode()
3121  */
3122 int bt_dpm_set_discoverable_state(bt_dpm_status_e value);
3123
3124 /**
3125  * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
3126  * @brief Reads the Restriction for discoverable mode.
3127  * @since_tizen 3.0
3128  * @privlevel platform
3129  * @privilege %http://tizen.org/privilege/bluetooth.admin
3130  *
3131  * @param[out]  value - State value.
3132  *              BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
3133  *              BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
3134  * @retval #BT_ERROR_NONE  Successful
3135  * @retval #BT_ERROR_INVALID_PARAMETER  invalid paramter
3136  * @retval #BT_ERROR_NOT_SUPPORTED      Not suported
3137  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
3138  * @retval #BT_ERROR_OPERATION_FAILED operation failed
3139  *
3140  * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
3141  * @see bt_dpm_get_allow_bluetooth_mode()
3142  */
3143 int bt_dpm_get_discoverable_state(bt_dpm_status_e *value);
3144
3145 /**
3146  * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
3147  * @brief Sets the Restriction for limited discoverable mode.
3148  * @since_tizen 3.0
3149  * @privlevel platform
3150  * @privilege %http://tizen.org/privilege/bluetooth.admin
3151  *
3152  * @param[in]   value - State value.
3153  *              BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
3154  *              BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
3155  * @retval #BT_ERROR_NONE  Successful
3156  * @retval #BT_ERROR_INVALID_PARAMETER  invalid paramter
3157  * @retval #BT_ERROR_NOT_SUPPORTED      Not suported
3158  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
3159  * @retval #BT_ERROR_OPERATION_FAILED operation failed
3160  *
3161  * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
3162  * @see bt_dpm_get_allow_bluetooth_mode()
3163  */
3164
3165 int bt_dpm_set_limited_discoverable_state(bt_dpm_status_e value);
3166
3167 /**
3168  * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
3169  * @brief Reads the Restriction for limited discoverable mode.
3170  * @since_tizen 3.0
3171  * @privlevel platform
3172  * @privilege %http://tizen.org/privilege/bluetooth.admin
3173  *
3174  * @param[out]  value - State value.
3175  *              BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
3176  *              BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
3177  * @retval #BT_ERROR_NONE  Successful
3178  * @retval #BT_ERROR_INVALID_PARAMETER  invalid paramter
3179  * @retval #BT_ERROR_NOT_SUPPORTED      Not suported
3180  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
3181  * @retval #BT_ERROR_OPERATION_FAILED operation failed
3182  *
3183  * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
3184  * @see bt_dpm_get_allow_bluetooth_mode()
3185  */
3186 int bt_dpm_get_limited_discoverable_state(bt_dpm_status_e *value);
3187
3188 /**
3189  * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
3190  * @brief Sets the Restriction for Data transfer.
3191  * @since_tizen 3.0
3192  * @privlevel platform
3193  * @privilege %http://tizen.org/privilege/bluetooth.admin
3194  *
3195  * @param[in]   value - State value.
3196  *              BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
3197  *              BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
3198  * @retval #BT_ERROR_NONE  Successful
3199  * @retval #BT_ERROR_INVALID_PARAMETER  invalid paramter
3200  * @retval #BT_ERROR_NOT_SUPPORTED      Not suported
3201  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
3202  * @retval #BT_ERROR_OPERATION_FAILED operation failed
3203  *
3204  * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
3205  * @see bt_dpm_get_allow_bluetooth_mode()
3206  */
3207 int bt_dpm_set_data_transfer_state(bt_dpm_status_e value);
3208
3209 /**
3210  * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
3211  * @brief Reads the Restriction for Data transfer.
3212  * @since_tizen 3.0
3213  * @privlevel platform
3214  * @privilege %http://tizen.org/privilege/bluetooth.admin
3215  *
3216  * @param[out]  value - State value.
3217  *              BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
3218  *              BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
3219  * @retval #BT_ERROR_NONE  Successful
3220  * @retval #BT_ERROR_INVALID_PARAMETER  invalid paramter
3221  * @retval #BT_ERROR_NOT_SUPPORTED      Not suported
3222  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
3223  * @retval #BT_ERROR_OPERATION_FAILED operation failed
3224  *
3225  * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
3226  * @see bt_dpm_get_allow_bluetooth_mode()
3227  */
3228 int bt_dpm_get_data_transfer_state(bt_dpm_status_e *value);
3229
3230 /**
3231  * @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE
3232  * @brief Gets the pbap connected status.
3233  * @since_tizen 3.0
3234  * @param[in] remote_address The address of the remote device
3235  * @param[out] connected_status the connected status
3236  * @return 0 on success, otherwise a negative error value.
3237  * @retval #BT_ERROR_NONE  Successful
3238  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
3239  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
3240  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
3241  * @retval #BT_ERROR_REMOTE_DEVICE_NOT_BONDED   Remote device not bonded
3242  * @retval #BT_ERROR_OPERATION_FAILED   Operation failed
3243  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
3244  *
3245  * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED.
3246  */
3247 int bt_pbap_client_is_connected(const char *address, bool *connected_status);
3248
3249 /**
3250  * @ingroup CAPI_NETWORK_BLUETOOTH_HID_MODULE
3251  * @brief Sends the custom event data.
3252  * @since_tizen @if WEARABLE 3.0 @endif
3253  * @privlevel platform
3254  * @privilege %http://tizen.org/privilege/bluetooth.admin
3255  *
3256  * @param[in] remote_address device address of remote device.
3257  * @param[in] report_id  reoport id need to be passed to remote device
3258  * @param[in] data  The data need to be passed to remote device
3259  * @param[in] data_len  The length of the data
3260  * @return 0 on success, otherwise a negative error value.
3261  * @retval #BT_ERROR_NONE  Successful
3262  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
3263  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
3264  * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
3265  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
3266  *
3267  * @pre The HID connection must be established.
3268  * @see bt_hid_device_connection_state_changed_cb()
3269  */
3270 int bt_hid_device_send_custom_event(const char *remote_address,
3271                 unsigned char report_id, const char *data, unsigned int data_len);
3272
3273 /**
3274  * @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_CONTROL_MODULE
3275  * @brief  Sends the volume change request to the remote device.
3276  * @since_tizen 4.0
3277  * @privlevel platform
3278  * @privilege %http://tizen.org/privilege/bluetooth.admin
3279  * @param[in] value The new volume level
3280  * @return  0 on success, otherwise a negative error value.
3281  * @retval #BT_ERROR_NONE  Successful
3282  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
3283  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
3284  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
3285  * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
3286  * @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED  Remote device is not connected
3287  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
3288  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
3289  *
3290  * @pre The remote device must be connected.
3291  * @see bt_avrcp_target_connection_state_changed_cb()
3292  * @see bt_avrcp_target_initialize()
3293  */
3294 int bt_avrcp_control_set_absolute_volume(unsigned int value);
3295
3296 /**
3297  * @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_CONTROL_MODULE
3298  * @brief  Sends the volume up request to the remote device.
3299  * @since_tizen 5.0
3300  * @privlevel platform
3301  * @privilege %http://tizen.org/privilege/bluetooth.admin
3302  * @return  0 on success, otherwise a negative error value.
3303  * @retval #BT_ERROR_NONE  Successful
3304  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
3305  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
3306  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
3307  * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
3308  * @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED  Remote device is not connected
3309  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
3310  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
3311  *
3312  * @pre The remote device must be connected.
3313  * @see bt_avrcp_control_connect()
3314  * @see bt_avrcp_control_initialize()
3315  */
3316 int bt_avrcp_control_increase_volume(void);
3317
3318 /**
3319  * @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_CONTROL_MODULE
3320  * @brief  Sends the volume down request to the remote device.
3321  * @since_tizen 5.0
3322  * @privlevel platform
3323  * @privilege %http://tizen.org/privilege/bluetooth.admin
3324  * @return  0 on success, otherwise a negative error value.
3325  * @retval #BT_ERROR_NONE  Successful
3326  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
3327  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
3328  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
3329  * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
3330  * @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED  Remote device is not connected
3331  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
3332  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
3333  *
3334  * @pre The remote device must be connected.
3335  * @see bt_avrcp_control_connect()
3336  * @see bt_avrcp_control_initialize()
3337  */
3338 int bt_avrcp_control_decrease_volume(void);
3339
3340 /**
3341  * @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_CONTROL_MODULE
3342  * @brief  Sends the delay report to the remote device.
3343  * @since_tizen 5.0
3344  * @privlevel platform
3345  * @privilege %http://tizen.org/privilege/bluetooth.admin
3346  * @param[in] value The new delay level
3347  * @return  0 on success, otherwise a negative error value.
3348  * @retval #BT_ERROR_NONE  Successful
3349  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
3350  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
3351  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
3352  * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
3353  * @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED  Remote device is not connected
3354  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
3355  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
3356  *
3357  * @pre The remote device must be connected.
3358  * @see bt_avrcp_target_connection_state_changed_cb()
3359  * @see bt_avrcp_target_initialize()
3360  */
3361 int bt_avrcp_control_send_delay_report(unsigned int value);
3362
3363 /**
3364  * @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE
3365  * @brief  Registers a callback function that will be invoked when the delay is changed.
3366  * @since_tizen 5.0
3367  * @param[in] callback The callback function to register
3368  * @param[in] user_data The user data to be passed to the callback function
3369  * @return   0 on success, otherwise a negative error value.
3370  * @retval #BT_ERROR_NONE  Successful
3371  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
3372  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
3373  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
3374  *
3375  * @pre The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize().
3376  * @see bt_avrcp_target_initialize()
3377  * @see bt_avrcp_control_initialize()
3378  */
3379 int bt_avrcp_set_delay_changed_cb(bt_avrcp_delay_changed_cb callback, void *user_data);
3380
3381 /**
3382  * @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE
3383  * @brief  Unregisters a callback function that will be invoked when the delay is changed.
3384  * @since_tizen 5.0
3385  * @return   0 on success, otherwise a negative error value.
3386  * @retval #BT_ERROR_NONE  Successful
3387  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
3388  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
3389  *
3390  * @pre The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize().
3391  * @see bt_avrcp_target_initialize()
3392  * @see bt_avrcp_control_initialize()
3393  * @see bt_avrcp_set_delay_changed_cb()
3394  */
3395 int bt_avrcp_unset_delay_changed_cb(void);
3396
3397 /**
3398  * @ingroup CAPI_NETWORK_BLUETOOTH_PROXIMITY_MODULE
3399  * @brief Creates the Proximity Profile Reporter Role.
3400  * @since_tizen 4.0
3401  * @privlevel public
3402  * @privilege %http://tizen.org/privilege/bluetooth
3403  * @param[in] None
3404  * @param[out] reporter proximity reporter server handle
3405  * @return @c 0 on success,
3406  *         otherwise a negative error value
3407  * @retval #BT_ERROR_NONE Successful
3408  * @retval #BT_ERROR_ALREADY_DONE Already Enabled
3409  * @retval #BT_ERROR_OUT_OF_MEMORY out Of Memory
3410  */
3411 int bt_proximity_reporter_create(bt_proximity_reporter_h *reporter);
3412
3413 /**
3414  * @ingroup CAPI_NETWORK_BLUETOOTH_PROXIMITY_MODULE
3415  * @brief Destroys the Proximity Profile Reporter Role.
3416  * @since_tizen 4.0
3417  * @privlevel public
3418  * @privilege %http://tizen.org/privilege/bluetooth
3419  * @param[in] reporter proximity reporter server handle
3420  * @return @c 0 on success,
3421  *                 otherwise a negative error value
3422  * @retval #BT_ERROR_NONE Successful
3423  * @retval #BT_ERROR_NOT_INITIALIZED Not initialized
3424  */
3425 int bt_proximity_reporter_destroy(bt_proximity_reporter_h reporter);
3426
3427 /**
3428  * @ingroup CAPI_NETWORK_BLUETOOTH_PROXIMITY_MODULE
3429  * @brief Creates the Proximity Profile Monitor Role.
3430  * @since_tizen 4.0
3431  * @privlevel public
3432  * @privilege %http://tizen.org/privilege/bluetooth
3433  * @param[in] remote address
3434  * @param[out] monitor proximity monitor handle
3435  * @return @c 0 on success,
3436  *         otherwise a negative error value
3437  * @retval #BT_ERROR_NONE Successful
3438  * @retval #BT_ERROR_ALREADY_DONE Already Enabled
3439  * @retval #BT_ERROR_OUT_OF_MEMORY out Of Memory
3440  */
3441 int bt_proximity_monitor_create(const char *remote_address, bt_proximity_monitor_h *monitor);
3442
3443 /**
3444  * @ingroup CAPI_NETWORK_BLUETOOTH_PROXIMITY_MODULE
3445  * @brief Creates the Proximity Profile Monitor Role.
3446  * @since_tizen 4.0
3447  * @privlevel public
3448  * @privilege %http://tizen.org/privilege/bluetooth
3449  * @param[in] monitor proximity monitor handle
3450  * @return @c 0 on success,
3451  *         otherwise a negative error value
3452  * @retval #BT_ERROR_NONE Successful
3453  * @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Device not Connected
3454  */
3455 int bt_proximity_monitor_destroy(bt_proximity_monitor_h monitor);
3456
3457 /**
3458  * @ingroup CAPI_NETWORK_BLUETOOTH_PROXIMITY_MODULE
3459  * @brief Proximity Monitor initiates the connection to remote reporter device.
3460  * @since_tizen 4.0
3461  * @privlevel public
3462  * @privilege %http://tizen.org/privilege/bluetooth
3463  * @param[in] monitor proximity monitor handle
3464  * @return @c 0 on success,
3465  *         otherwise a negative error value
3466  * @retval #BT_ERROR_NONE Successful
3467  * @retval #BT_ERROR_NOT_INITIALIZED Not initialized
3468  */
3469 int bt_proximity_monitor_connect(bt_proximity_monitor_h monitor);
3470
3471 /**
3472  * @ingroup CAPI_NETWORK_BLUETOOTH_PROXIMITY_MODULE
3473  * @brief Proximity Monitor disconnects with the remote reporter device.
3474  * @since_tizen 4.0
3475  * @privlevel public
3476  * @privilege %http://tizen.org/privilege/bluetooth
3477  * @param[in] proximity monitor handle
3478  * @return @c 0 on success,
3479  *         otherwise a negative error value
3480  * @retval #BT_ERROR_NONE Successful
3481  * @retval #BT_ERROR_NOT_INITIALIZED Not initialized
3482  */
3483 int bt_proximity_monitor_disconnect(bt_proximity_monitor_h monitor);
3484
3485 /**
3486  * @ingroup CAPI_NETWORK_BLUETOOTH_PROXIMITY_MODULE
3487  * @brief Sets proximity monitor connection state changed event change callback.
3488  * @since_tizen 4.0
3489  * @privlevel public
3490  * @privilege %http://tizen.org/privilege/bluetooth
3491  * @param[in] proximity monitor handle
3492  * @param[in] callback The callback function to register
3493  * @param[in] user_data The user data to be passed to the callback function
3494  * @return @c 0 on success,
3495  *         otherwise a negative error value
3496  * @retval #BT_ERROR_NONE Successful
3497  * @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Device not Connected
3498  */
3499 int bt_proximity_monitor_set_connection_state_changed_cb(bt_proximity_monitor_h monitor,
3500                                 bt_proximity_monitor_connection_state_changed_cb callback, void *user_data);
3501
3502 /**
3503  * @ingroup CAPI_NETWORK_BLUETOOTH_PROXIMITY_MODULE
3504  * @brief Unsets proximity monitor connection state changed event change callback.
3505  * @since_tizen 4.0
3506  * @privlevel public
3507  * @privilege %http://tizen.org/privilege/bluetooth
3508  * @param[in] proximity monitor handle
3509  * @return @c 0 on success,
3510  *         otherwise a negative error value
3511  * @retval #BT_ERROR_NONE Successful
3512  * @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Device not Connected
3513  */
3514 int bt_proximity_monitor_unset_connection_state_changed_cb(bt_proximity_monitor_h monitor);
3515
3516 /**
3517  * @ingroup CAPI_NETWORK_BLUETOOTH_PROXIMITY_MODULE
3518  * @brief Sets proximity reporter connection state changed event change callback.
3519  * @since_tizen 4.0
3520  * @privlevel public
3521  * @privilege %http://tizen.org/privilege/bluetooth
3522  * @param[in] reporter proximity reporter handle
3523  * @param[in] callback The callback function to register
3524  * @param[in] user_data The user data to be passed to the callback function
3525  * @return @c 0 on success,
3526  *         otherwise a negative error value
3527  * @retval #BT_ERROR_NONE Successful
3528  */
3529 int bt_proximity_reporter_set_connection_state_changed_cb(bt_proximity_reporter_h reporter,
3530                                 bt_proximity_reporter_connection_state_changed_cb callback, void *user_data);
3531
3532 /**
3533  * @ingroup CAPI_NETWORK_BLUETOOTH_PROXIMITY_MODULE
3534  * @brief Unsets proximity reporter connection state changed event change callback.
3535  * @since_tizen 4.0
3536  * @privlevel public
3537  * @privilege %http://tizen.org/privilege/bluetooth
3538  * @param[in] proximity reporter handle
3539  * @return @c 0 on success,
3540  *         otherwise a negative error value
3541  * @retval #BT_ERROR_NONE Successful
3542  */
3543 int bt_proximity_reporter_unset_connection_state_changed_cb(bt_proximity_reporter_h reporter);
3544
3545 /**
3546  * @ingroup CAPI_NETWORK_BLUETOOTH_PROXIMITY_MODULE
3547  * @brief Sets proximity reporter properties change callback.
3548  * @since_tizen 4.0
3549  * @privlevel public
3550  * @privilege %http://tizen.org/privilege/bluetooth
3551  * @param[in] reporter proximity reporter handle
3552  * @param[in] callback The callback function to register
3553  * @param[in] user_data The user data to be passed to the callback function
3554  * @return @c 0 on success,
3555  *         otherwise a negative error value
3556  * @retval #BT_ERROR_NONE Successful
3557  */
3558 int bt_proximity_reporter_set_property_changed_cb(bt_proximity_reporter_h reporter,
3559                                 bt_proximity_reporter_property_changed_cb callback, void *user_data);
3560
3561 /**
3562  * @ingroup CAPI_NETWORK_BLUETOOTH_PROXIMITY_MODULE
3563  * @brief Unsets proximity reporter properties change callback.
3564  * @since_tizen 4.0
3565  * @privlevel public
3566  * @privilege %http://tizen.org/privilege/bluetooth
3567  * @param[in] reporter proximity reporter handle
3568  * @return @c 0 on success,
3569  *         otherwise a negative error value
3570  * @retval #BT_ERROR_NONE Successful
3571  */
3572 int bt_proximity_reporter_unset_property_changed_cb(bt_proximity_reporter_h reporter);
3573
3574 /**
3575  * @ingroup CAPI_NETWORK_BLUETOOTH_PROXIMITY_MODULE
3576  * @brief Set the Proximity Profile monitor linkloss alert value.
3577  * @since_tizen 4.0
3578  * @privlevel public
3579  * @privilege %http://tizen.org/privilege/bluetooth
3580  * @param[in] monitor proximity monitor handle
3581  * @param[in] value The value to be set for link loss alert
3582  * @return @c 0 on success,
3583  *         otherwise a negative error value
3584  * @retval #BT_ERROR_NONE Successful
3585  * @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Device not Connected
3586  * @retval #BT_ERROR_NOT_SUPPORTED Not supported
3587  */
3588 int bt_proximity_monitor_set_linkloss_alert(bt_proximity_monitor_h monitor, int value);
3589
3590 /**
3591  * @ingroup CAPI_NETWORK_BLUETOOTH_PROXIMITY_MODULE
3592  * @brief Set the Proximity Profile monitor immediate alert value.
3593  * @since_tizen 4.0
3594  * @privlevel public
3595  * @privilege %http://tizen.org/privilege/bluetooth
3596  * @param[in] monitor proximity monitor handle
3597  * @param[in] value The value to be set for immediate alert
3598  * @return @c 0 on success,
3599  *                 otherwise a negative error value
3600  * @retval #BT_ERROR_NONE Successful
3601  * @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Device not Connected
3602  * @retval #BT_ERROR_NOT_SUPPORTED Not supported
3603  */
3604 int bt_proximity_monitor_set_immediate_alert(bt_proximity_monitor_h monitor, int value);
3605
3606 /**
3607  * @ingroup CAPI_NETWORK_BLUETOOTH_PROXIMITY_MODULE
3608  * @brief Read the Proximity Profile monitor linkloss alert value.
3609  * @since_tizen 4.0
3610  * @privlevel public
3611  * @privilege %http://tizen.org/privilege/bluetooth
3612  * @param[in] monitor proximity monitor handle
3613  * @param[out] value value read for the linkloss alert.
3614  * @return @c 0 on success,
3615  *         otherwise a negative error value
3616  * @retval #BT_ERROR_NONE Successful
3617  * @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Device not Connected
3618  * @retval #BT_ERROR_NOT_SUPPORTED Not supported
3619  */
3620 int bt_proximity_monitor_get_linkloss_alert(bt_proximity_monitor_h monitor, int *value);
3621
3622 /**
3623  * @ingroup CAPI_NETWORK_BLUETOOTH_PROXIMITY_MODULE
3624  * @brief Read the Proximity Profile monitor immediate alert value.
3625  * @since_tizen 4.0
3626  * @privlevel public
3627  * @privilege %http://tizen.org/privilege/bluetooth
3628  * @param[in] monitor proximity monitor handle
3629  * @param[out] value value read for the immedaite alert.
3630  * @return @c 0 on success,
3631  *                 otherwise a negative error value
3632  * @retval #BT_ERROR_NONE Successful
3633  * @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Device not Connected
3634  * @retval #BT_ERROR_NOT_SUPPORTED Not supported
3635  */
3636 int bt_proximity_monitor_get_immediate_alert(bt_proximity_monitor_h monitor, int *value);
3637
3638 /**
3639  * @ingroup CAPI_NETWORK_BLUETOOTH_PROXIMITY_MODULE
3640  * @brief Read the Proximity Profile monitor Signal level value.
3641  * @since_tizen 4.0
3642  * @privlevel public
3643  * @privilege %http://tizen.org/privilege/bluetooth
3644  * @param[in] monitor proximity monitor handle
3645  * @param[out] value value read for the signal level.
3646  * @return @c 0 on success,
3647  *                 otherwise a negative error value
3648  * @retval #BT_ERROR_NONE Successful
3649  * @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Device not Connected
3650  * @retval #BT_ERROR_NOT_SUPPORTED Not supported
3651  */
3652 int bt_proximity_monitor_get_signal_level(bt_proximity_monitor_h monitor, int *value);
3653
3654 /**
3655  * @ingroup CAPI_NETWORK_BLUETOOTH_PROXIMITY_MODULE
3656  * @brief Read the Proximity Profile reporter linkloss alert value.
3657  * @since_tizen 4.0
3658  * @privlevel public
3659  * @privilege %http://tizen.org/privilege/bluetooth
3660  * @param[in] remote_address remote device reporter address
3661  * @param[out] value value read for the linkloss alert.
3662  * @return @c 0 on success,
3663  *                 otherwise a negative error value
3664  * @retval #BT_ERROR_NONE Successful
3665  * @retval #BT_ERROR_NOT_INITIALIZED not initialized
3666  * @retval #BT_ERROR_NOT_SUPPORTED Not supported
3667  */
3668 int bt_proximity_reporter_get_linkloss_alert(const char *remote_address, int *value);
3669
3670 /**
3671  * @ingroup CAPI_NETWORK_BLUETOOTH_PROXIMITY_MODULE
3672  * @brief Read the Proximity Profile reporter immediate alert value.
3673  * @since_tizen 4.0
3674  * @privlevel public
3675  * @privilege %http://tizen.org/privilege/bluetooth
3676  * @param[in] remote_address remote device reporter address
3677  * @param[out] value value read for the immediate alert.
3678  * @return @c 0 on success,
3679  *                 otherwise a negative error value
3680  * @retval #BT_ERROR_NONE Successful
3681  * @retval #BT_ERROR_NOT_INITIALIZED not initialized
3682  * @retval #BT_ERROR_NOT_SUPPORTED Not supported
3683  */
3684 int bt_proximity_reporter_get_immediate_alert(const char *remote_address, int *value);
3685
3686 /* This internal API will be removed */
3687 /**
3688  * @internal
3689  * @deprecated Deprecated since 4.0. Use bt_adapter_le_scan_filter_unregister instead.
3690  * @brief API to Unset the Proximity uuids scan report
3691  */
3692 int bt_adapter_le_scan_filter_unset_proximity_uuid(bt_scan_filter_h scan_filter) TIZEN_DEPRECATED_API;
3693
3694 /**
3695  * @internal
3696  * @brief API to register TDS provider.
3697  * @since_tizen @if WEARABLE 3.0 @endif
3698  * @privlevel platform
3699  * @privilege %http://tizen.org/privilege/bluetooth.admin
3700  *
3701  * @param[in] None
3702  * @param[out] None
3703  *
3704  * @return 0 on success, otherwise a negative error value.
3705  * @retval #BT_ERROR_NONE  Successful
3706  * @retval #BT_ERROR_NOT_SUPPORTED Not supported
3707  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
3708  *
3709  * @pre The Bluetooth service must be initialized with bt_initialize().
3710  *
3711  * @see bt_initialize()
3712  * @see bt_tds_provider_unregister()
3713  */
3714 int bt_tds_provider_register(void);
3715
3716 /**
3717  * @internal
3718  * @brief API to unregister TDS provider.
3719  * @since_tizen @if WEARABLE 3.0 @endif
3720  * @privlevel platform
3721  * @privilege %http://tizen.org/privilege/bluetooth.admin
3722  *
3723  * @param[in] None
3724  * @param[out] None
3725  *
3726  * @return 0 on success, otherwise a negative error value.
3727  * @retval #BT_ERROR_NONE  Successful
3728  * @retval #BT_ERROR_NOT_SUPPORTED Not supported
3729  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
3730  *
3731  * @pre The Bluetooth service must be initialized with bt_initialize().
3732  * @pre TDS provider must be registered with bt_tds_provider_register().
3733  *
3734  * @see bt_initialize()
3735  * @see bt_tds_provider_register()
3736  */
3737 int bt_tds_provider_unregister(void);
3738
3739 /**
3740  * @internal
3741  * @brief API to create TDS provider.
3742  * @since_tizen @if WEARABLE 3.0 @endif
3743  * @privlevel platform
3744  * @privilege %http://tizen.org/privilege/bluetooth.admin
3745  *
3746  * @param[in] transport Transport to be discovered over BLE.
3747  * @param[out] provider The handle associated with the newly created provider.
3748  *
3749  * @return 0 on success, otherwise a negative error value.
3750  * @retval #BT_ERROR_NONE  Successful
3751  * @retval #BT_ERROR_NOT_SUPPORTED Not supported
3752  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
3753  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
3754  *
3755  * @pre The Bluetooth service must be initialized with bt_initialize().
3756  * @pre TDS provider must be registered with bt_tds_provider_register().
3757  *
3758  * @see bt_initialize()
3759  * @see bt_tds_provider_register()
3760  * @see bt_tds_provider_unregister()
3761  * @see bt_tds_provider_destroy()
3762  */
3763 int bt_tds_provider_create(bt_tds_provider_h *provider, bt_tds_transport_e transport);
3764
3765 /**
3766  * @internal
3767  * @brief API to destroy TDS provider.
3768  * @since_tizen @if WEARABLE 3.0 @endif
3769  * @privlevel platform
3770  * @privilege %http://tizen.org/privilege/bluetooth.admin
3771  *
3772  * @param[in] provider The handle associated with the provider
3773  *
3774  * @return 0 on success, otherwise a negative error value.
3775  * @retval #BT_ERROR_NONE  Successful
3776  * @retval #BT_ERROR_NOT_SUPPORTED Not supported
3777  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
3778  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
3779  *
3780  * @pre The Bluetooth service must be initialized with bt_initialize().
3781  * @pre TDS provider must be registered with bt_tds_provider_register().
3782  * @pre TDS provider must be created with bt_tds_provider_create().
3783  *
3784  * @see bt_initialize()
3785  * @see bt_tds_provider_register()
3786  * @see bt_tds_provider_create()
3787  */
3788 int bt_tds_provider_destroy(bt_tds_provider_h provider);
3789
3790 /**
3791  * @internal
3792  * @brief API to set transport block data for transport provider.
3793  * @since_tizen @if WEARABLE 3.0 @endif
3794  * @privlevel platform
3795  * @privilege %http://tizen.org/privilege/bluetooth.admin
3796  *
3797  * @param[in] provider The handle associated with the provider
3798  * @param[in] transport_state State of transport
3799  * @param[in] buf transport block data
3800  * @param[in] length transport block data length
3801  *
3802  * @return 0 on success, otherwise a negative error value.
3803  * @retval #BT_ERROR_NONE  Successful
3804  * @retval #BT_ERROR_NOT_SUPPORTED Not supported
3805  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
3806  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
3807  *
3808  * @pre The Bluetooth service must be initialized with bt_initialize().
3809  * @pre TDS provider must be registered with bt_tds_provider_register().
3810  * @pre TDS provider must be created with bt_tds_provider_create().
3811  *
3812  * @see bt_initialize()
3813  * @see bt_tds_provider_register()
3814  * @see bt_tds_provider_create()
3815  */
3816 int bt_tds_provider_set_transport_data(bt_tds_provider_h provider,
3817                 bt_tds_transport_state_e transport_state, unsigned char *buf, int length);
3818
3819 /**
3820  * @internal
3821  * @brief API to set TDS provider manufacturer specific data.
3822  * @since_tizen @if WEARABLE 3.0 @endif
3823  * @privlevel platform
3824  * @privilege %http://tizen.org/privilege/bluetooth.admin
3825  *
3826  * @param[in] buf manufacturer specific data
3827  * @param[in] length manufacturer data length
3828  *
3829  * @return 0 on success, otherwise a negative error value.
3830  * @retval #BT_ERROR_NONE  Successful
3831  * @retval #BT_ERROR_NOT_SUPPORTED Not supported
3832  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
3833  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
3834  *
3835  * @pre The Bluetooth service must be initialized with bt_initialize().
3836  * @pre TDS provider must be registered with bt_tds_provider_register().
3837  *
3838  * @see bt_initialize()
3839  * @see bt_tds_provider_register()
3840  * @see bt_tds_provider_create()
3841  */
3842 int bt_tds_provider_set_manufacturer_data(unsigned char *buf, int length);
3843
3844 /**
3845  * @internal
3846  * @brief API to send activation response to TDS seeker.
3847  * @since_tizen @if WEARABLE 3.0 @endif
3848  * @privlevel platform
3849  * @privilege %http://tizen.org/privilege/bluetooth.admin
3850  *
3851  * @param[in] address Remote device bluetooth address
3852  * @param[in] result Result of activation request
3853  *              BT_ERROR_NONE: success
3854  *              BT_ERROR_INVALID_PARAMETER: Invalid data in activation request
3855  *              BT_ERROR_OPERATION_FAILED: Operation failed
3856  * @param[in] provider The handle associated with the provider
3857  *
3858  * @return 0 on success, otherwise a negative error value.
3859  * @retval #BT_ERROR_NONE  Successful
3860  * @retval #BT_ERROR_NOT_SUPPORTED Not supported
3861  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
3862  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
3863  *
3864  * @pre The Bluetooth service must be initialized with bt_initialize().
3865  * @pre TDS provider must be registered with bt_tds_provider_register().
3866  *
3867  * @see bt_initialize()
3868  * @see bt_tds_provider_register()
3869  * @see bt_tds_activation_requested_cb()
3870  * @see bt_tds_set_transport_activation_requested_cb()
3871  * @see bt_tds_unset_transport_activation_requested_cb()
3872  */
3873 int bt_tds_provider_send_activation_resp(char *address, int result, bt_tds_provider_h provider);
3874
3875 /**
3876  * @internal
3877  * @brief API to set activation requeste callback.
3878  * @since_tizen @if WEARABLE 3.0 @endif
3879  * @privlevel public
3880  * @privilege %http://tizen.org/privilege/bluetooth.admin
3881  *
3882  * @param[in] callback  The callback function to invoke
3883  * @param[in] user_data The user data to be passed to the callback function
3884  *
3885  * @return 0 on success, otherwise a negative error value.
3886  * @retval #BT_ERROR_NONE  Successful
3887  * @retval #BT_ERROR_NOT_SUPPORTED Not supported
3888  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
3889  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
3890  *
3891  * @pre The Bluetooth service must be initialized with bt_initialize().
3892  * @post bt_tds_activation_requested_cb() will be invoked.
3893  *
3894  * @see bt_initialize()
3895  * @see bt_tds_activation_requested_cb()
3896  * @see bt_tds_unset_transport_activation_requested_cb()
3897  */
3898 int bt_tds_set_transport_activation_requested_cb(
3899                 bt_tds_activation_requested_cb callback, void *user_data);
3900
3901 /**
3902  * @internal
3903  * @brief API to unset activation requeste callback.
3904  * @since_tizen @if WEARABLE 3.0 @endif
3905  * @privlevel public
3906  * @privilege %http://tizen.org/privilege/bluetooth.admin
3907  *
3908  * @param[in] None
3909  * @return 0 on success, otherwise a negative error value.
3910  * @retval #BT_ERROR_NONE  Successful
3911  * @retval #BT_ERROR_NOT_SUPPORTED Not supported
3912  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
3913  *
3914  * @see bt_initialize()
3915  * @see bt_tds_set_transport_activation_requested_cb()
3916  */
3917 int bt_tds_unset_transport_activation_requested_cb(void);
3918
3919 /**
3920  * @internal
3921  * @brief TDS Seeker Profile API to start seeking Remote TDS providers only
3922  */
3923 int bt_tds_start_seeking_providers(bt_tds_provider_scan_result_cb cb, void *user_data);
3924
3925 /**
3926  * @internal
3927  * @brief TDS Seeker Profile API to stop seeking Remote TDS providers
3928  */
3929 int bt_tds_stop_seeking_providers(void);
3930
3931 /**
3932  * @internal
3933  * @brief TDS Seeker Profile API to create Seeker Role associated with Remote TDS provider
3934  */
3935 int bt_tds_seeker_create(const char *remote_address, bt_tds_seeker_h *seeker);
3936
3937 /**
3938  * @internal
3939  * @brief TDS Seeker Profile API to destroy Seeker Role associated with Remote TDS provider
3940  */
3941 int bt_tds_seeker_destroy(bt_tds_seeker_h seeker);
3942
3943 /**
3944  * @internal
3945  * @brief TDS Seeker Profile API to set connection state changed event associated with Remote TDS provider
3946  */
3947 int bt_tds_seeker_set_connection_state_changed_cb(bt_tds_seeker_h seeker,
3948                 bt_tds_seeker_connection_state_changed_cb callback, void *user_data);
3949
3950 /**
3951  * @internal
3952  * @brief TDS Seeker Profile API to unset connection state changed event associated with Remote TDS provider
3953  */
3954 int bt_tds_seeker_unset_connection_state_changed_cb(bt_tds_seeker_h seeker);
3955
3956 /**
3957  * @internal
3958  * @brief TDS Seeker Profile API to connect to Remote TDS provider
3959  */
3960 int bt_tds_seeker_connect(bt_tds_seeker_h seeker);
3961
3962 /**
3963  * @internal
3964  * @brief TDS Seeker Profile API to disconnect to Remote TDS provider
3965  */
3966 int bt_tds_seeker_disconnect(bt_tds_seeker_h seeker);
3967
3968 /**
3969  * @internal
3970  * @brief TDS Seeker Profile API to read complete TDS block data which is stored in Remote TDS provider's GATT database
3971  */
3972 int bt_tds_seeker_get_complete_transport_blocks(bt_tds_seeker_h seeker,
3973                 bt_tds_seeker_complete_transport_data_cb callback, void *user_data);
3974
3975 /**
3976  * @internal
3977  * @brief TDS Seeker Profile API to Activate ALternate transport supported by Remote TDS provider
3978  */
3979 int bt_tds_seeker_activate_control_point(bt_tds_seeker_h seeker,
3980                                 bt_tds_transport_e transport, unsigned char *buffer, int len,
3981                                 bt_tds_control_point_activation_indication_cb callback, void *user_data);
3982
3983 /**
3984  * @ingroup
3985  * @brief Starts OTP server on the given directory location.
3986  */
3987 int bt_otp_server_initialize(const char *directory);
3988
3989 /**
3990  * @ingroup
3991  * @brief Stops OTP server.
3992  */
3993 int bt_otp_server_deinitialize();
3994
3995 /**
3996  * @ingroup
3997  * @brief Registers a callback function that will be invoked when the server state is changed.
3998  */
3999 int bt_otp_set_server_state_changed_cb(bt_otp_server_state_changed_cb callback, void *user_data);
4000
4001 /**
4002  * @ingroup
4003  * @brief Registers a callback function that will be invoked when the server state is changed.
4004  */
4005 int bt_otp_unset_server_state_changed_cb(void);
4006
4007 /**
4008  * @internal
4009  * @brief OTP Client Profile API to create Client Role associated with Remote OTP Server
4010  */
4011 int bt_otp_client_create(const char *remote_address, bt_otp_client_h *otp_client);
4012
4013 /**
4014  * @internal
4015  * @brief OTP Client Profile API to destroy Client Role associated with Remote OTP Server
4016  */
4017 int bt_otp_client_destroy(bt_otp_client_h otp_client);
4018
4019 /**
4020  * @internal
4021  * @brief OTP Client Profile API to set connection state changed event associated with Remote OTP Server
4022  */
4023 int bt_otp_client_set_connection_state_changed_cb(bt_otp_client_h otp_client,
4024                                                 bt_otp_client_state_changed_cb callback, void *user_data);
4025
4026 /**
4027  * @internal
4028  * @brief OTP Client Profile API to unset connection state changed event associated with Remote OTP Server
4029  */
4030 int bt_otp_client_unset_connection_state_changed_cb(bt_otp_client_h otp_client);
4031
4032 /**
4033  * @internal
4034  * @brief OTP client API to connect to Remote OTP Server
4035  */
4036 int bt_otp_client_connect(bt_otp_client_h otp_client);
4037
4038 /**
4039  * @internal
4040  * @brief OTP client API to disconnect to Remote OTP Server
4041  */
4042 int bt_otp_client_disconnect(bt_otp_client_h otp_client);
4043
4044 /**
4045  * @internal
4046  * @brief OTP client API to discover all objects in Remote OTP Server
4047  */
4048 int bt_otp_client_discover_all_objects(bt_otp_client_h otp_client,
4049                                                 bt_otp_client_object_discovery_cb callback, void *user_data);
4050
4051 /**
4052  * @internal
4053  * @brief OTP client API to select object in Remote OTP Server
4054  */
4055 int bt_otp_client_select_object(bt_otp_client_h otp_client, unsigned long long id,
4056                                                         bt_otp_client_object_select_cb callback, void *user_data);
4057 /**
4058  * @internal
4059  * @brief OTP client API to read remote objects contents
4060  */
4061 int bt_otp_client_read_object_contents(bt_otp_client_h otp_client,
4062                                         bt_otp_client_read_object_complete_cb callback, void *user_data);
4063 /**
4064  * @internal
4065  * @brief OTP client API to create object on remote server
4066  */
4067 int bt_otp_client_create_object(bt_otp_client_h otp_client,
4068                                                         const char *file_path,
4069                                                         bt_otp_client_object_create_cb callback,
4070                                                         void *user_data);
4071 /**
4072  * @internal
4073  * @brief OTP client API to write object contents on remote server
4074  */
4075 int bt_otp_client_write_object(bt_otp_client_h otp_client,
4076                                                         const char *file_path,
4077                                                         int offset, int length, int mode,
4078                                                         bt_otp_client_object_write_cb callback,
4079                                                         void *user_data);
4080 /**
4081  * @internal
4082  * @brief OTP client API to execute object on remote server
4083  */
4084 int bt_otp_client_execute_object(bt_otp_client_h otp_client,
4085                                                         bt_otp_client_object_execute_cb callback,
4086                                                         void *user_data);
4087 /**
4088  * @internal
4089  * @brief OTP client API to delete object on remote server
4090  */
4091 int bt_otp_client_delete_object(bt_otp_client_h otp_client,
4092                                                         bt_otp_client_object_delete_cb callback,
4093                                                         void *user_data);
4094
4095 //======================================================================================
4096
4097 /**
4098  * @internal
4099  * @brief HRP Sensor API to set initial heart rate value , will also notify to all connected clients if notification is enabled .
4100  */
4101 int bt_hrp_sensor_set_heartrate_value(int heartrate);
4102
4103 /**
4104  * @internal
4105  * @brief HRP Sensor API to set initial Location value , before creating sensor.
4106  */
4107 int bt_hrp_sensor_set_location_value(bt_body_sensor_location_e location);
4108
4109 /**
4110  * @internal
4111  * @brief HRP Sensor API to set initial energy value (Value Range : 0-9) , before creating sensor.
4112  */
4113 int bt_hrp_sensor_set_energy_value(int energy_value);
4114
4115 /**
4116  * @internal
4117  * @brief HRP Sensor API to set initial rr interval value (Value range : 0-8 If EE is supported,
4118  * 0-9 if EE not supported) before creating sensor.
4119  */
4120 int bt_hrp_sensor_set_rr_interval(int interval);
4121
4122 /**
4123  * @internal
4124  * @brief HRP Sensor API to set initial contact value , wearable in contact with
4125  * user or user has removed it, before creating sensor.
4126  */
4127 int bt_hrp_sensor_set_contact_value(bool enable);
4128
4129 /**
4130  * @internal
4131  * @brief HRP Sensor API to set manufacturer name , before creating sensor.
4132  */
4133 int bt_hrp_sensor_set_device_manufacturer_name(char *manuf_name);
4134
4135 /**
4136  * @internal
4137  * @brief HRP Sensor API for creating sensor and services.
4138  */
4139
4140 int bt_hrp_sensor_create(void);
4141
4142 /**
4143  * @internal
4144  * @brief HRP Sensor API to destory heart rate sensor .
4145  */
4146
4147 int bt_hrp_sensor_destroy(void);
4148
4149 /**
4150  * @internal
4151  * @brief HRP collector API to create collector .
4152  */
4153
4154 int bt_hrp_collector_create(const char *remote_address,
4155                                 bt_hrp_collector_h *collector);
4156
4157 /**
4158  * @internal
4159  * @brief HRP collector API to destory collector.
4160  */
4161 int bt_hrp_collector_destory(bt_hrp_collector_h collector);
4162
4163 /**
4164  * @internal
4165  * @brief HRP collector API to start scan .
4166  */
4167 int bt_hrp_collector_start_scan(bt_hrp_collector_scan_result_cb cb, void *user_data);
4168
4169 /**
4170  * @internal
4171  * @brief HRP collector API to stop scan.
4172  */
4173 int bt_hrp_collector_stop_scan(void);
4174
4175 /**
4176  * @internal
4177  * @brief HRP collector API to connect to remote sensor .
4178  */
4179 int bt_hrp_collector_connect(bt_hrp_collector_h collector);
4180
4181 /**
4182  * @internal
4183  * @brief HRP collector API to disconnect to remote sensor .
4184  */
4185 int bt_hrp_collector_disconnect(bt_hrp_collector_h collector);
4186
4187 /**
4188  * @internal
4189  * @brief HRP collector API to set notification on / off.
4190  */
4191 int bt_hrp_collector_set_notification(bt_hrp_collector_h collector,
4192                         bt_hrp_collector_heart_rate_value_changed_cb callback,
4193                         bool isNotify);
4194
4195 /**
4196  * @internal
4197  * @brief HRP collector API to read Body Sensor location , fills body sensor location in bsl_location
4198  */
4199
4200 int bt_hrp_collector_get_body_sensor_location(bt_hrp_collector_h collector,
4201                         bt_hrp_collector_bsl_read_completed_cb bsl_read_cb);
4202
4203
4204 /**
4205  * @internal
4206  * @brief HRP collector API to set connection state callback
4207  */
4208
4209 int bt_hrp_collector_set_connection_state_changed_cb(bt_hrp_collector_h collector,
4210                         bt_hrp_collector_connection_state_changed_cb callback,
4211                         void *user_data);
4212
4213 /**
4214  * @internal
4215  * @brief HRP collector API to unset connection state callback
4216  */
4217
4218 int bt_hrp_collector_unset_connection_state_changed_cb(bt_hrp_collector_h collector);
4219
4220 /**
4221  * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
4222  * @brief Gets number of available packets to be used as a threshold for GATT data batching.
4223  * @since_tizen 5.5.0.0
4224  * @privlevel platform
4225  * @privilege %http://tizen.org/privilege/bluetooth.admin
4226  *
4227  * @param[out] available_packets The number of available packets to be used as a threshold.
4228  *
4229  * @return 0 on success, otherwise a negative error value.
4230  * @retval #BT_ERROR_NONE  Successful
4231  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
4232  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
4233  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
4234  * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
4235  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
4236  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
4237  *
4238  * @see bt_gatt_enable_data_batching()
4239  */
4240 int bt_gatt_get_data_batching_available_packets(int *available_packets);
4241
4242 /**
4243  * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
4244  * @brief Enables GATT data batching.
4245  * @since_tizen 5.5.0.0
4246  * @privlevel platform
4247  * @privilege %http://tizen.org/privilege/bluetooth.admin
4248  * @remarks GATT data batching is disabled even if the gatt is disconnected or bt adapter is disabled.
4249  *
4250  * @param[in] remote_address The address of the remote Bluetooth device for which RSSI is to be monitored.
4251  * @param[in] packet_threshold The threshold of packet count for receiving data.
4252  * @param[in] timeout The timeout to flush buffer.
4253  *
4254  * @return 0 on success, otherwise a negative error value.
4255  * @retval #BT_ERROR_NONE  Successful
4256  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
4257  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
4258  * @retval #BT_ERROR_QUOTA_EXCEEDED  Quota exceeded
4259  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
4260  * @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED  Remote device is not connected
4261  * @retval #BT_ERROR_ALREADY_DONE   Already enabled
4262  * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
4263  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
4264  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
4265  *
4266  * @see bt_gatt_get_data_batching_available_packets()
4267  * @see bt_gatt_disable_data_batching()
4268  */
4269 int bt_gatt_enable_data_batching(const char *remote_address, int packet_threshold, int timeout);
4270
4271 /**
4272  * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
4273  * @brief Disables GATT data batching.
4274  * @since_tizen 5.5.0.0
4275  * @privlevel platform
4276  * @privilege %http://tizen.org/privilege/bluetooth.admin
4277  *
4278  * @param[in] remote_address The address of the remote Bluetooth device for which RSSI is to be monitored.
4279  *
4280  * @return 0 on success, otherwise a negative error value.
4281  * @retval #BT_ERROR_NONE  Successful
4282  * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
4283  * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
4284  * @retval #BT_ERROR_NOT_ENABLED  Not enabled
4285  * @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED  Remote device is not connected
4286  * @retval #BT_ERROR_NOT_IN_PROGRESS  Not enabled
4287  * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
4288  * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
4289  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
4290  *
4291  * @see bt_gatt_enable_data_batching()
4292  */
4293 int bt_gatt_disable_data_batching(const char *remote_address);
4294
4295 /* Mesh API */
4296 /**
4297  * @internal
4298  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4299  * @brief Initializes the Mesh API
4300  *
4301  * @remarks This function must be called before starting use BT Mesh API's.
4302  * You must free all resources of the BT Mesh service by
4303  * calling bt_mesh_deinitialize()
4304  * if Mesh service is no longer needed.
4305  * @since_tizen 6.0
4306  * @privlevel platform
4307  */
4308 int bt_mesh_initialize(void);
4309
4310 /**
4311  * @internal
4312  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4313  * @brief Must be called if BT Mesh service is no longer needed
4314  * @since_tizen 6.0
4315  * @privlevel platform
4316  */
4317 int bt_mesh_deinitialize(void);
4318
4319 /**
4320  * @internal
4321  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4322  * @brief API to create a arbitrary node.
4323  * Primary element is mandatory element for any node
4324  *
4325  * @since_tizen 6.0
4326  * @privlevel platform
4327  */
4328 int bt_mesh_node_create(bt_mesh_node_features_s *features,
4329                 bt_mesh_node_h *node_handle);
4330
4331 /**
4332  * @internal
4333  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4334  * @brief Destroys the locally created mesh node
4335  * & all resources contained in it
4336  *
4337  * @remarks: It is not allowed to arbitrarily destroy a locally created node,
4338  * if it is part of a mesh network already.
4339  * @remarks: Destroying a remote node is not supported.
4340  * @remarks: In order to reset a remote provisioned node, use bt_mesh_node_reset() API
4341  *
4342  * @since_tizen 6.0
4343  * @privlevel platform
4344  */
4345 int bt_mesh_node_destroy(bt_mesh_node_h node_handle);
4346
4347 /**
4348  * @internal
4349  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4350  * @brief API to create a mesh element. In case of Mesh Provisioner,
4351  * it will serve as a element of the local node  of a Mesh Provisioner.
4352  *
4353  * @since_tizen 6.0
4354  * @privlevel platform
4355  */
4356 int bt_mesh_node_create_element(bt_mesh_node_h node_handle,
4357                 bt_mesh_element_h *element_handle);
4358
4359 /**
4360  * @internal
4361  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4362  * @brief Destroys the locally created mesh element &
4363  * all resources contained in it (Ex: models)
4364  *
4365  * @remarks: It is not allowed to arbitrarily destroy a
4366  * locally created element, if it is part of a mesh network already.
4367  * @remarks: Destroying element of a remote node is not supported.
4368  * @remarks: In order to reset a remote provisioned node,
4369  * use bt_mesh_node_reset() API
4370  *
4371  * @since_tizen 6.0
4372  * @privlevel platform
4373  */
4374 int bt_mesh_element_destroy(bt_mesh_element_h element_handle);
4375
4376 /**
4377  * @internal
4378  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4379  * @brief API to create a mesh Model instance.
4380  * In case of Mesh Provisioner, it will serve as a
4381  * Model of one of the elements of the local node of a Mesh Provisioner.
4382  *
4383  * @since_tizen 6.0
4384  * @privlevel platform
4385  */
4386 int bt_mesh_element_create_model(bt_mesh_element_h element_handle,
4387                 bt_mesh_model_id_s *model_id,
4388                                 bt_mesh_model_h *model_handle);
4389
4390 /**
4391  * @internal
4392  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4393  * @brief Destroys the locally created mesh Model
4394  *
4395  * @remarks: It is not allowed to arbitrarily destroy a locally created model,
4396  * if it is part of a mesh network already.
4397  * @remarks: Destroying model of a remote element is not supported.
4398  * @remarks: In order to reset a remote provisioned node,
4399  * use bt_mesh_node_reset() API
4400  *
4401  * @since_tizen 6.0
4402  * @privlevel platform
4403  */
4404 int bt_mesh_model_destroy(bt_mesh_model_h model);
4405
4406 /**
4407  * @internal
4408  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4409  * @brief API to get Model ID from handle.
4410  *
4411  * @since_tizen 6.0
4412  * @privlevel platform
4413  */
4414 int bt_mesh_model_get_id(bt_mesh_model_h model,
4415                 bt_mesh_model_id_s *model_id);
4416
4417 /**
4418  * @internal
4419  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4420  * @brief Get Network instance in which node is contained.
4421  *
4422  * @since_tizen 6.0
4423  * @privlevel platform
4424  */
4425 int bt_mesh_node_get_network(bt_mesh_node_h node,
4426                 bt_mesh_network_h *netkwork);
4427
4428 /**
4429  * @internal
4430  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4431  * @brief Get node instance in which element is contained.
4432  *
4433  * @since_tizen 6.0
4434  * @privlevel platform
4435  */
4436 int bt_mesh_element_get_node(bt_mesh_element_h element,
4437                 bt_mesh_node_h *node);
4438
4439 /**
4440  * @internal
4441  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4442  * @brief Get element instance in which model is contained.
4443  *
4444  * @since_tizen 6.0
4445  * @privlevel platform
4446  */
4447 int bt_mesh_model_get_element(bt_mesh_model_h model,
4448                 bt_mesh_element_h *element);
4449
4450 /**
4451  * @internal
4452  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4453  * @brief Get Network instance in which node is contained.
4454  *
4455  * @since_tizen 6.0
4456  * @privlevel platform
4457  */
4458 int bt_mesh_appkey_get_netkey(bt_mesh_appkey_h appkey,
4459                 bt_mesh_netkey_h *netkey);
4460
4461 /**
4462  * @internal
4463  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4464  * @brief Call to create a fresh Local Mesh Provisioner.
4465  * Each Mesh Network will be characterisized
4466  * by only one Mesh Provisioner. Mesh Provisioner will
4467  * contain a Mesh Node which be called "local node".
4468  * CAPI user(application) can create multiple Mesh Network.
4469  * Each network will have a unique Mesh Provisioner
4470  *
4471  * @param: in: config_client, local Mesh Provisioner node
4472  * @param: in: network_name, Mesh Network user friendly Name
4473  * @param: out: token, The token parameter is a hexadecimal string
4474  * of 8 bytes has been assigned to
4475  * the application when it first got provisioned/joined mesh.
4476  * order to authenticate itself and attach to the network as a mesh node.
4477  * @param: out: network, created Mesh Network instance
4478  *
4479  * Note: Once the Mesh Network is successfully created
4480  * OR the 'local Node' is attached, it is *NOT* allowed to
4481  * change Local Node Hierarchy (Add/Delete Element(s), Add/Delete Model(s) etc.)
4482  *
4483  * @since_tizen 6.0
4484  * @privlevel platform
4485  */
4486 int bt_mesh_network_create(bt_mesh_node_h config_client,
4487                 const char *network_name,
4488                         bt_mesh_network_h *network,
4489                                 char **token);
4490
4491 /**
4492  * @internal
4493  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4494  * @brief Call to load a previously created Local Mesh Provisioner.
4495  * Each Mesh Network will be characterisized
4496  * by only one Mesh Provisioner. Mesh Provisioner will contain a
4497  * Mesh Config Node which be called "local node".
4498  * CAPI user(application) can create multiple Mesh Network.
4499  * Each network will have a unique Mesh Provisioner
4500  *
4501  * @param: in: token, The token parameter is a 8 byte hexadecimal
4502  * string that has been assigned to the application when it first
4503  * got provisioned/joined mesh. The API will use the token to
4504  * authenticate itself and attach to the network as a mesh node.
4505  * Application should use a valid token to authenticate itself
4506  * as a Mesh Network Provisioner.
4507  * @param: out: network, created Mesh Network instance
4508  *
4509  * Note: Once the Mesh Network is successfully created OR the
4510  * 'local Node' is attached,
4511  * it is *NOT* allowed to change Local Node Hierarchy
4512  * (Add/Delete Element(s), Add/Delete Model(s) etc.)
4513  *
4514  * @see bt_mesh_network_create
4515  * @since_tizen 6.0
4516  * @privlevel platform
4517  */
4518 int bt_mesh_network_load(const char *token,
4519                 bt_mesh_network_h *network);
4520
4521 /**
4522  * @internal
4523  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4524  * @brief Set Mesh Network's user fiendly name.
4525  *
4526  * @see bt_mesh_network_create
4527  * @since_tizen 6.0
4528  * @privlevel platform
4529  */
4530 int bt_mesh_network_set_name(bt_mesh_network_h network,
4531                 const char *network_name);
4532
4533 /**
4534  * @internal
4535  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4536  * @brief Get Mesh Network's user fiendly name.
4537  *
4538  * @see bt_mesh_network_create
4539  * @since_tizen 6.0
4540  * @privlevel platform
4541  */
4542 int bt_mesh_network_get_name(bt_mesh_network_h network,
4543                 char **network_name);
4544
4545 /**
4546  * @internal
4547  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4548  * @brief Call to create and associate a mesh Network Key to Mesh Network
4549  *
4550  * @see bt_mesh_network_create
4551  * @since_tizen 6.0
4552  * @privlevel platform
4553  */
4554 int bt_mesh_network_add_netkey(bt_mesh_network_h network,
4555                 bt_mesh_netkey_h *netkey);
4556
4557 /**
4558  * @internal
4559  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4560  * @brief Get all NetKey(s) attached to the Local Network.
4561  *
4562  * @see bt_mesh_network_create
4563  * @see bt_mesh_network_add_netkey
4564  * @since_tizen 6.0
4565  * @privlevel platform
4566  */
4567 int bt_mesh_network_foreach_netkeys(bt_mesh_network_h network,
4568                 bt_mesh_network_netkey_info_cb callback,
4569                         void *user_data);
4570
4571 /**
4572  * @internal
4573  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4574  * @brief Get global Netkey index from NetKey instance
4575  *
4576  * @see bt_mesh_network_add_netkey
4577  * @since_tizen 6.0
4578  * @privlevel platform
4579  */
4580 int bt_mesh_netkey_get_index(bt_mesh_netkey_h netkey,
4581                 uint16_t *index);
4582
4583 /**
4584  * @internal
4585  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4586  * @brief Call to update a mesh Network Key.
4587  *
4588  * @see bt_mesh_network_add_netkey
4589  * @since_tizen 6.0
4590  * @privlevel platform
4591  */
4592 int bt_mesh_netkey_update(bt_mesh_netkey_h netkey);
4593
4594 /**
4595  * @internal
4596  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4597  * @brief Call to delete a mesh Network Key.
4598  *
4599  * @remarks It is not allowed to destroy a netkey if it is already
4600  * added to any of nodes in the Mesh Network
4601  *
4602  * @see bt_mesh_network_add_netkey
4603  * @since_tizen 6.0
4604  * @privlevel platform
4605  */
4606 int bt_mesh_netkey_delete(bt_mesh_netkey_h netkey);
4607
4608 /**
4609  * @internal
4610  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4611  * @brief Call to create & associate a Application Key to a Network Key
4612  *
4613  * @since_tizen 6.0
4614  * @privlevel platform
4615  */
4616 int bt_mesh_netkey_add_appkey(bt_mesh_netkey_h netkey,
4617                 bt_mesh_appkey_h *appkey);
4618
4619 /**
4620  * @internal
4621  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4622  * @brief Get all appkeys associated with a NetKey.
4623  *
4624  * @see bt_mesh_netkey_add_appkey
4625  * @since_tizen 6.0
4626  * @privlevel platform
4627  */
4628 int bt_mesh_netkey_foreach_appkeys(bt_mesh_netkey_h netkey,
4629                 bt_mesh_appkey_info_cb callback,
4630                         void *user_data);
4631
4632 /**
4633  * @internal
4634  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4635  * @brief Get global AppKey index from AppKey instance.
4636  *
4637  * @see bt_mesh_netkey_add_appkey
4638  * @since_tizen 6.0
4639  * @privlevel platform
4640  */
4641 int bt_mesh_appkey_get_index(bt_mesh_appkey_h netkey,
4642                 uint16_t *index);
4643
4644 /**
4645  * @internal
4646  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4647  * @brief Call to update a mesh Network Key.
4648  *
4649  * @see bt_mesh_netkey_add_appkey
4650  * @since_tizen 6.0
4651  * @privlevel platform
4652  */
4653 int bt_mesh_appkey_update(bt_mesh_appkey_h appkey);
4654
4655 /**
4656  * @internal
4657  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4658  * @brief Call to delete a mesh Application Key.
4659  *
4660  * @remarks It is not allowed to destroy an AppKey if it is already
4661  * added to any of nodes in the Mesh Network
4662  *
4663  * @see bt_mesh_netkey_add_appkey
4664  * @since_tizen 6.0
4665  * @privlevel platform
4666  */
4667 int bt_mesh_appkey_delete(bt_mesh_appkey_h appkey);
4668
4669 /**
4670  * @internal
4671  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4672  * @brief Call to get all devices attached to the network.
4673  * Node handle along with its primary unicast address will be returned
4674  *
4675  * @since_tizen 6.0
4676  * @privlevel platform
4677  */
4678 int bt_mesh_network_foreach_devices(bt_mesh_network_h network,
4679                 bt_mesh_network_device_info_cb callback,
4680                         void *user_data);
4681
4682 /**
4683  * @internal
4684  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4685  * @brief Call to get primary unicast address of the node from its handle
4686  *
4687  * @since_tizen 6.0
4688  * @privlevel platform
4689  */
4690 int bt_mesh_node_get_primary_address(bt_mesh_node_h node,
4691                 uint16_t *primary_address);
4692
4693 /**
4694  * @internal
4695  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4696  * @brief Find each element present in a node
4697  *
4698  * @since_tizen 6.0
4699  * @privlevel platform
4700  */
4701 int bt_mesh_node_foreach_element(bt_mesh_node_h node,
4702                 bt_mesh_node_element_info_cb callback,
4703                         void *user_data);
4704
4705 /**
4706  * @internal
4707  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4708  * @brief Find each models present in an element
4709  *
4710  * @since_tizen 6.0
4711  * @privlevel platform
4712  */
4713 int bt_mesh_element_foreach_models(bt_mesh_element_h element,
4714                 bt_mesh_element_model_info_cb callback,
4715                         void *user_data);
4716
4717
4718 /**
4719  * @internal
4720  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4721  * @brief Async call to discover unprovisioned device.
4722  * Each unprovisioned device will advertise itself with a unique Device UUID
4723  *
4724  * @remarks scan result will be NULL when scan state is started or finished.
4725  * scan result is valid only when scan state is 'device found'
4726  *
4727  * @see bt_mesh_scanning_state_e
4728  * @see bt_mesh_network_scan_unprovisioned_device_result_cb
4729  * @since_tizen 6.0
4730  * @privlevel platform
4731  */
4732 int bt_mesh_network_unprovisioned_device_scan(bt_mesh_network_h network,
4733                 bt_mesh_scan_params_s *scan_params,
4734                         bt_mesh_network_scan_unprovisioned_device_result_cb callback,
4735                                 void *user_data);
4736
4737 /**
4738  * @internal
4739  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4740  * @brief Stop discovring unprovisioned device.
4741  *
4742  * @since_tizen 6.0
4743  * @privlevel platform
4744  */
4745 int bt_mesh_stop_unprovisioned_device_scan(bt_mesh_network_h network);
4746
4747 /**
4748  * @internal
4749  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4750  * @brief Set capabilities of a provisioner application.
4751  * Provisioning capabilities will as per Input/Output capabilities of the
4752  * device/application creating the provisioner.
4753  * For e.g, if device/application has Wi-Fi/NFC connectivity and can
4754  * procure Provisioning keys Out-Of-Band over Wi-Fi network/Remote Web URL/NFC Connectivity,
4755  * then following capabilities can be set to true, otherwise left false
4756  *      a/ bool public_oob b/ bool static_oob
4757  * Above capabilities indicate whether, Public Key for ECC exchange & Static Key for
4758  * authentication can be procured out-of-band or not
4759  *
4760  * @param: in: network Mesh network instance which represents a provisioner node
4761  * @param: in: capabilities Provisioner capabilities structure
4762  *
4763  * @remarks: A single provisioner network can provision multiple remote devices.
4764  * During security provisioning, capabilities are selected  *By Provisioner*
4765  * based on combination of supported capabilities of provisioner & remote nodes together.
4766  *
4767  * @remarks: A mesh network instance represents a single Mesh provisioning node
4768  * & multiple remote provisioned nodes.
4769  * Therefore, setting capabilities one time, for a network or a provisioner node is sufficient.
4770  * Normally, Input/output capabilities do not change over time for a device
4771  * or an application. Incase, it is changed, application is free to refresh the
4772  * capabilities of the Provisioner at any point of time.
4773  * The next provisioning process will automatically consider the refreshed capabilities.
4774  * @remarks: Capabilities can be set one time after local provisioner node is attached to a network.
4775  *
4776  * @see: bt_mesh_provisioner_capabilities_s structure
4777  * @see: bt_mesh_network_create()
4778  * @since_tizen 6.0
4779  * @privlevel platform
4780  */
4781 int bt_mesh_network_set_provisioning_capabilities(
4782                 bt_mesh_network_h network,
4783                         bt_mesh_provisioner_capabilities_s *capabilities);
4784
4785 /**
4786  * @internal
4787  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4788  * @brief Async call to provision a device to the Mesh Network
4789  *
4790  * @remarks: In Tizen, only one provisioning process is allowed,
4791  * irrespective of Provisioner or node role.
4792  * @since_tizen 6.0
4793  * @privlevel platform
4794  */
4795 int bt_mesh_network_provision_device(bt_mesh_network_h network,
4796                 const char *dev_uuid,
4797                         bt_mesh_network_device_provision_cb callback,
4798                                 void *user_data);
4799
4800 /**
4801  * @internal
4802  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4803  * @brief Registers a callback that will be invoked when remote
4804  * device requests authentication, during the provisioning process.
4805  *
4806  * @pre Either bt_mesh_network_provision_device() in case of Provisioner role
4807  * or bt_mesh_node_network_join() in case of Node role must be
4808  * called (Node role API is not defined yet)
4809  *
4810  * @param[in] callback  callback function which is set, for receiving
4811  * authentication request during provisioning process.
4812  * @param[in] user_data data from application which will be provided in callback.
4813  *
4814  * @remarks: This method is designed common for both Provisioner & Node role.
4815  * @remarks: This callback is not invoked without the local device initiating the process
4816  * of either Provisioning(in case of local provisioner) or
4817  * Joining Network(in case of local node role).
4818  * Therefore, application will be completely aware, when the callback is invoked.
4819  * @remarks: In Tizen, only one provisioning process is allowed, irrespective of Provisioner or node role.
4820  * Therefore, when the callback is invoked, aplication exactly knows following
4821  *   a/ whether the process is for provisioner role trying to provision a remote device
4822  *   b/ Or process if for local node role, which is inviting remote provisioners
4823  * to join itself to a Mesh Network
4824  *
4825  * @see bt_network_provision_device()
4826  * @since_tizen 6.0
4827  * @privlevel platform
4828  */
4829 int bt_mesh_authentication_set_request_cb(
4830                 bt_mesh_authentication_request_cb callback,
4831                         void *user_data);
4832
4833 /**
4834  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4835  * @brief Un-registers a callback that will be invoked when
4836  * remote device requests authentication,during the provisioning process
4837  *
4838  * @param[in] callback  callback function to be set when
4839  * authentication request is received.
4840  *
4841  * @remarks: This method is designed common for both Provisioner & Node role.
4842  * @see bt_mesh_authentication_set_request_cb()
4843  * @see bt_mesh_authentication_request_cb()
4844  * @since_tizen 6.0
4845  * @privlevel platform
4846  */
4847 int bt_mesh_authentication_unset_request_cb(
4848                 bt_mesh_authentication_request_cb callback);
4849
4850 /**
4851  * @internal
4852  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4853  * @brief  API to reply authentication request.
4854  * @remarks  This function can be called by application when remote
4855  * device requests authentication due to either of following process
4856  * a/ Local provisioner role trying to provision a remote device
4857  * b/ Local node role, inviting remote provisioners to join itself to a Mesh Network
4858  * @param[in]  auth_type   Specific authentiation type, for which reply is being sent
4859  * @param[in]  value       Reply string corresponding to authentication type
4860  * @param[in]  auth_reply  Accept or cancel ongoing provisioning process
4861  * @pre  This function can only be called when application receieves authentication
4862  *       callback bt_mesh_authentication_request_cb
4863  * @remarks: value string is valid, when autnetication type is of following
4864  *           a/ BT_MESH_AUTH_REQ_ALPHANUMERIC_INPUT
4865  *           b/ BT_MESH_AUTH_REQ_NUMERIC_INPUT
4866  *           c/ BT_MESH_AUTH_REQ_BLINK_COUNT_INPUT
4867  *           d/ BT_MESH_AUTH_REQ_BEEP_COUNT_INPUT
4868  *           e/ BT_MESH_AUTH_REQ_VIBRATE_COUNT_INPUT
4869  *           f/ BT_MESH_AUTH_REQ_OOB_PUBLIC_KEY_INPUT
4870  *           g/ BT_MESH_AUTH_REQ_OOB_STATIC_KEY_INPUT
4871  *
4872  * @remarks: This method is designed common for both Provisioner & Node role.
4873  * @see  bt_mesh_authentication_set_request_cb()
4874  * @see  bt_mesh_authentication_request_cb()
4875  * @see bt_mesh_authentication_type_e
4876  * @since_tizen 6.0
4877  * @privlevel platform
4878  */
4879 int bt_mesh_authentication_reply(
4880                 bt_mesh_authentication_type_e auth_type,
4881                         const char *value,  bool auth_reply);
4882
4883 /**
4884  * @internal
4885  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4886  * @brief Async call to identify the newly provisioned device
4887  *
4888  * @remarks: After provisioning is done, device must be
4889  * discovered first of all in order to
4890  * use it. If device is successfully discovered, node handle
4891  * will be returned in the callback.
4892  * @see bt_mesh_network_provision_device
4893  * @since_tizen 6.0
4894  * @privlevel platform
4895  */
4896 int bt_mesh_network_discover_node(bt_mesh_network_h network,
4897                 const char *dev_uuid,
4898                         bt_mesh_node_discover_status_cb callback,
4899                                 void *user_data);
4900
4901 /**
4902  * @internal
4903  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4904  * @brief Async call to browse the features of a node.
4905  * Features of the node are returned in callback
4906  *
4907  * @see bt_mesh_network_provision_device
4908  * @see bt_mesh_network_discover_node
4909  * @since_tizen 6.0
4910  * @privlevel platform
4911  */
4912 int bt_mesh_node_get_features(bt_mesh_node_h node,
4913                 bt_mesh_node_features_cb callback,
4914                         void *user_data);
4915
4916 /**
4917  * @internal
4918  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4919  * @brief Async call to Add/Update/Delete a NetKey to a node
4920  *
4921  * @see bt_mesh_network_add_netkey
4922  * @since_tizen 6.0
4923  * @privlevel platform
4924  */
4925 int bt_mesh_node_configure_netkey(bt_mesh_node_h node,
4926                 bt_mesh_node_key_configuration_e netkey_op,
4927                         bt_mesh_netkey_h netkey,
4928                                 bt_mesh_netkey_status_cb callback,
4929                                         void *user_data);
4930
4931 /**
4932  * @internal
4933  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4934  * @brief Async call to add/update/delete an Application to a node
4935  *
4936  * @see bt_mesh_netkey_add_appkey
4937  * @since_tizen 6.0
4938  * @privlevel platform
4939  */
4940 int bt_mesh_node_configure_appkey(bt_mesh_node_h node,
4941                 bt_mesh_node_key_configuration_e appkey_op,
4942                         bt_mesh_appkey_h appkey,
4943                                 bt_mesh_appkey_status_cb callback,
4944                                         void *user_data);
4945
4946 /**
4947  * @internal
4948  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4949  * @brief Find all NetKey(s) attached to a node
4950  *
4951  * @see bt_mesh_node_configure_netkey
4952  * @since_tizen 6.0
4953  * @privlevel platform
4954  */
4955 int bt_mesh_node_foreach_netkeys(bt_mesh_node_h node,
4956                 bt_mesh_node_netkey_info_cb callback,
4957                         void *user_data);
4958
4959 /**
4960  * @internal
4961  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4962  * @brief Find all AppKey(s) bound to a NetKey in a node
4963  *
4964  * @see bt_mesh_node_configure_appkey
4965  * @since_tizen 6.0
4966  * @privlevel platform
4967  */
4968 int bt_mesh_node_foreach_appkeys(bt_mesh_node_h node,
4969                 bt_mesh_netkey_h netkey,
4970                         bt_mesh_node_appkey_info_cb callback,
4971                                 void *user_data);
4972
4973 /**
4974  * @internal
4975  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4976  * @brief Query TTL set to a node in the network
4977  *
4978  * @since_tizen 6.0
4979  * @privlevel platform
4980  */
4981 int bt_mesh_node_get_ttl(bt_mesh_node_h node,
4982                 bt_mesh_node_ttl_cb callback,
4983                         void *user_data);
4984
4985 /**
4986  * @internal
4987  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
4988  * @brief Query TTL set to a node in the network
4989  *
4990  * @since_tizen 6.0
4991  * @privlevel platform
4992  */
4993 int bt_mesh_node_set_ttl(bt_mesh_node_h node, uint8_t ttl,
4994                 bt_mesh_node_ttl_cb callback,
4995                         void *user_data);
4996
4997 /**
4998  * @internal
4999  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
5000  * @brief Async call to bind a locally created application key
5001  * to a Model of a node
5002  *
5003  * @since_tizen 6.0
5004  * @privlevel platform
5005  */
5006 int bt_mesh_model_bind_appkey(bt_mesh_model_h model,
5007                 bt_mesh_appkey_h appkey, bt_mesh_model_bind_cb callback,
5008                         void *user_data);
5009
5010 /**
5011  * @internal
5012  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
5013  * @brief Async call to Unbind a locally created application key
5014  * to a Model of a node
5015  *
5016  * @see bt_mesh_model_bind_appkey
5017  * @since_tizen 6.0
5018  * @privlevel platform
5019  */
5020 int bt_mesh_model_unbind_appkey(bt_mesh_model_h model,
5021                 bt_mesh_appkey_h appkey,
5022                         bt_mesh_model_unbind_cb callback,
5023                                 void *user_data);
5024
5025 /**
5026  * @internal
5027  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
5028  * @brief Async call to find all AppKey(s) bound to a model of a node
5029  *
5030  * @see bt_mesh_model_bind_appkey
5031  * @since_tizen 6.0
5032  * @privlevel platform
5033  */
5034 int bt_mesh_model_get_appkey_list(bt_mesh_model_h model,
5035         bt_mesh_model_appkey_list_cb callback,
5036                         void *user_data);
5037
5038 /**
5039  * @internal
5040  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
5041  * @brief Send message originated by a local mesh model.
5042  *
5043  * @param: in: model, model handle to which message to be sent
5044  * @param: in: appkey, appkey to encrypt mesh message
5045  * appkey must be valid for corresponding model, i.e
5046  * appkey must be bound to the model
5047  * @param: in: msg_params, opcode and the message to be sent
5048  * @param: in: callback, callback to be called for msg response
5049  *
5050  * @see bt_mesh_model_msg_params_s
5051  *
5052  * @since_tizen 6.0
5053  * @privlevel platform
5054  */
5055 int bt_mesh_model_send_msg(bt_mesh_model_h model,
5056         bt_mesh_appkey_h appkey, bt_mesh_model_msg_params_s *msg_params,
5057         bt_mesh_model_msg_cb callback, void *user_data);
5058
5059 /**
5060  * @internal
5061  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
5062  * @brief Send Group message originated by a local mesh model.
5063  *
5064  * @param: in: group, group handle to which message to be sent
5065  * @param: in: appkey, appkey to encrypt mesh message
5066  * appkey must be valid for corresponding model, i.e
5067  * appkey must be bound to the model
5068  * @param: in: msg_params, opcode and the message to be sent
5069  * @param: in: callback, callback to be called for msg response
5070  *
5071  * @see bt_mesh_model_msg_params_s
5072  *
5073  * @since_tizen 6.0
5074  * @privlevel platform
5075  */
5076 int bt_mesh_group_send_msg(bt_mesh_group_h group,
5077         bt_mesh_appkey_h appkey, bt_mesh_model_msg_params_s *msg_params,
5078         bt_mesh_model_msg_cb callback, void *user_data);
5079
5080 /**
5081  * @internal
5082  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
5083  * @brief Create a Mesh group with a given group address in the Local Network
5084  *
5085  * @since_tizen 6.0
5086  * @privlevel platform
5087  */
5088 int bt_mesh_network_create_group(bt_mesh_network_h network,
5089                 uint16_t group_addr,
5090                         bt_mesh_group_h *group);
5091
5092 /**
5093  * @internal
5094  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
5095  * @brief Create a Mesh Virtual group in the Local Network.
5096  *
5097  * @remarks Virtual group label (128-bit UUID) is internally managed by Framework.
5098  * @since_tizen 6.0
5099  * @privlevel platform
5100  */
5101 int bt_mesh_network_create_virtual_group(bt_mesh_network_h network,
5102                 bt_mesh_group_h *group);
5103
5104 /**
5105  * @internal
5106  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
5107  * @brief Remove a create Mesh group in the Local Network.
5108  *
5109  * @see bt_mesh_network_create_group
5110  * @see bt_mesh_network_create_virtual_group
5111  * @since_tizen 6.0
5112  * @privlevel platform
5113  */
5114 int bt_mesh_network_remove_group(bt_mesh_group_h group);
5115
5116 /**
5117  * @internal
5118  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
5119  * @brief Find all Mesh group(s), that are created in the Local Network.
5120  *
5121  * @remarks Group handles will be returned for each created group.
5122  * @see bt_mesh_network_create_group
5123  * @see bt_mesh_network_create_virtual_group
5124  * @since_tizen 6.0
5125  * @privlevel platform
5126  */
5127 int bt_mesh_network_foreach_groups(bt_mesh_network_h network,
5128                 bt_mesh_network_group_info_cb callback,
5129                         void *user_data);
5130
5131 /**
5132  * @internal
5133  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
5134  * @brief Subscription Add/Delete/Overwrite request to a Model of an element.
5135  *
5136  * @param: in: model_op: Add/Delete/Overwrite
5137  * @param: in: model Model on which subscription operation will be applied
5138  * @param: in: group Mesh Group handle.
5139  * @param: in: callback result of model subscription operation
5140  * request from remote node
5141  * @param: in: user_data async callback data
5142  *
5143  * @see bt_mesh_network_create_group
5144  * @since_tizen 6.0
5145  * @privlevel platform
5146  */
5147 int bt_mesh_model_configure_group_subscription(
5148                 bt_mesh_model_subscription_op_e model_op,
5149                         bt_mesh_model_h model, bt_mesh_group_h group,
5150                                 bt_mesh_model_subscription_op_cb callback,
5151                                         void *user_data);
5152
5153 /**
5154  * @internal
5155  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
5156  * @brief Subscription Add/Delete/Overwrite request of a
5157  * Virtual Group, to Model of an element.
5158  *
5159  * @param: in: model_op: Add/Delete/Overwrite
5160  * @param: in: model Model on which subscription operation will be applied
5161  * @param: in: group Mesh Group handle.
5162  * @param: in: callback result of model subscription operation
5163  * request from remote node
5164  * @param: in: user_data async callback data
5165  *
5166  * @see bt_mesh_network_create_virtual_group
5167  * @since_tizen 6.0
5168  * @privlevel platform
5169  */
5170 int bt_mesh_model_configure_virtual_group_subscription(
5171                 bt_mesh_model_subscription_op_e model_op,
5172                         bt_mesh_model_h model, bt_mesh_group_h group,
5173                                 bt_mesh_model_subscription_op_cb callback,
5174                                         void *user_data);
5175
5176
5177 /**
5178  * @internal
5179  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
5180  * @brief Find all Subscription list of a model in a node.
5181  * A List of all groups handles will be returned in callback, if success
5182  *
5183  * @remarks Group handles will be returned for each created group.
5184  * @since_tizen 6.0
5185  * @privlevel platform
5186  */
5187 int bt_mesh_model_get_subscription_list(bt_mesh_model_h model,
5188                 bt_mesh_model_subscription_list_cb callback,
5189                         void *user_data);
5190
5191 /**
5192  * @internal
5193  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
5194  * @brief Add a publiation to a Model of a node.
5195  *
5196  * @param: in: model Model which will generate the Publication message
5197  * @param: in: appkey application key handle which will be used to
5198  * encrypt publication message
5199  * @param: in: group Mesh Group handle.
5200  * @param: in: param Model Publication Parameters
5201  * @param: in: callback result of model publication set request,
5202  * from remote node
5203  * @param: in: user_data async callback data
5204  *
5205  * @since_tizen 6.0
5206  * @privlevel platform
5207  */
5208 int bt_mesh_model_set_publication(bt_mesh_model_h model,
5209                 bt_mesh_appkey_h appkey, bt_mesh_group_h group,
5210                         bt_mesh_model_pub_params_s *params,
5211                                 bt_mesh_model_publication_status_cb callback,
5212                                         void *user_data);
5213
5214 /**
5215  * @internal
5216  * @ingroup CAPI_NETWORK_BLUETOOTH_MESH_MODULE
5217  * @brief Find Publication, set in model of a node, attached to a Network.
5218  * Publication group handle will be returned in callback, if success
5219  *
5220  * @since_tizen 6.0
5221  * @privlevel platform
5222  */
5223 int bt_mesh_model_get_publication(bt_mesh_model_h model,
5224                 bt_mesh_model_publication_status_cb callback,
5225                         void *user_data);
5226
5227 /**
5228  * @}
5229  */
5230
5231
5232 #ifdef __cplusplus
5233 }
5234 #endif /* __cplusplus */
5235
5236 #endif /* __TIZEN_NETWORK_BLUETOOTH_INTERNAL_H__ */