1 /* 2 * Copyright (c) 2021-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 MULTIMODAL_INPUT_CONNECT_STUB_H 17 #define MULTIMODAL_INPUT_CONNECT_STUB_H 18 19 #include "iremote_stub.h" 20 #include "message_parcel.h" 21 #include "nocopyable.h" 22 23 #include "i_multimodal_input_connect.h" 24 #include "mmi_log.h" 25 #include "multimodal_input_connect_define.h" 26 27 namespace OHOS { 28 namespace MMI { 29 class MultimodalInputConnectStub : public IRemoteStub<IMultimodalInputConnect> { 30 public: 31 MultimodalInputConnectStub() = default; 32 DISALLOW_COPY_AND_MOVE(MultimodalInputConnectStub); 33 ~MultimodalInputConnectStub() = default; 34 35 virtual bool IsRunning() const = 0; 36 virtual int32_t OnRemoteRequest(uint32_t code, MessageParcel& data, MessageParcel& reply, 37 MessageOption& options) override; 38 39 protected: 40 int32_t StubHandleAllocSocketFd(MessageParcel &data, MessageParcel &reply); 41 int32_t StubAddInputEventFilter(MessageParcel& data, MessageParcel& reply); 42 int32_t StubSetPointerVisible(MessageParcel& data, MessageParcel& reply); 43 int32_t StubSetPointerStyle(MessageParcel& data, MessageParcel& reply); 44 int32_t StubGetPointerStyle(MessageParcel& data, MessageParcel& reply); 45 int32_t StubIsPointerVisible(MessageParcel& data, MessageParcel& reply); 46 int32_t StubSupportKeys(MessageParcel& data, MessageParcel& reply); 47 int32_t StubGetDeviceIds(MessageParcel& data, MessageParcel& reply); 48 int32_t StubGetDevice(MessageParcel& data, MessageParcel& reply); 49 int32_t StubRegisterInputDeviceMonitor(MessageParcel& data, MessageParcel& reply); 50 int32_t StubUnregisterInputDeviceMonitor(MessageParcel& data, MessageParcel& reply); 51 int32_t StubGetKeyboardType(MessageParcel& data, MessageParcel& reply); 52 int32_t StubAddInputHandler(MessageParcel& data, MessageParcel& reply); 53 int32_t StubRemoveInputHandler(MessageParcel& data, MessageParcel& reply); 54 int32_t StubMarkEventConsumed(MessageParcel& data, MessageParcel& reply); 55 int32_t StubMoveMouseEvent(MessageParcel& data, MessageParcel& reply); 56 int32_t StubInjectKeyEvent(MessageParcel& data, MessageParcel& reply); 57 int32_t StubSubscribeKeyEvent(MessageParcel& data, MessageParcel& reply); 58 int32_t StubUnsubscribeKeyEvent(MessageParcel& data, MessageParcel& reply); 59 int32_t StubInjectPointerEvent(MessageParcel& data, MessageParcel& reply); 60 int32_t StubSetAnrListener(MessageParcel& data, MessageParcel& reply); 61 int32_t StubSetPointerSpeed(MessageParcel& data, MessageParcel& reply); 62 int32_t StubGetPointerSpeed(MessageParcel& data, MessageParcel& reply); 63 int32_t StubRegisterCooperateMonitor(MessageParcel& data, MessageParcel& reply); 64 int32_t StubUnregisterCooperateMonitor(MessageParcel& data, MessageParcel& reply); 65 int32_t StubEnableInputDeviceCooperate(MessageParcel& data, MessageParcel& reply); 66 int32_t StubStartInputDeviceCooperate(MessageParcel& data, MessageParcel& reply); 67 int32_t StubStopDeviceCooperate(MessageParcel& data, MessageParcel& reply); 68 int32_t StubGetInputDeviceCooperateState(MessageParcel& data, MessageParcel& reply); 69 int32_t StubSetInputDevice(MessageParcel& data, MessageParcel& reply); 70 int32_t StubGetFunctionKeyState(MessageParcel &data, MessageParcel &reply); 71 int32_t StubSetFunctionKeyState(MessageParcel &data, MessageParcel &reply); 72 }; 73 } // namespace MMI 74 } // namespace OHOS 75 #endif // MULTIMODAL_INPUT_CONNECT_STUB_H 76