Skip to content

Commit

Permalink
Merge pull request #15 from aliyun/dev-1905
Browse files Browse the repository at this point in the history
Dev 1905
  • Loading branch information
huiguangjun authored May 25, 2019
2 parents d5d4dc8 + ee12a0b commit cd4261f
Show file tree
Hide file tree
Showing 40 changed files with 3,353 additions and 1,386 deletions.
121 changes: 62 additions & 59 deletions sdk/include/alibabacloud/oss/Const.h
Original file line number Diff line number Diff line change
@@ -1,59 +1,62 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#pragma once
#include <cstdint>

namespace AlibabaCloud
{
namespace OSS
{
const int64_t MaxFileSize = 5LL * 1024LL * 1024LL * 1024LL;
const int32_t MaxPrefixStringSize = 1024;
const int32_t MaxMarkerStringSize = 1024;
const int32_t MaxDelimiterStringSize = 1024;
const int32_t MaxReturnedKeys = 1000;
const int32_t MaxUploads = 1000;
const int32_t DeleteObjectsUpperLimit = 1000;
const int32_t BucketCorsRuleLimit = 10;
const int32_t LifecycleRuleLimit = 1000;
const int32_t ObjectNameLengthLimit = 1023;
const int32_t PartNumberUpperLimit = 10000;
const int32_t DefaultPartSize = 8 * 1024 * 1024;
const int32_t PartSizeLowerLimit = 100 * 1024;
const int32_t MaxPathLength = 124;
const int32_t MinPathLength = 4;
const int32_t DefaultResumableThreadNum = 3;
const uint32_t MaxLiveChannelNameLength = 1023;
const uint32_t MaxLiveChannelDescriptionLength = 128;
const uint32_t MinLiveChannelFragCount = 1;
const uint32_t MaxLiveChannelFragCount = 100;
const uint32_t MinLiveChannelFragDuration = 1;
const uint32_t MaxLiveChannelFragDuration = 100;
const uint32_t MinLiveChannelPlayListLength = 6;
const uint32_t MaxLiveChannelPlayListLength = 128;
const uint32_t MinLiveChannelInterval = 1;
const uint32_t MaxLiveChannelInterval = 100;
const uint64_t SecondsOfDay = 24*60*60;
const uint32_t MaxListLiveChannelKeys = 1000;

#ifdef _WIN32
const char PATH_DELIMITER = '\\';
#else
const char PATH_DELIMITER = '/';
#endif
}
}
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#pragma once
#include <cstdint>

namespace AlibabaCloud
{
namespace OSS
{
const int64_t MaxFileSize = 5LL * 1024LL * 1024LL * 1024LL;
const int32_t MaxPrefixStringSize = 1024;
const int32_t MaxMarkerStringSize = 1024;
const int32_t MaxDelimiterStringSize = 1024;
const int32_t MaxReturnedKeys = 1000;
const int32_t MaxUploads = 1000;
const int32_t DeleteObjectsUpperLimit = 1000;
const int32_t BucketCorsRuleLimit = 10;
const int32_t LifecycleRuleLimit = 1000;
const int32_t ObjectNameLengthLimit = 1023;
const int32_t PartNumberUpperLimit = 10000;
const int32_t DefaultPartSize = 8 * 1024 * 1024;
const int32_t PartSizeLowerLimit = 100 * 1024;
const int32_t MaxPathLength = 124;
const int32_t MinPathLength = 4;
const int32_t DefaultResumableThreadNum = 3;
const uint32_t MaxLiveChannelNameLength = 1023;
const uint32_t MaxLiveChannelDescriptionLength = 128;
const uint32_t MinLiveChannelFragCount = 1;
const uint32_t MaxLiveChannelFragCount = 100;
const uint32_t MinLiveChannelFragDuration = 1;
const uint32_t MaxLiveChannelFragDuration = 100;
const uint32_t MinLiveChannelPlayListLength = 6;
const uint32_t MaxLiveChannelPlayListLength = 128;
const uint32_t MinLiveChannelInterval = 1;
const uint32_t MaxLiveChannelInterval = 100;
const uint64_t SecondsOfDay = 24*60*60;
const uint32_t MaxListLiveChannelKeys = 1000;
const uint32_t TagKeyLengthLimit = 128;
const uint32_t TagValueLengthLimit = 256;
const uint32_t MaxTagSize = 10;

#ifdef _WIN32
const char PATH_DELIMITER = '\\';
#else
const char PATH_DELIMITER = '/';
#endif
}
}
6 changes: 5 additions & 1 deletion sdk/include/alibabacloud/oss/OssClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ namespace OSS
GetObjectOutcome SelectObject(const SelectObjectRequest& request) const;
CreateSelectObjectMetaOutcome CreateSelectObjectMeta(const CreateSelectObjectMetaRequest& request) const;

