TalanSoft Toolkits  201707
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions | List of all members
iOSProcess Struct Referenceabstract
Inheritance diagram for iOSProcess:
iUnknown

Detailed Description

OS Process object interface.

Public Member Functions

virtual const ni::acharGetExePath () const =0
 Get the path of the executable from which the process has been spawned. {Property}. More...
 
virtual const ni::acharGetCommandLine () const =0
 Get the command line used to spawn the process. {Property}. More...
 
virtual tInt GetPID () const =0
 Get the process's PID. {Property}. More...
 
virtual tInt GetParentPID () const =0
 Get the parent process's PID. {Property}. More...
 
virtual tU32 IsParentProcess (tInt aParentPID) const =0
 Check whether the parent process is a parent of this process. More...
 
virtual tBool GetIsCurrent () const =0
 Get whether the process is the current process. {Property}. More...
 
virtual tBool GetDidCrash () const =0
 Get the termination status (exit code) of the process and return true if the status indicates that the process crashed. {Property}. More...
 
virtual tBool Kill (tInt anExitCode, tBool abWait)=0
 Attempts to kill the process, giving it a specified exit code. More...
 
virtual tBool Wait (tU32 anTimeMs)=0
 Wait for the process to exit. More...
 
virtual sVec2i WaitForExitCode ()=0
 Waits for process to exit. In POSIX systems, if the process hasn't been signaled then returns the exit code; otherwise it's considered a failure. On Windows the exit code is always returned. More...
 
virtual void Terminate (tInt aResultCode)=0
 Terminates the process with extreme prejudice. The given result code will be the exit code of the process. If the process has already exited, this will do nothing. More...
 
virtual iFileGetFile (eOSProcessFile aFile) const =0
 Get a standard file object beloging to the process. {Property}. More...
 
- Public Member Functions inherited from iUnknown
virtual tBool IsOK () const =0
 Check if the object is valid. More...
 
virtual tI32 AddRef ()=0
 Signal that one more reference of the object has been created. More...
 
virtual tI32 Release ()=0
 Release a reference of the object. More...
 
virtual void DeleteThis ()=0
 Bypass any reference counting and delete this object. More...
 
virtual void Invalidate ()=0
 Invalidate the object. More...
 
virtual iUnknownQueryInterface (const tUUID &aIID)=0
 Query an interface. More...
 
virtual void ListInterfaces (iMutableCollection *apLst, tU32 anFlags) const =0
 Fill a UUID list containing the UUIDs of the implemented interfaces. More...
 
virtual tI32 SetNumRefs (tI32 anNumRefs)=0
 Set the reference counter directly. More...
 
virtual tI32 GetNumRefs () const =0
 Get the number of references to this object. More...
 

Member Function Documentation

virtual const ni::achar* GetExePath ( ) const
pure virtual

Get the path of the executable from which the process has been spawned. {Property}.

Remarks
Might be empty.
virtual const ni::achar* GetCommandLine ( ) const
pure virtual

Get the command line used to spawn the process. {Property}.

Remarks
Might be empty.
virtual tInt GetPID ( ) const
pure virtual

Get the process's PID. {Property}.

virtual tInt GetParentPID ( ) const
pure virtual

Get the parent process's PID. {Property}.

virtual tU32 IsParentProcess ( tInt  aParentPID) const
pure virtual

Check whether the parent process is a parent of this process.

Returns
The distance of the parent, 1 is the direct parent, 2 is the parent of the parent, and so on. Returns 0 if the specified PID is not the parent of this process.
virtual tBool GetIsCurrent ( ) const
pure virtual

Get whether the process is the current process. {Property}.

virtual tBool GetDidCrash ( ) const
pure virtual

Get the termination status (exit code) of the process and return true if the status indicates that the process crashed. {Property}.

virtual tBool Kill ( tInt  anExitCode,
tBool  abWait 
)
pure virtual

Attempts to kill the process, giving it a specified exit code.

Parameters
anExitCodethe exit code to give to the process once terminated.
abWaitif true wait for the process to be actually be terminated before returning.
Returns
true if successful, false otherwise.
virtual tBool Wait ( tU32  anTimeMs)
pure virtual

Wait for the process to exit.

Returns
true if the process exited cleanly within the given time limit.
virtual sVec2i WaitForExitCode ( )
pure virtual

Waits for process to exit. In POSIX systems, if the process hasn't been signaled then returns the exit code; otherwise it's considered a failure. On Windows the exit code is always returned.

Returns
'x' is true on success, false otherwise. 'y' is the process's exit code.
virtual void Terminate ( tInt  aResultCode)
pure virtual

Terminates the process with extreme prejudice. The given result code will be the exit code of the process. If the process has already exited, this will do nothing.

virtual iFile* GetFile ( eOSProcessFile  aFile) const
pure virtual

Get a standard file object beloging to the process. {Property}.