1885b47fbSopenharmony_ci/* 2885b47fbSopenharmony_ci * Copyright (C) 2022 Huawei Device Co., Ltd. 3885b47fbSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 4885b47fbSopenharmony_ci * you may not use this file except in compliance with the License. 5885b47fbSopenharmony_ci * You may obtain a copy of the License at 6885b47fbSopenharmony_ci * 7885b47fbSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 8885b47fbSopenharmony_ci * 9885b47fbSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 10885b47fbSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 11885b47fbSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12885b47fbSopenharmony_ci * See the License for the specific language governing permissions and 13885b47fbSopenharmony_ci * limitations under the License. 14885b47fbSopenharmony_ci */ 15885b47fbSopenharmony_ci 16885b47fbSopenharmony_ci#ifndef ACCESSIBLE_ABILITY_CHANNEL_STUB_H 17885b47fbSopenharmony_ci#define ACCESSIBLE_ABILITY_CHANNEL_STUB_H 18885b47fbSopenharmony_ci 19885b47fbSopenharmony_ci#include "i_accessible_ability_channel.h" 20885b47fbSopenharmony_ci#include "iremote_stub.h" 21885b47fbSopenharmony_ci 22885b47fbSopenharmony_cinamespace OHOS { 23885b47fbSopenharmony_cinamespace Accessibility { 24885b47fbSopenharmony_ciclass AccessibleAbilityChannelStub : public IRemoteStub<IAccessibleAbilityChannel> { 25885b47fbSopenharmony_cipublic: 26885b47fbSopenharmony_ci /** 27885b47fbSopenharmony_ci * @brief construct function 28885b47fbSopenharmony_ci * @param object The object of IPC 29885b47fbSopenharmony_ci */ 30885b47fbSopenharmony_ci AccessibleAbilityChannelStub(); 31885b47fbSopenharmony_ci 32885b47fbSopenharmony_ci /** 33885b47fbSopenharmony_ci * @brief destruct function 34885b47fbSopenharmony_ci */ 35885b47fbSopenharmony_ci virtual ~AccessibleAbilityChannelStub(); 36885b47fbSopenharmony_ci 37885b47fbSopenharmony_ci /** 38885b47fbSopenharmony_ci * @brief Receive the event from proxy by IPC mechanism. 39885b47fbSopenharmony_ci * @param code The code is matched with the process function. 40885b47fbSopenharmony_ci * @param data The data of process communication 41885b47fbSopenharmony_ci * @param reply The response of IPC request 42885b47fbSopenharmony_ci * @param option The option parameter of IPC,such as: async,sync 43885b47fbSopenharmony_ci */ 44885b47fbSopenharmony_ci virtual int OnRemoteRequest(uint32_t code, MessageParcel &data, 45885b47fbSopenharmony_ci MessageParcel &reply, MessageOption &option) override; 46885b47fbSopenharmony_ciprivate: 47885b47fbSopenharmony_ci /** 48885b47fbSopenharmony_ci * @brief Handle the IPC request for the function:HandleSearchElementInfoByAccessibilityId. 49885b47fbSopenharmony_ci * @param data The data of process communication 50885b47fbSopenharmony_ci * @param reply The response of IPC request 51885b47fbSopenharmony_ci * @return NO_ERROR: successful; otherwise is failed. 52885b47fbSopenharmony_ci */ 53885b47fbSopenharmony_ci ErrCode HandleSearchElementInfoByAccessibilityId(MessageParcel &data, MessageParcel &reply); 54885b47fbSopenharmony_ci 55885b47fbSopenharmony_ci /** 56885b47fbSopenharmony_ci * @brief Handle the IPC request for the function:HandleSearchElementInfosByText. 57885b47fbSopenharmony_ci * @param data The data of process communication 58885b47fbSopenharmony_ci * @param reply The response of IPC request 59885b47fbSopenharmony_ci * @return NO_ERROR: successful; otherwise is failed. 60885b47fbSopenharmony_ci */ 61885b47fbSopenharmony_ci ErrCode HandleSearchElementInfosByText(MessageParcel &data, MessageParcel &reply); 62885b47fbSopenharmony_ci 63885b47fbSopenharmony_ci /** 64885b47fbSopenharmony_ci * @brief Handle the IPC request for the function:HandleFindFocusedElementInfo. 65885b47fbSopenharmony_ci * @param data The data of process communication 66885b47fbSopenharmony_ci * @param reply The response of IPC request 67885b47fbSopenharmony_ci * @return NO_ERROR: successful; otherwise is failed. 68885b47fbSopenharmony_ci */ 69885b47fbSopenharmony_ci ErrCode HandleFindFocusedElementInfo(MessageParcel &data, MessageParcel &reply); 70885b47fbSopenharmony_ci 71885b47fbSopenharmony_ci /** 72885b47fbSopenharmony_ci * @brief Handle the IPC request for the function:HandleFocusMoveSearch. 73885b47fbSopenharmony_ci * @param data The data of process communication 74885b47fbSopenharmony_ci * @param reply The response of IPC request 75885b47fbSopenharmony_ci * @return NO_ERROR: successful; otherwise is failed. 76885b47fbSopenharmony_ci */ 77885b47fbSopenharmony_ci ErrCode HandleFocusMoveSearch(MessageParcel &data, MessageParcel &reply); 78885b47fbSopenharmony_ci 79885b47fbSopenharmony_ci /** 80885b47fbSopenharmony_ci * @brief Handle the IPC request for the function:HandleExecuteAction. 81885b47fbSopenharmony_ci * @param data The data of process communication 82885b47fbSopenharmony_ci * @param reply The response of IPC request 83885b47fbSopenharmony_ci * @return NO_ERROR: successful; otherwise is failed. 84885b47fbSopenharmony_ci */ 85885b47fbSopenharmony_ci ErrCode HandleExecuteAction(MessageParcel &data, MessageParcel &reply); 86885b47fbSopenharmony_ci 87885b47fbSopenharmony_ci /** 88885b47fbSopenharmony_ci * @brief Handle the IPC request for the function:HandleEnableScreenCurtain. 89885b47fbSopenharmony_ci * @param data The data of process communication 90885b47fbSopenharmony_ci * @param reply The response of IPC request 91885b47fbSopenharmony_ci * @return NO_ERROR: successful; otherwise is failed. 92885b47fbSopenharmony_ci */ 93885b47fbSopenharmony_ci ErrCode HandleEnableScreenCurtain(MessageParcel &data, MessageParcel &reply); 94885b47fbSopenharmony_ci 95885b47fbSopenharmony_ci /** 96885b47fbSopenharmony_ci * @brief Handle the IPC request for the function:HandleGetWindow. 97885b47fbSopenharmony_ci * @param data The data of process communication 98885b47fbSopenharmony_ci * @param reply The response of IPC request 99885b47fbSopenharmony_ci * @return NO_ERROR: successful; otherwise is failed. 100885b47fbSopenharmony_ci */ 101885b47fbSopenharmony_ci ErrCode HandleGetWindow(MessageParcel &data, MessageParcel &reply); 102885b47fbSopenharmony_ci 103885b47fbSopenharmony_ci /** 104885b47fbSopenharmony_ci * @brief Handle the IPC request for the function:HandleGetWindows. 105885b47fbSopenharmony_ci * @param data The data of process communication 106885b47fbSopenharmony_ci * @param reply The response of IPC request 107885b47fbSopenharmony_ci * @return NO_ERROR: successful; otherwise is failed. 108885b47fbSopenharmony_ci */ 109885b47fbSopenharmony_ci ErrCode HandleGetWindows(MessageParcel &data, MessageParcel &reply); 110885b47fbSopenharmony_ci 111885b47fbSopenharmony_ci /** 112885b47fbSopenharmony_ci * @brief Handle the IPC request for the function:HandleGetWindows. 113885b47fbSopenharmony_ci * @param data The data of process communication 114885b47fbSopenharmony_ci * @param reply The response of IPC request 115885b47fbSopenharmony_ci * @return NO_ERROR: successful; otherwise is failed. 116885b47fbSopenharmony_ci */ 117885b47fbSopenharmony_ci ErrCode HandleGetWindowsByDisplayId(MessageParcel &data, MessageParcel &reply); 118885b47fbSopenharmony_ci 119885b47fbSopenharmony_ci /** 120885b47fbSopenharmony_ci * @brief Handle the IPC request for the function:HandleSetOnKeyPressEventResult. 121885b47fbSopenharmony_ci * @param data The data of process communication 122885b47fbSopenharmony_ci * @param reply The response of IPC request 123885b47fbSopenharmony_ci * @return NO_ERROR: successful; otherwise is failed. 124885b47fbSopenharmony_ci */ 125885b47fbSopenharmony_ci ErrCode HandleSetOnKeyPressEventResult(MessageParcel &data, MessageParcel &reply); 126885b47fbSopenharmony_ci 127885b47fbSopenharmony_ci /** 128885b47fbSopenharmony_ci * @brief Handle the IPC request for the function:HandleSendSimulateGesturePath. 129885b47fbSopenharmony_ci * @param data The data of process communication 130885b47fbSopenharmony_ci * @param reply The response of IPC request 131885b47fbSopenharmony_ci * @return NO_ERROR: successful; otherwise is failed. 132885b47fbSopenharmony_ci */ 133885b47fbSopenharmony_ci ErrCode HandleSendSimulateGesturePath(MessageParcel &data, MessageParcel &reply); 134885b47fbSopenharmony_ci 135885b47fbSopenharmony_ci /** 136885b47fbSopenharmony_ci * @brief Handle the IPC request for the function:HandleSetTargetBundleName. 137885b47fbSopenharmony_ci * @param data The data of process communication 138885b47fbSopenharmony_ci * @param reply The response of IPC request 139885b47fbSopenharmony_ci * @return NO_ERROR: successful; otherwise is failed. 140885b47fbSopenharmony_ci */ 141885b47fbSopenharmony_ci ErrCode HandleSetTargetBundleName(MessageParcel &data, MessageParcel &reply); 142885b47fbSopenharmony_ci 143885b47fbSopenharmony_ci /** 144885b47fbSopenharmony_ci * @brief Handle the IPC request for the function:HandleGetCursorPosition. 145885b47fbSopenharmony_ci * @param data The data of process communication 146885b47fbSopenharmony_ci * @param reply The response of IPC request 147885b47fbSopenharmony_ci * @return NO_ERROR: successful; otherwise is failed. 148885b47fbSopenharmony_ci */ 149885b47fbSopenharmony_ci ErrCode HandleGetCursorPosition(MessageParcel &data, MessageParcel &reply); 150885b47fbSopenharmony_ci 151885b47fbSopenharmony_ci using AccessibleAbilityConnectionFunc = 152885b47fbSopenharmony_ci ErrCode (AccessibleAbilityChannelStub::*)(MessageParcel &data, MessageParcel &reply); 153885b47fbSopenharmony_ci}; 154885b47fbSopenharmony_ci} // namespace Accessibility 155885b47fbSopenharmony_ci} // namespace OHOS 156885b47fbSopenharmony_ci#endif // ACCESSIBLE_ABILITY_CHANNEL_STUB_H