connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/WepWpaQueryDlg.cpp
changeset 1 40cb640ef159
parent 0 5a93021fdf25
child 41 bbb64eb3bdee
equal deleted inserted replaced
0:5a93021fdf25 1:40cb640ef159
    25 
    25 
    26 #include "WepWpaQueryDlg.h"
    26 #include "WepWpaQueryDlg.h"
    27 #include "EasyWepDlgNotif.h"
    27 #include "EasyWepDlgNotif.h"
    28 #include "EasyWpaDlgNotif.h"
    28 #include "EasyWpaDlgNotif.h"
    29 #include "ConnectionDialogsLogger.h"
    29 #include "ConnectionDialogsLogger.h"
       
    30 #include "ExpiryTimer.h"
    30 
    31 
    31 
    32 
    32 // CONSTANTS
    33 // CONSTANTS
    33 #if defined(_DEBUG)
    34 #if defined(_DEBUG)
    34 _LIT( KErrNullPointer, "NULL pointer" );
    35 _LIT( KErrNullPointer, "NULL pointer" );
    83 //
    84 //
    84 CWepWpaQueryDlg::~CWepWpaQueryDlg()
    85 CWepWpaQueryDlg::~CWepWpaQueryDlg()
    85     {
    86     {
    86     STATIC_CAST( CEikServAppUi*, 
    87     STATIC_CAST( CEikServAppUi*, 
    87                 CCoeEnv::Static()->AppUi() )->SuppressAppSwitching( EFalse );
    88                 CCoeEnv::Static()->AppUi() )->SuppressAppSwitching( EFalse );
       
    89     delete iExpiryTimer;
    88     }
    90     }
    89 
    91 
    90 
    92 
    91 // ---------------------------------------------------------
    93 // ---------------------------------------------------------
    92 // CWepWpaQueryDlg::PreLayoutDynInitL()
    94 // CWepWpaQueryDlg::PreLayoutDynInitL()
   270     DrawNow();
   272     DrawNow();
   271     return result;
   273     return result;
   272     }
   274     }
   273 
   275 
   274 // ---------------------------------------------------------
   276 // ---------------------------------------------------------
   275 // CWepWpaQueryDlg::NeedToDismissQueryL
   277 // CWepWpaQueryDlg::OfferKeyEventL
   276 // ---------------------------------------------------------
   278 // ---------------------------------------------------------
   277 //
   279 //
   278 TBool CWepWpaQueryDlg::NeedToDismissQueryL(const TKeyEvent& aKeyEvent)
   280 TKeyResponse CWepWpaQueryDlg::OfferKeyEventL( const TKeyEvent& aKeyEvent, 
   279     {
   281                                                  TEventCode aType)
   280     if (aKeyEvent.iCode == EKeyPhoneSend)
   282     {
       
   283     if( aType == EEventKey && aKeyEvent.iCode == EKeyPhoneSend )
   281         {
   284         {
   282         TryExitL(EEikBidCancel);
   285         // Let's not obscure the Dialer in the background
   283         return ETrue;
   286         if ( !iExpiryTimer )
       
   287             {
       
   288             iExpiryTimer = CExpiryTimer::NewL( *this );
       
   289             }
       
   290         else
       
   291             {
       
   292             iExpiryTimer->Cancel();
       
   293             }
       
   294         
       
   295         iExpiryTimer->StartShort();
   284         }
   296         }
   285         
   297     
   286     return EFalse;
   298     return CAknTextQueryDialog::OfferKeyEventL( aKeyEvent,aType ); 
       
   299     }
       
   300 
       
   301 void CWepWpaQueryDlg::HandleTimedOut()
       
   302     {
       
   303     TRAP_IGNORE( TryExitL( EAknSoftkeyCancel ) );
   287     }
   304     }
   288 
   305 
   289 // End of File
   306 // End of File