CFaxModem Class Reference

class CFaxModem : public CBase

Inherits from

Public Member Functions
CFaxModem ( RFax::TProgress &)
~CFaxModem ()
void CommitTransmitBufferL (void)
TInt ExportL (const TDesC8 &)
TInt GetMatchL (const TDesC8 &, TInt )
TInt ImportL ( TDes8 &, TInt )
CFaxModem * NewL ( TFaxServerSessionSettings *, RFax::TProgress &)
CFaxModem * NewLC ( TFaxServerSessionSettings *, RFax::TProgress &)
void ProgressUpdateL ()
TInt RxcharWaitL ( TInt &)
TInt Rxstat (void)
void SendTransmitBufferL (void)
void Silence (void)
void Silence ( TInt )
void TxcharL ( TUint8 )
TInt Txstat (void)
void Xonoff (void)
void Xonon (void)
TInt clock (void)
Private Member Functions
void ConstructL ( TFaxServerSessionSettings *)
void Dropdtr (void)
void HangupProcedureL ()
void LowerDTR (void)
void RaiseDTR (void)
void SendL (const TDesC8 &)
void SetModemCommandModeL (void)
void Speed ( TBps )
TInt SubImportL ( TDes8 &, TInt )
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Public Attributes
TInt iCalls
TInt iCancel
TInt iGranularity
TBuf8 < 256 > iOurMessage
RFax::TProgress & iProgress
TBuf8 < 1 > iReadone
TBuf8 < KBufSize > iReceiveBuffer
TBuf8 < KBufSize +16 > iTransmitBuffer
TInt iVerbose
Protected Attributes
RComm iCommSession
RFile iFile
TBool iFileOpen
RFs iFileSession
TBool iFileSessionOpen
TBool iModemSet
TBool iPortOpen
TCommConfig iRS232Settings
TRequestStatus iRecstat
TBuf8 < 1 > iSendone
TTime iStartTime
TBool iTimingLoopDelay
TRequestStatus iTranstat

Constructor & Destructor Documentation

CFaxModem(RFax::TProgress &)

CFaxModem ( RFax::TProgress & aProgress )

Parameters

RFax::TProgress & aProgress

~CFaxModem()

~CFaxModem ( )

Member Functions Documentation

CommitTransmitBufferL(void)

void CommitTransmitBufferL ( void )

Transmits iTransmitBuffer by calling SendL. After sending sets buffer's length to zero.

Note:

This function can leave.

SendL() function

Parameters

void

ConstructL(TFaxServerSessionSettings *)

void ConstructL ( TFaxServerSessionSettings * ) [private]

Dropdtr(void)

void Dropdtr ( void ) [private]

Parameters

void

ExportL(const TDesC8 &)

TInt ExportL ( const TDesC8 & )

Sends a textual string to the modem with delay.

SendL function
Note:

This function can leave

Parameters

const TDesC8 & - const. ref. to the string descriptor to be sent to modem.

GetMatchL(const TDesC8 &, TInt)

TInt GetMatchL ( const TDesC8 & ,
TInt
)

Searches for a given substring in modem's answer. also calls ProgressUpdate().

ImportL function
leave
This function can leave

Parameters

const TDesC8 & - sample string.
TInt - timeout in seconds.

HangupProcedureL()

void HangupProcedureL ( ) [private]

Hang up. Senda 'ATH' command to the modem and sets Echo off, fax class = 0

Note:

This function can leave

ImportL(TDes8 &, TInt)

TInt ImportL ( TDes8 & ,
TInt
)

Gets textual answer from the modem. Calls SubImportL() and ProgressUpdateL() .

SubImport function
Note:

This function can leave

Parameters

TDes8 & - ref. to the string descriptor that will accept data from modem if any. will contain string in upper case without terminating 0x0d, 0x0a.
TInt - Timeout in seconds.

LowerDTR(void)

void LowerDTR ( void ) [private]

Parameters

void

NewL(TFaxServerSessionSettings *, RFax::TProgress &)

