• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2024-2024 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_PHOTO_PROXY_H
17 #define OHOS_CAMERA_PHOTO_PROXY_H
18 
19 #include "message_parcel.h"
20 #include "surface.h"
21 
22 namespace OHOS {
23 namespace CameraStandard {
24 
25 class CameraPhotoProxy : public RefBase {
26 public:
27     CameraPhotoProxy();
28     CameraPhotoProxy(BufferHandle* bufferHandle, int32_t format, int32_t photoWidth,
29         int32_t photoHeight, bool isHighQuality, int32_t captureId);
30     virtual ~CameraPhotoProxy();
31     void ReadFromParcel(MessageParcel &parcel);
32     void WriteToParcel(MessageParcel &parcel);
33     void SetDeferredAttrs(std::string photoId, int32_t deferredProcType, uint64_t fileSize, int32_t imageFormat);
34     void SetLocation(double latitude, double longitude);
35     int32_t CameraFreeBufferHandle();
36 
37     BufferHandle* bufferHandle_;
38     int32_t format_;
39     int32_t photoWidth_;
40     int32_t photoHeight_;
41     size_t fileSize_;
42     bool isHighQuality_;
43     std::mutex mutex_;
44     std::string photoId_;
45     int32_t deferredProcType_;
46     int32_t isDeferredPhoto_;
47     double latitude_;
48     double longitude_;
49     int32_t captureId_;
50     sptr<Surface> photoSurface_;
51     int32_t imageFormat_;
52 };
53 } // namespace CameraStandard
54 } // namespace OHOS
55 #endif // OHOS_CAMERA_DEFERRED_PHOTO_PROXY_H