2 * Open Adaptation Layer (OAL)
4 * Copyright (c) 2019 Samsung Electronics Co., Ltd.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
21 #ifndef _OAL_HF_CLIENT_H_
22 #define _OAL_HF_CLIENT_H_
25 #include <sys/types.h>
26 #include <oal-manager.h>
27 #include "oal-event.h"
34 * @brief Enable Audio HFP Client profile or HF Role of HFP profile
36 * @remarks BT audio gateway devices will be able to connect.
38 * @return OAL_STATUS_SUCCESS on success, otherwise non-zero error value.
39 * @retval #OAL_STATUS_SUCCESS Successful
41 * @pre OAL API must be initialized with oal_bt_init().
43 * @see hfp_client_disable()
45 oal_status_t hf_client_enable(void);
48 * @brief Disable Audio HFP client profile or HF Role of HFP profile
50 * @remarks BT audio gateway devices will be able to disconnect.
52 * @return OAL_STATUS_SUCCESS on success, otherwise a non-zero error value.
53 * @retval #OAL_STATUS_SUCCESS Successful
55 * @pre AG Host should be enabled with hf_client_enable().
59 oal_status_t hf_client_disable(void);
62 * @brief Initiate a HFP connection with a remote audio gateway device
64 * @details Result will be notified through an OAL event
66 * @return OAL_STATUS_SUCCESS on success, otherwise a non-zero error value.
67 * @retval #OAL_STATUS_SUCCESS Successful
69 * @pre HFP Client should be enabled with hf_client_enable().
71 * @see OAL_EVENT_HFP_CLIENT_DISCONNECTED
73 oal_status_t hf_client_connect(bt_address_t *device_address);
76 * @brief Terminate a HFP connection with a remote audio gateway device
78 * @details Result will be notified through an OAL event
80 * @return OAL_STATUS_SUCCESS on success, otherwise a non-zero error value.
81 * @retval #OAL_STATUS_SUCCESS Successful
83 * @pre HFP Client should be enabled with hf_client_enable().
85 * @see OAL_EVENT_HFP_CLIENT_CONNECTED
87 oal_status_t hf_client_disconnect(bt_address_t *device_address);
91 #endif /* __cplusplus */
92 #endif /* _OAL_HF_CLIENT_H_*/