• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 BLUETOOTH_PARCEL_A2DP_A2DPCODECSTATUS_H
17 #define BLUETOOTH_PARCEL_A2DP_A2DPCODECSTATUS_H
18 
19 #include "../common/a2dp_parcel_codec.h"
20 #include "bluetooth_a2dp_a2dpCodecInfo.h"
21 #include "parcel.h"
22 
23 namespace OHOS {
24 namespace Bluetooth {
25 class BluetoothA2dpCodecStatus : public Parcelable,
26                                  public bluetooth::CodecStatus {
27 public:
28     BluetoothA2dpCodecStatus() = default;
BluetoothA2dpCodecStatus(const bluetooth::CodecStatus & other)29     BluetoothA2dpCodecStatus(const bluetooth::CodecStatus& other)
30         : bluetooth::CodecStatus(other) {} // NOLINT(implicit)
BluetoothA2dpCodecStatus(const BluetoothA2dpCodecStatus & other)31     BluetoothA2dpCodecStatus(const BluetoothA2dpCodecStatus& other)
32         : bluetooth::CodecStatus(other) {} // NOLINT(implicit)
33     ~BluetoothA2dpCodecStatus() override = default;
34 
35     bool Marshalling(Parcel &parcel) const override;
36 
37     static BluetoothA2dpCodecStatus *Unmarshalling(Parcel &parcel);
38 
39     bool WriteToParcel(Parcel &parcel);
40     bool ReadFromParcel(Parcel &parcel);
41 };
42 
43 class BluetoothA2dpOffloadCodecStatus : public Parcelable,
44                                         public bluetooth::OffloadCodecStatus {
45 public:
46     BluetoothA2dpOffloadCodecStatus() = default;
BluetoothA2dpOffloadCodecStatus(const bluetooth::OffloadCodecStatus & other)47     explicit BluetoothA2dpOffloadCodecStatus(const bluetooth::OffloadCodecStatus &other)
48         : bluetooth::OffloadCodecStatus(other) {}
BluetoothA2dpOffloadCodecStatus(const BluetoothA2dpOffloadCodecStatus & other)49     BluetoothA2dpOffloadCodecStatus(const BluetoothA2dpOffloadCodecStatus &other)
50         : bluetooth::OffloadCodecStatus(other) {}
51     ~BluetoothA2dpOffloadCodecStatus() override = default;
52     BluetoothA2dpOffloadCodecStatus &operator = (const bluetooth::OffloadCodecStatus &other);
53     BluetoothA2dpOffloadCodecStatus &operator = (const BluetoothA2dpOffloadCodecStatus &other);
54 
55     bool Marshalling(Parcel &parcel) const override;
56 
57     static BluetoothA2dpOffloadCodecStatus *Unmarshalling(Parcel &parcel);
58 
59     bool WriteToParcel(Parcel &parcel);
60     bool ReadFromParcel(Parcel &parcel);
61 };
62 
63 }  // namespace Bluetooth
64 }  // namespace OHOS
65 
66 #endif // BLUETOOTH_PARCEL_A2DP_A2DPCODECSTATUS_H