Revision: 201003 RCL_3 PDK_3.0.h
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 19 Feb 2010 22:40:37 +0200
branchRCL_3
changeset 8 ad0f53516d84
parent 4 e6e896426eac
child 10 b922b9936679
Revision: 201003 Kit: 201007
contentctrl_plat/ds_agenda_handler_plugin_api/inc/nsmlagendaadapterhandler.inl
omads/omadsappui/AspSyncUtil/inc/AspDialogUtil.h
omads/omadsappui/AspSyncUtil/src/AspDialogUtil.cpp
omads/omadsappui/AspSyncUtil/src/AspProfile.cpp
omads/omadsappui/AspSyncUtil/src/AspUtil.cpp
omads/omadsextensions/adapters/agenda/src/nsmlagendadataprovider.cpp
omads/omadsextensions/adapters/agenda/src/nsmlagendadatastore.cpp
omads/omadsextensions/adapters/bookmark/inc/bookmarkdatastore.h
omads/omadsextensions/adapters/bookmark/src/bookmarkdatastore.cpp
omads/omadsextensions/adapters/bookmark/src/changefinder.cpp
omads/omadsextensions/adapters/contacts/src/NSmlContactsDataStore.cpp
omads/omadsextensions/adapters/contacts/src/NSmlContactsDataStoreFormat_1_2.rss
--- a/contentctrl_plat/ds_agenda_handler_plugin_api/inc/nsmlagendaadapterhandler.inl	Tue Feb 02 00:02:49 2010 +0000
+++ b/contentctrl_plat/ds_agenda_handler_plugin_api/inc/nsmlagendaadapterhandler.inl	Fri Feb 19 22:40:37 2010 +0200
@@ -16,7 +16,7 @@
 */
 
 // INCLUDE FILES
-#include <eCom.h>
+#include <ecom.h>
 #include "nsmlagendaadapterhandler.h"
 
 // ============================ MEMBER FUNCTIONS ===============================
--- a/omads/omadsappui/AspSyncUtil/inc/AspDialogUtil.h	Tue Feb 02 00:02:49 2010 +0000
+++ b/omads/omadsappui/AspSyncUtil/inc/AspDialogUtil.h	Fri Feb 19 22:40:37 2010 +0200
@@ -45,7 +45,7 @@
 #ifdef RD_DSUI_TIMEDSYNC 
 
 #include <akntabgrp.h>
-#include <akntabobserver.h>
+#include <AknTabObserver.h>
 
 #endif
 
--- a/omads/omadsappui/AspSyncUtil/src/AspDialogUtil.cpp	Tue Feb 02 00:02:49 2010 +0000
+++ b/omads/omadsappui/AspSyncUtil/src/AspDialogUtil.cpp	Fri Feb 19 22:40:37 2010 +0200
@@ -1038,16 +1038,15 @@
     if (iNaviPane)
         {
         TRAP_IGNORE(iNaviDecorator = iNaviPane->CreateTabGroupL(this));    
-        }
+        if (iNaviDecorator)
+            {
+            TRAP_IGNORE(iNaviPane->PushL(*iNaviDecorator));
+            iNavidecoratorPushed = ETrue;
     
-	if (iNaviDecorator)
-	    {
-       	TRAP_IGNORE(iNaviPane->PushL(*iNaviDecorator));
-    	iNavidecoratorPushed = ETrue;
-
-	    iTabGroup = static_cast<CAknTabGroup*>( iNaviDecorator->DecoratedControl() );
-	    }
-	}
+            iTabGroup = static_cast<CAknTabGroup*>( iNaviDecorator->DecoratedControl() );
+            }
+        }
+    }
 
 // -----------------------------------------------------------------------------
 // CAspTabbedNaviPaneHandler::SetTabWidthL
--- a/omads/omadsappui/AspSyncUtil/src/AspProfile.cpp	Tue Feb 02 00:02:49 2010 +0000
+++ b/omads/omadsappui/AspSyncUtil/src/AspProfile.cpp	Fri Feb 19 22:40:37 2010 +0200
@@ -1440,12 +1440,18 @@
     TPckgC<TInt> pckgAppUIDValue( KCRUidNSmlDSApp.iUid );    
     calinfo->SetPropertyL( keyBuff, pckgAppUIDValue );
 
-
+    // Profile ID Meta Property
     keyBuff.Zero();
     keyBuff.AppendNum( EDeviceSyncProfileID );
     TPckgC<TInt> pckgProfileIdValue( currentProfileId );    
     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();
--- a/omads/omadsappui/AspSyncUtil/src/AspUtil.cpp	Tue Feb 02 00:02:49 2010 +0000
+++ b/omads/omadsappui/AspSyncUtil/src/AspUtil.cpp	Fri Feb 19 22:40:37 2010 +0200
@@ -42,6 +42,7 @@
 #include <AspSyncUtil.rsg>
 
 #include <SyncMLErr.h>  // sync error codes
+#include <cmapplicationsettingsui.h>
 
 //#ifdef __SAP_POLICY_MANAGEMENT
 #include <SettingEnforcementInfo.h> // VSettingEnforcementInfo
