Merge "Invoke HAL_DISCOVERY_STATE_STOPPED event once" into tizen
[platform/core/connectivity/bluetooth-frwk.git] / bt-oal / bluez_hal / src / bt-hal-adapter-le.h
1 /*
2  * BLUETOOOTH HAL
3  *
4  * Copyright (c) 2015 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact:  Anupam Roy <anupam.r@samsung.com>
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  *              http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  *
20  */
21
22 #ifndef _BT_HAL_ADAPTER_LE_H_
23 #define _BT_HAL_ADAPTER_LE_H_
24
25 #include <glib.h>
26 #include <sys/types.h>
27
28 #include <hardware/bt_gatt_server.h>
29
30 #include "bt-hal-event-receiver.h"
31
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35
36 #ifdef TIZEN_BT_HAL
37 int _bt_hal_le_enable(void);
38
39 int _bt_hal_le_disable(void);
40
41 void _bt_hal_set_filter_policy_param(int filter_policy);
42
43 int _bt_hal_set_le_static_random_address(uint8_t enable);
44 #endif
45
46 void _bt_hal_register_gatt_le_dbus_handler_cb(handle_stack_msg cb);
47
48 void _bt_hal_unregister_gatt_le_dbus_handler_cb();
49
50 gboolean _bt_hal_update_le_feature_support(const char *item, const char *value,
51                         bt_local_le_features_t *le_features);
52
53 gboolean _bt_hal_is_support_multi_adv(void);
54
55 int _bt_hal_get_available_adv_slot_id(bt_uuid_t *uuid, gboolean use_reserved_slot);
56
57 int _bt_hal_get_adv_slot_adv_handle(int slot_id);
58
59 void _bt_hal_unregister_adv_slot_owner(int slot_id);
60
61 gboolean _bt_hal_is_advertising_in_slot(int slot);
62
63 void _bt_hal_set_advertising_status(int slot_id, gboolean mode);
64
65 gboolean _bt_hal_is_advertising(void);
66
67 void _bt_hal_free_server_slot(int slot_id);
68
69 int _bt_hal_set_advertising_data(btgatt_adv_param_setup_t adv_param_setup);
70
71 int _bt_hal_set_advertising_params(int server_if, int min_interval,
72                 int max_interval, int adv_type,
73                 int chnl_map, int tx_power, int timeout_s);
74
75 int _bt_hal_enable_advertising(int server_if, int adv_slot_id, bool enable, bool is_multi_adv);
76
77 int _bt_hal_adapter_le_start_scan(void);
78
79 int _bt_hal_adapter_le_stop_scan(void);
80
81 int _bt_hal_adapter_le_set_scan_parameters(
82                 int scan_type, int scan_interval, int scan_window);
83
84 void _bt_hal_get_gatt_server_instance_initialized(int *instance);
85
86 int _bt_hal_le_init(void);
87 void _bt_hal_le_deinit(void);
88
89 int _bt_hal_adapter_le_set_privacy(uint8_t set_privacy);
90
91 int _bt_hal_adapter_le_set_white_list(bt_bdaddr_t *device_address, bt_dev_addr_type_t address_type, bool is_add);
92
93 int _bt_hal_adapter_le_set_manufacturer_data(bt_manufacturer_data_t *m_data);
94 #ifdef __cplusplus
95 }
96 #endif /* __cplusplus */
97 #endif /*_BT_HAL_ADAPTER_LE_H_*/