AWSNativeSDKTestManager.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #pragma once
  9. #include <AzCore/Module/Environment.h>
  10. #include <AzCore/PlatformIncl.h>
  11. #include <AWSNativeSDKInit/AWSMemoryInterface.h>
  12. #include <aws/core/Aws.h>
  13. namespace AWSNativeSDKTestLibs
  14. {
  15. // Entry point for AWSNativeSDK's initialization and shutdown for test environment
  16. // Use an AZ::Environment variable to enforce only one init and shutdown
  17. class AWSNativeSDKTestManager
  18. {
  19. public:
  20. static constexpr const char SdkManagerTag[] = "TestAWSSDKManager";
  21. AWSNativeSDKTestManager();
  22. ~AWSNativeSDKTestManager();
  23. static void Init();
  24. static void Shutdown();
  25. private:
  26. static AZ::EnvironmentVariable<AWSNativeSDKTestManager> s_sdkManager;
  27. AWSNativeSDKInit::MemoryManager m_memoryManager;
  28. Aws::SDKOptions m_awsSDKOptions;
  29. };
  30. }