Revision: 201003 default PDK_3.0.g
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 02 Feb 2010 00:02:49 +0000
changeset 4 e6e896426eac
parent 3 c2b8a5ae6ed5
child 8 ad0f53516d84
Revision: 201003 Kit: 201005
omads/omadsappui/AiwSyncProvider/group/ABLD.BAT
omads/omadsappui/AspPreSyncPlugin/group/ABLD.BAT
omads/omadsappui/AspSyncUtil/group/ABLD.BAT
omads/omadsappui/AspSyncUtil/src/AspProfile.cpp
omads/omadsappui/AspSyncUtil/src/AspScheduleDialog.cpp
omads/omadsappui/group/ABLD.BAT
omads/omadsappui/help/inc/ds.hlp.hrh
omads/omadsappui/ui/group/ABLD.BAT
--- a/omads/omadsappui/AiwSyncProvider/group/ABLD.BAT	Mon Jan 18 20:08:41 2010 +0200
+++ b/omads/omadsappui/AiwSyncProvider/group/ABLD.BAT	Tue Feb 02 00:02:49 2010 +0000
@@ -2,9 +2,9 @@
 rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
 rem All rights reserved.
 rem This component and the accompanying materials are made available
-rem under the terms of the License "Symbian Foundation License v1.0"
+rem under the terms of the License "Eclipse Public License v1.0"
 rem which accompanies this distribution, and is available
-rem at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
 rem
 rem Initial Contributors:
 rem Nokia Corporation - initial contribution.
--- a/omads/omadsappui/AspPreSyncPlugin/group/ABLD.BAT	Mon Jan 18 20:08:41 2010 +0200
+++ b/omads/omadsappui/AspPreSyncPlugin/group/ABLD.BAT	Tue Feb 02 00:02:49 2010 +0000
@@ -2,9 +2,9 @@
 rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
 rem All rights reserved.
 rem This component and the accompanying materials are made available
-rem under the terms of the License "Symbian Foundation License v1.0"
+rem under the terms of the License "Eclipse Public License v1.0"
 rem which accompanies this distribution, and is available
-rem at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
 rem
 rem Initial Contributors:
 rem Nokia Corporation - initial contribution.
--- a/omads/omadsappui/AspSyncUtil/group/ABLD.BAT	Mon Jan 18 20:08:41 2010 +0200
+++ b/omads/omadsappui/AspSyncUtil/group/ABLD.BAT	Tue Feb 02 00:02:49 2010 +0000
@@ -2,9 +2,9 @@
 rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
 rem All rights reserved.
 rem This component and the accompanying materials are made available
-rem under the terms of the License "Symbian Foundation License v1.0"
+rem under the terms of the License "Eclipse Public License v1.0"
 rem which accompanies this distribution, and is available
-rem at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
 rem
 rem Initial Contributors:
 rem Nokia Corporation - initial contribution.
