Merge "bt-api: Do not log the _bt_check_privilege() using macro" into tizen_3.0
[platform/core/connectivity/bluetooth-frwk.git] / bt-service-emul / include / bt-service-device.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
19 #ifndef _BT_SERVICE_DEVICE_H_
20 #define _BT_SERVICE_DEVICE_H_
21
22 #include <glib.h>
23 #include <sys/types.h>
24 #include "bluetooth-api.h"
25
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29
30 int _bt_bond_device(int request_id,
31                 bluetooth_device_address_t *device_address,
32                 unsigned short conn_type, GArray **out_param1);
33
34 int _bt_cancel_bonding(void);
35
36 int _bt_passkey_reply(const char *passkey, gboolean authentication_reply);
37
38 int _bt_passkey_confirmation_reply(gboolean confirmation_reply);
39
40 int _bt_unbond_device(int request_id,
41                         bluetooth_device_address_t *device_address,
42                         GArray **out_param1);
43
44 int _bt_cancel_search_device(void);
45
46 int _bt_search_device(int request_id,
47                         bluetooth_device_address_t *device_address);
48
49 int _bt_set_alias(bluetooth_device_address_t *device_address,
50                                       const char *alias);
51
52 int _bt_set_authorization(bluetooth_device_address_t *device_address,
53                                       gboolean authorize);
54
55 int _bt_is_gatt_connected(bluetooth_device_address_t *device_address,
56                         gboolean *is_connected);
57
58 int _bt_is_device_connected(bluetooth_device_address_t *device_address,
59                         int connection_type, gboolean *is_connected);
60
61 int _bt_get_connected_link(bluetooth_device_address_t *device_address,
62                         bluetooth_connected_link_t *connected);
63
64 int _bt_set_pin_code(bluetooth_device_address_t *device_address,
65                         bluetooth_device_pin_code_t *pin_code);
66
67 int _bt_unset_pin_code(bluetooth_device_address_t *device_address);
68
69 int _bt_get_device_pin_code(const char *address, char *pin_code);
70
71 gboolean _bt_is_device_creating(void);
72
73 int _bt_connect_le_device(int request_id,
74                 const bluetooth_device_address_t *bd_addr,
75                 gboolean auto_connect);
76
77 int _bt_disconnect_le_device(int request_id,
78                 const bluetooth_device_address_t *bd_addr);
79
80 int _bt_enable_rssi(bluetooth_device_address_t *bd_addr, int link_type,
81                 int low_threshold, int in_range_threshold, int high_threshold);
82
83 int _bt_get_rssi_strength(bluetooth_device_address_t *bd_addr,
84                 int link_type);
85
86 int _bt_le_conn_update(unsigned char *device_address,
87                                 guint16 interval_min, guint16 interval_max,
88                                 guint16 latency, guint16 time_out);
89
90 int _bt_get_le_connection_parameter(bluetooth_le_connection_mode_t mode,
91                 bluetooth_le_connection_param_t *param);
92
93 int _bt_connect_profile(char *address, char *uuid,
94                                                 void *cb, gpointer func_data);
95
96 int _bt_disconnect_profile(char *address, char *uuid,
97                                                 void *cb, gpointer func_data);
98 int _bt_connect_le_ipsp_device(const bluetooth_device_address_t *bd_addr);
99
100 int _bt_disconnect_le_ipsp_device(const bluetooth_device_address_t *bd_addr);
101
102
103 #ifdef __cplusplus
104 }
105 #endif /* __cplusplus */
106 #endif /*_BT_SERVICE_ADAPTER_H_*/
107