You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#jira UE-103878 #lockdown jack.porter #rb jack.porter #preflight 60b87a426073fb00016b3867 [CL 16544564 by axel riffard in ue5-main branch]
154 lines
3.2 KiB
C++
154 lines
3.2 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "IOSTargetDevice.h"
|
|
|
|
#include "HAL/PlatformProcess.h"
|
|
#include "IOSMessageProtocol.h"
|
|
#include "Interfaces/ITargetPlatform.h"
|
|
#include "Async/Async.h"
|
|
#include "MessageEndpoint.h"
|
|
#include "MessageEndpointBuilder.h"
|
|
#include "IOSTargetDeviceOutput.h"
|
|
#if PLATFORM_WINDOWS
|
|
// for windows mutex
|
|
#include "Windows/AllowWindowsPlatformTypes.h"
|
|
#endif // #if PLATFORM_WINDOWS
|
|
|
|
FIOSTargetDevice::FIOSTargetDevice(const ITargetPlatform& InTargetPlatform)
|
|
: TargetPlatform(InTargetPlatform)
|
|
, DeviceEndpoint()
|
|
, AppId()
|
|
, bCanReboot(false)
|
|
, bCanPowerOn(false)
|
|
, bCanPowerOff(false)
|
|
, DeviceType(ETargetDeviceTypes::Indeterminate)
|
|
{
|
|
DeviceId = FTargetDeviceId(TargetPlatform.PlatformName(), FPlatformProcess::ComputerName());
|
|
DeviceName = FPlatformProcess::ComputerName();
|
|
MessageEndpoint = FMessageEndpoint::Builder("FIOSTargetDevice").Build();
|
|
}
|
|
|
|
|
|
bool FIOSTargetDevice::Connect()
|
|
{
|
|
// @todo zombie - Probably need to write a specific ConnectTo(IpAddr) function for setting up a RemoteEndpoint for talking to the Daemon
|
|
// Returning true since, if this exists, a device exists.
|
|
|
|
return true;
|
|
}
|
|
|
|
void FIOSTargetDevice::Disconnect()
|
|
{
|
|
}
|
|
|
|
int32 FIOSTargetDevice::GetProcessSnapshot(TArray<FTargetDeviceProcessInfo>& OutProcessInfos)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
ETargetDeviceTypes FIOSTargetDevice::GetDeviceType() const
|
|
{
|
|
return DeviceType;
|
|
}
|
|
|
|
FTargetDeviceId FIOSTargetDevice::GetId() const
|
|
{
|
|
return DeviceId;
|
|
}
|
|
|
|
FString FIOSTargetDevice::GetName() const
|
|
{
|
|
return DeviceName;
|
|
}
|
|
|
|
FString FIOSTargetDevice::GetOperatingSystemName()
|
|
{
|
|
return TargetPlatform.PlatformName();
|
|
}
|
|
|
|
const class ITargetPlatform& FIOSTargetDevice::GetTargetPlatform() const
|
|
{
|
|
return TargetPlatform;
|
|
}
|
|
|
|
bool FIOSTargetDevice::IsConnected()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
bool FIOSTargetDevice::IsDefault() const
|
|
{
|
|
return true;
|
|
}
|
|
|
|
bool FIOSTargetDevice::PowerOff(bool Force)
|
|
{
|
|
// @todo zombie - Supported by the Daemon?
|
|
|
|
return false;
|
|
}
|
|
|
|
bool FIOSTargetDevice::PowerOn()
|
|
{
|
|
// @todo zombie - Supported by the Daemon?
|
|
|
|
return false;
|
|
}
|
|
|
|
bool FIOSTargetDevice::Reboot(bool bReconnect)
|
|
{
|
|
// @todo zombie - Supported by the Daemon?
|
|
|
|
return false;
|
|
}
|
|
|
|
bool FIOSTargetDevice::SupportsFeature(ETargetDeviceFeatures Feature) const
|
|
{
|
|
switch (Feature)
|
|
{
|
|
case ETargetDeviceFeatures::Reboot:
|
|
return bCanReboot;
|
|
|
|
case ETargetDeviceFeatures::PowerOn:
|
|
return bCanPowerOn;
|
|
|
|
case ETargetDeviceFeatures::PowerOff:
|
|
return bCanPowerOff;
|
|
|
|
case ETargetDeviceFeatures::ProcessSnapshot:
|
|
return false;
|
|
|
|
default:
|
|
return false;
|
|
}
|
|
}
|
|
|
|
bool FIOSTargetDevice::TerminateProcess(const int64 ProcessId)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
void FIOSTargetDevice::SetUserCredentials(const FString& UserName, const FString& UserPassword)
|
|
{
|
|
}
|
|
|
|
bool FIOSTargetDevice::GetUserCredentials(FString& OutUserName, FString& OutUserPassword)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
inline void FIOSTargetDevice::ExecuteConsoleCommand(const FString& ExecCommand) const
|
|
{
|
|
// this is where the new console command system execution goes.
|
|
}
|
|
|
|
inline ITargetDeviceOutputPtr FIOSTargetDevice::CreateDeviceOutputRouter(FOutputDevice* Output) const
|
|
{
|
|
FIOSTargetDeviceOutputPtr DeviceOutputPtr = MakeShareable(new FIOSTargetDeviceOutput());
|
|
if (DeviceOutputPtr->Init(*this, Output))
|
|
{
|
|
return DeviceOutputPtr;
|
|
}
|
|
|
|
return nullptr;
|
|
} |