You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rnx #rb none #ROBOMERGE-SOURCE: CL 10869240 via CL 10869516 via CL 10869902 #ROBOMERGE-BOT: (v613-10869866) [CL 10870584 by ryan durand in Main branch]
57 lines
1.4 KiB
C++
57 lines
1.4 KiB
C++
// Copyright 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 FAndroidTargetDevice;
|
|
|
|
class FAndroidDeviceOutputReaderRunnable : public FRunnable
|
|
{
|
|
public:
|
|
FAndroidDeviceOutputReaderRunnable(const FString& AdbFilename, const FString& DeviceSerialNumber, 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 StartLogcatProcess(void);
|
|
|
|
private:
|
|
// > 0 if we've been asked to abort work in progress at the next opportunity
|
|
FThreadSafeCounter StopTaskCounter;
|
|
|
|
FString AdbFilename;
|
|
FString DeviceSerialNumber;
|
|
FOutputDevice* Output;
|
|
|
|
void* LogcatReadPipe;
|
|
void* LogcatWritePipe;
|
|
FProcHandle LogcatProcHandle;
|
|
};
|
|
|
|
/**
|
|
* Implements a Android target device.
|
|
*/
|
|
class FAndroidTargetDeviceOutput : public ITargetDeviceOutput
|
|
{
|
|
public:
|
|
bool Init(const FAndroidTargetDevice& TargetDevice, FOutputDevice* Output);
|
|
|
|
private:
|
|
TUniquePtr<FRunnableThread> DeviceOutputThread;
|
|
FString DeviceSerialNumber;
|
|
FString DeviceName;
|
|
};
|
|
|
|
#include "AndroidTargetDeviceOutput.inl"
|