2019-12-26 15:32:37 -05:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
2018-09-10 21:20:00 -04:00
|
|
|
|
|
|
|
|
#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:
|
|
|
|
|
// > 0 if we've been asked to abort work in progress at the next opportunity
|
|
|
|
|
FThreadSafeCounter StopTaskCounter;
|
|
|
|
|
|
|
|
|
|
FTargetDeviceId DeviceId;
|
|
|
|
|
FOutputDevice* Output;
|
2019-11-25 02:09:44 -05:00
|
|
|
TQueue<FString> OutputQueue;
|
2018-09-10 21:20:00 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Implements a IOS target device output.
|
|
|
|
|
*/
|
|
|
|
|
class FIOSTargetDeviceOutput : public ITargetDeviceOutput
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
bool Init(const FIOSTargetDevice& TargetDevice, FOutputDevice* Output);
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
TUniquePtr<FRunnableThread> DeviceOutputThread;
|
|
|
|
|
FTargetDeviceId DeviceId;
|
|
|
|
|
FString DeviceName;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#include "IOSTargetDeviceOutput.inl"
|