Apply tizen 3.0 based product patchsets
[platform/core/connectivity/bluetooth-frwk.git] / bt-service / 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 void _bt_set_autopair_status_in_bonding_info(gboolean is_autopair);
74
75 bt_remote_dev_info_t *_bt_get_remote_device_info(char *address);
76
77 bt_remote_dev_info_t *_bt_get_remote_device_info_by_object_path(const char *object_path);
78
79 char *_bt_get_bonded_device_name(char *address);
80
81 gboolean _bt_is_bonding_device_address(const char *address);
82
83 void _bt_pending_connect_le_device(void);
84
85 int _bt_connect_le_device(int req_id, const bluetooth_device_address_t *bd_addr,
86                 gboolean auto_connect);
87
88 int _bt_disconnect_le_device(int req_id,
89                 const bluetooth_device_address_t *bd_addr);
90
91 void _bt_add_le_connected_dev_info(const char *address);
92 void _bt_remove_le_connected_dev_info(const char *address);
93 int _bt_remove_all_le_conn_param_info(const char *sender);
94
95 int _bt_le_conn_update(const char *sender,
96                                 unsigned char *device_address,
97                                 float interval_min, float interval_max,
98                                 guint16 latency, guint16 time_out);
99
100 int _bt_get_le_connection_parameter(bluetooth_le_connection_mode_t mode,
101                 bluetooth_le_connection_param_t *param);
102
103 int _bt_connect_profile(char *address, char *uuid,
104                                                 void *cb, gpointer func_data);
105
106 int _bt_disconnect_all(char *address);
107
108 int _bt_disconnect_profile(char *address, char *uuid,
109                                                 void *cb, gpointer func_data);
110
111 int _bt_request_att_mtu(int request_id, bluetooth_device_address_t *device_address,
112                                                                 unsigned int mtu);
113
114 int _bt_get_att_mtu(bluetooth_device_address_t *device_address,
115                                                                 unsigned int *mtu);
116
117 int _bt_get_device_ida(bluetooth_device_address_t *device_address,
118                                                         bluetooth_device_address_t *id_address);
119
120 int _bt_set_trust_profile(bluetooth_device_address_t *bd_addr,
121                 bluetooth_trusted_profile_t profile, gboolean trust);
122
123 int _bt_get_trust_profile(bluetooth_device_address_t *bd_addr,
124                 bluetooth_trusted_profile_t profile, guint *trust);
125
126 int _bt_set_restrict_profile(bluetooth_device_address_t *bd_addr,
127                 bluetooth_restricted_profile_t profile, gboolean restricted);
128
129 int _bt_get_restrict_profile(bluetooth_device_address_t *bd_addr,
130                 bluetooth_restricted_profile_t profile, guint *restricted);
131
132 bluetooth_trusted_profile_t _bt_get_trusted_profile_enum(const char *uuid);
133
134 int _bt_connect_le_ipsp_device(const bluetooth_device_address_t *bd_addr);
135
136 int _bt_disconnect_le_ipsp_device(const bluetooth_device_address_t *bd_addr);
137
138
139 #ifdef __cplusplus
140 }
141 #endif /* __cplusplus */
142 #endif /*_BT_SERVICE_ADAPTER_H_*/
143