• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 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_DM_IPC_NOTIFY_AUTH_RESULT_REQ_H
17 #define OHOS_DM_IPC_NOTIFY_AUTH_RESULT_REQ_H
18 
19 #include <cstdint>
20 
21 #include "ipc_req.h"
22 
23 namespace OHOS {
24 namespace DistributedHardware {
25 class IpcNotifyAuthResultReq : public IpcReq {
26     DECLARE_IPC_MODEL(IpcNotifyAuthResultReq);
27 
28 public:
GetDeviceId()29     std::string GetDeviceId() const
30     {
31         return deviceId_;
32     }
33 
SetDeviceId(const std::string & deviceId)34     void SetDeviceId(const std::string &deviceId)
35     {
36         deviceId_ = deviceId;
37     }
38 
GetPinToken()39     std::string GetPinToken() const
40     {
41         return token_;
42     }
43 
SetToken(const std::string & token)44     void SetToken(const std::string &token)
45     {
46         token_ = token;
47     }
48 
GetStatus()49     int32_t GetStatus() const
50     {
51         return status_;
52     }
53 
SetStatus(int32_t status)54     void SetStatus(int32_t status)
55     {
56         status_ = status;
57     }
58 
GetReason()59     int32_t GetReason() const
60     {
61         return reason_;
62     }
63 
SetReason(int32_t reason)64     void SetReason(int32_t reason)
65     {
66         reason_ = reason;
67     }
68 
69 private:
70     std::string deviceId_;
71     std::string token_;
72     int32_t status_ { 0 };
73     int32_t reason_ { 0 };
74 };
75 } // namespace DistributedHardware
76 } // namespace OHOS
77 #endif // OHOS_DM_IPC_NOTIFY_AUTH_RESULT_REQ_H
78