Symbian3/SDK/Source/GUID-FCCE497D-1DA8-544B-A973-831E97DB5569.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Tue, 20 Jul 2010 12:00:49 +0100
changeset 13 48780e181b38
parent 7 51a74ef9ed63
permissions -rw-r--r--
Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.

<?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 id="GUID-FCCE497D-1DA8-544B-A973-831E97DB5569" xml:lang="en"><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 id="GUID-86274FA4-585F-4EC6-ACF6-281539ADBA95"><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 id="GUID-0190289E-A85C-4648-BA1E-0C99BB3FC0B4"><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>
</conbody></concept>