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_DCAMERA_PHOTO_CALLBACK_H
17 #define OHOS_DCAMERA_PHOTO_CALLBACK_H
18 
19 #include "photo_output.h"
20 
21 #include "icamera_operator.h"
22 
23 namespace OHOS {
24 namespace DistributedHardware {
25 class DCameraPhotoCallback : public CameraStandard::PhotoStateCallback {
26 public:
27     explicit DCameraPhotoCallback(const std::shared_ptr<StateCallback>& callback);
28     void OnCaptureStarted(const int32_t captureID) const override;
29     void OnCaptureStarted(const int32_t captureID, uint32_t exposureTime) const override;
30     void OnCaptureEnded(const int32_t captureID, const int32_t frameCount) const override;
31     void OnFrameShutter(const int32_t captureId, const uint64_t timestamp) const override;
32     void OnFrameShutterEnd(const int32_t captureId, const uint64_t timestamp) const override;
33     void OnCaptureReady(const int32_t captureId, const uint64_t timestamp) const override;
34     void OnCaptureError(const int32_t captureId, const int32_t errorCode) const override;
35     void OnEstimatedCaptureDuration(const int32_t duration) const override;
36 
37 private:
38     std::shared_ptr<StateCallback> callback_;
39 };
40 } // namespace DistributedHardware
41 } // namespace OHOS
42 #endif // OHOS_DCAMERA_PHOTO_CALLBACK_H