2 * Copyright (C) 2012 The Android Open Source Project
3 * Copyright (C) 2019 Samsung Electronics Co., Ltd. All rights reserved.
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
18 #ifndef ANDROID_INCLUDE_BT_HD_H
19 #define ANDROID_INCLUDE_BT_HD_H
25 /* HID Device connection states */
27 BTHD_CONN_STATE_CONNECTED = 0,
28 BTHD_CONN_STATE_CONNECTING,
29 BTHD_CONN_STATE_DISCONNECTED,
30 BTHD_CONN_STATE_DISCONNECTING,
31 BTHD_CONN_STATE_UNKNOWN
32 } bthd_connection_state_t;
34 /** Callback for connection state change.
35 * state will have one of the values from bthd_connection_state_t
37 typedef void (*bthd_connection_state_callback)(bt_bdaddr_t *bd_addr, bthd_connection_state_t state);
39 /** BT-HD callback structure. */
41 /** set to sizeof(BtHdCallbacks) */
43 bthd_connection_state_callback connection_state_cb;
46 /** Represents the standard BT-HD interface. */
49 /** set to sizeof(BtHdInterface) */
53 * Register the BtHd callbacks
55 bt_status_t (*init)(bthd_callbacks_t* callbacks);
57 /** Closes the interface. */
58 void (*cleanup)(void);
63 #endif /* ANDROID_INCLUDE_BT_HD_H */