• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_IMANAGER_H
17 #define HOS_CAMERA_IMANAGER_H
18 
19 #include "icontroller.h"
20 #include "device_manager_adapter.h"
21 
22 namespace OHOS {
23 namespace Camera {
24 class IManager {
25 public:
26     IManager();
27     explicit IManager(ManagerId managerId);
28     virtual ~IManager();
29     virtual void Configure(std::shared_ptr<CameraMetadata> meta) = 0;
GetManagerId()30     ManagerId GetManagerId()
31     {
32         return managerID_;
33     }
GetController(ControllerId controllerId,std::string hardwareName)34     virtual std::shared_ptr<IController> GetController(ControllerId controllerId, std::string hardwareName)
35     {
36         (void)controllerId;
37         (void)hardwareName;
38         return nullptr;
39     }
GetController(ControllerId controllerId)40     virtual std::shared_ptr<IController> GetController(ControllerId controllerId)
41     {
42         (void)controllerId;
43         return nullptr;
44     }
CreateController(CameraId cameraId,ControllerId controllerId,std::string hardwareName)45     virtual RetCode CreateController(CameraId cameraId, ControllerId controllerId, std::string hardwareName)
46     {
47         (void)cameraId;
48         (void)controllerId;
49         (void)hardwareName;
50         return RC_OK;
51     }
CreateController(ControllerId controllerId,std::string hardwareName)52     virtual RetCode CreateController(ControllerId controllerId, std::string hardwareName)
53     {
54         (void)controllerId;
55         (void)hardwareName;
56         return RC_OK;
57     }
PowerUp(CameraId cameraId)58     virtual RetCode PowerUp(CameraId cameraId)
59     {
60         (void)cameraId;
61         return RC_OK;
62     }
PowerDown(CameraId cameraId)63     virtual RetCode PowerDown(CameraId cameraId)
64     {
65         (void)cameraId;
66         return RC_OK;
67     }
PowerUp(std::string hardwareName)68     virtual RetCode PowerUp(std::string hardwareName)
69     {
70         (void)hardwareName;
71         return RC_OK;
72     }
PowerDown(std::string hardwareName)73     virtual RetCode PowerDown(std::string hardwareName)
74     {
75         (void)hardwareName;
76         return RC_OK;
77     }
SetAbilityMetaDataTag(std::vector<int32_t> abilityMetaDataTag)78     virtual void SetAbilityMetaDataTag(std::vector<int32_t> abilityMetaDataTag)
79     {
80         (void)abilityMetaDataTag;
81     }
SetAbilityMetaDataTag(std::vector<int32_t> abilityMetaDataTag,std::string hardwareName)82     virtual void SetAbilityMetaDataTag(std::vector<int32_t> abilityMetaDataTag, std::string hardwareName)
83     {
84         (void)abilityMetaDataTag;
85         (void)hardwareName;
86     }
GetAbilityMetaData(std::shared_ptr<CameraMetadata> meta)87     virtual RetCode GetAbilityMetaData(std::shared_ptr<CameraMetadata> meta)
88     {
89         (void)meta;
90         return RC_OK;
91     }
GetAbilityMetaData(std::shared_ptr<CameraMetadata> meta,std::string hardwareName)92     virtual RetCode GetAbilityMetaData(std::shared_ptr<CameraMetadata> meta, std::string hardwareName)
93     {
94         (void)meta;
95         (void)hardwareName;
96         return RC_OK;
97     }
GetMetaDataFlag()98     virtual bool GetMetaDataFlag()
99     {
100         return false;
101     }
SetMetaDataFlag(bool metaDataFlag)102     virtual void SetMetaDataFlag(bool metaDataFlag)
103     {
104         (void)metaDataFlag;
105         return;
106     }
SetMemoryType(uint8_t & memType)107     virtual void SetMemoryType(uint8_t &memType)
108     {
109         (void)(memType);
110         return;
111     }
112 
113 private:
114     ManagerId managerID_;
115 };
116 } // namespace Camera
117 } // namespace OHOS
118 #endif