--- a/contentctrl_plat/adapter_customization_api/group/bld.inf Fri Mar 12 15:41:30 2010 +0200
+++ b/contentctrl_plat/adapter_customization_api/group/bld.inf Mon Mar 15 12:39:28 2010 +0200
@@ -23,9 +23,9 @@
PRJ_EXPORTS
-..\inc\NSmlContactsDataProvider.h APP_LAYER_PLATFORM_EXPORT_PATH(NSmlContactsDataProvider.h)
-..\inc\NSmlContactsDataStore.h APP_LAYER_PLATFORM_EXPORT_PATH(NSmlContactsDataStore.h)
-..\inc\MContactsModsFetcher.h APP_LAYER_PLATFORM_EXPORT_PATH(MContactsModsFetcher.h)
+../inc/NSmlContactsDataProvider.h APP_LAYER_PLATFORM_EXPORT_PATH(NSmlContactsDataProvider.h)
+../inc/NSmlContactsDataStore.h APP_LAYER_PLATFORM_EXPORT_PATH(NSmlContactsDataStore.h)
+../inc/MContactsModsFetcher.h APP_LAYER_PLATFORM_EXPORT_PATH(MContactsModsFetcher.h)
PRJ_TESTMMPFILES
-..\tsrc\DummyAdapter\group\nsmldummydataprovider.mmp
+../tsrc/DummyAdapter/group/nsmldummydataprovider.mmp
--- a/contentctrl_plat/adapter_customization_api/inc/NSmlContactsDataStore.h Fri Mar 12 15:41:30 2010 +0200
+++ b/contentctrl_plat/adapter_customization_api/inc/NSmlContactsDataStore.h Mon Mar 15 12:39:28 2010 +0200
@@ -765,6 +765,7 @@
CVPbkVCardEng* iVCardEngine ;
MVPbkContactLink* iContactLink;
CVPbkContactLinkArray* iContactLnks;
+ MVPbkContactOperationBase* iDeleteAllOperation;
};
--- a/omads/omadsappui/AspSyncUtil/inc/AspDefines.h Fri Mar 12 15:41:30 2010 +0200
+++ b/omads/omadsappui/AspSyncUtil/inc/AspDefines.h Mon Mar 15 12:39:28 2010 +0200
@@ -77,6 +77,8 @@
const TUid KUidNSmlAdapterSms = { 0x10206B5C };
const TUid KUidNSmlAdapterMMS = { 0x101FB0E9 };
const TUid KUidNSmlAdapterBookmarks = { 0x102751BA };
+const TUid KUidNsmlAdapterCntGrps = { 0x101FF972 };
+const TUid KUidNsmlAdapterMedia = { 0x2001a9a1 };
// convergence sync adapder uids
//const TUid KUidNSmlAdapterCalendar = { 0x10009FD1 };
--- a/omads/omadsappui/AspSyncUtil/src/AspProfile.cpp Fri Mar 12 15:41:30 2010 +0200
+++ b/omads/omadsappui/AspSyncUtil/src/AspProfile.cpp Mon Mar 15 12:39:28 2010 +0200
@@ -22,7 +22,7 @@
#include <SyncMLTransportProperties.h>
#include <featmgr.h> // FeatureManager
#include <centralrepository.h> // CRepository
-#include <NSmlOperatorDataCRKeys.h> // KCRUidOperatorDatasyncInternalKeys
+#include <NsmlOperatorDataCRKeys.h> // KCRUidOperatorDatasyncInternalKeys
#include <calsession.h>
#include <calcalendarinfo.h>
@@ -34,6 +34,7 @@
#include "AspDialogUtil.h"
#include "AspDebug.h"
#include "AspSchedule.h"
+#include "AspDefines.h"
#include <centralrepository.h> //CRepository
#include <calenmulticaluids.hrh> // Calendar File Meta Data Properties
#include <calenmulticalutil.h>
@@ -428,6 +429,14 @@
TAspProviderItem item;
ReadDataProviderItemL(provider, item);
+ if( (item.iDataProviderId == KUidNsmlAdapterCntGrps.iUid) ||
+ (item.iDataProviderId == KUidNSmlAdapterSms.iUid) ||
+ (item.iDataProviderId == KUidNSmlAdapterMMS.iUid) ||
+ (item.iDataProviderId == KUidNsmlAdapterMedia.iUid))
+ {
+ CleanupStack::PopAndDestroy(&provider);
+ continue;
+ }
item.iIsIncludedInSync = EFalse;
if (TUtil::IsEmpty(item.iDisplayName))
--- a/omads/omadsappui/AspSyncUtil/src/AspSyncHandler.cpp Fri Mar 12 15:41:30 2010 +0200
+++ b/omads/omadsappui/AspSyncUtil/src/AspSyncHandler.cpp Mon Mar 15 12:39:28 2010 +0200
@@ -30,9 +30,11 @@
#include <ecom/implementationinformation.h>
#include <rconnmon.h>
#include <e32std.h> //For TRequestStatus
+#include <e32property.h>
#include "CPreSyncPlugin.h"
#include "AspPreSyncPluginInterface.h"
+#include <DataSyncInternalPSKeys.h>
/******************************************************************************
@@ -100,6 +102,7 @@
}
delete iWait;
+ RProperty::Delete(KPSUidNSmlDSSyncApp, KDsJobCancel);
CloseSyncSession();
@@ -128,7 +131,13 @@
iSyncSessionOpen = EFalse;
iWait = new (ELeave) CActiveSchedulerWait();
-
+ //Define property for cancel operation.
+ static _LIT_SECURITY_POLICY_PASS(KAllowAllPolicy);
+ static _LIT_SECURITY_POLICY_C1(KAllowWriteDeviceDataPolicy, ECapabilityWriteDeviceData);
+ RProperty::Define( KPSUidNSmlDSSyncApp,KDsJobCancel,RProperty::EInt,
+ KAllowAllPolicy,KAllowWriteDeviceDataPolicy);
+ RProperty::Set( KPSUidNSmlDSSyncApp,
+ KDsJobCancel, KErrNone );
FLOG( _L("CAspSyncHandler::ConstructL END") );
}
@@ -179,6 +188,9 @@
// close handling (eg. end key)
if (aButtonId == EKeyPhoneEnd && syncRunning)
{
+ //Set Cancel property when user cancel the Caopy All from Server.
+ RProperty::Set( KPSUidNSmlDSSyncApp,
+ KDsJobCancel, KErrCancel );
TRAPD(err, iSyncJob.StopL());
if (err != KErrNone)
@@ -206,6 +218,9 @@
// cancel key handling
if (aButtonId == EEikBidCancel && syncRunning)
{
+ RProperty::Set( KPSUidNSmlDSSyncApp,
+ KDsJobCancel, KErrCancel );
+
if (iStopEventReceived)
{
CompleteWithDelay(KErrNone);
@@ -419,6 +434,12 @@
{
FLOG( _L("CAspSyncHandler::DoSynchronizeL START") );
+ //set the cancel Pub sub key to none
+ if(aSyncParam.iSyncDirection == ESyncDirectionRefreshFromServer)
+ {
+ RProperty::Set( KPSUidNSmlDSSyncApp,
+ KDsJobCancel, KErrNone );
+ }
iApplicationId = aSyncParam.iApplicationId;
iProfileId = aSyncParam.iProfileId;
if (aSyncParam.iDialogMode == EModeDialogWait)
@@ -491,7 +512,8 @@
FLOG( _L("CAspSyncHandler::SynchronizeCompleted START") );
iSyncRunning = EFalse;
-
+ RProperty::Set( KPSUidNSmlDSSyncApp,
+ KDsJobCancel, KErrNone );
if (aError != KErrNone)
{
iSyncError = aError;
@@ -550,6 +572,9 @@
if (aEvent == EJobStop)
{
+ RProperty::Set( KPSUidNSmlDSSyncApp,
+ KDsJobCancel, KErrNone );
+
iStopEventReceived = ETrue;
if (aError != KErrNone)
{
@@ -568,6 +593,8 @@
if (aEvent == EJobStartFailed || aEvent == EJobRejected)
{
+ RProperty::Set( KPSUidNSmlDSSyncApp,
+ KDsJobCancel, KErrNone );
CompleteWithDelay(aError);
}
--- a/omads/omadsextensions/adapters/contacts/src/NSmlContactsDataStore.cpp Fri Mar 12 15:41:30 2010 +0200
+++ b/omads/omadsextensions/adapters/contacts/src/NSmlContactsDataStore.cpp Mon Mar 15 12:39:28 2010 +0200
@@ -125,7 +125,11 @@
iStoreName = NULL;
iRetCommand = KErrNone;
iLastOperation = ENSmlNone;
-
+ if(iDeleteAllOperation)
+ {
+ delete iDeleteAllOperation;
+ iDeleteAllOperation = NULL;
+ }
_DBG_FILE("CNSmlContactsDataStore::CNSmlContactsDataStore(): end");
}
@@ -202,11 +206,13 @@
{
TRAP_IGNORE( iChangeFinder->CloseL() );
delete iChangeFinder;
+ iChangeFinder = NULL;
}
if(iIdConverter)
{
delete iIdConverter;
+ iIdConverter = NULL;
}
if(iContactLnks)
{
@@ -221,6 +227,7 @@
{
iContactsModsFetcher->CancelRequest();
delete iContactsModsFetcher;
+ iContactsModsFetcher = NULL;
}
if ( iContactManager )
{
@@ -229,6 +236,7 @@
iStore->Close( *this );
}
delete iContactManager;
+ iContactManager = NULL;
}
@@ -275,6 +283,12 @@
iAddResultArray.Close();
+ if(iDeleteAllOperation)
+ {
+ delete iDeleteAllOperation;
+ iDeleteAllOperation = NULL;
+ }
+
}
// ----------------------------------------------------------------------------
@@ -360,6 +374,34 @@
EXPORT_C void CNSmlContactsDataStore::DoCancelRequest()
{
_DBG_FILE("CNSmlContactsDataStore::DoCancelRequest(): begin");
+ if(iLastOperation == ENSMLDeleteAllOp)
+ {
+ if(iDeleteAllOperation)
+ {
+ delete iDeleteAllOperation;
+ iDeleteAllOperation = NULL;
+ }
+
+ if( iChangeFinder )
+ {
+ TRAP_IGNORE(iChangeFinder->ResetL());
+ }
+ iSnapshotRegistered = EFalse;
+
+ if(iContactLnks)
+ {
+ delete iContactLnks;
+ iContactLnks = NULL;
+ iContactLink = NULL;
+ }
+
+ if(iContactViewBase)
+ {
+ delete iContactViewBase;
+ iContactViewBase = NULL;
+ }
+ User::RequestComplete( iCallerStatus, KErrCancel );
+ }
if(iContactsModsFetcher)
{
iContactsModsFetcher->CancelRequest();
--- a/omads/omadsextensions/datamod/bld/nsmldatamod.mmp Fri Mar 12 15:41:30 2010 +0200
+++ b/omads/omadsextensions/datamod/bld/nsmldatamod.mmp Mon Mar 15 12:39:28 2010 +0200
@@ -33,8 +33,6 @@
APP_LAYER_SYSTEMINCLUDE
-USERINCLUDE ../inc
-
SOURCEPATH ../src
SOURCE nsmldatamodbase.cpp
SOURCE NSmlProperty.cpp