1 /* 2 * Copyright (c) 2023 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_DP_TRUST_DEVICE_PROFILE_H 17 #define OHOS_DP_TRUST_DEVICE_PROFILE_H 18 19 #include <string> 20 #include "distributed_device_profile_enums.h" 21 #include "dp_parcel.h" 22 23 namespace OHOS { 24 namespace DistributedDeviceProfile { 25 class TrustDeviceProfile : public DpParcel { 26 public: TrustDeviceProfile()27 TrustDeviceProfile() 28 : deviceId_(""), 29 deviceIdType_(static_cast<uint32_t>(DeviceIdType::MIN)), 30 deviceIdHash_(""), 31 status_(static_cast<int32_t>(Status::MIN)) 32 {} 33 ~TrustDeviceProfile() = default; 34 35 std::string GetDeviceId() const; 36 void SetDeviceId(const std::string& deviceId); 37 int32_t GetDeviceIdType() const; 38 void SetDeviceIdType(int32_t deviceType); 39 std::string GetDeviceIdHash() const; 40 void SetDeviceIdHash(const std::string& deviceIdHash); 41 int32_t GetStatus() const; 42 void SetStatus(int32_t status); 43 bool Marshalling(MessageParcel& parcel) const override; 44 bool UnMarshalling(MessageParcel& parcel) override; 45 std::string dump() const override; 46 47 private: 48 std::string deviceId_; 49 uint32_t deviceIdType_; 50 std::string deviceIdHash_; 51 int32_t status_; 52 }; 53 } // namespace DistributedDeviceProfile 54 } // namespace OHOS 55 #endif // OHOS_DP_TRUST_DEVICE_PROFILE_H 56