AWS SDK for C++
AWS SDK for C++
Loading...
Searching...
No Matches
Aws.h
Go to the documentation of this file.
1
5#pragma once
6
15#include <aws/crt/io/Bootstrap.h>
16#include <aws/crt/io/TlsOptions.h>
17
18namespace Aws
19{
20 static const char* DEFAULT_LOG_PREFIX = "aws_sdk_";
21
26 {
27 LoggingOptions() : logLevel(Aws::Utils::Logging::LogLevel::Off), defaultLogPrefix(DEFAULT_LOG_PREFIX)
28 { }
29
34
38 const char* defaultLogPrefix;
39
44 std::function<std::shared_ptr<Aws::Utils::Logging::LogSystemInterface>()> logger_create_fn;
45
50 std::function<std::shared_ptr<Aws::Utils::Logging::CRTLogSystemInterface>()> crt_logger_create_fn;
51 };
52
57 {
59 { }
60
67 };
68
72 struct IoOptions
73 {
74 std::function<std::shared_ptr<Aws::Crt::Io::ClientBootstrap>()> clientBootstrap_create_fn;
75 std::function<std::shared_ptr<Aws::Crt::Io::TlsConnectionOptions>()> tlsConnectionOptions_create_fn;
76 };
77
82 {
84 { }
85
89 std::function<std::shared_ptr<Aws::Http::HttpClientFactory>()> httpClientFactory_create_fn;
107 };
108
113 {
115 { }
116
120 std::function<std::shared_ptr<Aws::Utils::Crypto::HashFactory>()> md5Factory_create_fn;
124 std::function<std::shared_ptr<Aws::Utils::Crypto::HashFactory>()> sha1Factory_create_fn;
128 std::function<std::shared_ptr<Aws::Utils::Crypto::HashFactory>()> sha256Factory_create_fn;
132 std::function<std::shared_ptr<Aws::Utils::Crypto::HMACFactory>()> sha256HMACFactory_create_fn;
136 std::function<std::shared_ptr<Aws::Utils::Crypto::SymmetricCipherFactory>()> aes_CBCFactory_create_fn;
140 std::function<std::shared_ptr<Aws::Utils::Crypto::SymmetricCipherFactory>()> aes_CTRFactory_create_fn;
144 std::function<std::shared_ptr<Aws::Utils::Crypto::SymmetricCipherFactory>()> aes_GCMFactory_create_fn;
148 std::function<std::shared_ptr<Aws::Utils::Crypto::SymmetricCipherFactory>()> aes_KeyWrapFactory_create_fn;
152 std::function<std::shared_ptr<Aws::Utils::Crypto::SecureRandomFactory>()> secureRandomFactory_create_fn;
159 };
160
165 {
172 std::vector<Aws::Monitoring::MonitoringFactoryCreateFunction> customizedMonitoringFactory_create_fn;
173 };
174
175
217 {
238
245 };
246
247 /*
248 * Initialize SDK wide state for the SDK. This method must be called before doing anything else with this library.
249 *
250 * Common Recipes:
251 *
252 * Just use defaults:
253 *
254 * SDKOptions options;
255 * Aws::InitAPI(options);
256 * .....
257 * Aws::ShutdownAPI(options);
258 *
259 * Turn logging on using the default logger:
260 *
261 * SDKOptions options;
262 * options.loggingOptions.logLevel = Aws::Utils::Logging::LogLevel::Info;
263 * Aws::InitAPI(options);
264 * .....
265 * Aws::ShutdownAPI(options);
266 *
267 * Install custom memory manager:
268 *
269 * MyMemoryManager memoryManager;
270 *
271 * SDKOptions options;
272 * options.memoryManagementOptions.memoryManager = &memoryManager;
273 * Aws::InitAPI(options);
274 * .....
275 * Aws::ShutdownAPI(options);
276 *
277 * Override default http client factory
278 *
279 * SDKOptions options;
280 * options.httpOptions.httpClientFactory_create_fn = [](){ return Aws::MakeShared<MyCustomHttpClientFactory>("ALLOC_TAG", arg1); };
281 * Aws::InitAPI(options);
282 * .....
283 * Aws::ShutdownAPI(options);
284 */
285 AWS_CORE_API void InitAPI(const SDKOptions& options);
286
291 AWS_CORE_API void ShutdownAPI(const SDKOptions& options);
292}
#define AWS_CORE_API
Definition: Core_EXPORTS.h:26
AWS_CORE_API void ShutdownAPI(const SDKOptions &options)
AWS_CORE_API void InitAPI(const SDKOptions &options)
static const char * DEFAULT_LOG_PREFIX
Definition: Aws.h:20
std::function< std::shared_ptr< Aws::Utils::Crypto::SymmetricCipherFactory >()> aes_KeyWrapFactory_create_fn
Definition: Aws.h:148
std::function< std::shared_ptr< Aws::Utils::Crypto::HashFactory >()> md5Factory_create_fn
Definition: Aws.h:120
std::function< std::shared_ptr< Aws::Utils::Crypto::HashFactory >()> sha1Factory_create_fn
Definition: Aws.h:124
std::function< std::shared_ptr< Aws::Utils::Crypto::SymmetricCipherFactory >()> aes_CTRFactory_create_fn
Definition: Aws.h:140
std::function< std::shared_ptr< Aws::Utils::Crypto::SecureRandomFactory >()> secureRandomFactory_create_fn
Definition: Aws.h:152
bool initAndCleanupOpenSSL
Definition: Aws.h:158
std::function< std::shared_ptr< Aws::Utils::Crypto::HashFactory >()> sha256Factory_create_fn
Definition: Aws.h:128
std::function< std::shared_ptr< Aws::Utils::Crypto::SymmetricCipherFactory >()> aes_GCMFactory_create_fn
Definition: Aws.h:144
std::function< std::shared_ptr< Aws::Utils::Crypto::SymmetricCipherFactory >()> aes_CBCFactory_create_fn
Definition: Aws.h:136
std::function< std::shared_ptr< Aws::Utils::Crypto::HMACFactory >()> sha256HMACFactory_create_fn
Definition: Aws.h:132
bool compliantRfc3986Encoding
Definition: Aws.h:106
bool initAndCleanupCurl
Definition: Aws.h:94
HttpOptions()
Definition: Aws.h:83
std::function< std::shared_ptr< Aws::Http::HttpClientFactory >()> httpClientFactory_create_fn
Definition: Aws.h:89
bool installSigPipeHandler
Definition: Aws.h:102
std::function< std::shared_ptr< Aws::Crt::Io::TlsConnectionOptions >()> tlsConnectionOptions_create_fn
Definition: Aws.h:75
std::function< std::shared_ptr< Aws::Crt::Io::ClientBootstrap >()> clientBootstrap_create_fn
Definition: Aws.h:74
Aws::Utils::Logging::LogLevel logLevel
Definition: Aws.h:33
const char * defaultLogPrefix
Definition: Aws.h:38
std::function< std::shared_ptr< Aws::Utils::Logging::LogSystemInterface >()> logger_create_fn
Definition: Aws.h:44
std::function< std::shared_ptr< Aws::Utils::Logging::CRTLogSystemInterface >()> crt_logger_create_fn
Definition: Aws.h:50
Aws::Utils::Memory::MemorySystemInterface * memoryManager
Definition: Aws.h:66
std::vector< Aws::Monitoring::MonitoringFactoryCreateFunction > customizedMonitoringFactory_create_fn
Definition: Aws.h:172
CryptoOptions cryptoOptions
Definition: Aws.h:237
IoOptions ioOptions
Definition: Aws.h:221
LoggingOptions loggingOptions
Definition: Aws.h:225
MonitoringOptions monitoringOptions
Definition: Aws.h:244
MemoryManagementOptions memoryManagementOptions
Definition: Aws.h:229
HttpOptions httpOptions
Definition: Aws.h:233