wlansecuritysettings/wifiprotectedsetup/pluginsrc/wifiprotconfirmationnotedlg.cpp
branchRCL_3
changeset 46 c74b3d9f6b9e
equal deleted inserted replaced
45:bad0cc58d154 46:c74b3d9f6b9e
       
     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: Implementation of class CWiFiProtConfirmationNoteDlg.
       
    15 *
       
    16 */
       
    17 
       
    18 /*
       
    19 * %version: tr1cfwln#6 %
       
    20 */
       
    21 
       
    22 // INCLUDE FILES
       
    23 //system includes
       
    24 #include <uikon/eiksrvui.h>
       
    25 
       
    26 //user includes
       
    27 #include "wifiprotconfirmationnotedlg.h"
       
    28 #include "wifiprotdlgsplugin.h"
       
    29 #include "wifiprotplugin.hrh"
       
    30 
       
    31 // ========================== MEMBER FUNCTIONS ==============================
       
    32 //
       
    33 // --------------------------------------------------------------------------
       
    34 // CWiFiProtConfirmationNoteDlg::CWiFiProtConfirmationNoteDlg
       
    35 // --------------------------------------------------------------------------
       
    36 //
       
    37 CWiFiProtConfirmationNoteDlg::CWiFiProtConfirmationNoteDlg(
       
    38                                                    TRequestStatus& aStatus ):
       
    39                                                     iRequestStatus( aStatus )
       
    40     {
       
    41     iRequestStatus = KRequestPending;
       
    42     }
       
    43     
       
    44     
       
    45 // --------------------------------------------------------------------------
       
    46 // CWiFiProtConfirmationNoteDlg::~CWiFiProtConfirmationNoteDlg
       
    47 // --------------------------------------------------------------------------
       
    48 //
       
    49 CWiFiProtConfirmationNoteDlg::~CWiFiProtConfirmationNoteDlg()
       
    50     {
       
    51     STATIC_CAST( CEikServAppUi*, 
       
    52                 CCoeEnv::Static()->AppUi() )->SuppressAppSwitching( EFalse );
       
    53     }
       
    54 
       
    55 // --------------------------------------------------------------------------
       
    56 // CWiFiProtInitiateEasySetupDlg::ProcessCommandL()
       
    57 // --------------------------------------------------------------------------
       
    58 //    
       
    59 void CWiFiProtConfirmationNoteDlg::ProcessCommandL( TInt aCommandId )
       
    60     {
       
    61     switch ( aCommandId )
       
    62         {
       
    63         case EWiFiSoftkeyContinue: //should use callback but it doesn't work
       
    64             {
       
    65             TryExitL(aCommandId);           
       
    66             break;              
       
    67             }
       
    68         default:
       
    69             {
       
    70             CAknQueryDialog::ProcessCommandL( aCommandId );
       
    71             break;
       
    72             }
       
    73         }    
       
    74     }
       
    75 
       
    76 // --------------------------------------------------------------------------
       
    77 // CWiFiProtConfirmationNoteDlg::OkToExitL
       
    78 // --------------------------------------------------------------------------
       
    79 //
       
    80 TBool CWiFiProtConfirmationNoteDlg::OkToExitL( TInt aButtonId )
       
    81     {
       
    82     TInt status = KErrCancel;
       
    83     if (aButtonId == EAknSoftkeyOk
       
    84          || aButtonId == EAknSoftkeyYes
       
    85          || aButtonId == EAknSoftkeyDone 
       
    86          || aButtonId == EWiFiSoftkeyContinue )
       
    87         {
       
    88         status = KErrNone;
       
    89         }
       
    90     else if ( aButtonId == EAknSoftkeyNo )
       
    91         {
       
    92         status = KErrCancel; // no selected
       
    93         }
       
    94     else
       
    95         {
       
    96         status = KErrAbort; // end key pressed
       
    97         }
       
    98      
       
    99     TRequestStatus* pS = &iRequestStatus;                
       
   100     User::RequestComplete( pS, status ); 
       
   101     return ETrue;
       
   102     }
       
   103     
       
   104     
       
   105 // --------------------------------------------------------------------------
       
   106 // CWiFiProtConfirmationNoteDlg::PreLayoutDynInitL()
       
   107 // --------------------------------------------------------------------------
       
   108 //
       
   109 void CWiFiProtConfirmationNoteDlg::PreLayoutDynInitL()
       
   110     {
       
   111     CAknQueryDialog::PreLayoutDynInitL();
       
   112     STATIC_CAST( CEikServAppUi*, 
       
   113                 CCoeEnv::Static()->AppUi() )->SuppressAppSwitching( ETrue );
       
   114     }
       
   115 
       
   116 
       
   117 // End of File