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