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