|
1 /* |
|
2 * Copyright (c) 2005-2007 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 "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: Phonebook 2 select field dialog for assign service. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CPBK2ASSIGNSELECTFIELDDLG_H |
|
20 #define CPBK2ASSIGNSELECTFIELDDLG_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <MPbk2KeyEventHandler.h> |
|
25 #include <MPbk2DialogEliminator.h> |
|
26 #include <babitflags.h> |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class MPbk2ExitCallback; |
|
30 class MPbk2SelectFieldProperty; |
|
31 class CPbk2KeyEventDealer; |
|
32 |
|
33 // CLASS DECLARATION |
|
34 |
|
35 /** |
|
36 * Phonebook 2 select field dialog for assign service. |
|
37 * Responsible for driving the given field property selector. |
|
38 */ |
|
39 class CPbk2AssignSelectFieldDlg : public CBase, |
|
40 public MPbk2DialogEliminator, |
|
41 private MPbk2KeyEventHandler |
|
42 |
|
43 { |
|
44 public: // Construction and destruction |
|
45 |
|
46 /** |
|
47 * Creates a new instance of this class. |
|
48 * |
|
49 * @param aExitCallback Exit callback. |
|
50 * @return A new instance of this class. |
|
51 */ |
|
52 static CPbk2AssignSelectFieldDlg* NewL( |
|
53 MPbk2ExitCallback& aExitCallback ); |
|
54 |
|
55 /** |
|
56 * Destructor. |
|
57 */ |
|
58 ~CPbk2AssignSelectFieldDlg(); |
|
59 |
|
60 public: // Interface |
|
61 |
|
62 /** |
|
63 * Executes the dialog. |
|
64 * |
|
65 * @param aProperty Field property selector. |
|
66 * @return Error code. |
|
67 * @see MPbk2SelectFieldProperty::ExecuteL |
|
68 */ |
|
69 TInt ExecuteLD( |
|
70 MPbk2SelectFieldProperty& aProperty ); |
|
71 |
|
72 public: // From MPbk2DialogEliminator |
|
73 void RequestExitL( |
|
74 TInt aCommandId ); |
|
75 void ForceExit(); |
|
76 void ResetWhenDestroyed( |
|
77 MPbk2DialogEliminator** aSelfPtr ); |
|
78 |
|
79 public: // From MPbk2KeyEventHandler |
|
80 TBool Pbk2ProcessKeyEventL( |
|
81 const TKeyEvent& aKeyEvent, |
|
82 TEventCode aType ); |
|
83 |
|
84 private: // Implementation |
|
85 CPbk2AssignSelectFieldDlg( |
|
86 MPbk2ExitCallback& aExitCallback ); |
|
87 void ConstructL(); |
|
88 void ExitApplication( |
|
89 TInt aCommandId ); |
|
90 |
|
91 private: // Data types |
|
92 /** |
|
93 * Exit parameter flags |
|
94 */ |
|
95 enum TExitState |
|
96 { |
|
97 EAbortOrdered, |
|
98 EAbortApproved |
|
99 }; |
|
100 |
|
101 private: // Data |
|
102 /// Own: For checking is this destroyed |
|
103 TBool* iDestroyedPtr; |
|
104 /// Own: Exit handling |
|
105 TBitFlags8 iExitRecord; |
|
106 /// Ref: Exit callback |
|
107 MPbk2ExitCallback& iExitCallback; |
|
108 /// Ref: Set to NULL when this dialog is destroyed |
|
109 MPbk2DialogEliminator** iSelfPtr; |
|
110 /// Own: Key event dealer |
|
111 CPbk2KeyEventDealer* iDealer; |
|
112 /// Ref: Field property selector |
|
113 MPbk2SelectFieldProperty* iProperty; |
|
114 }; |
|
115 |
|
116 #endif // CPBK2ASSIGNSELECTFIELDDLG_H |
|
117 |
|
118 // End of File |