• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021-2022 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_HCAPTURE_SESSION_PROXY_H
17 #define OHOS_CAMERA_HCAPTURE_SESSION_PROXY_H
18 
19 #include "icapture_session.h"
20 #include "iremote_proxy.h"
21 #include <cstdint>
22 
23 namespace OHOS {
24 namespace CameraStandard {
25 class HCaptureSessionProxy : public IRemoteProxy<ICaptureSession> {
26 public:
27     explicit HCaptureSessionProxy(const sptr<IRemoteObject> &impl);
28 
29     virtual ~HCaptureSessionProxy() = default;
30 
31     int32_t BeginConfig() override;
32 
33     int32_t CanAddInput(sptr<ICameraDeviceService> cameraDevice, bool& result) override;
34 
35     int32_t AddInput(sptr<ICameraDeviceService> cameraDevice) override;
36 
37     int32_t AddOutput(StreamType streamType, sptr<IStreamCommon> stream) override;
38 
39     int32_t RemoveInput(sptr<ICameraDeviceService> cameraDevice) override;
40 
41     int32_t RemoveOutput(StreamType streamType, sptr<IStreamCommon> stream) override;
42 
43     int32_t CommitConfig() override;
44 
45     int32_t Start() override;
46 
47     int32_t Stop() override;
48 
49     int32_t Release() override;
50 
51     int32_t SetCallback(sptr<ICaptureSessionCallback> &callback) override;
52 
53     int32_t UnSetCallback() override;
54 
55     int32_t GetSessionState(CaptureSessionState &sessionState) override;
56 
57     int32_t SetSmoothZoom(int32_t smoothZoomType, int32_t operationMode,
58         float targetZoomRatio, float &duration) override;
59 
60     int32_t GetActiveColorSpace(ColorSpace& colorSpace) override;
61 
62     int32_t SetColorSpace(ColorSpace colorSpace, bool isNeedUpdate) override;
63 
64     int32_t SetFeatureMode(int32_t featureMode) override;
65 
66     int32_t EnableMovingPhoto(bool isEnable) override;
67 
68     int32_t EnableMovingPhotoMirror(bool isMirror, bool isConfig) override;
69 
70     int32_t SetPreviewRotation(std::string &deviceClass) override;
71 
72     int32_t SetCommitConfigFlag(bool isNeedCommitting) override;
73 private:
74     static inline BrokerDelegator<HCaptureSessionProxy> delegator_;
75 };
76 } // namespace CameraStandard
77 } // namespace OHOS
78 #endif // OHOS_CAMERA_HCAPTURE_SESSION_PROXY_H
79