@@ -2054,55 +2055,73 @@
 //
 TInt CAspAccessPointHandler::ShowApSelectDialogL(TAspAccessPointItem& aItem)
 	{
+	FLOG( _L("CAspAccessPointHandler::ShowApSelectDialogL START") );
+
 	aItem.iUid = KErrNotFound;
 	aItem.iName = KNullDesC;
 
-	TUint32 selectedAp = 0;
+	TInt err(KErrNone);
+	TInt retVal( KErrNone );
+	TCmSettingSelection selection;
+	TBearerFilterArray filterArray;
+
 	TUint32 currentAp = 0;
 	if (aItem.iUid2 != KAskAlways && aItem.iUid2 != KDefaultConnection)
 		{
-		//currentAp = aItem.iUid2;
-		
+		FLOG( _L("ShowApSelectDialogL aItem.iUid2 = %d"), aItem.iUid2 );        
 		// convert internet ap to Wap ap (CApSettingsHandler requires this)
-    	TRAP_IGNORE(currentAp = iApUtil->WapIdFromIapIdL(aItem.iUid2));
+		TRAP_IGNORE(currentAp = iApUtil->WapIdFromIapIdL(aItem.iUid2));
+		}
+	else
+		{
+		FLOG( _L("ShowApSelectDialogL KAskAlways or KDefaultConnection"));
 		}
-	
+
+	// Mark the current selection
+	selection.iResult = CMManager::EConnectionMethod;
+	selection.iId = currentAp;
+	FLOG( _L("ShowApSelectDialogL selection.iId = %d"), selection.iId );        
 	
-	CApSettingsHandler* handler = NULL;
-	handler = CApSettingsHandler::NewLC( ETrue,
-	                                     EApSettingsSelListIsPopUp,
-	                                     EApSettingsSelMenuSelectNormal,
-	                                     KEApIspTypeAll,
-	                                     BearerFlags(),
-	    	                             KEApSortNameAscending);
+	// Start the connection dialog
+	CCmApplicationSettingsUi* settings = CCmApplicationSettingsUi::NewL();
+	CleanupStack::PushL( settings );
 
-	TInt ret = handler->RunSettingsL(currentAp, selectedAp);
-	CleanupStack::PopAndDestroy(handler);
-	
-	if (ret & KApUiEventSelected)
+	TRAP ( err, retVal = settings->RunApplicationSettingsL( selection, 
+		CMManager::EShowConnectionMethods, // Show only access points
+		filterArray ) );
+    	
+	CleanupStack::PopAndDestroy(); // settings
+
+	if (err != KErrNone)
+	{
+		// Error showing dialogue, return
+		FLOG( _L("ShowApSelectDialogL err = %d"), err );
+		return EAspDialogCancel;
+	}
+
+	if (retVal)
 		{
 		TAspAccessPointItem item;
-		item.iUid = selectedAp;
+		item.iUid = selection.iId;
+		FLOG( _L("ShowApSelectDialogL Uid (%d)"), item.iUid );
 
-	    GetApInfo(item);
+		GetApInfo(item);
+
+		// convert Wap ap to internet ap
+		aItem.iUid = iApUtil->IapIdFromWapIdL(selection.iId);
+		FLOG( _L("ShowApSelectDialogL Uid Conv (%d)"), item.iUid );
 	    
-	    // convert Wap ap to internet ap
-	    aItem.iUid = iApUtil->IapIdFromWapIdL(selectedAp);
-	    
-	    //aItem.iUid = selectedAp;
-	    
-	    aItem.iName = item.iName;
-	    
+		aItem.iName = item.iName;
+
+		FLOG( _L("ShowApSelectDialogL RETURNING EAspDialogSelect") );
 		return EAspDialogSelect;
 		}
-    else if (ret & KApUiEventExitRequested)
-    	{
-    	return EAspDialogExit;
-    	}
-    else
-    	{
-    	return EAspDialogCancel;
-    	}
+	else
+		{
+		FLOG( _L("ShowApSelectDialogL RETURNING EAspDialogCancel") );
+		return EAspDialogCancel;
+		}
+	FLOG( _L("CAspAccessPointHandler::ShowApSelectDialogL END") );
 	}
 
 
--- a/omads/omadsextensions/adapters/agenda/src/nsmlagendadataprovider.cpp	Tue Feb 02 00:02:49 2010 +0000
+++ b/omads/omadsextensions/adapters/agenda/src/nsmlagendadataprovider.cpp	Fri Feb 19 22:40:37 2010 +0200
@@ -21,7 +21,7 @@
 #include <ecom.h>
 #include <barsc.h>
 #include <bautils.h>
-#include <nsmlagendadatastore_1_1_2.rsg>
+#include <NSmlAgendaDataStore_1_1_2.rsg>
 #include <SmlDataFormat.h>
 #include <implementationproxy.h>
 #include <data_caging_path_literals.hrh>
--- 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();
--- a/omads/omadsextensions/adapters/bookmark/inc/bookmarkdatastore.h	Tue Feb 02 00:02:49 2010 +0000
+++ b/omads/omadsextensions/adapters/bookmark/inc/bookmarkdatastore.h	Fri Feb 19 22:40:37 2010 +0200
@@ -23,7 +23,7 @@
 #include <favouritesdb.h>
 #include <nsmlchangefinder.h>
 
