vcpkg/ports/azure-core-cpp/useragent.patch
Azure SDK Bot 652a35c70a
[azure-core-cpp] Update to 1.14.0 (#41321)
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2024-10-04 11:43:39 -04:00

31 lines
1.4 KiB
Diff

diff --git a/sdk/core/azure-core/inc/azure/core/internal/http/user_agent.hpp b/sdk/core/azure-core/inc/azure/core/internal/http/user_agent.hpp
index 46c182386..43feca858 100644
--- a/sdk/core/azure-core/inc/azure/core/internal/http/user_agent.hpp
+++ b/sdk/core/azure-core/inc/azure/core/internal/http/user_agent.hpp
@@ -11,6 +11,8 @@
#include <string>
namespace Azure { namespace Core { namespace Http { namespace _detail {
+ // NOTE: Treat Azure::Core::Http::_detail::UserAgentGenerator::GenerateUserAgent() as _internal -
+ // it is being/has been used by eventhubs.
class UserAgentGenerator {
public:
static std::string GenerateUserAgent(
@@ -18,5 +20,16 @@ namespace Azure { namespace Core { namespace Http { namespace _detail {
std::string const& componentVersion,
std::string const& applicationId,
long cplusplusValue);
+
+ [[deprecated("Use an overload with additional cplusplusValue parameter.")]] static std::string
+ GenerateUserAgent(
+ std::string const& componentName,
+ std::string const& componentVersion,
+ std::string const& applicationId)
+ {
+ // The value of -3L is to signify that an old version of signature has been used (older
+ // version of eventhubs); we can't rely on cpp version reported by it.
+ return GenerateUserAgent(componentName, componentVersion, applicationId, -3L);
+ }
};
}}}} // namespace Azure::Core::Http::_detail