--- a/omads/omadsextensions/adapters/notes/src/NSmlNotepadDataStore.cpp Thu May 27 12:45:29 2010 +0300
+++ b/omads/omadsextensions/adapters/notes/src/NSmlNotepadDataStore.cpp Fri Jun 11 13:29:32 2010 +0300
@@ -195,9 +195,8 @@
iDefaultStoreName = NULL;
}
iDefaultStoreName = HBufC::NewL( KNSmlDefaultStoreNameMaxSize );
- TInt len = iDefaultStoreName->Length();
- TPtr obptr = iDefaultStoreName->Des();
- iNpdDb->GetDefaultDatastoreName(obptr);
+ *iDefaultStoreName = KNSmlNotepadStoreName;
+
if(iOwnStoreFormat)
{
delete iOwnStoreFormat;
@@ -232,9 +231,10 @@
CDesCArray* CNSmlNotepadDataStore::DoListStoresLC()
{
_NOTEPAD_DBG_FILE("CNSmlNotepadDataStore::DoListStoresLC(): begin");
- CDesCArray* npdStores = iNpdDb->ListDatabasesL();
- CleanupStack::PushL( npdStores );
- _NOTEPAD_DBG_FILE("CNSmlNotepadDataStore::DoListStoresLC(): end");
+ CDesCArrayFlat *npdStores = new (ELeave)CDesCArrayFlat(1);
+ CleanupStack::PushL(npdStores);
+ npdStores->AppendL(KNSmlNotepadStoreName);
+ _NOTEPAD_DBG_FILE("CNSmlNotepadDataStore::DoListStoresLC(): end");
return npdStores;
}
@@ -247,10 +247,12 @@
MSmlSyncRelationship& aContext,
TRequestStatus& aStatus )
{
- iCallerStatus = &aStatus;
+ _NOTEPAD_DBG_FILE("CNSmlNotepadDataStore::DoOpenL(): begin");
+ iCallerStatus = &aStatus;
*iCallerStatus = KRequestPending;
if( iState != ENSmlClosed || iDataBaseOpened )
{
+
User::RequestComplete( iCallerStatus, KErrInUse );
return;
}
@@ -264,7 +266,7 @@
// Open the Database
TInt err( KErrNone );
- TRAP(err,iNpdDb->OpenL( aStoreName ));
+ TRAP(err,iNpdDb->OpenL( KNSmlNotepadDefaultStoreName ));
if ( err )
{
User::RequestComplete( iCallerStatus, err );
@@ -276,7 +278,8 @@
delete iOpenedStoreName;
iOpenedStoreName = NULL;
}
- iOpenedStoreName = aStoreName.Alloc();
+ iOpenedStoreName = HBufC::NewL( KNSmlDefaultStoreNameMaxSize );
+ *iOpenedStoreName = KNSmlNotepadStoreName;
iDataBaseOpened = ETrue;
@@ -290,6 +293,7 @@
err = FetchModificationsL();
+
iState = ENSmlOpenAndWaiting;
User::RequestComplete( iCallerStatus, err );