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> ¶m) { return DCAMERA_OK; } UnRegister(std::shared_ptr<DCameraRegistParam> & param)32 int32_t UnRegister(std::shared_ptr<DCameraRegistParam> ¶m) { return DCAMERA_OK; } OpenCamera()33 int32_t OpenCamera() { return DCAMERA_OK; } CloseCamera()34 int32_t CloseCamera() { return DCAMERA_OK; } ConfigStreams(std::vector<std::shared_ptr<DCStreamInfo>> & streamInfos)35 int32_t ConfigStreams(std::vector<std::shared_ptr<DCStreamInfo>> &streamInfos) { return DCAMERA_OK; } ReleaseStreams(std::vector<int> & streamIds,bool & isAllRelease)36 int32_t ReleaseStreams(std::vector<int> &streamIds, bool &isAllRelease) 37 { 38 isAllRelease = true; 39 return DCAMERA_OK; 40 } ReleaseAllStreams()41 int32_t ReleaseAllStreams() { return DCAMERA_OK; } StartCapture(std::vector<std::shared_ptr<DCCaptureInfo>> & captureInfos)42 int32_t StartCapture(std::vector<std::shared_ptr<DCCaptureInfo>> &captureInfos) { return DCAMERA_OK; } StopCapture(std::vector<int> & streamIds,bool & isAllStop)43 int32_t StopCapture(std::vector<int> &streamIds, bool &isAllStop) 44 { 45 isAllStop = true; 46 return DCAMERA_OK; 47 } StopAllCapture()48 int32_t StopAllCapture() { return DCAMERA_OK; } UpdateSettings(std::vector<std::shared_ptr<DCameraSettings>> & settings)49 int32_t UpdateSettings(std::vector<std::shared_ptr<DCameraSettings>> &settings) { return DCAMERA_OK; } CameraEventNotify(std::shared_ptr<DCameraEvent> & events)50 int32_t CameraEventNotify(std::shared_ptr<DCameraEvent> &events) { return DCAMERA_OK; } 51 52 private: 53 std::string devId_; 54 std::string dhId_; 55 std::shared_ptr<ICameraStateListener> stateLisener_; 56 }; 57 } // namespace DistributedHardware 58 } // namespace OHOS 59 #endif