omads/omadsextensions/adapters/agenda/src/nsmlagendadatastore.cpp
branchRCL_3
changeset 8 ad0f53516d84
parent 3 c2b8a5ae6ed5
child 20 800e4b6169c0
--- a/omads/omadsextensions/adapters/agenda/src/nsmlagendadatastore.cpp	Tue Feb 02 00:02:49 2010 +0000
+++ b/omads/omadsextensions/adapters/agenda/src/nsmlagendadatastore.cpp	Fri Feb 19 22:40:37 2010 +0200
@@ -34,7 +34,7 @@
 #include <SmlDataFormat.h>
 #include <SmlDataSyncDefs.h>
 #include <data_caging_path_literals.hrh>
-#include <nsmlagendadatastore_1_1_2.rsg>
+#include <NSmlAgendaDataStore_1_1_2.rsg>
 #include <e32property.h>
 #include <DataSyncInternalPSKeys.h>
 #include <CalenImporter.h>
@@ -1511,14 +1511,14 @@
         delete calfilename;
         }
         
+    iSnapshotRegistered = EFalse;
+    
     // Update changefinder
     if ( iChangeFinder )
         {
         iChangeFinder->ResetL();
+        RegisterSnapshotL();
         }
-    iSnapshotRegistered = EFalse;
-    RegisterSnapshotL();
-    
     User::RequestComplete( iCallerStatus, KErrNone );
     
     FLOG(_L("CNSmlAgendaDataStore::DoDeleteAllItemsL: END"));
@@ -3267,6 +3267,13 @@
     keyBuff.AppendNum( EDeviceSyncProfileID );
     TPckgC<TInt> pckgProfileIdValue( aProfileId );    
     calinfo->SetPropertyL( keyBuff, pckgProfileIdValue );
+    
+    // Lock the SYNC option
+    keyBuff.Zero();
+    keyBuff.AppendNum( ESyncConfigEnabled );
+    TBool synclockstatus( ETrue );
+    TPckgC<TBool> pckgSyncLockValue( synclockstatus );
+    calinfo->SetPropertyL( keyBuff, pckgSyncLockValue );
        
     // Create the CalFile
     HBufC* calfilename = CCalenMultiCalUtil::GetNextAvailableCalFileL();