wlansecuritysettings/wlaneapsettingsui/pap/configui/src/papuipwsettingitem.cpp
branchRCL_3
changeset 19 c74b3d9f6b9e
equal deleted inserted replaced
18:bad0cc58d154 19: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 UI password setting item
       
    15 *
       
    16 */
       
    17 
       
    18 /*
       
    19 * %version: 5 %
       
    20 */
       
    21 
       
    22 // INCLUDE FILES
       
    23 #include "papuipwsettingitem.h"
       
    24 #include "papuisettingarray.h"
       
    25 #include <aknsettingitemlist.h>
       
    26 
       
    27 
       
    28 // ============================ MEMBER FUNCTIONS ===============================
       
    29 
       
    30 // -----------------------------------------------------------------------------
       
    31 // CPapUiPwSettingItem::CPapUiPwSettingItem
       
    32 // -----------------------------------------------------------------------------
       
    33 //
       
    34 CPapUiPwSettingItem::CPapUiPwSettingItem( TInt aIdentifier,
       
    35             enum TAknPasswordSettingItemMode aMode,
       
    36             TDes &aPassword,
       
    37             CPapSettingItemArray* aParent )
       
    38     : CAknPasswordSettingItem( aIdentifier, aMode, aPassword ),
       
    39       iParent ( aParent )
       
    40     {    
       
    41     }
       
    42 
       
    43  
       
    44 
       
    45 // -----------------------------------------------------------------------------
       
    46 // CPapUiPwSettingItem::~CPapUiPwSettingItem
       
    47 // -----------------------------------------------------------------------------
       
    48 //
       
    49 CPapUiPwSettingItem::~CPapUiPwSettingItem()
       
    50     {
       
    51     }
       
    52 
       
    53 
       
    54 // ---------------------------------------------------------
       
    55 // CPapUiPwSettingItem::HandleSettingPageEventL
       
    56 // ---------------------------------------------------------
       
    57 //
       
    58 void CPapUiPwSettingItem::HandleSettingPageEventL(
       
    59     CAknSettingPage * /*aSettingPage*/, TAknSettingPageEvent aEventType )
       
    60     {
       
    61     #if defined(_DEBUG) || defined(DEBUG)
       
    62     RDebug::Print(_L("CPapUiPwSettingItem::HandleSettingPageEventL, event = %d"),
       
    63         aEventType );
       
    64     #endif
       
    65 
       
    66     switch ( aEventType )
       
    67         {
       
    68         case EEventSettingCancelled:
       
    69             {
       
    70             iParent->PwItemCancelled( ETrue );
       
    71             break;
       
    72             }
       
    73         
       
    74         case EEventSettingChanged:             
       
    75         case EEventSettingOked:
       
    76             {
       
    77             iParent->PwItemCancelled( EFalse );            
       
    78             break;
       
    79             }
       
    80 
       
    81         default:
       
    82             {
       
    83             break;
       
    84             };
       
    85         };
       
    86     }
       
    87     
       
    88 // ---------------------------------------------------------
       
    89 // CPapUiPwSettingItem::DeletePasswordL
       
    90 // ---------------------------------------------------------
       
    91 //
       
    92 void CPapUiPwSettingItem::DeletePasswordL()
       
    93     {
       
    94     TPtr ptr = InternalTextPtr();
       
    95     ptr.Copy( KNullDesC );
       
    96     StoreL();
       
    97     }
       
    98 
       
    99 //  End of File