Re-merge the codes
[framework/connectivity/bluetooth-frwk.git] / lib / bluetooth-gap-api.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 _BLUETOOTH_GAP_API_H_
26 #define _BLUETOOTH_GAP_API_H_
27
28
29 #include "bluetooth-api-common.h"
30 #include <pthread.h>
31
32 #ifdef __cplusplus
33 extern "C" {
34 #endif /* __cplusplus */
35
36
37 #define BLUETOOTH_CHANGE_STATUS_TIMEOUT 30
38 #define BLUETOOTH_BONDING_TIMEOUT               60
39
40 typedef struct device_list {
41         char str_address[20];
42         char str_name[50];
43         int class;
44         struct device_list *next;
45 } device_list_t;
46
47 typedef struct paired_info {
48         int total_count;
49 } paired_info_t;
50
51
52 void _bluetooth_internal_enabled_cb(void);
53 void _bluetooth_internal_disabled_cb(void);
54
55 void _bluetooth_internal_adapter_name_changed_cb(void);
56
57 void _bluetooth_internal_discovery_started_cb(void);
58 void _bluetooth_internal_discovery_completed_cb(void);
59 void _bluetooth_internal_bonding_created_cb(const char *bond_address,
60                                                 gpointer user_data);
61 void _bluetooth_internal_bonding_removed_cb(const char *bond_address,
62                                                 gpointer user_data);
63 void _bluetooth_internal_remote_device_found_cb(const char *address,
64                                 int rssi, unsigned int remote_class,
65                                 gboolean paired);
66 void _bluetooth_internal_remote_device_name_updated_cb(const char *address,
67                                                         const char *name,
68                                                         int rssi, unsigned int remote_class,
69                                                         gboolean paired);
70
71 int _bluetooth_is_headset_device(DBusGProxy *proxy);
72
73 #ifdef __cplusplus
74 }
75 #endif /* __cplusplus */
76
77 #endif /*_BLUETOOTH_GAP_API_H_*/