--- a/omads/omadsappui/AspSyncUtil/src/AspProfile.cpp	Mon Jan 18 20:08:41 2010 +0200
+++ b/omads/omadsappui/AspSyncUtil/src/AspProfile.cpp	Tue Feb 02 00:02:49 2010 +0000
@@ -1258,8 +1258,13 @@
 			{
 			if (aDataProviderId == KUidNSmlAdapterCalendar.iUid )
                 {
-                TBuf<128> calLocalDb ;
-                CreateCalLocalDatabaseL(calLocalDb);
+                TBuf<KBufSize> calLocalDb ;
+				TRAPD(err ,RetrieveCalLocalDatabaseL(calLocalDb));
+				if (err != KErrNone)
+					{
+					CreateCalLocalDatabaseL(calLocalDb);
+					}				
+                
                 task.CreateL(iProfile->Profile(), aDataProviderId, 
                                               aRemoteDatabase, calLocalDb);
                 }
@@ -1334,9 +1339,23 @@
             
     aCalName.Copy(KDrive);
     
-    TBuf<128> buffer;
+    TBuf<KBufSize> buffer;
     iProfile->GetName(buffer);
-     
+	
+	TInt currentProfileId = iProfile->ProfileId();
+	
+	if (buffer.Compare(KAutoSyncProfileName) == 0)
+		{
+		CAspSchedule* schedule = CAspSchedule::NewLC();
+		currentProfileId = schedule->ProfileId();
+		TAspParam param(iApplicationId, iSyncSession);
+		CAspProfile* selectedProfile = CAspProfile::NewLC(param);
+		selectedProfile->OpenL(currentProfileId, CAspProfile::EOpenRead, CAspProfile::EAllProperties);
+		selectedProfile->GetName(buffer);
+		CleanupStack::PopAndDestroy(selectedProfile);
+		CleanupStack::PopAndDestroy(schedule);
+		}
+		
     CCalSession* calSession = CCalSession::NewL();
     CleanupStack::PushL(calSession);
     
@@ -1424,7 +1443,7 @@
 
     keyBuff.Zero();
     keyBuff.AppendNum( EDeviceSyncProfileID );
-    TPckgC<TInt> pckgProfileIdValue( iProfile->ProfileId() );    
+    TPckgC<TInt> pckgProfileIdValue( currentProfileId );    
     calinfo->SetPropertyL( keyBuff, pckgProfileIdValue );
 
     
@@ -1507,10 +1526,21 @@
         keyBuff.AppendNum( EDeviceSyncProfileID );
         TPckgC<TInt> intBuf(profileId);
         TRAP_IGNORE(intBuf.Set(caleninfo->PropertyValueL(keyBuff)));
-                
         profileId = intBuf();
-        
-        if ( profileId == iProfile->ProfileId())
+		
+        TBuf<KBufSize> buffer;
+		iProfile->GetName(buffer);
+		
+		TInt currentProfileId = iProfile->ProfileId();
+	
+		if (buffer.Compare(KAutoSyncProfileName) == 0)
+			{
+			CAspSchedule* schedule = CAspSchedule::NewLC();
+			currentProfileId = schedule->ProfileId();
+			CleanupStack::PopAndDestroy(schedule);		
+			}
+		
+        if ( profileId == currentProfileId)
             {
             aCalName.Append(caleninfo->FileNameL());
             dbFound = ETrue;
@@ -2255,12 +2285,31 @@
 
 	TInt count = arr.Count();
 
+	//Hiding OVI Sync profile
+	const TUid KUidOtaSyncCenRep                = { 0x20016C06 };
+	const TUid KCRUidOtaSyncProfileId           = { 0x102 };
+	TInt oviProfileId = KErrNotFound;
+	CRepository* centRep = NULL;
+
+	TRAPD(err ,centRep = CRepository::NewL(KUidOtaSyncCenRep));
+	if (err == KErrNone)
+		{
+		CleanupStack::PushL(centRep);
+		centRep->Get(KCRUidOtaSyncProfileId.iUid, oviProfileId);
+    	CleanupStack::PopAndDestroy();// centRep
+		}
 	for (TInt i=0; i<count; i++)
 		{
 		TAspParam param(iApplicationId, iSyncSession);
 		CAspProfile* profile = CAspProfile::NewLC(param);
 		TInt id = arr[i];
 		
+		//Hiding OVI Sync profile
+		if (id == oviProfileId)
+			{
+			CleanupStack::PopAndDestroy(profile);
+			continue;
+		    }
 		if (aListMode == EBasePropertiesOnly)
 			{
 			profile->OpenL(id, CAspProfile::EOpenRead, CAspProfile::EBaseProperties);
--- a/omads/omadsappui/AspSyncUtil/src/AspScheduleDialog.cpp	Mon Jan 18 20:08:41 2010 +0200
+++ b/omads/omadsappui/AspSyncUtil/src/AspScheduleDialog.cpp	Tue Feb 02 00:02:49 2010 +0000
@@ -966,6 +966,7 @@
 				iSchedule->SetProfileId(item->iNumberData);
 				if(oldProfile != iSchedule->ProfileId())
 					{
+                    iSchedule->SaveL(); //Saved values to be used in Update
 					iSchedule->UpdateProfileSettingsL();
 					}
 				break;
--- a/omads/omadsappui/group/ABLD.BAT	Mon Jan 18 20:08:41 2010 +0200
+++ b/omads/omadsappui/group/ABLD.BAT	Tue Feb 02 00:02:49 2010 +0000
@@ -2,9 +2,9 @@
 rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
 rem All rights reserved.
 rem This component and the accompanying materials are made available
-rem under the terms of the License "Symbian Foundation License v1.0"
+rem under the terms of the License "Eclipse Public License v1.0"
 rem which accompanies this distribution, and is available
-rem at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
 rem
 rem Initial Contributors:
 rem Nokia Corporation - initial contribution.
--- a/omads/omadsappui/help/inc/ds.hlp.hrh	Mon Jan 18 20:08:41 2010 +0200
+++ b/omads/omadsappui/help/inc/ds.hlp.hrh	Tue Feb 02 00:02:49 2010 +0000
@@ -2,9 +2,9 @@
 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
-* under the terms of the License "Symbian Foundation License v1.0"
+* under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
-* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
 * Initial Contributors:
 * Nokia Corporation - initial contribution.
--- a/omads/omadsappui/ui/group/ABLD.BAT	Mon Jan 18 20:08:41 2010 +0200
+++ b/omads/omadsappui/ui/group/ABLD.BAT	Tue Feb 02 00:02:49 2010 +0000
@@ -2,9 +2,9 @@
 rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
 rem All rights reserved.
 rem This component and the accompanying materials are made available
-rem under the terms of the License "Symbian Foundation License v1.0"
+rem under the terms of the License "Eclipse Public License v1.0"
 rem which accompanies this distribution, and is available
-rem at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
 rem
 rem Initial Contributors:
 rem Nokia Corporation - initial contribution.