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_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 bool Marshalling(MessageParcel& parcel) const override; 49 bool UnMarshalling(MessageParcel& parcel) override; 50 std::string dump() const override; 51 52 private: 53 int64_t accesseeId_; 54 std::string accesseeDeviceId_; 55 int32_t accesseeUserId_; 56 std::string accesseeAccountId_; 57 int64_t accesseeTokenId_; 58 std::string accesseeBundleName_; 59 std::string accesseeHapSignature_; 60 uint32_t accesseeBindLevel_; 61 }; 62 } // namespace DistributedDeviceProfile 63 } // namespace OHOS 64 #endif // OHOS_DP_ACCESSEE_H 65