Files
UnrealEngineUWP/Engine/Source/Runtime/Analytics/AnalyticsET/Private/AnalyticsET.cpp
Ryan Vance 7c51ff94af Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR)
CL 1 of 8
#rb integration

[CL 4748712 by Ryan Vance in Dev-VR branch]
2019-01-17 18:54:05 -05:00

44 lines
1.4 KiB
C++

// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
#include "AnalyticsET.h"
#include "IAnalyticsProviderET.h"
#include "HttpModule.h"
#include "Analytics.h"
IMPLEMENT_MODULE( FAnalyticsET, AnalyticsET );
void FAnalyticsET::StartupModule()
{
// Make sure http is loaded so that we can flush events during module shutdown
FModuleManager::LoadModuleChecked<FHttpModule>("HTTP");
}
void FAnalyticsET::ShutdownModule()
{
}
TSharedPtr<IAnalyticsProvider> FAnalyticsET::CreateAnalyticsProvider(const FAnalyticsProviderConfigurationDelegate& GetConfigValue) const
{
if (GetConfigValue.IsBound())
{
Config ConfigValues;
ConfigValues.APIKeyET = GetConfigValue.Execute(Config::GetKeyNameForAPIKey(), true);
ConfigValues.APIServerET = GetConfigValue.Execute(Config::GetKeyNameForAPIServer(), true);
ConfigValues.AppVersionET = GetConfigValue.Execute(Config::GetKeyNameForAppVersion(), false);
ConfigValues.UseLegacyProtocol = FCString::ToBool(*GetConfigValue.Execute(Config::GetKeyNameForUseLegacyProtocol(), false));
if (!ConfigValues.UseLegacyProtocol)
{
ConfigValues.AppEnvironment = GetConfigValue.Execute(Config::GetKeyNameForAppEnvironment(), true);
ConfigValues.UploadType = GetConfigValue.Execute(Config::GetKeyNameForUploadType(), true);
}
return CreateAnalyticsProvider(ConfigValues);
}
else
{
UE_LOG(LogAnalytics, Warning, TEXT("CreateAnalyticsProvider called with an unbound delegate"));
}
return NULL;
}