19 |
19 |
20 // INCLUDE FILES |
20 // INCLUDE FILES |
21 #include <StringLoader.h> |
21 #include <StringLoader.h> |
22 #include <AknGlobalConfirmationQuery.h> |
22 #include <AknGlobalConfirmationQuery.h> |
23 #include <AknGlobalListQuery.h> |
23 #include <AknGlobalListQuery.h> |
|
24 #include <AknGlobalMsgQuery.h> |
24 #include <badesca.h> |
25 #include <badesca.h> |
25 #include <avkon.hrh> // EAknSoftkeyNo |
26 #include <avkon.hrh> // EAknSoftkeyNo |
26 #include <drmutility.rsg> |
27 #include <drmutility.rsg> |
27 |
28 |
28 #include <AknMediatorFacade.h> |
29 #include <AknMediatorFacade.h> |
87 |
88 |
88 // Destructor |
89 // Destructor |
89 DRM::CDrmUtilityGlobalNoteWrapper::~CDrmUtilityGlobalNoteWrapper() |
90 DRM::CDrmUtilityGlobalNoteWrapper::~CDrmUtilityGlobalNoteWrapper() |
90 { |
91 { |
91 Cancel(); // Cancel active object |
92 Cancel(); // Cancel active object |
|
93 delete iGlobalMsgQuery; |
92 } |
94 } |
93 |
95 |
94 // ----------------------------------------------------------------------------- |
96 // ----------------------------------------------------------------------------- |
95 // CDrmUtilityGlobalNoteWrapper::ShowNoteL |
97 // CDrmUtilityGlobalNoteWrapper::ShowNoteL |
96 // ----------------------------------------------------------------------------- |
98 // ----------------------------------------------------------------------------- |
177 |
179 |
178 StringLoader::Format( iTextBuffer, srcBuffer, aValuePos, aValue ); |
180 StringLoader::Format( iTextBuffer, srcBuffer, aValuePos, aValue ); |
179 srcBuffer = iTextBuffer; |
181 srcBuffer = iTextBuffer; |
180 StringLoader::Format( iTextBuffer, srcBuffer, aStringPos, aString ); |
182 StringLoader::Format( iTextBuffer, srcBuffer, aStringPos, aString ); |
181 return DoShowNoteL( aResourceId, aString, aValue ); |
183 return DoShowNoteL( aResourceId, aString, aValue ); |
|
184 } |
|
185 |
|
186 // ----------------------------------------------------------------------------- |
|
187 // CDrmUtilityGlobalNoteWrapper::ShowNoteL |
|
188 // ----------------------------------------------------------------------------- |
|
189 // |
|
190 void DRM::CDrmUtilityGlobalNoteWrapper::ShowMessageQueryL( |
|
191 TInt aMessageResourceId, |
|
192 TInt aHeaderResourceId, |
|
193 const TDesC& aString) |
|
194 { |
|
195 TBuf<KDRMNoteBufferMaxSize> messageBuffer( |
|
196 iResourceReader->ReadResourceString( aMessageResourceId ) ); |
|
197 |
|
198 StringLoader::Format( iFinalMessageBuffer, messageBuffer, -1, aString ); |
|
199 |
|
200 iHeaderBuffer = iResourceReader->ReadResourceString( aHeaderResourceId ); |
|
201 |
|
202 CAknGlobalMsgQuery* iGlobalMsgQuery = CAknGlobalMsgQuery::NewL(); |
|
203 |
|
204 iStatus = KRequestPending; |
|
205 iGlobalMsgQuery->ShowMsgQueryL(iStatus, iFinalMessageBuffer, |
|
206 R_AVKON_SOFTKEYS_OK_EMPTY, iHeaderBuffer, KNullDesC); |
|
207 |
|
208 SetActive(); |
|
209 iWait.Start(); |
182 } |
210 } |
183 |
211 |
184 // ----------------------------------------------------------------------------- |
212 // ----------------------------------------------------------------------------- |
185 // CDrmUtilityGlobalNoteWrapper::ShowPreviewListQueryL |
213 // CDrmUtilityGlobalNoteWrapper::ShowPreviewListQueryL |
186 // ----------------------------------------------------------------------------- |
214 // ----------------------------------------------------------------------------- |
303 // ----------------------------------------------------------------------------- |
331 // ----------------------------------------------------------------------------- |
304 // |
332 // |
305 void DRM::CDrmUtilityGlobalNoteWrapper::RunL() |
333 void DRM::CDrmUtilityGlobalNoteWrapper::RunL() |
306 { |
334 { |
307 iWait.AsyncStop(); |
335 iWait.AsyncStop(); |
|
336 if(iGlobalMsgQuery) |
|
337 { |
|
338 iGlobalMsgQuery->CancelMsgQuery(); |
|
339 } |
308 } |
340 } |
309 |
341 |
310 // ----------------------------------------------------------------------------- |
342 // ----------------------------------------------------------------------------- |
311 // CDrmUtilityGlobalNoteWrapper::DoShowNoteL |
343 // CDrmUtilityGlobalNoteWrapper::DoShowNoteL |
312 // ----------------------------------------------------------------------------- |
344 // ----------------------------------------------------------------------------- |