equal
deleted
inserted
replaced
101 // DeleteObject request handler |
101 // DeleteObject request handler |
102 // ----------------------------------------------------------------------------- |
102 // ----------------------------------------------------------------------------- |
103 // |
103 // |
104 EXPORT_C void CDeleteObject::ServiceL() |
104 EXPORT_C void CDeleteObject::ServiceL() |
105 { |
105 { |
106 MmMtpDpUtility::SetPSStatus(EMtpPSStatusActive); |
106 MmMtpDpUtility::SetPSStatus( EMtpPSStatusActive ); |
107 |
107 |
108 iObjectsToDelete.Reset(); |
108 iObjectsToDelete.Reset(); |
109 iDeleteError = KErrNone; |
109 iDeleteError = KErrNone; |
110 TUint32 objectHandle = Request().Uint32( TMTPTypeRequest::ERequestParameter1 ); |
110 TUint32 objectHandle = Request().Uint32( TMTPTypeRequest::ERequestParameter1 ); |
111 |
111 |
124 } |
124 } |
125 else |
125 else |
126 { |
126 { |
127 iIsMultiDelete = EFalse; |
127 iIsMultiDelete = EFalse; |
128 // Not Owned the object |
128 // Not Owned the object |
129 // TODO: need to check if this is best way and if it is applicable to other processors |
|
130 CMTPObjectMetaData* objectInfo = iRequestChecker->GetObjectInfo( objectHandle ); |
129 CMTPObjectMetaData* objectInfo = iRequestChecker->GetObjectInfo( objectHandle ); |
131 |
130 |
132 if ( objectInfo->Uint( CMTPObjectMetaData::EFormatCode ) == EMTPFormatCodeAssociation ) |
131 if ( objectInfo->Uint( CMTPObjectMetaData::EFormatCode ) == EMTPFormatCodeAssociation ) |
133 { |
132 { |
134 TUint parentHandle = objectInfo->Uint( CMTPObjectMetaData::EHandle ); |
133 TUint parentHandle = objectInfo->Uint( CMTPObjectMetaData::EHandle ); |
190 // Get the next object |
189 // Get the next object |
191 CMTPObjectMetaData* objectInfo = CMTPObjectMetaData::NewLC(); // + objectInfo |
190 CMTPObjectMetaData* objectInfo = CMTPObjectMetaData::NewLC(); // + objectInfo |
192 |
191 |
193 TUint32 handle = iObjectsToDelete[0]; |
192 TUint32 handle = iObjectsToDelete[0]; |
194 iFramework.ObjectMgr().ObjectL( handle, *objectInfo ); |
193 iFramework.ObjectMgr().ObjectL( handle, *objectInfo ); |
195 TFileName fileName( objectInfo->DesC( CMTPObjectMetaData::ESuid ) ); |
194 PRINT2( _L( "MM MTP <> CDeleteObject::RunL delete object handle is 0x%x, fileName is %S" ), |
196 PRINT2( _L( "MM MTP <> CDeleteObject::RunL delete object handle is 0x%x, fileName is %S" ), handle, &fileName ); |
195 handle, |
|
196 &( objectInfo->DesC( CMTPObjectMetaData::ESuid ) ) ); |
197 |
197 |
198 if ( objectInfo->Uint( CMTPObjectMetaData::EFormatCode ) == EMTPFormatCodeAssociation ) |
198 if ( objectInfo->Uint( CMTPObjectMetaData::EFormatCode ) == EMTPFormatCodeAssociation ) |
199 { |
199 { |
200 TUint parentHandle = objectInfo->Uint( CMTPObjectMetaData::EHandle ); |
200 TUint parentHandle = objectInfo->Uint( CMTPObjectMetaData::EHandle ); |
201 GetObjectHandlesL( KMTPStorageAll, parentHandle ); |
201 GetObjectHandlesL( KMTPStorageAll, parentHandle ); |
220 // Deletes the object from the file system and the object from the store |
220 // Deletes the object from the file system and the object from the store |
221 // ----------------------------------------------------------------------------- |
221 // ----------------------------------------------------------------------------- |
222 // |
222 // |
223 void CDeleteObject::DeleteObjectL( const CMTPObjectMetaData& aObjectInfo ) |
223 void CDeleteObject::DeleteObjectL( const CMTPObjectMetaData& aObjectInfo ) |
224 { |
224 { |
225 TFileName fileName( aObjectInfo.DesC( CMTPObjectMetaData::ESuid ) ); |
225 TPtrC fileName( aObjectInfo.DesC( CMTPObjectMetaData::ESuid ) ); |
226 PRINT1( _L( "MM MTP <> CDeleteObject::DeleteObjectL fileName = %S" ), &fileName ); |
226 PRINT1( _L( "MM MTP <> CDeleteObject::DeleteObjectL fileName = %S" ), &fileName ); |
227 |
227 |
228 // To capture special situation: After copy, move, rename playlist folder name, |
228 // To capture special situation: After copy, move, rename playlist folder name, |
229 // record in MPX is not inlined with framework db, playlist should not be deleted |
229 // record in MPX is not inlined with framework db, playlist should not be deleted |
230 // until next session. |
230 // until next session. |