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; |
96 |
97 |
97 delete iGarbageCollector; |
98 delete iGarbageCollector; |
|
99 iGarbageCollector = NULL; |
98 } |
100 } |
99 |
101 |
100 // --------------------------------------------------------------------------- |
102 // --------------------------------------------------------------------------- |
101 // Manipulate |
103 // Manipulate |
102 // --------------------------------------------------------------------------- |
104 // --------------------------------------------------------------------------- |
151 CleanupClosePushL(baseObjStmt); |
153 CleanupClosePushL(baseObjStmt); |
152 RMdsStatement objStmt; |
154 RMdsStatement objStmt; |
153 CleanupClosePushL(objStmt); |
155 CleanupClosePushL(objStmt); |
154 |
156 |
155 RMdSTransaction transaction( connection ); |
157 RMdSTransaction transaction( connection ); |
156 CleanupClosePushL(transaction); |
158 CleanupClosePushL (transaction ); |
157 const TInt beginError( transaction.Error() ); |
159 const TInt beginError( transaction.Error() ); |
158 if( beginError != KErrNone ) |
160 if( beginError != KErrNone ) |
159 { |
161 { |
160 CleanupStack::PopAndDestroy( &transaction ); |
162 CleanupStack::PopAndDestroy( &transaction ); |
161 } |
163 } |
1070 void CMdSManipulationEngine::CheckMassStorageMediaIdL( const TUint32 aMediaId ) |
1072 void CMdSManipulationEngine::CheckMassStorageMediaIdL( const TUint32 aMediaId ) |
1071 { |
1073 { |
1072 CMdSSqLiteConnection& connection = MMdSDbConnectionPool::GetDefaultDBL(); |
1074 CMdSSqLiteConnection& connection = MMdSDbConnectionPool::GetDefaultDBL(); |
1073 RMdSTransaction transaction( connection ); |
1075 RMdSTransaction transaction( connection ); |
1074 CleanupClosePushL( transaction ); |
1076 CleanupClosePushL( transaction ); |
1075 User::LeaveIfError( transaction.Error() ); |
1077 const TInt beginError( transaction.Error() ); |
|
1078 if( beginError != KErrNone ) |
|
1079 { |
|
1080 CleanupStack::PopAndDestroy( &transaction ); |
|
1081 } |
1076 |
1082 |
1077 iManipulate->CheckMassStorageMediaIdL( aMediaId ); |
1083 iManipulate->CheckMassStorageMediaIdL( aMediaId ); |
1078 |
1084 |
1079 transaction.CommitL(); |
1085 if( beginError == KErrNone ) |
1080 |
1086 { |
1081 CleanupStack::PopAndDestroy( &transaction ); |
1087 transaction.CommitL(); |
|
1088 CleanupStack::PopAndDestroy( &transaction ); |
|
1089 } |
1082 } |
1090 } |
1083 |
1091 |
1084 void CMdSManipulationEngine::AddRelationDefL( TDefId aNamespaceId, const TDesC& aRelationDefName ) |
1092 void CMdSManipulationEngine::AddRelationDefL( TDefId aNamespaceId, const TDesC& aRelationDefName ) |
1085 { |
1093 { |
1086 CMdsNamespaceDef* namespaceDef = CONST_CAST( CMdsNamespaceDef*, iSchema.GetNamespaceByIdL( aNamespaceId ) ); |
1094 CMdsNamespaceDef* namespaceDef = CONST_CAST( CMdsNamespaceDef*, iSchema.GetNamespaceByIdL( aNamespaceId ) ); |