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_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 bool Marshalling(MessageParcel& parcel) const override; 48 bool UnMarshalling(MessageParcel& parcel) override; 49 std::string dump() const override; 50 51 private: 52 int64_t accesserId_; 53 std::string accesserDeviceId_; 54 int32_t accesserUserId_; 55 std::string accesserAccountId_; 56 int64_t accesserTokenId_; 57 std::string accesserBundleName_; 58 std::string accesserHapSignature_; 59 uint32_t accesserBindLevel_; 60 }; 61 } // namespace DistributedDeviceProfile 62 } // namespace OHOS 63 #endif //OHOS_DP_ACCESSER_H 64