AWS SDK for C++  1.9.160
AWS SDK for C++
Aws.h
Go to the documentation of this file.
1 
5 #pragma once
6 
14 #include <aws/core/Core_EXPORTS.h>
15 #include <aws/crt/io/Bootstrap.h>
16 #include <aws/crt/io/TlsOptions.h>
17 
18 namespace Aws
19 {
20  static const char* DEFAULT_LOG_PREFIX = "aws_sdk_";
21 
26  {
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 
81  struct HttpOptions
82  {
84  { }
85 
89  std::function<std::shared_ptr<Aws::Http::HttpClientFactory>()> httpClientFactory_create_fn;
103  };
104 
109  {
111  { }
112 
116  std::function<std::shared_ptr<Aws::Utils::Crypto::HashFactory>()> md5Factory_create_fn;
120  std::function<std::shared_ptr<Aws::Utils::Crypto::HashFactory>()> sha1Factory_create_fn;
124  std::function<std::shared_ptr<Aws::Utils::Crypto::HashFactory>()> sha256Factory_create_fn;
128  std::function<std::shared_ptr<Aws::Utils::Crypto::HMACFactory>()> sha256HMACFactory_create_fn;
132  std::function<std::shared_ptr<Aws::Utils::Crypto::SymmetricCipherFactory>()> aes_CBCFactory_create_fn;
136  std::function<std::shared_ptr<Aws::Utils::Crypto::SymmetricCipherFactory>()> aes_CTRFactory_create_fn;
140  std::function<std::shared_ptr<Aws::Utils::Crypto::SymmetricCipherFactory>()> aes_GCMFactory_create_fn;
144  std::function<std::shared_ptr<Aws::Utils::Crypto::SymmetricCipherFactory>()> aes_KeyWrapFactory_create_fn;
148  std::function<std::shared_ptr<Aws::Utils::Crypto::SecureRandomFactory>()> secureRandomFactory_create_fn;
155  };
156 
161  {
168  std::vector<Aws::Monitoring::MonitoringFactoryCreateFunction> customizedMonitoringFactory_create_fn;
169  };
170 
171 
212  struct SDKOptions
213  {
234 
241  };
242 
243  /*
244  * Initialize SDK wide state for the SDK. This method must be called before doing anything else with this library.
245  *
246  * Common Recipes:
247  *
248  * Just use defaults:
249  *
250  * SDKOptions options;
251  * Aws::InitAPI(options);
252  * .....
253  * Aws::ShutdownAPI(options);
254  *
255  * Turn logging on using the default logger:
256  *
257  * SDKOptions options;
258  * options.loggingOptions.logLevel = Aws::Utils::Logging::LogLevel::Info;
259  * Aws::InitAPI(options);
260  * .....
261  * Aws::ShutdownAPI(options);
262  *
263  * Install custom memory manager:
264  *
265  * MyMemoryManager memoryManager;
266  *
267  * SDKOptions options;
268  * options.memoryManagementOptions.memoryManager = &memoryManager;
269  * Aws::InitAPI(options);
270  * .....
271  * Aws::ShutdownAPI(options);
272  *
273  * Override default http client factory
274  *
275  * SDKOptions options;
276  * options.httpOptions.httpClientFactory_create_fn = [](){ return Aws::MakeShared<MyCustomHttpClientFactory>("ALLOC_TAG", arg1); };
277  * Aws::InitAPI(options);
278  * .....
279  * Aws::ShutdownAPI(options);
280  */
281  AWS_CORE_API void InitAPI(const SDKOptions& options);
282 
287  AWS_CORE_API void ShutdownAPI(const SDKOptions& options);
288 }
Aws::CryptoOptions::sha256HMACFactory_create_fn
std::function< std::shared_ptr< Aws::Utils::Crypto::HMACFactory >)> sha256HMACFactory_create_fn
Definition: Aws.h:128
AWS_CORE_API
#define AWS_CORE_API
Definition: Core_EXPORTS.h:25
Aws::HttpOptions::HttpOptions
HttpOptions()
Definition: Aws.h:83
HttpClientFactory.h
Aws::CryptoOptions::CryptoOptions
CryptoOptions()
Definition: Aws.h:110
Aws::MemoryManagementOptions::MemoryManagementOptions
MemoryManagementOptions()
Definition: Aws.h:58
Factories.h
Aws::CryptoOptions::aes_CBCFactory_create_fn
std::function< std::shared_ptr< Aws::Utils::Crypto::SymmetricCipherFactory >)> aes_CBCFactory_create_fn
Definition: Aws.h:132
Aws::HttpOptions::httpClientFactory_create_fn
std::function< std::shared_ptr< Aws::Http::HttpClientFactory >)> httpClientFactory_create_fn
Definition: Aws.h:89
Aws::CryptoOptions::initAndCleanupOpenSSL
bool initAndCleanupOpenSSL
Definition: Aws.h:154
Aws::SDKOptions::memoryManagementOptions
MemoryManagementOptions memoryManagementOptions
Definition: Aws.h:225
Aws::LoggingOptions
Definition: Aws.h:26
Aws::CryptoOptions::sha256Factory_create_fn
std::function< std::shared_ptr< Aws::Utils::Crypto::HashFactory >)> sha256Factory_create_fn
Definition: Aws.h:124
Aws::CryptoOptions::aes_GCMFactory_create_fn
std::function< std::shared_ptr< Aws::Utils::Crypto::SymmetricCipherFactory >)> aes_GCMFactory_create_fn
Definition: Aws.h:140
Aws::LoggingOptions::defaultLogPrefix
const char * defaultLogPrefix
Definition: Aws.h:38
Aws::LoggingOptions::logger_create_fn
std::function< std::shared_ptr< Aws::Utils::Logging::LogSystemInterface >)> logger_create_fn
Definition: Aws.h:44
Aws::CryptoOptions::md5Factory_create_fn
std::function< std::shared_ptr< Aws::Utils::Crypto::HashFactory >)> md5Factory_create_fn
Definition: Aws.h:116
Aws::LoggingOptions::logLevel
Aws::Utils::Logging::LogLevel logLevel
Definition: Aws.h:33
Aws::MonitoringOptions
Definition: Aws.h:161
Aws::CryptoOptions::sha1Factory_create_fn
std::function< std::shared_ptr< Aws::Utils::Crypto::HashFactory >)> sha1Factory_create_fn
Definition: Aws.h:120
Aws::IoOptions::tlsConnectionOptions_create_fn
std::function< std::shared_ptr< Aws::Crt::Io::TlsConnectionOptions >)> tlsConnectionOptions_create_fn
Definition: Aws.h:75
Aws::IoOptions::clientBootstrap_create_fn
std::function< std::shared_ptr< Aws::Crt::Io::ClientBootstrap >)> clientBootstrap_create_fn
Definition: Aws.h:74
Aws::HttpOptions::installSigPipeHandler
bool installSigPipeHandler
Definition: Aws.h:102
MemorySystemInterface.h
MonitoringManager.h
CRTLogSystem.h
Aws::MemoryManagementOptions
Definition: Aws.h:57
Aws::CryptoOptions
Definition: Aws.h:109
Aws::MemoryManagementOptions::memoryManager
Aws::Utils::Memory::MemorySystemInterface * memoryManager
Definition: Aws.h:66
Aws::SDKOptions::monitoringOptions
MonitoringOptions monitoringOptions
Definition: Aws.h:240
Aws::SDKOptions::ioOptions
IoOptions ioOptions
Definition: Aws.h:217
Aws::DEFAULT_LOG_PREFIX
static const char * DEFAULT_LOG_PREFIX
Definition: Aws.h:20
Core_EXPORTS.h
Aws::SDKOptions
Definition: Aws.h:213
Aws::Utils::Logging::LogLevel
LogLevel
Definition: LogLevel.h:23
Aws::SDKOptions::loggingOptions
LoggingOptions loggingOptions
Definition: Aws.h:221
LogSystemInterface.h
Aws::SDKOptions::cryptoOptions
CryptoOptions cryptoOptions
Definition: Aws.h:233
Aws
Definition: AccessManagementClient.h:15
Aws::SDKOptions::httpOptions
HttpOptions httpOptions
Definition: Aws.h:229
Aws::MonitoringOptions::customizedMonitoringFactory_create_fn
std::vector< Aws::Monitoring::MonitoringFactoryCreateFunction > customizedMonitoringFactory_create_fn
Definition: Aws.h:168
Aws::CryptoOptions::secureRandomFactory_create_fn
std::function< std::shared_ptr< Aws::Utils::Crypto::SecureRandomFactory >)> secureRandomFactory_create_fn
Definition: Aws.h:148
Aws::IoOptions
Definition: Aws.h:73
Aws::HttpOptions::initAndCleanupCurl
bool initAndCleanupCurl
Definition: Aws.h:94
Aws::LoggingOptions::crt_logger_create_fn
std::function< std::shared_ptr< Aws::Utils::Logging::CRTLogSystemInterface >)> crt_logger_create_fn
Definition: Aws.h:50
Aws::Utils::Memory::MemorySystemInterface
Definition: MemorySystemInterface.h:23
Aws::ShutdownAPI
AWS_CORE_API void ShutdownAPI(const SDKOptions &options)
Aws::InitAPI
AWS_CORE_API void InitAPI(const SDKOptions &options)
Aws::CryptoOptions::aes_CTRFactory_create_fn
std::function< std::shared_ptr< Aws::Utils::Crypto::SymmetricCipherFactory >)> aes_CTRFactory_create_fn
Definition: Aws.h:136
Aws::LoggingOptions::LoggingOptions
LoggingOptions()
Definition: Aws.h:27
Aws::HttpOptions
Definition: Aws.h:82
Aws::CryptoOptions::aes_KeyWrapFactory_create_fn
std::function< std::shared_ptr< Aws::Utils::Crypto::SymmetricCipherFactory >)> aes_KeyWrapFactory_create_fn
Definition: Aws.h:144
LogLevel.h