PythonBuilderNotificationHandler.h 1.2 KB

1234567891011121314151617181920212223242526272829303132
  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 <PythonAssetBuilder/PythonBuilderNotificationBus.h>
  10. #include <AzToolsFramework/API/EditorPythonConsoleBus.h>
  11. #include <AzCore/RTTI/BehaviorContext.h>
  12. namespace PythonAssetBuilder
  13. {
  14. class PythonBuilderNotificationHandler final
  15. : public AZ::BehaviorEBusHandler
  16. , public PythonBuilderNotificationBus::Handler
  17. {
  18. public:
  19. AZ_EBUS_BEHAVIOR_BINDER(PythonBuilderNotificationHandler, "{9CF1761E-3365-42F7-83D0-5039B1B73223}", AZ::SystemAllocator,
  20. OnCreateJobsRequest, OnProcessJobRequest, OnShutdown, OnCancel);
  21. static void Reflect(AZ::ReflectContext* context);
  22. protected:
  23. AssetBuilderSDK::CreateJobsResponse OnCreateJobsRequest(const AssetBuilderSDK::CreateJobsRequest& request) override;
  24. AssetBuilderSDK::ProcessJobResponse OnProcessJobRequest(const AssetBuilderSDK::ProcessJobRequest& request) override;
  25. void OnShutdown() override;
  26. void OnCancel() override;
  27. };
  28. }