1 /* 2 * Copyright (c) 2023-2025 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_ACCESSEE_H 17 #define OHOS_DP_ACCESSEE_H 18 19 #include <cstdint> 20 #include <string> 21 #include "distributed_device_profile_enums.h" 22 #include "dp_parcel.h" 23 24 namespace OHOS { 25 namespace DistributedDeviceProfile { 26 class Accessee : public DpParcel { 27 public: 28 Accessee(); 29 ~Accessee() = default; 30 31 public: 32 int64_t GetAccesseeId(); 33 void SetAccesseeId(int64_t accesseeId); 34 std::string GetAccesseeDeviceId() const; 35 void SetAccesseeDeviceId(const std::string& accesseeDeviceId); 36 int32_t GetAccesseeUserId() const; 37 void SetAccesseeUserId(int32_t accesseeUserId); 38 std::string GetAccesseeAccountId() const; 39 void SetAccesseeAccountId(const std::string& accesseeAccountId); 40 int64_t GetAccesseeTokenId() const; 41 void SetAccesseeTokenId(int64_t accesseeTokenId); 42 std::string GetAccesseeBundleName() const; 43 void SetAccesseeBundleName(const std::string& accesseeBundleName); 44 std::string GetAccesseeHapSignature() const; 45 void SetAccesseeHapSignature(const std::string& accesseeHapSignature); 46 uint32_t GetAccesseeBindLevel() const; 47 void SetAccesseeBindLevel(uint32_t accesseeBindLevel); 48 std::string GetAccesseeDeviceName() const; 49 void SetAccesseeDeviceName(const std::string& accesseeDeviceName); 50 std::string GetAccesseeServiceName() const; 51 void SetAccesseeServiceName(const std::string& accesseeServiceName); 52 int32_t GetAccesseeCredentialId() const; 53 void SetAccesseeCredentialId(int32_t accesseeCredentialId); 54 int32_t GetAccesseeStatus() const; 55 void SetAccesseeStatus(int32_t accesseeStatus); 56 int32_t GetAccesseeSessionKeyId() const; 57 void SetAccesseeSessionKeyId(int32_t accesseeSessionKeyId); 58 int64_t GetAccesseeSKTimeStamp() const; 59 void SetAccesseeSKTimeStamp(int64_t accesseeSKTimeStamp); 60 bool Marshalling(MessageParcel& parcel) const override; 61 bool UnMarshalling(MessageParcel& parcel) override; 62 std::string dump() const override; 63 64 private: 65 int64_t accesseeId_; 66 std::string accesseeDeviceId_; 67 int32_t accesseeUserId_; 68 std::string accesseeAccountId_; 69 int64_t accesseeTokenId_; 70 std::string accesseeBundleName_; 71 std::string accesseeHapSignature_; 72 uint32_t accesseeBindLevel_; 73 std::string accesseeDeviceName_; 74 std::string accesseeServiceName_; 75 int32_t accesseeCredentialId_; 76 int32_t accesseeStatus_; 77 int32_t accesseeSessionKeyId_; 78 int64_t accesseeSKTimeStamp_; 79 }; 80 } // namespace DistributedDeviceProfile 81 } // namespace OHOS 82 #endif // OHOS_DP_ACCESSEE_H 83