engine/collectionframework/datasource/manager/src/glxcollectionpluginbase.cpp
changeset 44 aa2fa096cbfb
parent 43 72396548277c
child 58 383b67fbdb11
equal deleted inserted replaced
43:72396548277c 44:aa2fa096cbfb
   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);