• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 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_QUERY_PROFILE_H
17 #define OHOS_DP_QUERY_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 QueryProfile : public DpParcel {
26 public:
27     QueryProfile();
28     ~QueryProfile() = default;
29 
30     std::string GetAccesserDeviceId() const;
31     void SetAccesserDeviceId(const std::string& accesserDeviceId);
32     int32_t GetAccesserUserId() const;
33     void SetAccesserUserId(int32_t accesserUserId);
34     std::string GetAccesserAccountId() const;
35     void SetAccesserAccountId(const std::string& accesserAccountId);
36     int64_t GetAccesserTokenId() const;
37     void SetAccesserTokenId(int64_t accesserTokenId);
38     std::string GetAccesseeDeviceId() const;
39     void SetAccesseeDeviceId(const std::string& accesseeDeviceId);
40     int32_t GetAccesseeUserId() const;
41     std::string GetAccesseeAccountId() const;
42     void SetAccesseeAccountId(const std::string& accesseeAccountId);
43     void SetAccesseeUserId(int32_t accesseeUserId);
44     int64_t GetAccesseeTokenId() const;
45     void SetAccesseeTokenId(int64_t accesseeTokenId);
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 accesserDeviceId_;
52     int32_t accesserUserId_;
53     std::string accesserAccountId_;
54     int64_t accesserTokenId_;
55     std::string accesseeDeviceId_;
56     int32_t accesseeUserId_;
57     std::string accesseeAccountId_;
58     int64_t accesseeTokenId_;
59 };
60 } // namespace DistributedDeviceProfile
61 } // namespace OHOS
62 #endif // OHOS_DP_QUERY_PROFILE_H
63