Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdk/storage/assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "cpp",
"TagPrefix": "cpp/storage",
"Tag": "cpp/storage_0b9df101f1"
"Tag": "cpp/storage_a6149e4c39"
}
1 change: 1 addition & 0 deletions sdk/storage/azure-storage-common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ set(
inc/azure/storage/common/internal/storage_data_locality_policy.hpp
inc/azure/storage/common/internal/storage_per_retry_policy.hpp
inc/azure/storage/common/internal/storage_pipeline.hpp
inc/azure/storage/common/internal/storage_protocol.hpp
inc/azure/storage/common/internal/storage_retry_policy.hpp
inc/azure/storage/common/internal/storage_service_version_policy.hpp
inc/azure/storage/common/internal/storage_switch_to_secondary_policy.hpp
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

#pragma once

#include <azure/core/exception.hpp>
#include <azure/storage/common/storage_exception.hpp>

#include <utility>

namespace Azure { namespace Storage { namespace _internal {

template <class Operation>
auto InvokeStorageProtocol(Operation&& operation)
-> decltype(std::forward<Operation>(operation)())
{
try
{
return std::forward<Operation>(operation)();
}
catch (StorageException const&)
{
throw;
}
catch (Core::RequestFailedException& error)
{
if (!error.RawResponse)
{
throw;
}
throw StorageException::CreateFromResponse(std::move(error.RawResponse));
}
}

}}} // namespace Azure::Storage::_internal
8 changes: 6 additions & 2 deletions sdk/storage/azure-storage-queues/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,23 @@ set(
inc/azure/storage/queues/queue_responses.hpp
inc/azure/storage/queues/queue_sas_builder.hpp
inc/azure/storage/queues/queue_service_client.hpp
inc/azure/storage/queues/rest_client.hpp
inc/azure/storage/queues/rtti.hpp
)

set(
AZURE_STORAGE_QUEUES_SOURCE
src/private/package_version.hpp
src/private/queue_model_conversions.hpp
src/generated/queues_client.hpp
src/generated/queues_client_options.hpp
src/generated/queues_models.hpp
src/generated/queues_client.cpp
src/generated/queues.cpp
src/queue_client.cpp
src/queue_options.cpp
src/queue_responses.cpp
src/queue_sas_builder.cpp
src/queue_service_client.cpp
src/rest_client.cpp
)

add_library(azure-storage-queues ${AZURE_STORAGE_QUEUES_HEADER} ${AZURE_STORAGE_QUEUES_SOURCE})
Expand Down
12 changes: 12 additions & 0 deletions sdk/storage/azure-storage-queues/cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": "0.2",
"language": "en",
"languageId": "cpp",
"dictionaries": [
"powershell",
"cpp"
],
"words": [
"numofmessages"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "azure/storage/queues/queue_responses.hpp"
#include "azure/storage/queues/queue_sas_builder.hpp"
#include "azure/storage/queues/queue_service_client.hpp"
#include "azure/storage/queues/rest_client.hpp"
#include "azure/storage/queues/rtti.hpp"

#include <azure/storage/common/storage_exception.hpp>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
#include "azure/storage/queues/queue_options.hpp"
#include "azure/storage/queues/queue_responses.hpp"

#include <azure/core/context.hpp>
#include <azure/core/credentials/credentials.hpp>
#include <azure/core/internal/http/pipeline.hpp>
#include <azure/core/response.hpp>
#include <azure/core/url.hpp>
#include <azure/storage/common/storage_credential.hpp>

#include <memory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,85 @@

#pragma once

#include "azure/storage/queues/rest_client.hpp"
#include "azure/storage/queues/dll_import_export.hpp"

#include <azure/core/datetime.hpp>
#include <azure/core/internal/client_options.hpp>
#include <azure/core/internal/extendable_enumeration.hpp>
#include <azure/storage/common/storage_common.hpp>

#include <chrono>
#include <cstdint>
#include <string>
#include <type_traits>
#include <utility>

namespace Azure { namespace Storage { namespace Queues {

namespace Models {
/**
* @brief Include this parameter to specify that the queues' metadata be returned as part of the
* response body.
*/
enum class ListQueuesIncludeFlags
{
None = 0,
Metadata = 1,
};
/**
* @brief Combines the flags from both operands.
* @param lhs The left operand.
* @param rhs The right operand.
* @return The combined flags.
*/
inline ListQueuesIncludeFlags operator|(ListQueuesIncludeFlags lhs, ListQueuesIncludeFlags rhs)
{
using type = std::underlying_type_t<ListQueuesIncludeFlags>;
return static_cast<ListQueuesIncludeFlags>(static_cast<type>(lhs) | static_cast<type>(rhs));
}
/**
* @brief Adds the right operand's flags to the left operand.
* @param lhs The flags to update.
* @param rhs The flags to add.
* @return A reference to the updated left operand.
*/
inline ListQueuesIncludeFlags& operator|=(
ListQueuesIncludeFlags& lhs,
ListQueuesIncludeFlags rhs)
{
lhs = lhs | rhs;
return lhs;
}
/**
* @brief Selects the flags present in both operands.
* @param lhs The left operand.
* @param rhs The right operand.
* @return The flags present in both operands.
*/
inline ListQueuesIncludeFlags operator&(ListQueuesIncludeFlags lhs, ListQueuesIncludeFlags rhs)
{
using type = std::underlying_type_t<ListQueuesIncludeFlags>;
return static_cast<ListQueuesIncludeFlags>(static_cast<type>(lhs) & static_cast<type>(rhs));
}
/**
* @brief Retains only the right operand's flags in the left operand.
* @param lhs The flags to update.
* @param rhs The flags to retain.
* @return A reference to the updated left operand.
*/
inline ListQueuesIncludeFlags& operator&=(
ListQueuesIncludeFlags& lhs,
ListQueuesIncludeFlags rhs)
{
lhs = lhs & rhs;
return lhs;
}
} // namespace Models

namespace _detail {
constexpr static const char* ApiVersion = "2026-04-06";
} // namespace _detail

/**
* @brief Audiences available for queue service
*
Expand Down Expand Up @@ -145,37 +213,6 @@ namespace Azure { namespace Storage { namespace Queues {
Azure::Nullable<QueueAudience> Audience;
};

/**
* Optional parameters for #Azure::Storage::Queues::QueueServiceClient::ListQueues.
*/
struct ListQueuesOptions final
{
/**
* @brief Specifies a string that filters the results to return only queues whose name begins
* with the specified prefix.
*/
Azure::Nullable<std::string> Prefix;

/**
* @brief A string value that identifies the portion of the list of queues to be returned with
* the next listing operation. The operation returns a non-empty continuation token if the
* listing operation did not return all queues remaining to be listed with the current segment.
* The ContinuationToken value can be used as the value for the ContinuationToken parameter in a
* subsequent call to request the next segment of list items.
*/
Azure::Nullable<std::string> ContinuationToken;

/**
* @brief Specifies the maximum number of queues to return.
*/
Azure::Nullable<int32_t> PageSizeHint;

/**
* @brief Specifies that the queue's metadata be returned.
*/
Models::ListQueuesIncludeFlags Include = Models::ListQueuesIncludeFlags::None;
};

/**
* Optional parameters for #Azure::Storage::Queues::QueueServiceClient::SetProperties.
*/
Expand Down Expand Up @@ -215,6 +252,37 @@ namespace Azure { namespace Storage { namespace Queues {
Nullable<std::string> DelegatedUserTid;
};

/**
* Optional parameters for #Azure::Storage::Queues::QueueServiceClient::ListQueues.
*/
struct ListQueuesOptions final
{
/**
* @brief Specifies a string that filters the results to return only queues whose name begins
* with the specified prefix.
*/
Azure::Nullable<std::string> Prefix;

/**
* @brief A string value that identifies the portion of the list of queues to be returned with
* the next listing operation. The operation returns a non-empty continuation token if the
* listing operation did not return all queues remaining to be listed with the current segment.
* The ContinuationToken value can be used as the value for the ContinuationToken parameter in a
* subsequent call to request the next segment of list items.
*/
Azure::Nullable<std::string> ContinuationToken;

/**
* @brief Specifies the maximum number of queues to return.
*/
Azure::Nullable<int32_t> PageSizeHint;

/**
* @brief Specifies that the queue's metadata be returned.
*/
Models::ListQueuesIncludeFlags Include = Models::ListQueuesIncludeFlags::None;
};

/**
* Optional parameters for #Azure::Storage::Queues::QueueClient::Create.
*/
Expand Down
Loading
Loading