equal
deleted
inserted
replaced
96 switch (aMode) |
96 switch (aMode) |
97 { |
97 { |
98 default: |
98 default: |
99 __LEAVE(KErrNotSupported); |
99 __LEAVE(KErrNotSupported); |
100 case TDbFormat::ECreate: |
100 case TDbFormat::ECreate: |
101 store=CPermanentFileStore::CreateL(iFs,aName,EFileRead|EFileWrite); |
101 store=CPermanentFileStore::CreateL(iFs,aName,EFileRead|EFileWrite); |
102 break; |
102 break; |
103 case TDbFormat::EReplace: |
103 case TDbFormat::EReplace: |
104 store=CPermanentFileStore::ReplaceL(iFs,aName,EFileRead|EFileWrite); |
104 store=CPermanentFileStore::ReplaceL(iFs,aName,EFileRead|EFileWrite); |
105 break; |
105 break; |
106 }; |
106 }; |
141 EXPORT_C void CDbFileStoreDatabase::OpenL(const TDesC& aName,TDbFormat::TOpen aMode) |
141 EXPORT_C void CDbFileStoreDatabase::OpenL(const TDesC& aName,TDbFormat::TOpen aMode) |
142 { |
142 { |
143 __ASSERT(!iName); // check construction phase |
143 __ASSERT(!iName); // check construction phase |
144 // |
144 // |
145 iName=aName.AllocL(); |
145 iName=aName.AllocL(); |
146 const TUint mode=aMode==TDbFormat::EReadOnly ? EFileShareReadersOnly : EFileWrite; |
146 TUint mode=aMode==TDbFormat::EReadOnly ? EFileShareReadersOnly : EFileWrite; |
147 CFileStore* store=CPermanentFileStore::OpenL(iFs,*iName,mode); |
147 CFileStore* store=CPermanentFileStore::OpenL(iFs,*iName,mode); |
148 iStore=store; |
148 iStore=store; |
149 CDbStoreDatabase::RestoreL(DatabaseIdL(store->Root())); |
149 CDbStoreDatabase::RestoreL(DatabaseIdL(store->Root())); |
150 } |
150 } |
151 |
151 |