1 /* 2 * Copyright (c) 2023 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 FOUNDATION_ACE_INTERFACE_INNERKITS_FORM_RENDERER_DISPATCHER_STUB_H 17 #define FOUNDATION_ACE_INTERFACE_INNERKITS_FORM_RENDERER_DISPATCHER_STUB_H 18 19 #include <map> 20 21 #include "base/utils/macros.h" 22 #include "form_renderer_dispatcher_interface.h" 23 #include "iremote_object.h" 24 #include "iremote_stub.h" 25 26 namespace OHOS { 27 namespace Ace { 28 /** 29 * @class FormRendererDispatcherStub 30 * Form render service stub. 31 */ 32 class ACE_EXPORT FormRendererDispatcherStub : public IRemoteStub<IFormRendererDispatcher> { 33 public: 34 FormRendererDispatcherStub(); 35 virtual ~FormRendererDispatcherStub(); 36 /** 37 * @brief handle remote request. 38 * @param data input param. 39 * @param reply output param. 40 * @param option message option. 41 * @return Returns ERR_OK on success, others on failure. 42 */ 43 virtual int32_t OnRemoteRequest( 44 uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option); 45 46 private: 47 int32_t HandleDispatchPointerEvent(MessageParcel &data, MessageParcel &reply); 48 int32_t HandleSetAllowUpdate(MessageParcel &data, MessageParcel &reply); 49 int32_t HandleDispatchSurfaceChangeEvent(MessageParcel &data, MessageParcel &reply); 50 int32_t HandleSetObscured(MessageParcel &data, MessageParcel &reply); 51 int32_t HandleOnAccessibilityChildTreeRegister(MessageParcel &data, MessageParcel &reply); 52 int32_t HandleOnAccessibilityChildTreeDeregister(MessageParcel &data, MessageParcel &reply); 53 int32_t HandleOnAccessibilityDumpChildInfo(MessageParcel &data, MessageParcel &reply); 54 int32_t HandleOnAccessibilityTransferHoverEvent(MessageParcel &data, MessageParcel &reply); 55 int32_t HandleOnNotifyDumpInfo(MessageParcel &data, MessageParcel &reply); 56 int32_t HandleSetMultiInstanceEnabled(MessageParcel &data, MessageParcel &reply); 57 using FormRendererDispatcherFunc = 58 int32_t (FormRendererDispatcherStub::*)(MessageParcel &data, MessageParcel &reply); 59 std::map<uint32_t, FormRendererDispatcherFunc> memberFuncMap_; 60 61 DISALLOW_COPY_AND_MOVE(FormRendererDispatcherStub); 62 }; 63 } // namespace Ace 64 } // namespace OHOS 65 #endif // FOUNDATION_ACE_INTERFACE_INNERKITS_FORM_RENDERER_DISPATCHER_STUB_H 66