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_EVENT_RECEIVER_H_
23 #define _BT_HAL_EVENT_RECEIVER_H_
26 #include <sys/types.h>
32 #define DBUS_TIMEOUT 20 * 1000 /* 20 Sec */
33 #define BT_HAL_MAX_PROPERTY_BUF_SIZE 1024
34 #define BT_HAL_STACK_UUID_SIZE 16
35 #define MAX_UUID_COUNT 50
36 #define BT_HAL_DISCOVERY_FINISHED_DELAY 200
38 /* This is the callback method which handles events from stack */
39 typedef void (*handle_stack_msg) (int message, void *buf, uint16_t len);
41 int _bt_hal_initialize_event_receiver(handle_stack_msg cb);
55 void _bt_hal_register_event_handler_cb(bt_hal_module_e module, handle_stack_msg cb);
57 void _bt_hal_unregister_event_handler_cb(bt_hal_module_e module);
59 handle_stack_msg _bt_hal_get_stack_message_handler(void);
61 int __bt_insert_hal_properties(void *buf, uint8_t type, uint16_t len, const void *val);
63 bool _bt_hal_get_adapter_request_state(void);
65 bool _bt_hal_get_le_request_state(void);
67 void _bt_hal_set_adapter_request_state(bool enable);
69 void _bt_hal_set_le_request_state(bool enable);
73 #endif /* __cplusplus */
74 #endif /* _BT_HAL_EVENT_RECEIVER_H_ */