--- a/mtpfws/mtpfw/src/cmtpdataprovider.cpp Tue Feb 02 01:11:40 2010 +0200
+++ b/mtpfws/mtpfw/src/cmtpdataprovider.cpp Fri Mar 19 09:40:39 2010 +0200
@@ -481,6 +481,28 @@
return iSingletons.DataCodeGenerator();
}
+void CMTPDataProvider::NotifyFrameworkL( TMTPNotificationToFramework aNotification, const TAny* aParams )
+ {
+ __FLOG(_L8("NotifyFrameworkL - Entry"));
+
+ __ASSERT_DEBUG( aParams, User::Invariant());
+
+ switch ( aNotification )
+ {
+ case EMTPAddFolder:
+ {
+ TUint deviceDpId = iSingletons.DpController().DeviceDpId();
+ iSingletons.DpController().NotifyDataProvidersL( deviceDpId, EMTPObjectAdded, aParams );
+ }
+ break;
+ default:
+ __FLOG(_L8("Ignore other notification"));
+ break;
+ }
+
+ __FLOG(_L8("NotifyFrameworkL - Exit"));
+ }
+
void CMTPDataProvider::DoCancel()
{
__FLOG_VA((_L8("DoCancel - Entry, data provider %d "), iId));
@@ -529,6 +551,18 @@
{
iImplementation->Cancel();
}
+ else if (status == KErrAbort)
+ {
+ if (iCurrentRequest != NULL)
+ {
+ TMTPTypeEvent event;
+ event.SetUint16(TMTPTypeEvent::EEventCode, EMTPEventCodeCancelTransaction);
+ event.SetUint32(TMTPTypeEvent::EEventSessionID, iCurrentRequest->Uint32(TMTPTypeRequest::ERequestSessionID) );
+ event.SetUint32(TMTPTypeEvent::EEventTransactionID, iCurrentRequest->Uint32(TMTPTypeRequest::ERequestTransactionID) );
+
+ iImplementation->ProcessEventL(event ,*iCurrentConnection);
+ }
+ }
if (iErrorRecovery != KErrNone)
@@ -558,7 +592,7 @@
}
}
- else if (iSingletons.DpController().EnumerateState() != CMTPDataProviderController::EEnumerated)
+ else if (iSingletons.DpController().EnumerateState() < CMTPDataProviderController::EEnumeratingPhaseOneDone)
{
__FLOG(_L8("DP Enumeration is not complete"));
@@ -603,12 +637,15 @@
iTimer.After(iStatus, TTimeIntervalMicroSeconds32(KWaitForEnumeration));
SetActive();
iTimerActive = ETrue;
- break;
- case ECompletingPhase:
- TransactionCompleteL(*iCurrentRequest, *iCurrentConnection);
- break;
- default:
- break;
+ break;
+ case EResponsePhase:
+ iImplementation->ProcessRequestPhaseL(iCurrentTransactionPhase, *iCurrentRequest, *iCurrentConnection);
+ break;
+ case ECompletingPhase:
+ TransactionCompleteL(*iCurrentRequest, *iCurrentConnection);
+ break;
+ default:
+ break;
}
}
}