omads/omadsextensions/adapters/agenda/src/nsmlagendadatastore.cpp
branchRCL_3
changeset 8 ad0f53516d84
parent 3 c2b8a5ae6ed5
child 34 800e4b6169c0
equal deleted inserted replaced
4:e6e896426eac 8:ad0f53516d84
    32 #include <sysutil.h>
    32 #include <sysutil.h>
    33 #include <SmlDataProvider.h>
    33 #include <SmlDataProvider.h>
    34 #include <SmlDataFormat.h>
    34 #include <SmlDataFormat.h>
    35 #include <SmlDataSyncDefs.h>
    35 #include <SmlDataSyncDefs.h>
    36 #include <data_caging_path_literals.hrh>
    36 #include <data_caging_path_literals.hrh>
    37 #include <nsmlagendadatastore_1_1_2.rsg>
    37 #include <NSmlAgendaDataStore_1_1_2.rsg>
    38 #include <e32property.h>
    38 #include <e32property.h>
    39 #include <DataSyncInternalPSKeys.h>
    39 #include <DataSyncInternalPSKeys.h>
    40 #include <CalenImporter.h>
    40 #include <CalenImporter.h>
    41 #include <CalenInterimUtils2.h>
    41 #include <CalenInterimUtils2.h>
    42 #include <utf.h>
    42 #include <utf.h>
  1509             }
  1509             }
  1510         delete agendautil;
  1510         delete agendautil;
  1511         delete calfilename;
  1511         delete calfilename;
  1512         }
  1512         }
  1513         
  1513         
       
  1514     iSnapshotRegistered = EFalse;
       
  1515     
  1514     // Update changefinder
  1516     // Update changefinder
  1515     if ( iChangeFinder )
  1517     if ( iChangeFinder )
  1516         {
  1518         {
  1517         iChangeFinder->ResetL();
  1519         iChangeFinder->ResetL();
  1518         }
  1520         RegisterSnapshotL();
  1519     iSnapshotRegistered = EFalse;
  1521         }
  1520     RegisterSnapshotL();
       
  1521     
       
  1522     User::RequestComplete( iCallerStatus, KErrNone );
  1522     User::RequestComplete( iCallerStatus, KErrNone );
  1523     
  1523     
  1524     FLOG(_L("CNSmlAgendaDataStore::DoDeleteAllItemsL: END"));
  1524     FLOG(_L("CNSmlAgendaDataStore::DoDeleteAllItemsL: END"));
  1525     }
  1525     }
  1526 
  1526 
  3265     // Profile ID Meta Property
  3265     // Profile ID Meta Property
  3266     keyBuff.Zero();
  3266     keyBuff.Zero();
  3267     keyBuff.AppendNum( EDeviceSyncProfileID );
  3267     keyBuff.AppendNum( EDeviceSyncProfileID );
  3268     TPckgC<TInt> pckgProfileIdValue( aProfileId );    
  3268     TPckgC<TInt> pckgProfileIdValue( aProfileId );    
  3269     calinfo->SetPropertyL( keyBuff, pckgProfileIdValue );
  3269     calinfo->SetPropertyL( keyBuff, pckgProfileIdValue );
       
  3270     
       
  3271     // Lock the SYNC option
       
  3272     keyBuff.Zero();
       
  3273     keyBuff.AppendNum( ESyncConfigEnabled );
       
  3274     TBool synclockstatus( ETrue );
       
  3275     TPckgC<TBool> pckgSyncLockValue( synclockstatus );
       
  3276     calinfo->SetPropertyL( keyBuff, pckgSyncLockValue );
  3270        
  3277        
  3271     // Create the CalFile
  3278     // Create the CalFile
  3272     HBufC* calfilename = CCalenMultiCalUtil::GetNextAvailableCalFileL();
  3279     HBufC* calfilename = CCalenMultiCalUtil::GetNextAvailableCalFileL();
  3273     calSession->CreateCalFileL( calfilename->Des(), *calinfo );
  3280     calSession->CreateCalFileL( calfilename->Des(), *calinfo );
  3274     CleanupStack::PopAndDestroy(calinfo);
  3281     CleanupStack::PopAndDestroy(calinfo);