#include <t38proto.h>
Construction | |
| |
enum | Mode { Mode_Wait, Mode_Timeout, Mode_UserInput, Mode_InBand } |
Mode | m_syncMode |
bool | m_faxMode |
PTimer | m_faxTimer |
OpalT38Connection (OpalCall &call, OpalFaxEndPoint &endpoint, const PString &filename, bool receive, const PString &token, OpalConnection::StringOptions *stringOptions=NULL) | |
virtual PString | GetPrefixName () const |
virtual void | ApplyStringOptions (OpalConnection::StringOptions &stringOptions) |
virtual void | OnEstablished () |
virtual OpalMediaStream * | CreateMediaStream (const OpalMediaFormat &mediaFormat, unsigned sessionID, PBoolean isSource) |
virtual void | OnMediaPatchStop (unsigned sessionId, bool isSource) |
virtual OpalMediaFormatList | GetMediaFormats () const |
virtual PBoolean | SendUserInputTone (char tone, unsigned duration) |
PDECLARE_NOTIFIER (PTimer, OpalT38Connection, OnSendCNGCED) | |
PDECLARE_NOTIFIER (PTimer, OpalT38Connection, OnFaxChangeTimeout) | |
PDECLARE_NOTIFIER (PThread, OpalT38Connection, OpenFaxStreams) | |
void | RequestFaxMode (bool fax) |
T.38 Connection
OpalT38Connection::OpalT38Connection | ( | OpalCall & | call, | |
OpalFaxEndPoint & | endpoint, | |||
const PString & | filename, | |||
bool | receive, | |||
const PString & | token, | |||
OpalConnection::StringOptions * | stringOptions = NULL | |||
) |
Create a new endpoint.
call | Owner calll for connection | |
endpoint | Owner endpoint for connection | |
filename | filename to send/receive | |
receive | true if receiving fax | |
token | token for connection |
virtual void OpalT38Connection::ApplyStringOptions | ( | OpalConnection::StringOptions & | stringOptions | ) | [virtual] |
Reimplemented from OpalFaxConnection.
virtual OpalMediaStream* OpalT38Connection::CreateMediaStream | ( | const OpalMediaFormat & | mediaFormat, | |
unsigned | sessionID, | |||
PBoolean | isSource | |||
) | [virtual] |
Create a new media stream. This will create a media stream of an appropriate subclass as required by the underlying connection protocol. For instance H.323 would create an OpalRTPStream.
The sessionID parameter may not be needed by a particular media stream and may be ignored. In the case of an OpalRTPStream it us used.
Note that media streams may be created internally to the underlying protocol. This function is not the only way a stream can come into existance.
Reimplemented from OpalFaxConnection.
virtual OpalMediaFormatList OpalT38Connection::GetMediaFormats | ( | ) | const [virtual] |
Get the data formats this connection is capable of operating. This provides a list of media data format names that an OpalMediaStream may be created in within this connection.
The default behaviour returns the formats the PSoundChannel can do, typically only PCM-16.
Reimplemented from OpalFaxConnection.
virtual PString OpalT38Connection::GetPrefixName | ( | ) | const [inline, virtual] |
Get this connections protocol prefix for URLs.
Reimplemented from OpalConnection.
References OpalFaxEndPoint::GetT38Prefix(), and OpalFaxConnection::m_endpoint.
virtual void OpalT38Connection::OnEstablished | ( | ) | [virtual] |
A call back function whenever a connection is established. This indicates that a connection to an endpoint was established. This usually occurs after OnConnected() and indicates that the connection is both connected and has media flowing.
In the context of H.323 this means that the signalling and control channels are open and the TerminalCapabilitySet and MasterSlave negotiations are complete.
The default behaviour calls the OpalEndPoint function of the same name.
Reimplemented from OpalConnection.
virtual void OpalT38Connection::OnMediaPatchStop | ( | unsigned | sessionId, | |
bool | isSource | |||
) | [virtual] |
Reimplemented from OpalConnection.
OpalT38Connection::PDECLARE_NOTIFIER | ( | PThread | , | |
OpalT38Connection | , | |||
OpenFaxStreams | ||||
) | [protected] |
OpalT38Connection::PDECLARE_NOTIFIER | ( | PTimer | , | |
OpalT38Connection | , | |||
OnFaxChangeTimeout | ||||
) | [protected] |
OpalT38Connection::PDECLARE_NOTIFIER | ( | PTimer | , | |
OpalT38Connection | , | |||
OnSendCNGCED | ||||
) | [protected] |
void OpalT38Connection::RequestFaxMode | ( | bool | fax | ) | [protected] |
virtual PBoolean OpalT38Connection::SendUserInputTone | ( | char | tone, | |
unsigned | duration | |||
) | [virtual] |
Send a user input indication to the remote endpoint. This sends DTMF emulation user input. If something more sophisticated than the simple tones that can be sent using the SendUserInput() function.
A duration of zero indicates that no duration is to be indicated. A non-zero logical channel indicates that the tone is to be syncronised with the logical channel at the rtpTimestamp value specified.
The tone parameter must be one of "0123456789#*ABCD!" where '!' indicates a hook flash. If tone is a ' ' character then a signalUpdate PDU is sent that updates the last tone indication sent. See the H.245 specifcation for more details on this.
The default behaviour sends the tone using RFC2833.
Reimplemented from OpalConnection.
bool OpalT38Connection::m_faxMode [protected] |
PTimer OpalT38Connection::m_faxTimer [protected] |
Mode OpalT38Connection::m_syncMode [protected] |