AWSGameLiftClientSystemComponent.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
  3. * its licensors.
  4. *
  5. * For complete copyright and license terms please see the LICENSE at the root of this
  6. * distribution (the "License"). All use of this software is governed by the License,
  7. * or, if provided, by the license below or the license accompanying this file. Do not
  8. * remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
  9. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. *
  11. */
  12. #pragma once
  13. #include <AzCore/Component/Component.h>
  14. #include <AzCore/std/smart_ptr/unique_ptr.h>
  15. namespace AWSGameLift
  16. {
  17. class AWSGameLiftClientManager;
  18. //! Gem client system component. Responsible for creating the gamelift client manager.
  19. class AWSGameLiftClientSystemComponent
  20. : public AZ::Component
  21. {
  22. public:
  23. AZ_COMPONENT(AWSGameLiftClientSystemComponent, "{d481c15c-732a-4eea-9853-4965ed1bc2be}");
  24. AWSGameLiftClientSystemComponent();
  25. virtual ~AWSGameLiftClientSystemComponent() = default;
  26. static void Reflect(AZ::ReflectContext* context);
  27. static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided);
  28. static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible);
  29. static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required);
  30. static void GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent);
  31. protected:
  32. ////////////////////////////////////////////////////////////////////////
  33. // AZ::Component interface implementation
  34. void Init() override;
  35. void Activate() override;
  36. void Deactivate() override;
  37. ////////////////////////////////////////////////////////////////////////
  38. void SetGameLiftClientManager(AZStd::unique_ptr<AWSGameLiftClientManager> gameliftClientManager);
  39. private:
  40. static void ReflectCreateSessionRequest(AZ::ReflectContext* context);
  41. static void ReflectSearchSessionsResponse(AZ::ReflectContext* context);
  42. AZStd::unique_ptr<AWSGameLiftClientManager> m_gameliftClientManager;
  43. };
  44. } // namespace AWSGameLift