diff options
author | dakovalkov <dakovalkov@yandex-team.com> | 2023-12-03 13:33:55 +0300 |
---|---|---|
committer | dakovalkov <dakovalkov@yandex-team.com> | 2023-12-03 14:04:39 +0300 |
commit | 2a718325637e5302334b6d0a6430f63168f8dbb3 (patch) | |
tree | 64be81080b7df9ec1d86d053a0c394ae53fcf1fe /contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/Globals.cpp | |
parent | e0d94a470142d95c3007e9c5d80380994940664a (diff) | |
download | ydb-2a718325637e5302334b6d0a6430f63168f8dbb3.tar.gz |
Update contrib/libs/aws-sdk-cpp to 1.11.37
Diffstat (limited to 'contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/Globals.cpp')
-rw-r--r-- | contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/Globals.cpp | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/Globals.cpp b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/Globals.cpp index 55f2ee9220..8c26d2389d 100644 --- a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/Globals.cpp +++ b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/Globals.cpp @@ -2,13 +2,61 @@ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ + +#include <aws/crt/Api.h> +#include <aws/crt/io/TlsOptions.h> +#include <aws/crt/io/Bootstrap.h> #include <aws/core/Globals.h> #include <aws/core/utils/EnumParseOverflowContainer.h> #include <aws/core/utils/memory/AWSMemory.h> +#include <aws/auth/auth.h> namespace Aws { static const char TAG[] = "GlobalEnumOverflowContainer"; + + static Aws::Crt::ApiHandle* g_apiHandle; + static std::shared_ptr<Aws::Crt::Io::ClientBootstrap> g_defaultClientBootstrap(nullptr); + static std::shared_ptr<Aws::Crt::Io::TlsConnectionOptions> g_defaultTlsConnectionOptions(nullptr); + + Aws::Crt::ApiHandle* GetApiHandle() + { + return g_apiHandle; + } + + void SetDefaultClientBootstrap(const std::shared_ptr<Aws::Crt::Io::ClientBootstrap>& clientBootstrap) + { + g_defaultClientBootstrap = clientBootstrap; + } + + Aws::Crt::Io::ClientBootstrap* GetDefaultClientBootstrap() + { + return g_defaultClientBootstrap.get(); + } + + void SetDefaultTlsConnectionOptions(const std::shared_ptr<Aws::Crt::Io::TlsConnectionOptions>& tlsConnectionOptions) + { + g_defaultTlsConnectionOptions = tlsConnectionOptions; + } + + Aws::Crt::Io::TlsConnectionOptions* GetDefaultTlsConnectionOptions() + { + return g_defaultTlsConnectionOptions.get(); + } + + void InitializeCrt() + { + g_apiHandle = Aws::New<Aws::Crt::ApiHandle>(TAG, Aws::get_aws_allocator()); + } + + void CleanupCrt() + { + Aws::SetDefaultClientBootstrap(nullptr); + Aws::SetDefaultTlsConnectionOptions(nullptr); + Aws::Delete(g_apiHandle); + g_apiHandle = nullptr; + } + static Utils::EnumParseOverflowContainer* g_enumOverflow; Utils::EnumParseOverflowContainer* GetEnumOverflowContainer() |