SetObjectTaggingOutcome SetObjectTagging(const SetObjectTaggingRequest& request) const;
DeleteObjectTaggingOutcome DeleteObjectTagging(const DeleteObjectTaggingRequest& request) const;
GetObjectTaggingOutcome GetObjectTagging(const GetObjectTaggingRequest& request) const;

/*MultipartUpload*/
InitiateMultipartUploadOutcome InitiateMultipartUpload(const InitiateMultipartUploadRequest& request) const;
PutObjectOutcome UploadPart(const UploadPartRequest& request) const;
Expand Down Expand Up @@ -235,7 +239,7 @@ namespace OSS
void DisableRequest();
void EnableRequest();
private:
OssClientImpl *client_;
std::shared_ptr<OssClientImpl> client_;
};
}
}
10 changes: 9 additions & 1 deletion sdk/include/alibabacloud/oss/OssFwd.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,12 @@
#include <alibabacloud/oss/model/SelectObjectRequest.h>
#include <alibabacloud/oss/model/CreateSelectObjectMetaRequest.h>
#include <alibabacloud/oss/model/CreateSelectObjectMetaResult.h>
#include <alibabacloud/oss/model/SetObjectTaggingRequest.h>
#include <alibabacloud/oss/model/SetObjectTaggingResult.h>
#include <alibabacloud/oss/model/GetObjectTaggingRequest.h>
#include <alibabacloud/oss/model/GetObjectTaggingResult.h>
#include <alibabacloud/oss/model/DeleteObjectTaggingRequest.h>
#include <alibabacloud/oss/model/DeleteObjectTaggingResult.h>
#include <alibabacloud/oss/Types.h>

namespace AlibabaCloud
Expand Down Expand Up @@ -156,8 +162,10 @@ namespace OSS
using CopyObjectOutcome = Outcome<OssError, CopyObjectResult>;
using GetSymlinkOutcome = Outcome<OssError, GetSymlinkResult>;
using CreateSymlinkOutcome = Outcome<OssError, CreateSymlinkResult>;

using CreateSelectObjectMetaOutcome = Outcome<OssError, CreateSelectObjectMetaResult>;
using SetObjectTaggingOutcome = Outcome<OssError, SetObjectTaggingResult>;
using GetObjectTaggingOutcome = Outcome<OssError, GetObjectTaggingResult>;
using DeleteObjectTaggingOutcome = Outcome<OssError, DeleteObjectTaggingResult>;

/*multipart*/
using InitiateMultipartUploadOutcome = Outcome<OssError, InitiateMultipartUploadResult>;
Expand Down
111 changes: 56 additions & 55 deletions sdk/include/alibabacloud/oss/model/AppendObjectRequest.h
Original file line number Diff line number Diff line change
@@ -1,55 +1,56 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#pragma once
#include <alibabacloud/oss/Export.h>
#include <alibabacloud/oss/OssRequest.h>
#include <alibabacloud/oss/Types.h>
#include <alibabacloud/oss/model/ObjectMetaData.h>


namespace AlibabaCloud
{
namespace OSS
{
class ALIBABACLOUD_OSS_EXPORT AppendObjectRequest: public OssObjectRequest
{
public:
AppendObjectRequest(const std::string& bucket, const std::string& key,
const std::shared_ptr<std::iostream>& content);
AppendObjectRequest(const std::string& bucket, const std::string& key,
const std::shared_ptr<std::iostream>& content,
const ObjectMetaData& meta);
void setPosition(uint64_t position);
void setCacheControl(const std::string& value);
void setContentDisposition(const std::string& value);
void setContentEncoding(const std::string& value);
void setContentMd5(const std::string& value);
void setExpires(uint64_t expires);
void setExpires(const std::string& value);
void setAcl(const CannedAccessControlList& acl);
virtual std::shared_ptr<std::iostream> Body() const;
protected:
virtual HeaderCollection specialHeaders() const ;
virtual ParameterCollection specialParameters() const;
private:
uint64_t position_;
std::shared_ptr<std::iostream> content_;
ObjectMetaData metaData_;
};
}
}

