#include <indchan.h>
Inheritance diagram for PIndirectChannel:
Public Member Functions | |
Construction | |
PIndirectChannel () | |
~PIndirectChannel () | |
Close the indirect channel, deleting read/write channels if desired. | |
Overrides from class PObject | |
Comparison | Compare (const PObject &obj) const |
Overrides from class PChannel | |
virtual PString | GetName () const |
virtual BOOL | Close () |
virtual BOOL | IsOpen () const |
virtual BOOL | Read (void *buf, PINDEX len) |
virtual BOOL | Write (const void *buf, PINDEX len) |
virtual BOOL | Shutdown (ShutdownValue option) |
virtual PChannel * | GetBaseReadChannel () const |
virtual PChannel * | GetBaseWriteChannel () const |
virtual PString | GetErrorText (ErrorGroup group=NumErrorGroups) const |
Channel establish functions | |
BOOL | Open (PChannel &channel) |
BOOL | Open (PChannel *channel, BOOL autoDelete=TRUE) |
BOOL | Open (PChannel *readChannel, PChannel *writeChannel, BOOL autoDeleteRead=TRUE, BOOL autoDeleteWrite=TRUE) |
PChannel * | GetReadChannel () const |
BOOL | SetReadChannel (PChannel *channel, BOOL autoDelete=TRUE) |
PChannel * | GetWriteChannel () const |
BOOL | SetWriteChannel (PChannel *channel, BOOL autoDelete=TRUE) |
Protected Member Functions | |
virtual BOOL | OnOpen () |
Protected Attributes | |
PChannel * | readChannel |
Channel for read operations. | |
BOOL | readAutoDelete |
Automatically delete read channel on destruction. | |
PChannel * | writeChannel |
Channel for write operations. | |
BOOL | writeAutoDelete |
Automatically delete write channel on destruction. | |
PReadWriteMutex | channelPointerMutex |
Race condition prevention on closing channel. |
|
Create a new indirect channel without any channels to redirect to. If an attempt to read or write is made before Open() is called the the functions will assert. |
|
Close the indirect channel, deleting read/write channels if desired.
|
|
Close the channel. This will detach itself from the read and write channels and delete both of them if they are auto delete.
Reimplemented from PChannel. Reimplemented in PFTPClient, PSMTPClient, PPOP3Client, PRFC822Channel, PSSLChannel, PVXMLSession, and PVXMLChannel. |
|
Determine if the two objects refer to the same indirect channel. This actually compares the channel pointers.
Reimplemented from PChannel. |
|
This function returns the eventual base channel for reading of a series of indirect channels provided by descendents of PIndirectChannel#. The behaviour for this function is to return "this".
Reimplemented from PChannel. |
|
This function returns the eventual base channel for writing of a series of indirect channels provided by descendents of PIndirectChannel#. The behaviour for this function is to return "this".
Reimplemented from PChannel. |
|
Get error message description. Return a string indicating the error message that may be displayed to the user. The error for the last I/O operation in this object is used.
Reimplemented in PSSLChannel. |
|
Get the name of the channel. This is a combination of the channel pointers names (or simply the channel pointers name if the read and write channels are the same) or empty string if both null.
Reimplemented from PChannel. |
|
Get the channel used for read operations.
|
|
Get the channel used for write operations.
|
|
Determine if the channel is currently open and read and write operations can be executed on it. For example, in the PFile# class it returns if the file is currently open.
Reimplemented from PChannel. Reimplemented in PVXMLChannel. |
|
This callback is executed when the Open() function is called with open channels. It may be used by descendent channels to do any handshaking required by the protocol that channel embodies. The default behaviour is to simply return TRUE.
Reimplemented in PFTPClient, PFTPServer, PSMTPClient, PSMTPServer, PPOP3Client, PPOP3Server, PRFC822Channel, and PSSLChannel. |
|
Set the channel for both read and write operations. This then checks that they are open and then calls the OnOpen() virtual function. If it in turn returns TRUE then the Open() function returns success. The channels pointed to by readChannel# and writeChannel# may be automatically deleted when the PIndirectChannel is destroyed or a new subchannel opened.
|
|
Set the channel for both read and write operations. This then checks that they are open and then calls the OnOpen() virtual function. If it in turn returns TRUE then the Open() function returns success. The channel pointed to by channel# may be automatically deleted when the PIndirectChannel is destroyed or a new subchannel opened.
|
|
Set the channel for both read and write operations. This then checks that they are open and then calls the OnOpen() virtual function. If it in turn returns TRUE then the Open() function returns success.
|
|
Low level read from the channel. This function may block until the requested number of characters were read or the read timeout was reached. The GetLastReadCount() function returns the actual number of bytes read. This will use the readChannel# pointer to actually do the read. If readChannel# is null the this asserts. The GetErrorCode() function should be consulted after Read() returns FALSE to determine what caused the failure.
Reimplemented from PChannel. Reimplemented in PDelayChannel, PInternetProtocol, PSSLChannel, and PVXMLChannel. |
|
Set the channel for read operations.
|
|
Set the channel for read operations.
|
|
Close one or both of the data streams associated with a channel. The behavour here is to pass the shutdown on to its read and write channels.
Reimplemented in PSSLChannel. |
|
Low level write to the channel. This function will block until the requested number of characters are written or the write timeout is reached. The GetLastWriteCount() function returns the actual number of bytes written. This will use the writeChannel# pointer to actually do the write. If writeChannel# is null the this asserts. The GetErrorCode() function should be consulted after Write() returns FALSE to determine what caused the failure.
Reimplemented from PChannel. Reimplemented in PDelayChannel, PRFC822Channel, PInternetProtocol, PSSLChannel, and PVXMLChannel. |
|
Race condition prevention on closing channel.
|
|
Automatically delete read channel on destruction.
|
|
Channel for read operations.
|
|
Automatically delete write channel on destruction.
|
|
Channel for write operations.
|