Fix the coding style errors (bt-service)
[platform/core/connectivity/bluetooth-frwk.git] / bt-service / include / bt-service-adapter.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_ADAPTER_H_
20 #define _BT_SERVICE_ADAPTER_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 typedef enum {
31         BT_DEACTIVATED,
32         BT_ACTIVATED,
33         BT_ACTIVATING,
34         BT_DEACTIVATING,
35 } bt_status_t;
36
37 typedef enum {
38         BT_LE_DEACTIVATED,
39         BT_LE_ACTIVATED,
40         BT_LE_ACTIVATING,
41         BT_LE_DEACTIVATING,
42 } bt_le_status_t;
43
44 int _bt_enable_adapter(void);
45
46 int _bt_disable_adapter(void);
47
48 int _bt_recover_adapter(void);
49
50 int _bt_enable_adapter_le(void);
51
52 int _bt_disable_adapter_le(void);
53
54 int _bt_reset_adapter(void);
55
56 int _bt_enable_core(void);
57
58 void _bt_handle_adapter_added(void);
59
60 void _bt_handle_adapter_removed(void);
61
62 int _bt_check_adapter(int *status);
63
64 void *_bt_get_adapter_agent(void);
65
66 void _bt_service_register_vconf_handler(void);
67
68 void _bt_service_unregister_vconf_handler(void);
69
70 void _bt_set_discovery_status(gboolean mode);
71
72 int _bt_get_local_address(bluetooth_device_address_t *local_address);
73
74 int _bt_get_local_version(bluetooth_version_t *local_version);
75
76 int _bt_get_local_name(bluetooth_device_name_t *local_name);
77
78 int _bt_set_local_name(char *local_name);
79
80 int _bt_is_service_used(char *service_uuid, gboolean *used);
81
82 int _bt_get_discoverable_mode(int *mode);
83
84 int _bt_set_discoverable_mode(int discoverable_mode, int timeout);
85
86 gboolean _bt_is_connectable(void);
87
88 int _bt_set_connectable(gboolean connectable);
89
90 int _bt_start_discovery(void);
91
92 int _bt_start_custom_discovery(bt_discovery_role_type_t role);
93
94 int _bt_cancel_discovery(void);
95
96 int _bt_get_bonded_devices(GArray **dev_list);
97
98 int _bt_get_bonded_device_info(bluetooth_device_address_t *device_address,
99                                 bluetooth_device_info_t *dev_info);
100
101 int _bt_get_timeout_value(int *timeout);
102
103 gboolean _bt_is_discovering(void);
104
105 int _bt_enable_rssi(bluetooth_device_address_t *bd_addr, int link_type,
106                 int low_threshold, int in_range_threshold, int high_threshold);
107
108 int _bt_get_rssi_strength(bluetooth_device_address_t *bd_addr,
109                 int link_type);
110
111 gboolean _bt_get_advertising_params(bluetooth_advertising_params_t *params);
112
113 gboolean _bt_get_cancel_by_user(void);
114
115 void _bt_set_cancel_by_user(gboolean value);
116
117 gboolean _bt_get_discovering_property(bt_discovery_role_type_t discovery_type);
118
119 unsigned int _bt_get_discoverable_timeout_property(void);
120
121 void _bt_adapter_set_status(bt_status_t status);
122
123 bt_status_t _bt_adapter_get_status(void);
124
125 void _bt_adapter_set_le_status(bt_le_status_t status);
126
127 bt_le_status_t _bt_adapter_get_le_status(void);
128
129 void _bt_adapter_start_enable_timer(void);
130
131 void _bt_adapter_start_le_enable_timer(void);
132
133 void _bt_set_disabled(int result);
134
135 void _bt_set_le_disabled(int result);
136
137 int _bt_set_le_privacy(gboolean set_privacy);
138
139 int _bt_set_manufacturer_data(bluetooth_manufacturer_data_t *m_data);
140
141 int __bt_disable_cb(void);
142
143 int _bt_get_enable_timer_id(void);
144
145 #ifdef __cplusplus
146 }
147 #endif /* __cplusplus */
148 #endif /*_BT_SERVICE_ADAPTER_H_*/
149