• 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 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 Open(int32_t concurrentTypeofcamera) override;
35 
36     int32_t Close() override;
37 
38     int32_t Release() override;
39 
40     int32_t closeDelayed() override;
41 
42     int32_t SetCallback(sptr<ICameraDeviceServiceCallback> &callback) override;
43 
44     int32_t UnSetCallback() override;
45 
46     int32_t UpdateSetting(const std::shared_ptr<OHOS::Camera::CameraMetadata> &settings) override;
47 
48     int32_t SetUsedAsPosition(uint8_t value) override;
49 
50     int32_t GetStatus(std::shared_ptr<OHOS::Camera::CameraMetadata> &metaIn,
51                 std::shared_ptr<OHOS::Camera::CameraMetadata> &metaOut) override;
52 
53     int32_t GetEnabledResults(std::vector<int32_t> &results) override;
54 
55     int32_t EnableResult(std::vector<int32_t> &results) override;
56 
57     int32_t DisableResult(std::vector<int32_t> &results) override;
58 
59     int32_t SetDeviceRetryTime() override;
60 
61 private:
62     static inline BrokerDelegator<HCameraDeviceProxy> delegator_;
63 };
64 } // namespace CameraStandard
65 } // namespace OHOS
66 #endif // OHOS_CAMERA_HCAMERA_DEVICE_PROXY_H
67