wlansecuritysettings/wlaneapsettingsui/pap/notifierui/src/papchallengemsgdialog.cpp
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: Implementation of PAP Challenge Message Display Dialog
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include "papnotifdlgplugin.h"
       
    21 #include "papchallengemsgdialog.h"
       
    22 
       
    23 
       
    24 // -----------------------------------------------------------------------------
       
    25 // CPapChallengeMsgDialog::CPapChallengeMsgDialog
       
    26 // -----------------------------------------------------------------------------
       
    27 //
       
    28 CPapChallengeMsgDialog::CPapChallengeMsgDialog( CPapNotifDialogPlugin* aPlugin )
       
    29 : CAknMessageQueryDialog( ENoTone ), 
       
    30   iPlugin( aPlugin )
       
    31     {
       
    32     }
       
    33 
       
    34 
       
    35 // -----------------------------------------------------------------------------
       
    36 // CPapChallengeMsgDialog::~CPapChallengeMsgDialog
       
    37 // -----------------------------------------------------------------------------
       
    38 //
       
    39 CPapChallengeMsgDialog::~CPapChallengeMsgDialog()
       
    40     {
       
    41     }
       
    42 
       
    43 
       
    44 // -----------------------------------------------------------------------------
       
    45 // CPapChallengeMsgDialog::NewL
       
    46 // -----------------------------------------------------------------------------
       
    47 //
       
    48 CPapChallengeMsgDialog* CPapChallengeMsgDialog::NewL( const TDesC& aMessage, 
       
    49                                                     CPapNotifDialogPlugin* aPlugin )
       
    50     {
       
    51     CPapChallengeMsgDialog* self = new( ELeave ) CPapChallengeMsgDialog( aPlugin );
       
    52 
       
    53     CleanupStack::PushL( self );
       
    54     if ( aMessage.Length() )
       
    55         {
       
    56         self->SetMessageTextL( aMessage );
       
    57         }
       
    58 
       
    59     CleanupStack::Pop( self );
       
    60     return self;
       
    61     }
       
    62 
       
    63 
       
    64 // -----------------------------------------------------------------------------
       
    65 // CPapChallengeMsgDialog::OkToExitL
       
    66 // -----------------------------------------------------------------------------
       
    67 //
       
    68 TBool CPapChallengeMsgDialog::OkToExitL( TInt aButtonId )
       
    69     {
       
    70     if ( CAknMessageQueryDialog::OkToExitL( aButtonId ) )
       
    71         {
       
    72         if ( aButtonId == EAknSoftkeyOk )
       
    73             {
       
    74             #if defined( _DEBUG ) || defined( DEBUG )
       
    75                 RDebug::Print(_L("CPapChallengeMsgDialog::OkToExitL, softkey OK") );
       
    76             #endif
       
    77             iPlugin->SetChallengeMsgDismissed();
       
    78             iPlugin->CompleteL( KErrNone );
       
    79             }
       
    80         else
       
    81             {
       
    82             #if defined( _DEBUG ) || defined( DEBUG )
       
    83                 RDebug::Print(_L("CPapChallengeMsgDialog::OkToExitL, softkey Cancel") );
       
    84             #endif
       
    85             // Some cancel.
       
    86             iPlugin->SetChallengeMsgDismissed();
       
    87             iPlugin->CompleteL( KErrCancel );
       
    88             }
       
    89 
       
    90         return( ETrue );
       
    91         }
       
    92 
       
    93     return( EFalse ); 
       
    94     }
       
    95 
       
    96 
       
    97 // -----------------------------------------------------------------------------
       
    98 // CPapChallengeMsgDialog::HandleResourceChange
       
    99 // -----------------------------------------------------------------------------
       
   100 //
       
   101 void CPapChallengeMsgDialog::HandleResourceChange( TInt aType )
       
   102     {
       
   103     CAknMessageQueryDialog::HandleResourceChange( aType );
       
   104     if ( aType == KAknsMessageSkinChange )
       
   105         {
       
   106         }
       
   107     }
       
   108 
       
   109 
       
   110 // End of File