/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#pragma once
#include <alibabacloud/oss/Export.h>
#include <alibabacloud/oss/OssRequest.h>
#include <alibabacloud/oss/Types.h>
#include <alibabacloud/oss/model/ObjectMetaData.h>


namespace AlibabaCloud
{
namespace OSS
{
class ALIBABACLOUD_OSS_EXPORT AppendObjectRequest: public OssObjectRequest
{
public:
AppendObjectRequest(const std::string& bucket, const std::string& key,
const std::shared_ptr<std::iostream>& content);
AppendObjectRequest(const std::string& bucket, const std::string& key,
const std::shared_ptr<std::iostream>& content,
const ObjectMetaData& meta);
void setPosition(uint64_t position);
void setCacheControl(const std::string& value);
void setContentDisposition(const std::string& value);
void setContentEncoding(const std::string& value);
void setContentMd5(const std::string& value);
void setExpires(uint64_t expires);
void setExpires(const std::string& value);
void setAcl(const CannedAccessControlList& acl);
void setTagging(const std::string& value);
virtual std::shared_ptr<std::iostream> Body() const;
protected:
virtual HeaderCollection specialHeaders() const ;
virtual ParameterCollection specialParameters() const;
private:
uint64_t position_;
std::shared_ptr<std::iostream> content_;
ObjectMetaData metaData_;
};
}
}

98 changes: 50 additions & 48 deletions sdk/include/alibabacloud/oss/model/CopyObjectRequest.h
Original file line number Diff line number Diff line change
@@ -1,48 +1,50 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#pragma once
#include <alibabacloud/oss/Export.h>
#include <alibabacloud/oss/OssRequest.h>
#include <alibabacloud/oss/Types.h>
#include <alibabacloud/oss/model/ObjectMetaData.h>


namespace AlibabaCloud
{
namespace OSS
{
class ALIBABACLOUD_OSS_EXPORT CopyObjectRequest: public OssObjectRequest
{
public:
CopyObjectRequest(const std::string& bucket, const std::string& key);
CopyObjectRequest(const std::string& bucket, const std::string& key,
const ObjectMetaData& meta);
void setCopySource(const std::string& srcBucket,const std::string& srcObject);
void setSourceIfMatchETag(const std::string& value);
void setSourceIfNotMatchETag(const std::string& value);
void setSourceIfUnModifiedSince(const std::string& value);
void setSourceIfModifiedSince(const std::string& value);
void setMetadataDirective(const CopyActionList& action);
void setAcl(const CannedAccessControlList& acl);
protected:
virtual HeaderCollection specialHeaders() const ;
private:
ObjectMetaData metaData_;
};
}
}

/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#pragma once
#include <alibabacloud/oss/Export.h>
#include <alibabacloud/oss/OssRequest.h>
#include <alibabacloud/oss/Types.h>
#include <alibabacloud/oss/model/ObjectMetaData.h>


namespace AlibabaCloud
{
namespace OSS
{
class ALIBABACLOUD_OSS_EXPORT CopyObjectRequest: public OssObjectRequest
{
public:
CopyObjectRequest(const std::string& bucket, const std::string& key);
CopyObjectRequest(const std::string& bucket, const std::string& key,
const ObjectMetaData& meta);
void setCopySource(const std::string& srcBucket,const std::string& srcObject);
void setSourceIfMatchETag(const std::string& value);
void setSourceIfNotMatchETag(const std::string& value);
void setSourceIfUnModifiedSince(const std::string& value);
void setSourceIfModifiedSince(const std::string& value);
void setMetadataDirective(const CopyActionList& action);
void setAcl(const CannedAccessControlList& acl);
void setTagging(const std::string& value);
void setTaggingDirective(const CopyActionList& action);
protected:
virtual HeaderCollection specialHeaders() const ;
private:
ObjectMetaData metaData_;
};
}
}

Loading

0 comments on commit cd4261f

Please sign in to comment.