• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #ifndef MOCK_ACCESSIBLE_ABILITY_MANAGER_SERVICE_IMPL_H
17 #define MOCK_ACCESSIBLE_ABILITY_MANAGER_SERVICE_IMPL_H
18 
19 #include <cstdint>
20 #include <list>
21 #include <vector>
22 #include "accessible_ability_manager_service_interface.h"
23 #include "accessibility_ability_info.h"
24 #include "accessible_ability_manager_service_state_interface.h"
25 #include "accessibility_event_info.h"
26 #include "accessibility_element_operator_interface.h"
27 #include "iremote_broker.h"
28 #include "iremote_object.h"
29 
30 namespace OHOS {
31 namespace Accessibility {
32 /*
33 * The class define the interface to call ABMS API.
34 */
35 class MockAccessibleAbilityManagerServiceClientImpl : public IAccessibleAbilityManagerServiceClient {
36 public:
SendEvent(const AccessibilityEventInfo & uiEvent,const int accountId)37     void SendEvent(const AccessibilityEventInfo &uiEvent, const int accountId) {}
38 
RegisterStateCallback(const sptr<IAccessibleAbilityManagerServiceState> & callback,const int accountId)39     uint32_t RegisterStateCallback(const sptr<IAccessibleAbilityManagerServiceState> &callback, const int accountId)
40     {
41         return 1;
42     }
43 
GetAbilityList(const uint32_t abilityTypes,const int32_t stateType)44     std::vector<AccessibilityAbilityInfo> GetAbilityList(const uint32_t abilityTypes, const int32_t stateType)
45     {
46         AccessibilityAbilityInfo info {};
47         std::vector<AccessibilityAbilityInfo> infos;
48         infos.push_back(info);
49         return infos;
50     }
51 
RegisterElementOperator(const int windowId,const sptr<IAccessibilityElementOperator> & operation,const int accountId)52     void RegisterElementOperator(const int windowId, const sptr<IAccessibilityElementOperator> &operation,
53         const int accountId)
54     {
55     }
56 
DeregisterElementOperator(const int windowId)57     void DeregisterElementOperator(const int windowId)
58     {
59     }
60 };
61 } // namespace Accessibility
62 } // namespace OHOS
63 #endif