wlansecuritysettings/wifiprotectedsetup/inc/wifiprotactiveresp.h
changeset 0 c8830336c852
child 2 1c7bc153c08e
equal deleted inserted replaced
-1:000000000000 0:c8830336c852
       
     1 /*
       
     2 * Copyright (c) 2001-2009 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 the License "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: CWiFiProtActiveResp class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_WIFIPROTACTIVERESP_H
       
    21 #define C_WIFIPROTACTIVERESP_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32base.h>
       
    25 #include "wifiparams.h"
       
    26 
       
    27 // CLASS DECLARATION
       
    28 
       
    29 /**
       
    30 * ActiveObject for asynchronous operations
       
    31 */
       
    32 NONSHARABLE_CLASS( CWiFiProtActiveResp ) : public CActive
       
    33     {
       
    34     public:  // Constructors and destructor
       
    35         /**
       
    36         * Two-phased constructor.
       
    37         * @param aSSid contains SSid of the network we want to configure 
       
    38         * @param aConnectionNeeded ETrue if we need a connection
       
    39         * via the configured network 
       
    40         * @param aUidsReturned uids of the configured connection methods
       
    41         * @param aReturnValue - possible return values are ok, cancel
       
    42         * process and not use 
       
    43         * protected setup (No Automatic Setup).
       
    44         */
       
    45         static CWiFiProtActiveResp* NewL(   const TWlanSsid& aSSid,
       
    46              TBool aConnectionNeeded, RArray<TUint32>& aUidsReturned, 
       
    47              WiFiProt::TWiFiReturn& aReturnValue );
       
    48              
       
    49         /**
       
    50         * Two-phased constructor.
       
    51         * @param aSSid contains SSid of the network we want to configure 
       
    52         * via the configured network 
       
    53         * @param aNetworkSettings the configured network settings
       
    54         * to be returned
       
    55         * @param aReturnValue - possible return values are ok, cancel
       
    56         * process and not use 
       
    57         * protected setup (No Automatic Setup).
       
    58         */
       
    59         static CWiFiProtActiveResp* NewL(   const TWlanSsid& aSSid,
       
    60              TWlanProtectedSetupCredentialAttribute& aNetworkSettings, 
       
    61              WiFiProt::TWiFiReturn& aReturnValue );             
       
    62 
       
    63         /**
       
    64         * Destructor.
       
    65         */
       
    66         virtual ~CWiFiProtActiveResp();
       
    67 
       
    68     public: // From base class
       
    69         /**
       
    70         * This function is called when the scheduled function ends.
       
    71         */
       
    72         void RunL();
       
    73 
       
    74         /**
       
    75         * Cancel operations.
       
    76         */
       
    77         void DoCancel();
       
    78 
       
    79 
       
    80     public: // New functions
       
    81         /**
       
    82         * Add this class on the ActiveScheduler and puts itself active.
       
    83         * @param aStatus The status that is checked by the caller of the 
       
    84         *                Authenticate dialog.
       
    85         */
       
    86         void Observe( TRequestStatus &aStatus );
       
    87 
       
    88         /**
       
    89         * Returns the TWiFiInputParams 
       
    90         * @return A pointer to iWiFiInputParams.
       
    91         */
       
    92         TPckgBuf<WiFiProt::TWiFiInputParams>* InputBuffer();
       
    93 
       
    94         /**
       
    95         * Returns the TWiFiOutputParams 
       
    96         * @return A pointer to iWiFiOutputParams.
       
    97         */
       
    98         TPckgBuf<WiFiProt::TWiFiOutputParams>* OutputBuffer();
       
    99         
       
   100         /**
       
   101         * Returns the TWiFiConnOutputParams 
       
   102         * @return A pointer to iConnWiFiOutputParams.
       
   103         */
       
   104         TPckgBuf<WiFiProt::TWiFiConnOutputParams>* ConnOutputBuffer();         
       
   105 
       
   106     private:
       
   107         /**
       
   108         * C++ default constructor.
       
   109         * @param aSSid contains SSid of the network we want to configure 
       
   110         * @param aConnectionNeeded ETrue if we need a connection via the
       
   111         * configured network 
       
   112         * @param aUidsReturned uids of the configured connection methods
       
   113         * @param aReturnValue - possible return values are ok, cancel
       
   114         * process and not use 
       
   115         * protected setup (No Automatic Setup).
       
   116         */
       
   117         CWiFiProtActiveResp(   const TWlanSsid& aSSid,
       
   118              TBool aConnectionNeeded, RArray<TUint32>& aUidsReturned,
       
   119              WiFiProt::TWiFiReturn& aReturnValue );
       
   120              
       
   121         /**
       
   122         * C++ default constructor.
       
   123         * @param aSSid contains SSid of the network we want to configure 
       
   124         * @param aNetworkSettings network settings to be returned
       
   125         * @param aReturnValue - possible return values are ok, cancel
       
   126         * process and not use 
       
   127         * protected setup (No Automatic Setup).
       
   128         */
       
   129         CWiFiProtActiveResp(   const TWlanSsid& aSSid,
       
   130              TWlanProtectedSetupCredentialAttribute& aNetworkSettings,
       
   131              WiFiProt::TWiFiReturn& aReturnValue );
       
   132         /**
       
   133         * By default Symbian 2nd phase constructor is private.
       
   134         */
       
   135         void ConstructL( );
       
   136 
       
   137     private:    // Data
       
   138         // The status that is checked by the caller of the Wi-Fi
       
   139         // Protected Setup ui. Not owned.
       
   140         TRequestStatus* iRequestStatus;    
       
   141 
       
   142         // The address of the area where the caller of the Wi-Fi
       
   143         // Protected Setup ui expects the value for iap list. Not owned.
       
   144         RArray<TUint32>* iIapIds;
       
   145         
       
   146         //Contains the return value passed to the client
       
   147         WiFiProt::TWiFiReturn& iReturnValue;
       
   148 
       
   149         // Packed buffer containing Wi-Fi Protected Setup output parameters.
       
   150         TPckgBuf<WiFiProt::TWiFiOutputParams> iWiFiOutputParams;
       
   151         // Packed buffer containing Wi-Fi Protected Setup input parameters.
       
   152         TPckgBuf<WiFiProt::TWiFiInputParams> iWiFiInputParams;
       
   153         // Packed buffer containing Wi-Fi Protected Setup output parameters
       
   154         // for connection creation mode.
       
   155         TPckgBuf<WiFiProt::TWiFiConnOutputParams> iWiFiConnOutputParams;
       
   156         // network settings to be returned
       
   157         // used only for connection creation
       
   158         TWlanProtectedSetupCredentialAttribute* iNetworkSettings;
       
   159     };
       
   160 
       
   161 
       
   162 #endif //C_WIFIPROTACTIVERESP_H
       
   163 
       
   164 // End of File