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_PBAP_PCE_PARAMETER_H 17 #define BLUETOOTH_PARCEL_PBAP_PCE_PARAMETER_H 18 19 #include "parcel.h" 20 #include "pbap_pce_parameter.h" 21 22 namespace OHOS { 23 namespace Bluetooth { 24 /** 25 * @brief Pbap PullPhoneBook Param 26 * 27 * @since 1.0 28 * @version 1.0 29 */ 30 class BluetoothIPbapPullPhoneBookParam : public Parcelable, public bluetooth::IPbapPullPhoneBookParam { 31 public: 32 BluetoothIPbapPullPhoneBookParam() = default; 33 ~BluetoothIPbapPullPhoneBookParam() override = default; 34 explicit BluetoothIPbapPullPhoneBookParam(const bluetooth::IPbapPullPhoneBookParam& other); 35 BluetoothIPbapPullPhoneBookParam(const BluetoothIPbapPullPhoneBookParam& other); 36 /* 37 * @brief Write BluetoothIPbapPullPhoneBookParam values to parcel. 38 * 39 * @param parcel Parcel which store BluetoothIPbapPullPhoneBookParam values. 40 * @return Operation result. 41 * @since 1.0 42 * @version 1.0 43 */ 44 bool WriteToParcel(Parcel &parcel); 45 46 bool Marshalling(Parcel &parcel) const override; 47 48 static BluetoothIPbapPullPhoneBookParam *Unmarshalling(Parcel &parcel); 49 /** 50 * @brief Read BluetoothIPbapPullPhoneBookParam values from parcel. 51 * 52 * @param parcel Parcel which bring BluetoothIPbapPullPhoneBookParam values. 53 * @return Operation result. 54 * @since 1.0 55 * @version 1.0 56 */ 57 bool ReadFromParcel(Parcel &parcel); 58 }; 59 60 /** 61 * @brief Pbap PullvCardListing Param 62 * 63 * @since 1.0 64 * @version 1.0 65 */ 66 class BluetoothIPbapPullvCardListingParam : public Parcelable, public bluetooth::IPbapPullvCardListingParam { 67 public: 68 BluetoothIPbapPullvCardListingParam() = default; 69 ~BluetoothIPbapPullvCardListingParam() override = default; 70 explicit BluetoothIPbapPullvCardListingParam(const bluetooth::IPbapPullvCardListingParam& other); 71 BluetoothIPbapPullvCardListingParam(const BluetoothIPbapPullvCardListingParam& other); 72 73 bool Marshalling(Parcel &parcel) const override; 74 75 static BluetoothIPbapPullvCardListingParam *Unmarshalling(Parcel &parcel); 76 /* 77 * @brief Write BluetoothIPbapPullvCardListingParam values to parcel. 78 * 79 * @param parcel Parcel which store BluetoothIPbapPullvCardListingParam values. 80 * @return Operation result. 81 * @since 1.0 82 * @version 1.0 83 */ 84 bool WriteToParcel(Parcel &parcel); 85 86 /** 87 * @brief Read BluetoothIPbapPullvCardListingParam values from parcel. 88 * 89 * @param parcel Parcel which bring BluetoothIPbapPullvCardListingParam values. 90 * @return Operation result. 91 * @since 1.0 92 * @version 1.0 93 */ 94 bool ReadFromParcel(Parcel &parcel); 95 }; 96 97 /** 98 * @brief Pbap PullvCardEntry Param 99 * 100 * @since 1.0 101 * @version 1.0 102 */ 103 class BluetoothIPbapPullvCardEntryParam : public Parcelable, public bluetooth::IPbapPullvCardEntryParam { 104 public: 105 BluetoothIPbapPullvCardEntryParam() = default; 106 ~BluetoothIPbapPullvCardEntryParam() override = default; 107 explicit BluetoothIPbapPullvCardEntryParam(const bluetooth::IPbapPullvCardEntryParam& other); 108 BluetoothIPbapPullvCardEntryParam(const BluetoothIPbapPullvCardEntryParam& other); 109 bool Marshalling(Parcel &parcel) const override; 110 111 static BluetoothIPbapPullvCardEntryParam *Unmarshalling(Parcel &parcel); 112 /* 113 * @brief Write BluetoothIPbapPullvCardEntryParam values to parcel. 114 * 115 * @param parcel Parcel which store BluetoothIPbapPullvCardEntryParam values. 116 * @return Operation result. 117 * @since 1.0 118 * @version 1.0 119 */ 120 bool WriteToParcel(Parcel &parcel); 121 122 /** 123 * @brief Read BluetoothIPbapPullvCardEntryParam values from parcel. 124 * 125 * @param parcel Parcel which bring BluetoothIPbapPullvCardEntryParam values. 126 * @return Operation result. 127 * @since 1.0 128 * @version 1.0 129 */ 130 bool ReadFromParcel(Parcel &parcel); 131 }; 132 133 134 /** 135 * @brief Pbap PhoneBook Data 136 * 137 * @since 1.0 138 * @version 1.0 139 */ 140 class BluetoothIPbapPhoneBookData : public Parcelable, public bluetooth::IPbapPhoneBookData { 141 public: 142 explicit BluetoothIPbapPhoneBookData() = default; 143 ~BluetoothIPbapPhoneBookData() override = default; 144 explicit BluetoothIPbapPhoneBookData(const bluetooth::IPbapPhoneBookData& other); 145 BluetoothIPbapPhoneBookData(const BluetoothIPbapPhoneBookData& other); 146 bool Marshalling(Parcel &parcel) const override; 147 148 static BluetoothIPbapPhoneBookData *Unmarshalling(Parcel &parcel); 149 /* 150 * @brief Write BluetoothIPbapPhoneBookData values to parcel. 151 * 152 * @param parcel Parcel which store BluetoothIPbapPhoneBookData values. 153 * @return Operation result. 154 * @since 1.0 155 * @version 1.0 156 */ 157 bool WriteToParcel(Parcel &parcel); 158 159 /** 160 * @brief Read BluetoothIPbapPhoneBookData values from parcel. 161 * 162 * @param parcel Parcel which bring BluetoothIPbapPhoneBookData values. 163 * @return Operation result. 164 * @since 1.0 165 * @version 1.0 166 */ 167 bool ReadFromParcel(Parcel &parcel); 168 }; 169 170 } // namespace Bluetooth 171 } // namespace OHOS 172 173 #endif // BLUETOOTH_PARCEL_PBAP_PCE_PARAMETER_H