Code Sync [Tizen3.0]: Merged the tizen_2.4 Spin code to tizen.org
[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_unbond_device(int request_id,
43                         bluetooth_device_address_t *device_address,
44                         GArray **out_param1);
45
46 int _bt_cancel_search_device(void);
47
48 int _bt_search_device(int request_id,
49                         bluetooth_device_address_t *device_address);
50
51 int _bt_set_alias(bluetooth_device_address_t *device_address,
52                                       const char *alias);
53
54 int _bt_set_authorization(bluetooth_device_address_t *device_address,
55                                       gboolean authorize);
56
57 int _bt_is_gatt_connected(bluetooth_device_address_t *device_address,
58                         gboolean *is_connected);
59
60 int _bt_is_device_connected(bluetooth_device_address_t *device_address,
61                         int connection_type, gboolean *is_connected);
62
63 gboolean _bt_is_device_creating(void);
64
65 void _bt_set_autopair_status_in_bonding_info(gboolean is_autopair);
66
67 bt_remote_dev_info_t *_bt_get_remote_device_info(char *address);
68
69 gboolean _bt_is_bonding_device_address(const char *address);
70
71 int _bt_connect_le_device(const bluetooth_device_address_t *bd_addr, gboolean auto_connect);
72
73 int _bt_disconnect_le_device(const bluetooth_device_address_t *bd_addr);
74
75 int _bt_le_conn_update(unsigned char *device_address,
76                                 guint16 interval_min, guint16 interval_max,
77                                 guint16 latency, guint16 time_out);
78
79 int _bt_connect_profile(char *address, char *uuid,
80                                                 void *cb, gpointer func_data);
81
82 int _bt_disconnect_profile(char *address, char *uuid,
83                                                 void *cb, gpointer func_data);
84
85 #ifdef __cplusplus
86 }
87 #endif /* __cplusplus */
88 #endif /*_BT_SERVICE_ADAPTER_H_*/
89