OSDN Git Service

am aaf56636: am 1eeb7ae0: am ccd37fa0: Enable enhanced connection complete event
[android-x86/system-bt.git] / service / a2dp_source.h
1 //
2 //  Copyright (C) 2015 Google, Inc.
3 //
4 //  Licensed under the Apache License, Version 2.0 (the "License");
5 //  you may not use this file except in compliance with the License.
6 //  You may obtain a copy of the License at:
7 //
8 //  http://www.apache.org/licenses/LICENSE-2.0
9 //
10 //  Unless required by applicable law or agreed to in writing, software
11 //  distributed under the License is distributed on an "AS IS" BASIS,
12 //  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 //  See the License for the specific language governing permissions and
14 //  limitations under the License.
15 //
16 #pragma once
17
18 #include "hardware/bluetooth.h"
19 #include "hardware/bt_av.h"
20
21 namespace bluetooth {
22
23 class CoreStack;
24
25 // This class is just experimental to test out BlueDroid A2DP
26 // interface, capability, and functionality.
27 class A2dpSource {
28  public:
29   explicit A2dpSource(CoreStack* bt);
30
31   // Enables the A2DP source profile in the stack.
32   // Creates audio Unix sockets. (see audio_a2dp_hw.h)
33   int Start();
34
35   // Disables the A2DP source profile in the stack.
36   int Stop();
37
38  private:
39   const btav_interface_t* av_;
40   // Weak reference.
41   CoreStack* bt_;
42 };
43
44 }  // namespace bluetooth