273 const TBool /*aSilentConnection=EFalse*/ ) |
273 const TBool /*aSilentConnection=EFalse*/ ) |
274 { |
274 { |
275 |
275 |
276 } |
276 } |
277 |
277 |
278 |
|
279 #pragma mark - |
|
280 #pragma mark --- MRU SUPPORT --- |
|
281 |
|
282 |
|
283 /** |
|
284 * |
|
285 */ |
|
286 MDesCArray* CBasePlugin::GetMrusL( |
|
287 const TFSMailMsgId& aMailBoxId ) |
|
288 |
|
289 { |
|
290 CMailboxInfo& mailBox = GetMailboxInfoL( aMailBoxId.Id() ); |
|
291 |
|
292 RPointerArray<CMsgStoreAddress> addressArray; |
|
293 CleanupResetAndDestroyClosePushL( addressArray ); |
|
294 mailBox().MruAddressesL( addressArray ); |
|
295 |
|
296 //defione consts to avoid codescanner errors |
|
297 const TUint KDefaultGranularity = 8; |
|
298 |
|
299 TInt granularity = addressArray.Count() > 0 ? 2 * addressArray.Count() : KDefaultGranularity; |
|
300 CDesCArrayFlat* result = new (ELeave) CDesCArrayFlat( granularity ); |
|
301 CleanupStack::PushL( result ); |
|
302 |
|
303 TInt count = addressArray.Count(); |
|
304 for ( TInt i = 0; i < count; i++ ) |
|
305 { |
|
306 result->AppendL( addressArray[i]->DisplayName() ); |
|
307 result->AppendL( addressArray[i]->EmailAddress() ); |
|
308 } |
|
309 |
|
310 CleanupStack::Pop( result ); |
|
311 CleanupStack::PopAndDestroy( &addressArray ); |
|
312 |
|
313 return result; |
|
314 } |
|
315 |
|
316 |
|
317 /** |
|
318 * |
|
319 */ |
|
320 void CBasePlugin::SetMrusL( |
|
321 const TFSMailMsgId& aMailBoxId, |
|
322 MDesCArray* aNewMruList ) |
|
323 |
|
324 { |
|
325 CMailboxInfo& mailBox = GetMailboxInfoL( aMailBoxId.Id() ); |
|
326 |
|
327 __ASSERT_DEBUG( |
|
328 0 == ( aNewMruList->MdcaCount() % 2 ), |
|
329 ::BasePluginPanic( ESetMrusInvalidAssert ) ); |
|
330 |
|
331 RPointerArray<CMsgStoreAddress> addressArray; |
|
332 CleanupResetAndDestroyClosePushL( addressArray ); |
|
333 |
|
334 CMsgStoreAddress* address; |
|
335 for ( TInt i = 0; i < aNewMruList->MdcaCount(); i+=2 ) |
|
336 { |
|
337 TPtrC display = aNewMruList->MdcaPoint( i ); |
|
338 TPtrC email = aNewMruList->MdcaPoint( 1 + i ); |
|
339 |
|
340 address = CMsgStoreAddress::NewL( email, display ); |
|
341 CleanupStack::PushL( address ); |
|
342 addressArray.AppendL( address ); |
|
343 CleanupStack::Pop( address ); |
|
344 } |
|
345 |
|
346 mailBox().AddMruAddressesL( addressArray ); |
|
347 CleanupStack::PopAndDestroy( &addressArray ); |
|
348 } |
|
349 |
|
350 |
|
351 #pragma mark --- "MFSMAILPLUGINAPI - STATUS INFO" --- |
278 #pragma mark --- "MFSMAILPLUGINAPI - STATUS INFO" --- |
352 |
|
353 |
279 |
354 /** |
280 /** |
355 * |
281 * |
356 */ |
282 */ |
357 TFSProgress CBasePlugin::StatusL( TInt /*aRequestId*/ ) |
283 TFSProgress CBasePlugin::StatusL( TInt /*aRequestId*/ ) |