4 * Copyright (c) 2015 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Anupam Roy <anupam.r@samsung.com>
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
12 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 #ifndef _BT_HAL_ADAPTER_LE_H_
23 #define _BT_HAL_ADAPTER_LE_H_
26 #include <sys/types.h>
28 #include <hardware/bt_gatt_server.h>
30 #include "bt-hal-event-receiver.h"
37 int _bt_hal_le_enable(void);
39 int _bt_hal_le_disable(void);
42 void _bt_hal_register_gatt_le_dbus_handler_cb(handle_stack_msg cb);
44 void _bt_hal_unregister_gatt_le_dbus_handler_cb();
46 gboolean _bt_hal_update_le_feature_support(const char *item, const char *value);
48 int _bt_hal_get_available_adv_slot_id(bt_uuid_t *uuid);
50 int _bt_hal_get_adv_slot_adv_handle(int slot_id);
52 void _bt_hal_unregister_adv_slot_owner(int slot_id);
54 gboolean _bt_hal_is_advertising_in_slot(int slot);
56 void _bt_hal_set_advertising_status(int slot_id, gboolean mode);
58 gboolean _bt_hal_is_advertising(void);
60 void _bt_hal_free_server_slot(int slot_id);
62 int _bt_hal_set_advertising_data(btgatt_adv_param_setup_t adv_param_setup);
64 int _bt_hal_set_advertising_params(int server_if, int min_interval,
65 int max_interval, int adv_type,
66 int chnl_map, int tx_power, int timeout_s);
68 int _bt_hal_enable_advertising(int server_if, bool enable, bool is_multi_adv);
70 int _bt_hal_adapter_le_start_scan(void);
72 int _bt_hal_adapter_le_stop_scan(void);
74 int _bt_hal_adapter_le_set_scan_parameters(
75 int scan_type, int scan_interval, int scan_window);
77 void _bt_hal_get_gatt_server_instance_initialized(int *instance);
79 int _bt_hal_le_init(void);
80 void _bt_hal_le_deinit(void);
83 #endif /* __cplusplus */
84 #endif /*_BT_HAL_ADAPTER_LE_H_*/