Symbian3/SDK/Source/GUID-FCCE497D-1DA8-544B-A973-831E97DB5569.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Thu, 21 Jan 2010 18:18:20 +0000
changeset 0 89d6a7a84779
permissions -rw-r--r--
Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<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
          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
          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>