equal
deleted
inserted
replaced
91 // --------------------------------------------------------------------------- |
91 // --------------------------------------------------------------------------- |
92 // |
92 // |
93 CMdSManipulationEngine::~CMdSManipulationEngine() |
93 CMdSManipulationEngine::~CMdSManipulationEngine() |
94 { |
94 { |
95 delete iManipulate; |
95 delete iManipulate; |
96 iManipulate = NULL; |
|
97 |
96 |
98 delete iGarbageCollector; |
97 delete iGarbageCollector; |
99 iGarbageCollector = NULL; |
|
100 } |
98 } |
101 |
99 |
102 // --------------------------------------------------------------------------- |
100 // --------------------------------------------------------------------------- |
103 // Manipulate |
101 // Manipulate |
104 // --------------------------------------------------------------------------- |
102 // --------------------------------------------------------------------------- |
153 CleanupClosePushL(baseObjStmt); |
151 CleanupClosePushL(baseObjStmt); |
154 RMdsStatement objStmt; |
152 RMdsStatement objStmt; |
155 CleanupClosePushL(objStmt); |
153 CleanupClosePushL(objStmt); |
156 |
154 |
157 RMdSTransaction transaction( connection ); |
155 RMdSTransaction transaction( connection ); |
158 CleanupClosePushL (transaction ); |
156 CleanupClosePushL(transaction); |
159 const TInt beginError( transaction.Error() ); |
157 const TInt beginError( transaction.Error() ); |
160 if( beginError != KErrNone ) |
158 if( beginError != KErrNone ) |
161 { |
159 { |
162 CleanupStack::PopAndDestroy( &transaction ); |
160 CleanupStack::PopAndDestroy( &transaction ); |
163 } |
161 } |
850 aFileInfos.ReceiveL(fileInfo.iModifiedTime); |
848 aFileInfos.ReceiveL(fileInfo.iModifiedTime); |
851 aFileInfos.ReceiveL(fileInfo.iSize); |
849 aFileInfos.ReceiveL(fileInfo.iSize); |
852 |
850 |
853 #ifdef _DEBUG |
851 #ifdef _DEBUG |
854 const TInt64 time = fileInfo.iModifiedTime; |
852 const TInt64 time = fileInfo.iModifiedTime; |
855 RDebug::Print( _L("CMdSManipulationEngine::SetFilesToPresentL: (%d) uri %S, iSize %u, iModified %Ld"), |
853 RDebug::Print( _L("CMdSManipulationEngine::SetFilesToPresentL: (%d) iSize %u, iModified %Ld, uri %S"), |
856 i, |
854 i, |
857 &uri, |
|
858 fileInfo.iSize, |
855 fileInfo.iSize, |
859 time ); |
856 time, |
|
857 &uri); |
860 #endif |
858 #endif |
861 |
859 |
862 TFilePresentStates placeHolder; |
860 TFilePresentStates placeHolder; |
863 TBool notPresentState( EFalse ); |
861 TBool notPresentState( EFalse ); |
864 const TItemId objectId = iManipulate->SearchNotPresentFileL( |
862 const TItemId objectId = iManipulate->SearchNotPresentFileL( |
1072 void CMdSManipulationEngine::CheckMassStorageMediaIdL( const TUint32 aMediaId ) |
1070 void CMdSManipulationEngine::CheckMassStorageMediaIdL( const TUint32 aMediaId ) |
1073 { |
1071 { |
1074 CMdSSqLiteConnection& connection = MMdSDbConnectionPool::GetDefaultDBL(); |
1072 CMdSSqLiteConnection& connection = MMdSDbConnectionPool::GetDefaultDBL(); |
1075 RMdSTransaction transaction( connection ); |
1073 RMdSTransaction transaction( connection ); |
1076 CleanupClosePushL( transaction ); |
1074 CleanupClosePushL( transaction ); |
1077 const TInt beginError( transaction.Error() ); |
1075 User::LeaveIfError( transaction.Error() ); |
1078 if( beginError != KErrNone ) |
|
1079 { |
|
1080 CleanupStack::PopAndDestroy( &transaction ); |
|
1081 } |
|
1082 |
1076 |
1083 iManipulate->CheckMassStorageMediaIdL( aMediaId ); |
1077 iManipulate->CheckMassStorageMediaIdL( aMediaId ); |
1084 |
1078 |
1085 if( beginError == KErrNone ) |
1079 transaction.CommitL(); |
1086 { |
1080 |
1087 transaction.CommitL(); |
1081 CleanupStack::PopAndDestroy( &transaction ); |
1088 CleanupStack::PopAndDestroy( &transaction ); |
|
1089 } |
|
1090 } |
1082 } |
1091 |
1083 |
1092 void CMdSManipulationEngine::AddRelationDefL( TDefId aNamespaceId, const TDesC& aRelationDefName ) |
1084 void CMdSManipulationEngine::AddRelationDefL( TDefId aNamespaceId, const TDesC& aRelationDefName ) |
1093 { |
1085 { |
1094 CMdsNamespaceDef* namespaceDef = CONST_CAST( CMdsNamespaceDef*, iSchema.GetNamespaceByIdL( aNamespaceId ) ); |
1086 CMdsNamespaceDef* namespaceDef = CONST_CAST( CMdsNamespaceDef*, iSchema.GetNamespaceByIdL( aNamespaceId ) ); |