123b3eb3cSopenharmony_ci/*
223b3eb3cSopenharmony_ci * Copyright (c) 2022 Huawei Device Co., Ltd.
323b3eb3cSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
423b3eb3cSopenharmony_ci * you may not use this file except in compliance with the License.
523b3eb3cSopenharmony_ci * You may obtain a copy of the License at
623b3eb3cSopenharmony_ci *
723b3eb3cSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
823b3eb3cSopenharmony_ci *
923b3eb3cSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
1023b3eb3cSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
1123b3eb3cSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1223b3eb3cSopenharmony_ci * See the License for the specific language governing permissions and
1323b3eb3cSopenharmony_ci * limitations under the License.
1423b3eb3cSopenharmony_ci */
1523b3eb3cSopenharmony_ci
1623b3eb3cSopenharmony_ci#include "frameworks/bridge/common/accessibility/accessibility_node_manager.h"
1723b3eb3cSopenharmony_ci
1823b3eb3cSopenharmony_cinamespace OHOS::Ace::Framework {
1923b3eb3cSopenharmony_ciclass FakeAccessibilityManager : public AccessibilityNodeManager {
2023b3eb3cSopenharmony_ci    void SearchElementInfoByAccessibilityIdNG(int64_t elementId, int32_t mode,
2123b3eb3cSopenharmony_ci        std::list<Accessibility::AccessibilityElementInfo>& infos, const RefPtr<PipelineBase>& context,
2223b3eb3cSopenharmony_ci        int64_t uiExtensionOffset) override;
2323b3eb3cSopenharmony_ci    void SearchElementInfosByTextNG(int64_t elementId, const std::string& text,
2423b3eb3cSopenharmony_ci        std::list<Accessibility::AccessibilityElementInfo>& infos, const RefPtr<PipelineBase>& context,
2523b3eb3cSopenharmony_ci        const int64_t uiExtensionOffset = 0) override;
2623b3eb3cSopenharmony_ci    void FindFocusedElementInfoNG(int64_t elementId, int32_t focusType,
2723b3eb3cSopenharmony_ci        Accessibility::AccessibilityElementInfo& info, const RefPtr<PipelineBase>& context,
2823b3eb3cSopenharmony_ci        const int64_t uiExtensionOffset = 0) override;
2923b3eb3cSopenharmony_ci    void FocusMoveSearchNG(int64_t elementId, int32_t direction, Accessibility::AccessibilityElementInfo& info,
3023b3eb3cSopenharmony_ci        const RefPtr<PipelineBase>& context, const int64_t uiExtensionOffset = 0) override;
3123b3eb3cSopenharmony_ci    bool ExecuteExtensionActionNG(int64_t elementId, const std::map<std::string, std::string>& actionArguments,
3223b3eb3cSopenharmony_ci        int32_t action, const RefPtr<PipelineBase>& context, int64_t uiExtensionOffset) override;
3323b3eb3cSopenharmony_ci};
3423b3eb3cSopenharmony_ci
3523b3eb3cSopenharmony_civoid FakeAccessibilityManager::SearchElementInfoByAccessibilityIdNG(
3623b3eb3cSopenharmony_ci    int64_t elementId,
3723b3eb3cSopenharmony_ci    int32_t mode,
3823b3eb3cSopenharmony_ci    std::list<AccessibilityElementInfo>& infos,
3923b3eb3cSopenharmony_ci    const RefPtr<PipelineBase>& context,
4023b3eb3cSopenharmony_ci    int64_t uiExtensionOffset
4123b3eb3cSopenharmony_ci)
4223b3eb3cSopenharmony_ci{
4323b3eb3cSopenharmony_ci}
4423b3eb3cSopenharmony_ci
4523b3eb3cSopenharmony_civoid FakeAccessibilityManager::SearchElementInfosByTextNG(
4623b3eb3cSopenharmony_ci    int64_t elementId,
4723b3eb3cSopenharmony_ci    const std::string& text,
4823b3eb3cSopenharmony_ci    std::list<Accessibility::AccessibilityElementInfo>& infos,
4923b3eb3cSopenharmony_ci    const RefPtr<PipelineBase>& context,
5023b3eb3cSopenharmony_ci    const int64_t uiExtensionOffset
5123b3eb3cSopenharmony_ci)
5223b3eb3cSopenharmony_ci{
5323b3eb3cSopenharmony_ci}
5423b3eb3cSopenharmony_ci
5523b3eb3cSopenharmony_civoid FakeAccessibilityManager::FindFocusedElementInfoNG(
5623b3eb3cSopenharmony_ci    int64_t elementId,
5723b3eb3cSopenharmony_ci    int32_t focusType,
5823b3eb3cSopenharmony_ci    Accessibility::AccessibilityElementInfo& info,
5923b3eb3cSopenharmony_ci    const RefPtr<PipelineBase>& context,
6023b3eb3cSopenharmony_ci    const int64_t uiExtensionOffset
6123b3eb3cSopenharmony_ci)
6223b3eb3cSopenharmony_ci{
6323b3eb3cSopenharmony_ci}
6423b3eb3cSopenharmony_ci
6523b3eb3cSopenharmony_civoid FakeAccessibilityManager::FocusMoveSearchNG(
6623b3eb3cSopenharmony_ci    int64_t elementId,
6723b3eb3cSopenharmony_ci    int32_t direction,
6823b3eb3cSopenharmony_ci    Accessibility::AccessibilityElementInfo& info,
6923b3eb3cSopenharmony_ci    const RefPtr<PipelineBase>& context,
7023b3eb3cSopenharmony_ci    const int64_t uiExtensionOffset
7123b3eb3cSopenharmony_ci)
7223b3eb3cSopenharmony_ci{
7323b3eb3cSopenharmony_ci}
7423b3eb3cSopenharmony_ci
7523b3eb3cSopenharmony_cibool FakeAccessibilityManager::ExecuteExtensionActionNG(
7623b3eb3cSopenharmony_ci    int64_t elementId,
7723b3eb3cSopenharmony_ci    const std::map<std::string, std::string>& actionArguments,
7823b3eb3cSopenharmony_ci    int32_t action,
7923b3eb3cSopenharmony_ci    const RefPtr<PipelineBase>& context,
8023b3eb3cSopenharmony_ci    int64_t uiExtensionOffset
8123b3eb3cSopenharmony_ci)
8223b3eb3cSopenharmony_ci{
8323b3eb3cSopenharmony_ci    return false;
8423b3eb3cSopenharmony_ci}
8523b3eb3cSopenharmony_ci
8623b3eb3cSopenharmony_ciRefPtr<AccessibilityNodeManager> AccessibilityNodeManager::Create()
8723b3eb3cSopenharmony_ci{
8823b3eb3cSopenharmony_ci    return AceType::MakeRefPtr<FakeAccessibilityManager>();
8923b3eb3cSopenharmony_ci}
9023b3eb3cSopenharmony_ci} // namespace OHOS::Ace::Framework
91