CFaxModem * NewL ( TFaxServerSessionSettings * ,
RFax::TProgress & aProgress
) [static]

NewLC(TFaxServerSessionSettings *, RFax::TProgress &)

CFaxModem * NewLC ( TFaxServerSessionSettings * ,
RFax::TProgress & aProgress
) [static]

ProgressUpdateL()

void ProgressUpdateL ( )

RaiseDTR(void)

void RaiseDTR ( void ) [private]

Parameters

void

RxcharWaitL(TInt &)

TInt RxcharWaitL ( TInt & )

Reads 1 byte from serial port (or iReceiveBuffer) and puts it to iReadone buffer.

Note:

This function can leave. See comments in CFAXMODM.CPP

Parameters

TInt & - timeout in microseconds.

Rxstat(void)

TInt Rxstat ( void )

Parameters

void

SendL(const TDesC8 &)

void SendL ( const TDesC8 & ) [private]

Parameters

const TDesC8 &

SendTransmitBufferL(void)

void SendTransmitBufferL ( void ) [inline]

Parameters

void

SetModemCommandModeL(void)

void SetModemCommandModeL ( void ) [private]

Switch modem into command mode and clear its buffer. LYN-585JMR defect fix. By Dmitry Lyokhin. 11.03.02

Note:

This function can leave

Parameters

void

Silence(void)

void Silence ( void )

Wait approximately 75 ms

Parameters

void

Silence(TInt)

void Silence ( TInt ) const

Wait given number of microseconds

Parameters

TInt

Speed(TBps)

void Speed ( TBps ) [private]

Parameters

TBps

SubImportL(TDes8 &, TInt)

TInt SubImportL ( TDes8 & ,
TInt
) [private]

Gets textual answer from the modem.

RxcharWait function, iReadone
Note:

This function can leave

Parameters

TDes8 & - ref. to the string descriptor that will accept data from modem if any. will contain string in upper case without terminating 0x0d, 0x0a
TInt - Timeout in seconds.

TxcharL(TUint8)

void TxcharL ( TUint8 )

Sends 1 byte to modem.

Note:

This function can leave.

SendL() function

Parameters

TUint8 -Byte to be sent.

Txstat(void)

TInt Txstat ( void )

Does nothing. Just returns 0.

Parameters

void

Xonoff(void)

void Xonoff ( void )

Turns off handshaking

Parameters

void

Xonon(void)

void Xonon ( void )

Turns on obeying XON, XOFF characters and CTS signal

Parameters

void

clock(void)

TInt clock ( void )

Parameters

void

Member Data Documentation

TInt iCalls

TInt iCalls

TInt iCancel

TInt iCancel

RComm iCommSession

RComm iCommSession [protected]

RFile iFile

RFile iFile [protected]

TBool iFileOpen

TBool iFileOpen [protected]

RFs iFileSession

RFs iFileSession [protected]

TBool iFileSessionOpen

TBool iFileSessionOpen [protected]

TInt iGranularity

TInt iGranularity

TBool iModemSet

TBool iModemSet [protected]

TBuf8< 256 > iOurMessage

TBuf8 < 256 > iOurMessage

TBool iPortOpen

TBool iPortOpen [protected]

RFax::TProgress & iProgress

RFax::TProgress & iProgress

TCommConfig iRS232Settings

TCommConfig iRS232Settings [protected]

TBuf8< 1 > iReadone

TBuf8 < 1 > iReadone

TBuf8< KBufSize > iReceiveBuffer

TBuf8 < KBufSize > iReceiveBuffer

TRequestStatus iRecstat

TRequestStatus iRecstat [protected]

TBuf8< 1 > iSendone

TBuf8 < 1 > iSendone [protected]

TTime iStartTime

TTime iStartTime [protected]

TBool iTimingLoopDelay

TBool iTimingLoopDelay [protected]

TBuf8< KBufSize+16 > iTransmitBuffer

TBuf8 < KBufSize +16 > iTransmitBuffer

TRequestStatus iTranstat

TRequestStatus iTranstat [protected]

TInt iVerbose

TInt iVerbose