1 /* 2 * Copyright (c) 2022-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 ID_CAMERA_PROVIDER_CASE_H_ 17 #define ID_CAMERA_PROVIDER_CASE_H_ 18 19 #include "dcamera_source_dev.h" 20 #include "distributed_camera_errno.h" 21 #include "idistributed_camera_source.h" 22 23 namespace OHOS { 24 namespace DistributedHardware { 25 class HdiDCameraSourceDev : public DCameraSourceDev { 26 public: HdiDCameraSourceDev(std::string devId,std::string dhId,std::shared_ptr<ICameraStateListener> & stateLisener)27 HdiDCameraSourceDev(std::string devId, std::string dhId, std::shared_ptr<ICameraStateListener>& stateLisener) 28 : DCameraSourceDev(devId, dhId, stateLisener) {}; 29 ~HdiDCameraSourceDev() = default; 30 Register(std::shared_ptr<DCameraRegistParam> & param)31 int32_t Register(std::shared_ptr<DCameraRegistParam>& param) 32 { 33 return DCAMERA_OK; 34 } UnRegister(std::shared_ptr<DCameraRegistParam> & param)35 int32_t UnRegister(std::shared_ptr<DCameraRegistParam>& param) 36 { 37 return DCAMERA_OK; 38 } OpenCamera()39 int32_t OpenCamera() 40 { 41 return DCAMERA_OK; 42 } CloseCamera()43 int32_t CloseCamera() 44 { 45 return DCAMERA_OK; 46 } ConfigStreams(std::vector<std::shared_ptr<DCStreamInfo>> & streamInfos)47 int32_t ConfigStreams(std::vector<std::shared_ptr<DCStreamInfo>>& streamInfos) 48 { 49 return DCAMERA_OK; 50 } ReleaseStreams(std::vector<int> & streamIds,bool & isAllRelease)51 int32_t ReleaseStreams(std::vector<int>& streamIds, bool& isAllRelease) 52 { 53 isAllRelease = true; 54 return DCAMERA_OK; 55 } ReleaseAllStreams()56 int32_t ReleaseAllStreams() 57 { 58 return DCAMERA_OK; 59 } StartCapture(std::vector<std::shared_ptr<DCCaptureInfo>> & captureInfos)60 int32_t StartCapture(std::vector<std::shared_ptr<DCCaptureInfo>>& captureInfos) 61 { 62 return DCAMERA_OK; 63 } StopCapture(std::vector<int> & streamIds,bool & isAllStop)64 int32_t StopCapture(std::vector<int>& streamIds, bool& isAllStop) 65 { 66 isAllStop = true; 67 return DCAMERA_OK; 68 } StopAllCapture()69 int32_t StopAllCapture() 70 { 71 return DCAMERA_OK; 72 } UpdateSettings(std::vector<std::shared_ptr<DCameraSettings>> & settings)73 int32_t UpdateSettings(std::vector<std::shared_ptr<DCameraSettings>>& settings) 74 { 75 return DCAMERA_OK; 76 } CameraEventNotify(std::shared_ptr<DCameraEvent> & events)77 int32_t CameraEventNotify(std::shared_ptr<DCameraEvent>& events) 78 { 79 return DCAMERA_OK; 80 } 81 82 private: 83 std::string devId_; 84 std::string dhId_; 85 std::shared_ptr<ICameraStateListener> stateLisener_; 86 }; 87 } 88 } 89 #endif