1 /* 2 * Copyright (C) 2025 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_MEDIA_CLOUD_SYNC_ON_FETCH_PHOTOS_VO_H 17 #define OHOS_MEDIA_CLOUD_SYNC_ON_FETCH_PHOTOS_VO_H 18 19 #include <string> 20 #include <vector> 21 #include <sstream> 22 23 #include "i_media_parcelable.h" 24 #include "photos_vo.h" 25 #include "media_itypes_utils.h" 26 #include "cloud_media_define.h" 27 28 namespace OHOS::Media::CloudSync { 29 class EXPORT OnFetchPhotosVo : public IPC::IMediaParcelable { 30 public: 31 std::string cloudId; 32 std::string fileName; 33 std::string fileSourcePath; 34 std::string mimeType; 35 std::string firstVisitTime; // MDKRecord first_update_time 36 std::string detailTime; 37 std::string frontCamera; 38 std::string editDataCamera; 39 std::string title; 40 std::string relativePath; 41 std::string virtualPath; 42 std::string dateYear; 43 std::string dateMonth; 44 std::string dateDay; 45 std::string shootingMode; 46 std::string shootingModeTag; 47 std::string burstKey; 48 std::string localPath; 49 double latitude; 50 double longitude; 51 std::string description; 52 std::string source; // decice_name 53 int32_t fileId; 54 int32_t mediaType; 55 int32_t fileType; 56 int32_t rotation; 57 int32_t photoHeight; 58 int32_t photoWidth; 59 int32_t duration; 60 int32_t hidden; 61 int32_t burstCoverLevel; 62 int32_t subtype; 63 int32_t originalSubtype; 64 int32_t dynamicRangeType; 65 int32_t movingPhotoEffectMode; 66 int32_t supportedWatermarkType; 67 int32_t strongAssociation; 68 int64_t fixVersion; 69 int64_t version; 70 int64_t size; 71 int64_t lcdSize; 72 int64_t thmSize; 73 int64_t createTime; 74 int64_t metaDateModified; 75 int64_t dualEditTime; 76 int64_t editTime; 77 int64_t editedTimeMs; 78 int64_t recycledTime; 79 int64_t hiddenTime; 80 int64_t coverPosition; 81 int32_t isRectificationCover; 82 int32_t exifRotate; 83 bool isDelete; 84 bool hasAttributes; 85 bool hasproperties; 86 bool isFavorite; 87 bool isRecycle; 88 std::vector<std::string> sourceAlbumIds; 89 90 public: // functions of Parcelable. 91 virtual ~OnFetchPhotosVo() = default; 92 bool Unmarshalling(MessageParcel &parcel) override; 93 bool Marshalling(MessageParcel &parcel) const override; 94 95 public: // basic functions 96 std::string ToString() const; 97 98 private: 99 bool MarshallingBasicInfo(Parcel &parcel) const; 100 bool MarshallingAttributesInfo(Parcel &parcel) const; 101 bool ReadBasicInfo(Parcel &parcel); 102 bool ReadAttributesInfo(Parcel &parcel); 103 void GetBasicInfo(std::stringstream &ss) const; 104 void GetAttributesInfo(std::stringstream &ss) const; 105 }; 106 } // namespace OHOS::Media::CloudSync 107 #endif // OHOS_MEDIA_CLOUD_SYNC_ON_FETCH_PHOTOS_VO_H