move stuff to Details namespace (#921)
This commit is contained in:
parent
eb509cebb8
commit
f99e4a57c7
@ -182,7 +182,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
* shared access signature, and the service version to use when handling requests made with this
|
||||
* shared access signature.
|
||||
*/
|
||||
std::string Version = Details::c_defaultSasVersion;
|
||||
std::string Version = Storage::Details::c_defaultSasVersion;
|
||||
|
||||
/**
|
||||
* @brief The optional signed protocol field specifies the protocol permitted for a
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -49,12 +49,13 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
AppendBlobClient newClient(*this);
|
||||
if (snapshot.empty())
|
||||
{
|
||||
newClient.m_blobUrl.RemoveQueryParameter(Details::c_HttpQuerySnapshot);
|
||||
newClient.m_blobUrl.RemoveQueryParameter(Storage::Details::c_HttpQuerySnapshot);
|
||||
}
|
||||
else
|
||||
{
|
||||
newClient.m_blobUrl.AppendQueryParameter(
|
||||
Details::c_HttpQuerySnapshot, Details::UrlEncodeQueryParameter(snapshot));
|
||||
Storage::Details::c_HttpQuerySnapshot,
|
||||
Storage::Details::UrlEncodeQueryParameter(snapshot));
|
||||
}
|
||||
return newClient;
|
||||
}
|
||||
@ -64,12 +65,13 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
AppendBlobClient newClient(*this);
|
||||
if (versionId.empty())
|
||||
{
|
||||
newClient.m_blobUrl.RemoveQueryParameter(Details::c_HttpQueryVersionId);
|
||||
newClient.m_blobUrl.RemoveQueryParameter(Storage::Details::c_HttpQueryVersionId);
|
||||
}
|
||||
else
|
||||
{
|
||||
newClient.m_blobUrl.AppendQueryParameter(
|
||||
Details::c_HttpQueryVersionId, Details::UrlEncodeQueryParameter(versionId));
|
||||
Storage::Details::c_HttpQueryVersionId,
|
||||
Storage::Details::UrlEncodeQueryParameter(versionId));
|
||||
}
|
||||
return newClient;
|
||||
}
|
||||
@ -77,7 +79,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
Azure::Core::Response<CreateAppendBlobResult> AppendBlobClient::Create(
|
||||
const CreateAppendBlobOptions& options) const
|
||||
{
|
||||
BlobRestClient::AppendBlob::CreateAppendBlobOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::AppendBlob::CreateAppendBlobOptions protocolLayerOptions;
|
||||
protocolLayerOptions.HttpHeaders = options.HttpHeaders;
|
||||
protocolLayerOptions.Metadata = options.Metadata;
|
||||
protocolLayerOptions.LeaseId = options.AccessConditions.LeaseId;
|
||||
@ -93,7 +95,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
protocolLayerOptions.EncryptionAlgorithm = m_customerProvidedKey.GetValue().Algorithm;
|
||||
}
|
||||
protocolLayerOptions.EncryptionScope = m_encryptionScope;
|
||||
return BlobRestClient::AppendBlob::Create(
|
||||
return Details::BlobRestClient::AppendBlob::Create(
|
||||
options.Context, *m_pipeline, m_blobUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
@ -101,7 +103,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
Azure::Core::Http::BodyStream* content,
|
||||
const AppendBlockOptions& options) const
|
||||
{
|
||||
BlobRestClient::AppendBlob::AppendBlockOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::AppendBlob::AppendBlockOptions protocolLayerOptions;
|
||||
protocolLayerOptions.TransactionalContentMd5 = options.TransactionalContentMd5;
|
||||
protocolLayerOptions.TransactionalContentCrc64 = options.TransactionalContentCrc64;
|
||||
protocolLayerOptions.LeaseId = options.AccessConditions.LeaseId;
|
||||
@ -119,7 +121,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
protocolLayerOptions.EncryptionAlgorithm = m_customerProvidedKey.GetValue().Algorithm;
|
||||
}
|
||||
protocolLayerOptions.EncryptionScope = m_encryptionScope;
|
||||
return BlobRestClient::AppendBlob::AppendBlock(
|
||||
return Details::BlobRestClient::AppendBlob::AppendBlock(
|
||||
options.Context, *m_pipeline, m_blobUrl, content, protocolLayerOptions);
|
||||
}
|
||||
|
||||
@ -127,7 +129,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
const std::string& sourceUri,
|
||||
const AppendBlockFromUriOptions& options) const
|
||||
{
|
||||
BlobRestClient::AppendBlob::AppendBlockFromUriOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::AppendBlob::AppendBlockFromUriOptions protocolLayerOptions;
|
||||
protocolLayerOptions.SourceUri = sourceUri;
|
||||
if (options.SourceOffset.HasValue() && options.SourceLength.HasValue())
|
||||
{
|
||||
@ -159,14 +161,14 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
protocolLayerOptions.EncryptionAlgorithm = m_customerProvidedKey.GetValue().Algorithm;
|
||||
}
|
||||
protocolLayerOptions.EncryptionScope = m_encryptionScope;
|
||||
return BlobRestClient::AppendBlob::AppendBlockFromUri(
|
||||
return Details::BlobRestClient::AppendBlob::AppendBlockFromUri(
|
||||
options.Context, *m_pipeline, m_blobUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
Azure::Core::Response<SealAppendBlobResult> AppendBlobClient::Seal(
|
||||
const SealAppendBlobOptions& options) const
|
||||
{
|
||||
BlobRestClient::AppendBlob::SealAppendBlobOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::AppendBlob::SealAppendBlobOptions protocolLayerOptions;
|
||||
protocolLayerOptions.LeaseId = options.AccessConditions.LeaseId;
|
||||
protocolLayerOptions.AppendPosition = options.AccessConditions.AppendPosition;
|
||||
protocolLayerOptions.IfModifiedSince = options.AccessConditions.IfModifiedSince;
|
||||
@ -174,7 +176,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
protocolLayerOptions.IfMatch = options.AccessConditions.IfMatch;
|
||||
protocolLayerOptions.IfNoneMatch = options.AccessConditions.IfNoneMatch;
|
||||
protocolLayerOptions.IfTags = options.AccessConditions.TagConditions;
|
||||
return BlobRestClient::AppendBlob::Seal(
|
||||
return Details::BlobRestClient::AppendBlob::Seal(
|
||||
options.Context, *m_pipeline, m_blobUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
|
||||
@ -69,7 +69,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
const std::string& connectionString,
|
||||
const BlobBatchClientOptions& options)
|
||||
{
|
||||
auto parsedConnectionString = Details::ParseConnectionString(connectionString);
|
||||
auto parsedConnectionString = Storage::Details::ParseConnectionString(connectionString);
|
||||
auto serviceUri = std::move(parsedConnectionString.BlobServiceUri);
|
||||
|
||||
if (parsedConnectionString.KeyCredential)
|
||||
@ -91,7 +91,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
{
|
||||
std::vector<std::unique_ptr<Azure::Core::Http::HttpPolicy>> policies;
|
||||
policies.emplace_back(std::make_unique<Azure::Core::Http::TelemetryPolicy>(
|
||||
Details::c_BlobServicePackageName, Version::VersionString()));
|
||||
Storage::Details::c_BlobServicePackageName, Version::VersionString()));
|
||||
policies.emplace_back(std::make_unique<Azure::Core::Http::RequestIdPolicy>());
|
||||
for (const auto& p : options.PerOperationPolicies)
|
||||
{
|
||||
@ -131,7 +131,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
{
|
||||
std::vector<std::unique_ptr<Azure::Core::Http::HttpPolicy>> policies;
|
||||
policies.emplace_back(std::make_unique<Azure::Core::Http::TelemetryPolicy>(
|
||||
Details::c_BlobServicePackageName, Version::VersionString()));
|
||||
Storage::Details::c_BlobServicePackageName, Version::VersionString()));
|
||||
policies.emplace_back(std::make_unique<Azure::Core::Http::RequestIdPolicy>());
|
||||
for (const auto& p : options.PerOperationPolicies)
|
||||
{
|
||||
@ -145,7 +145,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
}
|
||||
policies.emplace_back(std::make_unique<StoragePerRetryPolicy>());
|
||||
policies.emplace_back(std::make_unique<Core::BearerTokenAuthenticationPolicy>(
|
||||
credential, Details::c_StorageScope));
|
||||
credential, Storage::Details::c_StorageScope));
|
||||
policies.emplace_back(std::make_unique<Azure::Core::Http::TransportPolicy>());
|
||||
m_pipeline = std::make_shared<Azure::Core::Http::HttpPipeline>(policies);
|
||||
|
||||
@ -160,7 +160,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
}
|
||||
policies.emplace_back(std::make_unique<StoragePerRetryPolicy>());
|
||||
policies.emplace_back(std::make_unique<Core::BearerTokenAuthenticationPolicy>(
|
||||
credential, Details::c_StorageScope));
|
||||
credential, Storage::Details::c_StorageScope));
|
||||
policies.emplace_back(std::make_unique<NoopTransportPolicy>());
|
||||
m_subRequestPipeline = std::make_shared<Azure::Core::Http::HttpPipeline>(policies);
|
||||
}
|
||||
@ -172,7 +172,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
{
|
||||
std::vector<std::unique_ptr<Azure::Core::Http::HttpPolicy>> policies;
|
||||
policies.emplace_back(std::make_unique<Azure::Core::Http::TelemetryPolicy>(
|
||||
Details::c_BlobServicePackageName, Version::VersionString()));
|
||||
Storage::Details::c_BlobServicePackageName, Version::VersionString()));
|
||||
policies.emplace_back(std::make_unique<Azure::Core::Http::RequestIdPolicy>());
|
||||
for (const auto& p : options.PerOperationPolicies)
|
||||
{
|
||||
@ -236,9 +236,9 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
requestBody += getBatchBoundary();
|
||||
|
||||
auto blobUrl = m_serviceUrl;
|
||||
blobUrl.AppendPath(Details::UrlEncodePath(subrequest.ContainerName));
|
||||
blobUrl.AppendPath(Details::UrlEncodePath(subrequest.BlobName));
|
||||
BlobRestClient::Blob::DeleteBlobOptions protocolLayerOptions;
|
||||
blobUrl.AppendPath(Storage::Details::UrlEncodePath(subrequest.ContainerName));
|
||||
blobUrl.AppendPath(Storage::Details::UrlEncodePath(subrequest.BlobName));
|
||||
Details::BlobRestClient::Blob::DeleteBlobOptions protocolLayerOptions;
|
||||
protocolLayerOptions.DeleteSnapshots = subrequest.Options.DeleteSnapshots;
|
||||
protocolLayerOptions.IfModifiedSince = subrequest.Options.AccessConditions.IfModifiedSince;
|
||||
protocolLayerOptions.IfUnmodifiedSince
|
||||
@ -246,8 +246,9 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
protocolLayerOptions.IfMatch = subrequest.Options.AccessConditions.IfMatch;
|
||||
protocolLayerOptions.IfNoneMatch = subrequest.Options.AccessConditions.IfNoneMatch;
|
||||
protocolLayerOptions.LeaseId = subrequest.Options.AccessConditions.LeaseId;
|
||||
auto message = BlobRestClient::Blob::DeleteCreateMessage(blobUrl, protocolLayerOptions);
|
||||
message.RemoveHeader(Details::c_HttpHeaderXMsVersion);
|
||||
auto message
|
||||
= Details::BlobRestClient::Blob::DeleteCreateMessage(blobUrl, protocolLayerOptions);
|
||||
message.RemoveHeader(Storage::Details::c_HttpHeaderXMsVersion);
|
||||
m_subRequestPipeline->Send(options.Context, message);
|
||||
requestBody += message.GetHTTPMessagePreBody();
|
||||
}
|
||||
@ -258,27 +259,27 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
requestBody += getBatchBoundary();
|
||||
|
||||
auto blobUrl = m_serviceUrl;
|
||||
blobUrl.AppendPath(Details::UrlEncodePath(subrequest.ContainerName));
|
||||
blobUrl.AppendPath(Details::UrlEncodePath(subrequest.BlobName));
|
||||
BlobRestClient::Blob::SetBlobAccessTierOptions protocolLayerOptions;
|
||||
blobUrl.AppendPath(Storage::Details::UrlEncodePath(subrequest.ContainerName));
|
||||
blobUrl.AppendPath(Storage::Details::UrlEncodePath(subrequest.BlobName));
|
||||
Details::BlobRestClient::Blob::SetBlobAccessTierOptions protocolLayerOptions;
|
||||
protocolLayerOptions.Tier = subrequest.Tier;
|
||||
protocolLayerOptions.RehydratePriority = subrequest.Options.RehydratePriority;
|
||||
auto message
|
||||
= BlobRestClient::Blob::SetAccessTierCreateMessage(blobUrl, protocolLayerOptions);
|
||||
message.RemoveHeader(Details::c_HttpHeaderXMsVersion);
|
||||
auto message = Details::BlobRestClient::Blob::SetAccessTierCreateMessage(
|
||||
blobUrl, protocolLayerOptions);
|
||||
message.RemoveHeader(Storage::Details::c_HttpHeaderXMsVersion);
|
||||
m_subRequestPipeline->Send(options.Context, message);
|
||||
requestBody += message.GetHTTPMessagePreBody();
|
||||
}
|
||||
requestBody += "--" + boundary + "--" + c_lineEnding;
|
||||
}
|
||||
|
||||
BlobRestClient::BlobBatch::SubmitBlobBatchOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::BlobBatch::SubmitBlobBatchOptions protocolLayerOptions;
|
||||
protocolLayerOptions.ContentType = c_contentTypePrefix + boundary;
|
||||
|
||||
Azure::Core::Http::MemoryBodyStream requestBodyStream(
|
||||
reinterpret_cast<const uint8_t*>(requestBody.data()), requestBody.length());
|
||||
|
||||
auto rawResponse = BlobRestClient::BlobBatch::SubmitBatch(
|
||||
auto rawResponse = Details::BlobRestClient::BlobBatch::SubmitBatch(
|
||||
options.Context, *m_pipeline, m_serviceUrl, &requestBodyStream, protocolLayerOptions);
|
||||
|
||||
if (rawResponse->ContentType.substr(0, c_contentTypePrefix.length()) == c_contentTypePrefix)
|
||||
@ -396,8 +397,9 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
{
|
||||
try
|
||||
{
|
||||
batchResult.DeleteBlobResults.emplace_back(BlobRestClient::Blob::DeleteCreateResponse(
|
||||
options.Context, std::move(rawSubresponse)));
|
||||
batchResult.DeleteBlobResults.emplace_back(
|
||||
Details::BlobRestClient::Blob::DeleteCreateResponse(
|
||||
options.Context, std::move(rawSubresponse)));
|
||||
}
|
||||
catch (StorageError& e)
|
||||
{
|
||||
@ -410,7 +412,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
try
|
||||
{
|
||||
batchResult.SetBlobAccessTierResults.emplace_back(
|
||||
BlobRestClient::Blob::SetAccessTierCreateResponse(
|
||||
Details::BlobRestClient::Blob::SetAccessTierCreateResponse(
|
||||
options.Context, std::move(rawSubresponse)));
|
||||
}
|
||||
catch (StorageError& e)
|
||||
|
||||
@ -25,10 +25,10 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
const std::string& blobName,
|
||||
const BlobClientOptions& options)
|
||||
{
|
||||
auto parsedConnectionString = Details::ParseConnectionString(connectionString);
|
||||
auto parsedConnectionString = Storage::Details::ParseConnectionString(connectionString);
|
||||
auto blobUri = std::move(parsedConnectionString.BlobServiceUri);
|
||||
blobUri.AppendPath(Details::UrlEncodePath(containerName));
|
||||
blobUri.AppendPath(Details::UrlEncodePath(blobName));
|
||||
blobUri.AppendPath(Storage::Details::UrlEncodePath(containerName));
|
||||
blobUri.AppendPath(Storage::Details::UrlEncodePath(blobName));
|
||||
|
||||
if (parsedConnectionString.KeyCredential)
|
||||
{
|
||||
@ -48,7 +48,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
{
|
||||
std::vector<std::unique_ptr<Azure::Core::Http::HttpPolicy>> policies;
|
||||
policies.emplace_back(std::make_unique<Azure::Core::Http::TelemetryPolicy>(
|
||||
Details::c_BlobServicePackageName, Version::VersionString()));
|
||||
Storage::Details::c_BlobServicePackageName, Version::VersionString()));
|
||||
policies.emplace_back(std::make_unique<Azure::Core::Http::RequestIdPolicy>());
|
||||
for (const auto& p : options.PerOperationPolicies)
|
||||
{
|
||||
@ -73,7 +73,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
{
|
||||
std::vector<std::unique_ptr<Azure::Core::Http::HttpPolicy>> policies;
|
||||
policies.emplace_back(std::make_unique<Azure::Core::Http::TelemetryPolicy>(
|
||||
Details::c_BlobServicePackageName, Version::VersionString()));
|
||||
Storage::Details::c_BlobServicePackageName, Version::VersionString()));
|
||||
policies.emplace_back(std::make_unique<Azure::Core::Http::RequestIdPolicy>());
|
||||
for (const auto& p : options.PerOperationPolicies)
|
||||
{
|
||||
@ -86,7 +86,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
}
|
||||
policies.emplace_back(std::make_unique<StoragePerRetryPolicy>());
|
||||
policies.emplace_back(std::make_unique<Core::BearerTokenAuthenticationPolicy>(
|
||||
credential, Details::c_StorageScope));
|
||||
credential, Storage::Details::c_StorageScope));
|
||||
policies.emplace_back(std::make_unique<Azure::Core::Http::TransportPolicy>());
|
||||
m_pipeline = std::make_shared<Azure::Core::Http::HttpPipeline>(policies);
|
||||
}
|
||||
@ -97,7 +97,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
{
|
||||
std::vector<std::unique_ptr<Azure::Core::Http::HttpPolicy>> policies;
|
||||
policies.emplace_back(std::make_unique<Azure::Core::Http::TelemetryPolicy>(
|
||||
Details::c_BlobServicePackageName, Version::VersionString()));
|
||||
Storage::Details::c_BlobServicePackageName, Version::VersionString()));
|
||||
policies.emplace_back(std::make_unique<Azure::Core::Http::RequestIdPolicy>());
|
||||
for (const auto& p : options.PerOperationPolicies)
|
||||
{
|
||||
@ -124,12 +124,13 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
BlobClient newClient(*this);
|
||||
if (snapshot.empty())
|
||||
{
|
||||
newClient.m_blobUrl.RemoveQueryParameter(Details::c_HttpQuerySnapshot);
|
||||
newClient.m_blobUrl.RemoveQueryParameter(Storage::Details::c_HttpQuerySnapshot);
|
||||
}
|
||||
else
|
||||
{
|
||||
newClient.m_blobUrl.AppendQueryParameter(
|
||||
Details::c_HttpQuerySnapshot, Details::UrlEncodeQueryParameter(snapshot));
|
||||
Storage::Details::c_HttpQuerySnapshot,
|
||||
Storage::Details::UrlEncodeQueryParameter(snapshot));
|
||||
}
|
||||
return newClient;
|
||||
}
|
||||
@ -139,12 +140,13 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
BlobClient newClient(*this);
|
||||
if (versionId.empty())
|
||||
{
|
||||
newClient.m_blobUrl.RemoveQueryParameter(Details::c_HttpQueryVersionId);
|
||||
newClient.m_blobUrl.RemoveQueryParameter(Storage::Details::c_HttpQueryVersionId);
|
||||
}
|
||||
else
|
||||
{
|
||||
newClient.m_blobUrl.AppendQueryParameter(
|
||||
Details::c_HttpQueryVersionId, Details::UrlEncodeQueryParameter(versionId));
|
||||
Storage::Details::c_HttpQueryVersionId,
|
||||
Storage::Details::UrlEncodeQueryParameter(versionId));
|
||||
}
|
||||
return newClient;
|
||||
}
|
||||
@ -152,7 +154,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
Azure::Core::Response<DownloadBlobResult> BlobClient::Download(
|
||||
const DownloadBlobOptions& options) const
|
||||
{
|
||||
BlobRestClient::Blob::DownloadBlobOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::Blob::DownloadBlobOptions protocolLayerOptions;
|
||||
if (options.Offset.HasValue() && options.Length.HasValue())
|
||||
{
|
||||
protocolLayerOptions.Range = std::make_pair(
|
||||
@ -177,7 +179,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
protocolLayerOptions.EncryptionAlgorithm = m_customerProvidedKey.GetValue().Algorithm;
|
||||
}
|
||||
|
||||
auto downloadResponse = BlobRestClient::Blob::Download(
|
||||
auto downloadResponse = Details::BlobRestClient::Blob::Download(
|
||||
options.Context, *m_pipeline, m_blobUrl, protocolLayerOptions);
|
||||
|
||||
{
|
||||
@ -206,7 +208,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
};
|
||||
|
||||
ReliableStreamOptions reliableStreamOptions;
|
||||
reliableStreamOptions.MaxRetryRequests = Details::c_reliableStreamRetryCount;
|
||||
reliableStreamOptions.MaxRetryRequests = Storage::Details::c_reliableStreamRetryCount;
|
||||
downloadResponse->BodyStream = std::make_unique<ReliableStream>(
|
||||
std::move(downloadResponse->BodyStream), reliableStreamOptions, retryFunction);
|
||||
}
|
||||
@ -335,7 +337,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
chunkSize = std::min(chunkSize, c_defaultChunkSize);
|
||||
}
|
||||
|
||||
Details::ConcurrentTransfer(
|
||||
Storage::Details::ConcurrentTransfer(
|
||||
remainingOffset, remainingSize, chunkSize, options.Concurrency, downloadChunkFunc);
|
||||
ret->ContentLength = blobRangeSize;
|
||||
return ret;
|
||||
@ -369,7 +371,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
firstChunkOptions.Length = firstChunkLength;
|
||||
}
|
||||
|
||||
Details::FileWriter fileWriter(file);
|
||||
Storage::Details::FileWriter fileWriter(file);
|
||||
|
||||
auto firstChunk = Download(firstChunkOptions);
|
||||
|
||||
@ -393,7 +395,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
firstChunkLength = std::min(firstChunkLength, blobRangeSize);
|
||||
|
||||
auto bodyStreamToFile = [](Azure::Core::Http::BodyStream& stream,
|
||||
Details::FileWriter& fileWriter,
|
||||
Storage::Details::FileWriter& fileWriter,
|
||||
int64_t offset,
|
||||
int64_t length,
|
||||
Azure::Core::Context& context) {
|
||||
@ -473,7 +475,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
chunkSize = std::min(chunkSize, c_defaultChunkSize);
|
||||
}
|
||||
|
||||
Details::ConcurrentTransfer(
|
||||
Storage::Details::ConcurrentTransfer(
|
||||
remainingOffset, remainingSize, chunkSize, options.Concurrency, downloadChunkFunc);
|
||||
ret->ContentLength = blobRangeSize;
|
||||
return ret;
|
||||
@ -482,7 +484,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
Azure::Core::Response<GetBlobPropertiesResult> BlobClient::GetProperties(
|
||||
const GetBlobPropertiesOptions& options) const
|
||||
{
|
||||
BlobRestClient::Blob::GetBlobPropertiesOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::Blob::GetBlobPropertiesOptions protocolLayerOptions;
|
||||
protocolLayerOptions.LeaseId = options.AccessConditions.LeaseId;
|
||||
protocolLayerOptions.IfModifiedSince = options.AccessConditions.IfModifiedSince;
|
||||
protocolLayerOptions.IfUnmodifiedSince = options.AccessConditions.IfUnmodifiedSince;
|
||||
@ -495,7 +497,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
protocolLayerOptions.EncryptionKeySha256 = m_customerProvidedKey.GetValue().KeyHash;
|
||||
protocolLayerOptions.EncryptionAlgorithm = m_customerProvidedKey.GetValue().Algorithm;
|
||||
}
|
||||
return BlobRestClient::Blob::GetProperties(
|
||||
return Details::BlobRestClient::Blob::GetProperties(
|
||||
options.Context, *m_pipeline, m_blobUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
@ -503,7 +505,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
BlobHttpHeaders httpHeaders,
|
||||
const SetBlobHttpHeadersOptions& options) const
|
||||
{
|
||||
BlobRestClient::Blob::SetBlobHttpHeadersOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::Blob::SetBlobHttpHeadersOptions protocolLayerOptions;
|
||||
protocolLayerOptions.HttpHeaders = std::move(httpHeaders);
|
||||
protocolLayerOptions.LeaseId = options.AccessConditions.LeaseId;
|
||||
protocolLayerOptions.IfModifiedSince = options.AccessConditions.IfModifiedSince;
|
||||
@ -511,7 +513,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
protocolLayerOptions.IfMatch = options.AccessConditions.IfMatch;
|
||||
protocolLayerOptions.IfNoneMatch = options.AccessConditions.IfNoneMatch;
|
||||
protocolLayerOptions.IfTags = options.AccessConditions.TagConditions;
|
||||
return BlobRestClient::Blob::SetHttpHeaders(
|
||||
return Details::BlobRestClient::Blob::SetHttpHeaders(
|
||||
options.Context, *m_pipeline, m_blobUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
@ -519,7 +521,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
std::map<std::string, std::string> metadata,
|
||||
const SetBlobMetadataOptions& options) const
|
||||
{
|
||||
BlobRestClient::Blob::SetBlobMetadataOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::Blob::SetBlobMetadataOptions protocolLayerOptions;
|
||||
protocolLayerOptions.Metadata = std::move(metadata);
|
||||
protocolLayerOptions.LeaseId = options.AccessConditions.LeaseId;
|
||||
protocolLayerOptions.IfModifiedSince = options.AccessConditions.IfModifiedSince;
|
||||
@ -534,7 +536,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
protocolLayerOptions.EncryptionAlgorithm = m_customerProvidedKey.GetValue().Algorithm;
|
||||
}
|
||||
protocolLayerOptions.EncryptionScope = m_encryptionScope;
|
||||
return BlobRestClient::Blob::SetMetadata(
|
||||
return Details::BlobRestClient::Blob::SetMetadata(
|
||||
options.Context, *m_pipeline, m_blobUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
@ -542,10 +544,10 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
AccessTier Tier,
|
||||
const SetBlobAccessTierOptions& options) const
|
||||
{
|
||||
BlobRestClient::Blob::SetBlobAccessTierOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::Blob::SetBlobAccessTierOptions protocolLayerOptions;
|
||||
protocolLayerOptions.Tier = Tier;
|
||||
protocolLayerOptions.RehydratePriority = options.RehydratePriority;
|
||||
return BlobRestClient::Blob::SetAccessTier(
|
||||
return Details::BlobRestClient::Blob::SetAccessTier(
|
||||
options.Context, *m_pipeline, m_blobUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
@ -553,7 +555,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
const std::string& sourceUri,
|
||||
const StartCopyBlobFromUriOptions& options) const
|
||||
{
|
||||
BlobRestClient::Blob::StartCopyBlobFromUriOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::Blob::StartCopyBlobFromUriOptions protocolLayerOptions;
|
||||
protocolLayerOptions.Metadata = options.Metadata;
|
||||
protocolLayerOptions.SourceUri = sourceUri;
|
||||
protocolLayerOptions.Tier = options.Tier;
|
||||
@ -571,7 +573,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
protocolLayerOptions.SourceIfNoneMatch = options.SourceConditions.IfNoneMatch;
|
||||
protocolLayerOptions.ShouldSealDestination = options.ShouldSealDestination;
|
||||
protocolLayerOptions.SourceIfTags = options.SourceConditions.TagConditions;
|
||||
return BlobRestClient::Blob::StartCopyFromUri(
|
||||
return Details::BlobRestClient::Blob::StartCopyFromUri(
|
||||
options.Context, *m_pipeline, m_blobUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
@ -579,17 +581,17 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
const std::string& copyId,
|
||||
const AbortCopyBlobFromUriOptions& options) const
|
||||
{
|
||||
BlobRestClient::Blob::AbortCopyBlobFromUriOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::Blob::AbortCopyBlobFromUriOptions protocolLayerOptions;
|
||||
protocolLayerOptions.CopyId = copyId;
|
||||
protocolLayerOptions.LeaseId = options.AccessConditions.LeaseId;
|
||||
return BlobRestClient::Blob::AbortCopyFromUri(
|
||||
return Details::BlobRestClient::Blob::AbortCopyFromUri(
|
||||
options.Context, *m_pipeline, m_blobUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
Azure::Core::Response<CreateBlobSnapshotResult> BlobClient::CreateSnapshot(
|
||||
const CreateBlobSnapshotOptions& options) const
|
||||
{
|
||||
BlobRestClient::Blob::CreateBlobSnapshotOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::Blob::CreateBlobSnapshotOptions protocolLayerOptions;
|
||||
protocolLayerOptions.Metadata = options.Metadata;
|
||||
protocolLayerOptions.LeaseId = options.AccessConditions.LeaseId;
|
||||
protocolLayerOptions.IfModifiedSince = options.AccessConditions.IfModifiedSince;
|
||||
@ -604,13 +606,13 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
protocolLayerOptions.EncryptionAlgorithm = m_customerProvidedKey.GetValue().Algorithm;
|
||||
}
|
||||
protocolLayerOptions.EncryptionScope = m_encryptionScope;
|
||||
return BlobRestClient::Blob::CreateSnapshot(
|
||||
return Details::BlobRestClient::Blob::CreateSnapshot(
|
||||
options.Context, *m_pipeline, m_blobUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
Azure::Core::Response<DeleteBlobResult> BlobClient::Delete(const DeleteBlobOptions& options) const
|
||||
{
|
||||
BlobRestClient::Blob::DeleteBlobOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::Blob::DeleteBlobOptions protocolLayerOptions;
|
||||
protocolLayerOptions.DeleteSnapshots = options.DeleteSnapshots;
|
||||
protocolLayerOptions.LeaseId = options.AccessConditions.LeaseId;
|
||||
protocolLayerOptions.IfModifiedSince = options.AccessConditions.IfModifiedSince;
|
||||
@ -618,15 +620,15 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
protocolLayerOptions.IfMatch = options.AccessConditions.IfMatch;
|
||||
protocolLayerOptions.IfNoneMatch = options.AccessConditions.IfNoneMatch;
|
||||
protocolLayerOptions.IfTags = options.AccessConditions.TagConditions;
|
||||
return BlobRestClient::Blob::Delete(
|
||||
return Details::BlobRestClient::Blob::Delete(
|
||||
options.Context, *m_pipeline, m_blobUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
Azure::Core::Response<UndeleteBlobResult> BlobClient::Undelete(
|
||||
const UndeleteBlobOptions& options) const
|
||||
{
|
||||
BlobRestClient::Blob::UndeleteBlobOptions protocolLayerOptions;
|
||||
return BlobRestClient::Blob::Undelete(
|
||||
Details::BlobRestClient::Blob::UndeleteBlobOptions protocolLayerOptions;
|
||||
return Details::BlobRestClient::Blob::Undelete(
|
||||
options.Context, *m_pipeline, m_blobUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
@ -635,7 +637,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
int32_t duration,
|
||||
const AcquireBlobLeaseOptions& options) const
|
||||
{
|
||||
BlobRestClient::Blob::AcquireBlobLeaseOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::Blob::AcquireBlobLeaseOptions protocolLayerOptions;
|
||||
protocolLayerOptions.ProposedLeaseId = proposedLeaseId;
|
||||
protocolLayerOptions.LeaseDuration = duration;
|
||||
protocolLayerOptions.IfModifiedSince = options.IfModifiedSince;
|
||||
@ -643,7 +645,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
protocolLayerOptions.IfMatch = options.IfMatch;
|
||||
protocolLayerOptions.IfNoneMatch = options.IfNoneMatch;
|
||||
protocolLayerOptions.IfTags = options.TagConditions;
|
||||
return BlobRestClient::Blob::AcquireLease(
|
||||
return Details::BlobRestClient::Blob::AcquireLease(
|
||||
options.Context, *m_pipeline, m_blobUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
@ -651,14 +653,14 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
const std::string& leaseId,
|
||||
const RenewBlobLeaseOptions& options) const
|
||||
{
|
||||
BlobRestClient::Blob::RenewBlobLeaseOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::Blob::RenewBlobLeaseOptions protocolLayerOptions;
|
||||
protocolLayerOptions.LeaseId = leaseId;
|
||||
protocolLayerOptions.IfModifiedSince = options.IfModifiedSince;
|
||||
protocolLayerOptions.IfUnmodifiedSince = options.IfUnmodifiedSince;
|
||||
protocolLayerOptions.IfMatch = options.IfMatch;
|
||||
protocolLayerOptions.IfNoneMatch = options.IfNoneMatch;
|
||||
protocolLayerOptions.IfTags = options.TagConditions;
|
||||
return BlobRestClient::Blob::RenewLease(
|
||||
return Details::BlobRestClient::Blob::RenewLease(
|
||||
options.Context, *m_pipeline, m_blobUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
@ -666,14 +668,14 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
const std::string& leaseId,
|
||||
const ReleaseBlobLeaseOptions& options) const
|
||||
{
|
||||
BlobRestClient::Blob::ReleaseBlobLeaseOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::Blob::ReleaseBlobLeaseOptions protocolLayerOptions;
|
||||
protocolLayerOptions.LeaseId = leaseId;
|
||||
protocolLayerOptions.IfModifiedSince = options.IfModifiedSince;
|
||||
protocolLayerOptions.IfUnmodifiedSince = options.IfUnmodifiedSince;
|
||||
protocolLayerOptions.IfMatch = options.IfMatch;
|
||||
protocolLayerOptions.IfNoneMatch = options.IfNoneMatch;
|
||||
protocolLayerOptions.IfTags = options.TagConditions;
|
||||
return BlobRestClient::Blob::ReleaseLease(
|
||||
return Details::BlobRestClient::Blob::ReleaseLease(
|
||||
options.Context, *m_pipeline, m_blobUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
@ -682,7 +684,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
const std::string& proposedLeaseId,
|
||||
const ChangeBlobLeaseOptions& options) const
|
||||
{
|
||||
BlobRestClient::Blob::ChangeBlobLeaseOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::Blob::ChangeBlobLeaseOptions protocolLayerOptions;
|
||||
protocolLayerOptions.LeaseId = leaseId;
|
||||
protocolLayerOptions.ProposedLeaseId = proposedLeaseId;
|
||||
protocolLayerOptions.IfModifiedSince = options.IfModifiedSince;
|
||||
@ -690,21 +692,21 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
protocolLayerOptions.IfMatch = options.IfMatch;
|
||||
protocolLayerOptions.IfNoneMatch = options.IfNoneMatch;
|
||||
protocolLayerOptions.IfTags = options.TagConditions;
|
||||
return BlobRestClient::Blob::ChangeLease(
|
||||
return Details::BlobRestClient::Blob::ChangeLease(
|
||||
options.Context, *m_pipeline, m_blobUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
Azure::Core::Response<BreakBlobLeaseResult> BlobClient::BreakLease(
|
||||
const BreakBlobLeaseOptions& options) const
|
||||
{
|
||||
BlobRestClient::Blob::BreakBlobLeaseOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::Blob::BreakBlobLeaseOptions protocolLayerOptions;
|
||||
protocolLayerOptions.BreakPeriod = options.BreakPeriod;
|
||||
protocolLayerOptions.IfModifiedSince = options.IfModifiedSince;
|
||||
protocolLayerOptions.IfUnmodifiedSince = options.IfUnmodifiedSince;
|
||||
protocolLayerOptions.IfMatch = options.IfMatch;
|
||||
protocolLayerOptions.IfNoneMatch = options.IfNoneMatch;
|
||||
protocolLayerOptions.IfTags = options.TagConditions;
|
||||
return BlobRestClient::Blob::BreakLease(
|
||||
return Details::BlobRestClient::Blob::BreakLease(
|
||||
options.Context, *m_pipeline, m_blobUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
@ -712,19 +714,19 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
std::map<std::string, std::string> tags,
|
||||
const SetBlobTagsOptions& options) const
|
||||
{
|
||||
BlobRestClient::Blob::SetBlobTagsOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::Blob::SetBlobTagsOptions protocolLayerOptions;
|
||||
protocolLayerOptions.Tags = std::move(tags);
|
||||
protocolLayerOptions.IfTags = options.TagConditions;
|
||||
return BlobRestClient::Blob::SetTags(
|
||||
return Details::BlobRestClient::Blob::SetTags(
|
||||
options.Context, *m_pipeline, m_blobUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
Azure::Core::Response<GetBlobTagsResult> BlobClient::GetTags(
|
||||
const GetBlobTagsOptions& options) const
|
||||
{
|
||||
BlobRestClient::Blob::GetBlobTagsOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::Blob::GetBlobTagsOptions protocolLayerOptions;
|
||||
protocolLayerOptions.IfTags = options.TagConditions;
|
||||
return BlobRestClient::Blob::GetTags(
|
||||
return Details::BlobRestClient::Blob::GetTags(
|
||||
options.Context, *m_pipeline, m_blobUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
|
||||
@ -21,9 +21,9 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
const std::string& containerName,
|
||||
const BlobContainerClientOptions& options)
|
||||
{
|
||||
auto parsedConnectionString = Details::ParseConnectionString(connectionString);
|
||||
auto parsedConnectionString = Storage::Details::ParseConnectionString(connectionString);
|
||||
auto containerUri = std::move(parsedConnectionString.BlobServiceUri);
|
||||
containerUri.AppendPath(Details::UrlEncodePath(containerName));
|
||||
containerUri.AppendPath(Storage::Details::UrlEncodePath(containerName));
|
||||
|
||||
if (parsedConnectionString.KeyCredential)
|
||||
{
|
||||
@ -44,7 +44,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
{
|
||||
std::vector<std::unique_ptr<Azure::Core::Http::HttpPolicy>> policies;
|
||||
policies.emplace_back(std::make_unique<Azure::Core::Http::TelemetryPolicy>(
|
||||
Details::c_BlobServicePackageName, Version::VersionString()));
|
||||
Storage::Details::c_BlobServicePackageName, Version::VersionString()));
|
||||
policies.emplace_back(std::make_unique<Azure::Core::Http::RequestIdPolicy>());
|
||||
for (const auto& p : options.PerOperationPolicies)
|
||||
{
|
||||
@ -69,7 +69,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
{
|
||||
std::vector<std::unique_ptr<Azure::Core::Http::HttpPolicy>> policies;
|
||||
policies.emplace_back(std::make_unique<Azure::Core::Http::TelemetryPolicy>(
|
||||
Details::c_BlobServicePackageName, Version::VersionString()));
|
||||
Storage::Details::c_BlobServicePackageName, Version::VersionString()));
|
||||
policies.emplace_back(std::make_unique<Azure::Core::Http::RequestIdPolicy>());
|
||||
for (const auto& p : options.PerOperationPolicies)
|
||||
{
|
||||
@ -82,7 +82,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
}
|
||||
policies.emplace_back(std::make_unique<StoragePerRetryPolicy>());
|
||||
policies.emplace_back(std::make_unique<Core::BearerTokenAuthenticationPolicy>(
|
||||
credential, Details::c_StorageScope));
|
||||
credential, Storage::Details::c_StorageScope));
|
||||
policies.emplace_back(std::make_unique<Azure::Core::Http::TransportPolicy>());
|
||||
m_pipeline = std::make_shared<Azure::Core::Http::HttpPipeline>(policies);
|
||||
}
|
||||
@ -95,7 +95,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
{
|
||||
std::vector<std::unique_ptr<Azure::Core::Http::HttpPolicy>> policies;
|
||||
policies.emplace_back(std::make_unique<Azure::Core::Http::TelemetryPolicy>(
|
||||
Details::c_BlobServicePackageName, Version::VersionString()));
|
||||
Storage::Details::c_BlobServicePackageName, Version::VersionString()));
|
||||
policies.emplace_back(std::make_unique<Azure::Core::Http::RequestIdPolicy>());
|
||||
for (const auto& p : options.PerOperationPolicies)
|
||||
{
|
||||
@ -114,7 +114,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
BlobClient BlobContainerClient::GetBlobClient(const std::string& blobName) const
|
||||
{
|
||||
auto blobUri = m_containerUrl;
|
||||
blobUri.AppendPath(Details::UrlEncodePath(blobName));
|
||||
blobUri.AppendPath(Storage::Details::UrlEncodePath(blobName));
|
||||
return BlobClient(std::move(blobUri), m_pipeline, m_customerProvidedKey, m_encryptionScope);
|
||||
}
|
||||
|
||||
@ -136,23 +136,23 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
Azure::Core::Response<CreateContainerResult> BlobContainerClient::Create(
|
||||
const CreateContainerOptions& options) const
|
||||
{
|
||||
BlobRestClient::Container::CreateContainerOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::Container::CreateContainerOptions protocolLayerOptions;
|
||||
protocolLayerOptions.AccessType = options.AccessType;
|
||||
protocolLayerOptions.Metadata = options.Metadata;
|
||||
protocolLayerOptions.DefaultEncryptionScope = options.DefaultEncryptionScope;
|
||||
protocolLayerOptions.PreventEncryptionScopeOverride = options.PreventEncryptionScopeOverride;
|
||||
return BlobRestClient::Container::Create(
|
||||
return Details::BlobRestClient::Container::Create(
|
||||
options.Context, *m_pipeline, m_containerUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
Azure::Core::Response<DeleteContainerResult> BlobContainerClient::Delete(
|
||||
const DeleteContainerOptions& options) const
|
||||
{
|
||||
BlobRestClient::Container::DeleteContainerOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::Container::DeleteContainerOptions protocolLayerOptions;
|
||||
protocolLayerOptions.LeaseId = options.AccessConditions.LeaseId;
|
||||
protocolLayerOptions.IfModifiedSince = options.AccessConditions.IfModifiedSince;
|
||||
protocolLayerOptions.IfUnmodifiedSince = options.AccessConditions.IfUnmodifiedSince;
|
||||
return BlobRestClient::Container::Delete(
|
||||
return Details::BlobRestClient::Container::Delete(
|
||||
options.Context, *m_pipeline, m_containerUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
@ -161,19 +161,19 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
const std::string& deletedContainerVersion,
|
||||
const UndeleteContainerOptions& options) const
|
||||
{
|
||||
BlobRestClient::Container::UndeleteContainerOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::Container::UndeleteContainerOptions protocolLayerOptions;
|
||||
protocolLayerOptions.DeletedContainerName = deletedContainerName;
|
||||
protocolLayerOptions.DeletedContainerVersion = deletedContainerVersion;
|
||||
return BlobRestClient::Container::Undelete(
|
||||
return Details::BlobRestClient::Container::Undelete(
|
||||
options.Context, *m_pipeline, m_containerUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
Azure::Core::Response<GetContainerPropertiesResult> BlobContainerClient::GetProperties(
|
||||
const GetContainerPropertiesOptions& options) const
|
||||
{
|
||||
BlobRestClient::Container::GetContainerPropertiesOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::Container::GetContainerPropertiesOptions protocolLayerOptions;
|
||||
protocolLayerOptions.LeaseId = options.AccessConditions.LeaseId;
|
||||
return BlobRestClient::Container::GetProperties(
|
||||
return Details::BlobRestClient::Container::GetProperties(
|
||||
options.Context, *m_pipeline, m_containerUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
@ -181,7 +181,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
std::map<std::string, std::string> metadata,
|
||||
SetContainerMetadataOptions options) const
|
||||
{
|
||||
BlobRestClient::Container::SetContainerMetadataOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::Container::SetContainerMetadataOptions protocolLayerOptions;
|
||||
protocolLayerOptions.Metadata = metadata;
|
||||
protocolLayerOptions.LeaseId = options.AccessConditions.LeaseId;
|
||||
protocolLayerOptions.IfModifiedSince = options.AccessConditions.IfModifiedSince;
|
||||
@ -191,19 +191,19 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
// If-Modified-Since
|
||||
throw std::runtime_error("this operation doesn't support unmodified since access condition.");
|
||||
}
|
||||
return BlobRestClient::Container::SetMetadata(
|
||||
return Details::BlobRestClient::Container::SetMetadata(
|
||||
options.Context, *m_pipeline, m_containerUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
Azure::Core::Response<ListBlobsFlatSegmentResult> BlobContainerClient::ListBlobsFlatSegment(
|
||||
const ListBlobsSegmentOptions& options) const
|
||||
{
|
||||
BlobRestClient::Container::ListBlobsFlatSegmentOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::Container::ListBlobsFlatSegmentOptions protocolLayerOptions;
|
||||
protocolLayerOptions.Prefix = options.Prefix;
|
||||
protocolLayerOptions.ContinuationToken = options.ContinuationToken;
|
||||
protocolLayerOptions.MaxResults = options.MaxResults;
|
||||
protocolLayerOptions.Include = options.Include;
|
||||
auto response = BlobRestClient::Container::ListBlobsFlat(
|
||||
auto response = Details::BlobRestClient::Container::ListBlobsFlat(
|
||||
options.Context, *m_pipeline, m_containerUrl, protocolLayerOptions);
|
||||
for (auto& i : response->Items)
|
||||
{
|
||||
@ -220,13 +220,13 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
const std::string& delimiter,
|
||||
const ListBlobsSegmentOptions& options) const
|
||||
{
|
||||
BlobRestClient::Container::ListBlobsByHierarchySegmentOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::Container::ListBlobsByHierarchySegmentOptions protocolLayerOptions;
|
||||
protocolLayerOptions.Prefix = options.Prefix;
|
||||
protocolLayerOptions.Delimiter = delimiter;
|
||||
protocolLayerOptions.ContinuationToken = options.ContinuationToken;
|
||||
protocolLayerOptions.MaxResults = options.MaxResults;
|
||||
protocolLayerOptions.Include = options.Include;
|
||||
auto response = BlobRestClient::Container::ListBlobsByHierarchy(
|
||||
auto response = Details::BlobRestClient::Container::ListBlobsByHierarchy(
|
||||
options.Context, *m_pipeline, m_containerUrl, protocolLayerOptions);
|
||||
for (auto& i : response->Items)
|
||||
{
|
||||
@ -241,22 +241,22 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
Azure::Core::Response<GetContainerAccessPolicyResult> BlobContainerClient::GetAccessPolicy(
|
||||
const GetContainerAccessPolicyOptions& options) const
|
||||
{
|
||||
BlobRestClient::Container::GetContainerAccessPolicyOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::Container::GetContainerAccessPolicyOptions protocolLayerOptions;
|
||||
protocolLayerOptions.LeaseId = options.AccessConditions.LeaseId;
|
||||
return BlobRestClient::Container::GetAccessPolicy(
|
||||
return Details::BlobRestClient::Container::GetAccessPolicy(
|
||||
options.Context, *m_pipeline, m_containerUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
Azure::Core::Response<SetContainerAccessPolicyResult> BlobContainerClient::SetAccessPolicy(
|
||||
const SetContainerAccessPolicyOptions& options) const
|
||||
{
|
||||
BlobRestClient::Container::SetContainerAccessPolicyOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::Container::SetContainerAccessPolicyOptions protocolLayerOptions;
|
||||
protocolLayerOptions.AccessType = options.AccessType;
|
||||
protocolLayerOptions.SignedIdentifiers = options.SignedIdentifiers;
|
||||
protocolLayerOptions.LeaseId = options.AccessConditions.LeaseId;
|
||||
protocolLayerOptions.IfModifiedSince = options.AccessConditions.IfModifiedSince;
|
||||
protocolLayerOptions.IfUnmodifiedSince = options.AccessConditions.IfUnmodifiedSince;
|
||||
return BlobRestClient::Container::SetAccessPolicy(
|
||||
return Details::BlobRestClient::Container::SetAccessPolicy(
|
||||
options.Context, *m_pipeline, m_containerUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
@ -265,12 +265,12 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
int32_t duration,
|
||||
const AcquireContainerLeaseOptions& options) const
|
||||
{
|
||||
BlobRestClient::Container::AcquireContainerLeaseOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::Container::AcquireContainerLeaseOptions protocolLayerOptions;
|
||||
protocolLayerOptions.ProposedLeaseId = proposedLeaseId;
|
||||
protocolLayerOptions.LeaseDuration = duration;
|
||||
protocolLayerOptions.IfModifiedSince = options.IfModifiedSince;
|
||||
protocolLayerOptions.IfUnmodifiedSince = options.IfUnmodifiedSince;
|
||||
return BlobRestClient::Container::AcquireLease(
|
||||
return Details::BlobRestClient::Container::AcquireLease(
|
||||
options.Context, *m_pipeline, m_containerUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
@ -278,11 +278,11 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
const std::string& leaseId,
|
||||
const RenewContainerLeaseOptions& options) const
|
||||
{
|
||||
BlobRestClient::Container::RenewContainerLeaseOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::Container::RenewContainerLeaseOptions protocolLayerOptions;
|
||||
protocolLayerOptions.LeaseId = leaseId;
|
||||
protocolLayerOptions.IfModifiedSince = options.IfModifiedSince;
|
||||
protocolLayerOptions.IfUnmodifiedSince = options.IfUnmodifiedSince;
|
||||
return BlobRestClient::Container::RenewLease(
|
||||
return Details::BlobRestClient::Container::RenewLease(
|
||||
options.Context, *m_pipeline, m_containerUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
@ -290,11 +290,11 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
const std::string& leaseId,
|
||||
const ReleaseContainerLeaseOptions& options) const
|
||||
{
|
||||
BlobRestClient::Container::ReleaseContainerLeaseOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::Container::ReleaseContainerLeaseOptions protocolLayerOptions;
|
||||
protocolLayerOptions.LeaseId = leaseId;
|
||||
protocolLayerOptions.IfModifiedSince = options.IfModifiedSince;
|
||||
protocolLayerOptions.IfUnmodifiedSince = options.IfUnmodifiedSince;
|
||||
return BlobRestClient::Container::ReleaseLease(
|
||||
return Details::BlobRestClient::Container::ReleaseLease(
|
||||
options.Context, *m_pipeline, m_containerUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
@ -303,23 +303,23 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
const std::string& proposedLeaseId,
|
||||
const ChangeContainerLeaseOptions& options) const
|
||||
{
|
||||
BlobRestClient::Container::ChangeContainerLeaseOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::Container::ChangeContainerLeaseOptions protocolLayerOptions;
|
||||
protocolLayerOptions.LeaseId = leaseId;
|
||||
protocolLayerOptions.ProposedLeaseId = proposedLeaseId;
|
||||
protocolLayerOptions.IfModifiedSince = options.IfModifiedSince;
|
||||
protocolLayerOptions.IfUnmodifiedSince = options.IfUnmodifiedSince;
|
||||
return BlobRestClient::Container::ChangeLease(
|
||||
return Details::BlobRestClient::Container::ChangeLease(
|
||||
options.Context, *m_pipeline, m_containerUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
Azure::Core::Response<BreakContainerLeaseResult> BlobContainerClient::BreakLease(
|
||||
const BreakContainerLeaseOptions& options) const
|
||||
{
|
||||
BlobRestClient::Container::BreakContainerLeaseOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::Container::BreakContainerLeaseOptions protocolLayerOptions;
|
||||
protocolLayerOptions.BreakPeriod = options.BreakPeriod;
|
||||
protocolLayerOptions.IfModifiedSince = options.IfModifiedSince;
|
||||
protocolLayerOptions.IfUnmodifiedSince = options.IfUnmodifiedSince;
|
||||
return BlobRestClient::Container::BreakLease(
|
||||
return Details::BlobRestClient::Container::BreakLease(
|
||||
options.Context, *m_pipeline, m_containerUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
|
||||
@ -134,53 +134,58 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
+ resource + "\n" + snapshotVersion + "\n" + CacheControl + "\n" + ContentDisposition + "\n"
|
||||
+ ContentEncoding + "\n" + ContentLanguage + "\n" + ContentType;
|
||||
|
||||
std::string signature
|
||||
= Base64Encode(Details::HmacSha256(stringToSign, Base64Decode(credential.GetAccountKey())));
|
||||
std::string signature = Base64Encode(
|
||||
Storage::Details::HmacSha256(stringToSign, Base64Decode(credential.GetAccountKey())));
|
||||
|
||||
Azure::Core::Http::Url builder;
|
||||
builder.AppendQueryParameter("sv", Details::UrlEncodeQueryParameter(Version));
|
||||
builder.AppendQueryParameter("spr", Details::UrlEncodeQueryParameter(protocol));
|
||||
builder.AppendQueryParameter("sv", Storage::Details::UrlEncodeQueryParameter(Version));
|
||||
builder.AppendQueryParameter("spr", Storage::Details::UrlEncodeQueryParameter(protocol));
|
||||
if (StartsOn.HasValue())
|
||||
{
|
||||
builder.AppendQueryParameter("st", Details::UrlEncodeQueryParameter(StartsOn.GetValue()));
|
||||
builder.AppendQueryParameter(
|
||||
"st", Storage::Details::UrlEncodeQueryParameter(StartsOn.GetValue()));
|
||||
}
|
||||
if (!ExpiresOn.empty())
|
||||
{
|
||||
builder.AppendQueryParameter("se", Details::UrlEncodeQueryParameter(ExpiresOn));
|
||||
builder.AppendQueryParameter("se", Storage::Details::UrlEncodeQueryParameter(ExpiresOn));
|
||||
}
|
||||
if (IPRange.HasValue())
|
||||
{
|
||||
builder.AppendQueryParameter("sip", Details::UrlEncodeQueryParameter(IPRange.GetValue()));
|
||||
builder.AppendQueryParameter(
|
||||
"sip", Storage::Details::UrlEncodeQueryParameter(IPRange.GetValue()));
|
||||
}
|
||||
if (!Identifier.empty())
|
||||
{
|
||||
builder.AppendQueryParameter("si", Details::UrlEncodeQueryParameter(Identifier));
|
||||
builder.AppendQueryParameter("si", Storage::Details::UrlEncodeQueryParameter(Identifier));
|
||||
}
|
||||
builder.AppendQueryParameter("sr", Details::UrlEncodeQueryParameter(resource));
|
||||
builder.AppendQueryParameter("sr", Storage::Details::UrlEncodeQueryParameter(resource));
|
||||
if (!Permissions.empty())
|
||||
{
|
||||
builder.AppendQueryParameter("sp", Details::UrlEncodeQueryParameter(Permissions));
|
||||
builder.AppendQueryParameter("sp", Storage::Details::UrlEncodeQueryParameter(Permissions));
|
||||
}
|
||||
builder.AppendQueryParameter("sig", Details::UrlEncodeQueryParameter(signature));
|
||||
builder.AppendQueryParameter("sig", Storage::Details::UrlEncodeQueryParameter(signature));
|
||||
if (!CacheControl.empty())
|
||||
{
|
||||
builder.AppendQueryParameter("rscc", Details::UrlEncodeQueryParameter(CacheControl));
|
||||
builder.AppendQueryParameter("rscc", Storage::Details::UrlEncodeQueryParameter(CacheControl));
|
||||
}
|
||||
if (!ContentDisposition.empty())
|
||||
{
|
||||
builder.AppendQueryParameter("rscd", Details::UrlEncodeQueryParameter(ContentDisposition));
|
||||
builder.AppendQueryParameter(
|
||||
"rscd", Storage::Details::UrlEncodeQueryParameter(ContentDisposition));
|
||||
}
|
||||
if (!ContentEncoding.empty())
|
||||
{
|
||||
builder.AppendQueryParameter("rsce", Details::UrlEncodeQueryParameter(ContentEncoding));
|
||||
builder.AppendQueryParameter(
|
||||
"rsce", Storage::Details::UrlEncodeQueryParameter(ContentEncoding));
|
||||
}
|
||||
if (!ContentLanguage.empty())
|
||||
{
|
||||
builder.AppendQueryParameter("rscl", Details::UrlEncodeQueryParameter(ContentLanguage));
|
||||
builder.AppendQueryParameter(
|
||||
"rscl", Storage::Details::UrlEncodeQueryParameter(ContentLanguage));
|
||||
}
|
||||
if (!ContentType.empty())
|
||||
{
|
||||
builder.AppendQueryParameter("rsct", Details::UrlEncodeQueryParameter(ContentType));
|
||||
builder.AppendQueryParameter("rsct", Storage::Details::UrlEncodeQueryParameter(ContentType));
|
||||
}
|
||||
|
||||
return builder.GetAbsoluteUrl();
|
||||
@ -218,56 +223,61 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
+ resource + "\n" + snapshotVersion + "\n" + CacheControl + "\n" + ContentDisposition + "\n"
|
||||
+ ContentEncoding + "\n" + ContentLanguage + "\n" + ContentType;
|
||||
|
||||
std::string signature
|
||||
= Base64Encode(Details::HmacSha256(stringToSign, Base64Decode(userDelegationKey.Value)));
|
||||
std::string signature = Base64Encode(
|
||||
Storage::Details::HmacSha256(stringToSign, Base64Decode(userDelegationKey.Value)));
|
||||
|
||||
Azure::Core::Http::Url builder;
|
||||
builder.AppendQueryParameter("sv", Details::UrlEncodeQueryParameter(Version));
|
||||
builder.AppendQueryParameter("sr", Details::UrlEncodeQueryParameter(resource));
|
||||
builder.AppendQueryParameter("sv", Storage::Details::UrlEncodeQueryParameter(Version));
|
||||
builder.AppendQueryParameter("sr", Storage::Details::UrlEncodeQueryParameter(resource));
|
||||
if (StartsOn.HasValue())
|
||||
{
|
||||
builder.AppendQueryParameter("st", Details::UrlEncodeQueryParameter(StartsOn.GetValue()));
|
||||
builder.AppendQueryParameter(
|
||||
"st", Storage::Details::UrlEncodeQueryParameter(StartsOn.GetValue()));
|
||||
}
|
||||
builder.AppendQueryParameter("se", Details::UrlEncodeQueryParameter(ExpiresOn));
|
||||
builder.AppendQueryParameter("sp", Details::UrlEncodeQueryParameter(Permissions));
|
||||
builder.AppendQueryParameter("se", Storage::Details::UrlEncodeQueryParameter(ExpiresOn));
|
||||
builder.AppendQueryParameter("sp", Storage::Details::UrlEncodeQueryParameter(Permissions));
|
||||
if (IPRange.HasValue())
|
||||
{
|
||||
builder.AppendQueryParameter("sip", Details::UrlEncodeQueryParameter(IPRange.GetValue()));
|
||||
builder.AppendQueryParameter(
|
||||
"sip", Storage::Details::UrlEncodeQueryParameter(IPRange.GetValue()));
|
||||
}
|
||||
builder.AppendQueryParameter("spr", Details::UrlEncodeQueryParameter(protocol));
|
||||
builder.AppendQueryParameter("spr", Storage::Details::UrlEncodeQueryParameter(protocol));
|
||||
builder.AppendQueryParameter(
|
||||
"skoid", Details::UrlEncodeQueryParameter(userDelegationKey.SignedObjectId));
|
||||
"skoid", Storage::Details::UrlEncodeQueryParameter(userDelegationKey.SignedObjectId));
|
||||
builder.AppendQueryParameter(
|
||||
"sktid", Details::UrlEncodeQueryParameter(userDelegationKey.SignedTenantId));
|
||||
"sktid", Storage::Details::UrlEncodeQueryParameter(userDelegationKey.SignedTenantId));
|
||||
builder.AppendQueryParameter(
|
||||
"skt", Details::UrlEncodeQueryParameter(userDelegationKey.SignedStartsOn));
|
||||
"skt", Storage::Details::UrlEncodeQueryParameter(userDelegationKey.SignedStartsOn));
|
||||
builder.AppendQueryParameter(
|
||||
"ske", Details::UrlEncodeQueryParameter(userDelegationKey.SignedExpiresOn));
|
||||
"ske", Storage::Details::UrlEncodeQueryParameter(userDelegationKey.SignedExpiresOn));
|
||||
builder.AppendQueryParameter(
|
||||
"sks", Details::UrlEncodeQueryParameter(userDelegationKey.SignedService));
|
||||
"sks", Storage::Details::UrlEncodeQueryParameter(userDelegationKey.SignedService));
|
||||
builder.AppendQueryParameter(
|
||||
"skv", Details::UrlEncodeQueryParameter(userDelegationKey.SignedVersion));
|
||||
"skv", Storage::Details::UrlEncodeQueryParameter(userDelegationKey.SignedVersion));
|
||||
if (!CacheControl.empty())
|
||||
{
|
||||
builder.AppendQueryParameter("rscc", Details::UrlEncodeQueryParameter(CacheControl));
|
||||
builder.AppendQueryParameter("rscc", Storage::Details::UrlEncodeQueryParameter(CacheControl));
|
||||
}
|
||||
if (!ContentDisposition.empty())
|
||||
{
|
||||
builder.AppendQueryParameter("rscd", Details::UrlEncodeQueryParameter(ContentDisposition));
|
||||
builder.AppendQueryParameter(
|
||||
"rscd", Storage::Details::UrlEncodeQueryParameter(ContentDisposition));
|
||||
}
|
||||
if (!ContentEncoding.empty())
|
||||
{
|
||||
builder.AppendQueryParameter("rsce", Details::UrlEncodeQueryParameter(ContentEncoding));
|
||||
builder.AppendQueryParameter(
|
||||
"rsce", Storage::Details::UrlEncodeQueryParameter(ContentEncoding));
|
||||
}
|
||||
if (!ContentLanguage.empty())
|
||||
{
|
||||
builder.AppendQueryParameter("rscl", Details::UrlEncodeQueryParameter(ContentLanguage));
|
||||
builder.AppendQueryParameter(
|
||||
"rscl", Storage::Details::UrlEncodeQueryParameter(ContentLanguage));
|
||||
}
|
||||
if (!ContentType.empty())
|
||||
{
|
||||
builder.AppendQueryParameter("rsct", Details::UrlEncodeQueryParameter(ContentType));
|
||||
builder.AppendQueryParameter("rsct", Storage::Details::UrlEncodeQueryParameter(ContentType));
|
||||
}
|
||||
builder.AppendQueryParameter("sig", Details::UrlEncodeQueryParameter(signature));
|
||||
builder.AppendQueryParameter("sig", Storage::Details::UrlEncodeQueryParameter(signature));
|
||||
|
||||
return builder.GetAbsoluteUrl();
|
||||
}
|
||||
|
||||
@ -17,7 +17,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
const std::string& connectionString,
|
||||
const BlobServiceClientOptions& options)
|
||||
{
|
||||
auto parsedConnectionString = Details::ParseConnectionString(connectionString);
|
||||
auto parsedConnectionString = Storage::Details::ParseConnectionString(connectionString);
|
||||
auto serviceUri = std::move(parsedConnectionString.BlobServiceUri);
|
||||
|
||||
if (parsedConnectionString.KeyCredential)
|
||||
@ -39,7 +39,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
{
|
||||
std::vector<std::unique_ptr<Azure::Core::Http::HttpPolicy>> policies;
|
||||
policies.emplace_back(std::make_unique<Azure::Core::Http::TelemetryPolicy>(
|
||||
Details::c_BlobServicePackageName, Version::VersionString()));
|
||||
Storage::Details::c_BlobServicePackageName, Version::VersionString()));
|
||||
policies.emplace_back(std::make_unique<Azure::Core::Http::RequestIdPolicy>());
|
||||
for (const auto& p : options.PerOperationPolicies)
|
||||
{
|
||||
@ -64,7 +64,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
{
|
||||
std::vector<std::unique_ptr<Azure::Core::Http::HttpPolicy>> policies;
|
||||
policies.emplace_back(std::make_unique<Azure::Core::Http::TelemetryPolicy>(
|
||||
Details::c_BlobServicePackageName, Version::VersionString()));
|
||||
Storage::Details::c_BlobServicePackageName, Version::VersionString()));
|
||||
policies.emplace_back(std::make_unique<Azure::Core::Http::RequestIdPolicy>());
|
||||
for (const auto& p : options.PerOperationPolicies)
|
||||
{
|
||||
@ -77,7 +77,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
}
|
||||
policies.emplace_back(std::make_unique<StoragePerRetryPolicy>());
|
||||
policies.emplace_back(std::make_unique<Core::BearerTokenAuthenticationPolicy>(
|
||||
credential, Details::c_StorageScope));
|
||||
credential, Storage::Details::c_StorageScope));
|
||||
policies.emplace_back(std::make_unique<Azure::Core::Http::TransportPolicy>());
|
||||
m_pipeline = std::make_shared<Azure::Core::Http::HttpPipeline>(policies);
|
||||
}
|
||||
@ -89,7 +89,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
{
|
||||
std::vector<std::unique_ptr<Azure::Core::Http::HttpPolicy>> policies;
|
||||
policies.emplace_back(std::make_unique<Azure::Core::Http::TelemetryPolicy>(
|
||||
Details::c_BlobServicePackageName, Version::VersionString()));
|
||||
Storage::Details::c_BlobServicePackageName, Version::VersionString()));
|
||||
policies.emplace_back(std::make_unique<Azure::Core::Http::RequestIdPolicy>());
|
||||
for (const auto& p : options.PerOperationPolicies)
|
||||
{
|
||||
@ -109,19 +109,19 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
const std::string& containerName) const
|
||||
{
|
||||
auto containerUri = m_serviceUrl;
|
||||
containerUri.AppendPath(Details::UrlEncodePath(containerName));
|
||||
containerUri.AppendPath(Storage::Details::UrlEncodePath(containerName));
|
||||
return BlobContainerClient(std::move(containerUri), m_pipeline);
|
||||
}
|
||||
|
||||
Azure::Core::Response<ListContainersSegmentResult> BlobServiceClient::ListBlobContainersSegment(
|
||||
const ListContainersSegmentOptions& options) const
|
||||
{
|
||||
BlobRestClient::Service::ListContainersSegmentOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::Service::ListContainersSegmentOptions protocolLayerOptions;
|
||||
protocolLayerOptions.Prefix = options.Prefix;
|
||||
protocolLayerOptions.ContinuationToken = options.ContinuationToken;
|
||||
protocolLayerOptions.MaxResults = options.MaxResults;
|
||||
protocolLayerOptions.Include = options.Include;
|
||||
return BlobRestClient::Service::ListBlobContainers(
|
||||
return Details::BlobRestClient::Service::ListBlobContainers(
|
||||
options.Context, *m_pipeline, m_serviceUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
@ -130,10 +130,10 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
const std::string& expiresOn,
|
||||
const GetUserDelegationKeyOptions& options) const
|
||||
{
|
||||
BlobRestClient::Service::GetUserDelegationKeyOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::Service::GetUserDelegationKeyOptions protocolLayerOptions;
|
||||
protocolLayerOptions.StartsOn = startsOn;
|
||||
protocolLayerOptions.ExpiresOn = expiresOn;
|
||||
return BlobRestClient::Service::GetUserDelegationKey(
|
||||
return Details::BlobRestClient::Service::GetUserDelegationKey(
|
||||
options.Context, *m_pipeline, m_serviceUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
@ -141,33 +141,33 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
BlobServiceProperties properties,
|
||||
const SetServicePropertiesOptions& options) const
|
||||
{
|
||||
BlobRestClient::Service::SetServicePropertiesOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::Service::SetServicePropertiesOptions protocolLayerOptions;
|
||||
protocolLayerOptions.Properties = std::move(properties);
|
||||
return BlobRestClient::Service::SetProperties(
|
||||
return Details::BlobRestClient::Service::SetProperties(
|
||||
options.Context, *m_pipeline, m_serviceUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
Azure::Core::Response<GetServicePropertiesResult> BlobServiceClient::GetProperties(
|
||||
const GetServicePropertiesOptions& options) const
|
||||
{
|
||||
BlobRestClient::Service::GetServicePropertiesOptions protocolLayerOptions;
|
||||
return BlobRestClient::Service::GetProperties(
|
||||
Details::BlobRestClient::Service::GetServicePropertiesOptions protocolLayerOptions;
|
||||
return Details::BlobRestClient::Service::GetProperties(
|
||||
options.Context, *m_pipeline, m_serviceUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
Azure::Core::Response<GetAccountInfoResult> BlobServiceClient::GetAccountInfo(
|
||||
const GetAccountInfoOptions& options) const
|
||||
{
|
||||
BlobRestClient::Service::GetAccountInfoOptions protocolLayerOptions;
|
||||
return BlobRestClient::Service::GetAccountInfo(
|
||||
Details::BlobRestClient::Service::GetAccountInfoOptions protocolLayerOptions;
|
||||
return Details::BlobRestClient::Service::GetAccountInfo(
|
||||
options.Context, *m_pipeline, m_serviceUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
Azure::Core::Response<GetServiceStatisticsResult> BlobServiceClient::GetStatistics(
|
||||
const GetBlobServiceStatisticsOptions& options) const
|
||||
{
|
||||
BlobRestClient::Service::GetServiceStatisticsOptions protocolLayerOptions;
|
||||
return BlobRestClient::Service::GetStatistics(
|
||||
Details::BlobRestClient::Service::GetServiceStatisticsOptions protocolLayerOptions;
|
||||
return Details::BlobRestClient::Service::GetStatistics(
|
||||
options.Context, *m_pipeline, m_serviceUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
@ -175,11 +175,11 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
const std::string& tagFilterSqlExpression,
|
||||
const FindBlobsByTagsOptions& options) const
|
||||
{
|
||||
BlobRestClient::Service::FilterBlobsSegmentOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::Service::FilterBlobsSegmentOptions protocolLayerOptions;
|
||||
protocolLayerOptions.Where = tagFilterSqlExpression;
|
||||
protocolLayerOptions.ContinuationToken = options.ContinuationToken;
|
||||
protocolLayerOptions.MaxResults = options.MaxResults;
|
||||
return BlobRestClient::Service::FilterBlobs(
|
||||
return Details::BlobRestClient::Service::FilterBlobs(
|
||||
options.Context, *m_pipeline, m_serviceUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
|
||||
@ -52,12 +52,13 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
BlockBlobClient newClient(*this);
|
||||
if (snapshot.empty())
|
||||
{
|
||||
newClient.m_blobUrl.RemoveQueryParameter(Details::c_HttpQuerySnapshot);
|
||||
newClient.m_blobUrl.RemoveQueryParameter(Storage::Details::c_HttpQuerySnapshot);
|
||||
}
|
||||
else
|
||||
{
|
||||
newClient.m_blobUrl.AppendQueryParameter(
|
||||
Details::c_HttpQuerySnapshot, Details::UrlEncodeQueryParameter(snapshot));
|
||||
Storage::Details::c_HttpQuerySnapshot,
|
||||
Storage::Details::UrlEncodeQueryParameter(snapshot));
|
||||
}
|
||||
return newClient;
|
||||
}
|
||||
@ -67,12 +68,13 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
BlockBlobClient newClient(*this);
|
||||
if (versionId.empty())
|
||||
{
|
||||
newClient.m_blobUrl.RemoveQueryParameter(Details::c_HttpQueryVersionId);
|
||||
newClient.m_blobUrl.RemoveQueryParameter(Storage::Details::c_HttpQueryVersionId);
|
||||
}
|
||||
else
|
||||
{
|
||||
newClient.m_blobUrl.AppendQueryParameter(
|
||||
Details::c_HttpQueryVersionId, Details::UrlEncodeQueryParameter(versionId));
|
||||
Storage::Details::c_HttpQueryVersionId,
|
||||
Storage::Details::UrlEncodeQueryParameter(versionId));
|
||||
}
|
||||
return newClient;
|
||||
}
|
||||
@ -81,7 +83,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
Azure::Core::Http::BodyStream* content,
|
||||
const UploadBlockBlobOptions& options) const
|
||||
{
|
||||
BlobRestClient::BlockBlob::UploadBlockBlobOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::BlockBlob::UploadBlockBlobOptions protocolLayerOptions;
|
||||
protocolLayerOptions.TransactionalContentMd5 = options.TransactionalContentMd5;
|
||||
protocolLayerOptions.TransactionalContentCrc64 = options.TransactionalContentCrc64;
|
||||
protocolLayerOptions.HttpHeaders = options.HttpHeaders;
|
||||
@ -100,7 +102,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
protocolLayerOptions.EncryptionAlgorithm = m_customerProvidedKey.GetValue().Algorithm;
|
||||
}
|
||||
protocolLayerOptions.EncryptionScope = m_encryptionScope;
|
||||
return BlobRestClient::BlockBlob::Upload(
|
||||
return Details::BlobRestClient::BlockBlob::Upload(
|
||||
options.Context, *m_pipeline, m_blobUrl, content, protocolLayerOptions);
|
||||
}
|
||||
|
||||
@ -155,7 +157,8 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
}
|
||||
};
|
||||
|
||||
Details::ConcurrentTransfer(0, bufferSize, chunkSize, options.Concurrency, uploadBlockFunc);
|
||||
Storage::Details::ConcurrentTransfer(
|
||||
0, bufferSize, chunkSize, options.Concurrency, uploadBlockFunc);
|
||||
|
||||
for (std::size_t i = 0; i < blockIds.size(); ++i)
|
||||
{
|
||||
@ -190,7 +193,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
constexpr int64_t c_maximumNumberBlocks = 50000;
|
||||
constexpr int64_t c_grainSize = 4 * 1024;
|
||||
|
||||
Details::FileReader fileReader(file);
|
||||
Storage::Details::FileReader fileReader(file);
|
||||
|
||||
int64_t chunkSize = c_defaultBlockSize;
|
||||
if (options.ChunkSize.HasValue())
|
||||
@ -236,7 +239,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
}
|
||||
};
|
||||
|
||||
Details::ConcurrentTransfer(
|
||||
Storage::Details::ConcurrentTransfer(
|
||||
0, fileReader.GetFileSize(), chunkSize, options.Concurrency, uploadBlockFunc);
|
||||
|
||||
for (std::size_t i = 0; i < blockIds.size(); ++i)
|
||||
@ -269,7 +272,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
Azure::Core::Http::BodyStream* content,
|
||||
const StageBlockOptions& options) const
|
||||
{
|
||||
BlobRestClient::BlockBlob::StageBlockOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::BlockBlob::StageBlockOptions protocolLayerOptions;
|
||||
protocolLayerOptions.BlockId = blockId;
|
||||
protocolLayerOptions.TransactionalContentMd5 = options.TransactionalContentMd5;
|
||||
protocolLayerOptions.TransactionalContentCrc64 = options.TransactionalContentCrc64;
|
||||
@ -281,7 +284,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
protocolLayerOptions.EncryptionAlgorithm = m_customerProvidedKey.GetValue().Algorithm;
|
||||
}
|
||||
protocolLayerOptions.EncryptionScope = m_encryptionScope;
|
||||
return BlobRestClient::BlockBlob::StageBlock(
|
||||
return Details::BlobRestClient::BlockBlob::StageBlock(
|
||||
options.Context, *m_pipeline, m_blobUrl, content, protocolLayerOptions);
|
||||
}
|
||||
|
||||
@ -290,7 +293,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
const std::string& sourceUri,
|
||||
const StageBlockFromUriOptions& options) const
|
||||
{
|
||||
BlobRestClient::BlockBlob::StageBlockFromUriOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::BlockBlob::StageBlockFromUriOptions protocolLayerOptions;
|
||||
protocolLayerOptions.BlockId = blockId;
|
||||
protocolLayerOptions.SourceUri = sourceUri;
|
||||
if (options.SourceOffset.HasValue() && options.SourceLength.HasValue())
|
||||
@ -320,7 +323,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
protocolLayerOptions.EncryptionAlgorithm = m_customerProvidedKey.GetValue().Algorithm;
|
||||
}
|
||||
protocolLayerOptions.EncryptionScope = m_encryptionScope;
|
||||
return BlobRestClient::BlockBlob::StageBlockFromUri(
|
||||
return Details::BlobRestClient::BlockBlob::StageBlockFromUri(
|
||||
options.Context, *m_pipeline, m_blobUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
@ -328,7 +331,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
const std::vector<std::pair<BlockType, std::string>>& blockIds,
|
||||
const CommitBlockListOptions& options) const
|
||||
{
|
||||
BlobRestClient::BlockBlob::CommitBlockListOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::BlockBlob::CommitBlockListOptions protocolLayerOptions;
|
||||
protocolLayerOptions.BlockList = blockIds;
|
||||
protocolLayerOptions.HttpHeaders = options.HttpHeaders;
|
||||
protocolLayerOptions.Metadata = options.Metadata;
|
||||
@ -346,18 +349,18 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
protocolLayerOptions.EncryptionAlgorithm = m_customerProvidedKey.GetValue().Algorithm;
|
||||
}
|
||||
protocolLayerOptions.EncryptionScope = m_encryptionScope;
|
||||
return BlobRestClient::BlockBlob::CommitBlockList(
|
||||
return Details::BlobRestClient::BlockBlob::CommitBlockList(
|
||||
options.Context, *m_pipeline, m_blobUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
Azure::Core::Response<GetBlockListResult> BlockBlobClient::GetBlockList(
|
||||
const GetBlockListOptions& options) const
|
||||
{
|
||||
BlobRestClient::BlockBlob::GetBlockListOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::BlockBlob::GetBlockListOptions protocolLayerOptions;
|
||||
protocolLayerOptions.ListType = options.ListType;
|
||||
protocolLayerOptions.LeaseId = options.AccessConditions.LeaseId;
|
||||
protocolLayerOptions.IfTags = options.AccessConditions.TagConditions;
|
||||
return BlobRestClient::BlockBlob::GetBlockList(
|
||||
return Details::BlobRestClient::BlockBlob::GetBlockList(
|
||||
options.Context, *m_pipeline, m_blobUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
|
||||
@ -49,12 +49,13 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
PageBlobClient newClient(*this);
|
||||
if (snapshot.empty())
|
||||
{
|
||||
newClient.m_blobUrl.RemoveQueryParameter(Details::c_HttpQuerySnapshot);
|
||||
newClient.m_blobUrl.RemoveQueryParameter(Storage::Details::c_HttpQuerySnapshot);
|
||||
}
|
||||
else
|
||||
{
|
||||
newClient.m_blobUrl.AppendQueryParameter(
|
||||
Details::c_HttpQuerySnapshot, Details::UrlEncodeQueryParameter(snapshot));
|
||||
Storage::Details::c_HttpQuerySnapshot,
|
||||
Storage::Details::UrlEncodeQueryParameter(snapshot));
|
||||
}
|
||||
return newClient;
|
||||
}
|
||||
@ -64,12 +65,13 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
PageBlobClient newClient(*this);
|
||||
if (versionId.empty())
|
||||
{
|
||||
newClient.m_blobUrl.RemoveQueryParameter(Details::c_HttpQueryVersionId);
|
||||
newClient.m_blobUrl.RemoveQueryParameter(Storage::Details::c_HttpQueryVersionId);
|
||||
}
|
||||
else
|
||||
{
|
||||
newClient.m_blobUrl.AppendQueryParameter(
|
||||
Details::c_HttpQueryVersionId, Details::UrlEncodeQueryParameter(versionId));
|
||||
Storage::Details::c_HttpQueryVersionId,
|
||||
Storage::Details::UrlEncodeQueryParameter(versionId));
|
||||
}
|
||||
return newClient;
|
||||
}
|
||||
@ -78,7 +80,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
int64_t blobContentLength,
|
||||
const CreatePageBlobOptions& options) const
|
||||
{
|
||||
BlobRestClient::PageBlob::CreatePageBlobOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::PageBlob::CreatePageBlobOptions protocolLayerOptions;
|
||||
protocolLayerOptions.BlobContentLength = blobContentLength;
|
||||
protocolLayerOptions.SequenceNumber = options.SequenceNumber;
|
||||
protocolLayerOptions.HttpHeaders = options.HttpHeaders;
|
||||
@ -97,7 +99,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
protocolLayerOptions.EncryptionAlgorithm = m_customerProvidedKey.GetValue().Algorithm;
|
||||
}
|
||||
protocolLayerOptions.EncryptionScope = m_encryptionScope;
|
||||
return BlobRestClient::PageBlob::Create(
|
||||
return Details::BlobRestClient::PageBlob::Create(
|
||||
options.Context, *m_pipeline, m_blobUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
@ -106,7 +108,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
Azure::Core::Http::BodyStream* content,
|
||||
const UploadPageBlobPagesOptions& options) const
|
||||
{
|
||||
BlobRestClient::PageBlob::UploadPageBlobPagesOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::PageBlob::UploadPageBlobPagesOptions protocolLayerOptions;
|
||||
protocolLayerOptions.Range = std::make_pair(offset, offset + content->Length() - 1);
|
||||
protocolLayerOptions.TransactionalContentMd5 = options.TransactionalContentMd5;
|
||||
protocolLayerOptions.TransactionalContentCrc64 = options.TransactionalContentCrc64;
|
||||
@ -123,7 +125,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
protocolLayerOptions.EncryptionAlgorithm = m_customerProvidedKey.GetValue().Algorithm;
|
||||
}
|
||||
protocolLayerOptions.EncryptionScope = m_encryptionScope;
|
||||
return BlobRestClient::PageBlob::UploadPages(
|
||||
return Details::BlobRestClient::PageBlob::UploadPages(
|
||||
options.Context, *m_pipeline, m_blobUrl, content, protocolLayerOptions);
|
||||
}
|
||||
|
||||
@ -134,7 +136,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
int64_t sourceLength,
|
||||
const UploadPageBlobPagesFromUriOptions& options) const
|
||||
{
|
||||
BlobRestClient::PageBlob::UploadPageBlobPagesFromUriOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::PageBlob::UploadPageBlobPagesFromUriOptions protocolLayerOptions;
|
||||
protocolLayerOptions.SourceUri = sourceUri;
|
||||
protocolLayerOptions.SourceRange
|
||||
= std::make_pair(sourceOffset, sourceOffset + sourceLength - 1);
|
||||
@ -155,7 +157,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
protocolLayerOptions.EncryptionAlgorithm = m_customerProvidedKey.GetValue().Algorithm;
|
||||
}
|
||||
protocolLayerOptions.EncryptionScope = m_encryptionScope;
|
||||
return BlobRestClient::PageBlob::UploadPagesFromUri(
|
||||
return Details::BlobRestClient::PageBlob::UploadPagesFromUri(
|
||||
options.Context, *m_pipeline, m_blobUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
@ -164,7 +166,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
int64_t length,
|
||||
const ClearPageBlobPagesOptions& options) const
|
||||
{
|
||||
BlobRestClient::PageBlob::ClearPageBlobPagesOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::PageBlob::ClearPageBlobPagesOptions protocolLayerOptions;
|
||||
protocolLayerOptions.Range = std::make_pair(offset, offset + length - 1);
|
||||
protocolLayerOptions.LeaseId = options.AccessConditions.LeaseId;
|
||||
protocolLayerOptions.IfModifiedSince = options.AccessConditions.IfModifiedSince;
|
||||
@ -179,7 +181,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
protocolLayerOptions.EncryptionAlgorithm = m_customerProvidedKey.GetValue().Algorithm;
|
||||
}
|
||||
protocolLayerOptions.EncryptionScope = m_encryptionScope;
|
||||
return BlobRestClient::PageBlob::ClearPages(
|
||||
return Details::BlobRestClient::PageBlob::ClearPages(
|
||||
options.Context, *m_pipeline, m_blobUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
@ -187,7 +189,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
int64_t blobContentLength,
|
||||
const ResizePageBlobOptions& options) const
|
||||
{
|
||||
BlobRestClient::PageBlob::ResizePageBlobOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::PageBlob::ResizePageBlobOptions protocolLayerOptions;
|
||||
protocolLayerOptions.BlobContentLength = blobContentLength;
|
||||
protocolLayerOptions.LeaseId = options.AccessConditions.LeaseId;
|
||||
protocolLayerOptions.IfModifiedSince = options.AccessConditions.IfModifiedSince;
|
||||
@ -202,14 +204,14 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
protocolLayerOptions.EncryptionAlgorithm = m_customerProvidedKey.GetValue().Algorithm;
|
||||
}
|
||||
protocolLayerOptions.EncryptionScope = m_encryptionScope;
|
||||
return BlobRestClient::PageBlob::Resize(
|
||||
return Details::BlobRestClient::PageBlob::Resize(
|
||||
options.Context, *m_pipeline, m_blobUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
Azure::Core::Response<GetPageBlobPageRangesResult> PageBlobClient::GetPageRanges(
|
||||
const GetPageBlobPageRangesOptions& options) const
|
||||
{
|
||||
BlobRestClient::PageBlob::GetPageBlobPageRangesOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::PageBlob::GetPageBlobPageRangesOptions protocolLayerOptions;
|
||||
protocolLayerOptions.PreviousSnapshot = options.PreviousSnapshot;
|
||||
protocolLayerOptions.PreviousSnapshotUrl = options.PreviousSnapshotUrl;
|
||||
if (options.Offset.HasValue() && options.Length.HasValue())
|
||||
@ -223,7 +225,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
protocolLayerOptions.IfMatch = options.AccessConditions.IfMatch;
|
||||
protocolLayerOptions.IfNoneMatch = options.AccessConditions.IfNoneMatch;
|
||||
protocolLayerOptions.IfTags = options.AccessConditions.TagConditions;
|
||||
auto protocolLayerResponse = BlobRestClient::PageBlob::GetPageRanges(
|
||||
auto protocolLayerResponse = Details::BlobRestClient::PageBlob::GetPageRanges(
|
||||
options.Context, *m_pipeline, m_blobUrl, protocolLayerOptions);
|
||||
|
||||
GetPageBlobPageRangesResult ret;
|
||||
@ -248,14 +250,14 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
const std::string& sourceUri,
|
||||
const StartCopyPageBlobIncrementalOptions& options) const
|
||||
{
|
||||
BlobRestClient::PageBlob::StartCopyPageBlobIncrementalOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::PageBlob::StartCopyPageBlobIncrementalOptions protocolLayerOptions;
|
||||
protocolLayerOptions.CopySource = sourceUri;
|
||||
protocolLayerOptions.IfModifiedSince = options.AccessConditions.IfModifiedSince;
|
||||
protocolLayerOptions.IfUnmodifiedSince = options.AccessConditions.IfUnmodifiedSince;
|
||||
protocolLayerOptions.IfMatch = options.AccessConditions.IfMatch;
|
||||
protocolLayerOptions.IfNoneMatch = options.AccessConditions.IfNoneMatch;
|
||||
protocolLayerOptions.IfTags = options.AccessConditions.TagConditions;
|
||||
return BlobRestClient::PageBlob::StartCopyIncremental(
|
||||
return Details::BlobRestClient::PageBlob::StartCopyIncremental(
|
||||
options.Context, *m_pipeline, m_blobUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
|
||||
@ -234,7 +234,7 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
properties.MinuteMetrics.RetentionPolicy.Days = 4;
|
||||
properties.MinuteMetrics.IncludeApis = true;
|
||||
|
||||
properties.DefaultServiceVersion = Blobs::c_ApiVersion;
|
||||
properties.DefaultServiceVersion = Blobs::Details::c_ApiVersion;
|
||||
|
||||
properties.StaticWebsite.Enabled = true;
|
||||
properties.StaticWebsite.IndexDocument = "index.html";
|
||||
|
||||
@ -84,7 +84,7 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
response->AddHeader("content-length", std::to_string(errorResponseBody.length()));
|
||||
response->AddHeader("content-type", "application/xml");
|
||||
response->AddHeader("x-ms-request-id", Core::Uuid::CreateUuid().GetUuidString());
|
||||
response->AddHeader("x-ms-version", Blobs::c_ApiVersion);
|
||||
response->AddHeader("x-ms-version", Blobs::Details::c_ApiVersion);
|
||||
response->AddHeader("x-ms-error-code", "BlobNotFound");
|
||||
response->AddHeader("date", ToRfc1123(std::chrono::system_clock::now()));
|
||||
return response;
|
||||
@ -106,7 +106,7 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
response->AddHeader("content-length", std::to_string(errorResponseBody.length()));
|
||||
response->AddHeader("content-type", "application/xml");
|
||||
response->AddHeader("x-ms-request-id", Core::Uuid::CreateUuid().GetUuidString());
|
||||
response->AddHeader("x-ms-version", Blobs::c_ApiVersion);
|
||||
response->AddHeader("x-ms-version", Blobs::Details::c_ApiVersion);
|
||||
response->AddHeader("x-ms-error-code", "ConditionNotMet");
|
||||
response->AddHeader("date", ToRfc1123(std::chrono::system_clock::now()));
|
||||
return response;
|
||||
@ -129,7 +129,7 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
response->AddHeader("etag", m_primaryETag);
|
||||
response->AddHeader("last-modified", "Thu 27 Aug 2001 07:00:00 GMT");
|
||||
response->AddHeader("x-ms-request-id", Core::Uuid::CreateUuid().GetUuidString());
|
||||
response->AddHeader("x-ms-version", Blobs::c_ApiVersion);
|
||||
response->AddHeader("x-ms-version", Blobs::Details::c_ApiVersion);
|
||||
response->AddHeader("x-ms-creation-time", "Thu 27 Aug 2002 07:00:00 GMT");
|
||||
response->AddHeader("x-ms-lease-status", "unlocked");
|
||||
response->AddHeader("x-ms-lease-state", "available");
|
||||
@ -156,7 +156,7 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
response->AddHeader("etag", m_secondaryETag);
|
||||
response->AddHeader("last-modified", "Thu 27 Aug 2001 07:00:00 GMT");
|
||||
response->AddHeader("x-ms-request-id", Core::Uuid::CreateUuid().GetUuidString());
|
||||
response->AddHeader("x-ms-version", Blobs::c_ApiVersion);
|
||||
response->AddHeader("x-ms-version", Blobs::Details::c_ApiVersion);
|
||||
response->AddHeader("x-ms-creation-time", "Thu 27 Aug 2002 07:00:00 GMT");
|
||||
response->AddHeader("x-ms-lease-status", "unlocked");
|
||||
response->AddHeader("x-ms-lease-state", "available");
|
||||
|
||||
@ -397,7 +397,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
ScheduleFileExpiryOriginType expiryOrigin,
|
||||
const ScheduleFileDeletionOptions& options) const
|
||||
{
|
||||
Blobs::BlobRestClient::Blob::SetBlobExpiryOptions protocolLayerOptions;
|
||||
Blobs::Details::BlobRestClient::Blob::SetBlobExpiryOptions protocolLayerOptions;
|
||||
protocolLayerOptions.ExpiryOrigin = expiryOrigin;
|
||||
if (options.ExpiresOn.HasValue() && options.TimeToExpireInMs.HasValue())
|
||||
{
|
||||
@ -411,7 +411,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
{
|
||||
protocolLayerOptions.ExpiryTime = std::to_string(options.TimeToExpireInMs.GetValue());
|
||||
}
|
||||
return Blobs::BlobRestClient::Blob::ScheduleDeletion(
|
||||
return Blobs::Details::BlobRestClient::Blob::ScheduleDeletion(
|
||||
options.Context, *m_pipeline, m_blobClient.m_blobUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user