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 bindType_(static_cast<uint32_t>(BindType::MIN)) 33 {} 34 ~TrustDeviceProfile() = default; 35 36 std::string GetDeviceId() const; 37 void SetDeviceId(const std::string& deviceId); 38 int32_t GetDeviceIdType() const; 39 void SetDeviceIdType(int32_t deviceType); 40 std::string GetDeviceIdHash() const; 41 void SetDeviceIdHash(const std::string& deviceIdHash); 42 int32_t GetStatus() const; 43 void SetStatus(int32_t status); 44 uint32_t GetBindType() const; 45 void SetBindType(uint32_t bindType); 46 bool Marshalling(MessageParcel& parcel) const override; 47 bool UnMarshalling(MessageParcel& parcel) override; 48 std::string dump() const override; 49 50 private: 51 std::string deviceId_; 52 uint32_t deviceIdType_; 53 std::string deviceIdHash_; 54 int32_t status_; 55 uint32_t bindType_; 56 }; 57 } // namespace DistributedDeviceProfile 58 } // namespace OHOS 59 #endif // OHOS_DP_TRUST_DEVICE_PROFILE_H 60