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 #include "camera_manager_adapter_impl.h"
17 
18 namespace OHOS::NWeb {
GetInstance()19 CameraManagerAdapterImpl& CameraManagerAdapterImpl::GetInstance()
20 {
21     static CameraManagerAdapterImpl instance;
22     return instance;
23 }
24 
Create(std::shared_ptr<CameraStatusCallbackAdapter> cameraStatusCallback)25 int32_t CameraManagerAdapterImpl::Create(std::shared_ptr<CameraStatusCallbackAdapter> cameraStatusCallback)
26 {
27     return -1;
28 }
29 
GetDevicesInfo()30 std::vector<std::shared_ptr<VideoDeviceDescriptorAdapter>> CameraManagerAdapterImpl::GetDevicesInfo()
31 {
32     return std::vector<std::shared_ptr<VideoDeviceDescriptorAdapter>>();
33 }
34 
GetExposureModes(std::vector<ExposureModeAdapter> & exposureModesAdapter)35 int32_t CameraManagerAdapterImpl::GetExposureModes(std::vector<ExposureModeAdapter>& exposureModesAdapter)
36 {
37     return -1;
38 }
39 
GetCurrentExposureMode(ExposureModeAdapter & exposureModeAdapter)40 int32_t CameraManagerAdapterImpl::GetCurrentExposureMode(ExposureModeAdapter& exposureModeAdapter)
41 {
42     return -1;
43 }
44 
GetCaptionRangeById(RangeIDAdapter rangeId)45 std::shared_ptr<VideoCaptureRangeAdapter> CameraManagerAdapterImpl::GetCaptionRangeById(RangeIDAdapter rangeId)
46 {
47     return nullptr;
48 }
49 
IsFocusModeSupported(FocusModeAdapter focusMode)50 bool CameraManagerAdapterImpl::IsFocusModeSupported(FocusModeAdapter focusMode)
51 {
52     return false;
53 }
54 
GetCurrentFocusMode()55 FocusModeAdapter CameraManagerAdapterImpl::GetCurrentFocusMode()
56 {
57     return FocusModeAdapter::FOCUS_MODE_MANUAL;
58 }
59 
IsFlashModeSupported(FlashModeAdapter focusMode)60 bool CameraManagerAdapterImpl::IsFlashModeSupported(FlashModeAdapter focusMode)
61 {
62     return false;
63 }
64 
RestartSession()65 int32_t CameraManagerAdapterImpl::RestartSession()
66 {
67     return -1;
68 }
69 
StopSession(CameraStopType stopType)70 int32_t CameraManagerAdapterImpl::StopSession(CameraStopType stopType)
71 {
72     return -1;
73 }
74 
ReleaseCameraManger()75 int32_t CameraManagerAdapterImpl::ReleaseCameraManger()
76 {
77     return -1;
78 }
79 
GetCameraStatus()80 CameraStatusAdapter CameraManagerAdapterImpl::GetCameraStatus()
81 {
82     return CameraStatusAdapter::UNAVAILABLE;
83 }
84 
SetCameraStatus(CameraStatusAdapter status)85 void CameraManagerAdapterImpl::SetCameraStatus(CameraStatusAdapter status) {}
86 
GetCurrentDeviceId()87 std::string CameraManagerAdapterImpl::GetCurrentDeviceId()
88 {
89     return std::string();
90 }
91 
IsExistCaptureTask()92 bool CameraManagerAdapterImpl::IsExistCaptureTask()
93 {
94     return false;
95 }
96 
SetForegroundFlag(bool isForeground)97 void CameraManagerAdapterImpl::SetForegroundFlag(bool isForeground) {}
98 
StartStream(const std::string & deviceId,const std::shared_ptr<VideoCaptureParamsAdapter> captureParams,std::shared_ptr<CameraBufferListenerAdapter> listener)99 int32_t CameraManagerAdapterImpl::StartStream(const std::string& deviceId,
100     const std::shared_ptr<VideoCaptureParamsAdapter> captureParams,
101     std::shared_ptr<CameraBufferListenerAdapter> listener)
102 {
103     return -1;
104 }
105 } // namespace OHOS::NWeb
106