1 /* |
|
2 * Copyright (c) 2008 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: Handler for notifier on Event |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef EVTNOTIFIERHANDLER_H |
|
21 #define EVTNOTIFIERHANDLER_H |
|
22 |
|
23 // INCLUDES |
|
24 |
|
25 #include <e32base.h> |
|
26 |
|
27 #include <apgcli.h> |
|
28 #include <apacmdln.h> |
|
29 #include <bacline.h> |
|
30 #include <AknNotifierWrapper.h> |
|
31 #include <s32mem.h> |
|
32 |
|
33 #include "evtinfonoteparams.h" |
|
34 #include "evthandlerserverconsts.h" |
|
35 #include "evteventmanager.h" |
|
36 #include "evtevent.h" |
|
37 #include "evteventinfo.h" |
|
38 |
|
39 |
|
40 // CONSTANTS |
|
41 |
|
42 // MACROS |
|
43 |
|
44 // DATA TYPES |
|
45 |
|
46 // FUNCTION PROTOTYPES |
|
47 |
|
48 // FORWARD DECLARATIONS |
|
49 class MEvtNotifierObserver; |
|
50 class CEvtGlobalQuery; |
|
51 |
|
52 // CLASS DECLARATION |
|
53 |
|
54 /** |
|
55 * Handler for query on Event. This handler show query notifier |
|
56 * and return result to connect manager. |
|
57 * |
|
58 * @since Series 60 9.1 |
|
59 */ |
|
60 class CEvtNotifierHandler: public CActive |
|
61 { |
|
62 public: |
|
63 //Handler id |
|
64 enum THandlerType |
|
65 { |
|
66 EHandlerNotifier, ///Device selection handler id |
|
67 EHandlerGlobalNote |
|
68 }; |
|
69 |
|
70 public: |
|
71 /** |
|
72 * Two-phase construction. |
|
73 */ |
|
74 static CEvtNotifierHandler * NewL( |
|
75 MEvtNotifierObserver& aNotifierObserver, |
|
76 TEvtEventInfo aEventInfo ); |
|
77 |
|
78 /** |
|
79 * Destructor |
|
80 */ |
|
81 virtual ~CEvtNotifierHandler(); |
|
82 |
|
83 /** |
|
84 * Check if Event is Launchable - Is it present and Active |
|
85 */ |
|
86 TBool IsLaunchable(); |
|
87 |
|
88 /** |
|
89 * Starting the Notifier |
|
90 */ |
|
91 void StartEvtNotifierL(); |
|
92 |
|
93 private: |
|
94 /** |
|
95 * From CActive |
|
96 */ |
|
97 void RunL(); |
|
98 |
|
99 /** |
|
100 * From CActive |
|
101 */ |
|
102 void DoCancel(); |
|
103 |
|
104 /** |
|
105 * From CActive |
|
106 */ |
|
107 TInt RunError( TInt aError ); |
|
108 |
|
109 private: |
|
110 |
|
111 /** |
|
112 * Second phase of the construction |
|
113 */ |
|
114 void ConstructL( ); |
|
115 |
|
116 /** |
|
117 * Private constructor |
|
118 */ |
|
119 CEvtNotifierHandler( |
|
120 MEvtNotifierObserver& aNotifierObserver, |
|
121 TEvtEventInfo aEventInfo ); |
|
122 |
|
123 private: |
|
124 |
|
125 /** |
|
126 * Notifier Observer. |
|
127 */ |
|
128 MEvtNotifierObserver& iNotifierObserver; |
|
129 |
|
130 /** |
|
131 * RNotifer Instance. |
|
132 */ |
|
133 RNotifier iNotifier; |
|
134 |
|
135 /** |
|
136 * Event Global Query. |
|
137 * Owns: |
|
138 */ |
|
139 CEvtGlobalQuery* iEvtGlobalQuery; |
|
140 |
|
141 /** |
|
142 * Event's Info note object to internalize and externalize |
|
143 * the information required by Info Note. |
|
144 * Owns: |
|
145 */ |
|
146 CEvtInfoNoteInputParam* iInputParam; |
|
147 |
|
148 /** |
|
149 * Buffer which contains the Input parameters to notifier |
|
150 * Owns: |
|
151 */ |
|
152 CBufFlat* iInputBuffer; |
|
153 |
|
154 /** |
|
155 * Response buffer to pass to the notifier |
|
156 */ |
|
157 TBuf8<KEvtNotifierBufferLength> iResponseBuffer; |
|
158 |
|
159 /** |
|
160 * Current Event's dynamic Info |
|
161 */ |
|
162 TEvtEventInfo iEventInfo; |
|
163 |
|
164 /** |
|
165 * Handler type which can be either RNotifier or Global query |
|
166 */ |
|
167 THandlerType iHandlerType; |
|
168 |
|
169 /** |
|
170 * Engine Class to get the Event object |
|
171 * Owns: |
|
172 */ |
|
173 CEvtEventManager* iEventManager; |
|
174 |
|
175 /** |
|
176 * Event object for which the notifier has to be launched |
|
177 * Owns: |
|
178 */ |
|
179 CEvtEvent* iEvent; |
|
180 }; |
|
181 |
|
182 #endif //EVTNOTIFIERHANDLER_H |
|
183 |
|
184 // End of File |
|