Remove old bt-service files
[platform/core/connectivity/bluetooth-frwk.git] / bt-service / services / include / bt-service-core-adapter.h
1 /*
2  * Copyright (c) 2015 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
3  *
4  * Contact:  Anupam Roy <anupam.r@samsung.com>
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  *              http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  */
19
20
21 #ifndef _BT_SERVICE_CORE_ADAPTER_H_
22 #define _BT_SERVICE_CORE_ADAPTER_H_
23
24 #include <sys/types.h>
25 #ifdef TIZEN_FEATURE_BT_OBEX
26 #include "alarm.h"
27 #endif
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31
32 typedef enum {
33         ADAPTER_DISCOVERY_STOPPED,
34         ADAPTER_DISCOVERY_STARTED,
35         ADAPTER_DISCOVERY_STARTING,
36         ADAPTER_DISCOVERY_STOPPING,
37 } bt_adapter_discovery_state_t;
38
39 typedef enum {
40         BT_DEACTIVATED,
41         BT_ACTIVATED,
42         BT_ACTIVATING,
43         BT_DEACTIVATING,
44         BT_TERMINATING,
45 } bt_status_t;
46
47 int _bt_enable_adapter(void);
48
49 int _bt_disable_adapter(void);
50
51 int _bt_reset_adapter(void);
52
53 void _bt_start_log_dump(const char *path);
54
55 int _bt_check_adapter(int *status);
56
57 int _bt_recover_adapter(void);
58
59 int _bt_start_discovery(unsigned short max_response,
60                 unsigned short duration, unsigned int cod_mask);
61
62 int _bt_start_custom_discovery(bt_discovery_role_type_t role);
63
64 int _bt_cancel_discovery(void);
65
66 void _bt_service_register_vconf_handler(void);
67
68 void _bt_service_unregister_vconf_handler(void);
69
70 gboolean _bt_is_discovering(void);
71
72 int _bt_stack_init(void);
73
74 int _bt_get_local_address(void);
75
76 int _bt_get_local_version(void);
77
78 int _bt_get_local_name(void);
79
80 int _bt_set_local_name(char *local_name);
81
82 int _bt_get_discoverable_mode(int *mode);
83
84 int _bt_get_timeout_value(int *timeout);
85
86 int _bt_set_discoverable_mode(int discoverable_mode, int timeout);
87
88 gboolean _bt_is_connectable(void);
89
90 int _bt_is_service_used(void);
91
92 int _bt_get_connectable(void);
93
94 int _bt_set_connectable(gboolean connectable);
95
96 int _bt_adapter_get_bonded_devices(void);
97
98 int _bt_get_profile_connected_devices(const char *profile_uuid);
99
100 int _bt_init_profiles();
101
102 int _bt_cleanup_profiles(void);
103
104 void _bt_adapter_set_status(bt_status_t status);
105
106 bt_status_t _bt_adapter_get_status(void);
107
108 void _bt_set_disabled(int result);
109
110 int _bt_set_adapter_request_state(int enable);
111
112 int _bt_set_le_request_state(int enable);
113
114 int _bt_get_energy_info(unsigned int *tx_time, unsigned int *rx_time,
115                                         unsigned int *idle_time, unsigned int *energy_used);
116
117 void _bt_adapter_start_enable_timer(void);
118
119 #ifdef __cplusplus
120 }
121 #endif /* __cplusplus */
122 #endif /*_BT_SERVICE_CORE_ADAPTER_H_*/
123