Files
UnrealEngineUWP/Engine/Source/Developer/SlackIntegrations/Private/SlackIntegrationsModule.cpp
Thomas Sarkanen 8ba3c4c087 Merging //UE4/Dev-Main to Dev-Anim (//UE4/Dev-Anim) @ CL 4643671
#rb none
#jira none

[CL 4665410 by Thomas Sarkanen in Dev-Anim branch]
2018-12-17 06:31:16 -05:00

46 lines
1.2 KiB
C++

// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
#include "SlackIntegrationsModule.h"
#include "SlackIncomingWebhookInterface.h"
/**
* Concrete implementation of ISlackIntegrationsModule in module's private code
*/
class FSlackIntegrationsModule : public ISlackIntegrationsModule
{
public:
/**
* Called right after the module DLL has been loaded and the module object has been created
*/
virtual void StartupModule() override
{
IncomingWebhookInterface = new FSlackIncomingWebhookInterface();
}
/**
* Called before the module is unloaded, right before the module object is destroyed.
*/
virtual void ShutdownModule() override
{
if (IncomingWebhookInterface != nullptr)
{
delete IncomingWebhookInterface;
IncomingWebhookInterface = nullptr;
}
}
/** Get the incoming webhook interface for sending messages to Slack */
virtual ISlackIncomingWebhookInterface& GetIncomingWebhookInterface()
{
check(IncomingWebhookInterface != nullptr);
return *IncomingWebhookInterface;
}
private:
/** Singleton interface sending incoming webhook messages to Slack */
FSlackIncomingWebhookInterface* IncomingWebhookInterface;
};
IMPLEMENT_MODULE(FSlackIntegrationsModule, SlackIntegrations);