1 /* 2 * Copyright (c) 2022 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: 29 /** 30 * @tc.name: IpcNotifyAuthResultReq::GetDeviceId 31 * @tc.desc: Get DeviceId of the Ipc Notify Auth Result Request 32 * @tc.type: FUNC 33 */ GetDeviceId()34 std::string GetDeviceId() const 35 { 36 return deviceId_; 37 } 38 39 /** 40 * @tc.name: IpcNotifyAuthResultReq::SetDeviceId 41 * @tc.desc: Set DeviceId of the Ipc Notify Auth Result Request 42 * @tc.type: FUNC 43 */ SetDeviceId(const std::string & deviceId)44 void SetDeviceId(const std::string &deviceId) 45 { 46 deviceId_ = deviceId; 47 } 48 49 /** 50 * @tc.name: IpcNotifyAuthResultReq::GetPinToken 51 * @tc.desc: Get Pin Token of the Ipc Notify Auth Result Request 52 * @tc.type: FUNC 53 */ GetPinToken()54 std::string GetPinToken() const 55 { 56 return token_; 57 } 58 59 /** 60 * @tc.name: IpcNotifyAuthResultReq::SetToken 61 * @tc.desc: Set Token of the Ipc Notify Auth Result Request 62 * @tc.type: FUNC 63 */ SetToken(const std::string & token)64 void SetToken(const std::string &token) 65 { 66 token_ = token; 67 } 68 69 /** 70 * @tc.name: IpcNotifyAuthResultReq::GetStatus 71 * @tc.desc: Get Status Token of the Ipc Notify Auth Result Request 72 * @tc.type: FUNC 73 */ GetStatus()74 int32_t GetStatus() const 75 { 76 return status_; 77 } 78 79 /** 80 * @tc.name: IpcNotifyAuthResultReq::SetStatus 81 * @tc.desc: Set Status of the Ipc Notify Auth Result Request 82 * @tc.type: FUNC 83 */ SetStatus(int32_t status)84 void SetStatus(int32_t status) 85 { 86 status_ = status; 87 } 88 89 /** 90 * @tc.name: IpcNotifyAuthResultReq::GetReason 91 * @tc.desc: Get Reason of the Ipc Notify Auth Result Request 92 * @tc.type: FUNC 93 */ GetReason()94 int32_t GetReason() const 95 { 96 return reason_; 97 } 98 99 /** 100 * @tc.name: IpcNotifyAuthResultReq::SetReason 101 * @tc.desc: Set Reason of the Ipc Notify Auth Result Request 102 * @tc.type: FUNC 103 */ SetReason(int32_t reason)104 void SetReason(int32_t reason) 105 { 106 reason_ = reason; 107 } 108 109 private: 110 std::string deviceId_; 111 std::string token_; 112 int32_t status_ { 0 }; 113 int32_t reason_ { 0 }; 114 }; 115 } // namespace DistributedHardware 116 } // namespace OHOS 117 #endif // OHOS_DM_IPC_NOTIFY_AUTH_RESULT_REQ_H 118