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, public bluetooth::OffloadCodecStatus { 44 public: 45 BluetoothA2dpOffloadCodecStatus() = default; BluetoothA2dpOffloadCodecStatus(const bluetooth::OffloadCodecStatus & other)46 explicit BluetoothA2dpOffloadCodecStatus(const bluetooth::OffloadCodecStatus &other) 47 : bluetooth::OffloadCodecStatus(other) {} BluetoothA2dpOffloadCodecStatus(const BluetoothA2dpOffloadCodecStatus & other)48 BluetoothA2dpOffloadCodecStatus(const BluetoothA2dpOffloadCodecStatus &other) 49 : bluetooth::OffloadCodecStatus(other) {} 50 ~BluetoothA2dpOffloadCodecStatus() override = default; 51 52 bool Marshalling(Parcel &parcel) const override; 53 54 static BluetoothA2dpOffloadCodecStatus *Unmarshalling(Parcel &parcel); 55 56 bool WriteToParcel(Parcel &parcel); 57 bool ReadFromParcel(Parcel &parcel); 58 }; 59 60 } // namespace Bluetooth 61 } // namespace OHOS 62 63 #endif // BLUETOOTH_PARCEL_A2DP_A2DPCODECSTATUS_H