Files
UnrealEngineUWP/Engine/Source/Developer/Android/AndroidTargetPlatformControls/Private/AndroidTargetDeviceOutput.h
florin pascu 367836ea48 First part of TargetPlatform(TP) refactor into TargetPlatformSettings(TPS) and TargetPlatformControls(TPC)
TPS doesn't need SDK and will be used to get info about the platform
TPC requires SDK
AndroidTP has been converted to the new system
#jira UE-200883
#rb Jack.Porter

[CL 30963885 by florin pascu in ue5-main branch]
2024-01-29 04:50:19 -05:00

59 lines
1.5 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
// HEADER_UNIT_SKIP - Not included directly
#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" // IWYU pragma: export