mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/crequestprocessor.cpp
equal
deleted
inserted
replaced
19 #include <mtp/mtpprotocolconstants.h> |
19 #include <mtp/mtpprotocolconstants.h> |
20 #include <mtp/tmtptyperequest.h> |
20 #include <mtp/tmtptyperequest.h> |
21 #include <mtp/tmtptypeevent.h> |
21 #include <mtp/tmtptypeevent.h> |
22 #include <mtp/mmtpconnection.h> |
22 #include <mtp/mmtpconnection.h> |
23 #include <mtp/mmtpobjectmgr.h> |
23 #include <mtp/mmtpobjectmgr.h> |
24 #include <e32property.h> |
|
25 #include <mtpprivatepskeys.h> |
|
26 |
24 |
27 #include "crequestprocessor.h" |
25 #include "crequestprocessor.h" |
28 #include "crequestchecker.h" |
26 #include "crequestchecker.h" |
|
27 #include "mmmtpdputility.h" |
29 #include "mmmtpdplogger.h" |
28 #include "mmmtpdplogger.h" |
30 |
29 |
31 static const TInt KNullBufferSize = 4096; |
30 static const TInt KNullBufferSize = 4096; |
32 |
31 |
33 // ----------------------------------------------------------------------------- |
32 // ----------------------------------------------------------------------------- |
136 // during the transferring file |
135 // during the transferring file |
137 // ----------------------------------------------------------------------------- |
136 // ----------------------------------------------------------------------------- |
138 // |
137 // |
139 EXPORT_C void CRequestProcessor::UsbDisconnect() |
138 EXPORT_C void CRequestProcessor::UsbDisconnect() |
140 { |
139 { |
141 // TODO: reset the CenRep value |
|
142 } |
140 } |
143 |
141 |
144 // ----------------------------------------------------------------------------- |
142 // ----------------------------------------------------------------------------- |
145 // CRequestProcessor::CompleteRequestL |
143 // CRequestProcessor::CompleteRequestL |
146 // Signal to the framework that the current request transaction has completed |
144 // Signal to the framework that the current request transaction has completed |
212 result = DoHandleResponsePhaseL(); |
210 result = DoHandleResponsePhaseL(); |
213 } |
211 } |
214 break; |
212 break; |
215 |
213 |
216 case ECompletingPhase: |
214 case ECompletingPhase: |
|
215 MmMtpDpUtility::SetPSStatus(EMtpPSStatusReadyToSync); |
217 result = DoHandleCompletingPhaseL(); |
216 result = DoHandleCompletingPhaseL(); |
218 break; |
217 break; |
219 |
218 |
220 default: |
219 default: |
221 PRINT( _L( "MM MTP <> CRequestProcessor::HandleRequestL default" ) ); |
220 PRINT( _L( "MM MTP <> CRequestProcessor::HandleRequestL default" ) ); |
425 { |
424 { |
426 return EFalse; |
425 return EFalse; |
427 } |
426 } |
428 |
427 |
429 // ----------------------------------------------------------------------------- |
428 // ----------------------------------------------------------------------------- |
430 // CRequestProcessor::SetPSStatus |
|
431 // Set P&S Status to avoid MPX access conflict |
|
432 // ----------------------------------------------------------------------------- |
|
433 // |
|
434 void CRequestProcessor::SetPSStatus() |
|
435 { |
|
436 TInt mtpStatus; |
|
437 RProperty::Get( KMtpPSUid, KMtpPSStatus, mtpStatus); |
|
438 |
|
439 if ( mtpStatus != EMtpPSStatusActive ) |
|
440 { |
|
441 TInt err = RProperty::Set( KMtpPSUid, KMtpPSStatus, EMtpPSStatusActive ); |
|
442 PRINT1( _L("MM MTP <> CRequestProcessor::SetPSStatus err = %d" ), err ); |
|
443 } |
|
444 } |
|
445 |
|
446 // ----------------------------------------------------------------------------- |
|
447 // CRequestProcessor::ExtractSessionTransactionId |
429 // CRequestProcessor::ExtractSessionTransactionId |
448 // retrieve the session id and transaction code from the current request |
430 // retrieve the session id and transaction code from the current request |
449 // ----------------------------------------------------------------------------- |
431 // ----------------------------------------------------------------------------- |
450 // |
432 // |
451 void CRequestProcessor::ExtractSessionTransactionId() |
433 void CRequestProcessor::ExtractSessionTransactionId() |