-#include <FeedsServerClient.h>
+#include <feedsserverclient.h>
 #include <feedsserverfolderitem.h>
 
 class CNSmlDataItemUidSet;
--- a/omads/omadsextensions/adapters/bookmark/src/bookmarkdatastore.cpp	Tue Feb 02 00:02:49 2010 +0000
+++ b/omads/omadsextensions/adapters/bookmark/src/bookmarkdatastore.cpp	Fri Feb 19 22:40:37 2010 +0200
@@ -18,10 +18,10 @@
 
 #include <sysutil.h> 
 #include <favouritesitem.h>
-#include <FavouritesItemList.h> 
+#include <favouritesitemlist.h> 
 
-#include <FeedsServerClient.h>
-#include <FeedsServerFeed.h>
+#include <feedsserverclient.h>
+#include <feedsserverfeed.h>
 #include <feedsserverfolderitem.h>
 
 #include "bookmarkdatastore.h"
--- a/omads/omadsextensions/adapters/bookmark/src/changefinder.cpp	Tue Feb 02 00:02:49 2010 +0000
+++ b/omads/omadsextensions/adapters/bookmark/src/changefinder.cpp	Fri Feb 19 22:40:37 2010 +0200
@@ -165,12 +165,10 @@
         {
         LOGGER_WRITE("iOldSnapshot->Reset()");
         iOldSnapshot->Reset();
+        // Write 'null' data to file, 
+        // this removes change history from the file
+        CloseL();
         }
-
-    // Write 'null' data to file, 
-    // this removes change history from the file
-    CloseL();
-    
     LOGGER_LEAVEFN( "CChangeFinder::ResetL" );
     }
 
--- a/omads/omadsextensions/adapters/contacts/src/NSmlContactsDataStore.cpp	Tue Feb 02 00:02:49 2010 +0000
+++ b/omads/omadsextensions/adapters/contacts/src/NSmlContactsDataStore.cpp	Fri Feb 19 22:40:37 2010 +0200
@@ -1910,12 +1910,61 @@
 		 {
 	 	iWriteStream.Close();
 	 	User::RequestComplete( iCallerStatus, aError );
-		 }
-		else if(iLastOperation == ENSmlRetrieveOp)
-		 {
-		 	User::RequestComplete( iCallerStatus, aError );
-		 }
-	 }
+	 	}
+	else if (iLastOperation == ENSMLUpdateExportOp)
+        {
+        iWriteStream.Close();
+        delete iMergeItem;
+        iMergeItem = NULL;
+        User::RequestComplete( iCallerStatus, aError );
+        }
+	else if (iLastOperation == ENSMLUpdateImportOp)
+        {
+        if(iBatchMode)
+            {
+            iResultArray->Append( aError ); 
+            } 
+        delete iBuf;
+        iBuf = NULL;
+        iReadStream.Close();
+        iIndex++;
+        if(iIndex == iContactsBufferItemList.Count() )
+            {
+            ResetBuffer();
+            User::RequestComplete( iCallerStatus, aError );    
+            }
+        else
+            {
+            _DBG_FILE("VPbkSingleContactOperationFailed, Continuing to complete the Batch Operation");
+            ExecuteBufferL();
+            }
+        }
+	else if(iLastOperation == ENSmlRetrieveOp)
+	    {
+        iRetrieveCount--;	        
+        if(iBatchMode)
+            {
+            iResultArray->AppendL( aError ); 
+            }        
+        iIndex++;
+        if(iIndex == iContactsBufferItemList.Count() )
+            {
+            ResetBuffer();
+            User::RequestComplete( iCallerStatus, aError );    
+            }
+        else if(!iRetrieveCount)
+            {
+            _DBG_FILE("VPbkSingleContactOperationFailed, Continuing to complete the Batch Operation");
+            ExecuteBufferL();
+            }
+	    }
+    else
+        {
+        _DBG_FILE("VPbkSingleContactOperationFailed, No Matching LastOperation Completing the Operation");
+        User::RequestComplete( iCallerStatus, aError );    
+        }	
+	_DBG_FILE("CNSmlContactsDataStore::VPbkSingleContactOperationFailed(): end");
+	}
  // ---------------------------------------------------------------------------
 //  CNSmlContactsDataStore::VPbkSingleContactOperationFailed
 // ---------------------------------------------------------------------------
--- a/omads/omadsextensions/adapters/contacts/src/NSmlContactsDataStoreFormat_1_2.rss	Tue Feb 02 00:02:49 2010 +0000
+++ b/omads/omadsextensions/adapters/contacts/src/NSmlContactsDataStoreFormat_1_2.rss	Fri Feb 19 22:40:37 2010 +0200
@@ -450,7 +450,7 @@
 							display_name="Type";
 							name="TYPE";
 							data_type="";
-							enum_values={"POC", "SWIS", "VOIP"};
+							enum_values={"POC", "SWIS", "VOIP", "WORK", "HOME"};
 							}
 						};
 					},