[Adapt] Implement Start and Stop Discovery
[platform/core/connectivity/bluetooth-frwk.git] / bt-service-adaptation / 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
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29
30 typedef enum {
31         ADAPTER_DISCOVERY_STOPPED,
32         ADAPTER_DISCOVERY_STARTED,
33         ADAPTER_DISCOVERY_STARTING,
34         ADAPTER_DISCOVERY_STOPPING,
35 } bt_adapter_discovery_state_t;
36
37 typedef enum {
38         BT_DEACTIVATED,
39         BT_ACTIVATED,
40         BT_ACTIVATING,
41         BT_DEACTIVATING,
42 } bt_status_t;
43
44 int _bt_enable_adapter(void);
45
46 int _bt_disable_adapter(void);
47
48 int _bt_start_discovery(void);
49
50 int _bt_cancel_discovery(void);
51
52 gboolean _bt_is_discovering(void);
53
54 int _bt_stack_init(void);
55
56 int _bt_get_local_address(void);
57
58 int _bt_get_local_version(void);
59
60 int _bt_get_local_name(void);
61
62 int _bt_get_discoverable_mode(int *mode);
63
64 int _bt_is_service_used(void);
65
66 #ifdef __cplusplus
67 }
68 #endif /* __cplusplus */
69 #endif /*_BT_SERVICE_CORE_ADAPTER_H_*/
70