1 /* 2 * Copyright 2009-2018 Alibaba Cloud All rights reserved. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #pragma once 18 #include <alibabacloud/oss/Export.h> 19 #include <alibabacloud/oss/Types.h> 20 #include <alibabacloud/oss/encryption/ContentCryptoMaterial.h> 21 22 namespace AlibabaCloud 23 { 24 namespace OSS 25 { 26 class ALIBABACLOUD_OSS_EXPORT MultipartUploadCryptoContext 27 { 28 public: MultipartUploadCryptoContext()29 MultipartUploadCryptoContext():dataSize_(0), partSize_(0) {} ~MultipartUploadCryptoContext()30 ~MultipartUploadCryptoContext() {} ContentMaterial()31 const ContentCryptoMaterial& ContentMaterial() const { return content_; } UploadId()32 const std::string& UploadId() const { return uploadId_; } PartSize()33 int64_t PartSize() const { return partSize_; } DataSize()34 int64_t DataSize() const { return dataSize_; } 35 setContentMaterial(const ContentCryptoMaterial & content)36 void setContentMaterial(const ContentCryptoMaterial& content) { content_ = content; } setUploadId(const std::string & uploadId)37 void setUploadId(const std::string& uploadId) { uploadId_ = uploadId; } setPartSize(int64_t size)38 void setPartSize(int64_t size) { partSize_ = size; } setDataSize(int64_t size)39 void setDataSize(int64_t size) { dataSize_ = size; } 40 private: 41 ContentCryptoMaterial content_; 42 int64_t dataSize_; 43 int64_t partSize_; 44 std::string uploadId_; 45 }; 46 } 47 } 48