Ark Server API (ASA) - Wiki
|
#include <InteractiveProcess.h>
Public Member Functions | |
FInteractiveProcess (const FString &InURL, const FString &InParams, bool InHidden, bool LongTime=false) | |
FInteractiveProcess (const FString &InURL, const FString &InParams, const FString &InWorkingDir, bool InHidden, bool LongTime=false) | |
~FInteractiveProcess () | |
FTimespan | GetDuration () const |
FProcHandle | GetProcessHandle () const |
bool | IsRunning () const |
bool | Launch () |
FSimpleDelegate & | OnCanceled () |
FOnInteractiveProcessCompleted & | OnCompleted () |
FOnInteractiveProcessOutput & | OnOutput () |
void | SendWhenReady (const FString &Message) |
void | SendWhenReady (const TArray< uint8 > &Data) |
int | GetReturnCode () const |
void | Cancel (bool InKillTree=false) |
virtual bool | Init () override |
virtual uint32 | Run () override |
virtual void | Stop () override |
virtual void | Exit () override |
Public Member Functions inherited from FRunnable | |
virtual class FSingleThreadRunnable * | GetSingleThreadInterface () |
virtual | ~FRunnable () |
Protected Member Functions | |
void | ProcessOutput (const FString &Output) |
void | SendMessageToProcessIf () |
Implements an external process that can be interacted.
Definition at line 37 of file InteractiveProcess.h.
FInteractiveProcess::FInteractiveProcess | ( | const FString & | InURL, |
const FString & | InParams, | ||
bool | InHidden, | ||
bool | LongTime = false ) |
Creates a new interactive process.
InURL | The URL of the executable to launch. |
InParams | The command line parameters. |
InHidden | Whether the window of the process should be hidden. |
FInteractiveProcess::FInteractiveProcess | ( | const FString & | InURL, |
const FString & | InParams, | ||
const FString & | InWorkingDir, | ||
bool | InHidden, | ||
bool | LongTime = false ) |
Creates a new interactive process.
InURL | The URL of the executable to launch. |
InParams | The command line parameters. |
InWorkingDir | The URL of the working dir where the executable should launch. |
InHidden | Whether the window of the process should be hidden. |
FInteractiveProcess::~FInteractiveProcess | ( | ) |
Destructor.
Cancels the process.
InKillTree | Whether to kill the entire process tree when canceling this process. |
Definition at line 158 of file InteractiveProcess.h.
FTimespan FInteractiveProcess::GetDuration | ( | ) | const |
Gets the duration of time that the task has been running.
|
inline |
Gets the Process Handle. The instance can be invalid if the process was not created.
Definition at line 76 of file InteractiveProcess.h.
|
inline |
Returns the return code from the exited process
Definition at line 148 of file InteractiveProcess.h.
Initializes the runnable object.
This method is called in the context of the thread object that aggregates this, not the thread that passes this runnable to a new thread.
Reimplemented from FRunnable.
Definition at line 166 of file InteractiveProcess.h.
|
inline |
Checks whether the process is still running.
Definition at line 86 of file InteractiveProcess.h.
bool FInteractiveProcess::Launch | ( | ) |
Launches the process
|
inline |
Returns a delegate that is executed when the process has been canceled.
Definition at line 103 of file InteractiveProcess.h.
|
inline |
Returns a delegate that is executed when the interactive process completed. Delegate won't be executed if process terminated without user wanting
Definition at line 114 of file InteractiveProcess.h.
|
inline |
Returns a delegate that is executed when a interactive process produces output.
Definition at line 124 of file InteractiveProcess.h.
Processes the given output string.
Output | The output string to process. |
|
protected |
Takes the first message to be sent from MessagesToProcess, if there is one, and sends it to process
Sends the string message when process is ready
Message | to be sent |
Sends the data message when process is ready
Data | to be sent |
|
private |
Definition at line 196 of file InteractiveProcess.h.
|
private |
Definition at line 199 of file InteractiveProcess.h.
|
private |
Definition at line 202 of file InteractiveProcess.h.
|
private |
Definition at line 253 of file InteractiveProcess.h.
|
private |
Definition at line 256 of file InteractiveProcess.h.
Definition at line 250 of file InteractiveProcess.h.
|
private |
Definition at line 244 of file InteractiveProcess.h.
|
private |
Definition at line 259 of file InteractiveProcess.h.
|
private |
Definition at line 211 of file InteractiveProcess.h.
|
private |
Definition at line 217 of file InteractiveProcess.h.
|
private |
Definition at line 226 of file InteractiveProcess.h.
|
private |
Definition at line 220 of file InteractiveProcess.h.
|
private |
Definition at line 238 of file InteractiveProcess.h.
|
private |
Definition at line 205 of file InteractiveProcess.h.
|
private |
Definition at line 241 of file InteractiveProcess.h.
Definition at line 247 of file InteractiveProcess.h.
|
private |
Definition at line 232 of file InteractiveProcess.h.
|
private |
Definition at line 235 of file InteractiveProcess.h.
|
private |
Definition at line 208 of file InteractiveProcess.h.
|
private |
Definition at line 214 of file InteractiveProcess.h.
|
private |
Definition at line 229 of file InteractiveProcess.h.
|
private |
Definition at line 223 of file InteractiveProcess.h.