1 /* |
|
2 * Copyright (c) 2002 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: Message query dialog suitable for verifier plug-in use. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CLPDMESSAGEPLUGINDIALOG_H |
|
20 #define CLPDMESSAGEPLUGINDIALOG_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <aknmessagequerydialog.h> |
|
24 #include "lpdbkupevtobserver.h" |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class MLpdDlgObserver; |
|
28 class CLpdBkupEvtListenerAO; |
|
29 class MLpdBkupEvtObserver; |
|
30 |
|
31 // CLASS DECLARATION |
|
32 |
|
33 /** |
|
34 * A message query dialog suitable for verifier plug-in use. |
|
35 * Inherits from CAknMessageQueryDialog, utilizes MLpdDlgObserver |
|
36 * for notifying when dialog is dismissed. |
|
37 * |
|
38 * @lib locverifierdlg.lib |
|
39 * @since 2.1 |
|
40 */ |
|
41 class CLpdMessagePluginDialog : public CAknMessageQueryDialog, public MLpdBkupEvtObserver |
|
42 { |
|
43 public: // Constructors and destructor |
|
44 |
|
45 /** |
|
46 * Two-phased constructor. |
|
47 * @param aCallBack is notified when dialog is dismissed |
|
48 * @param aSelfPtr caller's ptr is set to null when dialog is deleted |
|
49 * @param aSelected will contain selected items when available, i.e. |
|
50 * since observer callback (in multiselectionlist) |
|
51 * @return created object |
|
52 */ |
|
53 static CLpdMessagePluginDialog* NewL( |
|
54 MLpdDlgObserver& aCallBack, |
|
55 CLpdMessagePluginDialog ** aSelfPtr |
|
56 ); |
|
57 |
|
58 |
|
59 /** |
|
60 * C++ destructor. |
|
61 */ |
|
62 virtual ~CLpdMessagePluginDialog(); |
|
63 |
|
64 public: // Functions from base classes |
|
65 |
|
66 /** |
|
67 * From CAknDialog. Wrapper method for enabling better unit testing |
|
68 * when using a stub implementation. |
|
69 * @param aResourceId |
|
70 */ |
|
71 void PrepareLC( TInt aResourceId ); |
|
72 |
|
73 /** |
|
74 * Wrapper that suppresses application switching |
|
75 * and call's base class RunLD(). |
|
76 */ |
|
77 TInt RunLD(); |
|
78 |
|
79 |
|
80 void HandleResourceChange(TInt aType); |
|
81 |
|
82 |
|
83 public: // New functions |
|
84 |
|
85 /** |
|
86 * Allows exiting the dialog without user action. |
|
87 * Can be called e.g. in case of timeout. Main reason for |
|
88 * this method is that deleting a dialog is not a proper |
|
89 * way to exit it. Calling this method causes |
|
90 * MLpdDlgObserver::HandleDlgDismissedL() callback with |
|
91 * EEikCmdExit result. |
|
92 */ |
|
93 void ExitDialogL(); |
|
94 |
|
95 /** |
|
96 * Similar as ExitDialogL(), but no callback method |
|
97 * is called. |
|
98 */ |
|
99 void ExitDialogQuietlyL(); |
|
100 |
|
101 protected: // Functions from base classes |
|
102 |
|
103 /** |
|
104 * From CAknListQueryDialog. |
|
105 * @param aButtonId |
|
106 * @return ETrue if dialog can be dismissed |
|
107 */ |
|
108 TBool OkToExitL(TInt aButtonId); |
|
109 |
|
110 private: // Constructors and destructor |
|
111 |
|
112 /** |
|
113 * Symbian 2nd Phase Constructor. |
|
114 */ |
|
115 void ConstructL(); |
|
116 |
|
117 /** |
|
118 * C++ constructor. |
|
119 * @param aCallBack is notified when dialog is dismissed |
|
120 * @param aSelfPtr caller's ptr is set to null when dialog is deleted |
|
121 * @param aSelected will contain selected items when available, i.e. |
|
122 * since observer callback (in multiselectionlist) |
|
123 */ |
|
124 CLpdMessagePluginDialog( |
|
125 MLpdDlgObserver& aCallBack, |
|
126 CLpdMessagePluginDialog ** aSelfPtr |
|
127 ); |
|
128 |
|
129 private: // Data |
|
130 |
|
131 // Object which is notified when query is dismissed |
|
132 MLpdDlgObserver& iCallBack; |
|
133 |
|
134 // Holds the status of application switching |
|
135 TBool iAppSwitchSuppressed; |
|
136 |
|
137 // Caller's pointer to this query object is set to NULL |
|
138 // when ExecuteLD destroys the object |
|
139 CLpdMessagePluginDialog** iSelfPtr; |
|
140 |
|
141 // Reference to the Backup Event Listener |
|
142 CLpdBkupEvtListenerAO* iBkupListener; |
|
143 |
|
144 }; |
|
145 |
|
146 #endif // CLPDMESSAGEPLUGINDIALOG_H |
|
147 |
|
148 // End of File |
|