equal
deleted
inserted
replaced
84 iSingletons.OpenL(); |
84 iSingletons.OpenL(); |
85 iOwnerDp = KInvalidDpId; |
85 iOwnerDp = KInvalidDpId; |
86 __FLOG( _L8("-ConstructL") ); |
86 __FLOG( _L8("-ConstructL") ); |
87 } |
87 } |
88 |
88 |
|
89 TMTPResponseCode CMTPDeleteObject::CheckRequestL() |
|
90 { |
|
91 __FLOG(_L8("CheckRequestL - Entry")); |
|
92 TMTPResponseCode responseCode = CMTPRequestProcessor::CheckRequestL(); |
|
93 if ((EMTPRespCodeOK == responseCode) && (iSingletons.DpController().EnumerateState() == CMTPDataProviderController::EEnumeratingSubDirFiles)) |
|
94 { |
|
95 responseCode = EMTPRespCodeDeviceBusy; |
|
96 } |
|
97 |
|
98 __FLOG_VA((_L8("CheckRequestL - Exit with responseCode = 0x%04X"), responseCode)); |
|
99 return responseCode; |
|
100 } |
|
101 |
89 /** |
102 /** |
90 DeleteObject request handler |
103 DeleteObject request handler |
91 */ |
104 */ |
92 void CMTPDeleteObject::ServiceL() |
105 void CMTPDeleteObject::ServiceL() |
93 { |
106 { |
156 { |
169 { |
157 __FLOG( _L8("+RunL") ); |
170 __FLOG( _L8("+RunL") ); |
158 |
171 |
159 if ( iStatus == KErrNone ) |
172 if ( iStatus == KErrNone ) |
160 { |
173 { |
161 NextObjectHandleL(); |
174 //First check if the operation has been cancelled or not |
162 if ( iOwnerDp != KInvalidDpId ) |
175 if(iCancelled) |
163 { |
176 { |
164 CMTPDataProvider& dp = iSingletons.DpController().DataProviderL( iOwnerDp ); |
177 __FLOG(_L8("Initiator cancell delete, send response with cancelled code ")); |
165 dp.ExecuteProxyRequestL( iCurrentRequest, Connection(), *this ); |
178 SendResponseL(EMTPRespCodeTransactionCancelled); |
|
179 iCancelled = EFalse; |
|
180 } |
|
181 else |
|
182 { |
|
183 NextObjectHandleL(); |
|
184 if ( iOwnerDp != KInvalidDpId ) |
|
185 { |
|
186 CMTPDataProvider& dp = iSingletons.DpController().DataProviderL( iOwnerDp ); |
|
187 dp.ExecuteProxyRequestL( iCurrentRequest, Connection(), *this ); |
|
188 } |
166 } |
189 } |
167 } |
190 } |
168 else |
191 else |
169 { |
192 { |
170 SendResponseL( iResponse.Uint16( TMTPTypeResponse::EResponseCode ) ); |
193 SendResponseL( iResponse.Uint16( TMTPTypeResponse::EResponseCode ) ); |
207 iObjBrowser = CMTPObjectBrowser::NewL( iFramework ); |
230 iObjBrowser = CMTPObjectBrowser::NewL( iFramework ); |
208 |
231 |
209 iHandles.Reset(); |
232 iHandles.Reset(); |
210 iCurrentHandle = 0; |
233 iCurrentHandle = 0; |
211 iDeletedObjectsNumber = 0; |
234 iDeletedObjectsNumber = 0; |
|
235 |
212 MMTPType::CopyL( Request(), iCurrentRequest ); |
236 MMTPType::CopyL( Request(), iCurrentRequest ); |
213 |
237 |
214 CMTPObjectBrowser::TBrowseCallback callback = { CMTPDeleteObject::OnBrowseObjectL, this }; |
238 CMTPObjectBrowser::TBrowseCallback callback = { CMTPDeleteObject::OnBrowseObjectL, this }; |
215 TUint32 handle = Request().Uint32( TMTPTypeRequest::ERequestParameter1 ); |
239 TUint32 handle = Request().Uint32( TMTPTypeRequest::ERequestParameter1 ); |
216 TUint32 fmtCode = KMTPFormatsAll; |
240 TUint32 fmtCode = KMTPFormatsAll; |