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_RECORDS_VO_H 17 #define OHOS_MEDIA_CLOUD_SYNC_ON_FETCH_RECORDS_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 "on_fetch_photos_vo.h" 26 #include "cloud_file_data_vo.h" 27 #include "media_itypes_utils.h" 28 #include "cloud_media_define.h" 29 30 namespace OHOS::Media::CloudSync { 31 class EXPORT OnFetchRecordsReqBody : public IPC::IMediaParcelable { 32 public: 33 std::vector<OnFetchPhotosVo> onFetchPhotos; 34 35 public: // functions of Parcelable. 36 virtual ~OnFetchRecordsReqBody() = default; 37 bool Unmarshalling(MessageParcel &parcel) override; 38 bool Marshalling(MessageParcel &parcel) const override; 39 40 public: 41 int32_t AddOnFetchPhotoData(const OnFetchPhotosVo &data); 42 std::vector<OnFetchPhotosVo> GetOnFetchPhotoData(); 43 44 public: // basic functions 45 std::string ToString() const; 46 }; 47 48 class EXPORT OnFetchRecordsRespBody : public IPC::IMediaParcelable { 49 public: 50 std::vector<std::string> failedRecords; 51 std::vector<int32_t> stats{0, 0, 0, 0, 0}; 52 std::vector<PhotosVo> newDatas; 53 std::vector<PhotosVo> fdirtyDatas; 54 55 public: // functions of Parcelable. 56 virtual ~OnFetchRecordsRespBody() = default; 57 bool Unmarshalling(MessageParcel &parcel) override; 58 bool Marshalling(MessageParcel &parcel) const override; 59 60 public: // basic functions 61 std::string ToString() const; 62 }; 63 } // namespace OHOS::Media::CloudSync 64 #endif // OHOS_MEDIA_CLOUD_SYNC_ON_FETCH_RECORDS_VO_H