1 /* 2 * Copyright (C) 2021 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_BT_UUID_H 17 #define BLUETOOTH_PARCEL_BT_UUID_H 18 19 #include "../common/bt_uuid.h" 20 #include "parcel.h" 21 22 namespace OHOS { 23 namespace Bluetooth { 24 /** 25 * @brief This class provides bluetooth uuid. 26 * 27 * @since 6 28 */ 29 class BluetoothUuid : public Parcelable, public bluetooth::Uuid { 30 public: 31 /** 32 * @brief A constructor used to create an <b>BluetoothUuid</b> instance. 33 * 34 * @since 6 35 */ 36 BluetoothUuid() = default; 37 38 /** 39 * @brief A constructor used to create an <b>BluetoothUuid</b> instance. 40 * 41 * @param other Other Uuid to create a new BluetoothUuid. 42 * @since 6 43 */ BluetoothUuid(const bluetooth::Uuid & other)44 explicit BluetoothUuid(const bluetooth::Uuid &other) : bluetooth::Uuid(other) 45 {} // NOLINT(implicit) 46 47 /** 48 * @brief A constructor used to create an <b>BluetoothUuid</b> instance. 49 * 50 * @param other Other BluetoothUuid to create a new BluetoothUuid. 51 * @since 6 52 */ BluetoothUuid(const BluetoothUuid & other)53 BluetoothUuid(const BluetoothUuid &other) : bluetooth::Uuid(other) 54 {} // NOLINT(implicit) 55 56 /** 57 * @brief A destructor used to delete the <b>BluetoothUuid</b> instance. 58 * 59 * @since 6 60 */ 61 ~BluetoothUuid() override = default; 62 63 bool Marshalling(Parcel &parcel) const override; 64 65 static BluetoothUuid *Unmarshalling(Parcel &parcel); 66 }; 67 } // namespace Bluetooth 68 } // namespace OHOS 69 70 #endif // BLUETOOTH_PARCEL_BT_UUID_H