30 #ifndef PTLIB_INDIRECTCHANNEL_H
31 #define PTLIB_INDIRECTCHANNEL_H
307 bool autoDelete =
true,
308 bool closeExisting =
false
325 bool autoDelete =
true,
326 bool closeExisting =
false
333 ChannelClass * channel =
dynamic_cast<ChannelClass *
>(
this);
334 if (channel == NULL) {
336 if (indirect == NULL || (channel = indirect->
FindChannel<ChannelClass>()) == NULL) {
338 if (indirect != NULL)
378 #endif // PTLIB_INDIRECTCHANNEL_H
Definition: channel.h:255
PChannel * Detach(ShutdownValue option=ShutdownReadAndWrite)
Detach without closing the read/write channel.
virtual PString GetErrorText(ErrorGroup group=NumErrorGroups) const
Get error message description.
ChannelClass * FindChannel()
Locate a channel of a specific class in the indirect chain.
Definition: indchan.h:331
virtual PString GetName() const
Get the name of the channel.
PBoolean readAutoDelete
Automatically delete read channel on destruction.
Definition: indchan.h:365
virtual int ReadChar()
Read a single character from the channel.
Comparison
Result of the comparison operation performed by the Compare() function.
Definition: object.h:2251
virtual PBoolean IsOpen() const
Determine if the channel is currently open and read and write operations can be executed on it...
This is a channel that operates indirectly through another channel(s).
Definition: indchan.h:45
PChannel * readChannel
Channel for read operations.
Definition: indchan.h:362
virtual PBoolean Shutdown(ShutdownValue option)
Close one or both of the data streams associated with a channel.
ShutdownValue
Definition: channel.h:589
PChannel * GetReadChannel() const
Get the channel used for read operations.
virtual PChannel * GetBaseWriteChannel() const
This function returns the eventual base channel for writing of a series of indirect channels provided...
PChannel * GetWriteChannel() const
Get the channel used for write operations.
PChannel * writeChannel
Channel for write operations.
Definition: indchan.h:368
Definition: channel.h:592
Abstract class defining I/O channel semantics.
Definition: channel.h:103
PDECLARE_READ_WRITE_MUTEX(channelPointerMutex)
Race condition prevention on closing channel.
virtual PBoolean Close()
Close the channel.
bool PBoolean
Definition: object.h:174
virtual PChannel * GetBaseReadChannel() const
This function returns the eventual base channel for reading of a series of indirect channels provided...
intptr_t P_INT_PTR
Definition: object.h:2646
PIndirectChannel()
Create a new indirect channel without any channels to redirect to.
The character string class.
Definition: pstring.h:108
PBoolean Open(PChannel &channel)
Set the channel for both read and write operations.
Comparison Compare(const PObject &obj) const
Determine if the two objects refer to the same indirect channel.
PBoolean writeAutoDelete
Automatically delete write channel on destruction.
Definition: indchan.h:371
virtual P_INT_PTR GetHandle() const
Get the OS specific handle for the PSoundChannel.
ErrorGroup
Error groups.
Definition: channel.h:251
virtual PBoolean Write(const void *buf, PINDEX len)
Low level write to the channel.
virtual PBoolean OnOpen()
This callback is executed when the Open() function is called with open channels.
virtual bool SetLocalEcho(bool localEcho)
Set local echo mode.
virtual PBoolean Read(void *buf, PINDEX len)
Low level read from the channel.
bool SetReadChannel(PChannel *channel, bool autoDelete=true, bool closeExisting=false)
Set the channel for read operations.
virtual bool CloseBaseReadChannel()
Close the base channel of channel indirection using PIndirectChannel.
Ultimate parent class for all objects in the class library.
Definition: object.h:2204
PBoolean SetWriteChannel(PChannel *channel, bool autoDelete=true, bool closeExisting=false)
Set the channel for read operations.
virtual bool CloseBaseWriteChannel()
Close the base channel of channel indirection using PIndirectChannel.
~PIndirectChannel()
Close the indirect channel, deleting read/write channels if desired.