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 CameraPhotoProxy(BufferHandle* bufferHandle, int32_t format, int32_t photoWidth, 31 int32_t photoHeight, bool isHighQuality, int32_t captureId, int32_t burstSeqId); 32 virtual ~CameraPhotoProxy(); 33 void ReadFromParcel(MessageParcel &parcel); 34 void WriteToParcel(MessageParcel &parcel); 35 void SetDeferredAttrs(std::string photoId, int32_t deferredProcType, uint64_t fileSize, int32_t imageFormat); 36 void SetLocation(double latitude, double longitude); 37 void SetCloudImageEnhanceFlag(uint32_t cloudImageEnhanceFlag); 38 int32_t CameraFreeBufferHandle(); 39 40 BufferHandle* bufferHandle_; 41 int32_t format_; 42 int32_t photoWidth_; 43 int32_t photoHeight_; 44 size_t fileSize_; 45 bool isHighQuality_; 46 std::mutex mutex_; 47 std::string photoId_; 48 int32_t deferredProcType_; 49 int32_t isDeferredPhoto_; 50 double latitude_; 51 double longitude_; 52 int32_t captureId_; 53 int32_t burstSeqId_; 54 sptr<Surface> photoSurface_; 55 int32_t imageFormat_; 56 uint32_t cloudImageEnhanceFlag_; 57 }; 58 } // namespace CameraStandard 59 } // namespace OHOS 60 #endif // OHOS_CAMERA_DEFERRED_PHOTO_PROXY_H