7 Nokia Corporation - initial contribution. |
7 Nokia Corporation - initial contribution. |
8 Contributors: |
8 Contributors: |
9 --> |
9 --> |
10 <!DOCTYPE concept |
10 <!DOCTYPE concept |
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
12 <concept xml:lang="en" id="GUID-FCCE497D-1DA8-544B-A973-831E97DB5569"><title> Monitoring Dial-up connection stages: Tutorial</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>This tutorial describes how an application can monitor the stages of a dial-up connection. </p> <p>This tutorial has two parts. The first part describes how the application can ask for the current state of a dial-up connection. The second part describes how the application can be notified of changes in the state of a dial-up connection. </p> <section><title>How to ask for the current state of a dial-up |
12 <concept id="GUID-FCCE497D-1DA8-544B-A973-831E97DB5569" xml:lang="en"><title> Monitoring |
13 connection</title> <p>To ask for the current state of a dial-up connection, an application calls the <xref href="GUID-BED8A733-2ED7-31AD-A911-C1F4707C67FD.dita#GUID-BED8A733-2ED7-31AD-A911-C1F4707C67FD/GUID-E2FAF324-3011-35ED-B31E-57E4F5CDE46A"><apiname>RConnection::Progress()</apiname></xref> function passing in a <codeph>TNifProgress</codeph> object. On return, the <codeph>iStage</codeph> data member of the <codeph>TNifProgress</codeph> object contains the information that defines the current state of the connection. </p> </section> <section><title>How to be notified of changes in the state of a dial-up |
13 Dial-up connection stages: Tutorial</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
14 connection</title> <p>The request that the application makes is an <keyword>asynchronous request</keyword>. An asynchronous request is not guaranteed to complete at the time of the return of the function call. </p> <p>To make the request, an application calls the <xref href="GUID-BED8A733-2ED7-31AD-A911-C1F4707C67FD.dita#GUID-BED8A733-2ED7-31AD-A911-C1F4707C67FD/GUID-96DC395D-B5EE-3F26-8EFC-52E7AF64ED93"><apiname>RConnection::ProgressNotification()</apiname></xref> function. </p> <p>The function takes a <codeph>TRequestStatus</codeph> object, as is the model with asynchronous requests, and the <xref href="GUID-D8F0728B-D4D7-36C3-A858-0D5155841C46.dita"><apiname>TNifProgressBuf</apiname></xref> package buffer which packages a <codeph>TNifProgress</codeph> object. </p> <p>When the request completes, the <codeph>iStage</codeph> data member of the <codeph>TNifProgress</codeph> object contains the information defining the current state of the connection. </p> <p>An outstanding request for notification can be cancelled using the <xref href="GUID-BED8A733-2ED7-31AD-A911-C1F4707C67FD.dita#GUID-BED8A733-2ED7-31AD-A911-C1F4707C67FD/GUID-6D2335FD-EDA1-3C60-AA9C-E7BADA0FA5B1"><apiname>RConnection::CancelProgressNotification()</apiname></xref> <codeph/>member function of <xref href="GUID-BED8A733-2ED7-31AD-A911-C1F4707C67FD.dita"><apiname>RConnection</apiname></xref>. </p> <p>We recommend that an application package this functionality as an active object. </p> </section> <section><title>Historical Note</title> <p>Prior to Symbian OS v7.0S, the <codeph>Progress()</codeph>, <codeph>ProgressNotification()</codeph> and <codeph>CancelProgressNotification()</codeph> member functions of <codeph>RNif</codeph> were called instead of the <codeph>Progress()</codeph>, <codeph>ProgressNotification()</codeph> and <codeph>CancelProgressNotification()</codeph> member functions of <xref href="GUID-BED8A733-2ED7-31AD-A911-C1F4707C67FD.dita"><apiname>RConnection</apiname></xref>. </p> </section> </conbody></concept> |
14 <p>This tutorial describes how an application can monitor the stages of a |
|
15 dial-up connection. </p> |
|
16 <p>This tutorial has two parts. The first part describes how the application |
|
17 can ask for the current state of a dial-up connection. The second part describes |
|
18 how the application can be notified of changes in the state of a dial-up connection. </p> |
|
19 <section id="GUID-86274FA4-585F-4EC6-ACF6-281539ADBA95"><title>How to ask for the current state of a dial-up connection</title> <p>To |
|
20 ask for the current state of a dial-up connection, an application calls the <xref href="GUID-BED8A733-2ED7-31AD-A911-C1F4707C67FD.dita#GUID-BED8A733-2ED7-31AD-A911-C1F4707C67FD/GUID-E2FAF324-3011-35ED-B31E-57E4F5CDE46A"><apiname>RConnection::Progress()</apiname></xref> function |
|
21 passing in a <codeph>TNifProgress</codeph> object. On return, the <codeph>iStage</codeph> data |
|
22 member of the <codeph>TNifProgress</codeph> object contains the information |
|
23 that defines the current state of the connection. </p> </section> |
|
24 <section id="GUID-0190289E-A85C-4648-BA1E-0C99BB3FC0B4"><title>How to be notified of changes in the state of a dial-up |
|
25 connection</title> <p>The request that the application makes is an <keyword>asynchronous |
|
26 request</keyword>. An asynchronous request is not guaranteed to complete at |
|
27 the time of the return of the function call. </p> <p>To make the request, |
|
28 an application calls the <xref href="GUID-BED8A733-2ED7-31AD-A911-C1F4707C67FD.dita#GUID-BED8A733-2ED7-31AD-A911-C1F4707C67FD/GUID-96DC395D-B5EE-3F26-8EFC-52E7AF64ED93"><apiname>RConnection::ProgressNotification()</apiname></xref> function. </p> <p>The |
|
29 function takes a <codeph>TRequestStatus</codeph> object, as is the model with |
|
30 asynchronous requests, and the <xref href="GUID-D8F0728B-D4D7-36C3-A858-0D5155841C46.dita"><apiname>TNifProgressBuf</apiname></xref> package |
|
31 buffer which packages a <codeph>TNifProgress</codeph> object. </p> <p>When |
|
32 the request completes, the <codeph>iStage</codeph> data member of the <codeph>TNifProgress</codeph> object |
|
33 contains the information defining the current state of the connection. </p> <p>An |
|
34 outstanding request for notification can be cancelled using the <xref href="GUID-BED8A733-2ED7-31AD-A911-C1F4707C67FD.dita#GUID-BED8A733-2ED7-31AD-A911-C1F4707C67FD/GUID-6D2335FD-EDA1-3C60-AA9C-E7BADA0FA5B1"><apiname>RConnection::CancelProgressNotification()</apiname></xref> <codeph/>member |
|
35 function of <xref href="GUID-BED8A733-2ED7-31AD-A911-C1F4707C67FD.dita"><apiname>RConnection</apiname></xref>. </p> <p>We recommend that an application |
|
36 package this functionality as an active object. </p> </section> |
|
37 </conbody></concept> |