Files
UnrealEngineUWP/Engine/Source/Developer/SlackIntegrations/Private/SlackIntegrationsModule.cpp
Ben Marsh 13d012685f Merging copyright update from 4.19 branch.
#rb none
#rnx
#jira

[CL 3818977 by Ben Marsh in Staging-4.19 branch]
2018-01-02 15:30:26 -05:00

46 lines
1.2 KiB
C++

// Copyright 1998-2018 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);