Merge "bt-api: Do not log the _bt_check_privilege() using macro" into tizen_3.0
[platform/core/connectivity/bluetooth-frwk.git] / bt-service-emul / 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_service_register_vconf_handler(void);
65
66 void _bt_service_unregister_vconf_handler(void);
67
68 void _bt_set_discovery_status(gboolean mode);
69
70 int _bt_get_local_address(bluetooth_device_address_t *local_address);
71
72 int _bt_get_local_version(bluetooth_version_t *local_version);
73
74 int _bt_get_local_name(bluetooth_device_name_t *local_name);
75
76 int _bt_set_local_name(char *local_name);
77
78 int _bt_is_service_used(char *service_uuid, gboolean *used);
79
80 int _bt_get_discoverable_mode(int *mode);
81
82 int _bt_set_discoverable_mode(int discoverable_mode, int timeout);
83
84 gboolean _bt_is_connectable(void);
85
86 int _bt_set_connectable(gboolean connectable);
87
88 int _bt_start_discovery(void);
89
90 int _bt_start_custom_discovery(bt_discovery_role_type_t role);
91
92 int _bt_cancel_discovery(void);
93
94 int _bt_get_bonded_devices(GArray **dev_list);
95
96 int _bt_get_bonded_device_info(bluetooth_device_address_t *device_address,
97                                 bluetooth_device_info_t *dev_info);
98
99 int _bt_get_timeout_value(int *timeout);
100
101 gboolean _bt_is_discovering(void);
102
103 gboolean _bt_get_advertising_params(bluetooth_advertising_params_t *params);
104
105 gboolean _bt_get_cancel_by_user(void);
106
107 void _bt_set_cancel_by_user(gboolean value);
108
109 void _bt_adapter_set_status(bt_status_t status);
110
111 bt_status_t _bt_adapter_get_status(void);
112
113 void _bt_adapter_set_le_status(bt_le_status_t status);
114
115 bt_le_status_t _bt_adapter_get_le_status(void);
116
117 void _bt_adapter_start_enable_timer(void);
118
119 void _bt_adapter_start_le_enable_timer(void);
120
121 void _bt_set_disabled(int result);
122
123 void _bt_set_le_disabled(int result);
124
125 int _bt_set_le_privacy(gboolean set_privacy);
126
127 int _bt_set_manufacturer_data(bluetooth_manufacturer_data_t *m_data);
128
129 #ifdef __cplusplus
130 }
131 #endif /* __cplusplus */
132 #endif /*_BT_SERVICE_ADAPTER_H_*/
133