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_ACCESSER_H 17 #define OHOS_DP_ACCESSER_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 Accesser : public DpParcel { 27 public: 28 Accesser(); 29 ~Accesser() = default; 30 31 int64_t GetAccesserId(); 32 void SetAccesserId(int64_t accesserId); 33 std::string GetAccesserDeviceId() const; 34 void SetAccesserDeviceId(const std::string& accesserDeviceId); 35 int32_t GetAccesserUserId() const; 36 void SetAccesserUserId(int32_t accesserUserId); 37 std::string GetAccesserAccountId() const; 38 void SetAccesserAccountId(const std::string& accesserAccountId); 39 int64_t GetAccesserTokenId() const; 40 void SetAccesserTokenId(int64_t accesserTokenId); 41 std::string GetAccesserBundleName() const; 42 void SetAccesserBundleName(const std::string& accesserBundleName); 43 std::string GetAccesserHapSignature() const; 44 void SetAccesserHapSignature(const std::string& accesserHapSignature); 45 uint32_t GetAccesserBindLevel() const; 46 void SetAccesserBindLevel(uint32_t accesserBindLevel); 47 std::string GetAccesserDeviceName() const; 48 void SetAccesserDeviceName(const std::string& accesserDeviceName); 49 std::string GetAccesserServiceName() const; 50 void SetAccesserServiceName(const std::string& accesserServiceName); 51 int32_t GetAccesserCredentialId() const; 52 void SetAccesserCredentialId(int32_t accesserCredentialId); 53 int32_t GetAccesserStatus() const; 54 void SetAccesserStatus(int32_t accesserStatus); 55 int32_t GetAccesserSessionKeyId() const; 56 void SetAccesserSessionKeyId(int32_t accesserSessionKeyId); 57 int64_t GetAccesserSKTimeStamp() const; 58 void SetAccesserSKTimeStamp(int64_t accesserSKTimeStamp); 59 bool Marshalling(MessageParcel& parcel) const override; 60 bool UnMarshalling(MessageParcel& parcel) override; 61 std::string dump() const override; 62 63 private: 64 int64_t accesserId_; 65 std::string accesserDeviceId_; 66 int32_t accesserUserId_; 67 std::string accesserAccountId_; 68 int64_t accesserTokenId_; 69 std::string accesserBundleName_; 70 std::string accesserHapSignature_; 71 uint32_t accesserBindLevel_; 72 std::string accesserDeviceName_; 73 std::string accesserServiceName_; 74 int32_t accesserCredentialId_; 75 int32_t accesserStatus_; 76 int32_t accesserSessionKeyId_; 77 int64_t accesserSKTimeStamp_; 78 }; 79 } // namespace DistributedDeviceProfile 80 } // namespace OHOS 81 #endif //OHOS_DP_ACCESSER_H 82