# HG changeset patch # User Stefan Karlsson # Date 1269862035 -3600 # Node ID 960a2a4c7f0391637de1cf08b95883dbde317835 # Parent 2b524de5b49b3128e485561008645fe9063c8396# Parent 3dbb0284a087e3a61c5457308f7eb40400c945c0 Merge. diff -r 3dbb0284a087 -r 960a2a4c7f03 brdo.layers.sysdef.xml --- a/brdo.layers.sysdef.xml Wed Jan 13 15:52:45 2010 +0000 +++ b/brdo.layers.sysdef.xml Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ - + @@ -48,7 +48,7 @@ - + @@ -56,23 +56,23 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + - - - + + + diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/aiwbrowserprovider/Group/AiwBrowserProvider.mmp --- a/browserutilities/aiwbrowserprovider/Group/AiwBrowserProvider.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/aiwbrowserprovider/Group/AiwBrowserProvider.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -15,11 +15,9 @@ * */ - - #include #include -#include +#include TARGET AiwBrowserProvider.dll TARGETTYPE PLUGIN @@ -36,7 +34,6 @@ USERINCLUDE ../inc ../data MW_LAYER_SYSTEMINCLUDE -MW_LAYER_ECOM_SYSTEMINCLUDE START RESOURCE ../data/101FD682.rss TARGET AiwBrowserProvider @@ -44,6 +41,7 @@ END START RESOURCE ../data/AiwBrowserProvider.rss +DEPENDS avkon.rsg HEADER TARGET AiwBrowserProvider TARGETPATH RESOURCE_FILES_DIR diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/aiwbrowserprovider/Group/bld.inf --- a/browserutilities/aiwbrowserprovider/Group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/aiwbrowserprovider/Group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -19,13 +19,13 @@ #include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT PRJ_EXPORTS -../loc/AiwBrowserProvider.loc MW_LAYER_LOC_EXPORT_PATH(AiwBrowserProvider.loc) +../loc/aiwbrowserprovider.loc MW_LAYER_LOC_EXPORT_PATH(aiwbrowserprovider.loc) PRJ_MMPFILES AiwBrowserProvider.mmp diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/aiwbrowserprovider/data/101FD682.rss --- a/browserutilities/aiwbrowserprovider/data/101FD682.rss Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/aiwbrowserprovider/data/101FD682.rss Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ // INCLUDES -#include +#include #include // RESOURCE DEFINITIONS diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/aiwbrowserprovider/data/AiwBrowserProvider.rss --- a/browserutilities/aiwbrowserprovider/data/AiwBrowserProvider.rss Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/aiwbrowserprovider/data/AiwBrowserProvider.rss Mon Mar 29 12:27:15 2010 +0100 @@ -30,8 +30,8 @@ #include #include -#include "AiwBrowserCommands.hrh" -#include +#include "aiwbrowsercommands.hrh" +#include // RESOURCE DEFINITIONS // ----------------------------------------------------------------------------- // diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/aiwbrowserprovider/src/AiwBrowserProviderOpenUrl.cpp --- a/browserutilities/aiwbrowserprovider/src/AiwBrowserProviderOpenUrl.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/aiwbrowserprovider/src/AiwBrowserProviderOpenUrl.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -30,8 +30,8 @@ #include #include #include -#include -#include "AiwBrowserCommands.hrh" +#include +#include #include "logger.h" // LOCAL CONSTANTS AND MACROS diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/aiwbrowserprovider/src/AiwBrowserProviderSaveUrl.cpp --- a/browserutilities/aiwbrowserprovider/src/AiwBrowserProviderSaveUrl.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/aiwbrowserprovider/src/AiwBrowserProviderSaveUrl.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -28,10 +28,10 @@ #include #include #include -#include +#include #include +#include -#include "AiwBrowserCommands.hrh" #include "logger.h" // LOCAL CONSTANTS AND MACROS diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/aiwbrowserprovider/src/Dllmain.cpp --- a/browserutilities/aiwbrowserprovider/src/Dllmain.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/aiwbrowserprovider/src/Dllmain.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ // INCLUDES #include -#include +#include #include "AiwBrowserProviderOpenUrl.h" #include "AiwBrowserProviderSaveUrl.h" #include "logger.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/browserdialogsprovider/Group/bld.inf --- a/browserutilities/browserdialogsprovider/Group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/browserdialogsprovider/Group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -18,7 +18,7 @@ */ #include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS @@ -26,7 +26,7 @@ PRJ_EXPORTS // export localised loc file -../loc/BrowserDialogsProvider.loc MW_LAYER_LOC_EXPORT_PATH(BrowserDialogsProvider.loc) +../loc/browserdialogsprovider.loc MW_LAYER_LOC_EXPORT_PATH(browserdialogsprovider.loc) ../rom/BrowserDialogsProvider.iby CORE_MW_LAYER_IBY_EXPORT_PATH(BrowserDialogsProvider.iby) ../rom/BrowserDialogsProviderResources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(BrowserDialogsProviderResources.iby) diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/browserdialogsprovider/Group/browserdialogsprovider.mmp --- a/browserutilities/browserdialogsprovider/Group/browserdialogsprovider.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/browserdialogsprovider/Group/browserdialogsprovider.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -18,7 +18,7 @@ #include #include -#include +#include TARGET browserdialogsprovider.dll EPOCSTACKSIZE 0x5000 @@ -29,6 +29,7 @@ SOURCEPATH ../Src START RESOURCE ../SrcData/BrowserDialogsProvider.rss +DEPENDS avkon.rsg HEADER TARGETPATH RESOURCE_FILES_DIR #ifdef __S60_32__ @@ -43,7 +44,6 @@ MW_LAYER_SYSTEMINCLUDE - SOURCE ../Src/BrowserDialogsProvider.cpp SOURCE ../Src/BrowserAuthenticationDialog.cpp SOURCE ../Src/BrowserScriptPromptDialog.cpp @@ -57,7 +57,6 @@ SOURCE ../Src/BrowserDialogsProviderAsyncExit.cpp SOURCE ../Src/BrowserUploadProgressNote.cpp - LIBRARY euser.lib apparc.lib cone.lib eikcore.lib egul.lib LIBRARY eikcoctl.lib avkon.lib eikdlg.lib bitgdi.lib LIBRARY eikctl.lib fbscli.lib bafl.lib MediaClientImage.lib diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/browserdialogsprovider/Inc/BrowserSelectElementDlg.h --- a/browserutilities/browserdialogsprovider/Inc/BrowserSelectElementDlg.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/browserdialogsprovider/Inc/BrowserSelectElementDlg.h Mon Mar 29 12:27:15 2010 +0100 @@ -25,7 +25,7 @@ // User includes // System includes -#include +#include #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/browserdialogsprovider/Inc/BrowserSelectElementItemDrawer.h --- a/browserutilities/browserdialogsprovider/Inc/BrowserSelectElementItemDrawer.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/browserdialogsprovider/Inc/BrowserSelectElementItemDrawer.h Mon Mar 29 12:27:15 2010 +0100 @@ -20,7 +20,7 @@ #define CBROWSERSELECTELEMENTITEMDRAWER_H // INCLUDES -#include "BrCtlDialogsProvider.h" +#include #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/browserdialogsprovider/Inc/BrowserSelectElementListBox.h --- a/browserutilities/browserdialogsprovider/Inc/BrowserSelectElementListBox.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/browserdialogsprovider/Inc/BrowserSelectElementListBox.h Mon Mar 29 12:27:15 2010 +0100 @@ -22,7 +22,7 @@ // INCLUDES #include -#include +#include // CLASSES diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/browserdialogsprovider/Inc/BrowserViewImagesListBox.h --- a/browserutilities/browserdialogsprovider/Inc/BrowserViewImagesListBox.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/browserdialogsprovider/Inc/BrowserViewImagesListBox.h Mon Mar 29 12:27:15 2010 +0100 @@ -29,7 +29,7 @@ #include // Browser as a Plugin includes -#include +#include // FORWARD DECLARATIONS class CCoeControl; diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/browserdialogsprovider/Inc/BrowserViewImagesPopup.h --- a/browserutilities/browserdialogsprovider/Inc/BrowserViewImagesPopup.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/browserdialogsprovider/Inc/BrowserViewImagesPopup.h Mon Mar 29 12:27:15 2010 +0100 @@ -29,7 +29,7 @@ #include // Browser as a Plugin includes -#include +#include // FORWARD DECLARATIONS class CCoeControl; diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/browserdialogsprovider/Src/BrowserDialogsProvider.cpp --- a/browserutilities/browserdialogsprovider/Src/BrowserDialogsProvider.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/browserdialogsprovider/Src/BrowserDialogsProvider.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -19,11 +19,11 @@ // INCLUDE Files // User includes -#include "BrowserDialogsProvider.h" // Class header +#include // Class header #include "BrowserDialogsProvider.hrh" #include "BrowserAuthenticationDialog.h" #include "BrowserDialogsProviderConstants.h" -#include "BrowserDialogsProviderObserver.h" //obs +#include //obs // Browser as a Plugin - own classes #include "BrowserViewImagesPopup.h" // For DialogDisplayPageImagesL @@ -61,13 +61,14 @@ #include // Data Caging -#include +#include // CONSTANTS const TInt KBrCtlObjectElementMaxLength = 50; const TInt KBrCtlMBFormat = 4; const TInt KBrCtlGBFormat = 10; const TInt KBrCtlMegabyte = 1000; // although 1MB=1024 kB, treat as 1000kb for user simplicity +const TInt KBrowserFileNotFound = -26003; // Defined in ErrorDefs.h but not exported so define here // DLL resource file name with path _LIT( KBrowserDialogsProviderDirAndFile, "z:BrowserDialogsProvider.rsc" );// resource @@ -159,19 +160,28 @@ case EHttpTemporaryRedirect: { // Id for r_nw_stat_too_many_redirects is -20019, browser errors start at -20000 - msg.Set( textresolver->ResolveErrorString( KErrTooManyRedirects )); + msg.Set( textresolver->ResolveErrorString( KErrTooManyRedirects )); + DialogNoteL( msg ); break; } default: { - // Handle all others as system error dialog - msg.Set( textresolver->ResolveErrorString( aErrCode )); - break; + // change error code to browser error code, when trying to open file + // that doesn't exist + if ( KErrNotFound == aErrCode ) + { + iCoeEnv.HandleError( KBrowserFileNotFound ); + } + else + { + // Handle all others as system error dialog + iCoeEnv.HandleError( aErrCode ); + } + break; } } // end of switch - DialogNoteL( msg ); - CleanupStack::PopAndDestroy(); //textresolver + CleanupStack::PopAndDestroy(); //textresolver if ( iObserver ) { @@ -428,17 +438,16 @@ TBrCtlSelectOptionType aBrCtlSelectOptionType, CArrayFix& aOptions ) { - CBrowserSelectElementDlg* dlg = CBrowserSelectElementDlg::NewL( aTitle, + iSelectDlg = CBrowserSelectElementDlg::NewL( aTitle, aBrCtlSelectOptionType, aOptions ); - - iDialogs.Append( dlg ); // Store a pointer to the dialog for CancelAll() + - TInt result = dlg->ExecuteLD(); + TInt result = iSelectDlg->ExecuteLD(); - RemoveDialogFromArray(); - + + iSelectDlg = 0; if ( iObserver ) { iObserver->ReportDialogEventL( @@ -971,7 +980,11 @@ //----------------------------------------------------------------------------- // EXPORT_C void CBrowserDialogsProvider::CancelAll() - { + { + if(iSelectDlg ) + iSelectDlg->CancelPopup(); + + iDialogs.Close(); // Empty the array iDialogs.ResetAndDestroy(); } diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/browserdialogsprovider/Src/BrowserSelectElementDlg.cpp --- a/browserutilities/browserdialogsprovider/Src/BrowserSelectElementDlg.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/browserdialogsprovider/Src/BrowserSelectElementDlg.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -18,6 +18,7 @@ // INCLUDE FILES +#include #include "BrowserSelectElementDlg.h" #include "BrowserSelectElementListBox.h" #include "BrowserSelectElementModel.h" @@ -185,7 +186,11 @@ if(AknLayoutUtils::PenEnabled()) { +#ifdef BRDO_SINGLE_CLICK_ENABLED_FF + if((aEventType == EEventItemDoubleClicked) || (aEventType == EEventItemSingleClicked)) +#else if(aEventType == EEventItemDoubleClicked) +#endif { penSelect = ETrue; } diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/browserdialogsprovider/Src/BrowserSelectElementItemDrawer.cpp --- a/browserutilities/browserdialogsprovider/Src/BrowserSelectElementItemDrawer.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/browserdialogsprovider/Src/BrowserSelectElementItemDrawer.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -20,7 +20,7 @@ // INCLUDE FILES #include "BrowserSelectElementItemDrawer.h" #include "BrowserSelectElementModel.h" -#include "BrCtlDialogsProvider.h" +#include #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/browserdialogsprovider/Src/BrowserUploadProgressNote.cpp --- a/browserutilities/browserdialogsprovider/Src/BrowserUploadProgressNote.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/browserdialogsprovider/Src/BrowserUploadProgressNote.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -20,7 +20,7 @@ // INCLUDES #include "BrowserUploadProgressNote.h" -#include "BrowserDialogsProviderObserver.h" +#include #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/browserdialogsprovider/Src/BrowserViewImagesPopup.cpp --- a/browserutilities/browserdialogsprovider/Src/BrowserViewImagesPopup.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/browserdialogsprovider/Src/BrowserViewImagesPopup.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -19,7 +19,8 @@ // USER INCLUDES -#include "BrowserDialogsProvider.h" +#include +#include #include "BrowserDialogsProvider.hrh" #include "BrowserViewImagesPopup.h" #include "PhotoOperationWait.h" @@ -140,7 +141,11 @@ void CBrowserViewImagesPopup::HandleListBoxEventL( CEikListBox* aListBox, TListBoxEvent aEventType ) { - if((aEventType==EEventEnterKeyPressed || aEventType==EEventItemDoubleClicked) && aListBox==ListBox()) +#ifdef BRDO_SINGLE_CLICK_ENABLED_FF + if((aEventType==EEventEnterKeyPressed || aEventType==EEventItemDoubleClicked || aEventType==EEventItemSingleClicked) && aListBox==ListBox()) +#else + if((aEventType==EEventEnterKeyPressed || aEventType==EEventItemDoubleClicked ) && aListBox==ListBox()) +#endif { ProcessCommandL( EDialogsProviderCmdViewImagesView ); } diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/browserdialogsprovider/SrcData/BrowserDialogsProvider.rss --- a/browserutilities/browserdialogsprovider/SrcData/BrowserDialogsProvider.rss Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/browserdialogsprovider/SrcData/BrowserDialogsProvider.rss Mon Mar 29 12:27:15 2010 +0100 @@ -19,7 +19,7 @@ // INCLUDES #include "BrowserDialogsProvider.hrh" -#include +#include #include #include @@ -340,4 +340,4 @@ } }; } -// End of File \ No newline at end of file +// End of File diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/browsertelservice/data/BrowserTelService.rss --- a/browserutilities/browsertelservice/data/BrowserTelService.rss Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/browsertelservice/data/BrowserTelService.rss Mon Mar 29 12:27:15 2010 +0100 @@ -30,7 +30,7 @@ #include #include -#include +#include #include "BrowserTelService.hrh" //*************************************************************************************** diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/browsertelservice/group/BrowserTelService.mmp --- a/browserutilities/browsertelservice/group/BrowserTelService.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/browsertelservice/group/BrowserTelService.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -19,7 +19,7 @@ #include #include -#include +#include TARGET BrowserTelService.dll TARGETTYPE dll @@ -35,6 +35,7 @@ #endif START RESOURCE ../data/browsertelservice.rss +DEPENDS avkon.rsg HEADER TARGETPATH RESOURCE_FILES_DIR END @@ -44,7 +45,6 @@ SOURCE BrowserTelServiceEtelWatcher.cpp SOURCE BrowserTelServiceDlgs.cpp - USERINCLUDE ../inc USERINCLUDE ../../inc @@ -68,10 +68,7 @@ s60/app/messaging/msg_sdk/send_ui_api/inc/SendUiConsts.h s60/app/messaging/msg_sdk/send_ui_api/inc/SenduiMtmUids.h */ -//MW_LAYER_SYSTEMINCLUDE - - -SYSTEMINCLUDE ../../../inc +// MW_LAYER_SYSTEMINCLUDE LIBRARY euser.lib LIBRARY etel.lib @@ -90,10 +87,10 @@ LIBRARY ApEngine.lib LIBRARY commdb.lib LIBRARY efsrv.lib -LIBRARY commonui.lib -LIBRARY featmgr.lib // feature mannger support -LIBRARY estor.lib // RWriteStream, RFileBuf -LIBRARY Centralrepository.lib +LIBRARY commonui.lib +LIBRARY featmgr.lib // feature mannger support +LIBRARY estor.lib // RWriteStream, RFileBuf +LIBRARY Centralrepository.lib #if defined(ARMCC) DEFFILE ../EABI/BROWSERTELSERVICEU_EKA2.def @@ -106,4 +103,3 @@ LIBRARY aiwdialdata.lib DEBUGLIBRARY flogger.lib - diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/browsertelservice/group/bld.inf --- a/browserutilities/browsertelservice/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/browsertelservice/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,7 @@ * */ #include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT @@ -25,7 +25,7 @@ ../inc/BrowserTelService.h |../../../inc/BrowserTelService.h ../inc/BrowserTelServiceEtelWatcher.h |../../../inc/BrowserTelServiceEtelWatcher.h ../rom/browsertelservice.iby CORE_MW_LAYER_IBY_EXPORT_PATH(browsertelservice.iby) -../loc/BrowserTelService.loc MW_LAYER_LOC_EXPORT_PATH(BrowserTelService.loc) +../loc/browsertelservice.loc MW_LAYER_LOC_EXPORT_PATH(browsertelservice.loc) PRJ_MMPFILES BrowserTelService.mmp diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/browsertelservice/inc/BrowserTelService.h --- a/browserutilities/browsertelservice/inc/BrowserTelService.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/browsertelservice/inc/BrowserTelService.h Mon Mar 29 12:27:15 2010 +0100 @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/browsertelservice/src/BrowserTelService.cpp --- a/browserutilities/browsertelservice/src/BrowserTelService.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/browsertelservice/src/BrowserTelService.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -66,7 +66,7 @@ // Const file name for make call #include -#include +#include #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/connectionmanager/Group/ConnectionManager.mmp --- a/browserutilities/connectionmanager/Group/ConnectionManager.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/connectionmanager/Group/ConnectionManager.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -21,7 +21,7 @@ #include #include #include -#include +#include TARGET ConnectionManager.dll TARGETTYPE dll @@ -37,6 +37,7 @@ MW_LAYER_SYSTEMINCLUDE START RESOURCE ../data/ConnectionManager.rss +DEPENDS avkon.rsg HEADER TARGETPATH RESOURCE_FILES_DIR END @@ -78,6 +79,12 @@ LIBRARY cmmanager.lib DEBUGLIBRARY flogger.lib +//Below libs are required for One-Click-Connectivity feature +#ifdef BRDO_OCC_ENABLED_FF +LIBRARY extendedconnpref.lib +LIBRARY netmeta.lib +#endif + #if defined(ARMCC) DEFFILE ../EABI/CONNECTIONMANAGERU_EKA2.def #else diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/connectionmanager/Group/bld.inf --- a/browserutilities/connectionmanager/Group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/connectionmanager/Group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -18,7 +18,7 @@ #include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/connectionmanager/Inc/ConnMan.hrh --- a/browserutilities/connectionmanager/Inc/ConnMan.hrh Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/connectionmanager/Inc/ConnMan.hrh Mon Mar 29 12:27:15 2010 +0100 @@ -23,4 +23,4 @@ { EConnManWaitNote = 8747, EConnManInfoNote - }; \ No newline at end of file + }; diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/connectionmanager/Inc/ConnManActiveConnector.h --- a/browserutilities/connectionmanager/Inc/ConnManActiveConnector.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/connectionmanager/Inc/ConnManActiveConnector.h Mon Mar 29 12:27:15 2010 +0100 @@ -83,6 +83,7 @@ TRequestStatus* iExternalRequestStatus; RConnection& iConnection; + TBool iWait; }; diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/connectionmanager/Src/ConnManActiveConnector.cpp --- a/browserutilities/connectionmanager/Src/ConnManActiveConnector.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/connectionmanager/Src/ConnManActiveConnector.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -19,13 +19,17 @@ */ - +#include #include "ConnManActiveConnector.h" #include "ConnectionManagerLogger.h" #include #include +#ifdef BRDO_OCC_ENABLED_FF +#include +#endif + //-------------------------------------------------------------------------- //CConnManActiveConnector::CConnManActiveConnector() //-------------------------------------------------------------------------- @@ -34,6 +38,7 @@ : CActive( aPriority ) , iConnection( aConnection ) { + CLOG_CREATE; CActiveScheduler::Add( this );//inserting this into the queue } @@ -43,6 +48,7 @@ //-------------------------------------------------------------------------- CConnManActiveConnector::~CConnManActiveConnector() { + Cancel();//The standard way of destroying an Active object CLOG_CLOSE; } @@ -51,18 +57,55 @@ //CConnManActiveConnector::StartConnection() //-------------------------------------------------------------------------- void CConnManActiveConnector::StartConnection( TCommDbConnPref* aSettings, TRequestStatus& aStatus) - { - CLOG_WRITE( "CConnManActiveConnector:StartConnection is called"); - iExternalRequestStatus = &aStatus; - +{ + CLOG_WRITE( "CConnManActiveConnector:StartConnection AlwaysAsk/Ap is called"); + iExternalRequestStatus = &aStatus; + +#ifdef BRDO_OCC_ENABLED_FF + + TExtendedConnPref extPref; + CLOG_WRITE( "CConnManActiveConnector:StartConnection Setting OCC parameters"); + +#ifdef __WINS__ //This is only for emulator testing purpose + + //For emulator + CLOG_WRITE( "CConnManActiveConnector:StartConnection Emulator OCC settings " ); + extPref.SetSnapPurpose(CMManager::ESnapPurposeUnknown); + extPref.SetConnSelectionDialog(ETrue); + extPref.SetForcedRoaming(EFalse); + +#else + + //For hardware + TUint32 bookmarkIap = aSettings->IapId(); + CLOG_WRITE_1( "CConnManActiveConnector:StartConnection Active Bookmark Iap: %d", bookmarkIap ); + if (bookmarkIap) + { + CLOG_WRITE( "CConnManActiveConnector:StartConnection Iap is found for this bookmark"); + extPref.SetSnapPurpose(CMManager::ESnapPurposeUnknown); + extPref.SetIapId(bookmarkIap); + } + else + { + CLOG_WRITE( "CConnManActiveConnector:StartConnection Using Internet Snap"); + extPref.SetSnapPurpose(CMManager::ESnapPurposeInternet); + } + +#endif //__WINS__ + + extPref.SetNoteBehaviour(TExtendedConnPref::ENoteBehaviourDefault); + TConnPrefList prefList; + TRAP_IGNORE(prefList.AppendL(&extPref)); +#endif //BRDO_OCC_ENABLED_FF + if( aSettings ) - { -#ifdef __WINS__ - // aSettings->SetDialogPreference( ECommDbDialogPrefPrompt ); -#endif - - iConnection.Start( *aSettings, iStatus ); - } + { + #ifdef BRDO_OCC_ENABLED_FF + iConnection.Start( prefList, iStatus ); + #else + iConnection.Start( *aSettings, iStatus ); + #endif + } else { iConnection.Start( iStatus ); @@ -77,14 +120,45 @@ //CConnManActiveConnector::StartConnection() //-------------------------------------------------------------------------- void CConnManActiveConnector::StartConnection( TConnSnapPref* aSettings, TRequestStatus& aStatus) - { - CLOG_WRITE( "CConnManActiveConnector:StartConnection is called"); - iExternalRequestStatus = &aStatus; - +{ + CLOG_WRITE( "CConnManActiveConnector:StartConnection SNAP is called"); + iExternalRequestStatus = &aStatus; + +#ifdef BRDO_OCC_ENABLED_FF + + CLOG_WRITE( "CConnManActiveConnector:StartConnection Setting OCC parameters"); + TExtendedConnPref extPref; + +#ifdef __WINS__ + + //For emulator + CLOG_WRITE( "CConnManActiveConnector:StartConnection Emulator OCC settings " ); + extPref.SetSnapPurpose(CMManager::ESnapPurposeUnknown); + extPref.SetConnSelectionDialog(ETrue); + extPref.SetForcedRoaming(EFalse); + +#else + + //For hardware + CLOG_WRITE( "CConnManActiveConnector:StartConnection Using Internet Snap"); + extPref.SetSnapPurpose(CMManager::ESnapPurposeInternet); + +#endif //__WINS__ + + extPref.SetNoteBehaviour(TExtendedConnPref::ENoteBehaviourDefault); + TConnPrefList prefList; + TRAP_IGNORE(prefList.AppendL(&extPref)); + +#endif + if( aSettings ) - { - iConnection.Start( *aSettings, iStatus ); - } + { + #ifdef BRDO_OCC_ENABLED_FF + iConnection.Start( prefList, iStatus ); + #else + iConnection.Start( *aSettings, iStatus ); + #endif + } else { iConnection.Start( iStatus ); @@ -101,8 +175,10 @@ void CConnManActiveConnector::DoCancel() { CLOG_WRITE( "CConnManActiveConnector: DoCancel called"); + iConnection.Close(); User::RequestComplete( iExternalRequestStatus, KErrCancel );//completing user req + CLOG_WRITE( "CConnManActiveConnector: DoCancel returned"); } @@ -111,6 +187,7 @@ //-------------------------------------------------------------------------- void CConnManActiveConnector::RunL() { + CLOG_WRITE_1( "CConnManAct::RunL(): %d", iStatus.Int() ); User::RequestComplete( iExternalRequestStatus, iStatus.Int() ); } @@ -196,11 +273,10 @@ { iActiveConnector->Cancel(); - - if(iWait.IsStarted()) - { - iWait.AsyncStop(); - } + if(iWait.IsStarted()) + { + iWait.AsyncStop(); + } } diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/connectionmanager/Src/ConnectionObservers.cpp --- a/browserutilities/connectionmanager/Src/ConnectionObservers.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/connectionmanager/Src/ConnectionObservers.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -18,17 +18,15 @@ * */ - - #include #include #include #include +#include -#include "ConnectionObservers.h" +#include #include "ConnectionManagerLogger.h" - //-------------------------------------------------------------------------- //CConnectionStageNotifierWCB::NewL() //-------------------------------------------------------------------------- diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/connectionmanager/Src/Idpair.cpp --- a/browserutilities/connectionmanager/Src/Idpair.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/connectionmanager/Src/Idpair.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -21,7 +21,7 @@ //User Includes #include -#include "IdPair.h" +#include "idpair.h" //TIdPair EXPORT_C TIdPair::TIdPair( TUint32 aFirstPreference, TUint32 aSecondPreference ): iFirstPreference( aFirstPreference), iSecondPreference( aSecondPreference ) diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/connectionmanager/Src/InternetConnectionManager.cpp --- a/browserutilities/connectionmanager/Src/InternetConnectionManager.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/connectionmanager/Src/InternetConnectionManager.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -65,10 +66,10 @@ #include //User Includes -#include "InternetConnectionManager.h" +#include #include "connman.hrh" #include "connectionmanagerlogger.h" -#include "connectionobservers.h" +#include #include "connmanactiveconnector.h" using namespace CMManager; @@ -1041,7 +1042,7 @@ if (iConnectionType == EDestination) { - err = ConnectWithSnapId(iRequestedSnapId); + err = ConnectWithSnapIdL(iRequestedSnapId); return err; } else @@ -1642,6 +1643,17 @@ } //------------------------------------------------------------------------ +//CInternetConnectionManager::CancelConnection +// + void CInternetConnectionManager::CancelConnection() + { + if(iSyncConnector && iSyncConnector->IsActive()) + { + iSyncConnector->Cancel(); + } + } + +//------------------------------------------------------------------------ //CInternetConnectionManager::AskIap //------------------------------------------------------------------------ EXPORT_C TInt CInternetConnectionManager::AskIap( TUint32& aNewIap ) @@ -2000,9 +2012,9 @@ } //------------------------------------------------------------------------ -//CInternetConnectionManager::ConnectWithSnapId +//CInternetConnectionManager::ConnectWithSnapIdL //------------------------------------------------------------------------ -TInt CInternetConnectionManager::ConnectWithSnapId(TUint32 aRequestedSnapId) +TInt CInternetConnectionManager::ConnectWithSnapIdL(TUint32 aRequestedSnapId) { CLOG_WRITE_1( "CInternetConnectionManager::ConnectWithSnapId - %d", aRequestedSnapId ); diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/dictionary/dict_creator.c --- a/browserutilities/cxmllibrary/dictionary/dict_creator.c Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/dictionary/dict_creator.c Mon Mar 29 12:27:15 2010 +0100 @@ -21,26 +21,6 @@ * */ - -/* **************************************************************** -** Copyright 2000 - Nokia Corporation All rights reserved. -** Nokia Americas -** 6000 Connection Drive -** Irving, Texas 75039 -** -** Restricted Rights: Use, duplication, or disclosure by the -** U.S. Government is subject to restrictions as set forth in -** subparagraph (c)(1)(ii) of DFARS 252.227-7013, or in FAR -** 52.227-19, or in FAR 52.227-14 Alt. III, as applicable. -** -** This software is proprietary to and embodies the confidential -** technology of Nokia Possession, use, or copying of this software -** and media is authorized only pursuant to a valid written license -** from Nokia or an authorized sublicensor. -** -** Nokia - Wireless Software Solutions -*****************************************************************/ - #include #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/group/BLD.INF --- a/browserutilities/cxmllibrary/group/BLD.INF Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/group/BLD.INF Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ #include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/group/cXmlParser.mmp --- a/browserutilities/cxmllibrary/group/cXmlParser.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/group/cXmlParser.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -16,12 +16,10 @@ */ #include -#include +#include TARGET cXmlParser.dll TARGETTYPE dll - - #if defined(ARMCC) UID 0x1000008D 0x101F8710 deffile EABI/cXmlParser.def @@ -73,9 +71,6 @@ SOURCE utils/src/E32XMLPARSERDLLEntryPoint.cpp SOURCE utils/src/cxml_file_if.cpp - - - #if defined(WINS) #ifndef WINSCW SOURCE utils/src/cxml_assert.c @@ -91,13 +86,10 @@ USERINCLUDE ../src/tinytree/include USERINCLUDE ../src/utils/include - // =================================== - MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE - +OS_LAYER_ESTLIB_SYSTEMINCLUDE // Symbian OS libraries //#if defined (WINS) diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/src/dom/include/nw_dom_wbxmltypes.h --- a/browserutilities/cxmllibrary/src/dom/include/nw_dom_wbxmltypes.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/src/dom/include/nw_dom_wbxmltypes.h Mon Mar 29 12:27:15 2010 +0100 @@ -27,15 +27,14 @@ #ifndef NW_DOM_WBXML_TYPES_H #define NW_DOM_WBXML_TYPES_H -#include "cxml_proj.h" -#include "nw_dom_node.h" +#include +#include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ - /** ----------------------------------------------------------------------- ** @typedef: NW_DOM_Extension diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/src/dom/src/attribute.c --- a/browserutilities/cxmllibrary/src/dom/src/attribute.c Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/src/dom/src/attribute.c Mon Mar 29 12:27:15 2010 +0100 @@ -17,10 +17,10 @@ #include "cxml_internal.h" -#include "nw_dom_attribute.h" -#include "nw_wbxml_dictionary.h" -#include "nw_tinydom.h" -#include "nw_string_string.h" +#include +#include +#include +#include #include "nw_dom_wbxmltypes.h" /* diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/src/dom/src/document.c --- a/browserutilities/cxmllibrary/src/dom/src/document.c Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/src/dom/src/document.c Mon Mar 29 12:27:15 2010 +0100 @@ -15,15 +15,14 @@ * */ - #include "cxml_internal.h" -#include "nw_dom_node.h" -#include "nw_dom_document.h" -#include "nw_dom_element.h" -#include "nw_tinytree.h" -#include "nw_encoder_wbxmlwriter.h" -#include "nw_xmlp_xmlp2wbxml.h" -#include "nw_tinydom_utils.h" +#include +#include +#include +#include +#include +#include +#include /*#include "nw_parser.h"*/ diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/src/dom/src/element.c --- a/browserutilities/cxmllibrary/src/dom/src/element.c Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/src/dom/src/element.c Mon Mar 29 12:27:15 2010 +0100 @@ -15,12 +15,11 @@ * */ - #include "cxml_internal.h" -#include "nw_dom_element.h" -#include "nw_dom_attribute.h" -#include "nw_dom_document.h" -#include "nw_wbxml_dictionary.h" +#include +#include +#include +#include /* * Returns diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/src/dom/src/node.c --- a/browserutilities/cxmllibrary/src/dom/src/node.c Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/src/dom/src/node.c Mon Mar 29 12:27:15 2010 +0100 @@ -17,9 +17,9 @@ #include "cxml_internal.h" -#include "nw_dom_node.h" -#include "nw_dom_document.h" -#include "nw_dom_element.h" +#include +#include +#include /** * GENERAL NODE METHODS - applicable to all node types diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/src/dom/src/text.c --- a/browserutilities/cxmllibrary/src/dom/src/text.c Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/src/dom/src/text.c Mon Mar 29 12:27:15 2010 +0100 @@ -15,11 +15,10 @@ * */ - #include "cxml_internal.h" -#include "nw_tinytree.h" -#include "nw_dom_text.h" -#include "nw_dom_document.h" +#include +#include +#include /* * Returns diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/src/dom/src/wbxml_types.c --- a/browserutilities/cxmllibrary/src/dom/src/wbxml_types.c Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/src/dom/src/wbxml_types.c Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ #include "cxml_internal.h" -#include "nw_dom_node.h" +#include #include "nw_dom_wbxmltypes.h" /** Extension **/ diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/src/encoder/include/nw_encoder_tinydom2wbxml.h --- a/browserutilities/cxmllibrary/src/encoder/include/nw_encoder_tinydom2wbxml.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/src/encoder/include/nw_encoder_tinydom2wbxml.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - /** ----------------------------------------------------------------------- ** @package: NW_Encoder @@ -28,8 +27,8 @@ #ifndef NW_TINYDOM2WBXML_H #define NW_TINYDOM2WBXML_H -#include "nw_encoder_wbxmlwriter.h" -#include "nw_dom_attribute.h" +#include +#include #ifdef __cplusplus extern "C" { diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/src/encoder/src/StringTable.c --- a/browserutilities/cxmllibrary/src/encoder/src/StringTable.c Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/src/encoder/src/StringTable.c Mon Mar 29 12:27:15 2010 +0100 @@ -16,12 +16,12 @@ */ -#include "nw_encoder_stringtable.h" -#include "nw_wbxml_parse.h" -#include "nw_dom_attribute.h" -#include "nw_dom_element.h" -#include "nw_dom_text.h" -#include "nw_dom_document.h" +#include +#include +#include +#include +#include +#include #include "cxml_internal.h" /* ------------------------------------------------------------------------- * diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/src/encoder/src/WBXMLWriter.cpp --- a/browserutilities/cxmllibrary/src/encoder/src/WBXMLWriter.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/src/encoder/src/WBXMLWriter.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,11 +15,10 @@ * */ - #include "cxml_internal.h" -#include "nw_wbxml_token.h" -#include "nw_encoder_wbxmlwriter.h" -#include "nw_wbxml_parse.h" +#include +#include +#include #include "cxml_mem.h" // WLIU_DEBUG: #include "flogger.h" @@ -30,7 +29,6 @@ static const NW_Uint8 zzzunknown[] = {'z','z','z','u','n','k','n','o','w','n','\0'}; #define zzzunknownEncoding HTTP_utf_8 - static NW_Status_t NW_WBXML_Writer_Memcpy(NW_WBXML_Writer_t* pW, const NW_Uint8* pBytes, diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/src/encoder/src/domencoder.c --- a/browserutilities/cxmllibrary/src/encoder/src/domencoder.c Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/src/encoder/src/domencoder.c Mon Mar 29 12:27:15 2010 +0100 @@ -15,13 +15,12 @@ * */ - #include "cxml_internal.h" -#include "nw_encoder_domencoder.h" -#include "nw_encoder_stringtable.h" -#include "nw_dom_element.h" -#include "nw_dom_text.h" -#include "nw_dom_attribute.h" +#include +#include +#include +#include +#include /* ------------------------------------------------------------------------- * private methods diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/src/encoder/src/tinydom2wbxml.c --- a/browserutilities/cxmllibrary/src/encoder/src/tinydom2wbxml.c Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/src/encoder/src/tinydom2wbxml.c Mon Mar 29 12:27:15 2010 +0100 @@ -15,9 +15,6 @@ * */ - - - /***************************************************************** ** File: tinydom2wbxml.c ** @@ -26,7 +23,7 @@ #include "cxml_internal.h" #include "nw_encoder_tinydom2wbxml.h" -#include "nw_dom_text.h" +#include /* Writes an AttrVal diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/src/string/src/char.c --- a/browserutilities/cxmllibrary/src/string/src/char.c Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/src/string/src/char.c Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - /***************************************************************** ** File: character.c ** Description: @@ -31,7 +30,7 @@ * *****************************************************************/ #include "cxml_internal.h" -#include "nw_string_char.h" +#include /* * TODO: Note that there is some duplication between the Validate* diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/src/string/src/string.c --- a/browserutilities/cxmllibrary/src/string/src/string.c Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/src/string/src/string.c Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - /***************************************************************** ** File: xml_string.c ** @@ -30,9 +29,9 @@ * *****************************************************************/ #include "cxml_internal.h" -#include "nw_string_string.h" -#include "nw_string_char.h" -#include "nw_wbxml_dictionary.h" +#include +#include +#include static NW_Status_t StringUCS2Init(NW_String_UCS2String_t * string, void *storage) @@ -51,7 +50,6 @@ return status; } - /* * TODO: The following functions need to have the allocator passed * as an argument !! diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/src/tinydom/src/tiny_dom.c --- a/browserutilities/cxmllibrary/src/tinydom/src/tiny_dom.c Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/src/tinydom/src/tiny_dom.c Mon Mar 29 12:27:15 2010 +0100 @@ -15,10 +15,10 @@ * */ #include "cxml_internal.h" -#include "nw_tinydom.h" -#include "nw_wbxml_parse.h" -#include "nw_wbxml_reader.h" -#include "nw_wbxml_event.h" +#include +#include +#include +#include #include "nw_wbxml_parsei.h" /*Parser flags */ diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/src/tinydom/src/tiny_dom_utils.c --- a/browserutilities/cxmllibrary/src/tinydom/src/tiny_dom_utils.c Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/src/tinydom/src/tiny_dom_utils.c Mon Mar 29 12:27:15 2010 +0100 @@ -15,11 +15,9 @@ * */ - #include "cxml_internal.h" -#include "nw_tinydom_utils.h" -#include "nw_dom_document.h" - +#include +#include /**************************************************************************** * Name: NW_TinyDom_ParserInitialize diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/src/tinydom/src/tiny_dom_write.c --- a/browserutilities/cxmllibrary/src/tinydom/src/tiny_dom_write.c Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/src/tinydom/src/tiny_dom_write.c Mon Mar 29 12:27:15 2010 +0100 @@ -16,13 +16,12 @@ */ /* ************************************************************************/ #include "cxml_internal.h" -#include "nw_wbxml_parse.h" -#include "nw_wbxml_document.h" -#include "nw_encoder_wbxmlwriter.h" +#include +#include +#include #include "nw_encoder_tinydom2wbxml.h" -#include "nw_tinytree.h" -#include "nw_tinydom.h" - +#include +#include /* Create an empty tree */ diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/src/tinytree/src/EBuffer.c --- a/browserutilities/cxmllibrary/src/tinytree/src/EBuffer.c Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/src/tinytree/src/EBuffer.c Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ #include "cxml_internal.h" -#include "nw_tinytree_ebuffer.h" +#include /* ------------------------------------------------------------------------- * private methods diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/src/tinytree/src/TreeVector.c --- a/browserutilities/cxmllibrary/src/tinytree/src/TreeVector.c Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/src/tinytree/src/TreeVector.c Mon Mar 29 12:27:15 2010 +0100 @@ -15,10 +15,9 @@ * */ - #include "cxml_internal.h" -#include "nw_tinytree_treevector.h" -#include "nw_tinytree.h" +#include +#include /* ------------------------------------------------------------------------- */ NW_TinyTree_TreeVector_t* diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/src/tinytree/src/tree.c --- a/browserutilities/cxmllibrary/src/tinytree/src/tree.c Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/src/tinytree/src/tree.c Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,7 @@ * */ - -#include "nw_tinytree.h" +#include #include "cxml_vector.h" NW_TinyTree_t* diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/src/tinytree/src/tree_alloc.c --- a/browserutilities/cxmllibrary/src/tinytree/src/tree_alloc.c Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/src/tinytree/src/tree_alloc.c Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,7 @@ * */ #include "cxml_internal.h" -#include "nw_tinytree.h" +#include #include "nw_tinytree_alloc.h" /* diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/src/utils/include/cxml_internal.h --- a/browserutilities/cxmllibrary/src/utils/include/cxml_internal.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/src/utils/include/cxml_internal.h Mon Mar 29 12:27:15 2010 +0100 @@ -29,9 +29,9 @@ #include -#include "cxml_type_def.h" +#include #include "cxml_mem.h" -#include "cxml_str.h" +#include #include "cxml_vector.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/src/utils/include/cxml_mem.h --- a/browserutilities/cxmllibrary/src/utils/include/cxml_mem.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/src/utils/include/cxml_mem.h Mon Mar 29 12:27:15 2010 +0100 @@ -19,7 +19,7 @@ /* ** Includes */ -#include "cxml_type_def.h" +#include /*************************************************************************** ** File: cxml_mem.h diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/src/utils/src/E32XMLParserDllEntryPoint.cpp --- a/browserutilities/cxmllibrary/src/utils/src/E32XMLParserDllEntryPoint.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/src/utils/src/E32XMLParserDllEntryPoint.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,6 +15,4 @@ * */ #include -#include "nw_wbxml_dictionary.h" -//#include "FeatMgr.h" - +#include diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/src/utils/src/cxml_assert.c --- a/browserutilities/cxmllibrary/src/utils/src/cxml_assert.c Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/src/utils/src/cxml_assert.c Mon Mar 29 12:27:15 2010 +0100 @@ -27,7 +27,7 @@ **------------------------------------------------------------------------- */ -#include "cxml_type_def.h" +#include int kimono_assert () { #ifdef __WINS__ diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/src/utils/src/cxml_file_if.cpp --- a/browserutilities/cxmllibrary/src/utils/src/cxml_file_if.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/src/utils/src/cxml_file_if.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,12 +15,9 @@ * */ - - #include -#include "cxml_file_if.h" -#include "nw_string_char.h" - +#include +#include // //CXML_Read_From_File() diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/src/utils/src/cxml_str.c --- a/browserutilities/cxmllibrary/src/utils/src/cxml_str.c Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/src/utils/src/cxml_str.c Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - /*************************************************************************** ** File: cxml_str.c ** Purpose: Provides the implementation to CXML string API @@ -28,8 +27,7 @@ */ #include "cxml_internal.h" -#include "cxml_nw2cxmlTypes.h" - +#include static NW_Uint16 CXML_Str_Strlen(const CXML_Ucs2 *string) { diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/src/utils/src/cxml_vector.c --- a/browserutilities/cxmllibrary/src/utils/src/cxml_vector.c Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/src/utils/src/cxml_vector.c Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,7 @@ * */ - -#include "nw_tinytree.h" +#include #include "cxml_internal.h" /* ------------------------------------------------------------------------- */ diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/src/wbxmlp/include/DictionaryContext.h --- a/browserutilities/cxmllibrary/src/wbxmlp/include/DictionaryContext.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/src/wbxmlp/include/DictionaryContext.h Mon Mar 29 12:27:15 2010 +0100 @@ -23,15 +23,13 @@ */ #define MAX_DICTIONARIES 9 - /* Temporary methods for storing dictionary & dictionary size inside the context. */ -#include "cxml_proj.h" -#include "nw_wbxml_dictionary.h" +#include +#include - #ifdef __cplusplus extern "C" { diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/src/wbxmlp/include/nw_wbxml_parsei.h --- a/browserutilities/cxmllibrary/src/wbxmlp/include/nw_wbxml_parsei.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/src/wbxmlp/include/nw_wbxml_parsei.h Mon Mar 29 12:27:15 2010 +0100 @@ -25,8 +25,8 @@ #ifndef NW_PARSER_WBXML_PARSE_I_H #define NW_PARSER_WBXML_PARSE_I_H -#include "cxml_proj.h" -#include "nw_wbxml_parse.h" +#include +#include #ifdef __cplusplus extern "C" { diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/src/wbxmlp/src/DictionaryContext.cpp --- a/browserutilities/cxmllibrary/src/wbxmlp/src/DictionaryContext.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/src/wbxmlp/src/DictionaryContext.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -18,7 +18,7 @@ #include "DictionaryContext.h" #include "cxml_internal.h" #include "FeatMgr.h" -#include "nw_wbxml_dictionary.h" +#include /* There is possibility that dictionary initialize is called by the embedded * application also. To make allocation/deallocation of dictionary possible. diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/src/wbxmlp/src/dictionary.c --- a/browserutilities/cxmllibrary/src/wbxmlp/src/dictionary.c Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/src/wbxmlp/src/dictionary.c Mon Mar 29 12:27:15 2010 +0100 @@ -15,15 +15,14 @@ * */ - /***************************************************************** ** File: dictionary.c ** Description: *****************************************************************/ #include "cxml_internal.h" #include "nw_wbxml_parsei.h" -#include "nw_string_char.h" -#include "nw_wbxml_dictionary.h" +#include +#include #include "DictionaryContext.h" /* HTTP_iso_8859_1 IANA MIBenum 4 */ @@ -33,7 +32,6 @@ * The dictionaries ... */ - static NW_Bool NW_WBXML_Dictionary_CmpDictDocType(NW_WBXML_Dictionary_t* dictionary, diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/src/wbxmlp/src/doc.c --- a/browserutilities/cxmllibrary/src/wbxmlp/src/doc.c Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/src/wbxmlp/src/doc.c Mon Mar 29 12:27:15 2010 +0100 @@ -15,17 +15,15 @@ * */ - /***************************************************************** ** File: wbxml_doc.c ** Description: *****************************************************************/ #include "cxml_internal.h" -#include "nw_wbxml_document.h" -#include "nw_string_char.h" -#include "nw_encoder_stringtable.h" - +#include +#include +#include EXPORT_C NW_Status_t NW_WBXML_Document_construct(NW_WBXML_Document_t * doc, NW_Uint32 default_public_id) diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/src/wbxmlp/src/opaque.c --- a/browserutilities/cxmllibrary/src/wbxmlp/src/opaque.c Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/src/wbxmlp/src/opaque.c Mon Mar 29 12:27:15 2010 +0100 @@ -15,14 +15,13 @@ * */ - /***************************************************************** ** File: opaque.c ** Description: Methods on WBXML opaque data objects *****************************************************************/ #include "cxml_internal.h" -#include "nw_wbxml_opaque.h" +#include /* * Initialize an opaque object diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/src/wbxmlp/src/parse_buffer.c --- a/browserutilities/cxmllibrary/src/wbxmlp/src/parse_buffer.c Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/src/wbxmlp/src/parse_buffer.c Mon Mar 29 12:27:15 2010 +0100 @@ -35,14 +35,14 @@ *****************************************************************/ #include "cxml_internal.h" -#include "nw_wbxml_reader.h" -#include "nw_wbxml_dictionary.h" -#include "nw_wbxml_event.h" -#include "nw_wbxml_token.h" -#include "nw_wbxml_opaque.h" +#include +#include +#include +#include +#include #include "nw_wbxml_parsei.h" -#include "nw_string_char.h" -#include "nw_tinydom.h" +#include +#include /* * Initialize the parser diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/src/wbxmlp/src/parse_logic.cpp --- a/browserutilities/cxmllibrary/src/wbxmlp/src/parse_logic.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/src/wbxmlp/src/parse_logic.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -30,13 +30,13 @@ *****************************************************************/ #include "cxml_internal.h" -#include "nw_wbxml_token.h" -#include "nw_wbxml_dictionary.h" -#include "nw_wbxml_document.h" -#include "nw_wbxml_event.h" -#include "nw_wbxml_reader.h" +#include +#include +#include +#include +#include #include "nw_wbxml_parsei.h" -#include "nw_string_char.h" +#include #ifndef HTTP_utf_8 #define HTTP_utf_8 0x6A diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/src/xmlp/include/cxml_xmlp_entity.h --- a/browserutilities/cxmllibrary/src/xmlp/include/cxml_xmlp_entity.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/src/xmlp/include/cxml_xmlp_entity.h Mon Mar 29 12:27:15 2010 +0100 @@ -20,7 +20,7 @@ #ifndef _CXML_ENTITY_H_ #define _CXML_ENTITY_H_ -#include "cxml_proj.h" +#include #ifdef __cplusplus extern "C" { diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/src/xmlp/include/cxml_xmlp_int_entity.h --- a/browserutilities/cxmllibrary/src/xmlp/include/cxml_xmlp_int_entity.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/src/xmlp/include/cxml_xmlp_int_entity.h Mon Mar 29 12:27:15 2010 +0100 @@ -20,13 +20,12 @@ #ifndef _CXML_XMLP_INT_ENTITY_H_ #define _CXML_XMLP_INT_ENTITY_H_ #include -#include "cxml_proj.h" +#include #ifdef __cplusplus extern "C" { #endif - typedef struct CXML_Internal_Entity_s { NW_Ucs2 * name; NW_Ucs2 * value; diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/src/xmlp/src/XMLParser.cpp --- a/browserutilities/cxmllibrary/src/xmlp/src/XMLParser.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/src/xmlp/src/XMLParser.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -16,17 +16,14 @@ */ #include "cxml_internal.h" -#include "nw_xmlp_xmlreader.h" -#include "nw_xmlp_xmlparser.h" -#include "nw_encoder_wbxmlwriter.h" - +#include +#include +#include #include "cxml_xmlp_entity.h" -#include "nw_string_string.h" +#include #include "cxml_xmlp_int_entity.h" - - /* " +#include static NW_Status_t diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/src/xmlp/src/Xmlp2Wbxml.c --- a/browserutilities/cxmllibrary/src/xmlp/src/Xmlp2Wbxml.c Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/src/xmlp/src/Xmlp2Wbxml.c Mon Mar 29 12:27:15 2010 +0100 @@ -17,13 +17,12 @@ #include #include "cxml_internal.h" -#include "nw_encoder_wbxmlwriter.h" -#include "nw_xmlp_xmlparser.h" -#include "nw_xmlp_xmlp2wbxml.h" -#include "nw_encoder_stringtable.h" +#include +#include +#include +#include #include "cxml_xmlp_entity.h" - typedef struct CXML_Encoding_String_s { NW_Int8* charSetStr; NW_Uint32 encodingVal; diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/src/xmlp/src/XmlpEntity.cpp --- a/browserutilities/cxmllibrary/src/xmlp/src/XmlpEntity.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/src/xmlp/src/XmlpEntity.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,11 +15,10 @@ * */ - #include "cxml_internal.h" -#include "nw_xmlp_xmlreader.h" -#include "nw_xmlp_xmlparser.h" -#include "nw_string_string.h" +#include +#include +#include #include "cxml_xmlp_entity.h" #include "cxml_xmlp_int_entity.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/cxmllibrary/src/xmlp/src/XmlpIntEntity.cpp --- a/browserutilities/cxmllibrary/src/xmlp/src/XmlpIntEntity.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/cxmllibrary/src/xmlp/src/XmlpIntEntity.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,22 +15,17 @@ * */ - /* Code to handle Internal Entities */ #include "cxml_internal.h" -#include "nw_xmlp_xmlreader.h" -#include "nw_xmlp_xmlparser.h" -#include "nw_string_string.h" +#include +#include +#include #include "cxml_xmlp_int_entity.h" //#include // Comment out this. - - - - /** ----------------------------------------------------------------------- ** @function: CXML_XML_Parser_Store_I_Entity @synopsis: Function to store the internal entity. diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrClntSrv/group/DownloadMgrClntSrv.mmp --- a/browserutilities/downloadmgr/DownloadMgrClntSrv/group/DownloadMgrClntSrv.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrClntSrv/group/DownloadMgrClntSrv.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ */ #include -#include +#include TARGET DownloadMgr.dll TARGETTYPE DLL @@ -33,7 +33,6 @@ DEFFILE ../BWinsCw/DOWNLOADMGRU_EKA2.def #endif - SOURCEPATH ../src SOURCE DownloadMgrClntSession.cpp SOURCE DownloadMgrClntSubSession.cpp @@ -50,11 +49,10 @@ SOURCE ../../DownloadMgrServEng/src/DownloadDataServ.cpp USERINCLUDE ../inc +USERINCLUDE ../../DownloadMgrServEng/Inc MW_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE ../../DownloadMgrServEng/Inc - LIBRARY euser.lib LIBRARY HttpDMServEng.lib LIBRARY efsrv.lib diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrClntSrv/group/DownloadMgrServer.mmp --- a/browserutilities/downloadmgr/DownloadMgrClntSrv/group/DownloadMgrServer.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrClntSrv/group/DownloadMgrServer.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -18,7 +18,7 @@ #include #include -#include +#include TARGET DownloadMgrServer.exe TARGETTYPE exe @@ -26,6 +26,7 @@ UID 0x1000008c 0x10008D60 EPOCHEAPSIZE 0x2000 0x300000 + MW_LAYER_SYSTEMINCLUDE USERINCLUDE ../inc @@ -33,11 +34,10 @@ SOURCEPATH ../src SOURCE DownloadMgrMain.cpp - LIBRARY euser.lib LIBRARY DownloadMgr.lib -CAPABILITY CAP_SERVER -SwEvent -Location -LocalServices -UserEnvironment -ReadUserData -WriteUserData NetworkControl +CAPABILITY CAP_SERVER -SwEvent -Location -LocalServices -UserEnvironment -WriteUserData ReadUserData NetworkControl VENDORID VID_DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrClntSrv/inc/DownloadMgrCod.h --- a/browserutilities/downloadmgr/DownloadMgrClntSrv/inc/DownloadMgrCod.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrClntSrv/inc/DownloadMgrCod.h Mon Mar 29 12:27:15 2010 +0100 @@ -22,7 +22,7 @@ #define __DOWNLOADMGR_CODOBSERVER_H__ #include -#include +#include // FORWARD DECLARATIONS class RHttpDownloadMgr; diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrClntSrv/inc/DownloadMgrDef.h --- a/browserutilities/downloadmgr/DownloadMgrClntSrv/inc/DownloadMgrDef.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrClntSrv/inc/DownloadMgrDef.h Mon Mar 29 12:27:15 2010 +0100 @@ -101,13 +101,14 @@ EHttpDownloadDataAttribute, // =42 EHttpDownloadTrackAttribute, // =43 + EHttpDownMgrNumOfSubSessions, // =44 /* * This should be the last item and the opcode must be incremented as well. * It is also important to make the changes on KDMgrServerPolicyRanges * in DownloadMgrServer.cpp according to this!!! */ - EHttpDownloadMgrNotSupported // =44 (n+1) + EHttpDownloadMgrNotSupported // =45 (n+1) }; #endif /* __DOWNLOADMGR_DEF_H__ */ diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrClntSrv/inc/DownloadMgrDefAttrib.h --- a/browserutilities/downloadmgr/DownloadMgrClntSrv/inc/DownloadMgrDefAttrib.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrClntSrv/inc/DownloadMgrDefAttrib.h Mon Mar 29 12:27:15 2010 +0100 @@ -22,7 +22,7 @@ // INCLUDES #include -#include +#include // DATA TYPES typedef TPckgBuf< TInt32 > THttpDownloadMgrIntegerBuf; diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrClntSrv/inc/DownloadMgrEventQueue.h --- a/browserutilities/downloadmgr/DownloadMgrClntSrv/inc/DownloadMgrEventQueue.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrClntSrv/inc/DownloadMgrEventQueue.h Mon Mar 29 12:27:15 2010 +0100 @@ -22,7 +22,7 @@ // INCLUDES #include -#include +#include // FORWARD DECLARATIONS class CHttpDownload; diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrClntSrv/inc/DownloadMgrHandler.h --- a/browserutilities/downloadmgr/DownloadMgrClntSrv/inc/DownloadMgrHandler.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrClntSrv/inc/DownloadMgrHandler.h Mon Mar 29 12:27:15 2010 +0100 @@ -21,7 +21,7 @@ #ifndef __DOWNLOADMGR_RECEIVEHANDLER_H__ #define __DOWNLOADMGR_RECEIVEHANDLER_H__ -#include "DownloadMgrClient.h" +#include #include // FORWARD DECLARATIONS diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrClntSrv/inc/DownloadMgrServer.h --- a/browserutilities/downloadmgr/DownloadMgrClntSrv/inc/DownloadMgrServer.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrClntSrv/inc/DownloadMgrServer.h Mon Mar 29 12:27:15 2010 +0100 @@ -20,7 +20,7 @@ #define __DOWNLOADMGR_SERVER_H__ // INCLUDES -#include +#include "HttpDownloadManagerServerEngine.h" #include // FORWARD DECLARATIONS @@ -601,6 +601,13 @@ * @return None. */ void SetString8AttributeL(); + + /** + * Get the number of live subsessions. + * @param - + * @return None. + */ + void GetNumberOfSubsession(); private: // from CSession diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrClntSrv/src/DownloadMgrClientApiExt.cpp --- a/browserutilities/downloadmgr/DownloadMgrClntSrv/src/DownloadMgrClientApiExt.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrClntSrv/src/DownloadMgrClientApiExt.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,7 @@ * */ - -#include "DownloadMgrClientApiExt.h" +#include #include "DownloadMgrLogger.h" // ======== MEMBER FUNCTIONS ======== diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrClntSrv/src/DownloadMgrClntSession.cpp --- a/browserutilities/downloadmgr/DownloadMgrClntSrv/src/DownloadMgrClntSession.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrClntSrv/src/DownloadMgrClntSession.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -19,7 +19,7 @@ // INCLUDE FILES #include "DownloadMgrLogger.h" -#include "DownloadMgrClient.h" +#include #include "DownloadMgrServer.h" #include "DownloadMgrStart.h" #include "DownloadMgrDef.h" @@ -29,13 +29,14 @@ #include #include #include "DownloadMgrCRKeys.h" -#include -#include +#include +#include // CONSTANTS const TInt KHttpDownloadMgrObserverArrayGranularity = 4; const TInt KHttpDownloadMgrDefalutAttribsGranularity = 4; const TInt KDefaultMsgSlots = 16; +const TInt KNumOfSubSessions = 16; _LIT8( KHttpScheme, "http" ); _LIT8( KHttpsScheme, "https" ); @@ -599,6 +600,11 @@ CLOG_ENTERFN( "RHttpDownloadMgr::CreateDownloadL" ) + //Leave if the number of parallel downloads exceeds 16. + if(!IsNewDownloadPossible()){ + User::LeaveIfError(KErrServerBusy); + } + RHttpDownload* download = new (ELeave) RHttpDownload ( this ); CleanupStack::PushL( download ); CleanupClosePushL( *download ); @@ -839,6 +845,22 @@ } // --------------------------------------------------------- +// RHttpDownloadMgr::IsNewDownloadPossible() +// --------------------------------------------------------- + TBool RHttpDownloadMgr::IsNewDownloadPossible() +{ + TInt32 value(0); + TPckg pckg( value ); + if(KErrNone == SendReceive( EHttpDownMgrNumOfSubSessions, + TIpcArgs(&pckg ) )){ + if(value < KNumOfSubSessions){ + return ETrue; + } + } + return EFalse; +} + +// --------------------------------------------------------- // RHttpDownloadMgr::Disconnect // --------------------------------------------------------- // diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrClntSrv/src/DownloadMgrClntSubSession.cpp --- a/browserutilities/downloadmgr/DownloadMgrClntSrv/src/DownloadMgrClntSubSession.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrClntSrv/src/DownloadMgrClntSubSession.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -19,7 +19,7 @@ // INCLUDE FILES #include "DownloadMgrLogger.h" -#include "DownloadMgrClient.h" +#include #include "DownloadMgrServer.h" #include "DownloadMgrHandler.h" #include "DownloadMgrStart.h" @@ -31,10 +31,10 @@ #include #include -#include +#include #include #include -#include +#include #include // CONSTANTS @@ -252,7 +252,7 @@ // EDlAttrPausable TBool iPausable; // EDlAttrDestRemovable - TBool iRemovableDest; + TInt32 iDestMemType; // EDlAttrState THttpDownloadState TInt32 iDlState; @@ -400,7 +400,7 @@ case EDlAttrDestRemovable: { - iRemovableDest = aValue; + iDestMemType = (aValue) ? KDriveAttRemovable : KDriveAttLocal; } default: @@ -473,6 +473,11 @@ } break; + case EDlAttrDestRemovable: + { + iDestMemType = aValue; + } + default: break; } @@ -667,7 +672,7 @@ case EDlAttrDestRemovable: { - aValue = iRemovableDest ; + aValue = (KDriveAttRemovable == iDestMemType) ? ETrue : EFalse ; } break; default: @@ -726,7 +731,7 @@ case EDlAttrDestRemovable: { - aValue = mediaData->DesRemovable(); + aValue = ( KDriveAttRemovable == mediaData->DesRemovable()) ? ETrue : EFalse ; } break; @@ -805,6 +810,12 @@ } break; + case EDlAttrDestRemovable: + { + aValue = iDestMemType ; + } + break; + default: { ret = KErrNotFound; @@ -883,6 +894,12 @@ aValue = mediaData->Method(); } break; + + case EDlAttrDestRemovable: + { + aValue = mediaData->DesRemovable(); + } + break; default: { @@ -1991,9 +2008,9 @@ GetBoolAttribute(EDlAttrPausable, bPausable); iDlExtension->SetBoolAttribute( EDlAttrPausable, bPausable ); - TBool bRemovableDest; - GetBoolAttribute(EDlAttrDestRemovable, bRemovableDest); - iDlExtension->SetBoolAttribute( EDlAttrDestRemovable, bRemovableDest ); + TInt32 removableDestStatus; + GetIntAttribute(EDlAttrDestRemovable, removableDestStatus); + iDlExtension->SetIntAttribute( EDlAttrDestRemovable, removableDestStatus ); // diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrClntSrv/src/DownloadMgrCod.cpp --- a/browserutilities/downloadmgr/DownloadMgrClntSrv/src/DownloadMgrCod.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrClntSrv/src/DownloadMgrCod.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -18,7 +18,7 @@ // INCLUDE FILES -#include "DownloadMgrClient.h" +#include #include "DownloadMgrCod.h" #include "DownloadMgrLogger.h" #include diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrClntSrv/src/DownloadMgrEventQueue.cpp --- a/browserutilities/downloadmgr/DownloadMgrClntSrv/src/DownloadMgrEventQueue.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrClntSrv/src/DownloadMgrEventQueue.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,12 +15,10 @@ * */ - - // INCLUDE FILES #include "DownloadMgrEventQueue.h" #include "DownloadMgrLogger.h" -#include +#include "HttpDownload.h" #ifdef __DOWNLOADMGR_LOG__ //#define __DUMP_EVENT_QUEUE diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrClntSrv/src/DownloadMgrHandler.cpp --- a/browserutilities/downloadmgr/DownloadMgrClntSrv/src/DownloadMgrHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrClntSrv/src/DownloadMgrHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -16,16 +16,14 @@ * */ - // INCLUDE FILES #include "DownloadMgrLogger.h" #include "DownloadMgrHandler.h" -#include "DownloadMgrClient.h" +#include #include "DownloadMgrDefAttrib.h" // CONSTANTS - // GLOBAL FUNCTIONS // ================= MEMBER FUNCTIONS ======================= diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrClntSrv/src/DownloadMgrServer.cpp --- a/browserutilities/downloadmgr/DownloadMgrClntSrv/src/DownloadMgrServer.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrClntSrv/src/DownloadMgrServer.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -16,14 +16,13 @@ * */ - // INCLUDE FILES #include "DownloadMgrLogger.h" #include "DownloadMgrServer.h" #include "DownloadMgrDef.h" -#include -#include +#include "HttpClientAppInstance.h" +#include "HttpDownload.h" #include #include //#include @@ -84,9 +83,9 @@ EHttpDownloadCloseCompleted, // =41 EHttpDownloadDataAttribute, // =42 EHttpDownloadTrackAttribute, // =43 - + EHttpDownMgrNumOfSubSessions, //44 */ - 44 // EHttpDownloadMgrNotSupported // =44 + 45 // EHttpDownloadMgrNotSupported // =45 }; enum TDownloadMgrSecurityPolicy diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrClntSrv/src/DownloadMgrSrvObject.cpp --- a/browserutilities/downloadmgr/DownloadMgrClntSrv/src/DownloadMgrSrvObject.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrClntSrv/src/DownloadMgrSrvObject.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -16,15 +16,14 @@ * */ - // INCLUDE FILES #include "DownloadMgrLogger.h" #include "DownloadMgrServer.h" #include "DownloadMgrDef.h" #include "DownloadMgrDefAttrib.h" -#include -#include -#include +#include "HttpClientApp.h" +#include "HttpClientAppInstance.h" +#include "HttpDownload.h" #include #include //#include diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrClntSrv/src/DownloadMgrSrvSession.cpp --- a/browserutilities/downloadmgr/DownloadMgrClntSrv/src/DownloadMgrSrvSession.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrClntSrv/src/DownloadMgrSrvSession.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -16,15 +16,14 @@ * */ - // INCLUDE FILES #include "DownloadMgrLogger.h" #include "DownloadMgrServer.h" #include "DownloadMgrDef.h" #include "DownloadMgrEventQueue.h" -#include -#include +#include "HttpClientAppInstance.h" +#include "HttpDownload.h" #include #include @@ -174,6 +173,11 @@ // check for session-relative requests switch( aMessage.Function() ) { + case EHttpDownMgrNumOfSubSessions: + { + GetNumberOfSubsession(); + return; + } case EHttpDownloadMgrInitialize: { InitializeL(); @@ -312,6 +316,24 @@ } // --------------------------------------------------------- +// CDownloadMgrSession::GetNumberOfSubsession +// --------------------------------------------------------- +// +void CDownloadMgrSession::GetNumberOfSubsession() + { + TInt32 value(0); + for( TInt i = 0; i < iObjectIx->Count(); i++ ){ + CDownloadSubSession* downloadSess + = ( CDownloadSubSession* )(*iObjectIx)[i]; + if( downloadSess != NULL ){ + value++; + } + } + TPckg pckg( value ); + Write( 0, CurrentMessage(), pckg ); + } + +// --------------------------------------------------------- // CDownloadMgrSession::InitializeL // --------------------------------------------------------- // diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrClntSrv/src/DownloadMgrTransObserver.cpp --- a/browserutilities/downloadmgr/DownloadMgrClntSrv/src/DownloadMgrTransObserver.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrClntSrv/src/DownloadMgrTransObserver.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -16,14 +16,12 @@ * */ - // INCLUDE FILES #include "DownloadMgrTransObserver.h" -#include "DownloadMgrClient.h" +#include // CONSTANTS - // GLOBAL FUNCTIONS // ================= MEMBER FUNCTIONS ======================= diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrServEng/Group/HttpDMServEng.mmp --- a/browserutilities/downloadmgr/DownloadMgrServEng/Group/HttpDMServEng.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrServEng/Group/HttpDMServEng.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -18,7 +18,7 @@ #include #include -#include +#include TARGET HttpDMServEng.dll TARGETTYPE dll @@ -39,20 +39,10 @@ SOURCEPATH ../src +MW_LAYER_SYSTEMINCLUDE +#if defined(__PLATFORM_VERSION_50_TUBE__) || defined( __PLATFORM_VERSION_50__) APP_LAYER_SYSTEMINCLUDE -/* SF TODO: resolve APP LAYER DEPENDENCY: - s60/app/devicecontrol/devctrl_dom/fota_engine_api/inc/FotaEngine.h - s60/app/devicecontrol/devctrl_dom/fota_engine_api/inc/fotaconst.h - s60/app/devicecontrol/devctrl_dom/fota_engine_api/inc/FotaEngStream.h - - s60/app/gallery/gallery_dom/media_file_api/inc/CMGXFileManager.h - s60/app/gallery/gallery_dom/media_file_api/inc/MGXFileManagerFactory.h -*/ -//MW_LAYER_SYSTEMINCLUDE - -MW_LAYER_ECOM_SYSTEMINCLUDE -MW_LAYER_HTTP_SYSTEMINCLUDE - +#endif USERINCLUDE ../inc @@ -64,9 +54,9 @@ SOURCE HeaderField.cpp SOURCE HttpStorage.cpp SOURCE HttpDownloadMgrLogger.cpp -SOURCE FileExt.cpp +SOURCE FileExt.cpp SOURCE DownloadDataServ.cpp -SOURCE BuffStorage.cpp +SOURCE BuffStorage.cpp #ifdef __S60_32__ LANG sc @@ -107,4 +97,9 @@ LIBRARY DcfRep.lib LIBRARY FeatMgr.lib +#ifdef BRDO_OCC_ENABLED_FF +LIBRARY extendedconnpref.lib +LIBRARY netmeta.lib +#endif + // End of File diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrServEng/Inc/DownloadDataServ.h --- a/browserutilities/downloadmgr/DownloadMgrServEng/Inc/DownloadDataServ.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrServEng/Inc/DownloadDataServ.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,14 +15,12 @@ * */ - - #ifndef DOWNLOAD_DATA_SERV_H #define DOWNLOAD_DATA_SERV_H // INCLUDES #include -#include "HttpDownloadData.h" +#include // CONSTANTS @@ -185,7 +183,7 @@ * Set destination removable attribute. * @param aDesRemovable Whether removable media drive. */ - void SetDesRemovable( TBool aDesRemovable ); + void SetDesRemovable( TInt32 aDesRemovable ); /** * Set last error id attribute. diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrServEng/Inc/HeaderField.h --- a/browserutilities/downloadmgr/DownloadMgrServEng/Inc/HeaderField.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrServEng/Inc/HeaderField.h Mon Mar 29 12:27:15 2010 +0100 @@ -22,7 +22,7 @@ // INCLUDES #include -#include +#include #include // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrServEng/Inc/HttpClientAppInstance.h --- a/browserutilities/downloadmgr/DownloadMgrServEng/Inc/HttpClientAppInstance.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrServEng/Inc/HttpClientAppInstance.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,13 +15,11 @@ * */ - - #ifndef HTTPCLIENTAPPINSTANCE_H #define HTTPCLIENTAPPINSTANCE_H // INCLUDES -#include "HttpDownloadMgrCommon.h" +#include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrServEng/Inc/HttpDownload.h --- a/browserutilities/downloadmgr/DownloadMgrServEng/Inc/HttpDownload.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrServEng/Inc/HttpDownload.h Mon Mar 29 12:27:15 2010 +0100 @@ -25,7 +25,7 @@ #include "HttpConnHandler.h" #include "DownloadDataServ.h" -#include +#include #include #include #include @@ -968,12 +968,12 @@ * Notifies gallery about new file * @param aFileName file name */ - void CHttpDownload::NotifyMediaGalleryL( const TDesC& aFileName ); + void NotifyMediaGalleryL( const TDesC& aFileName ); /** * ConvertDownloadNameUniqueL */ - void CHttpDownload::ConvertDownloadNameUniqueL( HBufC*& filePath, + void ConvertDownloadNameUniqueL( HBufC*& filePath, HBufC*& fileName, HBufC*& fileExtn); diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrServEng/Inc/HttpDownloadManagerServerEngine.h --- a/browserutilities/downloadmgr/DownloadMgrServEng/Inc/HttpDownloadManagerServerEngine.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrServEng/Inc/HttpDownloadManagerServerEngine.h Mon Mar 29 12:27:15 2010 +0100 @@ -16,15 +16,13 @@ * */ - - #ifndef HTTPDOWNLOADMANAGER_H #define HTTPDOWNLOADMANAGER_H // INCLUDES #include "HttpDownload.h" -#include +#include #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrServEng/Inc/HttpStorage.h --- a/browserutilities/downloadmgr/DownloadMgrServEng/Inc/HttpStorage.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrServEng/Inc/HttpStorage.h Mon Mar 29 12:27:15 2010 +0100 @@ -212,7 +212,7 @@ HBufC* DestFilename()const { return iDestFilename; }; HBufC* DdFileName()const { return iDdFilename; }; TBool DestFNameSet()const { return iDestFNameSet; }; - TBool RemovableDest()const { return iRemovableDest; }; + TInt32 RemovableDest()const { return iRemovableStatus; }; TBool ProgressiveDownload()const { return iProgressiveDownload; } TInt32 Length()const { return iLength; }; TInt32 DownloadedSize()const { return iDownloadedSize; }; @@ -221,7 +221,7 @@ void SetLength( TInt32 aLength ){ iLength = aLength; }; void SetDownloadedSize( TInt32 aSize ){ iDownloadedSize = aSize; iBufferedSize = aSize; }; - void SetRemovableDest( TBool aRemovable ){ iRemovableDest = aRemovable; }; + void SetRemovableDest( TInt32 aRemovable ){ iRemovableStatus = aRemovable; }; void SetLocalFilenameL(const TDesC16& aValue); void SetPartialContentLength( TInt32 aLength ){ iPartialLength = aLength; }; void SetMoDownloadedSize( TInt32 aMoSize ){ iMoDownloadedSize = aMoSize ;}; @@ -279,7 +279,8 @@ TBool iProgressiveDownload; // EDlAttrProgressive - TBool iRemovableDest; + TInt32 iRemovableStatus; + HBufC* iDestFilename; // EDlAttrDestFilename TBool iDestFNameSet; // iDestFilename is set by client app -> // do not delete it in Reset() diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrServEng/Src/DownloadDataServ.cpp --- a/browserutilities/downloadmgr/DownloadMgrServEng/Src/DownloadDataServ.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrServEng/Src/DownloadDataServ.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,16 +15,12 @@ * */ - - // INCLUDE FILES #include #include "DownloadDataServ.h" - // CONSTANTS - // --------------------------------------------------------- // CMediaDataServ::NewL() // Two-phase Constructor - Creates object from stream @@ -256,10 +252,10 @@ // CMediaDataServ::SetDesRemovable() // --------------------------------------------------------- // -void CMediaDataServ::SetDesRemovable( TBool aDesRemovable ) - { - iDesRemovable = aDesRemovable; - } +void CMediaDataServ::SetDesRemovable( TInt32 aDesRemovable ) + { + iDesRemovableStatus = aDesRemovable; + } // --------------------------------------------------------- // CMediaDataServ::SetLastErrorId() @@ -380,7 +376,7 @@ iRedirected = aStream.ReadInt32L(); iDestFilename = HBufC::NewL(aStream, KMaxFileName); iDownloadedSize = aStream.ReadInt32L(); - iDesRemovable = aStream.ReadInt32L(); + iDesRemovableStatus = aStream.ReadInt32L(); iLastErrorId = aStream.ReadInt32L(); iGlobalErrorId = aStream.ReadInt32L(); iPausable = aStream.ReadInt32L(); diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrServEng/Src/HttpClientAppInstance.cpp --- a/browserutilities/downloadmgr/DownloadMgrServEng/Src/HttpClientAppInstance.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrServEng/Src/HttpClientAppInstance.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,13 +15,11 @@ * */ - - // INCLUDE FILES #include "HttpClientAppInstance.h" #include "HttpClientApp.h" #include "HttpDownloadManagerServerEngine.h" -#include "HttpDownloadMgrLogger.h" +#include "HttpDownloadMgrLogger.h" // EXTERNAL DATA STRUCTURES //extern ?external_data; diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrServEng/Src/HttpConnHandler.cpp --- a/browserutilities/downloadmgr/DownloadMgrServEng/Src/HttpConnHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrServEng/Src/HttpConnHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,6 @@ * */ - - // INCLUDE FILES #include "HttpClientApp.h" #include "HttpClientAppInstance.h" @@ -28,12 +26,16 @@ #include #include -#include +#include #include -#include +#include #include -//#include -#include +//#include +#include +#include +#ifdef BRDO_OCC_ENABLED_FF +#include +#endif // EXTERNAL DATA STRUCTURES //extern ?external_data; @@ -288,6 +290,9 @@ iHttpSession.OpenL(); CLOG_WRITE8( "Session open" ); InitSessionL(); + + //Set it to zero + iIapId = 0; } // ----------------------------------------------------------------------------- @@ -380,7 +385,29 @@ iPref.SetDialogPreference( ECommDbDialogPrefPrompt ); } + #ifdef BRDO_OCC_ENABLED_FF + TExtendedConnPref extPref; + CLOG_WRITE( "Setting OCC parameters"); + CLOG_WRITE_1( "Iap: %d", iIapId ); + if (iIapId) + { + CLOG_WRITE( "Iap is found"); + extPref.SetSnapPurpose(CMManager::ESnapPurposeUnknown); + extPref.SetIapId(iIapId); + } + else + { + CLOG_WRITE( "Using Internet Snap"); + extPref.SetSnapPurpose(CMManager::ESnapPurposeInternet); + } + + extPref.SetNoteBehaviour(TExtendedConnPref::ENoteBehaviourConnSilent); + TConnPrefList prefList; + prefList.AppendL(&extPref); + iConnection.Start( prefList, iStatus ); + #else iConnection.Start( iPref, iStatus ); + #endif //BRDO_OCC_ENABLED_FF // RConnection will complete us. doComplete = EFalse; diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrServEng/Src/HttpDownload.cpp --- a/browserutilities/downloadmgr/DownloadMgrServEng/Src/HttpDownload.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrServEng/Src/HttpDownload.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -18,7 +18,7 @@ // INCLUDE FILES -#include +#include #include "HeaderField.h" #include "HttpDownloadManagerServerEngine.h" #include "HttpClientApp.h" @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include @@ -1099,7 +1099,13 @@ { aValue = iActivePlayedDownload; } - break; + break; + + case EDlAttrDestRemovable: + { + aValue = iStorage->RemovableDest(); + } + break; default: { @@ -1195,6 +1201,12 @@ aValue = mediaData->Method(); } break; + + case EDlAttrDestRemovable: + { + aValue = mediaData->DesRemovable(); + } + break; default: { @@ -1295,7 +1307,7 @@ case EDlAttrDestRemovable: { - aValue = iStorage->RemovableDest(); + aValue = (KDriveAttRemovable == iStorage->RemovableDest()) ? ETrue : EFalse ; } break; @@ -1368,7 +1380,7 @@ case EDlAttrDestRemovable: { - aValue = mediaData->DesRemovable(); + aValue = (KDriveAttRemovable == mediaData->DesRemovable()) ? ETrue : EFalse ; } break; @@ -2325,6 +2337,23 @@ } break; + + case EDlAttrDestRemovable: + { + if( iCodDownload ) + { + iStorage->SetRemovableDest( aValue ); + + if (iCodDlData) + { + // Update for Active media object. + TInt active = iActiveDownload; + CMediaDataBase* mediaData = (*iCodDlData)[active]; + mediaData->SetDesRemovable( aValue ); + } + } + } + break; default: { #ifdef __WINS__ @@ -2487,14 +2516,16 @@ { if( iCodDownload ) { - iStorage->SetRemovableDest( aValue ); + TInt32 removableDestStatus = (aValue) ? KDriveAttRemovable : KDriveAttLocal ; + + iStorage->SetRemovableDest( removableDestStatus ); if (iCodDlData) { // Update for Active media object. TInt active = iActiveDownload; CMediaDataBase* mediaData = (*iCodDlData)[active]; - mediaData->SetDesRemovable( aValue ); + mediaData->SetDesRemovable( removableDestStatus ); } } } diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrServEng/Src/HttpDownloadManagerServerEngine.cpp --- a/browserutilities/downloadmgr/DownloadMgrServEng/Src/HttpDownloadManagerServerEngine.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrServEng/Src/HttpDownloadManagerServerEngine.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrServEng/Src/HttpStorage.cpp --- a/browserutilities/downloadmgr/DownloadMgrServEng/Src/HttpStorage.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrServEng/Src/HttpStorage.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -19,7 +19,7 @@ // INCLUDE FILES #include -#include +#include #include "FileExt.h" #include "HttpClientApp.h" @@ -696,19 +696,26 @@ } CleanupStack::PopAndDestroy( drivesDynList ); CLOG_WRITE_2( "Saving content to %d Drive with %d B free space", driveSpaceMax, freeSpaceMax ); - - TDriveInfo driveInfo; - - if( !iDownload->ClientApp()->Engine()->Fs().Drive( driveInfo, driveSpaceMax) ) - { - iRemovableDest = (driveInfo.iDriveAtt & KDriveAttRemovable); - CLOG_WRITE_1( "Removable: [%d]", iRemovableDest ); - CLOG_WRITE_1( "driveInfo.iDriveAtt: [%d]", driveInfo.iDriveAtt ); - } - else - { - CLOG_WRITE("DriveInfo failed"); - } + TUint aStatus ; + + if( KErrNone == DriveInfo::GetDriveStatus( iDownload->ClientApp()->Engine()->Fs(), driveSpaceMax , aStatus )) + { + iRemovableStatus = (aStatus & DriveInfo::EDriveExternallyMountable) ? aStatus : 0 ; + if( iRemovableStatus ) + { + iRemovableStatus = (aStatus & DriveInfo::EDriveRemovable) ? KDriveAttRemovable : KDriveAttInternal ; + } + else + { + iRemovableStatus = KDriveAttLocal ; + } + CLOG_WRITE_1( "Removable: [%d]", iRemovableStatus ); + CLOG_WRITE_1( "DriveInfo Status [%d]", aStatus ); + } + else + { + CLOG_WRITE("DriveStatus failed"); + } return driveSpaceMax; #else @@ -722,6 +729,7 @@ ( &fs, bytesToWrite ); ) if(!mmcOk) { + iRemovableStatus = KDriveAttInternal ; CLOG_WRITE( "no MMC present" ); return EDriveC; } @@ -732,7 +740,9 @@ fs.Volume(volInfoE,EDriveE); TInt64 freeC = volInfoC.iFree;//free memory available in that drive TInt64 freeE = volInfoE.iFree; - return freeC>=freeE?EDriveC:EDriveE;//put the file in which ever drive has more memory + freeC = freeE?EDriveC:EDriveE;//put the file in which ever drive has more memory + iRemovableStatus = (EDriveC == freeC) ? KDriveAttInternal : KDriveAttRemovable ; + return freeC; #endif } @@ -823,18 +833,45 @@ #endif } +#ifdef RD_MULTIPLE_DRIVE + TUint aStatus ; + + if( KErrNone == DriveInfo::GetDriveStatus( iDownload->ClientApp()->Engine()->Fs(), drive , aStatus )) + { + iRemovableStatus = (aStatus & DriveInfo::EDriveExternallyMountable) ? aStatus : 0 ; + if( iRemovableStatus ) + { + iRemovableStatus = (aStatus & DriveInfo::EDriveRemovable) ? KDriveAttRemovable : KDriveAttInternal ; + } + else + { + iRemovableStatus = KDriveAttLocal ; + } + CLOG_WRITE_1( "Removable: [%d]", iRemovableStatus ); + CLOG_WRITE_1( "DriveInfo Status [%d]", aStatus ); + } + else + { + CLOG_WRITE("DriveStatus failed"); + } + +#else TDriveInfo driveInfo; if( !iDownload->ClientApp()->Engine()->Fs().Drive( driveInfo, drive) ) { - iRemovableDest = (driveInfo.iDriveAtt & KDriveAttRemovable); - CLOG_WRITE_1( "Removable: [%d]", iRemovableDest ); + if (driveInfo.iDriveAtt & KDriveAttRemovable) + iRemovableStatus = KDriveAttRemovable ; + else + iRemovableStatus = KDriveAttInternal ; + CLOG_WRITE_1( "Removable: [%d]", iRemovableStatus ); } else - { + { CLOG_WRITE("DriveInfo failed"); } - +#endif + if( err || !isSpace ) { CLOG_WRITE8( "OOD1" ); @@ -1007,16 +1044,44 @@ TInt drive; if( !iDownload->ClientApp()->Engine()->Fs().CharToDrive((*iDestFilename)[0], drive) ) { - TDriveInfo driveInfo; - if( !iDownload->ClientApp()->Engine()->Fs().Drive( driveInfo, drive) ) +#ifdef RD_MULTIPLE_DRIVE + TUint aStatus ; + + if( KErrNone == DriveInfo::GetDriveStatus( iDownload->ClientApp()->Engine()->Fs(), drive , aStatus )) { - iRemovableDest = (driveInfo.iDriveAtt & KDriveAttRemovable); - CLOG_WRITE_1( "Removable: [%d]", iRemovableDest ); + iRemovableStatus = (aStatus & DriveInfo::EDriveExternallyMountable) ? aStatus : 0 ; + if( iRemovableStatus ) + { + iRemovableStatus = (aStatus & DriveInfo::EDriveRemovable) ? KDriveAttRemovable : KDriveAttInternal ; + } + else + { + iRemovableStatus = KDriveAttLocal ; + } + CLOG_WRITE_1( "Removable: [%d]", iRemovableStatus ); + CLOG_WRITE_1( "DriveInfo Status [%d]", aStatus ); } else { + CLOG_WRITE("DriveStatus failed"); + } + +#else + TDriveInfo driveInfo; + + if( !iDownload->ClientApp()->Engine()->Fs().Drive( driveInfo, drive) ) + { + if (driveInfo.iDriveAtt & KDriveAttRemovable) + iRemovableStatus = KDriveAttRemovable ; + else + iRemovableStatus = KDriveAttInternal ; + CLOG_WRITE_1( "Removable: [%d]", iRemovableStatus ); + } + else + { CLOG_WRITE("DriveInfo failed"); - } + } +#endif } else { @@ -1043,7 +1108,7 @@ APPEND_BUF_INT( aBuf, iDownloadedSize); AppendBufL( aBuf, iDdFilename ); APPEND_BUF_INT( aBuf, iDownload->iMoLength ); - APPEND_BUF_INT( aBuf, iRemovableDest ); + APPEND_BUF_INT( aBuf, iRemovableStatus ); } @@ -1065,7 +1130,7 @@ READ_INT_L( aInFile, iDownloadedSize ); ReadHBufCL( aInFile, iDdFilename ); READ_INT_L( aInFile, iDownload->iMoLength ); - READ_INT_L( aInFile, iRemovableDest ); + READ_INT_L( aInFile, iRemovableStatus ); } diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrUiLib/Data/DownloadMgrUiLib.rss --- a/browserutilities/downloadmgr/DownloadMgrUiLib/Data/DownloadMgrUiLib.rss Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrUiLib/Data/DownloadMgrUiLib.rss Mon Mar 29 12:27:15 2010 +0100 @@ -20,8 +20,9 @@ NAME DMUL // INCLUDES +#include #include "DownloadMgrUiLib.hrh" -#include +#include #include #include #include @@ -319,7 +320,7 @@ MENU_TITLE { menu_pane = r_dmul_downloadslist_menu; txt = ""; } }; } - +#ifndef BRDO_SINGLE_CLICK_ENABLED_FF RESOURCE MENU_PANE r_dmul_downloadslist_menu { items = @@ -339,7 +340,25 @@ MENU_ITEM { command = EDownloadsListCmdCancelAll; txt = qtn_browser_downloads_cancel_all; } }; } +#else +RESOURCE MENU_PANE r_dmul_downloadslist_menu + { + items = + { + MENU_ITEM { command = EDownloadsListCmdResumeAll; txt = qtn_browser_downloads_resume_all; }, + MENU_ITEM { command = EDownloadsListCmdCancelAll; txt = qtn_browser_downloads_cancel_all; } + }; + } +RESOURCE MENU_PANE r_dmul_aiw_popup + { + items = + { + MENU_ITEM { command = EAiwCmdContact; txt = qtn_mg_options_assign_to_contact ; }, + MENU_ITEM {command = EAiwCmdRingtone;txt = qtn_mg_options_set_as_rt; } + }; + } +#endif STRUCT DMUL_AIW_INTEREST_MENUPANE_MAPPING_LIST { STRUCT pairs[]; @@ -363,6 +382,22 @@ { items= { +#ifdef BRDO_SINGLE_CLICK_ENABLED_FF + AIW_CRITERIA_ITEM + { + id = EAiwCmdRingtone; + serviceCmd = KAiwCmdAssign; + contentType = "*"; + serviceClass = KAiwClassMenu; + }, + AIW_CRITERIA_ITEM + { + id = EAiwCmdContact; + serviceCmd = KAiwCmdAssign; + contentType = "*"; + serviceClass = KAiwClassMenu; + } +#else AIW_CRITERIA_ITEM { id = EDownloadsListCmdUseAs; @@ -370,6 +405,7 @@ contentType = "*"; serviceClass = KAiwClassMenu; } +#endif }; } @@ -380,7 +416,11 @@ DMUL_AIW_INTEREST_MENUPANE_PAIR { interest = r_dmul_aiw_use_as_interest; +#ifdef BRDO_SINGLE_CLICK_ENABLED_FF + menupane = r_dmul_aiw_popup; +#else menupane = r_dmul_downloadslist_menu; +#endif } }; } @@ -490,6 +530,20 @@ }; } +#ifdef BRDO_SINGLE_CLICK_ENABLED_FF +RESOURCE STYLUS_POPUP_MENU r_stylus_long_tap_popup_dl_menu + { + items = + { + STYLUS_POPUP_MENU_ITEM { txt = qtn_browser_downloads_delete; command = EDownloadsListCmdDelete;}, + STYLUS_POPUP_MENU_ITEM { txt = qtn_browser_downloads_set_as_rt; command = EAiwCmdRingtone; }, + STYLUS_POPUP_MENU_ITEM { txt = qtn_browser_downloads_assign_to_contact ; command = EAiwCmdContact ; }, + STYLUS_POPUP_MENU_ITEM { txt = qtn_browser_downloads_open_file_manager; command = EDownloadsListCmdFileManager;}, + STYLUS_POPUP_MENU_ITEM { txt = qtn_browser_downloads_cancel_download; command = EDownloadsListCmdCancel;}, + STYLUS_POPUP_MENU_ITEM { txt = qtn_browser_downloads_resume; command = EDownloadsListCmdResume;} + }; + } +#endif // End of File diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrUiLib/Group/Bld.inf --- a/browserutilities/downloadmgr/DownloadMgrUiLib/Group/Bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrUiLib/Group/Bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ #include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS @@ -25,7 +25,7 @@ PRJ_EXPORTS ../rom/DownloadMgrUiLib.iby CORE_MW_LAYER_IBY_EXPORT_PATH(DownloadMgrUiLib.iby) ../rom/DownloadMgrUiLibResources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(DownloadMgrUiLibResources.iby) -../loc/DownloadMgrUiLib.loc MW_LAYER_LOC_EXPORT_PATH(DownloadMgrUiLib.loc) +../loc/downloadmgruilib.loc MW_LAYER_LOC_EXPORT_PATH(downloadmgruilib.loc) #ifdef __SERIES60_32__ @@ -39,7 +39,7 @@ START EXTENSION s60/mifconv OPTION TARGETFILE downloadmgruilib.mif OPTION HEADERFILE downloadmgruilib.mbg -OPTION SOURCES -c8,1 qgn_menu_unknown_lst -c8,1 qgn_indi_paused -c8,1 qgn_indi_browser_mmc_add +OPTION SOURCES -c8,1 qgn_menu_unknown_lst -c8,1 qgn_indi_paused -c8,1 qgn_indi_browser_mmc_add -c8,1 qgn_prop_memc_ms_tab END PRJ_MMPFILES diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrUiLib/Group/DownloadMgrUiLib.mmp --- a/browserutilities/downloadmgr/DownloadMgrUiLib/Group/DownloadMgrUiLib.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrUiLib/Group/DownloadMgrUiLib.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -19,7 +19,7 @@ #include #include #include -#include +#include TARGET DownloadMgrUiLib.dll TARGETTYPE dll @@ -32,6 +32,7 @@ //#define _DEBUG START RESOURCE ../Data/DownloadMgrUiLib.rss +DEPENDS avkon.rsg HEADER #ifdef __S60_32__ LANG sc @@ -60,16 +61,11 @@ USERINCLUDE ../Inc USERINCLUDE ../../DownloadMgrClntSrv/inc +MW_LAYER_SYSTEMINCLUDE + +#if defined(__PLATFORM_VERSION_50_TUBE__) || defined( __PLATFORM_VERSION_50__) APP_LAYER_SYSTEMINCLUDE -/* SF TODO: resolve APP LAYER DEPENDENCY: - s60/app/devicecontrol/devctrl_dom/fota_engine_api/inc/FotaEngine.h - s60/app/devicecontrol/devctrl_dom/fota_engine_api/inc/fotaconst.h - s60/app/devicecontrol/devctrl_dom/fota_engine_api/inc/FotaEngStream.h - - s60/app/gallery/gallery_dom/media_file_api/inc/CMGXFileManager.h - s60/app/gallery/gallery_dom/media_file_api/inc/MGXFileManagerFactory.h -*/ -//MW_LAYER_SYSTEMINCLUDE +#endif SOURCEPATH ../Src SOURCE AsyncEventHandlerArray.cpp @@ -86,6 +82,9 @@ SOURCE DMgrUiLibPanic.cpp SOURCE ProgressInfoCreator.cpp SOURCE UserInteractionsEventHandler.cpp +#ifdef BRDO_SINGLE_CLICK_ENABLED_FF +SOURCE CDownloadsStylusPopupMenu.cpp +#endif LIBRARY AKNNOTIFY.lib LIBRARY AknNotifyPlugin.lib diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrUiLib/Group/DownloadMgrUiLibIconsdc.mk --- a/browserutilities/downloadmgr/DownloadMgrUiLib/Group/DownloadMgrUiLibIconsdc.mk Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrUiLib/Group/DownloadMgrUiLibIconsdc.mk Mon Mar 29 12:27:15 2010 +0100 @@ -62,7 +62,8 @@ mifconv $(ICONTARGETFILENAME) /h$(HEADERFILENAME) \ /c8,1 qgn_menu_unknown_lst.bmp \ /c8,1 qgn_indi_paused.bmp \ - /c8,1 qgn_indi_browser_mmc_add.bmp + /c8,1 qgn_indi_browser_mmc_add.bmp \ + /c8,1 qgn_prop_memc_ms_tab.bmp FREEZE : do_nothing diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrUiLib/Inc/AsyncEventHandlerBase.h --- a/browserutilities/downloadmgr/DownloadMgrUiLib/Inc/AsyncEventHandlerBase.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrUiLib/Inc/AsyncEventHandlerBase.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,14 +15,12 @@ * */ - - #ifndef ASYNCEVENTHANDLERBASE_H #define ASYNCEVENTHANDLERBASE_H // INCLUDES #include -#include +#include // FORWARD DECLARATIONS class RHttpDownload; diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrUiLib/Inc/CDownloadUtils.h --- a/browserutilities/downloadmgr/DownloadMgrUiLib/Inc/CDownloadUtils.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrUiLib/Inc/CDownloadUtils.h Mon Mar 29 12:27:15 2010 +0100 @@ -22,7 +22,7 @@ // INCLUDES #include -#include +#include // FORWARD DECLARATIONS class RHttpDownload; diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrUiLib/Inc/CDownloadsListArray.h --- a/browserutilities/downloadmgr/DownloadMgrUiLib/Inc/CDownloadsListArray.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrUiLib/Inc/CDownloadsListArray.h Mon Mar 29 12:27:15 2010 +0100 @@ -23,7 +23,7 @@ // INCLUDES #include #include -#include +#include #include #include #include @@ -60,10 +60,10 @@ TInt32 iDownloadedSize; TInt iIconIndex; TBool iPausable; - TBool iIsOnExternalMemory; TInt32 iProgressState; TInt32 iNumMediaObjects; TInt32 iActiveMoIndex; + TInt32 iExternalMemoryStatus; }; /// Array of UI data T objects. typedef CArrayFixFlat< TDownloadUiData > CDownloadUiDataArray; @@ -206,8 +206,9 @@ /** Temp storage. Should be long enough to hold R_DMUL_DOWNLOAD_COMPLETE localized string or the progress info (max 14). */ TBuf iProgressInfoRes; - TInt iPausedIconIndex; ///< Default icon index in list box model - TInt iExternalMemoryIconIndex; ///< Default icon index in list box model + TInt iPausedIconIndex; ///< Pause icon index in list box model + TInt iExternalMemoryIconIndex; ///< MMC icon index in list box model + TInt iInternalMassMemoryIconIndex; ///< Mass Memory icon index in list box model HBufC* iCompletedString; ///< Owned. HBufC* iSavedToGalleryString; ///< Owned. @@ -282,4 +283,4 @@ return KErrNotFound; } -#endif /* CDOWNLOADSLISTARRAY_H */ \ No newline at end of file +#endif /* CDOWNLOADSLISTARRAY_H */ diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrUiLib/Inc/CDownloadsListDlg.h --- a/browserutilities/downloadmgr/DownloadMgrUiLib/Inc/CDownloadsListDlg.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrUiLib/Inc/CDownloadsListDlg.h Mon Mar 29 12:27:15 2010 +0100 @@ -24,7 +24,7 @@ #include #include #include - +#include // DATA TYPES enum TDownloadsListDlgEvent { @@ -41,6 +41,9 @@ class MDownloadsListDlgObserver; class RHttpDownload; class CDownloadUtils; +#ifdef BRDO_SINGLE_CLICK_ENABLED_FF +class CDlStylusPopupMenu; +#endif // CONSTANTS /// Refresh timer setting. If this is zero, no timer is used! (Micro is 10^(-6)) @@ -132,7 +135,10 @@ void ProcessCommandL( TInt aCommandId ); void SetEmphasis( CCoeControl* aMenuControl, TBool aEmphasis ); void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); - +#ifdef BRDO_SINGLE_CLICK_ENABLED_FF + CDownloadsListArray* DownloadsListArray(){ return iDownloadsListArray;} + void AddAiwItemsL(); +#endif public: // from MEikListBoxObserver void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType); @@ -201,6 +207,10 @@ CDownloadUtils* iDownloadUtils; ///< Owned. TBool iIsMSKChangeHandled; TBool iProgressiveDownload; +#ifdef BRDO_SINGLE_CLICK_ENABLED_FF + CDlStylusPopupMenu *iStylusMenu; + TPointerEvent iPointerEvent; +#endif }; #endif /* CDOWNLOADSLISTDLG_H */ diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrUiLib/Inc/CUserInteractionsUtils.h --- a/browserutilities/downloadmgr/DownloadMgrUiLib/Inc/CUserInteractionsUtils.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrUiLib/Inc/CUserInteractionsUtils.h Mon Mar 29 12:27:15 2010 +0100 @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include "CDownloadUtils.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrUiLib/Inc/DownloadMgrUiLib.hrh --- a/browserutilities/downloadmgr/DownloadMgrUiLib/Inc/DownloadMgrUiLib.hrh Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrUiLib/Inc/DownloadMgrUiLib.hrh Mon Mar 29 12:27:15 2010 +0100 @@ -46,7 +46,7 @@ }; -#define KUiLibMaxDefAttrLength 32 // See KMaxDefAttrLength in HttpDownloadMgrCommon.h! +#define KUiLibMaxDefAttrLength 32 // See KMaxDefAttrLength in httpdownloadmgrcommon.h! enum TDMULAIWMENUIDs { @@ -54,6 +54,14 @@ EAIWPluginSubMenu = 0x7000 }; +#ifdef BRDO_SINGLE_CLICK_ENABLED_FF +enum TAiwCommandId // pls dont modify these values. + { + EAiwCmdRingtone = 0x6025, + EAiwCmdContact = 0x6026 + }; +#endif + #endif /* DOWNLOADMGRUILIB_HRH */ // End of File diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrUiLib/Src/AsyncEventHandlerBase.cpp --- a/browserutilities/downloadmgr/DownloadMgrUiLib/Src/AsyncEventHandlerBase.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrUiLib/Src/AsyncEventHandlerBase.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,11 +15,9 @@ * */ - - // INCLUDE FILES #include "AsyncEventHandlerBase.h" -#include "CDownloadMgrUiLibRegistry.h" +#include #include "AsyncEventHandlerArray.h" #include "UiLibLogger.h" #include "DMgrUiLibPanic.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrUiLib/Src/CDownloadMgrUiBase.cpp --- a/browserutilities/downloadmgr/DownloadMgrUiLib/Src/CDownloadMgrUiBase.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrUiLib/Src/CDownloadMgrUiBase.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,10 +15,8 @@ * */ - - // INCLUDE FILES -#include "CDownloadMgrUiBase.h" +#include #include "UiLibLogger.h" #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrUiLib/Src/CDownloadMgrUiDownloadMenu.cpp --- a/browserutilities/downloadmgr/DownloadMgrUiLib/Src/CDownloadMgrUiDownloadMenu.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrUiLib/Src/CDownloadMgrUiDownloadMenu.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,10 +15,8 @@ * */ - - // INCLUDE FILES -#include "CDownloadMgrUiDownloadMenu.h" +#include #include "UiLibLogger.h" #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrUiLib/Src/CDownloadMgrUiDownloadsList.cpp --- a/browserutilities/downloadmgr/DownloadMgrUiLib/Src/CDownloadMgrUiDownloadsList.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrUiLib/Src/CDownloadMgrUiDownloadsList.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,13 +15,11 @@ * */ - - // INCLUDE FILES -#include -#include "CDownloadMgrUiDownloadsList.h" -#include "CDownloadMgrUiLibRegistry.h" -#include "CDownloadMgrUiDownloadMenu.h" +#include +#include +#include +#include #include "CDownloadsListArray.h" #include "CDownloadsListDlg.h" #include "AsyncEventHandlerArray.h" @@ -49,7 +47,7 @@ #include #include "bautils.h" -#include +#include #include #include #include @@ -1112,12 +1110,12 @@ CLOG_WRITE_FORMAT(" EDlAttrPausable: %d",dlData->iPausable); // Is the download on an external/removable memory (like MMC)? - err = aDownload.GetBoolAttribute - ( EDlAttrDestRemovable, dlData->iIsOnExternalMemory ); + err = aDownload.GetIntAttribute + ( EDlAttrDestRemovable, dlData->iExternalMemoryStatus ); CLOG_WRITE_FORMAT(" EDlAttrDestRemovable err: %d",err); // 'err' is ignored. - CLOG_WRITE_FORMAT(" EDlAttrDestRemovable: %d",dlData->iIsOnExternalMemory); - + CLOG_WRITE_FORMAT(" EDlAttrDestRemovable: %d",dlData->iExternalMemoryStatus); + // Currently active media object's index (in album)? err = aDownload.GetIntAttribute ( EDlAttrActiveDownload, dlData->iActiveMoIndex ); @@ -1283,13 +1281,12 @@ CLOG_WRITE(" Redirection"); } else if ( aEvent.iProgressState == EHttpProgResponseHeaderReceived ) - { - // Is the download on an external/removable memory (like MMC)? - aDownload.GetBoolAttribute - ( EDlAttrDestRemovable, dlData.iIsOnExternalMemory ); - // Return value is ignored. - CLOG_WRITE_FORMAT(" EDlAttrDestRemovable: %d",dlData.iIsOnExternalMemory); - } + { + // Is the download on an external/removable memory (like MMC)? + // Return value is ignored. + aDownload.GetIntAttribute( EDlAttrDestRemovable, dlData.iExternalMemoryStatus ); + CLOG_WRITE_FORMAT(" EDlAttrDestRemovable: %d",dlData.iExternalMemoryStatus); + } else if ( aEvent.iProgressState == EHttpProgDlNameChanged ) { CLOG_WRITE(" EHttpProgDlNameChanged"); @@ -2002,7 +1999,27 @@ if ( cancelled ) { - DeleteDownloadL( currDownload ); + DeleteDownloadL( currDownload ); + +#ifdef BRDO_SINGLE_CLICK_ENABLED_FF + TInt currentItemIndex = aDialog.CurrentItemIndex(); + if (currentItemIndex != -1) + { + TInt Inprogress = iListModel->DownloadsCount + ( MASKED_DL_STATE(EHttpDlCreated) | + MASKED_DL_STATE(EHttpDlPaused) | + MASKED_DL_STATE(EHttpDlInprogress) | + MASKED_DL_STATE(EHttpDlMultipleMOFailed)); + if ( Inprogress > 1 ) + { + aDialog.ButtonGroupContainer()->MakeCommandVisible( EAknSoftkeyOptions, ETrue ); + } + else + { + aDialog.ButtonGroupContainer()->MakeCommandVisible( EAknSoftkeyOptions, EFalse ); + } + } +#endif } iIsCancelInProgress = EFalse; } @@ -2254,7 +2271,8 @@ CDocumentHandler* docHandler = CDocumentHandler::NewLC(); canProgHandled = docHandler->CanHandleProgressivelyL( dataType, pdPlayerUid ); CleanupStack::PopAndDestroy( docHandler ); // docHandler - + +#ifndef BRDO_SINGLE_CLICK_ENABLED_FF //delete open file manager when download is not complete if( !(isCompleted)) { @@ -2389,9 +2407,33 @@ { aMenuPane->DeleteMenuItem( EDownloadsListCmdFileManager ); } - } + } +#else + // Count paused downloads. Note that Creates and Failed downloads + // are also considered as Paused, and they can be resumed. + TInt pausedCount = iListModel->DownloadsCount + ( MASKED_DL_STATE(EHttpDlCreated) | + MASKED_DL_STATE(EHttpDlPaused) | + MASKED_DL_STATE(EHttpDlMultipleMOFailed) ); + CLOG_WRITE_FORMAT(" paused count: %d",pausedCount); + // + if ( !( 1 < pausedCount ) ) + { + aMenuPane->DeleteMenuItem( EDownloadsListCmdResumeAll ); + } + + TInt downloadCount = iListModel->DownloadsCount + ( MASKED_DL_STATE(EHttpDlCreated) | + MASKED_DL_STATE(EHttpDlInprogress)| + MASKED_DL_STATE(EHttpDlPaused) ); + CLOG_WRITE_FORMAT(" download count: %d",downloadCount); + + if ( !( 1 < downloadCount ) ) + { + aMenuPane->DeleteMenuItem( EDownloadsListCmdCancelAll ); + } +#endif } - if ( wasCompleted && !isThemeType ) { InitializeAIWPlugInMenusL( aResourceId, aMenuPane, currDownload ); @@ -2399,6 +2441,17 @@ CLOG_LEAVEFN("CDownloadMgrUiDownloadsList::DynInitMenuPaneL"); } +#ifdef BRDO_SINGLE_CLICK_ENABLED_FF +void CDownloadMgrUiDownloadsList::AIWPlugInMenusL(TInt aResourceId,CEikMenuPane* aMenuPane) + { + if( !iAIWServiceHandler ) + { + AttachAIWInterestL(); + } + RHttpDownload& currDownload = iListModel->Download( 0 ); + InitializeAIWPlugInMenusL( aResourceId, aMenuPane, currDownload ); + } +#endif // ----------------------------------------------------------------------------- // CDownloadMgrUiDownloadsList::OfferKeyEventL // ----------------------------------------------------------------------------- diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrUiLib/Src/CDownloadMgrUiLibRegistry.cpp --- a/browserutilities/downloadmgr/DownloadMgrUiLib/Src/CDownloadMgrUiLibRegistry.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrUiLib/Src/CDownloadMgrUiLibRegistry.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,12 +15,10 @@ * */ - - // INCLUDE FILES -#include "CDownloadMgrUiLibRegistry.h" -#include "CDownloadMgrUiDownloadsList.h" -#include "CDownloadMgrUiUserInteractions.h" +#include +#include +#include #include "DMgrUiLibPanic.h" #include "UiLibLogger.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrUiLib/Src/CDownloadMgrUiUserInteractions.cpp --- a/browserutilities/downloadmgr/DownloadMgrUiLib/Src/CDownloadMgrUiUserInteractions.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrUiLib/Src/CDownloadMgrUiUserInteractions.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,13 +15,11 @@ * */ - - // INCLUDE FILES -#include "CDownloadMgrUiUserInteractions.h" +#include #include "CUserInteractionsUtils.h" -#include "CDownloadMgrUiDownloadsList.h" -#include "CDownloadMgrUiLibRegistry.h" +#include +#include #include "UserInteractionsEventHandler.h" #include "AsyncEventHandlerArray.h" #include "UiLibLogger.h" @@ -457,15 +455,14 @@ downloadCnt = iRegistryModel.DownloadCount(); - TBool isProgressive (EFalse); + if ( resp == EAknSoftkeyYes || resp == EAknSoftkeyOk ) { for ( TInt i = downloadCnt - 1; i >=0; --i ) { RHttpDownload* dl = downloads.At(i); //current download - dl->GetBoolAttribute( EDlAttrProgressive, isProgressive ); dl->GetBoolAttribute( EDlAttrPausable , isPausable ); - if (!( isProgressive || isPausable ) ) // delete only no-PDL downloads and Non pausable Downloads + if (!( isPausable ) ) // delete only Non pausable Downloads { // Delete not attached downloads. dl->Delete(); // Return value ignored. @@ -912,6 +909,10 @@ for( TInt i = 0; i < downloadCnt; ++i ) { RHttpDownload* dl = downloads.At(i); // current download + // we do not have to show the download in case of invalid descriptor + HBufC* name = HBufC::NewLC( KMaxUrlLength ); + TPtr tempPtr = name->Des(); + dl->GetStringAttribute( EDlAttrName, tempPtr ); err = dl->GetBoolAttribute( EDlAttrPausable, isPausable ); if ( !err ) { @@ -938,10 +939,11 @@ err = dl->GetBoolAttribute( EDlAttrNoMedia, isNoMedia ); } CLOG_WRITE_FORMAT(" err: %d",err); - if ( !err && ( !isPausable || isHidden ||isNoMedia || state == EHttpDlMultipleMOCompleted ) ) + if ( !err && ( !isPausable || isHidden ||isNoMedia || state == EHttpDlMultipleMOCompleted || !tempPtr.Length() ) ) { ++ignoredDownloads; } + CleanupStack::PopAndDestroy( name ); // name } CLOG_WRITE_FORMAT(" downloadCnt: %d",downloadCnt); CLOG_WRITE_FORMAT(" ignoredDownloads: %d",ignoredDownloads); diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrUiLib/Src/CDownloadUtils.cpp --- a/browserutilities/downloadmgr/DownloadMgrUiLib/Src/CDownloadUtils.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrUiLib/Src/CDownloadUtils.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -20,7 +20,7 @@ // INCLUDE FILES #include "CDownloadUtils.h" #include "UiLibLogger.h" -#include +#include #include #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrUiLib/Src/CDownloadsListArray.cpp --- a/browserutilities/downloadmgr/DownloadMgrUiLib/Src/CDownloadsListArray.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrUiLib/Src/CDownloadsListArray.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -18,7 +18,7 @@ // INCLUDE FILES -#include +#include #include "CDownloadsListArray.h" #include "ProgressInfoCreator.h" #include "DMgrUiLibPanic.h" @@ -39,7 +39,7 @@ #endif #include "CDownloadUtils.h" -#include +#include #include "CUserInteractionsUtils.h" @@ -66,7 +66,7 @@ iDownloadedSize( KErrNotFound ), iIconIndex( KErrNotFound ), iPausable( EFalse ), - iIsOnExternalMemory( EFalse ), + iExternalMemoryStatus( KDriveAttLocal ), iProgressState( KErrNotFound ), iNumMediaObjects( KErrNotFound ) { @@ -465,11 +465,14 @@ } newItemTextPtr.Append( KCharTab ); // - if ( aDownloadUiData.iIsOnExternalMemory ) + if ( KDriveAttLocal != aDownloadUiData.iExternalMemoryStatus ) { // Add an "External memory" icon. iTempBuf.Zero(); - iTempBuf.Num( iExternalMemoryIconIndex ); + if ( KDriveAttRemovable == aDownloadUiData.iExternalMemoryStatus ) + iTempBuf.Num( iExternalMemoryIconIndex ); + else + iTempBuf.Num( iInternalMassMemoryIconIndex ); newItemTextPtr.Append( iTempBuf ); // iExternalMemoryIconIndex in literal form } } @@ -568,10 +571,13 @@ // ret += KCharTab().Length(); // - if ( aDownloadUiData.iIsOnExternalMemory ) + if ( KDriveAttLocal != aDownloadUiData.iExternalMemoryStatus ) { iTempBuf.Zero(); - iTempBuf.Num( iExternalMemoryIconIndex ); + if ( KDriveAttRemovable == aDownloadUiData.iExternalMemoryStatus ) + iTempBuf.Num( iExternalMemoryIconIndex ); + else + iTempBuf.Num( iInternalMassMemoryIconIndex ); ret += iTempBuf.Length(); } @@ -614,6 +620,19 @@ CleanupStack::Pop( gulIcon2 ); // gulIcon2 + // iInternalMassMemoryIconIndex + TAknsItemID id3 = KAknsIIDQgnPropMemcMsTab; + CGulIcon* gulIcon3 = AknsUtils::CreateGulIconL( skins, id3, + *iMbmResourceFileName, + EMbmDownloadmgruilibQgn_prop_memc_ms_tab, + EMbmDownloadmgruilibQgn_prop_memc_ms_tab_mask ); + CleanupStack::PushL( gulIcon3 ); + + iInternalMassMemoryIconIndex = AppendL( gulIcon3 ); + CLOG_WRITE_FORMAT(" iExternalMemoryIconIndex: %d",iInternalMassMemoryIconIndex); + + CleanupStack::Pop( gulIcon3 ); // gulIcon3 + CLOG_LEAVEFN("CDownloadsListArray::AddDefaultIconsL"); } @@ -756,3 +775,4 @@ // End of file. + diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrUiLib/Src/CDownloadsListDlg.cpp --- a/browserutilities/downloadmgr/DownloadMgrUiLib/Src/CDownloadsListDlg.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrUiLib/Src/CDownloadsListDlg.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,12 +15,10 @@ * */ - - // INCLUDE FILES #include "CDownloadsListDlg.h" #include "CDownloadUtils.h" -#include "DownloadsListDlgObserver.h" +#include #include "CDownloadsListArray.h" #include "DownloadMgrUiLib.hrh" #include "DMgrUiLibPanic.h" @@ -35,10 +33,12 @@ #include #include #include - +#ifdef BRDO_SINGLE_CLICK_ENABLED_FF +#include "CDownloadsStylusPopupMenu.h" +#define pixelOffset 36 +#endif #include "eikon.hrh" - // ============================ MEMBER FUNCTIONS =============================== // ----------------------------------------------------------------------------- @@ -110,6 +110,9 @@ iDownloadUtils = CDownloadUtils::NewL(); +#ifdef BRDO_SINGLE_CLICK_ENABLED_FF + iStylusMenu = CDlStylusPopupMenu::NewL(); +#endif CLOG_LEAVEFN("CDownloadsListDlg::ConstructL"); } @@ -158,7 +161,13 @@ iListBox = NULL; delete iDownloadUtils; iDownloadUtils = NULL; - +#ifdef BRDO_SINGLE_CLICK_ENABLED_FF + if (iStylusMenu) + { + delete iStylusMenu; + iStylusMenu = NULL; + } +#endif CLOG_LEAVEFN("CDownloadsListDlg::~CDownloadsListDlg"); } @@ -198,6 +207,23 @@ CLOG_WRITE(" aModel.Count() == 0"); } +#ifdef BRDO_SINGLE_CLICK_ENABLED_FF + TInt Inprogress = iDownloadsListArray->DownloadsCount + ( MASKED_DL_STATE(EHttpDlCreated) | + MASKED_DL_STATE(EHttpDlPaused) | + MASKED_DL_STATE(EHttpDlInprogress) | + MASKED_DL_STATE(EHttpDlMultipleMOFailed)); + + if ( Inprogress > 1 ) + { + ButtonGroupContainer()->MakeCommandVisible( EAknSoftkeyOptions, ETrue ); + } + else + { + ButtonGroupContainer()->MakeCommandVisible( EAknSoftkeyOptions, EFalse ); + } +#endif + CLOG_LEAVEFN("CDownloadsListDlg::SetModelL"); } @@ -617,6 +643,9 @@ break; } case MEikListBoxObserver::EEventItemDoubleClicked: +#ifdef BRDO_SINGLE_CLICK_ENABLED_FF + case MEikListBoxObserver::EEventItemSingleClicked: +#endif { // If EAknSoftkeyOpen is visible, then we can activate the selected download if (ButtonGroupContainer()->IsCommandVisible(EAknSoftkeyOpen)) @@ -683,6 +712,36 @@ // void CDownloadsListDlg::HandlePointerEventL(const TPointerEvent& aPointerEvent) { +#ifdef BRDO_SINGLE_CLICK_ENABLED_FF + if ( aPointerEvent.iType == TPointerEvent::EButton1Down) + { + iPointerEvent = aPointerEvent; + iStylusMenu->HandlePointerEventL(aPointerEvent, this); + } + else if ( aPointerEvent.iType == TPointerEvent::EButton1Up ) + { + iStylusMenu->cancelLongTapL(); + if(iStylusMenu->islongtapRunning()) + { + iStylusMenu->reSetLongTapFlag(); + return; + } + } + else if ( aPointerEvent.iType == TPointerEvent::EDrag ) + { + if((Abs(iPointerEvent.iPosition.iX - aPointerEvent.iPosition.iX) > pixelOffset ) || + (Abs(iPointerEvent.iPosition.iY - aPointerEvent.iPosition.iY) > pixelOffset )) + { + iStylusMenu->cancelLongTapL(); + if(iStylusMenu->islongtapRunning()) + { + iStylusMenu->reSetLongTapFlag(); + return; + } + } + } +#endif + CAknPopupList::HandlePointerEventL(aPointerEvent); } @@ -918,4 +977,21 @@ return KErrNone; } +#ifdef BRDO_SINGLE_CLICK_ENABLED_FF +void CDownloadsListDlg::AddAiwItemsL() + { + iMenuBar->MenuPane()->AddMenuItemsL(R_DMUL_AIW_POPUP); + iDlgObserver.AIWPlugInMenusL(R_DMUL_AIW_POPUP,iMenuBar->MenuPane()); + TInt pos(0); + if (iMenuBar->MenuPane()->MenuItemExists(EAiwCmdContact,pos)) + { + iMenuBar->MenuPane()->DeleteMenuItem(EAiwCmdContact); + } + if (iMenuBar->MenuPane()->MenuItemExists(EAiwCmdRingtone,pos)) + { + iMenuBar->MenuPane()->DeleteMenuItem(EAiwCmdRingtone); + } + + } +#endif /* End of file. */ diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrUiLib/Src/CUserInteractionsUtils.cpp --- a/browserutilities/downloadmgr/DownloadMgrUiLib/Src/CUserInteractionsUtils.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrUiLib/Src/CUserInteractionsUtils.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,20 +15,18 @@ * */ - - // INCLUDE FILES -#include +#include #include "CUserInteractionsUtils.h" #include "MDownloadHandlerObserver.h" -#include "CDownloadMgrUiBase.h" -#include "CDownloadMgrUiLibRegistry.h" -#include "CDownloadMgrUiDownloadsList.h" -#include "CDownloadMgrUiUserInteractions.h" +#include +#include +#include +#include #include "UiLibLogger.h" #include "DMgrUiLibPanic.h" #include -#include +#include #include #include #include @@ -42,8 +40,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -51,7 +49,7 @@ #include #include #include -#include "bautils.h" +#include #include #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrUiLib/Src/UserInteractionsEventHandler.cpp --- a/browserutilities/downloadmgr/DownloadMgrUiLib/Src/UserInteractionsEventHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrUiLib/Src/UserInteractionsEventHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,16 +15,14 @@ * */ - - // INCLUDE FILES -#include +#include #include "UserInteractionsEventHandler.h" #include "CUserInteractionsUtils.h" #include "ProgressInfoCreator.h" -#include "CDownloadMgrUiLibRegistry.h" -#include "CDownloadMgrUiDownloadsList.h" -#include "CDownloadMgrUiUserInteractions.h" +#include +#include +#include #include "UiLibLogger.h" #include "DMgrUiLibPanic.h" #include @@ -40,7 +38,6 @@ #include #include - #ifdef BRDO_APP_GALLERY_SUPPORTED_FF #include #include @@ -623,6 +620,7 @@ { CLOG_WRITE_FORMAT(" this deleted: %x", this); CLOG_LEAVEFN("CUserInteractionsEventHandler::HandleInProgressStateL"); + CleanupStack::PopAndDestroy( contentType ); return; } diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/DownloadMgrUiLib/loc/DownloadMgrUiLib.loc --- a/browserutilities/downloadmgr/DownloadMgrUiLib/loc/DownloadMgrUiLib.loc Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/DownloadMgrUiLib/loc/DownloadMgrUiLib.loc Mon Mar 29 12:27:15 2010 +0100 @@ -402,4 +402,10 @@ // #define qtn_browser_downloads_files_saved "Files Saved" +#define qtn_browser_downloads_set_as_rt "Set as ringing tone" + +#define qtn_browser_downloads_assign_to_contact "Assign to contact" + + + // End of File diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/Group/bld.inf --- a/browserutilities/downloadmgr/Group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/downloadmgr/Group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ */ #include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/downloadmgruilib/Inc/CDownloadsStylusPopupMenu.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/browserutilities/downloadmgr/downloadmgruilib/Inc/CDownloadsStylusPopupMenu.h Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,65 @@ +/* +* Copyright (c) 2002-2004 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: Hari and Billa +* +* Description: Stylus Popup Menu Containing Download UI Options +* +*/ + +#ifndef CDlTYLUSPOPUPMENU_H_ +#define CDlTYLUSPOPUPMENU_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +class CDownloadsListDlg; + +_LIT8(KAudio, "audio/"); +_LIT8(KVideo, "video/"); +_LIT8(KImage, "image/"); +_LIT8(KFlash, "application/x-shockwave-flash"); +_LIT8(Ksdp, "application/sdp"); +_LIT8(Krng, "application/vnd.nokia.ringing-tone"); +_LIT8(Krn, "application/vnd.rn-realmedia"); +_LIT8(Kpn, "application/x-pn-realmedia"); +_LIT8(KSisxContentType, "x-epoc/x-sisx-app"); + +#define KLONG_TAP_TIMER_DELAY 0.4000000 //0.4 seconds + +// CLASS DECLARATION +class CDlStylusPopupMenu : public CCoeControl, public MAknLongTapDetectorCallBack, public MEikMenuObserver +{ + public: + static CDlStylusPopupMenu* NewL(); + void ConstructL(); + void HandlePointerEventL(const TPointerEvent& aPointerEvent,CDownloadsListDlg* view); + virtual void HandleLongTapEventL( const TPoint& aPenEventLocation, const TPoint& aPenEventScreenLocation ); + void ProcessCommandL(TInt aCommandId); + void SetEmphasis(CCoeControl* /*aMenuControl*/,TBool /*aEmphasis*/) { } + void cancelLongTapL(); + TBool islongtapRunning(); + void reSetLongTapFlag(); + ~CDlStylusPopupMenu(); + + private: + CAknLongTapDetector* iLongTapDetector; + CAknStylusPopUpMenu* iStylusPopupMenu; + TInt iCount; + TBool ilongtapRunning; + CDownloadsListDlg *iDlView; +}; +#endif /* CDlTYLUSPOPUPMENU_H_ */ diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/downloadmgr/downloadmgruilib/Src/CDownloadsStylusPopupMenu.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/browserutilities/downloadmgr/downloadmgruilib/Src/CDownloadsStylusPopupMenu.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,155 @@ +/* + * CDlStylusPopupMenu.cpp + * + * Created on: Dec 24, 2009 + * Author: hari and billa + */ + +#include "CDownloadsStylusPopupMenu.h" +#include "CDownloadsListDlg.h" +#include "DownloadMgrUiLib.rsg" +#include "CDownloadsListArray.h" +#include "DownloadMgrUilib.hrh" + + +// ----------------------------------------------------------------------------- +// BrowserStylusPopupMenu::ConstructL() +// Symbian 2nd phase constructor can leave. +// ----------------------------------------------------------------------------- +// +CDlStylusPopupMenu* CDlStylusPopupMenu::NewL() +{ + CDlStylusPopupMenu* container = + new (ELeave) CDlStylusPopupMenu; + container->ConstructL(); + return container; +} + +void CDlStylusPopupMenu::ConstructL() +{ + ilongtapRunning = EFalse; + iLongTapDetector = CAknLongTapDetector::NewL(this); + TResourceReader readerFolder; + TResourceReader readerItem; +} + +// ----------------------------------------------------------------------------- +// BrowserStylusPopupMenu::HandlePointerEventL() +// Called by framework to handle pointer touch events. +// ----------------------------------------------------------------------------- +// +void CDlStylusPopupMenu::HandlePointerEventL(const TPointerEvent& aPointerEvent, CDownloadsListDlg *view) +{ + ilongtapRunning = EFalse; + iLongTapDetector->SetLongTapDelay(KLONG_TAP_TIMER_DELAY); + iLongTapDetector->PointerEventL(aPointerEvent); + iLongTapDetector->EnableLongTapAnimation(ETrue); + iDlView = view; + CCoeControl::HandlePointerEventL(aPointerEvent); +} + +void CDlStylusPopupMenu::HandleLongTapEventL( const TPoint& aPenEventLocation, const TPoint& aPenEventScreenLocation ) +{ + ilongtapRunning = ETrue; + TBool isAiwcall = EFalse; + if (iStylusPopupMenu) + { + delete iStylusPopupMenu; + iStylusPopupMenu = NULL; + iStylusPopupMenu = CAknStylusPopUpMenu::NewL( this , aPenEventScreenLocation); + } + else + { + iStylusPopupMenu = CAknStylusPopUpMenu::NewL( this , aPenEventScreenLocation); + } + + iStylusPopupMenu->SetPosition(aPenEventScreenLocation, CAknStylusPopUpMenu::EPositionTypeLeftBottom); + + TResourceReader reader; + iCoeEnv->CreateResourceReaderLC(reader,R_STYLUS_LONG_TAP_POPUP_DL_MENU); + iStylusPopupMenu->ConstructFromResourceL(reader); + TInt currentItemIndex = iDlView->CurrentItemIndex(); + CDownloadsListArray* DownloadsListArray = iDlView->DownloadsListArray(); + RHttpDownload& currDownload = DownloadsListArray->Download( currentItemIndex ); + + // Get the UI data for the current download + TDownloadUiData& dlData = DownloadsListArray->DlUiData( iDlView->CurrentItemIndex() ); + TInt32 state( dlData.iDownloadState ); + HBufC8* contentType = HBufC8::NewLC(KMaxContentTypeLength); + TPtr8 contentTypePtr = contentType->Des(); + User::LeaveIfError + ( currDownload.GetStringAttribute( EDlAttrContentType, contentTypePtr ) ); + TInt typeAudio = !contentType->Find(KAudio); + CleanupStack::PopAndDestroy( contentType ); + + if (state == EHttpDlInprogress) + { + isAiwcall = ETrue; + iStylusPopupMenu->SetItemDimmed(EAiwCmdContact,ETrue); + iStylusPopupMenu->SetItemDimmed(EAiwCmdRingtone,ETrue); + iStylusPopupMenu->SetItemDimmed(EDownloadsListCmdDelete,ETrue); + iStylusPopupMenu->SetItemDimmed(EDownloadsListCmdFileManager,ETrue); + iStylusPopupMenu->SetItemDimmed(EDownloadsListCmdResume,ETrue); + } + + if ((state == EHttpDlCompleted) || (state ==EHttpDlMultipleMOCompleted)) + { + iStylusPopupMenu->SetItemDimmed(EDownloadsListCmdCancel,ETrue); + iStylusPopupMenu->SetItemDimmed(EDownloadsListCmdResume,ETrue); + } + if (state == EHttpDlPaused) + { + isAiwcall = ETrue; + iStylusPopupMenu->SetItemDimmed(EAiwCmdContact,ETrue); + iStylusPopupMenu->SetItemDimmed(EAiwCmdRingtone,ETrue); + iStylusPopupMenu->SetItemDimmed(EDownloadsListCmdDelete,ETrue); + iStylusPopupMenu->SetItemDimmed(EDownloadsListCmdFileManager,ETrue); + } + + if(typeAudio != 1) //Not an audio type + { + isAiwcall = ETrue; + iStylusPopupMenu->SetItemDimmed(EAiwCmdContact,ETrue); + iStylusPopupMenu->SetItemDimmed(EAiwCmdRingtone,ETrue); + } + + CleanupStack::PopAndDestroy(); + if (!isAiwcall) + iDlView->AddAiwItemsL(); + iStylusPopupMenu->ShowMenu(); +} + +void CDlStylusPopupMenu::ProcessCommandL(TInt aCommand) +{ + iDlView->ProcessCommandL(aCommand); +} + +CDlStylusPopupMenu::~CDlStylusPopupMenu() +{ + if(iLongTapDetector) + { + delete iLongTapDetector; + iLongTapDetector = NULL; + } + if(iStylusPopupMenu) + { + delete iStylusPopupMenu; + iStylusPopupMenu = NULL; + } +} + +void CDlStylusPopupMenu::cancelLongTapL() +{ + iLongTapDetector->CancelAnimationL(); +} + +TBool CDlStylusPopupMenu::islongtapRunning() +{ + return ilongtapRunning; +} + +void CDlStylusPopupMenu::reSetLongTapFlag() +{ + ilongtapRunning = EFalse; +} + diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/favouritesengine/ClientServer/group/BookmarkDump.mmp --- a/browserutilities/favouritesengine/ClientServer/group/BookmarkDump.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/favouritesengine/ClientServer/group/BookmarkDump.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -19,7 +19,7 @@ #include -#include +#include TARGET BookmarkDump.exe TARGETTYPE exe diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/favouritesengine/ClientServer/group/BookmarkImport.mmp --- a/browserutilities/favouritesengine/ClientServer/group/BookmarkImport.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/favouritesengine/ClientServer/group/BookmarkImport.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -18,7 +18,7 @@ */ #include -#include +#include TARGET BookmarkImport.exe TARGETTYPE exe diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/favouritesengine/ClientServer/group/FavouritesEngine.mmp --- a/browserutilities/favouritesengine/ClientServer/group/FavouritesEngine.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/favouritesengine/ClientServer/group/FavouritesEngine.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -19,7 +19,7 @@ #include -#include +#include TARGET FavouritesEngine.dll TARGETTYPE dll diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/favouritesengine/ClientServer/group/FavouritesSrv.mmp --- a/browserutilities/favouritesengine/ClientServer/group/FavouritesSrv.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/favouritesengine/ClientServer/group/FavouritesSrv.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -19,7 +19,7 @@ #include -#include +#include TARGET FavouritesSrv.exe TARGETTYPE exe diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/favouritesengine/ClientServer/group/bld.inf --- a/browserutilities/favouritesengine/ClientServer/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/favouritesengine/ClientServer/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -18,7 +18,7 @@ */ #include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/favouritesengine/ClientServer/inc/FavouritesBuf.h --- a/browserutilities/favouritesengine/ClientServer/inc/FavouritesBuf.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/favouritesengine/ClientServer/inc/FavouritesBuf.h Mon Mar 29 12:27:15 2010 +0100 @@ -25,7 +25,7 @@ #include #include -#include +#include // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/favouritesengine/ClientServer/inc/FavouritesFilter.h --- a/browserutilities/favouritesengine/ClientServer/inc/FavouritesFilter.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/favouritesengine/ClientServer/inc/FavouritesFilter.h Mon Mar 29 12:27:15 2010 +0100 @@ -24,7 +24,7 @@ // INCLUDES #include -#include +#include // CLASS DECLARATION diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/favouritesengine/ClientServer/inc/FavouritesItemImpl.h --- a/browserutilities/favouritesengine/ClientServer/inc/FavouritesItemImpl.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/favouritesengine/ClientServer/inc/FavouritesItemImpl.h Mon Mar 29 12:27:15 2010 +0100 @@ -25,9 +25,9 @@ #include #include -#include -#include -#include +#include +#include +#include // CLASS DECLARATION diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/favouritesengine/ClientServer/src/ActiveFavouritesDbNotifier.cpp --- a/browserutilities/favouritesengine/ClientServer/src/ActiveFavouritesDbNotifier.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/favouritesengine/ClientServer/src/ActiveFavouritesDbNotifier.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,11 +17,10 @@ * */ - // INCLUDE FILES -#include "ActiveFavouritesDbNotifier.h" -#include "FavouritesDbObserver.h" +#include +#include // ================= MEMBER FUNCTIONS ======================= diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/favouritesengine/ClientServer/src/FavouritesDb.cpp --- a/browserutilities/favouritesengine/ClientServer/src/FavouritesDb.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/favouritesengine/ClientServer/src/FavouritesDb.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,17 +17,16 @@ * */ - // INCLUDE FILES #include -#include "FavouritesDb.h" +#include #include "FavouritesMsg.h" #include "FavouritesBuf.h" #include "FavouritesFilter.h" #include "FavouritesItemImpl.h" -#include "FavouritesItemList.h" -#include "FavouritesItemData.h" +#include +#include #include "FavouritesUtil.h" #include "UidMap.h" #include "FavouritesLogger.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/favouritesengine/ClientServer/src/FavouritesDbIncremental.cpp --- a/browserutilities/favouritesengine/ClientServer/src/FavouritesDbIncremental.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/favouritesengine/ClientServer/src/FavouritesDbIncremental.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,11 +17,10 @@ * */ - // INCLUDE FILES -#include "FavouritesDbIncremental.h" -#include "FavouritesDb.h" +#include +#include #include "FavouritesMsg.h" // ================= MEMBER FUNCTIONS ======================= diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/favouritesengine/ClientServer/src/FavouritesDbNotifier.cpp --- a/browserutilities/favouritesengine/ClientServer/src/FavouritesDbNotifier.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/favouritesengine/ClientServer/src/FavouritesDbNotifier.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,11 +17,10 @@ * */ - // INCLUDE FILES -#include "FavouritesDbNotifier.h" -#include "FavouritesDb.h" +#include +#include #include "FavouritesMsg.h" // ================= MEMBER FUNCTIONS ======================= diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/favouritesengine/ClientServer/src/FavouritesFile.cpp --- a/browserutilities/favouritesengine/ClientServer/src/FavouritesFile.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/favouritesengine/ClientServer/src/FavouritesFile.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,13 +17,12 @@ * */ - // INCLUDE FILES -#include "FavouritesFile.h" +#include #include "FavouritesMsg.h" #include "FavouritesPanic.h" -#include "FavouritesDb.h" +#include #include // CLASS DECLARATION diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/favouritesengine/ClientServer/src/FavouritesHandle.cpp --- a/browserutilities/favouritesengine/ClientServer/src/FavouritesHandle.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/favouritesengine/ClientServer/src/FavouritesHandle.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,10 +15,9 @@ * */ - // INCLUDE FILES -#include "FavouritesHandle.h" +#include #include "FavouritesMsg.h" #include "FavouritesPanic.h" #include "FavouritesLogger.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/favouritesengine/ClientServer/src/FavouritesItem.cpp --- a/browserutilities/favouritesengine/ClientServer/src/FavouritesItem.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/favouritesengine/ClientServer/src/FavouritesItem.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,10 +17,9 @@ * */ - // INCLUDE FILES -#include "FavouritesItem.h" +#include #include "FavouritesItemImpl.h" #include "FavouritesPanic.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/favouritesengine/ClientServer/src/FavouritesItemList.cpp --- a/browserutilities/favouritesengine/ClientServer/src/FavouritesItemList.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/favouritesengine/ClientServer/src/FavouritesItemList.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,12 +17,11 @@ * */ - // INCLUDE FILES #include -#include "FavouritesItemList.h" -#include "FavouritesItem.h" +#include +#include // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/favouritesengine/ClientServer/src/FavouritesSession.cpp --- a/browserutilities/favouritesengine/ClientServer/src/FavouritesSession.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/favouritesengine/ClientServer/src/FavouritesSession.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,10 +17,9 @@ * */ - // INCLUDE FILES -#include "FavouritesSession.h" +#include #include "FavouritesSrv.h" #include "FavouritesVersion.h" #include "FavouritesDef.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/favouritesengine/ClientServer/src/FavouritesWapAp.cpp --- a/browserutilities/favouritesengine/ClientServer/src/FavouritesWapAp.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/favouritesengine/ClientServer/src/FavouritesWapAp.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,10 +17,9 @@ * */ - // INCLUDE FILES -#include "FavouritesWapAp.h" +#include #include "FavouritesPanic.h" // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/favouritesengine/ClientServer/srvinc/FavouritesSrvDb.h --- a/browserutilities/favouritesengine/ClientServer/srvinc/FavouritesSrvDb.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/favouritesengine/ClientServer/srvinc/FavouritesSrvDb.h Mon Mar 29 12:27:15 2010 +0100 @@ -26,10 +26,10 @@ #include #include #include -#include +#include #include "FavouritesSrvTable.h" #include "UnicodeFile.h" -#include +#include // FORWARD DECLARATIONS diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/favouritesengine/ClientServer/srvsrc/FavouritesSrv.cpp --- a/browserutilities/favouritesengine/ClientServer/srvsrc/FavouritesSrv.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/favouritesengine/ClientServer/srvsrc/FavouritesSrv.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,10 +17,9 @@ * */ - // INCLUDE FILES -#include "FavouritesSession.h" +#include #include "FavouritesSrv.h" #include "FavouritesSrvSession.h" #include "FavouritesDef.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/favouritesengine/ClientServer/srvsrc/FavouritesSrvDb.cpp --- a/browserutilities/favouritesengine/ClientServer/srvsrc/FavouritesSrvDb.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/favouritesengine/ClientServer/srvsrc/FavouritesSrvDb.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,6 @@ * */ - // INCLUDE FILES #include @@ -29,15 +28,13 @@ #include "FavouritesItemImpl.h" #include "FavouritesItemImplList.h" #include "FavouritesPanic.h" -#include "FavouritesLimits.h" -#include "FavouritesItemData.h" +#include +#include #include "FavouritesFilter.h" #include "UidMap.h" #include "FavouritesLogger.h" #include "FavouritesFolder.h" - - // CONSTANTS /// Uid list granularity. @@ -52,7 +49,6 @@ // Secure policy ID of the Faveng database files. LOCAL_D const TUint KUidFavengDbPolicy = 0x101FD685; - // ==================== LOCAL FUNCTIONS ==================== /** diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/favouritesengine/ClientServer/srvsrc/FavouritesSrvTable.cpp --- a/browserutilities/favouritesengine/ClientServer/srvsrc/FavouritesSrvTable.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/favouritesengine/ClientServer/srvsrc/FavouritesSrvTable.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,13 +17,12 @@ * */ - // INCLUDE FILES #include #include "FavouritesSrvTable.h" #include "FavouritesPanic.h" -#include "FavouritesItemData.h" +#include #include "FavouritesFilter.h" // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/favouritesengine/ClientServer/utilinc/BookmarkFileImporter.h --- a/browserutilities/favouritesengine/ClientServer/utilinc/BookmarkFileImporter.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/favouritesengine/ClientServer/utilinc/BookmarkFileImporter.h Mon Mar 29 12:27:15 2010 +0100 @@ -25,7 +25,7 @@ #include #include -#include +#include #include "UnicodeFile.h" // FORWARD DECLARATIONS diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/favouritesengine/ClientServer/utilsrc/BookmarkDumpMain.cpp --- a/browserutilities/favouritesengine/ClientServer/utilsrc/BookmarkDumpMain.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/favouritesengine/ClientServer/utilsrc/BookmarkDumpMain.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -21,9 +21,9 @@ // INCLUDE FILES #include -#include -#include -#include +#include +#include +#include #include "UnicodeFile.h" // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/favouritesengine/ClientServer/utilsrc/BookmarkFileImporter.cpp --- a/browserutilities/favouritesengine/ClientServer/utilsrc/BookmarkFileImporter.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/favouritesengine/ClientServer/utilsrc/BookmarkFileImporter.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -21,7 +21,7 @@ // INCLUDE FILES #include "BookmarkFileImporter.h" -#include +#include // TEMP #include // END TEMP diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/Api/group/FeedsServerApi.mmp --- a/browserutilities/feedsengine/FeedsServer/Api/group/FeedsServerApi.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/Api/group/FeedsServerApi.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -18,7 +18,7 @@ #include #include -#include +#include CAPABILITY CAP_CLIENT_DLL VENDORID VID_DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/Api/group/bld.inf --- a/browserutilities/feedsengine/FeedsServer/Api/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/Api/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ #include -#include "../../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS ARMV5 WINSCW diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/Api/src/FeedsEntity.cpp --- a/browserutilities/feedsengine/FeedsServer/Api/src/FeedsEntity.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/Api/src/FeedsEntity.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,16 +15,15 @@ * */ - -#include "FeedsEntity.h" -#include "FeedsMap.h" +#include +#include #include "PackedAttributes.h" -#include "FeedAttributes.h" -#include +#include +#include #include "Packed.h" #include "PackedFeed.h" #include "PackedFolder.h" -#include "FeedsInterface.h" +#include // Constant definitions _LIT(KNew, "new"); diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/Api/src/FeedsInterface.cpp --- a/browserutilities/feedsengine/FeedsServer/Api/src/FeedsInterface.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/Api/src/FeedsInterface.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,12 +15,11 @@ * */ - -#include "FeedsInterface.h" -#include "FeedsMap.h" -#include "Transaction.h" -#include "FeedAttributes.h" -#include "FolderAttributes.h" +#include +#include +#include +#include +#include #include "Logger.h" #include diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/Api/src/FeedsMap.cpp --- a/browserutilities/feedsengine/FeedsServer/Api/src/FeedsMap.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/Api/src/FeedsMap.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,8 @@ * */ +#include -#include "FeedsMap.h" // ----------------------------------------------------------------------------- // CFeedsMap::NewL // diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/Api/src/Transaction.cpp --- a/browserutilities/feedsengine/FeedsServer/Api/src/Transaction.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/Api/src/Transaction.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,14 +15,13 @@ * */ - -#include "FeedsServerMsg.h" -#include "Transaction.h" -#include "FeedsEntity.h" -#include "FeedsInterface.h" +#include +#include +#include +#include #include #include -#include "FeedsMap.h" +#include #include "Packed.h" #include "PackedFeed.h" #include "PackedFolder.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/Client/inc/ClientRequestHandlers.h --- a/browserutilities/feedsengine/FeedsServer/Client/inc/ClientRequestHandlers.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/Client/inc/ClientRequestHandlers.h Mon Mar 29 12:27:15 2010 +0100 @@ -23,8 +23,8 @@ #warning This header file has been deprecated. Will be removed in one of the next SDK releases. // INCLUDES -#include -#include +#include +#include // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/Client/inc/FeedRequestHandlers.h --- a/browserutilities/feedsengine/FeedsServer/Client/inc/FeedRequestHandlers.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/Client/inc/FeedRequestHandlers.h Mon Mar 29 12:27:15 2010 +0100 @@ -23,9 +23,8 @@ #warning This header file has been deprecated. Will be removed in one of the next SDK releases. // INCLUDES -#include - -#include "FeedsServerRequestHandler.h" +#include +#include // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/Client/inc/FolderItemRequestHandlers.h --- a/browserutilities/feedsengine/FeedsServer/Client/inc/FolderItemRequestHandlers.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/Client/inc/FolderItemRequestHandlers.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #ifndef FOLDER_ITEM_REQUEST_HANDLER_H #define FOLDER_ITEM_REQUEST_HANDLER_H @@ -24,9 +23,9 @@ // INCLUDES #include -#include -#include "FeedsEntity.h" -#include "FeedsServerRequestHandler.h" +#include +#include +#include // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/Client/src/ClientRequestHandlers.cpp --- a/browserutilities/feedsengine/FeedsServer/Client/src/ClientRequestHandlers.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/Client/src/ClientRequestHandlers.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ -#include +#include #include #include "ClientRequestHandlers.h" @@ -111,4 +111,4 @@ void CClientRequestHandler::SetFeedsServerFolderItem(RFolderItem* aFeedsServerFolderItem) { iFeedsServerFolderItem = aFeedsServerFolderItem; - } \ No newline at end of file + } diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/Client/src/Enclosure.cpp --- a/browserutilities/feedsengine/FeedsServer/Client/src/Enclosure.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/Client/src/Enclosure.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,9 +15,8 @@ * */ - -#include "FeedAttributes.h" -#include "FeedsServerFeed.h" +#include +#include #include "Logger.h" // ----------------------------------------------------------------------------- diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/Client/src/Feed.cpp --- a/browserutilities/feedsengine/FeedsServer/Client/src/Feed.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/Client/src/Feed.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,13 +15,12 @@ * */ - //#ifdef _DEBUG #include //#endif -#include "FeedAttributes.h" -#include "FeedsServerFeed.h" +#include +#include #include "Logger.h" // ----------------------------------------------------------------------------- diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/Client/src/FeedRequestHandlers.cpp --- a/browserutilities/feedsengine/FeedsServer/Client/src/FeedRequestHandlers.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/Client/src/FeedRequestHandlers.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ -#include +#include #include #include @@ -102,4 +102,4 @@ void CFeedRequestHandler::SetOperationRequested(TInt aOperationRequested) { iOperationRequested = aOperationRequested; - } \ No newline at end of file + } diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/Client/src/FeedsServerClient.cpp --- a/browserutilities/feedsengine/FeedsServer/Client/src/FeedsServerClient.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/Client/src/FeedsServerClient.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,16 +15,14 @@ * */ - -#include "FeedsServerClient.h" -#include "FeedsServerMsg.h" -#include "FeedsServerSettings.h" +#include +#include +#include #include "Logger.h" #include "ClientRequestHandlers.h" #include "FeedRequestHandlers.h" #include "FolderItemRequestHandlers.h" - // ----------------------------------------------------------------------------- // RFeedsServer::RFeedsServer // diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/Client/src/FeedsServerFeed.cpp --- a/browserutilities/feedsengine/FeedsServer/Client/src/FeedsServerFeed.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/Client/src/FeedsServerFeed.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,14 +15,11 @@ * */ - -#include "FeedsServerClient.h" -#include "FeedsServerFeed.h" +#include +#include #include "FeedRequestHandlers.h" #include "ClientRequestHandlers.h" - - #include "Logger.h" // ----------------------------------------------------------------------------- diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/Client/src/FeedsServerFolderItem.cpp --- a/browserutilities/feedsengine/FeedsServer/Client/src/FeedsServerFolderItem.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/Client/src/FeedsServerFolderItem.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,16 +15,14 @@ * */ - -#include "FeedsServerClient.h" -#include "FeedsServerFolderItem.h" +#include +#include #include "FolderItemRequestHandlers.h" #include "FeedRequestHandlers.h" #include "ClientRequestHandlers.h" #include "Logger.h" - // ----------------------------------------------------------------------------- // RFolderItem::RFolderItem // diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/Client/src/FolderItem.cpp --- a/browserutilities/feedsengine/FeedsServer/Client/src/FolderItem.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/Client/src/FolderItem.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -16,10 +16,9 @@ * */ - -#include "FeedsServerFolderItem.h" -#include "FolderAttributes.h" -#include "FeedAttributes.h" +#include +#include +#include #include "PackedFolder.h" // ----------------------------------------------------------------------------- diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/Client/src/FolderItemRequestHandlers.cpp --- a/browserutilities/feedsengine/FeedsServer/Client/src/FolderItemRequestHandlers.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/Client/src/FolderItemRequestHandlers.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ #include -#include +#include #include #include @@ -103,4 +103,4 @@ void CFolderItemRequestHandler::SetOperationRequested(TInt aOperationRequested) { iOperationRequested = aOperationRequested; - } \ No newline at end of file + } diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/Client/src/Item.cpp --- a/browserutilities/feedsengine/FeedsServer/Client/src/Item.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/Client/src/Item.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,9 +15,8 @@ * */ - -#include "FeedAttributes.h" -#include "FeedsServerFeed.h" +#include +#include #include "Logger.h" // Constants @@ -25,7 +24,6 @@ _LIT(KRead, "read"); _LIT(KUnread, "unread"); - // ----------------------------------------------------------------------------- // CItem::NewL // diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/Client/src/RequestHandler.cpp --- a/browserutilities/feedsengine/FeedsServer/Client/src/RequestHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/Client/src/RequestHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,7 @@ * */ - -#include "FeedsServerRequestHandler.h" +#include // ----------------------------------------------------------------------------- // CRequestHandler::CRequestHandler @@ -35,4 +34,4 @@ // ----------------------------------------------------------------------------- CRequestHandler::~CRequestHandler() { - } \ No newline at end of file + } diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/Common/inc/PackedFeed.h --- a/browserutilities/feedsengine/FeedsServer/Common/inc/PackedFeed.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/Common/inc/PackedFeed.h Mon Mar 29 12:27:15 2010 +0100 @@ -24,7 +24,7 @@ // INCLUDES #include -#include "LeakTracker.h" +#include #include "Packed.h" // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/Common/inc/PackedFolder.h --- a/browserutilities/feedsengine/FeedsServer/Common/inc/PackedFolder.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/Common/inc/PackedFolder.h Mon Mar 29 12:27:15 2010 +0100 @@ -24,7 +24,7 @@ // INCLUDES #include -#include "LeakTracker.h" +#include #include "Packed.h" // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/Common/src/LeakTracker.cpp --- a/browserutilities/feedsengine/FeedsServer/Common/src/LeakTracker.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/Common/src/LeakTracker.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,9 +15,7 @@ * */ - - -#include "LeakTracker.h" +#include #include "Logger.h" // Globals diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/Common/src/PackedFeed.cpp --- a/browserutilities/feedsengine/FeedsServer/Common/src/PackedFeed.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/Common/src/PackedFeed.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -16,13 +16,11 @@ * */ - #include "PackedAttributes.h" -#include "FeedAttributes.h" +#include #include "PackedFeed.h" #include "Logger.h" - const TInt KTokenArrayIncrementSize = 1000; const TInt KStringTableIncrementSize = 10240; diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/Common/src/PackedFolder.cpp --- a/browserutilities/feedsengine/FeedsServer/Common/src/PackedFolder.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/Common/src/PackedFolder.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,16 +17,14 @@ */ #include "PackedAttributes.h" -#include "FeedAttributes.h" -#include "FolderAttributes.h" +#include +#include #include "PackedFolder.h" #include "Logger.h" - const TInt KTokenArrayIncrementSize = 100; const TInt KStringTableIncrementSize = 1024; - // ----------------------------------------------------------------------------- // CPackedFolder::NewL // diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/FeedHandler/inc/FeedHandler.h --- a/browserutilities/feedsengine/FeedsServer/FeedHandler/inc/FeedHandler.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/FeedHandler/inc/FeedHandler.h Mon Mar 29 12:27:15 2010 +0100 @@ -16,16 +16,14 @@ * */ - #ifndef FEED_HANDLER_H #define FEED_HANDLER_H - // INCLUDES #include #include "FeedParser.h" -#include "LeakTracker.h" +#include // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/FeedHandler/src/AtomFeedParser.cpp --- a/browserutilities/feedsengine/FeedsServer/FeedHandler/src/AtomFeedParser.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/FeedHandler/src/AtomFeedParser.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,13 +15,11 @@ * */ - -#include "FeedAttributes.h" +#include #include "FeedParserObserver.h" -#include "LeakTracker.h" +#include #include "AtomFeedParser.h" -#include "XmlUtils.h" - +#include // Element and attribute names used by this parser. _LIT8(KHead, "feed"); diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/FeedHandler/src/FeedHandler.cpp --- a/browserutilities/feedsengine/FeedsServer/FeedHandler/src/FeedHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/FeedHandler/src/FeedHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -16,14 +16,12 @@ * */ - #include "CleanupLibXml2.h" #include "FeedHandler.h" -#include "LeakTracker.h" +#include #include "RssFeedParser.h" #include "AtomFeedParser.h" -#include "XmlUtils.h" - +#include // ----------------------------------------------------------------------------- // CFeedHandler::NewL diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/FeedHandler/src/FeedParser.cpp --- a/browserutilities/feedsengine/FeedsServer/FeedHandler/src/FeedParser.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/FeedHandler/src/FeedParser.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,14 +15,12 @@ * */ - #include #include "FeedParser.h" #include "FeedParserObserver.h" -#include "LeakTracker.h" -#include "XmlUtils.h" - +#include +#include _LIT8(KUrlStr, "url"); diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/FeedHandler/src/RssFeedParser.cpp --- a/browserutilities/feedsengine/FeedsServer/FeedHandler/src/RssFeedParser.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/FeedHandler/src/RssFeedParser.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,13 +15,11 @@ * */ - -#include "FeedAttributes.h" +#include #include "FeedParserObserver.h" -#include "LeakTracker.h" +#include #include "RssFeedParser.h" -#include "XmlUtils.h" - +#include // Element and attribute names used by this parser. _LIT8(KRssHead, "rss"); diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/FolderHandler/inc/OpmlParser.h --- a/browserutilities/feedsengine/FeedsServer/FolderHandler/inc/OpmlParser.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/FolderHandler/inc/OpmlParser.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,16 +15,14 @@ * */ - #ifndef OPML_PARSER_H #define OPML_PARSER_H - // INCLUDES #include #include -#include "LeakTracker.h" +#include // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/FolderHandler/inc/OpmlWriter.h --- a/browserutilities/feedsengine/FeedsServer/FolderHandler/inc/OpmlWriter.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/FolderHandler/inc/OpmlWriter.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,11 +15,9 @@ * */ - #ifndef OPML_WRITER_H #define OPML_WRITER_H - // INCLUDES #include #include @@ -29,9 +27,7 @@ #include "FeedsDatabase.h" #include "CleanupLibXml2.h" -#include "XmlUtils.h" - - +#include // CONSTANTS @@ -45,7 +41,6 @@ // CLASS DECLARATION - /** * Translates CFolderItems back to opml. * diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/FolderHandler/src/OpmlParser.cpp --- a/browserutilities/feedsengine/FeedsServer/FolderHandler/src/OpmlParser.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/FolderHandler/src/OpmlParser.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,13 +15,11 @@ * */ - #include "OpmlParser.h" #include "CleanupLibXml2.h" -#include "LeakTracker.h" +#include #include "PackedFolder.h" -#include "XmlUtils.h" - +#include // Element and attribute names used by this parser. _LIT8(KBody, "body"); diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/Reconizer/data/102072EE.rss --- a/browserutilities/feedsengine/FeedsServer/Reconizer/data/102072EE.rss Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/Reconizer/data/102072EE.rss Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ -#include +#include RESOURCE REGISTRY_INFO r_registry diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/Reconizer/group/FeedsRec.mmp --- a/browserutilities/feedsengine/FeedsServer/Reconizer/group/FeedsRec.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/Reconizer/group/FeedsRec.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ #include -#include +#include TARGET FeedsRec.DLL TARGETTYPE PLUGIN diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/Reconizer/src/FeedsRec.cpp --- a/browserutilities/feedsengine/FeedsServer/Reconizer/src/FeedsRec.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/Reconizer/src/FeedsRec.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,11 +15,9 @@ * */ - #include "FeedsRec.h" -#include - +#include // Constants _LIT8(KMimeTypeRss, "application/rss+xml"); @@ -27,7 +25,6 @@ _LIT8(KMimeTypeXml1, "application/xml"); _LIT8(KMimeTypeXml2, "text/xml"); - // ----------------------------------------------------------------------------- // CFeedsRec::CFeedsRec // @@ -52,7 +49,6 @@ return 0x100; } - // ----------------------------------------------------------------------------- // CFeedsRec::SupportedDataTypeL // @@ -73,7 +69,6 @@ } } - // ----------------------------------------------------------------------------- // CFeedsRec::DoRecognizeL // @@ -101,7 +96,6 @@ // TODO: in 3.1 } - // ----------------------------------------------------------------------------- // CFeedsRec::DoRecognizeRss // @@ -170,14 +164,12 @@ return confidence; } - // Constants const TImplementationProxy ImplementationTable[] = { IMPLEMENTATION_PROXY_ENTRY(KFeedsRecImplUIDValue, CFeedsRec::CreateRecognizerL) }; - // ----------------------------------------------------------------------------- // ImplementationGroupProxy // @@ -191,7 +183,6 @@ return ImplementationTable; } - // ----------------------------------------------------------------------------- // CFeedsRec::CreateRecognizerL // diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/Server/inc/FeedsDatabase.h --- a/browserutilities/feedsengine/FeedsServer/Server/inc/FeedsDatabase.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/Server/inc/FeedsDatabase.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #ifndef FEEDS_DATABASE_H #define FEEDS_DATABASE_H @@ -24,7 +23,7 @@ #include #include -#include "LeakTracker.h" +#include // CONSTANTS const TInt KUnassignedId = -1; @@ -42,7 +41,6 @@ // CLASS DECLARATION - /** * The feeds server database. * @@ -90,7 +88,7 @@ * @return ETrue if the feed was resolved. */ - TBool CFeedsDatabase::FeedIdFromEntryIdL(const TInt& aEntryId, TInt aFolderListId, TInt& aFeedId); + TBool FeedIdFromEntryIdL(const TInt& aEntryId, TInt aFolderListId, TInt& aFeedId); /** * Returns the feed id of the entry id with the given feed. @@ -101,7 +99,7 @@ * @param aEntryId The feed's folder item id * @return ETrue if the feed was resolved. */ - TBool CFeedsDatabase::EntryIdFromFeedIdL(const TInt& aFeedId, TInt aFolderListId, TInt& aEntryId); + TBool EntryIdFromFeedIdL(const TInt& aFeedId, TInt aFolderListId, TInt& aEntryId); /** * Return the folder list ID of the feed with the given feed-id. @@ -164,7 +162,7 @@ * @param aFolderItemId The resulting folder-item-id, if found. * @return ETrue if a folder item with this name was found. */ - TBool CFeedsDatabase::FindFolderItemL(TInt& aFolderListId, const TDesC& aName, + TBool FindFolderItemL(TInt& aFolderListId, const TDesC& aName, TInt& aFolderItemId); /** diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/Server/inc/FeedsServer.h --- a/browserutilities/feedsengine/FeedsServer/Server/inc/FeedsServer.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/Server/inc/FeedsServer.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,15 +15,13 @@ * */ - #ifndef FEEDS_SERVER_H #define FEEDS_SERVER_H - // INCLUDES #include -#include "LeakTracker.h" +#include #include "UpdateAllFeedsTask.h" #include "etel3rdparty.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/Server/inc/FeedsServerSession.h --- a/browserutilities/feedsengine/FeedsServer/Server/inc/FeedsServerSession.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/Server/inc/FeedsServerSession.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,14 +15,13 @@ * */ - #ifndef FEEDS_SERVER_SESSION_H #define FEEDS_SERVER_SESSION_H // INCLUDES #include -#include "LeakTracker.h" +#include #include "UpdateFeedTask.h" #include "UpdateAllFeedsTask.h" #include "ImportFeedsTask.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/Server/inc/ImportFeedsTask.h --- a/browserutilities/feedsengine/FeedsServer/Server/inc/ImportFeedsTask.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/Server/inc/ImportFeedsTask.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,11 +15,9 @@ * */ - #ifndef IMPORT_FEEDS_TASK_H #define IMPORT_FEEDS_TASK_H - // INCLUDES #include #include @@ -28,7 +26,7 @@ #include "PackedFolder.h" #include "PackedAttributes.h" #include "FeedsDatabase.h" -#include "FolderAttributes.h" +#include // CONSTANTS @@ -44,7 +42,6 @@ // CLASS DECLARATION - /** * The ImportFeedsTask's observer. * diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/Server/inc/UpdateAllFeedsTask.h --- a/browserutilities/feedsengine/FeedsServer/Server/inc/UpdateAllFeedsTask.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/Server/inc/UpdateAllFeedsTask.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,18 +15,16 @@ * */ - #ifndef UPDATE_ALL_FEEDS_TASK_H #define UPDATE_ALL_FEEDS_TASK_H - // INCLUDES #include -#include "LeakTracker.h" +#include #include "UpdateFeedTask.h" #include "Task.h" -#include "f32file.h" +#include // CONSTANTS @@ -43,7 +41,6 @@ // CLASS DECLARATION - /** * The UpdateAllFeedsTask's observer. * diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/Server/inc/UpdateFeedTask.h --- a/browserutilities/feedsengine/FeedsServer/Server/inc/UpdateFeedTask.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/Server/inc/UpdateFeedTask.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,16 +15,14 @@ * */ - #ifndef UPDATE_FEED_TASK_H #define UPDATE_FEED_TASK_H - // INCLUDES #include #include "FeedParserObserver.h" -#include "LeakTracker.h" +#include #include "LoadObserver.h" #include "Task.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/Server/src/FeedsDatabase.cpp --- a/browserutilities/feedsengine/FeedsServer/Server/src/FeedsDatabase.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/Server/src/FeedsDatabase.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,15 +15,14 @@ * */ - #include #include -#include "FeedAttributes.h" +#include #include "FeedsDatabase.h" -#include "FolderAttributes.h" +#include #include "PackedAttributes.h" -#include "LeakTracker.h" +#include #include "Logger.h" #include "PackedFeed.h" #include "PackedFolder.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/Server/src/FeedsServer.cpp --- a/browserutilities/feedsengine/FeedsServer/Server/src/FeedsServer.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/Server/src/FeedsServer.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,18 +15,17 @@ * */ - #include "FeedsDatabase.h" #include "FeedHandler.h" #include "FeedsServer.h" -#include "FeedsServerMsg.h" +#include #include "FeedsServerSession.h" #include "OpmlParser.h" #include "OpmlWriter.h" #include "PackedFolder.h" #include "ServerHttpConnection.h" #include "Logger.h" -#include "XmlUtils.h" +#include #include "BackRestoreHandler.h" #include "UpdateManager.h" @@ -38,7 +37,6 @@ _LIT(KDefaultOPMLFileParam, ""); - // ----------------------------------------------------------------------------- // CFeedsServer::NewL // diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/Server/src/FeedsServerMain.cpp --- a/browserutilities/feedsengine/FeedsServer/Server/src/FeedsServerMain.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/Server/src/FeedsServerMain.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,11 +15,10 @@ * */ - #include #include "FeedsServer.h" -#include "LeakTracker.h" +#include // ----------------------------------------------------------------------------- // E32Main diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/Server/src/FeedsServerSession.cpp --- a/browserutilities/feedsengine/FeedsServer/Server/src/FeedsServerSession.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/Server/src/FeedsServerSession.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -21,7 +21,7 @@ #include "FeedsDatabase.h" #include "FeedsServer.h" -#include "FeedsServerMsg.h" +#include #include "FeedsServerSession.h" #include "SessionHttpConnection.h" #include "Logger.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/Server/src/ImportFeedsTask.cpp --- a/browserutilities/feedsengine/FeedsServer/Server/src/ImportFeedsTask.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/Server/src/ImportFeedsTask.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,13 +15,12 @@ * */ - #include #include "ImportFeedsTask.h" #include "FeedsDatabase.h" #include "FeedsServer.h" -#include "FeedsServerMsg.h" +#include // Root folder related. const TInt KRootFolderId = 0; diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/Server/src/UpdateAllFeedsTask.cpp --- a/browserutilities/feedsengine/FeedsServer/Server/src/UpdateAllFeedsTask.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/Server/src/UpdateAllFeedsTask.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,18 +15,16 @@ * */ - -#include "FolderAttributes.h" +#include #include "FeedsDatabase.h" #include "FeedsServer.h" -#include "LeakTracker.h" +#include #include "Logger.h" #include "PackedFeed.h" #include "PackedFolder.h" #include "UpdateAllFeedsTask.h" #include - // ----------------------------------------------------------------------------- // CUpdateAllFeedsTask::NewL // @@ -254,6 +252,9 @@ // Get feed's url from the datbase. (void) iFeedsServer.Database().UrlFromFeedIdL( iFeedIds[iNextFeedIndex], feedUrl); + + User::LeaveIfNull(feedUrl); + CleanupStack::PushL(feedUrl); // Create a new task to update the feed. diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/Server/src/UpdateFeedTask.cpp --- a/browserutilities/feedsengine/FeedsServer/Server/src/UpdateFeedTask.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/Server/src/UpdateFeedTask.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,17 +15,15 @@ * */ - -#include "FeedAttributes.h" +#include #include "FeedHandler.h" #include "FeedsServer.h" -#include "LeakTracker.h" +#include #include "Logger.h" #include "PackedFeed.h" #include "UpdateFeedTask.h" #include "UrlHandlerFactory.h" - // ----------------------------------------------------------------------------- // CUpdateFeedTask::NewL // diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/UrlHandler/inc/FileHandler.h --- a/browserutilities/feedsengine/FeedsServer/UrlHandler/inc/FileHandler.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/UrlHandler/inc/FileHandler.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,15 +15,13 @@ * */ - #ifndef FILE_HANDLER_H #define FILE_HANDLER_H - // INCLUDES #include -#include "LeakTracker.h" +#include #include "UrlHandler.h" // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/UrlHandler/inc/HttpConnection.h --- a/browserutilities/feedsengine/FeedsServer/UrlHandler/inc/HttpConnection.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/UrlHandler/inc/HttpConnection.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,17 +15,15 @@ * */ - #ifndef HTTP_CONNECTION_H #define HTTP_CONNECTION_H - // INCLUDES #include #include #include -#include "LeakTracker.h" +#include // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/UrlHandler/inc/HttpHandler.h --- a/browserutilities/feedsengine/FeedsServer/UrlHandler/inc/HttpHandler.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/UrlHandler/inc/HttpHandler.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,11 +15,9 @@ * */ - #ifndef HTTP_HANDLER_H #define HTTP_HANDLER_H - // INCLUDES #include #include @@ -27,7 +25,7 @@ #include #include "HttpConnection.h" -#include "LeakTracker.h" +#include #include "UrlHandler.h" // CONSTANTS @@ -45,7 +43,6 @@ // CLASS DECLARATION - /** * A class that fetches resources via HTTP 1.1. * diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/UrlHandler/src/FileHandler.cpp --- a/browserutilities/feedsengine/FeedsServer/UrlHandler/src/FileHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/UrlHandler/src/FileHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,16 +15,14 @@ * */ - #include #include #include #include "FileHandler.h" -#include "LeakTracker.h" +#include #include "Logger.h" - // ----------------------------------------------------------------------------- // CFileHandler::NewL // diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/UrlHandler/src/HttpConnection.cpp --- a/browserutilities/feedsengine/FeedsServer/UrlHandler/src/HttpConnection.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/UrlHandler/src/HttpConnection.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,18 +15,16 @@ * */ - #include -#include -#include -#include -#include +#include +#include +#include +#include #include "HttpConnection.h" -#include "LeakTracker.h" +#include #include "Logger.h" - // ----------------------------------------------------------------------------- // CHttpConnection::CHttpConnection // C++ default constructor can NOT contain any code, that @@ -37,7 +35,6 @@ { } - // ----------------------------------------------------------------------------- // CHttpConnection::BaseConstructL // Symbian 2nd phase constructor can leave. diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/UrlHandler/src/HttpHandler.cpp --- a/browserutilities/feedsengine/FeedsServer/UrlHandler/src/HttpHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/UrlHandler/src/HttpHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,18 +15,17 @@ * */ - #include #include #include -#include +#include #include "HttpConnection.h" #include "HttpHandler.h" -#include "LeakTracker.h" +#include #include "Logger.h" -#include "CUserAgent.h" +#include // ----------------------------------------------------------------------------- // CHttpHandler::NewL diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/UrlHandler/src/ServerHttpConnection.cpp --- a/browserutilities/feedsengine/FeedsServer/UrlHandler/src/ServerHttpConnection.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/UrlHandler/src/ServerHttpConnection.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ #include -#include +#include #include "ServerHttpConnection.h" #include "Logger.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/XmlUtils/src/XmlEncoding.cpp --- a/browserutilities/feedsengine/FeedsServer/XmlUtils/src/XmlEncoding.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/XmlUtils/src/XmlEncoding.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,11 +15,9 @@ * */ - #include -#include "XmlEncoding.h" - +#include // ----------------------------------------------------------------------------- // CXmlEncoding::NewL diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/XmlUtils/src/XmlEntity.cpp --- a/browserutilities/feedsengine/FeedsServer/XmlUtils/src/XmlEntity.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/XmlUtils/src/XmlEntity.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,17 +15,14 @@ * */ - - #include #include #include #include "CleanupLibXml2.h" -#include "LeakTracker.h" +#include #include "XmlEntity.h" - // Private consts. // ------------------------------------------------------------------------- // Note: This array must be sorted by entity name. The lookup function diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsServer/XmlUtils/src/XmlUtils.cpp --- a/browserutilities/feedsengine/FeedsServer/XmlUtils/src/XmlUtils.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsServer/XmlUtils/src/XmlUtils.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,18 +15,16 @@ * */ - - #include #include #include #include "CleanupLibXml2.h" -#include "LeakTracker.h" +#include #include "Logger.h" -#include "XmlEncoding.h" +#include #include "XmlEntity.h" -#include "XmlUtils.h" +#include // Local data-types struct ErrorContext @@ -38,7 +36,6 @@ // Static variables static CXmlEntity* sXmlEntity = NULL; - // ----------------------------------------------------------------------------- // EntityResolverL // diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsUI/FeedsApp/src/FeedsAppUI.cpp --- a/browserutilities/feedsengine/FeedsUI/FeedsApp/src/FeedsAppUI.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsUI/FeedsApp/src/FeedsAppUI.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -19,12 +19,11 @@ #include "FeedsApp.hrh" #include "FeedsAppUi.h" -#include "LeakTracker.h" +#include #include "TestHarnessView.h" #include "Logger.h" - // ----------------------------------------------------------------------------- // CFeedsAppUi::ConstructL() // diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsUI/FeedsApp/src/FeedsApplication.cpp --- a/browserutilities/feedsengine/FeedsUI/FeedsApp/src/FeedsApplication.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsUI/FeedsApp/src/FeedsApplication.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,12 +15,10 @@ * */ - #include "FeedsApplication.h" #include "FeedsDocument.h" #include "FeedsViews.h" -#include "LeakTracker.h" - +#include // ----------------------------------------------------------------------------- // CFeedsApplication::~CFeedsApplication diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsUI/FeedsApp/src/FeedsDocument.cpp --- a/browserutilities/feedsengine/FeedsUI/FeedsApp/src/FeedsDocument.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsUI/FeedsApp/src/FeedsDocument.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #include #include @@ -23,10 +22,9 @@ #include "FeedsAppUi.h" #include "FeedsDocument.h" -#include "LeakTracker.h" +#include #include "Logger.h" - // ----------------------------------------------------------------------------- // CFeedsDocument::CFeedsDocument() // diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsUI/TestHarness/inc/TestHarness.h --- a/browserutilities/feedsengine/FeedsUI/TestHarness/inc/TestHarness.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsUI/TestHarness/inc/TestHarness.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,20 +15,18 @@ * */ - #ifndef TEST_HARNESS_H #define TEST_HARNESS_H - // INCLUDES #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include "FeedsWaitDialog.h" // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsUI/TestHarness/src/TestHarness.cpp --- a/browserutilities/feedsengine/FeedsUI/TestHarness/src/TestHarness.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsUI/TestHarness/src/TestHarness.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,12 +15,11 @@ * */ - -#include "LeakTracker.h" +#include #include "Logger.h" #include "StatusPane.h" #include "TestHarness.h" -#include +#include #include "FeedsWaitDialog.h" #include diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsUI/TestHarness/src/TestHarnessContainer.cpp --- a/browserutilities/feedsengine/FeedsUI/TestHarness/src/TestHarnessContainer.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsUI/TestHarness/src/TestHarnessContainer.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,11 +15,9 @@ * */ - #include "TestHarnessContainer.h" #include "TestHarnessView.h" -#include "LeakTracker.h" - +#include // ----------------------------------------------------------------------------- // CFeedContainer::NewL diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/FeedsUI/TestHarness/src/TestHarnessView.cpp --- a/browserutilities/feedsengine/FeedsUI/TestHarness/src/TestHarnessView.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/FeedsUI/TestHarness/src/TestHarnessView.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #include #include #include @@ -25,12 +24,11 @@ #include "FeedsApp.hrh" #include "FeedsAppUi.h" -#include "LeakTracker.h" +#include #include "TestHarness.h" #include "TestHarnessView.h" #include "TestHarnessContainer.h" - // ----------------------------------------------------------------------------- // CTestHarnessView::NewL // diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/group/FeedsApp.mmp --- a/browserutilities/feedsengine/group/FeedsApp.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/group/FeedsApp.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -15,12 +15,10 @@ * */ - #include #include #include -#include - +#include TARGET FeedsApp.exe TARGETTYPE exe @@ -34,6 +32,7 @@ CAPABILITY CAP_APPLICATION NetworkControl -Location START RESOURCE ../data/FeedsApp.rss +DEPENDS avkon.rsg HEADER TARGETPATH APP_RESOURCE_DIR #ifdef __S60_32__ @@ -57,17 +56,14 @@ SOURCE TestHarnessContainer.cpp SOURCE TestHarnessView.cpp - // Client UI Util sources SOURCEPATH ../FeedsUI/Common/src SOURCE StatusPane.cpp - // Utils sources SOURCEPATH ../FeedsServer/Common/src SOURCE LeakTracker.cpp - // Include paths USERINCLUDE ../FeedsServer/Common/inc USERINCLUDE ../FeedsUI/TestHarness/inc @@ -77,7 +73,6 @@ MW_LAYER_SYSTEMINCLUDE - // Libraries DEBUGLIBRARY flogger.lib @@ -95,7 +90,6 @@ LIBRARY FeedsServerClient.lib LIBRARY connectionmanager.lib - SOURCEPATH ../ START RESOURCE data/FeedsApp_reg.rss diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/group/FeedsServer.mmp --- a/browserutilities/feedsengine/group/FeedsServer.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/group/FeedsServer.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -15,12 +15,10 @@ * */ - #include #include #include -#include - +#include TARGET FeedsServer.exe TARGETTYPE exe @@ -42,7 +40,6 @@ TARGETPATH /System/Programs #endif - // FeedsServer/Server sources SOURCEPATH ../FeedsServer/Server/src SOURCE FeedsDatabase.cpp @@ -57,7 +54,6 @@ SOURCE UpdateManager.cpp SOURCE UpdateQueue.cpp - // FeedsServer/FeedHandler sources SOURCEPATH ../FeedsServer/FeedHandler/src SOURCE AtomFeedParser.cpp @@ -84,7 +80,6 @@ SOURCE XmlEntity.cpp SOURCE XmlUtils.cpp - // Utils sources SOURCEPATH ../FeedsServer/Common/src SOURCE LeakTracker.cpp @@ -101,36 +96,36 @@ USERINCLUDE ../FeedsServer/XmlUtils/inc USERINCLUDE ../../inc - MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE +OS_LAYER_ESTLIB_SYSTEMINCLUDE // Libraries -LIBRARY euser.lib +LIBRARY euser.lib #ifdef _DEBUG LIBRARY flogger.lib #else DEBUGLIBRARY flogger.lib #endif -LIBRARY bafl.lib -LIBRARY InetProtUtil.lib -LIBRARY http.lib -LIBRARY efsrv.lib -LIBRARY XmlEngine.lib -LIBRARY XmlEngineDOM.lib -LIBRARY XmlEngineUtils.Lib -LIBRARY estlib.lib -LIBRARY HttpFilterCommon.lib -LIBRARY connectionmanager.lib -LIBRARY ecom.lib -LIBRARY commdb.lib -LIBRARY charconv.lib -LIBRARY edbms.lib -LIBRARY estor.lib -LIBRARY centralrepository.lib +LIBRARY bafl.lib +LIBRARY InetProtUtil.lib +LIBRARY http.lib +LIBRARY efsrv.lib +LIBRARY XmlEngine.lib +LIBRARY XmlEngineDOM.lib +LIBRARY XmlEngineUtils.Lib +LIBRARY estlib.lib +LIBRARY HttpFilterCommon.lib +LIBRARY connectionmanager.lib +LIBRARY ecom.lib +LIBRARY commdb.lib +LIBRARY charconv.lib +LIBRARY edbms.lib +LIBRARY estor.lib +LIBRARY centralrepository.lib LIBRARY apengine.lib -LIBRARY ESock.lib +LIBRARY ESock.lib LIBRARY Avkon.lib LIBRARY etel3rdparty.lib LIBRARY webutils.lib -LIBRARY sysutil.lib +LIBRARY sysutil.lib + diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/group/FeedsServerClient.mmp --- a/browserutilities/feedsengine/group/FeedsServerClient.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/group/FeedsServerClient.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -15,10 +15,9 @@ * */ - #include #include -#include +#include CAPABILITY CAP_CLIENT_DLL VENDORID VID_DEFAULT @@ -40,20 +39,16 @@ SOURCEPATH ../FeedsServer/Client/src SOURCE FeedsServerClient.cpp SOURCE ClientRequestHandlers.cpp - SOURCE FeedsServerFeed.cpp SOURCE FeedRequestHandlers.cpp SOURCE Feed.cpp - SOURCE FeedsServerFolderItem.cpp SOURCE FolderItemRequestHandlers.cpp SOURCE FolderItem.cpp SOURCE Item.cpp SOURCE Enclosure.cpp - SOURCE RequestHandler.cpp - // Utils sources SOURCEPATH ../FeedsServer/Common/src SOURCE LeakTracker.cpp @@ -61,14 +56,12 @@ SOURCE PackedFolder.cpp SOURCE PackedFeed.cpp - USERINCLUDE ../FeedsServer/Client/inc USERINCLUDE ../FeedsServer/Common/inc USERINCLUDE ../../inc MW_LAYER_SYSTEMINCLUDE - // Libraries LIBRARY euser.lib #if defined( _DEBUG ) diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/feedsengine/group/bld.inf --- a/browserutilities/feedsengine/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/feedsengine/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -18,7 +18,7 @@ /*New Api INF file*/ #include "../FeedsServer/Api/group/bld.inf" #include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS ARMV5 WINSCW diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/multipartparser/group/MultipartParser.mmp --- a/browserutilities/multipartparser/group/MultipartParser.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/multipartparser/group/MultipartParser.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -15,9 +15,8 @@ * */ - #include -#include +#include TARGET MultipartParser.dll TARGETTYPE DLL @@ -37,11 +36,10 @@ deffile Bmarm/MULTIPARTPARSER.DEF #endif - USERINCLUDE ../inc MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE +OS_LAYER_ESTLIB_SYSTEMINCLUDE SOURCEPATH ../src @@ -55,12 +53,3 @@ LIBRARY estor.lib LIBRARY ezlib.lib LIBRARY imut.lib - - - - - - - - - diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/multipartparser/group/bld.inf --- a/browserutilities/multipartparser/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/multipartparser/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ #include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" #ifdef BRDO_MULTIPART_PARSER_FF diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/multipartparser/src/BodyPart.cpp --- a/browserutilities/multipartparser/src/BodyPart.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/multipartparser/src/BodyPart.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,9 +15,8 @@ * */ - // INCLUDE FILES -#include "BodyPart.h" +#include // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/multipartparser/src/MultipartParser.cpp --- a/browserutilities/multipartparser/src/MultipartParser.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/multipartparser/src/MultipartParser.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - // INCLUDE FILES #include // First to avoid NULL redefine warning (no #ifndef NULL). #include @@ -26,11 +25,10 @@ #include #include -#include "MultipartParser.h" +#include #include "GZipBufMgr.h" #include "tinternetdate.h" - // CONSTANTS const char Multipart_Mixed[] = {"multipart/mixed"}; const char Multipart_Related[] = {"multipart/related"}; diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/recenturlstore/RecentUrlSrc/RecentUrlStore.cpp --- a/browserutilities/recenturlstore/RecentUrlSrc/RecentUrlStore.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/recenturlstore/RecentUrlSrc/RecentUrlStore.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,10 +17,8 @@ * */ - - // INCLUDE FILES -#include "RecentUrlStore.h" +#include // EXTERNAL DATA STRUCTURES diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/recenturlstore/group/RecentUrlStore.mmp --- a/browserutilities/recenturlstore/group/RecentUrlStore.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/recenturlstore/group/RecentUrlStore.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ #include -#include +#include TARGET RECENTURLSTORE.DLL TARGETTYPE DLL diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/recenturlstore/group/bld.inf --- a/browserutilities/recenturlstore/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/recenturlstore/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -18,7 +18,7 @@ */ #include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/schemehandler/SchemeApp/data/SchemeApp.rss --- a/browserutilities/schemehandler/SchemeApp/data/SchemeApp.rss Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/schemehandler/SchemeApp/data/SchemeApp.rss Mon Mar 29 12:27:15 2010 +0100 @@ -29,7 +29,7 @@ #include #include #include -#include +#include // RESOURCE DEFINITIONS diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/schemehandler/SchemeApp/data/SchemeAppAif.rss --- a/browserutilities/schemehandler/SchemeApp/data/SchemeAppAif.rss Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/schemehandler/SchemeApp/data/SchemeAppAif.rss Mon Mar 29 12:27:15 2010 +0100 @@ -21,7 +21,7 @@ // INCLUDES #include -#include +#include // RESOURCE DEFINITIONS diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/schemehandler/SchemeApp/data/SchemeApp_Caption.rss --- a/browserutilities/schemehandler/SchemeApp/data/SchemeApp_Caption.rss Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/schemehandler/SchemeApp/data/SchemeApp_Caption.rss Mon Mar 29 12:27:15 2010 +0100 @@ -18,7 +18,7 @@ #include -#include "SchemeApp.loc" +#include "schemeapp.loc" //---------------------------------------------------- // diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/schemehandler/SchemeApp/group/SchemeApp.mmp --- a/browserutilities/schemehandler/SchemeApp/group/SchemeApp.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/schemehandler/SchemeApp/group/SchemeApp.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -17,12 +17,11 @@ * */ - #include -#include +#include #include #include -#include +#include TARGET SchemeApp.exe EPOCSTACKSIZE 0x5000 @@ -43,8 +42,8 @@ SOURCE SchemeDocument.cpp SOURCE SchemeDialog.cpp - START RESOURCE ../data/SchemeApp.rss +DEPENDS avkon.rsg HEADER TARGETPATH APP_RESOURCE_DIR #ifdef __S60_32__ @@ -57,7 +56,6 @@ USERINCLUDE ../inc MW_LAYER_SYSTEMINCLUDE -MW_LAYER_ECOM_SYSTEMINCLUDE LIBRARY apparc.lib LIBRARY avkon.lib diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/schemehandler/SchemeApp/group/bld.inf --- a/browserutilities/schemehandler/SchemeApp/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/schemehandler/SchemeApp/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -18,7 +18,7 @@ */ #include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT @@ -26,7 +26,7 @@ PRJ_EXPORTS ../../rom/SchemeHandler.iby CORE_MW_LAYER_IBY_EXPORT_PATH(SchemeHandler.iby) ../../rom/SchemeHandlerResources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(SchemeHandlerResources.iby) -../loc/SchemeApp.loc MW_LAYER_LOC_EXPORT_PATH(SchemeApp.loc) +../loc/schemeapp.loc MW_LAYER_LOC_EXPORT_PATH(schemeapp.loc) #ifdef __SERIES60_32__ diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/schemehandler/SchemeApp/inc/SchemeApp.h --- a/browserutilities/schemehandler/SchemeApp/inc/SchemeApp.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/schemehandler/SchemeApp/inc/SchemeApp.h Mon Mar 29 12:27:15 2010 +0100 @@ -23,7 +23,7 @@ #include #include -#include +#include // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/schemehandler/SchemeApp/loc/SchemeApp.loc --- a/browserutilities/schemehandler/SchemeApp/loc/SchemeApp.loc Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/schemehandler/SchemeApp/loc/SchemeApp.loc Mon Mar 29 12:27:15 2010 +0100 @@ -30,4 +30,4 @@ //d:application name //l:cell_app_pane_t1 // -#define qtn_apps_services_grid "Services" \ No newline at end of file +#define qtn_apps_services_grid "Services" diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/schemehandler/SchemeApp/src/SchemeAppUi.cpp --- a/browserutilities/schemehandler/SchemeApp/src/SchemeAppUi.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/schemehandler/SchemeApp/src/SchemeAppUi.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -20,7 +20,7 @@ #include "SchemeDocument.h" #include "SchemeAppLogger.h" #include "SchemeDialog.h" -#include +#include #include "SchemeAppUi.h" #include "Scheme.hrh" #include diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/schemehandler/SchemeApp/src/SchemeDocument.cpp --- a/browserutilities/schemehandler/SchemeApp/src/SchemeDocument.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/schemehandler/SchemeApp/src/SchemeDocument.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,12 +17,11 @@ * */ - // INCLUDE FILES #include "SchemeDocument.h" #include "SchemeAppUi.h" -#include "SchemeHandler.h" +#include #include "SchemeAppLogger.h" // ================= MEMBER FUNCTIONS ======================= diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/schemehandler/SchemeDispatcher/data/101f8531.rss --- a/browserutilities/schemehandler/SchemeDispatcher/data/101f8531.rss Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/schemehandler/SchemeDispatcher/data/101f8531.rss Mon Mar 29 12:27:15 2010 +0100 @@ -16,8 +16,8 @@ */ -#include "SchemeDefs.hrh" -#include "RegistryInfo.rh" +#include "schemedefs.hrh" +#include RESOURCE REGISTRY_INFO theInfo { diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/schemehandler/SchemeDispatcher/group/SchemeDispatcher.mmp --- a/browserutilities/schemehandler/SchemeDispatcher/group/SchemeDispatcher.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/schemehandler/SchemeDispatcher/group/SchemeDispatcher.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -1,4 +1,4 @@ -/* + /* * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available @@ -18,8 +18,8 @@ */ #include -#include -#include +#include +#include TARGET SchemeDispatcher.dll TARGETTYPE PLUGIN @@ -29,7 +29,8 @@ SOURCEPATH ../data START RESOURCE SCHEME_DISPATCHER_UID_RSS_NAME - TARGET SchemeDispatcher.rsc +DEPENDS avkon.rsg +TARGET SchemeDispatcher.rsc END CAPABILITY CAP_ECOM_PLUGIN @@ -49,10 +50,9 @@ SOURCE MmsHandler.cpp USERINCLUDE ../inc -SYSTEMINCLUDE ../../../../inc +USERINCLUDE ../../../../inc MW_LAYER_SYSTEMINCLUDE -MW_LAYER_ECOM_SYSTEMINCLUDE LIBRARY euser.lib LIBRARY ECOM.LIB @@ -70,7 +70,7 @@ LIBRARY BrowserLauncher.lib LIBRARY avkon.lib LIBRARY Centralrepository.lib - +LIBRARY charconv.lib // Define this macro if you wish to enable logging //#define __TEST_SCHEMEDISP_LOG_ENABLED @@ -78,5 +78,3 @@ MACRO __SCHEMEDISP_LOG__ DEBUGLIBRARY flogger.lib #endif // __TEST_SCHEMEDISP_LOG_ENABLED - - diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/schemehandler/SchemeDispatcher/group/bld.inf --- a/browserutilities/schemehandler/SchemeDispatcher/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/schemehandler/SchemeDispatcher/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -19,7 +19,7 @@ #include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/schemehandler/SchemeDispatcher/inc/BaseHandler.h --- a/browserutilities/schemehandler/SchemeDispatcher/inc/BaseHandler.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/schemehandler/SchemeDispatcher/inc/BaseHandler.h Mon Mar 29 12:27:15 2010 +0100 @@ -17,13 +17,12 @@ * */ - #ifndef BASE_HANDLER_H #define BASE_HANDLER_H // INCLUDES -#include "SchemeHandler.h" +#include #include // FORWARD DECLARATION diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/schemehandler/SchemeDispatcher/inc/FileHandler.h --- a/browserutilities/schemehandler/SchemeDispatcher/inc/FileHandler.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/schemehandler/SchemeDispatcher/inc/FileHandler.h Mon Mar 29 12:27:15 2010 +0100 @@ -28,7 +28,7 @@ #include #include #include -#include +#include // FORWARD DECLARATION diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/schemehandler/SchemeDispatcher/inc/HttpHandler.h --- a/browserutilities/schemehandler/SchemeDispatcher/inc/HttpHandler.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/schemehandler/SchemeDispatcher/inc/HttpHandler.h Mon Mar 29 12:27:15 2010 +0100 @@ -27,7 +27,7 @@ #include #include #include -#include +#include // FORWARD DECLARATION // CLASS DECLARATION diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/schemehandler/SchemeDispatcher/src/BaseHandler.cpp --- a/browserutilities/schemehandler/SchemeDispatcher/src/BaseHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/schemehandler/SchemeDispatcher/src/BaseHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/schemehandler/SchemeDispatcher/src/CtiHandler.cpp --- a/browserutilities/schemehandler/SchemeDispatcher/src/CtiHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/schemehandler/SchemeDispatcher/src/CtiHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,12 +17,11 @@ * */ - // INCLUDE FILES #include "CtiHandler.h" #include "SchemeDispLogger.h" -#include // For REComSession +#include // For REComSession #include #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/schemehandler/SchemeDispatcher/src/FileHandler.cpp --- a/browserutilities/schemehandler/SchemeDispatcher/src/FileHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/schemehandler/SchemeDispatcher/src/FileHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,12 +17,11 @@ * */ - // INCLUDE FILES #include "FileHandler.h" #include "SchemeDispLogger.h" -#include // For REComSession +#include // For REComSession #include #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/schemehandler/SchemeDispatcher/src/HttpHandler.cpp --- a/browserutilities/schemehandler/SchemeDispatcher/src/HttpHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/schemehandler/SchemeDispatcher/src/HttpHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,12 +17,11 @@ * */ - // INCLUDE FILES #include "HttpHandler.h" #include "SchemeDispLogger.h" -#include // For REComSession +#include // For REComSession #include #include #include @@ -32,7 +31,7 @@ #include #include #include -#include +#include _LIT( KBrowserPrefix, "4 " ); LOCAL_C const TUid KUidBrowser = { 0x10008D39 }; diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/schemehandler/SchemeDispatcher/src/MailToHandler.cpp --- a/browserutilities/schemehandler/SchemeDispatcher/src/MailToHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/schemehandler/SchemeDispatcher/src/MailToHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,12 +17,11 @@ * */ - // INCLUDE FILES #include "MailToHandler.h" #include "SchemeDispLogger.h" -#include // For REComSession +#include // For REComSession #include #include #include @@ -30,7 +29,7 @@ #include #include #include - +#include // ================= CONSTANTS ======================= @@ -109,9 +108,16 @@ void CMailToHandler::HandleUrlEmbeddedL() { CLOG_ENTERFN( "CMailToHandler::HandleUrlEmbeddedL()" ); - - //TPtrC path = iParsedUrl->Des(); - + /* Convert to UCS-2, conversion from HBufC16 to HBufC8 should do no harm because the original string is HBufC8 */ + HBufC8 *tempbuf8 = HBufC8::NewLC(iParsedUrl->Length()); + tempbuf8->Des().Copy(iParsedUrl->Des()); + TInt errEncode = CnvUtfConverter::ConvertToUnicodeFromUtf8( *static_cast(&iParsedUrl->Des()),*tempbuf8); + if (errEncode != KErrNone) + { + iParsedUrl->Des().Copy(tempbuf8->Des()); + } + CleanupStack::PopAndDestroy(tempbuf8); + iTelService = CBrowserTelService::NewL(); iTelService->AddObserver( this ); diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/schemehandler/SchemeDispatcher/src/MmsHandler.cpp --- a/browserutilities/schemehandler/SchemeDispatcher/src/MmsHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/schemehandler/SchemeDispatcher/src/MmsHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,12 +17,11 @@ * */ - // INCLUDE FILES #include "MmsHandler.h" #include "SchemeDispLogger.h" -#include // For REComSession +#include // For REComSession #include #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/schemehandler/SchemeDispatcher/src/RtspHandler.cpp --- a/browserutilities/schemehandler/SchemeDispatcher/src/RtspHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/schemehandler/SchemeDispatcher/src/RtspHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,12 +17,11 @@ * */ - // INCLUDE FILES #include "RtspHandler.h" #include "SchemeDispLogger.h" -#include // For REComSession +#include // For REComSession #include #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/schemehandler/SchemeDispatcher/src/SchemeProxy.cpp --- a/browserutilities/schemehandler/SchemeDispatcher/src/SchemeProxy.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/schemehandler/SchemeDispatcher/src/SchemeProxy.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,6 @@ * */ - #include "FileHandler.h" #include "HttpHandler.h" #include "RtspHandler.h" @@ -27,8 +26,8 @@ #include "CtiHandler.h" #include "MmsHandler.h" #include -#include -#include +#include +#include // Exported proxy for instantiation method resolution // Define the interface UIDs diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/schemehandler/SchemeDispatcher/src/TelHandler.cpp --- a/browserutilities/schemehandler/SchemeDispatcher/src/TelHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/schemehandler/SchemeDispatcher/src/TelHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,12 +17,11 @@ * */ - // INCLUDE FILES #include "SchemeDispLogger.h" #include "TelHandler.h" -#include // For REComSession +#include // For REComSession #include #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/schemehandler/SchemeDispatcher/src/WtaiHandler.cpp --- a/browserutilities/schemehandler/SchemeDispatcher/src/WtaiHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/schemehandler/SchemeDispatcher/src/WtaiHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,12 +17,11 @@ * */ - // INCLUDE FILES #include "WtaiHandler.h" #include "SchemeDispLogger.h" -#include // For REComSession +#include // For REComSession #include #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/webutils/conf/webutils.confml Binary file browserutilities/webutils/conf/webutils.confml has changed diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/webutils/conf/webutils_101F8731.crml Binary file browserutilities/webutils/conf/webutils_101F8731.crml has changed diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/webutils/group/bld.inf --- a/browserutilities/webutils/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/webutils/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ #include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT -ARMI diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/webutils/group/webutils.mmp --- a/browserutilities/webutils/group/webutils.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/webutils/group/webutils.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -15,10 +15,9 @@ * */ - #include #include -#include +#include // Build target TARGET webutils.dll @@ -33,13 +32,11 @@ // Source files SOURCE CUserAgent.cpp - // Include paths USERINCLUDE . ../INC MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE - +OS_LAYER_ESTLIB_SYSTEMINCLUDE // Dependencies LIBRARY euser.lib @@ -53,14 +50,12 @@ //MACRO _WEBUTILS_LOG_ //#define _WEBUTILS_LOG_ - #ifdef _WEBUTILS_LOG_ LIBRARY flogger.lib #else DEBUGLIBRARY flogger.lib #endif - #if defined(ARMCC) DEFFILE ../EABI/WebUtils_EKA2.DEF #elif defined( WINSCW ) @@ -70,5 +65,3 @@ #else DEFFILE ../BMARM/WEBUTILS_EKA2.DEF #endif - - diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/webutils/src/CUserAgent.cpp --- a/browserutilities/webutils/src/CUserAgent.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/webutils/src/CUserAgent.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,19 +15,17 @@ * */ - // INCLUDE FILES #include #include #include -#include +#include #include "webUtilsCommon.h" -#include "CUserAgent.h" +#include #include "WebUtilsLogger.h" -#include "WebUtilsInternalCRKeys.h" - +#include #define KPlaceHolderMozillaVer _L("Mozilla/5.0") #define KPlaceHolderComponent _L("AppleWebKit/525 (KHTML, like Gecko) Version/3.0") @@ -692,7 +690,8 @@ TInt ret(0); TBuf<64> BrowserVersionMajor(0); TBuf<64> BrowserVersionMinor(0); - TBuf<64> BrowserVersionSVNRev(0); + TBuf<64> BrowserVersionFeatureRev(0); + TBuf<64> BrowserVersionPatchRev(0); iBrowserVersionStr = HBufC::NewL(KMaxBrowserVersionStringLength); @@ -701,21 +700,37 @@ ret = iRepository->Get(KWebUtilsBrowserVersionMajor, BrowserVersionMajor); if(ret == KErrNone) - { - ret = iRepository->Get(KWebUtilsBrowserVersionMinor, BrowserVersionMinor); - if(ret == KErrNone) - { - ret = iRepository->Get(KWebUtilsBrowserVersionSVNRev, BrowserVersionSVNRev); - if(ret == KErrNone) - { - BrowserVersionPtr.Append(BrowserVersionMajor); - BrowserVersionPtr.Append(KPlaceHolderPeriod); - BrowserVersionPtr.Append(BrowserVersionMinor); - BrowserVersionPtr.Append(KPlaceHolderPeriod); - BrowserVersionPtr.Append(BrowserVersionSVNRev); ; - } - } - } + { + ret = iRepository->Get(KWebUtilsBrowserVersionMinor, BrowserVersionMinor); + if(ret == KErrNone) + { + ret = iRepository->Get(KWebUtilsBrowserVersionFeatureRev, BrowserVersionFeatureRev); + if(ret == KErrNone) + { + ret = iRepository->Get(KWebUtilsBrowserVersionPatchRev, BrowserVersionPatchRev); + if(ret == KErrNone) + { + BrowserVersionPtr.Append(BrowserVersionMajor); + BrowserVersionPtr.Append(KPlaceHolderPeriod); + BrowserVersionPtr.Append(BrowserVersionMinor); + BrowserVersionPtr.Append(KPlaceHolderPeriod); + BrowserVersionPtr.Append(BrowserVersionFeatureRev); + //Incase of Feature releases we do not show Patch number. + //Therefore, if the patch version is 0 or empty then we do not show the content + if( (BrowserVersionPatchRev.CompareF(_L("0")) == 0) + || (BrowserVersionPatchRev.CompareF(KNullDesC) == 0)) + { + //Do Nothing + } + else + { + BrowserVersionPtr.Append(KPlaceHolderPeriod); + BrowserVersionPtr.Append(BrowserVersionPatchRev); + } + } + } + } + } if(ret != KErrNone) { diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/webutils/tsrc/public/adv/group/WebUtilsBCTest.mmp --- a/browserutilities/webutils/tsrc/public/adv/group/WebUtilsBCTest.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/webutils/tsrc/public/adv/group/WebUtilsBCTest.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -19,7 +19,7 @@ #if defined(__S60_) // To get the MW_LAYER_SYSTEMINCLUDE-definition #include - #include + #include #endif TARGET WebUtilsBCTest.dll @@ -39,17 +39,9 @@ SOURCE WebUtilsBCTest.cpp SOURCE WebUtilsBCTestCases.cpp -//RESOURCE resource_file -//RESOURCE resource_file2 - USERINCLUDE ../inc -#if defined(__S60_) - MW_LAYER_SYSTEMINCLUDE -#else - MW_LAYER_SYSTEMINCLUDE - SYSTEMINCLUDE MW_LAYER_PUBLIC_EXPORT_PATH(internal) -#endif +MW_LAYER_SYSTEMINCLUDE LIBRARY euser.lib LIBRARY stiftestinterface.lib diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/webutils/tsrc/public/adv/inc/WebUtilsBCTest.h --- a/browserutilities/webutils/tsrc/public/adv/inc/WebUtilsBCTest.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/webutils/tsrc/public/adv/inc/WebUtilsBCTest.h Mon Mar 29 12:27:15 2010 +0100 @@ -23,7 +23,7 @@ // INCLUDES #include "StifTestModule.h" #include -#include +#include // CONSTANTS //const ?type ?constant_var = ?constant; diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/xmlparser/group/XMLInterface.mmp --- a/browserutilities/xmlparser/group/XMLInterface.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/xmlparser/group/XMLInterface.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -16,12 +16,11 @@ */ #include -#include +#include TARGET XMLInterface.dll TARGETTYPE dll UID 0x1000008d 0x101F9750 -//TARGETPATH ?target_path VENDORID VID_DEFAULT @@ -40,22 +39,19 @@ SOURCE wml_1_3_dict.c SOURCE syncml_1_0_dict.c SOURCE xhtml_1_0_dict.c -SOURCE sl_dict.c +SOURCE sl_dict.c SOURCE CXMLReader.cpp SOURCE CXMLAttributes.cpp SOURCE CXMLObserver.cpp -// RESOURCE resource_file -// RESOURCE resource_file2 - USERINCLUDE ../INC MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE +OS_LAYER_ESTLIB_SYSTEMINCLUDE CAPABILITY CAP_GENERAL_DLL -LIBRARY efsrv.lib +LIBRARY efsrv.lib LIBRARY euser.lib LIBRARY bafl.lib LIBRARY charconv.lib @@ -88,3 +84,4 @@ */ // DEFFILE ?filename // AIF ?filename + diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/xmlparser/group/bld.inf --- a/browserutilities/xmlparser/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/xmlparser/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -19,7 +19,7 @@ #include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/xmlparser/inc/CXMLAttributes.h --- a/browserutilities/xmlparser/inc/CXMLAttributes.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/xmlparser/inc/CXMLAttributes.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,16 +15,13 @@ * */ - - #ifndef __CXMLATTRIBUTES_H #define __CXMLATTRIBUTES_H // INCLUDES #include #include -#include "MXMLAttributes.h" - +#include // CLASS DECLARATION diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/xmlparser/inc/CXMLObserver.h --- a/browserutilities/xmlparser/inc/CXMLObserver.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/xmlparser/inc/CXMLObserver.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,6 @@ * */ - - #ifndef __CXMLOBSERVER_H #define __CXMLOBSERVER_H @@ -24,9 +22,8 @@ #include #include #include "CXMLAttributes.h" -#include "MXMLContentHandler.h" -#include "MWBXMLContentHandler.h" - +#include +#include // CLASS DECLARATION diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/xmlparser/inc/CXMLReader.h --- a/browserutilities/xmlparser/inc/CXMLReader.h Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/xmlparser/inc/CXMLReader.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,6 @@ * */ - - #ifndef __CXMLREADER_H #define __CXMLREADER_H @@ -24,14 +22,13 @@ #include #include #include -#include "nw_cXML_Parser.h" +#include #include "CXMLAttributes.h" -#include "MXMLContentHandler.h" -#include "MWBXMLContentHandler.h" +#include +#include #include "CXMLObserver.h" -#include "XMLUtils.h" - +#include // CLASS DECLARATION diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/xmlparser/src/RXMLReader.cpp --- a/browserutilities/xmlparser/src/RXMLReader.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/xmlparser/src/RXMLReader.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,19 +15,14 @@ * */ - - // INCLUDE FILES -#include "RXMLReader.h" +#include #include "CXMLReader.h" - - // requirement for E32 DLLs // ============================ MEMBER FUNCTIONS =============================== - // ----------------------------------------------------------------------------- // RXMLReader::CreateL() // ----------------------------------------------------------------------------- @@ -37,8 +32,6 @@ iImplementation = CXMLReader::NewL(); } - - // ----------------------------------------------------------------------------- // RXMLReader::Destroy() // ----------------------------------------------------------------------------- diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/xmlparser/src/syncml_1_0_dict.c --- a/browserutilities/xmlparser/src/syncml_1_0_dict.c Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/xmlparser/src/syncml_1_0_dict.c Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - /* ** WARNING ** @@ -34,8 +33,7 @@ * Doc Type = -//SYNCML//DTD SyncML v1.0//EN */ -#include "nw_wbxml_dictionary.h" - +#include static const NW_Ucs2 NW_SyncML_1_0_ElementTag_Add[] = {'A','d','d','\0'}; static const NW_Ucs2 NW_SyncML_1_0_ElementTag_Alert[] = {'A','l','e','r','t','\0'}; diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/xmlparser/src/wml_1_1_dict.c --- a/browserutilities/xmlparser/src/wml_1_1_dict.c Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/xmlparser/src/wml_1_1_dict.c Mon Mar 29 12:27:15 2010 +0100 @@ -15,15 +15,13 @@ * */ - /* ** This file is not generated by the dictionary creator. If you need any help ** to edit this file please see Shaun Keller/Frank Rchichi/Ramesh Bapanapalli. */ #include "nw_wml1x_wml_1_3_tokens.h" -#include "nw_wbxml_dictionary.h" - +#include static const NW_Ucs2 NW_Wml_1_3_ElementTag_pre[] = {'p','r','e','\0'}; static const NW_Ucs2 NW_Wml_1_3_ElementTag_a[] = {'a','\0'}; diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/xmlparser/src/wml_1_3_dict.c --- a/browserutilities/xmlparser/src/wml_1_3_dict.c Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/xmlparser/src/wml_1_3_dict.c Mon Mar 29 12:27:15 2010 +0100 @@ -37,8 +37,7 @@ * Doc Type = -//WAPFORUM//DTD WML 1.3//EN */ #include "nw_wml1x_wml_1_3_tokens.h" -#include "nw_wbxml_dictionary.h" - +#include static const NW_Ucs2 NW_Wml_1_3_ElementTag_pre[] = {'p','r','e','\0'}; static const NW_Ucs2 NW_Wml_1_3_ElementTag_a[] = {'a','\0'}; diff -r 3dbb0284a087 -r 960a2a4c7f03 browserutilities/xmlparser/src/xhtml_1_0_dict.c --- a/browserutilities/xmlparser/src/xhtml_1_0_dict.c Wed Jan 13 15:52:45 2010 +0000 +++ b/browserutilities/xmlparser/src/xhtml_1_0_dict.c Mon Mar 29 12:27:15 2010 +0100 @@ -39,8 +39,7 @@ */ #include "nw_xhtml_xhtml_1_0_tokens.h" -#include "nw_wbxml_dictionary.h" - +#include static const NW_Ucs2 NW_XHTML_1_0_ElementTag_body[] = {'b','o','d','y','\0'}; static const NW_Ucs2 NW_XHTML_1_0_ElementTag_head[] = {'h','e','a','d','\0'}; diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/Loc/CodViewer.loc --- a/codhandler/Loc/CodViewer.loc Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/Loc/CodViewer.loc Mon Mar 29 12:27:15 2010 +0100 @@ -272,4 +272,3 @@ //r:1.2 // #define qtn_cd_info_not_enough_mem "Not enough memory available" - \ No newline at end of file diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/coddownload/group/CodDownload.mmp --- a/codhandler/coddownload/group/CodDownload.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/coddownload/group/CodDownload.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ #include -#include +#include #include "../../CodEng/inc/CodDefs.h" TARGET CodDownload.dll @@ -30,9 +30,8 @@ SOURCE CodDownload.cpp USERINCLUDE ../inc - -SYSTEMINCLUDE ../../CodUi/inc -SYSTEMINCLUDE ../../CodEng/inc +USERINCLUDE ../../CodUi/inc +USERINCLUDE ../../CodEng/inc MW_LAYER_SYSTEMINCLUDE diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/coddownload/group/bld.inf --- a/codhandler/coddownload/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/coddownload/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ #include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/coddownload/src/CodDownload.cpp --- a/codhandler/coddownload/src/CodDownload.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/coddownload/src/CodDownload.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -18,7 +18,7 @@ // INCLUDE FILES -#include "CodDownload.h" +#include #include "CodDownloadImpl.h" // ================= MEMBER FUNCTIONS ======================= diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codeng/group/CodEng.mmp --- a/codhandler/codeng/group/CodEng.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codeng/group/CodEng.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -18,8 +18,8 @@ */ #include -#include -#include "../inc/CodDefs.h" +#include +#include "../inc/CodDefs.h" TARGET CodEng.dll TARGETTYPE dll @@ -27,11 +27,9 @@ CAPABILITY CAP_GENERAL_DLL VENDORID VID_DEFAULT - //MACRO _DEBUG //#define _DEBUG - SOURCEPATH ../src SOURCE CodEngBase.cpp @@ -72,18 +70,11 @@ USERINCLUDE ../inc +MW_LAYER_SYSTEMINCLUDE +OS_LAYER_ESTLIB_SYSTEMINCLUDE +#if defined(__PLATFORM_VERSION_50_TUBE__) || defined(__PLATFORM_VERSION_50__) APP_LAYER_SYSTEMINCLUDE -/* SF TODO: resolve APP LAYER DEPENDENCY: - s60/app/devicecontrol/devctrl_dom/fota_engine_api/inc/FotaEngine.h - s60/app/devicecontrol/devctrl_dom/fota_engine_api/inc/fotaconst.h - s60/app/devicecontrol/devctrl_dom/fota_engine_api/inc/FotaEngStream.h - - s60/app/gallery/gallery_dom/media_file_api/inc/CMGXFileManager.h - s60/app/gallery/gallery_dom/media_file_api/inc/MGXFileManagerFactory.h -*/ -//MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE -MW_LAYER_ECOM_SYSTEMINCLUDE +#endif LIBRARY euser.lib LIBRARY efsrv.lib @@ -127,3 +118,7 @@ DEBUGLIBRARY flogger.lib //LIBRARY flogger.lib +#ifdef BRDO_OCC_ENABLED_FF +LIBRARY extendedconnpref.lib +LIBRARY netmeta.lib +#endif \ No newline at end of file diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codeng/group/bld.inf --- a/codhandler/codeng/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codeng/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -19,7 +19,7 @@ #include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codeng/inc/CodEngBase.h --- a/codhandler/codeng/inc/CodEngBase.h Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codeng/inc/CodEngBase.h Mon Mar 29 12:27:15 2010 +0100 @@ -28,7 +28,7 @@ #include #include #include "CodSaver.h" -#include +#include // FORWARD DECLARATION @@ -679,7 +679,7 @@ TBool iMmcOk; #endif /// Paths on removable media? - TBool iRemovableMedia; + TInt32 iRemovableMediaStatus; /// ROAP Data. Owned. CRoapData* iRoapData; /// Progress or NULL. Owned. diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codeng/inc/CodError.h --- a/codhandler/codeng/inc/CodError.h Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codeng/inc/CodError.h Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,6 @@ * */ - #ifndef COD_ERROR_H #define COD_ERROR_H diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codeng/inc/CodPanic.h --- a/codhandler/codeng/inc/CodPanic.h Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codeng/inc/CodPanic.h Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,6 @@ * */ - #ifndef COD_PANIC_H #define COD_PANIC_H diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codeng/inc/DownloadDataClient.h --- a/codhandler/codeng/inc/DownloadDataClient.h Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codeng/inc/DownloadDataClient.h Mon Mar 29 12:27:15 2010 +0100 @@ -17,14 +17,13 @@ * */ - #ifndef DOWNLOAD_DATA_CLIENT_H #define DOWNLOAD_DATA_CLIENT_H // INCLUDES #include -#include "HttpDownloadData.h" +#include // ================= CONSTANTS ======================= @@ -201,7 +200,7 @@ * Set destination removable attribute. * @param aDesRemovable Whether removable media drive. */ - void SetDesRemovable( TBool aDesRemovable ); + void SetDesRemovable( TInt32 aDesRemovable ); /** * Set last error id attribute. diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codeng/inc/HeaderField.h --- a/codhandler/codeng/inc/HeaderField.h Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codeng/inc/HeaderField.h Mon Mar 29 12:27:15 2010 +0100 @@ -22,7 +22,7 @@ // INCLUDES #include -#include +#include #include // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codeng/inc/MediaObject.h --- a/codhandler/codeng/inc/MediaObject.h Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codeng/inc/MediaObject.h Mon Mar 29 12:27:15 2010 +0100 @@ -27,7 +27,7 @@ #include #include "CodDefs.h" #include -#include "HttpDownloadData.h" +#include // ================= CONSTANTS ======================= /// OMA 1 DD MIME type. diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codeng/inc/NwUtil.h --- a/codhandler/codeng/inc/NwUtil.h Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codeng/inc/NwUtil.h Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,6 @@ * */ - #ifndef NW_UTIL_H #define NW_UTIL_H diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codeng/src/CodData.cpp --- a/codhandler/codeng/src/CodData.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codeng/src/CodData.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,6 @@ * */ - // INCLUDE FILES #include "CodData.h" @@ -25,8 +24,7 @@ #include "CodUtil.h" #include #include "FileExt.h" -#include "HttpDownloadData.h" - +#include // ================= MEMBER FUNCTIONS ======================= diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codeng/src/CodEng.cpp --- a/codhandler/codeng/src/CodEng.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codeng/src/CodEng.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,6 @@ * */ - // INCLUDE FILES #include "CodEng.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codeng/src/CodEngBase.cpp --- a/codhandler/codeng/src/CodEngBase.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codeng/src/CodEngBase.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,6 @@ * */ - // INCLUDE FILES #include "CodEngBase.h" @@ -44,15 +43,15 @@ #include #include #include -#include +#include #include #include #include "CodDefs.h" #include #include #include -#include -#include "FileExt.h" +#include +#include "FileExt.h" #ifdef __SYNCML_DM_FOTA #include @@ -66,7 +65,7 @@ #ifdef RD_MULTIPLE_DRIVE #include #include -#include +#include #endif //RD_MULTIPLE_DRIVE #include @@ -483,7 +482,7 @@ // EXPORT_C TBool CCodEngBase::RemovableMedia() const { - return iRemovableMedia; + return ( KDriveAttRemovable == iRemovableMediaStatus ) ? ETrue : EFalse ; } // --------------------------------------------------------- @@ -581,7 +580,7 @@ iPhoneMemoryOk( EFalse ), iMmcOk( EFalse ), #endif - iRemovableMedia( EFalse ), + iRemovableMediaStatus( KDriveAttLocal ), iStatusCode( KHttp902UserCancelled ), iResult( KErrGeneral ), iContentTypeCheck ( EFalse ), @@ -2009,16 +2008,39 @@ (*iData)[iData->ActiveDownload()]->iTempPath.Append(rootPath.Drive()); (*iData)[iData->ActiveDownload()]->iTempPath.Append(tempBuf); - TDriveInfo info; + TDriveUnit unit( rootPath.Drive() ); - User::LeaveIfError( iFs.Drive( info, unit ) ); - // Create the temp directory earlier in case it's not created yet - iFs.MkDirAll( (*iData)[iData->ActiveDownload()]->iTempPath ); + +#ifdef RD_MULTIPLE_DRIVE + TUint aStatus ; + + if( KErrNone == DriveInfo::GetDriveStatus( iFs, unit , aStatus )) + { + iRemovableMediaStatus = (aStatus & DriveInfo::EDriveExternallyMountable) ? aStatus : 0 ; + if( iRemovableMediaStatus ) + { + iRemovableMediaStatus = (aStatus & DriveInfo::EDriveRemovable) ? KDriveAttRemovable : KDriveAttInternal ; + } + else + { + iRemovableMediaStatus = KDriveAttLocal ; + } + } +#else + TDriveInfo info; + User::LeaveIfError( iFs.Drive( info, unit ) ); if ( info.iDriveAtt & KDriveAttRemovable ) { - iRemovableMedia = ETrue; + iRemovableMediaStatus = KDriveAttRemovable; } - + else + { + iRemovableMediaStatus = KDriveAttLocal; + } +#endif + // Create the temp directory earlier in case it's not created yet + iFs.MkDirAll( (*iData)[iData->ActiveDownload()]->iTempPath ); + CLOG(( ECodEng, 2, _L("<- CCodEngBase::SetPathsL root<%S> temp<%S>"), \ &(*iData)[iData->ActiveDownload()]->iRootPath, &(*iData)[iData->ActiveDownload()]->iTempPath )); } @@ -2039,7 +2061,8 @@ #endif //(*iData)[iData->ActiveDownload()]->iTempPath = KNullDesC; //(*iData)[iData->ActiveDownload()]->iRootPath = KNullDesC; - iRemovableMedia = EFalse; + + iRemovableMediaStatus = KDriveAttLocal; } #ifdef RD_MULTIPLE_DRIVE diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codeng/src/CodParser.cpp --- a/codhandler/codeng/src/CodParser.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codeng/src/CodParser.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,6 @@ * */ - // INCLUDE FILES #include "CodParser.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codeng/src/CodUtil.cpp --- a/codhandler/codeng/src/CodUtil.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codeng/src/CodUtil.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codeng/src/Connection.cpp --- a/codhandler/codeng/src/Connection.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codeng/src/Connection.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -28,6 +28,10 @@ #include #include #include +#include +#ifdef BRDO_OCC_ENABLED_FF +#include +#endif // ================= MEMBER FUNCTIONS ======================= @@ -94,7 +98,31 @@ // aIap == 0 -> user select. iConnPref.SetDialogPreference( ECommDbDialogPrefPrompt ); } - iConn.Start( iConnPref, iStatus ); + #ifdef BRDO_OCC_ENABLED_FF + TExtendedConnPref extPref; + CLOG(( EConn, 4, _L("CodHalder Setting OCC parameters") )); + + CLOG(( EConn, 4, _L("Iap: %d"), aIap )); + if (aIap) + { + CLOG(( EConn, 4, _L("Iap is found") )); + extPref.SetSnapPurpose(CMManager::ESnapPurposeUnknown); + extPref.SetIapId(aIap); + } + else + { + CLOG(( EConn, 4, _L("Using Internet Snap") )); + extPref.SetSnapPurpose(CMManager::ESnapPurposeInternet); + } + + extPref.SetNoteBehaviour(TExtendedConnPref::ENoteBehaviourConnSilent); + TConnPrefList prefList; + prefList.AppendL(&extPref); + iConn.Start( prefList, iStatus ); + #else + iConn.Start( iConnPref, iStatus ); + #endif //BRDO_OCC_ENABLED_FF + iState = EConnecting; SetActive(); CleanupStack::Pop( 2 ); // closing iConn and iSockServ diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codeng/src/DdDummyDict.c --- a/codhandler/codeng/src/DdDummyDict.c Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codeng/src/DdDummyDict.c Mon Mar 29 12:27:15 2010 +0100 @@ -35,8 +35,7 @@ */ #include "DdDummyDict.h" -#include "nw_wbxml_dictionary.h" - +#include static const NW_Ucs2 NW_DdDummy_ElementTag_name[] = {'n','a','m','e','\0'}; static const NW_Ucs2 NW_DdDummy_ElementTag_vendor[] = {'v','e','n','d','o','r','\0'}; diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codeng/src/DdEng.cpp --- a/codhandler/codeng/src/DdEng.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codeng/src/DdEng.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,6 @@ * */ - // INCLUDE FILES #include "DdEng.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codeng/src/DdParser.cpp --- a/codhandler/codeng/src/DdParser.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codeng/src/DdParser.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,6 @@ * */ - // INCLUDE FILES #include "DdParser.h" @@ -27,7 +26,7 @@ #include "CodLogger.h" #include "NwUtil.h" #include "DdDummyDict.h" -#include "HttpDownloadData.h" +#include #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codeng/src/DownloadDataClient.cpp --- a/codhandler/codeng/src/DownloadDataClient.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codeng/src/DownloadDataClient.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,6 @@ * */ - // INCLUDE FILES #include @@ -27,10 +26,8 @@ // ================= CONSTANTS ======================= - // ================= MEMBER FUNCTIONS ======================= - // --------------------------------------------------------- // CMediaDataClient::NewL() // --------------------------------------------------------- @@ -108,7 +105,7 @@ bytes += sizeof(iRedirected); bytes += iDestFilename->Size(); bytes += sizeof(iDownloadedSize); - bytes += sizeof(iDesRemovable); + bytes += sizeof(iDesRemovableStatus); bytes += sizeof(iLastErrorId); bytes += sizeof(iGlobalErrorId); bytes += sizeof(iPausable); @@ -307,10 +304,10 @@ // CMediaDataClient::SetDesRemovable() // --------------------------------------------------------- // -void CMediaDataClient::SetDesRemovable( TBool aDesRemovable ) - { - iDesRemovable = aDesRemovable; - } +void CMediaDataClient::SetDesRemovable( TInt32 aDesRemovable ) + { + iDesRemovableStatus = aDesRemovable; + } // --------------------------------------------------------- // CMediaDataClient::SetLastErrorId() @@ -502,7 +499,7 @@ aStream.WriteInt32L(iDownloadedSize); // iDesRemovable - aStream.WriteInt32L(iDesRemovable); + aStream.WriteInt32L(iDesRemovableStatus); // iLastErrorId aStream.WriteInt32L(iLastErrorId); diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codeng/src/FileSaver.cpp --- a/codhandler/codeng/src/FileSaver.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codeng/src/FileSaver.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,9 +17,8 @@ * */ - // INCLUDE FILES -#include +#include #include "FileSaver.h" #include "CodBuffStorage.h" #include "CodLoadObserver.h" @@ -32,7 +31,7 @@ #include "CodData.h" #include -#include +#include #include #include @@ -47,7 +46,6 @@ const TInt KDefaultStorageBufferSize = 128 * 1024; const TInt KDefaultStorageBufferSizePD = 16 * 1024; - // ================= MEMBER FUNCTIONS ======================= // --------------------------------------------------------- diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codeng/src/FotaSaver.cpp --- a/codhandler/codeng/src/FotaSaver.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codeng/src/FotaSaver.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - // INCLUDE FILES #include "FotaSaver.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codeng/src/HttpLoader.cpp --- a/codhandler/codeng/src/HttpLoader.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codeng/src/HttpLoader.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,6 @@ * */ - // INCLUDE FILES #include "HttpLoader.h" @@ -33,22 +32,20 @@ #include "CodProgress.h" #include "CodEngbase.h" -#include +#include #include -#include +#include #include #include -#include +#include #include #include #include #include -#include -#include "HeaderField.h" -#include "FileExt.h" -#include "CodData.h" - - +#include +#include "HeaderField.h" +#include "FileExt.h" +#include "CodData.h" _LIT8( KDRMOldContentType, "x-drm-old-content-type"); // old content type header to be added _LIT8( KAcceptRangeHeader, "bytes"); diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codeng/src/HttpTcpSession.cpp --- a/codhandler/codeng/src/HttpTcpSession.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codeng/src/HttpTcpSession.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -20,7 +20,7 @@ // INCLUDE FILES -#include +#include #include "HttpTcpSession.h" #include "CodLogger.h" #include "CodPanic.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codeng/src/HttpWapSession.cpp --- a/codhandler/codeng/src/HttpWapSession.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codeng/src/HttpWapSession.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -20,7 +20,7 @@ // INCLUDE FILES -#include +#include #include "HttpWapSession.h" #include "CodError.h" #include "CodLogger.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codeng/src/MediaObject.cpp --- a/codhandler/codeng/src/MediaObject.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codeng/src/MediaObject.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -750,4 +750,4 @@ const TDataType& type( iTypes->MdcaPoint( aIndex ) ); iTypes->Delete(aIndex); iTypes->InsertL(0,type.Des8()); - } \ No newline at end of file + } diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codeng/src/NwUtil.cpp --- a/codhandler/codeng/src/NwUtil.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codeng/src/NwUtil.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,6 @@ * */ - // INCLUDE FILES #include "NwUtil.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codeng/src/RoapSaver.cpp --- a/codhandler/codeng/src/RoapSaver.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codeng/src/RoapSaver.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - // INCLUDE FILES #include diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codrecog/group/CodRecog.mmp --- a/codhandler/codrecog/group/CodRecog.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codrecog/group/CodRecog.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -18,7 +18,7 @@ */ #include -#include +#include TARGET CodRecog.dll TARGETTYPE PLUGIN @@ -36,10 +36,9 @@ SOURCE CodRecog.cpp USERINCLUDE ../inc +USERINCLUDE ../../CodEng/inc -SYSTEMINCLUDE ../../CodEng/inc MW_LAYER_SYSTEMINCLUDE -MW_LAYER_ECOM_SYSTEMINCLUDE LIBRARY euser.lib LIBRARY efsrv.lib diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codrecog/src/10008d49.rss --- a/codhandler/codrecog/src/10008d49.rss Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codrecog/src/10008d49.rss Mon Mar 29 12:27:15 2010 +0100 @@ -20,7 +20,7 @@ // INCLUDES -#include "RegistryInfo.rh" +#include // RESOURCE DEFINITIONS diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codrecog/src/CodRecog.cpp --- a/codhandler/codrecog/src/CodRecog.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codrecog/src/CodRecog.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -24,9 +24,9 @@ #include #include #include -#include +#include "CodDefs.h" #include -#include +#include #include "CodRecog.h" #include "CodRecogLogger.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codui/data/CodUi.rss --- a/codhandler/codui/data/CodUi.rss Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codui/data/CodUi.rss Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,6 @@ * */ - // RESOURCE IDENTIFIER NAME CODU @@ -25,9 +24,9 @@ // INCLUDES #include -#include +#include "CodDefs.h" #include "CodUi.hrh" -#include +#include #include "eikon.rsg" #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codui/group/CodUi.mmp --- a/codhandler/codui/group/CodUi.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codui/group/CodUi.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ #include #include -#include +#include #include "../../CodEng/inc/CodDefs.h" TARGET CodUi.dll @@ -41,9 +41,10 @@ SOURCE DdViewerApp.cpp SOURCE CodDownloadImpl.cpp SOURCE CodDialog.cpp -SOURCE CodConfirm.cpp +SOURCE CodConfirm.cpp START RESOURCE ../data/CodUi.rss +DEPENDS avkon.rsg HEADER TARGETPATH RESOURCE_FILES_DIR #ifdef __S60_32__ @@ -54,12 +55,10 @@ END USERINCLUDE ../inc - +USERINCLUDE ../../CodEng/inc -SYSTEMINCLUDE ../../CodEng/inc - -MW_LAYER_SYSTEMINCLUDE -MW_LAYER_ECOM_SYSTEMINCLUDE +// MW_LAYER_SYSTEMINCLUDE +APP_LAYER_SYSTEMINCLUDE LIBRARY efsrv.lib LIBRARY apparc.lib diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codui/inc/CodAppUi.h --- a/codhandler/codui/inc/CodAppUi.h Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codui/inc/CodAppUi.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #ifndef COD_APP_UI_H #define COD_APP_UI_H @@ -24,7 +23,7 @@ #include #include #include -#include +#include "CodLoadObserver.h" #include "CodWaitDialog.h" // FORWARD DECLARATIONS diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codui/inc/CodDialog.h --- a/codhandler/codui/inc/CodDialog.h Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codui/inc/CodDialog.h Mon Mar 29 12:27:15 2010 +0100 @@ -23,7 +23,7 @@ #include #include -#include +#include // FORWARD DECLARATION diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codui/inc/CodDownloadImpl.h --- a/codhandler/codui/inc/CodDownloadImpl.h Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codui/inc/CodDownloadImpl.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #ifndef COD_DOWNLOAD_IMPL_H #define COD_DOWNLOAD_IMPL_H @@ -32,8 +31,8 @@ #include #include -#include -#include +#include +#include "CodLoadObserver.h" #include // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codui/src/CodAppUi.cpp --- a/codhandler/codui/src/CodAppUi.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codui/src/CodAppUi.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #include #include #include @@ -31,12 +30,12 @@ #include #include #include -#include -#include -#include -#include -#include -#include +#include "CodEng.h" +#include "CodData.h" +#include "CodError.h" +#include "CodStatus.h" +#include "CodUtil.h" +#include "RoapData.h" #include "CodAppUi.h" #include "CodView.h" #include "CodDocument.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codui/src/CodConfirm.cpp --- a/codhandler/codui/src/CodConfirm.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codui/src/CodConfirm.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,14 +15,13 @@ * */ - // INCLUDE FILES #include #include #include -#include -#include +#include "CodData.h" +#include "CodDefs.h" #include #include #include "CodConfirm.h" @@ -30,17 +29,15 @@ #include #include - #include #include #include -#include +#include _LIT( KListBoxSeparator, "\t" ); // FORWARD DECLARATIONS - // ================= TYPES ======================= /** diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codui/src/CodDocument.cpp --- a/codhandler/codui/src/CodDocument.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codui/src/CodDocument.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,13 +15,12 @@ * */ - // INCLUDE FILES #include -#include -#include -#include +#include "CodEng.h" +#include "DdEng.h" +#include "CodUtil.h" #include "CodDocument.h" #include "CodAppUi.h" #include "RequestCompleteCallback.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codui/src/CodDownloadImpl.cpp --- a/codhandler/codui/src/CodDownloadImpl.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codui/src/CodDownloadImpl.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - // INCLUDE FILES #include @@ -30,18 +29,18 @@ #include #include #include -#include +#include #include #include "CodDownloadImpl.h" #include "CodUiPanic.h" -#include -#include -#include -#include -#include -#include -#include -#include +#include "CodStatus.h" +#include "CodDefs.h" +#include "CodError.h" +#include "CodEng.h" +#include "CodData.h" +#include "RoapData.h" +#include "DdEng.h" +#include "CodUtil.h" #include "CodUiResource.h" #include #include "CodViewDialog.h" @@ -52,7 +51,7 @@ #include #include #include "CodConfirm.h" -#include +#include #ifdef RD_MULTIPLE_DRIVE #include diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codui/src/CodView.cpp --- a/codhandler/codui/src/CodView.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codui/src/CodView.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - // INCLUDE FILES #include @@ -24,8 +23,8 @@ #include #include #include -#include -#include +#include "CodData.h" +#include "CodDefs.h" #include #include #include "CodView.h" @@ -36,7 +35,6 @@ #include "eikon.hrh" - // ================= TYPES ======================= /** diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codui/src/CodViewerApp.cpp --- a/codhandler/codui/src/CodViewerApp.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codui/src/CodViewerApp.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,10 +15,9 @@ * */ - // INCLUDE FILES -#include +#include "CodDefs.h" #include "CodViewerApp.h" #include "CodDocument.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codui/src/DdViewerApp.cpp --- a/codhandler/codui/src/DdViewerApp.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codui/src/DdViewerApp.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,10 +15,9 @@ * */ - // INCLUDE FILES -#include +#include "CodDefs.h" #include "DdViewerApp.h" #include "CodDocument.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codviewer/data/CodViewer.rss --- a/codhandler/codviewer/data/CodViewer.rss Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codviewer/data/CodViewer.rss Mon Mar 29 12:27:15 2010 +0100 @@ -25,7 +25,7 @@ #include #include #include -#include +#include // RESOURCE DEFINITIONS diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codviewer/data/CodViewer_reg.rss --- a/codhandler/codviewer/data/CodViewer_reg.rss Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codviewer/data/CodViewer_reg.rss Mon Mar 29 12:27:15 2010 +0100 @@ -17,10 +17,9 @@ * */ - #include #include -#include +#include "CodDefs.h" #include UID2 KUidAppRegistrationResourceFile diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codviewer/group/CodViewer.mmp --- a/codhandler/codviewer/group/CodViewer.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codviewer/group/CodViewer.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -18,7 +18,7 @@ */ #include #include -#include +#include #include "../../CodEng/inc/CodDefs.h" TARGET CodViewer.exe @@ -33,6 +33,7 @@ SOURCE CodViewer.cpp START RESOURCE ../data/CodViewer.rss +DEPENDS avkon.rsg HEADER TARGETPATH APP_RESOURCE_DIR #ifdef __S60_32__ @@ -42,11 +43,11 @@ #endif END -SYSTEMINCLUDE ../../CodEng/inc -SYSTEMINCLUDE ../../CodUi/inc +USERINCLUDE ../../CodEng/inc +USERINCLUDE ../../CodUi/inc + MW_LAYER_SYSTEMINCLUDE - LIBRARY euser.lib LIBRARY eikcore.lib LIBRARY apparc.lib diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/codviewer/src/CodViewer.cpp --- a/codhandler/codviewer/src/CodViewer.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/codviewer/src/CodViewer.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,11 +15,10 @@ * */ - // INCLUDE FILES #include -#include +#include "CodViewerApp.h" // ================= OTHER FUNCTIONS ============== diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/ddrecog/group/DdRecog.mmp --- a/codhandler/ddrecog/group/DdRecog.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/ddrecog/group/DdRecog.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -18,7 +18,7 @@ */ #include -#include +#include TARGET DdRecog.dll TARGETTYPE PLUGIN @@ -36,10 +36,9 @@ SOURCE DdRecog.cpp USERINCLUDE ../inc +USERINCLUDE ../../CodEng/inc -SYSTEMINCLUDE ../../CodEng/inc MW_LAYER_SYSTEMINCLUDE -MW_LAYER_ECOM_SYSTEMINCLUDE LIBRARY euser.lib LIBRARY efsrv.lib diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/ddrecog/src/10008d55.rss --- a/codhandler/ddrecog/src/10008d55.rss Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/ddrecog/src/10008d55.rss Mon Mar 29 12:27:15 2010 +0100 @@ -20,7 +20,7 @@ // INCLUDES -#include "RegistryInfo.rh" +#include // RESOURCE DEFINITIONS diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/ddrecog/src/DdRecog.cpp --- a/codhandler/ddrecog/src/DdRecog.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/ddrecog/src/DdRecog.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,16 +17,15 @@ * */ - // INCLUDE FILES #include #include #include #include -#include +#include "CodDefs.h" #include -#include +#include #include "DdRecog.h" #include "DdRecogLogger.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/ddviewer/data/DdViewer.rss --- a/codhandler/ddviewer/data/DdViewer.rss Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/ddviewer/data/DdViewer.rss Mon Mar 29 12:27:15 2010 +0100 @@ -25,7 +25,7 @@ #include #include #include -#include +#include // RESOURCE DEFINITIONS diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/ddviewer/data/DdViewer_reg.rss --- a/codhandler/ddviewer/data/DdViewer_reg.rss Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/ddviewer/data/DdViewer_reg.rss Mon Mar 29 12:27:15 2010 +0100 @@ -17,10 +17,9 @@ * */ - #include #include -#include +#include "CodDefs.h" #include UID2 KUidAppRegistrationResourceFile diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/ddviewer/group/DdViewer.mmp --- a/codhandler/ddviewer/group/DdViewer.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/ddviewer/group/DdViewer.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -16,9 +16,10 @@ * * */ + #include #include -#include +#include #include "../../CodEng/inc/CodDefs.h" TARGET DdViewer.exe @@ -33,6 +34,7 @@ SOURCE DdViewer.cpp START RESOURCE ../data/DdViewer.rss +DEPENDS avkon.rsg HEADER TARGETPATH APP_RESOURCE_DIR #ifdef __S60_32__ @@ -42,11 +44,11 @@ #endif END -SYSTEMINCLUDE ../../CodEng/inc -SYSTEMINCLUDE ../../CodUi/inc +USERINCLUDE ../../CodEng/inc +USERINCLUDE ../../CodUi/inc + MW_LAYER_SYSTEMINCLUDE - LIBRARY euser.lib LIBRARY eikcore.lib LIBRARY apparc.lib diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/ddviewer/src/DdViewer.cpp --- a/codhandler/ddviewer/src/DdViewer.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/ddviewer/src/DdViewer.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -19,7 +19,7 @@ // INCLUDE FILES #include -#include +#include "DdViewerApp.h" // ================= OTHER FUNCTIONS ============== diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/group/bld.inf --- a/codhandler/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -19,10 +19,10 @@ #include //#include -#include "../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_EXPORTS -../loc/CodViewer.loc MW_LAYER_LOC_EXPORT_PATH(CodViewer.loc) +../loc/codviewer.loc MW_LAYER_LOC_EXPORT_PATH(codviewer.loc) ../rom/CodHandler.iby CORE_MW_LAYER_IBY_EXPORT_PATH(CodHandler.iby) ../rom/CodHandlerResources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(CodHandlerResources.iby) diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/roapapp/group/RoapApp.mmp --- a/codhandler/roapapp/group/RoapApp.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/roapapp/group/RoapApp.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -19,7 +19,7 @@ #include #include -#include +#include TARGET RoapApp.exe TARGETTYPE exe @@ -41,6 +41,8 @@ SOURCE RoapAppLogger.cpp START RESOURCE ../data/RoapApp.rss +DEPENDS eikon.rsg +DEPENDS avkon.rsg HEADER TARGETPATH APP_RESOURCE_DIR #ifdef __S60_32__ @@ -51,9 +53,9 @@ END USERINCLUDE ../inc -MW_LAYER_SYSTEMINCLUDE - +// MW_LAYER_SYSTEMINCLUDE +APP_LAYER_SYSTEMINCLUDE LIBRARY efsrv.lib LIBRARY apparc.lib @@ -79,8 +81,7 @@ LIBRARY aknskins.lib LIBRARY aknskinsrv.lib LIBRARY DownloadMgr.lib -LIBRARY Centralrepository.lib - +LIBRARY Centralrepository.lib #ifdef __SERIES60_HELP LIBRARY hlplch.lib diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/roapapp/inc/RoapAppLogger.h --- a/codhandler/roapapp/inc/RoapAppLogger.h Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/roapapp/inc/RoapAppLogger.h Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,6 @@ * */ - #ifndef ROAP_APP_LOGGER_H #define ROAP_APP_LOGGER_H diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/roapapp/inc/RoapAppUi.h --- a/codhandler/roapapp/inc/RoapAppUi.h Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/roapapp/inc/RoapAppUi.h Mon Mar 29 12:27:15 2010 +0100 @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include "RoapAppWaitDialog.h" #include diff -r 3dbb0284a087 -r 960a2a4c7f03 codhandler/roapapp/src/RoapAppUi.cpp --- a/codhandler/roapapp/src/RoapAppUi.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/codhandler/roapapp/src/RoapAppUi.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -45,7 +45,7 @@ #include "RoapAppPanic.h" #include "RequestCompleteCallback.h" #include "RoapAppLogger.h" -#include +#include #ifdef __SERIES60_HELP // Context-Sensitve Help File diff -r 3dbb0284a087 -r 960a2a4c7f03 package_definition.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/package_definition.xml Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/aiw_browser_provider_api/group/bld.inf --- a/web_plat/aiw_browser_provider_api/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/aiw_browser_provider_api/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -19,13 +19,13 @@ #include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT PRJ_EXPORTS -../inc/AiwBrowserCommands.hrh MW_LAYER_PLATFORM_EXPORT_PATH(AiwBrowserCommands.hrh) +../inc/AiwBrowserCommands.hrh MW_LAYER_PLATFORM_EXPORT_PATH(aiwbrowsercommands.hrh) PRJ_MMPFILES diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/browser_dialogs_provider_api/group/bld.inf --- a/web_plat/browser_dialogs_provider_api/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/browser_dialogs_provider_api/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -18,15 +18,14 @@ */ #include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS - DEFAULT PRJ_EXPORTS -../inc/BrowserDialogsProviderObserver.h MW_LAYER_PLATFORM_EXPORT_PATH(BrowserDialogsProviderObserver.h) -../inc/BrowserDialogsProvider.h MW_LAYER_PLATFORM_EXPORT_PATH(BrowserDialogsProvider.h) +../inc/browserdialogsproviderobserver.h MW_LAYER_PLATFORM_EXPORT_PATH(browserdialogsproviderobserver.h) +../inc/browserdialogsprovider.h MW_LAYER_PLATFORM_EXPORT_PATH(browserdialogsprovider.h) PRJ_MMPFILES diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/browser_dialogs_provider_api/inc/BrowserDialogsProvider.h --- a/web_plat/browser_dialogs_provider_api/inc/BrowserDialogsProvider.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/browser_dialogs_provider_api/inc/BrowserDialogsProvider.h Mon Mar 29 12:27:15 2010 +0100 @@ -20,7 +20,7 @@ // INCLUDES // System Includes -#include +#include #include #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/browser_platform_api/group/bld.inf --- a/web_plat/browser_platform_api/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/browser_platform_api/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -15,26 +15,26 @@ * */ #include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT PRJ_EXPORTS -../inc/Browser_platform_variant.hrh MW_LAYER_PLATFORM_EXPORT_PATH(Browser_platform_variant.hrh) +../inc/browser_platform_variant.hrh MW_LAYER_PLATFORM_EXPORT_PATH(browser_platform_variant.hrh) #ifdef BRDO_ADDED_EXPORT_LOCATION -../inc/Browser_platform_variant.hrh BRDO_ADDED_EXPORT_LOCATION(Browser_platform_variant.hrh) +../inc/browser_platform_variant.hrh BRDO_ADDED_EXPORT_LOCATION(browser_platform_variant.hrh) #endif #ifdef __PLATFORM_VERSION_50_TUBE__ -../inc/Browser_platform_variant.hrh /epoc32/include/oem/Browser_platform_variant.hrh -../inc/Browser_platform_variant.hrh /epoc32/include/oem/platform/mw/Browser_platform_variant.hrh +../inc/browser_platform_variant.hrh /epoc32/include/oem/browser_platform_variant.hrh +../inc/browser_platform_variant.hrh /epoc32/include/oem/platform/mw/browser_platform_variant.hrh #endif #ifdef __PLATFORM_VERSION_50__ -../inc/Browser_platform_variant.hrh /epoc32/include/oem/Browser_platform_variant.hrh +../inc/browser_platform_variant.hrh /epoc32/include/oem/browser_platform_variant.hrh #endif PRJ_MMPFILES diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/browser_platform_api/inc/Browser_platform_variant.hrh --- a/web_plat/browser_platform_api/inc/Browser_platform_variant.hrh Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/browser_platform_api/inc/Browser_platform_variant.hrh Mon Mar 29 12:27:15 2010 +0100 @@ -151,6 +151,23 @@ // Defines whether SAPI Security Manager Prompt Enhancement is available #define BRDO_SEC_MGR_PROMPT_ENHANCEMENT_FF +// Defines Symbian HTTP stack parameters specific for symbian 9.3 (e.g. EHttpEnableOptimalPipelining, EHttpOptimalPipelining) +//Flag need to be removed after this fix is supplied to Symbian 9.4 +#define BRDO_HTTP_STACK_93 + +// Flag for Multiple Font Support(Times New Roman,Arial and Courier).This feature is available only for TB9.2 +#define BRDO_BROWSER_MULTIPLE_FONT_SUPPORT + +// Flag for Multi touch enable +#define BRDO_MULTITOUCH_ENABLED_FF +//To provide WidgetSIDChecker support +#define APP_SID_CHECK_SUPPORT_FF + +// One Click Connectivity support flag +#define BRDO_OCC_ENABLED_FF + +//Single click flag +#define BRDO_SINGLE_CLICK_ENABLED_FF /* * =================== * S60 3.23 @@ -158,6 +175,21 @@ */ #if defined(__PLATFORM_VERSION_32__) +//OCC support +#undef BRDO_OCC_ENABLED_FF + +//Single click support +#undef BRDO_SINGLE_CLICK_ENABLED_FF + +//To provide WidgetSIDChecker support +#undef APP_SID_CHECK_SUPPORT_FF + +// Flag for Multiple Font Support(Times New Roman,Arial and Courier).This feature is available only for TB9.2 +#undef BRDO_BROWSER_MULTIPLE_FONT_SUPPORT + +// Flag for Multi touch enable +#undef BRDO_MULTITOUCH_ENABLED_FF + // Defines touch screen capability #undef BRDO_TOUCH_ENABLED_FF @@ -186,16 +218,16 @@ // Location, where the middleware layer localization .loc file should be exported #if __GNUC__ >= 3 -#define MW_LAYER_LOC_EXPORT_PATH(exported) MW_LAYER_PUBLIC_EXPORT_PATH(exported) +#define MW_LAYER_LOC_EXPORT_PATH(exported) MW_LAYER_PUBLIC_EXPORT_PATH(oem/exported) #else -#define MW_LAYER_LOC_EXPORT_PATH(exported) MW_LAYER_PUBLIC_EXPORT_PATH(##exported) +#define MW_LAYER_LOC_EXPORT_PATH(exported) MW_LAYER_PUBLIC_EXPORT_PATH(oem/##exported) #endif // Location, where the middleware layer localization .loc file should be exported #if __GNUC__ >= 3 -#define APP_LAYER_LOC_EXPORT_PATH(exported) APP_LAYER_PUBLIC_EXPORT_PATH(exported) +#define APP_LAYER_LOC_EXPORT_PATH(exported) APP_LAYER_PUBLIC_EXPORT_PATH(oem/exported) #else -#define APP_LAYER_LOC_EXPORT_PATH(exported) APP_LAYER_PUBLIC_EXPORT_PATH(##exported) +#define APP_LAYER_LOC_EXPORT_PATH(exported) APP_LAYER_PUBLIC_EXPORT_PATH(oem/##exported) #endif #if __GNUC__ >= 3 @@ -204,23 +236,13 @@ #define BRDO_ADDED_EXPORT_LOCATION(exported) MW_LAYER_DOMAIN_EXPORT_PATH(../platform/mw/##exported) #endif -#define APP_LAYER_LIBC_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(libc) -#define APP_LAYER_ECOM_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(ecom) -#define APP_LAYER_HTTP_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(http) -#define APP_LAYER_CONNECT_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(connect) -#define APP_LAYER_SWI_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(swi) -#define APP_LAYER_OSKERNEL_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(kernel) -#define APP_LAYER_PUSH_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(push) -#define APP_LAYER_STDAPIS_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(stdapis) +#ifndef OS_LAYER_ESTLIB_SYSTEMINCLUDE +#define OS_LAYER_ESTLIB_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(libc) +#endif -#define MW_LAYER_LIBC_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(libc) -#define MW_LAYER_ECOM_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(ecom) -#define MW_LAYER_HTTP_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(http) +#ifndef MW_LAYER_CONNECT_SYSTEMINCLUDE #define MW_LAYER_CONNECT_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(connect) -#define MW_LAYER_SWI_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(swi) -#define MW_LAYER_OSKERNEL_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(kernel) -#define MW_LAYER_PUSH_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(push) -#define MW_LAYER_STDAPIS_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(stdapis) +#endif /* * =================== @@ -229,6 +251,19 @@ */ #elif defined(__PLATFORM_VERSION_50_TUBE__) +//OCC support +#undef BRDO_OCC_ENABLED_FF +//Single click support +#undef BRDO_SINGLE_CLICK_ENABLED_FF + +// Flag for Multi touch enable +#undef BRDO_MULTITOUCH_ENABLED_FF +//To provide WidgetSIDChecker support +#undef APP_SID_CHECK_SUPPORT_FF + +// Flag for Multiple Font Support(Times New Roman,Arial and Courier).This feature is available only for TB9.2 +#undef BRDO_BROWSER_MULTIPLE_FONT_SUPPORT + // Defines must accumulate versions. ie for 5.01 you must define BRDO_BROWSER_50_FF and BRDO_BROWSER_501_FF(To be reviewed) // The assumption is that anything that worked in 3.2 will work in 5.0 and 5.01. For anything doesn't work // in 3.2 but works in 5.0 and above, that code should be behind the BRDO_BROWSER_50_FF flag. @@ -252,24 +287,22 @@ #define BRDO_ADDED_EXPORT_LOCATION(exported) MW_LAYER_DOMAIN_EXPORT_PATH(../../platform/mw/##exported) #endif -#define APP_LAYER_LIBC_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(../libc) -#define APP_LAYER_ECOM_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(../ecom) -#define APP_LAYER_HTTP_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(../http) -#define APP_LAYER_CONNECT_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(../connect) -#define APP_LAYER_SWI_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(../swi) -#define APP_LAYER_OSKERNEL_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(../kernel) -#define APP_LAYER_PUSH_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(../push) -#define APP_LAYER_STDAPIS_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(../stdapis) +#ifndef OS_LAYER_ESTLIB_SYSTEMINCLUDE +#define OS_LAYER_ESTLIB_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(../libc) +#endif -#define MW_LAYER_LIBC_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(../libc) -#define MW_LAYER_ECOM_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(../ecom) -#define MW_LAYER_HTTP_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(../http) -#define MW_LAYER_CONNECT_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(../connect) -#define MW_LAYER_SWI_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(../swi) -#define MW_LAYER_OSKERNEL_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(../kernel) -#define MW_LAYER_PUSH_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(../push) -#define MW_LAYER_STDAPIS_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(../stdapis) +#ifndef OS_LAYER_LIBC_SYSTEMINCLUDE +#define OS_LAYER_LIBC_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(../stdapis) \ + OS_LAYER_PUBLIC_EXPORT_PATH(stdapis) +#endif +#ifndef MW_LAYER_CONNECT_SYSTEMINCLUDE +#define MW_LAYER_CONNECT_SYSTEMINCLUDE SYSTEMINCLUDE /epoc32/include/connect +#endif + +// Defines Symbian HTTP stack parameters specific for symbian 9.3 (e.g. EHttpEnableOptimalPipelining, EHttpOptimalPipelining) +//Flag need to be removed after this fix is supplied to Symbian 9.4 +#undef BRDO_HTTP_STACK_93 /* * =================== * S60 5.0 PF5250+ / Ivalo / Saga @@ -277,6 +310,20 @@ */ #elif defined(__PLATFORM_VERSION_50__) +//OCC support +#undef BRDO_OCC_ENABLED_FF +//Single click support +#undef BRDO_SINGLE_CLICK_ENABLED_FF + +// Flag for Multi touch enable +#undef BRDO_MULTITOUCH_ENABLED_FF + +//To provide WidgetSIDChecker support +#undef APP_SID_CHECK_SUPPORT_FF + +// Flag for Multiple Font Support(Times New Roman,Arial and Courier).This feature is available only for TB9.2 +#undef BRDO_BROWSER_MULTIPLE_FONT_SUPPORT + // Defines must accumulate versions. ie for 5.01 you must define BRDO_BROWSER_50_FF and BRDO_BROWSER_501_FF(To be reviewed) // The assumption is that anything that worked in 3.2 will work in 5.0 and 5.01. For anything doesn't work // in 3.2 but works in 5.0 and above, that code should be behind the BRDO_BROWSER_50_FF flag. @@ -288,24 +335,17 @@ #define BRDO_ADDED_EXPORT_LOCATION(exported) MW_LAYER_DOMAIN_EXPORT_PATH(../../platform/mw/##exported) #endif -#define APP_LAYER_LIBC_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(../libc) -#define APP_LAYER_ECOM_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(../ecom) -#define APP_LAYER_HTTP_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(../http) -#define APP_LAYER_CONNECT_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(../connect) -#define APP_LAYER_SWI_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(../swi) -#define APP_LAYER_OSKERNEL_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(../kernel) -#define APP_LAYER_PUSH_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(../push) -#define APP_LAYER_STDAPIS_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(../stdapis) +#ifndef OS_LAYER_ESTLIB_SYSTEMINCLUDE +#define OS_LAYER_ESTLIB_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(../libc) +#endif -#define MW_LAYER_LIBC_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(../libc) -#define MW_LAYER_ECOM_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(../ecom) -#define MW_LAYER_HTTP_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(../http) -#define MW_LAYER_CONNECT_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(../connect) -#define MW_LAYER_SWI_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(../swi) -#define MW_LAYER_OSKERNEL_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(../kernel) -#define MW_LAYER_PUSH_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(../push) -#define MW_LAYER_STDAPIS_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(../stdapis) +#ifndef MW_LAYER_CONNECT_SYSTEMINCLUDE +#define MW_LAYER_CONNECT_SYSTEMINCLUDE SYSTEMINCLUDE /epoc32/include/connect +#endif +// Defines Symbian HTTP stack parameters specific for symbian 9.3 (e.g. EHttpEnableOptimalPipelining, EHttpOptimalPipelining) +//Flag need to be removed after this fix is supplied to Symbian 9.4 +#undef BRDO_HTTP_STACK_93 /* * =================== * S60 5.1 @@ -313,40 +353,51 @@ */ #elif defined(__PLATFORM_VERSION_51__) +//OCC support +#undef BRDO_OCC_ENABLED_FF +//Single click support +#undef BRDO_SINGLE_CLICK_ENABLED_FF + +// Flag for Multi touch enable +#undef BRDO_MULTITOUCH_ENABLED_FF + +//To provide WidgetSIDChecker support +#undef APP_SID_CHECK_SUPPORT_FF + +// Flag for Multiple Font Support(Times New Roman,Arial and Courier).This feature is available only for TB9.2 +#undef BRDO_BROWSER_MULTIPLE_FONT_SUPPORT + // Defines whether SAPI Security Manager Prompt Enhancement is available #undef BRDO_SEC_MGR_PROMPT_ENHANCEMENT_FF #define BRDO_BROWSER_50_FF #define BRDO_BROWSER_51_FF -#define APP_LAYER_LIBC_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(libc) -#define APP_LAYER_ECOM_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(ecom) -#define APP_LAYER_HTTP_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(http) -#define APP_LAYER_CONNECT_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(connect) -#define APP_LAYER_SWI_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(swi) -#define APP_LAYER_OSKERNEL_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(kernel) -#define APP_LAYER_PUSH_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(push) -#define APP_LAYER_STDAPIS_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(stdapis) +#ifndef OS_LAYER_ESTLIB_SYSTEMINCLUDE +#define OS_LAYER_ESTLIB_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(libc) +#endif -#define MW_LAYER_LIBC_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(libc) -#define MW_LAYER_ECOM_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(ecom) -#define MW_LAYER_HTTP_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(http) -#define MW_LAYER_CONNECT_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(connect) -#define MW_LAYER_SWI_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(swi) -#define MW_LAYER_OSKERNEL_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(kernel) -#define MW_LAYER_PUSH_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(push) -#define MW_LAYER_STDAPIS_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(stdapis) - +// Defines Symbian HTTP stack parameters specific for symbian 9.3 (e.g. EHttpEnableOptimalPipelining, EHttpOptimalPipelining) +//Flag need to be removed after this fix is supplied to Symbian 9.4 +#undef BRDO_HTTP_STACK_93 /* * =================== * S60 5.2 * =================== */ +//Flag provieded to not fix the problem for Multiple heap created for in application startup +#undef BRDO_STATIC_DATA_CLEANUP_SUPPORT_FF #elif defined(__PLATFORM_VERSION_52__) // Defines whether SAPI Security Manager Prompt Enhancement is available #undef BRDO_SEC_MGR_PROMPT_ENHANCEMENT_FF +//Defines One Click Connectivity support +#define BRDO_OCC_ENABLED_FF + +//Single click support +#define BRDO_SINGLE_CLICK_ENABLED_FF + #define BRDO_BROWSER_50_FF #define BRDO_BROWSER_51_FF #define BRDO_BROWSER_52_FF @@ -355,27 +406,23 @@ // un-comment this line for week21 release #undef BRDO_MULTIPART_PARSER_FF -#define APP_LAYER_LIBC_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(libc) -#define APP_LAYER_ECOM_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(ecom) -#define APP_LAYER_HTTP_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(http) -#define APP_LAYER_CONNECT_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(connect) -#define APP_LAYER_SWI_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(swi) -#define APP_LAYER_OSKERNEL_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(kernel) -#define APP_LAYER_PUSH_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(push) -#define APP_LAYER_STDAPIS_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(stdapis) +// Defines Symbian HTTP stack parameters specific for symbian 9.3 (e.g. EHttpEnableOptimalPipelining, EHttpOptimalPipelining) +//Flag need to be removed after this fix is supplied to Symbian 9.4 +#undef BRDO_HTTP_STACK_93 -#define MW_LAYER_LIBC_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(libc) -#define MW_LAYER_ECOM_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(ecom) -#define MW_LAYER_HTTP_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(http) -#define MW_LAYER_CONNECT_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(connect) -#define MW_LAYER_SWI_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(swi) -#define MW_LAYER_OSKERNEL_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(kernel) -#define MW_LAYER_PUSH_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(push) -#define MW_LAYER_STDAPIS_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(stdapis) +#ifndef OS_LAYER_ESTLIB_SYSTEMINCLUDE +#define OS_LAYER_ESTLIB_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(libc) +#endif // Platform contains new Symbian Libxml implementation #define BRDO_SYMBIAN_LIBXML_FF +// Static data initializtion on start up in E32Main() +#define BRDO_STATIC_DATA_CLEANUP_SUPPORT_FF + +//To provide WidgetSIDChecker support +#define APP_SID_CHECK_SUPPORT_FF + #endif // PLATFORM VERSION ID's // Generic run-time definitions -- see WmlBrowserBuild.h for similar feature related definitions @@ -388,5 +435,4 @@ #define BRDO_BROWSER_UPDATE_UI_FF 0 #endif // KFeatureIdIAUpdate - #endif // BROWSER_PLATFORM_VARIANT_HRH diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/cod_handler_api/group/bld.inf --- a/web_plat/cod_handler_api/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/cod_handler_api/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -16,14 +16,14 @@ */ #include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT PRJ_EXPORTS -../inc/CodDownload.h MW_LAYER_PLATFORM_EXPORT_PATH(CodDownload.h) -../inc/HttpDownloadData.h MW_LAYER_PLATFORM_EXPORT_PATH(HttpDownloadData.h) +../inc/coddownload.h MW_LAYER_PLATFORM_EXPORT_PATH(coddownload.h) +../inc/httpdownloaddata.h MW_LAYER_PLATFORM_EXPORT_PATH(httpdownloaddata.h) PRJ_MMPFILES diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/cod_handler_api/inc/HttpDownloadData.h --- a/web_plat/cod_handler_api/inc/HttpDownloadData.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/cod_handler_api/inc/HttpDownloadData.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,6 @@ * */ - - #ifndef HTTPDOWNLOADDATA_H #define HTTPDOWNLOADDATA_H @@ -224,9 +222,9 @@ /** * Get Destination Removable. - * @return iDesRemovable. + * @return iDesRemovableStatus. */ - inline TBool DesRemovable() const { return iDesRemovable; } + inline TBool DesRemovable() const { return ( KDriveAttRemovable == iDesRemovableStatus ) ? ETrue : EFalse ; } /** * Get Last Error Id. @@ -388,7 +386,7 @@ * Set destination removable attribute. * @param aDesRemovable Whether removable media drive. */ - virtual void SetDesRemovable( TBool aDesRemovable ) = 0; + virtual void SetDesRemovable( TInt32 aDesRemovable ) = 0; /** * Set last error id attribute. @@ -430,7 +428,7 @@ TBool iRedirected; ///< Is Redirected? HBufC* iDestFilename; ///< Media Destination Filename. TInt iDownloadedSize; /// -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT PRJ_EXPORTS - -../inc/InternetConnectionManager.h MW_LAYER_PLATFORM_EXPORT_PATH(InternetConnectionManager.h) -../inc/MConnection.h MW_LAYER_PLATFORM_EXPORT_PATH(MConnection.h) -../inc/ConnectionObservers.h MW_LAYER_PLATFORM_EXPORT_PATH(ConnectionObservers.h) -../inc/IdPair.h MW_LAYER_PLATFORM_EXPORT_PATH(IdPair.h) -../inc/ApChangeObserver.h MW_LAYER_PLATFORM_EXPORT_PATH(ApChangeObserver.h) +../inc/internetconnectionmanager.h MW_LAYER_PLATFORM_EXPORT_PATH(internetconnectionmanager.h) +../inc/mconnection.h MW_LAYER_PLATFORM_EXPORT_PATH(mconnection.h) +../inc/connectionobservers.h MW_LAYER_PLATFORM_EXPORT_PATH(connectionobservers.h) +../inc/idpair.h MW_LAYER_PLATFORM_EXPORT_PATH(idpair.h) +../inc/apchangeobserver.h MW_LAYER_PLATFORM_EXPORT_PATH(apchangeobserver.h) PRJ_MMPFILES diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/connection_manager_api/inc/InternetConnectionManager.h --- a/web_plat/connection_manager_api/inc/InternetConnectionManager.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/connection_manager_api/inc/InternetConnectionManager.h Mon Mar 29 12:27:15 2010 +0100 @@ -244,6 +244,12 @@ * @return none. */ IMPORT_C void ShowConnectionChangedDlg(); + + /** + * Cancels the connection. + * @return none. + */ + virtual void CancelConnection(); public: @@ -396,7 +402,7 @@ /** *Utility functions that are used to establish a connection with a snap Id */ - TInt ConnectWithSnapId(TUint32 aRequestedSnapId); + TInt ConnectWithSnapIdL(TUint32 aRequestedSnapId); TInt ConnectSnapWithoutCheckL(TUint32 aRequestedSnapId); diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/cxml_library_api/group/bld.inf --- a/web_plat/cxml_library_api/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/cxml_library_api/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,7 @@ * */ #include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT @@ -23,7 +23,7 @@ PRJ_EXPORTS // All in one header file for clients. -../inc/nw_cXML_Parser.h MW_LAYER_PLATFORM_EXPORT_PATH(nw_cXML_Parser.h) +../inc/nw_cxml_parser.h MW_LAYER_PLATFORM_EXPORT_PATH(nw_cxml_parser.h) // Individual header files for cXML Parser ../inc/cxml_proj.h MW_LAYER_PLATFORM_EXPORT_PATH(cxml_proj.h) diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/cxml_library_api/inc/cxml_file_if.h --- a/web_plat/cxml_library_api/inc/cxml_file_if.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/cxml_library_api/inc/cxml_file_if.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,12 +15,10 @@ * */ - - #ifndef _CXML_FILE_IF_H_ #define _CXML_FILE_IF_H_ -#include "cxml_proj.h" +#include #ifdef __cplusplus extern "C" { diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/cxml_library_api/inc/cxml_nw2cxmlTypes.h --- a/web_plat/cxml_library_api/inc/cxml_nw2cxmlTypes.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/cxml_library_api/inc/cxml_nw2cxmlTypes.h Mon Mar 29 12:27:15 2010 +0100 @@ -19,7 +19,7 @@ #ifndef CXML_NW2CXMLTYPES_H #define CXML_NW2CXMLTYPES_H -#include "cxml_type_def.h" +#include #ifdef __cplusplus extern "C" diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/cxml_library_api/inc/cxml_proj.h --- a/web_plat/cxml_library_api/inc/cxml_proj.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/cxml_library_api/inc/cxml_proj.h Mon Mar 29 12:27:15 2010 +0100 @@ -27,16 +27,14 @@ #ifndef CXML_PROJ_H #define CXML_PROJ_H - - #ifndef NOKIA_MOBILE_BROWSER -#include "cxml_nw2cxmlTypes.h" +#include #endif #include -#include "cxml_type_def.h" +#include #ifdef __cplusplus extern "C" diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/cxml_library_api/inc/cxml_str.h --- a/web_plat/cxml_library_api/inc/cxml_str.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/cxml_library_api/inc/cxml_str.h Mon Mar 29 12:27:15 2010 +0100 @@ -31,7 +31,7 @@ /* ** Includes */ -#include "cxml_type_def.h" +#include CXML_Ucs2 CXML_Str_ToLower(const CXML_Ucs2 ch); CXML_Ucs2 CXML_Str_ToUpper(const CXML_Ucs2 ch); diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/cxml_library_api/inc/nw_cXML_Parser.h --- a/web_plat/cxml_library_api/inc/nw_cXML_Parser.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/cxml_library_api/inc/nw_cXML_Parser.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,6 @@ * */ - - #ifndef NW_CXML_PARSER_H #define NW_CXML_PARSER_H @@ -24,7 +22,6 @@ // This header file includes all public API headers for the cXML Parser. - #include #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/cxml_library_api/inc/nw_dom.h --- a/web_plat/cxml_library_api/inc/nw_dom.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/cxml_library_api/inc/nw_dom.h Mon Mar 29 12:27:15 2010 +0100 @@ -19,8 +19,8 @@ #ifndef NW_DOM_H #define NW_DOM_H -#include "cxml_proj.h" -#include "nw_wbxml_parse.h" +#include +#include #ifdef __cplusplus extern "C" { diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/cxml_library_api/inc/nw_dom_attribute.h --- a/web_plat/cxml_library_api/inc/nw_dom_attribute.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/cxml_library_api/inc/nw_dom_attribute.h Mon Mar 29 12:27:15 2010 +0100 @@ -27,15 +27,14 @@ #ifndef NW_DOM_ATTRIBUTE_H #define NW_DOM_ATTRIBUTE_H -#include "cxml_proj.h" -#include "nw_dom_node.h" -#include "nw_tinytree.h" +#include +#include +#include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ - /** ----------------------------------------------------------------------- ** @struct: NW_DOM_AttributeListIterator diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/cxml_library_api/inc/nw_dom_document.h --- a/web_plat/cxml_library_api/inc/nw_dom_document.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/cxml_library_api/inc/nw_dom_document.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - /** ----------------------------------------------------------------------- ** @package: NW_DOM @@ -27,11 +26,11 @@ #ifndef NW_DOM_DOCUMENT_H #define NW_DOM_DOCUMENT_H -#include "cxml_proj.h" -#include "nw_dom_node.h" -#include "nw_dom_text.h" -#include "nw_dom_element.h" -#include "nw_wbxml_dictionary.h" +#include +#include +#include +#include +#include #ifdef __cplusplus extern "C" { diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/cxml_library_api/inc/nw_dom_element.h --- a/web_plat/cxml_library_api/inc/nw_dom_element.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/cxml_library_api/inc/nw_dom_element.h Mon Mar 29 12:27:15 2010 +0100 @@ -27,8 +27,8 @@ #ifndef NW_DOM_ELEMENT_H #define NW_DOM_ELEMENT_H -#include "nw_dom_node.h" -#include "nw_dom_attribute.h" +#include +#include #ifdef __cplusplus extern "C" { diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/cxml_library_api/inc/nw_dom_node.h --- a/web_plat/cxml_library_api/inc/nw_dom_node.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/cxml_library_api/inc/nw_dom_node.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - /** ----------------------------------------------------------------------- ** @package: NW_DOM @@ -27,9 +26,9 @@ #ifndef NW_DOM_NODE_H #define NW_DOM_NODE_H -#include "nw_tinytree.h" -#include "nw_tinydom.h" -#include "nw_string_string.h" +#include +#include +#include #ifdef __cplusplus extern "C" { diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/cxml_library_api/inc/nw_dom_text.h --- a/web_plat/cxml_library_api/inc/nw_dom_text.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/cxml_library_api/inc/nw_dom_text.h Mon Mar 29 12:27:15 2010 +0100 @@ -27,14 +27,13 @@ #ifndef NW_DOM_TEXT_H #define NW_DOM_TEXT_H -#include "cxml_proj.h" -#include "nw_dom_node.h" +#include +#include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ - /** ----------------------------------------------------------------------- ** @typedef: NW_DOM_TextItemIterator diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/cxml_library_api/inc/nw_encoder_domencoder.h --- a/web_plat/cxml_library_api/inc/nw_encoder_domencoder.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/cxml_library_api/inc/nw_encoder_domencoder.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - /** ----------------------------------------------------------------------- ** @package: NW_Encoder @@ -27,19 +26,18 @@ #ifndef _NW_ENCODER_WRITER_HEADER_GUARD_ #define _NW_ENCODER_WRITER_HEADER_GUARD_ -#include "nw_encoder_stringtable.h" -#include "nw_encoder_wbxmlwriter.h" -#include "nw_dom_attribute.h" -#include "nw_dom_element.h" -#include "nw_dom_text.h" -#include "nw_dom_document.h" +#include +#include +#include +#include +#include +#include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ - #define MEMORY_INCREMENT 100 /** ----------------------------------------------------------------------- ** diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/cxml_library_api/inc/nw_encoder_stringtable.h --- a/web_plat/cxml_library_api/inc/nw_encoder_stringtable.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/cxml_library_api/inc/nw_encoder_stringtable.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - /** ----------------------------------------------------------------------- ** @package: NW_Encoder @@ -28,9 +27,9 @@ #ifndef _NW_ENCODER_STRING_TABLE_HEADER_GUARD_ #define _NW_ENCODER_STRING_TABLE_HEADER_GUARD_ -#include "nw_string_string.h" -#include "nw_tinytree.h" -#include "nw_wbxml_dictionary.h" +#include +#include +#include #ifdef __cplusplus extern "C" @@ -51,7 +50,6 @@ ** ----------------------------------------------------------------------- **/ typedef NW_TinyTree_Node_t NW_DOM_DocumentNode_t; - /* * StringItem methods */ diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/cxml_library_api/inc/nw_encoder_wbxmlwriter.h --- a/web_plat/cxml_library_api/inc/nw_encoder_wbxmlwriter.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/cxml_library_api/inc/nw_encoder_wbxmlwriter.h Mon Mar 29 12:27:15 2010 +0100 @@ -28,7 +28,7 @@ #ifndef NW_WBXMLWRITER_H #define NW_WBXMLWRITER_H -#include "nw_wbxml_dictionary.h" +#include #ifdef __cplusplus extern "C" { diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/cxml_library_api/inc/nw_string_char.h --- a/web_plat/cxml_library_api/inc/nw_string_char.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/cxml_library_api/inc/nw_string_char.h Mon Mar 29 12:27:15 2010 +0100 @@ -29,7 +29,7 @@ #ifndef NW_STRING_CHARACTER_H #define NW_STRING_CHARACTER_H -#include "cxml_proj.h" +#include #ifdef __cplusplus extern "C" { diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/cxml_library_api/inc/nw_string_string.h --- a/web_plat/cxml_library_api/inc/nw_string_string.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/cxml_library_api/inc/nw_string_string.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - /** ----------------------------------------------------------------------- ** @package: NW_String @@ -28,15 +27,14 @@ #ifndef NW_STRING_STRING_H #define NW_STRING_STRING_H -#include "cxml_proj.h" -#include "nw_string_char.h" +#include +#include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ - /** ----------------------------------------------------------------------- ** @struct: NW_String_String diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/cxml_library_api/inc/nw_tinydom.h --- a/web_plat/cxml_library_api/inc/nw_tinydom.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/cxml_library_api/inc/nw_tinydom.h Mon Mar 29 12:27:15 2010 +0100 @@ -28,26 +28,22 @@ #ifndef NW_TINY_DOM_H #define NW_TINY_DOM_H -#include "cxml_proj.h" -#include "nw_tinytree.h" -#include "nw_wbxml_document.h" -#include "nw_wbxml_parse.h" -#include "nw_wbxml_opaque.h" -#include "nw_encoder_wbxmlwriter.h" +#include +#include +#include +#include +#include +#include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ - - - enum NW_TinyDom_ExtensionType_e { NW_TINYDOM_EXTENSION_TYPE_NORMAL, NW_TINYDOM_EXTENSION_TYPE_EXT_T_INTEGER }; - /** ----------------------------------------------------------------------- ** @struct: NW_TinyDom_Extension diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/cxml_library_api/inc/nw_tinydom_utils.h --- a/web_plat/cxml_library_api/inc/nw_tinydom_utils.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/cxml_library_api/inc/nw_tinydom_utils.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - /** ----------------------------------------------------------------------- ** @package: NW_TinyDom @@ -28,10 +27,10 @@ #ifndef TINY_DOM_UTILS_H #define TINY_DOM_UTILS_H -#include "nw_wbxml_parse.h" -#include "nw_tinydom.h" -#include "nw_encoder_wbxmlwriter.h" -#include "nw_dom_document.h" +#include +#include +#include +#include #ifdef __cplusplus extern "C" diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/cxml_library_api/inc/nw_tinytree.h --- a/web_plat/cxml_library_api/inc/nw_tinytree.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/cxml_library_api/inc/nw_tinytree.h Mon Mar 29 12:27:15 2010 +0100 @@ -29,15 +29,14 @@ #ifndef NW_TINY_TREE_H #define NW_TINY_TREE_H -#include "cxml_proj.h" -#include "nw_tinytree_treevector.h" -#include "nw_tinytree_ebuffer.h" +#include +#include +#include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ - /* ----------------------------------------------------------------------- ** Tiny tree definitions ** ----------------------------------------------------------------------- **/ diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/cxml_library_api/inc/nw_tinytree_ebuffer.h --- a/web_plat/cxml_library_api/inc/nw_tinytree_ebuffer.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/cxml_library_api/inc/nw_tinytree_ebuffer.h Mon Mar 29 12:27:15 2010 +0100 @@ -28,7 +28,7 @@ #ifndef NW_TINYTREE_EBUFFER_H #define NW_TINYTREE_EBUFFER_H -#include "cxml_proj.h" +#include #ifdef __cplusplus extern "C" { diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/cxml_library_api/inc/nw_tinytree_treevector.h --- a/web_plat/cxml_library_api/inc/nw_tinytree_treevector.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/cxml_library_api/inc/nw_tinytree_treevector.h Mon Mar 29 12:27:15 2010 +0100 @@ -28,14 +28,12 @@ #ifndef NW_TINYTREE_TREEVECTOR_H #define NW_TINYTREE_TREEVECTOR_H -#include "cxml_proj.h" - +#include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ - typedef struct NW_TinyTree_TinyTree_s NW_TinyTree_t; /** ----------------------------------------------------------------------- ** diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/cxml_library_api/inc/nw_wbxml_dictionary.h --- a/web_plat/cxml_library_api/inc/nw_wbxml_dictionary.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/cxml_library_api/inc/nw_wbxml_dictionary.h Mon Mar 29 12:27:15 2010 +0100 @@ -28,8 +28,8 @@ #ifndef NW_PARSER_WBXML_DICTIONARY_H #define NW_PARSER_WBXML_DICTIONARY_H -#include "cxml_proj.h" -#include "nw_string_string.h" +#include +#include #ifdef __cplusplus extern "C" diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/cxml_library_api/inc/nw_wbxml_document.h --- a/web_plat/cxml_library_api/inc/nw_wbxml_document.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/cxml_library_api/inc/nw_wbxml_document.h Mon Mar 29 12:27:15 2010 +0100 @@ -28,9 +28,9 @@ #ifndef NW_PARSER_WBXML_DOCUMENT_H #define NW_PARSER_WBXML_DOCUMENT_H -#include "cxml_proj.h" -#include "nw_string_string.h" -#include "nw_encoder_stringtable.h" +#include +#include +#include #ifdef __cplusplus extern "C" { diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/cxml_library_api/inc/nw_wbxml_event.h --- a/web_plat/cxml_library_api/inc/nw_wbxml_event.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/cxml_library_api/inc/nw_wbxml_event.h Mon Mar 29 12:27:15 2010 +0100 @@ -28,8 +28,8 @@ #ifndef NW_PARSER_WBXML_EVENT_H #define NW_PARSER_WBXML_EVENT_H -#include "nw_wbxml_document.h" -#include "cxml_proj.h" +#include +#include #ifdef __cplusplus extern "C" { diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/cxml_library_api/inc/nw_wbxml_opaque.h --- a/web_plat/cxml_library_api/inc/nw_wbxml_opaque.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/cxml_library_api/inc/nw_wbxml_opaque.h Mon Mar 29 12:27:15 2010 +0100 @@ -28,7 +28,7 @@ #ifndef NW_PARSER_WBXML_OPAQUE_H #define NW_PARSER_WBXML_OPAQUE_H -#include "cxml_proj.h" +#include #ifdef __cplusplus extern "C" { diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/cxml_library_api/inc/nw_wbxml_parse.h --- a/web_plat/cxml_library_api/inc/nw_wbxml_parse.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/cxml_library_api/inc/nw_wbxml_parse.h Mon Mar 29 12:27:15 2010 +0100 @@ -28,15 +28,14 @@ #ifndef NW_PARSER_WBXML_PARSE_H #define NW_PARSER_WBXML_PARSE_H -#include "cxml_proj.h" -#include "nw_wbxml_token.h" -#include "nw_wbxml_event.h" +#include +#include +#include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ - /** ----------------------------------------------------------------------- ** @struct: NW_WBXML_CP_Registry_Entry diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/cxml_library_api/inc/nw_wbxml_reader.h --- a/web_plat/cxml_library_api/inc/nw_wbxml_reader.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/cxml_library_api/inc/nw_wbxml_reader.h Mon Mar 29 12:27:15 2010 +0100 @@ -32,16 +32,15 @@ #ifndef NW_PARSER_WBXML_READER_H #define NW_PARSER_WBXML_READER_H -#include "cxml_proj.h" -#include "nw_wbxml_document.h" -#include "nw_wbxml_opaque.h" -#include "nw_wbxml_parse.h" +#include +#include +#include +#include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ - /* The "parser-reader" interface */ /** ----------------------------------------------------------------------- ** diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/cxml_library_api/inc/nw_wbxml_token.h --- a/web_plat/cxml_library_api/inc/nw_wbxml_token.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/cxml_library_api/inc/nw_wbxml_token.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - /** ----------------------------------------------------------------------- ** @package: NW_WBXML @@ -28,15 +27,14 @@ #ifndef NW_PARSER_WBXML_TOKEN_H #define NW_PARSER_WBXML_TOKEN_H -#include "cxml_proj.h" -#include "nw_string_string.h" +#include +#include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ - /* * WBXML global tokens, section 7 */ diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/cxml_library_api/inc/nw_xmlp_xmlp2wbxml.h --- a/web_plat/cxml_library_api/inc/nw_xmlp_xmlp2wbxml.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/cxml_library_api/inc/nw_xmlp_xmlp2wbxml.h Mon Mar 29 12:27:15 2010 +0100 @@ -28,7 +28,7 @@ #ifndef NW_XMLP2WBXML_H #define NW_XMLP2WBXML_H -#include "nw_xmlp_xmlreader.h" +#include #ifdef __cplusplus extern "C" { diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/cxml_library_api/inc/nw_xmlp_xmlparser.h --- a/web_plat/cxml_library_api/inc/nw_xmlp_xmlparser.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/cxml_library_api/inc/nw_xmlp_xmlparser.h Mon Mar 29 12:27:15 2010 +0100 @@ -28,7 +28,7 @@ #ifndef NW_XMLPARSER_H #define NW_XMLPARSER_H -#include "nw_xmlp_xmlreader.h" +#include #ifdef __cplusplus extern "C" { diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/cxml_library_api/inc/nw_xmlp_xmlreader.h --- a/web_plat/cxml_library_api/inc/nw_xmlp_xmlreader.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/cxml_library_api/inc/nw_xmlp_xmlreader.h Mon Mar 29 12:27:15 2010 +0100 @@ -28,7 +28,7 @@ #ifndef NW_XML_READER_H #define NW_XML_READER_H -#include "cxml_proj.h" +#include /** ----------------------------------------------------------------------- ** @enum: NW_XML_Endianness diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/cxml_library_api/inc/nwx_status.h --- a/web_plat/cxml_library_api/inc/nwx_status.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/cxml_library_api/inc/nwx_status.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - /*************************************************************************** ** File: nwx_status.h ** Purpose: Contains definitions of status values common throughout diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/download_mgr_client_api_extn/group/bld.inf --- a/web_plat/download_mgr_client_api_extn/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/download_mgr_client_api_extn/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -15,12 +15,12 @@ * */ #include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT PRJ_EXPORTS -../inc/DownloadMgrClientApiExt.h MW_LAYER_PLATFORM_EXPORT_PATH(DownloadMgrClientApiExt.h) +../inc/downloadmgrclientapiext.h MW_LAYER_PLATFORM_EXPORT_PATH(downloadmgrclientapiext.h) PRJ_MMPFILES diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/download_mgr_client_api_extn/inc/DownloadMgrClientApiExt.h --- a/web_plat/download_mgr_client_api_extn/inc/DownloadMgrClientApiExt.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/download_mgr_client_api_extn/inc/DownloadMgrClientApiExt.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,14 +15,10 @@ * */ - - #ifndef __RHTTPDOWNLOADMGRAPIEXT_H__ #define __RHTTPDOWNLOADMGRAPIEXT_H__ - -#include "DownloadMgrClient.h" - +#include /** * API Extensions for RHttpDownloadMgr diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/feeds_engine_api/group/bld.inf --- a/web_plat/feeds_engine_api/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/feeds_engine_api/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -14,30 +14,30 @@ * Description: Build information for the Feeds Server Api * */ + #include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT PRJ_EXPORTS - -../inc/FeedsServerClient.h MW_LAYER_PLATFORM_EXPORT_PATH(FeedsServerClient.h) -../inc/FeedsServerFeed.h MW_LAYER_PLATFORM_EXPORT_PATH(FeedsServerFeed.h) -../inc/FeedsServerFolderItem.h MW_LAYER_PLATFORM_EXPORT_PATH(FeedsServerFolderItem.h) +../inc/feedsserverclient.h MW_LAYER_PLATFORM_EXPORT_PATH(feedsserverclient.h) +../inc/feedsserverfeed.h MW_LAYER_PLATFORM_EXPORT_PATH(feedsserverfeed.h) +../inc/feedsserverfolderitem.h MW_LAYER_PLATFORM_EXPORT_PATH(feedsserverfolderitem.h) -../inc/FeedsServerMsg.h MW_LAYER_PLATFORM_EXPORT_PATH(FeedsServerMsg.h) -../inc/Transaction.h MW_LAYER_PLATFORM_EXPORT_PATH(Transaction.h) -../inc/FeedsEntity.h MW_LAYER_PLATFORM_EXPORT_PATH(FeedsEntity.h) -../inc/FeedsMap.h MW_LAYER_PLATFORM_EXPORT_PATH(FeedsMap.h) -../inc/FeedsInterface.h MW_LAYER_PLATFORM_EXPORT_PATH(FeedsInterface.h) -../inc/FeedAttributes.h MW_LAYER_PLATFORM_EXPORT_PATH(FeedAttributes.h) -../inc/FolderAttributes.h MW_LAYER_PLATFORM_EXPORT_PATH(FolderAttributes.h) +../inc/feedsservermsg.h MW_LAYER_PLATFORM_EXPORT_PATH(feedsservermsg.h) +../inc/transaction.h MW_LAYER_PLATFORM_EXPORT_PATH(transaction.h) +../inc/feedsentity.h MW_LAYER_PLATFORM_EXPORT_PATH(feedsentity.h) +../inc/feedsmap.h MW_LAYER_PLATFORM_EXPORT_PATH(feedsmap.h) +../inc/feedsinterface.h MW_LAYER_PLATFORM_EXPORT_PATH(feedsinterface.h) +../inc/feedattributes.h MW_LAYER_PLATFORM_EXPORT_PATH(feedattributes.h) +../inc/folderattributes.h MW_LAYER_PLATFORM_EXPORT_PATH(folderattributes.h) -../inc/FeedsServerRequestHandler.h MW_LAYER_PLATFORM_EXPORT_PATH(FeedsServerRequestHandler.h) -../inc/FeedsServerSettings.h MW_LAYER_PLATFORM_EXPORT_PATH(FeedsServerSettings.h) -../inc/ConnectionObserver.h MW_LAYER_PLATFORM_EXPORT_PATH(ConnectionObserver.h) -../inc/LeakTracker.h MW_LAYER_PLATFORM_EXPORT_PATH(LeakTracker.h) -../inc/XmlEncoding.h MW_LAYER_PLATFORM_EXPORT_PATH(XmlEncoding.h) +../inc/feedsserverrequesthandler.h MW_LAYER_PLATFORM_EXPORT_PATH(feedsserverrequesthandler.h) +../inc/feedsserversettings.h MW_LAYER_PLATFORM_EXPORT_PATH(feedsserversettings.h) +../inc/connectionobserver.h MW_LAYER_PLATFORM_EXPORT_PATH(connectionobserver.h) +../inc/leaktracker.h MW_LAYER_PLATFORM_EXPORT_PATH(leaktracker.h) +../inc/xmlencoding.h MW_LAYER_PLATFORM_EXPORT_PATH(xmlencoding.h) PRJ_MMPFILES diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/feeds_engine_api/inc/FeedsEntity.h --- a/web_plat/feeds_engine_api/inc/FeedsEntity.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/feeds_engine_api/inc/FeedsEntity.h Mon Mar 29 12:27:15 2010 +0100 @@ -96,7 +96,7 @@ /** * Two-phased constructor. */ - CFeedsEntity* CFeedsEntity::NewMiniItemL(); + CFeedsEntity* NewMiniItemL(); /** diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/feeds_engine_api/inc/FeedsInterface.h --- a/web_plat/feeds_engine_api/inc/FeedsInterface.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/feeds_engine_api/inc/FeedsInterface.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #ifndef FEED_INTERFACE_H #define FEED_INTERFACE_H @@ -23,10 +22,11 @@ #include #include #include -//#include "Transaction.h" -#include "FeedsEntity.h" -#include "FeedAttributes.h" -#include "FolderAttributes.h" +//#include +#include +#include +#include + // CONSTANTS // MACROS @@ -230,14 +230,14 @@ * * @return void */ - IMPORT_C void RFeedsInterface::DebugPrintTablesL(); + IMPORT_C void DebugPrintTablesL(); /** * Disconnect connection provided by client for manual update. * * @return void */ - IMPORT_C void RFeedsInterface::DisconnectManualUpdateConnectionL(); + IMPORT_C void DisconnectManualUpdateConnectionL(); /** * Fetches feed (async) @@ -295,7 +295,7 @@ * @return void. */ - IMPORT_C void RFeedsInterface::WatchSettingsL(); + IMPORT_C void WatchSettingsL(); /** * Export passed folder in OPML file @@ -469,4 +469,4 @@ }; #endif // FEED_INTERFACE_H -// End of File \ No newline at end of file +// End of File diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/feeds_engine_api/inc/FeedsServerClient.h --- a/web_plat/feeds_engine_api/inc/FeedsServerClient.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/feeds_engine_api/inc/FeedsServerClient.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #ifndef FEEDS_SERVER_CLIENT_H #define FEEDS_SERVER_CLIENT_H @@ -28,9 +27,9 @@ #include //API changes -#include "FeedsInterface.h" -#include "FeedsMap.h" -#include "Transaction.h" +#include +#include +#include // CONSTANTS @@ -42,7 +41,6 @@ // FORWARD DECLARATIONS - // CLASS DECLARATION class CClientRequestHandler; /** diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/feeds_engine_api/inc/FeedsServerFeed.h --- a/web_plat/feeds_engine_api/inc/FeedsServerFeed.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/feeds_engine_api/inc/FeedsServerFeed.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #ifndef FEEDS_SERVER_FEED_H #define FEEDS_SERVER_FEED_H @@ -25,16 +24,14 @@ #include #include -#include "FeedsEntity.h" - -#include "LeakTracker.h" -#include "Transaction.h" +#include +#include +#include // CONSTANTS // MACROS - // FUNCTION PROTOTYPES // FORWARD DECLARATIONS diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/feeds_engine_api/inc/FeedsServerFolderItem.h --- a/web_plat/feeds_engine_api/inc/FeedsServerFolderItem.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/feeds_engine_api/inc/FeedsServerFolderItem.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #ifndef FEEDS_SERVER_FOLDER_ITEM_H #define FEEDS_SERVER_FOLDER_ITEM_H @@ -24,10 +23,9 @@ #include #include -#include "FeedsEntity.h" -#include "LeakTracker.h" - -#include "Transaction.h" +#include +#include +#include // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/feeds_engine_api/inc/FeedsServerRequestHandler.h --- a/web_plat/feeds_engine_api/inc/FeedsServerRequestHandler.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/feeds_engine_api/inc/FeedsServerRequestHandler.h Mon Mar 29 12:27:15 2010 +0100 @@ -23,7 +23,7 @@ #include #include -#include +#include // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/feeds_engine_api/inc/Transaction.h --- a/web_plat/feeds_engine_api/inc/Transaction.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/feeds_engine_api/inc/Transaction.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #ifndef TRANSACTION_H #define TRANSACTION_H @@ -24,10 +23,9 @@ #include #include -#include "FeedsServerMsg.h" - -#include "FeedsEntity.h" -#include "FeedsInterface.h" +#include +#include +#include // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/feeds_engine_api/inc/XmlEncoding.h --- a/web_plat/feeds_engine_api/inc/XmlEncoding.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/feeds_engine_api/inc/XmlEncoding.h Mon Mar 29 12:27:15 2010 +0100 @@ -180,7 +180,7 @@ * @param aValueEnd The end of the encoding's value * @return ETrue if the encoding was found. */ - TBool CXmlEncoding::FindEncoding(const TDesC8& aBuffer, + TBool FindEncoding(const TDesC8& aBuffer, TInt& aBegin, TInt& aEnd, TInt& aValueBegin, TInt& aValueEnd) const; /** @@ -194,7 +194,7 @@ * @param aValueEnd The end of the encoding's value * @return ETrue if the encoding was found. */ - TBool CXmlEncoding::FindEncoding(const TDesC& aBuffer, + TBool FindEncoding(const TDesC& aBuffer, TInt& aBegin, TInt& aEnd, TInt& aValueBegin, TInt& aValueEnd) const; diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/group/bld.inf --- a/web_plat/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,7 @@ * */ -#include "../browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../browser_platform_api/inc/browser_platform_variant.hrh" #include "../aiw_browser_provider_api/group/bld.inf" @@ -31,12 +31,12 @@ #include "../multipart_parser_api/group/bld.inf" #endif #include "../recent_url_store_api/group/bld.inf" -#include "../rt_gesturehelper_api/group/bld.inf" #include "../scheme_handler_plugin_api/group/bld.inf" #include "../scriptable_plugin_api/group/bld.inf" #include "../webutils_api/group/bld.inf" #include "../widget_registry_api/group/bld.inf" #include "../xml_parser_api/group/bld.inf" +#include "../stmgesturefw_api/group/bld.inf" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/launcher_api/group/bld.inf --- a/web_plat/launcher_api/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/launcher_api/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -18,20 +18,17 @@ */ #include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS - DEFAULT PRJ_EXPORTS +../inc/browserlauncher.h MW_LAYER_PLATFORM_EXPORT_PATH(browserlauncher.h) +../inc/downloadedcontenthandler.h MW_LAYER_PLATFORM_EXPORT_PATH(downloadedcontenthandler.h) +../inc/browseroverriddensettings.h MW_LAYER_PLATFORM_EXPORT_PATH(browseroverriddensettings.h) +../inc/browseroverriddensettings.inl MW_LAYER_PLATFORM_EXPORT_PATH(browseroverriddensettings.inl) -../inc/BrowserLauncher.h MW_LAYER_PLATFORM_EXPORT_PATH(BrowserLauncher.h) -../inc/DownloadedContentHandler.h MW_LAYER_PLATFORM_EXPORT_PATH(DownloadedContentHandler.h) -../inc/BrowserOverriddenSettings.h MW_LAYER_PLATFORM_EXPORT_PATH(BrowserOverriddenSettings.h) -../inc/BrowserOverriddenSettings.inl MW_LAYER_PLATFORM_EXPORT_PATH(BrowserOverriddenSettings.inl) PRJ_MMPFILES // End of file - - diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/launcher_api/inc/BrowserLauncher.h --- a/web_plat/launcher_api/inc/BrowserLauncher.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/launcher_api/inc/BrowserLauncher.h Mon Mar 29 12:27:15 2010 +0100 @@ -24,7 +24,7 @@ // INCLUDES #include #include -#include +#include // FORWARD DECLARATIONS class CBrowserLauncherExtension; @@ -244,4 +244,4 @@ TBool& aIsOverriddenSettings ); }; -#endif // BROWSERLAUNCHER_H \ No newline at end of file +#endif // BROWSERLAUNCHER_H diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/multipart_parser_api/group/bld.inf --- a/web_plat/multipart_parser_api/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/multipart_parser_api/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ #include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" #ifdef BRDO_MULTIPART_PARSER_FF @@ -24,8 +24,8 @@ DEFAULT PRJ_EXPORTS -../inc/BodyPart.h MW_LAYER_PLATFORM_EXPORT_PATH(BodyPart.h) -../inc/MultipartParser.h MW_LAYER_PLATFORM_EXPORT_PATH(MultipartParser.h) +../inc/bodypart.h MW_LAYER_PLATFORM_EXPORT_PATH(bodypart.h) +../inc/multipartparser.h MW_LAYER_PLATFORM_EXPORT_PATH(multipartparser.h) PRJ_MMPFILES diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/multipart_parser_api/inc/MultipartParser.h --- a/web_plat/multipart_parser_api/inc/MultipartParser.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/multipart_parser_api/inc/MultipartParser.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,21 +15,16 @@ * */ - - #ifndef MULTIPARTPARSER_H #define MULTIPARTPARSER_H // INCLUDES -#include "BodyPart.h" - +#include // CONSTANTS - // DATA TYPES - // FORWARD DECLARATIONS class CBodyPart; diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/recent_url_store_api/group/bld.inf --- a/web_plat/recent_url_store_api/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/recent_url_store_api/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -15,13 +15,12 @@ * */ #include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT PRJ_EXPORTS - -../inc/RecentUrlStore.h MW_LAYER_PLATFORM_EXPORT_PATH(RecentUrlStore.h) +../inc/recenturlstore.h MW_LAYER_PLATFORM_EXPORT_PATH(recenturlstore.h) PRJ_MMPFILES diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/rt_gesturehelper_api/group/bld.inf --- a/web_plat/rt_gesturehelper_api/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -/* -* Copyright (c) 2008 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 "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Build information -* -*/ -#include -#include "../../browser_platform_api/inc/Browser_platform_variant.hrh" - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -../inc/rt_gesturehelper.h MW_LAYER_PLATFORM_EXPORT_PATH(rt_gesturehelper.h) -../inc/rt_gestureobserver.h MW_LAYER_PLATFORM_EXPORT_PATH(rt_gestureobserver.h) - -PRJ_MMPFILES - - diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/rt_gesturehelper_api/inc/rt_gesturehelper.h --- a/web_plat/rt_gesturehelper_api/inc/rt_gesturehelper.h Wed Jan 13 15:52:45 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,145 +0,0 @@ -/* -* Copyright (c) 2007 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 "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: RT Gesture helper interface -* -*/ - - -#ifndef _RT_GESTUREHELPER_H_ -#define _RT_GESTUREHELPER_H_ - -#include -#include - -class CAlfEnv; -class CAlfDisplay; -class TAlfEvent; -struct TPointerEvent; - -namespace RT_GestureHelper -{ - -class CGestureHelperImpl; - -/** - * Gesture helper provides functionality to convert a stream of pointer events - * into a logical gesture, and to assist clients in calculation of gesture - * speed and distance. - * - * Interfaces - * - CGestureHelper is a parser of pointer events. Recognises gestures from - * a sequence of pointer events, and converts them to gesture commands. - * For documentation of callbacks, see @ref MGestureObserver. - * - MGestureObserver allows clients to get notified of gestures - * - MGestureEvent represents the gesture (event) - */ -NONSHARABLE_CLASS( CGestureHelper ) : public CBase - { -public: - /** - * The helper is expected to be a member variable, hence NewLC is not provided - */ - IMPORT_C static CGestureHelper* NewL( MGestureObserver& aObserver ); - - /** Destructor */ - IMPORT_C ~CGestureHelper(); - - /** - * Specify whether the helper will send hold events. By default, holding is enabled. - * "Hold" means user has held stylus/finger on the same position for a longer duration. - * - * Clients that require holding to be treated with no special meaning should disable - * holding to simplify their event handling. - * For example, assume the client uses swipe left/right to control navigation, and - * holding is enabled. If user holds, the client gets hold left/right - * event, and no swipe event. If user now drags left or right while still pressing - * stylus down, the client will not get a swipe event (since it already received a hold - * event). Upon release event, the client no reliable way of knowing whether the - * user swiped left/right or cancelled the swipe. This problem is removed if the - * client simply disables holding. In the above scenario while holding disabled, - * the client would get only swipe events (and released event). - * (Swipe can be cancelled by dragging towards, but not beyond, the starting position.) - */ - IMPORT_C void SetHoldingEnabled( TBool aEnabled ); - - /** - * @return whether sending hold events is currently enabled - * ("Hold" means user has held stylus/finger on the same position for a longer duration.) - */ - IMPORT_C TBool IsHoldingEnabled() const; - - /** - * Enables/disables double tap support. Double tap is disabled by default. - * When double tap is disabled, gesture helper emits tap events immediately when - * user lifts stylus/finger. - * When double tap is enabled, tap events are emitted after the double tap timeout passes. - * The timeout is the maximum time within which the second tap will be treated - * as a double tap. That is, there is a delay (sluggishness) before client receives - * the tap event when double tap is enabled. - * tap + timeout => tap event emitted after timeout - * tap + tap before timeout => double tap event emitted immediately after the second tap - * tap + swipe => tap + swipe events - * (tap + timeout + tap + timeout => two tap events) - */ - IMPORT_C void SetDoubleTapEnabled( TBool aEnabled ); - - /** - * @return whether double tap is currently enabled. See SetDoubleTapEnabled - */ - IMPORT_C TBool IsDoubleTapEnabled() const; - - /** - * Initialise pointer capture for Alfred - * This means that helper will receive drag events and pointer events that - * go outside the original visual area - */ - IMPORT_C void InitAlfredPointerCaptureL( CAlfEnv& aEnv, CAlfDisplay& aDisplay, - TInt aFreeControlGroupId ); - - /** - * Give a pointer event to the helper, to form a part of a gesture - * For AVKON-based client, this interface is the only option. - * Alfred-based client should use OfferEventL, as it allows gesture events to - * provider the visual on which the pointer event started. - * @param aEvent pointer event - * @return whether event was consumed or not - * EFalse the event is not a pointer events and if pointer up/drag - * event received without pointer down event - * ETrue in all the other cases of pointer event - */ - IMPORT_C TBool HandlePointerEventL( const TPointerEvent& aEvent ); - - /** - * Offer an Alf event. See HandlePointerEventL. - * @return whether event was consumed or not - * EFalse the event is not a pointer events and if pointer up/drag - * event received without pointer down event - * ETrue in all the other cases of pointer event - */ - IMPORT_C TBool OfferEventL( const TAlfEvent& aEvent ); - - /** - * Cancel ongoing recognision. Purges all pointer events given earlier, and - * starts afresh. It is not necessary to call Cancel before deleting the object. - */ - IMPORT_C void Cancel(); - -private: - /// interface implementation - CGestureHelperImpl* iImpl; - }; - -} // namespace RT_GestureHelper - -#endif // _RT_GESTUREHELPER_H_ diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/rt_gesturehelper_api/inc/rt_gestureobserver.h --- a/web_plat/rt_gesturehelper_api/inc/rt_gestureobserver.h Wed Jan 13 15:52:45 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,169 +0,0 @@ -/* -* Copyright (c) 2008-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 "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: RT Gesture helper interface -* -*/ - -#ifndef _RT_GESTUREOBSERVER_H_ -#define _RT_GESTUREOBSERVER_H_ - -#include - -namespace RT_GestureHelper -{ - -/// flag that indicates gesture code is a holding code -/// clients should use MGestureEvent::IsHolding -const TInt EFlagHold = 0x10000000; - -enum TGestureCode - { - // states - EGestureStart = 0x00000001, // gesture just started (user pressed stylus down) - EGestureDrag = 0x00000002, // user moved stylus (may be holding or not holding) - EGestureReleased = 0x00000003, // user lifted stylus while user was holding - // gestures - EGestureUnknown = 0x00000005, // gesture was not recognised - // these codes are sent when user lifts stylus (if holding not started) - EGestureTap = 0x00000006, - EGestureDoubleTap = 0x00000007, // only if double tap is enabled - // (via CGestureHelper::SetDoubleTapEnabled or - // CGestureControl::SetDoubleTapEnabled) - EGestureSwipeLeft = 0x00000008, - EGestureSwipeRight = 0x00000009, - EGestureSwipeUp = 0x0000000A, - EGestureSwipeDown = 0x0000000B, - - EGestureFlick = 0x0000000C, - EGestureLongTap = 0x0000000D, - EGestureDrop = 0x0000000E, - - // these codes are sent when user initiates holding by keeping stylus in - // same place for a longer duration - EGestureHoldLeft = EGestureSwipeLeft | EFlagHold, - EGestureHoldRight = EGestureSwipeRight | EFlagHold, - EGestureHoldUp = EGestureSwipeUp | EFlagHold, - EGestureHoldDown = EGestureSwipeDown | EFlagHold - }; - -/** - * Point of float accuracy - */ -NONSHARABLE_STRUCT( TRealPoint ) - { - inline TRealPoint(); - inline TRealPoint( const TRealPoint& aPoint ); - inline TRealPoint( TReal aX, TReal aY ); - inline TBool operator==( const TRealPoint& aPoint ) const; - - TReal32 iX; - TReal32 iY; - }; - -/** - * a gesture event - */ - -enum TAxis - { - EAxisBoth, - EAxisHorizontal, - EAxisVertical - }; - - -class TGestureEvent -{ -public: - inline TGestureCode Code( TAxis /*aRelevantAxis*/ ) const { return iCode; }; - inline TBool IsHolding() const { return iIsHolding; }; - inline TPoint StartPos() const { return iStartPos; }; - inline TPoint CurrentPos() const { return iCurrPos; }; - inline TRealPoint Speed() const { return iSpeed; }; - inline TRealPoint SpeedPercent ( const TRect& /*aEdges*/ ) const { return iSpeedPercent; }; - inline TPoint Distance() const { return iDistance; }; - - inline void SetCurrentPos(TPoint aPos) { iCurrPos = aPos; }; - inline void SetStartPos(TPoint aPos) {iStartPos = aPos; }; - inline void SetCode(TGestureCode aCode) {iCode = aCode; }; - inline void SetSpeed(TRealPoint aSpeed) { iSpeed = aSpeed; }; - inline void SetDistance(TPoint aDistance) { iDistance = aDistance; }; - inline void SetSpeedPercent(TRealPoint aSpeedPercent) { iSpeedPercent = aSpeedPercent; }; - - inline void SetIsHolding(TBool aIsHolding) { iIsHolding = aIsHolding; }; - -private: - TGestureCode iCode; - TBool iIsHolding; - TPoint iStartPos; - TPoint iCurrPos; - TRealPoint iSpeed; - TRealPoint iSpeedPercent; - TPoint iDistance; -}; - - -/** - * Observer that will be notified when user makes gestures - */ -class MGestureObserver - { -public: - /** - * Handle the gesture event - * @param aEvent event describing the gesture - */ - virtual void HandleGestureL( const TGestureEvent& aEvent ) = 0; - }; - -// ---------------------------------------------------------------------------- -// Default constructor for real point -// ---------------------------------------------------------------------------- -// -inline TRealPoint::TRealPoint() - : iX( 0 ), iY( 0 ) - { - } - -// ---------------------------------------------------------------------------- -// Copy constructor for real point -// ---------------------------------------------------------------------------- -// -inline TRealPoint::TRealPoint( const TRealPoint& aPoint ) - : iX( aPoint.iX ), iY( aPoint.iY ) - { - } - -// ---------------------------------------------------------------------------- -// Copy constructor for real point -// ---------------------------------------------------------------------------- -// -inline TRealPoint::TRealPoint( TReal aX, TReal aY ) - : iX( aX ), iY( aY ) - { - } - -// ---------------------------------------------------------------------------- -// Default constructor for real point -// ---------------------------------------------------------------------------- -// -inline TBool TRealPoint::operator==( const TRealPoint& aPoint ) const - { - return iX == aPoint.iX && iY == aPoint.iY; - } - - -} // namespace RT_GestureHelper - -#endif // _RT_GESTUREOBSERVER_H_ diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/rt_gesturehelper_api/rt_gesturehelper_api.metaxml --- a/web_plat/rt_gesturehelper_api/rt_gesturehelper_api.metaxml Wed Jan 13 15:52:45 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ - - - RT Gesture Helper API - Interface to the RT GestureHelper library. - c++ - WebKitUtils - - - - - no - no - - diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/scheme_handler_plugin_api/group/bld.inf --- a/web_plat/scheme_handler_plugin_api/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/scheme_handler_plugin_api/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -17,22 +17,19 @@ * */ - #include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT PRJ_EXPORTS -../inc/SchemeHandler.h MW_LAYER_PLATFORM_EXPORT_PATH(SchemeHandler.h) -../inc/SchemeHandler.inl MW_LAYER_PLATFORM_EXPORT_PATH(SchemeHandler.inl) -../inc/SchemeDefs.hrh MW_LAYER_PLATFORM_EXPORT_PATH(SchemeDefs.hrh) +../inc/schemehandler.h MW_LAYER_PLATFORM_EXPORT_PATH(schemehandler.h) +../inc/schemehandler.inl MW_LAYER_PLATFORM_EXPORT_PATH(schemehandler.inl) +../inc/schemedefs.hrh MW_LAYER_PLATFORM_EXPORT_PATH(schemedefs.hrh) #ifdef BRDO_ADDED_EXPORT_LOCATION -../inc/SchemeDefs.hrh BRDO_ADDED_EXPORT_LOCATION(SchemeDefs.hrh) +../inc/schemedefs.hrh BRDO_ADDED_EXPORT_LOCATION(schemedefs.hrh) #endif PRJ_MMPFILES - - diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/scheme_handler_plugin_api/inc/SchemeHandler.inl --- a/web_plat/scheme_handler_plugin_api/inc/SchemeHandler.inl Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/scheme_handler_plugin_api/inc/SchemeHandler.inl Mon Mar 29 12:27:15 2010 +0100 @@ -21,7 +21,7 @@ // INCLUDE FILES #include -#include // For REComSession +#include // For REComSession // ================= CONSTANTS ======================= diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/scriptable_plugin_api/group/bld.inf --- a/web_plat/scriptable_plugin_api/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/scriptable_plugin_api/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -15,13 +15,12 @@ * */ #include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT PRJ_EXPORTS - ../inc/npscript.h MW_LAYER_PLATFORM_EXPORT_PATH(npscript.h) PRJ_MMPFILES diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/stmgesturefw_api/group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web_plat/stmgesturefw_api/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,35 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Build information +* +*/ +#include +#include "../../browser_platform_api/inc/browser_platform_variant.hrh" + +PRJ_PLATFORMS +DEFAULT + +PRJ_EXPORTS + +../inc/rt_gesturehelper.h MW_LAYER_PLATFORM_EXPORT_PATH(rt_gesturehelper.h) +../inc/rt_gestureobserver.h MW_LAYER_PLATFORM_EXPORT_PATH(rt_gestureobserver.h) +../inc/rt_gestureif.h MW_LAYER_PLATFORM_EXPORT_PATH(rt_gestureif.h) +../inc/rt_gesturelistener.h MW_LAYER_PLATFORM_EXPORT_PATH(rt_gesturelistener.h) +../inc/rt_uievent.h MW_LAYER_PLATFORM_EXPORT_PATH(rt_uievent.h) +../inc/stmgestureinterface.h MW_LAYER_PLATFORM_EXPORT_PATH(stmgestureinterface.h) +../inc/stmgesturelistener.h MW_LAYER_PLATFORM_EXPORT_PATH(stmgesturelistener.h) + +PRJ_MMPFILES + + diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/stmgesturefw_api/inc/rt_gesturehelper.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web_plat/stmgesturefw_api/inc/rt_gesturehelper.h Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,25 @@ +/* +* Copyright (c) 2007 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: RT Gesture helper interface +* +*/ + + +#ifndef _RT_GESTUREHELPER_H_ +#define _RT_GESTUREHELPER_H_ + +#include +#include + +#endif // _RT_GESTUREHELPER_H_ diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/stmgesturefw_api/inc/rt_gestureif.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web_plat/stmgesturefw_api/inc/rt_gestureif.h Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,181 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Gesture helper implementation +* +*/ + +#ifndef RT_GESTUREIF_H_ +#define RT_GESTUREIF_H_ +// INCLUDES +#include +#include +#include +#include +#include +#include + +namespace stmGesture +{ + +/** + * UIDs for supported Gestures + */ +enum TGestureUid +{ + EGestureUidUnknown = 0, + EGestureUidTouch, + EGestureUidTap, + EGestureUidDoubleTap = EGestureUidTap, + EGestureUidLongPress, + EGestureUidHover, + EGestureUidPan, + EGestureUidRelease, + EGestureUidLeftRight, + EGestureUidUpDown, + EGestureUidFlick, + EGestureUidEdgeScroll, + EGestureUidPinch, + EGestureUidCornerZoom, + // + EStmGestureUid_Count +}; + +/** + * Area Settings + */ +enum TGestureAreaSettings +{ + ETouchTimeArea, + ETouchArea, + EHoldArea, + // + EGestureAreaSettingsCount +}; + +/** + * Gesture Specific Settings + */ +enum TGestureSettings +{ + //ETouchTimeout, + EDoubleTapTimeout, + ESuppressTimeout, + EMoveSuppressTimeout, + EHoverSpeed, + EPanSpeedLow, + EPanSpeedHigh, + EFlickSpeed = EPanSpeedHigh, + EPinchSpeed, + EZoomCornerSize, + EEdgeScrollRange, + ECapacitiveUpUsed, + EPanDisabledWhileHovering, + EHoverDisabledWhilePanning, + EAdjustYPos, + EEnableFiltering, + EWServMessageInterception, + // + EGestureSettingsCount +}; + +struct TGestureArea +{ +public: + enum TShape + { + /// Use GestureArea settings from globally defined default + EDefaultSettings = -1, + ERectangle = 1, // == stmUiEventEngine::ERectangle, + ECircle = 2, // == stmUiEventEngine::ECircle, + EEllipse = 3 // == stmUiEventEngine::EEllipse + }; + + TShape iShape; + TInt iTimeout; + // At the moment iWidth is only used + TSize iSize; +}; + +/** + * Edge Scroll Type + */ +enum TEdgeScroll +{ + EEdgeScrollUp = 1, + EEdgeScrollDown, + EEdgeScrollLeft, + EEdgeScrollRight, + EEdgeScrollUnknown +}; + +/** + * Tap Type + */ +enum TTapType +{ + ETapTypeSingle = 1, + ETapTypeDouble +}; + +/** + * Zoom Type + */ +enum TZoomType +{ + EZoomUndefined = 0, + EZoomIn = 1, + EZoomOut = 2 +}; + +/** + * Direction Definition + */ +enum TGestureDirection +{ + ENoDirection = 0, + // + ENorth = 1, + ENorthEast, + EEast, + ESouthEast, + ESouth, + ESouthWest, + EWest, + ENorthWest, +}; + +/*! + * Generic gesture interface. The gestures + * contain a generic part and a gesture specific part + * is obtained using the getDetails() method. + * + */ +class MGestureIf +{ +public: + virtual TGestureUid gestureUid() const = 0; // Identifier of recognizer type that issues the gesture + virtual TPoint getLocation() const = 0 ; // Location where the gesture happened (if applicable) + virtual int getType() const = 0 ; // If the gesture can have different types (like tap or double tap) + virtual float getSpeedX() const __SOFTFP = 0 ; // px/msec, as calculated in the UI state machine, not valid in all cases + virtual float getSpeedY() const __SOFTFP = 0 ; // px/msec, as calculated in the UI state machine, not valid in all cases + virtual int getDetails() const = 0 ; // Other possible details.... + virtual TPtrC8 getGestureName() = 0 ; // String name for gesture, makes possible to use single callback for gestures + virtual TPoint getLengthAndDirection() const { return TPoint(0,0); } // very simple vector + virtual TGestureDirection getDirection() const { return stmGesture::ENoDirection; } + virtual TPoint getPinchEndPos() const { return TPoint(0,0); } +}; + +} // namespace + +#endif /* RT_GESTUREIF_H_ */ diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/stmgesturefw_api/inc/rt_gesturelistener.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web_plat/stmgesturefw_api/inc/rt_gesturelistener.h Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,59 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Gesture helper implementation +* +*/ + +#ifndef RT_GESTURELISTENER_H_ +#define RT_GESTURELISTENER_H_ + +#include + +namespace stmGesture +{ +/*! + * The gesture listener interface. This interface needs to be implemented by the + * listener of the standard gestures implemented in the gesture framework. + */ +class MGestureListener +{ +public: + /*! + * The method that will be called by the gesture framework + * to inform about a gesture being recognised. + * \param theGesture: contains the recognised gesture. + * The MGestureIf contains generic part and gesture specific part + * so the listener needs to know how to handle specific gestures. + */ + virtual void gestureEnter(MGestureIf& theGesture) = 0 ; + /*! + * The method to inform the listener that the gesture has ended. + * This happens if another gesture is recognised or e.g. the Release UI + * event is handled. + * \note Some gestures produce only gestureEnter() callback and no gestureExit(). + */ + virtual void gestureExit(TGestureUid gestureUid) = 0 ; + /*! + * The listener needs to provide the target control (CCoeControl*) to the + * standard gestures. Since the gesture framework processes all events in the + * application, the gesture recognisers check whether the events are targeted + * to the listener owning control. + * Not all gesture recognisers need to perform this check. + * \return the owning CCoeControl of the gesture listener. + */ + virtual CCoeControl* getOwner() = 0 ; +}; + +} +#endif /* RT_GESTURELISTENER_H_ */ diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/stmgesturefw_api/inc/rt_gestureobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web_plat/stmgesturefw_api/inc/rt_gestureobserver.h Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,157 @@ +/* +* Copyright (c) 2008-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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: RT Gesture helper interface +* +*/ + +#ifndef _RT_GESTUREOBSERVER_H_ +#define _RT_GESTUREOBSERVER_H_ + +#include + +namespace RT_GestureHelper +{ + +/// flag that indicates gesture code is a holding code +/// clients should use MGestureEvent::IsHolding +const TInt EFlagHold = 0x10000000; + +enum TGestureCode + { + // states + EGestureStart = 0x00000001, // gesture just started (user pressed stylus down) + EGestureDrag = 0x00000002, // user moved stylus (may be holding or not holding) + EGestureReleased = 0x00000003, // user lifted stylus while user was holding + // gestures + EGestureUnknown = 0x00000005, // gesture was not recognised + // these codes are sent when user lifts stylus (if holding not started) + EGestureTap = 0x00000006, + EGestureDoubleTap = 0x00000007, // only if double tap is enabled + // (via CGestureHelper::SetDoubleTapEnabled or + // CGestureControl::SetDoubleTapEnabled) + EGestureSwipeLeft = 0x00000008, + EGestureSwipeRight = 0x00000009, + EGestureSwipeUp = 0x0000000A, + EGestureSwipeDown = 0x0000000B, + + EGestureFlick = 0x0000000C, + EGestureLongTap = 0x0000000D, + EGestureDrop = 0x0000000E, + + // these codes are sent when user initiates holding by keeping stylus in + // same place for a longer duration + EGestureHoldLeft = EGestureSwipeLeft | EFlagHold, + EGestureHoldRight = EGestureSwipeRight | EFlagHold, + EGestureHoldUp = EGestureSwipeUp | EFlagHold, + EGestureHoldDown = EGestureSwipeDown | EFlagHold, + EGesturePinch + }; + +/** + * Point of float accuracy + */ +NONSHARABLE_STRUCT( TRealPoint ) + { + inline TRealPoint(); + inline TRealPoint( const TRealPoint& aPoint ); + inline TRealPoint( TReal aX, TReal aY ); + inline TBool operator==( const TRealPoint& aPoint ) const; + + TReal32 iX; + TReal32 iY; + }; + +/** + * a gesture event + */ + +enum TAxis + { + EAxisBoth, + EAxisHorizontal, + EAxisVertical + }; + + +class TGestureEvent +{ +public: + inline TGestureCode Code( TAxis /*aRelevantAxis*/ ) const { return iCode; }; + inline TBool IsHolding() const { return iIsHolding; }; + inline TPoint StartPos() const { return iStartPos; }; + inline TPoint CurrentPos() const { return iCurrPos; }; + inline TRealPoint Speed() const { return iSpeed; }; + inline TRealPoint SpeedPercent ( const TRect& /*aEdges*/ ) const { return iSpeedPercent; }; + inline TPoint Distance() const { return iDistance; }; + + inline void SetCurrentPos(TPoint aPos) { iCurrPos = aPos; }; + inline void SetStartPos(TPoint aPos) {iStartPos = aPos; }; + inline void SetCode(TGestureCode aCode) {iCode = aCode; }; + inline void SetSpeed(TRealPoint aSpeed) { iSpeed = aSpeed; }; + inline void SetDistance(TPoint aDistance) { iDistance = aDistance; }; + inline void SetSpeedPercent(TRealPoint aSpeedPercent) { iSpeedPercent = aSpeedPercent; }; + + inline void SetIsHolding(TBool aIsHolding) { iIsHolding = aIsHolding; }; + +private: + TGestureCode iCode; + TBool iIsHolding; + TPoint iStartPos; + TPoint iCurrPos; + TRealPoint iSpeed; + TRealPoint iSpeedPercent; + TPoint iDistance; +}; + + +// ---------------------------------------------------------------------------- +// Default constructor for real point +// ---------------------------------------------------------------------------- +// +inline TRealPoint::TRealPoint() + : iX( 0 ), iY( 0 ) + { + } + +// ---------------------------------------------------------------------------- +// Copy constructor for real point +// ---------------------------------------------------------------------------- +// +inline TRealPoint::TRealPoint( const TRealPoint& aPoint ) + : iX( aPoint.iX ), iY( aPoint.iY ) + { + } + +// ---------------------------------------------------------------------------- +// Copy constructor for real point +// ---------------------------------------------------------------------------- +// +inline TRealPoint::TRealPoint( TReal aX, TReal aY ) + : iX( aX ), iY( aY ) + { + } + +// ---------------------------------------------------------------------------- +// Default constructor for real point +// ---------------------------------------------------------------------------- +// +inline TBool TRealPoint::operator==( const TRealPoint& aPoint ) const + { + return iX == aPoint.iX && iY == aPoint.iY; + } + + +} // namespace RT_GestureHelper + +#endif // _RT_GESTUREOBSERVER_H_ diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/stmgesturefw_api/inc/rt_uievent.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web_plat/stmgesturefw_api/inc/rt_uievent.h Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,309 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +#ifndef RT_UIEVENT_H_ +#define RT_UIEVENT_H_ + +// INCLUDES +#include +#include +#include +#include +#include + +#if defined(BRDO_MULTITOUCH_ENABLED_FF) +#define ADVANCED_POINTER_EVENTS +#endif + +namespace stmUiEventEngine +{ + +#if defined(ADVANCED_POINTER_EVENTS) +static const TInt KMaxNumberOfPointers(2) ; // How many pointer we have in multi-touch case +#else +static const TInt KMaxNumberOfPointers(1) ; // How many pointer we have in single touch case +#endif + +/*! + * Event code generated from the state machine + */ +enum TUiEventCode +{ + ETouch = 0x01, + EHold = 0x02, + EMove = 0x03, + ERelease= 0x04, + ENull = 0x05 +}; + +/*! + * Shape of the Area + */ +enum TAreaShape +{ + ERectangle = 1, + ECircle, + EEllipse +}; + +// for testingg/debugging purposes - string name og the code +const char* EventName(TUiEventCode aCode); + +/*! + * Interface class for Speed in X-Y direction + */ +class MUiEventSpeed +{ +public: + virtual float speedX() const __SOFTFP = 0; + virtual float speedY() const __SOFTFP = 0; +}; + +/*! + * Utility class to wrap number for (already evaluated) speed values. + */ +NONSHARABLE_CLASS(TUiEventSpeed): public MUiEventSpeed +{ +public: + TUiEventSpeed(float speedX, float speedY): m_speedX(speedX),m_speedY(speedY) {} + virtual float speedX() const __SOFTFP { return m_speedX; } + virtual float speedY() const __SOFTFP { return m_speedY; } + float m_speedX; + float m_speedY; +}; + +/*! + * The UI event interface, UI events are touch, hold, move and release. + * Note that currently the interface is not OS agnostic enough. It is using + * TPoint, TTimeIntervalMicroSeconds etc. types which should be replaced + * with some standard types/classes. + */ +class MUiEvent: public MUiEventSpeed +{ +public: + /*! + * The starting position of the gesture in _screen_ coordinates + */ + virtual const TPoint& StartPos() const = 0; + /*! + * Current position in _screen_ coordinates + */ + virtual const TPoint& CurrentXY() const = 0 ; + /*! + * Previous position in _screen_ coordinates + */ + virtual const TPoint& PreviousXY() const = 0 ; + /*! + * Time difference between this and previous UI event + */ + virtual TTimeIntervalMicroSeconds StateTransition() const = 0 ; + /*! + * true, if the UI event was generated because of timer expiration + */ + virtual bool TimerExpired() const = 0; + /*! + * The UI event code + */ + virtual TUiEventCode Code()const = 0 ; + /*! + * Target identifier (in practice the CCoeControl* of the window) + */ + virtual void* Target() const = 0 ; + /*! + * The index of the UI event. In single touch this is always 0 + */ + virtual int Index() const = 0 ; + /*! + * Next event in the gesture (with the same index) + */ + virtual MUiEvent* previousEvent() const = 0 ; + /*! + * Count of events in gesture + */ + virtual int countOfEvents() const = 0 ; + /*! + * Timestamp + */ + virtual TInt64 timestamp() const = 0 ; + /*! + * Speed. Speed is calculated based on the previous event. + */ + virtual float speedX() const __SOFTFP = 0 ; + /*! + * Speed. Speed is calculated based on the previous event. + */ + virtual float speedY() const __SOFTFP = 0 ; +}; + +/** + * Observer that will be notified when UI events have been recognised + */ +class MUiEventObserver +{ +public: + /** + * Handle the UI event + * \param aEvent event describing the event + */ + virtual void HandleUiEventL( const MUiEvent& aEvent ) = 0; +}; + +/*! The state machine interface. + * + * To be OS agnostic TPointerEvent, TRect etc. should be replaced with + * something else. + */ +class MStateMachine +{ +public: + /*! + * \return the rectangle containing the touch area. + * The shape of the touch area can be either rectangle, circle or ellipse. + * getTouchArea returns the current touch area, so it may be of zero size. + * During touch timer the method will return the TouchTimeArea, after that it + * will return the TouchArea. + */ + virtual TRect getTouchArea(TInt aPointerNumber = 0) = 0 ; + /*! + * \param fingersize_mm defines the width of the rectangle or the diameter of the circle/ellipse + * used for the touch area during touch timer running. If the initial touch is a "sloppy" one, + * there is very easily an extra move event detected during touch time. On the other hand + * after touch has been detected, the touch area should not be too big, just something suitable to + * filter minor movements out. The proposed solution is to define two touch areas: one to be used + * while touch timer is running, and another used after touch has been detected. + * The TouchTimeArea can be a bit larger to allow sloppy touch, then the TouchArea can be smaller to + * filter minor movements out. + */ + virtual void setTouchTimeArea(long fingersize_mm) = 0 ; + /*! + * \param fingersize_mm defines the width of the rectangle or the diameter of the circle/ellipse + * used for the touch area. + */ + virtual void setTouchArea(long fingersize_mm) = 0 ; + /*! + * get the touch area shape, either rectangle, circle or ellipse + */ + virtual TAreaShape getTouchAreaShape() = 0 ; + /*! + * set the touch area shape, either rectangle, circle or ellipse. This is the same for both of + * the touch areas. + */ + virtual void setTouchAreaShape(const TAreaShape shape) = 0 ; + /*! + * get the touch timeout. Touch timeout is the time after the first down event + * until the Touch UI event is generated. Touch timeout makes it possible to + * calculate an average of the first few points detected before generating the Touch UI event. + */ + virtual unsigned int getTouchTimeout() = 0 ; + /*! + * Set the touch timeout. + */ + virtual void setTouchTimeout(unsigned int) = 0 ; + /*! + * \return the rectangle containing the hold area. + * The shape of the hold area can be either rectangle, circle or ellipse. + * getholdArea returns the current hold area, so it may be of zero size. + */ + virtual TRect getHoldArea(TInt aPointerNumber = 0) = 0 ; + /*! + * \param fingersize_mm defines the width of the rectangle or the diameter of the circle/ellipse + * used for the hold area. Hold area defines an area so that if the touch coordinates stay + * inside that area for the duration of hold timeout the Hold UI event is generated. + */ + virtual void setHoldArea(long fingersize_mm) = 0 ; + /*! + * get the hold area shape, either rectangle, circle or ellipse + */ + virtual TAreaShape getHoldAreaShape() = 0 ; + /*! + * set the hold area shape, either rectangle, circle or ellipse + */ + virtual void setHoldAreaShape(const TAreaShape shape) = 0 ; + /*! + * get the hold timeout. The timeout defines how long the touch coordinates need to stay + * inside hold area before Hold UI event is generated. + */ + virtual unsigned int getHoldTimeout() = 0 ; + /*! + * Set the hold timeout. + */ + virtual void setHoldTimeout(unsigned int a) = 0 ; + /*! + * get the touch suppress timeout. This timeout defines how long it will take to generate + * the Release UI event after UP event during the touch timeout. This timeout is rather short + * but will cause the filtering of accidental UP/DOWN events during if they are close together. + */ + virtual unsigned int getTouchSuppressTimeout() = 0 ; + /*! + * Set the touch suppress timeout. + */ + virtual void setTouchSuppressTimeout(unsigned int a) = 0 ; + /*! + * get the move suppress timeout. This timeout is used after Move UI event has been generated to + * filter accidental UP/DOWN events. Using light touch it is possible to cause accidental UP/DOWN + * events with the timespan can be over 120 ms when the direction of movement changes. + */ + virtual unsigned int getMoveSuppressTimeout() = 0 ; + /*! + * set the move suppress timeout. + */ + virtual void setMoveSuppressTimeout(unsigned int a) = 0 ; + /*! + * add UI event observer. The generated UI events will be sent to the observers. + * \return false, if the max number of observers (=5) has been reached. + */ + virtual bool addUiEventObserver(MUiEventObserver* observer) = 0 ; + /*! + * remove the UI event observer. + */ + virtual bool removeUiEventObserver(MUiEventObserver* observer) = 0 ; + /*! + * \return true, of the message being processed did not generate UI event + */ + virtual bool wasLastMessageFiltered(TInt aPointerNumber = 0) = 0 ; + /*! + * enable capacitive UP message. If it is enabled, UP suppression is not used + * but the UP event causes immediate Release UI event. + */ + virtual void enableCapacitiveUp(bool enable) = 0 ; + /*! + * enable or disable debug logging of the state machine + * \param aEnable : logging enabled + */ + virtual void enableLogging(bool aEnable) = 0 ; + /*! + * add "window handles" to the list of targets which should be included + * in the gesture recognition. This way it is possible to drop the messges + * which are not of interest from the gesture recognition point of view. + * This is used when only the gesture recognition is used so that the UI events are + * not passed to the application. + */ + // virtual void addGestureTarget(void* aTarget) = 0 ; + + /*! + * Setting the Y adjustment useful in capacitive touch + * Note that there are problems with the adjustment if done at this level, + * the most proper place would be the window server. + */ + virtual void enableYadjustment(bool aEnable) = 0 ; + + /// Get the number of supported touch pointers + virtual int getNumberOfPointers() = 0; +}; + +} // namespace +#endif /* RT_UIEVENT_H_ */ diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/stmgesturefw_api/inc/stmgestureinterface.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web_plat/stmgesturefw_api/inc/stmgestureinterface.h Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,300 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + +#ifndef __STMGESTUREINTERFACE_H__ +#define __STMGESTUREINTERFACE_H__ + +#include +#include +#include +#include +#include + +// FORWARD DECLARATION +namespace stmGesture +{ + class CGestureFramework; + class MGestureRecogniserIf; +} + +class CStmGestureContext; +class MStmGestureListener; + +typedef stmGesture::MGestureIf MStmGesture; +typedef stmGesture::TGestureUid TStmGestureUid; +typedef stmGesture::MGestureListener MStmGestureEngineListener; +typedef stmGesture::MGestureRecogniserIf MStmGestureRecogniser; +typedef stmGesture::TGestureSettings TStmGestureSettings; +typedef stmGesture::TGestureAreaSettings TStmGestureAreaSettings; +typedef stmGesture::TGestureArea TStmGestureArea; + +///================================================================== + +/** + * Interface class for defining gesture settings parameters + */ +class MStmGestureParameters + { +public: + virtual TStmGestureArea* Area(TStmGestureAreaSettings aArea) = 0; + virtual TInt Param(TStmGestureSettings aParam) const = 0; + virtual TUint8 Enabled(TStmGestureUid aGesture) const = 0; + }; + +///================================================================== + +/** + * Class definition for gesture settings parameters + */ +NONSHARABLE_CLASS( CStmGestureParameters ): public CBase, public MStmGestureParameters + { +public: + /*! + * Constructors + */ + IMPORT_C CStmGestureParameters(); + IMPORT_C CStmGestureParameters(const CStmGestureParameters& aParams); + +public: //getter methods + + /*! + * To get the area settings + */ + TStmGestureArea* Area(TStmGestureAreaSettings aArea) { return &iAreaSettings[aArea]; } + + /*! + * To get Gesture params + */ + TInt Param(TStmGestureSettings aParam) const { return iParam[aParam]; } + + /*! + * Gesture enabled or not + */ + TUint8 Enabled(TStmGestureUid aGesture) const { return iEnabled[aGesture] != 0; } + +public: // setter methods + + /*! + * To set the parameters + */ + void SetParam(TStmGestureSettings aParam, TInt aValue) { iParam[aParam] = aValue; } + + /*! + * To enable or disble the gestures + */ + void SetEnabled(TStmGestureUid aGesture, TUint8 aParam) { iEnabled[aGesture] = aParam; } + + /*! + * Gesture settings + */ + TInt& operator[](TStmGestureSettings aParam) { return iParam[aParam]; } + +private: + TInt iParam[stmGesture::EGestureSettingsCount]; + TStmGestureArea iAreaSettings[stmGesture::EGestureAreaSettingsCount]; + TInt iModified; + TUint8 iEnabled[stmGesture::EStmGestureUid_Count]; + }; + +///================================================================== + +/** + * CStmGestureEngine Class Declaration + */ +NONSHARABLE_CLASS( CStmGestureEngine ): public CBase + { +public: + + /*! + * Gesture Engine Creation + */ + IMPORT_C static CStmGestureEngine* NewL(); + ~CStmGestureEngine(); + +public: + + /*! + * To Create a context in gesture engine + */ + IMPORT_C CStmGestureContext* CreateContextL(TInt aId); + + /*! + * To get the context + */ + IMPORT_C CStmGestureContext* Context(TInt aId); + + /*! + * Application use HandlePointerEventL API to pass the raw hardware events to the gesture library + */ + IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent, void* target); + +private: + + /*! + * default constructor + */ + CStmGestureEngine(); + + /*! + * Two-phase constructor + */ + void ConstructL(); + +private: // used by friend class CStmGestureContext + + void EnableContextL(CStmGestureContext& aCtxt); + void DisableContextL(CStmGestureContext& aCtxt); + + template + void InitRecognizerL( T*& aGesture, CStmGestureContext& aContext, TBool aNewCOntext); + + void SetupRecognizersL(CStmGestureContext& aCtxt, TBool aNewContext); + +private: + friend class CStmGestureContext; + stmGesture::CGestureFramework* iGf; + // Registered/owned contexts + RPointerArray iContexts; + // Active set of contexts; latest added defines parameters + RPointerArray iCtxtStack; + // Global/default parameters + CStmGestureParameters* iConfig; + TBool iDtorPhase; + }; + +///================================================================== + +//Forward declaration +class CGestureEventSender; + +/** + * Gesture context represents a certain configuration of gesture parameters + * (including what gestures are enabled) and gesture listeners. + * Context can be created beforehand and reused later. + * The assumed use of a context is to have rough correspondence between + * UI view and enabled gestures. + * + * @note Gesture contexts are created by an instance of CStmGestureEngine. + */ + +class CStmGestureContext: public CBase, public MStmGestureEngineListener + { +public: + /*! + * Constructor + */ + CStmGestureContext(CStmGestureEngine& aEngine); + + ~CStmGestureContext(); + +public: /// Gesture listeners + + /*! + * Add listener to the gesture processing context. + * @param aListener Listener object + * @param aPos Position of inserted listener which determines order in which it receives gesture events (0 == first, before existing) + */ + IMPORT_C void AddListenerL(MStmGestureListener* aListener, TInt aPos = 0); + + /*! + * Remove listener from the gesture processing context. + * @param aListener Listener object + */ + IMPORT_C TInt RemoveListener(MStmGestureListener* aListener); + + /*! + * To get the list of listeners + */ + const RPointerArray& Listeners() const { return iListeners; } + +public: /// Context activation + + /*! + * To set the context configuration in Gesture Engine. + */ + IMPORT_C void SetContext(CCoeControl* aControl); + + /*! + * Initialize context configuration on the Gesture Engine. + */ + IMPORT_C void ActivateL(); + + /*! + * deactivate context configuration on the Gesture Engine. + */ + IMPORT_C void Deactivate(); + + /*! + * gesture configuration + */ + CStmGestureParameters& Config() { return *iConfig; } + + /*! + * Enable Logging + */ + void SetLogging(TInt aEnabled) { iLogging = aEnabled; } + + /*! + * Context control + */ + CCoeControl* ContextControl() { return iOwnerControl; } + + /*! + * is gesture context is active ? + */ + TBool IsActive() { return iActivated; } + + /*! + * Context id + */ + TInt Id() const { return iCtxtId; } + +public: // from MStmGestureEngineListener + + void gestureEnter(MStmGesture& aGesture); + void gestureExit(TStmGestureUid aGestureUid); + CCoeControl* getOwner(); + +private: + friend class CStmGestureEngine; + + void ConstructL(); + void DispatchGestureEventL(TStmGestureUid aUid, MStmGesture* aGesture); + void SuspendRecognizer(TStmGestureUid aUid); + void EnableRecognizersL(); + void EnableRecognizerL(TStmGestureUid aUid); + +private: + CStmGestureEngine& iEngine; + // Application-specific ID for finding context + TInt iCtxtId; + TBool iActivated; + CStmGestureParameters* iConfig; + CCoeControl* iOwnerControl; + //TBool iPinchUsed; + RPointerArray iListeners; + // for simplicity of addressing recognizers, we'll use fixed array + // with UID-based index (range 0..N is assumed for UIDs) + // @note Tap recognizer actually produces Tap and DoubleTap gesture, + // so should be handled carefully -- only Tap position is set + MStmGestureRecogniser* iRecognizers[stmGesture::EStmGestureUid_Count]; + TBool iLogging; + CGestureEventSender* iEventSender; + }; + +#endif diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/stmgesturefw_api/inc/stmgesturelistener.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web_plat/stmgesturefw_api/inc/stmgesturelistener.h Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,138 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +#ifndef __STMGESTURELISTENER_H__ +#define __STMGESTURELISTENER_H__ + +#include +#include + + +typedef stmGesture::MGestureIf MStmGesture; +typedef stmGesture::TGestureUid TStmGestureUid; +typedef stmGesture::TTapType TStmTapType; +typedef stmGesture::TGestureDirection TStmGestureDirection; + +/** + * Point of float accuracy + */ +NONSHARABLE_STRUCT( TRealPoint ) + { + inline TRealPoint(); + inline TRealPoint( const TRealPoint& aPoint ); + inline TRealPoint( TReal aX, TReal aY ); + inline TBool operator==( const TRealPoint& aPoint ) const; + + TReal32 iX; + TReal32 iY; + }; + +/** + * Enum to distinguish between Gesture Entry and Exit. + * Currently supported only for Pinch + */ +enum TStmGestureState { + EGestureEnter = 0, + EGestureExit + +}; + +/** + * Interface Class to the Application + */ + +class TStmGestureEvent +{ +public: + inline TStmGestureUid Code() const { return iGestureUid; }; + inline TPoint CurrentPos() const { return iCurrPos; }; + inline TRealPoint Speed() const { return iSpeed; }; + inline TStmTapType Type() const { return iType; }; + inline int Details() const { return iDetails; }; + inline TStmGestureDirection GestureDirection() const { return iDirection; }; + inline TPoint PinchEndPos() const { return iPinchEndPos; }; + inline TStmGestureState GestureState() const { return iGestureState; }; + + inline void SetCode(TStmGestureUid aGestureUid) { iGestureUid = aGestureUid; }; + inline void SetCurrentPos(TPoint aPos) { iCurrPos = aPos; }; + inline void SetSpeed(TRealPoint aSpeed) { iSpeed = aSpeed; }; + inline void SetType(TStmTapType aType) { iType = aType; }; + inline void SetDetails(int aDetails) { iDetails = aDetails; }; + inline void SetGestureDirection(TStmGestureDirection aDirection) { iDirection = aDirection; }; + inline void SetPinchEndPos(TPoint aPinchEndPos) { iPinchEndPos = aPinchEndPos; }; + inline void SetGestureState(TStmGestureState aGestureState) { iGestureState = aGestureState; }; + +private: + TStmGestureUid iGestureUid; // Code of the gesture + TPoint iCurrPos; // Current position where gesture occured + TRealPoint iSpeed; // speed X and speed Y + TStmTapType iType; // single-tap or double-tap + int iDetails; // details like pinch factor + TStmGestureDirection iDirection; // Gesture Direction + TPoint iPinchEndPos; // End of pinching position + TStmGestureState iGestureState; // Gesture State. currently supports only for pinch + +}; + +class MStmGestureListener + { +public: + /** + * Handle the gesture event + * @param aEvent event describing the gesture + */ + virtual void HandleGestureEventL(const TStmGestureEvent& aGesture) = 0; + }; + +// ---------------------------------------------------------------------------- +// Default constructor for real point +// ---------------------------------------------------------------------------- +// +inline TRealPoint::TRealPoint() + : iX( 0 ), iY( 0 ) + { + } + +// ---------------------------------------------------------------------------- +// Copy constructor for real point +// ---------------------------------------------------------------------------- +// +inline TRealPoint::TRealPoint( const TRealPoint& aPoint ) + : iX( aPoint.iX ), iY( aPoint.iY ) + { + } + +// ---------------------------------------------------------------------------- +// Copy constructor for real point +// ---------------------------------------------------------------------------- +// +inline TRealPoint::TRealPoint( TReal aX, TReal aY ) + : iX( aX ), iY( aY ) + { + } + +// ---------------------------------------------------------------------------- +// Default constructor for real point +// ---------------------------------------------------------------------------- +// +inline TBool TRealPoint::operator==( const TRealPoint& aPoint ) const + { + return iX == aPoint.iX && iY == aPoint.iY; + } + + +#endif // __ICS_GESTURELISTENER_H__ diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/stmgesturefw_api/stmgesturefw_api.metaxml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web_plat/stmgesturefw_api/stmgesturefw_api.metaxml Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,14 @@ + + + State Machine Gesture Framework API + Interface to State Machine Gesture Framework API + c++ + WebKitUtils + + + + + no + no + + diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/webutils_api/group/bld.inf --- a/web_plat/webutils_api/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/webutils_api/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -14,15 +14,16 @@ * Description: Build information for the WebUtils API. * */ + #include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT PRJ_EXPORTS -../inc/CUserAgent.h MW_LAYER_PLATFORM_EXPORT_PATH(CUserAgent.h) -../inc/WebUtilsInternalCRKeys.h MW_LAYER_PLATFORM_EXPORT_PATH(WebUtilsInternalCRKeys.h) -../inc/WebUtilsSDKCRKeys.h MW_LAYER_PLATFORM_EXPORT_PATH(WebUtilsSDKCRKeys.h) +../inc/cuseragent.h MW_LAYER_PLATFORM_EXPORT_PATH(cuseragent.h) +../inc/webutilsinternalcrkeys.h MW_LAYER_PLATFORM_EXPORT_PATH(webutilsinternalcrkeys.h) +../inc/webutilssdkcrkeys.h MW_LAYER_PLATFORM_EXPORT_PATH(webutilssdkcrkeys.h) PRJ_MMPFILES diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/webutils_api/inc/WebUtilsInternalCRKeys.h --- a/web_plat/webutils_api/inc/WebUtilsInternalCRKeys.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/webutils_api/inc/WebUtilsInternalCRKeys.h Mon Mar 29 12:27:15 2010 +0100 @@ -71,8 +71,8 @@ // Browser Version Minor const TUint32 KWebUtilsBrowserVersionMinor = 0x00000010; -// Browser Version SVN Rev -const TUint32 KWebUtilsBrowserVersionSVNRev = 0x00000011; +// Browser Version Feature Rev +const TUint32 KWebUtilsBrowserVersionFeatureRev = 0x00000011; // Browser Name const TUint32 KWebUtilsBrowserName = 0x00000012; @@ -80,5 +80,7 @@ // Ignore product program config when TRUE const TUint32 KWebUtilsIgnoreConfig = 0x00000013; +// Browser Version Patch Rev +const TUint32 KWebUtilsBrowserVersionPatchRev = 0x00000014; #endif // WEBUTILSINTERNALCRKEYS_H diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/widget_registry_api/group/bld.inf --- a/web_plat/widget_registry_api/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/widget_registry_api/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -14,17 +14,17 @@ * Description: Build information for the Widget Registry API. * */ + #include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT PRJ_EXPORTS - -../inc/WidgetRegistryClient.h MW_LAYER_PLATFORM_EXPORT_PATH(WidgetRegistryClient.h) -../inc/WidgetPropertyValue.h MW_LAYER_PLATFORM_EXPORT_PATH(WidgetPropertyValue.h) -../inc/WidgetRegistryConstants.h MW_LAYER_PLATFORM_EXPORT_PATH(WidgetRegistryConstants.h) -../inc/WidgetRegistryData.h MW_LAYER_PLATFORM_EXPORT_PATH(WidgetRegistryData.h) +../inc/widgetregistryclient.h MW_LAYER_PLATFORM_EXPORT_PATH(widgetregistryclient.h) +../inc/widgetpropertyvalue.h MW_LAYER_PLATFORM_EXPORT_PATH(widgetpropertyvalue.h) +../inc/widgetregistryconstants.h MW_LAYER_PLATFORM_EXPORT_PATH(widgetregistryconstants.h) +../inc/widgetregistrydata.h MW_LAYER_PLATFORM_EXPORT_PATH(widgetregistrydata.h) PRJ_MMPFILES diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/widget_registry_api/inc/WidgetPropertyValue.h --- a/web_plat/widget_registry_api/inc/WidgetPropertyValue.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/widget_registry_api/inc/WidgetPropertyValue.h Mon Mar 29 12:27:15 2010 +0100 @@ -16,13 +16,12 @@ * */ - #ifndef WIDGETPROPERTYVALUE_H #define WIDGETPROPERTYVALUE_H #include #include -#include "WidgetRegistryConstants.h" +#include // serialize length = header + value const TInt32 KWidgetPropertyValSerializeMaxLength = 32 + KWidgetRegistryVal; diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/widget_registry_api/inc/WidgetRegistryConstants.h --- a/web_plat/widget_registry_api/inc/WidgetRegistryConstants.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/widget_registry_api/inc/WidgetRegistryConstants.h Mon Mar 29 12:27:15 2010 +0100 @@ -125,6 +125,9 @@ EFileSize, // int EUid, // TUid ENokiaWidget, // int 0 (not Nokia DTD) or 1 (Nokia DTD) + // Do not add enums prior to this, if you are adding enums here + // take into consideration the compatibility problems, i.e widgets working after firmware update. + EMiniViewEnable, //optional; int internally 0 0r 1 EBlanketPermGranted, //optional; int internally 0 0r 1 EPreInstalled, // optional; int internally 0 or 1 diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/widget_registry_api/inc/WidgetRegistryData.h --- a/web_plat/widget_registry_api/inc/WidgetRegistryData.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/widget_registry_api/inc/WidgetRegistryData.h Mon Mar 29 12:27:15 2010 +0100 @@ -21,7 +21,7 @@ // INCLUDES #include -#include "WidgetRegistryConstants.h" +#include // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/xml_parser_api/group/bld.inf --- a/web_plat/xml_parser_api/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/xml_parser_api/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -22,9 +22,10 @@ DEFAULT PRJ_EXPORTS +../inc/mxmlcontenthandler.h MW_LAYER_PLATFORM_EXPORT_PATH(mxmlcontenthandler.h) +../inc/rxmlreader.h MW_LAYER_PLATFORM_EXPORT_PATH(rxmlreader.h) +../inc/mwbxmlcontenthandler.h MW_LAYER_PLATFORM_EXPORT_PATH(mwbxmlcontenthandler.h) +../inc/mxmlattributes.h MW_LAYER_PLATFORM_EXPORT_PATH(mxmlattributes.h) +../inc/xmlutils.h MW_LAYER_PLATFORM_EXPORT_PATH(xmlutils.h) -../inc/MXMLContentHandler.h MW_LAYER_PLATFORM_EXPORT_PATH(MXMLContentHandler.h) -../inc/RXMLReader.h MW_LAYER_PLATFORM_EXPORT_PATH(RXMLReader.h) -../inc/MWBXMLContentHandler.h MW_LAYER_PLATFORM_EXPORT_PATH(MWBXMLContentHandler.h) -../inc/MXMLAttributes.h MW_LAYER_PLATFORM_EXPORT_PATH(MXMLAttributes.h) -../inc/XMLUtils.h MW_LAYER_PLATFORM_EXPORT_PATH(XMLUtils.h) +PRJ_MMPFILES diff -r 3dbb0284a087 -r 960a2a4c7f03 web_plat/xml_parser_api/inc/MXMLContentHandler.h --- a/web_plat/xml_parser_api/inc/MXMLContentHandler.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_plat/xml_parser_api/inc/MXMLContentHandler.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,26 +15,10 @@ * */ - - - - - - /** * DO NOT USE THIS API. DEPRECATED AND REMOVED IN S60 5.0. USE SYMBIAN XML FRAMEWORK INSTEAD. */ - - - - - - - - - - #ifndef __MXMLCONTENTHANDLER_H #define __MXMLCONTENTHANDLER_H diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/browser_control_api/group/bld.inf --- a/web_pub/browser_control_api/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/browser_control_api/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -14,40 +14,23 @@ * Description: * */ -#ifndef __BROWSER_SDK + #include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" -#endif +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS -DEFAULT GCCE +DEFAULT PRJ_EXPORTS -#ifndef __BROWSER_SDK - -../inc/BrCtlDefs.h MW_LAYER_PUBLIC_EXPORT_PATH(BrCtlDefs.h) -../inc/BrCtlDialogsProvider.h MW_LAYER_PUBLIC_EXPORT_PATH(BrCtlDialogsProvider.h) +../inc/brctldefs.h MW_LAYER_PUBLIC_EXPORT_PATH(brctldefs.h) +../inc/brctldialogsprovider.h MW_LAYER_PUBLIC_EXPORT_PATH(brctldialogsprovider.h) ../inc/brctlinterface.h MW_LAYER_PUBLIC_EXPORT_PATH(brctlinterface.h) -../inc/BrCtlLayoutObserver.h MW_LAYER_PUBLIC_EXPORT_PATH(BrCtlLayoutObserver.h) -../inc/BrCtlLinkResolver.h MW_LAYER_PUBLIC_EXPORT_PATH(BrCtlLinkResolver.h) -../inc/BrCtlSoftkeysObserver.h MW_LAYER_PUBLIC_EXPORT_PATH(BrCtlSoftkeysObserver.h) -../inc/BrCtlSpecialLoadObserver.h MW_LAYER_PUBLIC_EXPORT_PATH(BrCtlSpecialLoadObserver.h) -../inc/BrCtlWindowObserver.h MW_LAYER_PUBLIC_EXPORT_PATH(BrCtlWindowObserver.h) -../inc/BrCtlDownloadObserver.h MW_LAYER_PUBLIC_EXPORT_PATH(BrCtlDownloadObserver.h) - -#else - -../inc/BrCtlDefs.h /epoc32/include/BrCtlDefs.h -../inc/BrCtlDialogsProvider.h /epoc32/include/BrCtlDialogsProvider.h -../inc/brctlinterface.h /epoc32/include/brctlinterface.h -../inc/BrCtlLayoutObserver.h /epoc32/include/BrCtlLayoutObserver.h -../inc/BrCtlLinkResolver.h /epoc32/include/BrCtlLinkResolver.h -../inc/BrCtlSoftkeysObserver.h /epoc32/include/BrCtlSoftkeysObserver.h -../inc/BrCtlSpecialLoadObserver.h /epoc32/include/BrCtlSpecialLoadObserver.h -../inc/BrCtlWindowObserver.h /epoc32/include/BrCtlWindowObserver.h -../inc/BrCtlDownloadObserver.h /epoc32/include/BrCtlDownloadObserver.h - -#endif //#ifndef __BROWSER_SDK +../inc/brctllayoutobserver.h MW_LAYER_PUBLIC_EXPORT_PATH(brctllayoutobserver.h) +../inc/brctllinkresolver.h MW_LAYER_PUBLIC_EXPORT_PATH(brctllinkresolver.h) +../inc/brctlsoftkeysobserver.h MW_LAYER_PUBLIC_EXPORT_PATH(brctlsoftkeysobserver.h) +../inc/brctlspecialloadobserver.h MW_LAYER_PUBLIC_EXPORT_PATH(brctlspecialloadobserver.h) +../inc/brctlwindowobserver.h MW_LAYER_PUBLIC_EXPORT_PATH(brctlwindowobserver.h) +../inc/brctldownloadobserver.h MW_LAYER_PUBLIC_EXPORT_PATH(brctldownloadobserver.h) PRJ_MMPFILES diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/browser_control_api/inc/BrCtlDefs.h --- a/web_pub/browser_control_api/inc/BrCtlDefs.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/browser_control_api/inc/BrCtlDefs.h Mon Mar 29 12:27:15 2010 +0100 @@ -33,12 +33,12 @@ * Usage: * * @code -* #include +* #include * * @see S60 Platform: Browser Control API Developer's Guide Version 2.0 * @lib BrowserEngine.lib * @since 3.0 -* @file BrCtlDefs.h +* @file brctldefs.h * @endcode * */ class TBrCtlDefs @@ -470,6 +470,13 @@ * Browser cursor show mode -- some phone doesn't have cursor inside Browser */ ESettingsCursorShowMode, + + /* + * Enter key mode - default behavior is like in desktop browser - submit the form + * The alternative is to select the link is one is activated. + */ + ESettingsEnterKeyMode, + ESettingsMaxEnum ///< Must be last one }; @@ -825,6 +832,12 @@ ENoCursor = 0, EDefaultCursor }; + + enum TEnterKeySettings + { + EEnterKeyDefault = 0, + EEnterKeyCanActivateLink + }; }; #endif // BRCTLDEFS_H diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/browser_control_api/inc/BrCtlDialogsProvider.h --- a/web_pub/browser_control_api/inc/BrCtlDialogsProvider.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/browser_control_api/inc/BrCtlDialogsProvider.h Mon Mar 29 12:27:15 2010 +0100 @@ -73,12 +73,12 @@ * Usage: * * @code -* #include +* #include * * * @see S60 Platform: Browser Control API Developer's Guide Version 2.0 * @lib BrowserEngine.lib -* @file BrCtlDialogsProvider.h +* @file brctldialogsprovider.h * @endcode * */ class MBrCtlDialogsProvider @@ -270,10 +270,10 @@ * The TBrCtlSelectOptionData class represents a list of elements * to display in the list box. This class is used for the List Selection Dialog. * @code -* #include +* #include * @lib BrowserEngine.lib * @since 2.8 -* @file BrCtlDialogsProvider.h +* @file brctldialogsprovider.h * @endcode * */ class TBrCtlSelectOptionData @@ -399,10 +399,10 @@ * The CBrCtlObjectInfo class used to represent the information about the * plugin object. * @code -* #include +* #include * @lib BrowserEngine.lib * @since 3.0 -* @file BrCtlDialogsProvider.h +* @file brctldialogsprovider.h * @endcode * */ class CBrCtlObjectInfo : public CBase @@ -521,10 +521,10 @@ * TheTBrCtlImageCarrier class used to give the information about the * image. * @code -* #include +* #include * @lib BrowserEngine.lib * @since 2.8 -* @file BrCtlDialogsProvider.h +* @file brctldialogsprovider.h * @endcode * */ class TBrCtlImageCarrier diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/browser_control_api/inc/BrCtlDownloadObserver.h --- a/web_pub/browser_control_api/inc/BrCtlDownloadObserver.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/browser_control_api/inc/BrCtlDownloadObserver.h Mon Mar 29 12:27:15 2010 +0100 @@ -22,7 +22,7 @@ // INCLUDES #include #include -#include +#include // CONSTANTS @@ -86,12 +86,12 @@ * Usage: * * @code -* #include +* #include * * * @see S60 Platform: Browser Control API Developer's Guide Version 2.0 * @lib BrowserEngine.lib -* @file BrCtlDownloadObserver.h +* @file brctldownloadobserver.h * @endcode * */ class MBrCtlDownloadObserver diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/browser_control_api/inc/BrCtlInterface.h --- a/web_pub/browser_control_api/inc/BrCtlInterface.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/browser_control_api/inc/BrCtlInterface.h Mon Mar 29 12:27:15 2010 +0100 @@ -27,14 +27,14 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include // DATA TYPES @@ -108,27 +108,27 @@ * Usage: * * @code -* #include +* #include * // Interface that provides dialogs used by the Browser Control. -* #include +* #include * // Interface used to receive scrolling events. -* #include +* #include * //Interface that provides a callback mechanism for receiving the * //content of an embedded link or the content of a user-initiated * //load request. -* #include +* #include * //Interface that handles requests to change the softkeys. -* #include +* #include * //Interface that handles special load needs. -* #include +* #include * //Reserved for future use. -* #include +* #include * //Interface that passes download events from the * //Download Manager through the Browser Control to the * //host application. -* #include +* #include * Enum Definition of the Browser Control API. -* #include +* #include * * * The following types of things you can do with the Browser Control API. @@ -148,7 +148,7 @@ * @see S60 Platform: Browser Control API Developer's Guide Version 2.0 * @lib BrowserEngine.lib * @since 2.8 -* @file BrCtlInterface.h +* @file brctlinterface.h * @endcode * */ class CBrCtlInterface : public CCoeControl @@ -625,11 +625,11 @@ * Usage: * * @code -* #include +* #include * @see S60 Platform: Browser Control API Developer's Guide Version 2.0 * @lib BrowserEngine.lib * @since 2.8 -* @file BrCtlInterface.h +* @file brctlinterface.h * @endcode * */ class MBrCtlDataLoadSupplier @@ -650,11 +650,11 @@ * the Browser Control with the ability to receive content incrementally. * * @code -* #include +* #include * @see S60 Platform: Browser Control API Developer's Guide Version 2.0 * @lib BrowserEngine.lib * @since 2.8 -* @file BrCtlInterface.h +* @file brctlinterface.h * @endcode * */ class MBrCtlDataLoadConsumer @@ -690,11 +690,11 @@ * The host application can implement this interface. * * @code -* #include +* #include * @see S60 Platform: Browser Control API Developer's Guide Version 2.0 * @lib BrowserEngine.lib * @since 2.8 -* @file BrCtlInterface.h +* @file brctlinterface.h * @endcode * */ class MBrCtlLoadEventObserver @@ -715,10 +715,10 @@ * The TBrCtlWmlServiceOption class wraps information about the WML DO elements. * For more information about the DO tag, see http://www.w3schools.com/wap/tag_do.asp. * @code -* #include +* #include * @lib BrowserEngine.lib * @since 2.8 -* @file BrCtlInterface.h +* @file brctlinterface.h * @endcode * */ class TBrCtlWmlServiceOption @@ -777,10 +777,10 @@ /** * The TBrCtlSubscribeTo class provides information of Subscribe to items. * @code -* #include +* #include * @lib BrowserEngine.lib * @since 2.8 -* @file BrCtlInterface.h +* @file brctlinterface.h * @endcode * */ class TBrCtlSubscribeTo @@ -839,10 +839,10 @@ * implement this interface in order to find out when the view * changes to and from the Image Map view. * @code -* #include +* #include * @lib BrowserEngine.lib * @since 2.8 -* @file BrCtlInterface.h +* @file brctlinterface.h * @endcode * */ class MBrCtlStateChangeObserver diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/browser_control_api/inc/BrCtlLayoutObserver.h --- a/web_pub/browser_control_api/inc/BrCtlLayoutObserver.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/browser_control_api/inc/BrCtlLayoutObserver.h Mon Mar 29 12:27:15 2010 +0100 @@ -48,12 +48,12 @@ * Usage: * * @code -* #include +* #include * * * @see S60 Platform: Browser Control API Developer's Guide Version 2.0 * @lib BrowserEngine.lib -* @file BrCtlLayoutObserver.h +* @file brctllayoutobserver.h * @endcode * */ class MBrCtlLayoutObserver diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/browser_control_api/inc/BrCtlLinkResolver.h --- a/web_pub/browser_control_api/inc/BrCtlLinkResolver.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/browser_control_api/inc/BrCtlLinkResolver.h Mon Mar 29 12:27:15 2010 +0100 @@ -62,12 +62,12 @@ * Usage: * * @code -* #include +* #include * * * @see S60 Platform: Browser Control API Developer's Guide Version 2.0 * @lib BrowserEngine.lib -* @file BrCtlLinkResolver.h +* @file brctllinkresolver.h * @endcode * */ class MBrCtlLinkResolver @@ -124,12 +124,12 @@ * Usage: * * @code -* #include +* #include * * * @see S60 Platform: Browser Control API Developer's Guide Version 2.0 * @lib BrowserEngine.lib -* @file BrCtlLinkResolver.h +* @file brctllinkresolver.h * @endcode * */ class MBrCtlLinkContent diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/browser_control_api/inc/BrCtlSoftkeysObserver.h --- a/web_pub/browser_control_api/inc/BrCtlSoftkeysObserver.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/browser_control_api/inc/BrCtlSoftkeysObserver.h Mon Mar 29 12:27:15 2010 +0100 @@ -45,12 +45,12 @@ * Usage: * * @code -* #include +* #include * * * @see S60 Platform: Browser Control API Developer's Guide Version 2.0 * @lib BrowserEngine.lib -* @file BrCtlSoftkeysObserver.h +* @file brctlsoftkeysobserver.h * @endcode * */ class MBrCtlSoftkeysObserver diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/browser_control_api/inc/BrCtlSpecialLoadObserver.h --- a/web_pub/browser_control_api/inc/BrCtlSpecialLoadObserver.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/browser_control_api/inc/BrCtlSpecialLoadObserver.h Mon Mar 29 12:27:15 2010 +0100 @@ -63,12 +63,12 @@ * Usage: * * @code -* #include +* #include * * * @see S60 Platform: Browser Control API Developer's Guide Version 2.0 * @lib BrowserEngine.lib -* @file BrCtlSpecialLoadObserver.h +* @file brctlspecialloadobserver.h * @endcode * */ class MBrCtlSpecialLoadObserver diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/browser_control_api/inc/BrCtlWindowObserver.h --- a/web_pub/browser_control_api/inc/BrCtlWindowObserver.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/browser_control_api/inc/BrCtlWindowObserver.h Mon Mar 29 12:27:15 2010 +0100 @@ -22,7 +22,7 @@ // INCLUDES #include #include -#include +#include // CONSTANTS @@ -48,12 +48,12 @@ * Usage: * * @code -* #include +* #include * * @see S60 Platform: Browser Control API Developer's Guide Version 2.0 * @lib BrowserEngine.lib * @since 3.0 -* @file BrCtlWindowObserver.h +* @file brctlwindowobserver.h * @endcode * */ class MBrCtlWindowObserver diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/browser_control_api/tsrc/conf/ui_browser_control_api.cfg --- a/web_pub/browser_control_api/tsrc/conf/ui_browser_control_api.cfg Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/browser_control_api/tsrc/conf/ui_browser_control_api.cfg Mon Mar 29 12:27:15 2010 +0100 @@ -312,14 +312,7 @@ delete container [Endtest] -[Test] -title HandleCommandShowHistory BC Test -create BrCtlApiTest container -container CreateBrowserControl -container HandleCommand ShowHistory -container DestroyBrowserControl -delete container -[Endtest] + [Test] title HandleCommandDisconnect2 BC Test @@ -375,14 +368,7 @@ delete container [Endtest] -[Test] -title HandleCommandRemoveFileName BC Test -create BrCtlApiTest container -container CreateBrowserControl -container HandleCommand RemoveFileName -container DestroyBrowserControl -delete container -[Endtest] + [Test] title HandleCommandShowImages BC Test diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/browser_control_api/tsrc/group/BrCtlApiTest.mmp --- a/web_pub/browser_control_api/tsrc/group/BrCtlApiTest.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/browser_control_api/tsrc/group/BrCtlApiTest.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -37,12 +37,11 @@ MW_LAYER_SYSTEMINCLUDE SYSTEMINCLUDE . -MW_LAYER_ECOM_SYSTEMINCLUDE SOURCEPATH ../src -SOURCE BrCtlApiTest.cpp BrCtlApiTestBlocks.cpp -SOURCE BrCtlApiTestContainer.cpp BrCtlApiTestObserver.cpp -SOURCE BrCtlApiTestStateChangeObserver.cpp BrCtlApiTestDialogsProvider.cpp +SOURCE brctlapitest.cpp brctlapitestblocks.cpp +SOURCE brctlapitestcontainer.cpp brctlapitestobserver.cpp +SOURCE brctlapiteststatechangeobserver.cpp brctlapitestdialogsprovider.cpp LIBRARY euser.lib cone.lib eikcore.lib apparc.lib avkon.lib LIBRARY flogger.lib apmime.lib apgrfx.lib efsrv.lib eikcoctl.lib diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/browser_control_api/tsrc/inc/BrCtlApiTest.h --- a/web_pub/browser_control_api/tsrc/inc/BrCtlApiTest.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/browser_control_api/tsrc/inc/BrCtlApiTest.h Mon Mar 29 12:27:15 2010 +0100 @@ -26,7 +26,7 @@ #include #include -#include "BrCtlApiTestContainer.h" +#include "brctlapitestcontainer.h" // CONSTANTS //const ?type ?constant_var = ?constant; diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/browser_control_api/tsrc/inc/BrCtlApiTestContainer.h --- a/web_pub/browser_control_api/tsrc/inc/BrCtlApiTestContainer.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/browser_control_api/tsrc/inc/BrCtlApiTestContainer.h Mon Mar 29 12:27:15 2010 +0100 @@ -20,11 +20,11 @@ // INCLUDES #include -#include // interface under test +#include // interface under test -#include "BrCtlApiTestObserver.h" -#include "BrCtlApiTestStateChangeObserver.h" -#include "BrCtlApiTestDialogsProvider.h" +#include "brctlapitestobserver.h" +#include "brctlapiteststatechangeobserver.h" +#include "brctlapitestdialogsprovider.h" // CONSTATNS const TInt KThisAppUid = 0xA0000181; diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/browser_control_api/tsrc/inc/BrCtlApiTestDialogsProvider.h --- a/web_pub/browser_control_api/tsrc/inc/BrCtlApiTestDialogsProvider.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/browser_control_api/tsrc/inc/BrCtlApiTestDialogsProvider.h Mon Mar 29 12:27:15 2010 +0100 @@ -25,7 +25,7 @@ // User includes // System Includes -#include +#include //#include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/browser_control_api/tsrc/inc/BrCtlApiTestObserver.h --- a/web_pub/browser_control_api/tsrc/inc/BrCtlApiTestObserver.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/browser_control_api/tsrc/inc/BrCtlApiTestObserver.h Mon Mar 29 12:27:15 2010 +0100 @@ -21,11 +21,11 @@ #define BRCTLBCTESTOBSERVER_H // INCLUDES -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/browser_control_api/tsrc/inc/BrCtlApiTestStateChangeObserver.h --- a/web_pub/browser_control_api/tsrc/inc/BrCtlApiTestStateChangeObserver.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/browser_control_api/tsrc/inc/BrCtlApiTestStateChangeObserver.h Mon Mar 29 12:27:15 2010 +0100 @@ -21,7 +21,7 @@ #define BRCTLBCTESTSTATECHANGEOBSERVER_H // INCLUDES -#include +#include // FORWARD DECLARATIONS class CBrCtlApiTestContainer; diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/browser_control_api/tsrc/src/BrCtlApiTest.cpp --- a/web_pub/browser_control_api/tsrc/src/BrCtlApiTest.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/browser_control_api/tsrc/src/BrCtlApiTest.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -18,7 +18,7 @@ // INCLUDE FILES #include -#include "BrCtlApiTest.h" +#include "brctlapitest.h" #include // ============================= LOCAL FUNCTIONS =============================== diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/browser_control_api/tsrc/src/BrCtlApiTestBlocks.cpp --- a/web_pub/browser_control_api/tsrc/src/BrCtlApiTestBlocks.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/browser_control_api/tsrc/src/BrCtlApiTestBlocks.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -21,7 +21,7 @@ #include #include #include -#include "BrCtlApiTest.h" +#include "brctlapitest.h" #define RETURN_FAILURE_ON_ERROR \ if ( err ) \ diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/browser_control_api/tsrc/src/BrCtlApiTestContainer.cpp --- a/web_pub/browser_control_api/tsrc/src/BrCtlApiTestContainer.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/browser_control_api/tsrc/src/BrCtlApiTestContainer.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -16,14 +16,14 @@ */ // INCLUDE FILES -#include "BrCtlApiTestContainer.h" +#include "brctlapitestcontainer.h" #include // for example label control #include #include -#include +#include #include -#include "BrCtlApiTestObserver.h" +#include "brctlapitestobserver.h" #include _LIT8( KContentDataType, "text/html" ); diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/browser_control_api/tsrc/src/BrCtlApiTestDialogsProvider.cpp --- a/web_pub/browser_control_api/tsrc/src/BrCtlApiTestDialogsProvider.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/browser_control_api/tsrc/src/BrCtlApiTestDialogsProvider.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -23,7 +23,7 @@ #include // User includes -#include "BrCtlApiTestDialogsProvider.h" +#include "brctlapitestdialogsprovider.h" // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/browser_control_api/tsrc/src/BrCtlApiTestObserver.cpp --- a/web_pub/browser_control_api/tsrc/src/BrCtlApiTestObserver.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/browser_control_api/tsrc/src/BrCtlApiTestObserver.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -21,7 +21,7 @@ #include #include #include -#include "BrCtlApiTestObserver.h" +#include "brctlapitestobserver.h" #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/browser_control_api/tsrc/src/BrCtlApiTestStateChangeObserver.cpp --- a/web_pub/browser_control_api/tsrc/src/BrCtlApiTestStateChangeObserver.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/browser_control_api/tsrc/src/BrCtlApiTestStateChangeObserver.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,8 +17,8 @@ // INCLUDE FILES -#include "BrCtlApiTestContainer.h" -#include "BrCtlApiTestStateChangeObserver.h" +#include "brctlapitestcontainer.h" +#include "brctlapiteststatechangeobserver.h" // ================= MEMBER FUNCTIONS ======================= diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/browser_plugin_api/group/bld.inf --- a/web_pub/browser_plugin_api/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/browser_plugin_api/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -14,24 +14,22 @@ * Description: * */ -#ifndef __BROWSER_SDK + #include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" -#endif +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS -DEFAULT GCCE +DEFAULT PRJ_EXPORTS - -../inc/BrowserPluginInterface.h MW_LAYER_PUBLIC_EXPORT_PATH(BrowserPluginInterface.h) -../inc/CEcomBrowserPluginInterface.h MW_LAYER_PUBLIC_EXPORT_PATH(CEcomBrowserPluginInterface.h) +../inc/browserplugininterface.h MW_LAYER_PUBLIC_EXPORT_PATH(browserplugininterface.h) +../inc/cecombrowserplugininterface.h MW_LAYER_PUBLIC_EXPORT_PATH(cecombrowserplugininterface.h) ../inc/npapi.h MW_LAYER_PUBLIC_EXPORT_PATH(npapi.h) ../inc/np_defines.h MW_LAYER_PUBLIC_EXPORT_PATH(np_defines.h) ../inc/npupp.h MW_LAYER_PUBLIC_EXPORT_PATH(npupp.h) ../inc/jri.h MW_LAYER_PUBLIC_EXPORT_PATH(jri.h) ../inc/prcpucfg.h MW_LAYER_PUBLIC_EXPORT_PATH(prcpucfg.h) -../inc/PluginAdapterInterface.h MW_LAYER_PUBLIC_EXPORT_PATH(PluginAdapterInterface.h) +../inc/pluginadapterinterface.h MW_LAYER_PUBLIC_EXPORT_PATH(pluginadapterinterface.h) ../inc/prtypes.h MW_LAYER_PUBLIC_EXPORT_PATH(prtypes.h) ../inc/obsolete/protypes.h MW_LAYER_PUBLIC_EXPORT_PATH(obsolete/protypes.h) diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/browser_plugin_api/inc/CEcomBrowserPluginInterface.h --- a/web_pub/browser_plugin_api/inc/CEcomBrowserPluginInterface.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/browser_plugin_api/inc/CEcomBrowserPluginInterface.h Mon Mar 29 12:27:15 2010 +0100 @@ -23,8 +23,8 @@ #include // User includes -#include "npupp.h" -#include "BrowserPluginInterface.h" +#include +#include typedef struct { diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/browser_plugin_api/inc/PluginAdapterInterface.h --- a/web_pub/browser_plugin_api/inc/PluginAdapterInterface.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/browser_plugin_api/inc/PluginAdapterInterface.h Mon Mar 29 12:27:15 2010 +0100 @@ -20,9 +20,9 @@ #define MPLUGINADAPTER_H // INCLUDES -#include "coecntrl.h" -#include "coecobs.h" -#include "npupp.h" +#include +#include +#include // FORWARD DECLARATIONS class MPluginNotifier; diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/download_mgr_client_api/group/bld.inf --- a/web_pub/download_mgr_client_api/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/download_mgr_client_api/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -14,14 +14,15 @@ * Description: Build information for the Download Mgr Server. * */ + #include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT PRJ_EXPORTS -../inc/DownloadMgrClient.h MW_LAYER_PUBLIC_EXPORT_PATH(DownloadMgrClient.h) -../inc/HttpDownloadMgrCommon.h MW_LAYER_PUBLIC_EXPORT_PATH(HttpDownloadMgrCommon.h) +../inc/downloadmgrclient.h MW_LAYER_PUBLIC_EXPORT_PATH(downloadmgrclient.h) +../inc/httpdownloadmgrcommon.h MW_LAYER_PUBLIC_EXPORT_PATH(httpdownloadmgrcommon.h) PRJ_MMPFILES diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/download_mgr_client_api/inc/DownloadMgrClient.h --- a/web_pub/download_mgr_client_api/inc/DownloadMgrClient.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/download_mgr_client_api/inc/DownloadMgrClient.h Mon Mar 29 12:27:15 2010 +0100 @@ -22,7 +22,7 @@ // INCLUDES #include #include -#include +#include #include // FORWARD DECLARATIONS @@ -116,6 +116,7 @@ * @lib - * @since Series 60 2.8 */ + NONSHARABLE_CLASS( RHttpDownloadMgr ) : public RSessionBase, public MHttpDownloadMgrObserver { @@ -364,6 +365,13 @@ * @return None. */ IMPORT_C void SetNextUriObserver( MHttpDownloadMgrNextUriObserver* aObserver ); + + /** + * Checks for possibility of a new donload + * @param None + * @return TBool,possibility of a new download. + */ + TBool IsNewDownloadPossible(); protected: // from MHttpDownloadMgrObserver diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/download_mgr_client_api/tsrc/group/DownloadMgrClientApiTest.mmp --- a/web_pub/download_mgr_client_api/tsrc/group/DownloadMgrClientApiTest.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/download_mgr_client_api/tsrc/group/DownloadMgrClientApiTest.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -30,9 +30,9 @@ DEFFILE DownloadMgrClientApiTest.def SOURCEPATH ../src -SOURCE DownloadMgrClientApiTest.cpp -SOURCE RHttpDownloadTestCases.cpp -SOURCE RHttpDownloadMgrTestCases.cpp +SOURCE downloadmgrclientapitest.cpp +SOURCE rhttpdownloadtestcases.cpp +SOURCE rhttpdownloadmgrtestcases.cpp USERINCLUDE ../inc MW_LAYER_SYSTEMINCLUDE diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/download_mgr_client_api/tsrc/inc/DownloadMgrClientApiTest.h --- a/web_pub/download_mgr_client_api/tsrc/inc/DownloadMgrClientApiTest.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/download_mgr_client_api/tsrc/inc/DownloadMgrClientApiTest.h Mon Mar 29 12:27:15 2010 +0100 @@ -24,8 +24,8 @@ #include #include #include -#include -#include +#include +#include // CONSTANTS const TInt KThisAppUid = 0x101FB3E7; diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/download_mgr_client_api/tsrc/src/DownloadMgrClientApiTest.cpp --- a/web_pub/download_mgr_client_api/tsrc/src/DownloadMgrClientApiTest.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/download_mgr_client_api/tsrc/src/DownloadMgrClientApiTest.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -19,7 +19,7 @@ // INCLUDE FILES #include -#include "DownloadMgrClientApiTest.h" +#include "downloadmgrclientapitest.h" // EXTERNAL DATA STRUCTURES //extern ?external_data; diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/download_mgr_client_api/tsrc/src/RHttpDownloadMgrTestCases.cpp --- a/web_pub/download_mgr_client_api/tsrc/src/RHttpDownloadMgrTestCases.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/download_mgr_client_api/tsrc/src/RHttpDownloadMgrTestCases.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -21,7 +21,7 @@ // INCLUDE FILES #include #include -#include "DownloadMgrClientApiTest.h" +#include "downloadmgrclientapitest.h" // EXTERNAL DATA STRUCTURES // None diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/download_mgr_client_api/tsrc/src/RHttpDownloadTestCases.cpp --- a/web_pub/download_mgr_client_api/tsrc/src/RHttpDownloadTestCases.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/download_mgr_client_api/tsrc/src/RHttpDownloadTestCases.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -20,7 +20,7 @@ // INCLUDE FILES #include -#include "DownloadMgrClientApiTest.h" +#include "downloadmgrclientapitest.h" // EXTERNAL DATA STRUCTURES // None diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/download_mgr_ui_api/group/Bld.inf --- a/web_pub/download_mgr_ui_api/group/Bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/download_mgr_ui_api/group/Bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -14,25 +14,23 @@ * Description: * */ + #include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS - DEFAULT PRJ_EXPORTS - -../Inc/CDownloadMgrUiBase.h MW_LAYER_PUBLIC_EXPORT_PATH(CDownloadMgrUiBase.h) -../Inc/CDownloadMgrUiUserInteractions.h MW_LAYER_PUBLIC_EXPORT_PATH(CDownloadMgrUiUserInteractions.h) -../Inc/CDownloadMgrUiDownloadsList.h MW_LAYER_PUBLIC_EXPORT_PATH(CDownloadMgrUiDownloadsList.h) -../Inc/DownloadsListDlgObserver.h MW_LAYER_PUBLIC_EXPORT_PATH(DownloadsListDlgObserver.h) -../Inc/CDownloadMgrUiDownloadMenu.h MW_LAYER_PUBLIC_EXPORT_PATH(CDownloadMgrUiDownloadMenu.h) -../Inc/CDownloadMgrUiLibRegistry.h MW_LAYER_PUBLIC_EXPORT_PATH(CDownloadMgrUiLibRegistry.h) +../Inc/cdownloadmgruibase.h MW_LAYER_PUBLIC_EXPORT_PATH(cdownloadmgruibase.h) +../Inc/cdownloadmgruiuserinteractions.h MW_LAYER_PUBLIC_EXPORT_PATH(cdownloadmgruiuserinteractions.h) +../Inc/cdownloadmgruidownloadslist.h MW_LAYER_PUBLIC_EXPORT_PATH(cdownloadmgruidownloadslist.h) +../Inc/downloadslistdlgobserver.h MW_LAYER_PUBLIC_EXPORT_PATH(downloadslistdlgobserver.h) +../Inc/cdownloadmgruidownloadmenu.h MW_LAYER_PUBLIC_EXPORT_PATH(cdownloadmgruidownloadmenu.h) +../Inc/cdownloadmgruilibregistry.h MW_LAYER_PUBLIC_EXPORT_PATH(cdownloadmgruilibregistry.h) PRJ_MMPFILES PRJ_TESTMMPFILES // End of File - diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/download_mgr_ui_api/inc/CDownloadMgrUiDownloadsList.h --- a/web_pub/download_mgr_ui_api/inc/CDownloadMgrUiDownloadsList.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/download_mgr_ui_api/inc/CDownloadMgrUiDownloadsList.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,16 +15,14 @@ * */ - - #ifndef CDOWNLOADMGRUIDOWNLOADSLIST_H #define CDOWNLOADMGRUIDOWNLOADSLIST_H // INCLUDES -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -151,12 +149,12 @@ * @return TBool */ inline TBool GetDownloadHide() { return iDownloadListHide; } - +#ifdef BRDO_SINGLE_CLICK_ENABLED_FF /** - * Sets the value of downloadlist hide - * @return void + * Adding Aiw Commands to the given MenuPane */ - virtual void SetDownloadListHide( TBool aHide ); + void AIWPlugInMenusL(TInt aResourceId,CEikMenuPane* aMenuPane); +#endif public: // Functions from CDownloadMgrUiBase @@ -250,6 +248,13 @@ void LaunchFileManagerApplication(); + public: + /** + * Sets the value of downloadlist hide + * @return void + */ + void SetDownloadListHide( TBool aHide ); + private: // Data CDownloadsListExtension* iExtension; ///< Extension class. Owned. diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/download_mgr_ui_api/inc/CDownloadMgrUiUserInteractions.h --- a/web_pub/download_mgr_ui_api/inc/CDownloadMgrUiUserInteractions.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/download_mgr_ui_api/inc/CDownloadMgrUiUserInteractions.h Mon Mar 29 12:27:15 2010 +0100 @@ -21,8 +21,8 @@ #define CDOWNLOADMGRUIUSERINTERACTIONS_H // INCLUDES -#include -#include +#include +#include #include // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/download_mgr_ui_api/inc/DownloadsListDlgObserver.h --- a/web_pub/download_mgr_ui_api/inc/DownloadsListDlgObserver.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/download_mgr_ui_api/inc/DownloadsListDlgObserver.h Mon Mar 29 12:27:15 2010 +0100 @@ -65,6 +65,12 @@ * setting the downloadlist hide to the observer. */ virtual void SetDownloadListHide( TBool aHide ) = 0; +#ifdef BRDO_SINGLE_CLICK_ENABLED_FF + /** + * Adding Aiw Commands for the given MenuPane to the observer. + */ + virtual void AIWPlugInMenusL(TInt aResourceId,CEikMenuPane* aMenuPane) = 0; +#endif }; #endif /* DOWNLOADSLISTDLGOBSERVER_H */ diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/favourites_engine_api/group/bld.inf --- a/web_pub/favourites_engine_api/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/favourites_engine_api/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -14,8 +14,9 @@ * Description: Build information for the Favourites Engine * */ + #include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT @@ -23,28 +24,23 @@ PRJ_EXPORTS // Common code -../inc/FavouritesDb.h MW_LAYER_PUBLIC_EXPORT_PATH(FavouritesDb.h) -../inc/FavouritesFile.h MW_LAYER_PUBLIC_EXPORT_PATH(FavouritesFile.h) -../inc/FavouritesFile.inl MW_LAYER_PUBLIC_EXPORT_PATH(FavouritesFile.inl) -../inc/FavouritesDbIncremental.h MW_LAYER_PUBLIC_EXPORT_PATH(FavouritesDbIncremental.h) -../inc/FavouritesDbNotifier.h MW_LAYER_PUBLIC_EXPORT_PATH(FavouritesDbNotifier.h) -../inc/FavouritesDbObserver.h MW_LAYER_PUBLIC_EXPORT_PATH(FavouritesDbObserver.h) -../inc/ActiveFavouritesDbNotifier.h MW_LAYER_PUBLIC_EXPORT_PATH(ActiveFavouritesDbNotifier.h) -../inc/FavouritesItem.h MW_LAYER_PUBLIC_EXPORT_PATH(FavouritesItem.h) -../inc/FavouritesLimits.h MW_LAYER_PUBLIC_EXPORT_PATH(FavouritesLimits.h) -../inc/FavouritesWapAp.h MW_LAYER_PUBLIC_EXPORT_PATH(FavouritesWapAp.h) -../inc/FavouritesItemList.h MW_LAYER_PUBLIC_EXPORT_PATH(FavouritesItemList.h) -../inc/FavouritesItemData.h MW_LAYER_PUBLIC_EXPORT_PATH(FavouritesItemData.h) -../inc/FavouritesSession.h MW_LAYER_PUBLIC_EXPORT_PATH(FavouritesSession.h) -../inc/FavouritesSession.inl MW_LAYER_PUBLIC_EXPORT_PATH(FavouritesSession.inl) -../inc/FavouritesHandle.h MW_LAYER_PUBLIC_EXPORT_PATH(FavouritesHandle.h) -../inc/FavouritesHandle.inl MW_LAYER_PUBLIC_EXPORT_PATH(FavouritesHandle.inl) - - +../inc/favouritesdb.h MW_LAYER_PUBLIC_EXPORT_PATH(favouritesdb.h) +../inc/favouritesfile.h MW_LAYER_PUBLIC_EXPORT_PATH(favouritesfile.h) +../inc/favouritesfile.inl MW_LAYER_PUBLIC_EXPORT_PATH(favouritesfile.inl) +../inc/favouritesdbincremental.h MW_LAYER_PUBLIC_EXPORT_PATH(favouritesdbincremental.h) +../inc/favouritesdbnotifier.h MW_LAYER_PUBLIC_EXPORT_PATH(favouritesdbnotifier.h) +../inc/favouritesdbobserver.h MW_LAYER_PUBLIC_EXPORT_PATH(favouritesdbobserver.h) +../inc/activefavouritesdbnotifier.h MW_LAYER_PUBLIC_EXPORT_PATH(activefavouritesdbnotifier.h) +../inc/favouritesitem.h MW_LAYER_PUBLIC_EXPORT_PATH(favouritesitem.h) +../inc/favouriteslimits.h MW_LAYER_PUBLIC_EXPORT_PATH(favouriteslimits.h) +../inc/favouriteswapap.h MW_LAYER_PUBLIC_EXPORT_PATH(favouriteswapap.h) +../inc/favouritesitemlist.h MW_LAYER_PUBLIC_EXPORT_PATH(favouritesitemlist.h) +../inc/favouritesitemdata.h MW_LAYER_PUBLIC_EXPORT_PATH(favouritesitemdata.h) +../inc/favouritessession.h MW_LAYER_PUBLIC_EXPORT_PATH(favouritessession.h) +../inc/favouritessession.inl MW_LAYER_PUBLIC_EXPORT_PATH(favouritessession.inl) +../inc/favouriteshandle.h MW_LAYER_PUBLIC_EXPORT_PATH(favouriteshandle.h) +../inc/favouriteshandle.inl MW_LAYER_PUBLIC_EXPORT_PATH(favouriteshandle.inl) PRJ_MMPFILES - PRJ_TESTMMPFILES - - diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/favourites_engine_api/inc/ActiveFavouritesDbNotifier.h --- a/web_pub/favourites_engine_api/inc/ActiveFavouritesDbNotifier.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/favourites_engine_api/inc/ActiveFavouritesDbNotifier.h Mon Mar 29 12:27:15 2010 +0100 @@ -23,7 +23,7 @@ #include #include -#include +#include // FORWARD DECLARATION diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/favourites_engine_api/inc/FavouritesDb.h --- a/web_pub/favourites_engine_api/inc/FavouritesDb.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/favourites_engine_api/inc/FavouritesDb.h Mon Mar 29 12:27:15 2010 +0100 @@ -23,10 +23,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include // FORWARD DECLARATIONS diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/favourites_engine_api/inc/FavouritesDbIncremental.h --- a/web_pub/favourites_engine_api/inc/FavouritesDbIncremental.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/favourites_engine_api/inc/FavouritesDbIncremental.h Mon Mar 29 12:27:15 2010 +0100 @@ -21,7 +21,7 @@ // INCLUDES -#include +#include // FORWARD DECLARATIONS diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/favourites_engine_api/inc/FavouritesDbNotifier.h --- a/web_pub/favourites_engine_api/inc/FavouritesDbNotifier.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/favourites_engine_api/inc/FavouritesDbNotifier.h Mon Mar 29 12:27:15 2010 +0100 @@ -21,7 +21,7 @@ // INCLUDES -#include +#include // FORWARD DECLARATIONS diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/favourites_engine_api/inc/FavouritesFile.h --- a/web_pub/favourites_engine_api/inc/FavouritesFile.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/favourites_engine_api/inc/FavouritesFile.h Mon Mar 29 12:27:15 2010 +0100 @@ -21,7 +21,7 @@ // INCLUDES -#include +#include // FORWARD DECLARATION @@ -118,7 +118,7 @@ }; -#include +#include #endif diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/favourites_engine_api/inc/FavouritesHandle.h --- a/web_pub/favourites_engine_api/inc/FavouritesHandle.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/favourites_engine_api/inc/FavouritesHandle.h Mon Mar 29 12:27:15 2010 +0100 @@ -22,7 +22,7 @@ // INCLUDES #include -#include +#include // CLASS DECLARATION @@ -126,7 +126,7 @@ }; -#include +#include #endif diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/favourites_engine_api/inc/FavouritesItem.h --- a/web_pub/favourites_engine_api/inc/FavouritesItem.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/favourites_engine_api/inc/FavouritesItem.h Mon Mar 29 12:27:15 2010 +0100 @@ -22,8 +22,8 @@ // INCLUDES #include -#include -#include +#include +#include // FORWARD DECLARATION diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/favourites_engine_api/inc/FavouritesSession.h --- a/web_pub/favourites_engine_api/inc/FavouritesSession.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/favourites_engine_api/inc/FavouritesSession.h Mon Mar 29 12:27:15 2010 +0100 @@ -134,6 +134,6 @@ #endif -#include +#include // End of File diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/favourites_engine_api/tsrc/group/FavouritesEngineTest.mmp --- a/web_pub/favourites_engine_api/tsrc/group/FavouritesEngineTest.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/favourites_engine_api/tsrc/group/FavouritesEngineTest.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -31,17 +31,17 @@ DEFFILE FavouritesEngineTest.def SOURCEPATH ../src -SOURCE FavouritesEngineTest.cpp -SOURCE FavouritesItemTestCases.cpp -SOURCE FavouritesItemListTestCases.cpp -SOURCE FavouritesDbTestCases.cpp -SOURCE FavouritesWapApTestCases.cpp -SOURCE FavouritesDbIncrementalTestCases.cpp -SOURCE FavouritesFileTestCases.cpp -SOURCE FavouritesSessionTestCases.cpp -SOURCE FavouritesNotifierTestCases.cpp -SOURCE FavouritesItemTestData.cpp -SOURCE FavouritesDbTestObserver.cpp +SOURCE favouritesenginetest.cpp +SOURCE favouritesitemtestcases.cpp +SOURCE favouritesitemlisttestcases.cpp +SOURCE favouritesdbtestcases.cpp +SOURCE favouriteswapaptestcases.cpp +SOURCE favouritesdbincrementaltestcases.cpp +SOURCE favouritesfiletestcases.cpp +SOURCE favouritessessiontestcases.cpp +SOURCE favouritesnotifiertestcases.cpp +SOURCE favouritesitemtestdata.cpp +SOURCE favouritesdbtestobserver.cpp USERINCLUDE ../inc SYSTEMINCLUDE ../../inc diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/favourites_engine_api/tsrc/inc/FavouritesDbTestObserver.h --- a/web_pub/favourites_engine_api/tsrc/inc/FavouritesDbTestObserver.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/favourites_engine_api/tsrc/inc/FavouritesDbTestObserver.h Mon Mar 29 12:27:15 2010 +0100 @@ -22,8 +22,8 @@ // INCLUDES #include -#include -#include "FavouritesEngineTest.h" +#include +#include "favouritesenginetest.h" // FORWARD DECLARATION diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/favourites_engine_api/tsrc/inc/FavouritesEngineTest.h --- a/web_pub/favourites_engine_api/tsrc/inc/FavouritesEngineTest.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/favourites_engine_api/tsrc/inc/FavouritesEngineTest.h Mon Mar 29 12:27:15 2010 +0100 @@ -1,22 +1,25 @@ /* -* Copyright (c) 2002 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 "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* ============================================================================== +* Name : favouritesenginetest.h +* Part of : ?Subsystem_name / FavouritesEngineTest +* +* Description : FavouritesEngineTest test module. +* Version: 0.5 * -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: +* Copyright (C) 2002 Nokia Corporation. +* This material, including documentation and any related +* computer programs, is protected by copyright controlled by +* Nokia Corporation. All rights are reserved. Copying, +* including reproducing, storing, adapting or translating, any +* or all of this material requires the prior written consent of +* Nokia Corporation. This material also contains confidential +* information which may not be disclosed to others without the +* prior written consent of Nokia Corporation. * -* Description: FavouritesEngineTest test module. -* +* ============================================================================ */ - #ifndef FAVOURITESENGINETEST_H #define FAVOURITESENGINETEST_H @@ -24,16 +27,16 @@ #include "StifTestModule.h" #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include //#include -#include -#include -#include -#include "FavouritesItemTestData.h" +#include +#include +#include +#include "favouritesitemtestdata.h" // CONSTANTS _LIT( KTestDbName, "Test" ); @@ -342,6 +345,24 @@ TInt ItemAssignTestL( TTestResult& aResult ); /** + * FavouritesItem Assign(=) operator test case. + * @since ?Series60_version + * @param aResult Test case result (PASS/FAIL) + * @return Symbian OS error code (test case execution error + * that is not returned as test case result in aResult) + */ + TInt ItemAssignSelfTestL( TTestResult& aResult ); + + /** + * FavouritesItem Assign(=) operator test case. + * @since ?Series60_version + * @param aResult Test case result (PASS/FAIL) + * @return Symbian OS error code (test case execution error + * that is not returned as test case result in aResult) + */ + TInt ItemAssignCompleteTestL( TTestResult& aResult ); + + /** * FavouritesItem Uid test case. * @since ?Series60_version * @param aResult Test case result (PASS/FAIL) @@ -432,13 +453,32 @@ TInt ItemIsItemTestL( TTestResult& aResult ); /** - * FavouritesItem IsFolder test case. + * FavouritesItem IsItemEFolder test case. * @since ?Series60_version * @param aResult Test case result (PASS/FAIL) * @return Symbian OS error code (test case execution error * that is not returned as test case result in aResult) */ + TInt ItemIsItemEFolderTestL( TTestResult& aResult ); + + /** + * FavouritesItem IsFolder test case for type EItem. + * @since ?Series60_version + * @param aResult Test case result (PASS/FAIL) + * @return Symbian OS error code (test case execution error + * that is not returned as test case result in aResult) + */ + TInt ItemIsFolderTestL( TTestResult& aResult ); + /** + * FavouritesItem IsFolder test case for type EFolder. + * @since ?Series60_version + * @param aResult Test case result (PASS/FAIL) + * @return Symbian OS error code (test case execution error + * that is not returned as test case result in aResult) + */ + + TInt ItemIsFolderEFolderTestL( TTestResult& aResult ); /** * FavouritesItem IsFactoryItem test case. @@ -495,6 +535,15 @@ TInt ItemSetTypeTestL( TTestResult& aResult ); /** + * FavouritesItem SetTypeNone test case. + * @since ?Series60_version + * @param aResult Test case result (PASS/FAIL) + * @return Symbian OS error code (test case execution error + * that is not returned as test case result in aResult) + */ + TInt ItemSetTypeNoneTestL( TTestResult& aResult ); + + /** * FavouritesItem SetNameL test case. * @since ?Series60_version * @param aResult Test case result (PASS/FAIL) @@ -504,6 +553,60 @@ TInt ItemSetNameLTestL( TTestResult& aResult ); /** + * FavouritesItem ItemSetNameMaxLengthTruncateLTestL test case. + * @since ?Series60_version + * @param aResult Test case result (PASS/FAIL) + * @return Symbian OS error code (test case execution error + * that is not returned as test case result in aResult) + */ + TInt ItemSetNameMaxLengthTruncateLTestL( TTestResult& aResult ); + + /** + * FavouritesItem ItemSetNameTrimStringLTestL test case. + * @since ?Series60_version + * @param aResult Test case result (PASS/FAIL) + * @return Symbian OS error code (test case execution error + * that is not returned as test case result in aResult) + */ + TInt ItemSetNameTrimStringLTestL( TTestResult& aResult ); + + /** + * FavouritesItem ItemSetNameRTLMarkLTestL test case. + * @since ?Series60_version + * @param aResult Test case result (PASS/FAIL) + * @return Symbian OS error code (test case execution error + * that is not returned as test case result in aResult) + */ + TInt ItemSetNameRTLMarkLTestL( TTestResult& aResult ); + + /** + * FavouritesItem ItemSetNameEmptyStringLTestL test case. + * @since ?Series60_version + * @param aResult Test case result (PASS/FAIL) + * @return Symbian OS error code (test case execution error + * that is not returned as test case result in aResult) + */ + TInt ItemSetNameEmptyStringLTestL( TTestResult& aResult ); + + /** + * FavouritesItem ItemSetNameWhiteSpaceLTestL test case. + * @since ?Series60_version + * @param aResult Test case result (PASS/FAIL) + * @return Symbian OS error code (test case execution error + * that is not returned as test case result in aResult) + */ + TInt ItemSetNameWhiteSpaceLTestL( TTestResult& aResult ); + + /** + * FavouritesItem SetNameFolderL test case. + * @since ?Series60_version + * @param aResult Test case result (PASS/FAIL) + * @return Symbian OS error code (test case execution error + * that is not returned as test case result in aResult) + */ + TInt ItemSetNameFolderLTestL( TTestResult& aResult ); + + /** * FavouritesItem SetUrlL test case. * @since ?Series60_version * @param aResult Test case result (PASS/FAIL) @@ -529,6 +632,25 @@ * that is not returned as test case result in aResult) */ TInt ItemSetUserNameLTestL( TTestResult& aResult ); + + + /** + * FavouritesItem ItemSetUserNameMaxLengthLTestL test case. + * @since ?Series60_version + * @param aResult Test case result (PASS/FAIL) + * @return Symbian OS error code (test case execution error + * that is not returned as test case result in aResult) + */ + TInt ItemSetUserNameMaxLengthLTestL( TTestResult& aResult ); + + /** + * FavouritesItem ItemSetUserNameTruncateLengthLTestL test case. + * @since ?Series60_version + * @param aResult Test case result (PASS/FAIL) + * @return Symbian OS error code (test case execution error + * that is not returned as test case result in aResult) + */ + TInt ItemSetUserNameTruncateLengthLTestL( TTestResult& aResult ); /** * FavouritesItem SetPasswordL test case. @@ -984,6 +1106,24 @@ */ TInt DbDeleteFolderTestL( TTestResult& aResult ); + /** + * FavouritesItem IsHidden test case. + * @since ?Series60_version + * @param aResult Test case result (PASS/FAIL) + * @return Symbian OS error code (test case execution error + * that is not returned as test case result in aResult) + */ + TInt ItemIsHiddenTestL( TTestResult& aResult ); + + /** + * FavouritesItem SetHidden test case. + * @since ?Series60_version + * @param aResult Test case result (PASS/FAIL) + * @return Symbian OS error code (test case execution error + * that is not returned as test case result in aResult) + */ + TInt ItemSetHiddenTestL( TTestResult& aResult ); + private: // Functions to test TFavouritesWapAp interface /** @@ -1014,6 +1154,15 @@ TInt WapApAssignWithApIdTest( TTestResult& aResult ); /** + * TFavouritesWapAp assign operator using self ApId test case. + * @since ?Series60_version + * @param aResult Test case result (PASS/FAIL) + * @return Symbian OS error code (test case execution error + * that is not returned as test case result in aResult) + */ + TInt WapApAssignSelfWithApTest( TTestResult& aResult ); + + /** * TFavouritesWapAp SetNull test case. * @since ?Series60_version * @param aResult Test case result (PASS/FAIL) diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/favourites_engine_api/tsrc/inc/FavouritesItemTestData.h --- a/web_pub/favourites_engine_api/tsrc/inc/FavouritesItemTestData.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/favourites_engine_api/tsrc/inc/FavouritesItemTestData.h Mon Mar 29 12:27:15 2010 +0100 @@ -22,7 +22,7 @@ // INCLUDES #include -#include +#include // CLASS DECLARATION diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/favourites_engine_api/tsrc/src/FavouritesDbIncrementalTestCases.cpp --- a/web_pub/favourites_engine_api/tsrc/src/FavouritesDbIncrementalTestCases.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/favourites_engine_api/tsrc/src/FavouritesDbIncrementalTestCases.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -20,7 +20,7 @@ // INCLUDE FILES #include -#include "FavouritesEngineTest.h" +#include "favouritesenginetest.h" // EXTERNAL DATA STRUCTURES // None diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/favourites_engine_api/tsrc/src/FavouritesDbTestCases.cpp --- a/web_pub/favourites_engine_api/tsrc/src/FavouritesDbTestCases.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/favourites_engine_api/tsrc/src/FavouritesDbTestCases.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -20,7 +20,7 @@ // INCLUDE FILES #include -#include "FavouritesEngineTest.h" +#include "favouritesenginetest.h" // EXTERNAL DATA STRUCTURES // None diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/favourites_engine_api/tsrc/src/FavouritesDbTestObserver.cpp --- a/web_pub/favourites_engine_api/tsrc/src/FavouritesDbTestObserver.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/favourites_engine_api/tsrc/src/FavouritesDbTestObserver.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,13 +15,12 @@ * */ - // INCLUDE FILES -#include -#include "FavouritesDbTestObserver.h" +#include +#include "favouritesdbtestobserver.h" //#include "FavouritesDbTester.h" -#include "ActiveFavouritesDbNotifier.h" +#include // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/favourites_engine_api/tsrc/src/FavouritesEngineTest.cpp --- a/web_pub/favourites_engine_api/tsrc/src/FavouritesEngineTest.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/favourites_engine_api/tsrc/src/FavouritesEngineTest.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -1,25 +1,28 @@ /* -* Copyright (c) 2006 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 "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* ============================================================================== +* Name : FavouritesEngineTest.cpp +* Part of : ?Subsystem_name / FavouritesEngineTest +* +* Description : FavouritesBCTest class member functions +* Version: 0.5 * -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: +* Copyright (C) 2006 Nokia Corporation. +* This material, including documentation and any related +* computer programs, is protected by copyright controlled by +* Nokia Corporation. All rights are reserved. Copying, +* including reproducing, storing, adapting or translating, any +* or all of this material requires the prior written consent of +* Nokia Corporation. This material also contains confidential +* information which may not be disclosed to others without the +* prior written consent of Nokia Corporation. * -* Description: FavouritesBCTest class member functions -* +* ============================================================================ */ - // INCLUDE FILES #include -#include "FavouritesEngineTest.h" +#include "favouritesenginetest.h" // EXTERNAL DATA STRUCTURES @@ -249,7 +252,9 @@ ENTRY( "Item NewLC test", CFavouritesEngineTest::ItemNewLCTestL ), ENTRY( "Item NewL test", CFavouritesEngineTest::ItemNewLTestL ), ENTRY( "Item Destructor test", CFavouritesEngineTest::ItemDestructorTestL ), - ENTRY( "Item Assign(=) operator test", CFavouritesEngineTest::ItemAssignTestL ), + ENTRY( "Item Assign(=) operator basic test", CFavouritesEngineTest::ItemAssignTestL ), + ENTRY( "Item Assign(=) to Self test", CFavouritesEngineTest::ItemAssignSelfTestL ), + ENTRY( "Item Assign(=) Complete test", CFavouritesEngineTest::ItemAssignCompleteTestL ), ENTRY( "Item Uid test", CFavouritesEngineTest::ItemUidTestL ), ENTRY( "Item ParentFolder test", CFavouritesEngineTest::ItemParentFolderTestL ), ENTRY( "Item Type test", CFavouritesEngineTest::ItemTypeTestL ), @@ -259,19 +264,30 @@ ENTRY( "Item UserName test", CFavouritesEngineTest::ItemUserNameTestL ), ENTRY( "Item Password test", CFavouritesEngineTest::ItemPasswordTestL ), ENTRY( "Item ContextId test", CFavouritesEngineTest::ItemContextIdTestL ), - ENTRY( "Item IsItem test", CFavouritesEngineTest::ItemIsItemTestL ), - ENTRY( "Item IsFolder test", CFavouritesEngineTest::ItemIsFolderTestL ), + ENTRY( "Item IsItem Default test", CFavouritesEngineTest::ItemIsItemTestL ), + ENTRY( "Item IsItem Folder test", CFavouritesEngineTest::ItemIsItemEFolderTestL ), + ENTRY( "Item IsFolder Default test", CFavouritesEngineTest::ItemIsFolderTestL ), + ENTRY( "Item IsFolder Folder test", CFavouritesEngineTest::ItemIsFolderEFolderTestL ), ENTRY( "Item IsFactoryItem test", CFavouritesEngineTest::ItemIsFactoryItemTestL ), ENTRY( "Item IsReadOnly test", CFavouritesEngineTest::ItemIsReadOnlyTestL ), ENTRY( "Item Modified test", CFavouritesEngineTest::ItemModifiedTestL ), ENTRY( "Item ClearL test", CFavouritesEngineTest::ItemClearLTestL ), ENTRY( "Item SetParentFolder test", CFavouritesEngineTest::ItemSetParentFolderTestL ), - ENTRY( "Item SetType test", CFavouritesEngineTest::ItemSetTypeTestL ), - ENTRY( "Item SetNameL test", CFavouritesEngineTest::ItemSetNameLTestL ), - ENTRY( "Item SetUrlL test", CFavouritesEngineTest::ItemSetUrlLTestL ), + ENTRY( "Item SetType Default test", CFavouritesEngineTest::ItemSetTypeTestL ), + ENTRY( "Item SetType None test", CFavouritesEngineTest::ItemSetTypeNoneTestL ), + ENTRY( "Item SetName Default test", CFavouritesEngineTest::ItemSetNameLTestL ), + ENTRY( "Item SetName Truncate test", CFavouritesEngineTest::ItemSetNameMaxLengthTruncateLTestL ), + ENTRY( "Item SetName TrimString test", CFavouritesEngineTest::ItemSetNameTrimStringLTestL ), + ENTRY( "Item SetName RTLMark test", CFavouritesEngineTest::ItemSetNameRTLMarkLTestL ), + ENTRY( "Item SetName EmptyString test", CFavouritesEngineTest::ItemSetNameEmptyStringLTestL ), + ENTRY( "Item SetName WhiteSpace test", CFavouritesEngineTest::ItemSetNameWhiteSpaceLTestL ), + ENTRY( "Item SetName ForFolder test", CFavouritesEngineTest::ItemSetNameFolderLTestL ), + ENTRY( "Item SetUrl test", CFavouritesEngineTest::ItemSetUrlLTestL ), ENTRY( "Item SetWapAp test", CFavouritesEngineTest::ItemSetWapApTestL ), - ENTRY( "Item SetUserNameL test", CFavouritesEngineTest::ItemSetUserNameLTestL ), - ENTRY( "Item SetPasswordL test", CFavouritesEngineTest::ItemSetPasswordLTestL ), + ENTRY( "Item SetUserName test", CFavouritesEngineTest::ItemSetUserNameLTestL ), + ENTRY( "Item SetUserName MaxLengthErr test", CFavouritesEngineTest::ItemSetUserNameMaxLengthLTestL ), + ENTRY( "Item SetUserName Truncate test", CFavouritesEngineTest::ItemSetUserNameTruncateLengthLTestL ), + ENTRY( "Item SetPassword test", CFavouritesEngineTest::ItemSetPasswordLTestL ), ENTRY( "Item SetContextId test", CFavouritesEngineTest::ItemSetContextIdTestL ), ENTRY( "List Constructor test", CFavouritesEngineTest::ListConstructorTestL ), ENTRY( "List Destructor test", CFavouritesEngineTest::ListDestructorTestL ), @@ -321,6 +337,7 @@ ENTRY( "WapAp Constructor test", CFavouritesEngineTest::WapApConstructorTest ), ENTRY( "WapAp Assign with Ap test", CFavouritesEngineTest::WapApAssignWithApTest ), ENTRY( "WapAp Assign with ApId test", CFavouritesEngineTest::WapApAssignWithApIdTest ), + ENTRY( "WapAp Self-Assign with ApId test", CFavouritesEngineTest::WapApAssignSelfWithApTest ), ENTRY( "WapAp SetNull test", CFavouritesEngineTest::WapApSetNullTest ), ENTRY( "WapAp SetDefault test", CFavouritesEngineTest::WapApSetDefaultTest ), ENTRY( "WapAp SetApId test", CFavouritesEngineTest::WapApSetApIdTest ), @@ -346,7 +363,9 @@ ENTRY( "Notifier constructor test", CFavouritesEngineTest::NotifierConstructorTestL ), ENTRY( "Notifier destructor test", CFavouritesEngineTest::NotifierDestructorTestL ), ENTRY( "Notifier Start test", CFavouritesEngineTest::NotifierStartTestL ), - ENTRY( "Db DeleteFolder test", CFavouritesEngineTest::DbDeleteFolderTestL ) + ENTRY( "Db DeleteFolder test", CFavouritesEngineTest::DbDeleteFolderTestL ), + ENTRY( "Item IsHidden test", CFavouritesEngineTest::ItemIsHiddenTestL ), + ENTRY( "Item SetHidden test", CFavouritesEngineTest::ItemSetHiddenTestL ) }; // Verify that case number is valid diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/favourites_engine_api/tsrc/src/FavouritesFileTestCases.cpp --- a/web_pub/favourites_engine_api/tsrc/src/FavouritesFileTestCases.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/favourites_engine_api/tsrc/src/FavouritesFileTestCases.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -20,7 +20,7 @@ // INCLUDE FILES #include -#include "FavouritesEngineTest.h" +#include "favouritesenginetest.h" // EXTERNAL DATA STRUCTURES // None diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/favourites_engine_api/tsrc/src/FavouritesItemListTestCases.cpp --- a/web_pub/favourites_engine_api/tsrc/src/FavouritesItemListTestCases.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/favourites_engine_api/tsrc/src/FavouritesItemListTestCases.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -20,7 +20,7 @@ // INCLUDE FILES #include -#include "FavouritesEngineTest.h" +#include "favouritesenginetest.h" // EXTERNAL DATA STRUCTURES // None diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/favourites_engine_api/tsrc/src/FavouritesItemTestCases.cpp --- a/web_pub/favourites_engine_api/tsrc/src/FavouritesItemTestCases.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/favourites_engine_api/tsrc/src/FavouritesItemTestCases.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -1,26 +1,29 @@ /* -* Copyright (c) 2008 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 "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* ============================================================================ +* Name: FavouritesItemTestCases.cpp +* Part of: FavouritesEngineTest class member functions +* +* Description: +* +* Version: 1.0 * -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: +* Copyright (C) 2008 Nokia Corporation. +* This material, including documentation and any related +* computer programs, is protected by copyright controlled by +* Nokia Corporation. All rights are reserved. Copying, +* including reproducing, storing, adapting or translating, any +* or all of this material requires the prior written consent of +* Nokia Corporation. This material also contains confidential +* information which may not be disclosed to others without the +* prior written consent of Nokia Corporation. * -* Description: -* -* +* ============================================================================ */ - // INCLUDE FILES #include -#include "FavouritesEngineTest.h" +#include "favouritesenginetest.h" // EXTERNAL DATA STRUCTURES // None @@ -260,6 +263,153 @@ Class: CFavouritesEngineTest + Method: ItemAssignCompleteTestL + + Description: Assigning one item to another with the Assign(=) method. + + Parameters: TTestResult& aErrorDescription: out: + Test result and on error case a short description of error + + Return Values: TInt: Always KErrNone to indicate that test was valid + + Errors/Exceptions: None + + Status: Approved + +------------------------------------------------------------------------------- +*/ +TInt CFavouritesEngineTest::ItemAssignCompleteTestL( TTestResult& aResult ) + { + /* Simple server connect */ + _LIT( KDefinition ,"State"); + _LIT( KData ,"Assigning item with Assign(=) operator"); + TestModuleIf().Printf( 0, KDefinition, KData ); + + TFavouritesWapAp accessPoint1; + accessPoint1.SetApId( 22 ); + + CFavouritesItem* item1 = CFavouritesItem::NewLC(); + item1->SetNameL( _L("Item1") ); + item1->SetUrlL( _L("http://www.nokia.com") ); + item1->SetUserNameL( _L("Name 1")); + item1->SetPasswordL( _L("Password 1")); + item1->SetParentFolder(3); + item1->SetContextId(22); + item1->SetHidden(1); + item1->SetWapAp( accessPoint1 ); + + + TFavouritesWapAp accessPoint2; + accessPoint2.SetApId( 24 ); + + CFavouritesItem* item2 = CFavouritesItem::NewLC(); + item2->SetNameL( _L("Item2") ); + item2->SetUrlL( _L("http://www.google.com") ); + item2->SetUserNameL( _L("Name 2")); + item2->SetPasswordL( _L("Password 2")); + item2->SetParentFolder(4); + item2->SetContextId(24); + // item2->SetHidden(0); + item2->SetWapAp( accessPoint2 ); + + + + + *item1 = *item2; + + _LIT( KData2 ,"Finished"); + TestModuleIf().Printf( 0, KDefinition, KData2 ); + + if ( + (item1->Name() == item2->Name()) && + (item1->Url() == item2->Url()) && + (item1->UserName() == item2->UserName()) && + (item1->Password() == item2->Password()) && + (item1->ContextId() == item2->ContextId()) && + (item1->ParentFolder() == item2->ParentFolder()) && + (item1->Type() == item2->Type()) && + (item1->WapAp().ApId() == item2->WapAp().ApId()) && + (item1->IsItem() == item2->IsItem()) && + (item1->IsFolder() == item2->IsFolder()) && + (item1->IsHidden() == item2->IsHidden()) && + // (item1->Uid() == item2->Uid()) && + (item1->Modified() == item2->Modified()) + + ) + { + _LIT( KDescription , "Test case passed"); + aResult.SetResult( KErrNone, KDescription ); + } + else + { + _LIT( KDescription , "Test case failed"); + aResult.SetResult( KErrGeneral, KDescription ); + } + + CleanupStack::PopAndDestroy( 2 ); // item1, item2 + + // Case was executed + return KErrNone; + } + + +/* +------------------------------------------------------------------------------- + + Class: CFavouritesEngineTest + + Method: ItemAssignSelfTestL + + Description: Assigning one item to self with the Assign(=) method. + + Parameters: TTestResult& aErrorDescription: out: + Test result and on error case a short description of error + + Return Values: TInt: Always KErrNone to indicate that test was valid + + Errors/Exceptions: None + + Status: Approved + +------------------------------------------------------------------------------- +*/ +TInt CFavouritesEngineTest::ItemAssignSelfTestL( TTestResult& aResult ) + { + /* Simple server connect */ + _LIT( KDefinition ,"State"); + _LIT( KData ,"Assigning item with Assign(=) operator"); + TestModuleIf().Printf( 0, KDefinition, KData ); + + CFavouritesItem* item1 = CFavouritesItem::NewLC(); + item1->SetNameL( _L("Item1") ); + + *item1 = *item1; //copy to self, should not affect anything + + _LIT( KData2 ,"Finished"); + TestModuleIf().Printf( 0, KDefinition, KData2 ); + + if (item1->Name() == _L("Item1")) + { + _LIT( KDescription , "Test case passed"); + aResult.SetResult( KErrNone, KDescription ); + } + else + { + _LIT( KDescription , "Test case failed"); + aResult.SetResult( KErrGeneral, KDescription ); + } + + CleanupStack::PopAndDestroy( item1 ); + + // Case was executed + return KErrNone; + } + +/* +------------------------------------------------------------------------------- + + Class: CFavouritesEngineTest + Method: ItemUidTestL Description: Test getting the item's Uid using the Uid method. @@ -391,7 +541,7 @@ _LIT( KData2 ,"Finished"); TestModuleIf().Printf( 0, KDefinition, KData2 ); - if (itemType == 1) + if (itemType == CFavouritesItem::EItem) { _LIT( KDescription , "Test case passed"); aResult.SetResult( KErrNone, KDescription ); @@ -769,6 +919,59 @@ return KErrNone; } + +/* +------------------------------------------------------------------------------- + + Class: CFavouritesEngineTest + + Method: ItemIsItemEFolderTestL + + Description: Test if the folder is not an item using the IsItem method. + + Parameters: TTestResult& aErrorDescription: out: + Test result and on error case a short description of error + + Return Values: TInt: Always KErrNone to indicate that test was valid + + Errors/Exceptions: None + + Status: Approved + +------------------------------------------------------------------------------- +*/ +TInt CFavouritesEngineTest::ItemIsItemEFolderTestL( TTestResult& aResult ) + { + /* Simple server connect */ + _LIT( KDefinition ,"State"); + _LIT( KData ,"Checking if the folder is not an item with IsItem method"); + TestModuleIf().Printf( 0, KDefinition, KData ); + + CFavouritesItem* item = CFavouritesItem::NewLC(); + item->SetType(CFavouritesItem::EFolder); + + TBool itemIsItem = item->IsItem(); + + _LIT( KData2 ,"Finished"); + TestModuleIf().Printf( 0, KDefinition, KData2 ); + + if (!itemIsItem) + { + _LIT( KDescription , "Test case passed"); + aResult.SetResult( KErrNone, KDescription ); + } + else + { + _LIT( KDescription , "Test case failed"); + aResult.SetResult( KErrGeneral, KDescription ); + } + + CleanupStack::PopAndDestroy( item ); + + // Case was executed + return KErrNone; + } + /* ------------------------------------------------------------------------------- @@ -793,7 +996,7 @@ { /* Simple server connect */ _LIT( KDefinition ,"State"); - _LIT( KData ,"Checking if the item is a folder with IsFolder method"); + _LIT( KData ,"Checking if the item is not a folder with IsFolder method"); TestModuleIf().Printf( 0, KDefinition, KData ); CFavouritesItem* item = CFavouritesItem::NewLC(); @@ -825,6 +1028,58 @@ Class: CFavouritesEngineTest + Method: ItemIsFolderEFolderTestL + + Description: Test if the item of type EFolder is a folder using the IsFolder method. + + Parameters: TTestResult& aErrorDescription: out: + Test result and on error case a short description of error + + Return Values: TInt: Always KErrNone to indicate that test was valid + + Errors/Exceptions: None + + Status: Draft + +------------------------------------------------------------------------------- +*/ +TInt CFavouritesEngineTest::ItemIsFolderEFolderTestL( TTestResult& aResult ) + { + /* Simple server connect */ + _LIT( KDefinition ,"State"); + _LIT( KData ,"Checking if the folder is a folder with IsFolder method"); + TestModuleIf().Printf( 0, KDefinition, KData ); + + CFavouritesItem* item = CFavouritesItem::NewLC(); + /* set item as folder type */ + item->SetType(CFavouritesItem::EFolder); + TBool itemIsFolder = item->IsFolder(); + + _LIT( KData2 ,"Finished"); + TestModuleIf().Printf( 0, KDefinition, KData2 ); + + if (itemIsFolder) + { + _LIT( KDescription , "Test case passed"); + aResult.SetResult( KErrNone, KDescription ); + } + else + { + _LIT( KDescription , "Test case failed"); + aResult.SetResult( KErrGeneral, KDescription ); + } + + CleanupStack::PopAndDestroy( item ); + + // Case was executed + return KErrNone; + } + +/* +------------------------------------------------------------------------------- + + Class: CFavouritesEngineTest + Method: ItemIsFactoryItemTestL Description: Test if the item is a factory item using the IsFactoryItem method. @@ -1084,7 +1339,7 @@ Method: ItemSetTypeTestL - Description: Test setting the item's type using the SetType method. + Description: Test setting the item's type to EFolder using the SetType method. Parameters: TTestResult& aErrorDescription: out: Test result and on error case a short description of error @@ -1101,7 +1356,7 @@ { /* Simple server connect */ _LIT( KDefinition ,"State"); - _LIT( KData ,"Setting the item's type with SetType method"); + _LIT( KData ,"Setting the item's type to Folder with SetType method"); TestModuleIf().Printf( 0, KDefinition, KData ); CFavouritesItem* item = CFavouritesItem::NewLC(); @@ -1133,6 +1388,57 @@ Class: CFavouritesEngineTest + Method: ItemSetTypeNoneTestL + + Description: Test setting the item's type to ENone using the SetType method. Type should not be affected. + + Parameters: TTestResult& aErrorDescription: out: + Test result and on error case a short description of error + + Return Values: TInt: Always KErrNone to indicate that test was valid + + Errors/Exceptions: None + + Status: Draft + +------------------------------------------------------------------------------- +*/ +TInt CFavouritesEngineTest::ItemSetTypeNoneTestL( TTestResult& aResult ) + { + /* Simple server connect */ + _LIT( KDefinition ,"State"); + _LIT( KData ,"Setting the item's type to None with SetType method"); + TestModuleIf().Printf( 0, KDefinition, KData ); + + CFavouritesItem* item = CFavouritesItem::NewLC(); + + item->SetType(CFavouritesItem::ENone); + + _LIT( KData2 ,"Finished"); + TestModuleIf().Printf( 0, KDefinition, KData2 ); + + if (item->Type() != CFavouritesItem::ENone) + { + _LIT( KDescription , "Test case passed"); + aResult.SetResult( KErrNone, KDescription ); + } + else + { + _LIT( KDescription , "Test case failed"); + aResult.SetResult( KErrGeneral, KDescription ); + } + + CleanupStack::PopAndDestroy( item ); + + // Case was executed + return KErrNone; + } + +/* +------------------------------------------------------------------------------- + + Class: CFavouritesEngineTest + Method: ItemSetNameLTestL Description: Test setting the item's name using the SetNameL method. @@ -1179,11 +1485,319 @@ return KErrNone; } + /* ------------------------------------------------------------------------------- Class: CFavouritesEngineTest + Method: ItemSetNameFolderLTestL + + Description: Test setting the item (folder)'s name using the SetNameL method. + + Parameters: TTestResult& aErrorDescription: out: + Test result and on error case a short description of error + + Return Values: TInt: Always KErrNone to indicate that test was valid + + Errors/Exceptions: None + + Status: Approved + +------------------------------------------------------------------------------- +*/ +TInt CFavouritesEngineTest::ItemSetNameFolderLTestL( TTestResult& aResult ) + { + /* Simple server connect */ + _LIT( KDefinition ,"State"); + _LIT( KData ,"Setting the item's name with SetNameL method"); + TestModuleIf().Printf( 0, KDefinition, KData ); + + CFavouritesItem* item = CFavouritesItem::NewLC(); + item->SetType(CFavouritesItem::EFolder); + item->SetNameL( _L("Fav Folder") ); + + _LIT( KData2 ,"Finished"); + TestModuleIf().Printf( 0, KDefinition, KData2 ); + + if (item->Name() == _L("Fav Folder")) + { + _LIT( KDescription , "Test case passed"); + aResult.SetResult( KErrNone, KDescription ); + } + else + { + _LIT( KDescription , "Test case failed"); + aResult.SetResult( KErrGeneral, KDescription ); + } + + CleanupStack::PopAndDestroy( item ); + + // Case was executed + return KErrNone; + } + + +/* +------------------------------------------------------------------------------- + + Class: CFavouritesEngineTest + + Method: ItemSetNameMaxLengthTruncateLTestL + + Description: Test setting the item's name and maxlength using the SetNameL method. + + Parameters: TTestResult& aErrorDescription: out: + Test result and on error case a short description of error + + Return Values: TInt: Always KErrNone to indicate that test was valid + + Errors/Exceptions: None + + Status: Draft + +------------------------------------------------------------------------------- +*/ +TInt CFavouritesEngineTest::ItemSetNameMaxLengthTruncateLTestL( TTestResult& aResult ) + { + /* Simple server connect */ + _LIT( KDefinition ,"State"); + _LIT( KData ,"Setting the item's name with SetNameL method"); + TestModuleIf().Printf( 0, KDefinition, KData ); + + CFavouritesItem* item = CFavouritesItem::NewLC(); + TRAPD(err, item->SetNameL( _L("Item Name longer than KFavouritesMaxName limit which is 50 chars"))); + + _LIT( KData2 ,"Finished"); + TestModuleIf().Printf( 0, KDefinition, KData2 ); + + if ((item->Name().Length() == KFavouritesMaxName)&& (err==KErrOverflow)) + { + _LIT( KDescription , "Test case passed"); + aResult.SetResult( KErrNone, KDescription ); + } + else + { + _LIT( KDescription , "Test case failed"); + aResult.SetResult( KErrGeneral, KDescription ); + } + + CleanupStack::PopAndDestroy( item ); + + // Case was executed + return KErrNone; + } + + +/* +------------------------------------------------------------------------------- + + Class: CFavouritesEngineTest + + Method: ItemSetNameTrimStringLTestL + + Description: Test setting the item's name with trim using the SetNameL method. + + Parameters: TTestResult& aErrorDescription: out: + Test result and on error case a short description of error + + Return Values: TInt: Always KErrNone to indicate that test was valid + + Errors/Exceptions: None + + Status: Draft + +------------------------------------------------------------------------------- +*/ +TInt CFavouritesEngineTest::ItemSetNameTrimStringLTestL( TTestResult& aResult ) + { + /* Simple server connect */ + _LIT( KDefinition ,"State"); + _LIT( KData ,"Setting the item's name with SetNameL method"); + TestModuleIf().Printf( 0, KDefinition, KData ); + + CFavouritesItem* item = CFavouritesItem::NewLC(); + item->SetNameL( _L(" some name ")); + + _LIT( KData2 ,"Finished"); + TestModuleIf().Printf( 0, KDefinition, KData2 ); + + if (item->Name()== _L("some name")) + { + _LIT( KDescription , "Test case passed"); + aResult.SetResult( KErrNone, KDescription ); + } + else + { + _LIT( KDescription , "Test case failed"); + aResult.SetResult( KErrGeneral, KDescription ); + } + + CleanupStack::PopAndDestroy( item ); + + // Case was executed + return KErrNone; + } + +/* +------------------------------------------------------------------------------- + + Class: CFavouritesEngineTest + + Method: ItemSetNameRTLMarkLTestL + + Description: Test setting the item's name with trim using the SetNameL method. + + Parameters: TTestResult& aErrorDescription: out: + Test result and on error case a short description of error + + Return Values: TInt: Always KErrNone to indicate that test was valid + + Errors/Exceptions: None + + Status: Draft + +------------------------------------------------------------------------------- +*/ +TInt CFavouritesEngineTest::ItemSetNameRTLMarkLTestL( TTestResult& aResult ) + { + /* Simple server connect */ + _LIT( KDefinition ,"State"); + _LIT( KData ,"Setting the item's name with SetNameL method"); + + TestModuleIf().Printf( 0, KDefinition, KData ); + + CFavouritesItem* item = CFavouritesItem::NewLC(); + item->SetNameL( _L("\x200F some name \x200F")); + + _LIT( KData2 ,"Finished"); + TestModuleIf().Printf( 0, KDefinition, KData2 ); + + if (item->Name()== _L("some name")) + { + _LIT( KDescription , "Test case passed"); + aResult.SetResult( KErrNone, KDescription ); + } + else + { + _LIT( KDescription , "Test case failed"); + aResult.SetResult( KErrGeneral, KDescription ); + } + + CleanupStack::PopAndDestroy( item ); + + // Case was executed + return KErrNone; + } + + +/* +------------------------------------------------------------------------------- + + Class: CFavouritesEngineTest + + Method: ItemSetNameEmptyStringLTestL + + Description: Test setting the item's name with trim using the SetNameL method. + + Parameters: TTestResult& aErrorDescription: out: + Test result and on error case a short description of error + + Return Values: TInt: Always KErrNone to indicate that test was valid + + Errors/Exceptions: None + + Status: Draft + +------------------------------------------------------------------------------- +*/ +TInt CFavouritesEngineTest::ItemSetNameEmptyStringLTestL( TTestResult& aResult ) + { + /* Simple server connect */ + _LIT( KDefinition ,"State"); + _LIT( KData ,"Setting the item's name with SetNameL method"); + TestModuleIf().Printf( 0, KDefinition, KData ); + + CFavouritesItem* item = CFavouritesItem::NewLC(); + TRAPD(err, item->SetNameL( _L(""))); //returns error + + _LIT( KData2 ,"Finished"); + TestModuleIf().Printf( 0, KDefinition, KData2 ); + + if (err!=KErrNone) + { + _LIT( KDescription , "Test case passed"); + aResult.SetResult( KErrNone, KDescription ); + } + else + { + _LIT( KDescription , "Test case failed"); + aResult.SetResult( KErrGeneral, KDescription ); + } + + CleanupStack::PopAndDestroy( item ); + + // Case was executed + return KErrNone; + } + +/* +------------------------------------------------------------------------------- + + Class: CFavouritesEngineTest + + Method: ItemSetNameWhiteSpaceLTestL + + Description: Test setting the item's name with trim using the SetNameL method. + + Parameters: TTestResult& aErrorDescription: out: + Test result and on error case a short description of error + + Return Values: TInt: Always KErrNone to indicate that test was valid + + Errors/Exceptions: None + + Status: Draft + +------------------------------------------------------------------------------- +*/ +TInt CFavouritesEngineTest::ItemSetNameWhiteSpaceLTestL( TTestResult& aResult ) + { + /* Simple server connect */ + _LIT( KDefinition ,"State"); + _LIT( KData ,"Setting the item's name with SetNameL method"); + TestModuleIf().Printf( 0, KDefinition, KData ); + + CFavouritesItem* item = CFavouritesItem::NewLC(); + TRAPD(err, item->SetNameL( _L(" "))); //returns error + + _LIT( KData2 ,"Finished"); + TestModuleIf().Printf( 0, KDefinition, KData2 ); + + if (err!=KErrNone) + { + _LIT( KDescription , "Test case passed"); + aResult.SetResult( KErrNone, KDescription ); + } + else + { + _LIT( KDescription , "Test case failed"); + aResult.SetResult( KErrGeneral, KDescription ); + } + + CleanupStack::PopAndDestroy( item ); + + // Case was executed + return KErrNone; + } + + +/* + +------------------------------------------------------------------------------- + + Class: CFavouritesEngineTest + Method: ItemSetUrlLTestL Description: Test setting the item's url using the SetUrlL method. @@ -1334,6 +1948,114 @@ return KErrNone; } + +/* +------------------------------------------------------------------------------- + + Class: CFavouritesEngineTest + + Method: ItemSetUserNameMaxLengthLTestL + + Description: Test setting the item's user name using the SetUserNameL method. + + Parameters: TTestResult& aErrorDescription: out: + Test result and on error case a short description of error + + Return Values: TInt: Always KErrNone to indicate that test was valid + + Errors/Exceptions: None + + Status: Approved + +------------------------------------------------------------------------------- +*/ +TInt CFavouritesEngineTest::ItemSetUserNameMaxLengthLTestL( TTestResult& aResult ) + { + /* Simple server connect */ + _LIT( KDefinition ,"State"); + _LIT( KData ,"Setting the item's user name with SetUserNameL method"); + TestModuleIf().Printf( 0, KDefinition, KData ); + + CFavouritesItem* item = CFavouritesItem::NewLC(); + // TInt err; + + TRAPD(err, item->SetUserNameL( _L("New User name longer than allowed by the limit of KFavouritesMaxUserName which is 40 chars at this moment") )); + + _LIT( KData2 ,"Finished"); + TestModuleIf().Printf( 0, KDefinition, KData2 ); + + if (err==KErrOverflow) + { + _LIT( KDescription , "Test case passed"); + aResult.SetResult( KErrNone, KDescription ); + } + else + { + _LIT( KDescription , "Test case failed"); + aResult.SetResult( KErrGeneral, KDescription ); + } + + CleanupStack::PopAndDestroy( item ); + + // Case was executed + return KErrNone; + } + + +/* +------------------------------------------------------------------------------- + + Class: CFavouritesEngineTest + + Method: ItemSetUserNameTruncateLengthLTestL + + Description: Test setting the item's user name using the SetUserNameL method. + + Parameters: TTestResult& aErrorDescription: out: + Test result and on error case a short description of error + + Return Values: TInt: Always KErrNone to indicate that test was valid + + Errors/Exceptions: None + + Status: Approved + +------------------------------------------------------------------------------- +*/ +TInt CFavouritesEngineTest::ItemSetUserNameTruncateLengthLTestL( TTestResult& aResult ) + { + /* Simple server connect */ + _LIT( KDefinition ,"State"); + _LIT( KData ,"Setting the item's user name with SetUserNameL method"); + TestModuleIf().Printf( 0, KDefinition, KData ); + + CFavouritesItem* item = CFavouritesItem::NewLC(); + TInt truncLength; + + TRAPD(err, item->SetUserNameL( _L("New User name longer than allowed by the limit of KFavouritesMaxUserName which is 40 chars at this moment") )); + + _LIT( KData2 ,"Finished"); + TestModuleIf().Printf( 0, KDefinition, KData2 ); + truncLength = item->UserName().Length(); + + if ((truncLength==KFavouritesMaxUserName)&& (err==KErrOverflow)) + { + _LIT( KDescription , "Test case passed"); + aResult.SetResult( KErrNone, KDescription ); + } + else + { + _LIT( KDescription , "Test case failed"); + aResult.SetResult( KErrGeneral, KDescription ); + } + + CleanupStack::PopAndDestroy( item ); + + // Case was executed + return KErrNone; + } + + /* ------------------------------------------------------------------------------- @@ -1436,6 +2158,109 @@ return KErrNone; } +/* +------------------------------------------------------------------------------- + + Class: CFavouritesEngineTest + + Method: ItemIsHiddenTestL + + Description: Test if the item is hidden using the IsHidden method. + + Parameters: TTestResult& aErrorDescription: out: + Test result and on error case a short description of error + + Return Values: TInt: Always KErrNone to indicate that test was valid + + Errors/Exceptions: None + + Status: Approved + +------------------------------------------------------------------------------- +*/ + +TInt CFavouritesEngineTest::ItemIsHiddenTestL( TTestResult& aResult ) + { + /* Simple server connect */ + _LIT( KDefinition ,"State"); + _LIT( KData ,"Checking if the item is hidden item with IsHidden method"); + TestModuleIf().Printf( 0, KDefinition, KData ); + + CFavouritesItem* item = CFavouritesItem::NewLC(); + + TBool itemIsHidden = item->IsHidden(); + + _LIT( KData2 ,"Finished"); + TestModuleIf().Printf( 0, KDefinition, KData2 ); + + if (!itemIsHidden) + { + _LIT( KDescription , "Test case passed"); + aResult.SetResult( KErrNone, KDescription ); + } + else + { + _LIT( KDescription , "Test case failed"); + aResult.SetResult( KErrGeneral, KDescription ); + } + + CleanupStack::PopAndDestroy( item ); + + // Case was executed + return KErrNone; + } + +/* +------------------------------------------------------------------------------- + + Class: CFavouritesEngineTest + + Method: ItemSetHiddenTestL + + Description: Test setting the item's hidden value using the SetHidden method. + + Parameters: TTestResult& aErrorDescription: out: + Test result and on error case a short description of error + + Return Values: TInt: Always KErrNone to indicate that test was valid + + Errors/Exceptions: None + + Status: Approved + +------------------------------------------------------------------------------- +*/ +TInt CFavouritesEngineTest::ItemSetHiddenTestL( TTestResult& aResult ) + { + /* Simple server connect */ + _LIT( KDefinition ,"State"); + _LIT( KData ,"Setting the item's hidden value with SetHidden method"); + TestModuleIf().Printf( 0, KDefinition, KData ); + + CFavouritesItem* item = CFavouritesItem::NewLC(); + + item->SetHidden(1); + + _LIT( KData2 ,"Finished"); + TestModuleIf().Printf( 0, KDefinition, KData2 ); + + if (item->IsHidden() == 1) + { + _LIT( KDescription , "Test case passed"); + aResult.SetResult( KErrNone, KDescription ); + } + else + { + _LIT( KDescription , "Test case failed"); + aResult.SetResult( KErrGeneral, KDescription ); + } + + CleanupStack::PopAndDestroy( item ); + + // Case was executed + return KErrNone; + } + // ================= OTHER EXPORTED FUNCTIONS ================================= // End of File diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/favourites_engine_api/tsrc/src/FavouritesItemTestData.cpp --- a/web_pub/favourites_engine_api/tsrc/src/FavouritesItemTestData.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/favourites_engine_api/tsrc/src/FavouritesItemTestData.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -19,7 +19,7 @@ // INCLUDE FILES #include -#include "FavouritesItemTestData.h" +#include "favouritesitemtestdata.h" // ================= MEMBER FUNCTIONS ======================= diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/favourites_engine_api/tsrc/src/FavouritesNotifierTestCases.cpp --- a/web_pub/favourites_engine_api/tsrc/src/FavouritesNotifierTestCases.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/favourites_engine_api/tsrc/src/FavouritesNotifierTestCases.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -20,8 +20,8 @@ // INCLUDE FILES #include -#include "FavouritesEngineTest.h" -#include "FavouritesDbTestObserver.h" +#include "favouritesenginetest.h" +#include "favouritesdbtestobserver.h" // EXTERNAL DATA STRUCTURES // None diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/favourites_engine_api/tsrc/src/FavouritesSessionTestCases.cpp --- a/web_pub/favourites_engine_api/tsrc/src/FavouritesSessionTestCases.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/favourites_engine_api/tsrc/src/FavouritesSessionTestCases.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -20,7 +20,7 @@ // INCLUDE FILES #include -#include "FavouritesEngineTest.h" +#include "favouritesenginetest.h" // EXTERNAL DATA STRUCTURES // None diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/favourites_engine_api/tsrc/src/FavouritesWapApTestCases.cpp --- a/web_pub/favourites_engine_api/tsrc/src/FavouritesWapApTestCases.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/favourites_engine_api/tsrc/src/FavouritesWapApTestCases.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -1,26 +1,29 @@ /* -* Copyright (c) 2002 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 "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* ============================================================================ +* Name: FavouritesWapApTestCases.cpp +* Part of: FavouritesEngineTest class member functions +* +* Description: +* +* Version: 0.5 * -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: +* Copyright (C) 2002 Nokia Corporation. +* This material, including documentation and any related +* computer programs, is protected by copyright controlled by +* Nokia Corporation. All rights are reserved. Copying, +* including reproducing, storing, adapting or translating, any +* or all of this material requires the prior written consent of +* Nokia Corporation. This material also contains confidential +* information which may not be disclosed to others without the +* prior written consent of Nokia Corporation. * -* Description: -* -* +* ============================================================================ */ - // INCLUDE FILES #include -#include "FavouritesEngineTest.h" +#include "favouritesenginetest.h" // EXTERNAL DATA STRUCTURES // None @@ -151,6 +154,58 @@ return KErrNone; } + +/* +------------------------------------------------------------------------------- + + Class: CFavouritesEngineTest + + Method: WapApAssignSelfWithApTest + + Description: Test the WapAp assign(=) operater using a WapAp as the argument. + + Parameters: TTestResult& aErrorDescription: out: + Test result and on error case a short description of error + + Return Values: TInt: Always KErrNone to indicate that test was valid + + Errors/Exceptions: None + + Status: Approved + +------------------------------------------------------------------------------- +*/ +TInt CFavouritesEngineTest::WapApAssignSelfWithApTest( TTestResult& aResult ) + { + /* Simple server connect */ + _LIT( KDefinition ,"State"); + _LIT( KData ,"Test the WapAp assign(=) operater using the same WapAp as the argument"); + TestModuleIf().Printf( 0, KDefinition, KData ); + + TFavouritesWapAp accessPoint1, accessPoint2; + + accessPoint1 = 222; + + accessPoint1 = accessPoint1; + + _LIT( KData2 ,"Finished" ); + TestModuleIf().Printf( 0, KDefinition, KData2 ); + + if(accessPoint1.ApId() == 222) + { + _LIT( KDescription , "Test case passed"); + aResult.SetResult( KErrNone, KDescription ); + } + else + { + _LIT( KDescription , "Test case failed"); + aResult.SetResult( KErrGeneral, KDescription ); + } + + // Case was executed + return KErrNone; + } + /* ------------------------------------------------------------------------------- diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/settings_api/group/bld.inf --- a/web_pub/settings_api/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/settings_api/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -18,15 +18,15 @@ */ #include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT PRJ_EXPORTS -../inc/BrowserUiSDKCRKeys.h MW_LAYER_PUBLIC_EXPORT_PATH(BrowserUiSDKCRKeys.h) -../inc/BrowserUiInternalCRKeys.h MW_LAYER_PUBLIC_EXPORT_PATH(BrowserUiInternalCRKeys.h) +../inc/browseruisdkcrkeys.h MW_LAYER_PUBLIC_EXPORT_PATH(browseruisdkcrkeys.h) +../inc/browseruiinternalcrkeys.h MW_LAYER_PUBLIC_EXPORT_PATH(browseruiinternalcrkeys.h) PRJ_MMPFILES diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/settings_api/inc/BrowserUiInternalCRKeys.h --- a/web_pub/settings_api/inc/BrowserUiInternalCRKeys.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/settings_api/inc/BrowserUiInternalCRKeys.h Mon Mar 29 12:27:15 2010 +0100 @@ -17,8 +17,8 @@ #ifndef BROWSERUIINTERNALCRKEYS_H #define BROWSERUIINTERNALCRKEYS_H -#include +#include -#pragma message ("Please include BrowserUiSDKCRKeys.h in place of BrowserUiInternalCRKeys.h") +#pragma message ("Please include browseruisdkcrkeys.h in place of browseruiinternalcrkeys.h") #endif // BROWSERUIINTERNALCRKEYS_H diff -r 3dbb0284a087 -r 960a2a4c7f03 web_pub/settings_api/inc/BrowserUiSDKCRKeys.h --- a/web_pub/settings_api/inc/BrowserUiSDKCRKeys.h Wed Jan 13 15:52:45 2010 +0000 +++ b/web_pub/settings_api/inc/BrowserUiSDKCRKeys.h Mon Mar 29 12:27:15 2010 +0100 @@ -406,4 +406,8 @@ // Cursormode which defines the cursor display supported status depends on phones. const TUint32 KBrowserCursorShowMode = 0x00000082; + +// Controls whether enter key can activate a link, ot just has a default behavior. +const TUint32 KBrowserEnterKeyMode = 0x00000083; + #endif // BROWSERUISDKCRKEYS_H \ No newline at end of file diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/browserrecognizers/data/01005A02.rss --- a/webengine/browserrecognizers/data/01005A02.rss Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/browserrecognizers/data/01005A02.rss Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,7 @@ * */ -#include +#include RESOURCE REGISTRY_INFO r_registry { dll_uid = 0x01005A02; // Should match the name of this file diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/browserrecognizers/group/BrowserRec.mmp --- a/webengine/browserrecognizers/group/BrowserRec.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/browserrecognizers/group/BrowserRec.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -14,28 +14,20 @@ * Description: Recognizer for the bowser supported MIME types. * */ -#if defined(__BROWSER_SDK) -TARGET BrowserRec_sdk.DLL -#else #include -#include +#include TARGET BrowserRec.DLL -#endif TARGETTYPE PLUGIN UID 0x10009D8D 0x01005A02 CAPABILITY CAP_ECOM_PLUGIN - SOURCEPATH ../Data START RESOURCE 01005A02.rss -#if defined(__BROWSER_SDK) -TARGET BrowserRec_sdk.rsc -#else + TARGET BrowserRec.rsc -#endif END @@ -45,15 +37,8 @@ SOURCE BrowserRec.cpp USERINCLUDE ../inc -#ifndef __BROWSER_SDK + MW_LAYER_SYSTEMINCLUDE -MW_LAYER_ECOM_SYSTEMINCLUDE -#else -SYSTEMINCLUDE /Epoc32/include /Epoc32/include/ecom -#endif - - LIBRARY EUSER.LIB LIBRARY APMIME.LIB - diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/browserrecognizers/group/bld.inf --- a/webengine/browserrecognizers/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/browserrecognizers/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ #include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT GCCE diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/browserrecognizers/src/BrowserRec.cpp --- a/webengine/browserrecognizers/src/BrowserRec.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/browserrecognizers/src/BrowserRec.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ #include "BrowserRec.h" -#include "ImplementationProxy.h" +#include // // CBrowserRecognizer diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/device/group/Device.mmp --- a/webengine/device/group/Device.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/device/group/Device.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -23,7 +23,7 @@ #include #include #include -#include +#include MACRO __S60__ MACRO arm MACRO ASSERT_DISABLED @@ -50,20 +50,19 @@ #endif MW_LAYER_SYSTEMINCLUDE +OS_LAYER_ESTLIB_SYSTEMINCLUDE + SYSTEMINCLUDE ../../osswebengine/JavaScriptCore SYSTEMINCLUDE ../../osswebengine/JavaScriptCore/kjs SYSTEMINCLUDE ../../osswebengine/JavaScriptCore/bindings SYSTEMINCLUDE ../../osswebengine/JavaScriptCore/wtf SYSTEMINCLUDE ../../osswebengine/JavaScriptCore/wtf/symbian SYSTEMINCLUDE ../../../../../ -MW_LAYER_ECOM_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE SYSTEMINCLUDE ../../../inc USERINCLUDE ../inc SOURCEPATH ../src - SOURCE Device.cpp SOURCE DeviceBridge.cpp SOURCE ServiceEventHandler.cpp @@ -84,3 +83,4 @@ LIBRARY RTSecMgrUtil.lib LIBRARY WidgetRegistryClient.lib LIBRARY efsrv.lib + diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/device/group/bld.inf --- a/webengine/device/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/device/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ #include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" /* * Order is important diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/device/inc/Device.h --- a/webengine/device/inc/Device.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/device/inc/Device.h Mon Mar 29 12:27:15 2010 +0100 @@ -59,10 +59,8 @@ public: DevicePrivate(Device* jsobj); ~DevicePrivate(); - void SetUid( const TUint& aValue); private: - MDeviceBinding* m_deviceBinding; // Owned Identifier m_propName; ExecState* m_exec; // not owned Device* m_jsobj; // not owned @@ -162,6 +160,7 @@ private: DevicePrivate* m_privateData; // private object to hold data + MDeviceBinding* m_deviceBinding; // Owned TBool m_valid; // object is valid or not }; diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/device/rom/Device.iby --- a/webengine/device/rom/Device.iby Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/device/rom/Device.iby Mon Mar 29 12:27:15 2010 +0100 @@ -18,7 +18,11 @@ #ifndef __DEVICE_IBY__ #define __DEVICE_IBY__ -#include +#ifdef __S60_32__ +#include +#else +#include +#endif // bitmaps diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/device/src/Device.cpp --- a/webengine/device/src/Device.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/device/src/Device.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -49,14 +49,18 @@ Device::Device( ExecState* exec ) : JSObject() { - m_privateData = new DevicePrivate(this); - if (!m_privateData || !m_privateData->m_deviceBinding ) - m_valid = EFalse; - else - m_valid = ETrue; + m_valid = EFalse; + TRAP_IGNORE( + m_deviceBinding = CDeviceLiwBinding::NewL(); + ) + if (m_deviceBinding) + { + m_privateData = new DevicePrivate(this); + if (m_privateData) + m_valid = ETrue; + } } - // ---------------------------------------------------------------------------- // Device::SetUid // @@ -64,8 +68,8 @@ // void Device::SetUid( const TUint& aValue) { - if(m_privateData) - m_privateData->SetUid( aValue); + if(m_deviceBinding) + m_deviceBinding->SetUid( aValue); } // ---------------------------------------------------------------------------- @@ -81,6 +85,8 @@ m_valid = EFalse; delete m_privateData; m_privateData = NULL; + delete m_deviceBinding; + m_deviceBinding = NULL; } @@ -141,7 +147,7 @@ { case getServiceObject: case listProviders: - return new DeviceFunc( exec, m_privateData->m_deviceBinding, token ); + return new DeviceFunc( exec, m_deviceBinding, token ); default: return throwError(exec, GeneralError); @@ -222,11 +228,8 @@ // --------------------------------------------------------------------------- DevicePrivate::DevicePrivate( Device* jsobj ) { - m_deviceBinding = NULL; - TRAP_IGNORE( - m_deviceBinding = CDeviceLiwBinding::NewL(); - m_jsobj = jsobj; - m_exec = NULL;) + m_jsobj = jsobj; + m_exec = NULL; } // --------------------------------------------------------------------------- @@ -238,19 +241,6 @@ // invalid the Device if (m_jsobj) m_jsobj->m_valid = EFalse; - - delete m_deviceBinding; - m_deviceBinding = NULL; - } - -// --------------------------------------------------------------------------- -// DevicePrivate SetUid -// -// --------------------------------------------------------------------------- -void DevicePrivate::SetUid( const TUint& aValue) - { - if(m_deviceBinding) - m_deviceBinding->SetUid( aValue); } // ---------------------------------------------------------------------------- @@ -338,7 +328,7 @@ MDeviceBinding* Device::GetDeviceBinding() { - return m_privateData->m_deviceBinding; + return m_deviceBinding; } //END OF FILE diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/device/src/DeviceLiwBinding.cpp --- a/webengine/device/src/DeviceLiwBinding.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/device/src/DeviceLiwBinding.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/memoryplugin/data/10281f93.rss --- a/webengine/memoryplugin/data/10281f93.rss Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/memoryplugin/data/10281f93.rss Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,7 @@ * */ -#include +#include #include RESOURCE REGISTRY_INFO theInfo @@ -35,4 +35,4 @@ }; } }; -} \ No newline at end of file +} diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/memoryplugin/group/bld.inf --- a/webengine/memoryplugin/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/memoryplugin/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/memoryplugin/group/memoryplugin.mmp --- a/webengine/memoryplugin/group/memoryplugin.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/memoryplugin/group/memoryplugin.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -22,22 +22,22 @@ #include #include #include -#include +#include CAPABILITY CAP_ECOM_PLUGIN VENDORID VID_DEFAULT USERINCLUDE . MW_LAYER_SYSTEMINCLUDE -MW_LAYER_ECOM_SYSTEMINCLUDE START RESOURCE ../data/10281f93.rss -TARGET memoryplugin.rsc +TARGET memoryplugin.rsc END SOURCEPATH ../src -SOURCE memoryplugin.cpp +SOURCE memoryplugin.cpp -LIBRARY ECOM.LIB +LIBRARY ECOM.LIB LIBRARY euser.lib LIBRARY oommonitor.lib + diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/DerivedSources/JavaScriptCore/chartables.c diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/DerivedSources/WebCore/CSSPropertyNames.c diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/DerivedSources/WebCore/CSSValueKeywords.c diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/DerivedSources/WebCore/ColorData.c diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/DerivedSources/WebCore/DocTypeStrings.cpp diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/DerivedSources/WebCore/SVGElementFactory.cpp diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/DerivedSources/WebCore/SVGNames.cpp diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/DerivedSources/WebCore/UserAgentStyleSheets.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/DerivedSources/WebCore/UserAgentStyleSheetsData.cpp diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/DerivedSources/WebCore/XLinkNames.cpp diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/DerivedSources/WebCore/ksvgcssproperties.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/DerivedSources/WebCore/ksvgcssvalues.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/JavaScriptCore/ForwardingHeaders/JavaScriptCore/APICast.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSBase.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSContextRef.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSLock.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSObjectRef.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSStringRef.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSStringRefCF.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSValueRef.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JavaScriptCore.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/JavaScriptCore/JavaScriptCore.apolloproj/ForwardingSources/grammar.cpp diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/grammarWrapper.cpp diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/JavaScriptCore/JavaScriptCorePrefix.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/JavaScriptCore/bindings/c/c_utility.cpp --- a/webengine/osswebengine/JavaScriptCore/bindings/c/c_utility.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/JavaScriptCore/bindings/c/c_utility.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -39,6 +39,8 @@ #include "Platform.h" #if USE(ICU_UNICODE) && !USE(SYMBIAN_UNICODE) #include +#elif PLATFORM(SYMBIAN) +#include #endif namespace KJS { namespace Bindings { @@ -88,22 +90,34 @@ (*UTF16Chars)[i] = UTF8Chars[i] & 0xFF; } #elif PLATFORM(SYMBIAN) -// fixme: this needs to be a little bit more sophisticated if (UTF8Length == -1) UTF8Length = strlen(UTF8Chars); - *UTF16Length = UTF8Length; - - *UTF16Chars = (NPUTF16 *)malloc(sizeof(NPUTF16) * (*UTF16Length)); + *UTF16Length = 0; + *UTF16Chars = 0; - for (unsigned i = 0; i < *UTF16Length; i++) - (*UTF16Chars)[i] = UTF8Chars[i] & 0xFF; - + TPtrC8 buf8((TUint8*) UTF8Chars, UTF8Length); + HBufC *hbuf16 = HBufC::New(UTF8Length+1); + if (!hbuf16) + return; + TPtr16 buf16 = hbuf16->Des(); + CnvUtfConverter::ConvertToUnicodeFromUtf8(buf16, buf8); + *UTF16Chars = new NPUTF16[buf16.Length()+1]; + if (!(*UTF16Chars)) { + delete hbuf16; + return; + } + memcpy((void*)*UTF16Chars, (const char*)(buf16.Ptr()), buf16.Size()); + *UTF16Length = buf16.Length(); + (*UTF16Chars)[(*UTF16Length)] = 0; + delete hbuf16; #else assert(!"Implement me!"); #endif } + + // Variant value must be released with NPReleaseVariantValue() void convertValueToNPVariant(ExecState *exec, JSValue *value, NPVariant *result) { diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/JavaScriptCore/icu/unicode/utf_old.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/JavaScriptCore/kjs/array_object.cpp --- a/webengine/osswebengine/JavaScriptCore/kjs/array_object.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/JavaScriptCore/kjs/array_object.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -34,7 +34,7 @@ #include #if PLATFORM(SYMBIAN) -#include +#include #endif // PLATFORM(SYMBIAN) using namespace KJS; diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/JavaScriptCore/pcre/pcre-config.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/JavaScriptCore/pcre/pcre_internal.h --- a/webengine/osswebengine/JavaScriptCore/pcre/pcre_internal.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/JavaScriptCore/pcre/pcre_internal.h Mon Mar 29 12:27:15 2010 +0100 @@ -993,12 +993,12 @@ one of the exported public functions. They have to be "external" in the C sense, but are not part of the PCRE public API. */ -extern int _pcre_ord2utf8(int, uschar *); -extern real_pcre * _pcre_try_flipped(const real_pcre *, real_pcre *, +PCRE_DATA_SCOPE int _pcre_ord2utf8(int, uschar *); +PCRE_DATA_SCOPE real_pcre * _pcre_try_flipped(const real_pcre *, real_pcre *, const pcre_study_data *, pcre_study_data *); -extern int _pcre_ucp_findchar(const int, int *, int *); -extern int _pcre_valid_utf8(const uschar *, int); -extern BOOL _pcre_xclass(int, const uschar *); +PCRE_DATA_SCOPE int _pcre_ucp_findchar(const int, int *, int *); +PCRE_DATA_SCOPE int _pcre_valid_utf8(const uschar *, int); +PCRE_DATA_SCOPE BOOL _pcre_xclass(int, const uschar *); #endif diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/JavaScriptCore/pcre/ucp.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/JavaScriptCore/pcre/ucpinternal.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/JavaScriptCore/wtf/symbian/limits --- a/webengine/osswebengine/JavaScriptCore/wtf/symbian/limits Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/JavaScriptCore/wtf/symbian/limits Mon Mar 29 12:27:15 2010 +0100 @@ -57,15 +57,15 @@ template<> struct numeric_limits { - static long long min() { return -9223372036854775807; } - static long long max() { return 9223372036854775807; } + static long long min() { return -9223372036854775807LL; } + static long long max() { return 9223372036854775807LL; } static const bool is_signed = true; }; template<> struct numeric_limits { - static unsigned long long max() { return 18446744073709551615; } + static unsigned long long max() { return 18446744073709551615ULL; } static const bool is_signed = false; }; } diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/JavaScriptCore/wtf/symbian/snprintf.c --- a/webengine/osswebengine/JavaScriptCore/wtf/symbian/snprintf.c Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/JavaScriptCore/wtf/symbian/snprintf.c Mon Mar 29 12:27:15 2010 +0100 @@ -153,8 +153,8 @@ } PrintfArgValue; -void flushbuffer(PrintfTarget *target); -int dopr(PrintfTarget *target, const char *format, va_list args); +static void flushbuffer(PrintfTarget *target); +static int dopr(PrintfTarget *target, const char *format, va_list args); EXPORT_C int diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/kjs/ExecState.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/AlwaysInline.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/Assertions.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/FastMalloc.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/Forward.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/HashCountedSet.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/HashSet.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/Noncopyable.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/OwnArrayPtr.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/OwnPtr.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/PassRefPtr.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/Platform.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/RefPtr.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/JavaScriptGlue/ForwardingHeaders/wtf/Vector.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/JavaScriptGlue/config.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/MemoryManager/BWINS/MEMMANU.DEF --- a/webengine/osswebengine/MemoryManager/BWINS/MEMMANU.DEF Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/MemoryManager/BWINS/MEMMANU.DEF Mon Mar 29 12:27:15 2010 +0100 @@ -26,4 +26,8 @@ ?SetStatus@MemoryManager@@SAXW4TOOMCheckResult@@@Z @ 25 NONAME ; void MemoryManager::SetStatus(enum TOOMCheckResult) ?Status@MemoryManager@@SAIXZ @ 26 NONAME ; unsigned int MemoryManager::Status(void) ?SwitchToFastAllocator@MemoryManager@@SAPAVRAllocator@@XZ @ 27 NONAME ; class RAllocator * MemoryManager::SwitchToFastAllocator(void) + ?CreateFastAllocator@MemoryManager@@SAXXZ @ 28 NONAME ; void MemoryManager::CreateFastAllocator(void) + ?InitFastAllocator@MemoryManager@@SAXXZ @ 29 NONAME ; void MemoryManager::InitFastAllocator(void) + ?InitOOMDialog@MemoryManager@@SAXXZ @ 30 NONAME ; void MemoryManager::InitOOMDialog(void) + ?ResetOOMDialogDisplayed@MemoryManager@@SAXXZ @ 31 NONAME ; void MemoryManager::ResetOOMDialogDisplayed(void) diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/MemoryManager/EABI/MemManU.DEF --- a/webengine/osswebengine/MemoryManager/EABI/MemManU.DEF Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/MemoryManager/EABI/MemManU.DEF Mon Mar 29 12:27:15 2010 +0100 @@ -38,4 +38,8 @@ _ZTV14RFastAllocator @ 37 NONAME ; ## _ZTV15CFastMemoryPool @ 38 NONAME ; ## _ZTV18CDefaultMemoryPool @ 39 NONAME ; ## + _ZN13MemoryManager17InitFastAllocatorEv @ 40 NONAME + _ZN13MemoryManager19CreateFastAllocatorEv @ 41 NONAME + _ZN13MemoryManager13InitOOMDialogEv @ 42 NONAME + _ZN13MemoryManager23ResetOOMDialogDisplayedEv @ 43 NONAME diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/MemoryManager/Group/MemMan.mmp --- a/webengine/osswebengine/MemoryManager/Group/MemMan.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/MemoryManager/Group/MemMan.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -15,13 +15,11 @@ * */ -#if defined(__BROWSER_SDK) -TARGET MemMan_sdk.dll -#else + #include -#include +#include + TARGET MemMan.dll -#endif TARGETTYPE dll @@ -39,14 +37,9 @@ CAPABILITY CAP_GENERAL_DLL VENDORID VID_DEFAULT EPOCALLOWDLLDATA -#ifndef __BROWSER_SDK + MW_LAYER_SYSTEMINCLUDE -//MW_LAYER_LIBC_SYSTEMINCLUDE -#else -SYSTEMINCLUDE /Epoc32/include -#endif -SYSTEMINCLUDE /epoc32/include/libc -//#endif +OS_LAYER_ESTLIB_SYSTEMINCLUDE USERINCLUDE ../Inc @@ -59,10 +52,13 @@ SOURCE heap.cpp SOURCE SymbianDLAllocatorWrapper.cpp -LIBRARY euser.lib -DEBUGLIBRARY flogger.lib -LIBRARY avkon.lib -LIBRARY estlib.lib -LIBRARY hal.lib +LIBRARY euser.lib +LIBRARY avkon.lib +LIBRARY estlib.lib +LIBRARY hal.lib LIBRARY oommonitor.lib +LIBRARY aknnotify.lib +LIBRARY commonengine.lib + +DEBUGLIBRARY flogger.lib diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/MemoryManager/Group/MemManTest.mmp --- a/webengine/osswebengine/MemoryManager/Group/MemManTest.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/MemoryManager/Group/MemManTest.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -38,10 +38,10 @@ * * ============================================================================== */ -#ifndef __BROWSER_SDK + #include -#include -#endif +#include + TARGET MemManTest.exe TARGETTYPE exe UID 0x01000007 @@ -55,29 +55,23 @@ MACRO KHTML_NO_SCRIPTING EPOCHEAPSIZE 524288 8388608 -#ifndef __BROWSER_SDK + MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE -#else -SYSTEMINCLUDE /epoc32/include /epoc32/include/libc -#endif +OS_LAYER_ESTLIB_SYSTEMINCLUDE USERINCLUDE ../../WEBCORE/bridge ../../WEBCORE/kwq USERINCLUDE ../Inc USERINCLUDE ../tsrc SOURCEPATH ../tsrc -SOURCE MemManUnit.cpp +SOURCE MemManUnit.cpp SOURCE MemManUTConsole.cpp SOURCE MemManUTContainer.cpp LIBRARY ResLoader.lib -#if defined(__BROWSER_SDK) -LIBRARY MemMan_sdk.lib -#else -LIBRARY memman.lib -#endif +LIBRARY memman.lib + LIBRARY ESTLIB.lib LIBRARY euser.lib LIBRARY EFSRV.lib @@ -87,9 +81,9 @@ LIBRARY hal.lib STATICLIBRARY kwq.lib KHTML.lib - #ifdef __S60_32__ LANG sc #else LANGUAGE_IDS #endif + diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/MemoryManager/Group/bld.inf --- a/webengine/osswebengine/MemoryManager/Group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/MemoryManager/Group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ #include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/MemoryManager/Inc/FastAllocator.h --- a/webengine/osswebengine/MemoryManager/Inc/FastAllocator.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/MemoryManager/Inc/FastAllocator.h Mon Mar 29 12:27:15 2010 +0100 @@ -92,6 +92,7 @@ #ifdef TRACK_ALLOCATIONS TUint32 iNextCellId; #endif + friend class MemoryManager; }; #endif //!__FASTALLOCATOR_H__ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/MemoryManager/Inc/MemoryManager.h --- a/webengine/osswebengine/MemoryManager/Inc/MemoryManager.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/MemoryManager/Inc/MemoryManager.h Mon Mar 29 12:27:15 2010 +0100 @@ -297,6 +297,47 @@ * @return */ IMPORT_C static void CloseFastAllocator(RAllocator* aDefaultAllocator); + + /** + * Create fast allocator and switch as default heap. Special case if fast allocator + * has to be created from SetupThreadHeap(). + * + * @since 9.2 + * @param + * @return + */ + IMPORT_C static void CreateFastAllocator(); + + /** + * Initialize MemoryManager library. Special case if CreateFastAllocator is + * called from SetupThreadHeap(). + * + * @since 9.2 + * @param + * @return + */ + IMPORT_C static void InitFastAllocator(); + + /** + * initialize the OOM handler in the memorypool + * @since 9.2 + * @param + * @param + * @return + */ + IMPORT_C static void InitOOMDialog(); + + /** + * Reset the OOM dialog display flag in the memorypool; we want to pop the OOM dialog once per page, + * so we need to clear this when we are either done with the page (it unloads) or when we load a new one, + * so that it will display again when we run out of memory + * @since 9.2 + * @param + * @param + * @return + */ + IMPORT_C static void ResetOOMDialogDisplayed(); + }; #endif// !_MEMORYMANAGER_H_ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/MemoryManager/Inc/MemoryPool.h --- a/webengine/osswebengine/MemoryManager/Inc/MemoryPool.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/MemoryManager/Inc/MemoryPool.h Mon Mar 29 12:27:15 2010 +0100 @@ -21,7 +21,8 @@ #include #include -#include "MemoryManager.h" +#include +#include // CONSTANTS @@ -356,6 +357,8 @@ TUint PostCheck(); TUint FreeMemory( TFreeMem& aFree ); void RestoreRescueBuffer(); + void InitOOMDialog(); + void ResetOOMDialogDisplayed(); #ifdef OOM_LOGGING void DumpHeapLogs(); #endif @@ -363,6 +366,13 @@ void InitLocal(); RSymbianDLHeap *iAlloc; + // Out of memory dialog and localized resource message + void ShowOOMDialog(); + + CAknGlobalNote* iOOMErrorDialog; + HBufC *iOOMMessage; + bool isInitted; + bool iOOMDisplayed; }; #endif diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/MemoryManager/Inc/StopScheduler.h --- a/webengine/osswebengine/MemoryManager/Inc/StopScheduler.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/MemoryManager/Inc/StopScheduler.h Mon Mar 29 12:27:15 2010 +0100 @@ -20,7 +20,7 @@ // INCLUDES -#include "MemoryManager.h" +#include // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/MemoryManager/Inc/oom.h --- a/webengine/osswebengine/MemoryManager/Inc/oom.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/MemoryManager/Inc/oom.h Mon Mar 29 12:27:15 2010 +0100 @@ -20,7 +20,7 @@ #ifdef __OOM__ -#include "MemoryManager.h" +#include /* #include "ObjectBase.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/MemoryManager/Src/FastAllocator.cpp --- a/webengine/osswebengine/MemoryManager/Src/FastAllocator.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/MemoryManager/Src/FastAllocator.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ */ #include "FastAllocator.h" -#include "MemoryManager.h" +#include #include "MemoryPool.h" #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/MemoryManager/Src/MemoryManager.cpp --- a/webengine/osswebengine/MemoryManager/Src/MemoryManager.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/MemoryManager/Src/MemoryManager.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -18,9 +18,10 @@ // INCLUDE FILES -#include "MemoryManager.h" +#include #include "MemoryPool.h" #include "FastAllocator.h" +#include "MemoryLogger.h" // CONSTANTS @@ -31,16 +32,6 @@ // initializing a global memory pool. static CMemoryPool *s_pool = 0; -struct cleanupMemoryPool { - ~cleanupMemoryPool() { - if(s_pool) - { - delete s_pool; - s_pool = NULL; - } - } -}; -static cleanupMemoryPool deleteMemoryPool; //----------------------------------------------------------------------------- // Pool() - a utility function for accessing the right memory pool @@ -58,16 +49,50 @@ } //----------------------------------------------------------------------------- +// MemoryManager::CreateAllocator +//----------------------------------------------------------------------------- +EXPORT_C void MemoryManager::CreateFastAllocator() + { + // create the right memory pool + MEM_LOGF(_L8("MemoryManager::CreateFastAllocator - s_pool=%x"), s_pool); +#ifdef __NEW_ALLOCATOR__ + CMemoryPool *pool = new CNewSymbianHeapPool(); + pool->Create(); + RSymbianDlAllocatorWrapper* allocator = new RSymbianDlAllocatorWrapper((CNewSymbianHeapPool*)pool); + MEM_LOGF(_L8("MemoryManager::CreateFastAllocator - new pool=%x, allocator=%x"), pool, allocator); + User::SwitchAllocator(allocator); +#endif + } + +//----------------------------------------------------------------------------- +// MemoryManager::InitAllocator +//----------------------------------------------------------------------------- +EXPORT_C void MemoryManager::InitFastAllocator() + { + // Initialize s_pool variable from current allocator, assumption is that main program has already called CreateAllocator() + // It is special case when this allocator is created in SetupThreadHeap() where can not initialize static data. It also + // solves problems due to static data destruction in Symbian 9.5. +#ifdef __NEW_ALLOCATOR__ + RAllocator &aAllocator = User::Allocator(); + RSymbianDlAllocatorWrapper* allocator = (RSymbianDlAllocatorWrapper*) &aAllocator; + s_pool = allocator->iPool; + MEM_LOGF(_L8("MemoryManager::InitFastAllocator - s_pool=%x, allocator=%x"), s_pool, allocator); +#endif + } + +//----------------------------------------------------------------------------- // MemoryManager::SwitchToFastAllocator //----------------------------------------------------------------------------- EXPORT_C RAllocator* MemoryManager::SwitchToFastAllocator() { // create the right memory pool - __ASSERT_DEBUG( s_pool == 0, User::Panic( KMemManPanicDes, 0 ) ); + //__ASSERT_DEBUG( s_pool == 0, User::Panic( KMemManPanicDes, 0 ) ); + MEM_LOGF(_L8("MemoryManager::SwitchToFastAllocator - s_pool=%x"), s_pool); #ifdef __NEW_ALLOCATOR__ s_pool = new CNewSymbianHeapPool(); s_pool->Create(); RSymbianDlAllocatorWrapper* allocator = new RSymbianDlAllocatorWrapper((CNewSymbianHeapPool*)s_pool); + MEM_LOGF(_L8("MemoryManager::SwitchToFastAllocator - new s_pool=%x"), s_pool); return User::SwitchAllocator( allocator ); #else s_pool = new CFastMemoryPool(); @@ -78,6 +103,32 @@ } //----------------------------------------------------------------------------- +// MemoryManager::InitOOMHandler +//----------------------------------------------------------------------------- +EXPORT_C void MemoryManager::InitOOMDialog() + { +#ifdef __NEW_ALLOCATOR__ + if (s_pool) + { + ((CNewSymbianHeapPool *)s_pool)->InitOOMDialog(); + } +#endif + } + +//----------------------------------------------------------------------------- +// MemoryManager::ResetOOMDialogDisplayed +//----------------------------------------------------------------------------- +EXPORT_C void MemoryManager::ResetOOMDialogDisplayed() + { +#ifdef __NEW_ALLOCATOR__ + if (s_pool) + { + ((CNewSymbianHeapPool *)s_pool)->ResetOOMDialogDisplayed(); + } +#endif + } + +//----------------------------------------------------------------------------- // MemoryManager::CloseFastAllocator //----------------------------------------------------------------------------- EXPORT_C void MemoryManager::CloseFastAllocator(RAllocator* aDefaultAllocator) @@ -96,6 +147,7 @@ //----------------------------------------------------------------------------- EXPORT_C void MemoryManager::AddCollector( MMemoryCollector* aCollector ) { + MEM_LOGF(_L8("MemoryManager::AddCollector - s_pool=%x"), s_pool); Pool()->AddCollector( aCollector ); } @@ -112,6 +164,7 @@ //----------------------------------------------------------------------------- EXPORT_C void MemoryManager::AddStopper( MOOMStopper* aStopper ) { + MEM_LOGF(_L8("MemoryManager::AddStopper - s_pool=%x"), s_pool); Pool()->AddStopper( aStopper ); } diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/MemoryManager/Src/MemoryPool.cpp --- a/webengine/osswebengine/MemoryManager/Src/MemoryPool.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/MemoryManager/Src/MemoryPool.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -28,6 +28,10 @@ #include "SymbianDlHeap.h" #include #include +#include +#include +#include +#include // CONSTANTS @@ -461,7 +465,10 @@ //----------------------------------------------------------------------------- TAny* CNewSymbianHeapPool::DoAlloc( TUint aSize ) { - return iAlloc->Alloc( aSize ); + TAny *p = iAlloc->Alloc( aSize ); + if (!p) + ShowOOMDialog(); + return p; } //----------------------------------------------------------------------------- @@ -477,6 +484,7 @@ // check memory manager status if( !p || iMemStatus & ERescueOOM ) { + ShowOOMDialog(); if( !iIsCollecting ) { CollectMemory(); @@ -551,7 +559,8 @@ if(req > 0) return ETrue; - // We haven't got the required amount free yet, try the browser heap. + // We haven't got the required amount free yet, pop an OOM dialog and then try the browser heap. + ShowOOMDialog(); CollectMemory(aTotalSize); // ask the system how much is free now... HAL::Get(HALData::EMemoryRAMFree, systemFreeMemory); @@ -610,6 +619,9 @@ CNewSymbianHeapPool::CNewSymbianHeapPool() : CMemoryPool() { + isInitted = EFalse; + iOOMErrorDialog = 0; + iOOMMessage = 0; } CNewSymbianHeapPool::~CNewSymbianHeapPool() @@ -621,7 +633,7 @@ } #ifdef __WINSCW__ -const TInt KMaxHeapSize = 0x2000000; // 32MB, on emulator +const TInt KMaxHeapSize = 0x1000000; // 32MB, on emulator #else const TInt KMaxHeapSize = 0x4000000; // 64MB, on hardware #endif @@ -663,6 +675,55 @@ return CMemoryPool::Create(); } +/* + * Initialize the OOM dialog and localized message resource + * This should be called as soon in the startup process as possible + * (unfortunately it can't be called until resources are already loaded) + * Note: apps are responsible for showing their own oom dialog; there + * is no system one AFAIK; at least we can re-use the oom localized + * resource message from elsewhere + */ +void CNewSymbianHeapPool::InitOOMDialog() + { + if (!isInitted) + { + isInitted = ETrue; + iOOMErrorDialog = CAknGlobalNote::NewL(); + iOOMErrorDialog->SetSoftkeys(R_AVKON_SOFTKEYS_OK_EMPTY); + iOOMMessage = StringLoader::LoadL(R_QTN_BROWSER_DIALOG_OOM); + iOOMDisplayed = EFalse; + } + } + +void CNewSymbianHeapPool::ShowOOMDialog() + { + // Don't show it if we did once already + if (iOOMDisplayed) + return; + + // If we got OOM, show a dialog (if the dialog was initted properly to begin with) + if (iOOMErrorDialog) + { + // If we couldn't load the message resource when we first initted, + // try again now; this shouldn't ever happen + if (!iOOMMessage) + { + iOOMMessage = StringLoader::LoadL(R_QTN_BROWSER_DIALOG_OOM); + } + // If we have no dialog or message we unfortunately cannot display it! + if (iOOMMessage) + { + iOOMErrorDialog->ShowNoteL(EAknGlobalWarningNote,iOOMMessage->Des()); + iOOMDisplayed = ETrue; + } + } + } + +void CNewSymbianHeapPool::ResetOOMDialogDisplayed() + { + iOOMDisplayed = EFalse; + } + #ifdef OOM_LOGGING void CNewSymbianHeapPool::DumpHeapLogs() { diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/MemoryManager/Src/SymbianDLAllocatorWrapper.cpp --- a/webengine/osswebengine/MemoryManager/Src/SymbianDLAllocatorWrapper.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/MemoryManager/Src/SymbianDLAllocatorWrapper.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ */ #include "FastAllocator.h" -#include "MemoryManager.h" +#include #include "MemoryPool.h" #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/MemoryManager/Src/fast_malloc.cpp --- a/webengine/osswebengine/MemoryManager/Src/fast_malloc.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/MemoryManager/Src/fast_malloc.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -448,7 +448,7 @@ #include #include -#include "MemoryManager.h" +#include //#define OOM_LOGGING #include "MemoryLogger.h" @@ -5381,13 +5381,13 @@ // global data and if closing util is not the last // one to be deleted, it will crash. Luckly enough // , it seems to be working fine and no crash so far. +/* struct ChunkClosingUtil { ~ChunkClosingUtil() { rchunk.Close(); } }; - static ChunkClosingUtil __gx_closing; - +*/ /* ----------------------------------------------------------------------- History: C2.8.2 Sun Jun 12 16:01:10 2005 Doug Lea (dl at gee) diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/bindings/NP_jsobject.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/bindings/npruntime.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/bindings/npruntime_impl.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/bindings/runtime.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/bindings/runtime_object.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/bindings/runtime_root.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/kjs/JSLock.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/kjs/SavedBuiltins.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/kjs/collector.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/kjs/dtoa.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/kjs/function.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/kjs/identifier.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/kjs/internal.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/kjs/interpreter.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/kjs/lookup.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/kjs/object.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/kjs/operations.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/kjs/property_map.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/kjs/protect.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/kjs/string_object.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/kjs/ustring.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/kjs/value.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/pcre/pcre.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/wtf/AlwaysInline.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/wtf/Assertions.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/wtf/FastMalloc.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/wtf/Forward.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/wtf/GetPtr.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/wtf/HashCountedSet.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/wtf/HashMap.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/wtf/HashSet.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/wtf/HashTable.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/wtf/HashTraits.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/wtf/ListHashSet.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/wtf/MathExtras.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/wtf/Noncopyable.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/wtf/OwnArrayPtr.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/wtf/OwnPtr.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/wtf/PassRefPtr.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/wtf/Platform.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/wtf/RefPtr.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/wtf/RetainPtr.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/wtf/StringExtras.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/wtf/Vector.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/wtf/unicode/Unicode.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/ForwardingHeaders/wtf/unicode/icu/UnicodeIcu.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/bindings/js/kjs_window.cpp --- a/webengine/osswebengine/WebCore/bindings/js/kjs_window.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/bindings/js/kjs_window.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -1543,7 +1543,15 @@ #if PLATFORM(SYMBIAN) if (d->m_evt && d->m_evt->type() == "mouseover") { - impl()->frame()->page()->chrome()->setElementVisibilityChanged(true); + if (singleShot) { + double interval = max(0.001, t * 0.001); + if (interval < cMinimumTimerInterval && (timerNestingLevel + 1) >= cMaxTimerNestingLevel) { + interval = cMinimumTimerInterval; + } + impl()->frame()->page()->chrome()->wait(interval); + a->execute(this); + return lastUsedTimeoutId; + } } #endif diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/bridge/EditorClient.h --- a/webengine/osswebengine/WebCore/bridge/EditorClient.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/bridge/EditorClient.h Mon Mar 29 12:27:15 2010 +0100 @@ -138,6 +138,9 @@ virtual bool spellingUIIsShowing() = 0; virtual void getGuessesForWord(const String&, Vector& guesses) = 0; virtual void setInputMethodState(bool enabled) = 0; +#if PLATFORM(SYMBIAN) + virtual void preFocusChange(Node* oldNode, Node* newNode) = 0; +#endif }; } diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/css/MediaQuery.cpp diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/css/MediaQuery.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/css/MediaQueryEvaluator.cpp diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/css/MediaQueryEvaluator.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/css/MediaQueryExp.cpp diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/css/MediaQueryExp.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/css/cssparser.cpp --- a/webengine/osswebengine/WebCore/css/cssparser.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/css/cssparser.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -1311,12 +1311,16 @@ if (id == CSS_VAL_NONE || id == CSS_VAL_BOTH || id == CSS_VAL_HORIZONTAL || id == CSS_VAL_VERTICAL || id == CSS_VAL_AUTO) valid_primitive = true; break; + // webkit-column-count currently not supported + #if !PLATFORM(SYMBIAN) case CSS_PROP__WEBKIT_COLUMN_COUNT: if (id == CSS_VAL_AUTO) valid_primitive = true; else valid_primitive = !id && validUnit(value, FInteger | FNonNeg, false); + break; + #endif case CSS_PROP__WEBKIT_COLUMN_GAP: // normal | if (id == CSS_VAL_NORMAL) valid_primitive = true; diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/dom/Document.cpp --- a/webengine/osswebengine/WebCore/dom/Document.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/dom/Document.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -25,6 +25,9 @@ #include "Document.h" #include "AXObjectCache.h" +#if PLATFORM(SYMBIAN) +#include "Brctl.h" +#endif #include "CDATASection.h" #include "CSSHelper.h" #include "CSSStyleSelector.h" @@ -1837,7 +1840,13 @@ } else if (equalIgnoringCase(equiv, "refresh")) { double delay; String url; + #if PLATFORM(SYMBIAN) + TUint autoRefresh = 1; + TRAP_IGNORE(autoRefresh = StaticObjectsContainer::instance()->brctl()->BrowserSettingL(TBrCtlDefs::ESettingsAutoRefresh)); + if (frame && autoRefresh && parseHTTPRefresh(content, true, delay, url)) { + #else if (frame && parseHTTPRefresh(content, true, delay, url)) { + #endif if (url.isEmpty()) url = frame->loader()->url().url(); else @@ -3520,6 +3529,12 @@ void Document::finishedParsing() { setParsing(false); + if (this->hasListenerType(DOMCONTENTLOADED_LISTENER)) + { + ExceptionCode ec = 0; + dispatchEvent(new MutationEvent(DOMContentLoadedEvent, false, false, + this, String(), String(), String(), 0), ec); + } if (Frame* f = frame()) f->loader()->finishedParsing(); } diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/dom/Document.h --- a/webengine/osswebengine/WebCore/dom/Document.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/dom/Document.h Mon Mar 29 12:27:15 2010 +0100 @@ -480,7 +480,8 @@ DOMNODEINSERTEDINTODOCUMENT_LISTENER = 0x10, DOMATTRMODIFIED_LISTENER = 0x20, DOMCHARACTERDATAMODIFIED_LISTENER = 0x40, - OVERFLOWCHANGED_LISTENER = 0x80 + OVERFLOWCHANGED_LISTENER = 0x80, + DOMCONTENTLOADED_LISTENER = 0x90 }; bool hasListenerType(ListenerType listenerType) const { return (m_listenerTypes & listenerType); } diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/dom/EventNames.h --- a/webengine/osswebengine/WebCore/dom/EventNames.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/dom/EventNames.h Mon Mar 29 12:27:15 2010 +0100 @@ -86,6 +86,7 @@ macro(DOMNodeRemoved) \ macro(DOMNodeRemovedFromDocument) \ macro(DOMSubtreeModified) \ + macro(DOMContentLoaded)\ \ macro(webkitBeforeTextInserted) \ macro(webkitEditableContentChanged) \ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/dom/EventTargetNode.cpp --- a/webengine/osswebengine/WebCore/dom/EventTargetNode.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/dom/EventTargetNode.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -108,6 +108,8 @@ type = Document::DOMCHARACTERDATAMODIFIED_LISTENER; else if (eventType == overflowchangedEvent) type = Document::OVERFLOWCHANGED_LISTENER; + else if (eventType == DOMContentLoadedEvent) + type = Document::DOMCONTENTLOADED_LISTENER; if (type) document()->addListenerType(type); diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/html/HTMLAnchorElement.cpp --- a/webengine/osswebengine/WebCore/html/HTMLAnchorElement.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/html/HTMLAnchorElement.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -137,15 +137,22 @@ // when pressing Enter in the combo. if (m_isLink && (evt->type() == clickEvent || (evt->type() == keydownEvent && m_focused))) { MouseEvent* e = 0; - if (evt->type() == clickEvent && evt->isMouseEvent()) - -#if PLATFORM(SYMBIAN) + + +#if PLATFORM(SYMBIAN) + if (evt->type() == clickEvent && evt->isMouseEvent()) { + e = static_cast(evt); + if (m_soundstart) { m_soundstart->OnClick(document()->frame()); } + } +#else + if (evt->type() == clickEvent && evt->isMouseEvent()) + e = static_cast(evt); #endif - e = static_cast(evt); + KeyboardEvent* k = 0; if (evt->type() == keydownEvent && evt->isKeyboardEvent()) diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/html/HTMLLinkElement.cpp --- a/webengine/osswebengine/WebCore/html/HTMLLinkElement.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/html/HTMLLinkElement.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -192,8 +192,13 @@ // IE extension: location of small icon for locationbar / bookmarks // We'll record this URL per document, even if we later only use it in top level frames - if (m_isIcon && !m_url.isEmpty()) + if (m_isIcon && !m_url.isEmpty()) { document()->setIconURL(m_url, type); + if(document()->frame() && document()->frame()->loader()) { + // Notify frame loader to retry icon loading + document()->frame()->loader()->iconLoadDecisionAvailable(); + } + } // Stylesheet // This was buggy and would incorrectly match , which has a different specified meaning. -dwh diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/icu/unicode/utf_old.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/loader/Cache.cpp --- a/webengine/osswebengine/WebCore/loader/Cache.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/loader/Cache.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -106,7 +106,7 @@ { // FIXME: Do we really need to special-case an empty URL? // Would it be better to just go on with the cache code and let it fail later? - if (url.isEmpty()) + if (url.isEmpty() || url.url().lower() == "about:blank") return 0; // Look up the resource in our map. diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/loader/CachedImage.cpp --- a/webengine/osswebengine/WebCore/loader/CachedImage.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/loader/CachedImage.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -25,7 +25,7 @@ #include "CachedImage.h" #include "StaticObjectsContainer.h" #include "ResourceLoaderDelegate.h" -#include "HttpCacheManager.h" +#include "httpcachemanager.h" #include "BitmapImage.h" #include "Cache.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/loader/DocumentLoader.cpp --- a/webengine/osswebengine/WebCore/loader/DocumentLoader.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/loader/DocumentLoader.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -711,6 +711,7 @@ bool DocumentLoader::startLoadingMainResource(unsigned long identifier) { ASSERT(!m_mainResourceLoader); + MemoryManager::ResetOOMDialogDisplayed(); m_mainResourceLoader = MainResourceLoader::create(m_frame); m_mainResourceLoader->setIdentifier(identifier); diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/loader/FrameLoader.cpp --- a/webengine/osswebengine/WebCore/loader/FrameLoader.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/loader/FrameLoader.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -226,6 +226,7 @@ , m_wasUnloadEventEmitted(false) , m_isComplete(false) , m_isLoadingMainResource(false) + , m_mayLoadIconLater(false) , m_cancellingWithLoadInProgress(false) , m_needsClear(false) , m_receivedData(false) @@ -1043,11 +1044,17 @@ void FrameLoader::iconLoadDecisionAvailable() { - if (!m_mayLoadIconLater) - return; LOG(IconDatabase, "FrameLoader %p was told a load decision is available for its icon", this); - startIconLoader(); - m_mayLoadIconLater = false; + if (m_mayLoadIconLater) { + // Notfification came from iconDataBase to load the icon + startIconLoader(); + m_mayLoadIconLater = false; + } else { + // Icon was specified in tag with rel="icon" or rel="shortcut icon" property + if(m_iconLoader) + m_iconLoader->stopLoading(); // cancel previous loading state + startIconLoader(); + } } void FrameLoader::startIconLoader() @@ -1517,7 +1524,17 @@ rect = anchorNode->getRect(); } if (renderer) - renderer->enclosingLayer()->scrollRectToVisible(rect, RenderLayer::gAlignToEdgeIfNeeded, RenderLayer::gAlignTopAlways); + { + if(!anchorNode) + { + renderer->enclosingLayer()->scrollRectToVisible(rect, RenderLayer::gAlignToEdgeIfNeeded, RenderLayer::gAlignToEdgeIfNeeded); + } + else + { + renderer->enclosingLayer()->scrollRectToVisible(rect, RenderLayer::gAlignToEdgeIfNeeded, RenderLayer::gAlignTopAlways); + } + + } return true; } diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/loader/icon/IconLoader.cpp --- a/webengine/osswebengine/WebCore/loader/icon/IconLoader.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/loader/icon/IconLoader.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -95,9 +95,13 @@ int status = response.httpStatusCode(); LOG(IconDatabase, "IconLoader::didReceiveResponse() - Loader %p, response %i", resourceLoader, status); - if (status && (status < 200 || status > 299)) { - ResourceHandle* handle = resourceLoader->handle(); - finishLoading(handle ? handle->request().url() : KURL(), 0); + // It is possible that we are receiving the response for previous load request which is cancelled. + // Process down response of last resource loader only. Ignore if we can not remember other icon load requests. + if(resourceLoader == m_resourceLoader) { + if (status && (status < 200 || status > 299)) { + ResourceHandle* handle = resourceLoader->handle(); + finishLoading(handle ? handle->request().url() : KURL(), 0); + } } } @@ -114,8 +118,10 @@ // we need to be prepared to receive this call even after we've "finished loading" once. // After it is resolved, we can restore an assertion that the load is in progress if ::didFail() is called - if (m_loadIsInProgress) { - ASSERT(resourceLoader == m_resourceLoader); + // It is possible that we are receiving the response for previous load request which is cancelled. + // Process down response of last resource loader only. Ignore if we can not remember other icon load requests. + if (m_loadIsInProgress && (resourceLoader == m_resourceLoader)) { + //ASSERT(resourceLoader == m_resourceLoader); ResourceHandle* handle = resourceLoader->handle(); finishLoading(handle ? handle->request().url() : KURL(), 0); } @@ -129,8 +135,10 @@ // we need to be prepared to receive this call even after we've "finished loading" once. // After it is resolved, we can restore an assertion that the load is in progress if ::didFail() is called - if (m_loadIsInProgress) { - ASSERT(resourceLoader == m_resourceLoader); + // It is possible that we are receiving the response for previous load request which is cancelled. + // Process down response of last resource loader only. Ignore if we can not remember other icon load requests. + if (m_loadIsInProgress && (resourceLoader == m_resourceLoader)) { + //ASSERT(resourceLoader == m_resourceLoader); ResourceHandle* handle = resourceLoader->handle(); finishLoading(handle ? handle->request().url() : KURL(), m_resourceLoader->resourceData()); } diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/loader/icon/IconRecord.h --- a/webengine/osswebengine/WebCore/loader/icon/IconRecord.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/loader/icon/IconRecord.h Mon Mar 29 12:27:15 2010 +0100 @@ -63,7 +63,43 @@ int timestamp; RefPtr data; }; - + +/* To avoid deletion of icon bitmaps in Symbian */ +#if PLATFORM(SYMBIAN) +class IconImagePtr : Noncopyable { + typedef Image* PtrType; +public: + explicit IconImagePtr(PtrType ptr = 0) : m_ptr(ptr) { } + ~IconImagePtr() { /*deleteOwnedPtr(m_ptr);*/ } + + PtrType get() const { return m_ptr; } + PtrType release() { PtrType ptr = m_ptr; m_ptr = 0; return ptr; } + + void set(PtrType ptr) { ASSERT(!ptr || m_ptr != ptr); /*deleteOwnedPtr(m_ptr);*/ m_ptr = ptr; } + void clear() { /*deleteOwnedPtr(m_ptr);*/ m_ptr = 0; } + + Image& operator*() const { ASSERT(m_ptr); return *m_ptr; } + PtrType operator->() const { ASSERT(m_ptr); return m_ptr; } + + bool operator!() const { return !m_ptr; } + + // This conversion operator allows implicit conversion to bool but not to other integer types. + typedef PtrType (IconImagePtr::*UnspecifiedBoolType)() const; + operator UnspecifiedBoolType() const { return m_ptr ? &IconImagePtr::get : 0; } + + void swap(IconImagePtr& o) { std::swap(m_ptr, o.m_ptr); } + + private: + PtrType m_ptr; + }; + + inline void swap(IconImagePtr& a, IconImagePtr& b) { a.swap(b); } + inline Image* getPtr(const IconImagePtr& p) + { + return p.get(); + } +#endif + class IconRecord : public Shared { friend class PageURLRecord; public: @@ -88,7 +124,11 @@ private: String m_iconURL; time_t m_stamp; +#if PLATFORM(SYMBIAN) + IconImagePtr m_image; +#else OwnPtr m_image; +#endif HashSet m_retainingPageURLs; diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/page/Chrome.cpp --- a/webengine/osswebengine/WebCore/page/Chrome.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/page/Chrome.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -352,6 +352,12 @@ { m_client->setElementVisibilityChanged(visibility); } + +void Chrome::wait(double t) +{ + m_client->wait(t); +} + #endif PageGroupLoadDeferrer::PageGroupLoadDeferrer(Page* page, bool deferSelf) { diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/page/Chrome.h --- a/webengine/osswebengine/WebCore/page/Chrome.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/page/Chrome.h Mon Mar 29 12:27:15 2010 +0100 @@ -133,6 +133,7 @@ #if PLATFORM(SYMBIAN) void setElementVisibilityChanged(bool visibility); + void wait(double t); #endif private: Page* m_page; diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/page/ChromeClient.h --- a/webengine/osswebengine/WebCore/page/ChromeClient.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/page/ChromeClient.h Mon Mar 29 12:27:15 2010 +0100 @@ -107,7 +107,10 @@ #if PLATFORM(SYMBIAN) virtual void setElementVisibilityChanged(bool visibility) = 0; virtual bool elementVisibilityChanged() = 0; + virtual bool elementVisibilityChangedByMouse() = 0; + virtual bool elementVisibilityChangedByKey() = 0; virtual void focusedElementChanged(Element*) = 0; + virtual void wait(double t) = 0; #endif }; diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/page/FocusController.cpp --- a/webengine/osswebengine/WebCore/page/FocusController.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/page/FocusController.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -267,7 +267,11 @@ if (oldFocusedNode && oldFocusedNode->rootEditableElement() == oldFocusedNode && !relinquishesEditingFocus(oldFocusedNode)) return false; - + +#if PLATFORM(SYMBIAN) + m_page->editorClient()->preFocusChange(oldFocusedNode,node); +#endif + clearSelectionIfNeeded(oldFocusedFrame.get(), newFocusedFrame.get(), node); if (!node) { diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/page/symbian/WebCoreFrameBridge.cpp --- a/webengine/osswebengine/WebCore/page/symbian/WebCoreFrameBridge.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/page/symbian/WebCoreFrameBridge.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -325,7 +325,7 @@ } } -bool WebCoreFrameBridge::getTypeFromElement(Node* node, TBrCtlDefs::TBrCtlElementType& aElType, TRect& aFocusRect) const +bool WebCoreFrameBridge::getTypeFromElement(Node* node, TBrCtlDefs::TBrCtlElementType& aElType, TRect& aFocusRect, Node*& aRNode) const { if(node && m_frame) { @@ -335,6 +335,7 @@ if( n->isFocusable() ) { aElType = nodeTypeB(n, m_frame); aFocusRect = n->getRect(); + aRNode = n; return true; } else { @@ -347,6 +348,7 @@ || etn->getHTMLEventListener(mouseupEvent)) ) { aFocusRect = n->getRect(); aElType = TBrCtlDefs::EElementMouseButtonListener; + aRNode = n; return true; } else if (n->isElementNode() && n->hasTagName(areaTag)) { @@ -354,6 +356,7 @@ if(!e->getAttribute(hrefAttr).isNull()) { aElType = TBrCtlDefs::EElementAreaBox; aFocusRect = n->getRect(); + aRNode = n; return true; } } @@ -366,6 +369,7 @@ if(!ep->getAttribute(hrefAttr).isNull()) { aElType = nodeTypeB(np, m_frame); aFocusRect = np->getRect(); + aRNode = np; return true; } } @@ -386,6 +390,7 @@ } } aFocusRect = n->getRect().Rect(); + aRNode = n; return true; } else if (n->renderer() && n->renderer()->layer()) { diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/page/symbian/WebCoreFrameBridge.h --- a/webengine/osswebengine/WebCore/page/symbian/WebCoreFrameBridge.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/page/symbian/WebCoreFrameBridge.h Mon Mar 29 12:27:15 2010 +0100 @@ -20,7 +20,7 @@ #include "Shared.h" #include -#include "BrCtlDefs.h" +#include namespace WebCore { class Node; @@ -87,7 +87,7 @@ void updateThumbnail(); Vector* focusableRectList() { return &m_focusableNodeList; } bool searchFor(TPtrC string, bool forward, bool caseSensitive, bool wrapFlag, bool startInSelection); - bool getTypeFromElement(WebCore::Node* node, TBrCtlDefs::TBrCtlElementType& aElType, TRect& aFocusRect) const; + bool getTypeFromElement(WebCore::Node* node, TBrCtlDefs::TBrCtlElementType& aElType, TRect& aFocusRect, WebCore::Node*& aRNode) const; virtual ~WebCoreFrameBridge(); diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/PlatformKeyboardEvent.h --- a/webengine/osswebengine/WebCore/platform/PlatformKeyboardEvent.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/PlatformKeyboardEvent.h Mon Mar 29 12:27:15 2010 +0100 @@ -61,7 +61,7 @@ public: #if PLATFORM(SYMBIAN) String text() const; -#elif +#else String text() const { return m_text; } #endif //PLATFORM(SYMBIAN) String unmodifiedText() const { return m_unmodifiedText; } diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/StringImpl.cpp --- a/webengine/osswebengine/WebCore/platform/StringImpl.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/StringImpl.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -491,14 +491,13 @@ #if PLATFORM(SYMBIAN) -StringImpl* StringImpl::secureShowLast(UChar aChar) const +StringImpl* StringImpl::secureShowOffset(UChar aChar, unsigned offset) const { StringImpl* temp = secure(aChar); if (m_data && temp) { - temp->remove(m_length-1); - temp->insert(&(m_data[m_length-1]), 1, m_length-1); + temp->remove(offset); + temp->insert(&(m_data[offset]), 1, offset); } - return temp; } diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/StringImpl.h --- a/webengine/osswebengine/WebCore/platform/StringImpl.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/StringImpl.h Mon Mar 29 12:27:15 2010 +0100 @@ -151,7 +151,7 @@ StringImpl(const TDesC&); StringImpl(const TDesC8&); TPtrC des() const; - StringImpl* secureShowLast(UChar aChar) const; + StringImpl* secureShowOffset(UChar aChar, unsigned offset) const; #endif StringImpl(const DeprecatedString&); diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/Widget.h --- a/webengine/osswebengine/WebCore/platform/Widget.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/Widget.h Mon Mar 29 12:27:15 2010 +0100 @@ -118,9 +118,12 @@ // e.g., in overflow:auto sections. The clip rects coordinates are in the containing window's coordinate space. // This clip includes any clips that the widget itself sets up for its children. virtual IntRect windowClipRect() const; - +#if PLATFORM(SYMBIAN) + virtual void handleEvent(Event* event); +#else virtual void handleEvent(Event*) { } - +#endif + #if PLATFORM(WIN) void setContainingWindow(HWND); HWND containingWindow() const; diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/graphics/cairo/AffineTransformCairo.cpp diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/graphics/svg/SVGResourceListener.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/image-decoders/zlib/crc32.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/image-decoders/zlib/inffixed.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/image-decoders/zlib/trees.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/network/symbian/CookieHandler.cpp --- a/webengine/osswebengine/WebCore/platform/network/symbian/CookieHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/network/symbian/CookieHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -19,7 +19,7 @@ // INCLUDES #include "Cookiehandler.h" -#include +#include // EXTERNAL DATA STRUCTURES @@ -148,10 +148,22 @@ popAndDestroyCount ++; } - // if the domain is not specified then extract the domain name from the Url + // if the path is not specified then extract the domain name from the Url + // Why do we duplicate this code here? It already exists in Cookie's constructl's call to adddefaultpathl? + TPtrC8 requestPath; if(!cookieRecord.m_pathName.Length()) { const TDesC8& pathName= uriParser.Extract(EUriPath); - cookieRecord.m_pathName.Set(TPtrC(asciiToUnicodeLC(pathName)->Des())); + const TUint8 KCookiePathSeparator = '/'; + requestPath.Set(pathName); + TInt sepPos = requestPath.LocateReverse( KCookiePathSeparator ); + // if / is not the last character + if ( 0 <= sepPos && ( ( sepPos + 1 != requestPath.Length() ) ) ) + { + // then remove characters after the right-most / + requestPath.Set( requestPath.Left( sepPos + 1 ) ); + } + + cookieRecord.m_pathName.Set(TPtrC(asciiToUnicodeLC(requestPath)->Des())); popAndDestroyCount ++; } @@ -162,6 +174,7 @@ cookieRecord); popAndDestroyCount +=6; // create a cookie + // Why are we using the stringpool only constructor of cookie? CCookie* cookie = CCookie::NewL( (*m_stringPool) ); CleanupStack::PushL( cookie ); diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/network/symbian/DataConnection.cpp --- a/webengine/osswebengine/WebCore/platform/network/symbian/DataConnection.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/network/symbian/DataConnection.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include "ResourceHandle.h" #include "ResourceRequest.h" #include "DataConnection.h" @@ -148,8 +148,7 @@ body = HBufC8::NewLC( 2 * data.Length() ); TPtr8 decodedBody( body->Des() ); // urlPtr8 - TImCodecB64 codec; - codec.Initialise(); + TBase64 codec; ok = codec.Decode( data, decodedBody ); } if( !ok ) { // if not base64, simple copy diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/network/symbian/FileConnection.cpp --- a/webengine/osswebengine/WebCore/platform/network/symbian/FileConnection.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/network/symbian/FileConnection.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -26,9 +26,10 @@ #include "ResourceHandleManagerSymbian.h" #include "StaticObjectsContainer.h" #include "ResourceRequest.h" -#include +#include #include "brctl.h" #include "DeprecatedString.h" +#include const TInt KFileReadChunkSize = 23920; // bytes _LIT8( KResLoaderUCS2, "iso-10646-ucs-2" ); @@ -251,17 +252,41 @@ else if( extPtr.CompareF( KEcmaScriptExt() ) == 0 || extPtr.CompareF( KJavaScriptExt() ) == 0 ) { contentTypePtr.Set( _L8( "text/ecmascript" ) ); + } + else { + // Symbian/S60 may not be aware of the MIMEType for the given extension + // Need to query from Plugin handler if there exists a plugin which supports this extension. + return contentTypeFromPluginsL(); } - - // todo plugin is missing - // Check if it is a supported plugin - // CPluginHandler* pluginHandler = CPluginHandler::GetSingleton(); - // TUint16* mimeType16 = pluginHandler->GetPluginMimeTypeL(iFileName); } if( contentTypePtr.Length() ) { contentType = HBufC8::NewL( contentTypePtr.Length() ); contentType->Des().Copy( contentTypePtr ); } + return contentType; +} + +HBufC8* FileConnection::contentTypeFromPluginsL() +{ + HBufC8* contentType = NULL; + + // Get PluginHandler from StaticObjectsContainer + PluginHandler* plg = StaticObjectsContainer::instance()->pluginHandler(); + + // Convert filename16 to filename8 required for pluginMimeByExtention(TPtrC8&) + HBufC8* filename = HBufC8::NewLC(m_fileName->Length()); + filename->Des().Copy(m_fileName->Des()); + + // Query MIMEtype for an extension from PluginHandler + HBufC* mimeTypePtr = plg->pluginMimeByExtention(filename->Des()); + + CleanupStack::PopAndDestroy(); //filename + + if (mimeTypePtr) { + // Coversion from mimeType16 to mimeType8 + contentType = HBufC8::NewL(mimeTypePtr->Length()); + contentType->Des().Copy(mimeTypePtr->Des()); + } return contentType; } diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/network/symbian/FileConnection.h --- a/webengine/osswebengine/WebCore/platform/network/symbian/FileConnection.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/network/symbian/FileConnection.h Mon Mar 29 12:27:15 2010 +0100 @@ -65,6 +65,10 @@ * Determine the content type of the file. */ HBufC8* contentTypeL(); + /** + * Determine the content type of the file from PluginHandler. + */ + HBufC8* contentTypeFromPluginsL(); /** * Determine the content encoding of the file. diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/network/symbian/HttpCacheSupply.cpp --- a/webengine/osswebengine/WebCore/platform/network/symbian/HttpCacheSupply.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/network/symbian/HttpCacheSupply.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -18,7 +18,7 @@ // INCLUDE FILES #include "HttpCacheSupply.h" -#include "HttpCacheManager.h" +#include "httpcachemanager.h" #include "HttpCacheDataSupplier.h" #include "HttpConnection.h" #include "ResourceLoaderDelegate.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/network/symbian/HttpCacheSupply.h --- a/webengine/osswebengine/WebCore/platform/network/symbian/HttpCacheSupply.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/network/symbian/HttpCacheSupply.h Mon Mar 29 12:27:15 2010 +0100 @@ -21,8 +21,8 @@ // INCLUDES #include -#include -#include "HttpCacheManager.h" +#include +#include "httpcachemanager.h" // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/network/symbian/HttpConnUtils.cpp --- a/webengine/osswebengine/WebCore/platform/network/symbian/HttpConnUtils.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/network/symbian/HttpConnUtils.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,10 +17,10 @@ // INCLUDE FILES #include "HttpConnUtils.h" -#include "HttpFilterCommonStringsExt.h" +#include "httpfiltercommonstringsext.h" #include #include -#include +#include #include #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/network/symbian/HttpConnUtils.h --- a/webengine/osswebengine/WebCore/platform/network/symbian/HttpConnUtils.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/network/symbian/HttpConnUtils.h Mon Mar 29 12:27:15 2010 +0100 @@ -20,7 +20,7 @@ // INCLUDES #include -#include +#include #include "HttpDefs.h" // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/network/symbian/HttpConnection.cpp --- a/webengine/osswebengine/WebCore/platform/network/symbian/HttpConnection.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/network/symbian/HttpConnection.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -29,10 +29,10 @@ #include "ResourceLoaderDelegate.h" #include "HttpCacheSupply.h" #include "HttpPostDataSupplier.h" -#include -#include +#include +#include #include "BrCtl.h" -#include "BrCtlSpecialLoadObserver.h" +#include #include "Frame.h" #include "FrameLoader.h" #include "DocumentLoader.h" @@ -648,7 +648,10 @@ return; } int statusCode = m_transaction->Response().StatusCode(); - if ( statusCode != 200) { + if ((statusCode == 404) && (aEvent.iStatus == THTTPEvent::EFailed) && (m_accumulatedSize != 0)) { + complete(KErrNone); + } + else if ( statusCode != 200) { complete(-25000 - m_transaction->Response().StatusCode()); } else if (statusCode == 200 && aEvent.iStatus == THTTPEvent::EFailed) { @@ -913,7 +916,7 @@ break; } } - + m_isDone = ETrue; TRAP( ret, SendAuthRequestL( usernameVal, realmVal, isProxy, stale, passwordVal ) ); if (realmClose) { @@ -1031,7 +1034,7 @@ HttpSessionManager* httpSessionMgr = StaticObjectsContainer::instance()->resourceLoaderDelegate()->httpSessionManager(); httpSessionMgr->removeAuthRequest(this); httpSessionMgr->addRequest(this, m_handle); - + m_isDone = EFalse; switch (aError) { case KErrNone: diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/network/symbian/HttpConnectionConfig.cpp --- a/webengine/osswebengine/WebCore/platform/network/symbian/HttpConnectionConfig.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/network/symbian/HttpConnectionConfig.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -21,7 +21,7 @@ #include "HttpConnection.h" #include "StaticObjectsContainer.h" #include "ResourceLoaderDelegate.h" -#include +#include using namespace WebCore; diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/network/symbian/HttpDlConnection.cpp --- a/webengine/osswebengine/WebCore/platform/network/symbian/HttpDlConnection.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/network/symbian/HttpDlConnection.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -20,7 +20,7 @@ #include "HttpDlConnection.h" #include "StaticObjectsContainer.h" #include "ResourceLoaderDelegate.h" -#include +#include using namespace WebCore; diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/network/symbian/HttpDownload.cpp --- a/webengine/osswebengine/WebCore/platform/network/symbian/HttpDownload.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/network/symbian/HttpDownload.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -16,8 +16,8 @@ */ #include "HttpDownload.h" -#include -#include +#include +#include #include "HttpDlConnection.h" #include "HttpDefs.h" #include "HttpSessionManager.h" @@ -30,15 +30,41 @@ using namespace WebCore; -HttpDownload::HttpDownload(HttpSessionManager* sessionManager) +// ----------------------------------------------------------------------------- +// HttpDownload::NewL +// +// Two-phased constructor. +// ----------------------------------------------------------------------------- +// +HttpDownload* HttpDownload::NewL(HttpSessionManager* sessionManager) + { + HttpDownload* self = new (ELeave) HttpDownload(); + + CleanupStack::PushL (self); + self->ConstructL ( sessionManager); + CleanupStack::Pop (); + return self; + } + +HttpDownload::HttpDownload() { - m_sessionManager = sessionManager; m_dMgrReady = false; m_dMgrUiReg = NULL; - m_downloadObserver = StaticObjectsContainer::instance()->brctl()->brCtlDownloadObserver(); - TRAP_IGNORE(PREPARE_DOWNLOAD_MANAGER) } +// ----------------------------------------------------------------------------- +// HttpDownload::ConstructL +// Symbian 2nd phase constructor can leave. +// by this method. +// ----------------------------------------------------------------------------- +// +void HttpDownload::ConstructL(HttpSessionManager* sessionManager) + { + m_sessionManager = sessionManager; + m_downloadObserver = StaticObjectsContainer::instance()->brctl()->brCtlDownloadObserver(); + PREPARE_DOWNLOAD_MANAGER; + } + HttpDownload::~HttpDownload() { delete m_dMgrUiReg; @@ -72,7 +98,10 @@ if ( errMngr == KErrAlreadyExists && master ) { m_downloadMgr.ConnectL( myProcess.Identity(), *this, EFalse ); } - + else + { + User::LeaveIfError(errMngr); + } if( !master ){ // Browser is embedded. Downloads must be paused when the user closes // the embedded Browser (that is always started from the Launcher), and diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/network/symbian/HttpDownload.h --- a/webengine/osswebengine/WebCore/platform/network/symbian/HttpDownload.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/network/symbian/HttpDownload.h Mon Mar 29 12:27:15 2010 +0100 @@ -18,12 +18,12 @@ #ifndef __HTTPDOWNLOAD_H__ #define __HTTPDOWNLOAD_H__ -#include +#include #include "HttpUiCallbacks.h" #include "HttpCallbacks.h" -#include -#include -#include +#include +#include +#include class HttpDlConnection; class RHTTPTransaction; @@ -33,7 +33,11 @@ class HttpDownload : public MHttpDownloadMgrObserver, public MHttpDownloadMgrNextUriObserver { public: - HttpDownload(HttpSessionManager* sessionManager); + /** + * Two-phased constructor. + */ + static HttpDownload* NewL(HttpSessionManager* sessionManager); + virtual ~HttpDownload(); void continueDownloadL(RHTTPTransaction* connTransaction, HttpDlConnection* dlConnection); @@ -92,6 +96,13 @@ private: /** + * By default Symbian 2nd phase constructor is private. + */ + void ConstructL(HttpSessionManager* sessionManager); + + HttpDownload(); + + /** * Initialize Download Manager */ void initDownloadMgrL(); diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/network/symbian/HttpRequestHeaderManager.cpp --- a/webengine/osswebengine/WebCore/platform/network/symbian/HttpRequestHeaderManager.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/network/symbian/HttpRequestHeaderManager.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -18,9 +18,9 @@ // INCLUDE FILES #include -#include +#include #include "HttpRequestHeaderManager.h" -#include "HttpFilterCommonStringsExt.h" +#include "httpfiltercommonstringsext.h" #include "ResourceRequest.h" #include "StaticObjectsContainer.h" #include "ResourceLoaderDelegate.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/network/symbian/HttpRequestHeaderManager.h --- a/webengine/osswebengine/WebCore/platform/network/symbian/HttpRequestHeaderManager.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/network/symbian/HttpRequestHeaderManager.h Mon Mar 29 12:27:15 2010 +0100 @@ -21,7 +21,7 @@ // INCLUDES -//#include "HttpFilterAcceptHeaderInterface.h" +//#include "httpfilteracceptheaderinterface.h" #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/network/symbian/HttpSessionManager.cpp --- a/webengine/osswebengine/WebCore/platform/network/symbian/HttpSessionManager.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/network/symbian/HttpSessionManager.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,17 +17,17 @@ #include "config.h" -#include "HttpFilterCommonStringsExt.h" -#include "HttpFilterCommonStringsAddition.h" -#include "HttpFilterConnHandlerInterface.h" -#include "HttpFilterIopInterface.h" -#include "HttpFilterAuthenticationInterface.h" +#include "httpfiltercommonstringsext.h" +#include "httpfiltercommonstringsaddition.h" +#include "httpfilterconnhandlerinterface.h" +#include "httpfilteriopinterface.h" +#include "httpfilterauthenticationinterface.h" #include "cookiefilterinterface.h" #include "uaproffilter_interface.h" #include "deflatefilterinterface.h" #include "HttpSessionManager.h" #include "HttpUiCallbacks.h" -#include "HttpCacheManager.h" +#include "httpcachemanager.h" #include "HttpConnection.h" #include "HttpRequestHeaderManager.h" #include "CookieHandler.h" @@ -98,7 +98,12 @@ RStringF maxToPipeline = strP.StringF(HTTP::EMaxNumTransactionsToPipeline, stringTable ); connInfo.SetPropertyL( maxToPipeline, THTTPHdrVal( KHttpMaxTransactionNumPerConnection ) ); - + +#ifdef BRDO_HTTP_STACK_93 + // Set optimal pipelining + RStringF strOptimalPipelineVal = strP.StringF(HTTP::EHttpEnableOptimalPipelining, RHTTPSession::GetTable()); + connInfo.SetPropertyL(strP.StringF(HTTP::EHttpOptimalPipelining, RHTTPSession::GetTable()), strOptimalPipelineVal); +#endif //set HTTP receive Buffer Size property RStringF receiveBuffSize = strP.StringF(HTTP::ERecvBufferSize, stringTable ); connInfo.SetPropertyL( receiveBuffSize, THTTPHdrVal(KHttpReceiveBuffSize)); @@ -150,7 +155,11 @@ HttpDownload* HttpSessionManager::httpDownload(bool aCreate) { if (!m_httpDownload && aCreate){ - m_httpDownload = new HttpDownload(this); + TRAPD(err, m_httpDownload = HttpDownload::NewL(this)); + if(err != KErrNone) + { + m_httpDownload = NULL; + } } return m_httpDownload; } diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/network/symbian/HttpUiCallbacks.cpp --- a/webengine/osswebengine/WebCore/platform/network/symbian/HttpUiCallbacks.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/network/symbian/HttpUiCallbacks.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -27,7 +27,7 @@ #include "WebView.h" #include "BrCtl.h" #include "SettingsContainer.h" -#include "BrCtlSpecialLoadObserver.h" +#include #include "StaticObjectsContainer.h" #include "ResourceLoaderDelegate.h" #include "HttpDefs.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/network/symbian/HttpUiCallbacks.h --- a/webengine/osswebengine/WebCore/platform/network/symbian/HttpUiCallbacks.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/network/symbian/HttpUiCallbacks.h Mon Mar 29 12:27:15 2010 +0100 @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include "HttpConnection.h" class RHTTPTransaction; diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/network/symbian/MultipartContentHandler.cpp --- a/webengine/osswebengine/WebCore/platform/network/symbian/MultipartContentHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/network/symbian/MultipartContentHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -18,13 +18,13 @@ // INCLUDE FILES #include "config.h" #include "MultipartContentHandler.h" -#include "MultipartParser.h" -#include "BodyPart.h" +#include +#include #include "HttpSessionManager.h" -#include "HttpCacheManager.h" +#include "httpcachemanager.h" #include #include -#include "HttpFilterCommonStringsExt.h" +#include "httpfiltercommonstringsext.h" #include "WebCharsetData.h" #include "StaticObjectsContainer.h" #include "ResourceLoaderDelegate.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/network/symbian/ResolvedConnection.cpp --- a/webengine/osswebengine/WebCore/platform/network/symbian/ResolvedConnection.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/network/symbian/ResolvedConnection.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -82,7 +82,9 @@ void ResolvedConnection::cancel() { - control(m_frame)->brCtlLinkResolver()->CancelAll(); + if(m_frame) { + control(m_frame)->brCtlLinkResolver()->CancelAll(); + } } void ResolvedConnection::download(ResourceHandle* handle, diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/network/symbian/ResolvedConnection.h --- a/webengine/osswebengine/WebCore/platform/network/symbian/ResolvedConnection.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/network/symbian/ResolvedConnection.h Mon Mar 29 12:27:15 2010 +0100 @@ -20,8 +20,8 @@ #include #include "UrlConnection.h" -#include "BrCtlDefs.h" -#include "BrCtlLinkResolver.h" +#include +#include namespace WebCore { class Frame; diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/network/symbian/ResourceHandleManagerSymbian.cpp --- a/webengine/osswebengine/WebCore/platform/network/symbian/ResourceHandleManagerSymbian.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/network/symbian/ResourceHandleManagerSymbian.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -155,7 +155,7 @@ return; } if (errorCode) { - client->didFail(resource, ResourceError(String(), errorCode, String(), String())); + client->didFail(resource, ResourceError(String(), errorCode, resource->request().url().url(), String())); } else { client->didFinishLoading(resource); } diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/network/symbian/ResourceLoaderDelegate.cpp --- a/webengine/osswebengine/WebCore/platform/network/symbian/ResourceLoaderDelegate.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/network/symbian/ResourceLoaderDelegate.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -40,8 +40,8 @@ #include "WebUtil.h" #include "WebFrame.h" #include "SettingsContainer.h" -#include "BrCtlSpecialLoadObserver.h" -#include "BrCtlLinkResolver.h" +#include +#include #include "WebDocumentLoader.h" #include "WebView.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/network/symbian/SelfDownloadContentHandler.cpp --- a/webengine/osswebengine/WebCore/platform/network/symbian/SelfDownloadContentHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/network/symbian/SelfDownloadContentHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -19,8 +19,8 @@ // INCLUDE FILES #include "BrCtl.h" #include "SelfDownloadContentHandler.h" -#include -#include +#include +#include #include #include #include "ResourceRequest.h" @@ -29,7 +29,7 @@ #include "StaticObjectsContainer.h" #include "ResourceLoaderDelegate.h" #include "HttpSessionManager.h" -#include "HttpFilterCommonStringsExt.h" +#include "httpfiltercommonstringsext.h" #include #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/network/symbian/UrlConnection.h --- a/webengine/osswebengine/WebCore/platform/network/symbian/UrlConnection.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/network/symbian/UrlConnection.h Mon Mar 29 12:27:15 2010 +0100 @@ -22,7 +22,7 @@ #include "ResourceHandle.h" #include "ResourceHandleInternal.h" -#include "BrCtlDefs.h" +#include namespace WebCore { class Frame; diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/symbian/FileChooserSymbian.cpp --- a/webengine/osswebengine/WebCore/platform/symbian/FileChooserSymbian.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/symbian/FileChooserSymbian.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -32,7 +32,7 @@ #include "WebFrameView.h" #include "WebView.h" #include "Brctl.h" -#include +#include #include #include #if defined(__BROWSER_SDK) diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/symbian/FontCacheSymbian.cpp --- a/webengine/osswebengine/WebCore/platform/symbian/FontCacheSymbian.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/symbian/FontCacheSymbian.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -138,6 +138,9 @@ const AtomicString& PlatformFontCache::SystemFontFamily( const AtomicString& familyName ) { +#ifdef BRDO_BROWSER_MULTIPLE_FONT_SUPPORT + return familyName; +#else // first check if we support this font for (TInt n=0; n -#include "MemoryManager.h" +#include namespace WebCore { diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/symbian/OOMStopper.cpp diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/symbian/OOMStopper.h --- a/webengine/osswebengine/WebCore/platform/symbian/OOMStopper.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/symbian/OOMStopper.h Mon Mar 29 12:27:15 2010 +0100 @@ -1,26 +1,50 @@ /* -* Copyright (c) 2006 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 "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* ============================================================================== +* Name : OOMHandler.h +* Part of : Webcore / Platform +* Interface : +* Description : +* Version : %Version% +* +* Copyright (c) 2006, Nokia Corporation +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: * -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in +* the documentation and/or other materials provided with the +* distribution. +* * Neither the name of the Nokia Corporation nor the names of its +* contributors may be used to endorse or promote products derived +* from this software without specific prior written permission. * -* Description: +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +* DAMAGE. * +* +* ============================================================================== */ - #ifndef __OOMSTOPPER_H__ #define __OOMSTOPPER_H__ #include -#include "MemoryManager.h" +#include namespace WebCore { diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/symbian/PlatformMouseEventSymbian.cpp --- a/webengine/osswebengine/WebCore/platform/symbian/PlatformMouseEventSymbian.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/symbian/PlatformMouseEventSymbian.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -66,6 +66,7 @@ case TPointerEvent::EButton2Up: return MouseEventReleased; case TPointerEvent::EDrag: + case TPointerEvent::EMove: return MouseEventMoved; } } diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/symbian/PopupMenuSymbian.cpp --- a/webengine/osswebengine/WebCore/platform/symbian/PopupMenuSymbian.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/symbian/PopupMenuSymbian.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -34,7 +34,7 @@ #include "brctl.h" #include -#include +#include const TInt KDefaultSize(1); namespace WebCore { diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/symbian/ScrollViewSymbian.cpp --- a/webengine/osswebengine/WebCore/platform/symbian/ScrollViewSymbian.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/symbian/ScrollViewSymbian.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -278,9 +278,13 @@ } } -void ScrollView::removeChild(Widget*) +void ScrollView::removeChild(Widget* child) { //child->removeFromSuperview(); + if(child) + { + child->hide(); + } } void ScrollView::resizeContents(int w, int h) diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/symbian/StaticObjectsContainer.cpp --- a/webengine/osswebengine/WebCore/platform/symbian/StaticObjectsContainer.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/symbian/StaticObjectsContainer.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -37,7 +37,7 @@ #include "FormFillController.h" #include "ResourceLoaderDelegate.h" #include "webkitLogger.h" -#include "brctldefs.h" +#include #include "WebIconDatabase.h" #include "WebSurface.h" #include "WebCursor.h" @@ -337,5 +337,10 @@ m_symbianTheme = new RenderThemeSymbian(); return m_symbianTheme; } + +void StaticObjectsContainer::setIconDatabaseEnabled(bool enabled) +{ + m_icondatabase->setEnabled(enabled); +} } // END OF FILE diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/symbian/StaticObjectsContainer.h --- a/webengine/osswebengine/WebCore/platform/symbian/StaticObjectsContainer.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/symbian/StaticObjectsContainer.h Mon Mar 29 12:27:15 2010 +0100 @@ -100,6 +100,7 @@ const Vector& activeBrowserControls() const; void setFullScreenMode(bool mode); bool fullScreenMode(void); + void setIconDatabaseEnabled(bool enabled); private: static StaticObjectsContainer* gInstance; diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/symbian/WidgetSymbian.cpp --- a/webengine/osswebengine/WebCore/platform/symbian/WidgetSymbian.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/symbian/WidgetSymbian.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -11,7 +11,7 @@ * * Contributors: * -* Description: +* Description: * */ @@ -24,9 +24,12 @@ #include "IntRect.h" #include "IntPoint.h" #include "Cursor.h" +#include "Event.h" +#include "EventNames.h" +#include "KeyboardEvent.h" namespace WebCore { - +using namespace EventNames; static bool deferFirstResponderChanges; static Widget *deferredFirstResponder; @@ -157,7 +160,7 @@ data->visible = false; - if( getOuterView() ) + if( getOuterView() && isFrameView() ) { getOuterView()->makeVisible( EFalse ); } @@ -239,4 +242,18 @@ return getView()->isFocusable(); return false; } + +void Widget::handleEvent(Event* event) +{ + if (event->type() == keydownEvent && event->isKeyboardEvent()) { + KeyboardEvent* kevt = static_cast(event); + if (kevt->keyIdentifier() == "Enter") { + MWebCoreWidget* view = getView(); + if(view && view->isObjectView()) { + view->activate(); + } + } + } } + +} diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/symbian/bitmap/AnimationDecoder.cpp --- a/webengine/osswebengine/WebCore/platform/symbian/bitmap/AnimationDecoder.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/symbian/bitmap/AnimationDecoder.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -1,21 +1,38 @@ /* -* Copyright (c) 2006 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 "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* ============================================================================== +* Copyright (c) 2006, Nokia Corporation +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: * -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in +* the documentation and/or other materials provided with the +* distribution. +* * Neither the name of the Nokia Corporation nor the names of its +* contributors may be used to endorse or promote products derived +* from this software without specific prior written permission. * -* Description: +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +* DAMAGE. * +* ============================================================================== */ - /* * This class is a proxy for CAnimationDecoderWrapped * diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/symbian/bitmap/AnimationDecoder.h --- a/webengine/osswebengine/WebCore/platform/symbian/bitmap/AnimationDecoder.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/symbian/bitmap/AnimationDecoder.h Mon Mar 29 12:27:15 2010 +0100 @@ -1,21 +1,38 @@ /* -* Copyright (c) 2006 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 "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* ============================================================================== +* Copyright (c) 2006, Nokia Corporation +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: * -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in +* the documentation and/or other materials provided with the +* distribution. +* * Neither the name of the Nokia Corporation nor the names of its +* contributors may be used to endorse or promote products derived +* from this software without specific prior written permission. * -* Description: +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +* DAMAGE. * +* ============================================================================== */ - #ifndef ANIMATIONDECODER_H #define ANIMATIONDECODER_H diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/symbian/bitmap/AnimationDecoderWrapped.cpp --- a/webengine/osswebengine/WebCore/platform/symbian/bitmap/AnimationDecoderWrapped.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/symbian/bitmap/AnimationDecoderWrapped.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -1,21 +1,38 @@ /* -* Copyright (c) 2006 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 "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* ============================================================================== +* Copyright (c) 2006, Nokia Corporation +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: * -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in +* the documentation and/or other materials provided with the +* distribution. +* * Neither the name of the Nokia Corporation nor the names of its +* contributors may be used to endorse or promote products derived +* from this software without specific prior written permission. * -* Description: +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +* DAMAGE. * +* ============================================================================== */ - /* * This class is wrapped by a proxy CAnimationDecoder * @@ -32,7 +49,7 @@ #include "MaskedBitmap.h" #include "ImageObserver.h" #include "SyncDecodeThread.h" -#include "Oma2Agent.h" +#include using namespace ContentAccess; namespace TBidirectionalState { @@ -52,6 +69,8 @@ using namespace WebCore; CSynDecodeThread *CAnimationDecoderWrapped::iSyncDecodeThread = NULL; +const TInt KDownScaleFactor = 2; // scaling is done by a factor of 2.For ex.2,4,8...( similar to ImageViewer ) +const TInt KMaxDownScaleFactor = 8; // limit scaling to 8 // ============================ MEMBER FUNCTIONS =============================== // ----------------------------------------------------------------------------- @@ -64,8 +83,8 @@ , iObserver(aObs) , iLoopCount( -1 ) , iCurLoopCount( -1 ) - , iSyncBitmapHandle(-1) - , iSyncMaskHandle(-1) + , iSyncBitmapHandle(0) + , iSyncMaskHandle(0) , iDecodeInProgress(ETrue) , iIsInvalid(EFalse) , iCanBeDeleted(ETrue) @@ -156,17 +175,25 @@ return iDestination; } - if (iSyncBitmapHandle != -1 && iSyncMaskHandle != -1) { + if (iSyncBitmapHandle || iSyncMaskHandle) { CFbsBitmap* bitmap = new CFbsBitmap(); - bitmap->Duplicate(iSyncBitmapHandle); - CFbsBitmap* mask = new CFbsBitmap(); - mask->Duplicate(iSyncMaskHandle); + TInt errBmp = bitmap->Duplicate(iSyncBitmapHandle); + + CFbsBitmap* mask = NULL; + TInt errMask = KErrNone; + if(iSyncMaskHandle) { + CFbsBitmap* mask = new CFbsBitmap(); + errMask = mask->Duplicate(iSyncMaskHandle); + } + + if(errBmp==KErrNone && errMask==KErrNone) { + iDestination = new CMaskedBitmap(bitmap, mask); + iDestination->SetFrameIndex(0); + iDestination->SetFrameDelay(0); + } - iDestination = new CMaskedBitmap(bitmap, mask); - iDestination->SetFrameIndex(0); - iDestination->SetFrameDelay(0); - iSyncBitmapHandle = -1; - iSyncMaskHandle = -1; + iSyncBitmapHandle = 0; + iSyncMaskHandle = 0; } return iDestination; @@ -352,7 +379,6 @@ iAnimation = iAnimationFrameCount > 1; iFrameInfo = iDecoder->FrameInfo( 0 ); iSizeAvailable = ETrue; - if (iFrameInfo.iFlags & TFrameInfo::ETransparencyPossible){ // we only support gray2 and gray256 tiling TDisplayMode maskmode = ( (iFrameInfo.iFlags & TFrameInfo::EAlphaChannel) && (iFrameInfo.iFlags & TFrameInfo::ECanDither)) ? EGray256 : EGray2; @@ -364,11 +390,15 @@ RunError(KErrNoMemory); } else { - TInt error = iDestination->Create( iFrameInfo.iOverallSizeInPixels, DisplayMode() ); - if (!error) - LoadFrame(0); - else - RunError(KErrNoMemory); + TInt error = ScaleImageIfRequired(); + if (!error) + { + LoadFrame(0); + } + else + { + RunError(error); + } } } @@ -597,7 +627,10 @@ iDestination->SetFrameIndex( iFrameIndex ); iDestination->SetFrameDelay( 0 ); //Compress non-animated images via FBServ (losslessly, idle priority) - iDestination->CompressInBackground(); + //the 1x1 image is directly fetched before decompressing it which results in a crash in fbsserv and therefore a white background is displayed. + //If the Image is of pixel (1,1) do not compress. + if( frameSize != TSize(1,1) ) + iDestination->CompressInBackground(); // Normal image ready //iDestination = NULL; @@ -742,6 +775,42 @@ User::RequestComplete( status, aError ); } - +// ----------------------------------------------------------------------------- +// CAnimationDecoderWrapped::ScaleImageIfRequired +// Images that are too large to be displayed are scaled down +// @return error code +// ----------------------------------------------------------------------------- +TInt CAnimationDecoderWrapped::ScaleImageIfRequired() + { + TInt error = iDestination->Create( iFrameInfo.iOverallSizeInPixels, DisplayMode() ); + // if the image is too large try scaling it down + if ( error == KErrNoMemory ) + { + TBool fullyScalable(iFrameInfo.iFlags & TFrameInfo::EFullyScaleable); + // check if scaling is possible + if ( !fullyScalable ) + { + TInt scalingLevel(KDownScaleFactor); + do + { + TSize scaledSize( iFrameInfo.iOverallSizeInPixels.iWidth / scalingLevel + ( iFrameInfo.iOverallSizeInPixels.iWidth % scalingLevel ? 1 : 0 ), + iFrameInfo.iOverallSizeInPixels.iHeight / scalingLevel + ( iFrameInfo.iOverallSizeInPixels.iHeight % scalingLevel ? 1 : 0 ) ); + error = iDestination->Create( scaledSize, DisplayMode() ); + // retry only for KErrNoMemory condition + if (error == KErrNoMemory) + { + // increase to next down scaling level + scalingLevel *= KDownScaleFactor ; + } + else + { + // image scaled to appropriate level + iFrameInfo.iOverallSizeInPixels = scaledSize; + } + }while (error == KErrNoMemory && scalingLevel <= KMaxDownScaleFactor);// loop until we can scale the image without any error + } + } + return error; + } // End of File diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/symbian/bitmap/AnimationDecoderWrapped.h --- a/webengine/osswebengine/WebCore/platform/symbian/bitmap/AnimationDecoderWrapped.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/symbian/bitmap/AnimationDecoderWrapped.h Mon Mar 29 12:27:15 2010 +0100 @@ -1,21 +1,38 @@ /* -* Copyright (c) 2006 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 "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* ============================================================================== +* Copyright (c) 2006, Nokia Corporation +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: * -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in +* the documentation and/or other materials provided with the +* distribution. +* * Neither the name of the Nokia Corporation nor the names of its +* contributors may be used to endorse or promote products derived +* from this software without specific prior written permission. * -* Description: +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +* DAMAGE. * +* ============================================================================== */ - /* * This class is wrapped by a proxy CAnimationDecoder * @@ -191,6 +208,7 @@ void ErrorCleanup(); void SelfComplete( TInt aError = KErrNone ); HBufC8* DecodeDRMImageContentL(const TDesC8& aData); + TInt ScaleImageIfRequired(); private: // Private constructors diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/symbian/bitmap/BitmapTiler.cpp --- a/webengine/osswebengine/WebCore/platform/symbian/bitmap/BitmapTiler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/symbian/bitmap/BitmapTiler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,9 +15,8 @@ * */ - #include -//#include +//#include "oom.h" #include "BitmapTiler.h" #include "MaskedBitmap.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/symbian/bitmap/MaskedBitmap.cpp --- a/webengine/osswebengine/WebCore/platform/symbian/bitmap/MaskedBitmap.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/symbian/bitmap/MaskedBitmap.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -34,6 +34,7 @@ // ----------------------------------------------------------------------------- TInt BitmapUtil::CopyBitmap( const CFbsBitmap& aSource, CFbsBitmap& aDestination ) { + // TODO - how to check if source or destination is null reference TSize size( aSource.SizeInPixels() ); TDisplayMode displayMode( aSource.DisplayMode() ); TInt err( aDestination.Create( size, displayMode ) ); @@ -54,6 +55,7 @@ TInt BitmapUtil::CopyBitmapData( const CFbsBitmap& aSource, CFbsBitmap& aDestination, const TSize& aSize, const TDisplayMode& aDisplayMode ) { + // TODO - how to check if source or destination is null reference HBufC8* scanLine = HBufC8::New( aSource.ScanLineLength( aSize.iWidth, aDisplayMode ) ); if( scanLine ) { @@ -215,7 +217,7 @@ } } - if( !err && maskHandle ) + if( !err && maskHandle && iMask) { if( aDuplicate ) { @@ -247,7 +249,7 @@ void CMaskedBitmap::Reset() { iBitmap->Reset(); - iMask->Reset(); + if(iMask) iMask->Reset(); } @@ -272,7 +274,7 @@ // ----------------------------------------------------------------------------- TBool CMaskedBitmap::HasMask() const { - return ( iMask->Handle() != 0 ); + return (iMask && iMask->Handle()!=0 ); } // ----------------------------------------------------------------------------- @@ -295,7 +297,7 @@ } if( iBitmap->Handle() ) { - if( iMask->Handle() ) + if( HasMask() ) { aContext.BitBltMasked( aPoint, iBitmap, s, iMask, iInvertMask ); } @@ -317,7 +319,7 @@ } if( iBitmap->Handle() ) { - if( iMask->Handle() ) + if( HasMask() ) { aContext.BitBltMasked( aPoint, iBitmap, aSource, iMask, iInvertMask ); @@ -342,7 +344,7 @@ if( iBitmap->Handle() ) { // ### FIXME DrawBitmapMasked is too buggy to use 2.8/week52, so no transparency with scaling - if( iMask->Handle() ) + if( HasMask() ) { aContext.DrawBitmapMasked( aTarget, iBitmap, s, iMask, iInvertMask ); } @@ -365,7 +367,7 @@ if( iBitmap->Handle() ) { // ### FIXME DrawBitmapMasked is too buggy to use 2.8/week52, so no transparency with scaling - if( iMask->Handle() ) + if( HasMask() ) { aContext.DrawBitmapMasked( aTarget, iBitmap, aSource, iMask, iInvertMask ); } @@ -441,10 +443,8 @@ void CMaskedBitmap::Resize(TSize aSize) { iBitmap->Resize(aSize); - if (iMask) - { + if (HasMask()) iMask->Resize(aSize); - } } // ----------------------------------------------------------------------------- @@ -589,10 +589,8 @@ TBool CMaskedBitmap::IsFullyTransparent() { - if (!iMask || !iMask->Handle()) - { + if (!HasMask()) return EFalse; - } if( iMask->DisplayMode() != EGray2 ) { @@ -630,7 +628,7 @@ if ( iBitmap && iBitmap->Handle() ) iBitmap->CompressInBackground(); - if ( iMask && iMask->Handle() ) + if ( HasMask() ) iMask->CompressInBackground(); } diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/symbian/bitmap/StaticImageDecoder.cpp --- a/webengine/osswebengine/WebCore/platform/symbian/bitmap/StaticImageDecoder.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/symbian/bitmap/StaticImageDecoder.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -21,7 +21,7 @@ #include #include #include -#include +#include "oom.h" // CONSTANTS // block all images that would take free ram below this amount when decoded diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/platform/symbian/bitmap/SyncDecodeThread.cpp --- a/webengine/osswebengine/WebCore/platform/symbian/bitmap/SyncDecodeThread.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/platform/symbian/bitmap/SyncDecodeThread.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -119,6 +119,10 @@ // ----------------------------------------------------------------------------- void CSynDecoder::Open(const TDesC8& aData, TRequestStatus *status) { + // FbsSession is needed for parent thread if it doesn't have already + if(!RFbsSession::GetSession()) + RFbsSession::Connect(); + iElem.iRequestStatus = status; iElem.iData.Set(aData); iElem.iParentThreadId = RThread().Id(); @@ -252,7 +256,8 @@ void CSynDecodeThread::ConstructL() { _LIT(KThreadName, "ImgDecoder"); - User::LeaveIfError(iDecoderThread.Create(KThreadName, CSynDecodeThread::ScaleInThread, KDefaultStackSize, KMinHeapSize, KMaxHeapSize, NULL)); + RAllocator &allocator = User::Allocator(); + User::LeaveIfError(iDecoderThread.Create(KThreadName, CSynDecodeThread::ScaleInThread, KDefaultStackSize, &allocator, NULL)); iDecoderThread.SetPriority(EPriorityMore); TRequestStatus status = KRequestPending; iDecoderThread.Rendezvous(status); diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/rendering/RenderListBox.h --- a/webengine/osswebengine/WebCore/rendering/RenderListBox.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/rendering/RenderListBox.h Mon Mar 29 12:27:15 2010 +0100 @@ -89,6 +89,7 @@ #if PLATFORM(SYMBIAN) IntRect itemRect(int tx, int ty, int index) { return itemBoundingBoxRect(tx, ty, index); } int indexOffset() {return m_indexOffset;} + int getSize() {return size();} #endif private: diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/rendering/RenderObject.cpp --- a/webengine/osswebengine/WebCore/rendering/RenderObject.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/rendering/RenderObject.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -2174,11 +2174,11 @@ } } #if PLATFORM(SYMBIAN) - if (m_style->visibility() != style->visibility()) { - document()->page()->chrome()->setElementVisibilityChanged(style->visibility() == VISIBLE); - } - - if (style->position() != StaticPosition) { + if (m_style->visibility() == HIDDEN && + style->visibility() == VISIBLE) { + document()->page()->chrome()->setElementVisibilityChanged(true); + } + else if (style->position() != StaticPosition) { if (style->left() != m_style->left() || style->right() != m_style->right() || @@ -2188,6 +2188,17 @@ document()->page()->chrome()->setElementVisibilityChanged(true); } } + else { + bool curr_style_hidden = (m_style->width().isFixed() && m_style->width().value() <= 0) || + (m_style->height().isFixed() && m_style->height().value() <= 0); + bool new_style_hidden = (style->width().isFixed() && style->width().value() <= 0) || + (style->height().isFixed() && style->height().value() <= 0); + + if (curr_style_hidden && !new_style_hidden) { + document()->page()->chrome()->setElementVisibilityChanged(true); + } + } + #endif } // If we have no layer(), just treat a RepaintLayer hint as a normal Repaint. diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/rendering/RenderText.cpp --- a/webengine/osswebengine/WebCore/rendering/RenderText.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/rendering/RenderText.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -73,11 +73,9 @@ , m_isAllASCII(charactersAreAllASCII(m_text.get())) #if PLATFORM(SYMBIAN) - , m_securityTimer(this, &RenderText::securityTimerFired) - -#endif - + , m_offset(0) +#endif { ASSERT(m_text); setRenderText(); @@ -831,6 +829,9 @@ } m_linesDirty = dirtiedLines; +#if PLATFORM(SYMBIAN) + m_offset = offset; +#endif setText(text, force, backspace); } @@ -921,19 +922,19 @@ case TSNONE: break; case TSCIRCLE: - m_text = m_text->secureShowLast(whiteBullet); + m_text = m_text->secureShowOffset(bullet, m_offset); break; case TSDISC: if(backspace){ m_text = m_text->secure(bullet); } else{ - m_text = m_text->secureShowLast(bullet); + m_text = m_text->secureShowOffset(bullet, m_offset); } break; case TSSQUARE: - m_text = m_text->secureShowLast(blackSquare); + m_text = m_text->secureShowOffset(blackSquare, m_offset); } if (style()->textSecurity() != TSNONE) { diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/rendering/RenderText.h --- a/webengine/osswebengine/WebCore/rendering/RenderText.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/rendering/RenderText.h Mon Mar 29 12:27:15 2010 +0100 @@ -174,7 +174,7 @@ void securityTimerFired(Timer*); Timer m_securityTimer; - + unsigned m_offset; #endif //PLATFORM(SYMBIAN) }; diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebCore/xml/xmlhttprequest.cpp --- a/webengine/osswebengine/WebCore/xml/xmlhttprequest.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebCore/xml/xmlhttprequest.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -725,7 +725,7 @@ else if (responseIsXML()) m_decoder = new TextResourceDecoder("application/xml"); else if (responseMIMEType() == "text/html") - m_decoder = new TextResourceDecoder("text/html"); + m_decoder = new TextResourceDecoder("text/html", "UTF-8"); else m_decoder = new TextResourceDecoder("text/plain", "UTF-8"); } diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/ForwardingHeaders/wtf/unicode/Unicode.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/ForwardingHeaders/wtf/unicode/icu/UnicodeIcu.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/data/01005A02.rss --- a/webengine/osswebengine/WebKit/s60/data/01005A02.rss Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/data/01005A02.rss Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,7 @@ * */ -#include +#include RESOURCE REGISTRY_INFO r_registry { dll_uid = 0x01005A02; // Should match the name of this file diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/data/Webkit.rss --- a/webengine/osswebengine/WebKit/s60/data/Webkit.rss Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/data/Webkit.rss Mon Mar 29 12:27:15 2010 +0100 @@ -27,7 +27,8 @@ #include #include #include -#include +#include +#include RESOURCE RSS_SIGNATURE { } @@ -250,3 +251,5 @@ RESOURCE TBUF r_qtn_browser_dialog_scriptlog_disable_msg { buf=qtn_browser_dialog_scriptlog_disable_msg; } +// Misc dialogs +RESOURCE TBUF r_qtn_browser_dialog_oom { buf=qtn_memlo_ram_out_of_mem; } diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/data/Webkit_sdk.rss --- a/webengine/osswebengine/WebKit/s60/data/Webkit_sdk.rss Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/data/Webkit_sdk.rss Mon Mar 29 12:27:15 2010 +0100 @@ -22,7 +22,7 @@ #include #include #include -#include +#include RESOURCE RSS_SIGNATURE { } diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/formcontrols/PopupSelectListBox.cpp --- a/webengine/osswebengine/WebKit/s60/formcontrols/PopupSelectListBox.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/formcontrols/PopupSelectListBox.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -23,10 +23,11 @@ #include #include //CFormattedCellListBoxData +#include + #include "PopupSelectListBox.h" #include "WebView.h" #include "WebFepTextEditor.h" -#include "BrCtlDialogsProvider.h" // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/formcontrols/PopupSelectListBox.h --- a/webengine/osswebengine/WebKit/s60/formcontrols/PopupSelectListBox.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/formcontrols/PopupSelectListBox.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #ifndef POPUPSELECTLISTBOX_H #define POPUPSELECTLISTBOX_H @@ -24,10 +23,8 @@ #include #include //CFormattedCellListBox - // CONSTANTS - // FORWARD DECLARATIONS class TBrCtlSelectOptionData; diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/formcontrols/WebFormFillPopup.cpp --- a/webengine/osswebengine/WebKit/s60/formcontrols/WebFormFillPopup.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/formcontrols/WebFormFillPopup.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -16,16 +16,21 @@ */ // INCLUDE FILES +#include #include <../bidi.h> +#include + #include "WebFormFillPopup.h" #include "WebView.h" #include "WebFrame.h" #include "WebFrameView.h" -#include "BrCtlDefs.h" +#include #include "PopupSelectListBox.h" -#include "BrCtlDialogsProvider.h" + #include "WebFepTextEditor.h" #include "FormFillCallback.h" +#include "Page.h" +#include "WebChromeClient.h" #include #include @@ -35,7 +40,6 @@ #include "eikon.hrh" - static const TInt KMaxNumToShow = 6; // max number of list items to show static const TInt KInitArraySize = 10; // initial array size static const TInt KBorderSize = 1; // List Box Border size @@ -242,6 +246,9 @@ } + if (response == EKeyWasConsumed) { + m_parent->page()->chrome()->client()->setElementVisibilityChanged(false); + } return response; } @@ -265,8 +272,11 @@ { if (aListBox != m_listBox) return; - +#ifdef BRDO_SINGLE_CLICK_ENABLED_FF + if (aEventType == EEventItemDoubleClicked || aEventType == EEventEnterKeyPressed || aEventType == EEventItemSingleClicked || aEventType == EEventEmptyAreaClicked) +#else if (aEventType == EEventItemDoubleClicked || aEventType == EEventEnterKeyPressed) +#endif { // get the selected item from listbox m_listBox->View()->UpdateSelectionL(CListBoxView::ESingleSelection); @@ -274,7 +284,8 @@ if (m_listBox->IsFocused()) { MakeVisible(EFalse); - m_callback->autoComplete(m_data[selected->At(0)]->Text()); + if(selected != NULL && m_data[selected->At(0)] ) + m_callback->autoComplete(m_data[selected->At(0)]->Text()); } } else if (aEventType == EEventPenDownOnItem) { @@ -358,6 +369,7 @@ else { m_callback->cancelPopup(); } + m_parent->page()->chrome()->client()->setElementVisibilityChanged(false); } // End of File diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/group/JavaScriptCore/JavaScriptCore.mmp --- a/webengine/osswebengine/WebKit/s60/group/JavaScriptCore/JavaScriptCore.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/group/JavaScriptCore/JavaScriptCore.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -15,13 +15,12 @@ * */ - TARGET JavaScriptCore.DLL TARGETTYPE dll UID 0x1000008d 0x10281B70 #include -#include +#include #ifdef __S60_32__ LANG sc @@ -72,8 +71,8 @@ SYSTEMINCLUDE ../../../../JavaScriptCore/ForwardingHeaders SYSTEMINCLUDE ../../../../ -MW_LAYER_LIBC_SYSTEMINCLUDE -MW_LAYER_STDAPIS_SYSTEMINCLUDE +OS_LAYER_ESTLIB_SYSTEMINCLUDE +OS_LAYER_LIBC_SYSTEMINCLUDE SOURCEPATH ../../../../DerivedSources/JavaScriptCore SOURCE grammar.cpp @@ -130,7 +129,6 @@ SOURCE JSWrapperObject.cpp SOURCE PropertyNameArray.cpp - SOURCEPATH ../../../../JavaScriptCore/pcre SOURCE pcre_refcount.c SOURCE pcre_ucp_findchar.c @@ -177,5 +175,5 @@ LIBRARY estlib.lib LIBRARY euser.lib LIBRARY memman.lib +LIBRARY charconv.lib - diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/group/browserengine/bld.inf --- a/webengine/osswebengine/WebKit/s60/group/browserengine/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/group/browserengine/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ #include -#include "../../../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/group/browserengine/browserengine.mmp --- a/webengine/osswebengine/WebKit/s60/group/browserengine/browserengine.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/group/browserengine/browserengine.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ #include "../common.mmpi" -#include TARGET browserengine.dll TARGETTYPE dll @@ -135,7 +134,7 @@ #endif // BRDO_TOUCH_ENABLED_FF #ifdef BRDO_USE_GESTURE_HELPER -LIBRARY rt_gesturehelper.lib +LIBRARY stmgesturefw.lib #endif // BRDO_USE_GESTURE_HELPER #if defined(GCCE) STATICLIBRARY edllstub.lib diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/group/common.mmpi --- a/webengine/osswebengine/WebKit/s60/group/common.mmpi Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/group/common.mmpi Mon Mar 29 12:27:15 2010 +0100 @@ -17,9 +17,10 @@ #include #include -#include +#include SYSTEMINCLUDE ../../../WebCore/platform/symbian/Libxml2 + MW_LAYER_SYSTEMINCLUDE USERINCLUDE ../../../WebCore @@ -75,11 +76,8 @@ SYSTEMINCLUDE ../../../WebCore/icu SYSTEMINCLUDE ../../../WebCore/bindings/js -MW_LAYER_ECOM_SYSTEMINCLUDE -MW_LAYER_HTTP_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE -MW_LAYER_STDAPIS_SYSTEMINCLUDE - +OS_LAYER_ESTLIB_SYSTEMINCLUDE +OS_LAYER_LIBC_SYSTEMINCLUDE SYSTEMINCLUDE ../../../../PageScaler/inc SYSTEMINCLUDE ../../../../WidgetEngine/inc diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/group/libxml2/bld.inf --- a/webengine/osswebengine/WebKit/s60/group/libxml2/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/group/libxml2/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ #include -#include "../../../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/group/libxml2/libxml2.mmp --- a/webengine/osswebengine/WebKit/s60/group/libxml2/libxml2.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/group/libxml2/libxml2.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,7 @@ * */ #include -#include +#include TARGET webcore_xmlparser.lib TARGETTYPE lib @@ -54,4 +54,4 @@ USERINCLUDE . MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE +OS_LAYER_ESTLIB_SYSTEMINCLUDE diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/group/plugins/bld.inf --- a/webengine/osswebengine/WebKit/s60/group/plugins/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/group/plugins/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,7 @@ * */ #include -#include "../../../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/group/plugins/plugins.mmp --- a/webengine/osswebengine/WebKit/s60/group/plugins/plugins.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/group/plugins/plugins.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -14,15 +14,14 @@ * Description: * */ + #include "../common.mmpi" TARGET plugins.lib TARGETTYPE lib - VENDORID VID_DEFAULT -MW_LAYER_SYSTEMINCLUDE SYSTEMINCLUDE ../../../../../../inc SYSTEMINCLUDE ../../../../WebCore/html SYSTEMINCLUDE ../../../../WebCore/dom diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/group/webcore/DerivedSources/DerivedSources.mmp --- a/webengine/osswebengine/WebKit/s60/group/webcore/DerivedSources/DerivedSources.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/group/webcore/DerivedSources/DerivedSources.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -14,9 +14,6 @@ // * Description: This is the project specification file for WebCore. // * -#include -#include -#include #include "../../common.mmpi" TARGET WebCoreDerivedSources.lib diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/group/webcore/DerivedSources/bld.inf --- a/webengine/osswebengine/WebKit/s60/group/webcore/DerivedSources/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/group/webcore/DerivedSources/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ #include #include -#include "../../../../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/group/webcore/bindings/bindings.mmp --- a/webengine/osswebengine/WebKit/s60/group/webcore/bindings/bindings.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/group/webcore/bindings/bindings.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -14,10 +14,6 @@ // * Description: This is the project specification file for WebCore. // * - -#include -#include -#include #include "../../common.mmpi" TARGET WebCorebindings.lib diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/group/webcore/bindings/bld.inf --- a/webengine/osswebengine/WebKit/s60/group/webcore/bindings/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/group/webcore/bindings/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ #include #include -#include "../../../../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/group/webcore/bld.inf --- a/webengine/osswebengine/WebKit/s60/group/webcore/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/group/webcore/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ #include #include -#include "../../../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/group/webcore/bridge/bld.inf --- a/webengine/osswebengine/WebKit/s60/group/webcore/bridge/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/group/webcore/bridge/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ #include #include -#include "../../../../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/group/webcore/bridge/bridge.mmp --- a/webengine/osswebengine/WebKit/s60/group/webcore/bridge/bridge.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/group/webcore/bridge/bridge.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -14,9 +14,6 @@ // * Description: This is the project specification file for WebCore. // * -#include -#include -#include #include "../../common.mmpi" TARGET WebCorebridge.lib diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/group/webcore/dom/bld.inf --- a/webengine/osswebengine/WebKit/s60/group/webcore/dom/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/group/webcore/dom/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ #include #include -#include "../../../../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/group/webcore/dom/dom.mmp --- a/webengine/osswebengine/WebKit/s60/group/webcore/dom/dom.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/group/webcore/dom/dom.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -14,9 +14,6 @@ // * Description: This is the project specification file for WebCore. // * -#include -#include -#include #include "../../common.mmpi" TARGET WebCoredom.lib diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/group/webcore/editing/bld.inf --- a/webengine/osswebengine/WebKit/s60/group/webcore/editing/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/group/webcore/editing/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ #include #include -#include "../../../../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/group/webcore/editing/editing.mmp --- a/webengine/osswebengine/WebKit/s60/group/webcore/editing/editing.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/group/webcore/editing/editing.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -14,9 +14,6 @@ // * Description: This is the project specification file for WebCore. // * -#include -#include -#include #include "../../common.mmpi" TARGET WebCoreediting.lib diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/group/webcore/history/bld.inf --- a/webengine/osswebengine/WebKit/s60/group/webcore/history/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/group/webcore/history/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ #include #include -#include "../../../../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/group/webcore/history/history.mmp --- a/webengine/osswebengine/WebKit/s60/group/webcore/history/history.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/group/webcore/history/history.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -14,9 +14,6 @@ // * Description: This is the project specification file for WebCore. // * -#include -#include -#include #include "../../common.mmpi" TARGET WebCorehistory.lib diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/group/webcore/html/bld.inf --- a/webengine/osswebengine/WebKit/s60/group/webcore/html/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/group/webcore/html/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ #include #include -#include "../../../../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/group/webcore/html/html.mmp --- a/webengine/osswebengine/WebKit/s60/group/webcore/html/html.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/group/webcore/html/html.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -14,9 +14,6 @@ // * Description: This is the project specification file for WebCore. // * -#include -#include -#include #include "../../common.mmpi" TARGET WebCorehtml.lib @@ -110,4 +107,4 @@ SOURCE HTMLTokenizer.cpp SOURCE HTMLUListElement.cpp SOURCE HTMLViewSourceDocument.cpp -SOURCE PreLoadScanner.cpp \ No newline at end of file +SOURCE PreLoadScanner.cpp diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/group/webcore/loader/bld.inf --- a/webengine/osswebengine/WebKit/s60/group/webcore/loader/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/group/webcore/loader/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ #include #include -#include "../../../../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/group/webcore/loader/loader.mmp --- a/webengine/osswebengine/WebKit/s60/group/webcore/loader/loader.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/group/webcore/loader/loader.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -14,9 +14,6 @@ // * Description: This is the project specification file for WebCore. // * -#include -#include -#include #include "../../common.mmpi" TARGET WebCoreloader.lib diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/group/webcore/page/bld.inf --- a/webengine/osswebengine/WebKit/s60/group/webcore/page/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/group/webcore/page/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ #include #include -#include "../../../../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/group/webcore/page/page.mmp --- a/webengine/osswebengine/WebKit/s60/group/webcore/page/page.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/group/webcore/page/page.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -14,9 +14,6 @@ // * Description: This is the project specification file for WebCore. // * -#include -#include -#include #include "../../common.mmpi" TARGET WebCorepage.lib diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/group/webcore/platform/bld.inf --- a/webengine/osswebengine/WebKit/s60/group/webcore/platform/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/group/webcore/platform/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ #include #include -#include "../../../../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/group/webcore/platform/platform.mmp --- a/webengine/osswebengine/WebKit/s60/group/webcore/platform/platform.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/group/webcore/platform/platform.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -14,10 +14,7 @@ // * Description: This is the project specification file for WebCore. // * -#include -#include #include "../../common.mmpi" -#include TARGET WebCoreplatform.lib @@ -26,6 +23,8 @@ VENDORID VID_DEFAULT START RESOURCE ../../../data/webkit.rss +DEPENDS avkon.rsg +DEPENDS eikon.rsg HEADER TARGETPATH RESOURCE_FILES_DIR #ifdef __S60_32__ @@ -49,7 +48,6 @@ SOURCE 1 ../../../data/SelectMultimask.bmp END - //OPTION CW -prefix pragmas.pref SOURCEPATH ../../../../../WebCore/platform diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/group/webcore/rendering/bld.inf --- a/webengine/osswebengine/WebKit/s60/group/webcore/rendering/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/group/webcore/rendering/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ #include #include -#include "../../../../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/group/webcore/rendering/rendering.mmp --- a/webengine/osswebengine/WebKit/s60/group/webcore/rendering/rendering.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/group/webcore/rendering/rendering.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -14,9 +14,6 @@ // * Description: This is the project specification file for WebCore. // * -#include -#include -#include #include "../../common.mmpi" TARGET WebCorerendering.lib diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/group/webcore/webcorecss/bld.inf --- a/webengine/osswebengine/WebKit/s60/group/webcore/webcorecss/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/group/webcore/webcorecss/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ #include #include -#include "../../../../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/group/webcore/webcorecss/webcorecss.mmp --- a/webengine/osswebengine/WebKit/s60/group/webcore/webcorecss/webcorecss.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/group/webcore/webcorecss/webcorecss.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -14,9 +14,6 @@ // * Description: This is the project specification file for WebCore. // * -#include -#include -#include #include "../../common.mmpi" TARGET WebCorecss.lib diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/group/webcore/xml/bld.inf --- a/webengine/osswebengine/WebKit/s60/group/webcore/xml/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/group/webcore/xml/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ #include #include -#include "../../../../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/group/webcore/xml/xml.mmp --- a/webengine/osswebengine/WebKit/s60/group/webcore/xml/xml.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/group/webcore/xml/xml.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -14,9 +14,6 @@ // * Description: This is the project specification file for WebCore. // * -#include -#include -#include #include "../../common.mmpi" TARGET WebCorexml.lib diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/group/webkit/bld.inf --- a/webengine/osswebengine/WebKit/s60/group/webkit/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/group/webkit/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -15,13 +15,13 @@ * */ #include -#include "../../../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT PRJ_EXPORTS -../../loc/Webkit.loc MW_LAYER_LOC_EXPORT_PATH(Webkit.loc) +../../loc/webkit.loc MW_LAYER_LOC_EXPORT_PATH(webkit.loc) ../../rom/webkit.iby CORE_MW_LAYER_IBY_EXPORT_PATH(webkit.iby) ../../rom/webkitResources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(webkitResources.iby) diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/group/webkit/webkit.mmp --- a/webengine/osswebengine/WebKit/s60/group/webkit/webkit.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/group/webkit/webkit.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -19,7 +19,6 @@ TARGET WebKit.lib TARGETTYPE lib - VENDORID VID_DEFAULT SOURCEPATH ../../WebView @@ -42,6 +41,8 @@ SOURCE BrCtlDialogsProviderUtils.cpp SOURCE WebToolBarInterface.cpp SOURCE WebDataLoadConsumer.cpp +SOURCE WebGestureInterface.cpp +SOURCE WebPagePinchZoomHandler.cpp SOURCE WebPageFullScreenHandler.cpp SOURCE WebPageScrollHandler.cpp diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/misc/WebIconDatabase.cpp --- a/webengine/osswebengine/WebKit/s60/misc/WebIconDatabase.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/misc/WebIconDatabase.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -68,16 +68,24 @@ return NULL; CGulIcon* icon = NULL; CFbsBitmap* bitmap = new CFbsBitmap(); - CFbsBitmap* mask = new CFbsBitmap(); - + CFbsBitmap* mask = new CFbsBitmap();; + int errMask = KErrNone; + int errBmp = KErrNone; if (bitmap && mask) { - int err( BitmapUtil::CopyBitmap(maskedBitmap->Bitmap(), *bitmap)); - int errMask( BitmapUtil::CopyBitmap(maskedBitmap->Mask(), *mask)); - if (err == KErrNone && errMask == KErrNone) { + errBmp = BitmapUtil::CopyBitmap(maskedBitmap->Bitmap(), *bitmap); + if(maskedBitmap->HasMask()) { + errMask = BitmapUtil::CopyBitmap(maskedBitmap->Mask(), *mask); + }else { + delete mask; + mask = NULL; + } + + if (errBmp == KErrNone && errMask == KErrNone) { TRAP_IGNORE(icon = CGulIcon::NewL()); if (icon) { icon->SetBitmap( bitmap ); - icon->SetMask( mask ); + if(mask) + icon->SetMask( mask ); } } } @@ -96,4 +104,7 @@ iconDatabase()->releaseIconForPageURL(String(url)); } - +void WebIconDatabase::setEnabled(bool enabled) +{ + iconDatabase()->setEnabled(enabled); +} diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/misc/WebIconDatabase.h --- a/webengine/osswebengine/WebKit/s60/misc/WebIconDatabase.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/misc/WebIconDatabase.h Mon Mar 29 12:27:15 2010 +0100 @@ -33,6 +33,7 @@ CGulIcon* iconForPageURL(const TDesC8& url); void retainIconForURL(const TDesC8& url); void releaseIconForURL(const TDesC8& url); + void setEnabled(bool enabled); private: diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/misc/WebTabbedNavigation.cpp --- a/webengine/osswebengine/WebKit/s60/misc/WebTabbedNavigation.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/misc/WebTabbedNavigation.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -27,7 +27,7 @@ #include "HitTestResult.h" #include "HTMLNames.h" #include "FrameTree.h" -#include "BrCtlDefs.h" +#include #include "WebCursor.h" #include "StaticObjectsContainer.h" #include "Page.h" @@ -70,7 +70,7 @@ void WebTabbedNavigation::initializeForPage() { - if (!m_initializedForPage) { + if (!m_initializedForPage && m_webView->IsVisible()) { if (navigate(0, 1)) { m_initializedForPage = true; m_firstNavigationOnPage = false; @@ -81,14 +81,6 @@ void WebTabbedNavigation::updateCursorPosition(const TPoint& pos) { m_focusPosition = pos; - WebFrame* frame = StaticObjectsContainer::instance()->webCursor()->getFrameAtPoint(pos); - TPoint point(frame->frameView()->viewCoordsInFrameCoords(pos)); - - Element* node = core(frame)->document()->elementFromPoint(point.iX, point.iY); - if (node->isFocusable() && !node->hasTagName(iframeTag) && !node->hasTagName(frameTag)) - m_webView->page()->focusController()->setFocusedNode(node, core(frame)); - else - m_webView->page()->focusController()->setFocusedNode(NULL, core(frame)); m_selectedElementRect.SetRect(pos.iX, pos.iY, pos.iX + 1, pos.iY + 1); } @@ -101,88 +93,202 @@ m_focusPosition = StaticObjectsContainer::instance()->webCursor()->position(); } -bool WebTabbedNavigation::navigate(int horizontalDir, int verticalDir) + +void WebTabbedNavigation::resetNavigationIfNeeded(TPoint& contentPos, TSize& contentSize, + Frame* focusedFrame, int horizontalDir, int verticalDir) { - if (handleSelectElementScrolling(m_webView, verticalDir)) { - StaticObjectsContainer::instance()->webCursor()->cursorUpdate(true); - return true; - } - // DOM can be changed so check if we are still inside the document - // If not reset tabbed navigation parameters to the closest point in document. - TSize contentSize = m_webView->mainFrame()->frameView()->contentSize(); - TPoint contentPos = m_webView->mainFrame()->frameView()->contentPos(); - TRect docRect = TRect(contentPos, contentSize - contentPos); + TPoint docBrViewCoord = kit(focusedFrame)->frameView()->frameCoordsInViewCoords( + TPoint(contentSize.iWidth, contentSize.iHeight)); + TRect docRect = TRect(TPoint(0,0), docBrViewCoord); if (!docRect.Contains(m_focusPosition)) { TInt viewW = m_webView->Rect().Width(); TInt viewH = m_webView->Rect().Height(); - if (m_focusPosition.iX > contentSize.iWidth || - m_focusPosition.iX < contentPos.iX) { + if (m_focusPosition.iX > contentSize.iWidth) { m_focusPosition.iX = (horizontalDir == -1) ? contentPos.iX + viewW : contentPos.iX; } - if (m_focusPosition.iY > contentSize.iHeight || - m_focusPosition.iY < contentPos.iY) { + if (m_focusPosition.iY > contentSize.iHeight) { m_focusPosition.iY = (verticalDir == -1) ? contentPos.iY + viewH : contentPos.iY; } - - m_selectedElementRect.SetRect(m_focusPosition.iX, m_focusPosition.iY, m_focusPosition.iX, m_focusPosition.iY); + + m_selectedElementRect.SetRect(m_focusPosition.iX, m_focusPosition.iY, + m_focusPosition.iX, m_focusPosition.iY); m_node = NULL; } +} + + +TPoint WebTabbedNavigation::focusPointFromFocusedNode(Frame* frame, int horizontalDir, int verticalDir) +{ + TPoint oldFocusPoint(m_focusPosition); + TPoint focusPosition(m_focusPosition); + TRect selectedElementRect(m_selectedElementRect); - bool ret = m_firstNavigationOnPage; - Frame* focusedFrame = m_webView->page()->focusController()->focusedFrame(); - if (focusedFrame == NULL) focusedFrame = m_webView->page()->mainFrame(); - if (focusedFrame->document()) { - Node* focusNode = focusedFrame->document()->focusedNode(); - if (focusNode) { - m_node = focusNode; - m_selectedElementRect = focusNode->getRect().Rect(); - Frame* frame = focusNode->document()->frame(); - m_selectedElementRect = TRect(kit(frame)->frameView()->frameCoordsInViewCoords(m_selectedElementRect.iTl), - kit(frame)->frameView()->frameCoordsInViewCoords(m_selectedElementRect.iBr)); + if (frame->document()) { + Node* focusedNode = frame->document()->focusedNode(); + if (focusedNode) { + m_node = focusedNode; + selectedElementRect = focusedNode->getRect().Rect(); + Frame* frame = focusedNode->document()->frame(); + selectedElementRect = kit(frame)->frameView()->frameCoordsInViewCoords(selectedElementRect); + + // Move the focus to the visible edge of the current object + TRect elemVisibleRect = selectedElementRect; + if (elemVisibleRect.Intersects(m_webView->Rect())) { + + elemVisibleRect.Intersection(m_webView->Rect()); + if (horizontalDir == -1) { + focusPosition.iX = elemVisibleRect.iTl.iX; + } + else if (horizontalDir == 1) { + focusPosition.iX = elemVisibleRect.iBr.iX; + } + + if (verticalDir == -1) { + focusPosition.iY = elemVisibleRect.iTl.iY; + } + else if (verticalDir == 1) { + focusPosition.iY = elemVisibleRect.iBr.iY; + } + + if ((verticalDir == 0) && (horizontalDir == 0)) { + focusPosition = elemVisibleRect.Center(); + } + m_focusPosition = focusPosition; + } + m_selectedElementRect = selectedElementRect; } } - TPoint oldFocusPoint(m_focusPosition); - // Move the focus to the edge of the current object + return oldFocusPoint; +} + + +void WebTabbedNavigation::calcSearchViewRect(int horizontalDir, int verticalDir, TRect& view) +{ + + TPoint br; + TPoint viewBr = m_webView->Rect().iBr; + br.iX = viewBr.iX * KMaxJumpPercent / m_webView->scalingFactor(); + br.iY = viewBr.iY * KMaxJumpPercent / m_webView->scalingFactor(); + // define the view rect where we are looking for a match + int x, y; if (horizontalDir == -1) { - m_focusPosition.iX = m_selectedElementRect.iTl.iX; + view.SetRect(m_focusPosition.iX - br.iX, m_focusPosition.iY - br.iY, + m_focusPosition.iX , m_focusPosition.iY + br.iY); } else if (horizontalDir == 1) { - m_focusPosition.iX = m_selectedElementRect.iBr.iX; + view.SetRect(m_focusPosition.iX, m_focusPosition.iY - br.iY, + m_focusPosition.iX + br.iX, m_focusPosition.iY + br.iY); } - if (verticalDir == -1) { - m_focusPosition.iY = m_selectedElementRect.iTl.iY; + else if (verticalDir == -1) { + view.SetRect(m_focusPosition.iX - br.iX, m_focusPosition.iY - br.iY, + m_focusPosition.iX + br.iX, m_focusPosition.iY); } else if (verticalDir == 1) { - m_focusPosition.iY = m_selectedElementRect.iBr.iY; + view.SetRect(m_focusPosition.iX - br.iX, m_focusPosition.iY, + m_focusPosition.iX + br.iX, m_focusPosition.iY + br.iY); } - wkDebug()<<"WebTabbedNavigation::navigate. x = "<(e->renderer()); - HTMLSelectElement* selectElement = static_cast( e ); - IntRect itemRect = render->itemRect(0, 0, 0); - TPoint cursorPoint(StaticObjectsContainer::instance()->webCursor()->position()); - int gap = (20 * m_webView->scalingFactor()) / 100; - cursorPoint.iX = max(m_focusPosition.iX, m_selectedElementRect.iTl.iX + gap); - cursorPoint.iX = std::min(cursorPoint.iX, m_selectedElementRect.iBr.iX - gap); - if (verticalDir == -1) { - cursorPoint.iY -= (itemRect.height() * m_webView->scalingFactor()) / 125; - } - if (cursorPoint != StaticObjectsContainer::instance()->webCursor()->position()) { - StaticObjectsContainer::instance()->webCursor()->setPosition(cursorPoint); - } - } - } - } - TPointerEvent event; - event.iPosition = StaticObjectsContainer::instance()->webCursor()->position(); - event.iModifiers = 0; - event.iType = TPointerEvent::EMove; - core(m_webView->mainFrame())->eventHandler()->handleMouseMoveEvent(PlatformMouseEvent(event)); - wkDebug()<<"Focus position x = "<(e->renderer()); + HTMLSelectElement* selectElement = static_cast( e ); + TRect itemRect = render->itemRect(0, 0, render->indexOffset()).Rect(); + TRect itemRectViewCoord = fv->frameCoordsInViewCoords(itemRect); + itemRectViewCoord.Move(m_selectedElementRect.iTl); + itemRectViewCoord.Intersection(fv->topView()->Rect()); + + TPoint cursorPoint = itemRect.Center() + m_selectedElementRect.iTl; + if (cursorPoint != cursor->position()) { + cursor->setPosition(cursorPoint); } } } - StaticObjectsContainer::instance()->webCursor()->cursorUpdate(true); - return ret; } bool WebTabbedNavigation::selectNode(int horizontalDir, int verticalDir, TRect& selectedRect, TRect& newNodeRect, TPoint& selectedPoint, TPoint& newFocusPoint) @@ -308,7 +371,7 @@ } int selectedDist = distanceFunction(horizontalDir, verticalDir, selectedRect, selectedPoint); int newDist = distanceFunction(horizontalDir, verticalDir, newNodeRect, newFocusPoint); - wkDebug()<<"WebTabbedNavigation::selectNode. selected x = "< class WebFrame; class WebView; diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/plugins/EcomBrowserPluginInterface.h --- a/webengine/osswebengine/WebKit/s60/plugins/EcomBrowserPluginInterface.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/plugins/EcomBrowserPluginInterface.h Mon Mar 29 12:27:15 2010 +0100 @@ -24,7 +24,7 @@ #include #include -#include +#include typedef struct { diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/plugins/NpnImplementation.cpp --- a/webengine/osswebengine/WebKit/s60/plugins/NpnImplementation.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/plugins/NpnImplementation.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -21,7 +21,7 @@ #include "NpnImplementation.h" #include "PluginWin.h" #include "PluginSkin.h" -#include +#include #include #include #include @@ -369,7 +369,7 @@ case NPNVisOfflineBool: // Tells whether offline mode is enabled; // true=offline mode enabled, false=not enabled - case NPNNetworkAccess: + case NPNNetworkAccess: { PluginWin* pluginWin = (PluginWin*)aInstance->ndata; TInt apId = -1; if (pluginWin) { @@ -377,7 +377,7 @@ } *((TInt*) aRetValue) = apId; break; - + } case NPNVGenericParameter: { PluginWin* pluginWin = (PluginWin*)aInstance->ndata; if (pluginWin) { @@ -481,8 +481,20 @@ { PluginWin* pluginWin = (PluginWin*)aInstance->ndata; if (pluginWin) { - TPoint* cursorPos = static_cast(aSetValue); - pluginWin->pluginDeactivate(*cursorPos); + TPoint* cursorPos; + + //EPMR-7XPHXV aSetValue is set as "(void*) 1" from + //"CBrowserPluginControl::GoNormalScreenL" from the flash plugin + //to avoid the Invalid pointer access, we are checking for + //aSetValue and setting point as (0,0) and also for NULL Value + if((aSetValue == (void*)1) || (!aSetValue)) { + TPoint position(0,0); + cursorPos = static_cast(&position); + } + else { + cursorPos = static_cast(aSetValue); + } + pluginWin->pluginDeactivate(*cursorPos); } } break; diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/plugins/PluginHandler.h --- a/webengine/osswebengine/WebKit/s60/plugins/PluginHandler.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/plugins/PluginHandler.h Mon Mar 29 12:27:15 2010 +0100 @@ -27,7 +27,7 @@ #include #include #include // ecom -#include "EcomBrowserPluginInterface.h" +#include "Ecombrowserplugininterface.h" #include "WebCorePluginHandler.h" // FORWARD DECLARATIONS diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/plugins/PluginSkin.cpp --- a/webengine/osswebengine/WebKit/s60/plugins/PluginSkin.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/plugins/PluginSkin.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -20,7 +20,7 @@ #include "../../bidi.h" #include "PlatformString.h" #include -#include +#include #include "PluginSkin.h" #include "PluginWin.h" #include "PluginHandler.h" @@ -33,7 +33,7 @@ #include "BrCtl.h" #include "WebCoreGraphicsContext.h" #include "StaticObjectsContainer.h" -#include "BrCtlDefs.h" +#include #include "SettingsContainer.h" #include #include @@ -47,12 +47,10 @@ #include #include -#include +#include #include -#include -#include "CString.h" #include "WidgetExtension.h" -#include +#include // CONSTANTS using namespace WebCore; @@ -100,10 +98,13 @@ // return an absolute url that results from refUrl being resolved against // baseUrl. // ---------------------------------------------------------------------------- -HBufC8* makeAbsoluteUrlL(const TDesC8& baseUrl, const TDesC8& refUrl) +HBufC8* makeAbsoluteUrlL(const TDesC8* baseUrl,const TDesC8* docUrl, const TDesC8& refUrl) { TUriParser8 baseUrlparser; - baseUrlparser.Parse(baseUrl); + if(baseUrl == NULL) + baseUrlparser.Parse(*docUrl); + else + baseUrlparser.Parse(*baseUrl); TUriParser8 refUrlparser; refUrlparser.Parse(refUrl); @@ -474,7 +475,7 @@ { positionChanged(); // Force the control to be redrawn. - m_pluginwin->refreshPlugin(*gc); + m_pluginwin->refreshPlugin(*gc,newRect); } } @@ -804,7 +805,7 @@ if (url.Ptr() == NULL ) { return KErrArgument; } - + _LIT8(KSwfExtn, ".swf"); _LIT8(KJs, "javascript:"); if ((url.Length() > KJs().Length() ) &&(url.Left(KJs().Length()).FindF(KJs) == 0)) { HBufC* pBuffer = HBufC::NewL(url.Length()); @@ -821,24 +822,18 @@ } // make sure it is an absolute URL - HBufC8* absoluteUrl = makeAbsoluteUrlL(*m_url, url); + HBufC8* docUrl = HBufC8::NewLC(core(m_frame)->document()->baseURI().length()); + docUrl->Des().Copy(core(m_frame)->document()->baseURI()); + HBufC8* absoluteUrl = makeAbsoluteUrlL(m_url, docUrl, url); CleanupStack::PushL(absoluteUrl); - if (loadmode == ELoadModePlugin ) { + if( (loadmode == ELoadModePlugin ) || (url.FindF(KSwfExtn)!= KErrNotFound) ){ if (m_instance && m_pluginfuncs) { - NetscapePlugInStreamLoaderClient* pluginloader = NetscapePlugInStreamLoaderClient::NewL(url, this, core(m_frame), notifydata); + NetscapePlugInStreamLoaderClient* pluginloader = NetscapePlugInStreamLoaderClient::NewL(url, this, core(m_frame), notifydata, notify); if (pluginloader) { - pluginloader->start(); - - if ( notify ) { - HBufC* url16 = HBufC::NewLC( url.Length() ); - url16->Des().Copy( url ); - m_pluginfuncs->urlnotify( m_instance, *url16, NPRES_DONE, notifydata ); - CleanupStack::PopAndDestroy(url16); - } - + pluginloader->start(); } } } @@ -849,7 +844,7 @@ CleanupStack::PopAndDestroy(windowType); } - CleanupStack::PopAndDestroy(absoluteUrl); + CleanupStack::PopAndDestroy(2); return KErrNone; } @@ -857,7 +852,9 @@ int PluginSkin::postRequestL(const TDesC8& url,const TDesC& buffer, bool fromfile, bool notify, void* notifydata,const TDesC* aWindowType) { // make sure it is an absolute URL - HBufC8* absoluteUrl = makeAbsoluteUrlL(*m_url, url); + HBufC8* docUrl = HBufC8::NewLC(core(m_frame)->document()->baseURI().length()); + docUrl->Des().Copy(core(m_frame)->document()->baseURI()); + HBufC8* absoluteUrl = makeAbsoluteUrlL(m_url, docUrl, url); CleanupStack::PushL(absoluteUrl); TPluginLoadMode loadmode = GetLoadMode(aWindowType); @@ -907,11 +904,9 @@ int start_content = buffer.Find(KRequestEOH()); start_content = (start_content != KErrNotFound) ? start_content+ KRequestEOH().Length() : 0; - HBufC* body = HBufC::NewLC(buffer.Mid(start_content).Length()+1); - body->Des().Copy(buffer.Mid(start_content)); - TextEncoding *ecoder = new TextEncoding(core(mainFrame(m_frame))->loader()->encoding()); - CString decoded_body = ecoder->encode(body->Des().PtrZ(),body->Length()); - FormData* fd = new (ELeave) FormData(decoded_body.data(),decoded_body.length()); + HBufC8* body = HBufC8::NewLC(buffer.Mid(start_content).Length()); + body->Des().Copy(buffer.Mid(start_content)); + FormData* fd = new (ELeave) FormData(body->Ptr(),body->Length()); request.setHTTPBody(fd); CleanupStack::PopAndDestroy(); // body } @@ -920,17 +915,9 @@ if (loadmode == ELoadModePlugin ) { if (m_instance && m_pluginfuncs) { - NetscapePlugInStreamLoaderClient* pluginloader = NetscapePlugInStreamLoaderClient::NewL(request, this, core(m_frame), notifydata); + NetscapePlugInStreamLoaderClient* pluginloader = NetscapePlugInStreamLoaderClient::NewL(request, this, core(m_frame), notifydata, notify); if (pluginloader) { - pluginloader->start(); - - if ( notify ) { - HBufC* url16 = HBufC::NewLC( url.Length() ); - url16->Des().Copy( url ); - m_pluginfuncs->urlnotify( m_instance, *url16, NPRES_DONE, notifydata ); - CleanupStack::PopAndDestroy(url16); - } - + pluginloader->start(); } } } @@ -942,7 +929,7 @@ } - CleanupStack::PopAndDestroy(absoluteUrl); + CleanupStack::PopAndDestroy(2); return KErrNone; } @@ -1004,6 +991,25 @@ return (void *)0; } +TBool validateDataScheme(const TPtrC8& url) +{ + // Check if body part of "data:" exists = data:[][;base64],. RFC-2397 : http://www.faqs.org/rfcs/rfc2397 + TPtrC8 urlPtr8 = url; + + if(url.Length() <= 0 ) + return EFalse; + + TInt commaPos( urlPtr8.Locate( ',' ) ); + if (commaPos == KErrNotFound ) + return EFalse; + + TPtrC8 datapart (urlPtr8.Mid(commaPos + 1)); + if (datapart.Length() <= 0) + return EFalse; + + return ETrue; +} + TBool PluginSkin::isBrowserScheme(const TPtrC8& url) { TBool supported(EFalse); @@ -1011,9 +1017,13 @@ if( parser.Parse( url ) == KErrNone ) { TPtrC8 scheme = parser.Extract( EUriScheme ); if (scheme.CompareF( _L8("http" ) ) == 0 || scheme.CompareF( _L8("https" ) ) == 0 - || scheme.Length() == 1 || scheme.CompareF( _L8("file") ) == 0 || scheme.CompareF( _L8("data") ) == 0) { + || scheme.Length() == 1 || scheme.CompareF( _L8("file") ) == 0) { supported = ETrue; } + else if(scheme.CompareF( _L8("data") ) == 0) { + // if the scheme is "data", check its validity according to RFC-2397 : http://www.faqs.org/rfcs/rfc2397 + supported = validateDataScheme(url); + } } return supported; } @@ -1050,8 +1060,9 @@ frameRectInViewCoord.Intersects(viewRect); if (m_pluginwin) { - m_pluginwin->makeVisible( isFrameVisible && !isPageViewMode && isPluginVisible); - if (!m_pluginwin->isPluginInFullscreen()) { + TBool visibility = isFrameVisible && !isPageViewMode && isPluginVisible; + m_pluginwin->makeVisible(visibility); + if (!m_pluginwin->isPluginInFullscreen() && visibility) { clipRect.Intersection(fullRect); m_pluginwin->SetRect(clipRect); } diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/plugins/PluginSkin.h --- a/webengine/osswebengine/WebKit/s60/plugins/PluginSkin.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/plugins/PluginSkin.h Mon Mar 29 12:27:15 2010 +0100 @@ -31,7 +31,7 @@ #include "WebFrame.h" #include "WebFrameView.h" #include "WebView.h" -#include "MemoryManager.h" +#include //#include // FORWARD DECLARATIONS diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/plugins/PluginStream.cpp --- a/webengine/osswebengine/WebKit/s60/plugins/PluginStream.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/plugins/PluginStream.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -203,7 +203,7 @@ } -void PluginStream::destroyStream(int reason) +void PluginStream::destroyStream(int reason, TDesC* failedUrl) { if (m_streamDestroyed) return; m_streamDestroyed = true; @@ -235,8 +235,17 @@ } - if ( m_pluginskin->getNPPluginFucs() && m_pluginskin->getNPPluginFucs()->destroystream ) { - m_pluginskin->getNPPluginFucs()->destroystream( m_pluginskin->getNPP(), m_stream, npreason); + if ( m_pluginskin->getNPPluginFucs() ) { + + if (m_stream && m_pluginskin->getNPPluginFucs()->destroystream){ + m_pluginskin->getNPPluginFucs()->destroystream( m_pluginskin->getNPP(), m_stream, npreason); + if (m_loaderclient->notify() && m_pluginskin->getNPPluginFucs()->urlnotify) + m_pluginskin->getNPPluginFucs()->urlnotify( m_pluginskin->getNPP(), m_stream->url->Des(), npreason, m_notifydata); + } + + if(!m_stream && m_loaderclient->notify() && failedUrl && m_pluginskin->getNPPluginFucs()->urlnotify){ + m_pluginskin->getNPPluginFucs()->urlnotify( m_pluginskin->getNPP(), *failedUrl, npreason, m_notifydata); + } } if (reason == KErrNone) { diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/plugins/PluginStream.h --- a/webengine/osswebengine/WebKit/s60/plugins/PluginStream.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/plugins/PluginStream.h Mon Mar 29 12:27:15 2010 +0100 @@ -39,7 +39,7 @@ public: void createNPStreamL(TPtrC8 url, TPtrC16 mimetype, long long length); void writeStreamL(const char* data, int length); - void destroyStream(int reason); + void destroyStream(int reason, TDesC* failedUrl=NULL); void close(); private: diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/plugins/PluginStreamLoaderClient.cpp --- a/webengine/osswebengine/WebKit/s60/plugins/PluginStreamLoaderClient.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/plugins/PluginStreamLoaderClient.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -36,33 +36,36 @@ using namespace WebCore; -NetscapePlugInStreamLoaderClient* NetscapePlugInStreamLoaderClient::NewL(const String& url, PluginSkin* pluginskin, Frame* frame, void* notifydata) +NetscapePlugInStreamLoaderClient* NetscapePlugInStreamLoaderClient::NewL(const String& url, PluginSkin* pluginskin, Frame* frame, void* notifydata, TBool notify/*=EFalse*/) { NetscapePlugInStreamLoaderClient* self = new (ELeave) NetscapePlugInStreamLoaderClient(); CleanupStack::PushL( self ); - self->ConstructL( url, pluginskin, frame, notifydata ); + self->ConstructL( url, pluginskin, frame, notifydata, notify ); CleanupStack::Pop(); return self; } -NetscapePlugInStreamLoaderClient* NetscapePlugInStreamLoaderClient::NewL(const ResourceRequest& request, PluginSkin* pluginskin, Frame* frame, void* notifydata) +NetscapePlugInStreamLoaderClient* NetscapePlugInStreamLoaderClient::NewL(const ResourceRequest& request, PluginSkin* pluginskin, Frame* frame, void* notifydata, TBool notify/*=EFalse*/) { NetscapePlugInStreamLoaderClient* self = new (ELeave) NetscapePlugInStreamLoaderClient(); CleanupStack::PushL( self ); - self->ConstructL( request, pluginskin, frame, notifydata ); + self->ConstructL( request, pluginskin, frame, notifydata, notify ); CleanupStack::Pop(); return self; } -void NetscapePlugInStreamLoaderClient::ConstructL(const String& url, PluginSkin* pluginskin, Frame* frame, void* notifydata) +void NetscapePlugInStreamLoaderClient::ConstructL(const String& url, PluginSkin* pluginskin, Frame* frame, void* notifydata, TBool notify/*=EFalse*/) { m_loader = 0; m_request = 0; m_pluginstream = 0; + m_pluginskin = pluginskin; + m_notifydata = notifydata; m_frame = frame; + m_notify = notify; m_pluginstream = new (ELeave) PluginStream(pluginskin, this, notifydata); m_request = new (ELeave) ResourceRequest(m_frame->loader()->completeURL(url)); @@ -78,13 +81,16 @@ m_loader->setShouldBufferData(false); } -void NetscapePlugInStreamLoaderClient::ConstructL(const ResourceRequest& request, PluginSkin* pluginskin, Frame* frame, void* notifydata) +void NetscapePlugInStreamLoaderClient::ConstructL(const ResourceRequest& request, PluginSkin* pluginskin, Frame* frame, void* notifydata, TBool notify/*=EFalse*/) { m_loader = 0; m_request = 0; m_pluginstream = 0; + m_pluginskin = pluginskin; + m_notifydata = notifydata; m_frame = frame; + m_notify = notify; m_pluginstream = new (ELeave) PluginStream(pluginskin, this, notifydata); m_request = new (ELeave) ResourceRequest(request.url()); @@ -124,6 +130,8 @@ delete m_request; delete m_pluginstream; + m_pluginskin = NULL; + m_notifydata = NULL; } @@ -147,9 +155,10 @@ void NetscapePlugInStreamLoaderClient::cancelWithError(const ResourceError& error) { - if (m_loader && !m_loader->isDone()) - m_loader->cancel(error); + if (m_loader && !m_loader->isDone()){ + m_loader->cancel(error); } +} void NetscapePlugInStreamLoaderClient::didReceiveResponse(const ResourceResponse& response) { @@ -191,14 +200,22 @@ void NetscapePlugInStreamLoaderClient::didFail(const ResourceError& error) { if (m_pluginstream) { - m_pluginstream->destroyStream(error.errorCode() ? error.errorCode() : KErrCancel); + int err = error.errorCode() ? error.errorCode() : KErrCancel; + HBufC* failedURL = HBufC::NewLC(error.failingURL().length()); + failedURL->Des().Copy(error.failingURL()); + m_pluginstream->destroyStream(err, failedURL); + CleanupStack::PopAndDestroy(failedURL); } } void NetscapePlugInStreamLoaderClient::didCancel(const ResourceError& error) { if (m_pluginstream) { - m_pluginstream->destroyStream(error.errorCode() ? error.errorCode() : KErrCancel); + int err = error.errorCode() ? error.errorCode() : KErrCancel; + HBufC* failedURL = HBufC::NewLC(error.failingURL().length()); + failedURL->Des().Copy(error.failingURL()); + m_pluginstream->destroyStream(err, failedURL); + CleanupStack::PopAndDestroy(failedURL); } } diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/plugins/PluginStreamLoaderClient.h --- a/webengine/osswebengine/WebKit/s60/plugins/PluginStreamLoaderClient.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/plugins/PluginStreamLoaderClient.h Mon Mar 29 12:27:15 2010 +0100 @@ -51,8 +51,8 @@ { public: - static NetscapePlugInStreamLoaderClient* NewL(const String& url, PluginSkin* pluginskin, Frame* frame, void* notifydata = 0); - static NetscapePlugInStreamLoaderClient* NewL(const ResourceRequest& request, PluginSkin* pluginskin, Frame* frame, void* notifydata=0); + static NetscapePlugInStreamLoaderClient* NewL(const String& url, PluginSkin* pluginskin, Frame* frame, void* notifydata = 0, TBool notify = EFalse); + static NetscapePlugInStreamLoaderClient* NewL(const ResourceRequest& request, PluginSkin* pluginskin, Frame* frame, void* notifydata=0, TBool notify = EFalse); virtual ~NetscapePlugInStreamLoaderClient(); void start(); @@ -65,10 +65,11 @@ void didFinishLoading(); void didFail(const ResourceError& error); void didCancel(const ResourceError& error); + TBool notify() { return m_notify; } private: - void ConstructL(const String& url, PluginSkin* pluginskin, Frame* frame, void* notifydata = 0); - void ConstructL(const ResourceRequest& request, PluginSkin* pluginskin, Frame* frame, void* notifydata=0); + void ConstructL(const String& url, PluginSkin* pluginskin, Frame* frame, void* notifydata = 0, TBool notify = EFalse); + void ConstructL(const ResourceRequest& request, PluginSkin* pluginskin, Frame* frame, void* notifydata=0, TBool notify = EFalse); NetscapePlugInStreamLoaderClient(); @@ -77,7 +78,10 @@ PluginStream* m_pluginstream; ResourceRequest* m_request; NetscapePlugInStreamLoader* m_loader; + PluginSkin* m_pluginskin; // not owned + void* m_notifydata; // not owned int m_error; + TBool m_notify; }; diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/plugins/PluginWin.cpp --- a/webengine/osswebengine/WebKit/s60/plugins/PluginWin.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/plugins/PluginWin.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -28,9 +28,9 @@ #include "WebFrame.h" #include "HttpDefs.h" -#include "BrCtlDefs.h" +#include #include "StaticObjectsContainer.h" -#include +#include #include "PluginWin.h" #include "PluginSkin.h" #include "PluginHandler.h" @@ -45,8 +45,11 @@ #include "WebPageScrollHandler.h" #include "WebKitLogger.h" +#include + using namespace WebCore; using namespace RT_GestureHelper; +using namespace stmGesture; // CONSTANTS const TInt KPluginGranularity = 3; _LIT(KPath,"c:\\system\\temp\\"); @@ -272,12 +275,16 @@ ret = m_control->OfferKeyEventL( aKeyEvent, aType ); } else if (!m_windowedPlugin && m_pluginskin->getNPPluginFucs() && m_pluginskin->getNPPluginFucs()->event) { + WebCursor* c = StaticObjectsContainer::instance()->webCursor(); + TPoint pt = (c->position()); + pt = m_pluginskin->frame()->frameView()->viewCoordsInFrameCoords(pt); + pt -= m_pluginskin->rect().iTl; NPEvent event; NPEventKey eventKey; event.event = ENppEventKey; eventKey.keyEvent = &aKeyEvent; eventKey.type = aType; - eventKey.reserved = NULL; + eventKey.reserved = static_cast(&pt); event.param = &eventKey; ret = (TKeyResponse)m_pluginskin->getNPPluginFucs()->event(m_pluginskin->getNPP(), static_cast(&event)); } @@ -341,7 +348,7 @@ // Refresh the plugin. - Called by PluginSkin // ----------------------------------------------------------------------------- // -TInt PluginWin::refreshPlugin(CFbsBitGc& bitmapContext) +TInt PluginWin::refreshPlugin(CFbsBitGc& bitmapContext,TRect aRect) { if (m_control && IsVisible() && m_control->DrawableWindow()) m_control->DrawNow(); @@ -352,12 +359,7 @@ if (m_pluginskin->getNPPluginFucs() && m_pluginskin->getNPPluginFucs()->event) { m_pluginskin->getNPPluginFucs()->event(m_pluginskin->getNPP(), static_cast(&event)); } - WebFrameView* fv = m_pluginskin->frame()->frameView(); - TRect rect(Rect()); - rect = TRect(fv->viewCoordsInFrameCoords(Rect().iTl), fv->viewCoordsInFrameCoords(Rect().iBr)); - rect = fv->toViewCoords(rect); - rect.SetSize(m_bitmap->SizeInPixels()); // toViewCoords sometimes grows the rect by 1, which wil cause the bitmap to not draw - bitmapContext.DrawBitmap(rect, m_bitmap, rect.Size()); + bitmapContext.DrawBitmap(aRect, m_bitmap); } return KErrNone; } @@ -717,24 +719,74 @@ { CBrCtl* brCtl = control(m_pluginskin->frame()); WebView* view = brCtl->webView(); - TPointerEvent event(aEvent); - - if (!StaticObjectsContainer::instance()->isPluginFullscreen()) { - event.iPosition = aEvent.iPosition - view->PositionRelativeToScreen(); +#ifdef BRDO_MULTITOUCH_ENABLED_FF + if (aEvent.IsAdvancedPointerEvent()) { + TAdvancedPointerEvent tadvp = *(static_cast(&aEvent)); + if (!StaticObjectsContainer::instance()->isPluginFullscreen()) { + tadvp.iPosition = aEvent.iPosition - view->PositionRelativeToScreen(); + } + view->pointerEventHandler()->HandlePointerEventL(tadvp); } - view->pointerEventHandler()->HandlePointerEventL(event); + else { +#endif + TPointerEvent event(aEvent); + if (!StaticObjectsContainer::instance()->isPluginFullscreen()) { + event.iPosition = aEvent.iPosition - view->PositionRelativeToScreen(); + } + view->pointerEventHandler()->HandlePointerEventL(event); +#ifdef BRDO_MULTITOUCH_ENABLED_FF + } +#endif } -TBool PluginWin::HandleGesture(const TGestureEvent& aEvent) +TBool PluginWin::HandleGesture(const TStmGestureEvent& aEvent) { TBool ret = EFalse; + + TGestureEvent eventForPlugin; + switch(aEvent.Code()) + { + case EGestureUidUnknown : + eventForPlugin.SetCode(EGestureUnknown); + break; + case EGestureUidTouch : + eventForPlugin.SetCode(EGestureStart); + break; + case EGestureUidTap : + if(aEvent.Type() == ETapTypeSingle) + eventForPlugin.SetCode(EGestureTap); + else + eventForPlugin.SetCode(EGestureDoubleTap); + break; + case EGestureUidLongPress : + eventForPlugin.SetCode(EGestureLongTap); + break; + case EGestureUidPan : + eventForPlugin.SetCode(EGestureDrag); + break; + case EGestureUidRelease : + eventForPlugin.SetCode(EGestureReleased); + break; + case EGestureUidFlick : + eventForPlugin.SetCode(EGestureFlick); + break; + case EGestureUidPinch : + eventForPlugin.SetCode(EGesturePinch); + break; + default : + break; + + } + + + if (m_control) { - TGestureEvent gestEvent(aEvent); CBrCtl* brCtl = control(m_pluginskin->frame()); WebView* view = brCtl->webView(); TPoint newPos = aEvent.CurrentPos(); - TPoint startPos = aEvent.StartPos(); + // Not sure plugins need the start position of the gesture. Not inlcuded in the new struct + TPoint startPos = aEvent.CurrentPos(); TPoint viewPos = view->PositionRelativeToScreen(); TPoint ctrlPos = m_control->PositionRelativeToScreen(); @@ -742,22 +794,52 @@ // adjust the position to make it relative to top left corner of newPos += viewPos; startPos += viewPos; - gestEvent.SetCurrentPos(newPos); - gestEvent.SetStartPos(startPos); } - - if (StaticObjectsContainer::instance()->isPluginFullscreen() || + eventForPlugin.SetCurrentPos(newPos); + eventForPlugin.SetStartPos(startPos); + if (StaticObjectsContainer::instance()->isPluginFullscreen() || m_control->Rect().Contains(newPos - ctrlPos)) { NPEvent event; NPEventPointer ev; event.event = ENppEventPointer; - ev.reserved = &gestEvent; + ev.reserved = &eventForPlugin; ev.pointerEvent = NULL; event.param = &ev; ret = m_pluginskin->getNPPluginFucs()->event(m_pluginskin->getNPP(), static_cast(&event)); + + if (eventForPlugin.Code(EAxisBoth) == EGestureTap) { + eventForPlugin.SetCode(EGestureReleased); + ret = m_pluginskin->getNPPluginFucs()->event(m_pluginskin->getNPP(), + static_cast(&event)); + + } } } + else if(!m_windowedPlugin && m_pluginskin->getNPPluginFucs() && m_pluginskin->getNPPluginFucs()->event){ + TRect cliprect = m_pluginskin->getClipRect(); + TPoint newPos = aEvent.CurrentPos(); + eventForPlugin.SetCurrentPos(newPos); + eventForPlugin.SetCurrentPos(newPos); + + if(cliprect.Contains(newPos)){ + NPEvent event; + NPEventPointer ev; + event.event = ENppEventPointer; + ev.reserved = &eventForPlugin; + ev.pointerEvent = NULL; + event.param = &ev; + ret = m_pluginskin->getNPPluginFucs()->event(m_pluginskin->getNPP(), + static_cast(&event)); + + if (eventForPlugin.Code(EAxisBoth) == EGestureTap) { + eventForPlugin.SetCode(EGestureReleased); + ret = m_pluginskin->getNPPluginFucs()->event(m_pluginskin->getNPP(), + static_cast(&event)); + + } + } + } return ret; } diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/plugins/PluginWin.h --- a/webengine/osswebengine/WebKit/s60/plugins/PluginWin.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/plugins/PluginWin.h Mon Mar 29 12:27:15 2010 +0100 @@ -23,9 +23,10 @@ // INCLUDES #include #include -#include +#include #include #include +#include // FORWARD DECLARATIONS class PluginSkin; @@ -104,7 +105,7 @@ * @since 3.1 * @return The error code from the plugin */ - TInt refreshPlugin(CFbsBitGc& bitmapContext); + TInt refreshPlugin(CFbsBitGc& bitmapContext,TRect aRect); /** @@ -478,7 +479,7 @@ void ToggleScreenMode(bool aFullScreen); void PlayPausePluginL (); void HandlePointerEventFromPluginL(const TPointerEvent& aEvent); - TBool HandleGesture(const RT_GestureHelper::TGestureEvent& aEvent); + TBool HandleGesture(const TStmGestureEvent& aEvent); TBool Windowed() { return m_windowedPlugin;} protected: // New functions diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webcoresupport/WebChromeClient.cpp --- a/webengine/osswebengine/WebKit/s60/webcoresupport/WebChromeClient.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webcoresupport/WebChromeClient.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -35,7 +35,7 @@ #include -#include +#include const TInt KMaxJavaLogMsgLen = 500; const TInt KMaxJavaLogMsgPaddingLen = 0x200; // for paddings in JS log message such as: log type and labels. @@ -357,3 +357,14 @@ m_webView->focusedElementChanged(element); } +void WebChromeClient::setElementVisibilityChanged(bool visibility) { + m_visibility = visibility; + m_visibilityByMouse = m_visibility && m_webView->isMouseEventFired(); + m_visibilityByKey = m_visibility && m_webView->isKeyEventFired(); +} + + +void WebChromeClient::wait(double t) +{ + m_webView->wait(t); +} diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webcoresupport/WebChromeClient.h --- a/webengine/osswebengine/WebKit/s60/webcoresupport/WebChromeClient.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webcoresupport/WebChromeClient.h Mon Mar 29 12:27:15 2010 +0100 @@ -99,15 +99,24 @@ virtual void setToolTip(const WebCore::String&) {} virtual void print(WebCore::Frame*) {} - void setElementVisibilityChanged(bool visibility) { - m_visibility = visibility; - } + void setElementVisibilityChanged(bool visibility); bool elementVisibilityChanged() { return m_visibility; } + + bool elementVisibilityChangedByMouse() { + return m_visibilityByMouse; + } + + bool elementVisibilityChangedByKey() { + return m_visibilityByKey; + } + virtual void focusedElementChanged(WebCore::Element*); + void wait(double t); + protected: // new functions void addMessageToConsoleL(const WebCore::String& aMessage, WebCore::MessageLevel aMessageLevel, unsigned int aLine, const WebCore::String& aSourceURL); @@ -115,6 +124,10 @@ WebView *m_webView; void GetDateAndTimeL(TDes& date, TDes& time) const; bool m_visibility; + bool m_visibilityByMouse; + bool m_visibilityByKey; + + }; diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webcoresupport/WebEditorClient.cpp --- a/webengine/osswebengine/WebKit/s60/webcoresupport/WebEditorClient.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webcoresupport/WebEditorClient.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -384,6 +384,9 @@ frame->selectionController()->end() != endPos) { event->setDefaultHandled(); } + else { + m_shouldEndEditing = !m_webView->fepTextEditor()->IsTextAreaFocused(); + } break; case EKeyRightArrow: @@ -404,6 +407,9 @@ frame->selectionController()->end() != endPos) { event->setDefaultHandled(); } + else { + m_shouldEndEditing = !m_webView->fepTextEditor()->IsTextAreaFocused(); + } break; case EKeyUpArrow: @@ -445,26 +451,6 @@ break; case EKeyF18: - if (magnify) - { - switch (kevent->symbianEvent().iScanCode) - { - case EEikCmdEditCut: - m_webView->fepTextEditor()->CcpuCutL(); - frame->editor()->deleteWithDirection(SelectionController::BACKWARD, - CharacterGranularity, false, true); - m_webView->fepTextEditor()->HandleUpdateCursor(); - break; - case EEikCmdEditCopy: - m_webView->fepTextEditor()->CcpuCopyL(); - break; - case EEikCmdEditPaste: - m_webView->fepTextEditor()->CcpuPasteL(); - break; - default: - break; - } - } break; // All of the diagonal KeyEvents are allowed to flow through the "default" case... @@ -520,9 +506,11 @@ //----------------------------------------------------------------------------- // WebEditorClient::handleInputMethodKeypress //----------------------------------------------------------------------------- -void WebEditorClient::handleInputMethodKeypress(KeyboardEvent*) +void WebEditorClient::handleInputMethodKeypress(KeyboardEvent* event) { - notImplemented(); + const PlatformKeyboardEvent* kevent = event->keyEvent(); + if(kevent->isKeyDown()) + handleKeypress(event); } //----------------------------------------------------------------------------- @@ -557,8 +545,12 @@ //----------------------------------------------------------------------------- bool WebEditorClient::doTextFieldCommandFromEvent(Element*, KeyboardEvent*) { - notImplemented(); - return false; + /* + * Check here from WAP css property. Returning true will cause + * HTMLInputElement::defaultEventHandler(Event* evt) stop handling + * keyboard event end set it as default handled. + */ + return !m_webView->fepTextEditor()->validateTextFormat(); } //----------------------------------------------------------------------------- @@ -685,3 +677,12 @@ } } +void WebEditorClient::preFocusChange(Node* oldNode, Node* newNode) + { + TBool contentEditable = m_webView->page()->focusController()->focusedOrMainFrame()->selectionController()->isContentEditable(); + if ( oldNode && newNode && contentEditable ) { + m_webView->fepTextEditor()->FocusChanging(); + } + } + + diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webcoresupport/WebEditorClient.h --- a/webengine/osswebengine/WebKit/s60/webcoresupport/WebEditorClient.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webcoresupport/WebEditorClient.h Mon Mar 29 12:27:15 2010 +0100 @@ -97,7 +97,8 @@ bool spellingUIIsShowing(); void getGuessesForWord(const WebCore::String&, Vector& guesses); void setInputMethodState(bool enabled); - + void preFocusChange(WebCore::Node* oldNode, WebCore::Node* newNode); + private: void handleInsertText(WebCore::Frame* frame, const WebCore::String& text); void handleDeleteText(WebCore::Frame* frame); diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webcoresupport/WebFrameLoaderClient.cpp --- a/webengine/osswebengine/WebKit/s60/webcoresupport/WebFrameLoaderClient.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webcoresupport/WebFrameLoaderClient.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,7 @@ * */ -#include +#include #include "config.h" #include <../bidi.h> #include "WebFrameLoaderClient.h" @@ -44,7 +44,7 @@ #include "WebPolicyManager.h" #include "StaticObjectsContainer.h" #include "ResourceLoaderDelegate.h" -#include "BrCtlWindowObserver.h" +#include #include "WmlDispatcher.h" #include "WebUtil.h" #include "errordefs.h" @@ -931,9 +931,10 @@ void WebFrameLoaderClient::committedLoad(DocumentLoader* loader, const char* data, int length) { if (brctl(m_webFrame)->wmlMode()) { - TRAP_IGNORE( - m_WmlContentListener->ResponseL( data, length ); - ); + if(m_WmlContentListener) + TRAP_IGNORE( + m_WmlContentListener->ResponseL( data, length ); + ); return; } m_webFrame->bridge()->receivedData(data, length, m_response.textEncodingName()); @@ -1142,8 +1143,9 @@ void WebFrameLoaderClient::frameLoadCompleted() { if (brctl(m_webFrame)->wmlMode()) { + if (m_WmlContentListener) TRAP_IGNORE( - m_WmlContentListener->CompleteL( 0, 0 ); + m_WmlContentListener->CompleteL( 0, 0 ); ); return; } diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/BrCtl.cpp --- a/webengine/osswebengine/WebKit/s60/webview/BrCtl.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/BrCtl.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ // INCLUDE FILES -#include +#include #include <../bidi.h> #include #include @@ -32,9 +32,9 @@ #endif #include #include -#include +#include //tot:fixme -//#include +//#include "oom.h" #include "config.h" #include "BrCtl.h" @@ -68,7 +68,7 @@ #include "WebCursor.h" #include "WebUtil.h" #include "WebCharsetData.h" -#include "HttpCacheManager.h" +#include "httpcachemanager.h" #include "ResourceLoaderDelegate.h" #include "EventHandler.h" #include "timer.h" @@ -86,7 +86,7 @@ #include "HttpUiCallbacks.h" #include "PluginWin.h" #include -#include +#include #ifndef BRDO_WML_DISABLED_FF #include "wmlinterface.h" @@ -414,6 +414,7 @@ , m_commandIdBase(aCommandIdBase) , m_capabilities(aBrCtlCapabilities) , m_suspendTimers(false) + , m_pageLoadFinished(false) , m_wmlEngineInterface(NULL) , m_brCtlDownloadObserver(aBrCtlDownloadObserver) , m_windoCloseTimer(NULL) @@ -495,6 +496,9 @@ } LoadResourceFileL(); + + MemoryManager::InitOOMDialog(); + // Set the rect for BrowserControl (a CCoeControl). SetRect(aRect); CCoeEnv::Static()->DisableExitChecks(true); @@ -583,6 +587,7 @@ switch (aLoadEvent) { case TBrCtlDefs::EEventNewContentStart: + m_pageLoadFinished = false; if (m_webView->pageScalerEnabled()) m_webView->pageScaler()->DocumentStarted(); if (m_webView->formFillPopup() && m_webView->formFillPopup()->IsVisible()) @@ -590,9 +595,10 @@ break; case TBrCtlDefs::EEventContentFinished: case TBrCtlDefs::EEventUploadFinished: + m_pageLoadFinished = true; if (m_suspendTimers) { m_suspendTimers = false; - HandleCommandL(TBrCtlDefs::ECommandAppBackground); + setDeferringTimers(true); } #ifndef BRDO_WML_DISABLED_FF if (m_wmlUnloadPending) @@ -770,10 +776,20 @@ case TBrCtlDefs::ECommandAppBackground: { #ifndef PERF_REGRESSION_LOG - if (m_webView->isLoading()) - m_suspendTimers = true; - else if (!isDeferringTimers()) - setDeferringTimers(true); + if(m_webView->widgetExtension()) + { + if(m_pageLoadFinished) + setDeferringTimers(true); + else + m_suspendTimers = true; + } + else + { + if (m_webView->isLoading()) + m_suspendTimers = true; + else if (!isDeferringTimers()) + setDeferringTimers(true); + } #endif //Disable the zooming bar when it goes to background @@ -2451,9 +2467,3 @@ -void CBrCtl::HandlePointerBufferReadyL() -{ - m_webView->HandlePointerBufferReadyL(); -} - - diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/BrCtl.h --- a/webengine/osswebengine/WebKit/s60/webview/BrCtl.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/BrCtl.h Mon Mar 29 12:27:15 2010 +0100 @@ -21,9 +21,8 @@ #define BRCTL_H // INCLUDES -#include +#include -#include "BrCtlDefs.h" #include "HistoryInterface.h" #include "WmlInterface.h" @@ -590,7 +589,6 @@ /** * From CCoeControl */ - void HandlePointerBufferReadyL(); MBrCtlSpecialLoadObserver* brCtlSpecialLoadObserver() const { return m_brCtlSpecialLoadObserver; } MBrCtlDownloadObserver* brCtlDownloadObserver(); MBrCtlLinkResolver* brCtlLinkResolver() const { return m_brCtlLinkResolver; } @@ -705,6 +703,7 @@ CPeriodic* m_timer; bool m_wmlMode; bool m_suspendTimers; + bool m_pageLoadFinished; MWmlEngineInterface* m_wmlEngineInterface; RLibrary m_Library; MWmlInterface* m_WmlInterface; diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/BrCtlDataLoadInfo.h --- a/webengine/osswebengine/WebKit/s60/webview/BrCtlDataLoadInfo.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/BrCtlDataLoadInfo.h Mon Mar 29 12:27:15 2010 +0100 @@ -21,7 +21,7 @@ #define BRCTLDATALOADINFO_H // INCLUDES -#include +#include // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/BrCtlDialogsProviderUtils.cpp --- a/webengine/osswebengine/WebKit/s60/webview/BrCtlDialogsProviderUtils.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/BrCtlDialogsProviderUtils.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,14 +15,11 @@ * */ - - // INCLUDES #include #include -#include "BrCtlDialogsProvider.h" - +#include // ---------------------------------------------------------------------------- // CBrCtlObjectInfo class diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/BrCtlLayoutObserverImpl.h --- a/webengine/osswebengine/WebKit/s60/webview/BrCtlLayoutObserverImpl.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/BrCtlLayoutObserverImpl.h Mon Mar 29 12:27:15 2010 +0100 @@ -20,7 +20,7 @@ #define BRCTLLAYOUTOBSERVERIMPL_H // INCLUDES -#include +#include /** * This observer is notified of scrolling and tabbing events diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/BrCtlLinkResolver.h --- a/webengine/osswebengine/WebKit/s60/webview/BrCtlLinkResolver.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/BrCtlLinkResolver.h Mon Mar 29 12:27:15 2010 +0100 @@ -63,12 +63,12 @@ * Usage: * * @code -* #include +* #include * * * @see S60 Platform: Browser Control API Developer's Guide Version 2.0 * @lib BrowserEngine.lib -* @file BrCtlLinkResolver.h +* @file brctllinkresolver.h * @endcode * */ class MBrCtlLinkResolver @@ -125,12 +125,12 @@ * Usage: * * @code -* #include +* #include * * * @see S60 Platform: Browser Control API Developer's Guide Version 2.0 * @lib BrowserEngine.lib -* @file BrCtlLinkResolver.h +* @file brctllinkresolver.h * @endcode * */ class MBrCtlLinkContent diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/BrCtlSoftkeysObserverImpl.h --- a/webengine/osswebengine/WebKit/s60/webview/BrCtlSoftkeysObserverImpl.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/BrCtlSoftkeysObserverImpl.h Mon Mar 29 12:27:15 2010 +0100 @@ -1,27 +1,51 @@ /* -* Copyright (c) 2006 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 "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* ============================================================================== +* Name : BrCtlBrCtlSoftkeysObserverImpl.h +* Part of : WebKit \ BrowserControl +* Interface : Browser Control API +* Description : Handle softkeys updates +* Version : %Version% * -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Handle softkeys updates -* +* Copyright (c) 2006, Nokia Corporation +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: +* +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in +* the documentation and/or other materials provided with the +* distribution. +* * Neither the name of the Nokia Corporation nor the names of its +* contributors may be used to endorse or promote products derived +* from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +* DAMAGE. +* +* Please see file patentlicense.txt for further grants. +* ============================================================================== */ - #ifndef CRCTLSOFTKEYSOBSERVERIMPL_H #define CRCTLSOFTKEYSOBSERVERIMPL_H // INCLUDES -#include +#include /** diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/BrCtlSpecialLoadObserverImpl.h --- a/webengine/osswebengine/WebKit/s60/webview/BrCtlSpecialLoadObserverImpl.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/BrCtlSpecialLoadObserverImpl.h Mon Mar 29 12:27:15 2010 +0100 @@ -1,27 +1,51 @@ /* -* Copyright (c) 2006 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 "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* ============================================================================== +* Name : BrCtlSpecialLoadObserverImpl.h +* Part of : WebKit \ BrowserControl +* Interface : Browser Control API +* Description : Handle special load events such as network connection, deal with non-http or non-html requests +* Version : %Version% * -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Handle special load events such as network connection, deal with non-http or non-html requests -* +* Copyright (c) 2006, Nokia Corporation +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: +* +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in +* the documentation and/or other materials provided with the +* distribution. +* * Neither the name of the Nokia Corporation nor the names of its +* contributors may be used to endorse or promote products derived +* from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +* DAMAGE. +* +* Please see file patentlicense.txt for further grants. +* ============================================================================== */ - #ifndef BRCTLSPECIALLOADOBSERVERIMPL_H #define BRCTLSPECIALLOADOBSERVERIMPL_H // INCLUDES -#include +#include /** * This observer handles special load events such as network connection, deal with non-http(s) or non-html requests diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/BrCtlWindowObserverImpl.h --- a/webengine/osswebengine/WebKit/s60/webview/BrCtlWindowObserverImpl.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/BrCtlWindowObserverImpl.h Mon Mar 29 12:27:15 2010 +0100 @@ -1,27 +1,51 @@ /* -* Copyright (c) 2006 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 "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* ============================================================================== +* Name : BrCtlWinowObserverImpl.h +* Part of : WebKit \ BrowserControl +* Interface : Browser Control API +* Description : Handle special load events such as network connection, deal with non-http or non-html requests +* Version : %Version% * -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Handle special load events such as network connection, deal with non-http or non-html requests -* +* Copyright (c) 2006, Nokia Corporation +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: +* +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in +* the documentation and/or other materials provided with the +* distribution. +* * Neither the name of the Nokia Corporation nor the names of its +* contributors may be used to endorse or promote products derived +* from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +* DAMAGE. +* +* Please see file patentlicense.txt for further grants. +* ============================================================================== */ - #ifndef BRCTLWINDOWOBSERVERIMPL_H #define BRCTLWINDOWOBSERVERIMPL_H // INCLUDES -#include +#include /** diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/HistoryInterface.h --- a/webengine/osswebengine/WebKit/s60/webview/HistoryInterface.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/HistoryInterface.h Mon Mar 29 12:27:15 2010 +0100 @@ -21,7 +21,7 @@ // INCLUDES #include -#include +#include // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/PageView.cpp --- a/webengine/osswebengine/WebKit/s60/webview/PageView.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/PageView.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -18,6 +18,7 @@ // INCLUDE FILES +#include #include <../bidi.h> #include "PageView.h" #include @@ -88,8 +89,15 @@ // Destructor CPageView::~CPageView() { - m_webView->pageScaler()->SetVisible(EFalse); - m_webView->pageScaler()->SetFullScreenMode(EFalse); +#ifdef BRDO_SINGLE_CLICK_ENABLED_FF + if (m_webView && m_webView->pageScaler()) + { +#endif + m_webView->pageScaler()->SetVisible(EFalse); + m_webView->pageScaler()->SetFullScreenMode(EFalse); +#ifdef BRDO_SINGLE_CLICK_ENABLED_FF + } +#endif } diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/SettingsContainer.cpp --- a/webengine/osswebengine/WebKit/s60/webview/SettingsContainer.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/SettingsContainer.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #include <../bidi.h> #include "SettingsContainer.h" #include "WebView.h" @@ -31,7 +30,7 @@ #include "StaticObjectsContainer.h" #include "ResourceLoaderDelegate.h" #include "HistoryInterface.h" -#include "brctldefs.h" +#include #include "WebDocumentLoader.h" #include "Frame.h" #include "FrameLoader.h" @@ -82,6 +81,8 @@ brctlSettings[TBrCtlDefs::ESettingsToolbarButton7Cmd] = 13; brctlSettings[TBrCtlDefs::ESettingsScriptLog] = 0; brctlSettings[TBrCtlDefs::ESettingsCursorShowMode] = 1; + brctlSettings[TBrCtlDefs::ESettingsEnterKeyMode] = TBrCtlDefs::EEnterKeyCanActivateLink; + updatePageSetting(TBrCtlDefs::ESettingsAutoLoadImages); updatePageSetting(TBrCtlDefs::ESettingsFontSize); @@ -141,7 +142,10 @@ break; case TBrCtlDefs::ESettingsCurrentZoomLevelIndex: m_webView->setZoomLevel(brctlSettings[setting]); - break; + break; + case TBrCtlDefs::ESettingsAutoRefresh: + brctlSetting(TBrCtlDefs::ESettingsAutoRefresh); + break; } } @@ -249,6 +253,7 @@ case TBrCtlDefs::ESettingsZoomLevelMax: case TBrCtlDefs::ESettingsCursorShowMode: case TBrCtlDefs::ESettingsZoomLevelDefault: + case TBrCtlDefs::ESettingsEnterKeyMode: { retVal = brctlSettings[setting]; break; diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/SettingsContainer.h --- a/webengine/osswebengine/WebKit/s60/webview/SettingsContainer.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/SettingsContainer.h Mon Mar 29 12:27:15 2010 +0100 @@ -20,7 +20,7 @@ #define __SETTINGSCONTAINER_H__ #include -#include "brctldefs.h" +#include class WebView; class HistoryControllerInterface; diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/WebCursor.cpp --- a/webengine/osswebengine/WebKit/s60/webview/WebCursor.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/WebCursor.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -202,7 +202,7 @@ { m_type = type; - if (m_visible && (m_view->brCtl()->settings()->getNavigationType() == SettingsContainer::NavigationTypeCursor)) { + if (m_visible) { CFbsBitmap* img = NULL; CFbsBitmap* msk = NULL; switch( type ) @@ -264,19 +264,22 @@ { if (!m_view || !m_view->brCtl() || !m_view->brCtl()->settings()) return; + + bool tabbedNavigation = (m_view->brCtl()->settings()->getNavigationType() == SettingsContainer::NavigationTypeTabbed); + bool navigationNone = (m_view->brCtl()->settings()->getNavigationType() == SettingsContainer::NavigationTypeNone); + bool cursorNavigation = (m_view->brCtl()->settings()->getNavigationType() == SettingsContainer::NavigationTypeCursor); + TBrCtlDefs::TBrCtlElementType elType = m_view->focusedElementType(); //If cursor show mode defined inside cenrep key is no cursor shown in non-tab navigation mode, //then no need to update the cursor - if (m_view->brCtl()->settings()->getNavigationType() != SettingsContainer:: NavigationTypeTabbed && - (m_view->brCtl()->settings()->brctlSetting(TBrCtlDefs::ESettingsCursorShowMode) == TBrCtlDefs::ENoCursor)) + if (!tabbedNavigation && + (m_view->brCtl()->settings()->brctlSetting(TBrCtlDefs::ESettingsCursorShowMode) == TBrCtlDefs::ENoCursor)) return; - if ( m_view->showCursor() ) { - m_visible = visible && ((m_view->brCtl()->settings()->getNavigationType() == SettingsContainer::NavigationTypeCursor)|| m_view->focusedElementType() == TBrCtlDefs::EElementSelectMultiBox); // check for tabbedNavigation here because it is called from so many places. - } + + m_visible = visible && ((cursorNavigation && m_view->showCursor()) || + (tabbedNavigation && (elType == TBrCtlDefs::EElementSelectMultiBox))); resetTransparency(); - CursorTypes type = PointerCursor; - TBrCtlDefs::TBrCtlElementType elType = m_view->focusedElementType(); - + CursorTypes type = PointerCursor; if (m_visible) { if ( elType == TBrCtlDefs::EElementNone || elType == TBrCtlDefs::EElementImageBox @@ -285,7 +288,7 @@ else if ( elType == TBrCtlDefs::EElementSmartLinkTel || elType == TBrCtlDefs::EElementSmartLinkEmail ) type = IBeamCursor; - else if ( elType == TBrCtlDefs::EElementSelectMultiBox && m_view->brCtl()->settings()->getNavigationType() == SettingsContainer::NavigationTypeTabbed) + else if ( elType == TBrCtlDefs::EElementSelectMultiBox && tabbedNavigation) type = SelectMultiCursor; else type = HandCursor; @@ -364,9 +367,22 @@ { setTransparent(false); m_transtimer->Cancel(); - m_transtimer->Start(microsecs,0,TCallBack(TransparencyTimerCb,this)); + + if (m_visible) + { + m_transtimer->Start(microsecs,0,TCallBack(TransparencyTimerCb,this)); + } } +void WebCursor::stopTransparencyTimer() + { + if (m_transtimer && m_transtimer->IsActive()) + { + m_transtimer->Cancel(); + } + } + + // ----------------------------------------------------------------------------- // WebCursor::increaseTransparencyMoveCount // ----------------------------------------------------------------------------- @@ -503,14 +519,20 @@ pfRect = TRect(ppfv->frameCoordsInViewCoords(pfRect.iTl), ppfv->frameCoordsInViewCoords(pfRect.iBr)); } - + else { + pfRect.SetRect(0, 0, pfRect.iBr.iX * z / 100, pfRect.iBr.iY * z / 100); + } + WebFrameView* fv = frame->frameView(); TRect framerect = fv ->rect(); if (frame->parentFrame()) {// frame is not a main frame framerect = TRect(pfv->frameCoordsInViewCoords(framerect.iTl), pfv->frameCoordsInViewCoords(framerect.iBr)); } - + else { + framerect.SetRect(0, 0, framerect.iBr.iX * z / 100, framerect.iBr.iY * z / 100); + } + TRect pfInnerRect = pfRect; innerRect(pfInnerRect); TRect fInnerRect = framerect; @@ -776,6 +798,9 @@ if (m_view && navigableNodeUnderCursor(*frame, point, elType, r)) { m_view->setFocusedElementType(elType); } + else { + m_view->setFocusedElementType(TBrCtlDefs::EElementNone); + } } // ----------------------------------------------------------------------------- @@ -881,19 +906,19 @@ } -// ----------------------------------------------------------------------------- -// WebCursor::navigableNodeUnderCursor -// ----------------------------------------------------------------------------- -bool WebCursor::navigableNodeUnderCursor(WebFrame& webFrame, TPoint& aPoint, TBrCtlDefs::TBrCtlElementType& aElType, TRect& aFocusRect) const +bool WebCursor::navigableNodeUnderCursor(WebFrame& webFrame, TPoint& aPoint, TBrCtlDefs::TBrCtlElementType& aElType, TRect& aFocusRect) { Frame* coreFrame = core(&webFrame); if (!coreFrame->renderer() ) return false; Element* node = coreFrame->document()->elementFromPoint(aPoint.iX, aPoint.iY); - + m_elementUnderCursor = node; if (node) { - return coreFrame->bridge()->getTypeFromElement(node, aElType, aFocusRect); + Node* retNode = 0; + bool ret = coreFrame->bridge()->getTypeFromElement(node, aElType, aFocusRect, retNode); + m_elementUnderCursor = static_cast(retNode); + return ret; } return false; diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/WebCursor.h --- a/webengine/osswebengine/WebKit/s60/webview/WebCursor.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/WebCursor.h Mon Mar 29 12:27:15 2010 +0100 @@ -27,6 +27,7 @@ namespace WebCore { class IntRect; class IntPoint; + class Element; } #define KInitialOffset 5 @@ -68,10 +69,12 @@ void scrollAndMoveCursor(int dir, int scrollRange, bool auto); void simpleScroll(int dir, int scrollRange, bool auto=true); WebFrame* getFrameUnderCursor(); - bool navigableNodeUnderCursor(WebFrame& webFrame, TPoint& aPoint, TBrCtlDefs::TBrCtlElementType& aElType, TRect& aFocusRect) const; + bool navigableNodeUnderCursor(WebFrame& webFrame, TPoint& aPoint, TBrCtlDefs::TBrCtlElementType& aElType, TRect& aFocusRect); WebFrame* getFrameAtPoint(const TPoint& viewPos_); + WebCore::Element* getElementUnderCursor() {return m_elementUnderCursor;} + void stopTransparencyTimer(); - + private: void moveCursor(int lr,int tb, int scrollRange); bool determineCursorPosition(WebFrame& webFrame, TBrCtlDefs::TBrCtlElementType& aElType, TRect& aFocusRect, TRect& aSearchRect, @@ -118,6 +121,7 @@ CursorTypes m_type; int m_flipCounter; TPoint m_incrLimit; + WebCore::Element* m_elementUnderCursor; }; #endif diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/WebFepTextEditor.cpp --- a/webengine/osswebengine/WebKit/s60/webview/WebFepTextEditor.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/WebFepTextEditor.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,6 +17,12 @@ +#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS +#include +#include +#include +#endif + #include "config.h" #include "../../bidi.h" #include "StaticObjectsContainer.h" @@ -48,6 +54,8 @@ #include #include "Text.h" +#define KLineEnterChar 0x21b2 + using namespace WebCore; static const int kInfinite = -1; @@ -67,7 +75,8 @@ CWebFepTextEditor::CWebFepTextEditor(WebView* aView) : m_webView(aView), m_textFormatMask(NULL), - m_inlineEditText(NULL) + m_inlineEditText(NULL), + m_longKeyPress(EFalse) { // Set up the extended capabilities TRAP_IGNORE( @@ -79,7 +88,7 @@ #if defined(BRDO_BROWSER_50_FF) SetAlignment( CAknExtendedInputCapabilities::EInputEditorAlignBidi ); #endif - EnableCcpu(ETrue); + TRAP_IGNORE( EnableCcpuL() ); } // ----------------------------------------------------------------------------- @@ -93,6 +102,7 @@ delete m_inlineEditText; delete m_textFormatMask; delete m_ExtendedInputCapabilities; + delete m_CcpuSupport; } // ----------------------------------------------------------------------------- @@ -186,6 +196,8 @@ delete m_inlineEditText; m_inlineEditText = NULL; + + m_longKeyPress = EFalse ; UpdateInputModeState(EAknEditorNullInputMode, EAknEditorAllInputModes,EAknEditorStandardNumberModeKeymap); UpdateFlagsState(EAknEditorFlagDefault); @@ -335,6 +347,22 @@ // ----------------------------------------------------------------------------- void CWebFepTextEditor::CancelFepInlineEdit() { + if (IsTextAreaFocused()) { + if (m_inlineEditText && DocumentLengthForFep() < DocumentMaximumLengthForFep()) { + HBufC* tempBuf = HBufC::NewLC(DocumentLengthForFep()); + TPtr ptr(tempBuf->Des()); + GetEditorContentForFep(ptr, 0, DocumentLengthForFep()); + TInt position = ptr.Locate(KLineEnterChar); + if(position != KErrNotFound){ + TRAP_IGNORE(m_webView->fepTextEditor()->DoCommitFepInlineEditL()); + Frame* frame = m_webView->page()->focusController()->focusedOrMainFrame(); + if(frame){ + frame->editor()->execCommand("BackwardDelete"); + } + } + CleanupStack::PopAndDestroy(); + } + } } // ----------------------------------------------------------------------------- @@ -384,6 +412,9 @@ if ( m_textFormatMask && m_textFormatMask->getMultitude() > 0 ) length = m_textFormatMask->getMultitude(); + if (IsLongKeyPress() && + (KMaxTInt != length)) + length += 1 ; // TextArea node has no member function maxLength(), so return KMaxTInt return length; } @@ -398,32 +429,18 @@ // The other part of the rather hackish way to check if we are at the end of the editing field // see WebEditorClient::handleKeypress Frame* frame = m_webView->page()->focusController()->focusedOrMainFrame(); - if ( frame ) { - SelectionController* sc = frame->selectionController(); - Node* editNode = sc->base().node(); - if ( IsTextAreaFocused() ) { - while(editNode && !editNode->isTextNode()){ - editNode = editNode->previousSibling(); - } - TInt position( aCursorSelection.iAnchorPos ); - TInt offset( 0 ); - TInt extentoffset = 0; - if ( editNode ) { - editNode = findTextNodeForCurPos( editNode, position ); - if(aCursorSelection.iAnchorPos >= position) { - offset = aCursorSelection.iAnchorPos - position; - extentoffset = aCursorSelection.iCursorPos - position; - } - extentoffset = extentoffset < 0 ? 0 : extentoffset; - Position base( editNode, offset ); - Position extent(editNode,extentoffset); - sc->moveTo( base, extent, DOWNSTREAM ); - } + Node* focusedNode = frame->document()->focusedNode(); + if ( frame && focusedNode) { + TInt lowPos = aCursorSelection.LowerPos(); + TInt highPos = aCursorSelection.HigherPos(); + if (focusedNode->hasTagName(HTMLNames::textareaTag)) { + HTMLTextAreaElement* textArea = static_cast(focusedNode); + textArea->setSelectionRange(lowPos, highPos); } - else if ( editNode && editNode->isTextNode() ) { - Position base( sc->baseNode(), aCursorSelection.iAnchorPos ); - Position extent( sc->baseNode(), aCursorSelection.iCursorPos ); - sc->moveTo( base, extent, DOWNSTREAM ); + else if (focusedNode->hasTagName(HTMLNames::inputTag)) { + HTMLInputElement* inputElement = static_cast(focusedNode); + inputElement->setSelectionStart(lowPos); + inputElement->setSelectionEnd(highPos); } HandleUpdateCursor(); } @@ -439,27 +456,21 @@ aCursorSelection.SetSelection(0,0); Frame* frame = m_webView->page()->focusController()->focusedOrMainFrame(); - if ( frame ) { - SelectionController* sc = frame->selectionController(); - Node* editNode = sc->base().node(); - if ( frame && frame->document()->focusedNode() ) { - if ( IsTextAreaFocused() ) { - HTMLTextAreaElement* ie = static_cast(frame->document()->focusedNode()); - while(editNode && !editNode->isTextNode()) { - editNode = editNode->previousSibling(); - } - TInt len( 0 ); - if ( editNode ) { - findPrevSiblingTextLen( editNode, len ); - } - aCursorSelection.SetSelection( ((sc->baseOffset()+len > ie->value().length()) ? 0 : sc->baseOffset()+len), - ((sc->extentOffset()+len > ie->value().length()) ? 0 : sc->extentOffset()+len)); - } - else { - aCursorSelection.SetSelection(sc->baseOffset(), sc->extentOffset()); - } - } - } + Node* focusedNode = frame->document()->focusedNode(); + if (frame && focusedNode) { + if (focusedNode->hasTagName(HTMLNames::textareaTag)) { + HTMLTextAreaElement* textArea = static_cast(focusedNode); + TInt anchorPos = textArea->selectionStart(); + TInt cursorPos = textArea->selectionEnd(); + aCursorSelection.SetSelection(cursorPos, anchorPos); + } + else if (focusedNode->hasTagName(HTMLNames::inputTag)) { + HTMLInputElement* inputElement = static_cast(focusedNode); + TInt anchorPos = inputElement->selectionStart(); + TInt cursorPos = inputElement->selectionEnd(); + aCursorSelection.SetSelection(cursorPos, anchorPos); + } + } } // ----------------------------------------------------------------------------- @@ -580,6 +591,8 @@ //delete the m_inlineEditText since text is commited delete m_inlineEditText; m_inlineEditText = NULL; + + m_longKeyPress = EFalse; HandleUpdateCursor(); UpdateEditingMode(); @@ -651,6 +664,7 @@ { aSetToTrue=ETrue; SetCursorSelectionForFepL(aCursorSelection); + m_longKeyPress = ETrue ; StartFepInlineEditL(aInitialInlineText, aPositionOfInsertionPointInInlineText, aCursorVisibility, aCustomDraw, aInlineTextFormatRetriever, aPointerEventHandlerDuringInlineEdit); } @@ -718,6 +732,10 @@ } state->ReportAknEdStateEventL(MAknEdStateObserver::EAknEdwinStateFlagsUpdate); + if (m_CcpuSupport) + { + TRAP_IGNORE(m_CcpuSupport->HandleFocusChangeL()); + } } // ----------------------------------------------------------------------------- @@ -787,6 +805,10 @@ CAknEdwinState* state = static_cast(State(KNullUid)); if ( state ) { TRAP_IGNORE( state->ReportAknEdStateEventL( MAknEdStateObserver::EAknCursorPositionChanged ) ); + if (m_CcpuSupport) + { + TRAP_IGNORE(m_CcpuSupport->HandleSelectionChangeL()); + } } } @@ -921,6 +943,10 @@ style->setProperty(CSS_PROP_COLOR, "red", false, ec); return false; } + else if ( m_textFormatMask->acceptAll() ) + { + return true; + } else { style->setProperty(CSS_PROP_COLOR, m_inputTextColor, false, ec); @@ -1083,7 +1109,7 @@ { TCursorSelection selection; GetCursorSelectionForFep(selection); - return selection.Length(); + return m_CcpuSupport && selection.Length(); } // ----------------------------------------------------------------------------- @@ -1096,6 +1122,12 @@ PlaceDataOnClipboardL(); TCursorSelection selection; GetCursorSelectionForFep(selection); + Frame* frame = m_webView->page()->focusController()->focusedOrMainFrame(); + if (frame) { + frame->editor()->deleteWithDirection(SelectionController::BACKWARD, + CharacterGranularity, false, true); + } + HandleUpdateCursor(); } // ----------------------------------------------------------------------------- @@ -1107,7 +1139,7 @@ { TCursorSelection selection; GetCursorSelectionForFep(selection); - return selection.Length(); + return m_CcpuSupport && selection.Length(); } // ----------------------------------------------------------------------------- @@ -1128,7 +1160,7 @@ TBool CWebFepTextEditor::CcpuCanPaste() const { TRAPD(err, DoCcpuCanPasteL()); - return err == KErrNone; + return (err == KErrNone) && m_CcpuSupport; } // ----------------------------------------------------------------------------- @@ -1334,17 +1366,24 @@ // // // ----------------------------------------------------------------------------- -void CWebFepTextEditor::EnableCcpu(TBool aSupport) +void CWebFepTextEditor::EnableCcpuL() { + CAknCcpuSupport* ccpu = NULL; CAknEdwinState* edwinState = static_cast(this->State(KNullUid)); - if(aSupport) + ccpu = new(ELeave) CAknCcpuSupport(this); + ccpu->SetMopParent(this); + CleanupStack::PushL(ccpu); + ccpu->ConstructL(); + CleanupStack::Pop(ccpu); + delete m_CcpuSupport; + m_CcpuSupport = ccpu; + if (edwinState) { - edwinState->SetCcpuState(this); - } - else - { - edwinState->SetCcpuState(NULL); - } + edwinState->SetCcpuState(this); + edwinState->SetMenu(); + if (edwinState->MenuBar()) + edwinState->MenuBar()->SetEditMenuObserver( m_CcpuSupport ); + } } // ----------------------------------------------------------------------------- @@ -1429,3 +1468,28 @@ } } +// ----------------------------------------------------------------------------- +// FocusChanging +// +// Called when the focus of the node changes, to commit the text +// ----------------------------------------------------------------------------- +void CWebFepTextEditor::FocusChanging() + { + CAknEdwinState* state = static_cast(State(KNullUid)); + if ( state ) { + TRAP_IGNORE( state->ReportAknEdStateEventL(MAknEdStateObserver::EAknSyncEdwinState ) ); + } + CommitFepInlineEditL(*CEikonEnv::Static()); + CancelEditingMode(); + } + +// ----------------------------------------------------------------------------- +// IsLongKeyPress +// +// Called to know the status of the key pressed +// ----------------------------------------------------------------------------- +TBool CWebFepTextEditor::IsLongKeyPress() const + { + return m_longKeyPress ; + } + diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/WebFepTextEditor.h --- a/webengine/osswebengine/WebKit/s60/webview/WebFepTextEditor.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/WebFepTextEditor.h Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ -#include +#include #include #include @@ -116,14 +116,13 @@ bool validateTextFormat(); TBool IsDirectionRTL(); + TBool IsLongKeyPress() const; #if defined(BRDO_BROWSER_50_FF) void SetAlignment(CAknExtendedInputCapabilities::TInputCapabilities aAlignment); #endif // BRDO_BROWSER_50_FF bool IsTextAreaFocused() const; - - void EnableCcpu(TBool aSupport); void DoCcpuCanPasteL() const; void PlaceDataOnClipboardL(); void RetrieveDataFromClipboardL(); @@ -132,7 +131,9 @@ void HandleMaskedInsertText(WebCore::Frame* frame, const String& text); void HandleMaskedDeleteText(WebCore::Frame* frame); bool IsWapMaskedModeInput(WebCore::Frame* frame); - + void FocusChanging(); + void EnableCcpuL(); + private: void findPrevSiblingTextLen(Node*, TInt&) const; Node* findTextNodeForCurPos(Node* aNode, TInt& aPos) const; @@ -145,6 +146,8 @@ HBufC* m_inlineEditText; String m_inputTextColor; CAknExtendedInputCapabilities* m_ExtendedInputCapabilities; + CAknCcpuSupport* m_CcpuSupport; + TBool m_longKeyPress; }; #endif diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/WebFrame.cpp --- a/webengine/osswebengine/WebKit/s60/webview/WebFrame.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/WebFrame.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -347,8 +347,8 @@ WTF::Vector ch = childFrames(); WebFrame* frm = 0; // Check the children of the frame only if this frame also contains pt_ - // If a child iframe is bigger than the parent, it should not be picked. - if (m_view->rectInGlobalCoords().Contains(pt_)) { + // If a child iframe is bigger than the parent, it should not be picked. + if (m_view->isVisible() && m_view->rectInGlobalCoords().Contains(pt_)) { Vector::iterator end = ch.end(); for (Vector::iterator itr = ch.begin(); itr != end; itr++) { WebFrame* f = (*itr); diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/WebFrameView.cpp --- a/webengine/osswebengine/WebKit/s60/webview/WebFrameView.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/WebFrameView.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -29,12 +29,17 @@ #include "PageScaler.h" #include "webkitlogger.h" #include "BrCtl.h" +#include "SettingsContainer.h" +#include "StaticObjectsContainer.h" +#include "WebTabbedNavigation.h" + using namespace WebCore; WebFrameView::WebFrameView() : m_parent(NULL), m_hasBorder(true), - m_refCount(1) + m_refCount(1), + m_isVisible(ETrue) { m_hScrollbar = new WebCore::PlatformScrollbar(this, WebCore::HorizontalScrollbar, WebCore::RegularScrollbar); m_vScrollbar = new WebCore::PlatformScrollbar(this, WebCore::VerticalScrollbar, WebCore::RegularScrollbar); @@ -323,7 +328,14 @@ //Update scroll bar , thumb position m_topView->updateScrollbars(m_contentSize.iHeight, m_contentPos.iY, m_contentSize.iWidth, m_contentPos.iX); - + + if (m_topView->brCtl()->settings()->getNavigationType() == SettingsContainer::NavigationTypeTabbed) { + int h = (to.iX - from.iX); + int v = (to.iY - from.iY); + h = (h != 0) ? ((h > 0) ? 1 : -1) : h; + v = (v != 0) ? ((v > 0) ? 1 : -1) : v; + m_topView->tabbedNavigation()->updateCursorPosAfterScroll(core(m_frame.get()), h, v); + } // trigger painting m_topView->syncRepaint(); } @@ -506,6 +518,13 @@ return pt; } +TRect WebFrameView::frameCoordsInViewCoords(const TRect &aRect) +{ + TSize s = aRect.Size(); + return TRect(frameCoordsInViewCoords(aRect.iTl), toViewCoords(s)); +} + + TRect WebFrameView::rectInGlobalCoords() const { TRect rect(toViewCoords(m_frameRect)); @@ -526,6 +545,7 @@ void WebFrameView::makeVisible(TBool aVisible) { + m_isVisible = aVisible; } TBool WebFrameView::isFocused() const @@ -535,7 +555,7 @@ TBool WebFrameView::isVisible() const { - return ETrue; + return m_isVisible; } TSize WebFrameView::contentSize() const diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/WebFrameView.h --- a/webengine/osswebengine/WebKit/s60/webview/WebFrameView.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/WebFrameView.h Mon Mar 29 12:27:15 2010 +0100 @@ -98,7 +98,8 @@ TPoint frameCoordsInViewCoords(const TPoint& aPoint); TPoint viewCoordsInFrameCoords(const TPoint& aPoint); TRect rectInGlobalCoords() const; - + TRect frameCoordsInViewCoords(const TRect &aRect); + void checkScrollbarVisibility(); int getBidiWidth(); bool needScroll(const TPoint& aPoint); @@ -125,6 +126,7 @@ bool m_resizeByEngine; int m_refCount; + TBool m_isVisible; }; #endif // END OF FILE diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/WebPageScrollHandler.cpp --- a/webengine/osswebengine/WebKit/s60/webview/WebPageScrollHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/WebPageScrollHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ // INCLUDE FILES -#include +#include #include <../bidi.h> #include "WebPageScrollHandler.h" #include "BrCtl.h" @@ -37,7 +37,6 @@ #include "WebKitLogger.h" using namespace WebCore; -using namespace RT_GestureHelper; // constants const int KPageOverviewScrollPeriodic = 20 * 1000; // Update frequently for faster, smoother scrolling const int KMicroInterval = 300000; @@ -372,12 +371,14 @@ bool shouldScrollHorizontally = false; WebFrame* frame = kit(m_scrollableView.m_scrollingElement->document()->frame()); RenderObject* render = m_scrollableView.m_scrollingElement->renderer(); - __ASSERT_DEBUG(render->isScrollable(), User::Panic(_L(""), KErrGeneral)); - if (aScrollDelta.iY) - shouldScrollVertically = !render->scroll(ScrollDown, ScrollByPixel, frame->frameView()->toDocCoords(aScrollDelta).iY / 100); - if (aScrollDelta.iX) - shouldScrollHorizontally = !render->scroll(ScrollRight, ScrollByPixel, frame->frameView()->toDocCoords(aScrollDelta).iX / 100); - + if(render) //check if render exits before using it + { + __ASSERT_DEBUG(render->isScrollable(), User::Panic(_L(""), KErrGeneral)); + if (aScrollDelta.iY) + shouldScrollVertically = !render->scroll(ScrollDown, ScrollByPixel, frame->frameView()->toDocCoords(aScrollDelta).iY / 100); + if (aScrollDelta.iX) + shouldScrollHorizontally = !render->scroll(ScrollRight, ScrollByPixel, frame->frameView()->toDocCoords(aScrollDelta).iX / 100); + } TPoint scrollPos = frame->frameView()->contentPos(); TPoint newscrollDelta = frame->frameView()->toDocCoords(aScrollDelta); m_currentNormalizedPosition += newscrollDelta; @@ -559,25 +560,32 @@ Element* currElement = NULL; if(!e) return NULL; RenderObject* render = e->renderer(); - if (render && render->isScrollable()) { + if(render) { RenderLayer* layer = render->enclosingLayer(); Element* parent = e; - currElement = e; - while (!currElement->isControl() && parent && parent->renderer() && parent->renderer()->enclosingLayer() == layer) { - currElement = parent; - Node* pn = parent; - do { - pn = pn->parent(); - } while (pn && !pn->isElementNode()); - parent = static_cast(pn); + + if (e->isControl()) { + if (render->isScrollable()) { + currElement = e; + } + } + else { + while (parent && parent->renderer()) { + if (parent->renderer()->isScrollable()) { + currElement = parent; + break; + } + parent = static_cast(parent->parent()); + } } if (currElement) { + //check for current element which is scrollable currElement->ref(); - m_scrollableView.m_scrollingElement = currElement; + m_scrollableView.m_scrollingElement = currElement; m_scrollableView.m_frameView = NULL; return true; + } } - } return false; } @@ -596,9 +604,9 @@ } -void WebPageScrollHandler::handleScrollingGH(const TGestureEvent& aEvent) +void WebPageScrollHandler::handleScrollingGH(const TStmGestureEvent& aGesture) { - TPoint newPos = aEvent.CurrentPos(); + TPoint newPos = aGesture.CurrentPos(); m_currentPosition = newPos; if (m_webView->inPageViewMode()) { if (!m_pageOverviewScrollPeriodic->IsActive()){ @@ -614,9 +622,9 @@ } -void WebPageScrollHandler::handleTouchDownGH(const TGestureEvent& aEvent) +void WebPageScrollHandler::handleTouchDownGH(const TStmGestureEvent& aGesture) { - TPoint newPos = aEvent.CurrentPos(); + TPoint newPos = aGesture.CurrentPos(); m_lastMoveEventTime = 0; m_lastPosition = newPos; m_currentPosition = newPos; @@ -631,10 +639,10 @@ } -void WebPageScrollHandler::handleTouchUpGH(const TGestureEvent& aEvent) +void WebPageScrollHandler::handleTouchUpGH(const TStmGestureEvent& aGesture) { bool decelDoesScrollbars = false; - TPoint newPos = aEvent.CurrentPos(); + TPoint newPos = aGesture.CurrentPos(); if (m_webView->inPageViewMode()) { if (m_pageOverviewScrollPeriodic->IsActive()){ @@ -648,7 +656,7 @@ else { m_scrollTimer->Cancel(); m_lastPosition = TPoint(0, 0); - decelDoesScrollbars = startDeceleration(aEvent); + decelDoesScrollbars = startDeceleration(aGesture); if (m_webView->viewIsScrolling()) { Frame* frame = m_webView->page()->focusController()->focusedOrMainFrame(); @@ -666,10 +674,10 @@ } -bool WebPageScrollHandler::startDeceleration(const TGestureEvent& aEvent) +bool WebPageScrollHandler::startDeceleration(const TStmGestureEvent& aGesture) { bool started = false; - TRealPoint gstSpeed = aEvent.Speed(); + TRealPoint gstSpeed = aGesture.Speed(); if (Abs(gstSpeed.iX / gstSpeed.iY) <= KTanOfThresholdAngle) { gstSpeed.iX = 0; } diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/WebPageScrollHandler.h --- a/webengine/osswebengine/WebKit/s60/webview/WebPageScrollHandler.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/WebPageScrollHandler.h Mon Mar 29 12:27:15 2010 +0100 @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include "WebScrollingDecelerator.h" @@ -180,9 +180,9 @@ static int pageOverviewScrollCallback( TAny* aPtr ); //static int handleScrollTimerEventCallback( TAny* ptr); void scrollPageOverviewGH(); - void handleScrollingGH(const RT_GestureHelper::TGestureEvent& aEvent); - void handleTouchDownGH(const RT_GestureHelper::TGestureEvent& aEvent); - void handleTouchUpGH(const RT_GestureHelper::TGestureEvent& aEvent); + void handleScrollingGH(const TStmGestureEvent& aGesture); + void handleTouchDownGH(const TStmGestureEvent& aGesture); + void handleTouchUpGH(const TStmGestureEvent& aGesture); void updateScrollbars(const TPoint& scrollPos, TPoint& newscrollDelta); public: @@ -193,7 +193,7 @@ bool calculateScrollableElement(const TPoint& aNewPosition); void scrollPageOverview(const TPointerEvent& pointerEvent); - bool startDeceleration(const RT_GestureHelper::TGestureEvent& aEvent); + bool startDeceleration(const TStmGestureEvent& aGesture); private: // Pointer to owning view diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/WebPointerEventHandler.cpp --- a/webengine/osswebengine/WebKit/s60/webview/WebPointerEventHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/WebPointerEventHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -11,11 +11,11 @@ * * Contributors: * -* Description: +* Description: * */ -#include +#include #include "config.h" #include "../../bidi.h" #include @@ -23,7 +23,7 @@ #include #endif // BRDO_TOUCH_ENABLED_FF #include "brctl.h" -#include "BrCtlDefs.h" +#include #include "WebPointerEventHandler.h" #include "WebView.h" #include "WebFrame.h" @@ -44,6 +44,7 @@ #include "EventHandler.h" #include "EventNames.h" #include "HitTestResult.h" +#include "HitTestRequest.h" #include "MouseEvent.h" #include "WebPageFullScreenHandler.h" #include "PluginSkin.h" @@ -56,11 +57,19 @@ #include "WebTabbedNavigation.h" #include "SettingsContainer.h" #include "PluginHandler.h" +#include "WebCoreGraphicsContext.h" +#include "GraphicsContext.h" +#include "RenderStyle.h" +#include "RenderObject.h" +#include "CSSStyleSelector.h" +#include "CSSValueKeywords.h" +#include "Settings.h" +#include "WebGestureInterface.h" +#include "WebPagePinchZoomHandler.h" #include "WebKitLogger.h" using namespace WebCore; using namespace EventNames; -using namespace RT_GestureHelper; static const int KMinScrollAndTapInterval = 200000; // 200 ms static const int KDoubleTapMinActivationInterval = 100000; // 100 ms @@ -89,7 +98,8 @@ m_isHighlighted(false), m_highlightedNode(NULL), m_buttonDownTimer( this, &WebPointerEventHandler::buttonDownTimerCB ), - m_ignoreTap(false) + m_ignoreTap(false), + m_gestureInterface(NULL) { } @@ -98,7 +108,7 @@ //----------------------------------------------------------------------------- WebPointerEventHandler::~WebPointerEventHandler() { - delete m_gestureHelper; + delete m_gestureInterface; delete m_waiter; } @@ -107,127 +117,115 @@ //----------------------------------------------------------------------------- void WebPointerEventHandler::ConstructL() { -#ifdef BRDO_USE_GESTURE_HELPER - m_gestureHelper = CGestureHelper::NewL( *this ); - m_gestureHelper->SetDoubleTapEnabled(true); - m_gestureHelper->SetHoldingEnabled(false); +#ifdef BRDO_USE_GESTURE_HELPER + m_gestureInterface = WebGestureInterface::NewL(m_webview); #else - m_gestureHelper = NULL; -#endif + m_gestureInterface = NULL; +#endif m_waiter = new(ELeave) CActiveSchedulerWait(); } -/** - * EGestureStart is sent on touch down - * EGestureReleased is sent on touch up - * EGestureTap = touch down + touch up - events sent: EGestureStart, EGestureTap - * EGestureReleased - * EGestureDrag = touch down + "move" - events sent: EGestureStart, EGestureDrag - * EGestureDoubleTap = 2 * (touch down + touch up) - events sent EGestureStart, - * EGestureDoubleTap, EGestureReleased - * EGestureLongTap = touch down + "long touch" - events sent: EGestureStart, - * EGestureLongTap - * EGestureSwipe - drag + touch up, where movements is - * close to particular direction - event sent: EGestureSwipe, - * EGestureReleased - * EGestureFlick - "fast" drag + touch up - events sent: EGestureFlick, - * EGestureReleased - * EGestureDrop - drag + touch up, !(EGestureSwipe || EGestureFlick) - events - * sent: EGestureDrop, EGestureReleased - */ -void WebPointerEventHandler::HandleGestureL( const TGestureEvent& aEvent ) + + +// ====================================================================== +// WebPointerEventHandler::HandleGestureEventL +// ====================================================================== +void WebPointerEventHandler::HandleGestureEventL(const TStmGestureEvent& aGesture) { - TGestureCode gtype = aEvent.Code(EAxisBoth); - TPoint gpos = aEvent.CurrentPos(); - + TStmGestureUid uid = aGesture.Code(); + + if (m_webview->pinchZoomHandler()->isPinchActive() && uid != stmGesture::EGestureUidPinch) + return; + TBrCtlDefs::TBrCtlElementType elType = m_webview->focusedElementType(); - + PluginSkin* plugin = m_webview->mainFrame()->focusedPlugin(); if (plugin && plugin->pluginWin()) { - if (plugin->pluginWin()->HandleGesture(aEvent)) { - return; - } + if (plugin->pluginWin()->HandleGesture(aGesture)) { + if(!plugin->isActive()) + plugin->activate(); + return; + } + } + + updateCursor(aGesture.CurrentPos()); + if (IS_TABBED_NAVIGATION) { + m_webview->tabbedNavigation()->updateCursorPosition(aGesture.CurrentPos()); } - updateCursor(aEvent.CurrentPos()); + + + switch(uid) { + case stmGesture::EGestureUidTouch: + { + if (m_webview->viewIsScrolling()) { + m_ignoreTap = true; + m_webview->pageScrollHandler()->handleTouchDownGH(aGesture); + } + else { + handleTouchDownL(aGesture); + } + break; + } + + + case stmGesture::EGestureUidTap: + { + if (aGesture.Type() == stmGesture::ETapTypeSingle) { + if (!m_ignoreTap) { + handleTapL(aGesture); + } + } + else { + handleDoubleTap(aGesture); + } - switch (gtype) { - // sent on touch down - case EGestureStart: - { - if (m_webview->viewIsScrolling()) { - m_ignoreTap = true; - m_webview->pageScrollHandler()->handleTouchDownGH(aEvent); - } - else { - handleTouchDownL(aEvent); - } - break; - } - - // sent on tap - case EGestureTap: - { - if (!m_ignoreTap) { - handleTapL(aEvent); - } - break; - } - - // sent on double tap - case EGestureDoubleTap: - { - handleDoubleTap(aEvent); - break; - } - - // sent on long tap - case EGestureLongTap: - { - break; - } + break; + } + + case stmGesture::EGestureUidRelease: + { + m_ignoreTap = false; + handleTouchUp(aGesture); + break; + } - // sent on touch up after drag - case EGestureDrop: - case EGestureFlick: - case EGestureSwipeLeft: - case EGestureSwipeRight: - case EGestureSwipeUp: - case EGestureSwipeDown: - { - m_ignoreTap = false; - if (!IS_NAVIGATION_NONE) { - handleTouchUp(aEvent); - } - else { - Frame* frm = m_webview->page()->focusController()->focusedOrMainFrame(); - m_webview->sendMouseEventToEngine(TPointerEvent::EButton1Up, m_highlightPos, frm); - } - break; - } - // sent on move - case EGestureDrag: - { - handleMove(aEvent); - break; - } - - // sent on touch up after tap double tap and long tap - case EGestureReleased: - { - m_ignoreTap = false; - handleTouchUp(aEvent); - break; - } + case stmGesture::EGestureUidPan: + { + handleMove(aGesture); + break; + } + case stmGesture::EGestureUidFlick: + { + m_ignoreTap = false; + if (!IS_NAVIGATION_NONE) { + handleTouchUp(aGesture); + } + else { + Frame* frm = m_webview->page()->focusController()->focusedOrMainFrame(); + m_webview->sendMouseEventToEngine(TPointerEvent::EButton1Up, m_highlightPos, frm); + } + break; + } + + case stmGesture::EGestureUidPinch: + { + handlePinchZoomL(aGesture); + break; + } + default: + break; + } + return; } // ====================================================================== // WebPointerEventHandler::handleTap // ====================================================================== -void WebPointerEventHandler::handleTapL(const TGestureEvent& aEvent) +void WebPointerEventHandler::handleTapL(const TStmGestureEvent& aGesture) { m_buttonDownTimer.stop(); - m_lastTapEvent = m_currentEvent; + m_lastTapEvent = m_currentEvent; if(!m_webview->inPageViewMode()){ doTapL(); } @@ -235,12 +233,12 @@ // ====================================================================== // WebPointerEventHandler::handleDoubleTap //====================================================================== -void WebPointerEventHandler::handleDoubleTap(const TGestureEvent& aEvent) +void WebPointerEventHandler::handleDoubleTap(const TStmGestureEvent& aGesture) { if ( !m_webview->viewIsScrolling() && (m_webview->brCtl()->capabilities() & TBrCtlDefs::ECapabilityFitToScreen)) { if (m_isHighlighted){ - dehighlight(); + dehighlight(); } m_webview->setZoomLevelAdaptively(); } @@ -252,20 +250,20 @@ // ====================================================================== // WebPointerEventHandler::handleTouchDownL //====================================================================== -void WebPointerEventHandler::handleTouchDownL(const TGestureEvent& aEvent) +void WebPointerEventHandler::handleTouchDownL(const TStmGestureEvent& aGesture) { TBrCtlDefs::TBrCtlElementType elType = m_webview->focusedElementType(); PluginHandler* pluginHandler = WebCore::StaticObjectsContainer::instance()->pluginHandler(); PluginSkin* pluginToActivate = pluginHandler->pluginToActivate(); m_buttonDownEvent = m_currentEvent; - m_highlightPos = aEvent.CurrentPos(); - + m_highlightPos = aGesture.CurrentPos(); + if ( !m_buttonDownTimer.isActive() && !m_webview->inPageViewMode()){ - m_buttonDownTimer.startOneShot(0.1f); + m_buttonDownTimer.startOneShot(0.1f); } if (!IS_NAVIGATION_NONE) { - m_webview->pageScrollHandler()->handleTouchDownGH(aEvent); + m_webview->pageScrollHandler()->handleTouchDownGH(aGesture); } if ( TBrCtlDefs::EElementActivatedObjectBox == elType) { @@ -279,43 +277,43 @@ } } } - + /* - * After introducing "link selection" pointer down action is done in - * buttondown timer callback. When "down" gesture event is arrived we start - * timer end exit, so gesture helper is ready to deliver next gesture event. - * Meanwhile the processing of the first gesture event hasn't been finished yet. - * The gesture helper doesn't "know" about our plans to handle the event inside - * timer callback and only way for us to "tell" about this is to stop RunL() - * of CGestureEventSender (HandleGestureL() is inside it) and finish buttondown - * timer callback first. - */ + * After introducing "link selection" pointer down action is done in + * buttondown timer callback. When "down" gesture event is arrived we start + * timer end exit, so gesture helper is ready to deliver next gesture event. + * Meanwhile the processing of the first gesture event hasn't been finished yet. + * The gesture helper doesn't "know" about our plans to handle the event inside + * timer callback and only way for us to "tell" about this is to stop RunL() + * of CGestureEventSender (HandleGestureL() is inside it) and finish buttondown + * timer callback first. + */ if ( m_buttonDownTimer.isActive()){ - m_waiter->Start(); + m_waiter->Start(); } } // ====================================================================== -// WebPointerEventHandler::handleTouchUp +// WebPointerEventHandler::handleTouchUp // ====================================================================== -void WebPointerEventHandler::handleTouchUp(const TGestureEvent& aEvent) +void WebPointerEventHandler::handleTouchUp(const TStmGestureEvent& aGesture) { m_highlightPos = TPoint(-1,-1); m_highlightedNode = NULL; PluginHandler* pluginHandler = WebCore::StaticObjectsContainer::instance()->pluginHandler(); pluginHandler->setPluginToActivate(NULL); if (!IS_NAVIGATION_NONE) { - m_webview->pageScrollHandler()->handleTouchUpGH(aEvent); + m_webview->pageScrollHandler()->handleTouchUpGH(aGesture); } } // ====================================================================== // WebPointerEventHandler::handleMoveL // ====================================================================== -void WebPointerEventHandler::handleMove(const TGestureEvent& aEvent) +void WebPointerEventHandler::handleMove(const TStmGestureEvent& aGesture) { TBrCtlDefs::TBrCtlElementType elType = m_webview->focusedElementType(); - TPoint curPos = aEvent.CurrentPos(); + TPoint curPos = aGesture.CurrentPos(); PluginHandler* pluginHandler = WebCore::StaticObjectsContainer::instance()->pluginHandler(); pluginHandler->setPluginToActivate(NULL); m_buttonDownTimer.stop(); @@ -325,8 +323,8 @@ } else { HandleHighlightChange(curPos); - - m_webview->pageScrollHandler()->handleScrollingGH(aEvent); + + m_webview->pageScrollHandler()->handleScrollingGH(aGesture); } } @@ -337,11 +335,11 @@ void WebPointerEventHandler::HandlePointerEventL(const TPointerEvent& aPointerEvent) { m_currentEvent = aPointerEvent; - - if (m_webview->isSynchRequestPending()) { + + if (m_webview->isSynchRequestPending()) { return; } - + // Handle graphical history - should never happen, as HistoryView handles this event by itself if ( m_webview->brCtl()->historyHandler()->historyController()->historyView()) { return; @@ -352,25 +350,10 @@ m_webview->formFillPopup()->HandlePointerEventL(aPointerEvent); return; } - - if (!m_webview->inPageViewMode()) { - if (aPointerEvent.iType == TPointerEvent::EButton1Down) { - m_webview->GetContainerWindow().EnablePointerMoveBuffer(); - } - else if (aPointerEvent.iType == TPointerEvent::EButton1Up) { - m_webview->GetContainerWindow().DisablePointerMoveBuffer(); - } - - } - - - if (m_webview->brCtl()->settings()->getNavigationType() == SettingsContainer::NavigationTypeTabbed) { - m_webview->tabbedNavigation()->updateCursorPosition(aPointerEvent.iPosition); - } #ifdef BRDO_USE_GESTURE_HELPER - m_gestureHelper->HandlePointerEventL(aPointerEvent); -#endif + m_gestureInterface->HandlePointerEventL(aPointerEvent); +#endif } //----------------------------------------------------------------------------- @@ -412,35 +395,37 @@ TBrCtlDefs::TBrCtlElementType elType = TBrCtlDefs::EElementNone; Frame* coreFrame = core(m_webview->mainFrame()); WebCursor* cursor = StaticObjectsContainer::instance()->webCursor(); - m_webview->page()->chrome()->client()->setElementVisibilityChanged(false); + TPointerEvent event; TPoint pos = cursor->position(); - IntPoint point(pos.iX, pos.iY); - HitTestResult htresult = coreFrame->eventHandler()->hitTestResultAtPoint(point, true); - Node* eventNode = htresult.innerNode(); - Frame* frm = eventNode->document()->frame(); - WebFrame* wfrm = kit(frm); + WebFrame* wfrm = cursor->getFrameAtPoint(pos); + Frame* frm = core(wfrm); TPoint pt(wfrm->frameView()->viewCoordsInFrameCoords(pos)); TPoint nodePoint; - + + Element* eventNode = frm->document()->elementFromPoint(pt.iX, pt.iY); + + if (m_isHighlighted){ + dehighlight(); + } + m_highlightedNode = NULL; - frm->bridge()->getTypeFromElement(eventNode, elType, elRect); + Node* retNode = 0; + frm->bridge()->getTypeFromElement(eventNode, elType, elRect, retNode); + if (elType == TBrCtlDefs::EElementNone) { - Node* n = wfrm->getClosestAnchorElement(cursor->position(), pos); if (n) { - point.setX(pos.iX); - point.setY(pos.iY); - htresult = coreFrame->eventHandler()->hitTestResultAtPoint(point, true); - eventNode = htresult.innerNode(); - frm = eventNode->document()->frame(); - frm->bridge()->getTypeFromElement(eventNode, elType, elRect); + wfrm = cursor->getFrameAtPoint(pos); + frm = core(wfrm); + //eventNode = frm->document()->elementFromPoint(pos.iX, pos.iY); + TPoint newPos(wfrm->frameView()->viewCoordsInFrameCoords(pos)); + eventNode = frm->document()->elementFromPoint(newPos.iX, newPos.iY); + frm->bridge()->getTypeFromElement(eventNode, elType, elRect, retNode); TPoint nodePoint = n->getRect().Rect().Center(); m_offset = (pt.iX- nodePoint.iX)*(pt.iX- nodePoint.iX) + (pt.iY- nodePoint.iY)*(pt.iY- nodePoint.iY); - - } } m_highlightedNode = eventNode; @@ -481,7 +466,7 @@ { TBrCtlDefs::TBrCtlElementType elType = m_webview->focusedElementType(); Frame* coreFrame = core(m_webview->mainFrame()); - + #ifdef BRDO_TOUCH_ENABLED_FF if (m_isHighlighted) { @@ -492,14 +477,22 @@ } } #endif // BRDO_TOUCH_ENABLED_FF - + + if (!IS_NAVIGATION_NONE) { + m_webview->sendMouseEventToEngine(TPointerEvent::EMove, m_highlightPos, coreFrame); + } - // We assume that if element visibility has been changed - // between "up" and "down" that means that some node event - // listener (onMouseOver etc) handling happened and we don't - // want to send a click (mouse press + mouse release) event. - if (!IS_NAVIGATION_NONE && - m_webview->page()->chrome()->client()->elementVisibilityChanged()) { + /* + * We assume that if element visibility has been changed + * between "up" and "down" that means that some node event + * listener (onMouseOver etc) handling happened and we don't + * want to send a click (mouse press + mouse release) event. + * The exception is editable element, since we want VKB anyway + */ + if (!IS_NAVIGATION_NONE && + elType != TBrCtlDefs::EElementActivatedInputBox && + elType != TBrCtlDefs::EElementTextAreaBox && + m_webview->page()->chrome()->client()->elementVisibilityChangedByMouse()) { return; } @@ -508,13 +501,16 @@ m_lastTapEvent.iModifiers = 0; // don't pass the event if the text input is not in valid format - if (isHighlitableElement(elType) || m_webview->fepTextEditor()->validateTextFormat()) { - // because of scrolling we delay sending EButton1Down till we get EButton1Up event and if the content is not scrolling - coreFrame->eventHandler()->handleMouseReleaseEvent(PlatformMouseEvent(m_lastTapEvent)); + if (m_webview->fepTextEditor()->validateTextFormat()) { + if (!IS_NAVIGATION_NONE) { + // in case of navigation none button down was sent in buttonDownTimerCB() + m_webview->sendMouseEventToEngine(TPointerEvent::EButton1Down, m_highlightPos, coreFrame); + } + m_webview->sendMouseEventToEngine(TPointerEvent::EButton1Up, m_highlightPos, coreFrame); } // special handling for broken image (why is this here??) - if (m_webview->focusedElementType() == TBrCtlDefs::EElementBrokenImage) { + if (elType == TBrCtlDefs::EElementBrokenImage) { loadFocusedImage(m_webview); } else if (elType == TBrCtlDefs::EElementActivatedObjectBox) { @@ -542,10 +538,10 @@ Frame* frm = m_webview->page()->focusController()->focusedOrMainFrame(); m_webview->sendMouseEventToEngine(TPointerEvent::EMove, m_highlightPos, frm); - + m_highlightedNode = NULL; - - m_webview->syncRepaint(); + + m_webview->syncRepaint(); } @@ -590,21 +586,44 @@ { m_buttonDownTimer.stop(); - Frame* coreFrame = core(m_webview->mainFrame()); TPointerEvent event; - + TBrCtlDefs::TBrCtlElementType elType = highlitableElement(); - + if (!isHighlitableElement(elType)) { elType = TBrCtlDefs::EElementNone; } m_isHighlighted = (m_highlightedNode != NULL) && (elType != TBrCtlDefs::EElementNone) ; - - m_webview->sendMouseEventToEngine(TPointerEvent::EButton1Down, m_highlightPos, coreFrame); + + /* + * Tabbed navigation might already set the focused node. + * If it's the same as m_highlightedNode FocuseController::setFocusedNode() + * wouldn't do anything and setEditable won't be called. + * So we are setting focused node to NULL here and let mouse event handler + * set it through FocuseController::setFocusedNode() + */ + if (IS_TABBED_NAVIGATION && + elType == TBrCtlDefs::EElementInputBox || + elType == TBrCtlDefs::EElementTextAreaBox) { + coreFrame->document()->setFocusedNode(NULL); + } - m_webview->sendMouseEventToEngine(TPointerEvent::EMove, m_highlightPos, coreFrame); - m_waiter->AsyncStop(); + if (!IS_NAVIGATION_NONE) { + m_webview->page()->chrome()->client()->setElementVisibilityChanged(false); + //to initiate hover + if (m_isHighlighted) { + setFocusRing(); + } + + } + else { + m_webview->sendMouseEventToEngine(TPointerEvent::EButton1Down, m_highlightPos, coreFrame); + } + + if (m_waiter->IsStarted()) { + m_waiter->AsyncStop(); + } } @@ -621,7 +640,39 @@ if (m_webview->showCursor()) { cursor->resetTransparency(); m_webview->setShowCursor(false); - cursor->cursorUpdate(false); + cursor->cursorUpdate(false); } } } + +//----------------------------------------------------------------------------- +// WebPointerEventHandler::setFocusRing +//---------------------------------------------------------------------------- +void WebPointerEventHandler::setFocusRing() +{ + Element* e = static_cast(m_highlightedNode); + RenderStyle* rs = e->renderStyle(); + RenderStyle* style = new (e->document()->renderArena()) RenderStyle(*rs); + Color col(0xffaaaaff); + + style->ref(); + style->setOutlineColor(col); + style->setOutlineStyle(DOTTED, true); + style->setOutlineWidth(4); + style->setOutlineOffset(2); + e->setRenderStyle(style); + style->deref(e->document()->renderArena()); + e->setChanged(); +} + +//----------------------------------------------------------------------------- +// WebPointerEventHandler::handlePinchZoom +//---------------------------------------------------------------------------- +void WebPointerEventHandler::handlePinchZoomL(const TStmGestureEvent& aGesture) +{ + //dehighlight anything which is highlighted already + if (m_isHighlighted){ + dehighlight(); + } + m_webview->pinchZoomHandler()->handlePinchGestureEventL(aGesture); +} diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/WebPointerEventHandler.h --- a/webengine/osswebengine/WebKit/s60/webview/WebPointerEventHandler.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/WebPointerEventHandler.h Mon Mar 29 12:27:15 2010 +0100 @@ -20,8 +20,9 @@ #include #include +#include #include "Timer.h" -#include + namespace WebCore { @@ -31,8 +32,9 @@ class WebView; class CActiveSchedulerWait; +class WebGestureInterface; -class WebPointerEventHandler : public CBase, public RT_GestureHelper::MGestureObserver +class WebPointerEventHandler : public CBase { public: static WebPointerEventHandler* NewL(WebView* view); @@ -42,9 +44,7 @@ public: void HandlePointerEventL(const TPointerEvent& aPointerEvent); void HandleHighlightChange(const TPoint &aPoint); - - virtual void HandleGestureL( const RT_GestureHelper::TGestureEvent& aEvent ); - + void HandleGestureEventL(const TStmGestureEvent& aGesture); private: bool checkForEventListener(WebCore::Node* node); @@ -54,13 +54,15 @@ bool isHighlitableElement(TBrCtlDefs::TBrCtlElementType& elType); TBrCtlDefs::TBrCtlElementType highlitableElement(); void buttonDownTimerCB(WebCore::Timer* t); - void handleTouchDownL(const RT_GestureHelper::TGestureEvent& aEvent); - void handleTouchUp(const RT_GestureHelper::TGestureEvent& aEvent); - void handleTapL(const RT_GestureHelper::TGestureEvent& aEvent); - void handleDoubleTap(const RT_GestureHelper::TGestureEvent& aEvent); - void handleMove(const RT_GestureHelper::TGestureEvent& aEvent); + void handleTouchDownL(const TStmGestureEvent& aGesture); + void handleTouchUp(const TStmGestureEvent& aGesture); + void handleTapL(const TStmGestureEvent& aGesture); + void handleDoubleTap(const TStmGestureEvent& aGesture); + void handleMove(const TStmGestureEvent& aGesture); void doTapL(); void updateCursor(const TPoint& pos); + void setFocusRing(); + void handlePinchZoomL(const TStmGestureEvent& aGesture); private: WebPointerEventHandler(WebView* view); WebView* m_webview; @@ -77,10 +79,10 @@ TPointerEvent m_currentEvent; WebCore::Timer m_buttonDownTimer; - RT_GestureHelper::CGestureHelper* m_gestureHelper; TPointerEvent m_lastPointerEvent; bool m_ignoreTap; CActiveSchedulerWait* m_waiter; + WebGestureInterface* m_gestureInterface; }; diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/WebPolicyManager.cpp --- a/webengine/osswebengine/WebKit/s60/webview/WebPolicyManager.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/WebPolicyManager.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -37,7 +37,6 @@ // CONSTANTS const char* typeTextHtml = "text/html"; -const char* typeTextXml = "text/xml"; const char* typeApplicationXhtml = "application/xhtml+xml"; const char* typeTextPlain = "text/plain"; const char* typeApplicationWapXhtml = "application/vnd.wap.xhtml+xml"; @@ -47,6 +46,8 @@ const char* typeSvg = "svg"; _LIT(KPathBegin,""); +_LIT8(KFileSchema, "file://"); +_LIT8(KFileSchemaUnixStyle, "file:///"); WebPolicyManager::WebPolicyManager(WebFrameLoaderClient* webFrameLoaderClient) : m_webFrameLoaderClient(webFrameLoaderClient) @@ -161,8 +162,7 @@ if (MIMEType == typeTextHtml || MIMEType == typeApplicationXhtml || MIMEType == typeApplicationWapXhtml || - MIMEType == typeMultipartMixed || - MIMEType == typeTextXml) { + MIMEType == typeMultipartMixed) { found = true; } //Check if the image type can be handled by the browser. If not @@ -181,8 +181,19 @@ else if( MIMEType == typeTextPlain || MIMEType == typeApplicationOctetStream ) { TPtrC8 url = (core(m_webFrameLoaderClient->webFrame()))->loader()->activeDocumentLoader()->responseURL().des(); + //Converting TPtrC8 to TPtr8 as Delete() is supported in TPtr8. + HBufC8* lUrl = HBufC8::NewLC(url.Length()); + lUrl->Des().Copy( url ); + TPtr8 tempurl = lUrl->Des(); + //Truncate file:// or file:///(Unix style) from the URI as the path + //file:\\c:\\...\\... is not recognised as a valid path by TUriParser + if(url.FindF(KFileSchema)!= KErrNotFound) + tempurl.Delete(0,KFileSchema().Length()); + else if(url.FindF(KFileSchemaUnixStyle)!= KErrNotFound) + tempurl.Delete(0,KFileSchemaUnixStyle().Length()); + TUriParser8 parser; - if( parser.Parse(url) == KErrNone ) { + if( parser.Parse(tempurl) == KErrNone ) { TPtrC8 path = parser.Extract( EUriPath ); // path == 1 means only / (no filename) if( path.Length() > 1 ) { @@ -194,6 +205,7 @@ path.Find(_L8(".txt")) != KErrNotFound); } } + CleanupStack::PopAndDestroy(lUrl); } // tot:fixme defaultcontenthandler is only for selfdownloadable, go through the list return found; diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/WebScrollingDeceleratorGH.cpp --- a/webengine/osswebengine/WebKit/s60/webview/WebScrollingDeceleratorGH.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/WebScrollingDeceleratorGH.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -28,7 +28,6 @@ #include "WebKitLogger.h" -using namespace RT_GestureHelper; // constants const int KRecordSize = 4; @@ -38,7 +37,9 @@ const int KScrollIntervalTimeout = 60000; // scroll timer interval in microseconds -const float KDecceleration = -700.0; +const float KDeccelerationLow = -350.0; +const float KDeccelerationHigh = -600.0; +const float KSpeedHigh = 2000.0; int decelTimerCB(TAny* ptr); @@ -78,6 +79,7 @@ void WebScrollingDeceleratorGH::ConstructL() { m_decelTimer = CPeriodic::NewL(CActive::EPriorityStandard); + m_deceleration = KDeccelerationHigh; } // ----------------------------------------------------------------------------- @@ -91,7 +93,7 @@ int WebScrollingDeceleratorGH::getDecceleration() { - return KDecceleration; + return m_deceleration; } @@ -114,8 +116,22 @@ { m_decelelatorSwitch = true; m_scrollbarDrawer = scrollbarDrawer; - m_initSpeed.iX = (-1) * speed.iX; - m_initSpeed.iY = (-1) * speed.iY; + float speedX = speed.iX; + float speedY = speed.iY; + float absSpeedX = abs(speedX); + float absSpeedY = abs(speedY); + + if (absSpeedX > KSpeedHigh) { + speedX = KSpeedHigh * speedX/absSpeedX ; + m_deceleration = KDeccelerationLow; + } + if (absSpeedY > KSpeedHigh) { + speedY = KSpeedHigh * speedY/absSpeedY; + m_deceleration = KDeccelerationLow; + } + + m_initSpeed.iX = (-1) * speedX; + m_initSpeed.iY = (-1) * speedY; m_numscrollsteps = 0; if (m_decelTimer->IsActive()) { @@ -145,14 +161,16 @@ TReal32 accelX = 0.0; TReal32 accelY = 0.0; + TReal32 deceleration = getDecceleration(); + if (m_initSpeed.iX) { - accelX = (m_initSpeed.iX > 0) ? KDecceleration : (-1) * KDecceleration; + accelX = (m_initSpeed.iX > 0) ? deceleration : (-1) * deceleration; vx = m_initSpeed.iX + accelX * t; dx = m_initSpeed.iX * t + 0.5 * accelX * (t * t); } if (m_initSpeed.iY) { - accelY = (m_initSpeed.iY > 0) ? KDecceleration : (-1) * KDecceleration; + accelY = (m_initSpeed.iY > 0) ? deceleration : (-1) * deceleration; vy = m_initSpeed.iY + accelY * t; dy = m_initSpeed.iY * t + 0.5 * accelY * (t * t); } diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/WebScrollingDeceleratorGH.h --- a/webengine/osswebengine/WebKit/s60/webview/WebScrollingDeceleratorGH.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/WebScrollingDeceleratorGH.h Mon Mar 29 12:27:15 2010 +0100 @@ -23,7 +23,7 @@ #include #include #include -#include +#include // MACROS @@ -60,7 +60,7 @@ public: // Main functions - void startDecel(RT_GestureHelper::TRealPoint& speed, WebScrollbarDrawer* scrollbarDrawer); + void startDecel(TRealPoint& speed, WebScrollbarDrawer* scrollbarDrawer); void cancelDecel(); @@ -85,7 +85,7 @@ //normalized current position to minimize rounding error TPoint m_normalizedCurrentPosition; - RT_GestureHelper::TRealPoint m_initSpeed; + TRealPoint m_initSpeed; CPeriodic* m_decelTimer; @@ -94,6 +94,8 @@ TPoint m_startPos; WebScrollbarDrawer* m_scrollbarDrawer; + + TReal32 m_deceleration; }; diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/WebTextFormatMask.cpp --- a/webengine/osswebengine/WebKit/s60/webview/WebTextFormatMask.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/WebTextFormatMask.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -192,9 +192,15 @@ m_currentMask = m_currentMask->nextMask(); } - // did we use up all the masks? - if(m_currentMask && m_currentMask->multitude() != kInfinite) - return false; + // this check doesn't seem to be proper as the check is done for + // the partial text.Because the checkText() is called for every character input by user, + // there are remaining masks after complete text length has been checked, + // that is valid case and it should not return false. + // If text length is bigger than mask length then that case is handled within for loop + //before this condition check. So it is redundant in current implementation + // did we use up all the masks? + /* if(m_currentMask && m_currentMask->multitude() != kInfinite) + return false;*/ return (eb.m_start == -1); } @@ -276,6 +282,11 @@ return true; } +bool WebTextFormatMask::acceptAll() + { + return m_acceptAll; + } + MaskComposite::MaskComposite(TInputFormatMaskType t, int mul) : MaskSingle(t), m_offset(0), m_length(mul) { diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/WebTextFormatMask.h --- a/webengine/osswebengine/WebKit/s60/webview/WebTextFormatMask.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/WebTextFormatMask.h Mon Mar 29 12:27:15 2010 +0100 @@ -121,6 +121,7 @@ bool checkText(const WebCore::String&, ErrorBlock&); MaskBase* getMask(int aOffset); + bool acceptAll(); public: int getMultitude(); diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/WebToolBarInterface.h --- a/webengine/osswebengine/WebKit/s60/webview/WebToolBarInterface.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/WebToolBarInterface.h Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,6 @@ * */ - #ifndef __WEBTOOLBARINTERFACE #define __WEBTOOLBARINTERFACE @@ -29,7 +28,7 @@ #include #include #include -#include "BrCtlDefs.h" +#include #include "ToolBar.h" /* #include "Favicon.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/WebView.cpp --- a/webengine/osswebengine/WebKit/s60/webview/WebView.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/WebView.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -28,7 +28,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include +#include #include "config.h" #include "../../bidi.h" #include "brctl.h" @@ -60,7 +60,7 @@ #include "PluginWin.h" #include "PluginPlayer.h" #include "WebKitLogger.h" - +#include "WebPagePinchZoomHandler.h" #include "Page.h" #include "Settings.h" @@ -90,7 +90,7 @@ using namespace HTMLNames; #include -#include +#include #include "WebPageZoomHandler.h" #include "PlatformFontCache.h" @@ -143,7 +143,10 @@ : coreFrame->tree()->traversePreviousWithWrap(wrapFlag)); } - +#define IS_UP_KEY(keyevent) ((keyevent.iCode == EKeyUpArrow) || (keyevent.iCode == EStdKeyUpArrow)) +#define IS_DOWN_KEY(keyevent) ((keyevent.iCode == EStdKeyDevice12) || (keyevent.iCode == EKeyDownArrow) || (keyevent.iCode == EStdKeyDownArrow)) +#define IS_RIGHT_KEY(keyevent) ((keyevent.iCode == EStdKeyDevice11) || (keyevent.iCode == EKeyRightArrow) || (keyevent.iCode == EStdKeyRightArrow)) +#define IS_LEFT_KEY(keyevent) ((keyevent.iCode == EStdKeyDevice13) || (keyevent.iCode == EKeyLeftArrow) || (keyevent.iCode == EStdKeyLeftArrow)) // ----------------------------------------------------------------------------- // WebView::NewL @@ -196,11 +199,17 @@ , m_showCursor(false) , m_allowRepaints(true) , m_prevEditMode(false) +, m_firedEvent(0) +, m_waitTimer(0) +, m_pinchZoomHandler(NULL) +, m_isPinchZoom(false) { } WebView::~WebView() { + StaticObjectsContainer::instance()->webCursor()->stopTransparencyTimer(); + // the zoom handler is a client of WebView (also owned by // WebView--a circular dependency) so it must be deleted before // the WebView object is destroyed because in its destructor it @@ -220,12 +229,16 @@ delete m_fastScrollTimer; delete [] m_ptrbuffer; + delete m_pinchZoomHandler; delete m_repainttimer; delete m_webfeptexteditor; delete m_webcorecontext; delete m_bitmapdevice; delete m_page; delete m_pageScaler; +#ifdef BRDO_SINGLE_CLICK_ENABLED_FF + m_pageScaler = NULL; +#endif delete m_pageView; delete m_webFormFill; delete m_toolbar; @@ -235,6 +248,8 @@ delete m_pageScrollHandler; delete m_pluginplayer; delete m_fepTimer; + delete m_waitTimer; + delete m_waiter; delete m_popupDrawer; delete m_tabbedNavigation; delete m_userAgent; @@ -328,7 +343,10 @@ if (m_brctl->capabilities() & TBrCtlDefs::ECapabilityAutoFormFill) { m_webFormFill = new WebFormFill(this); } - + + //Creates the Pinch Zoom Handler + m_pinchZoomHandler = WebPagePinchZoomHandler::NewL(this); + // Create the PointerEventHandler m_ptrbuffer = new TPoint[256]; m_webpointerEventHandler = WebPointerEventHandler::NewL(this); @@ -351,8 +369,13 @@ MakeViewVisible(ETrue); m_isPluginsVisible=ETrue; CCoeControl::SetFocus(ETrue); - +#ifdef BRDO_MULTITOUCH_ENABLED_FF + //To enable advance pointer info for multi-touch + Window().EnableAdvancedPointers(); +#endif cache()->setCapacities(0, 0, defaultCacheCapacity); + + m_waiter = new(ELeave) CActiveSchedulerWait(); } void WebView::initializePageScalerL() @@ -393,13 +416,27 @@ gc.DrawBitmap( m_destRectForZooming, StaticObjectsContainer::instance()->webSurface()->offscreenBitmap(), m_srcRectForZooming ); if ( m_startZoomLevel > m_currentZoomLevel) { - +#ifdef BRDO_MULTITOUCH_ENABLED_FF + TInt destRectWidth = m_destRectForZooming.Width(); + TInt destRectHeight = m_destRectForZooming.Height(); + TRect rectLeft(TPoint(rect.iTl), + TPoint(rect.iTl.iX + m_destRectForZooming.iTl.iX, rect.iBr.iY)); + + TRect rectRight(TPoint(rect.iTl.iX + destRectWidth + m_destRectForZooming.iTl.iX, rect.iTl.iY), + TPoint(rect.iBr)); + + TRect rectTop(TPoint(rect.iTl.iX + m_destRectForZooming.iTl.iX, rect.iTl.iY), + TPoint(rect.iTl.iX + m_destRectForZooming.iTl.iX + destRectWidth, rect.iTl.iY + m_destRectForZooming.iTl.iY)); + + TRect rectBottom(TPoint(rect.iTl.iX + m_destRectForZooming.iTl.iX, rect.iTl.iY + m_destRectForZooming.iTl.iY + destRectHeight), + TPoint(rect.iTl.iX + destRectWidth + m_destRectForZooming.iTl.iX, rect.iBr.iY)); +#else TRect rectLeft( TPoint( rect.iTl.iX + m_destRectForZooming.Width() - 2, rect.iTl.iY ), TPoint( rect.iBr )); TRect rectBottom( TPoint( rect.iTl.iX, rect.iTl.iY + m_destRectForZooming.Height() - 2 ), TPoint( rect.iBr.iX + m_destRectForZooming.Width(), rect.iBr.iY )); - +#endif const TRgb colorTest(KZoomBgRectColor,KZoomBgRectColor,KZoomBgRectColor); gc.SetPenColor(colorTest); @@ -407,6 +444,10 @@ gc.SetBrushColor(colorTest); gc.DrawRect( rectLeft ); gc.DrawRect( rectBottom ); +#ifdef BRDO_MULTITOUCH_ENABLED_FF + gc.DrawRect( rectRight ); + gc.DrawRect( rectTop ); +#endif } @@ -479,6 +520,9 @@ //Reset the iFocusedElementType to be the same as before the second window is opened. cursor->setPosition(m_savedCursorPosition); cursor->updatePositionAndElemType(m_savedCursorPosition); + if ( m_widgetextension && m_focusedElementType == TBrCtlDefs::EElementSelectBox){ + m_focusedElementType = TBrCtlDefs::EElementNone; + } } else m_savedCursorPosition = cursor->position(); cursor->cursorUpdate(visible & !AknLayoutUtils::PenEnabled()); @@ -509,7 +553,9 @@ if ( visible ) { clearOffScreenBitmap(); + m_tabbedNavigation->initializeForPage(); syncRepaint( mainFrame()->frameView()->visibleRect() ); + TRAP_IGNORE( m_webfeptexteditor->EnableCcpuL() ); } } @@ -520,7 +566,7 @@ { int zoomLevel = m_currentZoomLevel; - if(!( m_widgetextension && m_widgetextension->IsWidgetPublising())) { + if(m_widgetextension && !(m_widgetextension->IsWidgetPublising())) { zoomLevelChanged( KZoomLevelDefaultValue ); } Frame* f = m_page->mainFrame(); @@ -782,6 +828,7 @@ m_focusedElementType = TBrCtlDefs::EElementNone; } m_brctl->updateDefaultSoftkeys(); + page()->chrome()->client()->setElementVisibilityChanged(false); } void WebView::updatePageScaler() @@ -898,7 +945,8 @@ event.iPosition = pos; event.iModifiers = 0; event.iType = eventType; - + + setMouseEventFired(); switch (eventType) { case TPointerEvent::EButton1Down: { @@ -918,6 +966,7 @@ break; } }; + clearMouseEventFired(); } @@ -931,22 +980,21 @@ } } -bool WebView::needDeactivateEditable(const TKeyEvent& keyevent, TEventCode eventcode, Frame* frame) +bool WebView::needDeactivateEditable(const TKeyEvent& keyevent, TEventCode eventcode, Frame* frame, bool consumed) { - bool upOrDown = ((keyevent.iCode == EKeyUpArrow) || - (keyevent.iCode == EStdKeyUpArrow) || - (keyevent.iCode == EKeyRightUpArrow) || - (keyevent.iCode == EKeyDownArrow) || - (keyevent.iCode == EStdKeyDownArrow) || - (keyevent.iCode == EKeyLeftDownArrow)); - bool shouldEndEditing = frame->editor()->client()->shouldEndEditing(NULL); - bool inEditState = (m_isEditable && (m_focusedElementType == TBrCtlDefs::EElementActivatedInputBox)); - bool isSelectBoxActive = (m_focusedElementType == TBrCtlDefs::EElementSelectBox); - bool deactivateInputBox = (inEditState && upOrDown && m_webfeptexteditor->validateTextFormat()); - bool deactivateSelectBox = (isSelectBoxActive && isNaviKey(keyevent)); - + /* + * Here we are making an assumption that if element visibility has been changed + * than JavaScript used the key event. If this the the case or consumed is tru and + * keys are Up or Down we don't want to deactivate an editable element. + * Google suggest is examples if such case. + */ + bool upOrDownConsumed = (consumed || //JavaScript consumed event or + (m_focusedElementType == TBrCtlDefs::EElementActivatedInputBox && // style of input box + page()->chrome()->client()->elementVisibilityChanged())) && // changed + (IS_UP_KEY(keyevent) || IS_DOWN_KEY(keyevent)); + bool shouldEndEditing = frame->editor()->client()->shouldEndEditing(NULL) && !upOrDownConsumed; bool deactivateEditable = (m_isEditable && shouldEndEditing && m_webfeptexteditor->validateTextFormat()); - return deactivateEditable || deactivateSelectBox; + return deactivateEditable; } @@ -981,19 +1029,12 @@ } } else { - if (keyevent.iCode == EKeyDevice3) { //selection key (MSK) - // mimic ccb's behavior of onFocus + if (keyevent.iCode == EKeyDevice3) { // selection key (MSK) consumed = handleMSK(keyevent, oldKeyCode, frame); - - // Toolbar is activated on long key press only if the element - // type is EElementNone during EEventKeyDown and EEventKey. - // This prevents toolbar from popping up in DHTML pages. Also, - // toolbar is activated when the user is not in fast scroll - // mode, or in page overview mode, or on wml page. } else if (isNaviKey(keyevent)) { consumed = handleNaviKeyEvent(keyevent, oldKeyCode, frame); - } // if (m_brctl->settings()->getNavigationType() + } else { // Not an arrow key.. // activate hovered input element by just start typing consumed = !m_isEditable && handleInputElement(keyevent, eventcode, frame); @@ -1005,90 +1046,201 @@ return consumed; } + bool WebView::handleMSK(const TKeyEvent& keyevent, TEventCode eventcode, Frame* frame) { WebCursor* cursor = StaticObjectsContainer::instance()->webCursor(); bool prevEditableState = m_isEditable; - if (m_focusedElementType != TBrCtlDefs::EElementActivatedInputBox ) { - sendMouseEventToEngineIfNeeded(TPointerEvent::EButton1Down, - cursor->position(), frame); + bool tabbedNavigation = (m_brctl->settings()->getNavigationType() == SettingsContainer::NavigationTypeTabbed); + Node* focusedNode = frame->document()->focusedNode(); + bool multiSelectInTabbed = (m_focusedElementType == TBrCtlDefs::EElementSelectMultiBox) && // multiselect element + tabbedNavigation; // in tabbed mode. + /* + * Avoiding resetting cursor position to top left corner of Select Box + * See comment in handleInputElement + */ + if (!multiSelectInTabbed) { + setFocusNone(); + } + + sendMouseEventToEngineIfNeeded(TPointerEvent::EButton1Down, + cursor->position(), frame); + if (!tabbedNavigation) { + setFocusedNode(frame); //TODO: Do we need it here? } - setFocusedNode(frame); + else { + /* + * Restore focused by tabbed navigation node since mouse event + * handler might set it to NULL. + */ + page()->focusController()->setFocusedNode(focusedNode, frame); + } + + /* + * MSK key event on editable will be interpreted as Enter. + * We don't want to send Enter key in case of activated + * input box. Also if the text area has been just activated + * we also don't want to send Enter since it will cause extra + * line feed. + */ bool textAreaJustActivated = (!prevEditableState && m_isEditable && m_focusedElementType == TBrCtlDefs::EElementTextAreaBox); + if (eventcode == EEventKeyDown && m_focusedElementType != TBrCtlDefs::EElementActivatedInputBox && !textAreaJustActivated) { + sendKeyEventToEngine(keyevent, EEventKeyDown, frame); } + + /* + * Toolbar is activated on long key press only if the element + * type is EElementNone during EEventKeyDown and EEventKey. + * This prevents toolbar from popping up in DHTML pages. Also, + * toolbar is activated when the user is not in fast scroll + * mode, or in page overview mode, or on wml page. + */ if ((m_focusedElementType == TBrCtlDefs::EElementNone || m_focusedElementType == TBrCtlDefs::EElementBrokenImage ) && keyevent.iRepeats && !m_brctl->wmlMode() ) { launchToolBarL(); + if(m_toolbar) { + sendMouseEventToEngineIfNeeded(TPointerEvent::EButton1Up, cursor->position(), frame); + } } + return true; } -bool WebView::handleNaviKeyEvent(const TKeyEvent& keyevent, TEventCode eventcode, Frame* frame) + +bool WebView::handleNaviKeyEvent(const TKeyEvent& keyevent, TEventCode eventcode, Frame* frame) { bool downEventConsumed = false; bool consumed = false; bool tabbedNavigation = (m_brctl->settings()->getNavigationType() == SettingsContainer::NavigationTypeTabbed); + bool navigationNone = (m_brctl->settings()->getNavigationType() == SettingsContainer::NavigationTypeNone); /* - * For each platform keyDown event EventHandler::keEvent() generates + * For each platform keyDown event EventHandler::keEvent() generates * keydown and keypress. - * For keypress event we need a char code and since we don't - * have it at the time of EEventKeyDown we pospond it until EEventKey + * For keypress event we need a char code and since we don't + * have it at the time of EEventKeyDown we pospond it until EEventKey * and send it here. */ if (eventcode == EEventKeyDown){ - downEventConsumed = sendKeyEventToEngine(keyevent, EEventKeyDown, frame); + downEventConsumed = sendKeyEventToEngine(keyevent, EEventKeyDown, frame) || + ((m_focusedElementType == TBrCtlDefs::EElementActivatedInputBox && // style of input box + page()->chrome()->client()->elementVisibilityChanged())); } - - if (!downEventConsumed && needDeactivateEditable(keyevent, eventcode, frame)) { + + /* + * downEventConsumed will be true if JavaScript consumes key event + * If we are not in the widget mode we want to deactivate input box + * regardless of whether event was consumed by JavaScript or not. + * Othrerwise we have a risk to be trapped inside input box. + */ + bool widgetDownEventConsumed = downEventConsumed && (m_widgetextension != NULL); + + if (!widgetDownEventConsumed && needDeactivateEditable(keyevent, eventcode, frame, downEventConsumed)) { deactivateEditable(); } - + if(!navigationNone) + if(frame->document()->focusedNode() != NULL && IS_DOWN_KEY(keyevent) && frame->document()->focusedNode()->changed()) + { + deactivateEditable(); + } if (tabbedNavigation) { consumed = downEventConsumed || handleTabbedNavigation(m_currentEventKey, m_currentEventCode); } - else { - consumed = (!m_isEditable && //avoid showing the cursor when we are in the input box + else { + consumed = (!m_isEditable && //avoid showing the cursor when we are in the input box handleKeyNavigation(keyevent, eventcode, frame)) || downEventConsumed; } return consumed; } - bool WebView::handleInputElement(const TKeyEvent& keyevent, TEventCode eventcode, Frame* frame) { WebCursor* cursor = StaticObjectsContainer::instance()->webCursor(); + TBrCtlDefs::TBrCtlElementType elTypeBeforeMouseEvent = m_focusedElementType; + bool tabbedNavigation = (m_brctl->settings()->getNavigationType() == SettingsContainer::NavigationTypeTabbed); + bool navigationNone = (m_brctl->settings()->getNavigationType() == SettingsContainer::NavigationTypeNone); + bool prevEditableState = m_isEditable; + bool enterOnMultiSelectInTabbed = tabbedNavigation && (keyevent.iCode == EKeyEnter) && // EnterKey in case of + (m_focusedElementType == TBrCtlDefs::EElementSelectMultiBox); // multiselect eelement in tabbed mode. + + bool sendMousedEvent = false; if (m_focusedElementType == TBrCtlDefs::EElementInputBox || - m_focusedElementType == TBrCtlDefs::EElementTextAreaBox) { + m_focusedElementType == TBrCtlDefs::EElementTextAreaBox || + (tabbedNavigation && + (m_focusedElementType == TBrCtlDefs::EElementActivatedInputBox))) { sendMousedEvent = true; } else if (m_focusedElementType == TBrCtlDefs::EElementSelectBox || m_focusedElementType == TBrCtlDefs::EElementSelectMultiBox) { - if (m_brctl->settings()->getNavigationType() != SettingsContainer::NavigationTypeNone || - keyevent.iCode == EKeyDevice3) { + if (!navigationNone || keyevent.iCode == EKeyDevice3) { sendMousedEvent = true; } } + + if (m_focusedElementType == TBrCtlDefs::EElementTextAreaBox || + m_focusedElementType == TBrCtlDefs::EElementInputBox || + m_focusedElementType == TBrCtlDefs::EElementActivatedInputBox) { + page()->chrome()->client()->setElementVisibilityChanged(false); + } + if (sendMousedEvent) { + /* + * Sending mouse event to WebCore will trigger FocusController->setFocusedNode() to be called. + * It will do anything only if focused node has been changed. Among other thing it will + * trigger the setEditable() call, which we need. The exception is the case when + * we have tabbed navigation and EnterKey was hit in MultiSelect Box. + * In this case we just want to select item in the select element. + * HTMLSelectElement::listBoxDefaultEventHandler() will call focus() which will + * set the focused node, which is already set anyway, but this will cause the + * reseting cursor position to the top left corner of the select box. + * To avoid thos we put the check here before we reset the foocusedNode. + */ + if (!enterOnMultiSelectInTabbed) { + frame->document()->setFocusedNode(NULL); + } + + /* + * Tweek the m_isEditable flag, so setEditable will do something + * usefull when it's called from FocusController->setFocusedNode() + */ + if (m_isEditable && tabbedNavigation) { + m_isEditable = false; + } + sendMouseEventToEngineIfNeeded(TPointerEvent::EButton1Down, cursor->position(), frame); sendMouseEventToEngineIfNeeded(TPointerEvent::EButton1Up, cursor->position(), frame); - - if (m_focusedElementType == TBrCtlDefs::EElementInputBox || - m_focusedElementType == TBrCtlDefs::EElementTextAreaBox || - m_focusedElementType == TBrCtlDefs::EElementActivatedInputBox) { + + /* + * If enter key was pressed to activate an input box we don't want to + * send it to WebCore since it may cause immediate form submission. + * Same for MultiSelect Box in tabbed mode. + */ + bool inputBoxJustActivated = (!prevEditableState && m_isEditable && + (m_focusedElementType == TBrCtlDefs::EElementActivatedInputBox|| + m_focusedElementType == TBrCtlDefs::EElementTextAreaBox)); + bool inputBoxJustActivatedByEnter = inputBoxJustActivated && (keyevent.iCode == EKeyEnter); + if (!inputBoxJustActivatedByEnter && + !enterOnMultiSelectInTabbed && + (m_focusedElementType == TBrCtlDefs::EElementInputBox || + m_focusedElementType == TBrCtlDefs::EElementTextAreaBox || + m_focusedElementType == TBrCtlDefs::EElementActivatedInputBox)) { + if (!m_fepTimer) { m_fepTimer = new WebCore::Timer(this, &WebView::fepTimerFired); } m_fepTimer->startOneShot(0.2f); - setEditable(true); + if (!m_isEditable) { + setEditable(true); + } } + m_keyevent = keyevent; m_eventcode = eventcode; return true; @@ -1122,6 +1274,16 @@ cursor->scrollAndMoveCursor(keyevent.iCode, m_scrollingSpeed, fastscroll); } updateScrollbars(); + /* + * In order to Enter key activate a link the link node has to be focused. + * When WebCursor is finding next node to snap it stores it, so here we can + * set it to focused. + */ + if (m_brctl->settings()->brctlSetting(TBrCtlDefs::ESettingsEnterKeyMode) == + TBrCtlDefs::EEnterKeyCanActivateLink) { + setFocusedNodeUnderCursor(frame); + } + if (!fastscroll) { m_fastScrollTimer->Start(KCursorInitialDelay,KCursorUpdateFrquency,TCallBack(&scrollTimerCb,this)); m_scrollingStartTime.HomeTime(); @@ -1138,6 +1300,18 @@ return consumed; } +void WebView::setFocusedNodeUnderCursor(Frame* frame) +{ + WebCursor* cursor = StaticObjectsContainer::instance()->webCursor(); + // focus the node we snapped to + if (m_focusedElementType != TBrCtlDefs::EElementNone) { + frame->document()->setFocusedNode(cursor->getElementUnderCursor()); + } + // or reset if there is none + else if (frame->document()->focusedNode() != NULL) { + frame->document()->setFocusedNode(NULL); + } +} bool WebView::handleMinimapNavigation() { @@ -1244,7 +1418,7 @@ (keyevent.iScanCode == EStdKeyEnter) ) { // pass it to webcore - if (( m_focusedElementType == TBrCtlDefs::EElementInputBox || + if (( m_focusedElementType == TBrCtlDefs::EElementActivatedInputBox || m_focusedElementType == TBrCtlDefs::EElementTextAreaBox) && m_brctl->settings()->getNavigationType() == SettingsContainer::NavigationTypeTabbed ) { if (!m_prevEditMode) { @@ -1255,8 +1429,10 @@ } } if (m_brctl->settings()->getNavigationType() != SettingsContainer::NavigationTypeNone) { - if (!sendKeyEventToEngine(correctedKeyEvent, eventcode, frame)) { - sendMouseEventToEngineIfNeeded(TPointerEvent::EButton1Up, cursor->position(), frame); + if (!sendKeyEventToEngine(correctedKeyEvent, eventcode, frame)) { + if (keyevent.iScanCode == EStdKeyDevice3) { //MSK + sendMouseEventToEngineIfNeeded(TPointerEvent::EButton1Up, cursor->position(), frame); + } } consumed = true; } @@ -1301,10 +1477,12 @@ { bool tabbedNavigation = (m_brctl->settings()->getNavigationType() == SettingsContainer::NavigationTypeTabbed); Node* targetNode = frame->document()->focusedNode(); - if (!m_isEditable) { - - - + /* + * we dont want to send key event for navi key to the elements + * like select element since it has default key event handling, + * which will prevent user to leave the element. + */ + if (!m_isEditable && isNaviKey(keyevent)) { frame->document()->setFocusedNode(NULL); } bool consumed = frame->eventHandler()->keyEvent(PlatformKeyboardEvent(keyevent,eventcode)); @@ -1338,6 +1516,18 @@ if (m_popupDrawer) return m_popupDrawer->handleOfferKeyEventL(keyevent, eventcode ); + + if (m_focusedElementType == TBrCtlDefs::EElementObjectBox + || m_focusedElementType == TBrCtlDefs::EElementActivatedObjectBox) { + + Node* node = static_cast(cursor->getElementUnderCursor()); + MWebCoreObjectWidget* view = widget(node); + PluginSkin* plugin = static_cast(view); + if (plugin && plugin->pluginWin() && !(plugin->pluginWin()->Windowed())) { + if (EKeyWasConsumed == plugin->pluginWin()->OfferKeyEventL(keyevent, eventcode)) + return EKeyWasConsumed; + } + } if ( m_webFormFillPopup && m_webFormFillPopup->IsVisible() && AknLayoutUtils::PenEnabled() ) { if (EKeyWasConsumed == m_webFormFillPopup->HandleKeyEventL(keyevent, eventcode)) { @@ -1576,6 +1766,8 @@ void WebView::setEditable(TBool editable) { Frame* frame = core(mainFrame()); + + page()->chrome()->client()->setElementVisibilityChanged(false); if (!frame || m_isEditable == editable) return; @@ -1857,6 +2049,7 @@ m_findKeyword = NULL; WebFrame* selectedFrame = mainFrame()->findFrameWithSelection(); selectedFrame->clearSelection(); + setFocusNone(); } bool WebView::isSmallPage() @@ -1873,30 +2066,6 @@ } } - -//------------------------------------------------------------------------------- -// WebView::HandlePointerBufferReadyL -// Handles pointer move events -//------------------------------------------------------------------------------- -void WebView::HandlePointerBufferReadyL() -{ - memset(m_ptrbuffer,0,256*sizeof(TPoint)); - TPtr8 ptr((TUint8 *)m_ptrbuffer,256*sizeof(TPoint)); - - TInt numPnts = Window().RetrievePointerMoveBuffer(ptr); - int i = 0; - if (m_brctl->settings()->getNavigationType() == SettingsContainer::NavigationTypeNone) { - if (numPnts > 20) - i = numPnts - 20; - } - for (; i < numPnts; i++) { - TPointerEvent pe; - pe.iType = TPointerEvent::EDrag; - pe.iPosition = m_ptrbuffer[i]; - m_webpointerEventHandler->HandlePointerEventL(pe); - } -} - //------------------------------------------------------------------------------- // WebView::HandlePointerEventL // Handles pointer events @@ -2250,6 +2419,25 @@ mainFrame()->scalingFactorChanged(z); view->checkScrollbarVisibility(); + if (m_isPinchZoom) { + if (newZoomLevel > m_startZoomLevel) { + TPoint cpos( mainFrame()->frameView()->contentPos()); + cpos.iX = cpos.iX + m_pinchDocDelta.iX +.5; + cpos.iY = cpos.iY + m_pinchDocDelta.iY +.5; + mainFrame()->frameView()->setContentPos(cpos); + } + if (m_startZoomLevel > newZoomLevel) { + TPoint cpos( mainFrame()->frameView()->contentPos()); + cpos.iX = cpos.iX - m_pinchDocDelta.iX +.5; + cpos.iY = cpos.iY - m_pinchDocDelta.iY +.5; + + if (cpos.iX < 0) cpos.iX = 0; + if (cpos.iY < 0) cpos.iY = 0; + mainFrame()->frameView()->setContentPos(cpos); + } + m_isPinchZoom = false; + } + TRect rect = view->rect(); TInt tlx = (rect.iTl.iX * currZoomLevel) / m_currentZoomLevel; @@ -2348,7 +2536,14 @@ setZoomLevel(zoomLevel); mainFrame()->notifyPluginsOfScrolling(); -} + + if (zoomLevel == KZoomLevelDefaultValue) + { + // for pages based on tables this is required + doLayout(); + } + + } //------------------------------------------------------------------------------- // WebView::openPluginPlayerL @@ -2404,6 +2599,7 @@ #if USE(LOW_BANDWIDTH_DISPLAY) m_page->mainFrame()->loader()->setUseLowBandwidthDisplay(false); #endif + StaticObjectsContainer::instance()->setIconDatabaseEnabled(false); } //Widgets dont need memory cache for dead objects. hence set it to 0 @@ -2759,4 +2955,118 @@ } } +void WebView::wait(double t) +{ + if (!m_waitTimer) { + m_waitTimer = new WebCore::Timer(this, &WebView::waitTimerCB); + } + + if (!m_waitTimer->isActive()) { + m_waitTimer->startOneShot(t); + } + + if (!m_waitTimer->isActive() && !m_waiter->IsStarted()) { + m_waiter->Start(); + } +} + +void WebView::waitTimerCB(WebCore::Timer* t) +{ + if (m_waiter->IsStarted()) { + m_waiter->AsyncStop(); + } +} + +//------------------------------------------------------------------------------- +// WebView::setPinchBitmapZoomLevel +//------------------------------------------------------------------------------- +void WebView::setPinchBitmapZoomLevel(int zoomLevel) +{ + m_zoomLevelChangedByUser = true; + m_dirtyZoomMode = true; + m_isPluginsVisible = false; + mainFrame()->makeVisiblePlugins(false); + m_isPinchZoom = true; + + if (zoomLevel > m_startZoomLevel) { + setPinchBitmapZoomIn(zoomLevel); + } + else { + setPinchBitmapZoomOut(zoomLevel); + } + m_currentZoomLevel = zoomLevel; + DrawNow(); +} + +//------------------------------------------------------------------------------- +// WebView::setPinchBitmapZoomIn +//------------------------------------------------------------------------------- +void WebView::setPinchBitmapZoomIn(int zoomLevel) +{ + TPoint pinchCenter = m_pinchZoomHandler->pinchCenter(); + + // cut m_srcRectForZooming from m_offscreenrect and enlarge it to fit the view rect + TRealPoint centerAfterZoom; + //find out the new position of Pinch Center after applying zoom + centerAfterZoom.iX = (float)pinchCenter.iX * zoomLevel/m_startZoomLevel; + centerAfterZoom.iY = (float)pinchCenter.iY * zoomLevel/m_startZoomLevel; + TRealPoint centerDelta; + //get the shift in the Pinch Center + centerDelta.iX = centerAfterZoom.iX - pinchCenter.iX; + centerDelta.iY = centerAfterZoom.iY - pinchCenter.iY; + TPoint shiftInView; + //find out how much shift needs to be applied to the current zoom, w.r.t. the new view + shiftInView.iX = centerDelta.iX * m_startZoomLevel / zoomLevel; + shiftInView.iY = centerDelta.iY * m_startZoomLevel / zoomLevel; + //width and height of the rectangle that should be used for bitmap stretching + float newWidth = (float)m_offscreenrect.Width() * m_startZoomLevel / zoomLevel; + float newHeight = (float)m_offscreenrect.Height() * m_startZoomLevel /zoomLevel; + //defining the source rectangle which needs to be bitmap stretched + m_srcRectForZooming.iTl.iX = shiftInView.iX; + m_srcRectForZooming.iTl.iY = shiftInView.iY; + m_srcRectForZooming.iBr.iX = newWidth + shiftInView.iX; + m_srcRectForZooming.iBr.iY = newHeight + shiftInView.iY; + //destRectForZooming is the Coecontrol Rect itself + m_destRectForZooming = Rect(); + //get the shift in the document so that during the next engine re-draw, the origin needs to be updated based on that + m_pinchDocDelta.iX = (float)shiftInView.iX * 100 / m_startZoomLevel; + m_pinchDocDelta.iY = (float)shiftInView.iY * 100 / m_startZoomLevel; +} + + +//------------------------------------------------------------------------------- +// WebView::setPinchBitmapZoomOut +//------------------------------------------------------------------------------- +void WebView::setPinchBitmapZoomOut(int zoomLevel) +{ + TPoint pinchCenter = m_pinchZoomHandler->pinchCenter(); + + // take the whole rect and calculate new rect to fit it the rest of view rect paint gray colour + TRealPoint centerAfterZoom; + //find out the new position of Pinch Center after applying zoom + centerAfterZoom.iX = (float)pinchCenter.iX * m_startZoomLevel / zoomLevel; + centerAfterZoom.iY = (float)pinchCenter.iY * m_startZoomLevel / zoomLevel; + TRealPoint centerDelta; + //get the shift in the Pinch Center + centerDelta.iX = centerAfterZoom.iX - pinchCenter.iX; + centerDelta.iY = centerAfterZoom.iY - pinchCenter.iY; + TPoint shiftInView; + //find out how much shift needs to be applied to the current zoom, w.r.t. the new view + shiftInView.iX = centerDelta.iX * zoomLevel / m_startZoomLevel; + shiftInView.iY = centerDelta.iY * zoomLevel / m_startZoomLevel; + //width and height of the rectangle + float newWidth = (float)m_offscreenrect.Width() * zoomLevel / m_startZoomLevel; + float newHeight = (float)m_offscreenrect.Height() * zoomLevel / m_startZoomLevel; + //defining the co-ordinates of the destination rectangle. + m_destRectForZooming.iTl.iX = shiftInView.iX; + m_destRectForZooming.iTl.iY = shiftInView.iY; + m_destRectForZooming.iBr.iX = newWidth + shiftInView.iX; + m_destRectForZooming.iBr.iY = newHeight + shiftInView.iY; + //srcRectForZooming is the Coecontrol Rect itself + m_srcRectForZooming = Rect(); + //get the shift in the document so that during the next engine re-draw, the origin needs to be updated based on that + m_pinchDocDelta.iX = (float)shiftInView.iX * 100 / zoomLevel; + m_pinchDocDelta.iY = (float)shiftInView.iY * 100 / zoomLevel; +} + // END OF FILE diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/WebView.h --- a/webengine/osswebengine/WebKit/s60/webview/WebView.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/WebView.h Mon Mar 29 12:27:15 2010 +0100 @@ -23,10 +23,11 @@ #include #include #include "platform/Shared.h" -#include "BrCtlDefs.h" +#include #include "PageScaler.h" #include "Timer.h" -#include "MemoryManager.h" +#include +#include namespace WebCore { @@ -66,6 +67,13 @@ class WebPageFullScreenHandler; class WebFrameView; class WebFrameBridge; +class WebPagePinchZoomHandler; + + +const TUint KMouseEventFired = 0x00000001; +const TUint KKeyEventFired = 0x00000002; + + class WebView : public CEikBorderedControl, public WebCore::Shared, private MPageScalerCallback, public MOOMStopper { @@ -288,13 +296,6 @@ void closeToolBarL(); /** - * HandlePointerBufferReadyL - * From CCoeControl - * - */ - void HandlePointerBufferReadyL(); - - /** * HandlePointerEventL * From CCoeControl * @@ -343,6 +344,26 @@ * Collects offscreen bitmap */ void collectOffscreenbitmapL(CFbsBitmap& snapshot); + + /** + * To get the pinch zoom handler + */ + WebPagePinchZoomHandler* pinchZoomHandler() { return m_pinchZoomHandler; } + + /** + * To set the Bitmap zooming for Pinch + */ + void setPinchBitmapZoomLevel(int zoomLevel); + + /** + * To set the Bitmap zooming In for Pinch + */ + void setPinchBitmapZoomIn(int zoomLevel); + + /** + * To set the Bitmap zooming Out for Pinch + */ + void setPinchBitmapZoomOut(int zoomLevel); public: // from MPageScalerCallback /** @@ -459,13 +480,15 @@ bool handleEventKeyUp(const TKeyEvent& keyevent, TEventCode eventcode, WebCore::Frame* frame); bool handleEditable(const TKeyEvent& keyevent, TEventCode eventcode, WebCore::Frame* frame ); bool isNaviKey(const TKeyEvent& keyevent); - bool needDeactivateEditable(const TKeyEvent& keyevent, TEventCode eventcode, WebCore::Frame* frame); + bool needDeactivateEditable(const TKeyEvent& keyevent, TEventCode eventcode, WebCore::Frame* frame, bool consumed); bool deactivateEditable(); TUint correctKeyCode(); bool handleNaviKeyEvent(const TKeyEvent& keyevent, TEventCode eventcode, WebCore::Frame* frame); bool handleMSK(const TKeyEvent& keyevent, TEventCode eventcode, WebCore::Frame* frame); - void sendMouseEventToEngineIfNeeded(TPointerEvent::TType eventType, TPoint pos, WebCore::Frame* frame); - + void sendMouseEventToEngineIfNeeded(TPointerEvent::TType eventType, TPoint pos, WebCore::Frame* frame); + void setFocusedNodeUnderCursor(WebCore::Frame* frame); + void waitTimerCB(WebCore::Timer* t); + public: void sendMouseEventToEngine(TPointerEvent::TType eventType, TPoint pos, WebCore::Frame* frame); void fepTimerFired(WebCore::Timer*); @@ -478,6 +501,15 @@ void focusedElementChanged(WebCore::Element* element); void windowObjectCleared() const; + bool isMouseEventFired() { return m_firedEvent & KMouseEventFired; } + bool isKeyEventFired() { return m_firedEvent & KKeyEventFired; } + void setMouseEventFired() { m_firedEvent |= KMouseEventFired; } + void setKeyEventFired() { m_firedEvent |= KKeyEventFired; } + void clearMouseEventFired() { m_firedEvent &= ~KMouseEventFired; } + void clearKeyEventFired() { m_firedEvent &= ~KKeyEventFired; } + void clearEventFired() { m_firedEvent = 0; } + + void wait(double t); private: WebCore::Page* m_page; WebFrameView* m_frameView; @@ -559,7 +591,16 @@ //Indicates any plugin is activated/deactivated bool m_showCursor; bool m_allowRepaints; - bool m_prevEditMode; + bool m_prevEditMode; + int m_firedEvent; + + CActiveSchedulerWait* m_waiter; + WebCore::Timer* m_waitTimer; + + //Pinch Zoom Handler + WebPagePinchZoomHandler* m_pinchZoomHandler; + TBool m_isPinchZoom; + TRealPoint m_pinchDocDelta; }; #endif diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/WmlDispatcher.h --- a/webengine/osswebengine/WebKit/s60/webview/WmlDispatcher.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/WmlDispatcher.h Mon Mar 29 12:27:15 2010 +0100 @@ -21,7 +21,7 @@ // INCLUDES #include #include -#include "BrCtlDefs.h" +#include #include "BrCtl.h" #include "SelfDownloadContentHandler.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/WmlInterface.h --- a/webengine/osswebengine/WebKit/s60/webview/WmlInterface.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/WmlInterface.h Mon Mar 29 12:27:15 2010 +0100 @@ -23,7 +23,7 @@ // INCLUDES #include #include -#include "BrCtlDefs.h" +#include #include "BrCtl.h" class CWmlContentInterface; @@ -90,7 +90,7 @@ /** * Set the WKScrollingProviderNotifyLayoutChange. - * Function BrCtlDialogsProvider.h + * Function brctldialogsprovider.h * void CBrCtlScrollingProvider::NotifyLayoutChange(..) * @since 3.1. * @return void @@ -100,7 +100,7 @@ /** * Set the SetWKScrollingProviderUpdateVScrollBarL. - * Function BrCtlDialogsProvider.h + * Function brctldialogsprovider.h * void CBrCtlScrollingProvider::UpdateVScrollBarL(..) * @since 3.1. * @return void @@ -113,7 +113,7 @@ /** * Set the SetWKScrollingProviderUpdateHScrollBarL - * Function BrCtlDialogsProvider.h + * Function brctldialogsprovider.h * void CBrCtlScrollingProvider::UpdateHScrollBarL(..) * @since 3.1. * @return void @@ -129,7 +129,7 @@ /** * Used by and defined in support of CWKDialogProvider - * Function BrCtlDialogsProvider.h + * Function brctldialogsprovider.h * CBrCtlObjectInfo::CWKObjectInfo() in * [WEBKIT\BrowserControl\src\WKDialogsProviderUtils.cpp] * @since 3.1. diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/WmlInterfaceImpl.h --- a/webengine/osswebengine/WebKit/s60/webview/WmlInterfaceImpl.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/WmlInterfaceImpl.h Mon Mar 29 12:27:15 2010 +0100 @@ -25,7 +25,7 @@ #include #include "WmlInterface.h" -#include "BrCtlDialogsProvider.h" +#include class CBrCtlObjectInfo; class CWmlContentInterface; @@ -119,7 +119,7 @@ /** * Set the WKScrollingProviderNotifyLayoutChange. - * Function \S60\WebEngine\WEBKIT\BrowserControl\inc\BrCtlDialogsProvider.h + * Function \S60\WebEngine\WEBKIT\BrowserControl\inc\brctldialogsprovider.h * void CBrCtlScrollingProvider::NotifyLayoutChange(..) * @since 3.1. * @return void @@ -129,7 +129,7 @@ /** * Set the SetWKScrollingProviderUpdateVScrollBarL. - * Function \S60\WebEngine\WEBKIT\BrowserControl\inc\BrCtlDialogsProvider.h + * Function \S60\WebEngine\WEBKIT\BrowserControl\inc\brctldialogsprovider.h * void CBrCtlScrollingProvider::UpdateVScrollBarL(..) * @since 3.1. * @return void @@ -141,7 +141,7 @@ TInt aDisplayPosY); /** * Set the SetWKScrollingProviderUpdateHScrollBarL - * Function \S60\WebEngine\WEBKIT\BrowserControl\inc\BrCtlDialogsProvider.h + * Function \S60\WebEngine\WEBKIT\BrowserControl\inc\brctldialogsprovider.h * void CBrCtlScrollingProvider::UpdateHScrollBarL(..) * @since 3.1. * @return void @@ -159,7 +159,7 @@ /** * Used by and defined in support of CWKDialogProvider - * Function \S60\WebEngine\WEBKIT\BrowserControl\inc\BrCtlDialogsProvider.h + * Function \S60\WebEngine\WEBKIT\BrowserControl\inc\brctldialogsprovider.h * CBrCtlObjectInfo::CWKObjectInfo() in * [WEBKIT\BrowserControl\src\WKDialogsProviderUtils.cpp] * @since 3.1. diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/WmlResourceLoaderClient.h --- a/webengine/osswebengine/WebKit/s60/webview/WmlResourceLoaderClient.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/WmlResourceLoaderClient.h Mon Mar 29 12:27:15 2010 +0100 @@ -21,7 +21,7 @@ // INCLUDES #include #include -#include "BrCtlDefs.h" +#include #include "BrCtl.h" #include "SelfDownloadContentHandler.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/webview_api_test/group/bld.inf --- a/webengine/osswebengine/WebKit/s60/webview/webview_api_test/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/webview_api_test/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ #ifndef __BROWSER_SDK #include -#include "../../../../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" #endif PRJ_PLATFORMS @@ -26,10 +26,10 @@ PRJ_EXPORTS #ifndef __BROWSER_SDK -../inc/BrCtlDefs.h MW_LAYER_PUBLIC_EXPORT_PATH(BrCtlDefs.h) +../inc/brctldefs.h MW_LAYER_PUBLIC_EXPORT_PATH(brctldefs.h) ../inc/brctlinterface.h MW_LAYER_PUBLIC_EXPORT_PATH(brctlinterface.h) #else -../inc/BrCtlDefs.h /epoc32/include/BrCtlDefs.h +../inc/brctldefs.h /epoc32/include/brctldefs.h ../inc/brctlinterface.h /epoc32/include/brctlinterface.h #endif //#ifndef __BROWSER_SDK diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/webview_api_test/inc/BrCtlDefs.h --- a/webengine/osswebengine/WebKit/s60/webview/webview_api_test/inc/BrCtlDefs.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/webview_api_test/inc/BrCtlDefs.h Mon Mar 29 12:27:15 2010 +0100 @@ -34,12 +34,12 @@ * Usage: * * @code -* #include +* #include * * @see S60 Platform: Browser Control API Developer's Guide Version 2.0 * @lib BrowserEngine.lib * @since 3.0 -* @file BrCtlDefs.h +* @file brctldefs.h * @endcode * */ class TBrCtlDefs diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/webview_api_test/inc/BrCtlInterface.h --- a/webengine/osswebengine/WebKit/s60/webview/webview_api_test/inc/BrCtlInterface.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/webview_api_test/inc/BrCtlInterface.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,6 @@ * */ - - #ifndef BRCTLINTERFACE_H #define BRCTLINTERFACE_H @@ -28,14 +26,14 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include // DATA TYPES @@ -109,27 +107,27 @@ * Usage: * * @code -* #include +* #include * // Interface that provides dialogs used by the Browser Control. -* #include +* #include * // Interface used to receive scrolling events. -* #include +* #include * //Interface that provides a callback mechanism for receiving the * //content of an embedded link or the content of a user-initiated * //load request. -* #include +* #include * //Interface that handles requests to change the softkeys. -* #include +* #include * //Interface that handles special load needs. -* #include +* #include * //Reserved for future use. -* #include +* #include * //Interface that passes download events from the * //Download Manager through the Browser Control to the * //host application. -* #include +* #include * Enum Definition of the Browser Control API. -* #include +* #include * * * The following types of things you can do with the Browser Control API. @@ -149,7 +147,7 @@ * @see S60 Platform: Browser Control API Developer's Guide Version 2.0 * @lib BrowserEngine.lib * @since 2.8 -* @file BrCtlInterface.h +* @file brctlinterface.h * @endcode * */ class CBrCtlInterface : public CCoeControl @@ -619,11 +617,11 @@ * Usage: * * @code -* #include +* #include * @see S60 Platform: Browser Control API Developer's Guide Version 2.0 * @lib BrowserEngine.lib * @since 2.8 -* @file BrCtlInterface.h +* @file brctlinterface.h * @endcode * */ class MBrCtlDataLoadSupplier @@ -644,11 +642,11 @@ * the Browser Control with the ability to receive content incrementally. * * @code -* #include +* #include * @see S60 Platform: Browser Control API Developer's Guide Version 2.0 * @lib BrowserEngine.lib * @since 2.8 -* @file BrCtlInterface.h +* @file brctlinterface.h * @endcode * */ class MBrCtlDataLoadConsumer @@ -684,11 +682,11 @@ * The host application can implement this interface. * * @code -* #include +* #include * @see S60 Platform: Browser Control API Developer's Guide Version 2.0 * @lib BrowserEngine.lib * @since 2.8 -* @file BrCtlInterface.h +* @file brctlinterface.h * @endcode * */ class MBrCtlLoadEventObserver @@ -709,10 +707,10 @@ * The TBrCtlWmlServiceOption class wraps information about the WML DO elements. * For more information about the DO tag, see http://www.w3schools.com/wap/tag_do.asp. * @code -* #include +* #include * @lib BrowserEngine.lib * @since 2.8 -* @file BrCtlInterface.h +* @file brctlinterface.h * @endcode * */ class TBrCtlWmlServiceOption @@ -771,10 +769,10 @@ /** * The TBrCtlSubscribeTo class provides information of Subscribe to items. * @code -* #include +* #include * @lib BrowserEngine.lib * @since 2.8 -* @file BrCtlInterface.h +* @file brctlinterface.h * @endcode * */ class TBrCtlSubscribeTo @@ -833,10 +831,10 @@ * implement this interface in order to find out when the view * changes to and from the Image Map view. * @code -* #include +* #include * @lib BrowserEngine.lib * @since 2.8 -* @file BrCtlInterface.h +* @file brctlinterface.h * @endcode * */ class MBrCtlStateChangeObserver diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/group/WebViewApiTest.mcp Binary file webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/group/WebViewApiTest.mcp has changed diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/group/WebViewApiTest.mmp --- a/webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/group/WebViewApiTest.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/group/WebViewApiTest.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -18,7 +18,7 @@ #include #include //#include "/../../../../WebEngine/OssWebEngine/WebKit/s60/group/common.mmpi" -#include +#include TARGET WebViewApiTest.dll TARGETTYPE dll @@ -64,12 +64,11 @@ USERINCLUDE ../../../../WebEngine/OssWebEngine/WebCore/loader/icon USERINCLUDE ../../../../WebEngine/OssWebEngine/WebCore/loader/wml -// USERINCLUDE ../../../../WebEngine/OssWebEngine/WebKit/S60/Plugins USERINCLUDE ../../../../WebEngine/OssWebEngine/WebKit/S60/WebCoreSupport USERINCLUDE ../../../../WebEngine/OssWebEngine/WebKit/S60/FormControls USERINCLUDE ../../../../WebEngine/OssWebEngine/WebKit/S60/Misc -USERINCLUDE ../../../../WebEngine/OssWebEngine/MemoryManager/Inc +// USERINCLUDE ../../../../WebEngine/OssWebEngine/MemoryManager/Inc USERINCLUDE ../../../../WebEngine/OssWebEngine/DerivedSources/WebCore SYSTEMINCLUDE ../../../../WebEngine/OssWebEngine/WebKit/S60/Plugins diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/group/WebViewApiTest.xml --- a/webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/group/WebViewApiTest.xml Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/group/WebViewApiTest.xml Mon Mar 29 12:27:15 2010 +0100 @@ -1684,7 +1684,7 @@ NameHTMLFormElement.hWindowsText NameHTMLGenericFormElement.hWindowsText NameHTMLInputElement.hWindowsText -NameHttpCacheManager.hWindowsText +Namehttpcachemanager.hWindowsText NameHttpCallbacks.hWindowsText NameHttpConnection.hWindowsText NamehttpDownload.hWindowsText @@ -1980,7 +1980,7 @@ NameHTMLFormElement.hWindows NameHTMLGenericFormElement.hWindows NameHTMLInputElement.hWindows -NameHttpCacheManager.hWindows +Namehttpcachemanager.hWindows NameHttpCallbacks.hWindows NameHttpConnection.hWindows NamehttpDownload.hWindows @@ -7114,7 +7114,7 @@ WINSCW UDEBNameHTMLFormElement.hWindows WINSCW UDEBNameHTMLGenericFormElement.hWindows WINSCW UDEBNameHTMLInputElement.hWindows -WINSCW UDEBNameHttpCacheManager.hWindows +WINSCW UDEBNamehttpcachemanager.hWindows WINSCW UDEBNameHttpCallbacks.hWindows WINSCW UDEBNameHttpConnection.hWindows WINSCW UDEBNamehttpDownload.hWindows diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/group/WebViewApiTest_Data/WINSCW_UDEB/TargetDataWindows.tdt Binary file webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/group/WebViewApiTest_Data/WINSCW_UDEB/TargetDataWindows.tdt has changed diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/inc/BrCtl.h --- a/webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/inc/BrCtl.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/inc/BrCtl.h Mon Mar 29 12:27:15 2010 +0100 @@ -45,9 +45,8 @@ #define BRCTL_H // INCLUDES -#include +#include -#include "BrCtlDefs.h" #include "HistoryInterface.h" #include "WmlInterface.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/inc/BrCtlApiTestContainer.h --- a/webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/inc/BrCtlApiTestContainer.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/inc/BrCtlApiTestContainer.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,11 +15,11 @@ // INCLUDES //#include -#include // interface under test +#include // interface under test -//#include "BrCtlApiTestObserver.h" -//#include "BrCtlApiTestStateChangeObserver.h" -#include "BrCtlApiTestDialogsProvider.h" +//#include "brctlapitestobserver.h" +//#include "brctlapiteststatechangeobserver.h" +#include "brctlapitestdialogsprovider.h" // CONSTATNS //const TInt KThisAppUid = 0xA0000181; diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/inc/BrCtlApiTestDialogsProvider.h --- a/webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/inc/BrCtlApiTestDialogsProvider.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/inc/BrCtlApiTestDialogsProvider.h Mon Mar 29 12:27:15 2010 +0100 @@ -25,7 +25,7 @@ // User includes // System Includes -#include +#include //#include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/inc/BrCtlApiTestObserver.h --- a/webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/inc/BrCtlApiTestObserver.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/inc/BrCtlApiTestObserver.h Mon Mar 29 12:27:15 2010 +0100 @@ -21,11 +21,11 @@ #define BRCTLBCTESTOBSERVER_H // INCLUDES -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/inc/BrCtlApiTestStateChangeObserver.h --- a/webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/inc/BrCtlApiTestStateChangeObserver.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/inc/BrCtlApiTestStateChangeObserver.h Mon Mar 29 12:27:15 2010 +0100 @@ -21,7 +21,7 @@ #define BRCTLBCTESTSTATECHANGEOBSERVER_H // INCLUDES -#include +#include // FORWARD DECLARATIONS class CBrCtlApiTestContainer; diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/inc/WebView.h --- a/webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/inc/WebView.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/inc/WebView.h Mon Mar 29 12:27:15 2010 +0100 @@ -47,10 +47,10 @@ #include #include #include "Shared.h" -#include "BrCtlDefs.h" +#include #include "PageScaler.h" #include "Timer.h" -#include "MemoryManager.h" +#include namespace WebCore { diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/inc/WebViewApiTestContainer.h --- a/webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/inc/WebViewApiTestContainer.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/inc/WebViewApiTestContainer.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,10 +15,10 @@ // INCLUDES //#include -#include +#include -#include "BrCtlApiTestObserver.h" -#include "BrCtlApiTestDialogsProvider.h" +#include "brctlapitestobserver.h" +#include "brctlapitestdialogsprovider.h" #include // interface under test diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/inc/WebViewApiTestObserver.h --- a/webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/inc/WebViewApiTestObserver.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/inc/WebViewApiTestObserver.h Mon Mar 29 12:27:15 2010 +0100 @@ -21,11 +21,11 @@ #define BRCTLBCTESTOBSERVER_H // INCLUDES -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/inc/WebViewApiTestStateChangeObserver.h --- a/webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/inc/WebViewApiTestStateChangeObserver.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/inc/WebViewApiTestStateChangeObserver.h Mon Mar 29 12:27:15 2010 +0100 @@ -21,7 +21,7 @@ #define BRCTLBCTESTSTATECHANGEOBSERVER_H // INCLUDES -#include +#include // FORWARD DECLARATIONS class CWebViewApiTestContainer; diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/mock/inc/BrCtl.h --- a/webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/mock/inc/BrCtl.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/mock/inc/BrCtl.h Mon Mar 29 12:27:15 2010 +0100 @@ -40,14 +40,13 @@ * ============================================================================== */ - #ifndef BRCTL_H #define BRCTL_H // INCLUDES -#include +#include -#include "BrCtlDefs.h" +#include #include "HistoryInterface.h" #include "WmlInterface.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/mock/src/BrCtl.cpp --- a/webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/mock/src/BrCtl.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/mock/src/BrCtl.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -39,7 +39,7 @@ * ============================================================================== */ // INCLUDE FILES -#include +#include #include <../bidi.h> #include #include @@ -55,9 +55,9 @@ #endif #include #include -#include +#include //tot:fixme -//#include +//#include "oom.h" #include "config.h" #include "BrCtl.h" @@ -91,7 +91,7 @@ #include "WebCursor.h" #include "WebUtil.h" #include "WebCharsetData.h" -#include "HttpCacheManager.h" +#include "httpcachemanager.h" #include "ResourceLoaderDelegate.h" #include "EventHandler.h" #include "timer.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/src/BrCtlApiTestContainer.cpp --- a/webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/src/BrCtlApiTestContainer.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/src/BrCtlApiTestContainer.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -11,16 +11,16 @@ */ // INCLUDE FILES -#include "BrCtlApiTestContainer.h" +#include "brctlapitestcontainer.h" #include // for example label control #include //#include -#include +#include #include #include -#include "BrCtlApiTestObserver.h" -#include "BrCtlApiTestStateChangeObserver.h" +#include "brctlapitestobserver.h" +#include "brctlapiteststatechangeobserver.h" #include _LIT8( KContentDataType, "text/html" ); diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/src/BrCtlApiTestDialogsProvider.cpp --- a/webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/src/BrCtlApiTestDialogsProvider.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/src/BrCtlApiTestDialogsProvider.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -19,11 +19,11 @@ // INCLUDE Files // System includes -#include -//#include +#include +//#include // User includes -#include "BrCtlApiTestDialogsProvider.h" +#include "brctlapitestdialogsprovider.h" // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/src/BrCtlApiTestObserver.cpp --- a/webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/src/BrCtlApiTestObserver.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/WebKit/s60/webview/webview_api_test/tsrc/src/BrCtlApiTestObserver.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ //#include //#include //#include -#include "BrCtlApiTestObserver.h" +#include "brctlapitestobserver.h" #include #ifndef RD_PF_SEC_APPARC diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKit/win/WebKit.vcproj/resource.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKitTools/Drosera/win/resource.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.c diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/main.c diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKitTools/DumpRenderTree/qt/DumpRenderTree.pro diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/main.c diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/resource.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/cache/cache_check.pl --- a/webengine/osswebengine/cache/cache_check.pl Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/cache/cache_check.pl Mon Mar 29 12:27:15 2010 +0100 @@ -1,18 +1,3 @@ -# -# 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 "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# #!/usr/bin/perl #use Encode; diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/cache/conf/httpcachemanager.confml Binary file webengine/osswebengine/cache/conf/httpcachemanager.confml has changed diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/cache/filter_emulator_output.bat --- a/webengine/osswebengine/cache/filter_emulator_output.bat Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/cache/filter_emulator_output.bat Mon Mar 29 12:27:15 2010 +0100 @@ -1,18 +1,2 @@ -@rem -@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 "Eclipse Public License v1.0" -@rem which accompanies this distribution, and is available -@rem at the URL "http://www.eclipse.org/legal/epl-v10.html". -@rem -@rem Initial Contributors: -@rem Nokia Corporation - initial contribution. -@rem -@rem Contributors: -@rem -@rem Description: -@rem - filter_log.pl %tmp%\epocwind.out log.txt" log.txt diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/cache/filter_log.pl --- a/webengine/osswebengine/cache/filter_log.pl Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/cache/filter_log.pl Mon Mar 29 12:27:15 2010 +0100 @@ -1,18 +1,3 @@ -# -# 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 "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# #!/usr/bin/perl open INH,"<",$ARGV[0]; diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/cache/group/BrowserCache.mmp --- a/webengine/osswebengine/cache/group/BrowserCache.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/cache/group/BrowserCache.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -14,13 +14,11 @@ * Description: BrowserCache * */ -#if defined(__BROWSER_SDK) -TARGET BrowserCache_sdk.dll -#else + #include -#include -TARGET BrowserCache.dll -#endif +#include +TARGET BrowserCache.dll + TARGETTYPE dll UID 0x1000008D 0x10282353 @@ -30,14 +28,12 @@ EPOCALLOWDLLDATA //MACRO HTTP_CACHE_LOGGING - #if defined(WINSCW) deffile Bwinscw/BrowserCache.def #elif defined(ARMCC) deffile EABI/BrowserCache.def #endif - SOURCEPATH ../src SOURCE HttpCacheManager.cpp @@ -51,18 +47,11 @@ SOURCE HttpCacheFileWriteHandler.cpp SOURCE HttpCachePostponeWriteUtilities.cpp - USERINCLUDE ../inc -//-- -#ifndef __BROWSER_SDK MW_LAYER_SYSTEMINCLUDE -#else -SYSTEMINCLUDE /epoc32/include /epoc32/include/oem -#endif -SYSTEMINCLUDE /Epoc32/include/http -SYSTEMINCLUDE /Epoc32/include/libc +OS_LAYER_ESTLIB_SYSTEMINCLUDE @@ -81,3 +70,4 @@ LIBRARY memman.lib LIBRARY cone.lib // CoeControl DEBUGLIBRARY flogger.lib + diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/cache/group/bld.inf --- a/webengine/osswebengine/cache/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/cache/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,7 @@ * */ #include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/cache/inc/HttpCacheFileWriteHandler.h --- a/webengine/osswebengine/cache/inc/HttpCacheFileWriteHandler.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/cache/inc/HttpCacheFileWriteHandler.h Mon Mar 29 12:27:15 2010 +0100 @@ -23,7 +23,7 @@ #include #include "HttpCacheHandler.h" #include "HttpCacheEntry.h" -#include "MemoryManager.h" +#include // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/cache/inc/HttpCacheHandler.h --- a/webengine/osswebengine/cache/inc/HttpCacheHandler.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/cache/inc/HttpCacheHandler.h Mon Mar 29 12:27:15 2010 +0100 @@ -20,7 +20,7 @@ // INCLUDES #include -#include +#include #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/cache/inc/HttpCacheLookupTable.h --- a/webengine/osswebengine/cache/inc/HttpCacheLookupTable.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/cache/inc/HttpCacheLookupTable.h Mon Mar 29 12:27:15 2010 +0100 @@ -106,7 +106,7 @@ * @param * @return */ - TInt CHttpCacheLookupTable::ListFiles( RPointerArray& aFilenameList ); + TInt ListFiles( RPointerArray& aFilenameList ); /** * diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/cache/inc/HttpCacheManager.h --- a/webengine/osswebengine/cache/inc/HttpCacheManager.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/cache/inc/HttpCacheManager.h Mon Mar 29 12:27:15 2010 +0100 @@ -21,7 +21,7 @@ // INCLUDES #include #include -#include +#include #include // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/cache/inc/HttpCachePostponeWriteUtilities.h --- a/webengine/osswebengine/cache/inc/HttpCachePostponeWriteUtilities.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/cache/inc/HttpCachePostponeWriteUtilities.h Mon Mar 29 12:27:15 2010 +0100 @@ -69,6 +69,7 @@ MHttpCacheWriteSource* iSource; TInt iBodyPart; TBool iDone; + TPtrC8 iCurrentBuf; }; diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/cache/src/HttpCacheFileWriteHandler.cpp --- a/webengine/osswebengine/cache/src/HttpCacheFileWriteHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/cache/src/HttpCacheFileWriteHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -23,7 +23,7 @@ #include "HttpCachePostponeWriteUtilities.h" #include "HttpCacheUtil.h" #include "HttpCacheObserver.h" -#include +#include #include #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/cache/src/HttpCacheHandler.cpp --- a/webengine/osswebengine/cache/src/HttpCacheHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/cache/src/HttpCacheHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ // INCLUDE FILES #include "HttpCacheHandler.h" -#include "HttpCacheManager.h" +#include "httpcachemanager.h" #include "HttpCacheEntry.h" #include "HttpCacheLookupTable.h" #include "HttpCacheStreamHandler.h" @@ -32,7 +32,7 @@ #include #include #include -#include +#include // EXTERNAL DATA STRUCTURES diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/cache/src/HttpCacheManager.cpp --- a/webengine/osswebengine/cache/src/HttpCacheManager.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/cache/src/HttpCacheManager.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -16,12 +16,12 @@ */ // INCLUDE FILES -#include "HttpCacheManager.h" +#include "httpcachemanager.h" #include "HttpCacheHandler.h" #include "HttpCacheUtil.h" #include "HttpCacheFileWriteHandler.h" #include -#include +#include #include #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/cache/src/HttpCachePostponeWriteUtilities.cpp --- a/webengine/osswebengine/cache/src/HttpCachePostponeWriteUtilities.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/cache/src/HttpCachePostponeWriteUtilities.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -99,8 +99,8 @@ HttpCacheUtil::WriteFormatLog(0, _L("CACHEPOSTPONE: CHttpCacheEntryAsyncWriteHelper::WriteNextBodyBlock called on object %08x for block %d"), this, iBodyPart ); #endif - TPtrC8 bufferPtr( iSource->BodyData().GetSegmentData(iBodyPart) ); - iSource->BodyFile().Write(bufferPtr, iStatus); + iCurrentBuf.Set( iSource->BodyData().GetSegmentData(iBodyPart) ); + iSource->BodyFile().Write(iCurrentBuf, iStatus); } // ----------------------------------------------------------------------------- diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/cache/src/HttpCacheUtil.cpp --- a/webengine/osswebengine/cache/src/HttpCacheUtil.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/cache/src/HttpCacheUtil.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -25,7 +25,7 @@ #include #include #include "TInternetdate.h" -#include "HttpFilterCommonStringsExt.h" +#include "httpfiltercommonstringsext.h" #include "HttpCacheEntry.h" // EXTERNAL DATA STRUCTURES diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/npscript/group/bld.inf --- a/webengine/osswebengine/npscript/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/npscript/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ #include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/npscript/group/npscript.mmp --- a/webengine/osswebengine/npscript/group/npscript.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/npscript/group/npscript.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -20,25 +20,22 @@ #include #include -#include +#include UID 0x1000008D 0x2000B19E VENDORID VID_DEFAULT CAPABILITY CAP_GENERAL_DLL - #if defined(WINSCW) deffile BWINSCW/npscript.def #elif defined(ARMCC) deffile EABI/npscript.def #endif - SOURCEPATH ../npscript SOURCE npscript.cpp - MW_LAYER_SYSTEMINCLUDE SYSTEMINCLUDE ../../javascriptcore/bindings diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/npscript/npscript/npscript.cpp --- a/webengine/osswebengine/npscript/npscript/npscript.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/osswebengine/npscript/npscript/npscript.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -19,7 +19,7 @@ // INCLUDE FILES #include #include -#include +#include // EXTERNAL DATA STRUCTURES diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/webkit/s60/webview/WebGestureInterface.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/osswebengine/webkit/s60/webview/WebGestureInterface.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,167 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + +// INCLUDE FILES +#include +#include "config.h" +#include "../../bidi.h" +#include +#include "WebGestureInterface.h" +#include "WebView.h" +#include "WebPointerEventHandler.h" + +const TInt TOUCH_AREA_TIMEOUT = 200; +const TInt TOUCH_TIME_AREA_TIMEOUT = 0; +const TInt HOLD_AREA_TIMEOUT = 2000; +const TInt DOUBLE_TAP_TIMEOUT = 400; +const TInt SUPPRESS_TIMEOUT = 0; +const TInt MOVE_SUPPRESS_TIMEOUT = 0; + +const TInt TOUCH_TIME_AREA_WIDTH = 4; +const TInt TOUCH_AREA_WIDTH = 4; +const TInt HOLD_AREA_WIDTH = 4; + +const TInt PAN_SPEED_LOW = 0; +const TInt PAN_SPEED_HIGH = 400; + +// ============================ MEMBER FUNCTIONS =============================== + +// ----------------------------------------------------------------------------- +// CgesturetestAppView::NewL() +// Two-phased constructor. +// ----------------------------------------------------------------------------- +// +WebGestureInterface* WebGestureInterface::NewL(WebView* view) +{ + WebGestureInterface* self = WebGestureInterface::NewLC(view); + CleanupStack::Pop(self); + return self; +} + +// ----------------------------------------------------------------------------- +// CgesturetestAppView::NewLC() +// Two-phased constructor. +// ----------------------------------------------------------------------------- +// +WebGestureInterface* WebGestureInterface::NewLC(WebView* view) +{ + WebGestureInterface* self = new (ELeave) WebGestureInterface(view); + CleanupStack::PushL(self); + self->ConstructL(); + return self; +} + +// ----------------------------------------------------------------------------- +// WebGestureInterface::WebGestureInterface +// C++ default constructor +// +// ----------------------------------------------------------------------------- +// +WebGestureInterface::WebGestureInterface(WebView* view) +: m_webview(view) +{ +} + +// ----------------------------------------------------------------------------- +// WebGestureInterface::~WebGestureInterface +// ----------------------------------------------------------------------------- +WebGestureInterface::~WebGestureInterface() +{ + iGestureContext->Deactivate(); + iGestureContext->RemoveListener(this); + delete iGestureEngine; +} +// ----------------------------------------------------------------------------- +// WebGestureInterface::ConstructL +// Symbian 2nd phase constructor can leave. +// ----------------------------------------------------------------------------- +// +void WebGestureInterface::ConstructL() +{ + iGestureEngine = CStmGestureEngine::NewL(); + iGestureContext = iGestureEngine->CreateContextL(TInt(this)); + iGestureContext->SetContext(m_webview); + iGestureContext->AddListenerL(this); + + CStmGestureParameters& gestureParams = iGestureContext->Config(); + //Enable the Gestures needed + gestureParams.SetEnabled(stmGesture::EGestureUidTouch, ETrue); + gestureParams.SetEnabled(stmGesture::EGestureUidTap, ETrue); + gestureParams.SetEnabled(stmGesture::EGestureUidRelease, ETrue); + gestureParams.SetEnabled(stmGesture::EGestureUidPan, ETrue); + gestureParams.SetEnabled(stmGesture::EGestureUidFlick, ETrue); + gestureParams.SetEnabled(stmGesture::EGestureUidLongPress, ETrue); +#ifdef BRDO_MULTITOUCH_ENABLED_FF + gestureParams.SetEnabled(stmGesture::EGestureUidPinch, ETrue); +#else + gestureParams.SetEnabled(stmGesture::EGestureUidPinch, EFalse); +#endif + + //Set other parameters + + TStmGestureArea& touchTimeArea = *gestureParams.Area(stmGesture::ETouchTimeArea); + TStmGestureArea& touchArea = *gestureParams.Area(stmGesture::ETouchArea); + TStmGestureArea& holdArea = *gestureParams.Area(stmGesture::EHoldArea); + + touchTimeArea.iShape = TStmGestureArea::ERectangle; + touchTimeArea.iTimeout = TOUCH_TIME_AREA_TIMEOUT; + touchTimeArea.iSize.iWidth = TOUCH_TIME_AREA_WIDTH; + + touchArea.iShape = TStmGestureArea::ERectangle; + touchArea.iTimeout = TOUCH_AREA_TIMEOUT; + touchArea.iSize.iWidth = TOUCH_AREA_WIDTH; + + holdArea.iShape = TStmGestureArea::ERectangle; + holdArea.iTimeout = HOLD_AREA_TIMEOUT; + holdArea.iSize.iWidth = HOLD_AREA_WIDTH; + + gestureParams[stmGesture::EDoubleTapTimeout ] = DOUBLE_TAP_TIMEOUT; + gestureParams[stmGesture::ESuppressTimeout ] = SUPPRESS_TIMEOUT; + gestureParams[stmGesture::EMoveSuppressTimeout] = MOVE_SUPPRESS_TIMEOUT; + gestureParams[stmGesture::EPanSpeedLow ] = PAN_SPEED_LOW; + gestureParams[stmGesture::EPanSpeedHigh ] = PAN_SPEED_HIGH; + + gestureParams[stmGesture::EEnableFiltering ] = ETrue; +#ifdef BRDO_MULTITOUCH_ENABLED_FF + gestureParams[stmGesture::ECapacitiveUpUsed ] = ETrue; + gestureParams[stmGesture::EAdjustYPos ] = ETrue; +#else + gestureParams[stmGesture::ECapacitiveUpUsed ] = EFalse; + gestureParams[stmGesture::EAdjustYPos ] = EFalse; +#endif + iGestureContext->ActivateL(); + +} + +// ----------------------------------------------------------------------------- +// HandlePointerEventL +// ----------------------------------------------------------------------------- +void WebGestureInterface::HandlePointerEventL(const TPointerEvent& aPointerEvent) +{ + iGestureEngine->HandlePointerEventL(aPointerEvent, m_webview); +} + +// ----------------------------------------------------------------------------- +// HandleGestureEventL +// ----------------------------------------------------------------------------- +void WebGestureInterface::HandleGestureEventL(const TStmGestureEvent& aGesture) +{ + m_webview->pointerEventHandler()->HandleGestureEventL(aGesture); +} + + diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/webkit/s60/webview/WebGestureInterface.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/osswebengine/webkit/s60/webview/WebGestureInterface.h Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,77 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Implements gesture interface functionality +* +*/ + +#ifndef WEBGESTUREINTERFACE_H +#define WEBGESTUREINTERFACE_H + +// INCLUDES +#include + +// MACROS + +// FORWARD DECLARATIONS +class WebView; + +// CLASS DECLARATION +class WebGestureInterface : public CBase, public MStmGestureListener + { +public: + // New methods + + /** + * NewL. + * Two-phased constructor. + * Create a WebGestureInterface object + * @return a pointer to the created instance of WebGestureInterface. + */ + static WebGestureInterface* NewL(WebView* view); + + static WebGestureInterface* NewLC(WebView* view); + + /** + * ~CgestureInterface + * Virtual Destructor. + */ + ~WebGestureInterface(); + +public: //member functions + + void HandlePointerEventL(const TPointerEvent& aPointerEvent); + +public: //from MStmGestureListener + + void HandleGestureEventL(const TStmGestureEvent& aGesture); + +private: + // Constructors + + void ConstructL(); + + /** + * WebGestureInterface. + * C++ default constructor. + */ + WebGestureInterface(WebView* view); + +private: + CStmGestureEngine *iGestureEngine; // <> + CStmGestureContext *iGestureContext; // <> + WebView* m_webview; // <> + }; + +#endif // WEBGESTUREINTERFACE_H +// End of File diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/webkit/s60/webview/WebPagePinchZoomHandler.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/osswebengine/webkit/s60/webview/WebPagePinchZoomHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,242 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + +// INCLUDE FILES +#include <../bidi.h> +#include "WebPagePinchZoomHandler.h" +#include "WebView.h" + + +const int KBitmapUpdateTimeout = 100*1000; +const int KPinchExitWaitTimeout = 300*1000; + +const int KPinchZoomStepSizeSmall = 3; +const int KPinchZoomStepSizeMedium = 4; +const int KPinchZoomStepSizeLarge = 5; +const int KMinPinchFactor = 1; + +int pinchBitmapUpdateTimerCb( void* ptr ); +int pinchExitWaitTimerCb( void* ptr ); + + +// ============================ MEMBER FUNCTIONS =============================== + +// ----------------------------------------------------------------------------- +// WebPagePinchZoomHandler::NewL +// The two-phase Symbian constructor +// ----------------------------------------------------------------------------- +// +WebPagePinchZoomHandler* WebPagePinchZoomHandler::NewL(WebView* webView) +{ + WebPagePinchZoomHandler* self = new (ELeave) WebPagePinchZoomHandler(webView); + CleanupStack::PushL(self); + self->constructL(); + CleanupStack::Pop(); //self + return self; +} + +// ----------------------------------------------------------------------------- +// WebPagePinchZoomHandler::WebPointerEventHandler +// C++ default constructor +// +// ----------------------------------------------------------------------------- +// +WebPagePinchZoomHandler::WebPagePinchZoomHandler(WebView* webView) +: m_webView(webView) +, m_zoomOutBaseLevel(0) +, m_pinchCenterSet(false) +, m_zoomStepSize(0) +, m_pinchActive(false) +, m_pinchCenter(0,0) +{ +} + +// ----------------------------------------------------------------------------- +// WebPagePinchZoomHandler::constructL +// The constructor that can contain code that might leave. +// ----------------------------------------------------------------------------- +// +void WebPagePinchZoomHandler::constructL() +{ + m_bitmapUpdateTimer = CPeriodic::NewL(CActive::EPriorityHigh); + m_pinchExitWaitTimer = CPeriodic::NewL(CActive::EPriorityHigh); +} + +// ----------------------------------------------------------------------------- +// WebPagePinchZoomHandler::~WebPagePinchZoomHandler +// ----------------------------------------------------------------------------- +WebPagePinchZoomHandler::~WebPagePinchZoomHandler() +{ + if (m_bitmapUpdateTimer->IsActive()) + m_bitmapUpdateTimer->Cancel(); + delete m_bitmapUpdateTimer; + + if (m_pinchExitWaitTimer->IsActive()) + m_pinchExitWaitTimer->Cancel(); + delete m_pinchExitWaitTimer; + +} + +// ----------------------------------------------------------------------------- +// getPinchZoomStepSize +// ----------------------------------------------------------------------------- +TInt WebPagePinchZoomHandler::getPinchZoomStepSize() +{ + TInt zoomStepSize = 0; + + TInt absPinchFactor = Abs (m_pinchFactor); + if (absPinchFactor == 0) + return zoomStepSize; + + if ( absPinchFactor >= KMinPinchFactor && absPinchFactor <= 10 ) { + zoomStepSize = KPinchZoomStepSizeSmall; + } + else if ( absPinchFactor > 10 && absPinchFactor <= 20 ) { + zoomStepSize = KPinchZoomStepSizeMedium; + } + else if ( absPinchFactor > 20 ) { + zoomStepSize = KPinchZoomStepSizeLarge; + } + + return (m_pinchFactor/absPinchFactor) * zoomStepSize; +} + +// ----------------------------------------------------------------------------- +// handlePinchGestureEventL +// ----------------------------------------------------------------------------- +void WebPagePinchZoomHandler::handlePinchGestureEventL(const TStmGestureEvent& aGesture) +{ + if(aGesture.GestureState() == EGestureEnter) { + m_pinchActive = true; + handlePinchGestureL(aGesture); + } + else { + m_pinchActive = false; + handlePinchGestureExitL(aGesture); + } + +} + +// ----------------------------------------------------------------------------- +// handlePinchGestureL +// ----------------------------------------------------------------------------- +void WebPagePinchZoomHandler::handlePinchGestureL(const TStmGestureEvent& aGesture) +{ + + m_pinchFactor = aGesture.Details(); + TInt zoomValue = 0; + TInt currentZoom = m_webView->zoomLevel(); + TInt zoomStepSize = getPinchZoomStepSize(); + + if (zoomStepSize == 0) + return; + + zoomValue = currentZoom + zoomStepSize; + if (m_zoomStepSize > 0 && zoomStepSize < 0) m_zoomOutBaseLevel = currentZoom / 2; + + m_zoomStepSize = zoomStepSize; + + if(zoomValue >= m_webView->minZoomLevel() && zoomValue <= m_webView->maxZoomLevel()) { + if (!m_pinchCenterSet) { + TPoint pinchCenter = aGesture.PinchEndPos() + aGesture.CurrentPos(); + m_pinchCenter.iX = pinchCenter.iX / 2; + m_pinchCenter.iY = pinchCenter.iY / 2; + m_pinchCenterSet = true; + if (zoomStepSize < 0) m_zoomOutBaseLevel = currentZoom / 2; + } + if (!(zoomStepSize < 0 && zoomValue < m_zoomOutBaseLevel)) + setZoomLevel(zoomValue); + + } +} + +// ----------------------------------------------------------------------------- +// handlePinchGestureExitL +// ----------------------------------------------------------------------------- +void WebPagePinchZoomHandler::handlePinchGestureExitL(const TStmGestureEvent& aGesture) +{ + m_zoomOutBaseLevel = 0; + m_zoomStepSize = 0; + m_pinchCenterSet = false; + if (!m_bitmapUpdateTimer->IsActive()) + m_bitmapUpdateTimer->Start( KBitmapUpdateTimeout,KBitmapUpdateTimeout,TCallBack(&pinchBitmapUpdateTimerCb,this)); + + if (!m_pinchExitWaitTimer->IsActive()) + m_pinchExitWaitTimer->Start( KPinchExitWaitTimeout,0,TCallBack(&pinchExitWaitTimerCb,this)); + +} + +// ----------------------------------------------------------------------------- +// setZoomLevel +// ----------------------------------------------------------------------------- +void WebPagePinchZoomHandler::setZoomLevel(int zoomLevel) +{ + m_webView->setPinchBitmapZoomLevel(zoomLevel); +} + +// ----------------------------------------------------------------------------- +// isPinchActive +// ----------------------------------------------------------------------------- +TBool WebPagePinchZoomHandler::isPinchActive() +{ + bool pinchActive = false; + if (m_pinchActive == true || m_pinchExitWaitTimer->IsActive()) + pinchActive = true; + + return pinchActive; + +} + +// ----------------------------------------------------------------------------- +// updateBitmap +// ----------------------------------------------------------------------------- +void WebPagePinchZoomHandler::updateBitmap(void) +{ + m_bitmapUpdateTimer->Cancel(); + m_webView->restoreZoomLevel(m_webView->scalingFactor()); +} + +// ----------------------------------------------------------------------------- +// handlepinchExitWaitTimer +// ----------------------------------------------------------------------------- +void WebPagePinchZoomHandler::handlepinchExitWaitTimer(void) +{ + m_pinchExitWaitTimer->Cancel(); +} + +// ----------------------------------------------------------------------------- +// pinchBitmapUpdateTimerCb +// ----------------------------------------------------------------------------- +int pinchBitmapUpdateTimerCb(void* ptr) +{ + ((WebPagePinchZoomHandler*)ptr)->updateBitmap(); + return 0; +} + +// ----------------------------------------------------------------------------- +// pinchExitWaitTimerCb +// ----------------------------------------------------------------------------- +int pinchExitWaitTimerCb(void* ptr) +{ + ((WebPagePinchZoomHandler*)ptr)->handlepinchExitWaitTimer(); + return 0; +} + +// End of File + + diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/osswebengine/webkit/s60/webview/WebPagePinchZoomHandler.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/osswebengine/webkit/s60/webview/WebPagePinchZoomHandler.h Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,125 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Implements pinch functionality +* +*/ + + + +#ifndef WEBPAGEPINCHZOOMHANDLER_H +#define WEBPAGEPINCHZOOMHANDLER_H + +// INCLUDES +#include +#include +#include +#include + +// MACROS + +// FORWARD DECLARATIONS +class WebView; + + +// CLASS DECLARATION +class WebPagePinchZoomHandler: public CBase { +public: // Constructor and destructor + + /** + * Two-phased constructor. + **/ + static WebPagePinchZoomHandler* NewL(WebView* webView); + + /** + * Destructor. + **/ + virtual ~WebPagePinchZoomHandler(); + +private: // Constructors + + /** + * C++ default constructor. + **/ + WebPagePinchZoomHandler(WebView* webView); + + /** + * By default Symbian 2nd phase constructor is private. + **/ + void constructL(); + +public: // New functions + + /** + * Handler for Pinch event + **/ + void handlePinchGestureEventL(const TStmGestureEvent& aGesture); + + /** + * Handler for PinchEnter event + **/ + void handlePinchGestureL(const TStmGestureEvent& aGesture); + + /** + * Handler for PinchExit event + **/ + void handlePinchGestureExitL(const TStmGestureEvent& aGesture); + + /** + * to set the zoom level for bitmap zooming + **/ + void setZoomLevel(TInt zoomLevel); + + /** + * to update the bitmap + **/ + void updateBitmap(); + + /** + * to get the pinch step size corresponding to a pinch gesture + **/ + TInt getPinchZoomStepSize(); + + /** + * to query whether pinch is active: + * pinch is active once GestureEnter for pinch is received. And it is active until the pinch expiry timer gets expired + **/ + TBool isPinchActive(); + + /** + * handler for pinch exit timer expiry + **/ + void handlepinchExitWaitTimer(); + + /** + * To get the pinch center + **/ + TPoint pinchCenter() {return m_pinchCenter;}; + +private: + + WebView* m_webView; // <> + CPeriodic* m_bitmapUpdateTimer; // <> + CPeriodic* m_pinchExitWaitTimer; // <> + TInt m_pinchFactor; + int m_zoomOutBaseLevel; + bool m_pinchCenterSet; + TInt m_zoomStepSize; + bool m_pinchActive; + TPoint m_pinchCenter; + +}; + +#endif //WEBPAGEPINCHZOOMHANDLER_H + +// End of File diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/pagescaler/group/minimap.mmp --- a/webengine/pagescaler/group/minimap.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/pagescaler/group/minimap.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -15,9 +15,8 @@ * */ - #include -#include +#include TARGET pagescaler.dll TARGETTYPE dll @@ -40,9 +39,8 @@ USERINCLUDE ../inc MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE -SYSTEMINCLUDE ../../osswebengine/memorymanager/inc - +OS_LAYER_ESTLIB_SYSTEMINCLUDE +// SYSTEMINCLUDE ../../osswebengine/memorymanager/inc LIBRARY euser.lib LIBRARY cone.lib @@ -53,5 +51,3 @@ LIBRARY BitmapTransforms.lib LIBRARY MemMan.lib - - diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/pagescaler/src/minimap.cpp --- a/webengine/pagescaler/src/minimap.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/pagescaler/src/minimap.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -118,10 +118,10 @@ void CMinimap::ConstructL() { iGenerator = CMinimapGenerator::NewL(*this); - iUpdateCbTimer = CMinimapTimer::NewL(*this, &UpdateCbTimerCbL, CActive::EPriorityStandard - 1 ); - iUpdateTimer = CMinimapTimer::NewL(*this, &UpdateTimerCbL); - iVisibilityTimer = CMinimapTimer::NewL(*this, &VisibilityTimerCbL); - iFadeTimer = CMinimapTimer::NewL(*this, &UpdateTransparency); + iUpdateCbTimer = CMinimapTimer::NewL(*this, &CMinimap::UpdateCbTimerCbL, CActive::EPriorityStandard - 1 ); + iUpdateTimer = CMinimapTimer::NewL(*this, &CMinimap::UpdateTimerCbL); + iVisibilityTimer = CMinimapTimer::NewL(*this, &CMinimap::VisibilityTimerCbL); + iFadeTimer = CMinimapTimer::NewL(*this, &CMinimap::UpdateTransparency); SetRelativePosition(KDefaultOffsetX,KDefaultOffsetY,KDefaultPosition); } diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/pagescaler/src/minimapgenerator.cpp --- a/webengine/pagescaler/src/minimapgenerator.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/pagescaler/src/minimapgenerator.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -47,7 +47,7 @@ // MODULE DATA STRUCTURES #ifdef __OOM__ -#include +#include "oom.h" class CMinimapOOMCollector : public CBase, MMemoryCollector { diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/HistoryProvider/HistoryController.cpp --- a/webengine/webkitutils/HistoryProvider/HistoryController.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/webkitutils/HistoryProvider/HistoryController.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -18,11 +18,12 @@ // INCLUDE FILES #include <../bidi.h> +#include + #include "HistoryController.h" -#include "BrCtlDefs.h" +#include #include "HistoryView.h" #include "HistoryEntry.h" -#include "BrCtlDialogsProvider.h" // EXTERNAL DATA STRUCTURES diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/HistoryProvider/HistoryController.h --- a/webengine/webkitutils/HistoryProvider/HistoryController.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/webkitutils/HistoryProvider/HistoryController.h Mon Mar 29 12:27:15 2010 +0100 @@ -21,7 +21,7 @@ // INCLUDES #include -#include +#include #include "HistoryInterface.h" // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/SqliteSymbian/keywordhash.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/SqliteSymbian/parse.h diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/SqliteSymbian/printf.c diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/SqliteSymbian/sqliteInt.h --- a/webengine/webkitutils/SqliteSymbian/sqliteInt.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/webkitutils/SqliteSymbian/sqliteInt.h Mon Mar 29 12:27:15 2010 +0100 @@ -65,7 +65,7 @@ #include #include #include -#include +#include /* ** If compiling for a processor that lacks floating point support, @@ -1881,3 +1881,4 @@ #endif #endif + diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/ToolBar/ToolBar.cpp --- a/webengine/webkitutils/ToolBar/ToolBar.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/webkitutils/ToolBar/ToolBar.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - // INCLUDE FILES #include #include @@ -31,11 +30,9 @@ #include "ToolBar.h" #include "ToolBarButton.h" -#include "BrCtlDefs.h" #include "eikon.hrh" - // EXTERNAL DATA STRUCTURES // EXTERNAL FUNCTION PROTOTYPES diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/ToolBar/ToolBar.h --- a/webengine/webkitutils/ToolBar/ToolBar.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/webkitutils/ToolBar/ToolBar.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #ifndef __TOOLBAR #define __TOOLBAR @@ -27,7 +26,7 @@ #include #include #include -#include "BrCtlDefs.h" +#include #include #include // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/ToolBar/ToolBarButton.cpp --- a/webengine/webkitutils/ToolBar/ToolBarButton.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/webkitutils/ToolBar/ToolBarButton.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -22,11 +22,11 @@ #include "ToolBarButton.h" #include "ToolBar.h" #include "W32STD.H" -#include "RecentUrlStore.h" +#include #include #include #include -#include "BrCtlInterface.h" +#include #include #include #include @@ -34,7 +34,6 @@ #include "eikon.hrh" - // EXTERNAL DATA STRUCTURES // EXTERNAL FUNCTION PROTOTYPES diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/group/WebKitUtils.mmp --- a/webengine/webkitutils/group/WebKitUtils.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/webkitutils/group/WebKitUtils.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - TARGET webkitutils.dll TARGETTYPE dll UID 0x1000008D 0x2000B19D @@ -23,7 +22,7 @@ #include #include #include -#include +#include #include "SqliteMacros.mmpi" @@ -108,8 +107,8 @@ USERINCLUDE ../SqliteSymbian MW_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE ../../../inc -MW_LAYER_LIBC_SYSTEMINCLUDE +OS_LAYER_ESTLIB_SYSTEMINCLUDE +// SYSTEMINCLUDE ../../../inc LIBRARY estlib.lib LIBRARY euser.lib @@ -132,3 +131,4 @@ LIBRARY eikcore.lib LIBRARY eikcoctl.lib LIBRARY MemMan.lib + diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/group/bld.inf --- a/webengine/webkitutils/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/webkitutils/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -16,10 +16,10 @@ */ #include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" #ifdef BRDO_USE_GESTURE_HELPER -#include "../rt_gesturehelper/group/bld.inf" +#include "../stmgesturefw/group/bld.inf" #endif PRJ_PLATFORMS diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/rt_gesturehelper/bwins/rt_gesturehelperu.def --- a/webengine/webkitutils/rt_gesturehelper/bwins/rt_gesturehelperu.def Wed Jan 13 15:52:45 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ -EXPORTS - ??1CGestureHelper@RT_GestureHelper@@UAE@XZ @ 1 NONAME ; RT_GestureHelper::CGestureHelper::~CGestureHelper(void) - ?Cancel@CGestureHelper@RT_GestureHelper@@QAEXXZ @ 2 NONAME ; void RT_GestureHelper::CGestureHelper::Cancel(void) - ?HandlePointerEventL@CGestureHelper@RT_GestureHelper@@QAEHABUTPointerEvent@@@Z @ 3 NONAME ; int RT_GestureHelper::CGestureHelper::HandlePointerEventL(struct TPointerEvent const &) - ?IsDoubleTapEnabled@CGestureHelper@RT_GestureHelper@@QBEHXZ @ 4 NONAME ; int RT_GestureHelper::CGestureHelper::IsDoubleTapEnabled(void) const - ?IsHoldingEnabled@CGestureHelper@RT_GestureHelper@@QBEHXZ @ 5 NONAME ; int RT_GestureHelper::CGestureHelper::IsHoldingEnabled(void) const - ?NewL@CGestureHelper@RT_GestureHelper@@SAPAV12@AAVMGestureObserver@2@@Z @ 6 NONAME ; class RT_GestureHelper::CGestureHelper * RT_GestureHelper::CGestureHelper::NewL(class RT_GestureHelper::MGestureObserver &) - ?SetDoubleTapEnabled@CGestureHelper@RT_GestureHelper@@QAEXH@Z @ 7 NONAME ; void RT_GestureHelper::CGestureHelper::SetDoubleTapEnabled(int) - ?SetHoldingEnabled@CGestureHelper@RT_GestureHelper@@QAEXH@Z @ 8 NONAME ; void RT_GestureHelper::CGestureHelper::SetHoldingEnabled(int) - diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/rt_gesturehelper/eabi/rt_gesturehelperu.def --- a/webengine/webkitutils/rt_gesturehelper/eabi/rt_gesturehelperu.def Wed Jan 13 15:52:45 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ -EXPORTS - _ZN16RT_GestureHelper14CGestureHelper17SetHoldingEnabledEi @ 1 NONAME - _ZN16RT_GestureHelper14CGestureHelper19HandlePointerEventLERK13TPointerEvent @ 2 NONAME - _ZN16RT_GestureHelper14CGestureHelper19SetDoubleTapEnabledEi @ 3 NONAME - _ZN16RT_GestureHelper14CGestureHelper4NewLERNS_16MGestureObserverE @ 4 NONAME - _ZN16RT_GestureHelper14CGestureHelper6CancelEv @ 5 NONAME - _ZN16RT_GestureHelper14CGestureHelperD0Ev @ 6 NONAME - _ZN16RT_GestureHelper14CGestureHelperD1Ev @ 7 NONAME - _ZN16RT_GestureHelper14CGestureHelperD2Ev @ 8 NONAME - _ZNK16RT_GestureHelper14CGestureHelper16IsHoldingEnabledEv @ 9 NONAME - _ZNK16RT_GestureHelper14CGestureHelper18IsDoubleTapEnabledEv @ 10 NONAME - diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/rt_gesturehelper/group/bld.inf --- a/webengine/webkitutils/rt_gesturehelper/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* -* Copyright (c) 2008 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 "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Build information -* -*/ - - - -#include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -../rom/rt_gesturehelper.iby CORE_MW_LAYER_IBY_EXPORT_PATH(rt_gesturehelper.iby) - -PRJ_MMPFILES - -#ifndef __S60_32__ -rt_gesturehelper.mmp -#endif - -PRJ_TESTMMPFILES -#ifndef __S60_32__ -//#include "../test/group/bld.inf" -#endif diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/rt_gesturehelper/group/rt_gesturehelper.mmp --- a/webengine/webkitutils/rt_gesturehelper/group/rt_gesturehelper.mmp Wed Jan 13 15:52:45 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2008 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 "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project definition file -* -*/ - - - -#include - -TARGET rt_gesturehelper.dll -TARGETTYPE dll -UID 0x1000008D 0x200212EA - -CAPABILITY CAP_CLIENT_DLL -VENDORID VID_DEFAULT - -USERINCLUDE ../inc -MW_LAYER_SYSTEMINCLUDE - -SOURCEPATH ../src - -SOURCE gesture.cpp -SOURCE gesturehelper.cpp -SOURCE gesturehelperimpl.cpp -SOURCE gesturerecogniser.cpp -SOURCE pointarray.cpp -SOURCE utils.cpp -SOURCE gestureeventfilter.cpp -SOURCE gesturehelpereventsender.cpp - -LIBRARY avkon.lib -LIBRARY cone.lib -LIBRARY euser.lib -LIBRARY gdi.lib -LIBRARY flogger.lib diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/rt_gesturehelper/rom/rt_gesturehelper.iby --- a/webengine/webkitutils/rt_gesturehelper/rom/rt_gesturehelper.iby Wed Jan 13 15:52:45 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 2008-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 "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: RT Gesture helper iby file -* -*/ - - -#ifndef _RT_GESTUREHELPER_IBY_ -#define _RT_GESTUREHELPER_IBY_ - -#include - -#ifdef BRDO_USE_GESTURE_HELPER - -#include - -file=ABI_DIR\BUILD_DIR\rt_gesturehelper.dll SHARED_LIB_DIR\rt_gesturehelper.dll - -#endif // BRDO_USE_GESTURE_HELPER - -#endif // _RT_GESTUREHELPER_IBY_ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/rt_gesturehelper/src/gesture.cpp --- a/webengine/webkitutils/rt_gesturehelper/src/gesture.cpp Wed Jan 13 15:52:45 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,726 +0,0 @@ -/* -* Copyright (c) 2008-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 "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Gesture class -* -*/ - - -#include "gesture.h" - -#include -#include - -#include "gesturedefs.h" -#include "utils.h" - -using namespace RT_GestureHelper; - -/** - * Point array for which only x axis is relevant - */ -class TXAxisPointArray : public TPointArray - { -public: - TXAxisPointArray( const RArray< TPointEntry >& aPoints ) - : TPointArray( aPoints ) {} - - // from TPointArray - TPoint operator[]( TInt aIndex ) const - { - return TPoint( Raw( aIndex ).iX, 0 ); - } - }; - -/** - * Point array for which only y axis is relevant - */ -class TYAxisPointArray : public TPointArray - { -public: - TYAxisPointArray( const RArray< TPointEntry >& aPoints ) - : TPointArray( aPoints ) {} - - // from TPointArray - TPoint operator[]( TInt aIndex ) const - { - return TPoint( 0, Raw( aIndex ).iY ); - } - }; - -namespace - { - /** @return the current time */ - TTime CurrentTime() - { - TTime time; - time.HomeTime(); - return time; - } - - /** - * @param aRelevantAxis See @ref MGestureEvent::Code - * @return gesture code by analysing the sequence of points - */ - TGestureCode CodeFromPoints( const RArray< TPointEntry >& aPoints, - TAxis aRelevantAxis ) - { - // select the correct filter based on aRelevantAxis - // these filter_ objects are array decorators that will eliminate either - // x, y or neither coordinate of each point - TXAxisPointArray filterY( aPoints ); - TYAxisPointArray filterX( aPoints ); - TPointArray filterNone( aPoints ); - TPointArray& filter = - aRelevantAxis == EAxisHorizontal ? static_cast< TPointArray& >( filterY ) : - aRelevantAxis == EAxisVertical ? static_cast< TPointArray& >( filterX ) : - /* otherwise EAxisBoth */ filterNone; - - // currently the gesture recogniser does not have any state, so it is fast - // to instantiate. The call is not static however, to allow the recogniser - // to be replaced by a more complicated implementation that has state. - // then it may make sense to make the recogniser a member variable. - return TGestureRecogniser().GestureCode( filter ); - } - } // unnamed namespace - -// ---------------------------------------------------------------------------- -// destructor -// ---------------------------------------------------------------------------- -// -CGesture::~CGesture() - { - iPoints.Close(); - } - -// ---------------------------------------------------------------------------- -// AsStartEventL -// ---------------------------------------------------------------------------- -// -CGesture* CGesture::AsStartEventLC() const - { - __ASSERT_DEBUG( 0 < iPoints.Count(), Panic( EGesturePanicIllegalLogic ) ); - CGesture* gesture = new ( ELeave ) CGesture; - CleanupStack::PushL( gesture ); - User::LeaveIfError( gesture->AddPoint( iPoints[0].iPos, CCoeEnv::Static()->LastEvent().Time())); - return gesture; - } - -// ---------------------------------------------------------------------------- -// Reset -// ---------------------------------------------------------------------------- -// -void CGesture::Reset() - { - iPoints.Reset(); - iHoldingState = ENotHolding; - iState = ENotComplete; - iHoldingPointIndex = 0; - iIsDoubleTap = EFalse; - iIsLongTap = EFalse; - } - -// ---------------------------------------------------------------------------- -// Reset -// ---------------------------------------------------------------------------- -// -TBool CGesture::IsEmpty() const - { - return iPoints.Count() == 0; - } - -// ---------------------------------------------------------------------------- -// Add a point to the sequence of points that together make up the gesture -// ---------------------------------------------------------------------------- -// -TInt CGesture::AddPoint( const TPoint& aPoint, const TTime& aEventTime ) - { - if ( !IsLatestPoint( aPoint ) ) - { - return iPoints.Append( TPointEntry( aPoint, aEventTime ) ); - } - return KErrNone; - } - -// ---------------------------------------------------------------------------- -// SetVisual -// ---------------------------------------------------------------------------- -// - - -// ---------------------------------------------------------------------------- -// IsNearHoldingPoint -// ---------------------------------------------------------------------------- -// -TBool CGesture::IsNearHoldingPoint( const TPoint& aPoint ) const - { - return ToleranceRect( iPoints[ iHoldingPointIndex ].iPos ).Contains( aPoint ); - } - -// ---------------------------------------------------------------------------- -// IsLatestPoint -// ---------------------------------------------------------------------------- -// -TBool CGesture::IsLatestPoint( const TPoint& aPoint ) const - { - if ( iPoints.Count() > 0 ) - { - return aPoint == CurrentPos(); - } - return EFalse; - } - -// ---------------------------------------------------------------------------- -// StartHolding -// ---------------------------------------------------------------------------- -// -void CGesture::StartHolding() - { - iHoldingState = EHoldStarting; - - // remove all points that were introduced after holding started - for ( TInt i = iPoints.Count() - 1; i > iHoldingPointIndex; i-- ) - { - iPoints.Remove( i ); - } - } - -// ---------------------------------------------------------------------------- -// SetHoldingPoint -// ---------------------------------------------------------------------------- -// -void CGesture::SetHoldingPoint() - { - iHoldingPointIndex = iPoints.Count() - 1; - } - -// ---------------------------------------------------------------------------- -// ContinueHolding -// ---------------------------------------------------------------------------- -// -void CGesture::ContinueHolding() - { - iHoldingState = EHolding; - } - -// ---------------------------------------------------------------------------- -// SetReleased -// ---------------------------------------------------------------------------- -// -void CGesture::SetReleased() - { - // IsMovementStopped expects SetComplete to be called before SetRelea - __ASSERT_DEBUG( EComplete == iState, Panic( EGesturePanicIllegalLogic ) ); - iState = EReleased; - } - -/** - * @return elapsed time between aStartTime and aEndTime - */ -inline TTimeIntervalMicroSeconds32 Elapsed( const TTime& aStartTime, - const TTime& aEndTime ) - { - return aEndTime.MicroSecondsFrom( aStartTime ).Int64(); - } - -// ---------------------------------------------------------------------------- -// SetComplete -// ---------------------------------------------------------------------------- -// -void CGesture::SetComplete() - { - __ASSERT_DEBUG( iPoints.Count() > 0, Panic( EGesturePanicIllegalLogic ) ); - iState = EComplete; - iCompletionTime = CurrentTime(); - } - -// ---------------------------------------------------------------------------- -// SetComplete -// ---------------------------------------------------------------------------- -// -void CGesture::SetCancelled() - { - iState = ECancelled; - } - -void CGesture::SetDoubleTap() - { - iIsDoubleTap = ETrue; - } - -void CGesture::SetLongTap(TBool aLongTap) - { - iIsLongTap = aLongTap; - } - -// ---------------------------------------------------------------------------- -// IsTap -// ---------------------------------------------------------------------------- -// -TBool CGesture::IsTap() const - { - return CodeFromPoints( iPoints, EAxisBoth ) == EGestureTap; - } - -/** - * Translates a non-holding code into a holding code - * @param aCode original gesture code - * @return a gesture code with hold flag applied - */ -inline TGestureCode Hold( TGestureCode aCode ) - { - if ( aCode != EGestureStart && - aCode != EGestureDrag && - aCode != EGestureReleased && - aCode != EGestureUnknown ) - { - return static_cast< TGestureCode >( aCode | EFlagHold ); - } - return aCode; - } - -// ---------------------------------------------------------------------------- -// Code -// ---------------------------------------------------------------------------- -// -TGestureCode CGesture::Code( TAxis aRelevantAxis ) /* const */ - { - TGestureCode code; - - switch ( iState ) - { - case ENotComplete: - { - // "start" event if only first point received - // need to check that not holding, in case user pressed stylus - // down, and activated holding without moving the stylus - if ( iPoints.Count() == 1 && !IsHolding() ) - { - code = EGestureStart; - } - // "drag" event if holding not started or holding started earlier - else if ( iHoldingState != EHoldStarting ) - { - code = EGestureDrag; - } - // holding was just started - else - { - code = Hold( CodeFromPoints( iPoints, aRelevantAxis ) ); - } - iPrevGestureCode = code; - break; - } - case EComplete: - { - if ( iIsDoubleTap ) - { - code = EGestureDoubleTap; - } - else if ( iIsLongTap ) - { - code = EGestureLongTap; - } - - else if (iPrevGestureCode == EGestureDrag) - { - //code = IsFlick() ? EGestureFlick : EGestureDrop; - if (IsFlick()) - { - code = EGestureFlick ; - } - else - { - // Check if it is a swipe. In this case a swipe is a gesture where - // - the direction is close to the axes (up, down, left, right) - // - speed is slower than flick - code = CodeFromPoints( iPoints, aRelevantAxis ); - if (code == EGestureUnknown) - { - code = EGestureDrop ; // It was not a swipe, so then it is the drop gesture - } - } - } - else - { - code = CodeFromPoints( iPoints, aRelevantAxis ); - } - iPrevGestureCode = code; - break; - } - - case EReleased: - { - code = EGestureReleased; - break; - } - - case ECancelled: // fallthrough - default: - code = EGestureUnknown; - } - return code; - } - - -TBool CGesture::IsFlick() const - { - bool flick = EFalse; - TRealPoint speed = Speed(); - TReal32 xSpeed = speed.iX; - TReal32 ySpeed = speed.iY; - - flick = (Abs(xSpeed) > KFlickSpeed || - Abs(ySpeed) > KFlickSpeed); - - return flick; - } - -// ---------------------------------------------------------------------------- -// IsHolding -// ---------------------------------------------------------------------------- -// -TBool CGesture::IsHolding() const - { - return iHoldingState >= EHoldStarting; - } - -// ---------------------------------------------------------------------------- -// StartPos -// ---------------------------------------------------------------------------- -// -TPoint CGesture::StartPos() const - { - // at least one point will be in the array during callback (pointer down pos) - return iPoints[ 0 ].iPos; - } - -// ---------------------------------------------------------------------------- -// CurrentPos -// ---------------------------------------------------------------------------- -// -TPoint CGesture::CurrentPos() const - { - // at least on point will be in the array during callback (pointer down pos) - return iPoints.Count() > 0 ? iPoints[ iPoints.Count() - 1 ].iPos : TPoint(-1, -1); - } - -// ---------------------------------------------------------------------------- -// IsMovementStopped -// ---------------------------------------------------------------------------- -// -inline TBool CGesture::IsMovementStopped() const - { - // iCompletionTime is only only valid if client has called SetComplete - if ( iState >= EComplete ) - { - TInt el = Elapsed( NthLastEntry( 1 ).iTime, iCompletionTime ).Int(); - return el > KSpeedStopTime; - } - return EFalse; - } - -namespace - { - const TInt KFloatingPointAccuracy = 0.000001; - - /** @return percentage (0.0-1.0) how far aPos is from aEdge1 towards aEdge2 */ - inline TReal32 Proportion( TReal32 aPos, TReal32 aEdge1, TReal32 aEdge2 ) - { - if ( Abs( aEdge2 - aEdge1 ) > KFloatingPointAccuracy ) - { - return ( aPos - aEdge1 ) / ( aEdge2 - aEdge1 ); - } - return 0; // avoid division by zero - } - - /** Edges (pixels) at which speed should be -100% or 100% */ - NONSHARABLE_STRUCT( TEdges ) - { - TReal32 iMin; - TReal32 iMax; - }; - - /** - * scale which allows different (coordinate -> percentage) mapping - * between -100% to 0% and 0 and 100% - */ - NONSHARABLE_STRUCT( TScale ) - { - TScale( TInt aZero, const TEdges& aEdges ) - : iMin( aEdges.iMin ), iZero( aZero ), iMax( aEdges.iMax ) - { - } - - /** @return aPos as a percentage between -100% and 100% in aScale */ - TReal32 Percent( TReal32 aPos ) const; - - /// coordinate where speed is -100% - TReal32 iMin; - /// coordinate where speed is 0% - TReal32 iZero; - /// coordinate where speed is 100% - TReal32 iMax; - }; - - /** @convert aPos into a percentage between -100% and 100% in aScale */ - TReal32 TScale::Percent( TReal32 aPos ) const - { - TReal32 percent; - if ( aPos < iZero ) - { - // return negative percentages on the lower side of zero point - percent = -1 * Proportion( aPos, iZero, iMin ); - } - else - { - percent = Proportion( aPos, iZero, iMax ); - } - // constrain between -100% and 100% - return Min( Max( percent, -1.0F ), 1.0F ); - } - - /** Scale in x and y dimensions */ - NONSHARABLE_STRUCT( TScale2D ) - { - TRealPoint Percent( const TPoint& aPos ) const - { - return TRealPoint( iX.Percent( aPos.iX ), - iY.Percent( aPos.iY ) ); - } - - TScale iX; - TScale iY; - }; - - enum TDirection { ESmaller, ELarger }; - - /** @return the direction of pos compared to the previous pos */ - inline TDirection Direction( TInt aPos, TInt aPreviousPos ) - { - return aPos < aPreviousPos ? ESmaller : ELarger; - } - - /** Direction in x and y dimensions */ - NONSHARABLE_STRUCT( TDirection2D ) - { - TDirection iX; - TDirection iY; - }; - - /** Return the direction (up/down) of signal at aIndex */ - inline TDirection2D Direction( TInt aIndex, const RArray< TPointEntry >& aPoints ) - { - const TPoint& pos = aPoints[ aIndex ].iPos; - const TPoint& prevPos = aPoints[ aIndex - 1 ].iPos; - TDirection2D dir = { Direction( pos.iX, prevPos.iX ), - Direction( pos.iY, prevPos.iY ) }; - return dir; - } - /** - * @return a position in the aLow and aHigh, so that it aProportion of - * of length is above the pos - */ - TReal32 ProportionalLength( TReal32 aLow, TReal32 aHigh, TReal32 aProportion ) - { - return ( aHigh - aLow ) * aProportion / ( 1 + aProportion ); - } - - /** - * @return aVariableEdge scaled to new position, when the other edge changes - * from aOldEdge to aNewEdge, so that aOrigin maintains the *same relative - * position* between aVariableEdge and the other edge - */ - inline TReal32 ScaledEdge( TReal32 aOrigin, TReal32 aVariableEdge, - TReal32 aOldEdge, TReal aNewEdge ) - { - TReal32 proportion = Proportion( aOrigin, aVariableEdge, aOldEdge ); - return ( proportion * aNewEdge - aOrigin ) / ( proportion - 1 ); - } - - TScale Rescale( TReal32 aPos, TDirection aDir, TDirection aPrevDir, - const TScale& aPrevScale, const TEdges& aEdges ) - { - TScale scale( aPrevScale ); - if ( aPrevDir != aDir ) - { - // the code duplication is accepted here, since it is difficult to factor out - // while maintaining the understandability of this anyway complex algorithm - if ( aDir == ESmaller ) - { - scale.iMin = aEdges.iMin; - if ( aPrevScale.iZero < aPos ) - { - TReal32 proportionAboveZero = Proportion( aPos, aPrevScale.iZero, aPrevScale.iMax ); - scale.iZero = aPos - ProportionalLength( aEdges.iMin, aPos, proportionAboveZero ); - } - else - { - // adjust zero pos so that proportion between aPos, Min, and Zero pos - // stay the same (Min will move to 0, aPos stays the same) - scale.iZero = ScaledEdge( aPos, aPrevScale.iZero, - aPrevScale.iMin, aEdges.iMin ); - } - // adjust the upper edge to take into account the movement of zero pos - scale.iMax = ScaledEdge( aPos, aPrevScale.iMax, - aPrevScale.iZero, scale.iZero ); - } - else // ELarger - { - scale.iMax = aEdges.iMax; - if ( aPos < aPrevScale.iZero ) - { - TReal32 proportionBelowZero = Proportion( aPos, aPrevScale.iZero, aPrevScale.iMin ); - scale.iZero = aPos + ProportionalLength( aPos, aEdges.iMax, proportionBelowZero ); - } - else - { - // adjust zero pos so that proportion between aPos, Max, and Zero pos - // stay the same (Max will move edge, aPos stays the same) - scale.iZero = ScaledEdge( aPos, aPrevScale.iZero, - aPrevScale.iMax, aEdges.iMax ); - } - // adjust the lower edge to take into account the movement of zero pos - scale.iMin = ScaledEdge( aPos, aPrevScale.iMin, - aPrevScale.iZero, scale.iZero ); - } - } - return scale; - } - - /** Edges in x and y dimensions */ - NONSHARABLE_STRUCT( TEdges2D ) - { - TEdges iX; - TEdges iY; - }; - - /** - * @param aEdges edges of the area in which gesture points are accepted - * @return the scale of latest point in the list of points - */ - TScale2D Scale( const RArray< TPointEntry >& aPoints, const TEdges2D& aEdges ) - { - TScale2D scale = { TScale( aPoints[0].iPos.iX, aEdges.iX ), - TScale( aPoints[0].iPos.iY, aEdges.iY ) }; - TInt count = aPoints.Count(); - if ( count > 1 ) - { - // iterate the whole point list to arrive to the current scale - TDirection2D dir( Direction( 1, aPoints ) ); - for ( TInt i = 1; i < count; i++ ) - { - // get direction at i - TDirection2D newDir( Direction( i, aPoints ) ); - // get new scale at i - scale.iX = Rescale( aPoints[i - 1].iPos.iX, newDir.iX, dir.iX, scale.iX, aEdges.iX ); - scale.iY = Rescale( aPoints[i - 1].iPos.iY, newDir.iY, dir.iY, scale.iY, aEdges.iY ); - dir = newDir; - } - } - return scale; - } - } // unnamed namespace - -TRealPoint CGesture::SpeedPercent( const TRect& aEdges ) const - { - // x and y coordinates are easier to handle separately, extract from TRect: - // ((iMinX, iMinY), (iMaxX, iMaxY)) -> ((iMinX, iMaxX), (iMinY, iMaxY)) - TEdges2D edges = { { aEdges.iTl.iX, aEdges.iBr.iX }, - { aEdges.iTl.iY, aEdges.iBr.iY } }; - // work out the current scale (coordinate -> percentage mapping) from - // the history of points (i.e., points of current gesture). Then - // calculate the percentage of the current position. - return Scale( iPoints, edges ).Percent( CurrentPos() ); - } - -// ---------------------------------------------------------------------------- -// Speed -// ---------------------------------------------------------------------------- -// -TRealPoint CGesture::Speed() const - { - const TReal32 KMicroSecondsInSecond = 1000000; - - // Speed is only evaluated at the end of the swipe - // if user stops at the end of the swipe before lifting stylus, - // speed is zero. If time is zero, return 0 speed (infinite does - // not make sense either). Will need to consider also earlier points - // and their times or start time, if this zero-speed behavior is a problem - TRealPoint speed; - TReal32 time = static_cast( TimeFromPreviousPoint().Int() ) - / KMicroSecondsInSecond; - if ( !IsMovementStopped() && time > 0 ) - { - TPoint distance = CurrentPos() - PreviousPos(); - speed.iX = static_cast( distance.iX ) / time; - speed.iY = static_cast( distance.iY ) / time; - } - return speed; - } - -// ---------------------------------------------------------------------------- -// Distance -// ---------------------------------------------------------------------------- -// -TPoint CGesture::Distance() const - { - return CurrentPos() - StartPos(); - } - -// ---------------------------------------------------------------------------- -// Visual -// ---------------------------------------------------------------------------- -// - -// ---------------------------------------------------------------------------- -// TimeFromPreviousPoint -// ---------------------------------------------------------------------------- -// -inline TTimeIntervalMicroSeconds32 CGesture::TimeFromPreviousPoint() const - { - const TInt KLatestEntryOffset = 1; - return Elapsed( PreviousEntry().iTime, NthLastEntry( KLatestEntryOffset ).iTime ); - } - -// ---------------------------------------------------------------------------- -// return nth point from the end of the points array -// ---------------------------------------------------------------------------- -// -inline const TPointEntry& CGesture::NthLastEntry( TInt aOffset ) const - { - return iPoints[ Max( iPoints.Count() - aOffset, 0 ) ]; - } - -// ---------------------------------------------------------------------------- -// PreviousEntry -// ---------------------------------------------------------------------------- -// -inline const TPointEntry& CGesture::PreviousEntry() const - { - return NthLastEntry( KPreviousPointOffset ); - } - -// ---------------------------------------------------------------------------- -// PreviousPos -// ---------------------------------------------------------------------------- -// -inline TPoint CGesture::PreviousPos() const - { - return PreviousEntry().iPos; - } - -inline TTime CGesture::TimeOfLastEntry() const - { - return NthLastEntry( 1 ).iTime; - } diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/rt_gesturehelper/src/gesture.h --- a/webengine/webkitutils/rt_gesturehelper/src/gesture.h Wed Jan 13 15:52:45 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,196 +0,0 @@ -/* -* Copyright (c) 2008-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 "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Gesture class -* -*/ - - -#ifndef _GESTURE_H_ -#define _GESTURE_H_ - -#include - -#include "rt_gestureobserver.h" -#include "gesturerecogniser.h" -#include "pointarray.h" - -namespace RT_GestureHelper -{ - - -enum TEventState - { - ENoEvent = 0, - ETouchDown, - ETouchUp, - EMove, - ELongTouchDown - }; - -/** - * TGesture represents the gesture that the user has made. - * Implements MGestureEvent interface to allow clients to - * inspect the gesture - */ -NONSHARABLE_CLASS( CGesture ) : public CBase - { -public: - /** destructor */ - ~CGesture(); - - /** - * @return a new gesture that will have only the first point - * of this gesture. Can be used to create gesture's a "start" event - * after some other points have been received. - */ - CGesture* AsStartEventLC() const; - - /** - * Sets the gesture as empty. resets timers to receive points - * immediately - */ - void Reset(); - - /** @return ETrue if the gesture has no points */ - TBool IsEmpty() const; - - /** - * Add a point to the sequence of points that forms the gesture - * Call Reset() just before adding the first point - * @param aPoint the point to add - * @return error code - */ - TInt AddPoint( const TPoint& aPoint, const TTime& eventtime); - - /** Set the visual of this gesture. Should be called when gesture starts */ - - /** @return ETrue if the point is very near the holding point */ - TBool IsNearHoldingPoint( const TPoint& aPoint ) const; - /** Set the latest point as the holding point */ - void SetHoldingPoint(); - /** @return ETrue if aPoint is the same as point added last */ - TBool IsLatestPoint( const TPoint& aPoint ) const; - - /** - * After call, Code(...) will return appropriate holding gesture code. - */ - void StartHolding(); - /** - * After call, Code(...) will return a "hold released" gesture code when - * the gesture is completed. Meanwhile, code will be drag. - */ - void ContinueHolding(); - /** Set as stylus released */ - void SetReleased(); - /** Set the gesture as complete. Gesture is completed at pointer up */ - void SetComplete(); - /** After call, Code(...) will return a "cancelled" gesture code */ - void SetCancelled(); - - /** force returning a code as double tap when gesture is complete */ - void SetDoubleTap(); - - /** - * @return Whether the current gesture is a tap (and hence not a swipe) - * Does not consider holding or other state information (such as - * whether the gesture was just started or is dragging). - * Results are based purely on the current stream of points. - */ - TBool IsTap() const; - - void SetLongTap(TBool aLongTap); - -// From MGestureEvent - TTime TimeOfLastEntry() const; - inline TGestureCode PreviousGestureCode() { return iPrevGestureCode; }; - TGestureCode Code( TAxis aRelevantAxis ); - TBool IsHolding() const; - TPoint StartPos() const; - TPoint CurrentPos() const; - TRealPoint Speed() const; - TRealPoint SpeedPercent( const TRect& aEdges ) const; - TPoint Distance() const; - - - - -private: - /** @return elapsed time between the latest and previous points */ - inline TTimeIntervalMicroSeconds32 TimeFromPreviousPoint() const; - - /** @return elapsed time between the latest and first points */ - inline TTimeIntervalMicroSeconds32 TimeFromStart() const; - - /** @return ETrue if user has stopped moving the stylus before lifting it */ - inline TBool IsMovementStopped() const; - - /** @return aOffset'th last entry in the list of points */ - inline const TPointEntry& NthLastEntry( TInt aOffset ) const; - - /** @return previous point (may not be exactly the point before last) */ - inline const TPointEntry& PreviousEntry() const; - - /** @return position of point received just before the latest point */ - inline TPoint PreviousPos() const; - - - - TBool IsFlick() const; -private: - /// sequence of points that make up the gesture. own. - RArray< TPointEntry > iPoints; - /// index in iPoints of the point in which user started holding - TInt iHoldingPointIndex; - - /// the different states that indicate whether user has made a holding gesture - enum THoldingState - { - ENotHolding = 0, // before holding activated (i.e., holding not activated) - EHoldStarting, // holding activated just now (lasts just one callback round) - EHolding // holding activated earlier - }; - - /// state that indicates is user has held the pointer down in one position - /// for long time to indicate a holding gesture - THoldingState iHoldingState; - - /// Whether the gesture completion code will be forcefully overridden to be double tap, - /// regardless of what the points are - TBool iIsDoubleTap; - - enum TCompletionState - { - // Note: implementation assumes this order of enums - ENotComplete = 0, - ECancelled, - EComplete, - EReleased - }; - /// gesture only becomes complete when user lifts the pointer - TCompletionState iState; - - /// time when the stylus was lifted. - TTime iCompletionTime; - - /// visual relevant to this gesture. null if not known. - - TGestureCode iPrevGestureCode; - - TBool iIsLongTap; - TBool iIsStopFlick; - }; - -} // namespace GestureHelper - -#endif // _GESTURE_H_ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/rt_gesturehelper/src/gesturedefs.h --- a/webengine/webkitutils/rt_gesturehelper/src/gesturedefs.h Wed Jan 13 15:52:45 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,83 +0,0 @@ -/* -* Copyright (c) 2008 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 "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Gesture helper constant definitions -* -*/ - - -#ifndef _GESTUREDEFS_H_ -#define _GESTUREDEFS_H - -#include /// @todo check this is correct - -namespace RT_GestureHelper -{ - -/// time to hold the stylus in the same position to activate holding -const TInt KHoldDuration = 500000; // microseconds - -/// time to tap again for the second tap to be a double tap -const TInt KMaxDoubleTapDuration = 400000; // microseconds - -/// time in which speed becomes zero if user stops stylus movement before -/// lifting the pointer -const TInt KSpeedStopTime = 150000; // microseconds - -/// tolerance in degrees to either side of an angle, for direction to be the -/// same as reference angle -const TReal KAngleTolerance = 25; - -/// Nth pointer event before the latest point -const TInt KPreviousPointOffset = 3; - -/// Tolerance for ignoring small movements, percent of longer screen edge -const TInt KGestureTolerancePercent = 2; // of 100 - -const TInt KFingerSize_mm = 8; - -const TInt KTwipsInInch = 1440; - -const TReal KTwipsInMm = 56.7; - -const TInt KMaxTapDuration = 300000; //microseconds - -const TInt KFlickSpeed = 500; - -const TInt KDoubleTapMaxActivationInterval = 500000; // 500 ms - -const TInt KDoubleTapMinActivationInterval = 40000; // 40 ms - -const TInt KDoubleTapIdleInterval = 700000; // 700 ms, to prevent triple-tap effects - -const TInt KLongTapDuration = 2000000; //2 sec - -const TInt KMinTimeBetweenDrags = 20000; // 20 ms -/** - * Panic codes - */ -enum TGesturePanic - { - EGesturePanicIllegalLogic - }; - -/** Panics the thread */ -inline void Panic( TGesturePanic aReason ) - { - _LIT( KComponentName, "GestureHelper" ); - User::Panic( KComponentName, aReason ); - } - -} // namespace GestureHelper - -#endif // _GESTUREDEFS_H diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/rt_gesturehelper/src/gestureevent.h --- a/webengine/webkitutils/rt_gesturehelper/src/gestureevent.h Wed Jan 13 15:52:45 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -/* -* Copyright (c) 2008 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 "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Gesture helper implementation -* -*/ - -#ifndef GESTUREEVENT_H_ -#define GESTUREEVENT_H_ - -#include -#include "rt_gestureobserver.h" -#include "pointarray.h" - -namespace RT_GestureHelper -{ -NONSHARABLE_CLASS( CGestureEvent ) : public CBase, public MGestureEvent - { -public: - // From MGestureEvent - TGestureCode Code( TAxis /*aRelevantAxis*/ ) { return iCode; }; - TBool IsHolding() const { return iIsHolding; }; - TPoint StartPos() const { return iStartPos; }; - TPoint CurrentPos() const { return iCurrPos; }; - TRealPoint Speed() const { return iSpeed; }; - TRealPoint SpeedPercent( const TRect& /*aEdges*/ ) const { return iSpeedPercent; }; - TPoint Distance() const { return iDistance; }; - CAlfVisual* Visual() const { return iVisual; }; - - - TGestureCode iCode; - TBool iIsHolding; - TPoint iStartPos; - TPoint iCurrPos; - TRealPoint iSpeed; - TRealPoint iSpeedPercent; - TPoint iDistance; - CAlfVisual* iVisual; - }; -} - - -#endif /* GESTUREEVENT_H_ */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/rt_gesturehelper/src/gestureeventfilter.cpp --- a/webengine/webkitutils/rt_gesturehelper/src/gestureeventfilter.cpp Wed Jan 13 15:52:45 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,95 +0,0 @@ -/* -* 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 "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -/* - * gestureeventfilter.cpp - * - * Created on: Jan 22, 2009 - * Author: tyutyuni - */ - -#include "gesturedefs.h" -#include "gestureeventfilter.h" - - -using namespace RT_GestureHelper; - -CGestureEventFilter::CGestureEventFilter(TInt aTapSize):iTapSize(aTapSize) - { - - } - -CGestureEventFilter::~CGestureEventFilter() - { - - } - - -TBool CGestureEventFilter::FilterDrag(const TPointerEvent& aPointerEvent, TInt& aReason) - { - TTime now; - now.HomeTime(); - return FilterDrag(aPointerEvent, now, aReason); - } - -TBool CGestureEventFilter::FilterDrag(const TPointerEvent& aPointerEvent, TTime& eventTime, TInt& aReason) - { - TBool filtered = EFalse; - - aReason = EFilteredNoReason; - - switch (aPointerEvent.iType) - { - case TPointerEvent::EButton1Down: - { - iIsTouchDown = ETrue; - iTouchDownTime = iLastEventTime; - iTouchDownPos = aPointerEvent.iPosition; - break; - } - case TPointerEvent::EDrag: - { - if (iIsTouchDown) - { - TPoint delta = aPointerEvent.iPosition - iTouchDownPos; - filtered = (Abs(delta.iX) <= iTapSize && Abs(delta.iY) <= iTapSize); - aReason = (filtered) ? EFilteredBySize : EFilteredNoReason; - } - - if (!filtered) - { - filtered = (eventTime.MicroSecondsFrom(iLastEventTime) < KMinTimeBetweenDrags); - aReason = (filtered) ? EFilteredByTime : EFilteredNoReason; - } - - if (!filtered) - { - iLastEventTime = eventTime; - } - iIsTouchDown = filtered; - - break; - } - case TPointerEvent::EButton1Up: - { - iIsTouchDown = EFalse; - break; - } - } - - - return filtered; - } diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/rt_gesturehelper/src/gestureeventfilter.h --- a/webengine/webkitutils/rt_gesturehelper/src/gestureeventfilter.h Wed Jan 13 15:52:45 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +0,0 @@ -/* -* 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 "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -/* - * gestureeventfilter.h - * - * Created on: Jan 22, 2009 - * Author: tyutyuni - */ - -#include -#include -#include - - -#ifndef GESTUREEVENTFILTER_H_ -#define GESTUREEVENTFILTER_H_ - - - - -namespace RT_GestureHelper -{ - -enum TFilterReason - { - EFilteredNoReason, - EFilteredBySize, - EFilteredByTime - }; - -NONSHARABLE_CLASS(CGestureEventFilter) : public CBase - { - public: - CGestureEventFilter(TInt aTapSize); - ~CGestureEventFilter(); - TBool FilterDrag(const TPointerEvent& aPointerEvent, TTime& eventTime, TInt& aReason); - TBool FilterDrag(const TPointerEvent& aPointerEvent, TInt& aReason); - private: - TTime iTouchDownTime; - TPoint iTouchDownPos; - TBool iIsTouchDown; - TTime iLastEventTime; - TInt iTapSize; - }; - -} -#endif /* GESTUREEVENTFILTER_H_ */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/rt_gesturehelper/src/gesturehelper.cpp --- a/webengine/webkitutils/rt_gesturehelper/src/gesturehelper.cpp Wed Jan 13 15:52:45 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,109 +0,0 @@ -/* -* Copyright (c) 2007 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 "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Gesture helper interface -* -*/ - - -// class include -#include "rt_gesturehelper.h" - -// local includes -#include "gesturehelperimpl.h" - -using namespace RT_GestureHelper; - -// ---------------------------------------------------------------------------- -// Two-phase constructor -// ---------------------------------------------------------------------------- -// -EXPORT_C CGestureHelper* CGestureHelper::NewL( MGestureObserver& aObserver ) - { - CGestureHelper* self = new ( ELeave ) CGestureHelper; - CleanupStack::PushL( self ); - self->iImpl = CGestureHelperImpl::NewL( aObserver ); - CleanupStack::Pop( self ); - return self; - } - -// ---------------------------------------------------------------------------- -// Destructor -// ---------------------------------------------------------------------------- -// -EXPORT_C CGestureHelper::~CGestureHelper() - { - delete iImpl; - } - -// ---------------------------------------------------------------------------- -// SetHoldingEnabled -// ---------------------------------------------------------------------------- -// -EXPORT_C void CGestureHelper::SetHoldingEnabled( TBool aEnabled ) - { - iImpl->SetHoldingEnabled( aEnabled ); - } - -// ---------------------------------------------------------------------------- -// IsHoldingEnabled -// ---------------------------------------------------------------------------- -// -EXPORT_C TBool CGestureHelper::IsHoldingEnabled() const - { - return iImpl->IsHoldingEnabled(); - } - -// ---------------------------------------------------------------------------- -// SetDoubleTapEnabled -// ---------------------------------------------------------------------------- -// -EXPORT_C void CGestureHelper::SetDoubleTapEnabled( TBool aEnabled ) - { - iImpl->SetDoubleTapEnabled( aEnabled ); - } - -// ---------------------------------------------------------------------------- -// IsDoubleTapEnabled -// ---------------------------------------------------------------------------- -// -EXPORT_C TBool CGestureHelper::IsDoubleTapEnabled() const - { - return iImpl->IsDoubleTapEnabled(); - } - - - - -// ---------------------------------------------------------------------------- -// HandlePointerEventL -// ---------------------------------------------------------------------------- -// -EXPORT_C TBool CGestureHelper::HandlePointerEventL( const TPointerEvent& aEvent ) - { - return iImpl->HandlePointerEventL( aEvent ); - } - - - - - -// ---------------------------------------------------------------------------- -// Cancel -// ---------------------------------------------------------------------------- -// -EXPORT_C void CGestureHelper::Cancel() - { - iImpl->Reset(); - } - diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/rt_gesturehelper/src/gesturehelpereventsender.cpp --- a/webengine/webkitutils/rt_gesturehelper/src/gesturehelpereventsender.cpp Wed Jan 13 15:52:45 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,111 +0,0 @@ -/* -* Copyright (c) 2008 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 "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Gesture helper implementation -* -*/ - -#include "gesturehelpereventsender.h" -#include "gesture.h" - -using namespace RT_GestureHelper; - -const TInt KEventsQueueGranularity = 4; - -CGestureEventSender* CGestureEventSender::NewL( MGestureObserver& aObserver ) - { - CGestureEventSender* self = new (ELeave) CGestureEventSender(aObserver); - - return self; - } - -CGestureEventSender::CGestureEventSender( MGestureObserver& aObserver ) : - CActive(EPriorityUserInput - 1), - iObserver(aObserver), iEvents(KEventsQueueGranularity) - { - CActiveScheduler::Add(this); - } - -CGestureEventSender::~CGestureEventSender() - { - if (IsActive()) - { - Cancel(); - } - - iEvents.Close(); - } - -TInt CGestureEventSender::AddEvent(const TGestureEvent& aGestureEvent) - { - iEvents.Append(aGestureEvent); - if (iState != EBusy) - { - iState = EEventsReady; - } - - if (!IsActive()) - { - Complete(); - } - return iEvents.Count(); - } - -void CGestureEventSender::Complete() - { - TRequestStatus* status = &iStatus; - User::RequestComplete(status, KErrNone); - SetActive(); - } - -void CGestureEventSender::RunL() - { - switch (iState) - { - case EEventsReady: - { - if (iEvents.Count() > 0) - { - TInt count = iEvents.Count(); - for (int i = 0; i < count; i++) - { - TGestureEvent& gst = iEvents[i]; - EmitEventL(gst); - } - } - iEvents.Reset(); - iState = ENoEvents; - Complete(); - break; - } - } - } - -void CGestureEventSender::EmitEventL( const TGestureEvent& aGesture ) - { - iState = EBusy; - iObserver.HandleGestureL(aGesture); - iState = EEventsReady; - } - -TInt CGestureEventSender::RunError(TInt aError) - { - iEvents.Reset(); - return aError; - } - -void CGestureEventSender::DoCancel() - { - iEvents.Reset(); - iState = ENoEvents; - } diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/rt_gesturehelper/src/gesturehelpereventsender.h --- a/webengine/webkitutils/rt_gesturehelper/src/gesturehelpereventsender.h Wed Jan 13 15:52:45 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ -/* -* Copyright (c) 2008 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 "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Gesture helper implementation -* -*/ - -#ifndef GESTUREHELPEREVENTSENDER_H_ -#define GESTUREHELPEREVENTSENDER_H_ - -#include -#include -#include - -namespace RT_GestureHelper -{ -class MGestureObserver; -class CGestureEvent; - -NONSHARABLE_CLASS(CGestureEventSender) : public CActive - { -public: - enum TEventSenderState - { - ENoEvents, - EEventsReady, - EBusy - }; - static CGestureEventSender* NewL( MGestureObserver& aObserver ); - ~CGestureEventSender(); - TInt AddEvent(const TGestureEvent& aGestureEvent); -protected: - void RunL(); - void DoCancel(); - TInt RunError(TInt aError); -private: - CGestureEventSender(MGestureObserver& aObserver); - void Complete(); - void EmitEventL( const TGestureEvent& aGestureEvent ); - - RArray< TGestureEvent > iEvents; - MGestureObserver& iObserver; - TEventSenderState iState; - }; -} -#endif /* GESTUREHELPEREVENTSENDER_H_ */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/rt_gesturehelper/src/gesturehelperimpl.cpp --- a/webengine/webkitutils/rt_gesturehelper/src/gesturehelperimpl.cpp Wed Jan 13 15:52:45 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,631 +0,0 @@ -/* -* Copyright (c) 2008 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 "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Gesture helper implementation -* -*/ - - -#include "gesturehelperimpl.h" - -#include -#include - -#include "gesture.h" -#include "gesturedefs.h" -#include "utils.h" -#include "gestureeventfilter.h" -#include "gesturehelpereventsender.h" -#include "flogger.h" - -using namespace RT_GestureHelper; - -namespace RT_GestureHelper -{ - -/// type of function in gesture helper to be called by the timer -/// when timer triggers -typedef void (CGestureHelperImpl::*CallbackFunctionL)(); - -NONSHARABLE_CLASS( CCallbackTimer ) : public CTimer - { -public: - /** Two-phase constructor */ - static CCallbackTimer* NewL( CGestureHelperImpl& aHelper, - CallbackFunctionL aCallbackFunctionL, TInt aDelay, TBool aIsEnabled ) - { - CCallbackTimer* self = new ( ELeave ) CCallbackTimer( aHelper, - aCallbackFunctionL, aDelay, aIsEnabled ); - CleanupStack::PushL( self ); - self->ConstructL(); // construct base class - CActiveScheduler::Add( self ); - CleanupStack::Pop( self ); - return self; - } - - /** Destructor */ - ~CCallbackTimer() - { - Cancel(); - } - - /** Set whether sending holding events is currently enabled */ - void SetEnabled( TBool aEnabled ) - { - iIsEnabled = aEnabled; - // cancel in case hold timer is already running - Cancel(); - } - - /** @return whether sending holding events is currently enabled */ - TBool IsEnabled() const - { - return iIsEnabled; - } - - /** Start the timer. Calls CGestureHelperImpl::StartHoldingL upon completion */ - void Start() - { - // if sending hold events is disabled, do not ever start the hold timer, and - // hence hold events will never be triggered - if ( iIsEnabled ) - { - Cancel(); - After( iDelay ); - } - } - void SetDelay(TInt aDelay) { iDelay = aDelay; } - TInt GetDelay() { return iDelay; } - -private: - /** Constructor */ - CCallbackTimer( CGestureHelperImpl& aHelper, - CallbackFunctionL aCallbackFunctionL, TInt aDelay, TBool aIsEnabled ) - : CTimer( EPriorityUserInput - 1 ), // give higher priority to new pointer events with - 1 - iHelper( aHelper ), iCallbackFunctionL( aCallbackFunctionL ), - iDelay( aDelay ), iIsEnabled( aIsEnabled ) - { - } - - void RunL() // From CActive - { - (iHelper.*iCallbackFunctionL)(); - } - -private: - /// helper object that will be called back when timer is triggered - CGestureHelperImpl& iHelper; - /// Function in the iHelper object call - CallbackFunctionL iCallbackFunctionL; - /// How long a time to wait befor calling back after Start() - TInt iDelay; - /// whether sending holding events is currently enabled - TBool iIsEnabled; - }; - -} // namespace GestureHelper - -/** - * @return position from event. Use this instead of using aEvent direction to - * avoid accidentally using TPointerEvent::iPosition - */ -inline TPoint Position( const TPointerEvent& aEvent ) - { - // use parent position, since the capturer is using full screen area, - // and because the (Alfred) drag events are not local to visual even when - // coming from the client - - return aEvent.iPosition; - } - -// ---------------------------------------------------------------------------- -// Two-phase constructor -// ---------------------------------------------------------------------------- -// -CGestureHelperImpl* CGestureHelperImpl::NewL( MGestureObserver& aObserver ) - { - CGestureHelperImpl* self = new ( ELeave ) CGestureHelperImpl( aObserver ); - CleanupStack::PushL( self ); - self->iEventSender = CGestureEventSender::NewL( aObserver ); - self->iDoubleTapTimer = CCallbackTimer::NewL( *self, EmitFirstTapEvent, - KMaxTapDuration, EFalse ); // double tap is disabled by default - self->iHoldingTimer = CCallbackTimer::NewL( *self, StartHoldingL, - KHoldDuration, EFalse ); // holding is enabled by default - - self->iLongTouchTimer = CCallbackTimer::NewL( *self, HandleLongTouch, - KLongTapDuration, ETrue ); // holding is enabled by default - - self->iGesture = new ( ELeave ) CGesture(); - self->iUnusedGesture = new ( ELeave ) CGesture(); - TInt tapLimit = Mm2Pixels(KFingerSize_mm) / 2; - self->iEventFilter = new (ELeave) CGestureEventFilter(tapLimit); - CleanupStack::Pop( self ); - return self; - } - -// ---------------------------------------------------------------------------- -// Constructor -// ---------------------------------------------------------------------------- -// -CGestureHelperImpl::CGestureHelperImpl( MGestureObserver& aObserver ) - : iObserver( aObserver ) - { - } - -// ---------------------------------------------------------------------------- -// Destructor -// ---------------------------------------------------------------------------- -// -CGestureHelperImpl::~CGestureHelperImpl() - { - delete iDoubleTapTimer; - delete iHoldingTimer; - delete iGesture; - delete iPreviousTapGesture; - delete iUnusedGesture; - delete iLongTouchTimer; - delete iEventFilter; - delete iEventSender; - } - - -// ---------------------------------------------------------------------------- -// SetHoldingEnabled -// ---------------------------------------------------------------------------- -// -void CGestureHelperImpl::SetHoldingEnabled( TBool aEnabled ) - { - iHoldingTimer->SetEnabled( aEnabled ); - } - -// ---------------------------------------------------------------------------- -// IsHoldingEnabled -// ---------------------------------------------------------------------------- -// -TBool CGestureHelperImpl::IsHoldingEnabled() const - { - return iHoldingTimer->IsEnabled(); - } - -// ---------------------------------------------------------------------------- -// SetHoldingEnabled -// ---------------------------------------------------------------------------- -// -void CGestureHelperImpl::SetDoubleTapEnabled( TBool aEnabled ) - { - iDoubleTapTimer->SetEnabled( aEnabled ); - } - -// ---------------------------------------------------------------------------- -// IsHoldingEnabled -// ---------------------------------------------------------------------------- -// -TBool CGestureHelperImpl::IsDoubleTapEnabled() const - { - return iDoubleTapTimer->IsEnabled(); - } - - - -// ---------------------------------------------------------------------------- -// Reset state -// ---------------------------------------------------------------------------- -// -void CGestureHelperImpl::Reset() - { - iHoldingTimer->Cancel(); - iLongTouchTimer->Cancel(); - iGesture->Reset(); - } - -/** - * Helper function that calls Reset on the pointer to CGestureHelperImpl - */ -static void ResetHelper( TAny* aHelper ) - { - static_cast< CGestureHelperImpl* >( aHelper )->Reset(); - } - -// ---------------------------------------------------------------------------- -// Handle a pointer event -// ---------------------------------------------------------------------------- -// -TBool CGestureHelperImpl::HandlePointerEventL( const TPointerEvent& aEvent ) - { - TInt filterReason; - SetLastEventTime(); - if (!iEventFilter->FilterDrag(aEvent, iLastEventTime, filterReason)) - { - return noneAlf_HandlePointerEventL( aEvent ); - } - else - { - /* - TBuf<10> num; - num.Num( filterReason ); - TBuf<128> str; - str.AppendFormat(_L("Filter reason: %d"), filterReason); - RFileLogger::Write( _L("gh"), _L("gh.txt"), EFileLoggingModeAppend, str); - */ - return EFalse; - } - } - - -TBool CGestureHelperImpl::noneAlf_HandlePointerEventL( const TPointerEvent& aEvent) - { - switch ( aEvent.iType ) - { - case TPointerEvent::EButton1Down: - { - HandleTouchDownL(aEvent); - break; - } - case TPointerEvent::EDrag: - { - HandleMoveL(aEvent); - break; - } - case TPointerEvent::EButton1Up: - { - if (KErrNone == AddPoint( aEvent )) - { - HandleTouchUp(aEvent); - } - else - { - EmitCancelEvent(); - } - Reset(); - break; - } - default: - break; - } - return ETrue; - } - -TBool CGestureHelperImpl::IsMovementGesture(TGestureCode aCode) - { - return (aCode == EGestureDrag || aCode == EGestureFlick || aCode == EGestureSwipeUp || - aCode == EGestureSwipeDown || aCode == EGestureSwipeRight || aCode == EGestureSwipeLeft); - } - -void CGestureHelperImpl::HandleLongTouch() - { - iDoubleTapTimer->Cancel(); - iGesture->SetLongTap(ETrue); - iGesture->SetComplete(); - TPoint startPos = iGesture->StartPos(); - EmitEvent(*iGesture); - iGesture->Reset(); - iGesture->AddPoint( startPos, GetLastEventTime() ); - } - -void CGestureHelperImpl::HandleTouchDownL(const TPointerEvent& aEvent) - { - TGestureCode prevCode = iGesture->PreviousGestureCode(); - if (prevCode == EGestureStart) return; - if (prevCode == EGestureDrag) - { - iGesture->Reset(); - } - AddPointL( aEvent ); - - if (!iLongTouchTimer->IsActive()) - { - iLongTouchTimer->Start(); - } - if (!iDoubleTapTimer->IsActive()) - { - EmitEvent( *iGesture ); - } - } - -void CGestureHelperImpl::HandleMoveL(const TPointerEvent& aEvent) - { - if (iGesture->IsLatestPoint( Position(aEvent))) return; // I'm not sure we need this - //Cancel double tap time - it's neither tap nor double tap - iDoubleTapTimer->Cancel(); - iLongTouchTimer->Cancel(); - - TBool isFirstPoint = IsIdle(); - - AddPointL( aEvent ); - - if (iPreviousTapGesture) - { - RecycleGesture(iPreviousTapGesture); - } - - if (!isFirstPoint) - { - EmitEvent( *iGesture ); - } - } - -void CGestureHelperImpl::HandleTouchUp(const TPointerEvent& /*aEvent*/) - { - TGestureCode prevCode = iGesture->PreviousGestureCode(); - iLongTouchTimer->Cancel(); - iDoubleTapTimer->Cancel(); - TInt64 fromLastTouchUp = iLastEventTime.MicroSecondsFrom(iLastTouchUpTime).Int64(); - TInt64 fromLastDoubleTap = iLastEventTime.MicroSecondsFrom(iLastDoubleTapTime).Int64(); - /* - TBuf<1024> str; - str.AppendFormat(_L("fromLastTouchUp: %d, "), fromLastTouchUp); - str.AppendFormat(_L("fromLastDoubleTap: %d, "), fromLastTouchUp); - str.AppendFormat(_L("iPreviousTapGesture: %d, "), iPreviousTapGesture); - RFileLogger::Write( _L("gh"), _L("gh.txt"), EFileLoggingModeAppend, str); - */ - if ( prevCode == EGestureLongTap ) - { - EmitReleasedEvent(); - } - else if (IsMovementGesture(prevCode) || - !iDoubleTapTimer->IsEnabled() /* || !iGesture->IsTap()*/ ) - { - iGesture->SetComplete(); - EmitEvent(*iGesture); - } - - else - { - if ( iPreviousTapGesture && - (fromLastTouchUp > KDoubleTapMinActivationInterval) && - (fromLastTouchUp < KDoubleTapMaxActivationInterval) && - (fromLastDoubleTap > KDoubleTapIdleInterval)) - { - // it's a double tap - iLastTouchUpTime = iLastEventTime; - iLastDoubleTapTime = iLastEventTime; - EmitDoubleTapEvent(); - } - else - { - // it's a first tap - iLastTouchUpTime = iLastEventTime; - if (iPreviousTapGesture) - { - RecycleGesture(iPreviousTapGesture); - } - - iPreviousTapGesture = iGesture; - iGesture = NewGesture(); - iDoubleTapTimer->Start(); - } - } - } - - - -void CGestureHelperImpl::EmitDoubleTapEvent() - { - iPreviousTapGesture->SetDoubleTap(); - EmitFirstTapEvent(); - } - - -void CGestureHelperImpl::EmitReleasedEvent() - { - iGesture->SetComplete(); - iGesture->SetReleased(); - EmitEvent(*iGesture); - } - - -// ---------------------------------------------------------------------------- -// Is the helper idle? -// inline ok in cpp file for a private member function -// ---------------------------------------------------------------------------- -// -inline TBool CGestureHelperImpl::IsIdle() const - { - return iGesture->IsEmpty(); - } - -// ---------------------------------------------------------------------------- -// Add a point to the sequence of points that together make up the gesture -// inline ok in cpp file for a private member function -// ---------------------------------------------------------------------------- -// -inline void CGestureHelperImpl::AddPointL( const TPointerEvent& aEvent ) - { - User::LeaveIfError( AddPoint( aEvent ) ); - } - -// ---------------------------------------------------------------------------- -// Add a point to the sequence of points that together make up the gesture -// inline ok in cpp file for a private member function -// ---------------------------------------------------------------------------- -// -inline TInt CGestureHelperImpl::AddPoint( const TPointerEvent& aEvent ) - { - TPoint pos = Position ( aEvent ); - return iGesture->AddPoint( pos, GetLastEventTime() ); - } - -// ---------------------------------------------------------------------------- -// StartHoldingTimer -// ---------------------------------------------------------------------------- -// -void CGestureHelperImpl::StartHoldingTimer( const TPointerEvent& aNewEvent ) - { - if ( !( iGesture->IsHolding() || - iGesture->IsNearHoldingPoint( Position( aNewEvent ) ) ) ) - { - // restart hold timer, since pointer has moved - iHoldingTimer->Start(); - // Remember the point in which holding was started - iGesture->SetHoldingPoint(); - } - } - -/** - * Helper function that calls ContinueHolding on the pointer to TGesture - */ -static void ContinueHolding( TAny* aGesture ) - { - static_cast< CGesture* >( aGesture )->ContinueHolding(); - } - -// ---------------------------------------------------------------------------- -// Add a point to the sequence of points that together make up the gesture -// ---------------------------------------------------------------------------- -// -void CGestureHelperImpl::StartHoldingL() - { - // hold & tap event is specifically filtered out. Use case: in list fast - // scrolling activation (e.g. enhanced coverflow), tap & hold should not - // start fast scroll. In addition, after long tap on start position, - // drag and drag & hold swiping should emit normal swipe and swipe&hold - // events. Therefore, tap & hold is not supported. - __ASSERT_DEBUG( !iGesture->IsTap() && !iPreviousTapGesture, Panic( EGesturePanicIllegalLogic ) ); - - // holding has just started, and gesture code should be provided to client. - // set gesture state so that it produces a gesture code (other than drag) - iGesture->StartHolding(); - - // create an item in the cleanup stack that will set the gesture state - // to holding-was-started-earlier state. NotifyL may leave, but the - // holding-was-started-earlier state must still be successfully set, - // otherwise, the holding gesture code will be sent twice - CleanupStack::PushL( TCleanupItem( &ContinueHolding, iGesture ) ); - - EmitEvent( *iGesture ); - - // set holding state to "post holding" - CleanupStack::PopAndDestroy( iGesture ); - } - -// ---------------------------------------------------------------------------- -// RecyclePreviousTapGesture -// ---------------------------------------------------------------------------- -// -void CGestureHelperImpl::RecyclePreviousTapGesture( TAny* aSelf ) - { - CGestureHelperImpl& self = *reinterpret_cast( aSelf ); - self.RecycleGesture( self.iPreviousTapGesture ); - } - -// ---------------------------------------------------------------------------- -// Emit the remainder of the previous tap event (tap + released) -// ---------------------------------------------------------------------------- -// -void CGestureHelperImpl::EmitFirstTapEvent() - { - // when this function is called, a tap has turned out to _not_ be a double tap - __ASSERT_DEBUG( IsDoubleTapEnabled(), Panic( EGesturePanicIllegalLogic ) ); - __ASSERT_DEBUG( iPreviousTapGesture, Panic( EGesturePanicIllegalLogic ) ); - - iDoubleTapTimer->Cancel(); - CompleteAndEmit( *iPreviousTapGesture ); - RecycleGesture(iPreviousTapGesture); - - } - -// ---------------------------------------------------------------------------- -// EmitStartEventL -// ---------------------------------------------------------------------------- -// -void CGestureHelperImpl::EmitStartEventL( const CGesture& aGesture ) - { - CGesture* startGesture = aGesture.AsStartEventLC(); - EmitEvent( *startGesture ); - CleanupStack::PopAndDestroy( startGesture ); - } - -// ---------------------------------------------------------------------------- -// EmitCompletionEventsL -// ---------------------------------------------------------------------------- -// -void CGestureHelperImpl::CompleteAndEmit( CGesture& aGesture ) - { - aGesture.SetComplete(); - // send gesture code if holding has not been started. If holding has - // been started, client has already received a "hold swipe left" e.g. event, in which - // case don't another "swipe left" event - if ( !aGesture.IsHolding() ) - { - // if client leaves, the state is automatically reset. - // In this case the client will not get the released event - EmitEvent( aGesture ); - } - - // send an event that stylus was lifted - aGesture.SetReleased(); - EmitEvent( aGesture ); - } - -// ---------------------------------------------------------------------------- -// EmitCancelEventL -// ---------------------------------------------------------------------------- -// -void CGestureHelperImpl::EmitCancelEvent() - { - iDoubleTapTimer->Cancel(); - - - CGesture& gestureToCancel = iPreviousTapGesture ? *iPreviousTapGesture : *iGesture; - gestureToCancel.SetCancelled(); - EmitEvent( gestureToCancel ); - RecycleGesture(iPreviousTapGesture); - - } - -// ---------------------------------------------------------------------------- -// Notify observer -// ---------------------------------------------------------------------------- -// -void CGestureHelperImpl::EmitEvent( const CGesture& aGesture ) - { - // deallocation of the event is happening in CGestureEventSender::RunL() - TGestureEvent event; - event.SetCode(const_cast(aGesture).Code(EAxisBoth)); - event.SetCurrentPos(aGesture.CurrentPos()); - event.SetDistance(aGesture.Distance()); - event.SetStartPos(aGesture.StartPos()); - event.SetIsHolding(aGesture.IsHolding()); - event.SetSpeed(aGesture.Speed()); - iEventSender->AddEvent(event); - } - -// ---------------------------------------------------------------------------- -// Return a fresh gesture from the gesture pool (pool of one gesture) -// ---------------------------------------------------------------------------- -// -CGesture* CGestureHelperImpl::NewGesture() - { - __ASSERT_DEBUG( iUnusedGesture, Panic( EGesturePanicIllegalLogic ) ); // pool should no be empty - - iUnusedGesture->Reset(); - CGesture* freshGesture = iUnusedGesture; - iUnusedGesture = NULL; - return freshGesture; - } - -// ---------------------------------------------------------------------------- -// Return a fresh gesture from the gesture pool (pool of one gesture) -// ---------------------------------------------------------------------------- -// -void CGestureHelperImpl::RecycleGesture( CGesture*& aGesturePointer ) - { - // only one object fits into the pool, and that should currently be enough - // one pointer must be null, one non-null - __ASSERT_DEBUG( !iUnusedGesture != !aGesturePointer, Panic( EGesturePanicIllegalLogic ) ); - if ( aGesturePointer ) - { - iUnusedGesture = aGesturePointer; - aGesturePointer = NULL; - } - } diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/rt_gesturehelper/src/gesturehelperimpl.h --- a/webengine/webkitutils/rt_gesturehelper/src/gesturehelperimpl.h Wed Jan 13 15:52:45 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,196 +0,0 @@ -/* -* Copyright (c) 2007 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 "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Gesture helper implementation -* -*/ - - -#ifndef _GESTUREHELPERIMPL_H_ -#define _GESTUREHELPERIMPL_H_ - -#include -#include -#include - - -struct TPointerEvent; - -namespace RT_GestureHelper -{ - -class CCallbackTimer; -class CGesture; -class CPointerCapturer; -class MGestureObserver; -class CGestureEventFilter; -class CGestureEventSender; - -/** - * Implementation of CGestureHelper interface - */ -NONSHARABLE_CLASS( CGestureHelperImpl ) : public CBase - { -public: - /** 2-phase constructor */ - static CGestureHelperImpl* NewL( MGestureObserver& aObserver ); - - /** Destructor */ - ~CGestureHelperImpl(); - - - /** See @ref CGestureHelper::SetHoldingEnabled */ - void SetHoldingEnabled( TBool aEnabled ); - /** See @ref CGestureHelper::IsHoldingEnabled */ - TBool IsHoldingEnabled() const; - /** See @ref CGestureHelper::SetDoubleTapEnabled */ - void SetDoubleTapEnabled( TBool aEnabled ); - /** See @ref CGestureHelper::IsDoubleTapEnabled */ - TBool IsDoubleTapEnabled() const; - /** See @ref CGestureHelper::HandlePointerEventL */ - TBool HandlePointerEventL( const TPointerEvent& aEvent ); - - /** Reset helper state */ - void Reset(); - - void SetLastEventTime() {iLastEventTime.HomeTime(); } /*CCoeEnv::Static()->LastEvent().Time();*/ - - - TTime GetLastEventTime() const { return iLastEventTime; } -private: - /** Constructor */ - CGestureHelperImpl( MGestureObserver& aObserver ); - - - - TBool noneAlf_HandlePointerEventL( const TPointerEvent& aEvent); - - /** @return ETrue if the helper has not started processing a gesture */ - inline TBool IsIdle() const; - /** Add a point to the sequence of points that make up the gesture */ - inline void AddPointL( const TPointerEvent& aEvent ); - /** Add a point to the sequence of points that make up the gesture */ - inline TInt AddPoint( const TPointerEvent& aEvent ); - /** Activates holding and notifies observer that holding has been started */ - void StartHoldingL(); - /* Set previous tag gesture to null (and recycle the gesture object) */ - static void RecyclePreviousTapGesture( TAny* aSelf ); - /** Emits a tap event since second tap of a double tap was not received within timeout */ - void EmitFirstTapEvent(); - /** Emit the start gesture event that aGesture would have produced */ - void EmitStartEventL( const CGesture& aGesture ); - /** - * Send code event if not holding. Also sets the event to released and emits again. - * Modifies aGesture! - */ - void CompleteAndEmit( CGesture& aGesture ); - /** - * Send cancel event about the latest gesture client was notified about - * Sets the latest gesture to Cancelled. - */ - void EmitCancelEvent(); - - /** - * Send Released event - */ - void EmitReleasedEvent(); - - /** Notify observer of the gesture */ - void EmitEvent( const CGesture& aGesture ); - /** - * (re)start holding timer at the current point. - * Does not restart holding if the point (in aEvent) is near enough to where holding - * was started earlier. (Allows small movement but still starting holding. - */ - void StartHoldingTimer( const TPointerEvent& aNewEvent ); - - /** - * @return a gesture object from the gesture pool - * Getting gestures from the gesture pool avoids the need to create gestures - * after construction. There is max only one gesture object in the pool, - * but no more is needed - */ - CGesture* NewGesture(); - /** Move the gesture into the gesture pool, and set aGesturePointer to null */ - void RecycleGesture( CGesture*& aGesturePointer ); - - - void HandleTouchUp(const TPointerEvent& aEvent); - void HandleTouchDownL(const TPointerEvent& aEvent); - void HandleMoveL(const TPointerEvent& aEvent); - void HandleLongTouch(); - void EmitDoubleTapEvent(); - TBool IsMovementGesture(TGestureCode aCode); - -private: - /// Gesture is the logical representation of a sequence of points arriving - /// at certain times - /// This is the current gesture - CGesture* iGesture; - - /// Tap gesture of the previous gesture. Used when double tap is enabled. - /// The gesture is cached, since it cannot be emitted until gesture helper - /// knows whether the next gesture forms a double tap - /// @see CGestureHelperImpl::iDoubleTapTimer - CGesture* iPreviousTapGesture; - - /// This is a recyclable object pool with just one object. - /// This class needs one or two gesture objects at any one time. There is one - /// less error condition to handle if gesture objects are not created after - /// construction. Therefore, if only one gesture object is needed at a specific, - /// point in time, the unused gesture object is stored here. - CGesture* iUnusedGesture; - - /// When double tap is enabled, a tap - /// event (and it's released event) is only emitted after the double tap timeout - /// passes. If user taps again before the timeout (in the same position), - /// this gesture is emitted as a double tap (followed by the released event, - /// and the second tap is not emitted at all. - /// If user taps, and then swipes before the double tap timeout, this tap - /// event (and it's released event) event is emitted, and only then the swipe's - /// down and drag events are emitted. In other words, if user presses down - /// during the timeout, the down event it not emitted until the gesture - /// helper knows that the gesture is not another tap. - /// Behavior while double tap enabled: - /// Swipe: Down + drag + up => emits down + swipe/cancel + released - /// Tap: Down + up => emits down ... timeout ... + tap + released - /// Double tap: Down + up + down + up => emits down ... double tap + released - /// Tap + quick swipe: Down + up + down + drag + ... => emits down ... tap + up (for tap) + down (for swipe ) + drag + ... - /// Double tap timer is cancelled when the second pointer down event is received, - /// i.e., it does not matter if user does this: - /// down + up + down ... long wait ... + up. It's still a double tap. - CCallbackTimer* iDoubleTapTimer; - - /// holding is activated when user keeps pointer down in the same place for - /// a longer period. the holding timer activates off when enough time has passed. - CCallbackTimer* iHoldingTimer; - - /// observer for gesture events - MGestureObserver& iObserver; - - /// captures subsequent pointer events after pointer down received, - /// until pointer up - CPointerCapturer* iPointerCapturer; - - TTime iLastEventTime; - TTime iLastTouchUpTime; - TTime iLastDoubleTapTime; - - CCallbackTimer* iLongTouchTimer; - CGestureEventFilter* iEventFilter; - CGestureEventSender* iEventSender; - }; - -} // GestureHelper - -#endif // _GESTUREHELPERIMPL_H_ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/rt_gesturehelper/src/gesturerecogniser.h --- a/webengine/webkitutils/rt_gesturehelper/src/gesturerecogniser.h Wed Jan 13 15:52:45 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -/* -* Copyright (c) 2007 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 "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Algorithm to recognise gesture from a stream of points -* -*/ - - -#ifndef _GESTURERECOGNISER_H_ -#define _GESTURERECOGNISER_H_ - -#include -#include "rt_gestureobserver.h" - -namespace RT_GestureHelper -{ - -class TPointArray; - -/** - * Note: Not a static class or a function pointer, just to make it sligthly - * easier to replace it with a heavier implementation - */ -NONSHARABLE_CLASS( TGestureRecogniser ) - { -public: - /** - * Translates points into a gesture code - * @param aPoints Points that form the gestures. Client is not required - * to pass in repeated points (sequential points that are - * almost in the same place) - * @param aIsHolding ETrue if gesture was ended at pointer being held down at same position - * EFalse if gesture ended at pointer being released - * @return recognised gesture id or EUnknownGesture - */ - TGestureCode GestureCode( const TPointArray& aPoints ) const; - }; - -} // namespace GestureHelper - -#endif // _GESTURERECOGNISER_H_ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/rt_gesturehelper/src/pointarray.cpp --- a/webengine/webkitutils/rt_gesturehelper/src/pointarray.cpp Wed Jan 13 15:52:45 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -/* -* Copyright (c) 2008 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 "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Array of points -* -*/ - - -#include "pointarray.h" - -using namespace RT_GestureHelper; - -// ---------------------------------------------------------------------------- -// TPointArray constructor -// ---------------------------------------------------------------------------- -// -TPointArray::TPointArray( const RArray< TPointEntry >& aPoints ) - : iPoints( aPoints ) - {} - -// ---------------------------------------------------------------------------- -// TPointArray length -// ---------------------------------------------------------------------------- -// -TInt TPointArray::Count() const - { - return iPoints.Count(); - } - -// ---------------------------------------------------------------------------- -// point at index, no filtering -// ---------------------------------------------------------------------------- -// -TPoint TPointArray::operator[]( TInt aIndex ) const - { - return iPoints[aIndex].iPos; - } - -// ---------------------------------------------------------------------------- -// Unfiltered point at index -// ---------------------------------------------------------------------------- -// -TPoint TPointArray::Raw( TInt aIndex ) const - { - return iPoints[aIndex].iPos; - } - diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/rt_gesturehelper/src/pointarray.h --- a/webengine/webkitutils/rt_gesturehelper/src/pointarray.h Wed Jan 13 15:52:45 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,73 +0,0 @@ -/* -* Copyright (c) 2008 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 "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Array of points -* -*/ - - -#ifndef _POINTARRAY_H_ -#define _POINTARRAY_H_ - -#include - -namespace RT_GestureHelper -{ - -/** - * Represents a single point given at certain time - */ -struct TPointEntry - { - /** constructor */ - inline TPointEntry( const TPoint& aPos, const TTime& aTime ) - : iPos( aPos ), iTime( aTime ) - { - } - - TPoint iPos; - TTime iTime; - }; - -/** - * Array of points that wraps another point array - * The purpose of this class is to allow deriving classes to override [] - * and in that member function adjust the point, e.g., by setting one - * axis to always a constant value. This allows providing a sequence of - * points to the recogniser in which the other axis is ignored. - */ -NONSHARABLE_CLASS( TPointArray ) - { -public: - /** - * @param aPoints points array to wrap (and filter) - */ - TPointArray( const RArray< TPointEntry >& aPoints ); - /** @returns length of the array */ - TInt Count() const; - /** - * @returns a filtered point at aIndex. Default implementation same - * as Raw(...) - * virtual so deriving classes can modify the point (e.g., filter one axis) - */ - virtual TPoint operator[]( TInt aIndex ) const; - /** @returns an raw, non-filtered point at aIndex */ - TPoint Raw( TInt aIndex ) const; - -private: - const RArray< TPointEntry >& iPoints; - }; - -} // namespace GestureHelper - -#endif // _POINTARRAY_H_ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/rt_gesturehelper/src/utils.cpp --- a/webengine/webkitutils/rt_gesturehelper/src/utils.cpp Wed Jan 13 15:52:45 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,71 +0,0 @@ -/* -* Copyright (c) 2008 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 "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Gesture recognition utilities -* -*/ - - -#include "utils.h" - -#include // for CCoeEnv -#include // for CEikAppUi - -#include "gesturedefs.h" - -namespace RT_GestureHelper - { - /** @return the longer edge of the size */ - inline TInt LongerEdge( const TSize& aSize ) - { - return Max( aSize.iHeight, aSize.iWidth ); - } - - // for documentation, see header file - TRect ToleranceRect( const TPoint& aCenterPoint ) - { - /* - TSize screenSize = static_cast( CCoeEnv::Static()->AppUi() ) - ->ApplicationRect().Size(); - // multiplication has to be done first, to avoid rounding integer to 0 with division - int toleranceLength = ( KGestureTolerancePercent * LongerEdge( screenSize ) ) / 100; - */ - long toleranceLength = Mm2Pixels(KFingerSize_mm) / 2; - TRect toleranceRect( aCenterPoint, TSize() ); - // grow by the tolerance length, while keeping the center point - toleranceRect.Shrink( -toleranceLength, -toleranceLength ); - return toleranceRect; - } - - long Twips2Pixels(long twips) - { - CWsScreenDevice* screen = CCoeEnv::Static()->ScreenDevice(); - TZoomFactor deviceMap(screen); - deviceMap.SetZoomFactor(TZoomFactor::EZoomOneToOne); - long px = deviceMap.VerticalTwipsToPixels(twips); //assuming that vertical - return px; //the same as horizontal - - } - - long Mm2Pixels(long mm) - { - return Twips2Pixels(mm * KTwipsInMm); - } - - long Inches2Pixels(double inches) - { - return Twips2Pixels(inches * KTwipsInInch); - } - - - } // namespace GestureHelper diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/rt_gesturehelper/src/utils.h --- a/webengine/webkitutils/rt_gesturehelper/src/utils.h Wed Jan 13 15:52:45 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -/* -* Copyright (c) 2008 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 "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Gesture recognition utilities -* -*/ - - -#ifndef _GESTURE_UTILS_H_ -#define _GESTURE_UTILS_H_ - -#include - -namespace RT_GestureHelper - { - - /** - * @return the a rectange in which dragging will be ignored. Tolerance rect - * represents a rectange within which any movement will not be considered - * intentional, but as accidental stylus movement. - */ - TRect ToleranceRect( const TPoint& aCenterPoint ); - - long Twips2Pixels(long twips); - long Mm2Pixels(long mm); - long Inches2Pixels(double inches); - - } // namespace GestureHelper - -#endif // _GESTURE_UTILS_H_ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/bwins/stmgesturefwu.def --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/bwins/stmgesturefwu.def Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,13 @@ +EXPORTS + ?RemoveListener@CStmGestureContext@@QAEHPAVMStmGestureListener@@@Z @ 1 NONAME ; int CStmGestureContext::RemoveListener(class MStmGestureListener *) + ?SetContext@CStmGestureContext@@QAEXPAVCCoeControl@@@Z @ 2 NONAME ; void CStmGestureContext::SetContext(class CCoeControl *) + ?Deactivate@CStmGestureContext@@QAEXXZ @ 3 NONAME ; void CStmGestureContext::Deactivate(void) + ?NewL@CStmGestureEngine@@SAPAV1@XZ @ 4 NONAME ; class CStmGestureEngine * CStmGestureEngine::NewL(void) + ?HandlePointerEventL@CStmGestureEngine@@QAEXABUTPointerEvent@@PAX@Z @ 5 NONAME ; void CStmGestureEngine::HandlePointerEventL(struct TPointerEvent const &, void *) + ?CreateContextL@CStmGestureEngine@@QAEPAVCStmGestureContext@@H@Z @ 6 NONAME ; class CStmGestureContext * CStmGestureEngine::CreateContextL(int) + ??0CStmGestureParameters@@QAE@ABV0@@Z @ 7 NONAME ; CStmGestureParameters::CStmGestureParameters(class CStmGestureParameters const &) + ?Context@CStmGestureEngine@@QAEPAVCStmGestureContext@@H@Z @ 8 NONAME ; class CStmGestureContext * CStmGestureEngine::Context(int) + ?AddListenerL@CStmGestureContext@@QAEXPAVMStmGestureListener@@H@Z @ 9 NONAME ; void CStmGestureContext::AddListenerL(class MStmGestureListener *, int) + ?ActivateL@CStmGestureContext@@QAEXXZ @ 10 NONAME ; void CStmGestureContext::ActivateL(void) + ??0CStmGestureParameters@@QAE@XZ @ 11 NONAME ; CStmGestureParameters::CStmGestureParameters(void) + diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/eabi/stmgesturefwu.def --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/eabi/stmgesturefwu.def Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,17 @@ +EXPORTS + _ZN17CStmGestureEngine14CreateContextLEi @ 1 NONAME + _ZN17CStmGestureEngine19HandlePointerEventLERK13TPointerEventPv @ 2 NONAME + _ZN17CStmGestureEngine4NewLEv @ 3 NONAME + _ZN17CStmGestureEngine7ContextEi @ 4 NONAME + _ZN18CStmGestureContext10DeactivateEv @ 5 NONAME + _ZN18CStmGestureContext10SetContextEP11CCoeControl @ 6 NONAME + _ZN18CStmGestureContext12AddListenerLEP19MStmGestureListeneri @ 7 NONAME + _ZN18CStmGestureContext14RemoveListenerEP19MStmGestureListener @ 8 NONAME + _ZN18CStmGestureContext9ActivateLEv @ 9 NONAME + _ZN21CStmGestureParametersC1ERKS_ @ 10 NONAME + _ZN21CStmGestureParametersC1Ev @ 11 NONAME + _ZN21CStmGestureParametersC2ERKS_ @ 12 NONAME + _ZN21CStmGestureParametersC2Ev @ 13 NONAME + _ZTI18CStmGestureContext @ 14 NONAME + _ZTV18CStmGestureContext @ 15 NONAME + diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,31 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Build information +* +*/ + +#include +#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" + +PRJ_PLATFORMS +DEFAULT + +PRJ_EXPORTS +../rom/stmgesturefw.iby CORE_MW_LAYER_IBY_EXPORT_PATH(stmgesturefw.iby) + +PRJ_MMPFILES +#ifndef __S60_32__ +stmgesturefw.mmp +#endif + diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/group/stmgesturefw.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/group/stmgesturefw.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,71 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Project definition file +* +*/ + +#include +#include + +TARGET stmgesturefw.dll +TARGETTYPE dll +UID 0x1000008d 0x200212EA + +CAPABILITY CAP_CLIENT_DLL +VENDORID VID_DEFAULT + +USERINCLUDE ../inc +MW_LAYER_SYSTEMINCLUDE + + +#if defined(WINSCW) +deffile ../BWINS/stmgesturefw.def +#elif defined(ARMCC) +deffile ../EABI/stmgesturefw.def +#endif + +SOURCEPATH ../src +SOURCE gestureengine.cpp +SOURCE gestureframework.cpp +SOURCE gestureframeworkimpl.cpp +SOURCE genericsimplegesture.cpp +SOURCE tapgesturerecogniser.cpp +SOURCE pangesturerecogniser.cpp +SOURCE longpressgesturerecogniser.cpp +SOURCE pinchgesturerecogniser.cpp +SOURCE touchgesturerecogniser.cpp +SOURCE releasegesturerecogniser.cpp +SOURCE flickgesturerecogniser.cpp +SOURCE UiEvent.cpp +SOURCE stateengine.cpp +SOURCE statemachine.cpp +SOURCE uieventsender.cpp +SOURCE stateengineconfiguration.cpp +SOURCE utils.cpp +SOURCE stmgestureinterface.cpp +SOURCE gesturehelpereventsender.cpp +#ifdef GESTURE_LOGGING +SOURCE filelogger.cpp +#endif + +LIBRARY euser.lib +LIBRARY efsrv.lib +LIBRARY cone.lib +LIBRARY PlatformEnv.lib +LIBRARY bafl.lib +LIBRARY eikcore.lib +LIBRARY avkon.lib +LIBRARY gdi.lib +LIBRARY ws32.lib +LIBRARY flogger.lib diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/inc/callbacktimer.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/inc/callbacktimer.h Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,155 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Timer implementation +* +*/ + +#ifndef CALLBACKTIMER_H_ +#define CALLBACKTIMER_H_ +// INCLUDES +#include +#include +#include +#include +#include +#include + +namespace stmUiEventEngine +{ +/** + * define the method to be called by the timer; this includes the pointer number + * the timer is associated with (maybe some other solution could do this, but...) + */ +class CStateMachine ; +typedef void (CStateMachine::*CallbackFunctionL)(TInt aPointerNumber); + + +/** + * CCallbackTimer to implement the timers. This needs to be replaced + * with something else if cross platform is needed. + */ +NONSHARABLE_CLASS( CCallbackTimer ): public CTimer +{ +public: + /** Two-phase constructor */ + static CCallbackTimer* NewL(CStateMachine& aHelper, + CallbackFunctionL aCallbackFunctionL, + TInt aDelay, + TInt aPointerNumber, + TBool aIsEnabled) + { + CCallbackTimer* self = new (ELeave) CCallbackTimer(aHelper, + aCallbackFunctionL, aDelay, aPointerNumber, aIsEnabled); + CleanupStack::PushL(self); + self->ConstructL(); // construct base class + CActiveScheduler::Add(self); + CleanupStack::Pop(self); + return self; + } + + /** Destructor */ + ~CCallbackTimer() + { + Cancel(); + } + + /** Set whether sending events is currently enabled */ + void SetEnabled(TBool aEnabled) + { + iIsEnabled = aEnabled; + // cancel in case timer is already running + Cancel(); + } + + /** @return whether sending events is currently enabled */ + TBool IsEnabled() const + { + return iIsEnabled; + } + + /** Start the timer. Calls callback upon completion. It is possible to give temporary delay if needed, + * otherwise use the defined delay. + */ + void Start(TInt aNewDelay = 0) + { + if (iIsEnabled) + { + Cancel(); + if (aNewDelay != 0) + { + After(aNewDelay); + } + else + { + After(iDelay); + } + } + } + void SetDelay(TInt aDelay) + { + iDelay = aDelay; + } + TInt GetDelay() + { + return iDelay; + } + /** + * method for checking are we inside the RunL method... + */ + TBool isTriggered() + { + return iIsTriggered; + } + +private: + /** Constructor */ + CCallbackTimer(CStateMachine& aHelper, CallbackFunctionL aCallbackFunctionL, + TInt aDelay, TInt aPointerNumber, TBool aIsEnabled) + : + CTimer(EPriorityRealTime - 1), // handle the timers always first before anything else + iHelper(aHelper), iCallbackFunctionL(aCallbackFunctionL), + iDelay(aDelay), iIsEnabled(aIsEnabled), iPointerNumber(aPointerNumber) + { + iIsTriggered = EFalse; + } + + void RunL() // From CActive + { + iIsTriggered = ETrue ; + (iHelper .*iCallbackFunctionL)(iPointerNumber); + iIsTriggered = EFalse ; + } + +private: + /// helper object that will be called back when timer is triggered + CStateMachine& iHelper; + /// Function in the iHelper object call + CallbackFunctionL iCallbackFunctionL; + /// How long a time to wait before calling back after Start() + TInt iDelay; + /// whether sending holding events is currently enabled + TBool iIsEnabled; + /** + * while we are inside RunL iIsTriggered = ETrue + */ + TBool iIsTriggered; + /* + * in multitouch now we need timers for each pointer + * could this be handled in some other way? + */ + TInt iPointerNumber ; +}; +} // namespace + +#endif /* CALLBACKTIMER_H_ */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/inc/edgescrollgesturerecogniser.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/inc/edgescrollgesturerecogniser.h Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,96 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Edge Scroll Recognizer +* +*/ + +#ifndef EDGESCROLLGESTURERECOGNISER_H_ +#define EDGESCROLLGESTURERECOGNISER_H_ + +#include "rt_gestureengineif.h" +#include +#include + +class CCoeControl ; + +namespace stmGesture +{ + +/*! + * CEdgeScrollGestureRecogniser handles edge scroll gesture: Hold event near the edges of the window + * + */ +NONSHARABLE_CLASS( CEdgeScrollGestureRecogniser ): public CPeriodic, + public MGestureRecogniserIf +{ +public: + static const TGestureUid KUid = EGestureUidEdgeScroll; + + /** Two-phase constructor */ + static CEdgeScrollGestureRecogniser* NewL(MGestureListener* aListener); + virtual ~CEdgeScrollGestureRecogniser(); + + /*! + * MGestureRecogniserIf methods + */ + virtual TGestureRecognitionState recognise(int numOfActiveStreams, MGestureEngineIf* ge) ; + virtual void release(MGestureEngineIf* ge) ; + virtual void enable(bool enabled) ; + virtual bool isEnabled() ; + virtual void setOwner(CCoeControl* owner) ; + + virtual TGestureUid gestureUid() const + { + return KUid; + } + + /*! + * Additional methods to set up edge scroll gesture recogniser: + * define the rectangle where the edges would be watched. + * \param theArea + */ + void setArea(const TRect& theArea) ; + + /*! + * Additional methods to set up edge scroll gesture recogniser: + * Define how close to the border the Hold UI event must be + * \param rangeInPixels + */ + void setScrollRange(int rangeInPixels) ; + /*! + * for testing purposes we need to log the stuff somewhere... + */ +public: + virtual void enableLogging(bool loggingOn) ; + /*! + * The timer function to handle timeout for generating scroll events + */ + virtual void RunL() ; + + +private: + CEdgeScrollGestureRecogniser(MGestureListener* aListener) ; + bool m_loggingenabled ; +private: + CCoeControl* m_powner ; // The owning control for this gesture + MGestureListener* m_listener ; + bool m_waitingforsecondtap ; + TRect m_area ; + bool m_gestureEnabled ; + int m_rangesizeInPixels ; +}; + +} // namespace + +#endif /* EDGESCROLLGESTURERECOGNISER_H_ */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/inc/filelogger.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/inc/filelogger.h Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,88 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: API for FileLogger.dll +* +*/ +// This file defines the API for FileLogger.dll +#ifndef __FILELOGGER_H__ +#define __FILELOGGER_H__ + +#include +const TInt KMaxLogEntrySize = 400; + +#ifdef GESTURE_LOGGING +#if defined(__WINS__) && !defined(__SERIES60_30__) +#define RDEBUG(args...) RDebug::Printf(args) +#define RDEBUG8(args) RDebug::RawPrint(args) +#define RDEBUG16(args...) RDebug::Print(args...) +#else +#define RDEBUG(args...) +#define RDEBUG8(args) +#define RDEBUG16(args...) +#endif + +#define LOGFLUSH CFileLogger::Flush() +#define LOGCLOSE CFileLogger::Close() +#define LOGARG(txt,parm...) {_LIT8(KTxt, txt); CFileLogger::Write(KTxt, parm); RDEBUG(txt, parm);} +#define LOGTXT(txt) {_LIT8(KTxt, txt); CFileLogger::Write((const TDesC8&)KTxt); RDEBUG8(KTxt);} +#define LOGDES8(des) {CFileLogger::Write(des); RDEBUG8(des);} +#define LOGDES16(des) {CFileLogger::Write(des); RDEBUG16(des);} +#define LOGERR(txt,err) if (!err) {} else {LOGARG(txt, err);} +#define LOGCALL(exp) {LOGARG("Calling \"%s\"", #exp); exp; LOGARG("Call to \"%s\" passed.", #exp);} +#define LOGENTER LOGARG("%s start", __PRETTY_FUNCTION__) +#define LOGEXIT LOGARG("%s end", __PRETTY_FUNCTION__) +#define LOGMEM(ptr) LOGARG("%s [0x%x]", #ptr, (TUint)ptr) + +NONSHARABLE_CLASS( CFileLogger ): public CBase +{ +public: + static void Write(const TDesC8& aText); + static void Write(const TDesC16& aText); + static void Write(TRefByValue aFmt,...); + static void Close(); + static void Flush(); + +private: + CFileLogger(); + ~CFileLogger(); + TBool Construct(); + static CFileLogger* Logger(); + void DoWrite(); + TBool GetLogFileNameWithoutExt(TDes& aFileName); + void DoFlush() ; + +private: + RFs iFs; + RFile iFile; + TBuf8 iLogBuffer; +}; + +#else +#define LOGFLUSH +#define LOGCLOSE +#define LOGARG(txt,parm...) +#define LOGTXT(txt) +#define LOGDES8(des) +#define LOGDES16(des) +#define LOGERR(txt,err) +#define LOGCALL(exp) +#define LOGENTER +#define LOGEXIT +#define LOGMEM(ptr) +#endif + + + + +#endif // __FILELOGGER_H__ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/inc/flickgesturerecogniser.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/inc/flickgesturerecogniser.h Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,71 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Flick Recognizer +* +*/ + +#ifndef FLICKGESTURERECOGNISER_H_ +#define FLICKGESTURERECOGNISER_H_ + +#include "rt_gestureengineif.h" +#include +#include + +class CCoeControl ; + +namespace stmGesture +{ + +/*! + * CFlickGestureRecogniser handles release "gesture" + * This is countarpart to touch gesture recogniser, just + * informing the app that ERelease has been seen. + * This should be placed towards the end of the list of gesture + * recognisers, all other recognisers which handle ERelease with + * some other events preceding the ERelease must be before this one. + * + */ +NONSHARABLE_CLASS( CFlickGestureRecogniser ): public CGestureRecogniser +{ +public: + static const TGestureUid KUid = EGestureUidFlick; + + /** Two-phase constructor */ + static CFlickGestureRecogniser* NewL(MGestureListener* aListener); + virtual ~CFlickGestureRecogniser(); + + /*! + * MGestureRecogniserIf methods + */ + virtual TGestureRecognitionState recognise(int numOfActiveStreams, MGestureEngineIf* ge) ; + virtual void release(MGestureEngineIf* ge) ; + + virtual TGestureUid gestureUid() const + { + return KUid; + } + +public: + void setFlickingSpeed(float aSpeed) __SOFTFP; + +private: + CFlickGestureRecogniser(MGestureListener* aListener) ; + +private: + float m_speed ; +}; + +} // namespace + +#endif /* FLICKGESTURERECOGNISER_H_ */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/inc/genericsimplegesture.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/inc/genericsimplegesture.h Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,113 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Gesture Definitions +* +*/ + +#ifndef GENERICSIMPLEGESTURE_H_ +#define GENERICSIMPLEGESTURE_H_ +#include +#include + + +namespace stmGesture +{ + +/*! + * Class for creating a simple gesture for notifying the listener. + * If the basic features are enough for the gesture, then this class + * is enough to be instantiated; there is the location and speed + * determined from the UI event; also type can be specified as well + * as integer detail data. + */ +NONSHARABLE_CLASS( TGenericSimpleGesture ): public MGestureIf +{ +public: + TGenericSimpleGesture( + TGestureUid uid, const TPoint& loc, int type = 0, + const stmUiEventEngine::MUiEventSpeed* speedIf = NULL); + +public: // implementation of MGestureIf + + TGestureUid gestureUid() const { return m_uid; } + void setDetails(int aDetails) { m_details = aDetails;} // additional info can be passed here. + /*! + * MGestureIf methods + */ + virtual TPoint getLocation() const ; // Location where the gesture happened (if applicable) + virtual int getType() const ; // If the gesture can have different types + virtual float getSpeedX() const __SOFTFP + { + return m_speed ? m_speed->speedX() : 0.f; + } + virtual float getSpeedY() const __SOFTFP + { + return m_speed ? m_speed->speedY() : 0.f; + } + virtual int getDetails() const ; // Other possible details.... + + virtual void setName(const TDesC8& aName) ; + virtual TPtrC8 getGestureName() ; // String name for gesture + +public: + void setType(int aType) + { + m_type = aType; + } + +protected: + TPoint m_location ; + TGestureUid m_uid; + int m_type ; + // What would be the other details? + int m_details ; + const stmUiEventEngine::MUiEventSpeed* m_speed ; + TPtrC8 m_name ; +}; + +NONSHARABLE_CLASS( TDirectionalGesture ): public TGenericSimpleGesture +{ +public: + TDirectionalGesture( + TGestureUid uid, const TPoint& loc, const TPoint& prevLoc, + const stmUiEventEngine::MUiEventSpeed* speedIf = NULL, bool logging = false); + + void setVector(const TPoint& last, const TPoint& previous) ; + void setLogging(bool enabled) { m_loggingEnabled = enabled; } + + TPoint getLengthAndDirection() const {return m_vector;} + TGestureDirection getDirection() const ; + TInt getLength() const + { + return ((m_vector.iX*m_vector.iX)+(m_vector.iY*m_vector.iY)) ; + } + +protected: + TPoint m_vector ; + bool m_loggingEnabled ; +}; + +NONSHARABLE_CLASS( TTwoPointGesture ): public TDirectionalGesture +{ +public: + TTwoPointGesture(TGestureUid uid, const TPoint& pos1, const TPoint& pos2); + TPoint getPinchEndPos() const { return m_location2; } + +private: + TPoint m_location2 ; +}; + +} // namespace + +#endif /* GENERICSIMPLEGESTURE_H_ */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/inc/gesturedefs.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/inc/gesturedefs.h Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,82 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +#ifndef _GESTUREDEFS_H_ +#define _GESTUREDEFS_H + +#include + +namespace stmUiEventEngine +{ + +/// time to hold the stylus in the same position to activate holding +const TInt KHoldDuration = 500000; // microseconds + +/// time to tap again for the second tap to be a double tap +const TInt KMaxDoubleTapDuration = 400000; // microseconds + +/// time in which speed becomes zero if user stops stylus movement before +/// lifting the pointer +const TInt KSpeedStopTime = 150000; // microseconds + +/// tolerance in degrees to either side of an angle, for direction to be the +/// same as reference angle +const TReal KAngleTolerance = 25; + +/// Nth pointer event before the latest point +const TInt KPreviousPointOffset = 3; + +/// Tolerance for ignoring small movements, percent of longer screen edge +const TInt KGestureTolerancePercent = 2; // of 100 + +const TInt KFingerSize_mm = 8; + +const TInt KTwipsInInch = 1440; + +const TReal KTwipsInMm = 56.7; + +const TInt KMaxTapDuration = 300000; //microseconds + +const TInt KFlickSpeed = 500; + +const TInt KDoubleTapMaxActivationInterval = 500000; // 500 ms + +const TInt KDoubleTapMinActivationInterval = 40000; // 40 ms + +const TInt KDoubleTapIdleInterval = 700000; // 700 ms, to prevent triple-tap effects + +const TInt KLongTapDuration = 2000000; //2 sec + +const TInt KMinTimeBetweenDrags = 20000; // 20 ms +/** + * Panic codes + */ +enum TGesturePanic + { + EGesturePanicIllegalLogic + }; + +/** Panics the thread */ +inline void Panic( TGesturePanic aReason ) + { + _LIT( KComponentName, "GestureHelper" ); + User::Panic( KComponentName, aReason ); + } + +} + +#endif // _GESTUREDEFS_H diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/inc/gestureengine.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/inc/gestureengine.h Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,111 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +#ifndef GESTUREENGINE_H_ +#define GESTUREENGINE_H_ + +#include +#include +#include + +#include "rt_gestureengineif.h" +#include "rt_uievent.h" + +namespace stmGesture +{ + +/*! + * CGEstureEngine handles the processing of the UI events. + * It acts as a stmUiEventEngine::MUiEventObserver to receive the UI events. + * The gesture recognisers are stored in a list, and at each HandleUiEventL the + * list of gesture recognisers is processed. The first one to return EGestureActive + * from the recognise method "owns" the gesture. If some other recogniser owned it + * previously, its release method is called. Gesture recogniser can also lock the gesture + * by returning ELockToThisGesture. Then only that gesture recogniser will be called + * until release is detected or the recogniser returns something else than ELockToThisGesture. + */ +NONSHARABLE_CLASS( CGestureEngine ): public CBase, + public MGestureEngineIf, + public stmUiEventEngine::MUiEventObserver +{ +public: + CGestureEngine(); + virtual ~CGestureEngine(); + + /*! + * add gesture to the end of the list of gestures + */ + virtual bool addGesture(const MGestureRecogniserIf* aNewGesture) ; + /*! + * inset a gesture to the beginning of the list of gestures + */ + virtual bool insertGesture(const MGestureRecogniserIf* aNewGesture) ; + /*! + * inset a gesture to the specific position + */ + virtual bool insertGestureAt(const MGestureRecogniserIf* aNewGesture, int position) ; + /*! + * remove a gesture from the list + */ + virtual bool removeGesture(const MGestureRecogniserIf* aOldGesture) ; + /*! + * get the number of non-empty event streams. + * Event streams correspond UI events generated by one touch pointer (=finger). + * The low level state machine handles the necessary filtering etc. + * so that it is safe to remove the event stream after UI Release event has been processed. + */ + virtual int activeStreamCount() const ; + /*! + * get the UI events of stream X + * \param indexOfActiveStream defines which active stream is used. + * Note that MUiEvent contains all the events from down up to the current event. + * Assumption: the UI events contain the target "window handle", i.e. + * the gesture recognition needs to be aware of all possible windows of the application. + */ + virtual const stmUiEventEngine::MUiEvent* getUiEvents(int indexOfActiveStream) const ; + /*! + * enable/disable logging + */ + virtual void enableLogging(bool aLoggingEnabled) {m_loggingEnabled = aLoggingEnabled;} ; + /*! + * The stmUiEventEngine::MUiEventObserver interface + */ + virtual void HandleUiEventL( const stmUiEventEngine::MUiEvent& aEvent ) ; +private: + /*! + * The list of available gesture recognisers + */ + RPointerArray< MGestureRecogniserIf > m_gestures; + /*! + * Is 5 UI event streams enough? Jos tulee Torvisen voittaja? + * We need to store only the latest event since the interface has + * methods to walk trough the events. The current (sept 2009) 9.2 seems to have dual-touch support + */ + const stmUiEventEngine::MUiEvent* m_uiEventStream[stmUiEventEngine::KMaxNumberOfPointers] ; + + void storeUiEvent(const stmUiEventEngine::MUiEvent& aEvent) ; + void walkTroughGestures() ; + void updateUiEvents() ; + int m_numOfActiveStreams ; + int m_currentGestureOwner ; + int m_currentLockedGesture ; + bool m_loggingEnabled ; +}; + +} + +#endif /* GESTUREENGINE_H_ */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/inc/gestureframework.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/inc/gestureframework.h Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,104 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +#ifndef GESTUREFRAMEWORK_H +#define GESTUREFRAMEWORK_H + +// INCLUDES +#include +#include +#include "rt_gestureengineif.h" +#include +#include + +// external classes +namespace stmUiEventEngine +{ + class CStateMachine ; +} + +// CLASS DECLARATION +namespace stmGesture +{ +// Forward declarations +class CGestureFrameworkImpl ; + +/*! + * Gesture framework contains the following elements + * \li UI State Machine. This is the lower level driver handling the events and generating UI events. + * Gesture framework creates an instance of the UI state machine and adds itself to be the UI event listener. + * \li Gesture Engine. The gesture engine processes the UI events received via MUiEventObserver + * and calls gesture recogniser interface MGestureRecogniserIf of all the gestures in the list. + * \li Gesture Recognisers. Gesture recognisers scan the list of UI events and if they recognise + * a gesture, they call the MGestureListener. + */ +NONSHARABLE_CLASS( CGestureFramework ): public CBase +{ +public: + // Constructors and destructor + + /** + * Destructor. + */ + virtual ~CGestureFramework(); + + /** + * Two-phased constructor. + */ + static CGestureFramework* NewL(); + + /** + * Two-phased constructor. + */ + static CGestureFramework* NewLC(); +public: + // new functions, + static TVersion Version(); + /*! + * Get the gesture engine interface + */ + MGestureEngineIf* getGestureEngine() ; + /*! + * Get the underlying low level UI event interface + */ + stmUiEventEngine::CStateMachine* getUiStateMachine() ; + /*! + * logging on or off + */ + void enableLogging(bool loggingEnabled); + +private: + + /*! + * Constructor for performing 1st stage construction + */ + CGestureFramework(); + + /*! + * EPOC default constructor for performing 2nd stage construction + */ + void ConstructL(); + +private: + CGestureFrameworkImpl* m_impl ; + + bool m_loggingenabled ; + +}; + +} // namespace +#endif // GESTUREFRAMEWORK_H diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/inc/gestureframeworkimpl.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/inc/gestureframeworkimpl.h Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,90 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +#ifndef GESTUREENGINEIMPL_H +#define GESTUREENGINEIMPL_H + +// INCLUDES +#include +#include + +// forward declarations +namespace stmUiEventEngine +{ + class CStateMachine ; + class MStateMachine ; +} + +// CLASS DECLARATION +namespace stmGesture +{ +// Forward declarations +class CGestureEngine ; +class MGestureEngineIf ; + +/** + * CGestureFrameworkImpl + * + */ +NONSHARABLE_CLASS( CGestureFrameworkImpl ): public CBase +{ +public: + // Constructors and destructor + + /** + * Destructor. + */ + ~CGestureFrameworkImpl(); + + /** + * Two-phased constructor. + */ + static CGestureFrameworkImpl* NewL(); + + /** + * Two-phased constructor. + */ + static CGestureFrameworkImpl* NewLC(); + /*! + * + */ + MGestureEngineIf* getGestureEngine() ; + /*! + * + */ + stmUiEventEngine::CStateMachine* getUiStateMachine() {return m_statemachine; } + + void enableLogging(bool loggingEnabled) ; +private: + + /** + * Constructor for performing 1st stage construction + */ + CGestureFrameworkImpl(); + + /** + * EPOC default constructor for performing 2nd stage construction + */ + void ConstructL(); + + CGestureEngine* m_gestureEngine ; + stmUiEventEngine::CStateMachine* m_statemachine ; + bool m_loggingenabled ; + +}; +} // namespace +#endif // GESTUREENGINEIMPL_H diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/inc/gesturehelpereventsender.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/inc/gesturehelpereventsender.h Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,51 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Gesture helper implementation +* +*/ + +#ifndef GESTUREHELPEREVENTSENDER_H_ +#define GESTUREHELPEREVENTSENDER_H_ + +#include +#include +#include "stmgestureinterface.h" + +NONSHARABLE_CLASS(CGestureEventSender) : public CActive + { +public: + enum TEventSenderState + { + ENoEvents, + EEventsReady, + EBusy + }; + static CGestureEventSender* NewL( MStmGestureListener& aObserver ); + ~CGestureEventSender(); + TInt AddEvent(TStmGestureUid aUid, const MStmGesture* aGestureEvent); +protected: + void RunL(); + void DoCancel(); + TInt RunError(TInt aError); +private: + CGestureEventSender(MStmGestureListener& aObserver); + void Complete(); + void EmitEventL( const TStmGestureEvent& aGestureEvent ); + + MStmGestureListener& iObserver; + RArray< TStmGestureEvent > iEvents; + TEventSenderState iState; + }; + +#endif /* GESTUREHELPEREVENTSENDER_H_ */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/inc/hoveringgesturerecogniser.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/inc/hoveringgesturerecogniser.h Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,64 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description:Hover Gesture Recognizer +* +*/ + +#ifndef HOVERINGGESTURERECOGNISER_H_ +#define HOVERINGGESTURERECOGNISER_H_ + +#include "rt_gestureengineif.h" +#include +#include + +class CCoeControl ; + +namespace stmGesture +{ +/*! + * Recognise hovering gesture. + * If the EMove distance from previous is short enough, then + * we assume hovering gesture. If the previous UI event is ETouch, EHold or EMove + * and the distance is short enough the gesture takes control. + */ +NONSHARABLE_CLASS( CHoveringGestureRecogniser ): public CGestureRecogniser +{ +public: + static const TGestureUid KUid = EGestureUidHover; + + static CHoveringGestureRecogniser* NewL(MGestureListener* aListener); + + virtual ~CHoveringGestureRecogniser(); + /*! + * MGestureRecogniserIf methods + */ + virtual TGestureRecognitionState recognise(int numOfActiveStreams, MGestureEngineIf* ge) ; + virtual void release(MGestureEngineIf* ge) ; + + virtual TGestureUid gestureUid() const + { + return KUid; + } + + void setHoveringSpeed(float aSpeed) __SOFTFP ; + +private: + CHoveringGestureRecogniser(MGestureListener* aListener) ; + bool m_hovering ; + float m_hoveringspeed ; +}; + +} + +#endif /* HOVERINGGESTURERECOGNISER_H_ */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/inc/leftrightgesturerecogniser.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/inc/leftrightgesturerecogniser.h Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,55 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: LeftRight Gesture Recognizer +* +*/ + +#ifndef LEFTRIGHTGESTURERECOGNISER_H_ +#define LEFTRIGHTGESTURERECOGNISER_H_ + +#include "rt_gestureengineif.h" +#include +#include + +class CCoeControl ; + +namespace stmGesture +{ + +NONSHARABLE_CLASS( CLeftrightGestureRecogniser ): public CGestureRecogniser +{ +public: + static const TGestureUid KUid = EGestureUidLeftRight; + + static CLeftrightGestureRecogniser* NewL(MGestureListener* aListener); + + virtual ~CLeftrightGestureRecogniser(); + /*! + * MGestureRecogniserIf methods + */ + virtual TGestureRecognitionState recognise(int numOfActiveStreams, MGestureEngineIf* ge) ; + virtual void release(MGestureEngineIf* ge) ; + + virtual TGestureUid gestureUid() const + { + return KUid; + } + +private: + CLeftrightGestureRecogniser(MGestureListener* aListener) ; +}; + +} + +#endif /* LEFTRIGHTGESTURERECOGNISER_H_ */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/inc/longpressgesturerecogniser.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/inc/longpressgesturerecogniser.h Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,71 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description:LongPress Gesture Recognizer +* +*/ + +#ifndef LONGPRESSGESTURERECOGNISER_H_ +#define LONGPRESSGESTURERECOGNISER_H_ + +#include "rt_gestureengineif.h" +#include +#include + +class CCoeControl ; + +namespace stmGesture +{ + +/*! + * CLongPressGestureRecogniser handles long press gesture (generated from Hold UI event) + * + */ +NONSHARABLE_CLASS( CLongPressGestureRecogniser ): public CGestureRecogniser +{ +public: + static const TGestureUid KUid = EGestureUidLongPress; + + /** Two-phase constructor */ + static CLongPressGestureRecogniser* NewL(MGestureListener* aListener); + virtual ~CLongPressGestureRecogniser(); + + /*! + * MGestureRecogniserIf methods + */ + virtual TGestureRecognitionState recognise(int numOfActiveStreams, MGestureEngineIf* ge) ; + virtual void release(MGestureEngineIf* ge) ; + + virtual TGestureUid gestureUid() const + { + return KUid; + } + + /*! + * Additional methods to set up edge scroll gesture recogniser: + * define the rectangle + * \param theArea + */ + void setArea(const TRect& theArea) ; + +private: + CLongPressGestureRecogniser(MGestureListener* aListener) ; + +private: + bool m_waitingforsecondtap ; + TRect m_area ; +}; + +} // namespace + +#endif /* LONGPRESSGESTURERECOGNISER_H_ */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/inc/pangesturerecogniser.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/inc/pangesturerecogniser.h Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,62 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description:Pan Gesture Recognizer +* +*/ + +#ifndef PANGESTURERECOGNISER_H_ +#define PANGESTURERECOGNISER_H_ + +#include "rt_gestureengineif.h" +#include +#include + +class CCoeControl ; + +namespace stmGesture +{ + +NONSHARABLE_CLASS( CPanGestureRecogniser ): public CGestureRecogniser +{ +public: + static const TGestureUid KUid = EGestureUidPan; + + static CPanGestureRecogniser* NewL(MGestureListener* aListener); + + virtual ~CPanGestureRecogniser(); + /*! + * MGestureRecogniserIf methods + */ + virtual TGestureRecognitionState recognise(int numOfActiveStreams, MGestureEngineIf* ge) ; + virtual void release(MGestureEngineIf* ge) ; + + virtual TGestureUid gestureUid() const + { + return KUid; + } + + virtual void setPanningSpeedLow(float aSpeed) __SOFTFP ; + virtual void setPanningSpeedHigh(float aSpeed) __SOFTFP ; // speeds above this are flicks + +private: + CPanGestureRecogniser(MGestureListener* aListener) ; + +private: + float m_panningspeedlow ; + float m_panningspeedhigh ; +}; + +} + +#endif /* PANGESTURERECOGNISER_H_ */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/inc/pinchgesturerecogniser.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/inc/pinchgesturerecogniser.h Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,87 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description:Pinch Gesture Recognizer +* +*/ + +#ifndef PINCHGESTURERECOGNISER_H_ +#define PINCHGESTURERECOGNISER_H_ + +#include "rt_gestureengineif.h" +#include +#include + +class CCoeControl ; + +namespace stmGesture +{ +/*! + * Recognise pinching gesture. !!! very experimental !!! + * It seems that in capacitive touch in Symbian 9.4 touching with two + * fingers causes fast EDrag events which are far from each other. + * This gesture recogniser tries to use that feature + * to determine when the gestures looks like a pinch. + * Would requires a lot of tuning to be really useful, if at all possible. + * With current implementation it is easy to zoom in but + * almost impossible to zoom out. + */ +NONSHARABLE_CLASS( CPinchGestureRecogniser ): public CGestureRecogniser +{ +public: + static const TGestureUid KUid = EGestureUidPinch; + + static CPinchGestureRecogniser* NewL(MGestureListener* aListener); + + virtual ~CPinchGestureRecogniser(); + /*! + * MGestureRecogniserIf methods + */ + virtual TGestureRecognitionState recognise(int numOfActiveStreams, MGestureEngineIf* ge) ; + virtual void release(MGestureEngineIf* ge) ; + + virtual TGestureUid gestureUid() const + { + return KUid; + } + + /* define the pinch triggering as speed value */ + /* after EHold has been seen, then any move which is faster than this will enter pinch gesture */ + /* note that the value varies depending on techology, speed is measured as pixels / ms */ + void setPinchingSpeed(float aSpeed) __SOFTFP; + +private: + CPinchGestureRecogniser(MGestureListener* aListener) ; + + void calculateZoomingLine() ; + float calculateDistance() ; + int adjustPinchMove(float& aPreviousDistance, float aNewDistance) ; + +private: + bool m_pinching ; + float m_pinchingspeed ; + TPoint m_pinchstart ; + TPoint m_pinchend ; + + float m_m ; + float m_b ; + + float m_ddistance ; + bool m_holdseen ; + TPoint m_holdseenAtPos ; + TTime m_holdseenAtTime ; +}; + +} + +#endif /* PINCHGESTURERECOGNISER_H_ */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/inc/releasegesturerecogniser.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/inc/releasegesturerecogniser.h Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,75 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: release Gesture Recognizer +* +*/ + +#ifndef RELEASEGESTURERECOGNISER_H_ +#define RELEASEGESTURERECOGNISER_H_ + +#include "rt_gestureengineif.h" +#include +#include + +class CCoeControl ; + +namespace stmGesture +{ + +/*! + * CReleaseGestureRecogniser handles release "gesture" + * This is countarpart to touch gesture recogniser, just + * informing the app that ERelease has been seen. + * This should be placed towards the end of the list of gesture + * recognisers, all other recognisers which handle ERelease with + * some other events preceding the ERelease must be before this one. + * + */ +NONSHARABLE_CLASS( CReleaseGestureRecogniser ): public CGestureRecogniser +{ +public: + static const TGestureUid KUid = EGestureUidRelease; + + /** Two-phase constructor */ + static CReleaseGestureRecogniser* NewL(MGestureListener* aListener); + virtual ~CReleaseGestureRecogniser(); + + /*! + * MGestureRecogniserIf methods + */ + virtual TGestureRecognitionState recognise(int numOfActiveStreams, MGestureEngineIf* ge) ; + virtual void release(MGestureEngineIf* ge) ; + + virtual TGestureUid gestureUid() const + { + return KUid; + } + + /*! + * Additional methods to set up edge scroll gesture recogniser: + * define the rectangle where the touch is watched + * \param theArea + */ + void setArea(const TRect& theArea) ; + +private: + CReleaseGestureRecogniser(MGestureListener* aListener) ; + +private: + TRect m_area ; +}; + +} // namespace + +#endif /* RELEASEGESTURERECOGNISER_H_ */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/inc/rt_gestureengineif.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/inc/rt_gestureengineif.h Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,256 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +#ifndef RT_GESTUREENGINEIF_H_ +#define RT_GESTUREENGINEIF_H_ + +#include +#include + +// Forward declarations +class CCoeControl; + +namespace stmUiEventEngine +{ + class MUiEvent ; +} + +namespace stmGesture +{ + +// Forward declarations +class MGestureRecogniserIf ; + +/*! + * MGestureEngineIf defines the methods for the gesture recognisers + * to be added to the gesture engine. + * TODO: add rule based settings to position the gesture recognisers to the list. + * The gesture recogniser order rules would be defined how? + * - defining the order inside the application + * - defining the order in some configuration file (maybe not) + * + * This requires: + * - the gesture recognisers need to have an ID + * - a type can also be defined if the rules can be set based on types. + * + * The gesture recognisers are arranged in a list so that the correct gesture recogniser + * gets the opportunity to detect the gesture in time. An axample of a set of gesture recognisers + * could be e.g. + * + * |---------------------------------------------| + * | scrolling stop by tap -gesture recogniser | A is enabled only when needed, when enabled must precede all others + * | | (note that locking partly can be used to achieve the same) + * |---------------------------------------------| + * | location specific: zoom + button tap gesture| B these must detect the location first + * |---------------------------------------------| + * | location specific: zoom - button tap gesture| B these must detect the location first + * |---------------------------------------------| + * | location specific: edge scroll gesture | B these must detect the location first + * |---------------------------------------------| + * | pinch zoom gesture | standard gesture, but application wide (spans windows) + * | | C another requirement: disable all but me/restore state + * | | so that other gestures will not meddle in while pinching + * |---------------------------------------------| + * | hover gesture | C standard gesture, needs to detect the EMove speed + * |---------------------------------------------| + * | pan gesture | C standard gesture, but must be after hover + * |---------------------------------------------| + * | tap/doubletap gesture | C standard gesture, order not that important, since + * | | needs just to see certain events in history: touch/release + * |---------------------------------------------| + * + * The order of gesture recognisers determine how the system behaves, so there must be an easy way + * to define the order. The order could be defined either by specifying the IDs or just their types, if then the + * order is not that important. TODO to study whether it would be a good idea to implement this so that + * there are separate lists for the three different classes of gesture recognisers A, B and C; this might + * make the implementation simpler. + */ +class MGestureEngineIf +{ +public: + /*! + * add gesture to the end of the list of gestures + */ + virtual bool addGesture(const MGestureRecogniserIf* aNewGesture) = 0 ; + /*! + * inset a gesture to the beginning of the list of gestures + */ + virtual bool insertGesture(const MGestureRecogniserIf* aNewGesture) = 0 ; + /*! + * inset a gesture to specific position + */ + virtual bool insertGestureAt(const MGestureRecogniserIf* aNewGesture, int position) = 0 ; + + /*! + * remove a gesture from the list + */ + virtual bool removeGesture(const MGestureRecogniserIf* aOldGesture) = 0 ; + /*! + * get the number of non-empty event streams. + * Event streams correspond UI events generated by one touch pointer (=finger). + * The low level state machine handles the necessary filtering etc. + * so that it is safe to remove the event stream after UI Release event has been processed. + */ + virtual int activeStreamCount() const = 0 ; + /*! + * get the UI events of stream X + * \param indexOfActiveStream defines which active stream is used. + * Note that MUiEvent contains all the events from down up to the current event. + * Assumption: the UI events contain the target "window handle", i.e. + * the gesture recognition needs to be aware of all possible windows of the application. + */ + virtual const stmUiEventEngine::MUiEvent* getUiEvents(int indexOfActiveStream) const = 0 ; + /*! + * Enable/disable logging + */ + virtual void enableLogging(bool aLoggingEnabled) = 0 ; +}; + +/*! + * Enumerated values for the gesture recogniser + */ +enum TGestureRecognitionState +{ + EGestureActive, /*! < gesture recognised and gesture notification sent */ + ELockToThisGesture, /*! < gesture recognised, and only this recogniser called until release/this returns something else */ + ENotMyGesture /*! < not this gesture, try the next one in the list */ +}; + +/*! + * The types of gesture recognisers. TODO to implement rule based gesture engine + * where the recognisers can be added in any order, and the rules define the order of them. + * The rules may define + */ +enum TGestureRecogniserType +{ + ECriticalGestureRecogniser, /*! < This kind of gestures should be at the beginning of the list */ + ELocationSpecificGestureRecogniser, /*! < This kind of gestures should be at the next in the list */ + EGenericGestureRecogniser /*! < This kind of gestures should be at the next in the list */ +}; + +/*! + * MGestureRecogniserIf defines the interface needed to be implemented by every gesture recognition element. + * The gesture recogniser gets the UI events and needs to determine whether they define the expected gesture. + * + */ +class MGestureRecogniserIf +{ +public: + /*! + * Virtual destuructor. + */ + virtual ~MGestureRecogniserIf() {} + /*! + * Process the UI event. + * \param numOfActiveStreams : indicates how many pointers are currently active. + * \param ge the gesture engine. The Gesture recogniser uses this to get the current active events. + * + * \return EMaybeGesture if gesture was not yet recognised but can be possible (e.g. after first touch everyone returns this) + * \return EGestureActive if gesture was recognised and a gesture notification was sent; this is then the active gesture + * \return ENotMygesture if gesture can not be this one, e.g. TAP gesture after receiving Move UI event. + * + * Note that a gesture may take control only if it sends out a gesture notification. (or is it so?) + * Until no gesture recogniser has sent a gesture notification, all recognisers who have not returned + * ENotMyGesture are eligible, based on the order they are in the list. + * + * The gesture engine may be either in dynamic gestures mode or fixed gestures mode. + * In dynamic gestures mode each time an UI event is processed, engine will call each + * gesture recogniser until one of the recognisers returns EGestureActive. + * + * In fixed gestures mode the index of the gesture recogniser first returning EGestureActive is stored + * and the subsequent UI events are processed so that only that recogniser is allowed to send gesture + * notification. If it returns !=EGestureActive, it relinguishes the control. + * + */ + virtual TGestureRecognitionState recognise(int numOfActiveStreams, MGestureEngineIf* ge) = 0 ; + /*! + * In dynamic gestures mode the gesture engine will call release of the recogniser + * who lost activation status because a preceding recogniser in the list took control. + * + * Note that the recogniser must then do whatever (if anything) is needed to cancel the gesture. + */ + virtual void release(MGestureEngineIf* ge) = 0 ; + /*! + * Enable or disable recogniser. E.g. if two gestures are related so that + * a gesture ending recogniser needs to be activated to stop a t5imer driven + * behaviour it is useful to add the recogniser to the top of the list + * and then disable it until needed. + */ + virtual void enable(bool enableRecogniser) = 0 ; + /*! + * Get the state of the gesture recogniser, whether it is enabled or not + * \return true, if the recogniser is enabled. + */ + virtual bool isEnabled() = 0 ; + /*! + * Return the type of the gesture recogniser + */ + virtual TGestureUid gestureUid() const = 0; + + /*! + * for testing purposes + */ + virtual void enableLogging(bool loggingEnabled) = 0 ; + + virtual void setOwner(CCoeControl* owner) = 0; +}; + +NONSHARABLE_CLASS( CGestureRecogniser ): public CBase, public MGestureRecogniserIf +{ +public: + virtual ~CGestureRecogniser() + { + + } + /*! + * MGestureRecogniserIf methods; partial implementation + */ + virtual void enable(bool enabled) + { + m_gestureEnabled = enabled ; + } + virtual bool isEnabled() + { + return m_gestureEnabled ; + } + virtual void enableLogging(bool loggingOn) + { + m_loggingenabled = loggingOn; + } + virtual void setOwner(CCoeControl* owner) + { + m_powner = owner; + } +protected: + CGestureRecogniser(MGestureListener* aListener) : + m_powner(aListener->getOwner()), + m_listener(aListener), + m_gestureEnabled(true), + m_loggingenabled(false) + { + + } + +protected: + CCoeControl* m_powner ; // The owning control for this gesture + MGestureListener* m_listener ; + bool m_gestureEnabled ; + bool m_loggingenabled ; +}; + +} // namespace +#endif /* RT_GESTUREENGINEIF_H_ */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/inc/rt_gesturelistener.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/inc/rt_gesturelistener.h Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,59 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: MGestureListener +* +*/ + +#ifndef RT_GESTURELISTENER_H_ +#define RT_GESTURELISTENER_H_ + +#include + +namespace stmGesture +{ +/*! + * The gesture listener interface. This interface needs to be implemented by the + * listener of the standard gestures implemented in the gesture framework. + */ +class MGestureListener +{ +public: + /*! + * The method that will be called by the gesture framework + * to inform about a gesture being recognised. + * \param theGesture: contains the recognised gesture. + * The MGestureIf contains generic part and gesture specific part + * so the listener needs to know how to handle specific gestures. + */ + virtual void gestureEnter(MGestureIf& theGesture) = 0 ; + /*! + * The method to inform the listener that the gesture has ended. + * This happens if another gesture is recognised or e.g. the Release UI + * event is handled. + * \note Some gestures produce only gestureEnter() callback and no gestureExit(). + */ + virtual void gestureExit(TGestureUid gestureUid) = 0 ; + /*! + * The listener needs to provide the target control (CCoeControl*) to the + * standard gestures. Since the gesture framework processes all events in the + * application, the gesture recognisers check whether the events are targeted + * to the listener owning control. + * Not all gesture recognisers need to perform this check. + * \return the owning CCoeControl of the gesture listener. + */ + virtual CCoeControl* getOwner() = 0 ; +}; + +} +#endif /* RT_GESTURELISTENER_H_ */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/inc/stateengine.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/inc/stateengine.h Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,180 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: State Engine +* +*/ +#ifndef STATEENGINE_H_ +#define STATEENGINE_H_ + +#include "rt_uievent.h" +#include "timerinterface.h" +#include "statemachine_v2.h" +#include "uieventsender.h" +#include "stateengineconfiguration.h" + +namespace stmUiEventEngine +{ + +/*! + * Define THwEvent since we need the point, the type and timestamp to be stored. + * The HW event is used also to handle the timer events so that the wrapper class calling the + * state machine will handle the starting, canceling etc. of the timers and the state machine + * sees the timers as messages. This hopefully makes it easier to keep the core state machine as + * OS agnostic as possible. + */ +class THwEvent +{ +public: + THwEvent() {} ; + THwEvent(const THwEvent& ev): + iType(ev.iType), iPosition(ev.iPosition), + iTime(ev.iTime), iTarget(ev.iTarget), iPointerNumber(ev.iPointerNumber) {} + THwEvent(TStateMachineEvent code, + const TPoint& pos, + TTime time, + void* aTarget, + TInt aPointerNr): + iType(code), iPosition(pos), + iTime(time), iTarget(aTarget), iPointerNumber(aPointerNr) + { + } + + TStateMachineEvent iType ; + TPoint iPosition ; + TTime iTime ; + void* iTarget ; + TInt iPointerNumber ; +}; + + +NONSHARABLE_CLASS( CStateEngine ) : public CBase +{ +public: + /** + * constructor and destructor + */ + CStateEngine(CStateEngineConfiguration* aConfig, MTimerInterface* timerif, int index) ; + + ~CStateEngine() ; + /** + * The methods needed for state machine + */ + void ConsumeEvent() ; + bool IsTouchTimer() ; + bool IsHoldTimer() ; + bool IsSuppressTimer() ; + bool IsTouchTimeArea() ; + bool IsTouchArea() ; + bool IsHoldArea() ; + bool InsideTouchTimeArea() ; + bool InsideTouchArea() ; + bool InsideHoldArea() ; + bool LooksLikeHold() ; + void ErrorEvent() ; + void InitTouchTimer() ; + void InitHoldTimer() ; + void RestartHoldTimer() ; + void InitTouchSuppressTimer() ; + void InitMoveSuppressTimer() ; + void ClearTouchTimer() ; + void ClearHoldTimer() ; + void ClearSuppressTimer() ; + void ProduceTouch() ; + void ProduceMove() ; + void ProduceRelease() ; + void ProduceHold() ; + void RenameToDrag() ; + void PrepareTouchTimeArea() ; + void PrepareTouchArea() ; + void PrepareHoldArea() ; + void SetCurrentPos() ; + void SetGestureStart() ; + void AddToTouch() ; + void AddDraggingPos() ; + void StoreMovePos() ; + + /** + * The event interface + */ + + THwEvent& initEvent() + { + m_hwe.iPointerNumber = m_index; + return m_hwe; + } + + // event returned by initEvent() must initialized first + bool handleStateEvent() ; + + TRect getTouchArea() ; + TRect getHoldArea() ; + bool wasLastMessageFiltered() ; + +private: + bool m_eventConsumed ; + THwEvent m_hwe ; + + bool isNewHoldingPoint() ; + RPointerArray iDragPoints; + MTimerInterface* m_timerif ; + + RArray iTouchPoints; + + // Variables for running the state machine + TStateMachineState m_currentState ; + bool m_isTimerEvent ; // We need to separate the pointer events and the timer events + TPoint m_currentTouchXY ; // This is the touching point + TPoint m_gestureStartXY ; // gesture started at this point + TPoint m_uiEventXY ; // The UI event XY point. + TPoint m_previousPointerEventPosition ; + TPoint m_deltaVector ; + TRect m_touchRect ; + TRect m_holdRect ; + + bool m_wasFiltered ; + void CalculateDelta() ; + void CalculateTouchAverage() ; + void CalculateCurrentVector() ; + TPoint calculateTouchAverageFromPoints() ; + bool InsideArea(const TPoint& point, + const TRect& rect, + TAreaShape shape, + const TPoint& tolerance); + void setTolerance(long fingersize_mm, TPoint& tolerance, TAreaShape shape) ; + + void DebugPrintState(TStateMachineState anextstate) ; + inline static TRect ToleranceRect( const TPoint& aCenterPoint, const TPoint& tolerance) ; + void turnStateMachine() ; + + TPoint m_touchCentre ; + TPoint m_holdCentre ; + + void* m_gestureTarget ; + TTimeIntervalMicroSeconds getInterval() ; + TTime m_lastMessageTime ; + CUiEvent* createUIEventL(TUiEventCode code, const TPoint& aPos) ; + TPoint getPreviousXY(const TPoint& aXY) ; + TPoint m_previousXY ; + bool isTimerMessage() ; + int m_index ; + TUiEventCode m_previousUiGenerated ; + TPoint m_lastFilteredPosition ; + TTime m_lastFilteredMessageTime ; + + CStateEngineConfiguration* m_config ; + +}; +} // namespace + +#endif /* STATEENGINE_H_ */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/inc/stateengineconfiguration.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/inc/stateengineconfiguration.h Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,79 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: State Engine Configuration +* +*/ + +#ifndef STATEENGINECONFIGURATION_H_ +#define STATEENGINECONFIGURATION_H_ + +#include "rt_uievent.h" +#include "timerinterface.h" +#include "statemachine_v2.h" + + +namespace stmUiEventEngine +{ +class CUiEventSender; + + +NONSHARABLE_CLASS( CStateEngineConfiguration ): public CBase +{ +public: + CStateEngineConfiguration() ; + void ConstructL(); + ~CStateEngineConfiguration() ; + + void setTouchTimeArea(const long fingersize_mm) ; + void setTouchArea(const long fingersize_mm) ; + TAreaShape getTouchAreaShape() ; + void setTouchAreaShape(const TAreaShape shape) ; + unsigned int getTouchTimeout() ; + void setTouchTimeout(unsigned int) ; + void setHoldArea(const long fingersize_mm) ; + TAreaShape getHoldAreaShape() ; + void setHoldAreaShape(const TAreaShape shape) ; + unsigned int getHoldTimeout() ; + void setHoldTimeout(unsigned int a) ; + unsigned int getTouchSuppressTimeout() ; + void setTouchSuppressTimeout(unsigned int a) ; + unsigned int getMoveSuppressTimeout() ; + void setMoveSuppressTimeout(unsigned int a) ; + bool addUiEventObserver(MUiEventObserver* observer) ; + bool removeUiEventObserver(MUiEventObserver* observer) ; + void enableLogging(bool a) ; + +private: + void setTolerance(long fingersize_mm, TPoint& tolerance, TAreaShape shape) ; + +public: + CUiEventSender* m_uiEventSender ; + + TAreaShape m_touchAreaShape ; + TAreaShape m_holdAreaShape ; + bool m_enableLogging ; + TPoint m_touchTimeTolerance ; + TPoint m_touchTolerance ; + TPoint m_holdTolerance ; + int m_touchTimerLimit ; + int m_holdTimerLimit ; + int m_suppressTimerLimit ; + int m_moveSuppressTimerLimit ; + + +}; + +} // namespace stmUiEventEngine + +#endif /* STATEENGINECONFIGURATION_H_ */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/inc/statemachine.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/inc/statemachine.h Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,177 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: State Machine implementation +* +*/ + +#ifndef STATEMACHINE_H +#define STATEMACHINE_H + +// INCLUDES +#include +#include + +#include +#include "timerinterface.h" +#include "statemachine_v2.h" + +class CCoeEnv; + +namespace stmUiEventEngine +{ + +class CCallbackTimer; +class CStateEngine; +class THwEvent; +class CStateEngineConfiguration; + + +int Distance(int dx, int dy); + +inline int Distance(const TPoint& aP1, const TPoint& aP2) +{ + return Distance(aP1.iX - aP2.iX, aP1.iY - aP2.iY); +} + +// CLASS DECLARATION +/** + * CStateMachine + * + */ +NONSHARABLE_CLASS( CStateMachine ): public CBase, + public MTimerInterface, + public MAknWsEventObserver, + public MStateMachine +{ +public: + /** + * The MStateMachine interface methods + */ + virtual TRect getTouchArea(TInt aPointerNumber) ; + virtual void setTouchTimeArea(long fingersize_mm) ; + virtual void setTouchArea(long fingersize_mm) ; + virtual TAreaShape getTouchAreaShape() ; + virtual void setTouchAreaShape(const TAreaShape shape) ; + virtual unsigned int getTouchTimeout() ; + virtual void setTouchTimeout(unsigned int) ; + virtual TRect getHoldArea(TInt aPointerNumber) ; + virtual void setHoldArea(long fingersize_mm) ; + virtual TAreaShape getHoldAreaShape() ; + virtual void setHoldAreaShape(const TAreaShape shape) ; + virtual unsigned int getHoldTimeout(); + virtual void setHoldTimeout(unsigned int a); + virtual unsigned int getTouchSuppressTimeout() ; + virtual void setTouchSuppressTimeout(unsigned int a) ; + virtual unsigned int getMoveSuppressTimeout() ; + virtual void setMoveSuppressTimeout(unsigned int a) ; + virtual bool addUiEventObserver(MUiEventObserver* observer) ; + virtual bool removeUiEventObserver(MUiEventObserver* observer) ; + virtual bool wasLastMessageFiltered(TInt aPointerNumber) ; + virtual void enableCapacitiveUp(bool enable) ; + virtual void enableLogging(bool aEnable) ; + virtual void enableYadjustment(bool aEnable) ; + virtual int getNumberOfPointers() ; + + /** + * MAknWsEventObserver methods + */ + virtual void HandleWsEventL(const TWsEvent& aEvent, CCoeControl* aDestination) ; + + /* other methods */ + /** + * Pointer event handling in case the messaging should be handled that way, note that the target CCoeControl needs to be givem + */ + void HandlePointerEventL(const TPointerEvent& aPointerEvent, void* target) ; + /** + * Simple toggle changes from handling the messages using ...WsEventL or ...PointerEventL + */ + void EnableWsEventMonitoring(bool aEnable) ; + /** + * Method to handle the TPointerEvent + */ + bool HandleStateEvent(const TPointerEvent& aPointerEvent, void* aTarget, const TTime& aTime) ; + /*! + * Setting the Y adjustment useful in capacitive touch + * Note that there are problems with the adjustment if done at this level, + * the most proper place would be the window server. + */ + + /** + * MTimerInterface methods, these are internal and do not need to be exported + */ + virtual void startTouchTimer(TInt aDelay, TInt aPointerNumber) ; + virtual void cancelTouchTimer(TInt aPointerNumber) ; + virtual void startHoldTimer(TInt aDelay, TInt aPointerNumber) ; + virtual void cancelHoldTimer(TInt aPointerNumber) ; + virtual void startSuppressTimer(TInt aDelay, TInt aPointerNumber) ; + virtual void cancelSuppressTimer(TInt aPointerNumber) ; + +public: + ~CStateMachine(); + static CStateMachine* NewL(); + static CStateMachine* NewLC(); + +private: + CStateMachine(); + void ConstructL(); + + inline static TInt PointerIndex(const TPointerEvent& aPointerEvent); + + /** + * Convert pointer event into our own event format (including timestamp) + */ + void CreateHwEvent(THwEvent& aEvent, + const TPointerEvent& aPointerEvent, + void* aTarget, + const TTime& aTime) ; + + void CreateTimerEvent(THwEvent& aEvent, TStateMachineEvent aEventCode) ; + + /** + * the actual state machines implementing the transitions etc. + */ + CStateEngine* m_impl[KMaxNumberOfPointers] ; + /* + * The configuration for state machines + */ + CStateEngineConfiguration* m_config ; + /*! + * convert window coordinates to screen coordinates. + */ + TPoint screenCoordinates(const TPoint& aPos, void* aGestureTarget) ; + + CCoeEnv* m_coeEnv; + + bool m_WasMessageFiltered ; + bool m_wseventmonitoringenabled ; + bool m_loggingenabled ; + bool m_capacitiveup ; + + int m_3mminpixels ; + bool m_adjustYposition ; + // Use same naming scheme with the timers, and variables and methods + // using macro expansion tricks (with multitouch support starts to look quite ugly): +#define DECLARE_TIMER(x) \ + void start##x##Timer(TInt aPointerNumber) ;\ + CCallbackTimer* m_##x##Timer[KMaxNumberOfPointers] ;\ + void handle##x##Timer(TInt aPointerNumber) ;\ + void cancel##x##Timer(TInt aPointerNumber) + + DECLARE_TIMER(touch) ; + DECLARE_TIMER(hold) ; + DECLARE_TIMER(suppress) ; + +}; +} // namespace +#endif // STATEMACHINE_H diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/inc/statemachine_v2.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/inc/statemachine_v2.h Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,117 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +#ifndef STATEMACHINE_V2_H_ +#define STATEMACHINE_V2_H_ + +namespace stmUiEventEngine +{ +/** + * the next templates define the static callbacks required to pass the this object to the member function + * There are two definitions, one for the TBool is*() method checking the message, + * the other one returning void for entry, event and action methods. + */ +template +bool isF(void *p) +{ + return ((reinterpret_cast(p))->*F)(); +} + +template +void aF(void *p) +{ + ((reinterpret_cast(p))->*F)(); +} + +///////////////////////////////////////////////////////////////////////////////////// +// We define the state machine in C fashion so that we get the initialized state table +// already at compilation phase. The message checking methods, event methods and action methods are +// then passed to the C++ object to be processed. +// The currently defined states are the following, at the same time they are used as the index to the array of states. +enum TStateMachineState { + Eignore, + EInit, + EDispatch, + EInTouchTime, + EInHoldTime_U, + EInHoldTime_D, + EInTouchArea, + ESuppress_D + } ; +// Using these kind of functions the state machine is of course single threaded +// the necessary parameters need to be passed in the member variables +typedef bool (*condition_t)(void* ) ; +typedef void (*action_t)(void*) ; + +/* + * The possible events to the state machine. The pointer and timer events are possible. + */ +enum TStateMachineEvent { + EDown, + EDrag, + ECapacitiveUP, + EResistiveUP, + ETouchTimer, + EHoldTimer, + ESuppressTimer + } ; +/*! + * STATE_ELEMENT defines one line in the state/event instance. + * It contains three fields: ConditionFunction, ActionFunction and NextState. + * The generic state machine will call the ConditionFunction (if it is != NULL) + * and if the result is true, it will call ActionFunction (if it is != NULL). + * Then it will continue to NextState. + * If NextState is Eignore, it will try the next line of state/event. + */ +typedef struct _STATE_ELEMENT { + /*! + * Condition function contains the pointer to the method used to check some condition. + * If the pointer is non-NULL the state machine will call the function and based on the result + * (if true) calls the ActionFunction. + */ + const condition_t conditionFunction ; + /*! + * ActionFunction contains a pointer to a method performing some action. The state machine + * will call the method if the pointer is non-NULL. + */ + const action_t actionFunction ; + /*! + * NextState contains either the next state or Eignore. The state machine will process state elements + * until the NextState != Eignroe is found. + */ + const TStateMachineState nextState ; +} STATE_ELEMENT ; + +/*! + * Each state contains an array defining the possible event and the state elements + * that are processed if the event happens. + */ +typedef struct _STATE { + /*! + * The event defines the pointer event or timer event being processed + */ + const TStateMachineEvent theEvent ; // + /*! + * StateElements points to the array of STATE_ELEMENT entries which define the + * condition and action functions to be processed and the resulting nesxt state. + */ + const STATE_ELEMENT* const stateElements ; +} STATE ; + +} // namespace + +#endif /* STATEMACHINE_V2_H_ */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/inc/tapgesturerecogniser.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/inc/tapgesturerecogniser.h Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,145 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Tap Gesture Recognizer +* +*/ + +#ifndef TAPGESTURERECOGNISER_H_ +#define TAPGESTURERECOGNISER_H_ + +#include "rt_gestureengineif.h" +#include +#include + +class CCoeControl ; + +namespace stmGesture +{ + +/*! + * CTapGestureRecogniser handles both tap and double tap recognition. + * Doubletap needs to work even if it crosses window boundaries, so + * CTapGestureRecogniser is a "global" recogniser. The application + * creates only one instance of it (TODO later: how to use Singleton + * pattern in Symbian, seems to be tricky since we would need to have + * writable static variable to hold the one instance, so currently + * we need well-behaving app to handle this: the application must known + * the nature of this gesture recogniser). + * The different windows can add their callbacks, and when recognising tap + * the target window is stored so that proper callback can be called. + * Doubletap is reported either to the target of second tap, or if that windows parent + * has a doubletap listener, to that. + * Use separate listeners for tap and doubletap. + */ +NONSHARABLE_CLASS( CTapGestureRecogniser ): public CTimer, public MGestureRecogniserIf +{ +public: + static const TGestureUid KUid = EGestureUidTap; + + /** Two-phase constructor */ + static CTapGestureRecogniser* NewL(MGestureListener* aListener) ; + + virtual ~CTapGestureRecogniser(); + + /*! + * MGestureRecogniserIf methods + */ + virtual TGestureRecognitionState recognise(int numOfActiveStreams, MGestureEngineIf* ge) ; + virtual void release(MGestureEngineIf* ge) ; + virtual void enable(bool enabled) ; + virtual bool isEnabled() ; + virtual void setOwner(CCoeControl* owner) ; + + virtual TGestureUid gestureUid() const + { + return KUid; + } + + /*! + * Additional methods to set up tap gesture recogniser: + * define the double tap timeout in microseconds. + * \param timeoutInMicroseconds + */ + void setDoubleTapTimeout(int timeoutInMicroseconds) ; + + /*! + * Additional methods to set up tap gesture recogniser: + * define how close the two taps need to be to be recognised + * as a double tap. + * \param rangeInMillimetres + */ + void setDoubleTapRange(int rangeInMillimetres) ; + /*! + * Additional methods to set up tap gesture recogniser: + * Produce two separate taps or just ignore the first one + * if the second tap is outside range. + */ + void ignoreFirstTap(bool ignore) ; + + /*! + * Method to add a listener to tap gestures + */ + void addTapListener(MGestureListener* aListener, CCoeControl* listenerOwner) ; + /*! + * Method to remove a listener from tap gestures + */ + void removeTapListener(MGestureListener* aListener, CCoeControl* listenerOwner) ; + /*! + * Method to add a listener to doubletap gestures + */ + void addDoubleTapListener(MGestureListener* aListener, CCoeControl* listenerOwner) ; + /*! + * Method to remove a listener from doubletap gestures + */ + void removeDoubleTapListener(MGestureListener* aListener, CCoeControl* listenerOwner) ; + + /*! + * for testing purposes we need to log the stuff somewhere... + */ +public: + virtual void enableLogging(bool loggingOn) ; + + /*! + * The timer function to handle timeout for tap + */ + virtual void RunL() ; + + +private: + CTapGestureRecogniser(MGestureListener* aListener) ; + bool m_loggingenabled ; + bool isSecondTapClose(const TPoint& secondPoint, const TPoint& firstPoint) ; +private: + CCoeControl* m_powner ; // The owning control for this gesture + bool m_waitingforsecondtap ; + TPoint m_firstTapXY ; + CCoeControl* m_firstTapTarget ; + float m_firstTapSpeedX ; + float m_firstTapSpeedY ; + int m_doubleTapTimeout ; + bool m_gestureEnabled ; + bool m_ignorefirst ; + int m_rangesizeInPixels ; + // use simple arrays to store the listeners and corresponding windows + RPointerArray m_tapListeners ; + RPointerArray m_tapListenerWindows ; + RPointerArray m_doubleTapListeners ; + RPointerArray m_doubleTapListenerWindows ; + + +}; + +} // namespace + +#endif /* TAPGESTURERECOGNISER_H_ */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/inc/timerinterface.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/inc/timerinterface.h Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,31 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Interface for Timer +* +*/ + +#ifndef TIMERINTERFACE_H_ +#define TIMERINTERFACE_H_ + +class MTimerInterface +{ +public: + virtual void startTouchTimer(TInt aDelay, TInt aPointerNumber) = 0 ; + virtual void cancelTouchTimer(TInt aPointerNumber) = 0 ; + virtual void startHoldTimer(TInt aDelay, TInt aPointerNumber) = 0 ; + virtual void cancelHoldTimer(TInt aPointerNumber) = 0 ; + virtual void startSuppressTimer(TInt aDelay, TInt aPointerNumber) = 0 ; + virtual void cancelSuppressTimer(TInt aPointerNumber) = 0 ; +}; +#endif /* TIMERINTERFACE_H_ */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/inc/touchgesturerecogniser.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/inc/touchgesturerecogniser.h Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,73 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Touch Gesture Recogniser +* +*/ + +#ifndef TOUCHGESTURERECOGNISER_H_ +#define TOUCHGESTURERECOGNISER_H_ + +#include "rt_gestureengineif.h" +#include +#include + +class CCoeControl ; + +namespace stmGesture +{ + +/*! + * CTouchGestureRecogniser handles touch "gesture". The purpose is to inform the app + * that a touch has happened. The gesture is never owned, since most of the gestures start with touch. + * The app may define the area where to watch the gestures, or it can define empty area: + * then the touch is recognised inside the window. + * + */ +NONSHARABLE_CLASS( CTouchGestureRecogniser ): public CGestureRecogniser +{ +public: + static const TGestureUid KUid = EGestureUidTouch; + + /** Two-phase constructor */ + static CTouchGestureRecogniser* NewL(MGestureListener* aListener); + virtual ~CTouchGestureRecogniser(); + + /*! + * MGestureRecogniserIf methods + */ + virtual TGestureRecognitionState recognise(int numOfActiveStreams, MGestureEngineIf* ge) ; + virtual void release(MGestureEngineIf* ge) ; + + virtual TGestureUid gestureUid() const + { + return KUid; + } + + /*! + * Additional methods to set up edge scroll gesture recogniser: + * define the rectangle where the touch is watched + * \param theArea + */ + void setArea(const TRect& theArea) ; + +private: + CTouchGestureRecogniser(MGestureListener* aListener) ; + +private: + TRect m_area ; +}; + +} // namespace + +#endif /* TOUCHGESTURERECOGNISER_H_ */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/inc/uievent.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/inc/uievent.h Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,70 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: UI Event +* +*/ + +#ifndef UIEVENT_H_ +#define UIEVENT_H_ +#include "rt_uievent.h" + +namespace stmUiEventEngine +{ + +NONSHARABLE_CLASS( CUiEvent ): public MUiEvent +{ +public: + virtual const TPoint& StartPos() const ; + virtual const TPoint& CurrentXY() const ; // current yx-coordinate + virtual const TPoint& PreviousXY() const ; // Past yx coordinate + virtual TTimeIntervalMicroSeconds StateTransition() const ; // Time taken for state transition + virtual bool TimerExpired() const; // if timer expired + virtual TUiEventCode Code()const ; + virtual void* Target() const ; + virtual int Index() const ; + MUiEvent* previousEvent() const ; + virtual int countOfEvents() const ; + virtual TInt64 timestamp() const ; + virtual float speedX() const __SOFTFP; // pixels / millisecond + virtual float speedY() const __SOFTFP; // pixels / millisecond + + static CUiEvent* NewL(TUiEventCode aCode, const TPoint& aStart, const TPoint& aXY, + const TPoint& aPreviousXY, bool aTimerExpired, void* aTarget, + TTimeIntervalMicroSeconds aInterval, int aIndex, TInt64 aTimestamp) ; + ~CUiEvent() ; + /*! + * Chain the UI events ; the whole chain is deleted after release has been handled + * in UI sender + */ + virtual void setPrevious(CUiEvent* aEvent) ; +private: + CUiEvent( + TUiEventCode aCode, + const TPoint& aStart, const TPoint& aXY, const TPoint& aPreviousXY, + bool aTimerExpired, void* aTarget, TTimeIntervalMicroSeconds aInterval, + int aIndex, TInt64 aTimestamp) ; + + TUiEventCode m_code ; + TPoint m_start ; + TPoint m_XY ; + TPoint m_previousXY ; + TTimeIntervalMicroSeconds m_statetransition ; + void* m_target ; + bool m_timerExpired ; + int m_index ; + CUiEvent* m_previousEvent ; + TInt64 m_timestamp ; +}; +} +#endif /* UIEVENT_H_ */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/inc/uieventsender.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/inc/uieventsender.h Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,69 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Ui Event Sender Class +* +*/ + +#ifndef UIEVENTSENDER_H_ +#define UIEVENTSENDER_H_ + +#include +#include +#include + +namespace stmUiEventEngine +{ + +class CUiEvent; +/** + * CUiEventSender class for handling the sending of events to the UI event listener + */ +NONSHARABLE_CLASS(CUiEventSender): public CBase + { +public: + enum TEventSenderState + { + ENoEvents, + EEventsReady, + EBusy + }; + + static CUiEventSender* NewL( ); + ~CUiEventSender(); + + TInt AddEvent(CUiEvent* aGestureEvent); + bool addObserver(MUiEventObserver* aObserver ); + bool removeObserver(MUiEventObserver* aObserver ); + void setLogging(bool a) {m_loggingenabled = a;} ; + +private: + CUiEventSender(); + void EmitEventL( const CUiEvent& aGestureEvent ); + + /*! + * Should we be prepared for more than 5 pointers ? Jos tulee Torvisen voittaja + */ + CUiEvent* iEvents[stmUiEventEngine::KMaxNumberOfPointers]; + void compressStack(CUiEvent* aUiEvent) ; + + /* + * Let's be prepared for more than one observer, + * although usually there is only the gesture engine + */ + RPointerArray iObserver; + bool m_loggingenabled ; + + }; +} +#endif /* UIEVENTSENDER_H_ */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/inc/unknowngesturerecogniser.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/inc/unknowngesturerecogniser.h Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,64 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Unknown gesture recognizer +* +*/ + +#ifndef UNKNOWNGESTURERECOGNISER_H_ +#define UNKNOWNGESTURERECOGNISER_H_ + +#include "rt_gestureengineif.h" +#include +#include + +class CCoeControl ; + +namespace stmGesture +{ + +/*! + * CUnknownGestureRecogniser handles unknown gestures at ERelease + * I.e. if no-one else has recognised a gesture when ERelease arrives, + * This recogniser can be at the end of the list to inform the app + * that something weird is happening... + * + */ +NONSHARABLE_CLASS( CUnknownGestureRecogniser ): public CGestureRecogniser +{ +public: + static const TGestureUid KUid = EGestureUidUnknown; + + /** Two-phase constructor */ + static CUnknownGestureRecogniser* NewL(MGestureListener* aListener); + virtual ~CUnknownGestureRecogniser(); + + /*! + * MGestureRecogniserIf methods + */ + virtual TGestureRecognitionState recognise(int numOfActiveStreams, MGestureEngineIf* ge) ; + virtual void release(MGestureEngineIf* ge) ; + + virtual TGestureUid gestureUid() const + { + return KUid; + } + +private: + CUnknownGestureRecogniser(MGestureListener* aListener) ; + +}; + +} // namespace + +#endif /* UNKNOWNGESTURERECOGNISER_H_ */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/inc/updowngesturerecogniser.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/inc/updowngesturerecogniser.h Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,55 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Updown Gesture Recognizer +* +*/ + +#ifndef UPDOWNGESTURERECOGNISER_H_ +#define UPDOWNGESTURERECOGNISER_H_ + +#include "rt_gestureengineif.h" +#include +#include + +class CCoeControl ; + +namespace stmGesture +{ + +NONSHARABLE_CLASS( CUpdownGestureRecogniser ): public CGestureRecogniser +{ +public: + static const TGestureUid KUid = EGestureUidUpDown; + + static CUpdownGestureRecogniser* NewL(MGestureListener* aListener); + + virtual ~CUpdownGestureRecogniser(); + /*! + * MGestureRecogniserIf methods + */ + virtual TGestureRecognitionState recognise(int numOfActiveStreams, MGestureEngineIf* ge) ; + virtual void release(MGestureEngineIf* ge) ; + + virtual TGestureUid gestureUid() const + { + return KUid; + } + +private: + CUpdownGestureRecogniser(MGestureListener* aListener) ; +}; + +} + +#endif /* UPDOWNGESTURERECOGNISER_H_ */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/inc/utils.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/inc/utils.h Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,39 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Utility funtions +* +*/ + +#ifndef _GESTURE_UTILS_H_ +#define _GESTURE_UTILS_H_ + +#include + +namespace stmUiEventEngine +{ + + /** + * @return the rectange in which dragging will be ignored. Tolerance rect + * represents a rectange within which any movement will not be considered + * intentional, but as accidental stylus movement. + */ + TRect ToleranceRect( const TPoint& aCenterPoint ); + + long Twips2Pixels(long twips); + long Mm2Pixels(long mm); + long Inches2Pixels(double inches); + +} // namespace stmProto04 + +#endif // _GESTURE_UTILS_H_ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/inc/zoomgesturerecogniser.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/inc/zoomgesturerecogniser.h Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,92 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Zoom Gesture Recognizer +* +*/ + +#ifndef ZOOMGESTURERECOGNISER_H_ +#define ZOOMGESTURERECOGNISER_H_ + +#include "rt_gestureengineif.h" +#include +#include + +class CCoeControl ; + +namespace stmGesture +{ + +/*! + * CZoomGestureRecogniser handles zoomin gesture: start from near lower left / upper right corner and drag + * This is useful if one wants to implement single handed zooming so can be done using thumb + * (no need to use pinch i.e. hold device in one hand and use two fingers of the other) + * Current spec is: + * - touch lower left corner and start dragging => initialize ZOOM IN + * - touch upper right corner and start dragging => initialize ZOOM OUT + * store the touch point and then calculate the distance until release + * The distance is the zoom factor (probably needs some adjustment, not just the pixels...) + */ +NONSHARABLE_CLASS( CZoomGestureRecogniser ): public CGestureRecogniser +{ +public: + static const TGestureUid KUid = EGestureUidCornerZoom; + + /** Two-phase constructor */ + static CZoomGestureRecogniser* NewL(MGestureListener* aListener); + virtual ~CZoomGestureRecogniser(); + + /*! + * MGestureRecogniserIf methods + */ + virtual TGestureRecognitionState recognise(int numOfActiveStreams, MGestureEngineIf* ge) ; + virtual void release(MGestureEngineIf* ge) ; + virtual TGestureUid gestureUid() const + { + return KUid; + } + + /*! + * Additional methods to set up zoom in gesture recogniser: + * define the rectangle where the lower left corner is + * \param theArea + */ + void setArea(const TRect& theArea) ; + + /*! + * Additional methods to set up zoom in gesture recogniser: + * Define how close to the lower left corner the touch must happen + * \param rangeInPixels + */ + void setRange(int rangeInPixels) ; + +private: + CZoomGestureRecogniser(MGestureListener* aListener) ; + + float calculateDistance(const TPoint& aTp) ; + int adjustZoom(float& aPreviousDistance, float aNewDistance) ; + +private: + TRect m_area ; + int m_rangesizeInPixels ; + TZoomType m_zoomtype ; + bool m_zooming ; + TPoint m_startingtouch ; + TPoint m_previoustouch ; + int m_delta ; + +}; + +} // namespace + +#endif /* ZOOMGESTURERECOGNISER_H_ */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/rom/stmgesturefw.iby --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/rom/stmgesturefw.iby Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,32 @@ +/* +* Copyright (c) 2008-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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: STM Gesture Fw iby file +* +*/ + + +#ifndef _STMGESTUREFW_IBY_ +#define _STMGESTUREFW_IBY_ + +#include + +#ifdef BRDO_USE_GESTURE_HELPER + +#include + +file=ABI_DIR\BUILD_DIR\stmgesturefw.dll SHARED_LIB_DIR\stmgesturefw.dll + +#endif // BRDO_USE_GESTURE_HELPER + +#endif // _STMGESTUREFW_IBY_ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/sis/backup_registration.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/sis/backup_registration.xml Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,5 @@ + + + + + diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/src/UiEvent.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/src/UiEvent.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,147 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +#include +#include "UiEvent.h" +#include "filelogger.h" +#include "statemachine.h" // for stmUiEventEngine::Distance(dx,dy) +//#include "flogger.h" + +using namespace stmUiEventEngine ; + +static const char* const eventNames[] = { // for debugging purposes define the names of the UI events + "noEvent", + "ETouch", + "EHold", + "EDrag", + "ERelease", + "ENull" +} ; + +const char* stmUiEventEngine::EventName(stmUiEventEngine::TUiEventCode aCode) +{ + return eventNames[aCode]; +} + +CUiEvent* CUiEvent::NewL( + TUiEventCode aCode, + const TPoint& aStart, const TPoint& aXY, const TPoint& aPreviousXY, + bool aTimerExpired, void* aTarget, TTimeIntervalMicroSeconds aInterval, + int aIndex, TInt64 aTimestamp) +{ + CUiEvent* self = new (ELeave) CUiEvent(aCode, aStart, aXY, aPreviousXY, + aTimerExpired, aTarget, aInterval, aIndex, aTimestamp) ; + return self; +} + +CUiEvent::CUiEvent( + TUiEventCode aCode, + const TPoint& aStart, const TPoint& aXY, const TPoint& aPreviousXY, + bool aTimerExpired, void* aTarget, TTimeIntervalMicroSeconds aInterval, + int aIndex, TInt64 aTimestamp) : + m_code(aCode), m_start(aStart), m_XY(aXY), m_previousXY(aPreviousXY), + m_statetransition(aInterval), m_target(aTarget), m_timerExpired(aTimerExpired), + m_index(aIndex), m_previousEvent(NULL), m_timestamp(aTimestamp) +{ +} + +CUiEvent::~CUiEvent() +{ + delete m_previousEvent ; + m_previousEvent = NULL ; +} +const TPoint& CUiEvent::StartPos() const +{ + return m_start ; +} +const TPoint& CUiEvent::CurrentXY() const +{ + return m_XY ; +} +TUiEventCode CUiEvent::Code()const +{ + return m_code ; +} +const TPoint& CUiEvent::PreviousXY() const +{ + return m_previousXY ; +} +TTimeIntervalMicroSeconds CUiEvent::StateTransition() const +{ + return m_statetransition ; +} +bool CUiEvent::TimerExpired() const +{ + return m_timerExpired ; +} +void * CUiEvent::Target() const +{ + return m_target ; +} +int CUiEvent::Index() const +{ + return m_index ; +} +void CUiEvent::setPrevious(CUiEvent* aEvent) +{ + m_previousEvent = aEvent ; +} +MUiEvent* CUiEvent::previousEvent() const +{ + return m_previousEvent ; +} +int CUiEvent::countOfEvents() const +{ + int count = 1 ; + for(CUiEvent* prev = m_previousEvent; prev; prev = prev->m_previousEvent) + { + ++count; + } + return count ; +} +TInt64 CUiEvent::timestamp() const +{ + return m_timestamp ; +} + +float CUiEvent::speedX() const __SOFTFP +{ + int distX = m_XY.iX - m_previousXY.iX; + // now calculate speed + float elapsed = float (m_statetransition.Int64()/1000) ; // use ms as time unit + + float speed = 0; + if (elapsed == 0) { + elapsed = 5.0; // if time is 0, take 5ms + } + speed = float(distX)/elapsed ; + return speed ; +} + +float CUiEvent::speedY() const __SOFTFP +{ + int distY = m_XY.iY - m_previousXY.iY; + // now calculate speed + float elapsed = float (m_statetransition.Int64()/1000) ; // use ms as time unit + float speed = 0; + if (elapsed == 0) { + elapsed = 5.0; // if time is 0, take 5ms + } + speed = float(distY)/elapsed ; + return speed ; +} + diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/src/edgescrollgesturerecogniser.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/src/edgescrollgesturerecogniser.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,166 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Gesture helper implementation +* +*/ + +#include "GenericSimpleGesture.h" +#include "edgescrollgesturerecogniser.h" +#include "rt_uievent.h" +#include "filelogger.h" + +using namespace stmGesture ; + +CEdgeScrollGestureRecogniser::CEdgeScrollGestureRecogniser(MGestureListener* aListener) : + CPeriodic(0), m_listener(aListener) , m_area() +{ + m_powner = aListener->getOwner() ; + m_gestureEnabled = true ; + m_rangesizeInPixels = 10 ; // by default 10 pixels from the edges is the area +} + +CEdgeScrollGestureRecogniser* CEdgeScrollGestureRecogniser::NewL(MGestureListener* aListener) +{ + CEdgeScrollGestureRecogniser* self = new (ELeave) CEdgeScrollGestureRecogniser(aListener) ; + CleanupStack::PushL(self); + self->ConstructL(); // construct base class + CActiveScheduler::Add(self); + CleanupStack::Pop(self); + return self; +} + +CEdgeScrollGestureRecogniser::~CEdgeScrollGestureRecogniser() +{ + Cancel(); +} + +TGestureRecognitionState CEdgeScrollGestureRecogniser::recognise(int numOfActiveStreams, + MGestureEngineIf* pge) +{ + TGestureRecognitionState state = ENotMyGesture; + // Check if we are enabled or not + if (!m_gestureEnabled) return state ; + + // Look at the events to see if it looks like edge scroll with one pointer + if (numOfActiveStreams == 1) + { + // Then look at the event stream, it has to be EHold + const stmUiEventEngine::MUiEvent* puie = pge->getUiEvents(0); + int countOfEvents = puie->countOfEvents(); + stmUiEventEngine::TUiEventCode eventCode = puie->Code(); + + if (m_loggingenabled) + { + LOGARG("CEdgeScrollGestureRecogniser: %d num %d code %d", + eventCode, countOfEvents, eventCode); + } + + if (eventCode == stmUiEventEngine::EHold) // The last one is EHold, look if it is near the area defined + { + const TPoint& p = puie->CurrentXY(); + if (m_loggingenabled) + { + LOGARG("CEdgeScrollGestureRecogniser: 0x%x EHold: num %d code %d, %d", + this, countOfEvents, p.iX, p.iY); + LOGARG("CEdgeScrollGestureRecogniser: area, %d,%d %d,%d, range: %d", + m_area.iTl.iX, + m_area.iTl.iY, + m_area.iBr.iX, + m_area.iBr.iY, + m_rangesizeInPixels); + } + // check where the point is inside the area defined but outside of the area shrinked by m_rangesizeInPixels. + TRect rcInner = m_area ; + rcInner.Shrink(m_rangesizeInPixels, m_rangesizeInPixels) ; + if (m_area.Contains(p) && !rcInner.Contains(p)) + { + if (m_loggingenabled) + { + LOGARG("CEdgeScrollGestureRecogniser: HIT, (%d,%d) in %d,%d %d,%d, range: %d", + p.iX, p.iY, m_area.iTl.iX, m_area.iTl.iY, + m_area.iBr.iX, m_area.iBr.iY, + m_rangesizeInPixels); + } + + state = EGestureActive ; + // this is edge scroll, check where it is about... + TEdgeScroll scrolltype = EEdgeScrollUnknown ; + if (p.iY < m_area.iTl.iY + m_rangesizeInPixels) + scrolltype = EEdgeScrollUp ; // if Y is small enough, it is always up + else if (p.iY > m_area.iBr.iY - m_rangesizeInPixels) + scrolltype = EEdgeScrollDown ; // if Y is big enough, it is always down + else if (p.iX < m_area.iTl.iX + m_rangesizeInPixels) + scrolltype = EEdgeScrollLeft ; // if X is small enough, it is always left + else if (p.iX > m_area.iBr.iX - m_rangesizeInPixels) + scrolltype = EEdgeScrollRight ; // if X is big enough, it is always right + // issue the edge scroll gesture + stmGesture::TGenericSimpleGesture pgest(KUid, p, scrolltype, puie) ; + // Call the listener to inform that a Tap has occurred... + m_listener->gestureEnter(pgest) ; + } + } + } + return state; +} + +void CEdgeScrollGestureRecogniser::release(MGestureEngineIf* /*ge*/) +{ + Cancel() ; // some other gesture took hold of the thing, do not send gesture + if (m_loggingenabled) + { + LOGARG("CEdgeScrollGestureRecogniser: 0x%x release", this); + } +} + +void CEdgeScrollGestureRecogniser::RunL() +{ + if (m_loggingenabled) + { + LOGARG("CEdgeScrollGestureRecogniser: 0x%x timer", this); + } +} + +void CEdgeScrollGestureRecogniser::enableLogging(bool loggingOn) +{ + m_loggingenabled = loggingOn; +} + +void CEdgeScrollGestureRecogniser::enable(bool enabled) +{ + m_gestureEnabled = enabled ; +} + +bool CEdgeScrollGestureRecogniser::isEnabled() +{ + return m_gestureEnabled ; +} + +void CEdgeScrollGestureRecogniser::setOwner(CCoeControl* owner) +{ + m_powner = owner; +} + +void CEdgeScrollGestureRecogniser::setScrollRange(int rangeInPixels) +{ + m_rangesizeInPixels = rangeInPixels ; +} + +void CEdgeScrollGestureRecogniser::setArea(const TRect& theArea) +{ + m_area = theArea ; + if (m_loggingenabled) + { + LOGARG("CEdgeScrollGestureRecogniser: set area, %d,%d %d,%d", m_area.iTl.iX, m_area.iTl.iY, m_area.iBr.iX, m_area.iBr.iY); + } +} diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/src/filelogger.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/src/filelogger.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,187 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Gesture helper implementation +* +*/ +#include "filelogger.h" + +#include +#include + +_LIT(KLogFolder, "logs\\"); +_LIT(KLogFileExt, ".log"); +_LIT8(KLineEnd, "\r\n"); + +const TInt KTimeRecordSize = 25; + +_LIT8(KTimeFormat,"%04d-%02d-%02d %02d:%02d:%02d.%03d "); +_LIT8(KLogStart, "--== New %S log ==--\r\n"); + +CFileLogger::CFileLogger() +{ +} + +TBool CFileLogger::Construct() +{ + TInt err = iFs.Connect(); + if (!err) + { + TFileName logFileName; + err = !GetLogFileNameWithoutExt(logFileName); + if(!err) + { + logFileName.Append(KLogFileExt); + err = iFile.Create(iFs, logFileName, EFileShareAny | EFileWrite); + if(!err) + { + TInt pos(0); + iFile.Seek(ESeekEnd, pos); + TBuf8 appName; + appName.Copy(BaflUtils::ExtractAppNameFromFullName(RThread().FullName())); + iLogBuffer.AppendFormat(KLogStart, &appName); + err = iFile.Write(iLogBuffer); + } + } + } + return (!err); +} + +CFileLogger* CFileLogger::Logger() +{ + CFileLogger* logger = (CFileLogger*)Dll::Tls(); + if (!logger) + { + logger = new CFileLogger; + if (logger) + { + if (logger->Construct()) + { + Dll::SetTls(logger); + } + else + { + delete logger; + logger = NULL; + } + } + } + return logger; +} + +void CFileLogger::Close() +{ + delete (CFileLogger*)Dll::Tls(); + Dll::FreeTls(); +} + +CFileLogger::~CFileLogger() +{ + iFile.Close(); + iFs.Close(); +} + +TBool CFileLogger::GetLogFileNameWithoutExt(TDes& aFileName) +{ + TFileName path = PathInfo::MemoryCardRootPath() ; + path.Append(PathInfo::OthersPath()) ; // Put the log in the "Others" directory + aFileName.Append(path); + aFileName.Append(KLogFolder); + TBool res = BaflUtils::FolderExists(iFs, aFileName); + if (!res) + { + aFileName.Zero(); + aFileName.Append(path) ; // put it then directly to Others folder + res = ETrue ; + } + TPtrC fileName(BaflUtils::ExtractAppNameFromFullName(RThread().FullName())); + aFileName.Append(fileName); + TTime time; + time.HomeTime(); + TDateTime dateTime; + dateTime = time.DateTime(); + // add timestamp to the name (then one has to clear them manually) + aFileName.AppendNum(dateTime.Month()+1) ; + aFileName.AppendNum(dateTime.Day()+1) ; + aFileName.AppendNum(dateTime.Hour()) ; + aFileName.AppendNum(dateTime.Minute()) ; + aFileName.AppendNum(dateTime.Second()) ; + return res; +} + +void CFileLogger::Write(const TDesC8& aText) +{ + CFileLogger* logger = Logger(); + if(logger) + { + logger->iLogBuffer.Copy(aText); + logger->DoWrite(); + } +} + +void CFileLogger::Write(const TDesC16& aText) +{ + CFileLogger* logger = Logger(); + if(logger) + { + logger->iLogBuffer.Copy(aText); + logger->DoWrite(); + } +} + +void CFileLogger::Write(TRefByValue aFmt,...) +{ + CFileLogger* logger = Logger(); + if (logger) + { + VA_LIST list; + VA_START(list, aFmt); + logger->iLogBuffer.FormatList(aFmt, list); + logger->DoWrite(); + VA_END(list); + } +} + +void CFileLogger::DoWrite() +{ + if(iFile.SubSessionHandle()) + { + TTime time; + time.HomeTime(); + TDateTime dateTime; + dateTime = time.DateTime(); + TBuf8 timeRecord; + timeRecord.Format(KTimeFormat, dateTime.Year(), dateTime.Month()+1, dateTime.Day()+1, + dateTime.Hour(), dateTime.Minute(), dateTime.Second(), + dateTime.MicroSecond()/1000); + iLogBuffer.Insert(0, timeRecord); + iLogBuffer.Append(KLineEnd); + iFile.Write(iLogBuffer); + } +} +void CFileLogger::DoFlush() +{ + if(iFile.SubSessionHandle()) + { + iFile.Flush(); + } + +} +void CFileLogger::Flush() +{ + CFileLogger* logger = Logger(); + if (logger) + { + logger->DoFlush() ; + } +} diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/src/flickgesturerecogniser.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/src/flickgesturerecogniser.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,114 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Gesture helper implementation +* +*/ + +#include "GenericSimpleGesture.h" +#include "flickgesturerecogniser.h" +#include "rt_uievent.h" +#include "filelogger.h" +//#include "flogger.h" + +using namespace stmGesture ; + +CFlickGestureRecogniser::CFlickGestureRecogniser(MGestureListener* aListener) : + CGestureRecogniser(aListener) +{ +} + +CFlickGestureRecogniser* CFlickGestureRecogniser::NewL(MGestureListener* aListener) +{ + CFlickGestureRecogniser* self = new (ELeave) CFlickGestureRecogniser(aListener) ; + return self; +} + +CFlickGestureRecogniser::~CFlickGestureRecogniser() +{ +} +/*! + * Release gesture recogniser. Note that this one never owns the gesture, it just calls + * the callback if it detects ERelease inside the area being watched. + * There could be also check for the target window? + */ +TGestureRecognitionState CFlickGestureRecogniser::recognise(int numOfActiveStreams, + MGestureEngineIf* pge) +{ + TGestureRecognitionState state = ENotMyGesture; + // Check if we are enabled or not + if (!m_gestureEnabled) return state ; + + // Look at the events to see if it looks like flick with one pointer + if (numOfActiveStreams == 1) + { + const stmUiEventEngine::MUiEvent* puie = pge->getUiEvents(0); + if (!puie) return state; + int countOfEvents = puie->countOfEvents(); + stmUiEventEngine::TUiEventCode eventCode = puie->Code(); + if (m_loggingenabled) + { + LOGARG("CFlickGestureRecogniser: %d num %d code %d", eventCode, countOfEvents, eventCode); + + } + if (m_powner == puie->Target() && eventCode == stmUiEventEngine::ERelease) + { + if (m_loggingenabled) + { + LOGARG("CFlickGestureRecogniser: 0x%x ERelease: num %d code %d, %d", this, countOfEvents, puie->CurrentXY().iX, puie->CurrentXY().iY); + } + // Check if the speed before release was fast enough for flick + const stmUiEventEngine::MUiEvent* puieprev = puie->previousEvent() ; + if (puieprev && puieprev->Code() == stmUiEventEngine::EMove) + { + using stmUiEventEngine::TUiEventSpeed; + + float thespeedX = puieprev->speedX() ; + float thespeedY = puieprev->speedY() ; + if (m_loggingenabled) + { + LOGARG("CFlickGestureRecogniser: prev speed: %f (limit: %f)", double(thespeedX), double(m_speed)) ; + } + if (Abs( thespeedX) >= m_speed || Abs( thespeedY) >= m_speed ) + { + state = EGestureActive ; + + TUiEventSpeed speedIf(thespeedX, thespeedY); + + // issue the flick gesture using the TDirectionalGesture (it has the speed and direction) + stmGesture::TDirectionalGesture pgest( + KUid, + puieprev->CurrentXY(), + puieprev->PreviousXY(), + &speedIf, + m_loggingenabled); + + // Call the listener to inform that a flick has occurred... + m_listener->gestureEnter(pgest); + } + } + } + } + return state; +} +void CFlickGestureRecogniser::release(MGestureEngineIf* /*ge*/) +{ + if (m_loggingenabled) + { + LOGARG("CFlickGestureRecogniser: 0x%x flick", this); + } +} +void CFlickGestureRecogniser::setFlickingSpeed(float aSpeed) __SOFTFP +{ + m_speed = aSpeed ; +} diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/src/genericsimplegesture.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/src/genericsimplegesture.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,121 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Gesture helper implementation +* +*/ + +#include "GenericSimpleGesture.h" +#include "filelogger.h" + +using namespace stmGesture ; +using stmUiEventEngine::MUiEventSpeed; + + +TGenericSimpleGesture::TGenericSimpleGesture( + TGestureUid uid, const TPoint& loc, int type, const MUiEventSpeed* speedIf) : + m_location(loc), m_uid(uid), m_type(type), m_details(0), m_speed(speedIf) +{ +} + +TPoint TGenericSimpleGesture::getLocation() const +{ + return m_location ; +} + +int TGenericSimpleGesture::getType() const +{ + return m_type ; +} + +int TGenericSimpleGesture::getDetails() const +{ + return m_details ; +} + +void TGenericSimpleGesture::setName(const TDesC8& aName) +{ + m_name.Set(aName) ; +} + +TPtrC8 TGenericSimpleGesture::getGestureName() +{ + return m_name ; +} + +TDirectionalGesture::TDirectionalGesture( + TGestureUid uid, const TPoint& loc, const TPoint& prevLoc, + const MUiEventSpeed* speedIf, bool logging) : + TGenericSimpleGesture(uid, loc, 0, speedIf), m_loggingEnabled(logging) +{ + setVector(loc, prevLoc); +} + +void TDirectionalGesture::setVector(const TPoint& last, const TPoint& previous) +{ + m_vector = TPoint(last.iX-previous.iX, previous.iY-last.iY) ; // x > 0 => east, y > 0 => north + if (m_loggingEnabled) + { + LOGARG("CHoveringGesture: x: %d , %d prev: %d, %d", last.iX, last.iY, previous.iX, previous.iY) ; + } +} + +TGestureDirection TDirectionalGesture::getDirection() const +{ + TGestureDirection dir = ENorth ; + int x = Abs(m_vector.iX) ; + int y = Abs(m_vector.iY) ; + if (y <= x/2) + { + if (m_vector.iX < 0) + dir = EWest ; + else + dir = EEast ; + } + else if (y > x/2 && y <= (x+x/2)) + { + if (m_vector.iX < 0) + { + if (m_vector.iY < 0 ) + dir = ESouthWest ; + else + dir = ENorthWest ; + } + else + { + if (m_vector.iY < 0 ) + dir = ESouthEast ; + else + dir = ENorthEast ; + } + } + else if (y > x+x/2) + { + if (m_vector.iY < 0) + dir = ESouth ; + else + dir = ENorth ; + } + if (m_loggingEnabled) + { + LOGARG("CHoveringGesture: x: %d y: %d direction: %d", m_vector.iX, m_vector.iY, dir) ; + } + return dir ; +} + +TTwoPointGesture::TTwoPointGesture(TGestureUid uid, const TPoint& loc, const TPoint& prevLoc) : + TDirectionalGesture(uid, loc, prevLoc, NULL), + m_location2(prevLoc) +{ +} + diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/src/gestureengine.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/src/gestureengine.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,275 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Gesture helper implementation +* +*/ + +#include "GestureEngine.h" + +#include "filelogger.h" + + +using namespace stmGesture ; + +CGestureEngine::CGestureEngine() +{ + m_numOfActiveStreams = 0 ; + m_currentGestureOwner = -1 ; + m_currentLockedGesture = -1 ; + for (int i = 0; i < stmUiEventEngine::KMaxNumberOfPointers; i++) + { + m_uiEventStream[i] = NULL ; + } +} + +CGestureEngine::~CGestureEngine() +{ + m_gestures.Reset() ; +} + +bool CGestureEngine::addGesture(const MGestureRecogniserIf* aNewGesture) +{ + // Add the new gesture recogniser to our list of recognisers + return m_gestures.Append(aNewGesture) == 0; +} + +bool CGestureEngine::insertGesture(const MGestureRecogniserIf* aNewGesture) +{ + return insertGestureAt(aNewGesture, 0) == 0; +} + +bool CGestureEngine::insertGestureAt(const MGestureRecogniserIf* aNewGesture, int position) +{ + return m_gestures.Insert(aNewGesture, position) == 0 ; +} + +bool CGestureEngine::removeGesture(const MGestureRecogniserIf* aOldGesture) +{ + // If gestures are removed, there cannot be current gesture owner... + if (m_currentGestureOwner != -1) + { + MGestureRecogniserIf* pgrif = m_gestures[m_currentGestureOwner] ; + pgrif->release(this) ; + m_currentGestureOwner = -1 ; // no more gesture owners... + } + TInt ix = m_gestures.Find(aOldGesture) ; + bool found = (ix != -1); + if (found) + { + m_gestures.Remove(ix) ; + } + return found ; +} + +int CGestureEngine::activeStreamCount() const +{ + return m_numOfActiveStreams ; +} + +const stmUiEventEngine::MUiEvent* CGestureEngine::getUiEvents(int indexOfActiveStream) const +{ +#if defined(ADVANCED_POINTER_EVENTS) + // create temporary array of active event streams and initialize with zero + const stmUiEventEngine::MUiEvent* activeEventPointers[stmUiEventEngine::KMaxNumberOfPointers] ; + for (int x = 0; x < stmUiEventEngine::KMaxNumberOfPointers; x++) activeEventPointers[x] = 0 ; + // then fill from currently active event streams + int indextoactiveEventPointers = 0 ; + for (int i = 0; i < stmUiEventEngine::KMaxNumberOfPointers; i++) + { + if (m_uiEventStream[i]) + activeEventPointers[indextoactiveEventPointers++] = m_uiEventStream[i] ; + } + // then return the active event stream asked + return activeEventPointers[indexOfActiveStream] ; +#else + // in single touch it is enough to return the only possible pointer + return m_uiEventStream[indexOfActiveStream] ; +#endif +} + +/*! + * Process the UI events + */ +void CGestureEngine::HandleUiEventL(const stmUiEventEngine::MUiEvent& aEvent ) +{ + // process one incoming UI event + storeUiEvent(aEvent) ; // store the event to the "stream" based on the index of pointer + walkTroughGestures() ; // and walk trough the gestures to process the UI event + updateUiEvents() ; + // If it was last release event, make sure no-one has the gestures locked + m_numOfActiveStreams = 0 ; + for (int i = 0; i < stmUiEventEngine::KMaxNumberOfPointers; i++) + { + if (m_uiEventStream[i]) m_numOfActiveStreams++ ; + } + if (m_numOfActiveStreams == 0) + { + if (m_currentLockedGesture != -1) + { + MGestureRecogniserIf* pgrif = m_gestures[m_currentLockedGesture] ; + pgrif->release(this) ; + } + m_currentLockedGesture = -1 ; + } +} + +/*! + * Store the UI event. There are max X "streams" of events, one for each + * pointer. The streams are actually just pointers to the latest event, since the + * MUiEvent interface has methods to walk trough the chain of events. + */ +void CGestureEngine::storeUiEvent(const stmUiEventEngine::MUiEvent& aEvent) +{ + m_uiEventStream[aEvent.Index()] = &aEvent ; + m_numOfActiveStreams = 0 ; + for (int i = 0; i < stmUiEventEngine::KMaxNumberOfPointers; i++) + { + if (m_uiEventStream[i]) m_numOfActiveStreams++ ; + } +} + +/*! + * Call each gesture handler in turn until one claims to be in control of the gesture. + */ +void CGestureEngine::walkTroughGestures() +{ + int newowner = -1 ; + int newlocker = m_currentLockedGesture ; + // check if someone has locked the gesture + TGestureRecognitionState thestate = ENotMyGesture ; + if (m_currentLockedGesture != -1) + { + MGestureRecogniserIf* pgrif = m_gestures[m_currentLockedGesture] ; + if (pgrif) + { + if (m_loggingEnabled) + { + // log entry about locked gesture (hmm.. should have added names to the MGestureRecogniserIf + LOGARG("locked gesture recognizer %d (addr %d), active streams %d", + m_currentLockedGesture, pgrif, m_numOfActiveStreams); + } + + thestate = pgrif->recognise(m_numOfActiveStreams, this) ; + switch (thestate) + { + case EGestureActive: + { + // This gesture recogniser owns the gesture, so release the lock + newlocker = -1 ; + newowner = m_currentLockedGesture ; + if (m_loggingEnabled) + { + LOGARG("new owner %d lock release", m_currentLockedGesture); + } + break; + } + case ELockToThisGesture: + { + // this gesture recogniser wants to keep the lock + newowner = m_currentLockedGesture ; + newlocker = m_currentLockedGesture ; + if (m_loggingEnabled) + { + LOGARG("new owner %d keep lock", m_currentLockedGesture); + } + break; + + } + case ENotMyGesture: + { + break; + } + } + } + else + { + if (m_loggingEnabled) + { + LOGARG("NULL recogniser for %d", m_currentLockedGesture); + } + } + } + + if (thestate == ENotMyGesture) + { + if (m_loggingEnabled) + { + LOGARG("walk trough recognizers active streams %d", m_numOfActiveStreams); + } + // No locking gesture, walk trough the list until someone handles this + for (int i = 0; i < m_gestures.Count(); i++) + { + bool controlObtained = false; + MGestureRecogniserIf* pgrif = m_gestures[i]; + if (pgrif) + { + switch (pgrif->recognise(m_numOfActiveStreams, this)) + { + case EGestureActive: + { + // This gesture recogniser owns the gesture, stop looping... + controlObtained = true; + newowner = i; + break; + } + case ELockToThisGesture: + { + // this gesture recogniser wants to take ownership + controlObtained = true; + newowner = i; + newlocker = i; + break; + + } + case ENotMyGesture: + { + break; + } + } + } + if (controlObtained) + { + break; // do not process rest of the gestures + } + + } + } + if (newowner != -1 && newowner != m_currentGestureOwner) + { + if (m_currentGestureOwner != -1) + { + MGestureRecogniserIf* pgrif = m_gestures[m_currentGestureOwner] ; + pgrif->release(this) ; + } + m_currentGestureOwner = newowner ; + } + m_currentLockedGesture = newlocker ; // if someone locked it or released the lock +} + +void CGestureEngine::updateUiEvents() +{ + for (int i = 0; i < stmUiEventEngine::KMaxNumberOfPointers; i++) + { + if (m_uiEventStream[i]) + { + if (m_uiEventStream[i]->Code() == stmUiEventEngine::ERelease) + { + // Event can be removed since Release is the last event + // note that it is the lower layer event engine + // which actually deletes the object + m_uiEventStream[i] = NULL ; + } + } + } +} diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/src/gestureframework.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/src/gestureframework.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,86 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Gesture helper implementation +* +*/ + +#include "statemachine.h" +#include "gestureframework.h" +#include "gestureframeworkimpl.h" +#include "GestureEngine.h" +#include "rt_gestureengineif.h" +#include "rt_gesturelistener.h" +#include "tapgesturerecogniser.h" +#include "pangesturerecogniser.h" + +using namespace stmGesture ; + +CGestureFramework::CGestureFramework() +{ + // No implementation required +} + +CGestureFramework::~CGestureFramework() +{ + delete m_impl ; +} + +CGestureFramework* CGestureFramework::NewLC() +{ + CGestureFramework* self = new (ELeave) CGestureFramework(); + CleanupStack::PushL(self); + self->ConstructL(); + return self; +} + +CGestureFramework* CGestureFramework::NewL() +{ + CGestureFramework* self = CGestureFramework::NewLC(); + CleanupStack::Pop(self); + return self; +} + +void CGestureFramework::ConstructL() +{ + m_impl = CGestureFrameworkImpl::NewL() ; +} + +TVersion CGestureFramework::Version() +{ + // Version number of example API + const TInt KMajor = 1; + const TInt KMinor = 0; + const TInt KBuild = 1; + return TVersion(KMajor, KMinor, KBuild); +} + +/*! + * Create new gesture engine if not already existing and return the interface + */ +MGestureEngineIf* CGestureFramework::getGestureEngine() +{ + return m_impl->getGestureEngine() ; +} + +stmUiEventEngine::CStateMachine* CGestureFramework::getUiStateMachine() +{ + return m_impl->getUiStateMachine() ; +} + +void CGestureFramework::enableLogging(bool loggingEnabled) +{ + m_loggingenabled = loggingEnabled; + if (m_impl) m_impl->enableLogging(loggingEnabled) ; +} + diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/src/gestureframeworkimpl.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/src/gestureframeworkimpl.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,77 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Gesture helper implementation +* +*/ + + +#include "gestureframeworkimpl.h" +#include "GestureEngine.h" +#include "statemachine.h" + +using namespace stmGesture ; + +CGestureFrameworkImpl::CGestureFrameworkImpl() +{ + // No implementation required +} + +CGestureFrameworkImpl::~CGestureFrameworkImpl() +{ + m_statemachine->removeUiEventObserver(m_gestureEngine) ; + delete m_gestureEngine ; + delete m_statemachine ; +} + +CGestureFrameworkImpl* CGestureFrameworkImpl::NewLC() +{ + CGestureFrameworkImpl* self = new (ELeave) CGestureFrameworkImpl(); + CleanupStack::PushL(self); + self->ConstructL(); + return self; +} + +CGestureFrameworkImpl* CGestureFrameworkImpl::NewL() +{ + CGestureFrameworkImpl* self = CGestureFrameworkImpl::NewLC(); + CleanupStack::Pop(self); + return self; +} + +void CGestureFrameworkImpl::ConstructL() +{ + /*! + * create the gesture engine and the low level UI event engine + */ + m_gestureEngine = new (ELeave)CGestureEngine() ; + m_statemachine = stmUiEventEngine::CStateMachine::NewL() ; + // TODO: all kinds of default settings for the lower layer, but in the test app + // they are set from the settings menu so no need now... + // Add the gesture engine to be the observer of UI events... + m_statemachine->addUiEventObserver(m_gestureEngine) ; +} +MGestureEngineIf* CGestureFrameworkImpl::getGestureEngine() +{ + return m_gestureEngine ; +} + +void CGestureFrameworkImpl::enableLogging(bool loggingEnabled) +{ + m_loggingenabled = loggingEnabled; + if (m_gestureEngine) + { + m_gestureEngine->enableLogging(loggingEnabled) ; + } +} + diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/src/gesturehelpereventsender.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/src/gesturehelpereventsender.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,127 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Gesture helper implementation +* +*/ + +#include "gesturehelpereventsender.h" + +const TInt KEventsQueueGranularity = 4; + +CGestureEventSender* CGestureEventSender::NewL( MStmGestureListener& aObserver ) + { + CGestureEventSender* self = new (ELeave) CGestureEventSender(aObserver); + + return self; + } + +CGestureEventSender::CGestureEventSender( MStmGestureListener& aObserver ) : + CActive(EPriorityUserInput - 1), + iObserver(aObserver), iEvents(KEventsQueueGranularity) + { + CActiveScheduler::Add(this); + } + +CGestureEventSender::~CGestureEventSender() + { + if (IsActive()) + { + Cancel(); + } + + iEvents.Close(); + } + +TInt CGestureEventSender::AddEvent(TStmGestureUid aUid, const MStmGesture* aGestureEvent) + { + TStmGestureEvent event; + if (aGestureEvent) { + event.SetCode(aGestureEvent->gestureUid()); + event.SetCurrentPos(aGestureEvent->getLocation()); + event.SetSpeed(TRealPoint(aGestureEvent->getSpeedX()*1000,aGestureEvent->getSpeedY()*1000));//App needs the speed in pixels/sec + event.SetType(TStmTapType(aGestureEvent->getType())); + event.SetDetails(aGestureEvent->getDetails()); + event.SetGestureDirection(aGestureEvent->getDirection()); + event.SetPinchEndPos(aGestureEvent->getPinchEndPos()); + event.SetGestureState(EGestureEnter); + } + else { + if (aUid != stmGesture::EGestureUidPinch) { + return iEvents.Count(); + } + event.SetCode(aUid); + event.SetGestureState(EGestureExit); + } + + iEvents.Append(event); + if (iState != EBusy) + { + iState = EEventsReady; + } + + if (!IsActive()) + { + Complete(); + } + return iEvents.Count(); + } + +void CGestureEventSender::Complete() + { + TRequestStatus* status = &iStatus; + User::RequestComplete(status, KErrNone); + SetActive(); + } + +void CGestureEventSender::RunL() + { + switch (iState) + { + case EEventsReady: + { + if (iEvents.Count() > 0) + { + TInt count = iEvents.Count(); + for (int i = 0; i < count; i++) + { + TStmGestureEvent& gst = iEvents[i]; + EmitEventL(gst); + } + } + iEvents.Reset(); + iState = ENoEvents; + Complete(); + break; + } + } + } + +void CGestureEventSender::EmitEventL( const TStmGestureEvent& aGesture ) + { + iState = EBusy; + iObserver.HandleGestureEventL(aGesture); + iState = EEventsReady; + } + +TInt CGestureEventSender::RunError(TInt aError) + { + iEvents.Reset(); + return aError; + } + +void CGestureEventSender::DoCancel() + { + iEvents.Reset(); + iState = ENoEvents; + } diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/src/hoveringgesturerecogniser.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/src/hoveringgesturerecogniser.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,162 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +#include "hoveringgesturerecogniser.h" +#include "GenericSimpleGesture.h" +#include "rt_uievent.h" + +#include "filelogger.h" + +using namespace stmGesture ; + +extern long Mm2Pixels(long mm) ; + + +CHoveringGestureRecogniser::CHoveringGestureRecogniser(MGestureListener* aListener) : + CGestureRecogniser(aListener) +{ + m_hovering = false ; + m_hoveringspeed = 0.9f ; +} + +CHoveringGestureRecogniser* CHoveringGestureRecogniser::NewL(MGestureListener* aListener) +{ + CHoveringGestureRecogniser* self = new (ELeave) CHoveringGestureRecogniser(aListener) ; + return self; +} + +CHoveringGestureRecogniser::~CHoveringGestureRecogniser() +{ +} + +TGestureRecognitionState CHoveringGestureRecogniser::recognise(int numOfActiveStreams, + MGestureEngineIf* pge) +{ + TGestureRecognitionState state = ENotMyGesture; + // Check if we are enabled or not + if (!m_gestureEnabled) return state ; + + // Look at the events to see if it looks like hovering + if (numOfActiveStreams == 1) + { + // Then look at the event stream, it has to be tap and release + const stmUiEventEngine::MUiEvent* puie = pge->getUiEvents(0); + int countOfEvents = puie->countOfEvents() ; + stmUiEventEngine::TUiEventCode eventCode = puie->Code() ; + if (countOfEvents > 1) // do we have more than one event in the stream? + { + // Then look at the events to see if they are suitable for us + // should we check that all of the events are targeted to our window? + // currently we only check if the last one is for us and is EMove, then we pan... + if (puie->Target() == m_powner && + eventCode == stmUiEventEngine::EMove) // The last one is move in our window + { + float speedX = puie->speedX() ; + float speedY = puie->speedY() ; + if (m_loggingenabled) + { + LOGARG("CHoveringGestureRecogniser: %d: num %d code %d, speed %f, limit %f", + m_hovering, countOfEvents, eventCode, + double(speedX), double(m_hoveringspeed)); + } + // It might be hovering gesture in our window, handle it + if (!m_hovering) + { + // we are not yet hovering, so lets see if it is slow movement + // but it must be movement; if it is 0.0 do not hover + if ( ((speedX > 0.01f) ||(speedY > 0.01f)) && + ((speedX < m_hoveringspeed) || (speedY < m_hoveringspeed)) + ) + { + state = EGestureActive; + m_hovering = true; + } + } + if (m_hovering) + { + // after we've started hovering, the speed could be increased a little before we loose hovering + // but this adjustment is not implemented now... + if (speedX < m_hoveringspeed || speedY < m_hoveringspeed) + + { + using stmUiEventEngine::TUiEventSpeed; + + state = EGestureActive; + TUiEventSpeed speedIf(speedX, speedY); + stmGesture::TDirectionalGesture pgest( + KUid, + puie->CurrentXY(), + puie->PreviousXY(), + &speedIf, + m_loggingenabled); + + // Call the listener to inform that a Hover has occurred... + m_listener->gestureEnter(pgest); + } + } + } + else if (m_hovering) + { + if (eventCode == stmUiEventEngine::ERelease) // The last one is release in any window + { + m_hovering = false ; + // release will handle informing of the listener + } + } + } + else + { + // count of events == 1, lets see if it is EMove, then we take it and start hovering + if (puie->Target() == m_powner && + eventCode == stmUiEventEngine::EMove) // The only one is move in our window + { + if (m_loggingenabled) + { + LOGARG("CHoveringGestureRecogniser: move: num %d code %d", countOfEvents, eventCode); + } + state = EGestureActive; + stmGesture::TDirectionalGesture pgest( + KUid, + puie->CurrentXY(), + puie->PreviousXY(), + puie, + m_loggingenabled); + + // Call the listener to inform that a Hover has occurred... + m_listener->gestureEnter(pgest); + } + } + } + if (state == ENotMyGesture) + { + // if it was not our gesture, then the state can not be hovering... + m_hovering = false ; + } + return state; +} + +void CHoveringGestureRecogniser::release(MGestureEngineIf* /*ge*/) +{ + m_hovering = false ; + m_listener->gestureExit(KUid) ; +} + +void CHoveringGestureRecogniser::setHoveringSpeed(float aSpeed) __SOFTFP +{ + m_hoveringspeed = aSpeed ; +} + diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/src/leftrightgesturerecogniser.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/src/leftrightgesturerecogniser.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,92 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Gesture helper implementation +* +*/ + +#include "leftrightgesturerecogniser.h" +#include "GenericSimpleGesture.h" +#include "rt_uievent.h" + +#include "filelogger.h" + +using namespace stmGesture ; + +_LIT8(KLeftrightName, "Leftlight"); + +CLeftrightGestureRecogniser::CLeftrightGestureRecogniser(MGestureListener* aListener) : + CGestureRecogniser(aListener) +{ +} + +CLeftrightGestureRecogniser* CLeftrightGestureRecogniser::NewL(MGestureListener* aListener) +{ + CLeftrightGestureRecogniser* self = new (ELeave) CLeftrightGestureRecogniser(aListener) ; + return self; +} + +CLeftrightGestureRecogniser::~CLeftrightGestureRecogniser() +{ +} + +TGestureRecognitionState CLeftrightGestureRecogniser::recognise(int numOfActiveStreams, + MGestureEngineIf* pge) +{ + TGestureRecognitionState state = ENotMyGesture; + // Check if we are enabled or not + if (!m_gestureEnabled) return state ; + + // Look at the events to see if it looks like a tap or double tap + if (numOfActiveStreams == 1) + { + // Then look at the event stream, it has to be tap and release + const stmUiEventEngine::MUiEvent* puie = pge->getUiEvents(0); + int countOfEvents = puie->countOfEvents() ; + stmUiEventEngine::TUiEventCode eventCode = puie->Code() ; + if (countOfEvents > 1) // do we have more than one event in the stream? + { + // Then look at the events to see if they are suitable for us + // should we check that all of the events are targeted to our window? + // currently we only check if the last one is for us and is EMove, then check if |x| > |y| + if (puie->Target() == m_powner && + eventCode == stmUiEventEngine::EMove) // The last one is move in our window + + { + if (m_loggingenabled) + { + LOGARG("CLeftrightGestureRecogniser: Leftright: num %d code %d", + countOfEvents, eventCode); + } + // Is it leftright gesture in our window? + const TPoint& p = puie->CurrentXY(); + TPoint dp = p - puie->PreviousXY(); + if (Abs(dp.iX) > Abs(dp.iY)) + { + state = EGestureActive; + stmGesture::TGenericSimpleGesture pgest(KUid, p, dp.iX, puie) ; + pgest.setName(KLeftrightName) ; + // Call the listener to inform that a Leftright has occurred... + m_listener->gestureEnter(pgest) ; + } + } + } + } + return state; +} + +void CLeftrightGestureRecogniser::release(MGestureEngineIf* /*ge*/) +{ + m_listener->gestureExit(KUid) ; +} + diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/src/longpressgesturerecogniser.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/src/longpressgesturerecogniser.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,93 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Gesture helper implementation +* +*/ + +#include "GenericSimpleGesture.h" +#include "longpressgesturerecogniser.h" +#include "rt_uievent.h" +#include "filelogger.h" + +using namespace stmGesture ; + +CLongPressGestureRecogniser::CLongPressGestureRecogniser(MGestureListener* aListener) : + CGestureRecogniser(aListener) +{ +} + +CLongPressGestureRecogniser* CLongPressGestureRecogniser::NewL(MGestureListener* aListener) +{ + CLongPressGestureRecogniser* self = new (ELeave) CLongPressGestureRecogniser(aListener) ; + return self; +} + +CLongPressGestureRecogniser::~CLongPressGestureRecogniser() +{ +} + +/*! + * recognise the long press; basically it is just the EHold UI event + */ +TGestureRecognitionState CLongPressGestureRecogniser::recognise(int numOfActiveStreams, + MGestureEngineIf* pge) +{ + TGestureRecognitionState state = ENotMyGesture; + // Check if we are enabled or not + if (!m_gestureEnabled) return state ; + + + // Look at the events to see if it looks like long press with one pointer + if (numOfActiveStreams == 1) + { + // Then look at the event stream, it has to be EHold + const stmUiEventEngine::MUiEvent* puie = pge->getUiEvents(0); + if (!puie) return state; + int countOfEvents = puie->countOfEvents(); + stmUiEventEngine::TUiEventCode eventCode = puie->Code(); + + if (m_loggingenabled) + { + LOGARG("CLongPressGestureRecogniser: %d num %d code %d", eventCode, countOfEvents, eventCode); + } + if (puie->Target() == m_powner && eventCode == stmUiEventEngine::EHold) // The last one is EHold, look if it is near our borders + { + const TPoint& p = puie->CurrentXY() ; + if (m_loggingenabled) + { + LOGARG("CLongPressGestureRecogniser: (%d, %d) in (%d,%d)(%d,%d)", p.iX, p.iY, + m_area.iTl.iX, m_area.iTl.iY, m_area.iBr.iX, m_area.iBr.iY); + } + state = EGestureActive ; + // issue the long press gesture + stmGesture::TGenericSimpleGesture pgest(KUid, p, 0, puie) ; // TODO: speed is 0? + // Call the listener to inform that the gesture has occurred... + m_listener->gestureEnter(pgest) ; + } + } + return state; +} + +void CLongPressGestureRecogniser::release(MGestureEngineIf* /*ge*/) +{ + if (m_loggingenabled) + { + LOGARG("CLongPressGestureRecogniser: 0x%x release", this); + } +} + +void CLongPressGestureRecogniser::setArea(const TRect& theArea) +{ + m_area = theArea ; +} diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/src/pangesturerecogniser.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/src/pangesturerecogniser.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,106 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Gesture helper implementation +* +*/ + +#include "pangesturerecogniser.h" +#include "GenericSimpleGesture.h" +#include "rt_uievent.h" + +#include "filelogger.h" + +using namespace stmGesture ; + +CPanGestureRecogniser::CPanGestureRecogniser(MGestureListener* aListener) : + CGestureRecogniser(aListener) +{ +} + +CPanGestureRecogniser* CPanGestureRecogniser::NewL(MGestureListener* aListener) +{ + CPanGestureRecogniser* self = new (ELeave) CPanGestureRecogniser(aListener) ; + return self; +} + +CPanGestureRecogniser::~CPanGestureRecogniser() +{ +} + +TGestureRecognitionState CPanGestureRecogniser::recognise(int numOfActiveStreams, + MGestureEngineIf* pge) +{ + TGestureRecognitionState state = ENotMyGesture; + // Check if we are enabled or not + if (!m_gestureEnabled) return state ; + + // Look at the events to see if it looks like a tap or double tap + if (numOfActiveStreams == 1) + { + // Then look at the event stream, it has to be tap and release + const stmUiEventEngine::MUiEvent* puie = pge->getUiEvents(0); + if (!puie) return state; + int countOfEvents = puie->countOfEvents() ; + stmUiEventEngine::TUiEventCode eventCode = puie->Code() ; + if (countOfEvents > 1) // do we have more than one event in the stream? + { + // Then look at the events to see if they are suitable for us + // should we check that all of the events are targeted to our window? + // currently we only check if the last one is for us and is EMove, then we pan if the speed is OK + if (puie->Target() == m_powner && + eventCode == stmUiEventEngine::EMove) // The last one is move in our window + + { + if (m_loggingenabled) + { + LOGARG("CPanGestureRecogniser: Pan: num %d code %d", countOfEvents, eventCode); + } + float speedX = puie->speedX(); + float speedY = puie->speedY(); + + using stmUiEventEngine::TUiEventSpeed; + + state = EGestureActive; + TUiEventSpeed speedIf(speedX, speedY); + // Panning gesture + stmGesture::TDirectionalGesture pgest( + KUid, + puie->CurrentXY(), + puie->PreviousXY(), + &speedIf, + m_loggingenabled); + + // Call the listener to inform that a Pan has occurred... + m_listener->gestureEnter(pgest); + } + } + } + return state; +} + +void CPanGestureRecogniser::release(MGestureEngineIf* /*ge*/) +{ + m_listener->gestureExit(KUid) ; +} + +void CPanGestureRecogniser::setPanningSpeedLow(float aSpeed) __SOFTFP +{ + m_panningspeedlow = aSpeed ; +} + +void CPanGestureRecogniser::setPanningSpeedHigh(float aSpeed) __SOFTFP +{ + m_panningspeedhigh = aSpeed ; +} + diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/src/pinchgesturerecogniser.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/src/pinchgesturerecogniser.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,440 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Gesture helper implementation +* +*/ +#include +#include "pinchgesturerecogniser.h" +#include "GenericSimpleGesture.h" +#include +#include "filelogger.h" +#include "statemachine.h" // for stmUiEventEngine::Distance(dx,dy) + +using namespace stmGesture ; + +extern long Mm2Pixels(long mm) ; + + +CPinchGestureRecogniser::CPinchGestureRecogniser(MGestureListener* aListener) : + CGestureRecogniser(aListener) +{ + m_pinching = false ; + m_pinchingspeed = 3.5 ; // by default something suitable for capacitive + m_holdseen = false ; +} + +CPinchGestureRecogniser* CPinchGestureRecogniser::NewL(MGestureListener* aListener) +{ + CPinchGestureRecogniser* self = new (ELeave) CPinchGestureRecogniser(aListener) ; + return self; +} + +CPinchGestureRecogniser::~CPinchGestureRecogniser() +{ +} + +TGestureRecognitionState CPinchGestureRecogniser::recognise(int numOfActiveStreams, + MGestureEngineIf* pge) +{ + TGestureRecognitionState state = ENotMyGesture; + // Check if we are enabled or not + if (!m_gestureEnabled) return state ; + + if (m_loggingenabled) + { + LOGARG("CPinchGestureRecogniser: %d %d %d ", m_pinching, m_holdseen, numOfActiveStreams) ; + } +#if !defined(ADVANCED_POINTER_EVENTS) + // Look at the events to see if it looks like pinch in single touch + // WARNING: this code is a hack : in single touch capacitive touch device (like Alvin with 52.50) it works so-and-so, + // because the pointer events were reported from the corners of the rectangle formed by two fingers pressing. + // In resistive touch device like Tube or Ivalo the reported points are somewhere int he middle between the fingers + // and jumping a lot, so it is very difficult to get it right. + if (numOfActiveStreams == 1) + { + // Then look at the event stream, first we need to see a hold and then a fast jump + const stmUiEventEngine::MUiEvent* puie = pge->getUiEvents(0); + int countOfEvents = puie->countOfEvents() ; + stmUiEventEngine::TUiEventCode eventCode = puie->Code() ; + + if (countOfEvents > 0 ) // how many events + { + if (m_loggingenabled) + { + LOGARG("CPinchGestureRecogniser: %d %d %d %d %d, m: %d b: %d", + m_pinching, m_holdseen, numOfActiveStreams, countOfEvents, eventCode, + int(m_m), int(m_b)) ; + } + + if (m_pinching) + { + // We have entered pinching state, lets move one of the points unless it is a release + if (eventCode == stmUiEventEngine::ERelease) + { + m_pinching = false ; + m_holdseen = false ; + } + else + { + bool pointIgnored = true ; // for logging purposes + int currentLength = m_loggingenabled ? + stmUiEventEngine::Distance(m_pinchstart, m_pinchend) : 0; + + TPoint oStart(m_pinchstart) ; + TPoint oEnd(m_pinchend) ; + int difference = 0 ; + state = ELockToThisGesture ; + const TPoint& tp = puie->CurrentXY(); + // calculate the distance of the new point from the stored vector + int d1 = ((m_pinchstart.iX-tp.iX)*(m_pinchstart.iX-tp.iX)) + + ((m_pinchstart.iY-tp.iY)*(m_pinchstart.iY-tp.iY)) ; + int d2 = ((m_pinchend.iX-tp.iX)*(m_pinchend.iX-tp.iX)) + + ((m_pinchend.iY-tp.iY)*(m_pinchend.iY-tp.iY)) ; + // check also if the Y coordinate happens to be near the hold point, + // this seems to be the case at least with alvin, we keep getting two points, + // where one is near the Y coordinate of the hold point + int diffY = Abs(tp.iY-m_pinchstart.iY) ; + + if (d1 < d2 || diffY < 12) + { + // the detected point is near the first point, + // or the detected point is about on the same horizontal line with the hold point + // do not do anything, but keep the gesture + } + else + { + pointIgnored = false ; + // the detected point is close to the other end, then adjust the stored vector + int xd = m_pinchend.iX-tp.iX ; + int yd = m_pinchend.iY-tp.iY ; + if (xd < 0 ) xd = - xd ; + if (yd < 0 ) yd = - yd ; + // look which coordinate is closer to the original and use that + if (xd < yd) + { + // calculate new point based on the X value + m_pinchend.iX = tp.iX ; + m_pinchend.iY = m_m*m_pinchend.iX + m_b ; + if (m_pinchend.iY < 0) m_pinchend.iY = 0 ; + } + else + { + if (m_m != 0) + { + m_pinchend.iY = tp.iY ; + m_pinchend.iX = (m_pinchend.iY - m_b)/m_m ; + if (m_pinchend.iX <0 ) m_pinchend.iX = 0 ; + } + else + { + m_pinchend.iX = tp.iX ; + m_pinchend.iY = m_m*m_pinchend.iX + m_b ; + if (m_pinchend.iY < 0) m_pinchend.iY = 0 ; + } + } + float newd = calculateDistance() ; + // check if the difference is too big and adjust accordingly + // the method also updates the m_ddistance + difference = adjustPinchMove(m_ddistance, newd) ; + // Now we have a pinch gesture with size as details + stmGesture::TTwoPointGesture pgest(KUid, m_pinchstart, m_pinchend); + pgest.setLogging(m_loggingenabled); + pgest.setDetails(difference) ; + // inform the listener + m_listener->gestureEnter(pgest); + } + if (m_loggingenabled) + { + int newLength = stmUiEventEngine::Distance(m_pinchstart, m_pinchend); + float speedX = puie->speedX() ; + float speedY = puie->speedY() ; + + LOGARG("CPinchGestureRecogniser: %d: o: %d, n: %d, d: %d (%d,%d) " \ + "speed %f (%d,%d : %d,%d) (from: (%d,%d : %d,%d) (m: %f b: %f)", + pointIgnored, + currentLength, newLength, difference, + tp.iX, tp.iY, double(speedX), + m_pinchstart.iX, m_pinchstart.iY, m_pinchend.iX, m_pinchend.iY, + oStart.iX, oStart.iY, oEnd.iX, oEnd.iY, + double(m_m), double(m_b)) ; + + } + + } + } + else if (eventCode == stmUiEventEngine::EMove) // The last one is move and we were not pinching + { + if (m_loggingenabled) + { + LOGARG("CPinchGestureRecogniser: %d: num %d code %d", m_pinching, countOfEvents, eventCode); + } + stmUiEventEngine::MUiEvent* puieFirst = puie->previousEvent(); + + // check if we have seen hold + if (m_holdseen) + { + const TPoint& tp1 = puie->CurrentXY() ; + float speedX = puie->speedX() ; + float speedY = puie->speedY() ; + if (m_loggingenabled) + { + LOGARG("CPinchGestureRecogniser: tp1: %d %d hold %d %d, speed %f", + tp1.iX, tp1.iY, + m_holdseenAtPos.iX, m_holdseenAtPos.iY, double(speedX) ); + } + // is the speed extremely high so that it looks like other finger pressing in different location? + if ( (speedX > m_pinchingspeed) || (speedY > m_pinchingspeed) ) + { + TInt64 tstamp = puie->timestamp() ; + TTime now(tstamp) ; + TTimeIntervalMicroSeconds tim = now.MicroSecondsFrom(m_holdseenAtTime) ; + m_pinching = true; + m_pinchstart = m_holdseenAtPos; + m_pinchend = tp1; + calculateZoomingLine(); + m_ddistance = calculateDistance(); + state = ELockToThisGesture ; // NOTE: once pinch is started, it will stay until release + // create the first pich gesture which does not yet resize anything + stmGesture::TTwoPointGesture pgest(KUid, m_pinchstart, m_pinchend); + pgest.setLogging(m_loggingenabled); + pgest.setDetails(0) ; + // inform the listener + m_listener->gestureEnter(pgest); + } + } + } + } + if (!m_pinching) + { + if (m_loggingenabled) + { + LOGARG("CPinchGestureRecogniser: not pinching %d", puie); + } + if (puie && puie->Code() == stmUiEventEngine::EHold) // The last one is hold and we were not pinching + { + m_holdseen = true; + m_holdseenAtPos = puie->CurrentXY(); + m_holdseenAtTime = puie->timestamp() ; + if (m_loggingenabled) + { + LOGARG("CPinchGestureRecogniser: hold seen at(%d, %d) at %Ld", + m_holdseenAtPos.iX, m_holdseenAtPos.iY, m_holdseenAtTime.Int64()); + } + } + } + if (puie && puie->Code() == stmUiEventEngine::ETouch) // The last one is touch + { + m_holdseen = false; + } + else if (puie && puie->Code() == stmUiEventEngine::ERelease) // The last one is release + { + m_holdseen = false; + } + } +#else + // This is the multi touch case: two event streams needs to be there; this is the real pinch zoom + if (numOfActiveStreams == 2) + { + const stmUiEventEngine::MUiEvent* puie1 = pge->getUiEvents(0); + const stmUiEventEngine::MUiEvent* puie2 = pge->getUiEvents(1); + stmUiEventEngine::TUiEventCode eventCode1 = puie1->Code() ; + stmUiEventEngine::TUiEventCode eventCode2 = puie2->Code() ; + + if (m_loggingenabled) + { + TPoint p1 = puie1->CurrentXY() ; + TPoint p2 = puie2->CurrentXY() ; + LOGARG("CPinchGestureRecogniser: two streams: %s at [%d,%d], %s at [%d,%d]", + stmUiEventEngine::EventName(eventCode1), p1.iX, p1.iY, + stmUiEventEngine::EventName(eventCode1), p2.iX, p2.iY + ) ; + + } + + + if (!m_pinching) + { + // This means we start pinching, the events can be any combination of ETouch, EMove, EHold + if ( ( eventCode1 == stmUiEventEngine::ETouch || + eventCode1 == stmUiEventEngine::EMove || + eventCode1 == stmUiEventEngine::EHold + ) && + ( eventCode2 == stmUiEventEngine::ETouch || + eventCode2 == stmUiEventEngine::EMove || + eventCode2 == stmUiEventEngine::EHold ) + ) + { + // This is valid pinching start + m_pinching = true ; + // get the start and end position for the picnhing vector + m_pinchstart = puie1->CurrentXY() ; + m_pinchend = puie2->CurrentXY() ; + calculateZoomingLine(); + m_ddistance = calculateDistance(); + state = ELockToThisGesture ; // NOTE: once pich is started, it will stay until release + if (m_loggingenabled) + { + LOGARG("CPinchGestureRecogniser: pinch start: [%d,%d][%d,%d]", + m_pinchstart.iX, m_pinchstart.iY, m_pinchend.iX, m_pinchend.iY) ; + + } + // create the first pich gesture which does not yet resize anything + stmGesture::TTwoPointGesture pgest(KUid, m_pinchstart, m_pinchend); + pgest.setLogging(m_loggingenabled); + pgest.setDetails(0) ; + // inform the listener + m_listener->gestureEnter(pgest); + } + else + { + // Not a valid pinching start, do nothing (maybe it were easier to just check if one of the events is ERelease) + } + } + else + { + // We have entered pinching state, lets move one of the points unless it is a release + if (eventCode1 == stmUiEventEngine::ERelease || eventCode2 == stmUiEventEngine::ERelease) + { + release(pge); + } + else + { + state = ELockToThisGesture ; + + // get the start and end position for the picnhing vector + m_pinchstart = puie1->CurrentXY() ; + m_pinchend = puie2->CurrentXY() ; + float newd = calculateDistance() ; + // check if the difference is too big and adjust accordingly + // the method also updates the m_ddistance + int difference = adjustPinchMove(m_ddistance, newd) ; + // Now we have a pinch gesture with size + if (m_loggingenabled) + { + LOGARG("CPinchGestureRecogniser: pinch: [%d,%d][%d,%d], diff %d", + m_pinchstart.iX, m_pinchstart.iY, m_pinchend.iX, m_pinchend.iY, difference) ; + + } + + stmGesture::TTwoPointGesture pgest(KUid, m_pinchstart, m_pinchend); + pgest.setLogging(m_loggingenabled); + pgest.setDetails(difference) ; + // inform the listener + m_listener->gestureEnter(pgest); + } + } + + } +#endif + + if (state == ENotMyGesture) + { + if (m_loggingenabled) + { + LOGARG("CPinchGestureRecogniser: NotMyGesture %d %d %d ", + m_pinching, m_holdseen, numOfActiveStreams) ; + } + // if it was not our gesture, then the state can not be pinching... + m_pinching = false ; + } + return state; +} + +void CPinchGestureRecogniser::release(MGestureEngineIf* /*ge*/) +{ + m_pinching = false ; + m_listener->gestureExit(KUid) ; +} + +/*! + * Now that we know the two points where the zooming started, we move those points only along + * the same line y = mx + b, so lets calculate m and b. + */ +void CPinchGestureRecogniser::calculateZoomingLine() +{ + int sX = m_pinchstart.iX ; + int sY = m_pinchstart.iY ; + int eX = m_pinchend.iX ; + int eY = m_pinchend.iY ; + + if (eX == sX) + { + m_m = 0.f ; + } + else + { + m_m = float(eY-sY)/(eX-sX) ; + } + m_b = sY-(m_m*sX) ; +} + +/*! + * calculate the distance, return as float + */ +float CPinchGestureRecogniser::calculateDistance() +{ + double x = ((m_pinchstart.iX-m_pinchend.iX)*(m_pinchstart.iX-m_pinchend.iX))+ + ((m_pinchstart.iY-m_pinchend.iY)*(m_pinchstart.iY-m_pinchend.iY)) ; + double ddist ; + Math::Sqrt(ddist, x) ; + return float(ddist) ; +} + +/*! + * Set the pinching speed as pixels / ms (meaning that in case of singletouch device + * the other finger looks like the EMove UI event suddenly jumps to new location; + * in resistive the new location is somewhere in the middle of the touches, in capacitive + * the driver seems to report three or four points: + * original (x,y), new (a,b) and also (a,y), sometimes (x,b) + */ +void CPinchGestureRecogniser::setPinchingSpeed(float aSpeed) __SOFTFP +{ + m_pinchingspeed = aSpeed ; +} + +/*! + * Adjust the pinch move so that it will not be too jumpy + */ +int CPinchGestureRecogniser::adjustPinchMove(float& aPreviousDistance, float aNewDistance) +{ + float diff = aNewDistance - aPreviousDistance ; + float logdiff = diff ; + if (diff < 0) diff = -diff ; // Note that the next calculations need the positive diff value, but keep the original in logdiff + float changePercentage = (diff/aPreviousDistance)*100.f ; + if (changePercentage > 10.f) + { + // change more than 10%, make at most 10% + float newdiff = aPreviousDistance*0.1f ; + if (aPreviousDistance > aNewDistance) newdiff = -newdiff ; + if (m_loggingenabled) + { + LOGARG("CPinchGestureRecogniser: adjustPinchMove from %f to %f : was, now %f %f", + double(logdiff), double(newdiff), double(aPreviousDistance), double(aNewDistance)); + } + + aPreviousDistance = aPreviousDistance + newdiff ; + diff = newdiff ; + } + else + { + if (m_loggingenabled) + { + LOGARG("CPinchGestureRecogniser: adjustPinchMove from %f to %f : was, now %f %f", + double(logdiff), double(diff), double(aPreviousDistance), double(aNewDistance)); + } + aPreviousDistance = aNewDistance ; // accept the new value and update the new length + diff = logdiff ; // put the original back (this is why the logdiff can not be Abs(diff)! + } + return (int)diff ; +} diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/src/releasegesturerecogniser.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/src/releasegesturerecogniser.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,126 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Gesture helper implementation +* +*/ + +#include "GenericSimpleGesture.h" +#include "releasegesturerecogniser.h" +#include "rt_uievent.h" +#include "filelogger.h" + +using namespace stmGesture ; + +_LIT8(KReleaseName, "Release"); + +CReleaseGestureRecogniser::CReleaseGestureRecogniser(MGestureListener* aListener) : + CGestureRecogniser(aListener) +{ +} + +CReleaseGestureRecogniser* CReleaseGestureRecogniser::NewL(MGestureListener* aListener) +{ + CReleaseGestureRecogniser* self = new (ELeave) CReleaseGestureRecogniser(aListener) ; + return self; +} + +CReleaseGestureRecogniser::~CReleaseGestureRecogniser() +{ +} + +/*! + * Release gesture recogniser. Note that this one never owns the gesture, it just calls + * the callback if it detects ERelease inside the area being watched. + * There could be also check for the target window? + */ +TGestureRecognitionState CReleaseGestureRecogniser::recognise(int numOfActiveStreams, + MGestureEngineIf* pge) +{ + TGestureRecognitionState state = ENotMyGesture; + // Check if we are enabled or not + if (!m_gestureEnabled) return state ; + + // Look at the events to see if it looks like edge scroll with one pointer + if (numOfActiveStreams == 1) + { + // Then look at the event stream, it has to be EHold + const stmUiEventEngine::MUiEvent* puie = pge->getUiEvents(0); + if (!puie) return state; + + int countOfEvents = puie->countOfEvents(); + stmUiEventEngine::TUiEventCode eventCode = puie->Code(); + + if (m_loggingenabled) + { + LOGARG("CReleaseGestureRecogniser: %d num %d code %d", eventCode, countOfEvents, eventCode); + } + if (eventCode == stmUiEventEngine::ERelease) + { + if (m_loggingenabled) + { + LOGARG("CReleaseGestureRecogniser: 0x%x ERelease: num %d code %d, %d", + this, countOfEvents, puie->CurrentXY().iX, puie->CurrentXY().iY); + LOGARG("CReleaseGestureRecogniser: area, %d,%d %d,%d", + m_area.iTl.iX, m_area.iTl.iY, m_area.iBr.iX, m_area.iBr.iY); + } + bool produceGesture ; + if(!m_area.IsEmpty()) + { + produceGesture = m_area.Contains(puie->CurrentXY()) ; + if(produceGesture && m_loggingenabled) + { + LOGARG("CReleaseGestureRecogniser: HIT area (%d,%d) in %d,%d %d,%d", + puie->CurrentXY().iX, puie->CurrentXY().iY, + m_area.iTl.iX, m_area.iTl.iY, + m_area.iBr.iX, m_area.iBr.iY); + } + } + else + { + produceGesture = (m_powner == puie->Target()) ; // no area defined, touch detected in the window + } + if (produceGesture) + { + state = EGestureActive ; + // issue the release gesture using the GenericSimpleGesture + stmGesture::TGenericSimpleGesture pgest(KUid, puie->CurrentXY()); + // Give the gesture a name + pgest.setName(KReleaseName) ; + // Call the listener to inform that a release has occurred... + m_listener->gestureEnter(pgest); + } + } + } + return state; +} + +void CReleaseGestureRecogniser::release(MGestureEngineIf* /*ge*/) +{ + if (m_loggingenabled) + { + LOGARG("CReleaseGestureRecogniser: 0x%x release", this); + } +} + +void CReleaseGestureRecogniser::setArea(const TRect& theArea) +{ + m_area = theArea ; + if (m_loggingenabled) + { + LOGARG("CReleaseGestureRecogniser: area, %d,%d %d,%d", + m_area.iTl.iX, m_area.iTl.iY, + m_area.iBr.iX, m_area.iBr.iY); + } +} + diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/src/stateengine.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/src/stateengine.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,1159 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + +#include "stateengine.h" +#include "utils.h" +#include "uievent.h" +#include "uieventsender.h" +#include "filelogger.h" +//#include "flogger.h" + +using namespace stmUiEventEngine ; + +/*! + State definitions glue together the methods of the stateengine.cpp + so that it will behave as defined in the state machine specification. + First define the separate elements for each possible event and then tie them together + to create one state entry. The state entries then are put to array + where the index is at the same time also the state ID. + + STATE_ELEMENT arrays define the methods called when handling a message. + \sa STATE_ELEMENT. + Note that the last row of STATE_ELEMENT array must NOT have a ConditionFunction entry + and it must have a NextState entry != Eignore. Otherwise the state machine will + not behave correctly. + + */ +/*! Add macro without token pasting to make creation of the state machine tables easier + and removing the necessity to write the classname twice. + Maybe there would be some better way to do this using templates and typedefs? + */ +#define CND(x) isF +#define ACT(x) aF + +/********************************************************************************* + * empty statedef as a dummy entry + * */ +const STATE_ELEMENT __ErrorEvent[1] = { + 0, + ACT(ErrorEvent), + EInit +}; + +const STATE Ignore__[1] = { + EDown, __ErrorEvent +} ; + +/*! + :INIT state and its event specific elements + See the spec in http://wikis.in.nokia.com/Runtimes/NewGestureLibrary + Down is only valid event in :INIT state + The event is consumed immediately, so that the state machine will process only these + methods when processing the message. + If touch timer has been set, the next state is InTouchTime. + If no touch timer, but if hold timer has been defined, the next state is InHoldTime_U + If no touch or hold timer have been defined, but touch area has been defined, next state is InTouchArea. + 11-May-2009: addition: add another touch area: one for touch time and one for touch area after touch time + has elapsed. This allows "sloppy" touch to be handled properly without extra move if touchtimearea is larger, + but after touch has been detected a smaller movement is allowed. + */ +const STATE_ELEMENT Init__Down[12] = { + 0, ACT(ConsumeEvent), Eignore, + 0, ACT(SetGestureStart), Eignore, + 0, ACT(SetCurrentPos), Eignore, + CND(IsTouchTimer), ACT(InitTouchTimer), Eignore, + CND(IsHoldTimer), ACT(InitHoldTimer), Eignore, + CND(IsTouchTimeArea), ACT(PrepareTouchTimeArea),Eignore, + CND(IsHoldArea), ACT(PrepareHoldArea) ,Eignore, + CND(IsTouchTimer), 0, EInTouchTime, + 0, ACT(ProduceTouch), Eignore, + CND(IsHoldTimer), 0, EInHoldTime_U, + CND(IsTouchArea), ACT(PrepareTouchArea),EInTouchArea, + 0, 0, EDispatch // If nothing else happens, goto to Dispatch state +}; +/** + * All the rest of the events are errors so produce error entry to log and + * stay in the Init state + */ +const STATE_ELEMENT Init__ErrorEvent[2] = { + 0, ACT(ConsumeEvent), Eignore, // remember to consume event, otherwise state machine will loop... + 0, ACT(ErrorEvent), EInit +}; + +/*! + * :INIT + * note that only valid event is DOWN, all the rest can be handled as errors + */ +const STATE Init__[7] = { + EDown, Init__Down, + EDrag, Init__ErrorEvent, + ECapacitiveUP, Init__ErrorEvent, + EResistiveUP, Init__ErrorEvent, + ETouchTimer, Init__ErrorEvent, + EHoldTimer, Init__ErrorEvent, + ESuppressTimer, Init__ErrorEvent +}; + +/*! + * :Dispatch state end its elements + * Here the valid events are DRAG and the UP events. + */ +const STATE_ELEMENT Dispatch__Drag[7] = { + 0, ACT(StoreMovePos), Eignore, + 0, ACT(ConsumeEvent), Eignore, + 0, ACT(SetCurrentPos), Eignore, + 0, ACT(AddDraggingPos), Eignore, + 0, ACT(ProduceMove), Eignore, + CND(LooksLikeHold), ACT(InitHoldTimer),EInHoldTime_U, + 0, 0, EDispatch +} ; + +const STATE_ELEMENT Dispatch__CapacitiveUp[3] = { + 0, ACT(ConsumeEvent), Eignore, + 0, ACT(SetCurrentPos), Eignore, + 0, ACT(ProduceRelease), EInit +} ; + +const STATE_ELEMENT Dispatch__ResistiveUp[4] = { + 0, ACT(ConsumeEvent), Eignore, + 0, ACT(SetCurrentPos), Eignore, + CND(IsSuppressTimer),ACT(InitMoveSuppressTimer), ESuppress_D, + 0, ACT(ProduceRelease), EInit +} ; + +/*! + * All the rest of the events are errors so produce error entry to log and + * stay in the Dispatch state + * (TODO: note that in the future we may further + * define the error cases so that they may change state; ) + */ +const STATE_ELEMENT DispatchErrorEvent[2] = { + 0, ACT(ConsumeEvent), Eignore, // remember to consume event, otherwise state machine will loop... + 0, ACT(ErrorEvent), EDispatch +}; + +const STATE Dispatch__[7] = { + EDown, DispatchErrorEvent, + EDrag, Dispatch__Drag, + ECapacitiveUP, Dispatch__CapacitiveUp, + EResistiveUP, Dispatch__ResistiveUp, + ETouchTimer, DispatchErrorEvent, + EHoldTimer, DispatchErrorEvent, + ESuppressTimer, DispatchErrorEvent +}; + +/*! + * :InTouchTime state end its elements + * Here the valid events are DRAG and the UP events and the TouchTimer + */ +const STATE_ELEMENT InTouchTime__Drag[6] = { + 0, ACT(StoreMovePos), Eignore, + CND(InsideTouchTimeArea), ACT(ConsumeEvent), Eignore, + CND(InsideTouchTimeArea), ACT(AddToTouch), EInTouchTime, // Calculate touch XY as average of the touches + 0, ACT(ClearTouchTimer), Eignore, // These lines are done only if InsideTouchArea returns false + 0, ACT(ClearHoldTimer), Eignore, + 0, ACT(ProduceTouch), EDispatch + +} ; +/** + * Note that ConsumeEvent is missing so after doing this the state engine will do EDispatch + */ +const STATE_ELEMENT InTouchTime__CapacitiveUp[4] = { + 0, ACT(SetCurrentPos), Eignore, + 0, ACT(ClearTouchTimer), Eignore, + 0, ACT(ClearHoldTimer), Eignore, + 0, ACT(ProduceTouch), EDispatch +} ; +/** + * Note that ConsumeEvent is not called if IsHoldTimer returns false, so the Dispatch will be done + * by the state machine. + */ +const STATE_ELEMENT InTouchTime__ResistiveUp[5] = { + 0, ACT(SetCurrentPos), Eignore, + 0, ACT(ClearTouchTimer), Eignore, + 0, ACT(ProduceTouch), Eignore, + CND(IsHoldTimer), 0, /*ACT(ConsumeEvent),*/EInHoldTime_U, // Note that otherwise immediate UP is handled improperly + 0, 0, EDispatch +} ; + +const STATE_ELEMENT InTouchTime__TouchTimer[6] = { + 0, ACT(ConsumeEvent), Eignore, + 0, ACT(ClearTouchTimer), Eignore, + 0, ACT(ProduceTouch), Eignore, + CND(IsTouchArea), ACT(PrepareTouchArea),Eignore, // prepare the other touch area + CND(IsHoldTimer), 0, EInHoldTime_U, + 0, 0, EInTouchArea +} ; + + +/** + * All the rest of the events are errors so produce error entry to log and + * stay in the InTouchTime state + */ +const STATE_ELEMENT InTouchTimeErrorEvent[2] = { + 0, ACT(ConsumeEvent), Eignore, // remember to consume event, otherwise state machine will loop... + 0, ACT(ErrorEvent), EInTouchTime +}; + +const STATE InTouchTime__[7] = { + EDown, InTouchTimeErrorEvent, + EDrag, InTouchTime__Drag, + ECapacitiveUP, InTouchTime__CapacitiveUp, + EResistiveUP, InTouchTime__ResistiveUp, + ETouchTimer, InTouchTime__TouchTimer, + EHoldTimer, InTouchTimeErrorEvent, + ESuppressTimer, InTouchTimeErrorEvent +}; + +/*! + * :InHoldTime_U state end its elements + * Here only touch timer event is invalid + */ + +const STATE_ELEMENT InHoldTime_U__Down[1] = { + 0, 0, EInHoldTime_D // Note that ConsumeEvent is not called +} ; + +const STATE_ELEMENT InHoldTime_U__Drag[3] = { + 0, ACT(StoreMovePos), Eignore, + CND(InsideHoldArea), ACT(ConsumeEvent), EInHoldTime_U, + 0, ACT(ClearHoldTimer), EDispatch // Note that in this case ConsumeEvent is not called +} ; +/** + * Note that ConsumeEvent is missing so after doing this the state engine will do EDispatch + */ +const STATE_ELEMENT InHoldTime_U__CapacitiveUp[1] = { + 0, ACT(ClearHoldTimer), EDispatch // Note that ConsumeEvent not called +} ; +/** + * + */ +const STATE_ELEMENT InHoldTime_U__ResistiveUp[5] = { + 0, ACT(ConsumeEvent), Eignore, + 0, ACT(SetCurrentPos), Eignore, + CND(IsSuppressTimer),ACT(InitTouchSuppressTimer), EInHoldTime_D, // If suppression, start timer and wait for down or timer + 0, ACT(ClearHoldTimer), Eignore, // remember to do this + 0, ACT(ProduceRelease), EInit // No suppression, then this is immediate release +} ; + +const STATE_ELEMENT InHoldTime_U__HoldTimer[3] = { + 0, ACT(ConsumeEvent), Eignore, + 0, ACT(ProduceHold), Eignore, + 0, ACT(RestartHoldTimer), EInHoldTime_U, +} ; + +const STATE_ELEMENT InHoldTime_U__SuppressTimer[2] = { + 0, ACT(ConsumeEvent), Eignore, // remember to consume event, otherwise state machine will loop... + 0, ACT(ErrorEvent), EInHoldTime_U +} ; + + +/** + * All the rest of the events are errors so produce error entry to log and + * stay in the InHoldTime_U state + */ +const STATE_ELEMENT InHoldTime_UErrorEvent[2] = { + 0, ACT(ConsumeEvent), Eignore, // remember to consume event, otherwise state machine will loop... + 0, ACT(ErrorEvent), EInHoldTime_U +}; + +const STATE InHoldTime_U__[7] = { + EDown, InHoldTime_U__Down, + EDrag, InHoldTime_U__Drag, + ECapacitiveUP, InHoldTime_U__CapacitiveUp, + EResistiveUP, InHoldTime_U__ResistiveUp, + ETouchTimer, InHoldTime_UErrorEvent, + EHoldTimer, InHoldTime_U__HoldTimer, + ESuppressTimer, InHoldTime_U__SuppressTimer +}; + + +/*! + * :InHoldTime_D state end its elements + * Here drag, touch timer and suppress timer events are invalid + */ + +const STATE_ELEMENT InHoldTime_D__Down[5] = { + 0, ACT(ClearSuppressTimer), Eignore, + 0, ACT(ConsumeEvent), Eignore, + CND(InsideHoldArea), 0, EInHoldTime_U, + 0, ACT(ClearHoldTimer), Eignore, + 0, ACT(ProduceMove), EDispatch +} ; + +/** + * Note that ConsumeEvent is missing so after doing this the state engine will do InHoldTime_U + */ +const STATE_ELEMENT InHoldTime_D__CapacitiveUp[1] = { + 0, 0, EInHoldTime_U +} ; +/** + * Note that ConsumeEvent is missing so after doing this the state engine will do InHoldTime_U + */ +const STATE_ELEMENT InHoldTime_D__ResistiveUp[1] = { + 0, 0, EInHoldTime_U // InHoldTime_U initialises timers etc. if needed +} ; +/*! + * In case of hold timer has been elapsed stop the timers, generate Release UI event. + */ +const STATE_ELEMENT InHoldTime_D__HoldTimer[4] = { + 0, ACT(ConsumeEvent), Eignore, + 0, ACT(ClearSuppressTimer), Eignore, + 0, ACT(ClearHoldTimer), Eignore, + 0, ACT(ProduceRelease), EInit, +} ; +/*! + * If suppress timer hits, stop the timers and generate Release UI event. + */ +const STATE_ELEMENT InHoldTime_D__SuppressTimer[4] = { + 0, ACT(ConsumeEvent), Eignore, + 0, ACT(ClearSuppressTimer), Eignore, + 0, ACT(ClearHoldTimer), Eignore, + 0, ACT(ProduceRelease), EInit, +} ; + +/** + * All the rest of the events are errors so produce error entry to log and + * stay in the InHoldTime_D state + */ +const STATE_ELEMENT InHoldTime_DErrorEvent[2] = { + 0, ACT(ConsumeEvent), Eignore, // remember to consume event, otherwise state machine will loop... + 0, ACT(ErrorEvent), EInHoldTime_D +}; + +const STATE InHoldTime_D__[7] = { + EDown, InHoldTime_D__Down, + EDrag, InHoldTime_DErrorEvent, + ECapacitiveUP, InHoldTime_D__CapacitiveUp, + EResistiveUP, InHoldTime_D__ResistiveUp, + ETouchTimer, InHoldTime_DErrorEvent, + EHoldTimer, InHoldTime_D__HoldTimer, + ESuppressTimer, InHoldTime_D__SuppressTimer +}; + + +/*! + * :InTouchArea state end its elements + * Here Drag and Up events are valid. + * If drag is inside touch are it is ignored, otherwise + * the Dispatch state will handle the event. + */ + +const STATE_ELEMENT InTouchArea__Drag[3] = { + 0, ACT(StoreMovePos), Eignore, + CND(InsideTouchArea), ACT(ConsumeEvent), EInTouchArea, + 0, 0, EDispatch // Note that in this case ConsumeEvent has not been called so Dispatch state processes the message +} ; + +/** + * Note that ConsumeEvent is missing so after doing this the state engine will do Dispatch + */ +const STATE_ELEMENT InTouchArea__CapacitiveUp[1] = { + 0, 0, EDispatch +} ; +/** + * Note that ConsumeEvent is missing so after doing this the state engine will do Dispatch + */ +const STATE_ELEMENT InTouchArea__ResistiveUp[1] = { + 0, 0, EDispatch +} ; + +/** + * All the rest of the events are errors so produce error entry to log and + * stay in the InTouchArea state + */ +const STATE_ELEMENT InTouchAreaErrorEvent[2] = { + 0, ACT(ConsumeEvent), Eignore, // remember to consume event, otherwise state machine will loop... + 0, ACT(ErrorEvent), EInTouchArea +}; + +const STATE InTouchArea__[7] = { + EDown, InTouchAreaErrorEvent, + EDrag, InTouchArea__Drag, + ECapacitiveUP, InTouchArea__CapacitiveUp, + EResistiveUP, InTouchArea__ResistiveUp, + ETouchTimer, InTouchAreaErrorEvent, + EHoldTimer, InTouchAreaErrorEvent, + ESuppressTimer, InTouchAreaErrorEvent +}; + + +/*! + * :Suppress_D state end its elements + * Here Down and suppress timers are OK. + */ + +/*! + * Down will be handled as a Drag event in the Dispatch state. + */ +const STATE_ELEMENT Suppress_D__Down[4] = { + 0, ACT(ClearSuppressTimer), Eignore, + 0, ACT(RenameToDrag), EDispatch +} ; +/*! + * Suppress timer will generate Release UI event. + */ +const STATE_ELEMENT Suppress_D__SuppressTimer[3] = { + 0, ACT(ConsumeEvent), Eignore, + 0, ACT(ClearSuppressTimer), Eignore, + 0, ACT(ProduceRelease), EInit, +} ; + +/** + * All the rest of the events are errors so produce error entry to log and + * stay in the Suppress_D state + */ +const STATE_ELEMENT Suppress_DErrorEvent[2] = { + 0, ACT(ConsumeEvent), Eignore, // remember to consume event, otherwise state machine will loop... + 0, ACT(ErrorEvent), ESuppress_D +}; + +const STATE Suppress_D__[7] = { + EDown, Suppress_D__Down, + EDrag, Suppress_DErrorEvent, + ECapacitiveUP, Suppress_DErrorEvent, + EResistiveUP, Suppress_DErrorEvent, + ETouchTimer, Suppress_DErrorEvent, + EHoldTimer, Suppress_DErrorEvent, + ESuppressTimer, Suppress_D__SuppressTimer +}; +/*! + * The allStates array contains all the possible states of the state machine. + */ +const STATE* const allStates[8] = +{ + Ignore__, + Init__, + Dispatch__, + InTouchTime__, + InHoldTime_U__, + InHoldTime_D__, + InTouchArea__, + Suppress_D__ +}; +/*! + * stateNames are used in the logging + */ +const char* const stateNames[8] = +{ + "Ignore", + "Init", + "Dispatch", + "InTouchTime", + "InHoldTime_U", + "InHoldTime_D", + "InTouchArea", + "Suppress" +}; + +// event names are also used in logging +const char* const hweventNames[] = { + "EDown", + "EDrag", + "ECapacitiveUP", + "EResistiveUP", + "ETouchTimer", + "EHoldTimer", + "ESuppressTimer" +} ; + +/*! CStateEngine contains the methods used in the state machine implementation. + * + * The methods in CStateEngine used in the state machine definition are + * either condition methods or action methods. + * + * Constructor + * \param[in]: MTimerInterface atimerif. An attempt to make this more OS agnostic the actual + * timers are accessed using a separate interface. + */ +CStateEngine::CStateEngine(CStateEngineConfiguration* aConfig, MTimerInterface* atimerif, int aIndex) +{ + m_config = aConfig ; + m_timerif = atimerif ; + m_currentState = EInit ; + m_index = aIndex ; +} + +CStateEngine::~CStateEngine() +{ + // Just to be sure... + iTouchPoints.Reset() ; + iDragPoints.ResetAndDestroy() ; +} +/*! + * ConsumeEvent: the method defines that the turnStateMachine will stop the processing + * of the state methods after it has reached the next state. + * + */ +void CStateEngine::ConsumeEvent() +{ + m_eventConsumed = true ; +} +/*! + * Condition method + * \return true, if the touch timer limit > 0 + */ +bool CStateEngine::IsTouchTimer() +{ + bool isit = (m_config->m_touchTimerLimit > 0) ; + + return isit ; +} +/*! + * Condition method + * \return true, if the hold timer limit > 0 + */ +bool CStateEngine::IsHoldTimer() +{ + bool isit = (m_config->m_holdTimerLimit > 0) ; + + return isit ; +} +/*! + * Condition method + * \return true, if the suppress timer limit > 0 + */ +bool CStateEngine::IsSuppressTimer() +{ + bool isit = (m_config->m_suppressTimerLimit > 0) ; + + return isit ; +} +/*! + * Condition method + * \return true, if the touch area has been defined (the touch tolerancelength > 0) + */ +bool CStateEngine::IsTouchTimeArea() +{ + bool isit = (m_config->m_touchTimeTolerance.iX > 0) ; + return isit ; +} +/*! + * Condition method + * \return true, if the touch area has been defined (the touch tolerancelength > 0) + */ +bool CStateEngine::IsTouchArea() +{ + bool isit = (m_config->m_touchTolerance.iX > 0) ; + return isit ; +} +/*! + * Condition method + * \return true, if the hold area has been defined (the hold tolerancelength > 0) + */ +bool CStateEngine::IsHoldArea() +{ + bool isit = (m_config->m_holdTolerance.iX > 0) ; + return isit ; +} + +bool CStateEngine::InsideArea(const TPoint& point, + const TRect& rect, + TAreaShape shape, + const TPoint& tolerance) +{ + bool isit; + switch(shape) + { + default: // pass trough + case ERectangle: + { + isit = rect.Contains(m_hwe.iPosition) ; + break ; + } + case ECircle: + { + TPoint delta = m_hwe.iPosition - point; + long circlepoint = delta.iX * delta.iX + delta.iY * delta.iY; + isit = (circlepoint < tolerance.iX * tolerance.iX); + break ; + } + case EEllipse: + { + int asquare = tolerance.iX * tolerance.iX ; + int bsquare = tolerance.iY * tolerance.iY ; + TPoint delta = m_hwe.iPosition - point; + int result = (delta.iX * delta.iX) * bsquare + (delta.iY * delta.iY) * asquare; + + isit = (result < asquare * bsquare); + break ; + } + } + return isit ; +} + +/*! + * Condition method + * Check if the current event is positioned inside the touch area. + * Touch area can be a rectangle, a circle or an ellipse, so different + * calculation needs to be done based on the shape of the area. + */ +bool CStateEngine::InsideTouchTimeArea() +{ + return InsideArea(m_touchCentre, m_touchRect, + m_config->m_touchAreaShape, m_config->m_touchTimeTolerance); +} +/*! + * Condition method + * Check if the current event is positioned inside the touch area. + * Touch area can be a rectangle, a circle or an ellipse, so different + * calculation needs to be done based on the shape of the area. + */ +bool CStateEngine::InsideTouchArea() +{ + return InsideArea(m_touchCentre, m_touchRect, + m_config->m_touchAreaShape, m_config->m_touchTolerance); +} +/*! + * Condition method + * Check if the current event is positioned inside the hold area. + * Hold area can be a rectangle, a circle or an ellipse, so different + * calculation needs to be done based on the shape of the area. + */ +bool CStateEngine::InsideHoldArea() +{ + return InsideArea(m_holdCentre, m_holdRect, + m_config->m_holdAreaShape, m_config->m_holdTolerance); +} +/*! + * Condition method + * Check if the gesture looks like a hold, i.e. the movement has stopped. + * \sa isNewHoldingPoint + */ +bool CStateEngine::LooksLikeHold() +{ + bool isit = isNewHoldingPoint() ; + return isit ; +} +/*! + * Action method + * Error logging. + */ +void CStateEngine::ErrorEvent() +{ + // Log the error + if (m_config->m_enableLogging) + { + LOGARG("ErrorEvent: %s %s", stateNames[m_currentState], hweventNames[m_hwe.iType]) ; + } +} +/*! + * Action method + * Initialize touch timer. At the same time calculate also the touch rectangle. + */ +void CStateEngine::InitTouchTimer() +{ + m_touchRect = ToleranceRect(m_hwe.iPosition, m_config->m_touchTolerance) ; + m_touchCentre = m_hwe.iPosition ; + m_timerif->startTouchTimer(m_config->m_touchTimerLimit, m_index) ; +} +/*! + * Action method. + * Initialize hold timer. At the same time calculate also the hold rectangle. + */ +void CStateEngine::InitHoldTimer() +{ + m_holdRect = ToleranceRect(m_hwe.iPosition, m_config->m_holdTolerance) ; + m_holdCentre = m_hwe.iPosition ; + m_timerif->startHoldTimer(m_config->m_holdTimerLimit, m_index) ; +} +/*! + * Action method + * Restart the hold timer using the hold timer limit. + */ +void CStateEngine::RestartHoldTimer() +{ + m_timerif->startHoldTimer(m_config->m_holdTimerLimit, m_index) ; +} +/*! + * Action method + * Initialize suppression timer. This timer is used during touch detection when + * resistive UP has been detected. If new DOWN comes while timer is running, it is ignored. + */ +void CStateEngine::InitTouchSuppressTimer() +{ + m_timerif->startSuppressTimer(m_config->m_suppressTimerLimit, m_index) ; +} +/*! + * Action method. + * Initialize suppression timer after move. Tests show that when user is using light touch and + * moving finger to opposite directions there may be accidental ups and downs where the time between + * up and down may be well over 120 ms. + */ +void CStateEngine::InitMoveSuppressTimer() +{ + m_timerif->startSuppressTimer(m_config->m_moveSuppressTimerLimit, m_index) ; +} +/*! + * Action method + * Stop the touch timer. + */ +void CStateEngine::ClearTouchTimer() +{ + m_timerif->cancelTouchTimer(m_index) ; +} +/*! + * Action method + * Stop the hold timer. + */ +void CStateEngine::ClearHoldTimer() +{ + m_timerif->cancelHoldTimer(m_index) ; +} +/*! + * Action method + * Stop the suppress timer. + */ +void CStateEngine::ClearSuppressTimer() +{ + m_timerif->cancelSuppressTimer(m_index) ; +} +/*!Helper method. + * Create UI event + * \param code The new UI event type (Touch, Release, Move, Hold) + */ +CUiEvent* CStateEngine::createUIEventL(TUiEventCode code, const TPoint& aPos) +{ + + m_previousUiGenerated = code ; + return CUiEvent::NewL(code, m_gestureStartXY, aPos, getPreviousXY(aPos), + isTimerMessage(), m_hwe.iTarget, getInterval(), m_index, m_hwe.iTime.Int64()) ; +} +/*! + * Return the previous XY position and store the current for next round + */ +TPoint CStateEngine::getPreviousXY(const TPoint& aCurrentXY) +{ + TPoint p = m_previousXY ; + m_previousXY = aCurrentXY ; + return p ; +} +/*! + * \return true, if the current event was timer triggered + */ +bool CStateEngine::isTimerMessage() +{ + return (m_hwe.iType >= ETouchTimer); // NOTE: if new events are added at the end of the list this needs to be changed +} +/*! + * Action method. + * Generate the Touch UI event. + * If there are a set of touch points collected, calculate the position to the + * Touch UI event to be the average of the collected points. + */ +void CStateEngine::ProduceTouch() +{ + m_wasFiltered = false ; + CUiEvent* cue = NULL; + getInterval() ; // dummy call to initialize the variable.... + TInt err(KErrNone); + if (iTouchPoints.Count()>0) + { + // calculate average of the touch points + m_currentTouchXY = calculateTouchAverageFromPoints() ; + TRAP(err, cue = createUIEventL(stmUiEventEngine::ETouch, m_currentTouchXY)) ; + } + else + { + TRAP(err, cue = createUIEventL(stmUiEventEngine::ETouch, m_uiEventXY)) ; + } + if(!err) + m_config->m_uiEventSender->AddEvent(cue) ; +} +/*! + * Action method + * Generate the Move UI event. The position of the event has been set in the SetCurrentPos + * The previous position needs some special handling, if filtering has been used. + * \sa SetCurrentPos + */ +void CStateEngine::ProduceMove() +{ + m_wasFiltered = false ; + if (m_uiEventXY == m_previousXY) { + return; + } + CUiEvent* cue = NULL; + TRAPD(err, cue = createUIEventL(stmUiEventEngine::EMove, m_uiEventXY)) ; + + if(!err) + m_config->m_uiEventSender->AddEvent(cue) ; +} +/*! + * Action method + * Generate the Release UI event. + */ +void CStateEngine::ProduceRelease() +{ + m_wasFiltered = false ; + CUiEvent* cue = NULL; + TRAPD(err, cue = createUIEventL(stmUiEventEngine::ERelease, m_uiEventXY)) ; + if(!err) + m_config->m_uiEventSender->AddEvent(cue) ; + + if (m_config->m_enableLogging) + { + LOGFLUSH ; + } +} +/*! + * Action method + * Generate the Hold UI event. + */ +void CStateEngine::ProduceHold() +{ + m_wasFiltered = false ; + CUiEvent* cue = NULL; + TRAPD(err, cue = createUIEventL(stmUiEventEngine::EHold, m_holdCentre)) ; + if(!err) + m_config->m_uiEventSender->AddEvent(cue) ; + +} +/*! + * Action method + * Rename the current event to drag. This is used when the accidental up/down message pair + * has been detected, the DOWN event is handled as it were a move event. + */ +void CStateEngine::RenameToDrag() +{ + m_hwe.iType = stmUiEventEngine::EDrag ; +} +/*! + * Action method + * Initialize the touch time area. Clear the array for collected touch points and + * calculate the touch rectangle. + */ +void CStateEngine::PrepareTouchTimeArea() +{ + if (iTouchPoints.Count()>0) iTouchPoints.Reset() ; + m_touchRect = ToleranceRect(m_hwe.iPosition, m_config->m_touchTimeTolerance) ; +} + +/*! + * Action method + * Initialize the touch area. Clear the array for collected touch points and + * calculate the touch rectangle. + */ +void CStateEngine::PrepareTouchArea() +{ + if (iTouchPoints.Count()>0) iTouchPoints.Reset() ; + m_touchRect = ToleranceRect(m_hwe.iPosition, m_config->m_touchTolerance) ; +} +/*! + * Action method + * Initialize the hold area rectangle. + */ +void CStateEngine::PrepareHoldArea() +{ + m_holdRect = ToleranceRect(m_hwe.iPosition, m_config->m_holdTolerance) ; +} +/*! + * Action method + * Store the current position and time always when we see EDrag. The stored value is used + * to calculate correct speed after filtered messages. + */ +void CStateEngine::StoreMovePos() +{ + if (m_config->m_enableLogging) + { + LOGARG("store move pos from (%d, %d) to (%d, %d)", + m_lastFilteredPosition.iX, m_lastFilteredPosition.iY,m_hwe.iPosition.iX, + m_hwe.iPosition.iY ) ; + } + m_lastFilteredPosition = m_hwe.iPosition ; + m_lastFilteredMessageTime = m_hwe.iTime ; + +} +/*! + * Action method + * Store the current position and time. + */ +void CStateEngine::SetCurrentPos() +{ + m_uiEventXY = m_hwe.iPosition ; +} +/*! + * Action method + * Initialize the gesture starting. + */ +void CStateEngine::SetGestureStart() +{ + m_gestureStartXY = m_hwe.iPosition ; + m_previousXY = m_hwe.iPosition ; + m_gestureTarget = m_hwe.iTarget ; + iDragPoints.ResetAndDestroy() ; + iTouchPoints.Reset() ; +} +/*! + * Action method + * Add current point to the set of touch points. + */ +void CStateEngine::AddToTouch() +{ + iTouchPoints.Append(THwEvent(m_hwe.iType, + m_hwe.iPosition, + m_hwe.iTime, + m_hwe.iTarget, + m_index) + ) ; + // calculate the average of touch points and move the touch area accordingly + // this allows slight movement of the figertip while inside touch time + if (iTouchPoints.Count()>2) + { + TPoint newtp = calculateTouchAverageFromPoints() ; + m_touchRect = ToleranceRect(newtp, m_config->m_touchTolerance) ; + m_holdRect = ToleranceRect(newtp, m_config->m_holdTolerance) ; + } +} +/*! + * Action method + * Add the current point to the set of dragging points. + * The set of dragging points is examined to determine if a enw hold has been started. + */ +void CStateEngine::AddDraggingPos() +{ + iDragPoints.Append(new THwEvent(m_hwe.iType, + m_hwe.iPosition, + m_hwe.iTime, + m_hwe.iTarget, + m_index) + ) ; +} +/*! + * HandleStateEvent processes one event, which can be either pointer event or timer event. + * The event is handled by calling the turnStateMachine method. + */ +bool CStateEngine::handleStateEvent() +{ + // We get an event into m_hwe by this moment, lets kick the state machine + m_wasFiltered = ETrue ; + + CalculateDelta() ; + turnStateMachine() ; + + m_previousPointerEventPosition = m_hwe.iPosition ; + return m_wasFiltered ; +} + +/*! + * Get the current touch rectangle. If touch state not currently on, returns TRect(TPoint(0,0),TPoint(0,0)) + * (touch state meaning that the touch timer is still running and the points have been kept inside the area) + */ +TRect CStateEngine::getTouchArea() +{ + return m_touchRect ; +} +/*! + * get the hold area rectangle + */ +TRect CStateEngine::getHoldArea() +{ + return m_holdRect ; +} +/*! + * MStateMachine method. + */ +bool CStateEngine::wasLastMessageFiltered() +{ + return m_wasFiltered ; +} + +/*! + * Check if the last X points in the stored points look like the movement has stopped + */ +bool CStateEngine::isNewHoldingPoint() +{ + int x = iDragPoints.Count(); + if (x > 2) // are there any points to be checked? + { + THwEvent* phwe = iDragPoints[x-1] ; + THwEvent* phweinsidehold = phwe ; + TRect recth = ToleranceRect(phwe->iPosition, m_config->m_holdTolerance) ; + // Look backwards from the last point to see if there are enought points (enough in time) to look like a hold + x -= 2 ; + while (x > 0 && recth.Contains(iDragPoints[x]->iPosition)) + { + phweinsidehold = iDragPoints[x]; + --x; + } + TTimeIntervalMicroSeconds tival = phwe->iTime.MicroSecondsFrom(phweinsidehold->iTime) ; + + /** + * remove the extra points from the list if they are outside of holding area + */ + while (x > 0) + { + THwEvent* p = iDragPoints[x] ; + delete p ; + iDragPoints.Remove(x) ; + --x ; + } + + // See the time difference of the two points which still are inside the hold area + TTimeIntervalMicroSeconds limit = m_config->m_holdTimerLimit/2 ; + if (tival > limit) + { + if (m_config->m_enableLogging) + { + LOGARG("isNewHoldingPoint: %s, dragpoints count %d", + stateNames[m_currentState], iDragPoints.Count()) ; + } + return true ; + } + } + else + { + // one or 0 points does not look like hold + + } + return false ; +} +/*! + * calculate simple average of the touch points, i.e. calculate the average of the previous and current + * position. Note that the touch point remains the same, this just calculates new value for the UI position + */ +void CStateEngine::CalculateTouchAverage() +{ + m_uiEventXY.iX = (m_uiEventXY.iX+m_hwe.iPosition.iX)/2 ; + m_uiEventXY.iY = (m_uiEventXY.iY+m_hwe.iPosition.iY)/2 ; +} +/*! + * Calculate the movement vector. + */ +void CStateEngine::CalculateDelta() +{ + m_deltaVector.iX = m_hwe.iPosition.iX-m_previousPointerEventPosition.iX ; + m_deltaVector.iY = m_hwe.iPosition.iY-m_previousPointerEventPosition.iY ; +} +/*!internal + * Debug logging method + */ +void CStateEngine::DebugPrintState(TStateMachineState anextstate) +{ + if (m_config->m_enableLogging) + { + LOGARG("%s: cuiev(%d,%d) cTxy ((%d,%d)(%d,%d)) cHxy ((%d,%d)(%d,%d)) gsXY(%d,%d) dV(%d,%d) EVNT(%d,%d (%s)) going to %s", + stateNames[m_currentState], + m_uiEventXY.iX, m_uiEventXY.iY, + m_touchRect.iTl.iX, m_touchRect.iTl.iY,m_touchRect.iBr.iX, m_touchRect.iBr.iY, + m_holdRect.iTl.iX, m_holdRect.iTl.iY,m_holdRect.iBr.iX, m_holdRect.iBr.iY, + m_gestureStartXY.iX, m_gestureStartXY.iY, + m_deltaVector.iX, m_deltaVector.iY, + m_hwe.iPosition.iX, m_hwe.iPosition.iY, hweventNames[m_hwe.iType], + stateNames[anextstate] + ); + } +} + +/*! + * calculate the rectangle for touch or hold + */ +TRect CStateEngine::ToleranceRect(const TPoint& aCenterPoint, const TPoint& tolerance) +{ + // grow by the tolerance length, while keeping the center point + TRect toleranceRect( + aCenterPoint - tolerance, + aCenterPoint + tolerance); + return toleranceRect; +} +/*! + * turnStateMachine. Go trough the state elements found for the current event + * until the event has been consumed. + * + * \pre m_currentState defines the current state and the index to the allStates array. + * \pre m_hwe is the message being handled. The corresponding STATE_ELEMENT array must be found and processed. + * + */ +void CStateEngine::turnStateMachine() +{ + + const STATE_ELEMENT* pelement ; + m_eventConsumed = false ; // run the loop until the event has been consumed + // Now run trough the motions of the state elements, and prepare to change to next state while doing so. + // If the state elements set the m_eventConsumed then all is done + while (!m_eventConsumed) + { + int i = 0 ; + const STATE* const pcurrentstate = allStates[m_currentState] ; + // Since each state definition must contain entries for all possible events the following loop cannot fail ;-) + while (pcurrentstate[i].theEvent != m_hwe.iType ) ++i ; + pelement = pcurrentstate[i].stateElements ; + TStateMachineState nextState = Eignore ; + /* + * Handle the individual state elements. If there is a condition function, + * call the function and if it returns true, handle the action function and possible next state + * if the condition returns false, continue to next element + * if there is no condition, run the action function if it exists. + * if the next state is defined (i.e it is != Eignore), go to that state + */ + while (nextState == Eignore) + { + condition_t cndfunc = pelement->conditionFunction ; + action_t actfunc = pelement->actionFunction ; + if (cndfunc != 0) + { + /* + * There was a condition function, call it to see whether the action needs to performed and/or the next satte defined + */ + if (cndfunc(this)) + { + // Condition was true, handle it + // call the action if it exists + if (actfunc != 0) actfunc(this) ; + // and now get to the next state + nextState = pelement->nextState ; // Note that while this remains Eignore there are elements to be run + } + } + else + { + /** + * No condition function, call the possible action function and get the next state + */ + if (actfunc != 0) actfunc(this) ; + nextState = pelement->nextState ; // Note that while this remains Eignore there are elements to be run + } + ++pelement ; // next entry in the elements + } + if (m_config->m_enableLogging) DebugPrintState(nextState) ; + m_currentState = nextState ; // Change to the next state + } +} +TTimeIntervalMicroSeconds CStateEngine::getInterval() +{ + TTime now ; + now.HomeTime() ; + TTimeIntervalMicroSeconds interval = now.MicroSecondsFrom(m_lastMessageTime) ; + m_lastMessageTime = now ; + return interval ; +} + +TPoint CStateEngine::calculateTouchAverageFromPoints() +{ + TPoint tp ; + int count = iTouchPoints.Count() ; + for (int i = 0; i < count; i++) + { + tp += iTouchPoints[i].iPosition; + } + if(count) + { + tp.iX /= count ; + tp.iY /= count ; + } + return tp ; +} + diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/src/stateengineconfiguration.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/src/stateengineconfiguration.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,212 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +#include "stateengineconfiguration.h" +#include "uieventsender.h" +#include "utils.h" + +using namespace stmUiEventEngine ; + +CStateEngineConfiguration::CStateEngineConfiguration() : + m_touchAreaShape(ERectangle), + m_holdAreaShape(ERectangle) +{ +} + +void CStateEngineConfiguration::ConstructL() +{ + m_uiEventSender = CUiEventSender::NewL() ; +} + +CStateEngineConfiguration::~CStateEngineConfiguration() +{ + delete m_uiEventSender ; +} + +void CStateEngineConfiguration::setTolerance(long fingersize_mm, + TPoint& tolerance, + TAreaShape shape) +{ + long s = Mm2Pixels(fingersize_mm) / 2; + switch(shape) + { + case EEllipse: + tolerance.iX = (s * 2) / 3; + tolerance.iY = s; + break ; + case ERectangle: + case ECircle: + default: + tolerance.iX = s; + tolerance.iY = s; + break ; + } +} + +/*! + * Set the new touch limits for calculating the touch area. + * The size is given in millimetres. The shape of the touch area + * defines how the parameter is used. + * Rectangle: each side of the rectangle has length of fingersize_mm. + * Circle: the parameter defines the diameter of the cicle. + * Ellipse: the parameter defines the vertical diameter of the ellipse, + * horizontal diameter is half of it. + */ +void CStateEngineConfiguration::setTouchTimeArea(long fingersize_mm) +{ + setTolerance(fingersize_mm, m_touchTimeTolerance, m_touchAreaShape); + + // make sure that both touch areas are defined, so if the touch area is not yet set, + // use the same as for touch time area. + if (m_touchTolerance.iX == 0) + { + setTouchArea(fingersize_mm) ; + } +} +/*! + * Set the new touch limits for calculating the touch area. + * The size is given in millimetres. The shape of the touch area + * defines how the parameter is used. + * Rectangle: each side of the rectangle has length of fingersize_mm. + * Circle: the parameter defines the diameter of the cicle. + * Ellipse: the parameter defines the vertical diameter of the ellipse, + * horizontal diameter is half of it. + */ +void CStateEngineConfiguration::setTouchArea(long fingersize_mm) +{ + setTolerance(fingersize_mm, m_touchTolerance, m_touchAreaShape); +} +/*! + * \return the touch are shape + */ +TAreaShape CStateEngineConfiguration::getTouchAreaShape() +{ + return m_touchAreaShape ; +} +/*! + * \parameter the touch are shape + */ +void CStateEngineConfiguration::setTouchAreaShape(TAreaShape aShape) +{ + this->m_touchAreaShape = aShape ; +} +/*! + * \return the touch timeout in microseconds. + */ +unsigned int CStateEngineConfiguration::getTouchTimeout() +{ + return m_touchTimerLimit ; +} +/*! + * set the touch timeout in microseconds. + */ +void CStateEngineConfiguration::setTouchTimeout(unsigned int a) +{ + m_touchTimerLimit = a ; +} +/*! + * Set the hold area. Hold are shape determines how exactly the area is handled. + * \sa setTouchArea + */ +void CStateEngineConfiguration::setHoldArea(long fingersize_mm) +{ + setTolerance(fingersize_mm, m_holdTolerance, m_holdAreaShape); +} +/*! + * Get the shape of the hold area: Rectangle, Circle or Ellipse, + */ +TAreaShape CStateEngineConfiguration::getHoldAreaShape() +{ + return m_holdAreaShape ; +} +/*! + * Set the shape of the hold area: Rectangle, Circle or Ellipse, + */ +void CStateEngineConfiguration::setHoldAreaShape(TAreaShape aShape) +{ + m_holdAreaShape = aShape ; +} +/*! + * \return the hold timeout in microseconds. + */ +unsigned int CStateEngineConfiguration::getHoldTimeout() +{ + return m_holdTimerLimit ; +} +/*! + * set the hold timeout value in microseconds. + */ +void CStateEngineConfiguration::setHoldTimeout(unsigned int a) +{ + m_holdTimerLimit = a ; +} +/*! + * get the touch suppress timeout value in microseconds. + */ +unsigned int CStateEngineConfiguration::getTouchSuppressTimeout() +{ + return m_suppressTimerLimit ; +} +/*! + * set the touch suppress timeout. + * \param the timeout value in microseconds. + */ +void CStateEngineConfiguration::setTouchSuppressTimeout(unsigned int a) +{ + m_suppressTimerLimit = a ; +} +/*! + * MStateMachine method. + */ +unsigned int CStateEngineConfiguration::getMoveSuppressTimeout() +{ + return m_moveSuppressTimerLimit ; +} +/*! + * MStateMachine method. + */ +void CStateEngineConfiguration::setMoveSuppressTimeout(unsigned int a) +{ + m_moveSuppressTimerLimit = a ; +} +/*! + * MStateMachine method. + * Sets logging on or off. + */ +void CStateEngineConfiguration::enableLogging(bool a) +{ + m_enableLogging = a ; + m_uiEventSender->setLogging(a) ; +} + +/*! + * \param a new UI event observer + */ +bool CStateEngineConfiguration::addUiEventObserver(MUiEventObserver* observer) +{ + // The event sender handles the observers + return m_uiEventSender->addObserver(observer) ; +} +/*! + * MStateMachine method. + */ +bool CStateEngineConfiguration::removeUiEventObserver(MUiEventObserver* observer) +{ + // The event sender handles the observers + return m_uiEventSender->removeObserver(observer) ; +} + diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/src/statemachine.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/src/statemachine.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,789 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +#include +#include +#include + +#include "statemachine.h" +#include "stateengine.h" +#include "rt_uievent.h" +#include "callbacktimer.h" +#include "stateengineconfiguration.h" + +#include "filelogger.h" +#include "utils.h" + +using namespace stmUiEventEngine ; + +GLREF_D const char* stateNames[8] ; + +const char* const ttypeNames[] = { // for debugging purposes define the names of the pointer events + "EButton1Down ", + "EButton1Up ", + "EButton2Down ", + "EButton2Up ", + "EButton3Down ", + "EButton3Up ", + "EDrag ", + "EMove ", + "EButtonRepeat ", + "ESwitchOn ", + "EOutOfRange ", + "EEnterCloseProximity ", + "EExitCloseProximity ", + "EEnterHighPressure ", + "EExitHighPressure " + }; + +/// Fast integer distance +int stmUiEventEngine::Distance(int x, int y) +{ +/* + double d = dx * dx + dy * dy; + double dist ; + Math::Sqrt(dist, d) ; + return dist; +*/ + if(x<0) x=-x; + if(y<0) y=-y; + if(x < y) + { + int t = x; + x = y; + y = t; // ensures that x >= y + } + int dist = (y < ((13107 * x)>>15)) ? // * (.4) + (x + ((y * 6310)>>15)) : // * (.192582403) + (((x * 27926)>>15) // * (.852245894) + + ((y * 18414)>>15)); // * (.561967668) + return dist; +} + + +/*! + CStateMachine implements the state machine and the integration fo the + state machine to the OS. The CStateEngine handles the actual processing of the + finite state machine but CStateMachine provides the OS specific things like timers + and message conversion. + + The CStateMachine implements the MAknWsEventObserver interface so it adds + itself to be the observer to the event monitor of the application UI. + + It handles the pointer events either by using the monitoring interface or + lets the application call the HandlePointerEventL method. + + If MAknWsEventObserver interface is used then all the events passed to the + application are seen. The target of the gesture starting event is stored + so that the generated UI event contains the target as a void pointer. (should it just be CoeControl*?) + + There is possibility to adjust the Y coordinate of the touch point. + In capacitive touch (Alvin) it seems that the perceived touch point is + below the middle part of the fingertip. The user however tries to use the + finger to point so that the touch point should correspond to the tip of the finger. + It seems that this illusion can be achieved by adjusting the Y position about 3 mm up. + However, this adjustment can properly be done only when the touch point is far enough + from the window borders up or down. When close to top or bottom of window, the adjustment + makes it impossible touch points near the edge, unless adjustment depends on the distance from + window border. + So in practice it should be the window server doing the adjustment, and after adjustment + deciding the target window. At application level the adjustment can only be done properly + if window borders do not need to be crossed. + + */ +CStateMachine::CStateMachine() +{ + m_WasMessageFiltered = false ; + m_wseventmonitoringenabled = false ; // NB: enabled only if really used by application + m_loggingenabled = false ; + m_capacitiveup = false ; + m_adjustYposition = false ; +} +/*!Destructor + */ +CStateMachine::~CStateMachine() +{ + for (int i = 0; i < KMaxNumberOfPointers; i++) + { + delete m_holdTimer[i] ; + delete m_touchTimer[i] ; + delete m_suppressTimer[i] ; + delete m_impl[i] ; + } + delete m_config ; +} + +CStateMachine* CStateMachine::NewLC() +{ + CStateMachine* self = new (ELeave) CStateMachine(); + CleanupStack::PushL(self); + self->ConstructL(); + return self; +} + +CStateMachine* CStateMachine::NewL() +{ + CStateMachine* self = CStateMachine::NewLC(); + CleanupStack::Pop(self); + return self; +} +/*! + Construct the actual state machine implemented in CStateEngine and + creates the timers. It also adds itself to the observer list of + CAknWsEventMonitor of the application. + + */ +void CStateMachine::ConstructL() +{ + m_config = new(ELeave)CStateEngineConfiguration() ; + m_config->ConstructL(); + + for (int i = 0; i < KMaxNumberOfPointers; i++) + { + m_impl[i] = new(ELeave) CStateEngine(m_config, this, i) ; + m_holdTimer[i] = CCallbackTimer::NewL(*this, &CStateMachine::handleholdTimer, 0, i, ETrue); + m_touchTimer[i] = CCallbackTimer::NewL(*this, &CStateMachine::handletouchTimer, 0, i, ETrue); + m_suppressTimer[i] = CCallbackTimer::NewL(*this, &CStateMachine::handlesuppressTimer, 0, i, ETrue); + } + + m_coeEnv = CCoeEnv::Static(); + + /* IMEX: monitor added only if enabled + add us to see the WsEvents so that we are able to interpret them; + + CAknAppUi* pui = (CAknAppUi*)m_coeEnv->AppUi() ; + pui->EventMonitor()->AddObserverL(this) ; + pui->EventMonitor()->Enable(ETrue) ; + */ + + m_3mminpixels = Mm2Pixels(1.5) ; +} +/*! + * Process one pointer event in the state machine. + * \return true, if the event did not generate a UI event immediately. + */ +bool CStateMachine::HandleStateEvent(const TPointerEvent& aPointerEvent, + void* aTarget, + const TTime& aTime) +{ + TInt index = PointerIndex(aPointerEvent); + CStateEngine* engine = m_impl[index]; + CreateHwEvent(engine->initEvent(), aPointerEvent, aTarget, aTime) ; + if (m_loggingenabled) + { + LOGARG("HandleStateEvent: ptr %d", index) ; + } + m_WasMessageFiltered = engine->handleStateEvent() ; + return m_WasMessageFiltered ; +} +/*! + * wrapper method for the actual implementation in the CStateEngine. + */ +bool CStateMachine::wasLastMessageFiltered(TInt aPointerNumber) +{ + return m_impl[aPointerNumber]->wasLastMessageFiltered() ; +} +/*! + * wrapper method for the actual implementation in the CStateEngine. + */ +TRect CStateMachine::getTouchArea(TInt aPointerNumber) +{ + return m_impl[aPointerNumber]->getTouchArea() ; +} +/*! + * wrapper method for the actual implementation in the CStateEngine. + */ +void CStateMachine::setTouchTimeArea(long fingersize_mm) +{ + m_config->setTouchTimeArea(fingersize_mm) ; +} +/*! + * wrapper method for the actual implementation in the CStateEngine. + */ +void CStateMachine::setTouchArea(long fingersize_mm) +{ + m_config->setTouchArea(fingersize_mm) ; +} +/*! + * wrapper method for the actual implementation in the CStateEngine. + */ +TAreaShape CStateMachine::getTouchAreaShape() +{ + return m_config->getTouchAreaShape() ; +} +/*! + * wrapper method for the actual implementation in the CStateEngine. + */ +void CStateMachine::setTouchAreaShape(const TAreaShape aShape) +{ + m_config->setTouchAreaShape(aShape) ; +} +/*! + * wrapper method for the actual implementation in the CStateEngine. + */ +unsigned int CStateMachine::getTouchTimeout() +{ + return m_config->getTouchTimeout() ; +} +/*! + * wrapper method for the actual implementation in the CStateEngine. + */ +void CStateMachine::setTouchTimeout(unsigned int aDelay) +{ + m_config->setTouchTimeout(aDelay) ; +} +/*! + * wrapper method for the actual implementation in the CStateEngine. + */ +TRect CStateMachine::getHoldArea(TInt aPointerNumber) +{ + return m_impl[aPointerNumber]->getHoldArea() ; +} +/*! + * wrapper method for the actual implementation in the CStateEngine. + */ +void CStateMachine::setHoldArea(long fingersize_mm) +{ + m_config->setHoldArea(fingersize_mm) ; +} +/*! + * wrapper method for the actual implementation in the CStateEngine. + */ +TAreaShape CStateMachine::getHoldAreaShape() +{ + return m_config->getHoldAreaShape() ; +} +/*! + * wrapper method for the actual implementation in the CStateEngine. + */ +void CStateMachine::setHoldAreaShape(const TAreaShape aShape) +{ + m_config->setHoldAreaShape(aShape) ; +} +/*! + * wrapper method for the actual implementation in the CStateEngine. + */ +unsigned int CStateMachine::getHoldTimeout() +{ + return m_config->getHoldTimeout() ; +} +/*! + * wrapper method for the actual implementation in the CStateEngine. + */ +void CStateMachine::setHoldTimeout(unsigned int a) +{ + m_config->setHoldTimeout(a) ; +} +/*! + * wrapper method for the actual implementation in the CStateEngine. + */ +unsigned int CStateMachine::getTouchSuppressTimeout() +{ + return m_config->getTouchSuppressTimeout() ; +} +/*! + * wrapper method for the actual implementation in the CStateEngine. + */ +void CStateMachine::setTouchSuppressTimeout(unsigned int a) +{ + m_config->setTouchSuppressTimeout(a) ; +} +/*! + * wrapper method for the actual implementation in the CStateEngine. + */ +unsigned int CStateMachine::getMoveSuppressTimeout() +{ + return m_config->getMoveSuppressTimeout() ; +} +/*! + * wrapper method for the actual implementation in the CStateEngine. + */ +void CStateMachine::setMoveSuppressTimeout(unsigned int a) +{ + m_config->setMoveSuppressTimeout(a) ; +} +/*! + * wrapper method for the actual implementation in the CStateEngine. + */ +bool CStateMachine::addUiEventObserver(MUiEventObserver* observer) +{ + return m_config->addUiEventObserver(observer) ; +} +/*! + * wrapper method for the actual implementation in the CStateEngine. + */ +bool CStateMachine::removeUiEventObserver(MUiEventObserver* observer) +{ + return m_config->removeUiEventObserver(observer) ; +} +/*! + * wrapper method for the actual implementation in the CStateEngine. + */ +void CStateMachine::enableLogging(bool aEnable) +{ + m_loggingenabled = aEnable ; + m_config->enableLogging(aEnable) ; +} + +TInt CStateMachine::PointerIndex(const TPointerEvent& aPointerEvent) +{ + TInt index = 0; +#if defined(ADVANCED_POINTER_EVENTS) + if (aPointerEvent.IsAdvancedPointerEvent()) + { + const TAdvancedPointerEvent* tadvp = aPointerEvent.AdvancedPointerEvent() ; + index = tadvp->PointerNumber() ; + } +#endif + return index; +} + +/*! + * Convert pointer event (TPointerEvent) into THwEvent into the variable m_hwe. + * THwEvent contains the position and simplified event type + * but also has the target window and timestamp included. + */ +void CStateMachine::CreateHwEvent(THwEvent& aEvent, + const TPointerEvent& aPointerEvent, + void* aTarget, + const TTime& aTime) +{ +/* should be set by this moment by CStateEngine with that index in CStateEngine::initEvent() + aEvent.iPointerNumber = PointerIndex(aPointerEvent); +*/ + aEvent.iTarget = aTarget ; + aEvent.iTime = aTime; + // Change to screen coordinates here while the window is still existing.... + aEvent.iPosition = screenCoordinates(aPointerEvent.iPosition, aTarget) ; + switch (aPointerEvent.iType) + { + case TPointerEvent::EButton1Down: + case TPointerEvent::EButton2Down: + case TPointerEvent::EButton3Down: + { + aEvent.iType = stmUiEventEngine::EDown ; + break ; + } + case TPointerEvent::EButton1Up: + case TPointerEvent::EButton2Up: + case TPointerEvent::EButton3Up: + { + if (m_capacitiveup) + { + aEvent.iType = stmUiEventEngine::ECapacitiveUP ; // How could this be checked automagically? + } + else + { + aEvent.iType = stmUiEventEngine::EResistiveUP ; // How could this be checked automagically? + } + + break ; + } + case TPointerEvent::EDrag: + { + aEvent.iType = stmUiEventEngine::EDrag ; + break ; + } + } +} +//////////////////////////////////////////////////////////////////////////////////////////// +/*! + * Start the hold timer if it is not already active. + */ +void CStateMachine::startholdTimer(TInt aPointerNumber) +{ + if (!m_holdTimer[aPointerNumber]->IsActive()) + { + m_holdTimer[aPointerNumber]->Start(); + } +} + +/*! + * The hold timer expiration: create a timer event and call the state machine + */ +void CStateMachine::handleholdTimer(TInt aPointerNumber) +{ + // We get an event, lets kick the state machine + CStateEngine* engine = m_impl[aPointerNumber]; + CreateTimerEvent(engine->initEvent(), stmUiEventEngine::EHoldTimer) ; + engine->handleStateEvent() ; +} +/*! + * Stop the hold timer + */ +void CStateMachine::cancelholdTimer(TInt aPointerNumber) +{ + m_holdTimer[aPointerNumber]->Cancel(); +} +/*! + * Start suppress timer. The timeout has been set beforehand. + */ +void CStateMachine::startsuppressTimer(TInt aPointerNumber) +{ + m_suppressTimer[aPointerNumber]->Start(); +} +/*! + * The suppress timer expiration, create a timer event and call the state machine. + */ +void CStateMachine::handlesuppressTimer(TInt aPointerNumber) +{ + // We get an event, lets kick the state machine + CStateEngine* engine = m_impl[aPointerNumber]; + CreateTimerEvent(engine->initEvent(), stmUiEventEngine::ESuppressTimer) ; + engine->handleStateEvent() ; +} +/*! + * stop the suppress timer + */ +void CStateMachine::cancelsuppressTimer(TInt aPointerNumber) +{ + m_suppressTimer[aPointerNumber]->Cancel(); +} +/*! + * start the touch timer if it is not already active. + */ +void CStateMachine::starttouchTimer(TInt aPointerNumber) +{ + if (!m_touchTimer[aPointerNumber]->IsActive()) + { + m_touchTimer[aPointerNumber]->Start(); + } +} + +/*! + * The touch timer expiration, create timer event and call the state machine. + */ +void CStateMachine::handletouchTimer(TInt aPointerNumber) +{ + // We get an event, lets kick the state machine + CStateEngine* engine = m_impl[aPointerNumber]; + CreateTimerEvent(engine->initEvent(), stmUiEventEngine::ETouchTimer) ; + engine->handleStateEvent() ; +} +/*! + * stop the touch timer + */ +void CStateMachine::canceltouchTimer(TInt aPointerNumber) +{ + if (m_touchTimer[aPointerNumber]->IsActive()) // we were waiting for additional events + { + m_touchTimer[aPointerNumber]->Cancel(); + } +} +/*! + * CreateTimerEvent creates a timer event to the m_hwe variable. + */ +void CStateMachine::CreateTimerEvent(THwEvent& aEvent, TStateMachineEvent aEventCode) +{ + aEvent.iType = aEventCode ; + // m_hwe.iPosition = TPos(0, 0) ; should we just leave the previous pos + TTime now ; + now.HomeTime() ; + aEvent.iTime = now ; +} +/*! + * Events are processed either using the MAknWsEventObserver interface + * or letting the view/container pass the pointer events to the state machine. + * The member variable m_wseventmonitoringenabled defines which method is used. + * If handlePoingterEventL is called, the calling CCoeCOntrol must provide itself + * as the target. + */ +void CStateMachine::HandlePointerEventL(const TPointerEvent& aPointerEvent, void *target) +{ + if (m_wseventmonitoringenabled) return ; // events are handled in the event monitor + if (m_loggingenabled) + { +#if defined(ADVANCED_POINTER_EVENTS) + TInt pointerNumber = PointerIndex(aPointerEvent) ; + LOGARG("Pointer %d event %s at (%d %d)", pointerNumber, + ttypeNames[aPointerEvent.iType], aPointerEvent.iPosition.iX, aPointerEvent.iPosition.iY) ; +#else + LOGARG("Pointer event %s at (%d %d)", + ttypeNames[aPointerEvent.iType], aPointerEvent.iPosition.iX, aPointerEvent.iPosition.iY) ; +#endif + } + TTime time = m_coeEnv->LastEvent().Time(); + HandleStateEvent(aPointerEvent, target, time) ; // target needs to be there to convert from window to screen coordinates +} +/** + * One possibility to implement gesture recognition is to intercept the events + * using the event monitoring interface. The HandleWsEventL method will get all events + * passed to the application. The aDestination parameter defines the window where the event + * was targeted to. The gesture recognition should use the target information + * to determine how the gesture should be interpreted. + * In the current implementation the aDestination needs to be one of the UI event observers + * in order to process the message, but later when gesture recognition is added, this check + * needs to be removed and the gesture recognition should handle the target of the gesture. + */ +void CStateMachine::HandleWsEventL(const TWsEvent& aEvent, CCoeControl* aDestination) +{ + // Check which processing type we have for events. + // If WsEvent monitoring, then process the message, otherwise return + if (!m_wseventmonitoringenabled) return ; + + // Log the events passing trough to see what kind of stuff there goes... + // and could the gesture recogniser grab them from here? + TInt type=aEvent.Type(); + switch (type) + { + case EEventKey: + case EEventKeyUp: + case EEventKeyDown: + { + if (m_loggingenabled) + { + TKeyEvent* tke = aEvent.Key() ; + LOGARG("Key event %d %d to %u", tke->iCode, tke->iScanCode, aDestination) ; + } + break; + } + case EEventPointer: + { + TPointerEvent* tpe = aEvent.Pointer() ; + if (m_loggingenabled) + { + TRect rcd = aDestination->Rect() ; + TPoint org = aDestination->PositionRelativeToScreen() ; + TRect rcd2 = rcd ; + rcd2.Move(org) ; + TPoint screenpos = tpe->iPosition ; + screenpos += org ; + +#if defined(ADVANCED_POINTER_EVENTS) + TInt pointerNumber = PointerIndex(*tpe) ; + LOGARG("Pointer %d event %s at (%d %d)[%d,%d] to 0x%x ((%d,%d)(%d,%d)): screen: ((%d,%d)(%d,%d))", + pointerNumber, + ttypeNames[tpe->iType], + tpe->iPosition.iX, tpe->iPosition.iY, + screenpos.iX, screenpos.iY, + aDestination, + rcd.iTl.iX, rcd.iTl.iY, rcd.iBr.iX, rcd.iBr.iY, + rcd2.iTl.iX, rcd2.iTl.iY, rcd2.iBr.iX, rcd2.iBr.iY) ; +#else + LOGARG("Pointer event %s at (%d %d)[%d,%d] to 0x%x ((%d,%d)(%d,%d)): screen: ((%d,%d)(%d,%d))", + ttypeNames[tpe->iType], tpe->iPosition.iX, tpe->iPosition.iY, + screenpos.iX, screenpos.iY, + aDestination, + rcd.iTl.iX, rcd.iTl.iY, rcd.iBr.iX, rcd.iBr.iY, + rcd2.iTl.iX, rcd2.iTl.iY, rcd2.iBr.iX, rcd2.iBr.iY) ; +#endif + } + HandleStateEvent(*tpe, aDestination, aEvent.Time()) ; + break; + } + case EEventPointerBufferReady: + if (m_loggingenabled) + { + LOGARG("Pointer buffer ready event to %u", aDestination) ; + } + break; + case EEventFocusLost: + case EEventFocusGained: + if (m_loggingenabled) + { + LOGARG("Focus message event to %u", aDestination) ; + } + break; + case EEventSwitchOn: + if (m_loggingenabled) + { + LOGARG("Switch On event to %u", aDestination) ; + } + break; + case EEventUser: + if (m_loggingenabled) + { + LOGARG("User event to %u", aDestination) ; + } + break; + case EEventPowerMgmt: + if (m_loggingenabled) + { + LOGARG("Power Mgmnt event to %u", aDestination) ; + } + break; + case EEventMessageReady: + if (m_loggingenabled) + { + LOGARG("Message Ready event to %u", aDestination) ; + } + break; + case EEventScreenDeviceChanged: + if (m_loggingenabled) + { + LOGARG("Screen device changed event to %u", aDestination) ; + } + break; + + default: + if (m_loggingenabled) + { + LOGARG("default changed event %d to %u", type, aDestination) ; + } + break; + } +} +/*! + * Start the touch timer using a specified delay + */ +void CStateMachine::startTouchTimer(TInt aDelay, TInt aPointerNumber) +{ + m_touchTimer[aPointerNumber]->SetDelay(aDelay) ; + starttouchTimer(aPointerNumber) ; +} +/*! + * Stop the touch timer. + */ +void CStateMachine::cancelTouchTimer(TInt aPointerNumber) +{ + canceltouchTimer(aPointerNumber) ; +} +/*! + * Start hold timer using specified delay + */ +void CStateMachine::startHoldTimer(TInt aDelay, TInt aPointerNumber) +{ + m_holdTimer[aPointerNumber]->SetDelay(aDelay) ; + startholdTimer(aPointerNumber) ; +} +/*! + * Stop the hold timer + */ +void CStateMachine::cancelHoldTimer(TInt aPointerNumber) +{ + cancelholdTimer(aPointerNumber) ; +} +/*! + * Start suppress timer using specified delay. + */ +void CStateMachine::startSuppressTimer(TInt aDelay, TInt aPointerNumber) +{ + m_suppressTimer[aPointerNumber]->SetDelay(aDelay) ; + startsuppressTimer(aPointerNumber) ; +} +/*! + * Stop the suppress timer. + */ +void CStateMachine::cancelSuppressTimer(TInt aPointerNumber) +{ + cancelsuppressTimer(aPointerNumber) ; +} + +/*! + * Method sets the m_wseventmonitoringenabled. If it is true, + * then the state machine will be called from the HandleWsEventL method which + * sees all the events passed to the application. + * + * Otherwise the HandlePointerEventL method call will cause the call to + * state machine so the view/container needs to pass the pointer events to the state machine + * in its own HandlePointerEventL -method. + * + */ +void CStateMachine::EnableWsEventMonitoring(bool aEnable) +{ + if( !m_wseventmonitoringenabled && aEnable ) + { + CAknAppUi* pui = (CAknAppUi*)m_coeEnv->AppUi() ; + TRAPD(err, pui->EventMonitor()->AddObserverL(this)) ; + if(!err) + pui->EventMonitor()->Enable(ETrue) ; + } + else if( m_wseventmonitoringenabled && !aEnable ) + { + CAknAppUi* pui = (CAknAppUi*)m_coeEnv->AppUi() ; + pui->EventMonitor()->RemoveObserver(this) ; + // Should not disable since it may be not the only user + //pui->EventMonitor()->Enable(EFalse) ; + } + + m_wseventmonitoringenabled = aEnable ; +} +TPoint CStateMachine::screenCoordinates(const TPoint& aPos, void* aGestureTarget) +{ + TPoint newPos = aPos ; + if (aGestureTarget) + { + CCoeControl* pcc = (CCoeControl*) aGestureTarget ; + TPoint tp(TPoint(0,0)); + if (m_adjustYposition) + { + TSize sz = pcc->Size() ; + + // If we are running in capacitive touch device, + // adjust the point up about 3 mm unless we are + // near top or bottom of the window + + // Y position in the window + int wY = newPos.iY - tp.iY; + int edge = 2*m_3mminpixels; + + if (Rng(0, wY, edge - 1)) + { + // close to the top we adjust suitably so that immediately at the top adjust is 0 + int adjust = wY / 2 ; + newPos.iY -= adjust ; + if (m_loggingenabled) + { + LOGARG("adjustment: nY %d tY %d [3mm: %d adj: %d]", + newPos.iY, tp.iY, m_3mminpixels, adjust) ; + } + + } + else if (Rng(edge, wY, sz.iHeight - edge)) + { + int from = newPos.iY ; + newPos.iY -= m_3mminpixels ; + if (m_loggingenabled) + { + LOGARG("adjustment: %d to %d [3mm: %d middle]", + from, newPos.iY, m_3mminpixels) ; + } + + } + else + { + // similarly at the bottom we adjust less the closer we get to the edge + int adjust = (sz.iHeight - wY) / 2 ; + newPos.iY -= adjust ; + if (m_loggingenabled) + { + LOGARG("adjustment: nY %d tY %d sH %d [3mm: %d adj: %d]", + newPos.iY, tp.iY, sz.iHeight, m_3mminpixels, adjust) ; + } + + } + } + else + { + // if the target does not own a window how can we adjust to the screen? + } + } + return newPos ; +} +void CStateMachine::enableCapacitiveUp(bool aEnable) +{ + m_capacitiveup = aEnable ; +} +void CStateMachine::enableYadjustment(bool aEnable) +{ + m_adjustYposition = aEnable ; +} +int CStateMachine::getNumberOfPointers() +{ + return KMaxNumberOfPointers ; +} + diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/src/stmgestureinterface.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/src/stmgestureinterface.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,618 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Gesture helper implementation +* +*/ + + +// Gesture UI Engine +#include "statemachine.h" + +// Gesture Library: Framework +#include "gestureframework.h" +#include "rt_gestureengineif.h" + +// Gesture Library: Recognizers +#include "tapgesturerecogniser.h" +#include "pangesturerecogniser.h" +#include "edgescrollgesturerecogniser.h" +#include "longpressgesturerecogniser.h" +#include "pinchgesturerecogniser.h" +#include "touchgesturerecogniser.h" +#include "releasegesturerecogniser.h" +#include "flickgesturerecogniser.h" +#include "zoomgesturerecogniser.h" + +#include "stmgestureinterface.h" +#include "gesturehelpereventsender.h" + +#ifndef ICS_DCHECK +#define ICS_DCHECK(test) +#endif + +#define LOG(args...) + + +EXPORT_C CStmGestureParameters::CStmGestureParameters() + { + + } + +EXPORT_C CStmGestureParameters::CStmGestureParameters( + const CStmGestureParameters& aParams ) + { + Mem::Copy(&iParam[0], &aParams.iParam[0], sizeof(iParam)); + Mem::Copy(&iAreaSettings[0], &aParams.iAreaSettings[0], sizeof(iAreaSettings)); + Mem::Copy(&iEnabled[0], &aParams.iEnabled[0], sizeof(iEnabled)); + } + +EXPORT_C CStmGestureEngine* CStmGestureEngine::NewL() + { + CStmGestureEngine* eng = new(ELeave) CStmGestureEngine(); + CleanupStack::PushL(eng); + eng->ConstructL(); + CleanupStack::Pop(eng); + return eng; + } + +CStmGestureEngine::CStmGestureEngine() + { + + } + +void CStmGestureEngine::ConstructL() + { + iGf = stmGesture::CGestureFramework::NewL(); + } + +CStmGestureEngine::~CStmGestureEngine() + { + // Prevent reactivation of contexts as they remove themselves + iDtorPhase = ETrue; + + iContexts.ResetAndDestroy(); + iCtxtStack.Reset(); + delete iGf; + } + +EXPORT_C CStmGestureContext* CStmGestureEngine::CreateContextL( + TInt /*aId*/ ) + { + CStmGestureContext* ctxt = new(ELeave) CStmGestureContext(*this); + CleanupStack::PushL(ctxt); + ctxt->ConstructL(); + CleanupStack::Pop(ctxt); + return ctxt; + } + +EXPORT_C CStmGestureContext* CStmGestureEngine::Context( + TInt /*aId*/ ) + { + return NULL; + } + +void CStmGestureEngine::EnableContextL( + CStmGestureContext& aContext ) + { + // NB: enabling context puts it on top of the Context Stack + TInt idx = iCtxtStack.Find(&aContext); + if(idx >= 0) + { + iCtxtStack.Remove(idx); + } + + SetupRecognizersL(aContext, ETrue); + + iCtxtStack.AppendL(&aContext); + } + +void CStmGestureEngine::DisableContextL( + CStmGestureContext& aContext ) + { + TInt idx = iCtxtStack.Find(&aContext); + ICS_DCHECK(idx >= 0); + if(idx == KErrNotFound) + { + return; + } + + iCtxtStack.Remove(idx); + + stmGesture::MGestureEngineIf* ge = iGf->getGestureEngine(); + + for(TInt i = 0; i < stmGesture::EStmGestureUid_Count; ++i) + { + MStmGestureRecogniser* rec = aContext.iRecognizers[i]; + if(rec) + { + ge->removeGesture(rec); + } + } + + // re-activate previous (new top-most) context + // NB: if deleted context is not top-most (active) one, no updates done + TInt count = iCtxtStack.Count(); + if(idx == count && count > 0 && !iDtorPhase) + { + CStmGestureContext* previous = iCtxtStack[count - 1]; + SetupRecognizersL(*previous, EFalse); + } + } + +template +void CStmGestureEngine::InitRecognizerL( + T*& aGesture, + CStmGestureContext& aContext, + TBool aNewContext ) + { + stmGesture::MGestureRecogniserIf*& recognizer = aContext.iRecognizers[T::KUid]; + aGesture = static_cast(recognizer); + if(!aGesture && aNewContext) + { + recognizer = aGesture = T::NewL(&aContext); + recognizer->enableLogging((aContext.iLogging & (1<getGestureEngine()->addGesture(aGesture); + if(!added) + { + User::Leave(KErrNoMemory); + } + } + +void CStmGestureEngine::SetupRecognizersL( + CStmGestureContext& aContext, + TBool aNewContext ) + { + LOG("Setup recognizers"); + // Order of recognizers in the Gesture Engine (upper ones receive input before lower ones) + // + // PINCH + // CORNER_ZOOM + // EDGE_SCROLL + // LONGPRESS + // TOUCH + // UP_DOWN + // LEFT_RIGHT + // HOVER + // PAN + // TAP / DOUBLE_TAP + // FLICK + // RELEASE + // UNKNOWN + + stmUiEventEngine::CStateMachine* stateMachine = iGf->getUiStateMachine(); + stmGesture::MGestureEngineIf* gestureEngine = iGf->getGestureEngine(); + + MStmGestureParameters& conf = aContext.Config(); + + TBool filter = conf.Param(stmGesture::EEnableFiltering) != 0; + + // TOUCH AREA + TStmGestureArea& touchArea = *conf.Area(stmGesture::ETouchArea); + TInt touchAreaSizeInMm = touchArea.iSize.iWidth; + stateMachine->setTouchAreaShape ( stmUiEventEngine::TAreaShape(touchArea.iShape) ); + stateMachine->setTouchArea ( !filter ? 0 : touchAreaSizeInMm ); + stateMachine->setTouchTimeout ( !filter ? 0 : touchArea.iTimeout * 1000); + CCoeControl* gestureContext = aContext.getOwner(); + TRect ctxtRect = gestureContext->Rect(); + + // ===================================================== PINCH + using stmGesture::CPinchGestureRecogniser; + + if (conf.Enabled(CPinchGestureRecogniser::KUid)) + { + CPinchGestureRecogniser* gesture = NULL; + InitRecognizerL(gesture, aContext, aNewContext); + + if(gesture) + { + TReal32 pspeed = conf.Param(stmGesture::EPinchSpeed) / 1000.f; + gesture->setPinchingSpeed(pspeed); + } + } + + // ===================================================== LONG PRESS + using stmGesture::CLongPressGestureRecogniser; + + if (conf.Enabled(CLongPressGestureRecogniser::KUid)) + { + CLongPressGestureRecogniser* gesture = NULL; + InitRecognizerL(gesture, aContext, aNewContext); + + if(gesture) + { + gesture->setArea(ctxtRect); + } + } + + // ===================================================== TOUCH + using stmGesture::CTouchGestureRecogniser; + + if (conf.Enabled(CTouchGestureRecogniser::KUid)) + { + CTouchGestureRecogniser* gesture = NULL; + InitRecognizerL(gesture, aContext, aNewContext); + + if(gesture) + { + // define empty area so that touch is reported only inside + // our window (touch recogniser handles either an area or the target window) + gesture->setArea(TRect()); + } + } + + + // ===================================================== PAN + using stmGesture::CPanGestureRecogniser; + + if (conf.Enabled(CPanGestureRecogniser::KUid)) + { + CPanGestureRecogniser* gesture = NULL; + InitRecognizerL(gesture, aContext, aNewContext); + + if(gesture) + { + gesture->setPanningSpeedLow ( conf.Param(stmGesture::EPanSpeedLow) / 1000.f ); + gesture->setPanningSpeedHigh( conf.Param(stmGesture::EPanSpeedHigh) / 1000.f ); + } + } + + // ===================================================== TAP / DOUBLE TAP + /// Add recognizer before any existing Flick, Release, Unknown + // Add the gesture to the gesture engine + // TODO: Tap recognizer is special - it can combine multiple listeners, + // so no need to create new one if it already exists, just add new listeners to it + + using stmGesture::CTapGestureRecogniser; + + if (conf.Enabled(CTapGestureRecogniser::KUid)) + { + CTapGestureRecogniser* gesture = NULL; + InitRecognizerL(gesture, aContext, aNewContext); + + if(gesture) + { + gesture->setDoubleTapTimeout(conf.Param(stmGesture::EDoubleTapTimeout) * 1000); + gesture->setDoubleTapRange( touchAreaSizeInMm ); + gesture->ignoreFirstTap(EFalse); + + aContext.iLogging |= 1<setFlickingSpeed(flickSpeed); + } + } + + // ===================================================== RELEASE + using stmGesture::CReleaseGestureRecogniser; + + if (conf.Enabled(CReleaseGestureRecogniser::KUid)) + { + CReleaseGestureRecogniser* gesture = NULL; + InitRecognizerL(gesture, aContext, aNewContext); + + if(gesture) + { + gesture->setArea(TRect()); + } + } + +#if 0 // use in future depending upon browser requirement + // ===================================================== CORNER ZOOM + using stmGesture::CZoomGestureRecogniser; + + if (conf.Enabled(CZoomGestureRecogniser::KUid)) + { + CZoomGestureRecogniser* gesture = NULL; + InitRecognizerL(gesture, aContext, aNewContext); + + if(gesture) + { + gesture->setArea(ctxtRect); + gesture->setRange(conf.Param(stmGesture::EZoomCornerSize)); + } + } + + // ===================================================== EDGE SCROLL + using stmGesture::CEdgeScrollGestureRecogniser; + + if (conf.Enabled(CEdgeScrollGestureRecogniser::KUid)) + { + CEdgeScrollGestureRecogniser* gesture = NULL; + InitRecognizerL(gesture, aContext, aNewContext); + + if(gesture) + { + gesture->setArea(ctxtRect); + gesture->setScrollRange(conf.Param(stmGesture::EEdgeScrollRange)); // range is 20 pixels from the edge TODO: add this to settings... + } + } + + // ===================================================== LEFT-RIGHT + using stmGesture::CLeftrightGestureRecogniser; + + if (conf.Enabled(CLeftrightGestureRecogniser::KUid)) + { + CLeftrightGestureRecogniser* gesture = NULL; + InitRecognizerL(gesture, aContext, aNewContext); + } + + // ===================================================== UP-DOWN + using stmGesture::CUpdownGestureRecogniser; + + if (conf.Enabled(CUpdownGestureRecogniser::KUid)) + { + CUpdownGestureRecogniser* gesture = NULL; + InitRecognizerL(gesture, aContext, aNewContext); + } + + // ===================================================== HOVER + using stmGesture::CHoveringGestureRecogniser; + + if (conf.Enabled(CHoveringGestureRecogniser::KUid)) + { + CHoveringGestureRecogniser* gesture = NULL; + InitRecognizerL(gesture, aContext, aNewContext); + if(gesture) + { + gesture->setHoveringSpeed(conf.Param(stmGesture::EHoverSpeed) / 1000.f); + } + } + + // ===================================================== UNKNOWN + using stmGesture::CUnknownGestureRecogniser; + + if (conf.Enabled(CUnknownGestureRecogniser::KUid)) + { + CUnknownGestureRecogniser* gesture = NULL; + InitRecognizerL(gesture, aContext, aNewContext); + } +#endif + + // =========================================================== + if(aNewContext) + { + for(TInt i = 0; i < stmGesture::EStmGestureUid_Count; ++i) + { + MStmGestureRecogniser* rec = aContext.iRecognizers[i]; + if(rec) + { + rec->enableLogging(aContext.iLogging & (1<setHoldAreaShape ( stmUiEventEngine::TAreaShape(holdArea.iShape) ); + stateMachine->setHoldArea ( !filter ? 0 : holdAreaSizeInMm ); + stateMachine->setHoldTimeout ( !filter ? 0 : holdArea.iTimeout * 1000); + + // TOUCH-TIME AREA + TStmGestureArea& tTimeArea = *conf.Area(stmGesture::ETouchTimeArea); + TInt tTimeAreaSizeInMm = tTimeArea.iSize.iWidth; + // NB: shape <-- TouchAreaShape + stateMachine->setTouchTimeArea ( !filter ? 0 : tTimeAreaSizeInMm ); + + // Timeouts, Adjustments, etc. + stateMachine->setTouchSuppressTimeout(!filter ? 0 : + conf.Param(stmGesture::ESuppressTimeout)*1000) ; + stateMachine->setMoveSuppressTimeout(!filter ? 0 : + conf.Param(stmGesture::EMoveSuppressTimeout)*1000) ; + stateMachine->enableCapacitiveUp (!filter ? 0 : + conf.Param(stmGesture::ECapacitiveUpUsed)); + stateMachine->enableYadjustment (!filter ? 0 : conf.Param(stmGesture::EAdjustYPos)); + stateMachine->enableLogging(false); + + stateMachine->EnableWsEventMonitoring(false); + LOG("Setup recognizers -- DONE"); + } + +EXPORT_C void CStmGestureEngine::HandlePointerEventL( + const TPointerEvent& aPointerEvent, + void* target) + { + iGf->getUiStateMachine()->HandlePointerEventL(aPointerEvent,target); + } + +// ============================================================= + +CStmGestureContext::CStmGestureContext( + CStmGestureEngine& aEngine ) : + iEngine(aEngine), + iEventSender(NULL) + { + + } + +void CStmGestureContext::ConstructL() + { + iEngine.iContexts.AppendL(this); + iConfig = new(ELeave) CStmGestureParameters(); + } + +CStmGestureContext::~CStmGestureContext() + { + // Remove all gesture listeners + for(TInt i = iListeners.Count() - 1; i >= 0; --i) + { + MStmGestureListener* listener = iListeners[i]; + iListeners.Remove(i); + } + + iListeners.Reset(); + + // Remove all context's recognizers from the Gesture Engine + Deactivate(); + + if (iEventSender) + delete iEventSender; + + // Destroy all recognizers + for(TInt r = 0; r < stmGesture::EStmGestureUid_Count; ++r) + { + MStmGestureRecogniser*& rec = iRecognizers[r]; + if(rec) + { + delete rec; + rec = NULL; + } + } + + // Remove context from the Gesture Engine + TInt idx = iEngine.iContexts.Find(this); + if(idx != -1) + { + iEngine.iContexts.Remove(idx); + } + delete iConfig; + } + +EXPORT_C void CStmGestureContext::AddListenerL( + MStmGestureListener* aListener, + TInt aPos ) + { + iEventSender = CGestureEventSender::NewL(*aListener); + iListeners.InsertL(aListener, aPos); + } + +EXPORT_C TInt CStmGestureContext::RemoveListener( + MStmGestureListener* aListener ) + { + TInt ind = iListeners.Find(aListener); + if(ind >= 0) + { + iListeners.Remove(ind); + } + return ind; + } + +EXPORT_C void CStmGestureContext::SetContext( + CCoeControl* aControl ) + { + iOwnerControl = aControl; + + for(TInt i = 0; i < stmGesture::EStmGestureUid_Count; ++i) + { + MStmGestureRecogniser* rec = iRecognizers[i]; + if(rec) + { + rec->setOwner(aControl); + } + } + } + +EXPORT_C void CStmGestureContext::ActivateL() + { + if(IsActive()) + { + // re-enable all recognizers + EnableRecognizersL(); + return; + } + /// 1. Tell Engine to deactivate active context + + /// 2. Setup all gesture recognizers + iEngine.EnableContextL(*this); + + /// 3. Notify listeners + + // + EnableRecognizersL(); + + /// + iActivated = ETrue; + } + +EXPORT_C void CStmGestureContext::Deactivate() + { + // NB: reactivation of previous context may leave + TRAP_IGNORE(iEngine.DisableContextL(*this)); + iActivated = EFalse; + } + +void CStmGestureContext::gestureEnter( + MStmGesture& aGesture ) + { + TRAP_IGNORE(DispatchGestureEventL(aGesture.gestureUid(), &aGesture)); + } + +void CStmGestureContext::gestureExit( + TStmGestureUid aGestureUid ) + { + TRAP_IGNORE(DispatchGestureEventL(aGestureUid, NULL)); + } + +CCoeControl* CStmGestureContext::getOwner() + { + return iOwnerControl; + } + +void CStmGestureContext::DispatchGestureEventL( + TStmGestureUid aUid, + MStmGesture* aGesture ) + { + iEventSender->AddEvent(aUid, aGesture); + } + +void CStmGestureContext::SuspendRecognizer( + TStmGestureUid aUid ) + { + MStmGestureRecogniser* rec = iRecognizers[aUid]; + if(rec && !rec->isEnabled()) + { + rec->enable(EFalse); + // TODO: Notify listener + } + } + +void CStmGestureContext::EnableRecognizersL() + { + for(TInt i = 0; i < stmGesture::EStmGestureUid_Count; ++i) + { + EnableRecognizerL(TStmGestureUid(i)); + } + } + +void CStmGestureContext::EnableRecognizerL( + TStmGestureUid aUid ) + { + MStmGestureRecogniser* rec = iRecognizers[aUid]; + if(rec && !rec->isEnabled()) + { + rec->enable(ETrue); + // TODO: Notify listener + } + } + diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/src/tapgesturerecogniser.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/src/tapgesturerecogniser.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,352 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Gesture helper implementation +* +*/ + +#include "GenericSimpleGesture.h" +#include "TapGestureRecogniser.h" +#include "rt_uievent.h" +#include "filelogger.h" + +using namespace stmGesture ; + +/* some utility functions, are these things not provided by the OS? */ +const TInt KFingerSize_mm = 8; +const TInt KTwipsInInch = 1440; +const TReal KTwipsInMm = 56.7; + +long Twips2Pixels(long twips) +{ + CWsScreenDevice* screen = CCoeEnv::Static()->ScreenDevice(); + TZoomFactor deviceMap(screen); + deviceMap.SetZoomFactor(TZoomFactor::EZoomOneToOne); + long px = deviceMap.VerticalTwipsToPixels(twips); //assuming that vertical + return px; //the same as horizontal +} + +long Mm2Pixels(long mm) +{ + return Twips2Pixels(mm * KTwipsInMm); +} + +long Inches2Pixels(double inches) +{ + return Twips2Pixels(inches * KTwipsInInch); +} + +TRect ToleranceRect(const TPoint& aCenterPoint, int size) +{ + long toleranceLength = Mm2Pixels(KFingerSize_mm) / 2; + TRect toleranceRect(aCenterPoint, TSize()); + toleranceRect.Shrink(-size, -size); + return toleranceRect; +} + +CTapGestureRecogniser* CTapGestureRecogniser::NewL(MGestureListener* aListener) +{ + CTapGestureRecogniser* self = new (ELeave) CTapGestureRecogniser(aListener) ; + CleanupStack::PushL(self); + self->ConstructL(); // construct base class + CActiveScheduler::Add(self); + CleanupStack::Pop(self); + return self; +} + +CTapGestureRecogniser::CTapGestureRecogniser(MGestureListener* aListener) : + CTimer(EPriorityRealTime - 1) +{ + m_powner = aListener->getOwner() ; + // if a listener is given here, then it is both tap and doubletap listener + if (aListener) + { + addTapListener(aListener, m_powner) ; + addDoubleTapListener(aListener, m_powner) ; + } + m_waitingforsecondtap = false ; + m_gestureEnabled = true ; + m_ignorefirst = true ; // by default ignore the first tap +} + +CTapGestureRecogniser::~CTapGestureRecogniser() +{ + Cancel(); + m_tapListeners.Reset() ; + m_tapListenerWindows.Reset() ; + m_doubleTapListeners.Reset() ; + m_doubleTapListenerWindows.Reset() ; + +} + +TGestureRecognitionState CTapGestureRecogniser::recognise(int numOfActiveStreams, + MGestureEngineIf* pge) +{ + TGestureRecognitionState state = ENotMyGesture; + // Check if we are enabled or not + if (!m_gestureEnabled) return state ; + + // Look at the events to see if it looks like a tap or double tap + if (numOfActiveStreams == 1) + { + // Then look at the event stream, it has to be tap and release + const stmUiEventEngine::MUiEvent* puie = pge->getUiEvents(0); + if (!puie) return state; + + int countOfEvents = puie->countOfEvents() ; + stmUiEventEngine::TUiEventCode eventCode = puie->Code() ; + + if (m_loggingenabled) + { + LOGARG("CTapGestureRecogniser: %d num %d code %d", eventCode, countOfEvents, eventCode); + } + if (countOfEvents == 2) // Do we have touch and release in the stream, check if there are two events + { + // Then look at the events to see if they are suitable for us + if (eventCode == stmUiEventEngine::ERelease) // The last one is release + { + stmUiEventEngine::MUiEvent* puieFirst = puie->previousEvent(); + + if(puieFirst) + eventCode = puieFirst->Code(); + else + return state; + + if (eventCode == stmUiEventEngine::ETouch) // is the first one ETouch + { + if (m_loggingenabled) + { + LOGARG("CTapGestureRecogniser: 0x%x TAP: num %d code %d", + this, countOfEvents, eventCode); + } + // It is tap gesture in our window, handle it + state = EGestureActive; + + CCoeControl* target = (CCoeControl*)puie->Target(); + + if (m_waitingforsecondtap) + { + m_waitingforsecondtap = false ; + if (m_loggingenabled) + { + LOGARG("CTapGestureRecogniser: 0x%x second tap: num %d code %d", + this, countOfEvents, eventCode); + } + + Cancel() ; // The timer + + const TPoint& secondPoint = puieFirst->CurrentXY() ; + if (isSecondTapClose(secondPoint, m_firstTapXY)) + { + // Taps were close enough together, so issue a doubletap + + // Call the listener of the current window to inform that a doubletap has occurred... + TInt inx = m_doubleTapListenerWindows.Find(target) ; + if (inx == KErrNotFound) + { + // the second tap hit a window with no listener, + // check if the first one has a listener + inx = m_doubleTapListenerWindows.Find(m_firstTapTarget) ; + } + // not found, check if the parent is in the listener list + if (inx == KErrNotFound) + { + CCoeControl* pc = target ; + while (pc) + { + pc = pc->Parent() ; + inx = m_doubleTapListenerWindows.Find(pc) ; + if (inx != KErrNotFound) break ; + } + } + if (inx != KErrNotFound) + { + // Tap gesture + stmGesture::TGenericSimpleGesture pgest( + stmGesture::EGestureUidDoubleTap, + secondPoint, stmGesture::ETapTypeDouble, puie) ; + MGestureListener* plistener = m_doubleTapListeners[inx] ; + plistener->gestureEnter(pgest) ; + } + } + else + { + // Second tap is too far away, generate just tap + // and if configured, also the fist tap is generated + if (!m_ignorefirst) + { + // do not ignore the first tap, so issue it now using the stored location + // Call the listener to inform that a Tap has occurred, if there was a listener in that window + TInt inx = m_tapListenerWindows.Find(m_firstTapTarget) ; + if (inx != KErrNotFound) // check if the listener exists + { + stmGesture::TGenericSimpleGesture pgest( + stmGesture::EGestureUidTap, puieFirst->CurrentXY(), + stmGesture::ETapTypeSingle, puieFirst) ; // TODO: speed is 0? + MGestureListener* plistener = m_tapListeners[inx] ; + plistener->gestureEnter(pgest) ; + } + } + // generate a tap at the current location, if there is a listener for it + TInt inx = m_tapListenerWindows.Find(target) ; + if (inx != KErrNotFound) + { + stmGesture::TGenericSimpleGesture pgest( + stmGesture::EGestureUidTap, puie->CurrentXY(), + stmGesture::ETapTypeSingle, puie) ; // TODO: speed is 0? + MGestureListener* plistener = m_tapListeners[inx] ; + plistener->gestureEnter(pgest) ; + } + } + } + else + { + m_firstTapXY = puieFirst->CurrentXY() ; + m_firstTapTarget = target ; + m_firstTapSpeedX = puie->speedX() ; + m_firstTapSpeedY = puie->speedY() ; + // This was the first tap, start the timer... + m_waitingforsecondtap = true ; + if (m_loggingenabled) + { + LOGARG("CTapGestureRecogniser: 0x%x first tap: num %d code %d", + this, countOfEvents, eventCode); + } + Cancel() ; // Just to be sure... + After(m_doubleTapTimeout) ; + } + + } + } + } + } + return state; +} + +void CTapGestureRecogniser::release(MGestureEngineIf* /*ge*/) +{ + Cancel() ; // some other gesture took hold of the thing, do not send tap gesture + m_waitingforsecondtap = false ; + if (m_loggingenabled) + { + LOGARG("CTapGestureRecogniser: 0x%x release, %d %d", + this, m_firstTapXY.iX, m_firstTapXY.iY); + } +} + +void CTapGestureRecogniser::RunL() +{ + m_waitingforsecondtap = false ; + if (m_loggingenabled) + { + LOGARG("CTapGestureRecogniser: 0x%x timer, %d %d", this, m_firstTapXY.iX, m_firstTapXY.iY); + } + // Double tap timer has been elapsed without new Touch/Release, generate the tap if there is a listener + TInt inx = m_tapListenerWindows.Find(m_firstTapTarget) ; + if (inx != KErrNotFound) + { + using stmUiEventEngine::TUiEventSpeed; + + TUiEventSpeed speedIf(m_firstTapSpeedX,m_firstTapSpeedY); + + stmGesture::TGenericSimpleGesture pgest( + stmGesture::EGestureUidTap, + m_firstTapXY, + stmGesture::ETapTypeSingle, + &speedIf) ; + + MGestureListener* plistener = m_tapListeners[inx] ; + plistener->gestureEnter(pgest) ; + } +} + +void CTapGestureRecogniser::enableLogging(bool loggingOn) +{ + m_loggingenabled = loggingOn; +} + +void CTapGestureRecogniser::setOwner(CCoeControl* owner) +{ + m_powner = owner; +} + +void CTapGestureRecogniser::setDoubleTapTimeout(int newtimeout) +{ + m_doubleTapTimeout = newtimeout; +} + +void CTapGestureRecogniser::enable(bool enabled) +{ + m_gestureEnabled = enabled ; +} + +bool CTapGestureRecogniser::isEnabled() +{ + return m_gestureEnabled ; +} + +void CTapGestureRecogniser::setDoubleTapRange(int rangeInMillimetres) +{ + m_rangesizeInPixels = Mm2Pixels(rangeInMillimetres) ; +} + +void CTapGestureRecogniser::ignoreFirstTap(bool ignore) +{ + m_ignorefirst = ignore ; +} + +/*! + * Check whether the two taps are close enough to each other + */ +bool CTapGestureRecogniser::isSecondTapClose(const TPoint& secondPoint, const TPoint& firstTapXY) +{ + TRect tolerance = ToleranceRect(secondPoint, m_rangesizeInPixels) ; + bool aretheyclose = tolerance.Contains(firstTapXY); + return aretheyclose ; +} + +void CTapGestureRecogniser::addTapListener(MGestureListener* aListener, CCoeControl* listenerOwner) +{ + m_tapListeners.Append(aListener) ; + m_tapListenerWindows.Append(listenerOwner) ; +} + +void CTapGestureRecogniser::removeTapListener(MGestureListener* aListener, + CCoeControl* /*listenerOwner*/) +{ + TInt inx = m_tapListeners.Find(aListener) ; + if(inx != KErrNotFound) + { + m_tapListeners.Remove(inx) ; + m_tapListenerWindows.Remove(inx) ; + } +} + +void CTapGestureRecogniser::addDoubleTapListener(MGestureListener* aListener, + CCoeControl* listenerOwner) +{ + m_doubleTapListeners.Append(aListener) ; + m_doubleTapListenerWindows.Append(listenerOwner) ; +} + +void CTapGestureRecogniser::removeDoubleTapListener(MGestureListener* aListener, + CCoeControl* /*listenerOwner*/) +{ + TInt inx = m_doubleTapListeners.Find(aListener) ; + if(inx != KErrNotFound) + { + m_doubleTapListeners.Remove(inx) ; + m_doubleTapListenerWindows.Remove(inx) ; + } +} + diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/src/touchgesturerecogniser.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/src/touchgesturerecogniser.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,115 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Gesture helper implementation +* +*/ + +#include "GenericSimpleGesture.h" +#include "touchgesturerecogniser.h" +#include "rt_uievent.h" +#include "filelogger.h" + +using namespace stmGesture ; + +CTouchGestureRecogniser::CTouchGestureRecogniser(MGestureListener* aListener) : + CGestureRecogniser(aListener) +{ +} + +CTouchGestureRecogniser* CTouchGestureRecogniser::NewL(MGestureListener* aListener) +{ + CTouchGestureRecogniser* self = new (ELeave) CTouchGestureRecogniser(aListener) ; + return self; +} + +CTouchGestureRecogniser::~CTouchGestureRecogniser() +{ +} + +/*! + * Touch gesture recogniser. Note that this one never owns the gesture, it just calls + * the callback if it detects ETouch inside the area being watched. + * There could be also check for the target window? + */ +TGestureRecognitionState CTouchGestureRecogniser::recognise(int numOfActiveStreams, + MGestureEngineIf* pge) +{ + TGestureRecognitionState state = ENotMyGesture; + // Check if we are enabled or not + if (!m_gestureEnabled) return state ; + + // Look at the events to see if it looks like edge scroll with one pointer + if (numOfActiveStreams == 1) + { + // Then look at the event stream, it has to be EHold + const stmUiEventEngine::MUiEvent* puie = pge->getUiEvents(0); + if (!puie) return state; + stmUiEventEngine::TUiEventCode eventCode = puie->Code(); + + if (m_loggingenabled) + { + LOGARG("CTouchGestureRecogniser: 0x%x num %d code %d", this, puie->countOfEvents(), eventCode); + + } + if (eventCode == stmUiEventEngine::ETouch) + { + const TPoint& tapPoint = puie->CurrentXY(); + if (m_loggingenabled) + { + LOGARG("CTouchGestureRecogniser: 0x%x ETouch: num %d at %d, %d", this, puie->countOfEvents(), tapPoint.iX, tapPoint.iY); + LOGARG("CTouchGestureRecogniser: area, %d,%d %d,%d", m_area.iTl.iX, m_area.iTl.iY, m_area.iBr.iX, m_area.iBr.iY); + } + bool produceGesture ; + if(!m_area.IsEmpty()) + { + produceGesture = m_area.Contains(tapPoint); + if(produceGesture && m_loggingenabled) + { + LOGARG("CTouchGestureRecogniser: HIT area (%d,%d) in %d,%d %d,%d", tapPoint.iX, tapPoint.iY, m_area.iTl.iX, m_area.iTl.iY, m_area.iBr.iX, m_area.iBr.iY); + } + } + else + { + produceGesture = (m_powner == puie->Target()); // no area defined, touch detected in the window + } + if (produceGesture) + { + // state = EGestureActive ; do not take ownership, all gestures anyway start with ETouch + // issue the touch gesture + stmGesture::TGenericSimpleGesture pgest(KUid, tapPoint); + // Call the listener to inform that a touch has occurred... + m_listener->gestureEnter(pgest); + } + } + } + return state; +} + +void CTouchGestureRecogniser::release(MGestureEngineIf* /*ge*/) +{ + if (m_loggingenabled) + { + LOGARG("CTouchGestureRecogniser: 0x%x release", this); + } +} + +void CTouchGestureRecogniser::setArea(const TRect& theArea) +{ + m_area = theArea ; + if (m_loggingenabled) + { + LOGARG("CTouchGestureRecogniser: area, %d,%d %d,%d", m_area.iTl.iX, m_area.iTl.iY, m_area.iBr.iX, m_area.iBr.iY); + } + +} diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/src/uieventsender.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/src/uieventsender.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,149 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +#include "uieventsender.h" +#include "UiEvent.h" + +#include "filelogger.h" + +using namespace stmUiEventEngine; + + +CUiEventSender* CUiEventSender::NewL() +{ + CUiEventSender* self = new (ELeave) CUiEventSender(); + + return self; +} + +/*! + * An active object for sending the UI events to the observers. + * Depending on the m_directsending the asynchronous method is not + * used but instead the observers will be called immediately. + */ +CUiEventSender::CUiEventSender() +{ + m_loggingenabled = false ; + for (int i = 0; i < stmUiEventEngine::KMaxNumberOfPointers; i++) + { + iEvents[i] = NULL ; + } +} + +CUiEventSender::~CUiEventSender() +{ + // remove the possible events from the buffers if release was missed + for (int i = 0; i < stmUiEventEngine::KMaxNumberOfPointers; i++) + { + if (iEvents[i]) delete iEvents[i] ; + } + iObserver.Reset() ; +} + +/*! + * Add new UI event to the list or send it directly to the observers + * depending on the m_directsending flag. + * \param aUiEvent the new UI event to be sent to the observers. + */ +TInt CUiEventSender::AddEvent(CUiEvent* aUiEvent) +{ + int pointerIndex = aUiEvent->Index() ; + // Store the new UI event. Check what kind of event it is and compress the set of events + // stored so far if possible + compressStack(aUiEvent) ; + aUiEvent->setPrevious(iEvents[pointerIndex]) ; + iEvents[pointerIndex] = aUiEvent ; // Store the new event + TRAPD(err, EmitEventL(*aUiEvent)); + if(err) + return err; + + if (m_loggingenabled) + { + LOGARG("Sent event: %s: (ptr %d) (%d,%d)", + stmUiEventEngine::EventName(aUiEvent->Code()), pointerIndex, + aUiEvent->CurrentXY().iX, aUiEvent->CurrentXY().iY); + } + // If this was release event, then the chain can be removed + if (aUiEvent->Code() == stmUiEventEngine::ERelease) + { + delete aUiEvent; // This will delete the whole chain + iEvents[pointerIndex] = NULL ; + } + return KErrNone; +} +/*! + * Call each observer with the event + */ +void CUiEventSender::EmitEventL(const CUiEvent& aEvent) +{ + for (TInt i = 0; i < iObserver.Count(); i++) + { + iObserver[i]->HandleUiEventL(aEvent); + } +} + +/*! + * Add a new observer. Note that current implementation is very rude: + * max 5 observers in a simple array. + */ +bool CUiEventSender::addObserver(MUiEventObserver* aObserver ) +{ + iObserver.Append(aObserver) ; + return true ; +} + +/* + * remove observer from list + */ +bool CUiEventSender::removeObserver(MUiEventObserver* aObserver ) +{ + int x = iObserver.Find(aObserver) ; + if (x != -1) + { + iObserver.Remove(x) ; + return true ; + + } + return EFalse ; // Could not find observer +} +void CUiEventSender::compressStack(CUiEvent* aUiEvent) +{ + int pointerIndex = aUiEvent->Index() ; + CUiEvent*& top = iEvents[pointerIndex] ; + if(!top) + { + return; + } + if (aUiEvent->Code() == stmUiEventEngine::EHold) + { + // assumption: in case of hold, we can discard all previous messages + delete top ; + top = NULL ; + } + else + { + // Check if there would too many moves + CUiEvent* next = dynamic_cast(top->previousEvent()) ; + if (next != 0 && next->Code() == stmUiEventEngine::EMove) + { + // leave only the topmost to the stack + top->setPrevious(0) ; + delete next ; + } + } + +} diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/src/unknowngesturerecogniser.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/src/unknowngesturerecogniser.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,87 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Gesture helper implementation +* +*/ + +#include "GenericSimpleGesture.h" +#include "unknowngesturerecogniser.h" +#include "rt_uievent.h" +#include "filelogger.h" + +using namespace stmGesture ; + +CUnknownGestureRecogniser::CUnknownGestureRecogniser(MGestureListener* aListener) : + CGestureRecogniser(aListener) +{ +} + +CUnknownGestureRecogniser* CUnknownGestureRecogniser::NewL(MGestureListener* aListener) +{ + CUnknownGestureRecogniser* self = new (ELeave) CUnknownGestureRecogniser(aListener) ; + return self; +} + +CUnknownGestureRecogniser::~CUnknownGestureRecogniser() +{ +} + +/*! + * recognise the long press; basically it is just the EHold UI event + */ +TGestureRecognitionState CUnknownGestureRecogniser::recognise(int numOfActiveStreams, + MGestureEngineIf* pge) +{ + TGestureRecognitionState state = ENotMyGesture; + // Check if we are enabled or not + if (!m_gestureEnabled) return state ; + + + // Look at the events to see if it looks like long press with one pointer + if (numOfActiveStreams == 1) + { + // Then look at the event stream, it has to be EHold + const stmUiEventEngine::MUiEvent* puie = pge->getUiEvents(0); + int countOfEvents = puie->countOfEvents(); + stmUiEventEngine::TUiEventCode eventCode = puie->Code(); + + if (m_loggingenabled) + { + LOGARG("CUnknownGestureRecogniser: %d num %d code %d", eventCode, countOfEvents, eventCode); + } + if (puie->Target() == m_powner && eventCode == stmUiEventEngine::ERelease) // The last one is ERelease + { + const TPoint& currentXY = puie->CurrentXY() ; + if (m_loggingenabled) + { + LOGARG("CUnknownGestureRecogniser: (%d, %d) ", currentXY.iX, currentXY.iY) ; + } + state = EGestureActive ; + // issue the gesture + stmGesture::TGenericSimpleGesture pgest(KUid, currentXY, 0, puie) ; + // Call the listener to inform that a gesture has occurred... + m_listener->gestureEnter(pgest) ; + } + } + return state; +} + +void CUnknownGestureRecogniser::release(MGestureEngineIf* /*ge*/) +{ + if (m_loggingenabled) + { + LOGARG("CUnknownGestureRecogniser: 0x%x release", this); + } +} + diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/src/updowngesturerecogniser.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/src/updowngesturerecogniser.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,94 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Gesture helper implementation +* +*/ + +#include "updowngesturerecogniser.h" +#include "GenericSimpleGesture.h" +#include "rt_uievent.h" + +#include "filelogger.h" + +using namespace stmGesture ; + +_LIT8(KUpdownName, "Updown") ; + +CUpdownGestureRecogniser::CUpdownGestureRecogniser(MGestureListener* aListener) : + CGestureRecogniser(aListener) +{ +} + +CUpdownGestureRecogniser* CUpdownGestureRecogniser::NewL(MGestureListener* aListener) +{ + CUpdownGestureRecogniser* self = new (ELeave) CUpdownGestureRecogniser(aListener) ; + return self; +} + +CUpdownGestureRecogniser::~CUpdownGestureRecogniser() +{ +} + +TGestureRecognitionState CUpdownGestureRecogniser::recognise(int numOfActiveStreams, + MGestureEngineIf* pge) +{ + TGestureRecognitionState state = ENotMyGesture; + // Check if we are enabled or not + if (!m_gestureEnabled) return state ; + + // Look at the events to see if it looks like a tap or double tap + if (numOfActiveStreams == 1) + { + // Then look at the event stream, it has to be tap and release + const stmUiEventEngine::MUiEvent* puie = pge->getUiEvents(0); + int countOfEvents = puie->countOfEvents() ; + stmUiEventEngine::TUiEventCode eventCode = puie->Code() ; + if (countOfEvents > 1) // do we have more than one event in the stream? + { + // Then look at the events to see if they are suitable for us + // should we check that all of the events are targeted to our window? + // currently we only check if the last one is for us and is EMove, then check if |x| > |y| + if (puie->Target() == m_powner && + eventCode == stmUiEventEngine::EMove) // The last one is move in our window + + { + if (m_loggingenabled) + { + LOGARG("CUpdownGestureRecogniser: UpDown: num %d code %d", + countOfEvents, eventCode); + } + // Is it leftright gesture in our window? + const TPoint& p = puie->CurrentXY() ; + TPoint dp = p - puie->PreviousXY() ; + // check that the Y movement is bigger + if (Abs(dp.iX) < Abs(dp.iY)) + { + state = EGestureActive; + stmGesture::TGenericSimpleGesture pgest(KUid, p, dp.iY, puie) ; + // Give the gesture a name + pgest.setName(KUpdownName) ; + // Call the listener to inform that a UpDown has occurred... + m_listener->gestureEnter(pgest) ; + } + } + } + } + return state; +} + +void CUpdownGestureRecogniser::release(MGestureEngineIf* /*ge*/) +{ + m_listener->gestureExit(KUid) ; +} + diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/src/utils.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/src/utils.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,64 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +#include "utils.h" + +#include // for CCoeEnv +#include // for CEikAppUi + +#include "gesturedefs.h" + +namespace stmUiEventEngine +{ + /** @return the longer edge of the size */ + inline TInt LongerEdge( const TSize& aSize ) + { + return Max( aSize.iHeight, aSize.iWidth ); + } + + // for documentation, see header file + TRect ToleranceRect( const TPoint& aCenterPoint ) + { + long toleranceLength = Mm2Pixels(KFingerSize_mm) / 2; + TRect toleranceRect( aCenterPoint, TSize() ); + // grow by the tolerance length, while keeping the center point + toleranceRect.Grow( toleranceLength, toleranceLength ); + return toleranceRect; + } + + long Twips2Pixels(long twips) + { + CWsScreenDevice* screen = CCoeEnv::Static()->ScreenDevice(); + TZoomFactor deviceMap(screen); + deviceMap.SetZoomFactor(TZoomFactor::EZoomOneToOne); + long px = deviceMap.VerticalTwipsToPixels(twips); //assuming that vertical + return px; //the same as horizontal + + } + + long Mm2Pixels(long mm) + { + return Twips2Pixels(mm * KTwipsInMm); + } + + long Inches2Pixels(float inches) + { + return Twips2Pixels(inches * KTwipsInInch); + } + + +} // namespace diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/webkitutils/stmgesturefw/src/zoomgesturerecogniser.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/webkitutils/stmgesturefw/src/zoomgesturerecogniser.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,242 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Gesture helper implementation +* +*/ + +#include +#include +#include "filelogger.h" +#include "zoomgesturerecogniser.h" +#include "GenericSimpleGesture.h" + +using namespace stmGesture ; + +_LIT8(KZoomInName, "ZoomIn") ; +_LIT8(KZoomOutName, "ZoomOut") ; + +CZoomGestureRecogniser* CZoomGestureRecogniser::NewL(MGestureListener* aListener) +{ + CZoomGestureRecogniser* self = new (ELeave) CZoomGestureRecogniser(aListener) ; + return self; +} + +CZoomGestureRecogniser::CZoomGestureRecogniser(MGestureListener* aListener) : + CGestureRecogniser(aListener), m_area(TRect::EUninitialized) +{ + m_rangesizeInPixels = 20 ; // by default 20 pixels from the edges is the area + m_zooming = false ; +} + +CZoomGestureRecogniser::~CZoomGestureRecogniser() +{ +} + +TGestureRecognitionState CZoomGestureRecogniser::recognise(int numOfActiveStreams, + MGestureEngineIf* pge) +{ + TGestureRecognitionState state = ENotMyGesture; + // Check if we are enabled or not + if (!m_gestureEnabled) return state ; + + // Look at the events to see if it looks like zoom with one pointer + if (numOfActiveStreams == 1) + { + const stmUiEventEngine::MUiEvent* puie = pge->getUiEvents(0); + int countOfEvents = puie->countOfEvents(); + stmUiEventEngine::TUiEventCode eventCode = puie->Code(); + + if (m_loggingenabled) + { + LOGARG("CZoomGestureRecogniser: %d num %d code %d", + eventCode, countOfEvents, eventCode); + + } + if (!m_zooming) + { + // We are not yet zoomin, check if we should start, i.e. whether we are + // inside the zoom trigger areas near the corners when touch is done... + if (eventCode == stmUiEventEngine::ETouch) // It must be ETouch inside the corner + { + if (m_loggingenabled) + { + LOGARG("CZoomGestureRecogniser: 0x%x ETouch: num %d code %d, %d", + this, countOfEvents, puie->CurrentXY().iX, puie->CurrentXY().iY); + LOGARG("CZoomGestureRecogniser: area, %d,%d %d,%d, range: %d", m_area.iTl.iX, m_area.iTl.iY, m_area.iBr.iX, m_area.iBr.iY, m_rangesizeInPixels); + } + + // the lower left rectangle is m_rangesizeIPixels from the corner + TRect lowerleft(m_area.iTl.iX, m_area.iBr.iY-m_rangesizeInPixels, + m_area.iTl.iX+m_rangesizeInPixels, m_area.iBr.iY) ; + TRect upperright(m_area.iBr.iX-m_rangesizeInPixels, m_area.iTl.iY, + m_area.iBr.iX, m_area.iTl.iY+m_rangesizeInPixels) ; + + m_previoustouch = m_startingtouch = puie->CurrentXY() ; + m_delta = 0 ; + if (lowerleft.Contains(m_startingtouch) || upperright.Contains(m_startingtouch)) + { + if (m_loggingenabled) + { + LOGARG("CZoomGestureRecogniser: ZOOM IN/OUT, (%d,%d) in %d,%d %d,%d, range: %d", + m_startingtouch.iX, m_startingtouch.iY, + m_area.iTl.iX, m_area.iTl.iY, m_area.iBr.iX, m_area.iBr.iY, + m_rangesizeInPixels); + } + m_zooming = true ; + if (lowerleft.Contains(m_startingtouch)) + { + m_zoomtype = EZoomIn ; + } + else + { + m_zoomtype = EZoomOut ; + } + state = ELockToThisGesture ; // keep zooming until release + TTwoPointGesture pgest(KUid, m_startingtouch, m_startingtouch); + pgest.setLogging(m_loggingenabled) ; + pgest.setDetails(m_delta) ; + pgest.setName(m_zoomtype == EZoomIn ? KZoomInName() : KZoomOutName()) ; + pgest.setType(m_zoomtype); + + // Call the listener to inform that a gesture has happened + m_listener->gestureEnter(pgest) ; + } + else + { + // It is not our gesture so do nothing... + } + } + else + { + // It is not touch, so not our initiating UI event.. do nothing + } + } + else + { + // We are already zooming, calculate the changes in zooming factor if it looks we are still zooming + if (eventCode == stmUiEventEngine::ERelease) // ERelease stops zooming + { + // We were zooming, but if there are multiple touches we are not any more + m_listener->gestureExit(KUid) ; // should we call this or not? + } + else // all other UI events will keep on zooming + { + state = ELockToThisGesture ; // Keep the gesture + const TPoint& p = puie->CurrentXY() ; + float newdist = calculateDistance(p) ; + float olddist = calculateDistance(m_previoustouch) ; + m_previoustouch = p ; + m_delta = adjustZoom(olddist, newdist) ; + state = EGestureActive ; + + // Inform listener only if there is something to say + if (m_delta != 0) + { + TTwoPointGesture pgest = TTwoPointGesture(KUid, p, m_startingtouch); + pgest.setLogging(m_loggingenabled) ; + pgest.setDetails(m_delta) ; + pgest.setName(m_zoomtype == EZoomIn ? KZoomInName() : KZoomOutName()) ; + pgest.setType(m_zoomtype); + + // Call the listener to inform that a gesture has happened + m_listener->gestureEnter(pgest) ; + } + } + } + } + else + { + if (m_zooming) + { + // We were zooming, but if there are multiple touches we are not any more + m_listener->gestureExit(KUid) ; // should we call this or not? + } + m_zooming = false ; + } + return state; +} + +void CZoomGestureRecogniser::release(MGestureEngineIf*) +{ + if (m_zooming) + { + m_zooming = false ; + m_listener->gestureExit(KUid) ; // should we call this or not? + } + if (m_loggingenabled) + { + LOGARG("CZoomGestureRecogniser: 0x%x release", this); + } +} + +void CZoomGestureRecogniser::setRange(int rangeInPixels) +{ + m_rangesizeInPixels = rangeInPixels ; +} + +void CZoomGestureRecogniser::setArea(const TRect& theArea) +{ + m_area = theArea ; + if (m_loggingenabled) + { + LOGARG("CZoomGestureRecogniser: set area, %d,%d %d,%d", + m_area.iTl.iX, m_area.iTl.iY, m_area.iBr.iX, m_area.iBr.iY); + } +} + +/*! + * calculate the distance, return as as float + */ +float CZoomGestureRecogniser::calculateDistance(const TPoint& tp) +{ + double x = ((m_startingtouch.iX-tp.iX)*(m_startingtouch.iX-tp.iX)) + + ((m_startingtouch.iY-tp.iY)*(m_startingtouch.iY-tp.iY)) ; + double ddist ; + Math::Sqrt(ddist, x) ; + return ddist ; +} + +int CZoomGestureRecogniser::adjustZoom(float& aPreviousDistance, float aNewDistance) +{ + float diff = aNewDistance - aPreviousDistance ; + float logdiff = diff ; + if (diff < 0) diff = -diff ; + float changePercentage = (diff/aPreviousDistance)*100.f ; + if (changePercentage > 10.f) + { + // change more than 10%, make at most 10% + float newdiff = aPreviousDistance*0.1f; + if (aPreviousDistance > aNewDistance) newdiff = -newdiff ; + if (m_loggingenabled) + { + LOGARG("CZoomGestureRecogniser: adjust zoom from %f to %f : was, now %f %f", + double(logdiff), double(newdiff), double(aPreviousDistance), double(aNewDistance)); + } + + aPreviousDistance = aPreviousDistance + newdiff ; + diff = newdiff ; + + } + else + { + if (m_loggingenabled) + { + LOGARG("CZoomGestureRecogniser: adjust zoom from %f to %f : was, now %f %f", + double(logdiff), double(diff), double(aPreviousDistance), double(aNewDistance)); + } + aPreviousDistance = aNewDistance ; // accept the new value and update the new length + diff = logdiff ; // put the original back + } + return (int)diff ; +} diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetbackuprestore/Inc/WidgetActiveCallback.h --- a/webengine/widgetbackuprestore/Inc/WidgetActiveCallback.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetbackuprestore/Inc/WidgetActiveCallback.h Mon Mar 29 12:27:15 2010 +0100 @@ -20,7 +20,7 @@ #define WIDGETACTIVECALLBACK_H #include // CBase -#include +#include #ifdef _DEBUG #include #endif diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetbackuprestore/Src/WidgetActiveCallback.cpp --- a/webengine/widgetbackuprestore/Src/WidgetActiveCallback.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetbackuprestore/Src/WidgetActiveCallback.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ // INCLUDE FILES -#include +#include #include #include "WidgetActiveCallback.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetbackuprestore/Src/WidgetBackupRestore.cpp --- a/webengine/widgetbackuprestore/Src/WidgetBackupRestore.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetbackuprestore/Src/WidgetBackupRestore.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ -#include +#include #include #include "widgetbackuprestore.h" #include "WidgetActiveCallback.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetbackuprestore/group/WidgetBackupRestore.mmp --- a/webengine/widgetbackuprestore/group/WidgetBackupRestore.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetbackuprestore/group/WidgetBackupRestore.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -25,7 +25,7 @@ #include #include #include -#include +#include // Capability assignment. CAPABILITY CAP_APPLICATION AllFiles -Location @@ -46,8 +46,10 @@ USERINCLUDE ../../../inc MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE +OS_LAYER_ESTLIB_SYSTEMINCLUDE +#if defined(__PLATFORM_VERSION_32__) || defined(__PLATFORM_VERSION_50_TUBE__) || defined(__PLATFORM_VERSION_50__) MW_LAYER_CONNECT_SYSTEMINCLUDE +#endif // Libraries LIBRARY euser.lib diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetbackuprestore/group/bld.inf --- a/webengine/widgetbackuprestore/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetbackuprestore/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ #include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT GCCE diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetengine/group/WidgetEngine.mmp --- a/webengine/widgetengine/group/WidgetEngine.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetengine/group/WidgetEngine.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -22,9 +22,11 @@ #include #include #include -#include +#include MW_LAYER_SYSTEMINCLUDE +OS_LAYER_ESTLIB_SYSTEMINCLUDE + USERINCLUDE ../../osswebengine/Webkit/S60/WebView USERINCLUDE ../../osswebengine/Webkit/S60/Plugins USERINCLUDE ../../osswebengine/Webkit/S60/WebCoreSupport @@ -63,14 +65,9 @@ SYSTEMINCLUDE ../../webkitutils/ToolBar SYSTEMINCLUDE ../../webkitutils/HistoryProvider -MW_LAYER_ECOM_SYSTEMINCLUDE -MW_LAYER_HTTP_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE -MW_LAYER_SWI_SYSTEMINCLUDE -#if defined(BRDO_BROWSER_50_FF) -MW_LAYER_STDAPIS_SYSTEMINCLUDE -#endif -SYSTEMINCLUDE /epoc32/include/swi +// #if defined(BRDO_BROWSER_50_FF) +// MW_LAYER_STDAPIS_SYSTEMINCLUDE +// #endif MACRO __S60__ MACRO arm @@ -92,11 +89,9 @@ MACRO NOKIA_CHANGES MACRO __CPLUSPLUS - USERINCLUDE ../inc SOURCEPATH ../src - SOURCE Widget.cpp SOURCE WidgetFuncs.cpp SOURCE WidgetEventHandler.cpp @@ -116,6 +111,7 @@ SOURCE WidgetEngineBridge.cpp START RESOURCE ../Src/WidgetMenu.rss +DEPENDS avkon.rsg HEADER TARGETPATH RESOURCE_FILES_DIR #ifdef __S60_32__ @@ -143,3 +139,4 @@ LIBRARY etel.lib LIBRARY etelmm.lib LIBRARY WebUtils.lib + diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetengine/group/bld.inf --- a/webengine/widgetengine/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetengine/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ #include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetengine/inc/MenuClient.h --- a/webengine/widgetengine/inc/MenuClient.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetengine/inc/MenuClient.h Mon Mar 29 12:27:15 2010 +0100 @@ -23,7 +23,7 @@ #include #include -#include "BrCtlInterface.h" +#include #include "MenuCallbacks.h" #include "MenuItemCallbacks.h" #include "WidgetEngineCallbacks.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetengine/inc/MenuItemClient.h --- a/webengine/widgetengine/inc/MenuItemClient.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetengine/inc/MenuItemClient.h Mon Mar 29 12:27:15 2010 +0100 @@ -20,7 +20,7 @@ // INCLUDES #include -#include "BrCtlInterface.h" +#include // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetengine/inc/Preferences.h --- a/webengine/widgetengine/inc/Preferences.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetengine/inc/Preferences.h Mon Mar 29 12:27:15 2010 +0100 @@ -167,7 +167,11 @@ * Remove preference for a particular key */ void removePreferenceL( const TDesC& akey, const TDesC& avalue); - + void externalizeL(RWriteStream& aStream) const; + + void internalizeL(RReadStream& aStream); + + void deleteAllPrefFiles(); private: RPtrHashMap* m_preferences; diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetengine/inc/WidgetClient.h --- a/webengine/widgetengine/inc/WidgetClient.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetengine/inc/WidgetClient.h Mon Mar 29 12:27:15 2010 +0100 @@ -20,7 +20,7 @@ // INCLUDES #include -#include "BrCtlInterface.h" +#include #include "WidgetCallbacks.h" #include "WidgetEngineCallbacks.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetengine/inc/WidgetEngineBridge.h --- a/webengine/widgetengine/inc/WidgetEngineBridge.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetengine/inc/WidgetEngineBridge.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,6 @@ * */ - - #ifndef __WIDGETENGINEINTERFACE #define __WIDGETENGINEINTERFACE @@ -24,7 +22,7 @@ #include "config.h" #include #include -#include "BrCtlDefs.h" +#include #include "WidgetEngineCallbacks.h" #include "WidgetJSObjectProtector.h" #include "wtf/HashSet.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetengine/src/MenuClient.cpp --- a/webengine/widgetengine/src/MenuClient.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetengine/src/MenuClient.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -298,7 +298,12 @@ m_jsmenu->leftKeyCallback()->InvokeCall(); return ETrue; } - + + if ( aCommandId == EAknSoftkeyOptions && m_jsmenu && m_jsmenu->onShowCallback() ) { + m_jsmenu->onShowCallback()->InvokeCall(); + return ETrue; + } + return EFalse; } diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetengine/src/Preferences.cpp --- a/webengine/widgetengine/src/Preferences.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetengine/src/Preferences.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -34,6 +34,8 @@ _LIT( KKeyFormat, "%d.%S" ); _LIT( KPrefsFile,"prefs.dat" ); +_LIT( KPrefsTmpFile,"prefs.dat.tmp" ); +_LIT( KPrefsBakFile, "prefs.dat.bak" ); // ---------------------------------------------------------------------------- @@ -58,7 +60,7 @@ // ---------------------------------------------------------------------------- WidgetPreferences::~WidgetPreferences() { - TRAP_IGNORE( saveL() ); + //TRAP_IGNORE( saveL() ); if (m_preferences) { m_preferences->ResetAndDestroy(); m_preferences->Close(); @@ -262,6 +264,13 @@ } CleanupStack::Pop(); // k + + // Save update to persistent storage + TRAPD(err, saveL()); + if(err!= KErrNone) + { + deleteAllPrefFiles(); + } } } @@ -301,6 +310,12 @@ } CleanupStack::PopAndDestroy(); // k + + // Save update to persistent storage + TRAPD(err, saveL()); + if(err!= KErrNone) { + deleteAllPrefFiles(); + } } } @@ -317,46 +332,180 @@ RFs fs; - if ( fs.Connect() == KErrNone ) { + + // Connect to file server + User::LeaveIfError(fs.Connect()); + CleanupClosePushL( fs ); - CleanupClosePushL( fs ); - HBufC* filePath = HBufC::NewLC( m_basepath->Length() + KPrefsFile().Length() ); + // Form filenames + HBufC* tmpFilePath = HBufC::NewLC( m_basepath->Length() + KPrefsTmpFile().Length() ); + HBufC* bakFilePath = HBufC::NewLC( m_basepath->Length() + KPrefsBakFile().Length() ); + HBufC* filePath = HBufC::NewLC( m_basepath->Length() + KPrefsFile().Length() ); + + TPtr fName( tmpFilePath->Des() ); + fName.Append( *m_basepath ); + fName.Append( KPrefsTmpFile ); + + fName.Set( bakFilePath->Des() ); + fName.Append( *m_basepath ); + fName.Append( KPrefsBakFile ); + + fName.Set( filePath->Des() ); + fName.Append( *m_basepath ); + fName.Append( KPrefsFile ); + + RFileWriteStream writeStream; + writeStream.PushL(); + + // Try to create the temp file + if(writeStream.Replace(fs, *tmpFilePath, EFileWrite|EFileShareExclusive) != KErrNone) { + // Make sure the private path exists + fs.CreatePrivatePath( EDriveC ); + + // Try again to create the file + User::LeaveIfError(writeStream.Create(fs, *tmpFilePath, EFileWrite|EFileShareExclusive)); + } - TPtr fName( filePath->Des() ); - fName.Append( *m_basepath ); - fName.Append( KPrefsFile ); + // Try to externalize the data to the stream + TRAPD(err, externalizeL(writeStream)); + + // Close the stream + CleanupStack::PopAndDestroy(); // writeStream + + // If no error at this point then we're guaranteed to have a valid file + if(err!=KErrNone) + { + // Delete the temp file + fs.Delete(*tmpFilePath); + + // And leave with the error code + User::Leave(err); + } + + // Backup any old valid file just in case + fs.Delete(*bakFilePath); + fs.Rename(*filePath, *bakFilePath); + + // Rename the temp file to be the actual settings file + err = fs.Rename(*tmpFilePath, *filePath); + if(err!=KErrNone) + { + // If we had a backup settings file, try to return it + fs.Rename(*bakFilePath, *filePath); + User::Leave(err); + } - RFileWriteStream writeStream; - TInt fileerror = writeStream.Replace( fs, *filePath, EFileWrite ); + // Cleanup + CleanupStack::PopAndDestroy(4); // filePath, bakFilePath, tmpFilePath, fs + +} - if ( fileerror != KErrNone ) { - fs.CreatePrivatePath( EDriveC ); - fileerror = writeStream.Create( fs, *filePath, EFileWrite|EFileShareExclusive ); - } +// ---------------------------------------------------------------------------- +// WidgetPreferences::externalizeL +// +// +// ---------------------------------------------------------------------------- + +void WidgetPreferences::externalizeL(RWriteStream& aStream) const +{ + aStream.WriteInt32L( m_preferences->Count() ); + + TPtrHashMapIter it( *m_preferences ); + const TDesC* key; + const PrefElement* pref; - if ( fileerror == KErrNone ) { - CleanupClosePushL( writeStream ); - writeStream.WriteInt32L( m_preferences->Count() ); - - TPtrHashMapIter it( *m_preferences ); - const TDesC* key; - const PrefElement* pref; + while ( ( key = it.NextKey() ) != 0 ) { + pref = it.CurrentValue(); + aStream.WriteInt32L( key->Length() ); + aStream.WriteL( *key ); + aStream.WriteInt32L( pref->value().Length() ); + aStream.WriteL( pref->value() ); + aStream.WriteInt32L( pref->valueSize() ); + } + aStream.CommitL(); + +} + +// ---------------------------------------------------------------------------- +// WidgetPreferences::internalizeL +// +// +// ---------------------------------------------------------------------------- +void WidgetPreferences::internalizeL(RReadStream& aStream) +{ + TInt count( aStream.ReadInt32L() ); + for( TInt i = 0; i < count; i++ ) { + + TInt len = aStream.ReadInt32L(); + + if ( len > 0 ) { + HBufC* key = HBufC::NewLC( len ); + TPtr ptrkey = key->Des(); + aStream.ReadL( ptrkey, len ); + len = aStream.ReadInt32L(); - while ( ( key = it.NextKey() ) != 0 ) { - pref = it.CurrentValue(); - writeStream.WriteInt32L( key->Length() ); - writeStream.WriteL( *key ); - writeStream.WriteInt32L( pref->value().Length() ); - writeStream.WriteL( pref->value() ); - writeStream.WriteInt32L( pref->valueSize() ); + if ( len <= KMaxKeyValueSize ) { + HBufC* value = HBufC::NewLC( len ); + TPtr ptrvalue = value->Des(); + aStream.ReadL( ptrvalue, len ); + PrefElement* pref = new ( ELeave ) PrefElement; + CleanupStack::PushL( pref ); + pref->setValueL( ptrvalue ); + TInt size = aStream.ReadInt32L(); + pref->setValueSize( size ); + m_preferences->InsertL( key, pref ); + CleanupStack::Pop(); //pref + CleanupStack::PopAndDestroy(); //value + CleanupStack::Pop(); //key } + else { + CleanupStack::PopAndDestroy( key ); + } - writeStream.CommitL(); - CleanupStack::PopAndDestroy(); //writeStream + } + + else { + break; } + } - CleanupStack::PopAndDestroy( 2 ); //fs,filePath - } + } + +// ---------------------------------------------------------------------------- +// WidgetPreferences::deleteAllPrefFiles +// +// +// ---------------------------------------------------------------------------- +void WidgetPreferences::deleteAllPrefFiles(){ + + if ( !m_basepath || (m_basepath->Length() <= 0) ) + return; + + + RFs fs; + // Deleting bkUp and main prefs file. + User::LeaveIfError(fs.Connect()); + CleanupClosePushL( fs ); + + HBufC* bkFilePath = HBufC::NewLC( m_basepath->Length() + KPrefsBakFile().Length() ); + + TPtr fName( bkFilePath->Des() ); + fName.Append( *m_basepath ); + fName.Append( KPrefsBakFile ); + + fs.Delete( *bkFilePath ); + + CleanupStack::PopAndDestroy(); + + HBufC* prefFilePath = HBufC::NewLC( m_basepath->Length() + KPrefsFile().Length() ); + + TPtr fNamePr( prefFilePath->Des() ); + fNamePr.Append( *m_basepath ); + fNamePr.Append( KPrefsFile); + + fs.Delete( *prefFilePath ); + + CleanupStack::PopAndDestroy(2); } @@ -368,61 +517,32 @@ // ---------------------------------------------------------------------------- void WidgetPreferences::loadL() { + if ( !m_basepath || (m_basepath->Length() <= 0) ) + return; + + // Try to connect to file server RFs fs; - if ( !m_basepath || (m_basepath->Length() <= 0) ) - return; - - if ( fs.Connect() == KErrNone ) { - CleanupClosePushL( fs ); - HBufC* filePath = HBufC::NewLC( m_basepath->Length() + KPrefsFile().Length() ); - - TPtr fName( filePath->Des() ); - fName.Append( *m_basepath ); - fName.Append( KPrefsFile ); - - RFileReadStream readStream; - - if ( readStream.Open( fs, *filePath, EFileRead ) == KErrNone ) { - CleanupClosePushL( readStream ); - TInt count( readStream.ReadInt32L() ); - - for( TInt i = 0; i < count; i++ ) { - TInt len = readStream.ReadInt32L(); - - if ( len > 0 ) { - HBufC* key = HBufC::NewLC( len ); - TPtr ptrkey = key->Des(); - readStream.ReadL( ptrkey, len ); - len = readStream.ReadInt32L(); + User::LeaveIfError(fs.Connect()); + CleanupClosePushL( fs ); + + // Form settings file name + HBufC* filePath = HBufC::NewLC( m_basepath->Length() + KPrefsFile().Length() ); + TPtr fName( filePath->Des() ); + fName.Append( *m_basepath ); + fName.Append( KPrefsFile ); - if ( len <= KMaxKeyValueSize ) { - HBufC* value = HBufC::NewLC( len ); - TPtr ptrvalue = value->Des(); - readStream.ReadL( ptrvalue, len ); - PrefElement* pref = new ( ELeave ) PrefElement; - CleanupStack::PushL( pref ); - pref->setValueL( ptrvalue ); - TInt size = readStream.ReadInt32L(); - pref->setValueSize( size ); - m_preferences->InsertL( key, pref ); - CleanupStack::Pop(); //pref - CleanupStack::PopAndDestroy(); //value - CleanupStack::Pop(); //key - } - else { - CleanupStack::PopAndDestroy( key ); - } - } - else { - break; - } - } + // Open stream + RFileReadStream readStream; + readStream.PushL(); + TInt err = readStream.Open( fs, *filePath, EFileRead ); + if(err!=KErrNone) { + User::Leave(err); + } + + // Read the data from the stream + internalizeL(readStream); - CleanupStack::PopAndDestroy(); //readStream - } - - CleanupStack::PopAndDestroy( 2 ); //fs,filePath - } + CleanupStack::PopAndDestroy(3); // readStream, filePath, fs } // ---------------------------------------------------------------------------- @@ -482,3 +602,4 @@ } + diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetengine/src/WidgetEngineBridge.cpp --- a/webengine/widgetengine/src/WidgetEngineBridge.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetengine/src/WidgetEngineBridge.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,6 @@ * */ - - // INCLUDE FILES #include "WidgetEngineBridge.h" #include "WidgetEventHandler.h" @@ -25,7 +23,7 @@ #include #include #include -#include "BrCtlInterface.h" +#include #include "WidgetEngineCallbacks.h" #include "WidgetClient.h" @@ -172,7 +170,11 @@ switch( aParam ) { case TBrCtlDefs::EWidgetBasePath: { m_preferences->setBasePathL(aValue); - m_preferences->loadL(); + TRAPD(err, m_preferences->loadL()); + if(err!=KErrNone) + { + m_preferences->deleteAllPrefFiles(); + } break; } case TBrCtlDefs::EWidgetBundleId: { @@ -321,3 +323,4 @@ //END OF FILE + diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetengine/src/Wrt.cpp --- a/webengine/widgetengine/src/Wrt.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetengine/src/Wrt.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -21,7 +21,7 @@ #include "Wrt.h" #include "WrtPlatform.h" -#include +#include //#include "WrtFuncs.h" // EXTERNAL DATA STRUCTURES diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetengine/src/WrtPlatform.cpp --- a/webengine/widgetengine/src/WrtPlatform.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetengine/src/WrtPlatform.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -20,8 +20,8 @@ // INCLUDE FILES #include "WrtPlatform.h" -#include -#include +#include +#include #include #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetinstaller/Inc/WidgetBackupRegistryXml.h --- a/webengine/widgetinstaller/Inc/WidgetBackupRegistryXml.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetinstaller/Inc/WidgetBackupRegistryXml.h Mon Mar 29 12:27:15 2010 +0100 @@ -1,30 +1,32 @@ /* -* Copyright (c) 2008 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 "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: This file contains the header file of the CWidgetBackupRegistryXml class. +* ============================================================================== +* Name : WidgetRegistryXml.h +* Part of : Widget Registry +* Interface : Widget Registry API +* Description : This file contains the header file of the CWidgetBackupRegistryXml class. * * This class processes persistent registry data in XML. +* Version : %version: % * +* Copyright © 2008 Nokia Corporation. +* This material, including documentation and any related +* computer programs, is protected by copyright controlled by +* Nokia Corporation. All rights are reserved. Copying, +* including reproducing, storing, adapting or translating, any +* or all of this material requires the prior written consent of +* Nokia Corporation. This material also contains confidential +* information which may not be disclosed to others without the +* prior written consent of Nokia Corporation. +* ============================================================================== */ - #ifndef WIDGETBACKUPREGISTRYXML_H #define WIDGETBACKUPREGISTRYXML_H // INCLUDES #include -#include "WidgetRegistryConstants.h" -#include "WidgetPropertyValue.h" +#include +#include class RFs; /** diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetinstaller/Inc/WidgetConfigHandler.h --- a/webengine/widgetinstaller/Inc/WidgetConfigHandler.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetinstaller/Inc/WidgetConfigHandler.h Mon Mar 29 12:27:15 2010 +0100 @@ -21,8 +21,8 @@ // INCLUDES #include -#include -#include +#include +#include // FORWARD DECLARATION diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetinstaller/Inc/WidgetInstaller.h --- a/webengine/widgetinstaller/Inc/WidgetInstaller.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetinstaller/Inc/WidgetInstaller.h Mon Mar 29 12:27:15 2010 +0100 @@ -23,7 +23,7 @@ // INCLUDES #include -#include +#include #ifdef _DEBUG #include #endif diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetinstaller/Src/WidgetBackupRegistryXml.cpp --- a/webengine/widgetinstaller/Src/WidgetBackupRegistryXml.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetinstaller/Src/WidgetBackupRegistryXml.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -1,20 +1,24 @@ -/* -* Copyright (c) 2008 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 "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Processes registry persistent data in XML. -* -*/ +// +// ============================================================================== +// Name : WidgetBackupRegistryXml.cpp +// Part of : WidgetRegistry +// Interface : +// Description : Processes registry persistent data in XML. +// Version : 5.0 +// +// Copyright © 2008 Nokia Corporation. +// This material, including documentation and any related +// computer programs, is protected by copyright controlled by +// Nokia Corporation. All rights are reserved. Copying, +// including reproducing, storing, adapting or translating, any +// or all of this material requires the prior written consent of +// Nokia Corporation. This material also contains confidential +// information which may not be disclosed to others without the +// prior written consent of Nokia Corporation. +// ============================================================================== +/// +// INCLUDE FILES #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetinstaller/Src/WidgetConfigHandler.cpp --- a/webengine/widgetinstaller/Src/WidgetConfigHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetinstaller/Src/WidgetConfigHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -25,7 +25,7 @@ #include "SWInstWidgetUid.h" #include "WidgetInstallerInternalCRKeys.h" #include -#include +#include // DTD diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetinstaller/Src/WidgetInstaller.cpp --- a/webengine/widgetinstaller/Src/WidgetInstaller.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetinstaller/Src/WidgetInstaller.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -28,7 +28,7 @@ #include #include -#include "Browser_platform_variant.hrh" +#include "browser_platform_variant.hrh" #ifdef BRDO_SYMBIAN_LIBXML_FF #include @@ -471,7 +471,7 @@ } break; - case EWidgetPropTypeInt: + case EWidgetPropTypeInt: { TLex toInt( value->Des() ); TInt k; if ( KErrNone != toInt.Val( k ) ) @@ -480,13 +480,15 @@ } if ( propId == EBlanketPermGranted ) backupBlanketPerm = k; - break; + } + break; - case EWidgetPropTypeString: + case EWidgetPropTypeString:{ *(backupPropertyValues[propId]) = *value; - break; + } + break; - case EWidgetPropTypeUid: + case EWidgetPropTypeUid: { TLex toUid( value->Des() ); TInt u; diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetinstaller/Src/WidgetRegistrationManager.cpp --- a/webengine/widgetinstaller/Src/WidgetRegistrationManager.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetinstaller/Src/WidgetRegistrationManager.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -20,8 +20,12 @@ #include "WidgetInstaller.h" #include #include +#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS +#include +//#include // missing +#endif #include -#include +#include // CONSTANTS _LIT(KMBMExt, ".mbm"); diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetinstaller/group/WidgetInstaller.mmp --- a/webengine/widgetinstaller/group/WidgetInstaller.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetinstaller/group/WidgetInstaller.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -25,14 +25,12 @@ #include #include #include -#include - +#include // Capability assignment. CAPABILITY CAP_GENERAL_DLL VENDORID VID_DEFAULT - // Sources SOURCEPATH . SOURCEPATH ../Src @@ -47,8 +45,7 @@ USERINCLUDE . ../Inc/ MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE -MW_LAYER_CONNECT_SYSTEMINCLUDE +OS_LAYER_ESTLIB_SYSTEMINCLUDE // Libraries LIBRARY euser.lib diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetinstaller/group/bld.inf --- a/webengine/widgetinstaller/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetinstaller/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ #include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT GCCE diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetmemoryplugin/data/10282855.rss --- a/webengine/widgetmemoryplugin/data/10282855.rss Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetmemoryplugin/data/10282855.rss Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,7 @@ * */ -#include +#include #include RESOURCE REGISTRY_INFO theInfo @@ -35,4 +35,4 @@ }; } }; -} \ No newline at end of file +} diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetmemoryplugin/group/bld.inf --- a/webengine/widgetmemoryplugin/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetmemoryplugin/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetmemoryplugin/group/widgetmemoryplugin.mmp --- a/webengine/widgetmemoryplugin/group/widgetmemoryplugin.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetmemoryplugin/group/widgetmemoryplugin.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -22,14 +22,14 @@ #include #include #include -#include +#include CAPABILITY CAP_ECOM_PLUGIN VENDORID VID_DEFAULT USERINCLUDE . + MW_LAYER_SYSTEMINCLUDE -MW_LAYER_ECOM_SYSTEMINCLUDE START RESOURCE ../data/10282855.rss TARGET widgetmemoryplugin.rsc @@ -39,5 +39,5 @@ SOURCE widgetmemoryplugin.cpp LIBRARY ECOM.LIB -LIBRARY euser.lib -LIBRARY oommonitor.lib +LIBRARY euser.lib +LIBRARY oommonitor.lib diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetregistry/Client/src/WidgetRegistryClient.cpp --- a/webengine/widgetregistry/Client/src/WidgetRegistryClient.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetregistry/Client/src/WidgetRegistryClient.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -19,8 +19,7 @@ #include #include #include -#include "WidgetRegistryClient.h" - +#include // ============================================================================ // Starts the widget registry server diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetregistry/Rom/WidgetRegistry.iby --- a/webengine/widgetregistry/Rom/WidgetRegistry.iby Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetregistry/Rom/WidgetRegistry.iby Mon Mar 29 12:27:15 2010 +0100 @@ -19,7 +19,11 @@ #ifndef __WIDGETREGISTRY_IBY__ #define __WIDGETREGISTRY_IBY__ -#include +#ifdef __S60_32__ +#include +#else +#include +#endif // app exe S60_APP_EXE(WidgetRegistry) diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetregistry/Server/inc/UidAllocator.h --- a/webengine/widgetregistry/Server/inc/UidAllocator.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetregistry/Server/inc/UidAllocator.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,12 +15,11 @@ * */ - #ifndef UIDALLOCATOR_H #define UIDALLOCATOR_H // INCLUDE FILES -#include "WidgetRegistryConstants.h" +#include /** * This class allows clients to allocate a UID from a given range. @@ -37,4 +36,3 @@ static TBool IsWidget( TUid aUid ); }; #endif - diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetregistry/Server/inc/WidgetEntry.h --- a/webengine/widgetregistry/Server/inc/WidgetEntry.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetregistry/Server/inc/WidgetEntry.h Mon Mar 29 12:27:15 2010 +0100 @@ -17,19 +17,17 @@ * */ - #ifndef WIDGETENTRY_H #define WIDGETENTRY_H // INCLUDES -#include "WidgetPropertyValue.h" +#include #include "WidgetRegistryXml.h" // FORWARD DECLARATIONS class RFileWriteStream; class RFileReadStream; - /** * * This class holds all information related to a widget diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetregistry/Server/inc/WidgetMMCHandler.h --- a/webengine/widgetregistry/Server/inc/WidgetMMCHandler.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetregistry/Server/inc/WidgetMMCHandler.h Mon Mar 29 12:27:15 2010 +0100 @@ -1,21 +1,22 @@ /* -* Copyright (c) 2008 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 "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* ============================================================================ +* Name : WidgetMMCHandler.h +* Part of : Widget Registry +* Description : Acts on MMC card insertion/removal +* Version : 3.1 * -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Acts on MMC card insertion/removal -* +* Copyright © 2008 Nokia Corporation. +* This material, including documentation and any related +* computer programs, is protected by copyright controlled by +* Nokia Corporation. All rights are reserved. Copying, +* including reproducing, storing, adapting or translating, any +* or all of this material requires the prior written consent of +* Nokia Corporation. This material also contains confidential +* information which may not be disclosed to others without the +* prior written consent of Nokia Corporation. +* ============================================================================= */ - #ifndef WIDGETMMCHANDLER_H #define WIDGETMMCHANDLER_H @@ -23,6 +24,7 @@ #include #include #include +#include #include "WidgetRegistryLog.h" // FORWARD DECLARATION @@ -33,7 +35,7 @@ * * @since 3.1 */ -class CWidgetMMCHandler : public CActive +class CWidgetMMCHandler : public CActive, public MApaAppListServObserver { public: @@ -42,6 +44,9 @@ virtual ~CWidgetMMCHandler(); void Start(); + + //from MApaAppListServObserver + void HandleAppListEvent(TInt aEvent); protected: @@ -68,6 +73,10 @@ RFs iFs; TInt iDriveFlags; + + TInt iDeltaDriveFlags; + + CApaAppListNotifier* iApaAppListNotifier; public: diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetregistry/Server/inc/WidgetRegistry.h --- a/webengine/widgetregistry/Server/inc/WidgetRegistry.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetregistry/Server/inc/WidgetRegistry.h Mon Mar 29 12:27:15 2010 +0100 @@ -23,10 +23,10 @@ // INCLUDES #include #include -#include -#include "WidgetRegistryData.h" -#include "WidgetRegistryConstants.h" -#include "WidgetPropertyValue.h" +#include +#include +#include +#include #include "WidgetRegistryLog.h" // CONSTANTS @@ -149,7 +149,7 @@ /** * return serialized value of property aId for the widget aUid or leave */ - CBufFlat* CWidgetRegistry::GetWidgetPropertyValueL( + CBufFlat* GetWidgetPropertyValueL( const TUid& aUid, TWidgetPropertyId aId, TInt aMaxLength ); @@ -200,7 +200,10 @@ * dirty flag is true only in non leave case and some change * needs to be written out */ - void InternalizeL( TBool& aDirtyFlag ); + void InternalizeL( TBool aDoConsistency, + TBool aIgnoreParseError, + TBool& aDirtyFlag, + TInt& aParseError ); /** * Store widget information to a file @@ -211,7 +214,9 @@ * Returns security policyId. */ TInt SecurityPolicyId() { return FetchSecurityPolicyIdL(); } - + + static void NotifyWidgetAltered(); + private: /** @@ -228,6 +233,11 @@ * Get widget entry with a particular UId */ TInt GetWidgetEntry( const TUid& aUid, CWidgetEntry*& aEntry ) const; + + /** + * Get widget entry with a particular UId + */ + TInt GetWidgetOldEntry( const TUid& aUid, CWidgetEntry*& aEntry ) const; /** * Get widget entry with a particular bundle Id @@ -349,6 +359,7 @@ RWidgetArray iEntries; RUidArray iUsedUids; RFs iFs; // not owned + RPointerArray iOldEntries; // Hold the earlier entries from iEntries // added for validation purpose RApaLsSession iAppArch; diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetregistry/Server/inc/WidgetRegistryServer.h --- a/webengine/widgetregistry/Server/inc/WidgetRegistryServer.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetregistry/Server/inc/WidgetRegistryServer.h Mon Mar 29 12:27:15 2010 +0100 @@ -23,7 +23,7 @@ #define WIDGETREGISTRYSERVER_H // INCLUDES -#include +#include // FORWARD DECLARATIONS diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetregistry/Server/inc/WidgetRegistrySession.h --- a/webengine/widgetregistry/Server/inc/WidgetRegistrySession.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetregistry/Server/inc/WidgetRegistrySession.h Mon Mar 29 12:27:15 2010 +0100 @@ -22,7 +22,7 @@ #define WIDGETREGISTRYSESSION_H // INCLUDES -#include "WidgetRegistryData.h" +#include // FORWARD DECLARATIONS diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetregistry/Server/inc/WidgetRegistryXml.h --- a/webengine/widgetregistry/Server/inc/WidgetRegistryXml.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetregistry/Server/inc/WidgetRegistryXml.h Mon Mar 29 12:27:15 2010 +0100 @@ -17,14 +17,13 @@ * */ - #ifndef WIDGETREGISTRYXML_H #define WIDGETREGISTRYXML_H // INCLUDES #include -#include "WidgetRegistryConstants.h" -#include "WidgetPropertyValue.h" +#include +#include class RFs; /** diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetregistry/Server/src/WidgetEntry.cpp --- a/webengine/widgetregistry/Server/src/WidgetEntry.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetregistry/Server/src/WidgetEntry.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ */ #include "WidgetEntry.h" -#include "WidgetRegistryConstants.h" +#include #include #include #include @@ -174,9 +174,10 @@ { User::Leave( KErrCorrupt ); } - + // Read only until the ENokiaWidget for the 3.2 widgets + TInt propertyIdCount = (*this)[EWidgetPropertyListVersion] == KWidgetPropertyListVersion32 ? ENokiaWidget+1 : EWidgetPropertyIdCount; // fill property values array - for ( TInt i = 1; i < EWidgetPropertyIdCount; ++i ) + for ( TInt i = 1; i < propertyIdCount; ++i ) { (*this)[i].DeserializeL( aReadStream ); } diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetregistry/Server/src/WidgetMMCHandler.cpp --- a/webengine/widgetregistry/Server/src/WidgetMMCHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetregistry/Server/src/WidgetMMCHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -1,22 +1,26 @@ -/* -* Copyright (c) 2006 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 "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Handle notifications of MMC events. -* -* -* -*/ +// +// ============================================================================ +// Name : WidgetMMCHandler.cpp +// Part of : SW Installer UIs / WidgetInstallerUI +// +// Description: Handle notifications of MMC events. +// +// +// Version : 3.1 +// +// Copyright © 2006 Nokia Corporation. +// This material, including documentation and any related +// computer programs, is protected by copyright controlled by +// Nokia Corporation. All rights are reserved. Copying, +// including reproducing, storing, adapting or translating, any +// or all of this material requires the prior written consent of +// Nokia Corporation. This material also contains confidential +// information which may not be disclosed to others without the +// prior written consent of Nokia Corporation. +// ============================================================================== +/// +// INCLUDE FILES #include "WidgetMMCHandler.h" #include "WidgetRegistry.h" @@ -76,6 +80,8 @@ { iDriveFlags = 0; } + iDeltaDriveFlags = 0; + iApaAppListNotifier = CApaAppListNotifier::NewL(this,CActive::EPriorityStandard); } // ============================================================================ @@ -113,7 +119,13 @@ LOG_OPEN; LOG1( "MMC notification status %d", iStatus.Int() ); - if ( iStatus == KErrNone ) + TInt status = iStatus.Int(); + + // Request the notification before scanning + iFs.NotifyChange( ENotifyDisk, iStatus ); + SetActive(); + + if ( status == KErrNone ) { TInt driveFlags = 0; TInt deltaDriveFlags = 0; @@ -122,40 +134,13 @@ LOG1( " iDriveFlags 0x%x", iDriveFlags ); LOG1( " driveFlags 0x%x", driveFlags ); deltaDriveFlags = iDriveFlags ^ driveFlags; + iDeltaDriveFlags |= deltaDriveFlags; LOG1( " deltaDriveFlags 0x%x", deltaDriveFlags ); iDriveFlags = driveFlags; } - if ( deltaDriveFlags ) - { - LOG( " mmc start internalize" ); - - LOG( " delay for appArch to sync with card" ); - // delay for appArch to sync with card (if don't wait then - // when query AppArch about installed widgets, it doesn't - // report any on card) - User::After( 8000000 ); // 8 sec in microseconds - - TBool dirtyFlag = EFalse; - TRAPD( error, - iRegistry->InternalizeL( dirtyFlag ) ); - LOG1( " mmc end internalize, error %d", error ); - if ( KErrNone == error ) - { - LOG( " mmc notification internalize completed" ); - // internalize consistency enforcement may have altered - // registry - if ( dirtyFlag ) - { - TRAP_IGNORE( iRegistry->ExternalizeL(); ); - } - } - } } LOG( "MMC notification done" ); LOG_CLOSE; - - iFs.NotifyChange( ENotifyDisk, iStatus ); - SetActive(); } // ============================================================================ @@ -232,3 +217,30 @@ LOG_CLOSE; return error; } + +void CWidgetMMCHandler::HandleAppListEvent(TInt aEvent) + { + TBool dirtyFlag = EFalse; + TInt parseError = KErrNone; + + if ( iDeltaDriveFlags ) + { + // Assume usual case and things are consistent + // and the registry entry file can be parsed and used. + TRAPD( error, iRegistry->InternalizeL( ETrue, + ETrue, + dirtyFlag, + parseError ) ); + if ( KErrNone == error ) + { + // internalize consistency enforcement may have altered registry + if ( dirtyFlag ) + { + TRAP_IGNORE( iRegistry->ExternalizeL(); ); + } + } + iDeltaDriveFlags = 0; + + CWidgetRegistry::NotifyWidgetAltered(); + } + } diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetregistry/Server/src/WidgetRegistry.cpp --- a/webengine/widgetregistry/Server/src/WidgetRegistry.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetregistry/Server/src/WidgetRegistry.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -29,8 +29,8 @@ #include #include #include +#include "WidgetMMCHandler.h" #include -#include "WidgetMMCHandler.h" #include "UidAllocator.h" #if defined( BRDO_WRT_SECURITY_MGR_FF ) #include @@ -134,7 +134,7 @@ // ============================================================================ // -static void NotifyWidgetAltered() +void CWidgetRegistry::NotifyWidgetAltered() { const TUid KMyPropertyCat = { 0x10282E5A }; enum TMyPropertyKeys { EMyPropertyAltered = 110 }; @@ -184,6 +184,7 @@ CWidgetRegistry::~CWidgetRegistry() { iEntries.ResetAndDestroy(); + iOldEntries.ResetAndDestroy(); iUsedUids.Close(); // iFs not owned iAppArch.Close(); @@ -191,7 +192,6 @@ iLangDirList.ResetAndDestroy(); delete iMMCHandler; delete iXmlProcessor; - iFs.Close(); LOG_DESTRUCT; } @@ -220,8 +220,23 @@ // it should be detected and corrected once the resource limit // that caused the leave is removed. TBool dirtyFlag = EFalse; + TInt parseError = KErrNone; iXmlProcessor = CWidgetRegistryXml::NewL(); - TRAP_IGNORE( InternalizeL( dirtyFlag ) ); + // For first attempt assume usual case that things are consistent + // and the registry entry file can be parsed and used. + TRAP_IGNORE( InternalizeL( EFalse, // aDoConsistency, + EFalse, // aIgnoreParseError + dirtyFlag, + parseError ) ); + if ( parseError ) + { + // Special case where we need to do consistency because + // the widget registry entry file is corrupt. + TRAP_IGNORE( InternalizeL( ETrue, // aDoConsistency, + ETrue, // aIgnoreParseError + dirtyFlag, + parseError ) ); + } if ( dirtyFlag ) { // Basically same reason to ignore leaves here. @@ -237,7 +252,6 @@ LOG1( "ConstructL internalize done, registry count %d", iEntries.Count() ); LOG_CLOSE; - iMMCHandler = CWidgetMMCHandler::NewL( *this, iFs ); iMMCHandler->Start(); } @@ -373,6 +387,29 @@ } // ============================================================================ +// CWidgetRegistry::GetWidgetOldEntry() +// Get the widget entry from iOldEntrys array +// +// @since 3.1 +// ============================================================================ +// +TInt CWidgetRegistry::GetWidgetOldEntry( + const TUid& aUid, + CWidgetEntry*& aEntry) const + { + for(TInt i = 0;i < iOldEntries.Count();i++) + { + CWidgetEntry* entry = iOldEntries[i]; + if ( TUid::Uid( (*entry)[EUid] ) == aUid ) + { + aEntry = entry; + return i; + } + } + return -1; + } + +// ============================================================================ // CWidgetRegistry::GetWidgetEntry() // Get the widget entry // @@ -496,7 +533,10 @@ // @since 3.1 // ============================================================================ // -void CWidgetRegistry::InternalizeL( TBool& aDirtyFlag ) +void CWidgetRegistry::InternalizeL( TBool doConsistency, // in param + TBool aIgnoreParseError, // in param + TBool& aDirtyFlag, // out param + TInt& aParseError )// out param { LOG_OPEN; LOG( "Internalize" ); @@ -513,14 +553,23 @@ // internal dirty flag, will be copied to arg dirty flag at // end if no leave occurs TBool dirtyFlag = EFalse; - - // empty the registry - iEntries.ResetAndDestroy(); + + // Copy the entries so we are able to use them later + // iOldEntries owns the data and is responcible to ResetAndDestroy() + for ( TInt i = 0; i < iEntries.Count(); i++ ) + { + iOldEntries.Append( iEntries[i] ); + } + // Only reset here as the iOldEntries owns the data + iEntries.Reset(); iUsedUids.Reset(); CleanupClosePushL( appArchList ); CleanupClosePushL( appArchListFlags ); - TBool doConsistency = AppArchWidgets( appArchList, appArchListFlags ); + if ( doConsistency ) + { + doConsistency = AppArchWidgets( appArchList, appArchListFlags ); + } if ( doConsistency ) { @@ -622,25 +671,31 @@ // that caused the leave is removed. if ( xmlExists ) { - TRAP_IGNORE( InternalizeXmlL( iRegistryXmlFileName, - driveUnit, - doConsistency, - appArchList, - appArchListFlags, - installedListForDrive, - installedListForDriveFlags, - dirtyFlag ) ); + TRAP( aParseError, + InternalizeXmlL( iRegistryXmlFileName, + driveUnit, + doConsistency, + appArchList, + appArchListFlags, + installedListForDrive, + installedListForDriveFlags, + dirtyFlag ) ); } else if ( binaryExists ) { - TRAP_IGNORE( InternalizeBinaryL( iRegistryBinaryFileName, - driveUnit, - doConsistency, - appArchList, - appArchListFlags, - installedListForDrive, - installedListForDriveFlags, - dirtyFlag ) ); + TRAP( aParseError, + InternalizeBinaryL( iRegistryBinaryFileName, + driveUnit, + doConsistency, + appArchList, + appArchListFlags, + installedListForDrive, + installedListForDriveFlags, + dirtyFlag ) ); + } + if ( !aIgnoreParseError && aParseError ) + { + User::Leave( aParseError ); } if ( doConsistency ) @@ -659,6 +714,8 @@ CleanupStack::PopAndDestroy( 2, &appArchList );//appArchListFlags, appArchList aDirtyFlag = dirtyFlag; + // Reset and Destroy entries in iOldEntries array + iOldEntries.ResetAndDestroy(); LOG1( "Internalize done, dirty flag %d", (TInt)dirtyFlag ); LOG_CLOSE; } @@ -689,15 +746,15 @@ readStream.Attach( file ); TInt error = KErrNone; - TInt entryCount = 0; + TInt entryCount = 0,errorCount =0; TRAP( error, entryCount = readStream.ReadInt32L() ); // TODO should limit entryCount to something like 1024 // for each entry in the registry file for ( TInt i = 0 ; i < entryCount; i++ ) { CWidgetEntry* entry = CWidgetEntry::NewL(); - CleanupStack::PushL( entry ); - + // push as delete entry so if we leave it will be handled + CleanupDeletePushL( entry ); // extract one entry TRAP( error, entry->InternalizeBinaryL( readStream ) ); @@ -741,6 +798,12 @@ uidInt, uidInt ); } } + else + { + // Pop and delete the un-needed entry so it is not left behind. + errorCount++; + CleanupStack::PopAndDestroy( entry ); + } } else { @@ -750,6 +813,10 @@ } // for CleanupStack::PopAndDestroy( 2, &file ); // readStream, file + if ( errorCount != 0 ) + { + User::Leave(KErrGeneral); + } } // ============================================================================ @@ -844,7 +911,16 @@ aDirtyFlag ); } if ( NULL != entry ) - { + { + CWidgetEntry* entry1 = NULL; + TInt uid = (*entry)[EUid]; + TInt pos = GetWidgetOldEntry( TUid::Uid( uid ), entry1 ); + if ( pos != -1 ) + { + entry->SetActive((iOldEntries[pos]->ActiveL())); + entry->SetFullView((iOldEntries[pos]->GetFullViewState())); + entry->SetMiniView((iOldEntries[pos]->GetMiniViewState())); + } TRAP( error, InsertL( entry ) ); if ( KErrNone != error ) { @@ -2221,6 +2297,4 @@ } LOG( "AppArchListConsistency done" ); } - - // End of File diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetregistry/Server/src/WidgetRegistryServer.cpp --- a/webengine/widgetregistry/Server/src/WidgetRegistryServer.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetregistry/Server/src/WidgetRegistryServer.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,11 +15,10 @@ * */ - #include #include #include -#include "WidgetRegistryConstants.h" +#include #include "widgetregistryserver.h" #include "widgetregistrysession.h" @@ -127,6 +126,9 @@ TRAP_IGNORE( apparcSession.RegisterNonNativeApplicationTypeL( KUidWidgetLauncher, KLauncherApp())); + + apparcSession.PrepareNonNativeApplicationsUpdatesL(); + apparcSession.ForceCommitNonNativeApplicationsUpdatesL(); apparcSession.Close(); } diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetregistry/Server/src/WidgetRegistrySession.cpp --- a/webengine/widgetregistry/Server/src/WidgetRegistrySession.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetregistry/Server/src/WidgetRegistrySession.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,17 +15,14 @@ * */ - #include // User includes #include "WidgetRegistry.h" -#include "WidgetRegistryConstants.h" +#include #include "widgetregistryserver.h" -#include "WidgetRegistryConstants.h" #include "WidgetRegistrySession.h" - CWidgetRegistry* CWidgetRegistryServerSession::iWidgetRegistry = 0; // ============================================================================ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetregistry/group/BLD.INF --- a/webengine/widgetregistry/group/BLD.INF Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetregistry/group/BLD.INF Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ #include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetregistry/group/WidgetRegistryClient.mmp --- a/webengine/widgetregistry/group/WidgetRegistryClient.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetregistry/group/WidgetRegistryClient.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -24,7 +24,7 @@ #include #include #include -#include +#include CAPABILITY CAP_CLIENT_DLL VENDORID VID_DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetregistry/group/WidgetRegistryServer.mmp --- a/webengine/widgetregistry/group/WidgetRegistryServer.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetregistry/group/WidgetRegistryServer.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -17,18 +17,20 @@ * */ - TARGET WidgetRegistry.exe TARGETTYPE EXE UID 0x1000008d 0x10282F06 EPOCSTACKSIZE 0x5000 + +#ifndef WINS EPOCHEAPSIZE 0x5000 0x1000000 +#endif #include #include #include -#include +#include VENDORID VID_DEFAULT CAPABILITY CAP_SERVER AllFiles @@ -46,8 +48,9 @@ USERINCLUDE ../Server/inc USERINCLUDE ../Common/inc USERINCLUDE ../../../inc + MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE +OS_LAYER_ESTLIB_SYSTEMINCLUDE LIBRARY euser.lib LIBRARY efsrv.lib diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/widgetregistry/tsrc/public/basic/inc/WidgetRegistrySTIF.h --- a/webengine/widgetregistry/tsrc/public/basic/inc/WidgetRegistrySTIF.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/widgetregistry/tsrc/public/basic/inc/WidgetRegistrySTIF.h Mon Mar 29 12:27:15 2010 +0100 @@ -21,7 +21,7 @@ #define WIDGETREGISTRYSTIF_H // INCLUDES -#include +#include #include #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/BLD.INF --- a/webengine/wmlengine/group/BLD.INF Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/BLD.INF Mon Mar 29 12:27:15 2010 +0100 @@ -15,9 +15,8 @@ * */ - #include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/Msg/Msg.mmp --- a/webengine/wmlengine/group/Msg/Msg.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/Msg/Msg.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,7 @@ * */ -#include -#include +#include "../webkitcommon.mmpi" TARGET Msg.lib TARGETTYPE lib @@ -27,12 +26,3 @@ SOURCE Message.cpp SOURCE MessageDispatcher.cpp - -USERINCLUDE . -USERINCLUDE ../../src/Msg/include -USERINCLUDE ../../src/Object/include -USERINCLUDE ../../src/Hed/include - -SYSTEMINCLUDE ../../src/utils/include -MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/Msg/bld.inf --- a/webengine/wmlengine/group/Msg/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/Msg/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ #include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/Plugin.mmp --- a/webengine/wmlengine/group/Plugin.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/Plugin.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ #include -#include +#include TARGET Plugin.lib TARGETTYPE lib @@ -38,12 +38,7 @@ USERINCLUDE ../ResourceLoader/Inc USERINCLUDE ../PageScaler/Inc USERINCLUDE ../../WEBCORE/bridge - -SYSTEMINCLUDE ../../MemoryManager/Inc -MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE +// USERINCLUDE ../../MemoryManager/Inc - - - - +MW_LAYER_SYSTEMINCLUDE +OS_LAYER_ESTLIB_SYSTEMINCLUDE diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/Unicode/Unicode.mmp --- a/webengine/wmlengine/group/Unicode/Unicode.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/Unicode/Unicode.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,7 @@ * */ -#include -#include +#include "../webkitcommon.mmpi" TARGET unicode.lib TARGETTYPE lib @@ -62,23 +61,3 @@ SOURCE NW_Unicode_SymbolMath.c SOURCE NW_Unicode_SymbolModifier.c SOURCE NW_Unicode_SymbolOther.c - -USERINCLUDE . -USERINCLUDE ../../src/adt/include -USERINCLUDE ../../src/evt/include -USERINCLUDE ../../src/fbox/include -USERINCLUDE ../../src/gdi/include -USERINCLUDE ../../src/hed/include -USERINCLUDE ../../src/image/include -USERINCLUDE ../../src/lmgr/include -USERINCLUDE ../../src/object/include -USERINCLUDE ../../src/text/include -USERINCLUDE ../../src/Unicode/include -USERINCLUDE ../../src/utils/include -USERINCLUDE ../../src/wml/src -USERINCLUDE ../../src/wml/include -SYSTEMINCLUDE ../../src/urlloader/include -SYSTEMINCLUDE ../../src/utils/include -SYSTEMINCLUDE ../../src/utils/src -MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/Unicode/bld.inf --- a/webengine/wmlengine/group/Unicode/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/Unicode/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ #include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/adt/adt.mmp --- a/webengine/wmlengine/group/adt/adt.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/adt/adt.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,7 @@ * */ -#include -#include +#include "../webkitcommon.mmpi" TARGET adt.lib TARGETTYPE lib @@ -46,15 +45,3 @@ SOURCE ValueList.c SOURCE Vector.c SOURCE VectorIterator.c - -USERINCLUDE . -USERINCLUDE ../../src/adt/include -USERINCLUDE ../../src/htmlp/include -USERINCLUDE ../../src/object/include -USERINCLUDE ../../src/text/include -USERINCLUDE ../../src/urlloader/include -USERINCLUDE ../../src/utils/include - -MW_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE ../../src/utils/include -MW_LAYER_LIBC_SYSTEMINCLUDE diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/adt/bld.inf --- a/webengine/wmlengine/group/adt/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/adt/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ #include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/browser/bld.inf --- a/webengine/wmlengine/group/browser/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/browser/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ #include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/browser/browser.mmp --- a/webengine/wmlengine/group/browser/browser.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/browser/browser.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,7 @@ * */ -#include -#include +#include "../webkitcommon.mmpi" TARGET RbBrowser.lib TARGETTYPE lib @@ -29,39 +28,7 @@ SOURCEPATH ../../src/browser/src/ - //SOURCE Epoc32BrowserMimeTable.c SOURCE xhtml_1_0_dict.c SOURCE wml_1_3_dict.c - - - -USERINCLUDE ../../src/adt/include -USERINCLUDE ../../src/css/include -USERINCLUDE ../../src/evt/include -USERINCLUDE ../../src/fbox/include -USERINCLUDE ../../src/gdi/include -USERINCLUDE ../../src/hed/include -USERINCLUDE ../../src/image/include -USERINCLUDE ../../src/imagech/include -USERINCLUDE ../../src/lmgr/include -USERINCLUDE ../../src/markup/include -USERINCLUDE ../../src/Msg/include -USERINCLUDE ../../src/mvc/include -USERINCLUDE ../../src/object/include -USERINCLUDE ../../src/text/include -USERINCLUDE ../../src/system/include -USERINCLUDE ../../src/wml1x/include -USERINCLUDE ../../src/browser/include -USERINCLUDE ../../src/wmlscriptch/include -USERINCLUDE ../../src/xhtml/include -USERINCLUDE ../../src/wml/src - - -MW_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE ../../src/wml/include -SYSTEMINCLUDE ../../src/utils/include -MW_LAYER_LIBC_SYSTEMINCLUDE - - diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/css/bld.inf --- a/webengine/wmlengine/group/css/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/css/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ #include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/css/css.mmp --- a/webengine/wmlengine/group/css/css.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/css/css.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,7 @@ * */ -#include -#include +#include "../webkitcommon.mmpi" TARGET css.lib TARGETTYPE lib @@ -29,7 +28,6 @@ SOURCEPATH ../../src/css/src - #ifdef _DEBUG #define _BROWSER_ENG_DEBUG #endif @@ -49,32 +47,3 @@ SOURCE CSSHandler.cpp SOURCE CSSVariableStyleSheet.cpp -#include "../webkitcommon.mmpi" - -USERINCLUDE . -USERINCLUDE ../../src/adt/include -USERINCLUDE ../../src/css/include -USERINCLUDE ../../src/htmlp/include -USERINCLUDE ../../src/evt/include -USERINCLUDE ../../src/gdi/include -USERINCLUDE ../../src/hed/include -USERINCLUDE ../../src/markup/include -USERINCLUDE ../../src/fbox/include -USERINCLUDE ../../src/image/include -USERINCLUDE ../../src/lmgr/include -USERINCLUDE ../../src/object/include -USERINCLUDE ../../src/system/include -USERINCLUDE ../../src/text/include -USERINCLUDE ../../src/xhtml/include -USERINCLUDE ../../src/wml/src -USERINCLUDE ../../src/wml/include -USERINCLUDE ../../src/imagech/include -USERINCLUDE ../../src/mvc/include -USERINCLUDE ../../src/msg/include -USERINCLUDE ../../src/wmlcontrol/include - -MW_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE ../../src/urlloader/include -SYSTEMINCLUDE ../../src/utils/include -SYSTEMINCLUDE ../../../osswebengine/MemoryManager/Inc -MW_LAYER_LIBC_SYSTEMINCLUDE diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/evt/bld.inf --- a/webengine/wmlengine/group/evt/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/evt/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ #include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/evt/evt.mmp --- a/webengine/wmlengine/group/evt/evt.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/evt/evt.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,7 @@ * */ -#include -#include +#include "../webkitcommon.mmpi" TARGET evt.lib TARGETTYPE lib @@ -43,10 +42,3 @@ SOURCE UnicodeKeyEvent.c SOURCE OpenViewerEvent.c -USERINCLUDE ../../src/evt/include -USERINCLUDE ../../src/object/include -USERINCLUDE ../../src/gdi/include -USERINCLUDE ../../src/utils/include - -MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/fbox/bld.inf --- a/webengine/wmlengine/group/fbox/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/fbox/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ #include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/fbox/fbox.mmp --- a/webengine/wmlengine/group/fbox/fbox.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/fbox/fbox.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,7 @@ * */ -#include -#include +#include "../webkitcommon.mmpi" TARGET fbox.lib TARGETTYPE lib @@ -35,8 +34,6 @@ LANGUAGE_IDS #endif -#include "../webkitcommon.mmpi" - SOURCE FBOXButtonBox.cpp SOURCE FBOXButtonBoxSkin.cpp SOURCE FBOXCheckBox.cpp @@ -79,36 +76,3 @@ SOURCE Epoc32SelectSkin.cpp SOURCE FBOXCEpoc32InputBox.cpp SOURCE FBOXEpoc32InlineCheckBoxSkin.cpp - - -USERINCLUDE . -USERINCLUDE ../../src/adt/include -USERINCLUDE ../../src/evt/include -USERINCLUDE ../../src/fbox/include -USERINCLUDE ../../src/gdi/include -USERINCLUDE ../../src/hed/include -USERINCLUDE ../../src/image/include -USERINCLUDE ../../src/ImageCH/include -USERINCLUDE ../../src/lmgr/include -USERINCLUDE ../../src/msg/include -USERINCLUDE ../../src/mvc/include -USERINCLUDE ../../src/object/include -USERINCLUDE ../../src/system/include -USERINCLUDE ../../src/text/include -USERINCLUDE ../../src/Unicode/include -USERINCLUDE ../../src/urlloader/include -USERINCLUDE ../../src/fileloader/include -USERINCLUDE ../../src/utils/include -USERINCLUDE ../../src/wml/src -USERINCLUDE ../../src/wml/include -USERINCLUDE ../../src/wml1x/include -USERINCLUDE ../../src/wmlscriptch/include -USERINCLUDE ../../src/markup/include -USERINCLUDE ../../src/wmlcontrol/include - -MW_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE ../../src/browser/include -SYSTEMINCLUDE ../../src/urlloader/include -SYSTEMINCLUDE ../../src/utils/include -SYSTEMINCLUDE ../../../osswebengine/MemoryManager/Inc -MW_LAYER_LIBC_SYSTEMINCLUDE diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/fileloader/bld.inf --- a/webengine/wmlengine/group/fileloader/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/fileloader/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ #include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/fileloader/fileloader.mmp --- a/webengine/wmlengine/group/fileloader/fileloader.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/fileloader/fileloader.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,7 @@ * */ -#include -#include +#include "../webkitcommon.mmpi" TARGET fileloader.lib TARGETTYPE lib @@ -24,22 +23,7 @@ CAPABILITY CAP_GENERAL_DLL VENDORID VID_DEFAULT - SOURCEPATH ../../src/fileloader/src SOURCE fileloader_cfileloader.cpp SOURCE fileloader_cfilehandler.cpp SOURCE fileloader_csaveddeckhandler.cpp - -USERINCLUDE ../../src/urlloader/include -USERINCLUDE ../../src/fileloader/include -USERINCLUDE ../../src/utils/include - - -MW_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE ../../src/utils/include -MW_LAYER_LIBC_SYSTEMINCLUDE - - - - - diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/gdi/bld.inf --- a/webengine/wmlengine/group/gdi/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/gdi/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ #include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/gdi/gdi.mmp --- a/webengine/wmlengine/group/gdi/gdi.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/gdi/gdi.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,7 @@ * */ -#include -#include +#include "../webkitcommon.mmpi" TARGET RbGdi.lib TARGETTYPE lib @@ -26,37 +25,9 @@ MACRO NOKIA_MOBILE_BROWSER #define NOKIA_MOBILE_BROWSER 1 -#include "../webkitcommon.mmpi" SOURCEPATH ../../src/gdi/src SOURCE GDIDeviceContext.cpp SOURCE GDIFont.cpp SOURCE Utils.c - -USERINCLUDE . -USERINCLUDE ../../src/gdi/include -USERINCLUDE ../../src/htmlp/include -USERINCLUDE ../../src/mvc/include -USERINCLUDE ../../src/object/include -USERINCLUDE ../../src/system/include -USERINCLUDE ../../src/text/include -USERINCLUDE ../../src/browser/include -USERINCLUDE ../../src/hed/include -USERINCLUDE ../../src/evt/include -USERINCLUDE ../../src/lmgr/include -USERINCLUDE ../../src/image/include -USERINCLUDE ../../src/adt/include -USERINCLUDE ../../src/wml/include -USERINCLUDE ../../src/wml/src -USERINCLUDE ../../src/wmlcontrol/include -USERINCLUDE ../../../OssWebengine/MemoryManager/Inc -USERINCLUDE ../../../PageScaler/Inc -SYSTEMINCLUDE ../../src/urlloader/include -SYSTEMINCLUDE ../../src/utils/include - - - - -MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/hed/bld.inf --- a/webengine/wmlengine/group/hed/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/hed/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ #include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/hed/hed.mmp --- a/webengine/wmlengine/group/hed/hed.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/hed/hed.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,7 @@ * */ -#include -#include +#include "../webkitcommon.mmpi" MACRO NOKIA_MOBILE_BROWSER #define NOKIA_MOBILE_BROWSER 1 @@ -25,7 +24,6 @@ TARGETTYPE lib SOURCEPATH ../../src/hed/src/ - SOURCE ChildIterator.c SOURCE HEDCompositeContentHandler.cpp SOURCE HEDCompositeNode.cpp @@ -53,41 +51,6 @@ SOURCE UrlRequest.c SOURCE UrlResponse.c - SOURCE ContentLoader.cpp SOURCE TextReverse.cpp SOURCE urlloader_urlresponse.cpp - -#include "../webkitcommon.mmpi" - -USERINCLUDE . -USERINCLUDE ../../src/utils/include -USERINCLUDE ../../src/adt/include -USERINCLUDE ../../src/evt/include -USERINCLUDE ../../src/htmlp/include -USERINCLUDE ../../src/gdi/include -USERINCLUDE ../../src/hed/include -USERINCLUDE ../../src/msg/include -USERINCLUDE ../../src/markup/include -USERINCLUDE ../../src/image/include -USERINCLUDE ../../src/imagech/include -USERINCLUDE ../../src/lmgr/include -USERINCLUDE ../../src/object/include -USERINCLUDE ../../src/system/include -USERINCLUDE ../../src/text/include -USERINCLUDE ../../src/MVC/include -USERINCLUDE ../../src/wml1x/include -USERINCLUDE ../../src/wmlscriptch/include -USERINCLUDE ../../src/fbox/include -USERINCLUDE ../../src/wml/src -USERINCLUDE ../../src/wml/include -USERINCLUDE ../../src/wmlcontrol/include - -SYSTEMINCLUDE ../../src/utils/include -SYSTEMINCLUDE ../../src/urlloader/include -SYSTEMINCLUDE ../../../osswebengine/MemoryManager/Inc - - -MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE - diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/htmlp/bld.inf --- a/webengine/wmlengine/group/htmlp/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/htmlp/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ #include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/htmlp/htmlp.mmp --- a/webengine/wmlengine/group/htmlp/htmlp.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/htmlp/htmlp.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,7 @@ * */ -#include -#include +#include "../webkitcommon.mmpi" TARGET htmlp.lib TARGETTYPE lib @@ -34,10 +33,3 @@ SOURCE htmlp_lexer.c SOURCE CHtmlpParser.cpp SOURCE htmlp_to_wbxml.cpp - -USERINCLUDE ../../src/htmlp/include - -MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE -SYSTEMINCLUDE ../../src/urlloader/include -SYSTEMINCLUDE ../../src/utils/include diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/image/bld.inf --- a/webengine/wmlengine/group/image/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/image/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ #include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/image/image.mmp --- a/webengine/wmlengine/group/image/image.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/image/image.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -15,9 +15,7 @@ * */ -#include -#include -#include +#include "../webkitcommon.mmpi" TARGET image.lib TARGETTYPE lib @@ -78,36 +76,4 @@ SOURCE Epoc32SimpleImage.cpp SOURCE IMAGEVirtualImage.cpp SOURCE Epoc32ImageDecoder.cpp - SOURCE nw_image_iimageobserver.cpp - -#include "../webkitcommon.mmpi" - -USERINCLUDE . -USERINCLUDE ../../src/adt/include -USERINCLUDE ../../src/evt/include -USERINCLUDE ../../src/gdi/include -USERINCLUDE ../../src/hed/include -USERINCLUDE ../../src/htmlp/include -USERINCLUDE ../../src/markup/include -USERINCLUDE ../../src/image/include -USERINCLUDE ../../src/imagech/include -USERINCLUDE ../../src/lmgr/include -USERINCLUDE ../../src/fbox/include -USERINCLUDE ../../src/object/include -USERINCLUDE ../../src/system/include -USERINCLUDE ../../src/text/include -USERINCLUDE ../../src/wml/src -USERINCLUDE ../../src/wml/include -USERINCLUDE ../../src/mvc/include -USERINCLUDE ../../src/msg/include -USERINCLUDE ../../src/wmlcontrol/include - - -MW_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE ../../src/browser/include -SYSTEMINCLUDE ../../src/urlloader/include -SYSTEMINCLUDE ../../src/utils/include -SYSTEMINCLUDE ../../../osswebengine/MemoryManager/Inc -MW_LAYER_LIBC_SYSTEMINCLUDE - diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/imagech/bld.inf --- a/webengine/wmlengine/group/imagech/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/imagech/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ #include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/imagech/imagech.mmp --- a/webengine/wmlengine/group/imagech/imagech.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/imagech/imagech.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,7 @@ * */ -#include -#include +#include "../webkitcommon.mmpi" TARGET imagech.lib TARGETTYPE lib @@ -30,31 +29,3 @@ #define NOKIA_MOBILE_BROWSER 1 SOURCE Epoc32ImageContentHandler.cpp - -#include "../webkitcommon.mmpi" - -USERINCLUDE ../../src/adt/include -USERINCLUDE ../../src/evt/include -USERINCLUDE ../../src/gdi/include -USERINCLUDE ../../src/hed/include -USERINCLUDE ../../src/htmlp/include -USERINCLUDE ../../src/markup/include -USERINCLUDE ../../src/image/include -USERINCLUDE ../../src/imagech/include -USERINCLUDE ../../src/lmgr/include -USERINCLUDE ../../src/object/include -USERINCLUDE ../../src/system/include -USERINCLUDE ../../src/text/include -USERINCLUDE ../../src/fbox/include -USERINCLUDE ../../src/wml1x/include -USERINCLUDE ../../src/wmlscriptch/include -USERINCLUDE ../../src/browser/include -USERINCLUDE ../../src/wml/src -USERINCLUDE ../../src/wml/include -USERINCLUDE ../../src/mvc/include -USERINCLUDE ../../src/msg/include - -SYSTEMINCLUDE ../../src/urlloader/include -SYSTEMINCLUDE ../../src/utils/include -MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/lmgr/bld.inf --- a/webengine/wmlengine/group/lmgr/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/lmgr/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ #include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/lmgr/lmgr.mmp --- a/webengine/wmlengine/group/lmgr/lmgr.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/lmgr/lmgr.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,7 @@ * */ -#include -#include +#include "../webkitcommon.mmpi" TARGET lmgr.lib TARGETTYPE lib @@ -30,7 +29,6 @@ SOURCEPATH ../../src/lmgr/src/ - SOURCE LMgrAbstractTextBox.cpp SOURCE LMgrAccessKey.cpp SOURCE Action.c @@ -85,30 +83,3 @@ SOURCE LMgrAnonBlock.cpp SOURCE LMgrAnonTableBox.cpp SOURCE LMgrPosFlowBox.cpp - -#include "../webkitcommon.mmpi" - -USERINCLUDE . -USERINCLUDE ../../src/adt/include -USERINCLUDE ../../src/evt/include -USERINCLUDE ../../src/fbox/include -USERINCLUDE ../../src/gdi/include -USERINCLUDE ../../src/hed/include -USERINCLUDE ../../src/htmlp/include -USERINCLUDE ../../src/image/include -USERINCLUDE ../../src/lmgr/include -USERINCLUDE ../../src/object/include -USERINCLUDE ../../src/system/include -USERINCLUDE ../../src/text/include -USERINCLUDE ../../src/wml/src -USERINCLUDE ../../src/wml/include -USERINCLUDE ../../src/css/include -USERINCLUDE ../../src/markup/include -USERINCLUDE ../../src/mvc/include -USERINCLUDE ../../src/msg/include -USERINCLUDE ../../src/utils/include - -SYSTEMINCLUDE ../../src/utils/include -SYSTEMINCLUDE ../../src/urlloader/include -MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/markup/bld.inf --- a/webengine/wmlengine/group/markup/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/markup/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ #include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/markup/markup.mmp --- a/webengine/wmlengine/group/markup/markup.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/markup/markup.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,7 @@ * */ -#include -#include +#include "../webkitcommon.mmpi" TARGET markup.lib TARGETTYPE lib @@ -36,32 +35,3 @@ SOURCE MARKUPXMLModule.cpp SOURCE MARKUPNumberCollector.cpp SOURCE MARKUPImageViewer.cpp - -#include "../webkitcommon.mmpi" - -USERINCLUDE ../../src/adt/include -USERINCLUDE ../../src/Evt/include -USERINCLUDE ../../src/htmlp/include -USERINCLUDE ../../src/fbox/include -USERINCLUDE ../../src/gdi/include -USERINCLUDE ../../src/hed/include -USERINCLUDE ../../src/imageCH/include -USERINCLUDE ../../src/image/include -USERINCLUDE ../../src/lmgr/include -USERINCLUDE ../../src/markup/include -USERINCLUDE ../../src/object/include -USERINCLUDE ../../src/scrolling/inc -USERINCLUDE ../../src/system/include -USERINCLUDE ../../src/text/include -USERINCLUDE ../../src/wmlscriptch/include -USERINCLUDE ../../src/wml/src -USERINCLUDE ../../src/wml/include -USERINCLUDE ../../src/mvc/include -USERINCLUDE ../../src/msg/include - - -SYSTEMINCLUDE ../../src/urlloader/include -SYSTEMINCLUDE ../../src/utils/include -MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE - diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/object/bld.inf --- a/webengine/wmlengine/group/object/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/object/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ #include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/object/object.mmp --- a/webengine/wmlengine/group/object/object.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/object/object.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,7 @@ * */ -#include -#include +#include "../webkitcommon.mmpi" TARGET object.lib TARGETTYPE lib @@ -35,9 +34,3 @@ SOURCE Object.c SOURCE Secondary.c SOURCE Shared.c - -USERINCLUDE . -USERINCLUDE ../../src/object/include -SYSTEMINCLUDE ../../src/utils/include -MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/script/bld.inf --- a/webengine/wmlengine/group/script/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/script/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ #include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/script/script.mmp --- a/webengine/wmlengine/group/script/script.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/script/script.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,7 @@ * */ -#include -#include +#include "../webkitcommon.mmpi" TARGET script.lib TARGETTYPE lib @@ -53,18 +52,3 @@ SOURCE scr_valexpr.c SOURCE scr_wta.c SOURCE scr_crypto.c - -USERINCLUDE ../../src/script/src -USERINCLUDE ../../src/urlloader/include -USERINCLUDE ../../src/utils/include -USERINCLUDE ../../src/wml/include -SYSTEMINCLUDE ../../src/script/include -SYSTEMINCLUDE ../../src/utils/src -MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE -SYSTEMINCLUDE ../../src/utils/include - - - - - diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/system/bld.inf --- a/webengine/wmlengine/group/system/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/system/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ #include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/system/system.mmp --- a/webengine/wmlengine/group/system/system.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/system/system.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -15,39 +15,16 @@ * */ -#include -#include +#include "../webkitcommon.mmpi" TARGET System.lib TARGETTYPE lib SOURCEPATH ../../src/system/src/ CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT +VENDORID VID_DEFAULT SOURCE Timer.c SOURCE Epoc32Timer.cpp SOURCE CEpoc32Timer.cpp SOURCE Epoc32OptionList.cpp - -#include "../webkitcommon.mmpi" - -USERINCLUDE . -USERINCLUDE ../../src/Object/include -USERINCLUDE ../../src/mvc/include -USERINCLUDE ../../src/system/include -USERINCLUDE ../../src/utils/include -USERINCLUDE ../../src/hed/include -USERINCLUDE ../../src/msg/include -USERINCLUDE ../../src/wml/include -USERINCLUDE ../../src/markup/include -USERINCLUDE ../../src/wmlcontrol/include - - - -SYSTEMINCLUDE ../../src/utils/include -SYSTEMINCLUDE ../../src/utils/src -SYSTEMINCLUDE ../../../osswebengine/MemoryManager/Inc -MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE - diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/text/bld.inf --- a/webengine/wmlengine/group/text/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/text/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ #include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/text/text.mmp --- a/webengine/wmlengine/group/text/text.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/text/text.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,7 @@ * */ -#include -#include +#include "../webkitcommon.mmpi" TARGET text.lib TARGETTYPE lib @@ -39,16 +38,3 @@ SOURCE FixedWidthIterator.c SOURCE Text_Iterator.c SOURCE VariableWidthIterator.c - - -USERINCLUDE . -USERINCLUDE ../../src/adt/include -USERINCLUDE ../../src/htmlp/include -USERINCLUDE ../../src/object/include -USERINCLUDE ../../src/text/include - -SYSTEMINCLUDE ../../src/urlloader/include -SYSTEMINCLUDE ../../src/utils/include -SYSTEMINCLUDE ../../src/utils/src -MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/unknownch.mmp --- a/webengine/wmlengine/group/unknownch.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/unknownch.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ #include -#include +#include TARGET unknownch.lib TARGETTYPE lib @@ -40,11 +40,9 @@ USERINCLUDE ../src/evt/include USERINCLUDE ../src/object/include USERINCLUDE ../src/markup/include +USERINCLUDE ../src/urlloader/include +USERINCLUDE ../src/utils/include +USERINCLUDE ../src/wml/include +USERINCLUDE ../src/wml/src -SYSTEMINCLUDE ../src/urlloader/include -SYSTEMINCLUDE ../src/utils/include -SYSTEMINCLUDE ../src/wml/include -SYSTEMINCLUDE ../src/wml/src MW_LAYER_SYSTEMINCLUDE - - diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/urlloader/bld.inf --- a/webengine/wmlengine/group/urlloader/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/urlloader/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ #include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/urlloader/urlloader.mmp --- a/webengine/wmlengine/group/urlloader/urlloader.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/urlloader/urlloader.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -15,9 +15,7 @@ * */ - -#include -#include +#include "../webkitcommon.mmpi" TARGET urlloader.lib TARGETTYPE lib @@ -28,36 +26,9 @@ MACRO NOKIA_MOBILE_BROWSER #define NOKIA_MOBILE_BROWSER - SOURCEPATH ../../src/urlloader/src SOURCE urlloader_urlloaderint.cpp SOURCE urlloader_curlloader.cpp SOURCE urlloader_loaderutils.cpp SOURCE urlloader_urlresponse.cpp SOURCE nwx_http_content_type_strings.c - -#include "../webkitcommon.mmpi" - -//USERINCLUDE ../../src/httploader/include -//USERINCLUDE ../../src/httploader/src -USERINCLUDE ../../src/fileloader/include -USERINCLUDE ../../src/urlloader/include -USERINCLUDE ../../src/wml/src -USERINCLUDE ../../src/wml/include -USERINCLUDE ../../src/mvc/include -USERINCLUDE ../../src/utils/include -USERINCLUDE ../../src/wmlcontrol/include - - -SYSTEMINCLUDE ../../src/urlloader/include -SYSTEMINCLUDE ../../src/utils/include -SYSTEMINCLUDE ../../../osswebengine/MemoryManager/Inc -MW_LAYER_LIBC_SYSTEMINCLUDE -MW_LAYER_SYSTEMINCLUDE -MW_LAYER_HTTP_SYSTEMINCLUDE -MW_LAYER_ECOM_SYSTEMINCLUDE - - - - - diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/webkitcommon.mmpi --- a/webengine/wmlengine/group/webkitcommon.mmpi Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/webkitcommon.mmpi Mon Mar 29 12:27:15 2010 +0100 @@ -14,17 +14,9 @@ * Description: * */ -//USERINCLUDE ../../BrowserView/inc -//USERINCLUDE ../../BrowserControl/inc -//USERINCLUDE ../../BrowserCore/Misc/inc -// -//USERINCLUDE ../../../WEBCORE/bridge/symbian -//USERINCLUDE ../../ResourceLoader/inc -//USERINCLUDE ../../HistoryProvider/inc -//USERINCLUDE ../../BrowserCore/ScrollBars/inc - -//SYSTEMINCLUDE ../../MemoryManager/Inc - +#include +#include +#include USERINCLUDE ../../pagescaler/inc USERINCLUDE ../../webkitutils/HistoryProvider @@ -38,3 +30,36 @@ USERINCLUDE ../../osswebengine/WEBCORE/loader USERINCLUDE ../../osswebengine/JavaScriptCore + +USERINCLUDE ../src/adt/include +USERINCLUDE ../src/browser/include +USERINCLUDE ../src/css/include +USERINCLUDE ../src/evt/include +USERINCLUDE ../src/fbox/include +USERINCLUDE ../src/fileloader/include +USERINCLUDE ../src/gdi/include +USERINCLUDE ../src/hed/include +USERINCLUDE ../src/htmlp/include +USERINCLUDE ../src/image/include +USERINCLUDE ../src/imagech/include +USERINCLUDE ../src/lmgr/include +USERINCLUDE ../src/markup/include +USERINCLUDE ../src/msg/include +USERINCLUDE ../src/mvc/include +USERINCLUDE ../src/object/include +USERINCLUDE ../src/script/include +USERINCLUDE ../src/scrolling/inc +USERINCLUDE ../src/system/include +USERINCLUDE ../src/text/include +USERINCLUDE ../src/unicode/include +USERINCLUDE ../src/urlloader/include +USERINCLUDE ../src/utils/include +USERINCLUDE ../src/wml/include +USERINCLUDE ../src/wml1x/include +USERINCLUDE ../src/wmlcontrol/include +USERINCLUDE ../src/wmlscriptch/include +USERINCLUDE ../src/xhtml/include +// USERINCLUDE ../../../osswebengine/MemoryManager/Inc + +MW_LAYER_SYSTEMINCLUDE +OS_LAYER_ESTLIB_SYSTEMINCLUDE diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/wml/bld.inf --- a/webengine/wmlengine/group/wml/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/wml/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ #include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/wml/wml.mmp --- a/webengine/wmlengine/group/wml/wml.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/wml/wml.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,7 @@ * */ -#include -#include +#include "../webkitcommon.mmpi" TARGET wml.lib TARGETTYPE lib @@ -29,7 +28,6 @@ SOURCEPATH ../../src/wml/src - SOURCE nw_evlog_api.c SOURCE wml_bind.c SOURCE wml_core.c @@ -57,39 +55,3 @@ SOURCE wml_var.c SOURCE WMLWae.cpp SOURCE wml_wae_reader.c - -#include "../webkitcommon.mmpi" - -USERINCLUDE ../../src/wml/src -USERINCLUDE ../../src/Wml/include -USERINCLUDE ../../src/urlloader/include -USERINCLUDE ../../src/script/include -USERINCLUDE ../../src/utils/include -USERINCLUDE ../../src/image/include -USERINCLUDE ../../src/adt/include -USERINCLUDE ../../src/mvc/include -USERINCLUDE ../../src/htmlp/include -USERINCLUDE ../../src/evt/include -USERINCLUDE ../../src/fbox/include -USERINCLUDE ../../src/gdi/include - -USERINCLUDE ../../src/hed/include -USERINCLUDE ../../src/lmgr/include -USERINCLUDE ../../src/markup/include -USERINCLUDE ../../src/msg/include -USERINCLUDE ../../src/object/include -USERINCLUDE ../../src/system/include -USERINCLUDE ../../src/text/include -USERINCLUDE ../../src/Unicode/include -USERINCLUDE ../../src/wml1x/include -USERINCLUDE ../../src/wmlscriptch/include -USERINCLUDE ../../src/wmlcontrol/include - - -SYSTEMINCLUDE ../../src/utils/include -SYSTEMINCLUDE ../../src/urlloader/include -SYSTEMINCLUDE ../../src/Wml/include -SYSTEMINCLUDE ../../../osswebengine/MemoryManager/Inc -MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE - diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/wml1x/bld.inf --- a/webengine/wmlengine/group/wml1x/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/wml1x/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ #include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/wml1x/wml1x.mmp --- a/webengine/wmlengine/group/wml1x/wml1x.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/wml1x/wml1x.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,7 @@ * */ -#include -#include +#include "../webkitcommon.mmpi" TARGET wml1x.lib TARGETTYPE lib @@ -24,7 +23,6 @@ CAPABILITY CAP_GENERAL_DLL VENDORID VID_DEFAULT - MACRO NOKIA_MOBILE_BROWSER #define NOKIA_MOBILE_BROWSER 1 @@ -44,36 +42,3 @@ SOURCE Epoc32Wml1xActiveEvent.cpp SOURCE WML1XEpoc32DefaultStyleSheet.cpp SOURCE WML1XEpoc32ContentHandler.cpp - -#include "../webkitcommon.mmpi" - -USERINCLUDE . -USERINCLUDE ../../src/adt/include -USERINCLUDE ../../src/htmlp/include -USERINCLUDE ../../src/Evt/include -USERINCLUDE ../../src/fbox/include -USERINCLUDE ../../src/gdi/include -USERINCLUDE ../../src/hed/include -USERINCLUDE ../../src/image/include -USERINCLUDE ../../src/ImageCH/include -USERINCLUDE ../../src/lmgr/include -USERINCLUDE ../../src/markup/include -USERINCLUDE ../../src/object/include -USERINCLUDE ../../src/system/include -USERINCLUDE ../../src/text/include -USERINCLUDE ../../src/wml1x/include -USERINCLUDE ../../src/wmlscriptch/include -USERINCLUDE ../../src/wml/src -USERINCLUDE ../../src/wml/include -USERINCLUDE ../../src/MVC/include -USERINCLUDE ../../src/msg/include -USERINCLUDE ../../src/wmlcontrol/include -USERINCLUDE ../../src/utils/include - -SYSTEMINCLUDE ../../src/utils/include -SYSTEMINCLUDE ../../src/urlloader/include -SYSTEMINCLUDE ../../src/wml/include -SYSTEMINCLUDE ../../../osswebengine/MemoryManager/Inc -MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE - diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/wmlengine/bld.inf --- a/webengine/wmlengine/group/wmlengine/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/wmlengine/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ #include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/wmlengine/mvc.mmpi --- a/webengine/wmlengine/group/wmlengine/mvc.mmpi Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/wmlengine/mvc.mmpi Mon Mar 29 12:27:15 2010 +0100 @@ -15,10 +15,8 @@ * */ - #include "../webkitcommon.mmpi" - SOURCEPATH ../../src/mvc/src SOURCE ILoadListener.c @@ -27,36 +25,3 @@ SOURCE MVCScroll.cpp SOURCE MVCViewAsyncInit.cpp SOURCE CEmbeddedDocExitObserver.cpp - -//#ifdef __SERIES60_WIM -//SOURCE epoc32/WimUi.cpp -//#endif __SERIES60_WIM - -USERINCLUDE ../../src/adt/include -USERINCLUDE ../../src/wmlcontrol/include -USERINCLUDE ../../src/css/include -USERINCLUDE ../../src/evt/include -USERINCLUDE ../../src/fbox/include -USERINCLUDE ../../src/gdi/include -USERINCLUDE ../../src/hed/include -USERINCLUDE ../../src/image/include -USERINCLUDE ../../src/imagech/include -USERINCLUDE ../../src/lmgr/include -USERINCLUDE ../../src/markup/include -USERINCLUDE ../../src/Msg/include -USERINCLUDE ../../src/mvc/include -USERINCLUDE ../../src/object/include -USERINCLUDE ../../src/text/include -USERINCLUDE ../../src/system/include -USERINCLUDE ../../src/wml1x/include -USERINCLUDE ../../src/browser/include -USERINCLUDE ../../src/wmlscriptch/include -USERINCLUDE ../../src/xhtml/include -USERINCLUDE ../../src/urlloader/include -//USERINCLUDE /S60/mw/web/WebEngine/WmlEngine/src/wml/include -USERINCLUDE ../../src/fileloader/include -//USERINCLUDE ../../MemoryManager/Inc - -//SYSTEMINCLUDE ../WmlEngine/urlloader/include -//SYSTEMINCLUDE ../WmlEngine/wml/include - diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/wmlengine/utils.mmp --- a/webengine/wmlengine/group/wmlengine/utils.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/wmlengine/utils.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,7 @@ * */ -#include -#include +#include "../webkitcommon.mmpi" #ifndef INCLUDE_UTILS_MMP @@ -52,7 +51,6 @@ SOURCE nwx_osu_epoc32.cpp SOURCE nwx_statuscodeconvert.c SOURCE nwx_assert.c - SOURCE nwx_string.c SOURCE nwx_time_utils.c SOURCE nwx_url_utils.c @@ -62,29 +60,3 @@ SOURCE ucs2_transformation_epoc32.c SOURCE CReferrerHelper.cpp SOURCE FileNameUtils.cpp - -USERINCLUDE ../../src/wml/include - -#ifndef INCLUDE_UTILS_MMP -USERINCLUDE . -USERINCLUDE ../../src/urlloader/include -USERINCLUDE ../../src/script/include -USERINCLUDE ../../src/utils/include -USERINCLUDE ../../src/wml/src -// The following are required ONLY because of epoc32/nwx_cleanup_epoc32.cpp -USERINCLUDE ../../src/adt/include -USERINCLUDE ../../src/evt/include -USERINCLUDE ../../src/hed/include -USERINCLUDE ../../src/gdi/include -USERINCLUDE ../../src/image/include -USERINCLUDE ../../src/imagech/include -USERINCLUDE ../../src/lmgr/include -USERINCLUDE ../../src/object/include -USERINCLUDE ../../src/text/include -// end of cleanup includes -SYSTEMINCLUDE ../../src/urlloader/include -SYSTEMINCLUDE ../../src/utils/include -MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE - -#endif diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/wmlengine/wmlengine.mmp --- a/webengine/wmlengine/group/wmlengine/wmlengine.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/wmlengine/wmlengine.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,7 @@ * */ -#include -#include +#include "../webkitcommon.mmpi" TARGET wmlEngine.dll TARGETTYPE dll @@ -29,8 +28,6 @@ CAPABILITY CAP_GENERAL_DLL EPOCALLOWDLLDATA - - #if defined(WINSCW) deffile ../Bwinscw/WmlEngine.def #elif defined(ARMCC) @@ -52,10 +49,9 @@ #define INCLUDE_UTILS_MMP #include "utils.mmp" - SOURCEPATH ../../src/wmlcontrol/src -SOURCE WmlControl.cpp +SOURCE WmlControl.cpp SOURCE WmlContentInterface.cpp SOURCEPATH ../../src/htmlp/src @@ -73,25 +69,6 @@ SOURCE LMgrBox.cpp //-- -USERINCLUDE ../../src/utils/include -USERINCLUDE ../../src/scrolling/inc -USERINCLUDE ../../src/script/include -USERINCLUDE ../../src/script/src -USERINCLUDE ../../src/htmlp/include - -MW_LAYER_HTTP_SYSTEMINCLUDE - -SYSTEMINCLUDE ../../src/utils/include -SYSTEMINCLUDE ../../src/utils/src -SYSTEMINCLUDE ../../src/urlloader/include -SYSTEMINCLUDE ../../src/wml/include -SYSTEMINCLUDE ../../../osswebengine/MemoryManager/Inc -MW_LAYER_LIBC_SYSTEMINCLUDE -MW_LAYER_SYSTEMINCLUDE -MW_LAYER_OSKERNEL_SYSTEMINCLUDE - - - STATICLIBRARY RbBrowser.lib // Rainbow tempest libraries STATICLIBRARY xhtml.lib @@ -171,7 +148,6 @@ LIBRARY DownloadMgrUiLib.lib LIBRARY imut.lib - LIBRARY eikctl.lib LIBRARY form.lib LIBRARY etext.lib @@ -189,6 +165,3 @@ LIBRARY broaffpopup.lib #endif LIBRARY aknicon.lib - - - diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/wmlscriptch/bld.inf --- a/webengine/wmlengine/group/wmlscriptch/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/wmlscriptch/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ #include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/wmlscriptch/wmlscriptch.mmp --- a/webengine/wmlengine/group/wmlscriptch/wmlscriptch.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/wmlscriptch/wmlscriptch.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,7 @@ * */ -#include -#include +#include "../webkitcommon.mmpi" TARGET wmlscriptch.lib TARGETTYPE lib @@ -29,34 +28,7 @@ SOURCEPATH ../../src/wmlscriptch/src/ - SOURCE iwmlBrowserLib.c SOURCE iwmlScriptListener.c SOURCE WMLSCRIPTCHScrProxyApi.cpp SOURCE WMLSCRIPTCHContentHandler.cpp - -#include "../webkitcommon.mmpi" - -USERINCLUDE . -USERINCLUDE ../../src/adt/include -USERINCLUDE ../../src/htmlp/include -USERINCLUDE ../../src/Evt/include -USERINCLUDE ../../src/gdi/include -USERINCLUDE ../../src/hed/include -USERINCLUDE ../../src/markup/include -USERINCLUDE ../../src/lmgr/include -USERINCLUDE ../../src/object/include -USERINCLUDE ../../src/text/include -USERINCLUDE ../../src/wmlscriptch/include -USERINCLUDE ../../src/wml/src -USERINCLUDE ../../src/wml/include -USERINCLUDE ../../src/mvc/include -USERINCLUDE ../../src/msg/include -USERINCLUDE ../../src/utils/include - -USERINCLUDE ../../../osswebengine/MemoryManager/inc - -SYSTEMINCLUDE ../../src/utils/include -SYSTEMINCLUDE ../../src/urlloader/include -MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/xhtml/bld.inf --- a/webengine/wmlengine/group/xhtml/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/xhtml/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ #include -#include "../../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/group/xhtml/xhtml.mmp --- a/webengine/wmlengine/group/xhtml/xhtml.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/group/xhtml/xhtml.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,7 @@ * */ -#include -#include +#include "../webkitcommon.mmpi" TARGET xhtml.lib TARGETTYPE lib @@ -24,14 +23,11 @@ CAPABILITY CAP_GENERAL_DLL VENDORID VID_DEFAULT - MACRO NOKIA_MOBILE_BROWSER #define NOKIA_MOBILE_BROWSER 1 SOURCEPATH ../../src/xhtml/src/ -#include "../webkitcommon.mmpi" - SOURCE structure/XHTMLHeadElementHandler.cpp SOURCE structure/XHTMLStructureModule.cpp SOURCE structure/XHTMLTitleElementHandler.cpp @@ -90,35 +86,3 @@ SOURCE frame/XHTMLFrameElementHandler.cpp SOURCE ignore/XHTMLIgnoreElementHandler.cpp SOURCE XHTMLMessageListener.cpp - - -USERINCLUDE . -USERINCLUDE ../../src/adt/include -USERINCLUDE ../../src/css/include -USERINCLUDE ../../src/Evt/include -USERINCLUDE ../../src/htmlp/include -USERINCLUDE ../../src/fbox/include -USERINCLUDE ../../src/gdi/include -USERINCLUDE ../../src/hed/include -USERINCLUDE ../../src/ImageCH/include -USERINCLUDE ../../src/image/include -USERINCLUDE ../../src/lmgr/include -USERINCLUDE ../../src/markup/include -USERINCLUDE ../../src/Msg/include -USERINCLUDE ../../src/mvc/include -USERINCLUDE ../../src/object/include -USERINCLUDE ../../src/scrolling/inc -USERINCLUDE ../../src/system/include -USERINCLUDE ../../src/text/include -USERINCLUDE ../../src/wmlscriptch/include -USERINCLUDE ../../src/xhtml/include -USERINCLUDE ../../src/wml/src -USERINCLUDE ../../src/wml/include -USERINCLUDE ../../src/wmlcontrol/include -USERINCLUDE ../../src/utils/include - -SYSTEMINCLUDE ../../src/utils/include -SYSTEMINCLUDE ../../src/urlloader/include -SYSTEMINCLUDE ../../../osswebengine/MemoryManager/Inc -MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/FileLoader/src/fileloader_cfilehandler.cpp --- a/webengine/wmlengine/src/FileLoader/src/fileloader_cfilehandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/FileLoader/src/fileloader_cfilehandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,6 @@ * */ - - // INCLUDE FILES #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/FileLoader/src/fileloader_cfileloader.cpp --- a/webengine/wmlengine/src/FileLoader/src/fileloader_cfileloader.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/FileLoader/src/fileloader_cfileloader.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,6 @@ * */ - - // INCLUDE FILES #include #include @@ -25,7 +23,6 @@ #include "urlloader_loaderutils.h" #include "fileloader_cfilehandler.h" - // EXTERNAL DATA STRUCTURES // EXTERNAL FUNCTION PROTOTYPES diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/FileLoader/src/fileloader_csaveddeckhandler.cpp --- a/webengine/wmlengine/src/FileLoader/src/fileloader_csaveddeckhandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/FileLoader/src/fileloader_csaveddeckhandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,6 @@ * */ - - // INCLUDE FILES #include #include @@ -30,8 +28,6 @@ #include "nwx_http_defs.h" #include "nwx_settings.h" - - // EXTERNAL DATA STRUCTURES // EXTERNAL FUNCTION PROTOTYPES diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/ImageCH/src/Epoc32ImageContentHandler.cpp --- a/webengine/wmlengine/src/ImageCH/src/Epoc32ImageContentHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/ImageCH/src/Epoc32ImageContentHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #include // First to avoid NULL redefine warning (no #ifndef NULL). #include @@ -37,8 +36,7 @@ #include "nw_lmgr_statictablecellbox.h" #include "nwx_logger.h" #include "nwx_settings.h" -#include "MemoryManager.h" - +#include /*required for animations*/ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/MVC/include/MVCScroll.h --- a/webengine/wmlengine/src/MVC/include/MVCScroll.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/MVC/include/MVCScroll.h Mon Mar 29 12:27:15 2010 +0100 @@ -135,7 +135,7 @@ /** * Method returns the first sibling box whose width and height are not zero */ - NW_LMgr_Box_t* CMVCScroll::GetFirstSiblingBox (NW_LMgr_Box_t* box); + NW_LMgr_Box_t* GetFirstSiblingBox (NW_LMgr_Box_t* box); private: // Private methods and member variables /** diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/MVC/include/MVCShell.h --- a/webengine/wmlengine/src/MVC/include/MVCShell.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/MVC/include/MVCShell.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,14 +15,10 @@ * */ - #ifndef __MVCSHELL_H #define __MVCSHELL_H - #include -#include "BrsrStatusCodes.h" -#include "BrsrTypes.h" #include #include #include @@ -31,7 +27,9 @@ #include #include -#include "BrCtlDialogsProvider.h" +#include +#include "BrsrStatusCodes.h" +#include "BrsrTypes.h" #include "HEDDocumentListener.h" #include "httploader_mlinkresolvercallbacks.h" @@ -42,7 +40,7 @@ #include "nw_scrproxy.h" #include "nw_wae.h" #include "nwx_defs.h" -#include "nwx_status.h" +#include #include "urlloader_urlresponse.h" #include "EmbeddedDocExitObserver.h" //R @@ -50,12 +48,10 @@ //#include "webkitview.h" #include "wmlcontrol.h" - #ifdef __SERIES60_WIM #include "WimUi.h" #endif __SERIES60_WIM - enum TUrlLoadState { // We are now loading the URL diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/MVC/include/MVCView.h --- a/webengine/wmlengine/src/MVC/include/MVCView.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/MVC/include/MVCView.h Mon Mar 29 12:27:15 2010 +0100 @@ -32,8 +32,8 @@ #include #include -#include -#include +#include +#include #include "BrsrStatusCodes.h" #include "ImageUtils.h" #include "LMgrBoxTreeListener.h" @@ -43,7 +43,7 @@ #include "CBrowserSettings.h" #include "BrCtl.h" -#include "MemoryManager.h" +#include #include "pagescaler.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/MVC/include/MVCViewAsyncInit.h --- a/webengine/wmlengine/src/MVC/include/MVCViewAsyncInit.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/MVC/include/MVCViewAsyncInit.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,6 @@ * */ - - #ifndef VIEWASYNCINIT_H #define VIEWASYNCINIT_H diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/MVC/include/httploader_mlinkresolvercallbacks.h --- a/webengine/wmlengine/src/MVC/include/httploader_mlinkresolvercallbacks.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/MVC/include/httploader_mlinkresolvercallbacks.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,19 +15,14 @@ * */ - - #ifndef MLINKRESOLVERCALLBACKS_H #define MLINKRESOLVERCALLBACKS_H +#include #include "BrsrStatusCodes.h" -#include "BrCtlDefs.h" #include "urlloader_urlresponse.h" - - - // INCLUDES // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/MVC/src/MVCScroll.cpp --- a/webengine/wmlengine/src/MVC/src/MVCScroll.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/MVC/src/MVCScroll.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -18,7 +18,7 @@ // INCLUDE FILES #include // To avoid NULL redefine warning (no #ifndef NULL) -#include +#include "nwx_settings.h" #include "MVCScroll.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/MVC/src/MVCShell.cpp --- a/webengine/wmlengine/src/MVC/src/MVCShell.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/MVC/src/MVCShell.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - // INCLUDE FILES #include // resolve NULL redefinition warning. #include @@ -34,10 +33,11 @@ #include #include #include -#include "Oma2Agent.h" +#include +#include +#include #include "brctl.h" -#include "brctldefs.h" #include "BrsrStatusCodes.h" #include "MVCShell.h" @@ -61,13 +61,13 @@ #include "nw_text_ucs2.h" //#include "nw_unknown_contenthandler.h" #include "nw_wae.h" -#include "nw_wbxml_dictionary.h" +#include #include "nw_wml_core.h" #include "nw_wmlscriptch_wmlscriptcontenthandler.h" #include "nw_wml1x_wml1xformliaison.h" #include "nw_wml1x_epoc32contenthandler.h" #include "nw_xhtml_epoc32contenthandler.h" -#include +#include "nwx_assert.h" #include "nwx_ctx.h" #include "nwx_datastruct.h" #include "nwx_defs_symbian.h" @@ -90,10 +90,8 @@ #include "urlloader_urlresponse.h" #include "CSSVariableStyleSheet.h" #include "TEncodingMapping.h" -#include "BrCtlDialogsProvider.h" #include "WmlInterface.h" - // EXTERNAL DATA STRUCTURES #ifdef __cplusplus extern "C" { diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/MVC/src/MVCView.cpp --- a/webengine/wmlengine/src/MVC/src/MVCView.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/MVC/src/MVCView.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -28,16 +28,17 @@ #include #include #include -#include #include #include #include -#include +#include #include #include +#include + #include "BoxFormatHandler.h" #include "BoxRender.h" #include "BrCtl.h" @@ -57,6 +58,7 @@ #include "nw_adt_resizablevector.h" #include "nwx_cleanup_epoc32.h" #include "nwx_ctx.h" +#include "nwx_defs_symbian.h" #include "nw_evt_accesskeyevent.h" #include "nw_evt_activateevent.h" #include "nw_evt_clearfieldevent.h" @@ -116,8 +118,6 @@ #include "TEncodingMapping.h" #include "urlloader_urlloaderint.h" -#include -#include "BrCtlDialogsProvider.h" #include "HistoryController.h" #include "WmlInterface.h" @@ -1804,6 +1804,7 @@ iVScrollPosition(0), iFormatPriority( ((CActive::TPriority)( CActive::EPriorityLow + 2 )) ) { iBrCtl = aBrCtl; + iDrag = EFalse; } // ----------------------------------------------------------------------------- @@ -4208,7 +4209,8 @@ { switch (aPointerEvent.iType) { case TPointerEvent::EButton1Down: - iLastPosition = aPointerEvent.iPosition; + iLastPosition = aPointerEvent.iPosition; + iDrag = EFalse; break; case TPointerEvent::EDrag: TPoint currPosition; @@ -4221,8 +4223,21 @@ currPosition.iX = iDeviceContext->Origin()->x; currPosition.iY = iDeviceContext->Origin()->y; ScrollTo(currPosition+nextPosition); - } - iDrag = ETrue; + + //This is for Drag event + //Introducing 10 pixel offset. This is introduced to tackle problem that occurs if user clicks + //link but still causes a very small pixel move. This gives a small difference in previous + //and next position. As a side effect iDrag will be true and request will not be sent even if + //there is very small pixel difference. + //Following logic tries to handle such scenario. + TInt nOffset = 10; + TBool bXOffset = ((nextPosition.iX > nOffset) || (nextPosition.iX < -nOffset)); + TBool bYOffset = ((nextPosition.iY > nOffset) || (nextPosition.iY < -nOffset)); + if(bXOffset || bYOffset) + { + iDrag = ETrue; + } + } break; } @@ -4301,20 +4316,13 @@ NW_LMgr_RootBox_SetFocusBox(iRootBox, tempBox); Draw (NW_TRUE /*DrawNow*/); } - if (aPointerEvent.iType == TPointerEvent::EButton1Up) + if ((aPointerEvent.iType == TPointerEvent::EButton1Up) && (iShouldActivate)) { - if (iShouldActivate) + if((!iDrag)) { - if(!iDrag) - { - NW_Evt_ActivateEvent_t actEvent; - NW_Evt_ActivateEvent_Initialize (&actEvent); - ProcessEvent (NW_Evt_EventOf(&actEvent)); - } - else - { - iDrag = EFalse; - } + NW_Evt_ActivateEvent_t actEvent; + NW_Evt_ActivateEvent_Initialize (&actEvent); + ProcessEvent (NW_Evt_EventOf(&actEvent)); } } break; diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/Scrolling/inc/ScrollBarFrame.h --- a/webengine/wmlengine/src/Scrolling/inc/ScrollBarFrame.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/Scrolling/inc/ScrollBarFrame.h Mon Mar 29 12:27:15 2010 +0100 @@ -27,7 +27,7 @@ #include // Browser as a Plugin includes -#include +#include //---------------------------------------------------------------------- // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/System/src/Epoc32Timer.cpp --- a/webengine/wmlengine/src/System/src/Epoc32Timer.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/System/src/Epoc32Timer.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -25,8 +25,7 @@ #include "nwx_ctx.h" #include "nwx_defs_symbian.h" #include "BrsrStatusCodes.h" -#include "MemoryManager.h" - +#include /* ------------------------------------------------------------------------- * static data diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/System/src/Timer.c --- a/webengine/wmlengine/src/System/src/Timer.c Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/System/src/Timer.c Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #include "nw_system_timeri.h" #include "nwx_time.h" #include "BrsrStatusCodes.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/adt/src/DynamicVector.c --- a/webengine/wmlengine/src/adt/src/DynamicVector.c Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/adt/src/DynamicVector.c Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ #include "nw_adt_dynamicvectori.h" -#include +#include "nwx_assert.h" #include "BrsrStatusCodes.h" /* ------------------------------------------------------------------------- * diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/browser/include/nw_browser_browserimages.h --- a/webengine/wmlengine/src/browser/include/nw_browser_browserimages.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/browser/include/nw_browser_browserimages.h Mon Mar 29 12:27:15 2010 +0100 @@ -22,7 +22,6 @@ _LIT( KBrowserBitmapsName,"browserbitmaps.mbm" ); - const TUint qgn_prop_wml_square = 0; const TUint qgn_prop_wml_disc = 1; const TUint qgn_prop_wml_circle = 2; diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/browser/src/BROWSEREpoc32MimeTable.cpp --- a/webengine/wmlengine/src/browser/src/BROWSEREpoc32MimeTable.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/browser/src/BROWSEREpoc32MimeTable.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,12 +15,11 @@ * */ - #include "nw_browser_browsermimetablei.h" #include "nw_imagech_epoc32contenthandler.h" #include "nw_xhtml_epoc32contenthandler.h" -#include /* needed for the wml content handler */ +#include "nw_wml_core.h" /* needed for the wml content handler */ #include "nw_wmlscriptch_wmlscriptcontenthandler.h" #include "nw_wml1x_epoc32contenthandler.h" #include "nwx_http_defs.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/browser/src/wml_1_3_dict.c --- a/webengine/wmlengine/src/browser/src/wml_1_3_dict.c Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/browser/src/wml_1_3_dict.c Mon Mar 29 12:27:15 2010 +0100 @@ -39,8 +39,7 @@ #include "nwx_defs.h" #include "nw_wml1x_wml_1_3_tokens.h" -#include "nw_wbxml_dictionary.h" - +#include static const NW_Ucs2 NW_Wml_1_3_ElementTag_pre[] = {'p','r','e','\0'}; static const NW_Ucs2 NW_Wml_1_3_ElementTag_a[] = {'a','\0'}; diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/browser/src/xhtml_1_0_dict.c --- a/webengine/wmlengine/src/browser/src/xhtml_1_0_dict.c Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/browser/src/xhtml_1_0_dict.c Mon Mar 29 12:27:15 2010 +0100 @@ -35,8 +35,7 @@ */ #include "nwx_defs.h" #include "nw_xhtml_xhtml_1_0_tokens.h" -#include "nw_wbxml_dictionary.h" - +#include static const NW_Ucs2 NW_XHTML_1_0_ElementTag_body[] = {'b','o','d','y','\0'}; static const NW_Ucs2 NW_XHTML_1_0_ElementTag_head[] = {'h','e','a','d','\0'}; diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/css/include/CSSDeclListHandle.h --- a/webengine/wmlengine/src/css/include/CSSDeclListHandle.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/css/include/CSSDeclListHandle.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #ifndef TCSSDECLLISTHANDLE_H #define TCSSDECLLISTHANDLE_H @@ -24,7 +23,7 @@ #include "nw_lmgr_propertylist.h" #include "CSSParser.h" #include "CSSPropertyTable.h" -#include "nw_dom_element.h" +#include #include "nw_css_processor.h" // MACROS diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/css/include/CSSImageList.h --- a/webengine/wmlengine/src/css/include/CSSImageList.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/css/include/CSSImageList.h Mon Mar 29 12:27:15 2010 +0100 @@ -20,14 +20,14 @@ #define CCSSImageList_H // INCLUDES +#include #include "BrsrStatusCodes.h" #include "nw_text_ucs2.h" #include "nw_image_abstractimage.h" #include "nw_image_virtualimage.h" #include "nw_image_epoc32simpleimage.h" -#include +#include "nwx_http_header.h" #include "nw_css_processor.h" -#include // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/css/include/CSSPatternMatcher.h --- a/webengine/wmlengine/src/css/include/CSSPatternMatcher.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/css/include/CSSPatternMatcher.h Mon Mar 29 12:27:15 2010 +0100 @@ -22,8 +22,8 @@ // INCLUDES #include "CSSParser.h" #include "CSSSelector.h" -#include "nw_dom_element.h" -#include "nw_wbxml_dictionary.h" +#include +#include #include "nw_evt_event.h" #include "nw_hed_documentnode.h" #include "nw_hed_domhelper.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/css/include/CSSReader.h --- a/webengine/wmlengine/src/css/include/CSSReader.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/css/include/CSSReader.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,13 +15,12 @@ * */ - #ifndef TCSSReader_H #define TCSSReader_H // INCLUDES #include "nwx_defs.h" -#include "nw_string_string.h" +#include #include // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/css/include/CSSRuleList.h --- a/webengine/wmlengine/src/css/include/CSSRuleList.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/css/include/CSSRuleList.h Mon Mar 29 12:27:15 2010 +0100 @@ -22,7 +22,7 @@ // INCLUDES #include "CSSEventListener.h" #include "CSSBufferList.h" -#include "nw_wbxml_dictionary.h" +#include #include "nw_css_processori.h" #include "CSSPatternMatcher.h" #include "CSSSelector.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/css/include/CSSSelector.h --- a/webengine/wmlengine/src/css/include/CSSSelector.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/css/include/CSSSelector.h Mon Mar 29 12:27:15 2010 +0100 @@ -22,7 +22,7 @@ // INCLUDES //#include "CSSEventListener.h" //#include "CSSBufferList.h" -//#include "nw_wbxml_dictionary.h" +//#include //#include "nw_css_processori.h" //#include "CSSPatternMatcher.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/css/include/nw_css_defaultstylesheet.h --- a/webengine/wmlengine/src/css/include/nw_css_defaultstylesheet.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/css/include/nw_css_defaultstylesheet.h Mon Mar 29 12:27:15 2010 +0100 @@ -21,8 +21,8 @@ #include "nw_object_base.h" #include "nw_lmgr_propertylist.h" -#include "nw_dom_element.h" -#include "nw_wbxml_dictionary.h" +#include +#include #include "nw_evt_event.h" #include "nw_lmgr_box.h" #include "nw_hed_documentnode.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/css/include/nw_css_processor.h --- a/webengine/wmlengine/src/css/include/nw_css_processor.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/css/include/nw_css_processor.h Mon Mar 29 12:27:15 2010 +0100 @@ -25,7 +25,7 @@ #include "nw_hed_documentnode.h" #include "nw_hed_domhelper.h" #include "nw_text_ucs2.h" -#include "nw_dom_element.h" +#include #include "nw_lmgr_box.h" #include "nw_hed_iloadrecipient.h" #include "nw_image_iimageobserver.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/css/src/CSSBufferList.cpp --- a/webengine/wmlengine/src/css/src/CSSBufferList.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/css/src/CSSBufferList.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,12 +15,10 @@ * */ - - // INCLUDE FILES #include // First to avoid NULL redefine warning (no #ifndef NULL). #include "CSSBufferList.h" -#include +#include "nwx_assert.h" #include "nwx_multipart_generator.h" #include "nwx_string.h" #include "nwx_http_defs.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/css/src/CSSDeclListHandle.cpp --- a/webengine/wmlengine/src/css/src/CSSDeclListHandle.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/css/src/CSSDeclListHandle.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -21,14 +21,14 @@ #include // First to avoid NULL redefine warning (no #ifndef NULL). #include -#include +#include "nwx_assert.h" #include "CSSDeclListHandle.h" #include "nw_lmgr_simplepropertylist.h" #include "nw_text_ucs2.h" #include "nw_lmgr_rootbox.h" #include "CSSPropVal.h" #include "nwx_math.h" -#include +#include "nwx_string.h" #include "CSSReader.h" #include "BrsrStatusCodes.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/css/src/CSSDefaultStyleSheet.cpp --- a/webengine/wmlengine/src/css/src/CSSDefaultStyleSheet.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/css/src/CSSDefaultStyleSheet.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -21,10 +21,10 @@ #include "nw_text_ucs2.h" #include "nw_lmgr_cssproperties.h" -#include "nw_string_char.h" +#include #include "nw_lmgr_rootbox.h" #include "CSSPropVal.h" -#include +#include "nwx_string.h" #include "CSSPropertyTable.h" #include "CSSDeclListHandle.h" #include "CSSPatternMatcher.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/css/src/CSSImageList.cpp --- a/webengine/wmlengine/src/css/src/CSSImageList.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/css/src/CSSImageList.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,6 @@ * */ - - // INCLUDE FILES #include // First to avoid NULL redefine warning (no #ifndef NULL). #include "BrsrStatusCodes.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/css/src/CSSParser.cpp --- a/webengine/wmlengine/src/css/src/CSSParser.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/css/src/CSSParser.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,14 +15,12 @@ * */ - - // INCLUDE FILES #include // First to avoid NULL redefine warning (no #ifndef NULL). #include "CSSParser.h" -#include "nw_string_string.h" -#include +#include +#include "nwx_assert.h" #include "nwx_http_defs.h" #include "nwx_string.h" #include "BrsrStatusCodes.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/css/src/CSSPatternMatcher.cpp --- a/webengine/wmlengine/src/css/src/CSSPatternMatcher.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/css/src/CSSPatternMatcher.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,16 +15,14 @@ * */ - - // INCLUDE FILES #include // First to avoid NULL redefine warning (no #ifndef NULL). #include "CSSPatternMatcher.h" -#include "nw_dom_document.h" +#include #include "nw_evt_activateevent.h" #include "nw_evt_focusevent.h" -#include +#include "nwx_assert.h" #include "nwx_string.h" #include "nw_hed_contenthandler.h" @@ -32,7 +30,7 @@ #include "nw_hed_historyvisitor.h" #include "nw_xhtml_xhtml_1_0_tokens.h" #include "BrsrStatusCodes.h" -#include "MemoryManager.h" +#include // EXTERNAL DATA STRUCTURES diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/css/src/CSSProcessor.cpp --- a/webengine/wmlengine/src/css/src/CSSProcessor.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/css/src/CSSProcessor.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -16,9 +16,9 @@ */ #include -#include -#include -#include +#include "nwx_assert.h" +#include "nwx_string.h" +#include "nwx_logger.h" #include "BrsrStatusCodes.h" #include "CSSDeclListHandle.h" #include "CSSHandler.h" @@ -46,7 +46,7 @@ #include "nwx_settings.h" #include "nwx_http_defs.h" #include "GDIDeviceContext.h" -#include "BodyPart.h" +#include #include "nw_xhtml_xhtmlcontenthandler.h" #include "MVCShell.h" //#include "BrCtl.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/css/src/CSSPropVal.cpp --- a/webengine/wmlengine/src/css/src/CSSPropVal.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/css/src/CSSPropVal.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -27,7 +27,7 @@ #include "nw_css_tokentoint.h" #include "nw_lmgr_propertylist.h" #include "nwx_math.h" -#include +#include "nwx_string.h" #include "BrsrStatusCodes.h" // EXTERNAL DATA STRUCTURES diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/css/src/CSSPropertyTable.cpp --- a/webengine/wmlengine/src/css/src/CSSPropertyTable.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/css/src/CSSPropertyTable.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -22,7 +22,7 @@ #include "nw_text_ascii.h" #include "nw_image_virtualimage.h" -#include +#include "nwx_string.h" // EXTERNAL DATA STRUCTURES diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/css/src/CSSReader.cpp --- a/webengine/wmlengine/src/css/src/CSSReader.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/css/src/CSSReader.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,15 +15,13 @@ * */ - - // INCLUDE FILES #include // First to avoid NULL redefine warning (no #ifndef NULL). #include "nwx_defs.h" #include "CSSReader.h" #include "nw_text_ucs2.h" -#include +#include "nwx_assert.h" #include "nwx_http_defs.h" #include "nwx_string.h" #include "BrsrStatusCodes.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/css/src/CSSRuleList.cpp --- a/webengine/wmlengine/src/css/src/CSSRuleList.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/css/src/CSSRuleList.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -19,13 +19,13 @@ // INCLUDE FILES #include "CSSRuleList.h" -#include +#include "nwx_assert.h" #include "BrsrStatusCodes.h" #include "nwx_settings.h" #include "CSSParser.h" #include "nw_text_ucs2.h" -#include +#include "nwx_string.h" #include "nw_hed_contenthandler.h" #include "CSSDeclListHandle.h" #include "TKeyArrayPtr.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/css/src/CSSTokenToInt.cpp --- a/webengine/wmlengine/src/css/src/CSSTokenToInt.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/css/src/CSSTokenToInt.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -18,11 +18,10 @@ #include // First to avoid NULL redefine warning (no #ifndef NULL). #include "nw_css_tokentointi.h" - #include "nw_lmgr_cssproperties.h" #include "nw_text_ucs2.h" -#include -#include +#include "nwx_string.h" +#include "nwx_math.h" #include "BrsrStatusCodes.h" #include "aknutils.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/css/src/CSSVariableStyleSheet.cpp --- a/webengine/wmlengine/src/css/src/CSSVariableStyleSheet.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/css/src/CSSVariableStyleSheet.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -21,7 +21,7 @@ #include // First to avoid NULL redefine warning (no #ifndef NULL). #include #include "nw_css_defaultstylesheet.h" -#include +#include "nwx_assert.h" #include "nwx_settings.h" #include "nwx_ctx.h" #include "nwx_logger.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/fbox/src/Epoc32FormImages.cpp --- a/webengine/wmlengine/src/fbox/src/Epoc32FormImages.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/fbox/src/Epoc32FormImages.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #include // First to avoid NULL redefine warning (no #ifndef NULL). #include "nw_fbox_epoc32formimagesi.h" @@ -26,8 +25,8 @@ #include #include -#include -#include +#include "nwx_buffer.h" +#include "nw_browser_browserimages.h" /* ------------------------------------------------------------------------- */ const diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/fbox/src/Epoc32InlineFormImages.cpp --- a/webengine/wmlengine/src/fbox/src/Epoc32InlineFormImages.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/fbox/src/Epoc32InlineFormImages.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,15 +15,13 @@ * */ - #include "nw_fbox_epoc32inlineformimagesi.h" -#include +#include "nw_browser_browserimages.h" /* ------------------------------------------------------------------------- * static data * ------------------------------------------------------------------------- */ - /* ------------------------------------------------------------------------- */ static const NW_FBox_FormImages_Entry_t _NW_FBox_InlineFormImages_CheckBoxEntries[] = { diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/fbox/src/Epoc32InputInteractor.cpp --- a/webengine/wmlengine/src/fbox/src/Epoc32InputInteractor.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/fbox/src/Epoc32InputInteractor.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -32,10 +32,9 @@ #include "nw_fbox_keymapper.h" #include "nw_fbox_textareabox.h" #include "nw_fbox_epoc32inputskin.h" -#include +#include "nwx_time.h" #include "BrsrStatusCodes.h" - /* ------------------------------------------------------------------------- * static data * ------------------------------------------------------------------------- */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/fbox/src/Epoc32InputSkin.cpp --- a/webengine/wmlengine/src/fbox/src/Epoc32InputSkin.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/fbox/src/Epoc32InputSkin.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -18,12 +18,10 @@ #include // First to avoid NULL redefine warning (no #ifndef NULL). #include // for Latin.... font methods -#include +#include "nwx_string.h" #include "nw_fbox_formbox.h" #include "nw_evt_ecmaevent.h" - - #include "nw_fbox_epoc32inputskini.h" #include "nw_wml1x_wml_1_3_tokens.h" #include "nw_fbox_inputbox.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/fbox/src/Epoc32SelectSkin.cpp --- a/webengine/wmlengine/src/fbox/src/Epoc32SelectSkin.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/fbox/src/Epoc32SelectSkin.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #include // First to avoid NULL redefine warning (no #ifndef NULL). #include "nw_fbox_epoc32selectskini.h" #include "nw_image_cannedimages.h" @@ -30,7 +29,7 @@ #include "KimonoLocalizationStrings.h" #include "nwx_logger.h" #include "nw_lmgr_statictablecellbox.h" -#include +#include "nw_browser_browserimages.h" #include "BrsrStatusCodes.h" /* ------------------------------------------------------------------------- * @@ -720,6 +719,7 @@ } // CAUTION: this eventually calls NW_UI_CreateCard which may remove 'skin' if onpick to intradeck card exists in content NW_FBox_OptionBox_ChangeState( optionBox ); + break; } } } diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/fbox/src/Epoc32TextAreaBox.cpp --- a/webengine/wmlengine/src/fbox/src/Epoc32TextAreaBox.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/fbox/src/Epoc32TextAreaBox.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,10 +15,9 @@ * */ - #include "nw_fbox_textareaboxi.h" #include "nw_lmgr_rootbox.h" -#include +#include "nwx_string.h" #include "nw_fbox_textareaskin.h" #include "nw_fbox_inputinteractor.h" #include "BrsrStatusCodes.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/fbox/src/FBOXButtonBox.cpp --- a/webengine/wmlengine/src/fbox/src/FBOXButtonBox.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/fbox/src/FBOXButtonBox.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -28,7 +28,7 @@ #include "KimonoLocalizationStrings.h" #include "BrsrStatusCodes.h" -#include "MemoryManager.h" +#include /* ------------------------------------------------------------------------- * global data diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/fbox/src/FBOXInputBox.cpp --- a/webengine/wmlengine/src/fbox/src/FBOXInputBox.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/fbox/src/FBOXInputBox.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #include "nw_fbox_inputboxi.h" #include "nw_fbox_inputskin.h" @@ -32,7 +31,6 @@ #include "nw_wml_core.h" #include "nw_wml1x_wml1xcontenthandler.h" - /* ------------------------------------------------------------------------- * private data * ------------------------------------------------------------------------- */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/fbox/src/FBOXWmlFormattedEditor.cpp --- a/webengine/wmlengine/src/fbox/src/FBOXWmlFormattedEditor.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/fbox/src/FBOXWmlFormattedEditor.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -24,7 +24,12 @@ #include #include #include +#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS #include +#else +#include +#include +#endif #include #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/gdi/src/GDIDeviceContext.cpp --- a/webengine/wmlengine/src/gdi/src/GDIDeviceContext.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/gdi/src/GDIDeviceContext.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,19 +15,11 @@ * */ +// INCLUDE FILES -// INCLUDE FILES #include // First to avoid NULL redefine warning (no #ifndef NULL). -#include "GDIDeviceContext.h" -#include "nw_object_dynamici.h" -#include "GDIFont.h" -#include "nw_gdi_utils.h" -#include "nw_text_ucs2.h" -#include -#include -#include "nwx_logger.h" -#include "nwx_http_defs.h" -#include "MVCview.h" +#include + #include #include #include @@ -39,13 +31,23 @@ #include #include #include -#include "BrsrStatusCodes.h" -#include "FeatMgr.h" #include +#include +#include -#include -#include -#include "MemoryManager.h" +#include "GDIDeviceContext.h" +#include "nw_object_dynamici.h" +#include "GDIFont.h" +#include "nw_gdi_utils.h" +#include "nw_text_ucs2.h" +#include "nwx_string.h" +#include "nwx_settings.h" +#include "nwx_logger.h" +#include "nwx_http_defs.h" +#include "MVCview.h" +#include "BrsrStatusCodes.h" + +#include // EXTERNAL DATA STRUCTURES diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/hed/include/TextReverse.h --- a/webengine/wmlengine/src/hed/include/TextReverse.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/hed/include/TextReverse.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,6 @@ * */ - - #ifndef TEXTREVERSE_H #define TEXTREVERSE_H @@ -24,11 +22,10 @@ extern "C" { #endif - // INCLUDES #include "nwx_defs.h" #include "nwx_http_defs.h" -#include "nw_string_string.h" +#include #include "BrsrStatusCodes.h" // CONSTANTS @@ -39,8 +36,6 @@ // FUNCTION PROTOTYPES - - TBrowserStatusCode ReverseText(NW_String_t* string); #ifdef __cplusplus diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/hed/include/nw_dom_domvisitor.h --- a/webengine/wmlengine/src/hed/include/nw_dom_domvisitor.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/hed/include/nw_dom_domvisitor.h Mon Mar 29 12:27:15 2010 +0100 @@ -20,7 +20,7 @@ #define NW_CXML_DOM_DOMVISITOR_H #include "nw_object_dynamic.h" -#include "nw_dom_node.h" +#include #include "BrsrStatusCodes.h" #ifdef __cplusplus diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/hed/include/nw_hed_contenthandler.h --- a/webengine/wmlengine/src/hed/include/nw_hed_contenthandler.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/hed/include/nw_hed_contenthandler.h Mon Mar 29 12:27:15 2010 +0100 @@ -24,7 +24,7 @@ #include "nw_hed_urlrequest.h" #include "nw_hed_urlresponse.h" #include "nw_text_ucs2.h" -#include +#include "urlloader_urlresponse.h" #include "BrsrStatusCodes.h" #ifdef __cplusplus diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/hed/include/nw_hed_context.h --- a/webengine/wmlengine/src/hed/include/nw_hed_context.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/hed/include/nw_hed_context.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,13 +15,12 @@ * */ - #ifndef NW_HED_CONTEXT_H #define NW_HED_CONTEXT_H #include "nw_object_dynamic.h" #include "nw_adt_dynamicvector.h" -#include "nw_string_string.h" +#include #include "NW_HED_EXPORT.h" #include "BrsrStatusCodes.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/hed/include/nw_hed_domhelper.h --- a/webengine/wmlengine/src/hed/include/nw_hed_domhelper.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/hed/include/nw_hed_domhelper.h Mon Mar 29 12:27:15 2010 +0100 @@ -27,8 +27,8 @@ #ifndef NW_HED_DOM_HELPER_H #define NW_HED_DOM_HELPER_H -#include "nw_dom_node.h" -#include "nw_string_string.h" +#include +#include #include "nw_hed_context.h" #include "nw_hed_entityset.h" #include "BrsrStatusCodes.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/hed/include/nw_hed_domtree.h --- a/webengine/wmlengine/src/hed/include/nw_hed_domtree.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/hed/include/nw_hed_domtree.h Mon Mar 29 12:27:15 2010 +0100 @@ -22,7 +22,7 @@ #include "nwx_http_header.h" #include "nwx_buffer.h" -#include "nw_dom_node.h" +#include #ifdef __cplusplus extern "C" { diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/hed/include/nw_hed_errorcontenthandler.h --- a/webengine/wmlengine/src/hed/include/nw_hed_errorcontenthandler.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/hed/include/nw_hed_errorcontenthandler.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,21 +15,18 @@ * */ - #ifndef NW_HED_ERRORCONTENTHANDLER_H #define NW_HED_ERRORCONTENTHANDLER_H #include "nw_hed_contenthandler.h" #include "nw_text_ucs2.h" -#include +#include "urlloader_urlresponse.h" #include "BrsrStatusCodes.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ - - /* ------------------------------------------------------------------------- */ typedef struct NW_HED_ErrorContentHandler_Class_s NW_HED_ErrorContentHandler_Class_t; typedef struct NW_HED_ErrorContentHandler_s NW_HED_ErrorContentHandler_t; diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/hed/include/nw_hed_iloadrecipient.h --- a/webengine/wmlengine/src/hed/include/nw_hed_iloadrecipient.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/hed/include/nw_hed_iloadrecipient.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,22 +15,19 @@ * */ - #ifndef NW_HED_ILOADRECIPIENT_H #define NW_HED_ILOADRECIPIENT_H #include "nw_object_interface.h" -#include "NW_Text_Abstract.h" +#include "nw_Text_Abstract.h" #include "nw_hed_urlrequest.h" -#include +#include "urlloader_urlresponse.h" #include "BrsrStatusCodes.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ - - /* ------------------------------------------------------------------------- * forward declarations * ------------------------------------------------------------------------- */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/hed/include/nw_hed_mimetable.h --- a/webengine/wmlengine/src/hed/include/nw_hed_mimetable.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/hed/include/nw_hed_mimetable.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,20 +15,17 @@ * */ - #ifndef NW_HED_MIMETABLE_H #define NW_HED_MIMETABLE_H #include "nw_object_base.h" #include "nw_hed_contenthandler.h" -#include +#include "urlloader_urlresponse.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ - - /* ------------------------------------------------------------------------- * forward declarations * ------------------------------------------------------------------------- */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/hed/include/nw_hed_urlrequest.h --- a/webengine/wmlengine/src/hed/include/nw_hed_urlrequest.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/hed/include/nw_hed_urlrequest.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #ifndef NW_HED_URLREQUEST_H #define NW_HED_URLREQUEST_H @@ -24,7 +23,7 @@ #include "nw_adt_dynamicvector.h" #include "NW_Text_Abstract.h" #include "urlloader_urlresponse.h" -#include +#include "nwx_http_header.h" #include "nwx_buffer.h" #include "NW_HED_EXPORT.h" #include "BrsrStatusCodes.h" @@ -33,7 +32,6 @@ extern "C" { #endif /* __cplusplus */ - typedef enum NW_HED_UrlRequest_LoadMode_e { NW_HED_UrlRequest_LoadNormal, NW_HED_UrlRequest_LoadLocal diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/hed/include/nw_hed_urlresponse.h --- a/webengine/wmlengine/src/hed/include/nw_hed_urlresponse.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/hed/include/nw_hed_urlresponse.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,15 +15,14 @@ * */ - #ifndef NW_HED_URLRESPONSE_H #define NW_HED_URLRESPONSE_H #include "nw_object_dynamic.h" #include "nw_adt_dynamicvector.h" -#include "NW_Text_Abstract.h" -#include -#include "NW_HED_EXPORT.h" +#include "nw_text_abstract.h" +#include "urlloader_urlresponse.h" +#include "nw_hed_export.h" #include "BrsrStatusCodes.h" #ifdef __cplusplus diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/hed/src/DomHelper.c --- a/webengine/wmlengine/src/hed/src/DomHelper.c Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/hed/src/DomHelper.c Mon Mar 29 12:27:15 2010 +0100 @@ -15,14 +15,13 @@ * */ - #include "nwx_defs.h" #include "nw_hed_domhelper.h" -#include "nw_dom_element.h" +#include #include "nw_dom_domvisitor.h" -#include "nw_dom_text.h" -#include "nw_dom_document.h" +#include +#include #include "nwx_string.h" #include "nwx_url_utils.h" #include "nwx_logger.h" @@ -34,7 +33,6 @@ #include "BrsrStatusCodes.h" #include "wml_elm_attr.h" - /* ------------------------------------------------------------------------- * private constants * ------------------------------------------------------------------------- */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/hed/src/DomTree.c --- a/webengine/wmlengine/src/hed/src/DomTree.c Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/hed/src/DomTree.c Mon Mar 29 12:27:15 2010 +0100 @@ -15,12 +15,11 @@ * */ - #include "nw_hed_domtree.h" -#include "nw_tinydom_utils.h" +#include #include "nw_object_exceptions.h" #include "nwx_statuscodeconvert.h" -//#include "Nw_string_string.h" +// #include struct NW_HED_DomTree_s { Parser_t domParser; diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/hed/src/HEDCompositeContentHandler.cpp --- a/webengine/wmlengine/src/hed/src/HEDCompositeContentHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/hed/src/HEDCompositeContentHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #include "nw_hed_compositecontenthandleri.h" #include "nw_hed_documentroot.h" #include "nw_system_optionlist.h" @@ -29,12 +28,11 @@ #include "nw_image_virtualimage.h" #include "BrsrStatusCodes.h" #include "nwx_settings.h" -#include +#include "nwx_http_defs.h" #include "stringutils.h" #include "TEncodingMapping.h" -#include "BodyPart.h" -#include "MemoryManager.h" - +#include +#include /* ------------------------------------------------------------------------- * static data diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/hed/src/HEDDocumentRoot.cpp --- a/webengine/wmlengine/src/hed/src/HEDDocumentRoot.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/hed/src/HEDDocumentRoot.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -14,8 +14,8 @@ * Description: * */ - - +#include +#include #include "nw_hed_documentrooti.h" #include "nw_hed_historyentry.h" @@ -40,15 +40,11 @@ #include "nw_evlog_api.h" #include "nwx_logger.h" #include "nwx_http_defs.h" -#include -#include #include "BrsrStatusCodes.h" #include "HEDDocumentListener.h" #include "WmlControl.h" - - /* ------------------------------------------------------------------------- * private methods * ------------------------------------------------------------------------- */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/hed/src/HistoryStack.cpp --- a/webengine/wmlengine/src/hed/src/HistoryStack.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/hed/src/HistoryStack.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -14,7 +14,7 @@ * Description: * */ - +#include #include "nw_hed_historystacki.h" @@ -30,7 +30,6 @@ #include "WmlControl.h" #include "HistoryController.h" #include "HistoryStack.h" -#include "BrCtlDefs.h" #include "HistoryEntry.h" #include "WmlInterface.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/hed/src/Loader.c --- a/webengine/wmlengine/src/hed/src/Loader.c Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/hed/src/Loader.c Mon Mar 29 12:27:15 2010 +0100 @@ -15,9 +15,9 @@ * */ +#include #include "nw_hed_loaderi.h" - #include "nw_adt_resizablevector.h" #include "nw_text_ucs2.h" #include "nw_hed_urlrequest.h" @@ -29,9 +29,6 @@ #include "nwx_http_defs.h" #include "BrsrStatusCodes.h" -#include - - /* ------------------------------------------------------------------------- */ /* Static data not permitted in Epoc. For now it's been moved to the diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/hed/src/MimeTable.cpp --- a/webengine/wmlengine/src/hed/src/MimeTable.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/hed/src/MimeTable.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,14 +15,13 @@ * */ +#include +#include #include "nw_hed_mimetablei.h" #include "nwx_http_defs.h" #include "nwx_string.h" #include "nw_imagech_epoc32contenthandler.h" -#include - -#include static NW_Bool NW_HED_MimeTable_IsImageContentType(NW_Http_ContentTypeString_t contentTypeString) diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/hed/src/UrlResponse.c --- a/webengine/wmlengine/src/hed/src/UrlResponse.c Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/hed/src/UrlResponse.c Mon Mar 29 12:27:15 2010 +0100 @@ -15,11 +15,9 @@ * */ - #include "nw_hed_urlresponsei.h" - #include "nw_text_ucs2.h" -#include +#include "nwx_string.h" #include "BrsrStatusCodes.h" /* diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/hed/src/contentLoader.cpp --- a/webengine/wmlengine/src/hed/src/contentLoader.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/hed/src/contentLoader.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - // This module forwards content that is not handled by the browser to the OS // document handler. @@ -28,7 +27,7 @@ #include "ContentLoader.h" #include "MVCShell.h" #include "BrsrStatusCodes.h" -#include +#include #include "StringUtils.h" // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/htmlp/include/CHtmlpParser.h --- a/webengine/wmlengine/src/htmlp/include/CHtmlpParser.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/htmlp/include/CHtmlpParser.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,6 @@ * */ - - /** ----------------------------------------------------------------------- ** @package: NW_HTMLP @@ -32,7 +30,7 @@ #include "nw_htmlp_lexer.h" #include "BrsrStatusCodes.h" #include "nwx_buffer.h" -#include "nw_encoder_wbxmlwriter.h" +#include #ifdef __cplusplus extern "C" { diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/htmlp/src/CHtmlpParser.cpp --- a/webengine/wmlengine/src/htmlp/src/CHtmlpParser.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/htmlp/src/CHtmlpParser.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - /* HTML Parser @@ -25,14 +24,14 @@ #include "nwx_defs.h" #include "CHtmlpParser.h" -#include "nw_string_char.h" +#include #include "BrsrStatusCodes.h" #include "nwx_string.h" #include "nw_htmlp_to_wbxml.h" #include "nw_htmlp_html_dict.h" #include "nw_htmlp_wml_dict.h" -#include "nw_wbxml_dictionary.h" -#include "nw_encoder_stringtable.h" +#include +#include /* " #include "BrsrStatusCodes.h" /* Does not copy the buffer */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/htmlp/src/htmlp_to_wbxml.cpp --- a/webengine/wmlengine/src/htmlp/src/htmlp_to_wbxml.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/htmlp/src/htmlp_to_wbxml.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,9 +15,8 @@ * */ - #include "nwx_defs.h" -#include "nw_encoder_wbxmlwriter.h" +#include #include "CHtmlpParser.h" #include "nw_htmlp_to_wbxml.h" #include "nw_htmlp_dict.h" @@ -25,8 +24,8 @@ #include "nwx_statuscodeconvert.h" #include "BrsrStatusCodes.h" #include "nw_wml1x_wml_1_3_tokens.h" -#include "nw_wbxml_dictionary.h" -#include "nw_encoder_stringtable.h" +#include +#include #include "nwx_logger.h" #include "nwx_http_defs.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/image/include/NW_Image_ImageFactory.h --- a/webengine/wmlengine/src/image/include/NW_Image_ImageFactory.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/image/include/NW_Image_ImageFactory.h Mon Mar 29 12:27:15 2010 +0100 @@ -19,13 +19,10 @@ #ifndef NW_Image_ImageFactory_h #define NW_Image_ImageFactory_h - - - #include "nw_object_core.h" #include "nw_image_abstractimage.h" -#include -#include +#include "nwx_buffer.h" +#include "nwx_http_header.h" #ifdef __cplusplus extern "C" { diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/image/src/Epoc32CannedImages.cpp --- a/webengine/wmlengine/src/image/src/Epoc32CannedImages.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/image/src/Epoc32CannedImages.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,14 +15,14 @@ * */ +#include // First to avoid NULL redefine warning (no #ifndef NULL). +#include -#include // First to avoid NULL redefine warning (no #ifndef NULL). #include "nw_image_cannedimagesi.h" #include "nw_image_epoc32cannedimage.h" #include "nw_text_ascii.h" -#include -#include +#include "nw_browser_browserimages.h" #include "BrsrStatusCodes.h" static TBrowserStatusCode diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/image/src/Epoc32ImageDecoder.cpp --- a/webengine/wmlengine/src/image/src/Epoc32ImageDecoder.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/image/src/Epoc32ImageDecoder.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -46,13 +46,11 @@ #include "nw_lmgr_statictablebox.h" #include "nw_xhtml_xhtml_1_0_tokens.h" #include "nwx_statuscodeconvert.h" -#include "nw_dom_attribute.h" -#include "nw_dom_element.h" -#include "Oma2Agent.h" +#include +#include +#include #include "nwx_ctx.h" - - /* The Media server seems to return a value larger than this if the animation * should end; it is 0xffff x 10; I'm not sure if this is significant. I didn't * find any documentation for this. */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/image/src/Epoc32SimpleImage.cpp --- a/webengine/wmlengine/src/image/src/Epoc32SimpleImage.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/image/src/Epoc32SimpleImage.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #include // First to avoid NULL redefine warning (no #ifndef NULL). #include "nw_image_epoc32simpleimagei.h" #include "Epoc32ImageDecoder.h" @@ -33,8 +32,7 @@ #include #include "BrsrStatusCodes.h" #include "nwx_logger.h" -#include "MemoryManager.h" - +#include // Forward declaration which can't be put inside header file without breaking // compilation of OOC files. @@ -42,7 +40,6 @@ TBrowserStatusCode scaleBitmap( CFbsBitmap* bitmap, CFbsBitmap** scaledBitmap, TRect* rect ); - void _NW_Image_Epoc32SimpleImage_ImageOpened( NW_Image_AbstractImage_t* aAbstractImage, NW_Bool aFailed, NW_Int16 aSuppressDupReformats ) diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/lmgr/include/ObjectUtils.h --- a/webengine/wmlengine/src/lmgr/include/ObjectUtils.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/lmgr/include/ObjectUtils.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,6 @@ * */ - - #ifndef OBJECTUTILS_H #define OBJECTUTILS_H @@ -25,7 +23,7 @@ #include #include "nwx_defs.h" -#include "nw_dom_element.h" +#include // CONSTANTS @@ -202,7 +200,7 @@ * * @return void */ - static void ObjectUtils::RemoveAttributeL( CDesCArray& aNameArray, + static void RemoveAttributeL( CDesCArray& aNameArray, CDesCArray& aValueArray, const TDesC& aName ); /** @@ -212,7 +210,7 @@ * * @return the associated content type of NULL if no association exists. */ - static TDesC* ObjectUtils::GetAssociatedContentType(const TDesC& aClassId); + static TDesC* GetAssociatedContentType(const TDesC& aClassId); /** * Returns the source param name associated with the given class-id. @@ -221,7 +219,7 @@ * * @return the associated source param name of NULL if no association exists. */ - static TDesC* ObjectUtils::GetAssociatedSourceParamName(const TDesC& aClassId); + static TDesC* GetAssociatedSourceParamName(const TDesC& aClassId); /** * General purpose panic function for Object related errors. @@ -239,7 +237,7 @@ * @param aUrl The uri with file name and extension. * @return the content type of the uri */ - static HBufC* ObjectUtils::GetContentTypeByUrl(const TDesC* aUri); + static HBufC* GetContentTypeByUrl(const TDesC* aUri); private: // Private Methods /** @@ -291,7 +289,7 @@ * (either KParamName or KContentType) * @return the value or NULL on out of memory. */ - static TDesC* ObjectUtils::GetClassidAssociation(const TDesC& aClassId, + static TDesC* GetClassidAssociation(const TDesC& aClassId, TInt aValueSelector); }; diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/lmgr/src/BoxFormatHandler.cpp --- a/webengine/wmlengine/src/lmgr/src/BoxFormatHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/lmgr/src/BoxFormatHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,6 @@ * */ - // INCLUDE FILES #include "BoxFormatHandler.h" #include "nwx_logger.h" @@ -31,7 +30,6 @@ #include #include - // EXTERNAL FUNCTION PROTOTYPES // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/lmgr/src/LMgrAbstractTextBox.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrAbstractTextBox.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/lmgr/src/LMgrAbstractTextBox.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #include "nw_lmgr_abstracttextboxi.h" #include "nw_lmgr_splittextbox.h" #include "nw_lmgr_rootbox.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/lmgr/src/LMgrBox.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrBox.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/lmgr/src/LMgrBox.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #include "nw_lmgr_boxi.h" #include "nw_lmgr_rootbox.h" #include "nw_lmgr_marqueebox.h" @@ -45,8 +44,8 @@ #include "BrsrStatusCodes.h" #include "LMgrAnonBlock.h" #include "nw_css_tokentoint.h" -#include "bitdev.h" -#include "aknutils.h" +#include +#include #include "LMgrObjectBoxOOC.h" /* ------------------------------------------------------------------------- * diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/lmgr/src/LMgrContainerBox.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrContainerBox.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/lmgr/src/LMgrContainerBox.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #include "nw_lmgr_containerboxi.h" #include "nw_lmgr_box.h" #include "nw_lmgr_flowbox.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/lmgr/src/LMgrFlowBox.cpp --- a/webengine/wmlengine/src/lmgr/src/LMgrFlowBox.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/lmgr/src/LMgrFlowBox.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -27,7 +27,7 @@ #include "nw_fbox_inputbox.h" #include "nw_lmgr_imgcontainerbox.h" #include "BrsrStatusCodes.h" -#include "MemoryManager.h" +#include /* The static instance of the Flow_Box class object * Flow box is a pure virtual class with several methods diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/markup/include/nw_markup_elementhandler.h --- a/webengine/wmlengine/src/markup/include/nw_markup_elementhandler.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/markup/include/nw_markup_elementhandler.h Mon Mar 29 12:27:15 2010 +0100 @@ -22,7 +22,7 @@ #include "nw_object_base.h" #include "nw_lmgr_containerbox.h" #include "nw_lmgr_activebox.h" -#include "nw_dom_node.h" +#include #include "NW_Markup_EXPORT.h" #include "BrsrStatusCodes.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/markup/src/MARKUPNumberCollector.cpp --- a/webengine/wmlengine/src/markup/src/MARKUPNumberCollector.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/markup/src/MARKUPNumberCollector.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -26,7 +26,7 @@ #include "nw_lmgr_imgcontainerbox.h" #include "nw_fbox_optionbox.h" #include "BrsrStatusCodes.h" -#include "MemoryManager.h" +#include /* ------------------------------------------------------------------------- * private methods diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/markup/src/MARKUPWBXMLModule.cpp --- a/webengine/wmlengine/src/markup/src/MARKUPWBXMLModule.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/markup/src/MARKUPWBXMLModule.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,9 +15,8 @@ * */ - #include "nw_markup_wbxmlmodulei.h" -#include "nw_dom_element.h" +#include #include "nw_hed_domhelper.h" /* ------------------------------------------------------------------------- * diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/markup/src/MARKUPWmlValidator.cpp --- a/webengine/wmlengine/src/markup/src/MARKUPWmlValidator.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/markup/src/MARKUPWmlValidator.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #include "nwx_string.h" #include "nw_wml_core.h" #include "nw_markup_wmlvalidatori.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/markup/src/MARKUPXMLModule.cpp --- a/webengine/wmlengine/src/markup/src/MARKUPXMLModule.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/markup/src/MARKUPXMLModule.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -18,12 +18,11 @@ /*lint --e{767} macro was defined differently in another module */ #include "nw_markup_xmlmodulei.h" -#include "nw_dom_element.h" +#include -#include +#include "nwx_string.h" #include "BrsrStatusCodes.h" - /* ------------------------------------------------------------------------- * class definition * ------------------------------------------------------------------------- */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/object/src/Dynamic.c --- a/webengine/wmlengine/src/object/src/Dynamic.c Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/object/src/Dynamic.c Mon Mar 29 12:27:15 2010 +0100 @@ -15,10 +15,9 @@ * */ - #include "nw_object_dynamici.h" #include "nw_object_aggregatei.h" -#include +#include "nwx_mem.h" #include "BrsrStatusCodes.h" /* ------------------------------------------------------------------------- */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/script/include/scr_core.h --- a/webengine/wmlengine/src/script/include/scr_core.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/script/include/scr_core.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #ifndef SCR_CORE_H #define SCR_CORE_H @@ -26,8 +25,6 @@ #include "nwx_http_header.h" #include "BrsrStatusCodes.h" - - typedef NW_Bool lib_function(void); typedef struct { diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/script/src/nwx_script_handler.c --- a/webengine/wmlengine/src/script/src/nwx_script_handler.c Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/script/src/nwx_script_handler.c Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #include "nwx_defs.h" #include "nwx_mem.h" #include "nwx_string.h" @@ -46,8 +45,6 @@ NW_Msg_t *finishMsg; /* msg alloc'ed at start */ } Script_Context_t; - - /*************************** Global Data ***************************** NOTES: For now we will create a single global variable to hold all of the context for the component. It will be diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/script/src/scr_api.c --- a/webengine/wmlengine/src/script/src/scr_api.c Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/script/src/scr_api.c Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #include "scr_api.h" #include "scr_srv.h" #include "scr_core.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/script/src/scr_core.c --- a/webengine/wmlengine/src/script/src/scr_core.c Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/script/src/scr_core.c Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #include "scr_core.h" #include "scr_conv.h" #include "scr_api.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/script/src/scr_reader.c --- a/webengine/wmlengine/src/script/src/scr_reader.c Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/script/src/scr_reader.c Mon Mar 29 12:27:15 2010 +0100 @@ -38,7 +38,6 @@ #include "nwx_http_defs.h" #include "BrsrStatusCodes.h" - /* prototypes */ NW_Bool read_header_info(NW_Reader_t *r); NW_Bool read_constpool(NW_Reader_t *r); diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/text/include/NW_Text_Abstract.h --- a/webengine/wmlengine/src/text/include/NW_Text_Abstract.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/text/include/NW_Text_Abstract.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #ifndef NW_Text_Abstract_h #define NW_Text_Abstract_h @@ -23,8 +22,8 @@ #include "nw_object_dynamic.h" #include "nw_text_types.h" #include "nw_text_iterator.h" -#include "nw_string_char.h" -#include "nw_string_string.h" +#include +#include #include "BrsrStatusCodes.h" #ifdef __cplusplus diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/text/src/NW_Text_Abstract.c --- a/webengine/wmlengine/src/text/src/NW_Text_Abstract.c Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/text/src/NW_Text_Abstract.c Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #include "NW_Text_AbstractI.h" #include "nw_text_ucs2.h" @@ -23,7 +22,7 @@ #include "nw_text_latin1.h" #include "nw_text_ascii.h" #include "nwx_string.h" -#include "nw_string_string.h" +#include #include "BrsrStatusCodes.h" /* ------------------------------------------------------------------------- * diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/urlloader/include/urlloader_curlloader.h --- a/webengine/wmlengine/src/urlloader/include/urlloader_curlloader.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/urlloader/include/urlloader_curlloader.h Mon Mar 29 12:27:15 2010 +0100 @@ -21,10 +21,10 @@ #define CKUrlLoader_H // INCLUDES +#include + #include "urlloader_murlschemehandler.h" #include "BrsrStatusCodes.h" -#include "BrCtlDefs.h" - // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/urlloader/include/urlloader_urlloaderI.h --- a/webengine/wmlengine/src/urlloader/include/urlloader_urlloaderI.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/urlloader/include/urlloader_urlloaderI.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,16 +15,14 @@ * */ - - #ifndef URLLOADERI_H #define URLLOADERI_H // INCLUDES +#include #include "urlloader_urlloaderint.h" #include "httploader_mlinkresolvercallbacks.h" #include "BrsrStatusCodes.h" -#include "BrCtlDefs.h" #ifdef __cplusplus extern "C" { diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/urlloader/include/urlloader_urlloaderint.h --- a/webengine/wmlengine/src/urlloader/include/urlloader_urlloaderint.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/urlloader/include/urlloader_urlloaderint.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #ifndef URLLOADERINT_H #define URLLOADERINT_H @@ -24,7 +23,6 @@ #include "urlloader_urlresponse.h" #include "BrsrStatusCodes.h" - #ifdef __cplusplus extern "C" { #endif @@ -33,14 +31,13 @@ #define NW_NUM_INSTANCES 3 - // MACROS // DATA TYPES // The "TEnterStatus", relates to what security state the page is going to. // This "page loading" status, is passed in HandleBrowserLoadEventL() using the -// TBrCtlLoadEvent enum. (see BrCtlDefs.h) +// TBrCtlLoadEvent enum. (see brctldefs.h) // These constants must stay in sync with viewshellobserver.h //R diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/urlloader/src/urlloader_curlloader.cpp --- a/webengine/wmlengine/src/urlloader/src/urlloader_curlloader.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/urlloader/src/urlloader_curlloader.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -28,7 +28,7 @@ #include "urlloader_loaderutils.h" #include "fileloader_cfileloader.h" #include "BrsrStatusCodes.h" -#include +#include #include "StringUtils.h" #include "nwx_defs.h" #include "httploader_mlinkresolvercallbacks.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/urlloader/src/urlloader_urlresponse.cpp --- a/webengine/wmlengine/src/urlloader/src/urlloader_urlresponse.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/urlloader/src/urlloader_urlresponse.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - // INCLUDE FILES #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/utils/include/StringUtils.h --- a/webengine/wmlengine/src/utils/include/StringUtils.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/utils/include/StringUtils.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,6 @@ * */ - - #ifndef STRINGUTIL_H #define STRINGUTIL_H @@ -26,7 +24,6 @@ #include "nwx_defs.h" #include - // CLASS DECLARATION /** diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/utils/include/nw_loadreq.h --- a/webengine/wmlengine/src/utils/include/nw_loadreq.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/utils/include/nw_loadreq.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #ifndef NW_LOADREQ_H #define NW_LOADREQ_H @@ -38,7 +37,6 @@ ** Preprocessor Macro Definitions */ - #ifdef __cplusplus extern "C" { #endif diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/utils/include/nwx_multipart_generator.h --- a/webengine/wmlengine/src/utils/include/nwx_multipart_generator.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/utils/include/nwx_multipart_generator.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #ifndef NWX_MULTIPART_GENERATOR_H #define NWX_MULTIPART_GENERATOR_H diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/utils/include/nwx_osu_file.h --- a/webengine/wmlengine/src/utils/include/nwx_osu_file.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/utils/include/nwx_osu_file.h Mon Mar 29 12:27:15 2010 +0100 @@ -23,7 +23,6 @@ extern "C" { #endif - /* ** Includes */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/utils/src/CBrowserSettings.cpp --- a/webengine/wmlengine/src/utils/src/CBrowserSettings.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/utils/src/CBrowserSettings.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,11 +15,10 @@ * */ - #include #include "CBrowserSettings.h" -#include +#include #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/utils/src/CReferrerHelper.cpp --- a/webengine/wmlengine/src/utils/src/CReferrerHelper.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/utils/src/CReferrerHelper.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #include "CReferrerHelper.h" #include "urlloader_urlloaderint.h" #include "nwx_http_defs.h" // For NW_URL_METHOD_GET diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/utils/src/ImageUtils.cpp --- a/webengine/wmlengine/src/utils/src/ImageUtils.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/utils/src/ImageUtils.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,6 @@ * */ - - // INCLUDE FILES #include diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/utils/src/TEncodingMapping.cpp --- a/webengine/wmlengine/src/utils/src/TEncodingMapping.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/utils/src/TEncodingMapping.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #include "TEncodingMapping.h" #include "nwx_http_defs.h" #include "nwx_defs.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/utils/src/nw_loadreq.cpp --- a/webengine/wmlengine/src/utils/src/nw_loadreq.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/utils/src/nw_loadreq.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - /* **------------------------------------------------------------------------- ** Component Generic Include @@ -32,7 +31,7 @@ #include "nwx_url_utils.h" #include "nw_nvpair.h" #include "nw_wae_reader.h" -#include "nw_string_string.h" +#include #include "nwx_http_defs.h" #include "nwx_settings.h" #include "nwx_statuscodeconvert.h" @@ -45,7 +44,6 @@ #include "nw_loadreq.h" #include "urlloader_urlloaderint.h" #include "BrsrStatusCodes.h" -#include "nwx_http_defs.h" /* **------------------------------------------------------------------------- diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/utils/src/nw_nvpair.c --- a/webengine/wmlengine/src/utils/src/nw_nvpair.c Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/utils/src/nw_nvpair.c Mon Mar 29 12:27:15 2010 +0100 @@ -146,7 +146,7 @@ NW_ASSERT( thisObj->strTable == NULL ); NW_ASSERT( name != NULL ); - if (name[0] == '\0') { + if (name[0] == '\0' || value[0] == '\0') { return KBrsrSuccess; } diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/utils/src/nwx_multipart_generator.cpp --- a/webengine/wmlengine/src/utils/src/nwx_multipart_generator.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/utils/src/nwx_multipart_generator.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #include "nwx_defs.h" #include "nwx_http_defs.h" #include "nwx_string.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/utils/src/nwx_osu_epoc32.cpp --- a/webengine/wmlengine/src/utils/src/nwx_osu_epoc32.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/utils/src/nwx_osu_epoc32.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -27,7 +27,7 @@ #include "nwx_osu_epoc32.h" #include "nwx_logger.h" #include "nwx_string.h" -#include +#include #include "BrsrStatusCodes.h" /* diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/utils/src/nwx_osu_file_epoc32.cpp --- a/webengine/wmlengine/src/utils/src/nwx_osu_file_epoc32.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/utils/src/nwx_osu_file_epoc32.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - /* **------------------------------------------------------------------------- ** Include Files @@ -31,7 +30,6 @@ #include #include "BrsrStatusCodes.h" - /* **------------------------------------------------------------------------- ** Defines diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/utils/src/nwx_settings_epoc32.cpp --- a/webengine/wmlengine/src/utils/src/nwx_settings_epoc32.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/utils/src/nwx_settings_epoc32.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - /* **------------------------------------------------------------------------- ** Include Files diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/utils/src/nwx_sprintf.c --- a/webengine/wmlengine/src/utils/src/nwx_sprintf.c Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/utils/src/nwx_sprintf.c Mon Mar 29 12:27:15 2010 +0100 @@ -33,7 +33,7 @@ #include "nwx_url_utils.h" #include -#include /* FLT_DIG */ +#include "float.h" /* FLT_DIG */ /*lint -save -e794, -e661 Conceivable use of null pointer, Possible access of out-of-bounds pointer*/ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/utils/src/nwx_url_utils.c --- a/webengine/wmlengine/src/utils/src/nwx_url_utils.c Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/utils/src/nwx_url_utils.c Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,6 @@ * */ - - /***************************************************************** ** File name: nwx_url_utils.c ** Part of: Url Utils (NW) @@ -24,7 +22,6 @@ ** to the standards defined in RFC 2396. ******************************************************************/ - /* **------------------------------------------------------------------------- ** Include Files diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/wml/include/nw_evlog_api.h --- a/webengine/wmlengine/src/wml/include/nw_evlog_api.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/wml/include/nw_evlog_api.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #ifndef NW_EVLOG_API_H #define NW_EVLOG_API_H diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/wml/include/nw_wae.h --- a/webengine/wmlengine/src/wml/include/nw_wae.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/wml/include/nw_wae.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - /*************************************************************************** ** File: nw_wae.h ** Subsystem Name: WAE User Agent @@ -45,7 +44,6 @@ #include "wml_wae_transaction.h" #include "BrsrStatusCodes.h" - /* */ /* Spectrum uses the new SIA/OTA Push application, which registers directly */ /* with the WSP stack, rather than the Rainbow OEM Push handlering code */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/wml/include/nw_wml_core.h --- a/webengine/wmlengine/src/wml/include/nw_wml_core.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/wml/include/nw_wml_core.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - /* $Workfile: nw_wml_core.h $ @@ -55,10 +54,8 @@ #include "urlloader_urlresponse.h" #include "BrsrStatusCodes.h" - #define MAX_NUMBER_INTRA_OEF 15 /* the value is so chosen that the call stack does not max out - Vishy*/ - /*--------------------------------------------------------------------- * NW_Wml_History_t -- history stack element -- holds information needed * to reconstruct the call to access a card we've been to recently. diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/wml/include/nw_wml_list.h --- a/webengine/wmlengine/src/wml/include/nw_wml_list.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/wml/include/nw_wml_list.h Mon Mar 29 12:27:15 2010 +0100 @@ -33,7 +33,7 @@ #endif #include "nwx_defs.h" -#include "nwx_status.h" +#include #include "nwx_memseg.h" /* A single linked list with a dummy element first */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/wml/include/nw_wml_url_utils.h --- a/webengine/wmlengine/src/wml/include/nw_wml_url_utils.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/wml/include/nw_wml_url_utils.h Mon Mar 29 12:27:15 2010 +0100 @@ -34,9 +34,8 @@ extern "C" { #endif - #include "nw_wml_core.h" -#include "nwx_status.h" +#include #ifdef __cplusplus } /* extern "C" */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/wml/include/nw_wml_var.h --- a/webengine/wmlengine/src/wml/include/nw_wml_var.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/wml/include/nw_wml_var.h Mon Mar 29 12:27:15 2010 +0100 @@ -35,7 +35,7 @@ #include "nwx_defs.h" #include "nwx_memseg.h" -#include "nwx_status.h" +#include typedef struct _NW_Wml_Var_t NW_Wml_Var_t; struct _NW_Wml_Var_t { diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/wml/include/nw_wtai_api.h --- a/webengine/wmlengine/src/wml/include/nw_wtai_api.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/wml/include/nw_wtai_api.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - /***************************************************************** ** File name: wml_wtai_api.h ** Part of: WAE @@ -29,7 +28,6 @@ extern "C" { #endif - /* **------------------------------------------------------------------------- ** Include Files @@ -40,7 +38,6 @@ #include "nwx_http_header.h" #include "BrsrStatusCodes.h" - /* **------------------------------------------------------------------------- ** Macros diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/wml/include/wml_core.h --- a/webengine/wmlengine/src/wml/include/wml_core.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/wml/include/wml_core.h Mon Mar 29 12:27:15 2010 +0100 @@ -37,5 +37,4 @@ #include "wml_list.h" #include "wml_api.h" - #endif /* WML_CORE_H */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/wml/include/wml_deck.h --- a/webengine/wmlengine/src/wml/include/wml_deck.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/wml/include/wml_deck.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #ifndef WML_DECK_H #define WML_DECK_H diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/wml/include/wml_decoder.h --- a/webengine/wmlengine/src/wml/include/wml_decoder.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/wml/include/wml_decoder.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #ifndef WML_DECODER_H #define WML_DECODER_H @@ -32,7 +31,6 @@ #include "nw_hed_context.h" #include "BrsrStatusCodes.h" - #ifdef __cplusplus extern "C" { #endif diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/wml/src/WMLWae.cpp --- a/webengine/wmlengine/src/wml/src/WMLWae.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/wml/src/WMLWae.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -18,7 +18,6 @@ * */ - /* **------------------------------------------------------------------------- ** Include Files @@ -44,7 +43,6 @@ **------------------------------------------------------------------------- */ - /* **------------------------------------------------------------------------- ** Internal Prototypes diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/wml/src/WMLhistory.cpp --- a/webengine/wmlengine/src/wml/src/WMLhistory.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/wml/src/WMLhistory.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -35,8 +35,7 @@ #include "nwx_ctx.h" #include "nw_hed_documentroot.h" #include "BrsrStatusCodes.h" -#include "MemoryManager.h" - +#include /*------------------------------------------------------------------------ * StringCopy -- makes a copy of src string, puts its address in *dest, diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/wml/src/wml_deck_iter.c --- a/webengine/wmlengine/src/wml/src/wml_deck_iter.c Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/wml/src/wml_deck_iter.c Mon Mar 29 12:27:15 2010 +0100 @@ -15,12 +15,11 @@ * */ - -#include +#include "nwx_logger.h" -#include "nw_dom_text.h" +#include #include "wml_deck_iter.h" -#include "nw_dom_document.h" +#include #include "BrsrStatusCodes.h" static NW_DOM_Node_t* x_GetNextElement_AllChildren (NW_Wml_DeckIter_t* thisObj) diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/wml/src/wml_wae_reader.c --- a/webengine/wmlengine/src/wml/src/wml_wae_reader.c Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/wml/src/wml_wae_reader.c Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,6 @@ * */ - #include "nw_wae_reader.h" #include "nwx_defs.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/wml1x/include/nw_wml1x_wml1xcontenthandler.h --- a/webengine/wmlengine/src/wml1x/include/nw_wml1x_wml1xcontenthandler.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/wml1x/include/nw_wml1x_wml1xcontenthandler.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #ifndef NW_WML1X_CONTENTHANDLER_H #define NW_WML1X_CONTENTHANDLER_H @@ -30,10 +29,9 @@ #include "nw_text_ucs2.h" #include "nw_adt_dynamicvector.h" #include "nw_wml1x_wml1xformliaison.h" -#include "nw_tinydom_utils.h" +#include #include "BrsrStatusCodes.h" - #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/wml1x/src/Epoc32Wml1xActiveEvent.cpp --- a/webengine/wmlengine/src/wml1x/src/Epoc32Wml1xActiveEvent.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/wml1x/src/Epoc32Wml1xActiveEvent.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #include // resolves NULL redefinition warning. #include "nw_wml1x_wml1xcontenthandler.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/wml1x/src/WML1XApi.cpp --- a/webengine/wmlengine/src/wml1x/src/WML1XApi.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/wml1x/src/WML1XApi.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - /* Includes */ #include "nwx_string.h" #include "nwx_url_utils.h" @@ -67,10 +66,10 @@ #include "nw_wml1x_wml1xapi.h" #include "nwx_http_defs.h" #include "BrsrStatusCodes.h" -#include "BodyPart.h" +#include #include "MVCShell.h" #include "BrCtl.h" -#include "MemoryManager.h" +#include /* **------------------------------------------------------------------------- diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/wml1x/src/WML1XContentHandler.cpp --- a/webengine/wmlengine/src/wml1x/src/WML1XContentHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/wml1x/src/WML1XContentHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -31,7 +31,7 @@ #include "nw_lmgr_cssproperties.h" #include "nw_imagech_epoc32contenthandler.h" #include "nwx_string.h" -#include "stdarg.h" +#include #include "nw_lmgr_bidiflowbox.h" #include "nw_wml1x_wml1xdefaultstylesheet.h" #include "nw_image_cannedimages.h" @@ -39,7 +39,7 @@ #include "nwx_osu.h" #include "wml_url_utils.h" #include "wml_history.h" -#include "nw_xmlp_xmlp2wbxml.h" +#include #include "nwx_settings.h" #include "nw_wml1x_wml_1_3_tokens.h" #include "wml_elm_attr.h" @@ -63,7 +63,6 @@ #include "BrsrStatusCodes.h" #include "HEDDocumentListener.h" - #include "wmlcontrol.h" /* ------------------------------------------------------------------------- * diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/wml1x/src/WML1XEventHandler.cpp --- a/webengine/wmlengine/src/wml1x/src/WML1XEventHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/wml1x/src/WML1XEventHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,7 @@ * */ - -#include +#include "nw_wml_core.h" #include "nw_hed_documentrooti.h" #include "nw_wml1x_wml1xeventhandleri.h" #include "nw_lmgr_cssproperties.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/wml1x/src/WML1XFormLiaison.cpp --- a/webengine/wmlengine/src/wml1x/src/WML1XFormLiaison.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/wml1x/src/WML1XFormLiaison.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #include "nw_wml_core.h" #include "wml_url_utils.h" #include "wml_task.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/wmlcontrol/include/WmlControl.h --- a/webengine/wmlengine/src/wmlcontrol/include/WmlControl.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/wmlcontrol/include/WmlControl.h Mon Mar 29 12:27:15 2010 +0100 @@ -21,7 +21,7 @@ // INCLUDES #include #include -#include "BrCtlDefs.h" +#include #include "BrCtl.h" #include "WmlEngineInterface.h" @@ -97,7 +97,7 @@ // Sets the WmlLink void SetWmlLink(TBool aLink) { iWmlLink = aLink; } // Returns to the Browser Control info about the wml page - HBufC* CWmlControl::PageInfoLC(TBrCtlDefs::TBrCtlPageInfo aBrCtlPageInfo); + HBufC* PageInfoLC(TBrCtlDefs::TBrCtlPageInfo aBrCtlPageInfo); /** * Update a Browser setting diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/wmlcontrol/include/WmlEngineDefs.h --- a/webengine/wmlengine/src/wmlcontrol/include/WmlEngineDefs.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/wmlcontrol/include/WmlEngineDefs.h Mon Mar 29 12:27:15 2010 +0100 @@ -19,13 +19,6 @@ #define WMLENGINEDEFS_H // INCLUDES -//#include -//#include -//#include "BrCtlDefs.h" - -//#include "BrCtl.h" -//#include "WebKitLoader.h" - // CONSTANTS @@ -51,15 +44,14 @@ enum TWMLOptions { WML_OPTION_UNKNOWN = 1, - WML_OPTION_ACCEPT = 2, + WML_OPTION_ACCEPT = 2, WML_OPTION_PREV = 3, WML_OPTION_HELP = 4, - WML_OPTION_RESET = 5, + WML_OPTION_RESET = 5, WML_OPTION_OPTIONS = 6, WML_OPTION_DELETE = 7 }; }; - #endif // WMLENGINEDEFS_H // End of File diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/wmlcontrol/include/WmlEngineInterface.h --- a/webengine/wmlengine/src/wmlcontrol/include/WmlEngineInterface.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/wmlcontrol/include/WmlEngineInterface.h Mon Mar 29 12:27:15 2010 +0100 @@ -22,13 +22,11 @@ #include #include -#include "BrCtlDefs.h" -#include "WmlEngineDefs.h" - +#include +#include // CONSTANTS - //Forword declrartion; class CBrCtl; class MWmlInterface; diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/wmlcontrol/src/WmlContentInterface.cpp --- a/webengine/wmlengine/src/wmlcontrol/src/WmlContentInterface.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/wmlcontrol/src/WmlContentInterface.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,6 @@ * */ - - // INCLUDES #include #include "BrsrStatusCodes.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/wmlcontrol/src/WmlControl.cpp --- a/webengine/wmlengine/src/wmlcontrol/src/WmlControl.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/wmlcontrol/src/WmlControl.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,10 +15,9 @@ * */ - // INCLUDES #include "WmlControl.h" -#include "MultipartParser.h" +#include #include "MVCView.h" #include "MVCShell.h" #include "WmlInterface.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/wmlscriptch/include/nw_wmlscriptch_iwmlbrowserlib.h --- a/webengine/wmlengine/src/wmlscriptch/include/nw_wmlscriptch_iwmlbrowserlib.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/wmlscriptch/include/nw_wmlscriptch_iwmlbrowserlib.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #ifndef NW_WMLSCH_IWMLBROWSERLIB_H #define NW_WMLSCH_IWMLBROWSERLIB_H @@ -27,19 +26,16 @@ extern "C" { #endif /* __cplusplus */ - /* ------------------------------------------------------------------------- * forward declarations * ------------------------------------------------------------------------- */ typedef struct NW_WmlsCh_IWmlBrowserLib_Class_s NW_WmlsCh_IWmlBrowserLib_Class_t; typedef struct NW_WmlsCh_IWmlBrowserLib_s NW_WmlsCh_IWmlBrowserLib_t; - /* ------------------------------------------------------------------------- * method type prototypes * ------------------------------------------------------------------------- */ - typedef TBrowserStatusCode (*NW_WmlsCh_IWmlBrowserLib_Init_t) (NW_WmlsCh_IWmlBrowserLib_t *wmlBrowser); diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/wmlscriptch/include/nw_wmlscriptch_wmlscriptcontenthandler.h --- a/webengine/wmlengine/src/wmlscriptch/include/nw_wmlscriptch_wmlscriptcontenthandler.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/wmlscriptch/include/nw_wmlscriptch_wmlscriptcontenthandler.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #ifndef NW_WMLSCRIPT_CONTENTHANDLER_H #define NW_WMLSCRIPT_CONTENTHANDLER_H diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/wmlscriptch/src/WMLSCRIPTCHContentHandler.cpp --- a/webengine/wmlengine/src/wmlscriptch/src/WMLSCRIPTCHContentHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/wmlscriptch/src/WMLSCRIPTCHContentHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -22,7 +22,7 @@ #include "nw_wae.h" #include "nwx_ctx.h" #include "nwx_string.h" -#include "stdarg.h" +#include #include "BrsrStatusCodes.h" /*lint -restore */ diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/wmlscriptch/src/WMLSCRIPTCHScrProxyApi.cpp --- a/webengine/wmlengine/src/wmlscriptch/src/WMLSCRIPTCHScrProxyApi.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/wmlscriptch/src/WMLSCRIPTCHScrProxyApi.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -38,7 +38,7 @@ #include "nwx_http_header.h" #include "nw_wmlscriptch_wmlscriptcontenthandler.h" #include "BrsrStatusCodes.h" -#include "MemoryManager.h" +#include /* **------------------------------------------------------------------------- diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/xhtml/include/ImageMapPopup.h --- a/webengine/wmlengine/src/xhtml/include/ImageMapPopup.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/xhtml/include/ImageMapPopup.h Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,6 @@ * */ - #ifndef __IMAGEMAPPOPUP_H #define __IMAGEMAPPOPUP_H diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/xhtml/include/XhtmlObjectElementHandler.h --- a/webengine/wmlengine/src/xhtml/include/XhtmlObjectElementHandler.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/xhtml/include/XhtmlObjectElementHandler.h Mon Mar 29 12:27:15 2010 +0100 @@ -25,7 +25,7 @@ #include #include "nwx_defs.h" -#include "nw_dom_node.h" +#include #include "HedLoadObserver.h" #include "LMgrBoxDestructionListener.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/xhtml/include/XhtmlTableElementHandler.h --- a/webengine/wmlengine/src/xhtml/include/XhtmlTableElementHandler.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/xhtml/include/XhtmlTableElementHandler.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,6 @@ * */ - - #ifndef CXHTMLTABLEELEMENTHANDLER__H #define CXHTMLTABLEELEMENTHANDLER__H @@ -25,8 +23,7 @@ #include #include "nwx_defs.h" -#include "nw_dom_node.h" - +#include // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/xhtml/include/nw_basicforms_xhtmlcontrolset.h --- a/webengine/wmlengine/src/xhtml/include/nw_basicforms_xhtmlcontrolset.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/xhtml/include/nw_basicforms_xhtmlcontrolset.h Mon Mar 29 12:27:15 2010 +0100 @@ -20,7 +20,7 @@ #define NW_XHTML_XHTMLCONTROLSET_H #include "nw_object_dynamic.h" -#include "nw_dom_node.h" +#include #include "nw_adt_dynamicvector.h" #include "BrsrStatusCodes.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/xhtml/include/nw_xhtml_attributepropertytable.h --- a/webengine/wmlengine/src/xhtml/include/nw_xhtml_attributepropertytable.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/xhtml/include/nw_xhtml_attributepropertytable.h Mon Mar 29 12:27:15 2010 +0100 @@ -20,7 +20,7 @@ #define NW_XHTML_ATTRIBUTEPROPERTYTABLE_H #include "nw_object_base.h" -#include "nw_dom_node.h" +#include #include "nw_lmgr_cssproperties.h" #include "nw_text_coretextelementhandleri.h" #include "nw_xhtml_xhtml_1_0_tokens.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/xhtml/include/nw_xhtml_elementhandler.h --- a/webengine/wmlengine/src/xhtml/include/nw_xhtml_elementhandler.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/xhtml/include/nw_xhtml_elementhandler.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,14 +15,13 @@ * */ - #ifndef NW_XHTML_ELEMENTHANDLER_H #define NW_XHTML_ELEMENTHANDLER_H #include "nw_object_base.h" #include "nw_lmgr_containerbox.h" #include "nw_lmgr_activebox.h" -#include "nw_dom_node.h" +#include #include "nw_lmgr_cssproperties.h" #include "nw_xhtml_xhtml_1_0_tokens.h" #include "BrsrStatusCodes.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/xhtml/include/nw_xhtml_xhtmlcontenthandler.h --- a/webengine/wmlengine/src/xhtml/include/nw_xhtml_xhtmlcontenthandler.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/xhtml/include/nw_xhtml_xhtmlcontenthandler.h Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #ifndef _NW_XHTML_ContentHandler_h_ #define _NW_XHTML_ContentHandler_h_ @@ -30,7 +29,7 @@ #include "nw_markup_numbercollector.h" #include "nw_markup_module.h" #include "nw_system_timer.h" -#include "nw_tinydom_utils.h" +#include #include "nw_xhtml_elementhandler.h" #include "nwx_http_header.h" #include "BrsrStatusCodes.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/xhtml/src/BasicForms/XHTMLFormLiaison.cpp --- a/webengine/wmlengine/src/xhtml/src/BasicForms/XHTMLFormLiaison.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/xhtml/src/BasicForms/XHTMLFormLiaison.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,15 +15,15 @@ * */ - #include #include #include #include #include +#include + #include "BrCtl.h" -#include "BrCtlDialogsProvider.h" #include "BrsrStatusCodes.h" #include "MVCShell.h" @@ -31,7 +31,7 @@ #include "nw_adt_mapiterator.h" #include "nw_basicforms_xhtmlformliaisoni.h" //#include "nw_ecma_contenthandler.h" -#include "nw_dom_document.h" +#include #include "nw_dom_domvisitor.h" #include "nw_fbox_formbox.h" #include "nw_fbox_optgrpbox.h" @@ -46,7 +46,6 @@ //R->ul #include "urlloader_urlloaderint.h" #include "TEncodingMapping.h" - // LOCAL CONSTANTS _LIT(KEmptyTitle, ""); diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/xhtml/src/BasicForms/XHTMLInputElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/BasicForms/XHTMLInputElementHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/xhtml/src/BasicForms/XHTMLInputElementHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,8 +15,6 @@ * */ - - #include "nw_basicforms_inputelementhandleri.h" #include "nw_basicforms_xhtmlformliaison.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/xhtml/src/Frame/XHTMLFrameElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/Frame/XHTMLFrameElementHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/xhtml/src/Frame/XHTMLFrameElementHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,9 +15,7 @@ * */ - #include "nw_frame_frameelementhandleri.h" - #include "nw_xhtml_xhtmlcontenthandler.h" #include "nw_hed_hedeventhandler.h" #include "nw_hed_documentroot.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/xhtml/src/Hypertext/XHTMLAElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/Hypertext/XHTMLAElementHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/xhtml/src/Hypertext/XHTMLAElementHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,6 @@ #include "nw_hypertext_aelementhandleri.h" - #include "nw_xhtml_xhtmlcontenthandler.h" #include "nw_hed_hedeventhandler.h" #include "nw_hed_documentroot.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/xhtml/src/Image/ImageMapPopup.cpp --- a/webengine/wmlengine/src/xhtml/src/Image/ImageMapPopup.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/xhtml/src/Image/ImageMapPopup.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -19,7 +19,7 @@ #include "ImageMapPopup.h" - +#include #include #include #include @@ -317,8 +317,13 @@ // void CImageMapPopup::HandleListBoxEventL( CEikListBox* /*aListBox*/, TListBoxEvent aEventType ) { +#ifdef BRDO_SINGLE_CLICK_ENABLED_FF if(aEventType == MEikListBoxObserver::EEventItemDoubleClicked || + aEventType == MEikListBoxObserver::EEventEnterKeyPressed || aEventType == EEventItemSingleClicked) +#else + if(aEventType == MEikListBoxObserver::EEventItemDoubleClicked || aEventType == MEikListBoxObserver::EEventEnterKeyPressed) +#endif { AttemptExitL( ETrue ); } diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/xhtml/src/Image/areaElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/Image/areaElementHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/xhtml/src/Image/areaElementHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - // INCLUDE FILES #include "nw_image_areaelementhandleri.h" #include "nw_xhtml_xhtmlcontenthandler.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/xhtml/src/Image/imgElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/Image/imgElementHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/xhtml/src/Image/imgElementHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - // INCLUDE FILES #include "nw_image_imgelementhandleri.h" #include "nw_image_virtualimage.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/xhtml/src/Link/XHTMLLinkElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/Link/XHTMLLinkElementHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/xhtml/src/Link/XHTMLLinkElementHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,10 +15,9 @@ * */ - #include "nw_link_linkelementhandleri.h" #include "nw_xhtml_xhtmlcontenthandler.h" -#include "nw_dom_document.h" +#include #include "nw_xhtml_xhtml_1_0_tokens.h" #include "nwx_string.h" #include "BrsrStatusCodes.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/xhtml/src/Object/XhtmlObjectElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/Object/XhtmlObjectElementHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/xhtml/src/Object/XhtmlObjectElementHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - // INCLUDE FILES #include #include @@ -49,7 +48,6 @@ #include "nwx_http_defs.h" #include "urlloader_urlresponse.h" - // ============================ MEMBER FUNCTIONS =============================== // ----------------------------------------------------------------------------- diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/xhtml/src/Structure/XHTMLTitleElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/Structure/XHTMLTitleElementHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/xhtml/src/Structure/XHTMLTitleElementHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,15 +15,13 @@ * */ - #include "nw_structure_titleelementhandleri.h" #include "nw_xhtml_xhtmlcontenthandler.h" #include "nw_text_ucs2.h" -#include "nw_dom_text.h" -#include +#include +#include "nwx_string.h" #include "BrsrStatusCodes.h" -#include "MemoryManager.h" - +#include /* ------------------------------------------------------------------------- * class definition diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/xhtml/src/Structure/scriptElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/Structure/scriptElementHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/xhtml/src/Structure/scriptElementHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -18,9 +18,14 @@ // INCLUDE FILES #include #include +#include +#include -#include +#include +#include + // User Includes +#include "nwx_string.h" #include "ecmadll.h" #include "XhtmlTableElementHandlerOOC.h" #include "nw_lmgr_statictablebox.h" @@ -37,29 +42,21 @@ #include "nw_basicforms_inputelementhandler.h" #include "nw_structure_scriptelementhandleri.h" #include "nw_xhtml_xhtmlcontenthandler.h" -#include "nw_dom_document.h" #include "nw_htmlp_to_wbxml.h" #include "nw_lmgr_slavepropertylist.h" #include "nw_xhtml_xhtml_1_0_tokens.h" #include "nw_text_ucs2.h" -#include "nw_dom_text.h" +#include #include "nw_dom_domvisitor.h" -#include "nw_tinydom.h" -#include "nw_dom_element.h" -#include "nw_dom_document.h" +#include +#include +#include -#include -#include - -#include -#include - -#include #include "nw_ecma_contenthandler.h" #include "nw_lmgr_textbox.h" #include "nwx_http_defs.h" +#include "nwx_logger.h" -#include "nwx_logger.h" _LIT(KScriptLanguage, "javascript"); _LIT(KScriptType1, "text/javascript"); _LIT(KScriptType2, "text/ecmascript"); diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/xhtml/src/Style/XHTMLStyleElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/Style/XHTMLStyleElementHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/xhtml/src/Style/XHTMLStyleElementHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -21,8 +21,8 @@ #include "nw_link_linkelementhandleri.h" #include "nw_xhtml_xhtmlcontenthandler.h" -#include "nw_dom_text.h" -#include "nw_dom_document.h" +#include +#include #include "BrsrStatusCodes.h" /* ------------------------------------------------------------------------- * diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/xhtml/src/Text/XHTMLHrElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/Text/XHTMLHrElementHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/xhtml/src/Text/XHTMLHrElementHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -19,7 +19,7 @@ #include "nw_text_hrelementhandleri.h" #include "nw_xhtml_xhtmlcontenthandler.h" -#include "nw_dom_document.h" +#include #include "nw_lmgr_rulebox.h" #include "NW_Text_Abstract.h" #include "nw_dom_domvisitor.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/xhtml/src/Variables.c --- a/webengine/wmlengine/src/xhtml/src/Variables.c Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/xhtml/src/Variables.c Mon Mar 29 12:27:15 2010 +0100 @@ -17,9 +17,8 @@ #include "nw_xhtml_variablesi.h" - #include "nw_adt_segmentedvector.h" -#include +#include "nwx_string.h" #include "BrsrStatusCodes.h" /* ------------------------------------------------------------------------- * diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/xhtml/src/XHTMLAttributePropertyTable.cpp --- a/webengine/wmlengine/src/xhtml/src/XHTMLAttributePropertyTable.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/xhtml/src/XHTMLAttributePropertyTable.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,11 +15,10 @@ * */ - #include "nwx_string.h" #include "nwx_settings.h" #include "BrsrStatusCodes.h" -#include "nw_dom_node.h" +#include #include "nw_css_tokentoint.h" #include "nw_lmgr_cssproperties.h" #include "nw_lmgr_propertylist.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/xhtml/src/XHTMLContentHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/XHTMLContentHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/xhtml/src/XHTMLContentHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - // INCLUDE FILES #include // To avoid NULL redefine warning (no #ifndef NULL) @@ -36,7 +35,6 @@ #include #include - #include "nwx_string.h" #include "nw_xhtml_xhtmlcontenthandleri.h" @@ -52,13 +50,13 @@ #include "nw_hed_inumbercollectori.h" #include "nw_lmgr_bidiflowbox.h" #include "nw_dom_domvisitor.h" -#include "nw_tinydom.h" -#include "nw_dom_element.h" -#include "nw_dom_document.h" +#include +#include +#include #include "nw_adt_segmentedvector.h" #include "nw_adt_resizableobjectvector.h" #include "nw_adt_mapiterator.h" -#include "nw_xmlp_xmlp2wbxml.h" +#include #include "nw_htmlp_to_wbxml.h" #include "nwx_url_utils.h" #include "nwx_string.h" @@ -91,11 +89,10 @@ #include "nw_structure_scriptelementhandler.h" #include "XhtmlObjectElementHandlerOOCi.h" #include "XHTMLMessageListener.h" -#include "BodyPart.h" +#include #include "MVCShell.h" #include "BrCtl.h" - #include #include "CReferrerHelper.h" #include "CSSVariableStyleSheet.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/xhtml/src/XHTMLElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/XHTMLElementHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/xhtml/src/XHTMLElementHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -38,8 +38,8 @@ #include "nw_link_linkelementhandler.h" #include "nw_base_baseelementhandler.h" #include "nw_xhtml_textelementhandler.h" -#include "nw_dom_element.h" -#include "nw_dom_document.h" +#include +#include #include "nw_xhtml_attributepropertytable.h" #include "nw_css_defaultstylesheet.h" #include "nw_xhtml_xhtml_1_0_tokens.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/xhtml/src/XHTMLEpoc32ContentHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/XHTMLEpoc32ContentHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/xhtml/src/XHTMLEpoc32ContentHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,7 +15,6 @@ * */ - #include "BrsrStatusCodes.h" #include "nw_xhtml_epoc32contenthandleri.h" #include "nw_structure_structuremodule.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/xhtml/src/XHTMLPiElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/XHTMLPiElementHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/xhtml/src/XHTMLPiElementHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,16 +15,15 @@ * */ - #include "nw_xhtml_pielementhandleri.h" #include "nw_xhtml_xhtmlcontenthandler.h" -#include "nw_dom_document.h" +#include #include "nw_htmlp_to_wbxml.h" #include "nw_xhtml_xhtml_1_0_tokens.h" #include "nwx_string.h" #include "nw_link_linkelementhandler.h" #include -#include +#include "nwx_settings.h" #include "nwx_statuscodeconvert.h" #include "BrsrStatusCodes.h" #include "nwx_http_defs.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wmlengine/src/xhtml/src/XHTMLTextElementHandler.cpp --- a/webengine/wmlengine/src/xhtml/src/XHTMLTextElementHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wmlengine/src/xhtml/src/XHTMLTextElementHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -19,7 +19,7 @@ #include "nw_xhtml_textelementhandleri.h" #include "nw_lmgr_textbox.h" -#include "nw_dom_text.h" +#include #include "nw_xhtml_xhtmlcontenthandler.h" #include "nw_hed_documentroot.h" #include "nw_hed_hedeventhandler.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wrtharvester/data/2001FE2C.rss --- a/webengine/wrtharvester/data/2001FE2C.rss Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wrtharvester/data/2001FE2C.rss Mon Mar 29 12:27:15 2010 +0100 @@ -17,7 +17,7 @@ // INCLUDES -#include +#include #include // RESOURCE DEFINITIONS diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wrtharvester/group/bld.inf --- a/webengine/wrtharvester/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wrtharvester/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ #include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" #ifdef BRDO_WRT_HS_FF diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wrtharvester/group/wrtharvester.mmp --- a/webengine/wrtharvester/group/wrtharvester.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wrtharvester/group/wrtharvester.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -20,7 +20,7 @@ UID 0x10009D8D 0x2001FE2C #include -#include +#include CAPABILITY CAP_ECOM_PLUGIN @@ -32,7 +32,7 @@ SOURCE wrtusbhandler.cpp MW_LAYER_SYSTEMINCLUDE -MW_LAYER_ECOM_SYSTEMINCLUDE + USERINCLUDE ../inc START RESOURCE ../data/2001FE2C.rss @@ -40,6 +40,7 @@ END START RESOURCE ../data/wrtharvester.rss +DEPENDS avkon.rsg HEADER TARGET wrtharvester.rsc TARGETPATH resource @@ -65,5 +66,6 @@ LIBRARY cone.lib // CoeControl LIBRARY CommonEngine.lib LIBRARY ws32.lib +LIBRARY PlatformEnv.lib //end of file diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wrtharvester/inc/wrtharvester.h --- a/webengine/wrtharvester/inc/wrtharvester.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wrtharvester/inc/wrtharvester.h Mon Mar 29 12:27:15 2010 +0100 @@ -32,7 +32,7 @@ class MLiwInterface; class CLiwGenericParamList; class CWrtInfo; -class CWidgetMMCHandler; +class CWrtUsbHandler; // CONSTANTS @@ -113,11 +113,18 @@ */ void QueueOperationL( TWidgetOperations aOperation, TUid aUid ); - void DialogShown(){ iDialogShown = EFalse; } //to check if the device is in mass memory mode TInt IsInMSMode() { return iMSMode; } void SetMSMode(TInt val) { iMSMode = val; } - + //To check if registry can be accessed + TInt CanAccessRegistry(){ return iCanAccessRegistry; } + void SetRegistryAccess(TBool aValue){ iCanAccessRegistry = aValue; } + + void SetReinstallWidget(TBool aValue){ iReinstallingWidget = aValue; } + + void DialogShown(); + + static TInt DeleteCallback(TAny* aPtr); private: @@ -271,7 +278,7 @@ * Publish & Subscribe listener * own */ - CWidgetMMCHandler* iWidgetUsbListener; + CWrtUsbHandler* iWidgetUsbListener; /** * @@ -329,6 +336,25 @@ * */ RPointerArray iHSWidgets; + /** + * + */ + TBool iCanAccessRegistry; + + /** + * + */ + TBool iReinstallingWidget; + + /** + * + */ + RArray iUid; + + /** + * + */ + CAsyncCallBack* iAsyncCallBack; }; #endif // C_WRTCONTENTHARVESTER_H diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wrtharvester/inc/wrtharvesterregistryaccess.h --- a/webengine/wrtharvester/inc/wrtharvesterregistryaccess.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wrtharvester/inc/wrtharvesterregistryaccess.h Mon Mar 29 12:27:15 2010 +0100 @@ -20,7 +20,7 @@ #define WRHARVESTERREGISTRYACCESS_H // INCLUDES -#include +#include #include // FORWARD DECLARATIONS diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wrtharvester/inc/wrtusbhandler.h --- a/webengine/wrtharvester/inc/wrtusbhandler.h Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wrtharvester/inc/wrtusbhandler.h Mon Mar 29 12:27:15 2010 +0100 @@ -1,21 +1,22 @@ /* -* Copyright (c) 2008 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 "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* ============================================================================ +* Name : WrtUsbHandler.h +* Part of : Widget Registry +* Description : Acts on MMC card insertion/removal +* Version : 3.1 * -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Acts on MMC card insertion/removal -* +* Copyright © 2008 Nokia Corporation. +* This material, including documentation and any related +* computer programs, is protected by copyright controlled by +* Nokia Corporation. All rights are reserved. Copying, +* including reproducing, storing, adapting or translating, any +* or all of this material requires the prior written consent of +* Nokia Corporation. This material also contains confidential +* information which may not be disclosed to others without the +* prior written consent of Nokia Corporation. +* ============================================================================= */ - #ifndef WIDGETMMCHANDLER_H #define WIDGETMMCHANDLER_H @@ -35,16 +36,16 @@ * * @since 3.1 */ -class CWidgetMMCHandler : public CActive +class CWrtUsbHandler : public CActive { public: - static CWidgetMMCHandler* NewL( CWrtHarvester* aHarvester, RFs& aFs ); + static CWrtUsbHandler* NewL( CWrtHarvester* aHarvester, RFs& aFs ); - virtual ~CWidgetMMCHandler(); + virtual ~CWrtUsbHandler(); void Start(); - void ToggleUSBMode(); + void DoScanAndUpdate(); protected: @@ -57,11 +58,11 @@ private: // no copy constructor - CWidgetMMCHandler( const CWidgetMMCHandler& ); + CWrtUsbHandler( const CWrtUsbHandler& ); // no assignment - CWidgetMMCHandler& operator=( const CWidgetMMCHandler& ); + CWrtUsbHandler& operator=( const CWrtUsbHandler& ); - CWidgetMMCHandler( CWrtHarvester* aHarvester, RFs& aFs ); + CWrtUsbHandler( CWrtHarvester* aHarvester, RFs& aFs ); void ConstructL(); @@ -73,7 +74,6 @@ RFs iFs; TInt iDriveFlags; - }; #endif // #ifndef WIDGETMMCHANDLER_H diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wrtharvester/rom/wrtharvester.iby --- a/webengine/wrtharvester/rom/wrtharvester.iby Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wrtharvester/rom/wrtharvester.iby Mon Mar 29 12:27:15 2010 +0100 @@ -19,7 +19,11 @@ #ifndef WRTHARVESTER_IBY #define WRTHARVESTER_IBY #include -#include +#ifdef __S60_32__ +#include +#else +#include +#endif #ifdef BRDO_WRT_HS_FF ECOM_PLUGIN(wrtharvester.dll, wrtharvester.rsc) diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wrtharvester/rom/wrtharvesterResources.iby --- a/webengine/wrtharvester/rom/wrtharvesterResources.iby Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wrtharvester/rom/wrtharvesterResources.iby Mon Mar 29 12:27:15 2010 +0100 @@ -1,26 +1,30 @@ /* -* 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 "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* ============================================================================= +* Name : wrtharvesterResources.iby +* Part of : +* Description : The resource iby file contains resource that needs to be +* localized for wrtharvester +* Version : %version: 1 % * -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: The resource iby file contains resource that needs to be -* localized for wrtharvester -* +* Copyright (c) 2009 Nokia. All rights reserved. +* This material, including documentation and any related computer +* programs, is protected by copyright controlled by Nokia. All +* rights are reserved. Copying, including reproducing, storing, +* adapting or translating, any or all of this material requires the +* prior written consent of Nokia. This material also contains +* confidential information which may not be disclosed to others +* without the prior written consent of Nokia. +* ============================================================================ */ - #ifndef WRTHARVESTERRESOURCES_IBY #define WRTHARVESTERRESOURCES_IBY -#include +#ifdef __S60_32__ +#include +#else +#include +#endif #ifdef BRDO_WRT_HS_FF data=ZRESOURCE\wrtharvester.rsc RESOURCE_FILES_DIR\wrtharvester.rsc diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wrtharvester/src/wrtharvester.cpp --- a/webengine/wrtharvester/src/wrtharvester.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wrtharvester/src/wrtharvester.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include @@ -49,6 +49,11 @@ // CONSTANTS _LIT( KResourceFileName, "\\resource\\wrtharvester.rsc" ); _LIT( KResourceDir, "Z:wrtharvester.rsc" ); +_LIT( KUid, "uid"); +_LIT( K0x, "0x"); +_LIT( KOpenPar, "("); +_LIT( KClosePar, ")"); +_LIT8( KWidgetIcon, "widget_icon"); /** * Utility class to show the prompt for platform security access. @@ -224,11 +229,15 @@ iWidgetRegListener = CWrtHarvesterPSNotifier::NewL( this, EWidgetRegAltered ); User::LeaveIfError( iFs.Connect() ); - iWidgetUsbListener = CWidgetMMCHandler::NewL( this, iFs ); + iWidgetUsbListener = CWrtUsbHandler::NewL( this, iFs ); iWidgetUsbListener->Start(); SetMSMode(0); + iCanAccessRegistry = ETrue; + iReinstallingWidget = EFalse; + + TFileName resourceFileName; TParse parse; Dll::FileName (resourceFileName); @@ -278,6 +287,13 @@ delete iWidgetRegListener; delete iWidgetMMCListener; delete iWidgetUsbListener; + if(iAsyncCallBack) + { + iAsyncCallBack->Cancel(); + } + delete iAsyncCallBack; + iAsyncCallBack = NULL; + iUid.Close(); iWidgetOperations.Close(); iHSWidgets.ResetAndDestroy(); iApaSession.Close(); @@ -385,6 +401,11 @@ // void CWrtHarvester::UpdatePublishersL() { + if(iReinstallingWidget) + { + iReinstallingWidget = EFalse; + return; + } iRegistryAccess.WidgetInfosL( iWidgetInfo ); RemoveObsoletePublishersL(); @@ -503,7 +524,17 @@ __UHEAP_MARK; TInt id( KErrNotFound ); if( iCPSInterface ) - { + { + TBuf<10> uid(wrtInfo.iUid.Name()); // [12345678] + uid.Delete(0,1); // 12345678] + uid.Delete( uid.Length()-1, 1); // 12345678 + TBuf<50> wrtuid; + wrtuid.Append(KUid); // uid + wrtuid.Append(KOpenPar); // uid( + wrtuid.Append(K0x); // uid(0x + wrtuid.Append(uid ); // uid(0x12345678 + wrtuid.Append(KClosePar); // uid(0x12345678) + CLiwGenericParamList* inparam( CLiwGenericParamList::NewLC() ); CLiwGenericParamList* outparam( CLiwGenericParamList::NewLC() ); @@ -517,21 +548,24 @@ cpdatamap->InsertL( KPublisherId, TLiwVariant( KWRTPublisher )); cpdatamap->InsertL( KContentType, TLiwVariant( KTemplatedWidget )); cpdatamap->InsertL( KContentId, TLiwVariant( wrtInfo.iBundleId )); - // Widget info map - CLiwDefaultMap* widgetInfo = CLiwDefaultMap::NewLC(); - widgetInfo->InsertL( KTemplateType, TLiwVariant( KTemplateName )); - widgetInfo->InsertL( KWidgetName, TLiwVariant( wrtInfo.iDisplayName )); - datamap->InsertL( KWidgetInfo , TLiwVariant( widgetInfo )); - CleanupStack::PopAndDestroy( widgetInfo ); - // Take dynamic menu items into use - if (networkAccess) - { - CLiwDefaultMap* mapMenu = CLiwDefaultMap::NewLC(); - mapMenu->InsertL( KItemOnlineOffline, TLiwVariant( KMyActionName )); - datamap->InsertL( KMenuItems, TLiwVariant( mapMenu )); - CleanupStack::PopAndDestroy(mapMenu); - } + // Widget info map + CLiwDefaultMap* widgetInfo = CLiwDefaultMap::NewLC(); + widgetInfo->InsertL( KTemplateType, TLiwVariant( KTemplateName )); + widgetInfo->InsertL( KWidgetName, TLiwVariant( wrtInfo.iDisplayName )); + widgetInfo->InsertL( KWidgetIcon, TLiwVariant( wrtuid)); // uid(0x12345678) This is the expected format + + datamap->InsertL( KWidgetInfo , TLiwVariant( widgetInfo )); + CleanupStack::PopAndDestroy( widgetInfo ); + + // Take dynamic menu items into use + if (networkAccess) + { + CLiwDefaultMap* mapMenu = CLiwDefaultMap::NewLC(); + mapMenu->InsertL( KItemOnlineOffline, TLiwVariant( KMyActionName )); + datamap->InsertL( KMenuItems, TLiwVariant( mapMenu )); + CleanupStack::PopAndDestroy(mapMenu); + } cpdatamap->InsertL( KDataMap, TLiwVariant(datamap) ); @@ -795,12 +829,25 @@ RWidgetRegistryClientSession session; CleanupClosePushL( session ); User::LeaveIfError( session.Connect() ); - if ( session.IsBlanketPermGranted ( aUid ) == EBlanketUnknown && !iDialogShown ) + TBool preInstalled = *(session.GetWidgetPropertyValueL( aUid, EPreInstalled ) ); + + // Set blanket permission to true for pre-installed widgets + if ( preInstalled ) + { + session.SetBlanketPermissionL( aUid, EBlanketTrue ); + } + + if ( session.IsBlanketPermGranted ( aUid ) == EBlanketUnknown && !iDialogShown + && iCanAccessRegistry ) { iDialogShown = ETrue; AllowPlatformAccessL( aUid ); } - else if(!iDialogShown) + else if(session.IsBlanketPermGranted ( aUid ) == EBlanketUnknown) + { + iUid.Append(aUid); + } + else { QueueOperationL( WidgetResume, aUid ); } @@ -879,6 +926,33 @@ return networkAccess; } +// ---------------------------------------------------------------------------- +// +// ---------------------------------------------------------------------------- +// +TInt CWrtHarvester::DeleteCallback(TAny* aPtr) + { + CWrtHarvester* self = (CWrtHarvester*)aPtr; + self->QueueResumeL(self->iUid[0]); + self->iUid.Remove(0); + delete self->iAsyncCallBack; + self->iAsyncCallBack = NULL; + return 0; + } + +// ---------------------------------------------------------------------------- +// +// ---------------------------------------------------------------------------- +// +void CWrtHarvester::DialogShown() + { + iDialogShown = EFalse; + if(iUid.Count()) + { + iAsyncCallBack = new (ELeave) CAsyncCallBack(TCallBack(DeleteCallback,this),CActive::EPriorityUserInput); + iAsyncCallBack->CallBack(); + } + } // ---------------------------------------------------------------------------- // diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wrtharvester/src/wrtharvesterpsnotifier.cpp --- a/webengine/wrtharvester/src/wrtharvesterpsnotifier.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wrtharvester/src/wrtharvesterpsnotifier.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -77,7 +77,7 @@ r = RProperty::Define( KPropertyCat, iKey, RProperty::EInt ); } - if ( r != KErrAlreadyExists || r != KErrNone ) + if ( r != KErrAlreadyExists && r != KErrNone ) { User::LeaveIfError( r ); } @@ -148,9 +148,21 @@ iHarvester->ClearAllOperations(); SetValue(1); } + else if( iKey == EWidgetUIState && value == 3 ) + { + iHarvester->SetReinstallWidget(ETrue); + } else if( iKey == EWidgetRegAltered && value == 1 ) { - iHarvester->UpdateL(); + if(iHarvester->IsInMSMode()) + { + iHarvester->SetRegistryAccess(EFalse); + } + else + { + iHarvester->SetRegistryAccess(ETrue); + } + iHarvester->UpdateL(); } } } diff -r 3dbb0284a087 -r 960a2a4c7f03 webengine/wrtharvester/src/wrtusbhandler.cpp --- a/webengine/wrtharvester/src/wrtusbhandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/webengine/wrtharvester/src/wrtusbhandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -1,45 +1,50 @@ -/* -* Copyright (c) 2006 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 "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Handle notifications of MMC events. -* -* -* -*/ +// +// ============================================================================ +// Name : WidgetMMCHandler.cpp +// Part of : SW Installer UIs / WidgetInstallerUI +// +// Description: Handle notifications of MMC events. +// +// +// Version : 3.1 +// +// Copyright © 2006 Nokia Corporation. +// This material, including documentation and any related +// computer programs, is protected by copyright controlled by +// Nokia Corporation. All rights are reserved. Copying, +// including reproducing, storing, adapting or translating, any +// or all of this material requires the prior written consent of +// Nokia Corporation. This material also contains confidential +// information which may not be disclosed to others without the +// prior written consent of Nokia Corporation. +// ============================================================================== +/// +// INCLUDE FILES #include "wrtusbhandler.h" #include "wrtharvester.h" #include "wrtusbhandler.h" +#include // CONSTANTS // ============================================================================ -// CWidgetMMCHandler::NewL() +// CWrtUsbHandler::NewL() // two-phase constructor // // @since 3.1 // @param aRegistry - Widget registry for callback. // @param aFs - file session -// @return pointer to CWidgetMMCHandler +// @return pointer to CWrtUsbHandler // ============================================================================ // -CWidgetMMCHandler* CWidgetMMCHandler::NewL( +CWrtUsbHandler* CWrtUsbHandler::NewL( CWrtHarvester* aHarvester, RFs& aFs ) { - CWidgetMMCHandler* self = - new(ELeave) CWidgetMMCHandler( aHarvester , aFs ); + CWrtUsbHandler* self = + new(ELeave) CWrtUsbHandler( aHarvester , aFs ); CleanupStack::PushL( self ); self->ConstructL(); CleanupStack::Pop( self ); @@ -47,13 +52,13 @@ } // ============================================================================ -// CWidgetMMCHandler::CWidgetMMCHandler() +// CWrtUsbHandler::CWrtUsbHandler() // C++ default constructor // // @since 3.1 // ============================================================================ // -CWidgetMMCHandler::CWidgetMMCHandler( CWrtHarvester* aHarvester, +CWrtUsbHandler::CWrtUsbHandler( CWrtHarvester* aHarvester, RFs& aFs ) : CActive( CActive::EPriorityUserInput ), iHarvester( aHarvester ), @@ -64,159 +69,144 @@ } // ============================================================================ -// CWidgetMMCHandler::ConstructL() +// CWrtUsbHandler::ConstructL() // Symbian default constructor // // @since 3.1 // ============================================================================ // -void CWidgetMMCHandler::ConstructL() +void CWrtUsbHandler::ConstructL() { if ( KErrNone != ScanDrives( iDriveFlags ) ) { iDriveFlags = 0; - } - RDebug::Print(_L("iDriveFlags ConstructL() : %x %d"), iDriveFlags,iDriveFlags); + } } // ============================================================================ -// CWidgetMMCHandler::~CWidgetMMCHandler() +// CWrtUsbHandler::~CWrtUsbHandler() // destructor // // @since 3.1 // ============================================================================ -CWidgetMMCHandler::~CWidgetMMCHandler() +CWrtUsbHandler::~CWrtUsbHandler() { Cancel(); - } // ============================================================================ -// CWidgetMMCHandler::Start() +// CWrtUsbHandler::Start() // Start monitoring. // // @since 5.0 // ============================================================================ -void CWidgetMMCHandler::Start() +void CWrtUsbHandler::Start() { iFs.NotifyChange( ENotifyDisk, iStatus ); SetActive(); } // ============================================================================ -// CWidgetMMCHandler::RunL() +// CWrtUsbHandler::RunL() // Handle notifications of MMC events. // // @since 3.1 // ============================================================================ -void CWidgetMMCHandler::RunL() +void CWrtUsbHandler::RunL() { - if ( iStatus == KErrNone ) + TInt status = iStatus.Int(); + + // Restart NotifyChange + Start(); + + if ( status == KErrNone ) { - TInt driveFlags = 0; - TInt deltaDriveFlags = 0; - + DoScanAndUpdate(); + } + } - User::After( 10000000 ); - - if ( KErrNone == ScanDrives( driveFlags ) ) - { - deltaDriveFlags = iDriveFlags ^ driveFlags; - - iDriveFlags = driveFlags; - } - - if ( deltaDriveFlags ) - { - //Unpluging USB from Mass storage . . . - if(iHarvester->IsInMSMode() == 1) - { - iHarvester->SetMSMode(0); - iHarvester->ClearAllOperations(); - iHarvester->UpdateL(); - - iFs.NotifyChange( ENotifyDisk, iStatus ); - SetActive(); - return; - } - - TVolumeInfo volInfo; - TInt temp = deltaDriveFlags; - TBool massMemAltered = EFalse; - TBool mmcAltered = EFalse; - for(TInt DriveNo = EDriveA+1 ; DriveNo<=EDriveY; DriveNo++ ) - { - +void CWrtUsbHandler::DoScanAndUpdate() + { + TInt err = 0; + TInt driveFlags = 0; + TInt deltaDriveFlags = 0; + if ( KErrNone == ScanDrives( driveFlags ) ) + { + deltaDriveFlags = iDriveFlags ^ driveFlags; + iDriveFlags = driveFlags; + } + + if ( deltaDriveFlags ) + { + TVolumeInfo volInfo; + TInt temp = deltaDriveFlags; + TBool massMemAltered = EFalse; + TBool massMemAvailable = EFalse; + for(TInt DriveNo = EDriveA+1 ; DriveNo<=EDriveY; DriveNo++ ) + { temp = temp >> 1; if( temp & 01) + { + TUint status(0); + err = DriveInfo::GetDriveStatus( iFs, DriveNo , status ); + if(!err && (status & DriveInfo::EDriveExternallyMountable) && (status & DriveInfo::EDriveInternal )) + { + //Internal Memory + massMemAltered = ETrue; + // Check is the internal memory available or not + if(iDriveFlags & (1<SetMSMode(1); + } + else + { + // Mass storage was unplugged + if(iHarvester->IsInMSMode() == 1) { - case EDriveE : - { - massMemAltered = ETrue; - break; - } - case EDriveF: - { - - mmcAltered = ETrue; - break; - } - - } + iHarvester->SetMSMode(0); + iHarvester->ClearAllOperations(); + } + } } - - } - - if( !massMemAltered && mmcAltered) - { - iHarvester->UpdateL(); - } - else if( massMemAltered ) - { - iHarvester->SetMSMode(1); - iHarvester->UpdateL(); - } - } - } - - - iFs.NotifyChange( ENotifyDisk, iStatus ); - SetActive(); } + // ============================================================================ -// CWidgetMMCHandler::RunError() +// CWrtUsbHandler::RunError() // Ignore errors from RunL. // // @since 5.0 // ============================================================================ -TInt CWidgetMMCHandler::RunError( TInt /* aError */ ) +TInt CWrtUsbHandler::RunError( TInt /* aError */ ) { - return KErrNone; // indicates error was handled } // ============================================================================ -// CWidgetMMCHandler::DoCancel() +// CWrtUsbHandler::DoCancel() // Cancel the MMC event handler // // @since 3.1 // ============================================================================ -void CWidgetMMCHandler::DoCancel() +void CWrtUsbHandler::DoCancel() { - iFs.NotifyChangeCancel(); } /* Scans drives and records a bit flag for those that exist and are * suitable for installing widgets to. */ -TInt CWidgetMMCHandler::ScanDrives( TInt& aDriveFlags ) +TInt CWrtUsbHandler::ScanDrives( TInt& aDriveFlags ) { - // List all drives in the system TDriveList driveList; TInt error = iFs.DriveList( driveList ); @@ -259,3 +249,4 @@ return error; } + diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/group/bld.inf --- a/widgets/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/widgets/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -16,13 +16,16 @@ */ #include -#include "../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" #ifdef __WEB_WIDGETS #include "../widgetrecognizer/group/bld.inf" #include "../widgetinstaller/group/bld.inf" #include "../widgetlauncher/group/bld.inf" #include "../widgetapp/group/bld.inf" +#ifdef APP_SID_CHECK_SUPPORT_FF +#include "../widgetsidchecker/group/bld.inf" +#endif #ifdef RD_WIDGET_PREINSTALLER #include "../widgetpreinstaller/group/bld.inf" #include "../widgetstartup/group/bld.inf" diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetapp/data/WidgetUi.rss --- a/widgets/widgetapp/data/WidgetUi.rss Wed Jan 13 15:52:45 2010 +0000 +++ b/widgets/widgetapp/data/WidgetUi.rss Mon Mar 29 12:27:15 2010 +0100 @@ -21,7 +21,7 @@ #include #include #include "WidgetUi.hrh" -#include +#include #include #include #include diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetapp/group/WidgetUi.mmp --- a/widgets/widgetapp/group/WidgetUi.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/widgets/widgetapp/group/WidgetUi.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -18,7 +18,7 @@ #include #include #include -#include +#include // TARGET INFO @@ -27,7 +27,10 @@ UID 0x100039CE 0x10282822 epocstacksize 0x14000 -EPOCHEAPSIZE 0x5000 0x1000000 +// There is no need to set a custom heap size as a custom allocator is used so the default values of 1 KB for +// minimum and 1 MB for maximum should be used instead. These will be used for a short time at startup for +// the default heap, which in turn is used to create the custom allocator. no gain in functionality +//EPOCHEAPSIZE 0x5000 0x1000000 VENDORID VID_DEFAULT CAPABILITY CAP_APPLICATION NetworkControl @@ -37,6 +40,7 @@ // RESOURCE INFO START RESOURCE ../Data/WidgetUi.rss +DEPENDS avkon.rsg HEADER TARGETPATH APP_RESOURCE_DIR #ifdef __S60_32__ @@ -64,6 +68,7 @@ #ifdef BRDO_WRT_HS_FF SOURCE cpspublisher.cpp #endif + START RESOURCE ../Data/WidgetUi_reg.rss DEPENDS widgetui.rsg // Do not change the UID below. @@ -78,8 +83,7 @@ USERINCLUDE ../../WidgetInstaller/inc MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE -MW_LAYER_ECOM_SYSTEMINCLUDE +OS_LAYER_ESTLIB_SYSTEMINCLUDE // LIB DEPENDENCIES @@ -108,14 +112,18 @@ LIBRARY ImageConversion.lib LIBRARY ecom.lib // for schemeHandler LIBRARY MemMan.lib + #ifdef BRDO_WRT_HS_FF LIBRARY liwservicehandler.lib #endif + LIBRARY bitgdi.lib LIBRARY aknnotify.lib + #ifdef RD_SCALABLE_UI_V2 LIBRARY cdlengine.lib #endif + LIBRARY esock.lib DEBUGLIBRARY flogger.lib @@ -126,4 +134,9 @@ #if defined( RD_PF_SEC_APPARC ) LIBRARY ServiceHandler.lib #endif + +#ifdef BRDO_OCC_ENABLED_FF +LIBRARY extendedconnpref.lib +LIBRARY netmeta.lib +#endif // End of File diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetapp/group/bld.inf --- a/widgets/widgetapp/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/widgets/widgetapp/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -17,14 +17,14 @@ #include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT gcce PRJ_EXPORTS // export localization files -../loc/WidgetUi.loc MW_LAYER_LOC_EXPORT_PATH(WidgetUi.loc) +../loc/widgetui.loc MW_LAYER_LOC_EXPORT_PATH(widgetui.loc) ../inc/widgetappdefs.rh MW_LAYER_PLATFORM_EXPORT_PATH(widgetappdefs.rh) diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetapp/inc/WidgetUiDialogsProviderProxy.h --- a/widgets/widgetapp/inc/WidgetUiDialogsProviderProxy.h Wed Jan 13 15:52:45 2010 +0000 +++ b/widgets/widgetapp/inc/WidgetUiDialogsProviderProxy.h Mon Mar 29 12:27:15 2010 +0100 @@ -25,8 +25,8 @@ // User includes // System Includes -#include -#include +#include +#include #include // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetapp/inc/WidgetUiNetworkListener.h --- a/widgets/widgetapp/inc/WidgetUiNetworkListener.h Wed Jan 13 15:52:45 2010 +0000 +++ b/widgets/widgetapp/inc/WidgetUiNetworkListener.h Mon Mar 29 12:27:15 2010 +0100 @@ -1,27 +1,37 @@ -/* -* Copyright (c) 2008, 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 "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - +// +//============================================================================== +// Name : WidgetUiNetworkListener.h +// Part of : WidgetUI +// Interface : +// Description : +// Version : %version: 5.1.1.3.3 % +// +// Copyright 2008, 2009 Nokia Corporation. +// This material, including documentation and any related +// computer programs, is protected by copyright controlled by +// Nokia Corporation. All rights are reserved. Copying, +// including reproducing, storing, adapting or translating, any +// or all of this material requires the prior written consent of +// Nokia Corporation. This material also contains confidential +// information which may not be disclosed to others without the +// prior written consent of Nokia Corporation. +//============================================================================== +// #ifndef WIDGETUINETWORKLISTENER_H_ #define WIDGETUINETWORKLISTENER_H_ // INCLUDES #include + +#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS #include +#else +#include +#include +#include +#endif + #include "WidgetUiWindowManager.h" // CLASS DECLARATION diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetapp/inc/WidgetUiObserver.h --- a/widgets/widgetapp/inc/WidgetUiObserver.h Wed Jan 13 15:52:45 2010 +0000 +++ b/widgets/widgetapp/inc/WidgetUiObserver.h Mon Mar 29 12:27:15 2010 +0100 @@ -20,12 +20,12 @@ #define WIDGETUIOBSERVER_H_ // INCLUDES -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -287,10 +287,9 @@ * Rcognize the mime type. * @since 3.1 * @param aFileName - * @param aData * @return HBufC* */ - HBufC* RecognizeLC( const TDesC& aFileName, const TDesC8& aData ); + HBufC* RecognizeLC( const TDesC& aFileName ); /** * TranslateURLToFilenameL diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetapp/inc/WidgetUiWindow.h --- a/widgets/widgetapp/inc/WidgetUiWindow.h Wed Jan 13 15:52:45 2010 +0000 +++ b/widgets/widgetapp/inc/WidgetUiWindow.h Mon Mar 29 12:27:15 2010 +0100 @@ -21,8 +21,8 @@ // INCLUDES FILES #include -#include -#include // for MWidgetCallback +#include +#include // for MWidgetCallback #include #include #include "WidgetUiObserver.h" @@ -500,7 +500,20 @@ * @return CActiveSchedulerWait* */ CActiveSchedulerWait* NetworkModeWait() { return iNetworkModeWait; } - + + /** + * NeedToNotifyNetworkState + * Notifies to Widget about network state + * @since 7.1 + * @param aNetworkState the online/offline state needs to be notified to widget or not + * @return none + */ + void NeedToNotifyNetworkState(TBool aNetworkState); + + TBool CanBeDeleted(); + + static TInt DeleteItself(TAny* aPtr); + protected: @@ -594,12 +607,18 @@ //Download transaction ID long iDlId; TInt iClickCount; - CFbsBitmap* iMiniviewBitmap ; + CFbsBitmap iMiniviewBitmap1; + CFbsBitmap iMiniviewBitmap2; + CFbsBitmap* iActiveMiniviewBitmap; + TTime iOOMWidgetStartTime; TBool iWidgetLoadStarted; // Set to true when widget load starts CJpgSaver* iJpgSaver; CActiveSchedulerWait* iNetworkModeWait; - + TBool iNeedToNotifyNetworkState; + TBool iConnecting; + TBool iDeleteItself; + CAsyncCallBack* iAsyncCallBack; }; #endif // diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetapp/inc/WidgetUiWindowManager.h --- a/widgets/widgetapp/inc/WidgetUiWindowManager.h Wed Jan 13 15:52:45 2010 +0000 +++ b/widgets/widgetapp/inc/WidgetUiWindowManager.h Mon Mar 29 12:27:15 2010 +0100 @@ -21,11 +21,11 @@ // INCLUDES FILES -#include +#include #include #include #include "WidgetUiObserver.h" -#include "Browser_platform_variant.hrh" +#include "browser_platform_variant.hrh" // CONSTANTS enum TNetworkMode @@ -236,7 +236,15 @@ void HandleOOMEventL( TBool aForeground ); // Utility stuff. - + /** + * ExitNow + * Exits the AppUi + * @since 5.0 + * @param none + * @return none + */ + void ExitNow(); + /** * WindowList * Gets the list of running windows @@ -382,6 +390,8 @@ */ void NotifyConnecionChange(TBool aConn); TBrCtlDefs::TCursorSettings CursorShowMode() {return iWidgetCursorMode;} + + TBrCtlDefs::TEnterKeySettings EnterKeyMode() {return iWidgetEnterKeyMode;} /** * AnyWidgetOnHs @@ -398,7 +408,18 @@ * @return TBool */ TBool AnyWidgetPublishing(); - + + /** + * Returns a reference to the Appui of WidgetUi + * @return reference to CWidgetUiAppUi + */ + CWidgetUiAppUi& AppUi(){ return iAppUi; } + + /** + * Returns the count of the windows in the widget + * @return count of the windows + */ + TInt WindowListCount(){ return iWindowList.Count(); } #ifdef OOM_WIDGET_CLOSEALL /** @@ -423,7 +444,13 @@ */ void SetLastWidgetRestartTime(TTime aStartTime){iTimeLastWidgetOpen = aStartTime;} #endif // OOM_WIDGET_CLOSEALL - + /** + * CloseAllWidgets + * Basic pre-exit routine to make sure all widgets are closed out + * @param none + * @return none + */ + void CloseAllWidgets(); protected: /** @@ -566,6 +593,8 @@ TNetworkMode iNetworkMode; // unknown mode = 0, online mode = 1, offline mode = 2 TBool iNetworkConnected; // ETrue if there is an active network connection, else EFalse TBrCtlDefs::TCursorSettings iWidgetCursorMode; + TBrCtlDefs::TEnterKeySettings iWidgetEnterKeyMode; + #ifdef BRDO_WRT_HS_FF CCpsPublisher* iCpsPublisher; // Owned, interface to publish bitmap to CPS #endif diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetapp/inc/WidgetUiWindowView.h --- a/widgets/widgetapp/inc/WidgetUiWindowView.h Wed Jan 13 15:52:45 2010 +0000 +++ b/widgets/widgetapp/inc/WidgetUiWindowView.h Mon Mar 29 12:27:15 2010 +0100 @@ -21,7 +21,7 @@ // INCLUDES #include -#include +#include // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetapp/src/WidgetUiApp.cpp --- a/widgets/widgetapp/src/WidgetUiApp.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/widgets/widgetapp/src/WidgetUiApp.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -15,12 +15,12 @@ * */ - -#include "WidgetUiApp.h" -#include "WidgetUiDocument.h" -#include "MemoryManager.h" -#include "widgetappdefs.rh" -#include +#include "WidgetUiApp.h" +#include "WidgetUiDocument.h" +#include +#include "widgetappdefs.rh" +#include +#include // EXTERNAL DATA STRUCTURES @@ -88,18 +88,48 @@ } // ----------------------------------------------------------------------------- +// SetupThreadHeap - Called for heap creation of thread in this process. +// This approach used to keep correct heap for pointers held in static data objects +// when they are destructed after E32Main() by OS. +// ----------------------------------------------------------------------------- +// +EXPORT_C TInt UserHeap::SetupThreadHeap(TBool aSubThread, SStdEpocThreadCreateInfo& aInfo) + { + TInt r = KErrNone; + if (!aInfo.iAllocator && aInfo.iHeapInitialSize>0) + { + // new heap required + RHeap* pH = NULL; + r = CreateThreadHeap(aInfo, pH); + if (r == KErrNone && !aSubThread) + { + // main thread - new allocator created and set as default heap + MemoryManager::CreateFastAllocator(); + } + } + else if (aInfo.iAllocator) + { + // sharing a heap + RAllocator* pA = aInfo.iAllocator; + pA->Open(); + User::SwitchAllocator(pA); + } + + return r; + } + + +// ----------------------------------------------------------------------------- // E32Main // // ----------------------------------------------------------------------------- // GLDEF_C TInt E32Main() { - RAllocator* oldAllocator = MemoryManager::SwitchToFastAllocator(); - __UHEAP_MARK; - TInt result = EikStart::RunApplication( NewApplication ); - __UHEAP_MARKEND; - MemoryManager::CloseFastAllocator(oldAllocator); - return result; + // initialize MemmoryManager + MemoryManager::InitFastAllocator(); + + return EikStart::RunApplication(NewApplication); } - + // End of File diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetapp/src/WidgetUiAppUi.cpp --- a/widgets/widgetapp/src/WidgetUiAppUi.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/widgets/widgetapp/src/WidgetUiAppUi.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #ifdef BRDO_WRT_HS_FF @@ -166,6 +166,7 @@ { case EEikCmdExit: { + iWindowManager->CloseAllWidgets(); Exit(); break; } diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetapp/src/WidgetUiDialogsProviderProxy.cpp --- a/widgets/widgetapp/src/WidgetUiDialogsProviderProxy.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/widgets/widgetapp/src/WidgetUiDialogsProviderProxy.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -25,8 +25,8 @@ #include "WidgetUiWindowView.h" // System includes -#include -#include +#include +#include // CONSTANTS diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetapp/src/WidgetUiNetworkListener.cpp --- a/widgets/widgetapp/src/WidgetUiNetworkListener.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/widgets/widgetapp/src/WidgetUiNetworkListener.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -1,20 +1,22 @@ -/* -* Copyright (c) 2008, 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 "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - +// +//============================================================================== +// Name : WidgetUiNetworkListener.cpp +// Part of : WidgetUI +// Interface : +// Description : +// Version : %version: 5.1.1.3.3 % +// +// Copyright 2008, 2009 Nokia Corporation. +// This material, including documentation and any related +// computer programs, is protected by copyright controlled by +// Nokia Corporation. All rights are reserved. Copying, +// including reproducing, storing, adapting or translating, any +// or all of this material requires the prior written consent of +// Nokia Corporation. This material also contains confidential +// information which may not be disclosed to others without the +// prior written consent of Nokia Corporation. +//============================================================================== +// #include "WidgetUiNetworkListener.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetapp/src/WidgetUiObserver.cpp --- a/widgets/widgetapp/src/WidgetUiObserver.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/widgets/widgetapp/src/WidgetUiObserver.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include "WidgetUiObserver.h" #include "WidgetUiWindow.h" #include "WidgetUiWindowView.h" @@ -266,7 +266,7 @@ CleanupStack::PushL( buf ); HBufC* contentType = NULL; TPtrC p( NULL, 0 ); - contentType = RecognizeLC( *iFileName, *buf ); + contentType = RecognizeLC( *iFileName ); aEmbeddedLinkContent.HandleResolveComplete( *contentType, p, buf ); CleanupStack::PopAndDestroy( 2, buf ); // contentType, buf return ETrue; @@ -442,19 +442,25 @@ // CWidgetUiObserver::RecognizeL // ----------------------------------------------------------------------------- // -HBufC* CWidgetUiObserver::RecognizeLC( const TDesC& aFileName, const TDesC8& aData ) +HBufC* CWidgetUiObserver::RecognizeLC( const TDesC& aFileName ) { TDataRecognitionResult dataType; RApaLsSession apaSession; TInt ret; + + RFile file; + User::LeaveIfError( file.Open(CCoeEnv::Static()->FsSession(), aFileName, EFileRead|EFileShareAny) ); + CleanupClosePushL( file ); CleanupClosePushL(apaSession); User::LeaveIfError( apaSession.Connect() ); // Ask the application architecture to find the file type - ret = apaSession.RecognizeData( aFileName, aData, dataType ); + ret = apaSession.RecognizeData( file, dataType ); apaSession.Close(); + CleanupStack::PopAndDestroy(1, &apaSession); + CleanupStack::PopAndDestroy( &file ); TPtrC8 mimeTypePtr = dataType.iDataType.Des8(); TInt len = mimeTypePtr.Length() + 1; diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetapp/src/WidgetUiWindow.cpp --- a/widgets/widgetapp/src/WidgetUiWindow.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/widgets/widgetapp/src/WidgetUiWindow.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -11,7 +11,7 @@ * * Contributors: * -* Description: +* Description: * */ @@ -21,8 +21,8 @@ #include "WidgetUiWindowContainer.h" #include "WidgetUiWindowManager.h" #include "WidgetUiDialogsProviderProxy.h" -#include "WidgetRegistryConstants.h" -#include "Browser_platform_variant.hrh" +#include +#include "browser_platform_variant.hrh" #ifdef BRDO_WRT_HS_FF #include "cpspublisher.h" #endif @@ -31,9 +31,9 @@ #include #include -#include +#include #include "WidgetInstallerInternalCRKeys.h" -#include +#include #include #include #include @@ -42,7 +42,6 @@ #include #include "SWInstWidgetUid.h" - // EXTERNAL DATA STRUCTURES // EXTERNAL FUNCTION PROTOTYPES @@ -121,7 +120,7 @@ iWidgetUiObserver = CWidgetUiObserver::NewL( *this ); iWidgetUiDialogsProviderProxy = CWidgetUiDialogsProviderProxy::NewL(*(iWindowManager.DialogsProvider()), NULL, *this); - + #ifdef BRDO_WRT_HS_FF iNetworkModeWait = new(ELeave) CActiveSchedulerWait(); #endif @@ -157,6 +156,7 @@ iWidgetUiObserver /* download observer */); //Set the cursor mode inside Widget iEngine->SetBrowserSettingL(TBrCtlDefs::ESettingsCursorShowMode, iWindowManager.CursorShowMode()); + iEngine->SetBrowserSettingL(TBrCtlDefs::ESettingsEnterKeyMode, iWindowManager.EnterKeyMode()); iEngine->AddLoadEventObserverL( iWidgetUiObserver ); iEngine->AddStateChangeObserverL( view ); @@ -190,11 +190,13 @@ { SetWindowStateMiniViewL( EMiniViewNotEnabled ); } - + iDlId = 0; - + + iNeedToNotifyNetworkState = EFalse; // determine initial widget online/offline network state DetermineNetworkState(); + iAsyncCallBack = new (ELeave) CAsyncCallBack(TCallBack(DeleteItself,this),CActive::EPriorityUserInput); } // ----------------------------------------------------------------------------- @@ -219,10 +221,20 @@ delete iLeftSoftKeyLabel; delete iWidgetUiDialogsProviderProxy; delete iSchemeHandler; - delete iMiniviewBitmap; + + iActiveMiniviewBitmap = 0; + iMiniviewBitmap1.Reset(); + iMiniviewBitmap2.Reset(); + #ifdef BRDO_WRT_HS_FF delete iNetworkModeWait; #endif + if(iAsyncCallBack) + { + iAsyncCallBack->Cancel(); + } + delete iAsyncCallBack; + iAsyncCallBack=NULL; } // ----------------------------------------------------------------------------- @@ -273,7 +285,7 @@ { switch(widgetMiniViewState) - { + { case 0: iWidgetWindowState.miniViewState = EMiniViewNotEnabled; break; case 1: iWidgetWindowState.miniViewState = EMiniViewEnabled; @@ -530,7 +542,7 @@ Engine()->MakeVisible(EFalse);// hide the active widget } if ( !aCurrent && (EPublishStart != WidgetMiniViewState()) ) - { + { iWidgetExtension->HandleCommandL ( (TInt)TBrCtlDefs::ECommandAppBackground + (TInt)TBrCtlDefs::ECommandIdBase ); if( iWindowManager.AnyWidgetOnHs() ) { @@ -569,7 +581,17 @@ // reset the Right Softkey TRAP_IGNORE(iWidgetUiObserver->UpdateSoftkeyL(EKeyRight,KNullDesC,KDummyCommand,EChangeReasonLoad)); } - + if (iLeftSoftKeyLabel) + { + // restore the Left Softkey + TRAP_IGNORE(iWidgetUiObserver->UpdateSoftkeyL(EKeyLeft,*iLeftSoftKeyLabel,KDummyCommand,EChangeReasonLoad)); + } + else + { + // reset the Left Softkey + TRAP_IGNORE(iWidgetUiObserver->UpdateSoftkeyL(EKeyLeft,KNullDesC,KDummyCommand,EChangeReasonLoad)); + } + // restore state if ( !showSoftkeys ) { @@ -612,6 +634,9 @@ { Engine()->MakeVisible( ETrue ); } + PublishSnapShot(); + if(iWidgetLoaded && iNeedToNotifyNetworkState) + DetermineNetworkState(); } // ----------------------------------------------------------------------------- @@ -626,16 +651,18 @@ { #ifdef BRDO_WRT_HS_FF - if ( !iMiniviewBitmap ) + if ( iCpsPublisher) { - iMiniviewBitmap = new CFbsBitmap(); - } + // Swap bitmaps + if(iActiveMiniviewBitmap == &iMiniviewBitmap1) + iActiveMiniviewBitmap = &iMiniviewBitmap2; + else + iActiveMiniviewBitmap = &iMiniviewBitmap1; - if ( iMiniviewBitmap && iCpsPublisher) - { + // Take snapshot and publish TRAP_IGNORE( - (iEngine->TakeSnapshotL( *iMiniviewBitmap )); - iCpsPublisher->PublishBitmapL( *iMiniviewBitmap, *iWidgetBundleId ); + (iEngine->TakeSnapshotL( *iActiveMiniviewBitmap )); + iCpsPublisher->PublishBitmapL( *iActiveMiniviewBitmap, *iWidgetBundleId ); ); } #endif @@ -668,15 +695,16 @@ TBool CWidgetUiWindow::CheckNetworkAccessL() { // if widgets in offline mode, deny network access - if (iWindowManager.GetNetworkMode() == EOfflineMode) + if (iWindowManager.GetNetworkMode() == EOfflineMode && !( EMiniViewEnabled == WidgetMiniViewState() || + EMiniViewNotEnabled == WidgetMiniViewState() )) { - // if widget is in full view, offer user the option to go to online mode + // if widget is in full view, offer user the option to go to online mode.The widget should be in HS else dont ask HS for prompt. #ifdef BRDO_WRT_HS_FF if ( WidgetFullViewState() && WidgetMiniViewState() != EPublishStart ) { iCpsPublisher->NetworkConnectionAllowedL(); + iNetworkModeWait->Start(); } - iNetworkModeWait->Start(); #endif if (iWindowManager.GetNetworkMode() == EOfflineMode) { @@ -684,18 +712,18 @@ User::Leave( KErrAccessDenied ); } } - + // begin info.plist (declare EAllowNetworkAccess or EAllowFullAccess ?) RWidgetRegistryClientSession& widgetRegistry = iWindowManager.WidgetUIClientSession(); - CWidgetPropertyValue* propValue = widgetRegistry.GetWidgetPropertyValueL(iUid, EAllowNetworkAccess ); + CWidgetPropertyValue* propValue = widgetRegistry.GetWidgetPropertyValueL(iUid, EAllowNetworkAccess ); TInt networkAccess = *propValue; delete propValue; propValue = widgetRegistry.GetWidgetPropertyValueL(iUid, EAllowFullAccess ); TInt fullAccess = *propValue; delete propValue; - + if ( !( networkAccess || fullAccess ) ) { SetNetworkAccessGrant( EDeny ); @@ -733,7 +761,7 @@ } delete rep; } - + if ( prompt ) { CBrowserDialogsProvider* dialogProvider @@ -746,7 +774,7 @@ CleanupStack::PopAndDestroy( 3 ); // save prompt result for session SetNetworkAccessGrant( grant? EAllow : EDeny ); - + CheckUserPermissionChanged( grant ); } else @@ -779,7 +807,7 @@ // 2.1. deal with access point settings TInt ask( 1 ); TInt wmlId( KWmlNoDefaultAccessPoint ); - TInt snapId( KWmlNoDefaultSnapId ); + TInt snapId( KWmlNoDefaultSnapId ); CRepository* rep( NULL ); TRAPD( cenrepError, rep = CRepository::NewL( KCRUidBrowser ) ); if ( KErrNone == cenrepError ) @@ -789,12 +817,12 @@ (void)rep->Get( KBrowserNGDefaultSnapId, snapId ); } delete rep; - if ( ask == EBrowserCenRepApSelModeDestination && - ( snapId != KWmlNoDefaultSnapId) ) - { - iWindowManager.GetConnection()->SetRequestedSnap( snapId ); - iWindowManager.GetConnection()->SetConnectionType( CMManager::EDestination ); - } + if ( ask == EBrowserCenRepApSelModeDestination && + ( snapId != KWmlNoDefaultSnapId) ) + { + iWindowManager.GetConnection()->SetRequestedSnap( snapId ); + iWindowManager.GetConnection()->SetConnectionType( CMManager::EDestination ); + } if ( !ask && (KWmlNoDefaultAccessPoint != wmlId) ) { @@ -808,6 +836,13 @@ iWindowManager.GetConnection()->SetRequestedAP( iap ); ); } + + if ( EBrowserCenRepApSelModeAlwaysAsk == ask ) + { + //Always ask case + TUint32 ap( 0 ); + iWindowManager.GetConnection()->SetRequestedAP( ap ); + } } } @@ -823,11 +858,21 @@ if ( !iWindowManager.GetConnection()->Connected() ) { // 2.2. make a connection - TInt connFailure = iWindowManager.GetConnection()->StartConnectionL( ETrue ); + iConnecting=ETrue; + TInt connFailure = 0; + TRAPD(err, connFailure=iWindowManager.GetConnection()->StartConnectionL( ETrue )); + iConnecting=EFalse; + User::LeaveIfError(err); + if(iDeleteItself) + iAsyncCallBack->CallBack(); if (KErrCancel == connFailure) { #ifdef BRDO_WRT_HS_FF - iCpsPublisher->NetworkConnectionCancelledL(); + if(! (EMiniViewEnabled == WidgetMiniViewState() || + EMiniViewNotEnabled == WidgetMiniViewState()) ) + { + iCpsPublisher->NetworkConnectionCancelledL(); + } #endif User::Leave( connFailure ); } @@ -840,7 +885,7 @@ // kicks in and sets a EDeny. User::Leave( connFailure ); } - *aNewConn = ETrue; + *aNewConn = ETrue; } } @@ -933,7 +978,7 @@ aTypeArray, aDesArray, paramFound ); - + HBufC8* contentType8 = 0; if ( !paramFound ) { @@ -945,7 +990,7 @@ // 16 bit buffer copied into 8 bit buffer. contentType8->Des().Copy( contentType ); } - + //Get the download Id of the transaction. //Because, resource loader will not delete the download //So after handling the download, it will be cleared. @@ -954,16 +999,16 @@ aTypeArray, aDesArray, paramFound ); - + TLex lex(dlId); - User::LeaveIfError(lex.Val(iDlId)); - + User::LeaveIfError(lex.Val(iDlId)); + TDataType dataType( *contentType8 ); CAiwGenericParamList* genericParamList = BrCtlParamList2GenericParamListL( aTypeArray, aDesArray ); CleanupStack::PushL( genericParamList ); RFile tempFile; - + iWindowManager.DocHandler().SetExitObserver(this); iWindowManager.DocHandler().OpenTempFileL( fileName, tempFile ); CleanupClosePushL( tempFile ); @@ -1119,11 +1164,11 @@ { TNetworkState currNetState; RWidgetRegistryClientSession& widgetRegistry = iWindowManager.WidgetUIClientSession(); - TInt inMiniView = widgetRegistry.IsWidgetInMiniView( iUid); - CWidgetPropertyValue* propValue = widgetRegistry.GetWidgetPropertyValueL( iUid, EAllowNetworkAccess ); + TInt inMiniView = !(WidgetMiniViewState()==EMiniViewEnabled || WidgetMiniViewState()==EMiniViewNotEnabled);//widgetRegistry.IsWidgetInMiniView( iUid); + CWidgetPropertyValue* propValue = widgetRegistry.GetWidgetPropertyValueL( iUid, EAllowNetworkAccess ); TInt netAccessWdgtProp = *propValue; // AllowNetworkAccess in the info.plist file - - if ( netAccessWdgtProp && ((inMiniView && (iWindowManager.GetNetworkMode() == (TInt)EOnlineMode)) + + if ( netAccessWdgtProp && ((inMiniView && (iWindowManager.GetNetworkMode() == (TInt)EOnlineMode)) || (!inMiniView && iUserPermission)) ) { if ( iWindowManager.GetNetworkConn() ) @@ -1139,7 +1184,7 @@ { currNetState = ENetworkNotAllowed; } - + if ( iNetworkState != currNetState ) { iNetworkState = currNetState; @@ -1173,7 +1218,7 @@ //Check if the container rect needs change and then call setRect if(clientRect != iWindowManager.View()->Container()->Rect()) iWindowManager.View()->Container()->SetRect(clientRect); - + if (!aTextBoxUpdate) { // status pane always off unless in text box @@ -1181,4 +1226,38 @@ } } } + +// ----------------------------------------------------------------------------- +// CWidgetUiWindow::NeedToNotifyNetworkState() +// ----------------------------------------------------------------------------- +// +void CWidgetUiWindow::NeedToNotifyNetworkState(TBool aNetworkState) + { + iNeedToNotifyNetworkState = aNetworkState; + } + +// ----------------------------------------------------------------------------- +// CWidgetUiWindow::CanBeDeleted() +// ----------------------------------------------------------------------------- +// +TBool CWidgetUiWindow::CanBeDeleted() + { + iDeleteItself = iConnecting; + return !iConnecting; + } + +// ----------------------------------------------------------------------------- +// CWidgetUiWindow::DeleteItself() +// ----------------------------------------------------------------------------- +// +TInt CWidgetUiWindow::DeleteItself(TAny* aPtr) + { + CWidgetUiWindow* self = (CWidgetUiWindow*)aPtr; + CWidgetUiWindowManager* p = &self->iWindowManager; + delete self; + if(p->WindowListCount() == 0) + p->ExitNow(); + return 0; + } + // End of file diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetapp/src/WidgetUiWindowContainer.cpp --- a/widgets/widgetapp/src/WidgetUiWindowContainer.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/widgets/widgetapp/src/WidgetUiWindowContainer.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -23,11 +23,11 @@ #include -#include +#include -#include +#include #include -#include +#include #include #include #include @@ -37,7 +37,7 @@ #include #include #include -#include +#include // EXTERNAL DATA STRUCTURES diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetapp/src/WidgetUiWindowManager.cpp --- a/widgets/widgetapp/src/WidgetUiWindowManager.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/widgets/widgetapp/src/WidgetUiWindowManager.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -25,27 +25,31 @@ #include "WidgetInstallerInternalCRKeys.h" #include "SWInstWidgetUid.h" #include "widgetappdefs.rh" -#include "Browser_platform_variant.hrh" +#include "browser_platform_variant.hrh" #ifdef BRDO_WRT_HS_FF #include "cpspublisher.h" #endif #include -#include -#include +#include +#include #include #include #include -#include +#include #include #include #include "cpglobals.h" // CPS string definitions. -#include +#include #include #include #include +#ifdef BRDO_OCC_ENABLED_FF +#include +#endif + // LOCAL FUNCTION PROTOTYPES TInt doDestructOOMNotifyTimer( TAny* ptr ); TInt doNotifyHarvester( TAny* ptr ); @@ -146,6 +150,8 @@ { TInt strictMode; TInt cursorMode = -1; + TInt enterKeyMode = -1; + if (cenRep->Get( KWidgetInstallerStrictMode, strictMode ) == KErrNone) { iStrictMode = strictMode; @@ -154,6 +160,12 @@ { iWidgetCursorMode = (TBrCtlDefs::TCursorSettings) cursorMode; } + + if (cenRep->Get( KWidgetEnterKeyMode, enterKeyMode ) == KErrNone) + { + iWidgetEnterKeyMode = (TBrCtlDefs::TEnterKeySettings) enterKeyMode; + } + delete cenRep; } @@ -161,7 +173,12 @@ iHandler = CDocumentHandler::NewL(CEikonEnv::Static()->Process()); iDb = CActiveApDb::NewL( EDatabaseTypeIAP ); + #ifdef BRDO_OCC_ENABLED_FF + iConnection = CInternetConnectionManager::NewL( iDb->Database(), ETrue ); + #else iConnection = CInternetConnectionManager::NewL( iDb->Database(), EFalse ); + #endif + #ifdef BRDO_WRT_HS_FF iCpsPublisher = CCpsPublisher::NewL(); #endif @@ -194,6 +211,9 @@ // CWidgetUiWindowManager::~CWidgetUiWindowManager() { + if( iDialogsProvider) + iDialogsProvider->CancelAll(); + iActiveFsWindow = NULL; iWindowList.ResetAndDestroy(); delete iNetworkListener; @@ -237,7 +257,7 @@ wdgt_window->SetWindowStateMiniViewL( EMiniViewEnabled ); // TODO also other states are possible when we should react? - + // Removing . Miniview, shall remove full view as well. For blanket permissions // will be revoked for miniview @@ -335,42 +355,53 @@ { iNetworkMode = EOnlineMode; CWidgetUiWindow* wdgt_window( GetWindow( aUid ) ); -#ifdef BRDO_WRT_HS_FF - if ( wdgt_window->NetworkModeWait()->IsStarted() ) + if (wdgt_window) { - wdgt_window->NetworkModeWait()->AsyncStop(); +#ifdef BRDO_WRT_HS_FF + if ( wdgt_window->NetworkModeWait()->IsStarted() ) + { + wdgt_window->NetworkModeWait()->AsyncStop(); + } +#endif + if(wdgt_window->IsWidgetLoaded()) + wdgt_window->DetermineNetworkState(); + else + wdgt_window->NeedToNotifyNetworkState(ETrue); } -#endif - wdgt_window->DetermineNetworkState(); } break; case WidgetOffline: { iNetworkMode = EOfflineMode; CWidgetUiWindow* wdgt_window( GetWindow( aUid ) ); + if (wdgt_window) + { #ifdef BRDO_WRT_HS_FF - if ( wdgt_window->NetworkModeWait()->IsStarted() ) - { - wdgt_window->NetworkModeWait()->AsyncStop(); - } + if ( wdgt_window->NetworkModeWait()->IsStarted() ) + { + wdgt_window->NetworkModeWait()->AsyncStop(); + } #endif - // if no full view widgets open, then close the network connection - if ( ( !FullViewWidgetsOpen() ) && ( iConnection->Connected() ) ) - { - wdgt_window->Engine()->HandleCommandL( - (TInt)TBrCtlDefs::ECommandIdBase + - (TInt)TBrCtlDefs::ECommandDisconnect ); - iConnection->StopConnectionL(); + // if no full view widgets open, then close the network connection + if ( ( !FullViewWidgetsOpen() ) && ( iConnection->Connected() ) ) + { + TRAP_IGNORE( wdgt_window->Engine()->HandleCommandL( + (TInt)TBrCtlDefs::ECommandIdBase + + (TInt)TBrCtlDefs::ECommandCancelFetch ) ); + + wdgt_window->Engine()->HandleCommandL( + (TInt)TBrCtlDefs::ECommandIdBase + + (TInt)TBrCtlDefs::ECommandDisconnect ); + iConnection->CancelConnection(); + iConnection->StopConnectionL(); + } + if(wdgt_window->IsWidgetLoaded()) + wdgt_window->DetermineNetworkState(); + else + wdgt_window->NeedToNotifyNetworkState(ETrue); } - wdgt_window->DetermineNetworkState(); } - break; - case WidgetRestart: - { - OpenOrCreateWindowL( aUid, LaunchMiniview ); - ResumeWidgetL( aUid ); - } - break; + break; } if(needToNotify) // Widget is up and running, notify that next one can be launched @@ -598,6 +629,7 @@ TBool CWidgetUiWindowManager::RemoveFromWindowList( CWidgetUiWindow* aWidgetWindow ) { __ASSERT_DEBUG( aWidgetWindow, User::Invariant() ); + TBool count(EFalse); if ( iDialogsProvider->IsDialogLaunched() ) { return EFalse; @@ -625,18 +657,41 @@ (TInt)TBrCtlDefs::ECommandCancelFetch ) ); if ( lastOne ) { - TRAP_IGNORE( aWidgetWindow->Engine()->HandleCommandL( - (TInt)TBrCtlDefs::ECommandIdBase + - (TInt)TBrCtlDefs::ECommandDisconnect ) ); - - delete aWidgetWindow; - return ETrue; + if(aWidgetWindow->CanBeDeleted()) + { + TRAP_IGNORE( aWidgetWindow->Engine()->HandleCommandL( + (TInt)TBrCtlDefs::ECommandIdBase + + (TInt)TBrCtlDefs::ECommandDisconnect ) ); + iConnection->CancelConnection(); + iConnection->StopConnectionL(); + delete aWidgetWindow; + return ETrue; + } } else { - delete aWidgetWindow; + if(aWidgetWindow->CanBeDeleted()) + { + for ( TInt i = 0; i < iWindowList.Count(); ++i ) + { + CWidgetUiWindow* window( iWindowList[i] ); + if(window->WidgetMiniViewState() == EMiniViewEnabled || window->WidgetMiniViewState() == EMiniViewNotEnabled) + { + count = ETrue; + break; + } + } + if(!count && iNetworkMode == EOfflineMode){ + aWidgetWindow->Engine()->HandleCommandL( + (TInt)TBrCtlDefs::ECommandIdBase + + (TInt)TBrCtlDefs::ECommandDisconnect ); + iConnection->StopConnectionL(); + } + delete aWidgetWindow; + } + return EFalse; } - return EFalse; + } // ============================================================================= @@ -734,6 +789,7 @@ if ( window == iActiveFsWindow ) { //make the active window NULL and also CurrentWindow as False + iActiveFsWindow->SetCurrentWindow(EFalse); iActiveFsWindow->SetIsCurrentWindow(EFalse); iActiveFsWindow = NULL; } @@ -848,6 +904,8 @@ } else { + if(iDialogsProvider) + iDialogsProvider->CancelAll(); HideWindow( iActiveFsWindow ); } } @@ -989,6 +1047,9 @@ #ifdef BRDO_WRT_HS_FF wdgt_window->Engine()->MakeVisible( EFalse ); wdgt_window->Engine()->SetRect( iCpsPublisher->BitmapSize()); + //When HS comes to foreground show the latest updatd content on HS. + //Relayout can sometimes happen only when widget in FullView. + wdgt_window->PublishSnapShot(); #endif } } @@ -1286,6 +1347,25 @@ } #endif //OOM_WIDGET_CLOSEALL +void CWidgetUiWindowManager::CloseAllWidgets() + { + TInt nWidgetsCount = iWindowList.Count(); + for ( TInt i = (nWidgetsCount-1); i >= 0; i-- ) + { + CWidgetUiWindow* window = iWindowList[i]; + TRAP_IGNORE( window->Engine()->HandleCommandL( + (TInt)TBrCtlDefs::ECommandIdBase + + (TInt)TBrCtlDefs::ECommandCancelFetch ) ); + if(i == 0) + TRAP_IGNORE( window->Engine()->HandleCommandL( + (TInt)TBrCtlDefs::ECommandIdBase + + (TInt)TBrCtlDefs::ECommandDisconnect ) ); + iConnection->CancelConnection(); + iConnection->StopConnectionL(); + delete window; + } + iWindowList.Reset(); + } void CWidgetUiWindowManager::SendAppToBackground() { @@ -1314,6 +1394,12 @@ return EFalse; } + +void CWidgetUiWindowManager::ExitNow() + { + iAppUi.Exit(); + } + CRequestRAM::CRequestRAM(CWidgetUiWindowManager* aWidgetUiWindowManager, const TUid& aUid, TUint32 aOperation): CActive( EPriorityStandard ), iOperation(aOperation), @@ -1353,6 +1439,7 @@ if(iStatus >= 0) { iWidgetUiWindowManager->OpenOrCreateWindowL( iUid, LaunchMiniview ); + iWidgetUiWindowManager->GetWindow(iUid)->NeedToNotifyNetworkState(ETrue); iWidgetUiWindowManager->ResumeWidgetL( iUid ); iWidgetUiWindowManager->GetWindow(iUid)->SetTime(); #ifdef OOM_WIDGET_CLOSEALL @@ -1379,6 +1466,11 @@ else { NotifyCommandHandled(); + TBool lastOne( iWidgetUiWindowManager->WindowListCount() == 0 ); + if( lastOne ) + { + iWidgetUiWindowManager->AppUi().Exit(); + } iWidgetUiWindowManager->SendAppToBackground(); iWidgetUiWindowManager->WidgetUIClientSession().SetActive( iUid, EFalse ); } diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetapp/src/WidgetUiWindowView.cpp --- a/widgets/widgetapp/src/WidgetUiWindowView.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/widgets/widgetapp/src/WidgetUiWindowView.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -37,7 +37,7 @@ #include #include #include -#include +#include #ifdef RD_SCALABLE_UI_V2 #include // For Layout_Meta_Data landscape/portrait status #include @@ -229,6 +229,18 @@ { if (!iWindowManager.ActiveWindow()) return; + #ifdef RD_SCALABLE_UI_V2 + if (PenEnabled()&&(Layout_Meta_Data::IsLandscapeOrientation())&& IsEditMode()) + { + TInt newResId = Cba()->IsVisible() ? + R_AVKON_WIDESCREEN_PANE_LAYOUT_USUAL_FLAT : + R_AVKON_WIDESCREEN_PANE_LAYOUT_USUAL_FLAT_NO_SOFTKEYS; + + StatusPane()->SwitchLayoutL(newResId); + StatusPane()->ApplyCurrentSettingsL(); + StatusPane()->MakeVisible(ETrue); + } + #endif CBrCtlInterface* engine = iWindowManager.ActiveWindow()->Engine(); if( engine && (aResourceId == R_WIDGETUI_MENU || aResourceId >= R_CASCADE_MENU_1) ) { @@ -306,7 +318,7 @@ if (resId != newResId) { StatusPane()->SwitchLayoutL(newResId); - } + } } else //Portrait { diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetapp/src/cpspublisher.cpp --- a/widgets/widgetapp/src/cpspublisher.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/widgets/widgetapp/src/cpspublisher.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -72,6 +72,7 @@ _LIT( KWRTPublisher, "wrt_publisher"); const TInt KSkinGfxInnerRectShrink = 5; +const TUint KDisablePersist = 0x1000; static void DoResetAndDestroy( TAny* aPtr ) { @@ -455,7 +456,7 @@ inparam.AppendL( item ); - iCpsInterface->ExecuteCmdL( KAdd , inparam, outparam); + iCpsInterface->ExecuteCmdL( KAdd , inparam, outparam, KDisablePersist); CleanupStack::PopAndDestroy(); // item diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetinstaller/conf/widgetinstaller.confml Binary file widgets/widgetinstaller/conf/widgetinstaller.confml has changed diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetinstaller/conf/widgetinstaller_1028281F.crml Binary file widgets/widgetinstaller/conf/widgetinstaller_1028281F.crml has changed diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetinstaller/data/WidgetInstallerUI.rss --- a/widgets/widgetinstaller/data/WidgetInstallerUI.rss Wed Jan 13 15:52:45 2010 +0000 +++ b/widgets/widgetinstaller/data/WidgetInstallerUI.rss Mon Mar 29 12:27:15 2010 +0100 @@ -26,8 +26,7 @@ #include #include #include -#include -#include +#include RESOURCE RSS_SIGNATURE { } diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetinstaller/group/WidgetInstallerUI.mmp --- a/widgets/widgetinstaller/group/WidgetInstallerUI.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/widgets/widgetinstaller/group/WidgetInstallerUI.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -20,7 +20,7 @@ #include #include #include -#include +#include // TARGET INFO TARGET WidgetInstallerUI.dll @@ -37,7 +37,7 @@ END START RESOURCE ../data/WidgetInstallerUI.rss -DEPENDS swinstcommonui.rsg +DEPENDS avkon.rsg HEADER TARGETPATH Resource #ifdef __S60_32__ @@ -62,7 +62,7 @@ USERINCLUDE ../../../Inc MW_LAYER_SYSTEMINCLUDE -MW_LAYER_LIBC_SYSTEMINCLUDE +OS_LAYER_ESTLIB_SYSTEMINCLUDE // Libraries LIBRARY euser.lib diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetinstaller/group/bld.inf --- a/widgets/widgetinstaller/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/widgets/widgetinstaller/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -18,14 +18,14 @@ */ #include -#include "../../../web_plat/browser_platform_api/inc/Browser_platform_variant.hrh" +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" PRJ_PLATFORMS DEFAULT GCCE PRJ_EXPORTS // export localization files -../loc/WidgetInstallerUI.loc MW_LAYER_LOC_EXPORT_PATH(WidgetInstallerUI.loc) +../loc/widgetinstallerui.loc MW_LAYER_LOC_EXPORT_PATH(widgetinstallerui.loc) // If EKA2 Kernel Architecture is supported, assume S60 3rd Edition Platform @@ -33,4 +33,4 @@ ../conf/widgetinstaller_1028281F.crml MW_LAYER_CRML(widgetinstaller_1028281F.crml) PRJ_MMPFILES -WidgetInstallerUI.mmp \ No newline at end of file +WidgetInstallerUI.mmp diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetinstaller/inc/WidgetInstallerInternalCRKeys.h --- a/widgets/widgetinstaller/inc/WidgetInstallerInternalCRKeys.h Wed Jan 13 15:52:45 2010 +0000 +++ b/widgets/widgetinstaller/inc/WidgetInstallerInternalCRKeys.h Mon Mar 29 12:27:15 2010 +0100 @@ -40,4 +40,9 @@ // The setting to define the cursor show mode inside widgets // Valid values: 0 = not showing the cursor, 1 = cursor shown const TUint32 KWidgetCursorShowMode = 0x00000005; + +// Controls whether enter key can activate a link or just has a default behavior. +const TUint32 KWidgetEnterKeyMode = 0x00000006; + + #endif diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetinstaller/inc/WidgetUIConfigHandler.h --- a/widgets/widgetinstaller/inc/WidgetUIConfigHandler.h Wed Jan 13 15:52:45 2010 +0000 +++ b/widgets/widgetinstaller/inc/WidgetUIConfigHandler.h Mon Mar 29 12:27:15 2010 +0100 @@ -21,8 +21,8 @@ // INCLUDES #include -#include -#include +#include +#include // FORWARD DECLARATION diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetinstaller/inc/WidgetUIOperationsWatcher.h --- a/widgets/widgetinstaller/inc/WidgetUIOperationsWatcher.h Wed Jan 13 15:52:45 2010 +0000 +++ b/widgets/widgetinstaller/inc/WidgetUIOperationsWatcher.h Mon Mar 29 12:27:15 2010 +0100 @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include // RApaLsSession #include "cuicanceltimer.h" #include "WidgetUIHandler.h" diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetinstaller/src/WidgetRegistrationManager.cpp --- a/widgets/widgetinstaller/src/WidgetRegistrationManager.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/widgets/widgetinstaller/src/WidgetRegistrationManager.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -21,7 +21,13 @@ #include #include #include -#include +#include + +#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS +#include +//#include +#endif + // CONSTANTS _LIT(KMBMExt, ".mbm"); diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetinstaller/src/WidgetUIConfigHandler.cpp --- a/widgets/widgetinstaller/src/WidgetUIConfigHandler.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/widgets/widgetinstaller/src/WidgetUIConfigHandler.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -25,7 +25,7 @@ #include "SWInstWidgetUid.h" #include "WidgetInstallerInternalCRKeys.h" #include -#include +#include // DTD diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetinstaller/src/WidgetUIOperationsWatcher.cpp --- a/widgets/widgetinstaller/src/WidgetUIOperationsWatcher.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/widgets/widgetinstaller/src/WidgetUIOperationsWatcher.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -29,6 +29,7 @@ #include #include #include +#include #include #include "WidgetUIOperationsWatcher.h" @@ -60,6 +61,14 @@ // removable memory cards means that drive letters may change. +static void NotifyCommandHandled() + { + const TUid KMyPropertyCat = { 0x10282E5A }; + enum TMyPropertyKeys { EMyPropertyState = 109 }; + TInt state( 3 ); + RProperty::Set( KMyPropertyCat, EMyPropertyState , state ); + } + using namespace SwiUI; // =========================== MEMBER FUNCTIONS =============================== @@ -206,6 +215,27 @@ if ( PromptUserForInstallL( replaceExisting ) && PromptUserForUntrustedWidgetL( ) ) { + if ( replaceExisting ) + { + //Runnning widget should be first closed + RApaLsSession apaLsSession; + apaLsSession.Connect(); + TApaAppInfo info; + TUid aUid = TUid::Uid( *(iPropertyValues[EUid]) ); + + User::LeaveIfError( apaLsSession.GetAppInfo( info, aUid ) ); + iWidgetName = info.iFullName; + HBufC *widgetName = iWidgetName.AllocLC(); + if(iWidgetInHS) + NotifyCommandHandled(); + + HandleWidgetCommandL(apaLsSession, *widgetName, aUid, Deactivate); + + CleanupStack::PopAndDestroy( widgetName ); + apaLsSession.Close(); + } + + // reinitialize delete iMembers; iMembers = NULL; @@ -447,21 +477,6 @@ found = ETrue; TUid aUid = TUid::Uid( *(iPropertyValues[EUid]) ); iWidgetInHS = iRegistry.IsWidgetInMiniView( aUid ); - if ( iRegistry.IsWidgetRunning( aUid ) ) - { - //Runnning widget should be first closed - RApaLsSession apaLsSession; - apaLsSession.Connect(); - TApaAppInfo info; - - User::LeaveIfError( apaLsSession.GetAppInfo( info, aUid ) ); - iWidgetName = info.iFullName; - HBufC *widgetName = iWidgetName.AllocLC(); - HandleWidgetCommandL(apaLsSession, *widgetName, aUid, Deactivate); - - CleanupStack::PopAndDestroy( widgetName ); - apaLsSession.Close(); - } // get original install dir from registry in case user // decides to "overrite" to another memory location iOriginalDir = *( iRegistry.GetWidgetPropertyValueL( @@ -759,7 +774,6 @@ // TODO if registration steps fail does it leave inconsistent state??? - iRegistry.RegisterWidgetL( iPropertyValues ); iAppManager->RegisterWidgetL( *(iPropertyValues[EMainHTML]), *(iPropertyValues[EBundleDisplayName]), @@ -767,21 +781,14 @@ *(iPropertyValues[EDriveName]), TUid::Uid( *(iPropertyValues[EUid]) ) ); + iRegistry.RegisterWidgetL( iPropertyValues ); + + + if ( iOverwriting ) { // delete backup - (void)iFileMgr->RmDir( iBackupDir ); - if ( iWidgetInHS ) - { - RApaLsSession apaLsSession; - apaLsSession.Connect(); - - HBufC* widgetName = iWidgetName.AllocLC(); - HandleWidgetCommandL(apaLsSession, *widgetName, TUid::Uid( *(iPropertyValues[EUid]) ), WidgetRestart); - CleanupStack::PopAndDestroy( widgetName ); - - apaLsSession.Close(); - } + (void)iFileMgr->RmDir( iBackupDir ); } if ( !iSilent ) { diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetlauncher/group/WidgetLauncher.mmp --- a/widgets/widgetlauncher/group/WidgetLauncher.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/widgets/widgetlauncher/group/WidgetLauncher.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -19,7 +19,7 @@ #include -#include +#include target widgetlauncher.exe targettype exe diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetlauncher/group/bld.inf --- a/widgets/widgetlauncher/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/widgets/widgetlauncher/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -15,13 +15,12 @@ * */ - PRJ_PLATFORMS -DEFAULT GCCE +DEFAULT PRJ_EXPORTS // If EKA2 Kernel Architecture is supported, assume S60 3rd Edition Platform PRJ_MMPFILES -WidgetLauncher.mmp \ No newline at end of file +WidgetLauncher.mmp diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetlauncher/src/WidgetLauncher.cpp --- a/widgets/widgetlauncher/src/WidgetLauncher.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/widgets/widgetlauncher/src/WidgetLauncher.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -31,8 +31,10 @@ #include #include #include +#ifndef FF_OOM_MONITOR2_COMPONENT #include -#include "Browser_platform_variant.hrh" +#endif +#include "browser_platform_variant.hrh" // CONSTANTS #define KUidWidgetOOMPlugin 0x10282855 diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetpreinstaller/Group/WidgetPreInstaller.mmp --- a/widgets/widgetpreinstaller/Group/WidgetPreInstaller.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/widgets/widgetpreinstaller/Group/WidgetPreInstaller.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -20,7 +20,7 @@ #include #include #include -#include +#include TARGET WidgetPreInstaller.exe TARGETTYPE exe diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetrecognizer/data/10282820.rss --- a/widgets/widgetrecognizer/data/10282820.rss Wed Jan 13 15:52:45 2010 +0000 +++ b/widgets/widgetrecognizer/data/10282820.rss Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ -#include +#include RESOURCE REGISTRY_INFO r_registry { dll_uid = 0x10282820; // Should match the name of this file diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetrecognizer/group/WidgetRecognizer.mmp --- a/widgets/widgetrecognizer/group/WidgetRecognizer.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/widgets/widgetrecognizer/group/WidgetRecognizer.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -15,9 +15,8 @@ * */ - #include -#include +#include TARGET WidgetRecognizer.DLL TARGETTYPE PLUGIN @@ -25,23 +24,20 @@ CAPABILITY CAP_ECOM_PLUGIN - SOURCEPATH ../Data START RESOURCE 10282820.rss TARGET WidgetRecognizer.rsc END - VENDORID VID_DEFAULT SOURCEPATH ../src SOURCE WidgetRecognizer.cpp USERINCLUDE ../inc + MW_LAYER_SYSTEMINCLUDE -MW_LAYER_ECOM_SYSTEMINCLUDE - LIBRARY EUSER.LIB LIBRARY APMIME.LIB diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetrecognizer/group/bld.inf --- a/widgets/widgetrecognizer/group/bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/widgets/widgetrecognizer/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -22,4 +22,4 @@ PRJ_EXPORTS PRJ_MMPFILES -WidgetRecognizer.mmp \ No newline at end of file +WidgetRecognizer.mmp diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetrecognizer/src/WidgetRecognizer.cpp --- a/widgets/widgetrecognizer/src/WidgetRecognizer.cpp Wed Jan 13 15:52:45 2010 +0000 +++ b/widgets/widgetrecognizer/src/WidgetRecognizer.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -16,7 +16,7 @@ */ #include "WidgetRecognizer.h" -#include "ImplementationProxy.h" +#include // CONSTANTS _LIT(KWidgetExtension, ".wgz"); diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetsidchecker/data/10281FC0.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/widgets/widgetsidchecker/data/10281FC0.rss Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,41 @@ +/* +* Copyright (c) 2007 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: ECOM registration for widgetsidchecking +* +*/ + +#include + +RESOURCE REGISTRY_INFO r_registry + { + dll_uid = 0x10281FC0; // must match the name of this file + interfaces = + { + INTERFACE_INFO + { + interface_uid = 0x20007D8C; + implementations = + { + IMPLEMENTATION_INFO + { + implementation_uid = 0x10281FC0; + version_no = 1; + display_name = "WidgetVerify"; + default_data = "[10282821]"; + opaque_data = ""; + } + }; + } + }; + } diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetsidchecker/group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/widgets/widgetsidchecker/group/bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,32 @@ +/* +* Copyright (c) 2005 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Build information file for Active Space Operator Harvesting Plugin +* +*/ + +//#ifdef __PLATFORM_VERSION_52__ + +#include +#include "../../../web_plat/browser_platform_api/inc/browser_platform_variant.hrh" + +#ifdef APP_SID_CHECK_SUPPORT_FF +PRJ_PLATFORMS +DEFAULT + +PRJ_EXPORTS +../rom/widgetsidchecker.iby CORE_MW_LAYER_IBY_EXPORT_PATH(widgetsidchecker.iby) + +PRJ_MMPFILES +widgetsidchecker.mmp +#endif diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetsidchecker/group/widgetsidchecker.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/widgets/widgetsidchecker/group/widgetsidchecker.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,41 @@ +/* +* Copyright (c) 2007 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: build for widgetsidchecker +* +*/ + +#include + +TARGET widgetsidchecker.dll +CAPABILITY All -Tcb +TARGETTYPE plugin + +UID 0x10009d8d 0x10281FC0 + + +SOURCEPATH ../src +SOURCE widgetsidchecker.cpp + +USERINCLUDE ../inc + +MW_LAYER_SYSTEMINCLUDE + +START RESOURCE ../data/10281FC0.rss +target widgetsidchecker.rsc +end + +LIBRARY euser.lib aplist.lib ecom.lib efsrv.lib +LIBRARY ws32.lib apparc.lib +library apgrfx.lib +LIBRARY WidgetRegistryClient.lib diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetsidchecker/inc/widgetsidchecker.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/widgets/widgetsidchecker/inc/widgetsidchecker.h Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,42 @@ +/* +* Copyright (c) 2007 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +#ifndef __WIDGETSIDCHECKER_H__ +#define __WIDGETSIDCHECKER_H__ + +#include +#include + +class RWidgetRegistryClientSession; + +NONSHARABLE_CLASS(CWidgetSidChecker) : public CAppSidChecker + { +public: + static CWidgetSidChecker* NewL(); + ~CWidgetSidChecker(); + +public: + virtual TBool AppRegisteredAt(const TUid& aSid, TDriveUnit aDrive); + virtual void SetRescanCallBackL(const TCallBack &aCallback); + +private: + CWidgetSidChecker(); + TBool AppRegisteredAtL(TUid aSid ); + RWidgetRegistryClientSession iClientSession; + }; + +#endif + diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetsidchecker/rom/widgetsidchecker.iby --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/widgets/widgetsidchecker/rom/widgetsidchecker.iby Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,18 @@ +/* +* Copyright (c) 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: IBY file +* +*/ + +ECOM_PLUGIN(widgetsidchecker.dll,10281FC0.rsc) \ No newline at end of file diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetsidchecker/src/widgetsidchecker.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/widgets/widgetsidchecker/src/widgetsidchecker.cpp Mon Mar 29 12:27:15 2010 +0100 @@ -0,0 +1,109 @@ +/* +* Copyright (c) 2007, 2008 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +#include "widgetsidchecker.h" + +#include +#include +#include +#include +#include +#include +//#include +#include + +//WidgetRegistry.EXE[10282f06]0001 +//const TUid KWidgetRegistry = { 0x10282F06 }; +//0x10282F06 +//hb +//#include +////////////////////////////// +// ECOM Implementation Table +////////////////////////////// + + +TBool E32Dll() + { + return (ETrue); + } + +const TImplementationProxy ImplementationTable[] = + { + IMPLEMENTATION_PROXY_ENTRY(0x10281FC0, CWidgetSidChecker::NewL) + }; + +EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount) + { + aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy); + return ImplementationTable; + } + +////////////////////////////// +// CWidgetSidChecker +////////////////////////////// + +CWidgetSidChecker* CWidgetSidChecker::NewL() + { + CWidgetSidChecker* self = new(ELeave) CWidgetSidChecker(); + return self; + } + + CWidgetSidChecker::CWidgetSidChecker() + { + } + + +CWidgetSidChecker::~CWidgetSidChecker() + { + iClientSession.Close(); + } + +TBool CWidgetSidChecker::AppRegisteredAt(const TUid& aSid, TDriveUnit /*aDrive*/) + { + TFindProcess findProcess (_L("widgetregistry*")); + TFullName result; + if(findProcess.Next(result) == KErrNone ) + { + TBool res = AppRegisteredAtL(aSid); + return res; + } + return EFalse; + } + + +TBool CWidgetSidChecker::AppRegisteredAtL( TUid aSid ) + { + TBuf aWidgetBundleId; + TBool res = EFalse; + + User::LeaveIfError( iClientSession.Connect() ); + iClientSession.GetWidgetBundleId(aSid, aWidgetBundleId); + //check if the widget exists by querying to WidgetRegisrty return ETrue if exists else return EFalse + if(iClientSession.WidgetExistsL( aWidgetBundleId ) ) + res = ETrue; + else + res = EFalse; + + iClientSession.Disconnect(); + return res; + } + +void CWidgetSidChecker::SetRescanCallBackL(const TCallBack &/*aCallBack*/) + { + return; + } + +// End of file diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetstartup/Group/Bld.inf --- a/widgets/widgetstartup/Group/Bld.inf Wed Jan 13 15:52:45 2010 +0000 +++ b/widgets/widgetstartup/Group/Bld.inf Mon Mar 29 12:27:15 2010 +0100 @@ -15,11 +15,8 @@ * */ - - PRJ_PLATFORMS DEFAULT PRJ_MMPFILES - WidgetStartup.mmp diff -r 3dbb0284a087 -r 960a2a4c7f03 widgets/widgetstartup/Group/WidgetStartup.mmp --- a/widgets/widgetstartup/Group/WidgetStartup.mmp Wed Jan 13 15:52:45 2010 +0000 +++ b/widgets/widgetstartup/Group/WidgetStartup.mmp Mon Mar 29 12:27:15 2010 +0100 @@ -20,7 +20,7 @@ #include #include #include -#include +#include TARGET WidgetStartup.exe TARGETTYPE exe