Files
UnrealEngineUWP/Engine/Source/Developer/iOS/IOSTargetPlatform/Private/IOSTargetDeviceOutput.h
cosmin sulea 1898787cf3 UE-63767 - iOS Device Output Log console does not work
#jira UE-63767
#rb Jack.Porter

#ROBOMERGE-OWNER: robert.manuszewski
#ROBOMERGE-AUTHOR: cosmin.sulea
#ROBOMERGE-SOURCE: CL 5036543 in //UE4/Release-4.22/... via CL 5036544
#ROBOMERGE-BOT: CORE (Main -> Dev-Core)

[CL 5122331 by cosmin sulea in Dev-Core branch]
2019-02-22 00:59:41 -05:00

58 lines
1.4 KiB
C++

// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Containers/UnrealString.h"
#include "HAL/Runnable.h"
#include "HAL/RunnableThread.h"
#include "HAL/PlatformProcess.h"
#include "Interfaces/ITargetDeviceOutput.h"
#include "Misc/ConfigCacheIni.h"
#include "HAL/ThreadSafeCounter.h"
class FIOSTargetDevice;
class FIOSDeviceOutputReaderRunnable : public FRunnable
{
public:
FIOSDeviceOutputReaderRunnable(const FTargetDeviceId InDeviceId, FOutputDevice* Output);
// FRunnable interface.
virtual bool Init(void) override;
virtual void Exit(void) override;
virtual void Stop(void) override;
virtual uint32 Run(void) override;
private:
bool StartDSCommander();
private:
// > 0 if we've been asked to abort work in progress at the next opportunity
FThreadSafeCounter StopTaskCounter;
FTargetDeviceId DeviceId;
FOutputDevice* Output;
void* DSReadPipe;
void* DSWritePipe;
FTcpDSCommander* DSCommander;
};
/**
* Implements a IOS target device output.
*/
class FIOSTargetDeviceOutput : public ITargetDeviceOutput
{
public:
bool Init(const FIOSTargetDevice& TargetDevice, FOutputDevice* Output);
static bool ExecuteDSCommand(const char *CommandLine, FString* OutStdOut);
private:
TUniquePtr<FRunnableThread> DeviceOutputThread;
FTargetDeviceId DeviceId;
FString DeviceName;
};
#include "IOSTargetDeviceOutput.inl"