|
1 /* |
|
2 * Copyright (c) 2006 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: Wait note view class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_CMPXWAITNOTEPLUGIN_H |
|
20 #define C_CMPXWAITNOTEPLUGIN_H |
|
21 |
|
22 // Includes |
|
23 #include <aknnotedialog.h> |
|
24 #include <mpxviewplugin.h> |
|
25 #include "mpxwaitnoteobserver.h" |
|
26 |
|
27 // FOWARD DECLARATIONS |
|
28 class CMPXWaitNoteDialog; |
|
29 /** |
|
30 * Wait note plugin |
|
31 * |
|
32 * @lib mpxwaitnoteplugin.lib |
|
33 * @since S60 3.1 |
|
34 */ |
|
35 NONSHARABLE_CLASS( CMPXWaitNoteDialogPlugin ) : public CMPXViewPlugin, |
|
36 public MMPXWaitNoteObserver |
|
37 { |
|
38 |
|
39 public: |
|
40 |
|
41 /** |
|
42 * Two-phased constructor. |
|
43 * |
|
44 * @since 3.0 |
|
45 * @return Pointer to newly created object. |
|
46 */ |
|
47 static CMPXWaitNoteDialogPlugin* NewL(); |
|
48 |
|
49 /** |
|
50 * Destructor. |
|
51 */ |
|
52 virtual ~CMPXWaitNoteDialogPlugin(); |
|
53 |
|
54 protected: |
|
55 |
|
56 /** |
|
57 * From CMPXViewPlugin |
|
58 * Interface method to create view. |
|
59 * |
|
60 * @since S60 v3.0 |
|
61 */ |
|
62 void CreateViewL(); |
|
63 |
|
64 /** |
|
65 * From CMPXViewPlugin |
|
66 * Interface method to destroy view. |
|
67 * |
|
68 * @since S60 v3.0 |
|
69 */ |
|
70 void DestroyView(); |
|
71 |
|
72 /** |
|
73 * From CMPXViewPlugin |
|
74 * Interface method to activate view. |
|
75 * |
|
76 * @since S60 v3.0 |
|
77 * @param aParam Parameter required to activate the view. |
|
78 */ |
|
79 void ActivateViewL( const TDesC* aParam = NULL ); |
|
80 |
|
81 /** |
|
82 * From CMPXViewPlugin |
|
83 * Interface method to activate as default view, will not |
|
84 * bring to foreground. |
|
85 * |
|
86 * @since S60 v3.0 |
|
87 */ |
|
88 void SetAsDefaultViewL(); |
|
89 |
|
90 /** |
|
91 * From CMPXViewPlugin |
|
92 * Interface method to deactivate view. |
|
93 * |
|
94 * @since S60 v3.0 |
|
95 */ |
|
96 void DeactivateView(); |
|
97 |
|
98 protected: |
|
99 |
|
100 /** |
|
101 * From MMPXWaitNoteObserver |
|
102 */ |
|
103 void HandleWaitNoteDismissedL(); |
|
104 |
|
105 /** |
|
106 * From MMPXWaitNoteOberserver |
|
107 * Get pointer to the note dialog. |
|
108 * |
|
109 * @param aNoteDialog Referrence of Pointer to the note dialog. |
|
110 * @param aDlgRsc The resource ID. |
|
111 * @param aTone Tone of the note dialog. |
|
112 */ |
|
113 void NoteDialogL( CAknNoteDialog*& aNoteDialog, |
|
114 TInt aDlgRsc, CAknNoteDialog::TTone aTone ); |
|
115 private: |
|
116 |
|
117 /** |
|
118 * C++ default constructor. |
|
119 */ |
|
120 CMPXWaitNoteDialogPlugin(); |
|
121 |
|
122 /** |
|
123 * By default Symbian 2nd phase constructor is private. |
|
124 */ |
|
125 void ConstructL(); |
|
126 |
|
127 /** |
|
128 * Destroy the previous activated wait note when it is |
|
129 * ready to destroy |
|
130 */ |
|
131 static TInt DestroyOldWaiteNote( TAny* aPtr ); |
|
132 |
|
133 private: // data |
|
134 CAknNoteDialog* iNoteDialog; // not Owned |
|
135 CMPXWaitNoteDialog* iWaitNote; |
|
136 CMPXWaitNoteDialog* iOldWaitNote; // Previous activated wait note |
|
137 CIdle* iIdle; |
|
138 }; |
|
139 |
|
140 #endif // C_CMPXWAITNOTEPLUGIN_H |