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_INTERNAL_H_
23 #define _BT_HAL_INTERNAL_H_
26 #include <sys/types.h>
33 BT_HAL_MANAGER_EVENT = 0x01,
35 BT_HAL_LE_ADAPTER_EVENT,
41 BT_HAL_OPP_CLIENT_EVENT,
42 BT_HAL_OPP_SERVER_EVENT,
43 BT_HAL_PBAP_CLIENT_EVENT,
44 BT_HAL_RFCOMM_CLIENT_EVENT,
45 BT_HAL_RFCOMM_SERVER_EVENT,
47 BT_HAL_OBJECT_MANAGER_EVENT,
48 BT_HAL_MEDIA_TRANSFER_EVENT,
49 BT_HAL_HF_AGENT_EVENT,
50 BT_HAL_AVRCP_CONTROL_EVENT,
51 BT_HAL_A2DP_SOURCE_EVENT,
52 BT_HAL_HID_DEVICE_EVENT,
55 } bt_hal_event_type_t;
57 /* Profile states matched to btd_service_state_t of bluez service.h */
59 BT_HAL_PROFILE_STATE_UNAVAILABLE,
60 BT_HAL_PROFILE_STATE_DISCONNECTED,
61 BT_HAL_PROFILE_STATE_CONNECTING,
62 BT_HAL_PROFILE_STATE_CONNECTED,
63 BT_HAL_PROFILE_STATE_DISCONNECTING,
64 } bt_hal_profile_state_t;
67 #define HID_UUID "00001124-0000-1000-8000-00805f9b34fb"
68 #define HID_DEVICE_UUID "00001124-0000-1000-8000-00805f9b43bf"
69 #define A2DP_SINK_UUID "0000110b-0000-1000-8000-00805f9b34fb"
70 #define A2DP_SOURCE_UUID "0000110a-0000-1000-8000-00805f9b34fb"
71 #define AVRCP_CTRL_UUID "0000110e-0000-1000-8000-00805f9b34fb"
72 #define AVRCP_TARGET_UUID "0000110c-0000-1000-8000-00805f9b34fb"
73 #define HFP_HF_UUID "0000111e-0000-1000-8000-00805f9b34fb"
74 #define HFP_AG_UUID "0000111f-0000-1000-8000-00805f9b34fb"
77 * Device disconnection reasons; received from stack
79 #define BLUETOOTH_ERROR_PAGE_TIMEOUT 0x04
80 #define BLUETOOTH_ERROR_AUTH_FAILURE 0x05
81 #define BLUETOOTH_ERROR_PIN_OR_KEY_MISSING 0x06
82 #define BLUETOOTH_ERROR_CONNECTION_TIMEOUT 0x08
83 #define BLUETOOTH_ERROR_CONNECTION_REJECTED_DUE_TO_SECURITY_REASONS 0x0e
84 #define BLUETOOTH_ERROR_REMOTE_USER_TERM 0x13
85 #define BLUETOOTH_ERROR_REMOTE_LOW_RESOURCES 0x14
86 #define BLUETOOTH_ERROR_REMOTE_POWER_OFF 0x15
87 #define BLUETOOTH_ERROR_LOCAL_HOST_TERM 0x16
88 #define BLUETOOTH_ERROR_REPEATED_ATTEMPTS 0x17
89 #define BLUETOOTH_ERROR_LMP_RESPONSE_TIMEOUT 0x22
90 #define BLUETOOTH_ERROR_LMP_TRANSACTION_COLLISION 0x23
91 #define BLUETOOTH_ERROR_INSTANT_PASSED 0x28
92 #define BLUETOOTH_ERROR_INSUFFICIENT_SECURITY 0x2f
93 #define BLUETOOTH_ERROR_CONNECTION_TERMINATED_DUE_TO_MIC_FAILURE 0x3d
94 #define BLUETOOTH_ERROR_CONNECTION_FAILED_TO_BE_ESTABLISHED 0x3e
96 /* TODO More declarations to be added in subsequent patches */
99 #endif /* __cplusplus */
100 #endif /* _BT_HAL_INTERNAL_H_ */