Implement MTU changed callback for GATT server
[platform/core/connectivity/bluetooth-frwk.git] / bt-oal / include / oal-audio-src.h
1 /*
2  * Open Adaptation Layer (OAL)
3  *
4  * Copyright (c) 2014-2015 Samsung Electronics Co., Ltd.
5  *
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
9  *
10  *              http://www.apache.org/licenses/LICENSE-2.0
11  *
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.
17  *
18  */
19
20
21 #ifndef _OAL_AUDIO_SOURCE_H_
22 #define _OAL_AUDIO_SOURCE_H_
23
24
25 #include <glib.h>
26 #include <sys/types.h>
27 #include <oal-manager.h>
28 #include "oal-event.h"
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33
34 /**
35  * @brief Enable Audio Host(A2DP Source) Feature
36  *
37  * @remarks  BT Sound Share/BT speaker will be able to connect.
38  *
39  * @return OAL_STATUS_SUCCESS on success, otherwise non-zero error value.
40  * @retval #OAL_STATUS_SUCCESS  Successful
41  *
42  * @pre OAL API must be initialized with oal_bt_init().
43  *
44  * @see  audio_disable()
45  */
46 oal_status_t audio_enable(char *service_name , char *provider_name);
47
48 /**
49  * @brief Disable Audio Host(A2DP Source) Feature
50  *
51  * @remarks  BT Sound Share/BT speaker will be able to connect.
52  *
53  * @return OAL_STATUS_SUCCESS on success, otherwise a non-zero error value.
54  * @retval #OAL_STATUS_SUCCESS  Successful
55  *
56  * @pre Audio host should be enabled with audio_enable().
57  *
58  * @see  audio_enable()
59  */
60 oal_status_t audio_disable(void);
61
62 /**
63  * @brief Initiate a connection with a BT Sound device
64  *
65  * @details  Result will be notified through an OAL event
66  *
67  * @return OAL_STATUS_SUCCESS on success, otherwise a non-zero error value.
68  * @retval #OAL_STATUS_SUCCESS  Successful
69  *
70  * @pre BT Audio should be enabled with audio_enable().
71  *
72  * @see  OAL_EVENT_AUDIO_CONNECTED
73  */
74
75 oal_status_t audio_connect(bt_address_t *device_address);
76
77 /**
78  * @brief Remove a connection with a BT Sound device
79  *
80  * @details  Result will be notified through an OAL event
81  *
82  * @return OAL_STATUS_SUCCESS on success, otherwise a non-zero error value.
83  * @retval #OAL_STATUS_SUCCESS  Successful
84  *
85  * @pre BT Audio should be connected with a BT Sound device.
86  *
87  * @see  OAL_EVENT_AUDIO_DISCONNECTED
88  */
89
90 oal_status_t audio_disconnect(bt_address_t *device_address);
91
92 #ifdef __cplusplus
93 }
94 #endif /* __cplusplus */
95 #endif /*_OAL_AUDIO_SOURCE_H_*/