34 #ifndef PTLIB_PIPECHANNEL_H
35 #define PTLIB_PIPECHANNEL_H
406 #include "msos/ptlib/pipechan.h"
408 #include "unix/ptlib/pipechan.h"
413 #endif // PTLIB_PIPECHANNEL_H
This class defines an arbitrary time interval to millisecond accuracy.
Definition: timeint.h:55
Definition: pipechan.h:73
PBoolean Open(const PString &subProgram, OpenMode mode=ReadWrite, PBoolean searchPath=true, PBoolean stderrSeparate=false)
Open a channel.
OpenMode
Channel mode for the pipe to the sub-process.
Definition: pipechan.h:81
This is a dictionary collection class of PString objects, keyed by another string.
Definition: pstring.h:2784
This class describes a full description for a file on the particular platform.
Definition: filepath.h:65
Comparison
Result of the comparison operation performed by the Compare() function.
Definition: object.h:1184
static PBoolean CanReadAndWrite()
Determine if the platform can support simultaneous read and writes from the PPipeChannel (eg MSDOS re...
This is an array collection class of PString objects.
Definition: pstring.h:2024
Pipe is bidirectional between current and sub-processes.
Definition: pipechan.h:87
virtual PString GetName() const
Get the name of the channel.
BOOL PBoolean
Definition: object.h:102
PFilePath subProgName
The fully qualified path name for the sub-program executable.
Definition: pipechan.h:392
virtual PBoolean Read(void *buf, PINDEX len)
Low level read from the channel.
PBoolean ReadStandardError(PString &errors, PBoolean wait=false)
Read all available data on the standard error stream of the sub-process.
virtual PBoolean Close()
Close the channel.
Pipe is only from the current process to the sub-process.
Definition: pipechan.h:85
Abstract class defining I/O channel semantics.
Definition: channel.h:107
The character string class.
Definition: pstring.h:108
PBoolean Kill(int signal=9)
This function will terminate the sub-program using the signal code specified.
PBoolean Execute()
Start execution of sub-program for platforms that do not support multi-processing, this will actually run the sub-program passing all data written to the PPipeChannel.
~PPipeChannel()
Close the pipe channel, killing the sub-process.
Pipe is bidirectional between current and sub-processes but sub-processes stdout and stderr goes to c...
Definition: pipechan.h:91
Pipe is only from the sub-process to the current process.
Definition: pipechan.h:83
virtual PBoolean Write(const void *buf, PINDEX len)
Low level write to the channel.
Comparison Compare(const PObject &obj) const
Determine if the two objects refer to the same pipe channel.
int WaitForTermination()
This function will block and wait for the sub-program to terminate.
Ultimate parent class for all objects in the class library.
Definition: object.h:1118
PPipeChannel()
Create a new pipe channel.
PBoolean IsRunning() const
Determine if the program associated with the PPipeChannel is still executing.
int GetReturnCode() const
Get the return code from the most recent Close;.
const PFilePath & GetSubProgram() const
Get the full file path for the sub-programs executable file.