/* * Copyright (C) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef MOCK_ACCESSIBILITY_INPUT_INTERCEPTOR_H #define MOCK_ACCESSIBILITY_INPUT_INTERCEPTOR_H #include #include "accessibility_input_interceptor.h" namespace OHOS { namespace A11y { class MockA11yInputEventConsumer : public A11yInputEventConsumer { public: MockA11yInputEventConsumer(); ~MockA11yInputEventConsumer(); MOCK_CONST_METHOD1(OnInputEvent, void(std::shared_ptr keyEvent)); MOCK_CONST_METHOD1(OnInputEvent, void(std::shared_ptr pointerEvent)); MOCK_CONST_METHOD1(OnInputEvent, void(std::shared_ptr axisEvent)); }; class MockA11yInputInterceptor : public A11yInputInterceptor { public: MOCK_METHOD0(GetInstance, sptr()); MOCK_METHOD1(ProcessKeyEvent, void(std::shared_ptr event)); MOCK_METHOD1(ProcessPointerEvent, void(std::shared_ptr event)); MOCK_METHOD1(OnKeyEvent, void(MMI::KeyEvent& event)); MOCK_METHOD1(OnPointerEvent, void(MMI::PointerEvent& event)); MOCK_METHOD1(SetAvailableFunctions, void(uint32_t availableFunctions)); }; } // namespace A11y } // namespace OHOS #endif // MOCK_ACCESSIBILITY_INPUT_INTERCEPTOR_H