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 OHOS_CAMERA_HCAMERA_DEVICE_PROXY_H 17 #define OHOS_CAMERA_HCAMERA_DEVICE_PROXY_H 18 19 #include "icamera_device_service.h" 20 #include "iremote_proxy.h" 21 22 namespace OHOS { 23 namespace CameraStandard { 24 class HCameraDeviceProxy : public IRemoteProxy<ICameraDeviceService> { 25 public: 26 explicit HCameraDeviceProxy(const sptr<IRemoteObject> &impl); 27 28 virtual ~HCameraDeviceProxy(); 29 30 int32_t Open() override; 31 32 int32_t OpenSecureCamera(uint64_t* secureSeqId) override; 33 34 int32_t Close() override; 35 36 int32_t Release() override; 37 38 int32_t SetCallback(sptr<ICameraDeviceServiceCallback> &callback) override; 39 40 int32_t UpdateSetting(const std::shared_ptr<OHOS::Camera::CameraMetadata> &settings) override; 41 42 int32_t SetUsedAsPosition(uint8_t value) override; 43 44 int32_t GetStatus(std::shared_ptr<OHOS::Camera::CameraMetadata> &metaIn, 45 std::shared_ptr<OHOS::Camera::CameraMetadata> &metaOut) override; 46 47 int32_t GetEnabledResults(std::vector<int32_t> &results) override; 48 49 int32_t EnableResult(std::vector<int32_t> &results) override; 50 51 int32_t DisableResult(std::vector<int32_t> &results) override; 52 53 private: 54 static inline BrokerDelegator<HCameraDeviceProxy> delegator_; 55 }; 56 } // namespace CameraStandard 57 } // namespace OHOS 58 #endif // OHOS_CAMERA_HCAMERA_DEVICE_PROXY_H 59