• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2024 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 #include "core/common/ai/data_detector_adapter.h"
16 
17 namespace OHOS::Ace {
InitTextDetect(int32_t startPos,std::string detectText)18 void DataDetectorAdapter::InitTextDetect(int32_t startPos, std::string detectText) {}
SetTextDetectTypes(const std::string & types)19 void DataDetectorAdapter::SetTextDetectTypes(const std::string& types) {}
ParseAIResult(const TextDataDetectResult & result,int32_t startPos)20 void DataDetectorAdapter::ParseAIResult(const TextDataDetectResult& result, int32_t startPos) {}
ParseAIJson(const std::unique_ptr<JsonValue> & jsonValue,TextDataDetectType type,int32_t startPos)21 void DataDetectorAdapter::ParseAIJson(
22     const std::unique_ptr<JsonValue>& jsonValue, TextDataDetectType type, int32_t startPos) {}
StartAITask()23 void DataDetectorAdapter::StartAITask() {}
24 
ShowUIExtensionMenu(const AISpan & aiSpan,NG::RectF aiRect,const RefPtr<NG::FrameNode> & targetNode)25 bool DataDetectorAdapter::ShowUIExtensionMenu(
26     const AISpan& aiSpan, NG::RectF aiRect, const RefPtr<NG::FrameNode>& targetNode)
27 {
28     return true;
29 }
30 
ResponseBestMatchItem(const AISpan & aiSpan)31 void DataDetectorAdapter::ResponseBestMatchItem(const AISpan& aiSpan) {}
32 
GetOnReceive(const RefPtr<NG::FrameNode> & uiExtNode,NG::RectF aiRect,const RefPtr<NG::FrameNode> & targetNode)33 std::function<void(const AAFwk::WantParams&)> DataDetectorAdapter::GetOnReceive(
34     const RefPtr<NG::FrameNode>& uiExtNode, NG::RectF aiRect, const RefPtr<NG::FrameNode>& targetNode)
35 {
36     return [](const AAFwk::WantParams& wantParams) {};
37 }
38 } // namespace OHOS::Ace
39