voipplugins/dhcppositionprovider/inc/dhcpconnectionprogressnotifier.h
branchRCL_3
changeset 22 d38647835c2e
parent 0 a4daefaec16c
equal deleted inserted replaced
21:f742655b05bf 22:d38647835c2e
       
     1 /*
       
     2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Header file for connection progress notifier
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef DHCPCONNECTIONPROGRESSNOTIFIER_H_
       
    20 #define DHCPCONNECTIONPROGRESSNOTIFIER_H_
       
    21 
       
    22 #include <es_sock.h>
       
    23 #include "dhcpconnectionstateobserver.h"
       
    24 
       
    25 /**
       
    26 *  This class keep track connection progress.
       
    27 *
       
    28 *  @lib dhcppositionprovider.dll
       
    29 *  @since 3.2
       
    30 */
       
    31 class CDhcpConnectionProgressNotifier : public CActive
       
    32     {
       
    33     public:
       
    34 
       
    35         /**
       
    36          * Two-phased constructor
       
    37          *
       
    38          * @param aConnection   Reference to RConnection object, which hold information about
       
    39          *                      ongoing connection to the wlan access point
       
    40          * @since 3.2
       
    41          */
       
    42         static CDhcpConnectionProgressNotifier* NewL (RConnection& aConnection,
       
    43                 MDhcpConnectionStateObserver* aObserver);
       
    44 
       
    45         /*
       
    46         * Destructor
       
    47         *
       
    48         * @since S60 3.2
       
    49         */
       
    50         virtual ~CDhcpConnectionProgressNotifier();
       
    51 
       
    52     public:
       
    53 
       
    54         /*
       
    55          * Get current connection status
       
    56          *
       
    57          * @since S60 3.2
       
    58          */
       
    59         TInt    GetState();
       
    60 
       
    61     protected:
       
    62 
       
    63          /**
       
    64          * Cancellation of an outstanding request.
       
    65          *
       
    66          * @since S60 3.2
       
    67          */
       
    68          void DoCancel ();
       
    69 
       
    70          /**
       
    71          * Handles an active object's request completion event.
       
    72          *
       
    73          * @since S60 3.2
       
    74          */
       
    75          void RunL ();
       
    76 
       
    77     private:
       
    78 
       
    79         /**
       
    80          * C++ constructor
       
    81          *
       
    82          * @since S60 3.2
       
    83          */
       
    84         CDhcpConnectionProgressNotifier (RConnection& aConnection,
       
    85                 MDhcpConnectionStateObserver* aObserver);
       
    86 
       
    87         /**
       
    88          * Contructor which can leave
       
    89          *
       
    90          * @since S60 3.2
       
    91          */
       
    92          void ConstructL ();
       
    93 
       
    94     private:
       
    95         // Member variables
       
    96         RConnection& iConnection;
       
    97         MDhcpConnectionStateObserver* iObserver;
       
    98         TNifProgressBuf iProgress;
       
    99         TInt iState;
       
   100 
       
   101     };
       
   102 
       
   103 #endif  // DHCPCONNECTIONPROGRESSNOTIFIER_H_