You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
78 lines
2.2 KiB
C++
78 lines
2.2 KiB
C++
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "LauncherServicesPrivatePCH.h"
|
|
|
|
|
|
/**
|
|
* Implements the LauncherServices module.
|
|
*/
|
|
class FLauncherServicesModule
|
|
: public ILauncherServicesModule
|
|
{
|
|
public:
|
|
|
|
// Begin ILauncherServicesModule interface
|
|
|
|
virtual ILauncherDeviceGroupRef CreateDeviceGroup( ) override
|
|
{
|
|
return MakeShareable(new FLauncherDeviceGroup());
|
|
}
|
|
|
|
virtual ILauncherDeviceGroupRef CreateDeviceGroup(const FGuid& Guid, const FString& Name ) override
|
|
{
|
|
return MakeShareable(new FLauncherDeviceGroup(Guid, Name));
|
|
}
|
|
|
|
virtual ILauncherRef CreateLauncher( ) override
|
|
{
|
|
return MakeShareable(new FLauncher());
|
|
}
|
|
|
|
virtual ILauncherProfileRef CreateProfile( const FString& ProfileName ) override
|
|
{
|
|
ILauncherProfileManagerRef ProfileManager = GetProfileManager();
|
|
return MakeShareable(new FLauncherProfile(ProfileManager, FGuid(), ProfileName));
|
|
}
|
|
|
|
virtual ILauncherProfileManagerRef GetProfileManager( ) override
|
|
{
|
|
if (!ProfileManagerSingleton.IsValid())
|
|
{
|
|
TSharedPtr<FLauncherProfileManager> ProfileManager = MakeShareable(new FLauncherProfileManager());
|
|
ProfileManager->Load();
|
|
ProfileManagerSingleton = ProfileManager;
|
|
}
|
|
|
|
return ProfileManagerSingleton.ToSharedRef();
|
|
}
|
|
|
|
DECLARE_DERIVED_EVENT(FLauncherServicesModule, ILauncherServicesModule::FLauncherServicesSDKNotInstalled, FLauncherServicesSDKNotInstalled);
|
|
virtual FLauncherServicesSDKNotInstalled& OnLauncherServicesSDKNotInstalled( ) override
|
|
{
|
|
return LauncherServicesSDKNotInstalled;
|
|
}
|
|
void BroadcastLauncherServicesSDKNotInstalled(const FString& PlatformName, const FString& DocLink) override
|
|
{
|
|
return LauncherServicesSDKNotInstalled.Broadcast(PlatformName, DocLink);
|
|
}
|
|
|
|
// End ILauncherServicesModule interface
|
|
|
|
private:
|
|
|
|
/// Event to be called when the editor tried to use a platform, but it wasn't installed
|
|
FLauncherServicesSDKNotInstalled LauncherServicesSDKNotInstalled;
|
|
|
|
// Holds the launcher profile manager singleton
|
|
static ILauncherProfileManagerPtr ProfileManagerSingleton;
|
|
};
|
|
|
|
|
|
/* Static initialization
|
|
*****************************************************************************/
|
|
|
|
ILauncherProfileManagerPtr FLauncherServicesModule::ProfileManagerSingleton = NULL;
|
|
|
|
|
|
IMPLEMENT_MODULE(FLauncherServicesModule, LauncherServices);
|