2 * Open Adaptation Layer (OAL)
4 * Copyright (c) 2014-2015 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_AUDIO_SOURCE_H_
22 #define _OAL_AUDIO_SOURCE_H_
26 #include <sys/types.h>
27 #include <oal-manager.h>
28 #include "oal-event.h"
35 * @brief Enable Audio Host(A2DP Source) Feature
37 * @remarks BT Sound Share/BT speaker will be able to connect.
39 * @return OAL_STATUS_SUCCESS on success, otherwise non-zero error value.
40 * @retval #OAL_STATUS_SUCCESS Successful
42 * @pre OAL API must be initialized with oal_bt_init().
44 * @see audio_disable()
46 oal_status_t audio_enable(char *service_name , char *provider_name);
49 * @brief Disable Audio Host(A2DP Source) Feature
51 * @remarks BT Sound Share/BT speaker will be able to connect.
53 * @return OAL_STATUS_SUCCESS on success, otherwise a non-zero error value.
54 * @retval #OAL_STATUS_SUCCESS Successful
56 * @pre Audio host should be enabled with audio_enable().
60 oal_status_t audio_disable(void);
63 * @brief Initiate a connection with a BT Sound device
65 * @details Result will be notified through an OAL event
67 * @return OAL_STATUS_SUCCESS on success, otherwise a non-zero error value.
68 * @retval #OAL_STATUS_SUCCESS Successful
70 * @pre BT Audio should be enabled with audio_enable().
72 * @see OAL_EVENT_AUDIO_CONNECTED
75 oal_status_t audio_connect(bt_address_t *device_address);
78 * @brief Remove a connection with a BT Sound device
80 * @details Result will be notified through an OAL event
82 * @return OAL_STATUS_SUCCESS on success, otherwise a non-zero error value.
83 * @retval #OAL_STATUS_SUCCESS Successful
85 * @pre BT Audio should be connected with a BT Sound device.
87 * @see OAL_EVENT_AUDIO_DISCONNECTED
90 oal_status_t audio_disconnect(bt_address_t *device_address);
94 #endif /* __cplusplus */
95 #endif /*_OAL_AUDIO_SOURCE_H_*/