Files
UnrealEngineUWP/Engine/Source/Developer/SlackIntegrations/Private/SlackIntegrationsModule.cpp
Marc Audy 608734e30d Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 4664414
#rb
#rnx

[CL 4666113 by Marc Audy in Dev-Framework branch]
2018-12-17 12:24:20 -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);