Merge the code from tizen_2.4
[platform/core/connectivity/bluetooth-frwk.git] / bt-service / include / bt-service-device.h
1 /*
2  * Bluetooth-frwk
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact:  Hocheol Seo <hocheol.seo@samsung.com>
7  *               Girishashok Joshi <girish.joshi@samsung.com>
8  *               Chanyeol Park <chanyeol.park@samsung.com>
9  *
10  * Licensed under the Apache License, Version 2.0 (the "License");
11  * you may not use this file except in compliance with the License.
12  * You may obtain a copy of the License at
13  *
14  *              http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing, software
17  * distributed under the License is distributed on an "AS IS" BASIS,
18  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  * See the License for the specific language governing permissions and
20  * limitations under the License.
21  *
22  */
23
24
25 #ifndef _BT_SERVICE_DEVICE_H_
26 #define _BT_SERVICE_DEVICE_H_
27
28 #include <glib.h>
29 #include <sys/types.h>
30 #include "bluetooth-api.h"
31
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35
36 int _bt_bond_device(int request_id,
37                 bluetooth_device_address_t *device_address,
38                 unsigned short conn_type, GArray **out_param1);
39
40 int _bt_cancel_bonding(void);
41
42 int _bt_passkey_reply(const char *passkey, gboolean authentication_reply);
43
44 int _bt_passkey_confirmation_reply(gboolean confirmation_reply);
45
46 int _bt_unbond_device(int request_id,
47                         bluetooth_device_address_t *device_address,
48                         GArray **out_param1);
49
50 int _bt_cancel_search_device(void);
51
52 int _bt_search_device(int request_id,
53                         bluetooth_device_address_t *device_address);
54
55 int _bt_set_alias(bluetooth_device_address_t *device_address,
56                                       const char *alias);
57
58 int _bt_set_authorization(bluetooth_device_address_t *device_address,
59                                       gboolean authorize);
60
61 int _bt_is_gatt_connected(bluetooth_device_address_t *device_address,
62                         gboolean *is_connected);
63
64 int _bt_is_device_connected(bluetooth_device_address_t *device_address,
65                         int connection_type, gboolean *is_connected);
66
67 int _bt_get_connected_link(bluetooth_device_address_t *device_address,
68                         bluetooth_connected_link_t *connected);
69
70 int _bt_set_pin_code(bluetooth_device_address_t *device_address,
71                         bluetooth_device_pin_code_t *pin_code);
72
73 int _bt_unset_pin_code(bluetooth_device_address_t *device_address);
74
75 int _bt_get_device_pin_code(const char *address, char *pin_code);
76
77 gboolean _bt_is_device_creating(void);
78
79 void _bt_set_autopair_status_in_bonding_info(gboolean is_autopair);
80
81 bt_remote_dev_info_t *_bt_get_remote_device_info(char *address);
82
83 char *_bt_get_bonded_device_name(char *address);
84
85 gboolean _bt_is_bonding_device_address(const char *address);
86
87 int _bt_connect_le_device(int request_id,
88                 const bluetooth_device_address_t *bd_addr,
89                 gboolean auto_connect);
90
91 int _bt_disconnect_le_device(int request_id,
92                 const bluetooth_device_address_t *bd_addr);
93
94 int _bt_le_conn_update(unsigned char *device_address,
95                                 guint16 interval_min, guint16 interval_max,
96                                 guint16 latency, guint16 time_out);
97
98 int _bt_get_le_connection_parameter(bluetooth_le_connection_mode_t mode,
99                 bluetooth_le_connection_param_t *param);
100
101 int _bt_connect_profile(char *address, char *uuid,
102                                                 void *cb, gpointer func_data);
103
104 int _bt_disconnect_profile(char *address, char *uuid,
105                                                 void *cb, gpointer func_data);
106 int _bt_connect_le_ipsp_device(const bluetooth_device_address_t *bd_addr);
107
108 int _bt_disconnect_le_ipsp_device(const bluetooth_device_address_t *bd_addr);
109
110
111 #ifdef __cplusplus
112 }
113 #endif /* __cplusplus */
114 #endif /*_BT_SERVICE_ADAPTER_H_*/
115