--- a/mtpfws/mtpfw/dataproviders/dputility/src/cmtprequestprocessor.cpp Fri Apr 16 15:51:48 2010 +0300
+++ b/mtpfws/mtpfw/dataproviders/dputility/src/cmtprequestprocessor.cpp Mon May 03 13:19:02 2010 +0300
@@ -22,7 +22,6 @@
#include "cmtprequestprocessor.h"
#include "cmtprequestchecker.h"
-
const static TInt KNullBufferSize = 4096;
__FLOG_STMT(_LIT8(KComponent,"MTPRequestProcessor");)
@@ -75,31 +74,19 @@
@param aParmas The pointer to array of parameters
*/
EXPORT_C void CMTPRequestProcessor::SendResponseL(TMTPResponseCode aResponseCode, TInt aParameterCount, TUint32* aParams)
- {
- __ASSERT_DEBUG(aParameterCount < TMTPTypeRequest::ENumElements, User::Invariant());
-
- iResponse.SetUint16(TMTPTypeResponse::EResponseCode, aResponseCode);
-
+ {
+ __ASSERT_DEBUG(aParameterCount < TMTPTypeRequest::ENumElements, User::Invariant());
+ iResponse.Reset();
+ iResponse.SetUint16(TMTPTypeResponse::EResponseCode, aResponseCode);
iResponse.SetUint32(TMTPTypeResponse::EResponseSessionID, iSessionId);
-
- iResponse.SetUint32(TMTPTypeResponse::EResponseTransactionID, iTransactionCode);
-
- TInt i = 0;
- for(i = 0; i < aParameterCount; i++)
- {
- iResponse.SetUint32(TMTPTypeResponse::EResponseParameter1 + i, aParams[i]);
- }
-
- i += TMTPTypeResponse::EResponseParameter1;
- while(i <= TMTPTypeResponse::EResponseParameter5)
- {
- iResponse.SetUint32(i, KMTPNotSpecified32);
- i++;
- }
-
- __ASSERT_DEBUG(iRequest, User::Invariant());
- iFramework.SendResponseL(iResponse, *iRequest, iConnection);
- }
+ iResponse.SetUint32(TMTPTypeResponse::EResponseTransactionID, iTransactionCode);
+ for(TInt i = 0; i < aParameterCount; ++ i)
+ {
+ iResponse.SetUint32(TMTPTypeResponse::EResponseParameter1 + i, aParams[i]);
+ }
+ __ASSERT_DEBUG(iRequest, User::Invariant());
+ iFramework.SendResponseL(iResponse, *iRequest, iConnection);
+ }
/**
The current active request
@@ -157,6 +144,14 @@
}
/**
+Register self as a pending request
+*/
+EXPORT_C void CMTPRequestProcessor::RegisterPendingRequest(TUint aTimeOut)
+ {
+ iFramework.RegisterPendingRequest(aTimeOut);
+ }
+
+/**
Handle the request
@param aRequest The request to be processed
@param aPhase The current transaction phase of the request