wlanutilities/wlansniffer/aiplugin/inc/wsfconnectactivewrapper.h
branchRCL_3
changeset 15 dff6ebfd236f
child 44 a9524956f6b5
equal deleted inserted replaced
8:c2bc3f8c7777 15:dff6ebfd236f
       
     1 /*
       
     2  * Copyright (c) 2007-2008 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:  Implementation of CWsfConnectActiveWrapper.
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef CWSFCONNECTACTIVEWRAPPER_H
       
    19 #define CWSFCONNECTACTIVEWRAPPER_H
       
    20 
       
    21 //  EXTERNAL INCLUDES
       
    22 #include <e32base.h>	
       
    23 
       
    24 //  INTERNAL INCLUDES
       
    25 #include "wsfaicontroller.h"
       
    26 #include "wsfcommon.h"
       
    27 
       
    28 //  FORWARD DECLARATIONS
       
    29 class CWsfModel;
       
    30 
       
    31 /**
       
    32  *  Active object that connects WLAN
       
    33  *
       
    34  *  @lib wsfaiplugin.lib
       
    35  *  @since S60 v5.2
       
    36  */
       
    37 class CWsfConnectActiveWrapper : public CActive
       
    38     {
       
    39 public:
       
    40     // Constructors and destructor
       
    41 
       
    42     /**
       
    43      * Destructor
       
    44      * @since S60 5.2     
       
    45      */
       
    46     ~CWsfConnectActiveWrapper();
       
    47 
       
    48     /**
       
    49      * Two-phased constructor.
       
    50      * @since S60 5.2     
       
    51      */
       
    52     static CWsfConnectActiveWrapper* NewL( CWsfModel* aModel );
       
    53 
       
    54     /**
       
    55      * Two-phased constructor.
       
    56      * @since S60 5.2     
       
    57      */
       
    58     static CWsfConnectActiveWrapper* NewLC( CWsfModel* aModel );
       
    59 
       
    60 public:
       
    61 
       
    62     /**
       
    63      * Function for making the initial request
       
    64      * @since S60 5.2     
       
    65      */
       
    66     void Start( TUint aIapID, TWsfIapPersistence aPersistence );
       
    67 
       
    68 private:
       
    69 
       
    70     /**
       
    71      * constructor
       
    72      */
       
    73     CWsfConnectActiveWrapper();
       
    74 
       
    75     /**
       
    76      * Factory function.
       
    77      * @since S60 5.2
       
    78      * @param aModel CWsfModel pointer
       
    79      */
       
    80     void ConstructL( CWsfModel* aModel );
       
    81 
       
    82 private:
       
    83     // From CActive
       
    84     /**
       
    85      * @see CActive
       
    86      */
       
    87     void RunL();
       
    88 
       
    89     /**
       
    90      * @see CActive
       
    91      */
       
    92     void DoCancel();
       
    93 
       
    94     /**
       
    95      * @see CActive
       
    96      */
       
    97     TInt RunError( TInt aError );
       
    98 
       
    99 private:
       
   100     /**
       
   101      * States of the active object
       
   102      */
       
   103     enum CWsfConnectActiveWrapperState
       
   104         {
       
   105         EUninitialized, // Uninitialized
       
   106         EInitialized, // Initalized
       
   107         EError
       
   108         // Error condition
       
   109         };
       
   110 
       
   111 private:
       
   112 
       
   113     /**
       
   114      * State of the active object
       
   115      */
       
   116     TInt iState; // State of the active object
       
   117 
       
   118     /**
       
   119      * Result
       
   120      */
       
   121     TPckgBuf<TBool> iPckg;
       
   122 
       
   123     /**
       
   124      * Reference to Model
       
   125      */
       
   126     CWsfModel* iModel;
       
   127     
       
   128     /**
       
   129      * IAP ID
       
   130      */
       
   131     TUint iIapID;
       
   132     
       
   133     /**
       
   134      * Persistence value of IAP
       
   135      */
       
   136     TWsfIapPersistence iPersistence;
       
   137 
       
   138     };
       
   139 
       
   140 #endif // CWSFCONNECTACTIVEWRAPPER_H