1 /*
2  * Copyright (C) 2023 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 FOUNDATION_ACE_INTERFACE_INNERKITS_IMAGE_ANALYZER_MGR_H
17 #define FOUNDATION_ACE_INTERFACE_INNERKITS_IMAGE_ANALYZER_MGR_H
18 
19 #include "image_analyzer_loader.h"
20 
21 #include "base/utils/macros.h"
22 
23 namespace OHOS::Ace {
24 
25 class ACE_EXPORT ImageAnalyzerMgr final : public ImageAnalyzerInterface {
26 public:
27     static ImageAnalyzerMgr& GetInstance();
28 
29     bool IsImageAnalyzerSupported() override;
30     void BuildNodeFunc(void* pixelMap, void* config,
31         ImageAnalyzerInnerConfig* uiConfig, void** overlayData) override;
32     void UpdateImage(void** overlayData,  void* pixelMap, void* config,
33         ImageAnalyzerInnerConfig* uiConfig) override;
34     void UpdateConfig(void** overlayData, void* config) override;
35     void UpdateInnerConfig(void** overlayData, ImageAnalyzerInnerConfig* config) override;
36     void Release(void** overlayData) override;
37     void UpdatePressOverlay(void** overlayData, ImageAnalyzerInnerConfig* config) override;
38     void UpdateOverlayStatus(void** overlayData, ImageAnalyzerInnerConfig* config) override;
39     void UpdateOverlayActiveStatus(void** overlayData, bool status) override;
40     void UpdateAIButtonConfig(void** overlayData, AIButtonConfig* config) override;
41 
42 private:
43     ImageAnalyzerMgr();
44     ~ImageAnalyzerMgr() = default;
45     ImageAnalyzerInstance engine_ = nullptr;
46 };
47 } // namespace OHOS::Ace
48 #endif // FOUNDATION_ACE_INTERFACE_INNERKITS_IMAGE_ANALYZER_MGR_H
49