diff --git a/sdk/core/azure-core/README.md b/sdk/core/azure-core/README.md index 0422c4b4b..bab12bc78 100644 --- a/sdk/core/azure-core/README.md +++ b/sdk/core/azure-core/README.md @@ -26,17 +26,17 @@ Some operations take a long time to complete and require polling for their statu You can intermittently poll whether the operation has finished by using the `Poll()` method on the returned `Operation` and track progress of the operation using `Value()`. Alternatively, if you just want to wait until the operation completes, you can use `PollUntilDone()`. -```C++ +```{.cpp} SomeServiceClient client; auto operation = *client.StartSomeLongRunningOperation(); while (!operation.IsDone()) -{ +{ std::unique_ptr response = operation.Poll(); auto partialResult = operation.Value(); - + // Your per-polling custom logic goes here, such as logging progress. // You can also try to abort the operation if it doesn't complete in time. @@ -50,11 +50,12 @@ auto finalResult = operation.Value(); ### HTTP Transport adapter -Out of the box, the Azure SDK for C++ supports the libcurl and WinHTTP libraries as HTTP stacks for communicating with Azure services over the network. The SDK also provides a mechanism for `customer-implemented` *HTTP transport adapter*. [You can learn more about the transport adapter in this doc](https://github.com/Azure/azure-sdk-for-cpp/blob/master/doc/HttpTransportAdapter.md#http-transport-adapter). +Out of the box, the Azure SDK for C++ supports the libcurl and WinHTTP libraries as HTTP stacks for communicating with Azure services over the network. The SDK also provides a mechanism for `customer-implemented` _HTTP transport adapter_. [You can learn more about the transport adapter in this doc](https://github.com/Azure/azure-sdk-for-cpp/blob/master/doc/HttpTransportAdapter.md#http-transport-adapter). ## Troubleshooting Three main ways of troubleshooting failures are: + - Inspecting exceptions - Enabling logging (`Available in future release`) - Distributed tracing (`Available in future release`) @@ -64,9 +65,10 @@ Three main ways of troubleshooting failures are: Explore and install available Azure SDK libraries. ## Contributing + For details on contributing to this repository, see the [contributing guide][azure_sdk_for_cpp_contributing]. -This project welcomes contributions and suggestions. Most contributions require you to agree to a +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. @@ -78,16 +80,17 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://ope For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. -### Additional Helpful Links for Contributors +### Additional Helpful Links for Contributors -Many people all over the world have helped make this project better. You'll want to check out: +Many people all over the world have helped make this project better. You'll want to check out: -* [What are some good first issues for new contributors to the repo?](https://github.com/azure/azure-sdk-for-cpp/issues?q=is%3Aopen+is%3Aissue+label%3A%22up+for+grabs%22) -* [How to build and test your change][azure_sdk_for_cpp_contributing_developer_guide] -* [How you can make a change happen!][azure_sdk_for_cpp_contributing_pull_requests] -* Frequently Asked Questions (FAQ) and Conceptual Topics in the detailed [Azure SDK for C++ wiki](https://github.com/azure/azure-sdk-for-cpp/wiki). +- [What are some good first issues for new contributors to the repo?](https://github.com/azure/azure-sdk-for-cpp/issues?q=is%3Aopen+is%3Aissue+label%3A%22up+for+grabs%22) +- [How to build and test your change][azure_sdk_for_cpp_contributing_developer_guide] +- [How you can make a change happen!][azure_sdk_for_cpp_contributing_pull_requests] +- Frequently Asked Questions (FAQ) and Conceptual Topics in the detailed [Azure SDK for C++ wiki](https://github.com/azure/azure-sdk-for-cpp/wiki). + ### Reporting security issues and security bugs Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) . You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Further information, including the MSRC PGP key, can be found in the [Security TechCenter](https://www.microsoft.com/msrc/faqs-report-an-issue). @@ -97,6 +100,7 @@ Security issues and bugs should be reported privately, via email, to the Microso Azure SDK for C++ is licensed under the [MIT](https://github.com/Azure/azure-sdk-for-cpp/blob/master/sdk/core/azure-core/LICENSE) license. + [azure_sdk_for_cpp_contributing]: https://github.com/Azure/azure-sdk-for-cpp/blob/master/CONTRIBUTING.md [azure_sdk_for_cpp_contributing_developer_guide]: https://github.com/Azure/azure-sdk-for-cpp/blob/master/CONTRIBUTING.md#developer-guide [azure_sdk_for_cpp_contributing_pull_requests]: https://github.com/Azure/azure-sdk-for-cpp/blob/master/CONTRIBUTING.md#pull-requests diff --git a/sdk/core/azure-core/inc/azure/core/case_insensitive_containers.hpp b/sdk/core/azure-core/inc/azure/core/case_insensitive_containers.hpp index 43a301359..1cf9c8ea5 100644 --- a/sdk/core/azure-core/inc/azure/core/case_insensitive_containers.hpp +++ b/sdk/core/azure-core/inc/azure/core/case_insensitive_containers.hpp @@ -25,6 +25,7 @@ namespace Azure { namespace Core { /** * @brief A type alias of `std::set` with case-insensitive element comparison. + * */ using CaseInsensitiveSet = std::set; diff --git a/sdk/core/azure-core/inc/azure/core/context.hpp b/sdk/core/azure-core/inc/azure/core/context.hpp index 3eab2c4d9..0cc1b79da 100644 --- a/sdk/core/azure-core/inc/azure/core/context.hpp +++ b/sdk/core/azure-core/inc/azure/core/context.hpp @@ -39,11 +39,13 @@ namespace Azure { namespace Core { /** * @brief A context is a node within a tree that represents deadlines and key/value pairs. + * */ class Context final { public: /** * @brief A context key. + * */ class Key final { Key const* m_uniqueAddress; @@ -114,11 +116,13 @@ namespace Azure { namespace Core { public: /** * @brief Construct a new context with no deadline, and no value associated. + * */ Context() : m_contextSharedState(std::make_shared()) {} /** * @brief Copy constructor. + * */ Context& operator=(const Context&) = default; @@ -188,6 +192,7 @@ namespace Azure { namespace Core { /** * @brief Cancels the context. + * */ void Cancel() { @@ -203,6 +208,7 @@ namespace Azure { namespace Core { /** * @brief Throw an exception if the context was cancelled. + * */ void ThrowIfCancelled() const { @@ -214,6 +220,7 @@ namespace Azure { namespace Core { /** * @brief The application context (root). + * */ static AZ_CORE_DLLEXPORT Context ApplicationContext; }; diff --git a/sdk/core/azure-core/inc/azure/core/credentials/credentials.hpp b/sdk/core/azure-core/inc/azure/core/credentials/credentials.hpp index 6363c0db8..ab6f9d270 100644 --- a/sdk/core/azure-core/inc/azure/core/credentials/credentials.hpp +++ b/sdk/core/azure-core/inc/azure/core/credentials/credentials.hpp @@ -22,33 +22,39 @@ namespace Azure { namespace Core { namespace Credentials { /** * @brief Represents an access token. + * */ struct AccessToken final { /** * @brief Token string. + * */ std::string Token; /** * @brief Token expiration. + * */ DateTime ExpiresOn; }; /** * @brief Defines context for getting token. + * */ struct TokenRequestContext final { /** * @brief Authentication scopes. + * */ std::vector Scopes; }; /** * @brief Token credential. + * */ class TokenCredential { public: @@ -76,6 +82,7 @@ namespace Azure { namespace Core { namespace Credentials { /** * @brief An exception that gets thrown when authentication error occurs. + * */ class AuthenticationException final : public std::exception { std::string m_message; diff --git a/sdk/core/azure-core/inc/azure/core/credentials/token_credential_options.hpp b/sdk/core/azure-core/inc/azure/core/credentials/token_credential_options.hpp index 6bd598675..e19bed825 100644 --- a/sdk/core/azure-core/inc/azure/core/credentials/token_credential_options.hpp +++ b/sdk/core/azure-core/inc/azure/core/credentials/token_credential_options.hpp @@ -13,6 +13,7 @@ namespace Azure { namespace Core { namespace Credentials { /** * @brief Defines options for #Azure::Core::Credentials::TokenCredential. + * */ struct TokenCredentialOptions : public Azure::Core::_internal::ClientOptions { diff --git a/sdk/core/azure-core/inc/azure/core/cryptography/hash.hpp b/sdk/core/azure-core/inc/azure/core/cryptography/hash.hpp index 60e9a2f51..7949963ff 100644 --- a/sdk/core/azure-core/inc/azure/core/cryptography/hash.hpp +++ b/sdk/core/azure-core/inc/azure/core/cryptography/hash.hpp @@ -46,6 +46,7 @@ namespace Azure { namespace Core { namespace Cryptography { public: /** * @brief Construct a default instance of #Azure::Core::Cryptography::Hash. + * */ Hash() = default; @@ -107,6 +108,7 @@ namespace Azure { namespace Core { namespace Cryptography { /** * @brief Cleanup any state when destroying the instance of #Azure::Core::Cryptography::Hash. + * */ virtual ~Hash() = default; @@ -127,11 +129,13 @@ namespace Azure { namespace Core { namespace Cryptography { public: /** * @brief Construct a default instance of #Azure::Core::Cryptography::Md5Hash. + * */ Md5Hash(); /** * @brief Cleanup any state when destroying the instance of #Azure::Core::Cryptography::Md5Hash. + * */ ~Md5Hash() override; diff --git a/sdk/core/azure-core/inc/azure/core/datetime.hpp b/sdk/core/azure-core/inc/azure/core/datetime.hpp index 8ff65d30e..b531bb452 100644 --- a/sdk/core/azure-core/inc/azure/core/datetime.hpp +++ b/sdk/core/azure-core/inc/azure/core/datetime.hpp @@ -115,6 +115,7 @@ public: /** * @brief Construct an instance of #Azure::DateTime from base class. + * */ constexpr DateTime(time_point const& timePoint) : time_point(timePoint) {} @@ -139,6 +140,7 @@ public: /** * @brief Defines the format applied to the fraction part of any #Azure::DateTime. + * */ enum class TimeFractionFormat { @@ -155,6 +157,7 @@ public: /** * @brief Defines the supported date and time string formats. + * */ enum class DateFormat { diff --git a/sdk/core/azure-core/inc/azure/core/diagnostics/logger.hpp b/sdk/core/azure-core/inc/azure/core/diagnostics/logger.hpp index ee64305de..8411618ce 100644 --- a/sdk/core/azure-core/inc/azure/core/diagnostics/logger.hpp +++ b/sdk/core/azure-core/inc/azure/core/diagnostics/logger.hpp @@ -15,11 +15,13 @@ namespace Azure { namespace Core { namespace Diagnostics { /** * @brief Log message handler. + * */ class Logger final { public: /** * @brief Log message level. + * */ // https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/core/azure-core/src/main/java/com/azure/core/util/logging/LogLevel.java enum class Level : int diff --git a/sdk/core/azure-core/inc/azure/core/etag.hpp b/sdk/core/azure-core/inc/azure/core/etag.hpp index 599135f46..2ddf4fa6a 100644 --- a/sdk/core/azure-core/inc/azure/core/etag.hpp +++ b/sdk/core/azure-core/inc/azure/core/etag.hpp @@ -17,6 +17,7 @@ namespace Azure { /** * @brief Represents an HTTP validator. + * */ class ETag final { // ETag is a validator based on https://tools.ietf.org/html/rfc7232#section-2.3.2 @@ -26,6 +27,7 @@ private: public: /** * @brief The comparison type. + * */ enum class ETagComparison { @@ -117,6 +119,7 @@ public: /** * @brief Construct an empty (null) #Azure::Core::ETag. + * */ ETag() = default; diff --git a/sdk/core/azure-core/inc/azure/core/http/http.hpp b/sdk/core/azure-core/inc/azure/core/http/http.hpp index 3f1cc5e03..33d724b82 100644 --- a/sdk/core/azure-core/inc/azure/core/http/http.hpp +++ b/sdk/core/azure-core/inc/azure/core/http/http.hpp @@ -52,6 +52,7 @@ namespace Azure { namespace Core { namespace Http { /********************* Exceptions **********************/ /** * @brief HTTP transport layer error. + * */ class TransportException final : public Azure::Core::RequestFailedException { public: @@ -91,6 +92,7 @@ namespace Azure { namespace Core { namespace Http { /** * HTTP request method. + * */ class HttpMethod final { public: @@ -117,6 +119,7 @@ namespace Azure { namespace Core { namespace Http { /** * @brief HTTP request. + * */ class Request final { friend class Azure::Core::Http::Policies::_internal::RetryPolicy; @@ -227,16 +230,19 @@ namespace Azure { namespace Core { namespace Http { // Methods used by transport layer (and logger) to send request /** * @brief Get HTTP method. + * */ HttpMethod GetMethod() const; /** * @brief Get HTTP headers. + * */ CaseInsensitiveMap GetHeaders() const; /** * @brief Get HTTP body as #Azure::Core::IO::BodyStream. + * */ Azure::Core::IO::BodyStream* GetBodyStream() { return this->m_bodyStream; } @@ -248,11 +254,13 @@ namespace Azure { namespace Core { namespace Http { /** * @brief Get URL. + * */ Url& GetUrl() { return this->m_url; } /** * @brief Get URL. + * */ Url const& GetUrl() const { return this->m_url; } }; diff --git a/sdk/core/azure-core/inc/azure/core/http/http_status_code.hpp b/sdk/core/azure-core/inc/azure/core/http/http_status_code.hpp index 97f2a73bd..f4ea558f3 100644 --- a/sdk/core/azure-core/inc/azure/core/http/http_status_code.hpp +++ b/sdk/core/azure-core/inc/azure/core/http/http_status_code.hpp @@ -13,6 +13,7 @@ namespace Azure { namespace Core { namespace Http { /** * @brief Defines the possible HTTP status codes. + * */ enum class HttpStatusCode { diff --git a/sdk/core/azure-core/inc/azure/core/http/policies/policy.hpp b/sdk/core/azure-core/inc/azure/core/http/policies/policy.hpp index 11dc81468..c9dcd547c 100644 --- a/sdk/core/azure-core/inc/azure/core/http/policies/policy.hpp +++ b/sdk/core/azure-core/inc/azure/core/http/policies/policy.hpp @@ -51,26 +51,31 @@ namespace Azure { namespace Core { namespace Http { namespace Policies { /** * @brief Retry options. + * */ struct RetryOptions final { /** * @brief Maximum number of attempts to retry. + * */ int32_t MaxRetries = 3; /** * @brief Mimimum amount of time between retry attempts. + * */ std::chrono::milliseconds RetryDelay = std::chrono::seconds(4); /** * @brief Mimimum amount of time between retry attempts. + * */ decltype(RetryDelay) MaxRetryDelay = std::chrono::minutes(2); /** * @brief HTTP status codes to retry on. + * */ std::set StatusCodes{ HttpStatusCode::RequestTimeout, @@ -83,16 +88,19 @@ namespace Azure { namespace Core { namespace Http { namespace Policies { /** * @brief Log options. + * */ struct LogOptions final { /** * @brief HTTP query parameters that are allowed to be logged. + * */ std::set AllowedHttpQueryParameters; /** * @brief HTTP headers that are allowed to be logged. + * */ Azure::Core::CaseInsensitiveSet AllowedHttpHeaders = _detail::g_defaultAllowedHttpHeaders; }; @@ -231,6 +239,7 @@ namespace Azure { namespace Core { namespace Http { namespace Policies { /** * @brief HTTP retry policy. + * */ class RetryPolicy #if !defined(TESTING_BUILD) @@ -299,6 +308,7 @@ namespace Azure { namespace Core { namespace Http { namespace Policies { public: /** * @brief Constructs HTTP request ID policy. + * */ explicit RequestIdPolicy() {} @@ -364,6 +374,7 @@ namespace Azure { namespace Core { namespace Http { namespace Policies { /** * @brief Bearer Token authentication policy. + * */ class BearerTokenAuthenticationPolicy final : public HttpPolicy { private: @@ -415,6 +426,7 @@ namespace Azure { namespace Core { namespace Http { namespace Policies { public: /** * @brief Constructs HTTP logging policy. + * */ explicit LogPolicy(LogOptions options) : m_options(std::move(options)) {} diff --git a/sdk/core/azure-core/inc/azure/core/http/raw_response.hpp b/sdk/core/azure-core/inc/azure/core/http/raw_response.hpp index 9ad5c1451..78074f9a5 100644 --- a/sdk/core/azure-core/inc/azure/core/http/raw_response.hpp +++ b/sdk/core/azure-core/inc/azure/core/http/raw_response.hpp @@ -19,6 +19,7 @@ namespace Azure { namespace Core { namespace Http { /** * @brief Raw HTTP response. + * */ class RawResponse final { @@ -112,21 +113,25 @@ namespace Azure { namespace Core { namespace Http { /** * @brief Get HTTP status code of the HTTP response. + * */ HttpStatusCode GetStatusCode() const; /** * @brief Get HTTP reason phrase code of the HTTP response. + * */ std::string const& GetReasonPhrase() const; /** * @brief Get HTTP response headers. + * */ CaseInsensitiveMap const& GetHeaders() const; /** * @brief Get HTTP response body as #Azure::Core::IO::BodyStream. + * */ std::unique_ptr ExtractBodyStream() { @@ -136,11 +141,13 @@ namespace Azure { namespace Core { namespace Http { /** * @brief Get HTTP response body as vector of bytes. + * */ std::vector& GetBody() { return this->m_body; } /** * @brief Get HTTP response body as vector of bytes. + * */ std::vector const& GetBody() const { return this->m_body; } }; diff --git a/sdk/core/azure-core/inc/azure/core/http/transport.hpp b/sdk/core/azure-core/inc/azure/core/http/transport.hpp index 630643c73..ea2b46719 100644 --- a/sdk/core/azure-core/inc/azure/core/http/transport.hpp +++ b/sdk/core/azure-core/inc/azure/core/http/transport.hpp @@ -15,6 +15,7 @@ namespace Azure { namespace Core { namespace Http { /** * @brief Base class for all HTTP transport implementations. + * */ class HttpTransport { public: diff --git a/sdk/core/azure-core/inc/azure/core/internal/client_options.hpp b/sdk/core/azure-core/inc/azure/core/internal/client_options.hpp index 48c74c564..6476c315c 100644 --- a/sdk/core/azure-core/inc/azure/core/internal/client_options.hpp +++ b/sdk/core/azure-core/inc/azure/core/internal/client_options.hpp @@ -87,16 +87,19 @@ namespace Azure { namespace Core { namespace _internal { /** * @brief Specify the number of retries and other retry-related options. + * */ Azure::Core::Http::Policies::RetryOptions Retry; /** * @brief Customized HTTP client. We're going to use the default one if this is empty. + * */ Azure::Core::Http::Policies::TransportOptions Transport; /** * @brief Telemetry options. + * */ Azure::Core::Http::Policies::TelemetryOptions Telemetry; diff --git a/sdk/core/azure-core/inc/azure/core/internal/io/null_body_stream.hpp b/sdk/core/azure-core/inc/azure/core/internal/io/null_body_stream.hpp index 6ec4e91ab..fe4e8a6c6 100644 --- a/sdk/core/azure-core/inc/azure/core/internal/io/null_body_stream.hpp +++ b/sdk/core/azure-core/inc/azure/core/internal/io/null_body_stream.hpp @@ -36,6 +36,7 @@ namespace Azure { namespace Core { namespace IO { namespace _internal { /** * @brief Gets a singleton instance of a #Azure::Core::IO::_internal::NullBodyStream. + * */ static NullBodyStream* GetNullBodyStream() { diff --git a/sdk/core/azure-core/inc/azure/core/io/body_stream.hpp b/sdk/core/azure-core/inc/azure/core/io/body_stream.hpp index dd568969c..016cf4c36 100644 --- a/sdk/core/azure-core/inc/azure/core/io/body_stream.hpp +++ b/sdk/core/azure-core/inc/azure/core/io/body_stream.hpp @@ -26,7 +26,8 @@ namespace Azure { namespace Core { namespace IO { /** - *@brief Used to read data to/from a service. + * @brief Used to read data to/from a service. + * */ class BodyStream { private: @@ -113,6 +114,7 @@ namespace Azure { namespace Core { namespace IO { /** * @brief #Azure::Core::IO::BodyStream providing data from an initialized memory buffer. + * */ class MemoryBodyStream final : public BodyStream { private: diff --git a/sdk/core/azure-core/inc/azure/core/match_conditions.hpp b/sdk/core/azure-core/inc/azure/core/match_conditions.hpp index 53475b96f..c04c39577 100644 --- a/sdk/core/azure-core/inc/azure/core/match_conditions.hpp +++ b/sdk/core/azure-core/inc/azure/core/match_conditions.hpp @@ -16,6 +16,7 @@ namespace Azure { /** * @brief Specifies HTTP options for conditional requests. + * */ struct MatchConditions { @@ -23,6 +24,7 @@ struct MatchConditions /** * @brief Optionally limit requests to resources that match the value specified. + * */ ETag IfMatch; diff --git a/sdk/core/azure-core/inc/azure/core/modified_conditions.hpp b/sdk/core/azure-core/inc/azure/core/modified_conditions.hpp index bce3b0bd8..c6ed37850 100644 --- a/sdk/core/azure-core/inc/azure/core/modified_conditions.hpp +++ b/sdk/core/azure-core/inc/azure/core/modified_conditions.hpp @@ -17,6 +17,7 @@ namespace Azure { /** * @brief Specifies HTTP options for conditional requests based on modification time. + * */ struct ModifiedConditions { @@ -34,6 +35,7 @@ struct ModifiedConditions /** * @brief Optionally limit requests to resources that have remained unmodified. + * */ Azure::Nullable IfUnmodifiedSince; }; diff --git a/sdk/core/azure-core/inc/azure/core/nullable.hpp b/sdk/core/azure-core/inc/azure/core/nullable.hpp index 2a115f68f..048a55958 100644 --- a/sdk/core/azure-core/inc/azure/core/nullable.hpp +++ b/sdk/core/azure-core/inc/azure/core/nullable.hpp @@ -39,6 +39,7 @@ template class Nullable final { public: /** * @brief Construct a #Azure::Nullable that represents the absence of value. + * */ constexpr Nullable() : m_disengaged{}, m_hasValue(false) {} @@ -74,6 +75,7 @@ public: /** * @brief Destroy the contained value, if there is one. + * */ ~Nullable() { @@ -85,6 +87,7 @@ public: /** * @brief Destroy any contained value, if there is one. + * */ void Reset() noexcept /* enforces termination */ { @@ -218,6 +221,7 @@ public: /** * @brief Get the contained value. + * */ const T& Value() const& noexcept { @@ -228,6 +232,7 @@ public: /** * @brief Get the contained value reference. + * */ T& Value() & noexcept { @@ -238,6 +243,7 @@ public: /** * @brief Get the contained value (as rvalue reference). + * */ T&& Value() && noexcept { @@ -250,6 +256,7 @@ public: /** * @brief `operator bool` on the condition of #Azure::Nullable::HasValue. + * */ constexpr explicit operator bool() const noexcept { return HasValue(); } diff --git a/sdk/core/azure-core/inc/azure/core/operation.hpp b/sdk/core/azure-core/inc/azure/core/operation.hpp index 33e641c89..5bee0fcac 100644 --- a/sdk/core/azure-core/inc/azure/core/operation.hpp +++ b/sdk/core/azure-core/inc/azure/core/operation.hpp @@ -105,6 +105,7 @@ namespace Azure { namespace Core { /** * @brief Returns the current #Azure::Core::OperationStatus of the long-running operation. + * */ OperationStatus Status() const noexcept { return m_status; } diff --git a/sdk/core/azure-core/inc/azure/core/operation_status.hpp b/sdk/core/azure-core/inc/azure/core/operation_status.hpp index 89a49badb..36ab215f4 100644 --- a/sdk/core/azure-core/inc/azure/core/operation_status.hpp +++ b/sdk/core/azure-core/inc/azure/core/operation_status.hpp @@ -20,6 +20,7 @@ namespace Azure { namespace Core { /** * @brief Long-running operation states. + * */ class OperationStatus final { std::string m_value; @@ -68,27 +69,33 @@ namespace Azure { namespace Core { /** * @brief The `std::string` representation of the operation status. + * */ const std::string& Get() const noexcept { return m_value; } /** * @brief The #Azure::Core::Operation is Not Started. + * */ AZ_CORE_DLLEXPORT static const OperationStatus NotStarted; /** * @brief The #Azure::Core::Operation is Running. + * */ AZ_CORE_DLLEXPORT static const OperationStatus Running; /** * @brief The #Azure::Core::Operation Succeeded. + * */ AZ_CORE_DLLEXPORT static const OperationStatus Succeeded; /** * @brief The #Azure::Core::Operation was Cancelled. + * */ AZ_CORE_DLLEXPORT static const OperationStatus Cancelled; /** * @brief The #Azure::Core::Operation Failed. + * */ AZ_CORE_DLLEXPORT static const OperationStatus Failed; }; diff --git a/sdk/core/azure-core/inc/azure/core/url.hpp b/sdk/core/azure-core/inc/azure/core/url.hpp index 24ed88cbe..622bdc2c8 100644 --- a/sdk/core/azure-core/inc/azure/core/url.hpp +++ b/sdk/core/azure-core/inc/azure/core/url.hpp @@ -189,6 +189,7 @@ namespace Azure { namespace Core { /************** API to read values from Url ***************/ /** * @brief Get URL host. + * */ const std::string& GetHost() const { return m_host; } @@ -224,6 +225,7 @@ namespace Azure { namespace Core { /** * @brief Get the URL scheme. + * */ const std::string& GetScheme() const { return m_scheme; }; diff --git a/sdk/core/azure-core/inc/azure/core/uuid.hpp b/sdk/core/azure-core/inc/azure/core/uuid.hpp index b0542378d..29f3d1014 100644 --- a/sdk/core/azure-core/inc/azure/core/uuid.hpp +++ b/sdk/core/azure-core/inc/azure/core/uuid.hpp @@ -23,6 +23,7 @@ namespace Azure { namespace Core { /** * @brief Universally unique identifier. + * */ class Uuid final { @@ -76,6 +77,7 @@ namespace Azure { namespace Core { /** * @brief Create a new random UUID. + * */ static Uuid CreateUuid() { diff --git a/sdk/core/azure-core/src/http/curl/curl_connection_private.hpp b/sdk/core/azure-core/src/http/curl/curl_connection_private.hpp index dd8891a58..04a33e0f6 100644 --- a/sdk/core/azure-core/src/http/curl/curl_connection_private.hpp +++ b/sdk/core/azure-core/src/http/curl/curl_connection_private.hpp @@ -64,11 +64,13 @@ namespace Azure { namespace Core { namespace Http { /** * @brief Update last usage time for the connection. + * */ virtual void UpdateLastUsageTime() = 0; /** * @brief Checks whether this CURL connection is expired. + * */ virtual bool IsExpired() = 0; @@ -105,6 +107,7 @@ namespace Azure { namespace Core { namespace Http { /** * @brief CURL HTTP connection. + * */ class CurlConnection final : public CurlNetworkConnection { private: @@ -152,6 +155,7 @@ namespace Azure { namespace Core { namespace Http { /** * @brief Update last usage time for the connection. + * */ void UpdateLastUsageTime() override { diff --git a/sdk/core/azure-core/src/http/telemetry_policy.cpp b/sdk/core/azure-core/src/http/telemetry_policy.cpp index 421be8803..5959afa71 100644 --- a/sdk/core/azure-core/src/http/telemetry_policy.cpp +++ b/sdk/core/azure-core/src/http/telemetry_policy.cpp @@ -24,6 +24,7 @@ namespace Azure { namespace Core { namespace _internal { /** * @brief HkeyHolder ensures native handle resource is released. + * */ class HkeyHolder final { private: diff --git a/sdk/core/azure-core/src/private/curl_connection.hpp b/sdk/core/azure-core/src/private/curl_connection.hpp index dd8891a58..04a33e0f6 100644 --- a/sdk/core/azure-core/src/private/curl_connection.hpp +++ b/sdk/core/azure-core/src/private/curl_connection.hpp @@ -64,11 +64,13 @@ namespace Azure { namespace Core { namespace Http { /** * @brief Update last usage time for the connection. + * */ virtual void UpdateLastUsageTime() = 0; /** * @brief Checks whether this CURL connection is expired. + * */ virtual bool IsExpired() = 0; @@ -105,6 +107,7 @@ namespace Azure { namespace Core { namespace Http { /** * @brief CURL HTTP connection. + * */ class CurlConnection final : public CurlNetworkConnection { private: @@ -152,6 +155,7 @@ namespace Azure { namespace Core { namespace Http { /** * @brief Update last usage time for the connection. + * */ void UpdateLastUsageTime() override { diff --git a/sdk/core/azure-core/src/private/package_version.hpp b/sdk/core/azure-core/src/private/package_version.hpp index 8058f39e2..3f846eb1c 100644 --- a/sdk/core/azure-core/src/private/package_version.hpp +++ b/sdk/core/azure-core/src/private/package_version.hpp @@ -19,6 +19,7 @@ namespace Azure { namespace Core { namespace _detail { /** * @brief Provides version information. + * */ class PackageVersion final { public: diff --git a/sdk/identity/azure-identity/inc/azure/identity/client_secret_credential.hpp b/sdk/identity/azure-identity/inc/azure/identity/client_secret_credential.hpp index ff40959f8..32df45245 100644 --- a/sdk/identity/azure-identity/inc/azure/identity/client_secret_credential.hpp +++ b/sdk/identity/azure-identity/inc/azure/identity/client_secret_credential.hpp @@ -24,6 +24,7 @@ namespace Azure { namespace Identity { /** * @brief Defines options for token authentication. + * */ struct ClientSecretCredentialOptions final : public Azure::Core::Credentials::TokenCredentialOptions diff --git a/sdk/identity/azure-identity/inc/azure/identity/environment_credential.hpp b/sdk/identity/azure-identity/inc/azure/identity/environment_credential.hpp index 46865c8a5..692749339 100644 --- a/sdk/identity/azure-identity/inc/azure/identity/environment_credential.hpp +++ b/sdk/identity/azure-identity/inc/azure/identity/environment_credential.hpp @@ -16,6 +16,7 @@ namespace Azure { namespace Identity { /** * @brief An environment credential. + * */ class EnvironmentCredential final : public Core::Credentials::TokenCredential { std::unique_ptr m_credentialImpl; diff --git a/sdk/identity/azure-identity/src/private/package_version.hpp b/sdk/identity/azure-identity/src/private/package_version.hpp index 569058ae6..15a40f54d 100644 --- a/sdk/identity/azure-identity/src/private/package_version.hpp +++ b/sdk/identity/azure-identity/src/private/package_version.hpp @@ -19,6 +19,7 @@ namespace Azure { namespace Identity { namespace _detail { /** * @brief Provides version information. + * */ class PackageVersion final { public: diff --git a/sdk/keyvault/azure-security-keyvault-common/inc/azure/keyvault/common/internal/base64url.hpp b/sdk/keyvault/azure-security-keyvault-common/inc/azure/keyvault/common/internal/base64url.hpp index 764b3a1d7..4d7677d7e 100644 --- a/sdk/keyvault/azure-security-keyvault-common/inc/azure/keyvault/common/internal/base64url.hpp +++ b/sdk/keyvault/azure-security-keyvault-common/inc/azure/keyvault/common/internal/base64url.hpp @@ -17,6 +17,7 @@ namespace Azure { namespace Security { namespace KeyVault { namespace _internal /** * @brief Provides conversion methods for base64url. + * */ struct Base64Url final { diff --git a/sdk/keyvault/azure-security-keyvault-common/inc/azure/keyvault/common/internal/keyvault_pipeline.hpp b/sdk/keyvault/azure-security-keyvault-common/inc/azure/keyvault/common/internal/keyvault_pipeline.hpp index 41f1be897..288b1730a 100644 --- a/sdk/keyvault/azure-security-keyvault-common/inc/azure/keyvault/common/internal/keyvault_pipeline.hpp +++ b/sdk/keyvault/azure-security-keyvault-common/inc/azure/keyvault/common/internal/keyvault_pipeline.hpp @@ -25,6 +25,7 @@ namespace Azure { namespace Security { namespace KeyVault { namespace _internal /** * @brief The HTTP pipeline used by KeyVault clients. + * */ class KeyVaultPipeline final { Azure::Core::Url m_vaultUrl; diff --git a/sdk/keyvault/azure-security-keyvault-common/inc/azure/keyvault/common/internal/unix_time_helper.hpp b/sdk/keyvault/azure-security-keyvault-common/inc/azure/keyvault/common/internal/unix_time_helper.hpp index d9dd47d06..39825dc3c 100644 --- a/sdk/keyvault/azure-security-keyvault-common/inc/azure/keyvault/common/internal/unix_time_helper.hpp +++ b/sdk/keyvault/azure-security-keyvault-common/inc/azure/keyvault/common/internal/unix_time_helper.hpp @@ -16,6 +16,7 @@ namespace Azure { namespace Security { namespace KeyVault { namespace _internal /** * @brief Provides convertion methods for unix time to Azure Core Datetime. + * */ class UnixTimeConverter final { public: diff --git a/sdk/keyvault/azure-security-keyvault-common/inc/azure/keyvault/common/sha.hpp b/sdk/keyvault/azure-security-keyvault-common/inc/azure/keyvault/common/sha.hpp index 935597d2a..a45ad9f29 100644 --- a/sdk/keyvault/azure-security-keyvault-common/inc/azure/keyvault/common/sha.hpp +++ b/sdk/keyvault/azure-security-keyvault-common/inc/azure/keyvault/common/sha.hpp @@ -25,11 +25,13 @@ namespace Azure { namespace Security { namespace KeyVault { public: /** * @brief Construct a default instance of #SHA256. + * */ SHA256(); /** * @brief Cleanup any state when destroying the instance of #SHA256. + * */ ~SHA256(){}; @@ -75,11 +77,13 @@ namespace Azure { namespace Security { namespace KeyVault { public: /** * @brief Construct a default instance of #SHA384. + * */ SHA384(); /** * @brief Cleanup any state when destroying the instance of #SHA384. + * */ ~SHA384(){}; @@ -125,11 +129,13 @@ namespace Azure { namespace Security { namespace KeyVault { public: /** * @brief Construct a default instance of #SHA512. + * */ SHA512(); /** * @brief Cleanup any state when destroying the instance of #SHA512. + * */ ~SHA512(){}; diff --git a/sdk/keyvault/azure-security-keyvault-common/src/private/package_version.hpp b/sdk/keyvault/azure-security-keyvault-common/src/private/package_version.hpp index fa53a6f77..ecead5256 100644 --- a/sdk/keyvault/azure-security-keyvault-common/src/private/package_version.hpp +++ b/sdk/keyvault/azure-security-keyvault-common/src/private/package_version.hpp @@ -20,6 +20,7 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Common { namespace _detail { /** * @brief Provides version information. + * */ class PackageVersion final { public: diff --git a/sdk/keyvault/azure-security-keyvault-keys/inc/azure/keyvault/keys/key_client.hpp b/sdk/keyvault/azure-security-keyvault-keys/inc/azure/keyvault/keys/key_client.hpp index c5b1f2205..b5d9bd379 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/inc/azure/keyvault/keys/key_client.hpp +++ b/sdk/keyvault/azure-security-keyvault-keys/inc/azure/keyvault/keys/key_client.hpp @@ -42,6 +42,7 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Keys { { /** * @brief Specify the key version to get. + * */ std::string Version; }; diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/private/package_version.hpp b/sdk/keyvault/azure-security-keyvault-keys/src/private/package_version.hpp index a451ad433..20660221e 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/private/package_version.hpp +++ b/sdk/keyvault/azure-security-keyvault-keys/src/private/package_version.hpp @@ -20,6 +20,7 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Keys { namespace _detail { /** * @brief Provides version information. + * */ class PackageVersion final { public: