371 } |
371 } |
372 |
372 |
373 EXPORT_C void CGlxCollectionPluginBase::HandleResponse(CMPXMedia* aResponse, CGlxRequest* aRequest, const TInt& aError) |
373 EXPORT_C void CGlxCollectionPluginBase::HandleResponse(CMPXMedia* aResponse, CGlxRequest* aRequest, const TInt& aError) |
374 { |
374 { |
375 TRACER("void CGlxCollectionPluginBase::HandleResponse()"); |
375 TRACER("void CGlxCollectionPluginBase::HandleResponse()"); |
376 |
376 GLX_DEBUG2("CGlxCollectionPluginBase::HandleResponse()() aError=%d", aError); |
377 if (dynamic_cast<CGlxIdListRequest*>(aRequest)) |
377 if (dynamic_cast<CGlxIdListRequest*>(aRequest)) |
378 // iRequest is a CGlxIdListRequest |
378 // iRequest is a CGlxIdListRequest |
379 { |
379 { |
380 iObs->HandleOpen(iPath, aError); |
380 iObs->HandleOpen(iPath, aError); |
381 delete iPath; |
381 delete iPath; |
382 iPath = NULL; |
382 iPath = NULL; |
383 } |
383 } |
384 else if (dynamic_cast<CGlxThumbnailRequest*>(aRequest)) |
384 else if (dynamic_cast<CGlxThumbnailRequest*>(aRequest)) |
385 // iRequest is a CGlxThumbnailRequest |
385 // iRequest is a CGlxThumbnailRequest |
386 { |
386 { |
387 iObs->HandleMedia(aResponse, aError); |
387 //when IAD update / sisx installation of S60 TNM is done and |
388 } |
388 //photos asks for the thumbnail, the thumbnail manager returns an |
|
389 //error KErrServerTerminated(-15)/KErrDied(-13) for which the MPX recreates |
|
390 //the collection plugins and reconnects to the MPX server and goes into |
|
391 //a invalid state. After this, the error is not propogated to the Medialist |
|
392 //and no further requests are processed and it keeps returning KErrNotReady(-18) |
|
393 //So, as a HACK we are changing the error code to KErrCompletion(-17), |
|
394 //for which the MPX collection does not take any action and propogates the error |
|
395 //to the medialist. This error(KErrCompletion) is treated as a temporary error |
|
396 //and the thumbnail request is made again from the medialist for which the |
|
397 //S60 TNM returns the thumbnail properly. |
|
398 iObs->HandleMedia(aResponse, ((aError == KErrServerTerminated |
|
399 || aError == KErrDied) ? KErrCompletion : aError)); |
|
400 } |
389 else if (dynamic_cast<CGlxGetRequest*>(aRequest)) |
401 else if (dynamic_cast<CGlxGetRequest*>(aRequest)) |
390 // iRequest is a CGlxGetRequest |
402 // iRequest is a CGlxGetRequest |
391 { |
403 { |
392 TInt error = aError; |
404 TInt error = aError; |
393 CGlxGetRequest* getRequest = static_cast<CGlxGetRequest*>(aRequest); |
405 CGlxGetRequest* getRequest = static_cast<CGlxGetRequest*>(aRequest); |
454 for (TInt i = 0; i < aAttrs.Count(); i++) |
466 for (TInt i = 0; i < aAttrs.Count(); i++) |
455 { |
467 { |
456 if( KGlxMediaIdCollectionPluginSpecific == aAttrs[i].ContentId()) |
468 if( KGlxMediaIdCollectionPluginSpecific == aAttrs[i].ContentId()) |
457 { |
469 { |
458 cpiAttributeArray.AppendL(aAttrs[i]); |
470 cpiAttributeArray.AppendL(aAttrs[i]); |
459 CpiAttributeAdditionalAttributes(aAttrs[i], attributeArray); |
471 CpiAttributeAdditionalAttributesL(aAttrs[i], attributeArray); |
460 doNotNeedDataSource = EFalse; |
472 doNotNeedDataSource = EFalse; |
461 } |
473 } |
462 else |
474 else |
463 { |
475 { |
464 if ( aAttrs[i] == KMPXMediaGeneralCount ) |
476 if ( aAttrs[i] == KMPXMediaGeneralCount ) |
492 TRACER("TBool CGlxCollectionPluginBase::IsUpdateMessageIgnored(CMPXMessage& /*aMessage*/)"); |
504 TRACER("TBool CGlxCollectionPluginBase::IsUpdateMessageIgnored(CMPXMessage& /*aMessage*/)"); |
493 // Default implementation ignores all update messages |
505 // Default implementation ignores all update messages |
494 return ETrue; |
506 return ETrue; |
495 } |
507 } |
496 |
508 |
497 EXPORT_C void CGlxCollectionPluginBase::CpiAttributeAdditionalAttributes(const TMPXAttribute& /*aCpiAttribute*/, RArray<TMPXAttribute>& /*aAttributeArray*/) |
509 EXPORT_C void CGlxCollectionPluginBase::CpiAttributeAdditionalAttributesL(const TMPXAttribute& /*aCpiAttribute*/, RArray<TMPXAttribute>& /*aAttributeArray*/) |
498 { |
510 { |
499 TRACER("void CGlxCollectionPluginBase::CpiAttributeAdditionalAttributes()"); |
511 TRACER("void CGlxCollectionPluginBase::CpiAttributeAdditionalAttributesL()"); |
500 // Default implementation does not require additional attributes |
512 // Default implementation does not require additional attributes |
501 } |
513 } |
502 |
514 |
503 EXPORT_C void CGlxCollectionPluginBase::HandleCpiAttributeResponseL(CMPXMedia* /*aResponse*/, TArray<TMPXAttribute> /*aCpiAttributes*/, TArray<TGlxMediaId> /* aMediaIds */) |
515 EXPORT_C void CGlxCollectionPluginBase::HandleCpiAttributeResponseL(CMPXMedia* /*aResponse*/, TArray<TMPXAttribute> /*aCpiAttributes*/, TArray<TGlxMediaId> /* aMediaIds */) |
504 { |
516 { |