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_CLIENT_STUB_H
17 #define OHOS_DM_IPC_CLIENT_STUB_H
18 
19 #include <cstdint>
20 #include <memory>
21 
22 #include "ipc_remote_broker.h"
23 #include "iremote_stub.h"
24 namespace OHOS { class MessageOption; }
25 namespace OHOS { class MessageParcel; }
26 namespace OHOS::DistributedHardware { class IpcReq; }
27 namespace OHOS::DistributedHardware { class IpcRsp; }
28 
29 namespace OHOS {
30 namespace DistributedHardware {
31 class IpcClientStub : public IRemoteStub<IpcRemoteBroker> {
32 public:
IpcClientStub()33     IpcClientStub() {};
~IpcClientStub()34     ~IpcClientStub() {};
35     /**
36      * @tc.name: IpcClientStub::OnRemoteRequest
37      * @tc.desc: Ipc Client Stub remote request
38      * @tc.type: FUNC
39      */
40     int32_t OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) override;
41     /**
42      * @tc.name: IpcClientStub::SendCmd
43      * @tc.desc: Ipc Client Stub Send command
44      * @tc.type: FUNC
45      */
46     int32_t SendCmd(int32_t cmdCode, std::shared_ptr<IpcReq> req, std::shared_ptr<IpcRsp> rsp) override;
47 };
48 } // namespace DistributedHardware
49 } // namespace OHOS
50 #endif // OHOS_DM_IPC_CLIENT_STUB_H
51