1 /*
2  * Copyright (c) 2021 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 HOS_CAMERA_FLASH_MANAGER_H
17 #define HOS_CAMERA_FLASH_MANAGER_H
18 
19 #include "imanager.h"
20 #include "device_manager_adapter.h"
21 #include "flash_controller.h"
22 
23 namespace OHOS::Camera {
24 class FlashManager : public IManager {
25 public:
26     FlashManager();
27     explicit FlashManager(ManagerId managerId);
28     virtual ~FlashManager();
29     RetCode CreateController(ControllerId controllerId, std::string hardwareName);
30     std::shared_ptr<IController> GetController(ControllerId controllerId, std::string hardwareName);
31     RetCode PowerUp(std::string hardwareName);
32     RetCode PowerDown(std::string hardwareName);
33     void Configure(std::shared_ptr<CameraMetadata> meta);
SetAbilityMetaDataTag(std::vector<int32_t> abilityMetaDataTag,std::string hardwareName)34     void SetAbilityMetaDataTag(std::vector<int32_t> abilityMetaDataTag, std::string hardwareName)
35     {
36         (void)abilityMetaDataTag;
37         (void)hardwareName;
38         return;
39     }
40     RetCode SetFlashlight(FlashMode flashMode, bool enable, std::string hardwareName);
41 private:
42     bool CheckCameraIdList(std::string hardwareName);
43     std::vector<std::shared_ptr<FlashController>> flashList_;
44 };
45 } // namespace OHOS::Camera
46 #endif