2 * Open Adaptation Layer (OAL)
4 * Copyright (c) 2014-2015 Samsung Electronics Co., Ltd.
6 * Contact: Nilesh Trimbake <t.shripati@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.
23 #ifndef _OAL_A2DP_SINK_H_
24 #define _OAL_A2DP_SINK_H_
28 #include <sys/types.h>
29 #include <oal-manager.h>
30 #include "oal-event.h"
37 * @brief Enable Audio Host(A2DP Sink) Feature
39 * @remarks BT Sound Share/BT speaker 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().
46 * @see a2dp_sink_disable()
48 oal_status_t a2dp_sink_enable(char *service_name , char *provider_name);
52 * @brief Disable Audio Host(A2DP Sink) Feature
54 * @remarks BT Sound Share/BT speaker will be able to connect.
56 * @return OAL_STATUS_SUCCESS on success, otherwise a non-zero error value.
57 * @retval #OAL_STATUS_SUCCESS Successful
59 * @pre Audio host should be enabled with a2dp_sink_enable().
61 * @see a2dp_sink_enable()
63 oal_status_t a2dp_sink_disable(void);
67 * @brief Initiate a connection with A2DP Source Device
69 * @details Result will be notified through an OAL event
71 * @return OAL_STATUS_SUCCESS on success, otherwise a non-zero error value.
72 * @retval #OAL_STATUS_SUCCESS Successful
74 * @pre BT Audio should be enabled with a2dp_sink_enable().
76 * @see OAL_EVENT_A2DP_SINK_CONNECTED
79 oal_status_t a2dp_sink_connect(bt_address_t *device_address);
83 * @brief Remove a connection with A2DP Source device
85 * @details Result will be notified through an OAL event
87 * @return OAL_STATUS_SUCCESS on success, otherwise a non-zero error value.
88 * @retval #OAL_STATUS_SUCCESS Successful
90 * @pre BT Audio should be connected with a BT Sound device.
92 * @see OAL_EVENT_A2DP_SINK_DISCONNECTED
95 oal_status_t a2dp_sink_disconnect(bt_address_t *device_address);
99 #endif /* __cplusplus */
100 #endif /*_OAL_A2DP_SINK_H_*/