2 * Open Adaptation Layer (OAL)
4 * Copyright (c) 2014-2015 Samsung Electronics Co., Ltd.
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.
28 #include <sys/types.h>
29 #include <oal-manager.h>
30 #include "oal-event.h"
37 * @brief Enable Audio HFP profile or Audio Gateway Role of HFP profile
39 * @remarks BT Headsets/Handsfree devices will be able to connect.
41 * @return OAL_STATUS_SUCCESS on success, otherwise non-zero error value.
42 * @retval #OAL_STATUS_SUCCESS Successful
44 * @pre OAL API must be initialized with oal_bt_init().
48 oal_status_t hfp_enable(int max_hfp_clients);
51 * @brief Disable Audio HFP profile or Audio Gateway Role of HFP profile
53 * @remarks BT Headsets/Handsfree devices will disconnect.
55 * @return OAL_STATUS_SUCCESS on success, otherwise a non-zero error value.
56 * @retval #OAL_STATUS_SUCCESS Successful
58 * @pre AG Host should be enabled with hfp_enable().
62 oal_status_t hfp_disable(void);
65 * @brief Initiate a HFP connection with a BT headset\handsfree device
67 * @details Result will be notified through an OAL event
69 * @return OAL_STATUS_SUCCESS on success, otherwise a non-zero error value.
70 * @retval #OAL_STATUS_SUCCESS Successful
72 * @pre AG Host should be enabled with hfp_enable().
74 * @see OAL_EVENT_HFP_DISCONNECTED
76 oal_status_t hfp_connect(bt_address_t *device_address);
79 * @brief Terminate a HFP connection with a BT headset\handsfree device
81 * @details Result will be notified through an OAL event
83 * @return OAL_STATUS_SUCCESS on success, otherwise a non-zero error value.
84 * @retval #OAL_STATUS_SUCCESS Successful
86 * @pre AG Host should be enabled with hfp_enable().
88 * @see OAL_EVENT_HFP_CONNECTED
90 oal_status_t hfp_disconnect(bt_address_t *device_address);
93 * @brief create an audio connection with a connected BT Sound device
95 * @details Result will be notified through an OAL event
97 * @return OAL_STATUS_SUCCESS on success, otherwise a non-zero error value.
98 * @retval #OAL_STATUS_SUCCESS Successful
100 * @pre BT Audio should be connected with a BT Sound device.
102 * @see OAL_EVENT_HFP_AUDIO_CONNECTED
104 oal_status_t hfp_connect_audio(bt_address_t *device_address);
107 * @brief Disconnect the audio connection with a connected BT Sound device
109 * @details Result will be notified through an OAL event
111 * @return OAL_STATUS_SUCCESS on success, otherwise a non-zero error value.
112 * @retval #OAL_STATUS_SUCCESS Successful
114 * @pre BT Audio should be connected with a BT Sound device.
116 * @see OAL_EVENT_HFP_AUDIO_DISCONNECTED
118 oal_status_t hfp_disconnect_audio(bt_address_t *device_address);
122 #endif /* __cplusplus */
123 #endif /*_OAL_HFP_H_*/