1 /*
2  * Copyright (C) 2022 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef OHOS_BLUETOOTH_STANDARD_A2DP_SINK_INTERFACE_H
17 #define OHOS_BLUETOOTH_STANDARD_A2DP_SINK_INTERFACE_H
18 
19 #include <string>
20 
21 #include "bluetooth_service_ipc_interface_code.h"
22 #include "iremote_broker.h"
23 #include "i_bluetooth_a2dp_sink_observer.h"
24 #include "../common/raw_address.h"
25 #include "../parcel/bluetooth_raw_address.h"
26 #include "../parcel/bluetooth_a2dp_a2dpCodecStatus.h"
27 
28 namespace OHOS {
29 namespace Bluetooth {
30 using namespace OHOS::bluetooth;
31 class IBluetoothA2dpSink : public OHOS::IRemoteBroker {
32 public:
33     DECLARE_INTERFACE_DESCRIPTOR(u"ohos.ipc.IBluetoothA2dpSink");
34 
35     virtual int Connect(const RawAddress &device) = 0;
36     virtual int Disconnect(const RawAddress &device) = 0;
37     virtual void RegisterObserver(const sptr<IBluetoothA2dpSinkObserver> &observer) = 0;
38     virtual void DeregisterObserver(const sptr<IBluetoothA2dpSinkObserver> &observer) = 0;
39     virtual std::vector<RawAddress> GetDevicesByStates(const std::vector<int32_t> &states) = 0;
40     virtual int GetDeviceState(const RawAddress &device) = 0;
41     virtual int GetPlayingState(const RawAddress &device, int &state) = 0;
42     virtual int SetConnectStrategy(const RawAddress &device, int32_t strategy) = 0;
43     virtual int GetConnectStrategy(const RawAddress &device) = 0;
44     virtual int SendDelay(const RawAddress &device, int32_t delayValue) = 0;
45 };
46 }  // namespace Bluetooth
47 }  // namespace OHOS
48 #endif  // OHOS_BLUETOOTH_STANDARD_A2DP_INTERFACE_H