# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1286968545 -10800 # Node ID 2abf74df9cdca8bb0bf71696d14ac1e4a8e62331 # Parent 57a9de0b82e8f78123f39a36ad92693d2cf70062 Revision: 201039 Kit: 201041 diff -r 57a9de0b82e8 -r 2abf74df9cdc omads/omadsappui/AiwSyncProvider/src/AiwSyncProvider.cpp --- a/omads/omadsappui/AiwSyncProvider/src/AiwSyncProvider.cpp Wed Sep 15 11:57:08 2010 +0300 +++ b/omads/omadsappui/AiwSyncProvider/src/AiwSyncProvider.cpp Wed Oct 13 14:15:45 2010 +0300 @@ -25,7 +25,7 @@ #include // for resource and bitmap directories -#include +#include #include "AiwSyncProvider.h" #include "AiwSyncProviderUids.hrh" #include "AiwSyncProvider.rh" diff -r 57a9de0b82e8 -r 2abf74df9cdc omads/omadsappui/AspPreSyncPlugin/src/AspPreSyncDefaultPlugin.cpp --- a/omads/omadsappui/AspPreSyncPlugin/src/AspPreSyncDefaultPlugin.cpp Wed Sep 15 11:57:08 2010 +0300 +++ b/omads/omadsappui/AspPreSyncPlugin/src/AspPreSyncDefaultPlugin.cpp Wed Oct 13 14:15:45 2010 +0300 @@ -31,9 +31,9 @@ #include -#include +#include #include -#include //For enum TRoamingSettings +#include //For enum TRoamingSettings #include //For central Repository // ============================== MEMBER FUNCTIONS ============================ diff -r 57a9de0b82e8 -r 2abf74df9cdc omads/omadsappui/AspSyncUtil/inc/AspResHandler.h --- a/omads/omadsappui/AspSyncUtil/inc/AspResHandler.h Wed Sep 15 11:57:08 2010 +0300 +++ b/omads/omadsappui/AspSyncUtil/inc/AspResHandler.h Wed Oct 13 14:15:45 2010 +0300 @@ -149,17 +149,15 @@ */ static CDesCArrayFlat* ReadDesArrayStaticLC(TInt aResourceId); - /* Implementation of CMCC PIM v3 begins*/ /** * Reads progress dialog progress text from resource file. * @param aContent Content name. * @param aCurrent Currently processed sync item. * @param aFinal Number of sync items. - * @param aPhase Phase of synchronization. + * @param aSend ETrue is sync phase is "sending". * @return Progress text. */ - HBufC* ReadProgressTextLC(const TDesC& aContent, TInt aCurrent, TInt aFinal, TInt aPhase); - /* Implementation of CMCC PIM v3 ends*/ + //HBufC* ReadProgressTextLC(const TDesC& aContent, TInt aCurrent, TInt aFinal, TInt aPhase); /** * Reads progress dialog progress text from resource file. @@ -178,19 +176,6 @@ */ HBufC* ReadProgressTextLC(TInt aResourceId, const TDesC& aContent); - /* Implementation of CMCC PIM v3 begins*/ - /** - * Reads progress dialog progress text from resource file. - * Buffers the last aResource to minimize file operations. - * @param aResourceId Resource id. - * @param aCurrent Currently processed sync item. - * @param aFinal Number of sync items. - * @param aContent Content name. - * @return Progress text. - */ - HBufC* ReadProgressTextLC(TInt aResourceId, TInt aCurrent, TInt aFinal, const TDesC& aContent); - /* Implementation of CMCC PIM v3 ends*/ - /** * Reads default profile name from resource file. * @param aIndex Number that is added to proile name (eg. "New Profile(1)"). diff -r 57a9de0b82e8 -r 2abf74df9cdc omads/omadsappui/AspSyncUtil/loc/NSmlDSSync.loc --- a/omads/omadsappui/AspSyncUtil/loc/NSmlDSSync.loc Wed Sep 15 11:57:08 2010 +0300 +++ b/omads/omadsappui/AspSyncUtil/loc/NSmlDSSync.loc Wed Oct 13 14:15:45 2010 +0300 @@ -1472,26 +1472,6 @@ // #define qtn_sml_sync_sending "Sending %0U" -/* Implementation of CMCC PIM v3 begins*/ -//d:changing text displayed at synchronising stage -//d:Image replaced by animation -//l:popup_note_wait_window -//r:9.2 -//for TD-SCDMA products only -// -#define qtn_sml_sync_sending_xofy_tdscdma "Sending %0N of %1N %0U" -/* Implementation of CMCC PIM v3 ends*/ - -/* Implementation of CMCC PIM v3 begins*/ -//d:changing text displayed at synchronising stage -//d:Image replaced by animation -//l:popup_note_wait_window -//r:9.2 -//for TD-SCDMA products only -// -#define qtn_sml_sync_sending_xofy_cal_tdscdma "Sending %0N of %1N of calendar entries" -/* Implementation of CMCC PIM v3 ends*/ - //d:changing text displayed at synchronising stage //d:Image replaced by animation //l:popup_note_wait_window @@ -1499,26 +1479,6 @@ // #define qtn_sml_sync_receiving "Receiving %0U" -/* Implementation of CMCC PIM v3 begins*/ -//d:changing text displayed at synchronising stage -//d:Image replaced by animation -//l:popup_note_wait_window -//r:9.2 -//for TD-SCDMA products only -// -#define qtn_sml_sync_receiving_xofy_tdscdma "Receiving %0U:%0N" -/* Implementation of CMCC PIM v3 ends*/ - -/* Implementation of CMCC PIM v3 begins*/ -//d:changing text displayed at synchronising stage -//d:Image replaced by animation -//l:popup_note_wait_window -//r:9.2 -//for TD-SCDMA products only -// -#define qtn_sml_sync_receiving_xofy_cal_tdscdma "Receiving calendar entries:%0N" -/* Implementation of CMCC PIM v3 ends*/ - //d:changing text displayed at disconnect stage //d:Image replaced by animation //l:popup_note_wait_window @@ -1540,15 +1500,7 @@ // #define qtn_sml_sync_cancel "Cancelling\n" -/* Implementation of CMCC PIM v3 begins*/ -//d:changing text displayed at synchronising stage -//d:Image replaced by animation -//l:popup_note_window -//r:9.2 -//for TD-SCDMA products only -// -#define qtn_nsml_log_err_serverfull_tdscdma "Server memory is full" -/* Implementation of CMCC PIM v3 ends*/ + diff -r 57a9de0b82e8 -r 2abf74df9cdc omads/omadsappui/AspSyncUtil/src/AspProfile.cpp --- a/omads/omadsappui/AspSyncUtil/src/AspProfile.cpp Wed Sep 15 11:57:08 2010 +0300 +++ b/omads/omadsappui/AspSyncUtil/src/AspProfile.cpp Wed Oct 13 14:15:45 2010 +0300 @@ -40,8 +40,8 @@ #include #include +_LIT(KDrive ,"C:"); _LIT(KCharUnderscore, "_"); -_LIT( KNSmlAgendaFileNameForDefaultDB, "c:calendar" ); /******************************************************************************* * class TAspProviderItem @@ -1241,7 +1241,7 @@ if (aDataProvider.iDataProviderId == KUidNSmlAdapterCalendar.iUid ) { TBuf<128> calLocalDb ; - CreateCalLocalDatabaseL(calLocalDb); + CreateCalLocalDatabaseL(calLocalDb); task.CreateL(iProfile->Profile(), aDataProvider.iDataProviderId, KNullDesC, calLocalDb); } @@ -1316,7 +1316,8 @@ if (err != KErrNone) { CreateCalLocalDatabaseL(calLocalDb); - } + } + task.CreateL(iProfile->Profile(), aDataProviderId, aRemoteDatabase, calLocalDb); } @@ -1336,7 +1337,8 @@ if (err != KErrNone) { CreateCalLocalDatabaseL(calLocalDb); - } + } + task.CreateL(iProfile->Profile(), aDataProviderId, aRemoteDatabase, calLocalDb); } @@ -1387,7 +1389,8 @@ // void CAspContentList::CreateCalLocalDatabaseL(TDes& aCalName) { - + + aCalName.Copy(KDrive); TBuf buffer; iProfile->GetName(buffer); @@ -1506,8 +1509,8 @@ // Create the CalFile HBufC* calfilename = CCalenMultiCalUtil::GetNextAvailableCalFileL(); calSession->CreateCalFileL( calfilename->Des(), *calinfo ); - - aCalName.Copy(KNSmlAgendaFileNameForDefaultDB); + + aCalName.Copy( calfilename->Des() ); delete calfilename; diff -r 57a9de0b82e8 -r 2abf74df9cdc omads/omadsappui/AspSyncUtil/src/AspResHandler.cpp --- a/omads/omadsappui/AspSyncUtil/src/AspResHandler.cpp Wed Sep 15 11:57:08 2010 +0300 +++ b/omads/omadsappui/AspSyncUtil/src/AspResHandler.cpp Wed Oct 13 14:15:45 2010 +0300 @@ -227,54 +227,6 @@ TUtil::StrCopy(aText, parse.FullName()); } -/* Implementation of CMCC PIM v3 begins*/ -// ----------------------------------------------------------------------------- -// CAspResHandler::ReadProgressTextLC -// -// ----------------------------------------------------------------------------- -// -HBufC* CAspResHandler::ReadProgressTextLC(const TDesC& aContent, TInt aCurrent, TInt aFinal, TInt aPhase) - { - HBufC* hBuf = NULL; - - TBool isCalendar = EFalse; - HBufC* content = ReadLC(R_ASP_CONTENT_NAME_CALENDAR); - if ( !content->Compare(aContent) ) - { - isCalendar = ETrue; - } - CleanupStack::PopAndDestroy(content); //content - - if (aPhase == CAspState::EPhaseSending) - { - if (isCalendar) - { - hBuf = ReadProgressTextLC(R_QTN_SML_SYNC_SENDING_XOFY_CAL, aCurrent, aFinal, aContent); - } - else - { - hBuf = ReadProgressTextLC(R_QTN_SML_SYNC_SENDING_XOFY, aCurrent, aFinal, aContent); - } - } - else if (aPhase == CAspState::EPhaseReceiving) - { - if (isCalendar) - { - hBuf = ReadProgressTextLC(R_QTN_SML_SYNC_RECEIVING_XOFY_CAL, aCurrent, aFinal, aContent); - } - else - { - hBuf = ReadProgressTextLC(R_QTN_SML_SYNC_RECEIVING_XOFY, aCurrent, aFinal, aContent); - } - } - else - { - hBuf = HBufC::NewLC(0); // empty string - } - - return hBuf; - } -/* Implementation of CMCC PIM v3 ends*/ // ----------------------------------------------------------------------------- // CAspResHandler::ReadProgressTextL @@ -336,61 +288,6 @@ return hBuf; } -/* Implementation of CMCC PIM v3 begins*/ -// ----------------------------------------------------------------------------- -// CAspResHandler::ReadProgressTextL -// -// Function constructs progress dialog text that is shown with progress bar. -// Text format is one of the following: -// "Sending %0N of %1N %U" -// "Receiving %0U: %0N" -// ----------------------------------------------------------------------------- -// -HBufC* CAspResHandler::ReadProgressTextLC(TInt aResourceId, TInt aCurrent, TInt aFinal, const TDesC& aContent) - { - - if (aResourceId != iProgressTextFormatId) - { - delete iProgressTextFormat; - iProgressTextFormat = NULL; - iProgressTextFormat = StringLoader::LoadL(aResourceId, iEikEnv); - iProgressTextFormatId = aResourceId; - } - - TInt len = iProgressTextFormat->Length() + aContent.Length();// + 8; - - HBufC* hBuf = HBufC::NewLC(len); - TPtr ptr = hBuf->Des(); - - HBufC* temp = HBufC::NewLC(len); - TPtr tempPtr = temp->Des(); - - if (iProgressTextFormatId == R_QTN_SML_SYNC_RECEIVING_XOFY || iProgressTextFormatId == R_QTN_SML_SYNC_RECEIVING_XOFY_CAL) - { - // replace %0N with current item - StringLoader::Format(tempPtr, iProgressTextFormat->Des(), 0, aCurrent); - } - else - { - // replace %0N with current item - StringLoader::Format(ptr, iProgressTextFormat->Des(), 0, aCurrent); - // replace %1N with total items - StringLoader::Format(tempPtr, ptr, 1, aFinal); - } - if (iProgressTextFormatId == R_QTN_SML_SYNC_RECEIVING_XOFY_CAL || iProgressTextFormatId == R_QTN_SML_SYNC_SENDING_XOFY_CAL) - { - ptr.Copy(tempPtr); - } - else - { - // replace %0U with content name (eg "Contacts") - StringLoader::Format(ptr, tempPtr, 0, aContent); - } - CleanupStack::PopAndDestroy(temp); //temp - - return hBuf; - } -/* Implementation of CMCC PIM v3 ends*/ // ----------------------------------------------------------------------------- // CAspResHandler::ReadProfileInfoTextLC diff -r 57a9de0b82e8 -r 2abf74df9cdc omads/omadsappui/AspSyncUtil/src/AspSyncHandler.cpp --- a/omads/omadsappui/AspSyncUtil/src/AspSyncHandler.cpp Wed Sep 15 11:57:08 2010 +0300 +++ b/omads/omadsappui/AspSyncUtil/src/AspSyncHandler.cpp Wed Oct 13 14:15:45 2010 +0300 @@ -35,7 +35,7 @@ #include "AspPreSyncPluginInterface.h" #include -#include + /****************************************************************************** * class TAspSyncParam @@ -890,18 +890,7 @@ Dialog()->SetProgress(State()->Progress()); } - /* Implementation of CMCC PIM v3 begins*/ - HBufC* hBuf = NULL; - if ( FeatureManager::FeatureSupported(KFeatureIdFfTdCmccpimsynchronizationprogressindicatorui) ) - { - // CMCC sync progress indicator enabled - hBuf = ResHandlerL()->ReadProgressTextLC(State()->Content(), State()->Progress(), State()->TotalProgress(), phase); - } - else - { - hBuf = ResHandlerL()->ReadProgressTextLC(State()->Content(), phase); - } - /* Implementation of CMCC PIM v3 ends*/ + HBufC* hBuf = ResHandlerL()->ReadProgressTextLC(State()->Content(), phase); #ifdef _DEBUG diff -r 57a9de0b82e8 -r 2abf74df9cdc omads/omadsappui/AspSyncUtil/src/AspSyncUtil.rss --- a/omads/omadsappui/AspSyncUtil/src/AspSyncUtil.rss Wed Sep 15 11:57:08 2010 +0300 +++ b/omads/omadsappui/AspSyncUtil/src/AspSyncUtil.rss Wed Oct 13 14:15:45 2010 +0300 @@ -231,13 +231,7 @@ //RESOURCE TBUF r_qtn_nsml_receving { buf = qtn_sml_sync_recv; } RESOURCE TBUF r_qtn_sml_sync_receiving { buf = qtn_sml_sync_receiving; } RESOURCE TBUF r_qtn_sml_sync_sending { buf = qtn_sml_sync_sending; } -/* Implementation of CMCC PIM v3 begins*/ -RESOURCE TBUF r_qtn_sml_sync_receiving_xofy { buf = qtn_sml_sync_receiving_xofy_tdscdma; } -RESOURCE TBUF r_qtn_sml_sync_sending_xofy { buf = qtn_sml_sync_sending_xofy_tdscdma; } -RESOURCE TBUF r_qtn_sml_sync_receiving_xofy_cal { buf = qtn_sml_sync_receiving_xofy_cal_tdscdma; } -RESOURCE TBUF r_qtn_sml_sync_sending_xofy_cal { buf = qtn_sml_sync_sending_xofy_cal_tdscdma; } -RESOURCE TBUF r_qtn_nsml_log_err_serverfull { buf = qtn_nsml_log_err_serverfull_tdscdma; } -/* Implementation of CMCC PIM v3 ends*/ + // log dialog strings RESOURCE TBUF r_sml_log_synclog_title { buf = qtn_sml_log_synclog_title; } diff -r 57a9de0b82e8 -r 2abf74df9cdc omads/omadsappui/AspSyncUtil/src/AspUtil.cpp --- a/omads/omadsappui/AspSyncUtil/src/AspUtil.cpp Wed Sep 15 11:57:08 2010 +0300 +++ b/omads/omadsappui/AspSyncUtil/src/AspUtil.cpp Wed Oct 13 14:15:45 2010 +0300 @@ -2446,15 +2446,6 @@ id = R_ASP_LOG_ERR_SERVERERROR; // "Error in sync server" break; - /* Implementation of CMCC PIM v3 begins*/ - case SyncMLError::KErrServerFull: - if ( FeatureManager::FeatureSupported(KFeatureIdFfTdCmccpimpromptserverfullwhenreceive420statuscodefromserver) ) - { - id = R_QTN_NSML_LOG_ERR_SERVERFULL; - } - break; - /* Implementation of CMCC PIM v3 ends*/ - default: id = R_ASP_LOG_ERR_SYSTEMERROR; // "System Error" break; diff -r 57a9de0b82e8 -r 2abf74df9cdc omads/omadsappui/OmaDsAppUiPlugin/src/OmaDsAppUiPluginInterface.cpp --- a/omads/omadsappui/OmaDsAppUiPlugin/src/OmaDsAppUiPluginInterface.cpp Wed Sep 15 11:57:08 2010 +0300 +++ b/omads/omadsappui/OmaDsAppUiPlugin/src/OmaDsAppUiPluginInterface.cpp Wed Oct 13 14:15:45 2010 +0300 @@ -33,7 +33,7 @@ #include "OmaDsAppUiPluginInterface.h" #include "gsprivatepluginproviderids.h" #include -#include "nsmldsgspluginresource.rsg" +#include "NsmlDSGSPluginResource.rsg" _LIT(KNsmlDsIconFileName, "Z:\\resource\\apps\\nsmldssync.mif"); diff -r 57a9de0b82e8 -r 2abf74df9cdc omads/omadsappui/ui/src/NSmlDSSyncAppUi.cpp --- a/omads/omadsappui/ui/src/NSmlDSSyncAppUi.cpp Wed Sep 15 11:57:08 2010 +0300 +++ b/omads/omadsappui/ui/src/NSmlDSSyncAppUi.cpp Wed Oct 13 14:15:45 2010 +0300 @@ -22,7 +22,7 @@ #include "NSmlDSSyncContainer.h" #include "NSmlDSSyncDocument.h" -#include +#include #include "NSmlDSSync.hrh" #include "AspDebug.h" diff -r 57a9de0b82e8 -r 2abf74df9cdc omads/omadsextensions/adapters/agenda/inc/nsmlagendadebug.h --- a/omads/omadsextensions/adapters/agenda/inc/nsmlagendadebug.h Wed Sep 15 11:57:08 2010 +0300 +++ b/omads/omadsextensions/adapters/agenda/inc/nsmlagendadebug.h Wed Oct 13 14:15:45 2010 +0300 @@ -29,6 +29,8 @@ _LIT(KLogDirFullName,"c:\\logs\\"); _LIT(KLogDir,"MultiCalDB"); +#ifdef _DEBUG + // Declare the FPrint function inline void FPrint(const TRefByValue aFmt, ...) { @@ -57,6 +59,8 @@ #define FLOG(arg...) #define FTRACE(a) +#endif // _DEBUG + #endif // NSMLDSSYNC__DEBUG_H // End of File diff -r 57a9de0b82e8 -r 2abf74df9cdc omads/omadsextensions/adapters/agenda/src/nsmlagendadataprovider.cpp --- a/omads/omadsextensions/adapters/agenda/src/nsmlagendadataprovider.cpp Wed Sep 15 11:57:08 2010 +0300 +++ b/omads/omadsextensions/adapters/agenda/src/nsmlagendadataprovider.cpp Wed Oct 13 14:15:45 2010 +0300 @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include #include diff -r 57a9de0b82e8 -r 2abf74df9cdc omads/omadsextensions/adapters/agenda/src/nsmlagendadatastore.cpp --- a/omads/omadsextensions/adapters/agenda/src/nsmlagendadatastore.cpp Wed Sep 15 11:57:08 2010 +0300 +++ b/omads/omadsextensions/adapters/agenda/src/nsmlagendadatastore.cpp Wed Oct 13 14:15:45 2010 +0300 @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include #include @@ -217,8 +217,6 @@ iCommittedUidArr->Reset(); delete iCommittedUidArr; } - - delete iAgendaAdapterLog; FLOG(_L("CNSmlAgendaDataStore::~CNSmlAgendaDataStore(): END")); } @@ -257,7 +255,38 @@ { FLOG(_L("CNSmlAgendaDataStore::DoOpenL: Calling the OpenStoreL: '%S'"), &aStoreName); TRAP( err, OpenStoreL() ); - } + } + else + { + // Provided profile is created from the DS Application + FLOG(_L("CNSmlAgendaDataStore::DoOpenL: storename: '%S'"), &aStoreName); + if ( iOpenedStoreName ) + { + delete iOpenedStoreName; + iOpenedStoreName = NULL; + } + iOpenedStoreName = aStoreName.AllocL(); + + CCalSession* calsession = CCalSession::NewL(); + CleanupStack::PushL(calsession); + TRAP( err, calsession->OpenL( aStoreName ) ); + if ( err ) + { + FLOG(_L("CNSmlAgendaDataStore::DoOpenL: Cannot open the session: '%d'"), err); + CleanupStack::PopAndDestroy( calsession ); + User::RequestComplete( iCallerStatus, err ); + return; + } + + // Disable notifications + TRAP_IGNORE( calsession->DisablePubSubNotificationsL() ); + TRAP_IGNORE( calsession->DisableChangeBroadcast() ); + // Get ID of database + calsession->FileIdL( iOpenedStoreId ); + + // Close the session + CleanupStack::PopAndDestroy( calsession ); + } if ( err ) { @@ -274,11 +303,6 @@ iChangeFinder = CNSmlChangeFinder::NewL( aContext, iKey, iHasHistory, KNSmlAgendaAdapterImplUid ); - if (iAgendaAdapterLog) - { - delete iAgendaAdapterLog; - iAgendaAdapterLog = NULL; - } iAgendaAdapterLog = CNSmlAgendaAdapterLog::NewL( aContext ); iState = ENSmlOpenAndWaiting; User::RequestComplete( iCallerStatus, err ); diff -r 57a9de0b82e8 -r 2abf74df9cdc omads/omadsextensions/adapters/contacts/src/NSmlContactsDataProvider.cpp --- a/omads/omadsextensions/adapters/contacts/src/NSmlContactsDataProvider.cpp Wed Sep 15 11:57:08 2010 +0300 +++ b/omads/omadsextensions/adapters/contacts/src/NSmlContactsDataProvider.cpp Wed Oct 13 14:15:45 2010 +0300 @@ -28,8 +28,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff -r 57a9de0b82e8 -r 2abf74df9cdc omads/omadsextensions/adapters/contacts/src/NSmlContactsDataStore.cpp --- a/omads/omadsextensions/adapters/contacts/src/NSmlContactsDataStore.cpp Wed Sep 15 11:57:08 2010 +0300 +++ b/omads/omadsextensions/adapters/contacts/src/NSmlContactsDataStore.cpp Wed Oct 13 14:15:45 2010 +0300 @@ -27,8 +27,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff -r 57a9de0b82e8 -r 2abf74df9cdc omads/omadsextensions/dsutils/nsmldefaultagendahandler/inc/nsmldefaultagendahandlerdebug.h --- a/omads/omadsextensions/dsutils/nsmldefaultagendahandler/inc/nsmldefaultagendahandlerdebug.h Wed Sep 15 11:57:08 2010 +0300 +++ b/omads/omadsextensions/dsutils/nsmldefaultagendahandler/inc/nsmldefaultagendahandlerdebug.h Wed Oct 13 14:15:45 2010 +0300 @@ -29,6 +29,8 @@ _LIT(KLogDirFullName,"c:\\logs\\"); _LIT(KLogDir,"MultiCalDB"); +#ifdef _DEBUG + // Declare the FPrint function inline void FPrint(const TRefByValue aFmt, ...) { @@ -57,6 +59,8 @@ #define FLOG(arg...) #define FTRACE(a) +#endif // _DEBUG + #endif // NSML_DEFAULTAGENDAHANDLER_DEBUG_H // End of File