![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
EPOC Release 5 introduces support for indicating to an application the progress of a dial-up connection. This is useful because the process of dialling an ISP, logging in and starting network protocols can be quite lengthy taking up to a minute in some cases.
The Network Interface Manager provides an API through its RNif base class through which an application can interrogate it for the current stage of the dial-up connection. In addition, the application can also get the last error which occurred in setting up the connection.
NetDial, the EPOC dial-up networking susbsystem, is an agent of the Network Interface Manager (NifMan) and keeps track of its progress in establishing a connection and any errors which have occurred.
In general, progress information is not restricted to dial-up connections, but is also available for direct connections, callback connections and dial-in connections.
For more information on the Network Interface Manager, see the EPOC Communications Technical Paper.
An application can ask to be informed when a change in the state of a dial-up connection occurs.
The request which the application makes is an asynchronous request, i.e. it is one which completes at some later time.
To do this, an application calls the ProgressNotification() member function of RNif. In practice, the class involved is one derived from RNif; for example, RNetDial, if the agent is NetDial.
The function takes a TRequestStatus object, as is usual with asynchronous requests, and a package buffer, a TNifProgressBuf (which packages a TNifProgress object).
When the request completes, the iStage data member of the TNifProgress object contains the information defining the current state of the connection.
An outstanding request for notification can be cancelled using the CancelProgressNotification() member function of RNif.
In practice, an application would package this functionality as an active object.
An application can ask for the current state of a dial-up connection. This is a conventional synchronous function which just fetches the current state.
To do this, an application simply calls the Progress() member function of RNif, passing it a TNifProgress object. On return, the iStage data member of the TNifProgress object contains the information defining the current state of the connection.
An application can ask for the last error which occurred in setting up the connection by calling the LastProgressError() member function of RNif, passing it a TNifProgress object. On return, the iError data member of the TNifProgress object contains information on the last error which occurred.
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |