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 #include "accessible_ability_channel_proxy.h"
17 #include "parcel.h"
18 #include "accessibility_errorcode.h"
19
20 using namespace std;
21
22 namespace OHOS {
23 namespace Accessibility {
AccessibleAbilityChannelProxy(const sptr<IRemoteObject> & object)24 AccessibleAbilityChannelProxy::AccessibleAbilityChannelProxy(
25 const sptr<IRemoteObject> &object): IRemoteProxy<IAccessibleAbilityChannel>(object)
26 {}
27
WriteInterfaceToken(MessageParcel & data)28 bool AccessibleAbilityChannelProxy::WriteInterfaceToken(MessageParcel &data)
29 {
30 (void)data;
31 return true;
32 }
33
SendTransactCmd(IAccessibleAbilityChannel::Message code,MessageParcel & data,MessageParcel & reply,MessageOption & option)34 bool AccessibleAbilityChannelProxy::SendTransactCmd(IAccessibleAbilityChannel::Message code,
35 MessageParcel &data, MessageParcel &reply, MessageOption &option)
36 {
37 (void)code;
38 (void)data;
39 (void)reply;
40 (void)option;
41 return true;
42 }
43
SearchElementInfoByAccessibilityId(const int accessibilityWindowId,const long elementId,const int requestId,const sptr<IAccessibilityElementOperatorCallback> & callback,const int mode)44 bool AccessibleAbilityChannelProxy::SearchElementInfoByAccessibilityId(const int accessibilityWindowId,
45 const long elementId, const int requestId, const sptr<IAccessibilityElementOperatorCallback> &callback,
46 const int mode)
47 {
48 (void)accessibilityWindowId;
49 (void)elementId;
50 (void)requestId;
51 (void)callback;
52 (void)mode;
53 return true;
54 }
55
SearchElementInfosByText(const int accessibilityWindowId,const long elementId,const std::string & text,const int requestId,const sptr<IAccessibilityElementOperatorCallback> & callback)56 bool AccessibleAbilityChannelProxy::SearchElementInfosByText(const int accessibilityWindowId,
57 const long elementId, const std::string &text, const int requestId,
58 const sptr<IAccessibilityElementOperatorCallback> &callback)
59 {
60 (void)accessibilityWindowId;
61 (void)elementId;
62 (void)text;
63 (void)requestId;
64 (void)callback;
65 return true;
66 }
67
FindFocusedElementInfo(const int accessibilityWindowId,const long elementId,const int focusType,const int requestId,const sptr<IAccessibilityElementOperatorCallback> & callback)68 bool AccessibleAbilityChannelProxy::FindFocusedElementInfo(const int accessibilityWindowId,
69 const long elementId, const int focusType, const int requestId,
70 const sptr<IAccessibilityElementOperatorCallback> &callback)
71 {
72 (void)accessibilityWindowId;
73 (void)elementId;
74 (void)focusType;
75 (void)requestId;
76 (void)callback;
77 return true;
78 }
79
FocusMoveSearch(const int accessibilityWindowId,const long elementId,const int direction,const int requestId,const sptr<IAccessibilityElementOperatorCallback> & callback)80 bool AccessibleAbilityChannelProxy::FocusMoveSearch(const int accessibilityWindowId, const long elementId,
81 const int direction, const int requestId, const sptr<IAccessibilityElementOperatorCallback> &callback)
82 {
83 (void)accessibilityWindowId;
84 (void)elementId;
85 (void)direction;
86 (void)requestId;
87 (void)callback;
88 return true;
89 }
90
ExecuteAction(const int accessibilityWindowId,const long elementId,const int action,std::map<std::string,std::string> & actionArguments,const int requestId,const sptr<IAccessibilityElementOperatorCallback> & callback)91 bool AccessibleAbilityChannelProxy::ExecuteAction(const int accessibilityWindowId, const long elementId,
92 const int action, std::map<std::string, std::string> &actionArguments, const int requestId,
93 const sptr<IAccessibilityElementOperatorCallback> &callback)
94 {
95 (void)accessibilityWindowId;
96 (void)elementId;
97 (void)action;
98 (void)actionArguments;
99 (void)requestId;
100 (void)callback;
101 return true;
102 }
103
GetWindows()104 vector<AccessibilityWindowInfo> AccessibleAbilityChannelProxy::GetWindows()
105 {
106 vector<AccessibilityWindowInfo> windows {};
107 return windows;
108 }
109
ExecuteCommonAction(const int action)110 bool AccessibleAbilityChannelProxy::ExecuteCommonAction(const int action)
111 {
112 (void)action;
113 return true;
114 }
115
SetOnKeyPressEventResult(const bool handled,const int sequence)116 void AccessibleAbilityChannelProxy::SetOnKeyPressEventResult(const bool handled, const int sequence)
117 {
118 (void)handled;
119 (void)sequence;
120 }
121
GetDisplayResizeScale(const int displayId)122 float AccessibleAbilityChannelProxy::GetDisplayResizeScale(const int displayId)
123 {
124 (void)displayId;
125 return 0;
126 }
127
GetDisplayResizeCenterX(const int displayId)128 float AccessibleAbilityChannelProxy::GetDisplayResizeCenterX(const int displayId)
129 {
130 (void)displayId;
131 return 0;
132 }
133
GetDisplayResizeCenterY(const int displayId)134 float AccessibleAbilityChannelProxy::GetDisplayResizeCenterY(const int displayId)
135 {
136 (void)displayId;
137 return 0;
138 }
139
GetDisplayResizeRect(const int displayId)140 Rect AccessibleAbilityChannelProxy::GetDisplayResizeRect(const int displayId)
141 {
142 (void)displayId;
143 Rect rect(0, 0, 0, 0);
144 return rect;
145 }
146
ResetDisplayResize(const int displayId,const bool animate)147 bool AccessibleAbilityChannelProxy::ResetDisplayResize(const int displayId, const bool animate)
148 {
149 (void)displayId;
150 (void)animate;
151 return true;
152 }
153
SetDisplayResizeScaleAndCenter(const int displayId,const float scale,const float centerX,const float centerY,const bool animate)154 bool AccessibleAbilityChannelProxy::SetDisplayResizeScaleAndCenter(const int displayId, const float scale,
155 const float centerX, const float centerY, const bool animate)
156 {
157 (void)displayId;
158 (void)scale;
159 (void)centerX;
160 (void)centerY;
161 (void)animate;
162 return true;
163 }
164
SendSimulateGesture(const int requestId,const std::vector<GesturePathDefine> & gestureSteps)165 void AccessibleAbilityChannelProxy::SendSimulateGesture(
166 const int requestId, const std::vector<GesturePathDefine> &gestureSteps)
167 {
168 (void)requestId;
169 (void)gestureSteps;
170 }
171 } // namespace Accessibility
172 } // namespace OHOS