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_CLOUDSYNC_CLOUD_MEDIA_PULL_DATA_H 17 #define OHOS_MEDIA_CLOUDSYNC_CLOUD_MEDIA_PULL_DATA_H 18 19 #include <string> 20 #include <vector> 21 #include <sstream> 22 #include "cloud_media_define.h" 23 24 namespace OHOS::Media::CloudSync { 25 class EXPORT CloudMediaPullDataDto { 26 public: 27 // key 28 std::string cloudId; 29 // basic 30 bool basicIsDelete{false}; 31 int64_t basicSize{-1}; 32 std::string basicDisplayName; 33 std::string basicMimeType; 34 std::string basicDeviceName; 35 int64_t modifiedTime{-1}; 36 int64_t basicEditedTime{-1}; 37 int64_t basicCreatedTime{-1}; 38 int64_t dateTaken{-1}; 39 int32_t basicIsFavorite{-1}; 40 int32_t basicIsRecycle{-1}; 41 int64_t basicRecycledTime{-1}; 42 std::string basicDescription; 43 int32_t basicFileType{-1}; 44 std::string basicFileName; 45 int64_t basicCloudVersion{-1}; 46 int32_t duration{-1}; /* duration */ 47 // "attributes" 48 bool hasAttributes{false}; 49 std::string attributesTitle; /* title */ 50 int32_t attributesMediaType{-1}; /* media_type */ 51 int32_t attributesHidden{-1}; /* hidden */ 52 int64_t attributesHiddenTime{-1}; /* hidden_time */ 53 std::string attributesRelativePath; /* relative_path */ 54 std::string attributesVirtualPath; /* virtual_path */ 55 std::string attributesPath; /* data */ 56 int64_t attributesMetaDateModified{-1}; /* meta_date_modified */ 57 int32_t attributesSubtype{-1}; /* subtype */ 58 int32_t attributesBurstCoverLevel{-1}; /* burst_cover_level */ 59 std::string attributesBurstKey; /* burst_key */ 60 std::string attributesDateYear; /* date_year */ 61 std::string attributesDateMonth; /* date_month */ 62 std::string attributesDateDay; /* date_day */ 63 std::string attributesShootingMode; /* shooting_mode */ 64 std::string attributesShootingModeTag; /* shooting_mode_tag */ 65 int32_t attributesDynamicRangeType{-1}; /* dynamic_range_type */ 66 std::string attributesFrontCamera; /* front_camera */ 67 int64_t attributesEditTime{-1}; /* edit_time */ 68 int32_t attributesOriginalSubtype{-1}; /* original_subtype */ 69 int64_t attributesCoverPosition{-1}; /* cover_position */ 70 int32_t attributesIsRectificationCover{-1}; /* is_rectification_cover */ 71 int32_t exifRotate{-1}; /* exif_rotate*/ 72 int32_t attributesMovingPhotoEffectMode{-1}; /* moving_photo_effect_mode */ 73 int32_t attributesSupportedWatermarkType{-1}; /* supported_watermark_type */ 74 int32_t attributesStrongAssociation{-1}; /* strong_association */ 75 int32_t attributesFileId{-1}; /* file_id */ 76 std::string attributesCloudId; /* cloud_id */ 77 std::string attributesOriginCloudId; /* origin cloud_id */ 78 79 int64_t attributesEditedTimeMs{-1}; /* editedTime_ms */ 80 int32_t attributesFixVersion{-1}; 81 std::string attributesEditDataCamera; 82 std::vector<std::string> attributesSrcAlbumIds; 83 // "properties" 84 bool hasProperties{false}; 85 std::string propertiesSourceFileName; 86 std::string propertiesSourcePath; 87 int32_t propertiesRotate{-1}; 88 double latitude; 89 double longitude; 90 int32_t propertiesHeight{-1}; 91 int32_t propertiesWidth{-1}; 92 std::string propertiesFirstUpdateTime; 93 std::string propertiesDetailTime; 94 95 // local data 96 int32_t localFileId{-1}; 97 std::string localPath; 98 int64_t localSize{-1}; 99 int64_t lcdSize{-1}; 100 int64_t thmSize{-1}; 101 int32_t localMediaType{-1}; 102 std::string localDateAdded; 103 std::string localDateModified; 104 int32_t localDirty{-1}; 105 int32_t localPosition{-1}; 106 std::string localOwnerAlbumId; 107 int32_t localOrientation{-1}; 108 int32_t localThumbState{-1}; 109 std::string localOriginalAssetCloudId; 110 int32_t localExifRotate{-1}; 111 112 public: // basic function 113 std::string ToString() const; 114 115 private: 116 void GetBasicInfo(std::stringstream &ss) const; 117 void GetAttributesInfo(std::stringstream &ss) const; 118 void GetPropertiesInfo(std::stringstream &ss) const; 119 void GetCloudInfo(std::stringstream &ss) const; 120 void GetAlbumIds(std::stringstream &ss) const; 121 }; 122 } // namespace OHOS::Media::CloudSync 123 #endif // OHOS_MEDIA_CLOUDSYNC_CLOUD_MEDIA_PULL_DATA_H 124