--- a/brdo.layers.sysdef.xml Mon Mar 15 12:44:50 2010 +0200
+++ b/brdo.layers.sysdef.xml Wed Mar 31 23:16:40 2010 +0300
@@ -18,6 +18,7 @@
<unit unitID="launcher_api" name="launcher_api" bldFile="&layer_real_source_path;/web_plat/launcher_api/group" mrp=""/>
<unit unitID="recent_url_store_api" name="recent_url_store_api" bldFile="&layer_real_source_path;/web_plat/recent_url_store_api/group" mrp=""/>
<unit unitID="stmgesturefw_api" name="stmgesturefw_api" bldFile="&layer_real_source_path;/web_plat/stmgesturefw_api/group" mrp=""/>
+ <unit unitID="download_path_plugin_api" name="download_path_plugin_api" bldFile="&layer_real_source_path;/web_plat/download_path_plugin_api/group" mrp=""/>
<unit unitID="scriptable_plugin_api" name="scriptable_plugin_api" bldFile="&layer_real_source_path;/web_plat/scriptable_plugin_api/group" mrp=""/>
<unit unitID="webutils_api" name="webutils_api" bldFile="&layer_real_source_path;/web_plat/webutils_api/group" mrp=""/>
<unit unitID="widget_registry_api" name="widget_registry_api" bldFile="&layer_real_source_path;/web_plat/widget_registry_api/group" mrp=""/>
--- a/browserutilities/browserdialogsprovider/Src/BrowserDialogsProvider.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/browserutilities/browserdialogsprovider/Src/BrowserDialogsProvider.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -690,11 +690,14 @@
HBufC*& aReturnedInput )
{
TBool retVal;
-
- // defInput is not modified by the dialog.
- TPtr defInput( (TUint16*) aDefaultInput.Ptr(), aDefaultInput.Length(),
- KMaxAltTextLength );
-
+ TInt length = aDefaultInput.Length();
+ if ( aDefaultInput.Length() > KMaxAltTextLength )
+ {
+ length = KMaxAltTextLength;
+ }
+ // defInput is not modified by the dialog.Truncate if length is greater than KMaxAltTextLength
+ TPtr defInput( (TUint16*) aDefaultInput.Ptr(), length, KMaxAltTextLength );
+
CBrowserScriptPromptDialog* dialog =
new (ELeave) CBrowserScriptPromptDialog( defInput, aReturnedInput );
--- a/browserutilities/connectionmanager/Src/ConnManActiveConnector.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/browserutilities/connectionmanager/Src/ConnManActiveConnector.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -87,8 +87,9 @@
}
else
{
- CLOG_WRITE( "CConnManActiveConnector:StartConnection Using Internet Snap");
- extPref.SetSnapPurpose(CMManager::ESnapPurposeInternet);
+ CLOG_WRITE( "CConnManActiveConnector:StartConnection Popup ap dialog");
+ extPref.SetSnapPurpose(CMManager::ESnapPurposeUnknown);
+ extPref.SetConnSelectionDialog(ETrue);
}
#endif //__WINS__
@@ -140,8 +141,16 @@
#else
//For hardware
- CLOG_WRITE( "CConnManActiveConnector:StartConnection Using Internet Snap");
- extPref.SetSnapPurpose(CMManager::ESnapPurposeInternet);
+ if( aSettings->Snap() == 0 )
+ {
+ CLOG_WRITE( "CConnManActiveConnector:StartConnection Using Internet Snap");
+ extPref.SetSnapPurpose(CMManager::ESnapPurposeInternet);
+ }
+ else
+ {
+ CLOG_WRITE( "CConnManActiveConnector:StartConnection Using given Snap");
+ extPref.SetSnapId(aSettings->Snap());
+ }
#endif //__WINS__
--- a/browserutilities/connectionmanager/Src/ConnectionObservers.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/browserutilities/connectionmanager/Src/ConnectionObservers.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -21,7 +21,7 @@
#include <nifman.h>
#include <nifvar.h>
#include <in_sock.h>
-
+#include <browser_platform_variant.hrh>
#include <connectionobservers.h>
#include "ConnectionManagerLogger.h"
@@ -110,7 +110,12 @@
if( !iMultiObserver )
{
- if ( iProgressBuf().iStage == iStageToObserve )
+ CLOG_WRITE( "CConnectionStageNotifierWCB Browser UI" );
+ #ifdef BRDO_OCC_ENABLED_FF //This is only for emulator testing. It should be #ifdef
+ if ( iProgressBuf().iStage == iStageToObserve && (iProgressBuf().iError == KErrDisconnected || iProgressBuf().iError == KErrTimedOut) )
+ #else
+ if ( iProgressBuf().iStage == iStageToObserve )
+ #endif
{
CLOG_WRITE( "Stage achived" );
DoCloseAgent();
@@ -125,6 +130,7 @@
}
else
{
+ CLOG_WRITE( "CConnectionStageNotifierWCB Connection Manager" );
if( IsAnyStageReached( iProgressBuf().iStage ) )
{
iMultiObserver->ConnectionStageAchievedL( iProgressBuf().iStage );
--- a/browserutilities/connectionmanager/Src/InternetConnectionManager.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/browserutilities/connectionmanager/Src/InternetConnectionManager.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -75,7 +75,10 @@
// CONSTANTS
_LIT(KConnectionResourceFile, "\\resource\\ConnectionManager.rsc");
-
+#ifdef BRDO_OCC_ENABLED_FF
+//As per OCC, number of Connection observer states
+const TInt KMaxOccStages = 1;
+#endif
// ============================ MEMBER FUNCTIONS ===============================
//--------------------------------------------------------------------------
//CInternetConnectionManager::ConnectL( TUint32 aIAPId1, TUint32 aIAPId2 )
@@ -652,7 +655,7 @@
if( iConnected )
{
CLOG_WRITE( "StopConnectionL() Stop the Connection" );
- iConnection.Stop(RConnection::EStopAuthoritative);
+ iConnection.Close();
}
// iServ.Close();
@@ -1336,12 +1339,17 @@
TName* name = ConnectionNameL();
__ASSERT_DEBUG( name, User::Panic( KNullDesC, KErrCorrupt ) );
CleanupStack::PushL( name );
-
+
+#ifdef BRDO_OCC_ENABLED_FF
+ iSatges[0] = KLinkLayerClosed;
+ iStageNotifier->StartNotificationL( name,iSatges,KMaxOccStages,this, ETrue );
+#else
iSatges[0] = KConnectionUninitialised;
iSatges[1] = KConnectionClosed;
iSatges[2] = KLinkLayerClosed;
iStageNotifier->StartNotificationL( name,iSatges,KMaxStages,this, ETrue );
+#endif
CleanupStack::PopAndDestroy( name );
}
@@ -1371,7 +1379,7 @@
{
// this is a connection closed event
CLOG_WRITE( "ConnectionStageAchievedL() Stoping the connection instead of closing" );
- iConnection.Stop();
+ iConnection.Close();
iConnected = EFalse;
if( !iSilentMode )
@@ -1701,7 +1709,6 @@
CLOG_WRITE_1( "CInternetConnectionManager::SetConnectionType - %d", aConnectionType );
iConnectionType = aConnectionType;
}
-
//-------------------------------------------------------------------
//CInternetConnectionManager::SetRequestedSnap
//-------------------------------------------------------------------
@@ -2016,7 +2023,6 @@
{
User::LeaveIfError( iServ.Connect() );
}
-
CLOG_WRITE( "Fully initialized" );
iInitialized = ETrue;
}
@@ -2039,16 +2045,37 @@
#ifndef __WINS__
if( KErrNone == connErr )
{
- TUint32 iIapID;
- TBuf<20> query;
- query.Format( _L("%s\\%s"), IAP, COMMDB_ID );
- if( iConnection.GetIntSetting( query, iIapID ) == KErrNone )
- {
- CLOG_WRITE_1( "ConnectWithSnapId::AccessPoint - %d", iIapID );
- CApAccessPointItem* ap = APItemFromIAPIdLC( iIapID );
- UpdateCurrentAPL( *ap, EFalse );
- CleanupStack::PopAndDestroy(); // ap
- }
+ if( iSilentMode )
+ // Temp fix for CDMA
+ {
+ TUint32 iapId;
+ TBuf<20> query;
+ TBuf<40> val;
+
+ query.Format( _L("%s\\%s"), IAP, COMMDB_ID );
+ User::LeaveIfError( iConnection.GetIntSetting( query, iapId ) );
+ iCurrentAP = (CApAccessPointItem*)iapId;
+
+ query.Format(_L("%s\\%s"), IAP, COMMDB_NAME);
+ User::LeaveIfError( iConnection.GetDesSetting( query, val ) );
+
+ iConnName = val.AllocL();
+ CLOG_WRITE_1( "Iap id used : %d", iapId );
+ CLOG_WRITE_1( "Conn name : %S", iConnName);
+ }
+ else
+ {
+ TUint32 iIapID;
+ TBuf<20> query;
+ query.Format( _L("%s\\%s"), IAP, COMMDB_ID );
+ if( iConnection.GetIntSetting( query, iIapID ) == KErrNone )
+ {
+ CLOG_WRITE_1( "ConnectWithSnapId::AccessPoint - %d", iIapID );
+ CApAccessPointItem* ap = APItemFromIAPIdLC( iIapID );
+ UpdateCurrentAPL( *ap, EFalse );
+ CleanupStack::PopAndDestroy(); // ap
+ }
+ }
}
#endif
--- a/browserutilities/downloadmgr/DownloadMgrServEng/Group/HttpDMServEng.mmp Mon Mar 15 12:44:50 2010 +0200
+++ b/browserutilities/downloadmgr/DownloadMgrServEng/Group/HttpDMServEng.mmp Wed Mar 31 23:16:40 2010 +0300
@@ -48,6 +48,10 @@
USERINCLUDE ../inc
+#ifdef DOWNLOADMGR_PATH_PLUGIN_ENABLED_FF
+SYSTEMINCLUDE /epoc32/include/ecom
+#endif
+
SOURCE HttpDownloadManagerServerEngine.cpp
SOURCE HttpClientApp.cpp
SOURCE HttpClientAppInstance.cpp
--- a/browserutilities/downloadmgr/DownloadMgrServEng/Inc/HttpConnHandler.h Mon Mar 15 12:44:50 2010 +0200
+++ b/browserutilities/downloadmgr/DownloadMgrServEng/Inc/HttpConnHandler.h Wed Mar 31 23:16:40 2010 +0300
@@ -353,6 +353,8 @@
*/
void ShutDown( TBool aFromDestructor = EFalse );
+ void RetryNeeded(TBool aRetry) { iRetryNeeded = aRetry;}
+
protected: // New functions
/**
@@ -433,6 +435,7 @@
private: // Data
TBool iNewConnection;
+ TBool iRetryNeeded;
// Reserved pointer for future extension
//TAny* iReserved;
--- a/browserutilities/downloadmgr/DownloadMgrServEng/Inc/HttpDownload.h Mon Mar 15 12:44:50 2010 +0200
+++ b/browserutilities/downloadmgr/DownloadMgrServEng/Inc/HttpDownload.h Wed Mar 31 23:16:40 2010 +0300
@@ -52,8 +52,9 @@
class CFileMan;
class CHeaderField;
class CHttpStorage;
-
-
+#ifdef DOWNLOADMGR_PATH_PLUGIN_ENABLED_FF
+class CDownloadPathHandler;
+#endif
/**
* ?one_line_short_description.
* ?other_description_lines
@@ -459,6 +460,8 @@
void Suspended();
void Disconnected();
void ConnectionFailed( TInt aError );
+ void SetRetryFlag(TBool aFlag){ iRetryFlag = aFlag; }
+ TBool GetRetryFlag(){ return iRetryFlag;}
protected: // New functions
@@ -976,7 +979,16 @@
void CHttpDownload::ConvertDownloadNameUniqueL( HBufC*& filePath,
HBufC*& fileName,
HBufC*& fileExtn);
-
+#ifdef DOWNLOADMGR_PATH_PLUGIN_ENABLED_FF
+ /*
+ * Gets the instance of CDownloadPathHandler from the Plugin implementaion, if present
+ */
+ CDownloadPathHandler* GetDownloadPathPluginInstanceL();
+ /*
+ * Get Updated path from the Plugin Implementation
+ */
+ void GetUpdatedPathFromPluginL(CDownloadPathHandler* downloadPathPlugin,TFileName& rootPath, TPtr& fileNamePtr);
+#endif
public: // Data
// ?one_line_short_description_of_data
//?data_declaration;
@@ -1111,6 +1123,7 @@
TInt iActivePlayedDownload; // Currenlty actively played Cod Download
TInt iMOMoved; // index for bulk move
TBool iMoDownloadCompleted; //MO download Completed.But Move will be issued by PD Client
+ TBool iRetryFlag;
public: // Friend classes
//?friend_class_declaration;
--- a/browserutilities/downloadmgr/DownloadMgrServEng/Src/HttpClientAppInstance.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/browserutilities/downloadmgr/DownloadMgrServEng/Src/HttpClientAppInstance.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -560,6 +560,23 @@
case EDlMgrConnectionName:
{
iConnHandler->SetConnectionNameL( aValue );
+ //resume Download if paused by OCC
+ CArrayPtrFlat<CHttpDownload>* downloads = iClientApp->Downloads();
+
+ for( TInt i = 0; i < downloads->Count() ; ++i )
+ {
+ if( (*downloads)[i]->ClientAppInstance() == this )
+ {
+ // this won't surely leave on this call
+ if((*downloads)[i]->GetRetryFlag())
+ {
+ TRAP_IGNORE( (*downloads)[i]->StartL() );
+ (*downloads)[i]->SetRetryFlag(EFalse);
+ }
+
+ }
+ }
+
}
break;
--- a/browserutilities/downloadmgr/DownloadMgrServEng/Src/HttpConnHandler.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/browserutilities/downloadmgr/DownloadMgrServEng/Src/HttpConnHandler.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -248,10 +248,12 @@
if( iStatus == KErrNone )
{
TInt stage = iProgressBuf().iStage;
-
+ if ( iProgressBuf().iStage == KLinkLayerClosed && iProgressBuf().iError == KErrDisconnected )
+ iConnHandler->RetryNeeded(ETrue);
+
iConnHandler->ConnectionStageChanged( stage );
- if( stage > KConnectionUninitialised )
+ if( stage != KLinkLayerClosed )
// connection is still alive
{
iConnHandler->Connection().ProgressNotification( iProgressBuf, iStatus );
@@ -300,6 +302,7 @@
//Set it to zero
iIapId = 0;
+ iRetryNeeded = EFalse;
}
// -----------------------------------------------------------------------------
@@ -764,7 +767,7 @@
iConnStage = aStage;
- if( iConnStage == KConnectionUninitialised ||
+ if( iConnStage == KLinkLayerClosed ||
iConnStage == KDataTransferTemporarilyBlocked
)
{
@@ -772,24 +775,33 @@
CArrayPtrFlat<CHttpDownload>* downloads =
iClientApp->Downloads();
for( TInt i = 0; i < downloads->Count(); ++i )
- {
+ {
+ if(iRetryNeeded && ((*downloads)[i]->State() == EHttpDlMultipleMOFailed ||
+ (*downloads)[i]->State() == EHttpDlInprogress ))
+ {
+ (*downloads)[i]->SetRetryFlag(ETrue);
+ }
+ }
+
+ for( TInt i = 0; i < downloads->Count(); ++i )
+ {
if( (*downloads)[i]->ConnHandler() == this )
{
- if( iConnStage == KConnectionUninitialised )
+ if( iConnStage == KLinkLayerClosed )
{
// from now on this name is invalid -> forget it!
- delete iConnName; iConnName = NULL;
-
- (*downloads)[i]->Disconnected();
+ delete iConnName; iConnName = NULL;
+ (*downloads)[i]->Disconnected();
+
}
else
- {
+ {
(*downloads)[i]->Suspended();
}
}
}
- if( iConnStage == KConnectionUninitialised )
+ if( iConnStage == KLinkLayerClosed )
{
ShutDown();
}
@@ -803,6 +815,7 @@
{
Connected();
}
+ iRetryNeeded = EFalse;
}
// -----------------------------------------------------------------------------
--- a/browserutilities/downloadmgr/DownloadMgrServEng/Src/HttpDownload.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/browserutilities/downloadmgr/DownloadMgrServEng/Src/HttpDownload.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -46,6 +46,9 @@
#include <pathinfo.h>
+#ifdef DOWNLOADMGR_PATH_PLUGIN_ENABLED_FF
+#include <DownloadPathHandler.h>
+#endif
// EXTERNAL DATA STRUCTURES
//extern ?external_data;
@@ -6771,6 +6774,14 @@
TBool needToUpdatePath( ETrue );
CLOG_WRITE_1( " entering fileName: %S", fileName );
+#ifdef DOWNLOADMGR_PATH_PLUGIN_ENABLED_FF
+ CDownloadPathHandler* downloadPathPlugin = NULL;
+ downloadPathPlugin = GetDownloadPathPluginInstanceL();
+ if( downloadPathPlugin )
+ {
+ CleanupStack::PushL( downloadPathPlugin );
+ }
+#endif
#ifdef RD_MULTIPLE_DRIVE
HBufC8* drivesDynList = iClientApp->Engine()->QueryDynDriveListLC();
TPtrC8 drives( *drivesDynList );
@@ -6786,7 +6797,14 @@
}
if( drive == currentDrive )//if the current path is same as the path in cenrep then no need to update.The diff is because we must have not known size before hand
{
+#ifdef DOWNLOADMGR_PATH_PLUGIN_ENABLED_FF
+ if( !downloadPathPlugin )
+ {
+ needToUpdatePath = EFalse;
+ }
+#else
needToUpdatePath = EFalse;
+#endif
break;
}
else
@@ -6822,8 +6840,23 @@
// Setting RootPath for new Destination file
fileNamePtr.Insert( 0, rootPath );
+#ifdef DOWNLOADMGR_PATH_PLUGIN_ENABLED_FF
+ if( downloadPathPlugin )
+ {
+ GetUpdatedPathFromPluginL(downloadPathPlugin,rootPath,fileNamePtr);
+ CleanupStack::PopAndDestroy( downloadPathPlugin );
+ }
+ else
+ {
+ // Setting KDownloadPath
+ fileNamePtr.Insert( rootPath.Length(), KDownloadPath );
+ }
+#else
// Setting KDownloadPath
fileNamePtr.Insert( rootPath.Length(), KDownloadPath );
+
+#endif
+
#else
TChar driveChar;
fs.DriveToChar(drive, driveChar);
@@ -7190,4 +7223,43 @@
CleanupStack::PushL(fileName);
}
+#ifdef DOWNLOADMGR_PATH_PLUGIN_ENABLED_FF
+
+// -----------------------------------------------------------------------------
+// CHttpDownload::GetDownloadPathPluginInstanceL
+// -----------------------------------------------------------------------------
+//
+CDownloadPathHandler* CHttpDownload::GetDownloadPathPluginInstanceL()
+ {
+ CDownloadPathHandler* downloadPathPlugin = NULL;
+ if ( iContentType )
+ {
+ TRAPD( kErr, downloadPathPlugin = CDownloadPathHandler::NewL( *iContentType ) );
+ if( kErr != KErrNone )
+ {
+ downloadPathPlugin = NULL;
+ }
+ }
+ return downloadPathPlugin;
+
+ }
+
+// -----------------------------------------------------------------------------
+// CHttpDownload::GetUpdatedPathFromPluginL
+// -----------------------------------------------------------------------------
+//
+void CHttpDownload::GetUpdatedPathFromPluginL(CDownloadPathHandler* downloadPathPlugin,TFileName& rootPath, TPtr& fileNamePtr)
+ {
+ HBufC16* locFileName ;
+ locFileName = iStorage->LocalFilename();
+
+ // Gets the updated path for the music content from Plugin
+ TRAPD( kErr, downloadPathPlugin->GetUpdatedPathL( *locFileName, fileNamePtr ) );
+ if( kErr != KErrNone )
+ {
+ // Setting to KDownloadPath
+ fileNamePtr.Insert( rootPath.Length(), KDownloadPath );
+ }
+ }
+#endif
// End of File
--- a/browserutilities/downloadmgr/DownloadMgrUiLib/Src/CDownloadMgrUiUserInteractions.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/browserutilities/downloadmgr/DownloadMgrUiLib/Src/CDownloadMgrUiUserInteractions.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -1044,8 +1044,8 @@
// found one.
if ( handlerI->DownloadConfirmationShown() )
{
+ iEventHandlerArray->Remove( handlerI );
delete handlerI;
- iEventHandlerArray->Remove( handlerI );
--i;
--handlerCount;
}
--- a/browserutilities/feedsengine/FeedsServer/Api/src/FeedsEntity.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/browserutilities/feedsengine/FeedsServer/Api/src/FeedsEntity.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -354,6 +354,7 @@
case EFolderTokenItemEnd:
isMiniItem = EFalse;
+ if(miniItem)
miniItem->SetFeedInterface (iFeedInterface);
// folderItem->AddMiniItem(miniItem);
User::LeaveIfError (currentFolder->iChildren.Append (miniItem));
--- a/browserutilities/feedsengine/FeedsServer/Api/src/Transaction.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/browserutilities/feedsengine/FeedsServer/Api/src/Transaction.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -104,7 +104,6 @@
delete iRequestBuff;
delete iAutoDelete;
- delete iFeedsEntity;
delete iSettingsResponseBuffer;
}
--- a/browserutilities/feedsengine/FeedsServer/UrlHandler/src/ServerHttpConnection.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/browserutilities/feedsengine/FeedsServer/UrlHandler/src/ServerHttpConnection.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -16,6 +16,7 @@
*/
+#include "browser_platform_variant.hrh"
#include <aputils.h>
#include <internetconnectionmanager.h>
@@ -98,9 +99,14 @@
// If need be establish the connection.
if(!IsConnected())
{
+#ifdef BRDO_OCC_ENABLED_FF
+ TUint32 snapId = 0; //Defaults connects to Internet snap
+ iConMgr->SetConnectionType(CMManager::EDestination);
+ iConMgr->SetRequestedSnap(snapId);
+#else
// Set the default access point.
iConMgr->SetRequestedAP( iDefaultAccessPoint );
-
+#endif
// Open a connection.
TRAP(err, err = iConMgr->StartConnectionL(ETrue));
if (err != KErrNone)
--- a/browserutilities/schemehandler/SchemeDispatcher/src/MmsHandler.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/browserutilities/schemehandler/SchemeDispatcher/src/MmsHandler.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -16,7 +16,7 @@
*
*
*/
-
+
// INCLUDE FILES
#include "MmsHandler.h"
--- a/browserutilities/schemehandler/SchemeDispatcher/src/RtspHandler.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/browserutilities/schemehandler/SchemeDispatcher/src/RtspHandler.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -18,7 +18,7 @@
*/
// INCLUDE FILES
-
+
#include "RtspHandler.h"
#include "SchemeDispLogger.h"
#include <ecom/ecom.h> // For REComSession
Binary file browserutilities/webutils/conf/webutils.confml has changed
--- a/codhandler/codeng/group/CodEng.mmp Mon Mar 15 12:44:50 2010 +0200
+++ b/codhandler/codeng/group/CodEng.mmp Wed Mar 31 23:16:40 2010 +0300
@@ -70,6 +70,10 @@
USERINCLUDE ../inc
+#ifdef DOWNLOADMGR_PATH_PLUGIN_ENABLED_FF
+SYSTEMINCLUDE /epoc32/include/ecom
+#endif
+
MW_LAYER_SYSTEMINCLUDE
OS_LAYER_ESTLIB_SYSTEMINCLUDE
#if defined(__PLATFORM_VERSION_S60_50__) || defined(__PLATFORM_VERSION_5250__)
--- a/codhandler/codeng/inc/FileSaver.h Mon Mar 15 12:44:50 2010 +0200
+++ b/codhandler/codeng/inc/FileSaver.h Wed Mar 31 23:16:40 2010 +0300
@@ -33,6 +33,9 @@
class CDrmHandler;
class CCodBuffStorage;
class CCodData;
+#ifdef DOWNLOADMGR_PATH_PLUGIN_ENABLED_FF
+class CDownloadPathHandler;
+#endif
// CLASS DECLARATION
@@ -210,7 +213,20 @@
* Writes Buffer data to file
*/
void FlushL();
-
+#ifdef DOWNLOADMGR_PATH_PLUGIN_ENABLED_FF
+ private:
+ /*
+ * Gets the instance of CDownloadPathHandler from the Plugin implementaion, if present
+ */
+ CDownloadPathHandler* GetDownloadPathPluginInstanceL(TPtrC8& mimetype);
+ /*
+ * Get Updated path from the Plugin Implementation
+ * @param downloadPathPlugin instance of CDownloadPathHandler
+ * @param fname indicates filename
+ * @param fileNamePtr
+ */
+ void GetUpdatedPathFromPluginL(CDownloadPathHandler* downloadPathPlugin,TFileName& fname , TPtr& fileNamePtr);
+#endif
protected: // data
--- a/codhandler/codeng/src/FileSaver.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/codhandler/codeng/src/FileSaver.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -42,6 +42,9 @@
#include <DcfEntry.h>
#include <DcfRep.h>
+#ifdef DOWNLOADMGR_PATH_PLUGIN_ENABLED_FF
+#include <DownloadPathHandler.h>
+#endif
const TInt KDefaultStorageBufferSize = 128 * 1024;
const TInt KDefaultStorageBufferSizePD = 16 * 1024;
@@ -350,15 +353,42 @@
CleanupClosePushL(fs);
CFileMan* file=CFileMan::NewL(fs);
CleanupStack::PushL(file);
-
-
+#ifdef DOWNLOADMGR_PATH_PLUGIN_ENABLED_FF
+ CDownloadPathHandler* downloadPathPlugin = NULL;
+
+ if ( aData.Count() )
+ {
+ // Get the mime type of the first media object
+ TPtrC8 mimeType = (*aData[1]).Type();
+ downloadPathPlugin = GetDownloadPathPluginInstanceL( mimeType );
+
+ if( downloadPathPlugin )
+ {
+ CleanupStack::PushL( downloadPathPlugin );
+ }
+ }
+#endif
for( TInt i = 1; i <= aData.Count() ; ++i )
{
HBufC* filename = HBufC::NewLC(KMaxFileName);
TPtr filenamePtr = filename->Des();
filenamePtr = (*aData[i]).iRootPath;
-
- filenamePtr.Append(_L("download\\"));
+
+#ifdef DOWNLOADMGR_PATH_PLUGIN_ENABLED_FF
+ if( downloadPathPlugin )
+ {
+ TFileName iTempFlName = (*aData[i]).iFullName->Des();
+ GetUpdatedPathFromPluginL( downloadPathPlugin,iTempFlName, filenamePtr );
+ }
+ else
+ {
+ filenamePtr.Append( _L( "download\\" ) );
+ }
+#else
+ filenamePtr.Append( _L( "download\\" ) );
+
+#endif
+
TInt error = fs.MkDirAll(filenamePtr);
if (error!=KErrNone && error!=KErrAlreadyExists)
{
@@ -384,6 +414,12 @@
(*aData[i]).iFullName = NameL();
CleanupStack::PopAndDestroy(filename);
}
+#ifdef DOWNLOADMGR_PATH_PLUGIN_ENABLED_FF
+ if( downloadPathPlugin )
+ {
+ CleanupStack::PopAndDestroy( downloadPathPlugin );
+ }
+#endif
CleanupStack::PopAndDestroy(file);
CleanupStack::PopAndDestroy(&fs);
@@ -425,7 +461,26 @@
HBufC* filename = HBufC::NewLC(KMaxFileName);
TPtr filenamePtr = filename->Des();
filenamePtr = iRootPath;
- filenamePtr.Append(_L("download\\"));
+#ifdef DOWNLOADMGR_PATH_PLUGIN_ENABLED_FF
+ // Get the mime type of the content
+ TPtrC8 mimeType( iType.Des8() );
+ CDownloadPathHandler* downloadPathPlugin = NULL;
+ downloadPathPlugin = GetDownloadPathPluginInstanceL( mimeType );
+
+ if( downloadPathPlugin )
+ {
+ CleanupStack::PushL( downloadPathPlugin );
+ GetUpdatedPathFromPluginL( downloadPathPlugin,iFname, filenamePtr );
+ CleanupStack::PopAndDestroy( downloadPathPlugin );
+ }
+ else
+ {
+ filenamePtr.Append( _L( "download\\" ) );
+ }
+#else
+ filenamePtr.Append( _L( "download\\" ) );
+
+#endif
User::LeaveIfError( fs.Connect() );
CleanupClosePushL(fs);
CFileMan* file=CFileMan::NewL(fs);
@@ -752,3 +807,37 @@
{
return iFname.AllocL();
}
+#ifdef DOWNLOADMGR_PATH_PLUGIN_ENABLED_FF
+
+// ---------------------------------------------------------
+// CFileSaver::GetDownloadPathPluginInstanceL
+// ---------------------------------------------------------
+CDownloadPathHandler* CFileSaver::GetDownloadPathPluginInstanceL(TPtrC8& mimetype )
+ {
+ CDownloadPathHandler* downloadPathPlugin = NULL;
+ TRAPD( kErr, downloadPathPlugin = CDownloadPathHandler::NewL( mimetype ) );
+ if( kErr != KErrNone )
+ {
+ downloadPathPlugin = NULL;
+ }
+ return downloadPathPlugin;
+ }
+
+// ---------------------------------------------------------
+// CFileSaver::GetUpdatedPathFromPluginL
+// ---------------------------------------------------------
+void CFileSaver::GetUpdatedPathFromPluginL(CDownloadPathHandler* downloadPathPlugin,TFileName& fname, TPtr& fileNamePtr)
+ {
+ TRAPD( kErr, downloadPathPlugin->GetUpdatedPathL( fname, fileNamePtr ) );
+ if( kErr == KErrNone )
+ {
+ fileNamePtr.Append( _L( "\\" ) );
+ }
+ else
+ {
+ fileNamePtr.Append( _L( "download\\" ) );
+ }
+ }
+#endif
+
+//EOF
--- a/package_definition.xml Mon Mar 15 12:44:50 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,180 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<SystemDefinition schema="3.0.0">
- <package id="web" name="Web" levels="plugin utils server generic specific">
- <collection id="web_info" name="Web Info" level="specific">
- <component id="web_pub" filter="s60" name="Web Public Interfaces" class="api">
- <unit bldFile="web_pub/group"/>
- <!-- can these be #included in the above bld.inf? -->
- <!-- <unit bldFile="web_pub/browser_control_api/tsrc/group"/> -->
- <!-- <unit bldFile="web_pub/download_mgr_client_api/tsrc/group"/> -->
- <!-- <unit bldFile="web_pub/favourites_engine_api/tsrc/group"/> -->
- </component>
- <component id="web_build" filter="s60" name="Web Build">
- <!-- if the #ifdef can be moved out of here, this can be removed -->
- <unit bldFile="group"/>
- </component>
- <component id="web_plat" filter="s60" name="Web Platform Interfaces" class="api">
- <unit bldFile="web_plat/group"/>
- </component>
- </collection>
- <collection id="browserutilities" name="Browser Utilities" level="utils">
- <component id="browserdialogsprovider" filter="s60" name="Browser Dialogs Provider">
- <unit bldFile="browserutilities/browserdialogsprovider/group"/>
- </component>
- <component id="recenturlstore" filter="s60" name="Recent URL Store">
- <unit bldFile="browserutilities/recenturlstore/group"/>
- </component>
- <component id="xmlparser" filter="s60" name="XML Interface">
- <unit bldFile="browserutilities/xmlparser/group"/>
- </component>
- <component id="cxmllibrary" filter="s60" name="XML Parser Implementation">
- <unit bldFile="browserutilities/cxmllibrary/group"/>
- </component>
- <component id="downloadmgr" filter="s60" name="Download Manager">
- <unit bldFile="browserutilities/downloadmgr/group"/>
- </component>
- <component id="connectionmanager" filter="s60" name="Connection Manager">
- <unit bldFile="browserutilities/connectionmanager/group"/>
- </component>
- <component id="browsertelservice" filter="s60" name="Browser Telephony Service">
- <unit bldFile="browserutilities/browsertelservice/group"/>
- </component>
- <component id="favouritesengine" filter="s60" name="Favourites Engine">
- <unit bldFile="browserutilities/favouritesengine/group"/>
- </component>
- <component id="feedsengine" filter="s60" name="Feeds Engine">
- <unit bldFile="browserutilities/feedsengine/group"/>
- <!-- should this test be #included in the above bld.inf? -->
- <!-- <unit bldFile="browserutilities/feedsengine/feedsserver/reconizer/group"/> -->
- </component>
- <component id="multipartparser" filter="s60" name="Multipart Parser">
- <unit bldFile="browserutilities/multipartparser/group"/>
- </component>
- <component id="schemehandler" filter="s60" name="Scheme Handler">
- <unit bldFile="browserutilities/schemehandler/group"/>
- </component>
- <component id="webutils" filter="s60" name="Web Utils">
- <unit bldFile="browserutilities/webutils/group"/>
- <!-- should this test be #included in the above bld.inf? -->
- <!-- <unit bldFile="browserutilities/webutils/tsrc/public/adv/group"/> -->
- </component>
- <component id="aiwbrowserprovider" filter="s60" name="AIW Browser Provider" class="plugin">
- <unit bldFile="browserutilities/aiwbrowserprovider/group"/>
- </component>
- <component id="browserutilities_build" filter="s60" name="Browser Utilities Build">
- <!-- this can be removed if the #ifdef is moved into the multipart bld.inf -->
- <unit bldFile="browserutilities/group"/>
- </component>
- </collection>
- <collection id="webengine" name="Web Engine" level="server">
- <component id="osswebengine" filter="s60" name="OSS Web Engine">
- <!-- can only have one unit. Either split into multiple components or #include from a single main bld.inf -->
- <unit bldFile="webengine/osswebengine/cache/group"/>
- <unit bldFile="webengine/osswebengine/memorymanager/group"/>
- <unit bldFile="webengine/osswebengine/npscript/group"/>
- <unit bldFile="webengine/osswebengine/webkit/s60/group"/>
- <unit bldFile="webengine/osswebengine/webkit/s60/group/javascriptcore"/>
- <!-- <unit bldFile="webengine/osswebengine/webkit/s60/webview/webview_api_test/group"/> -->
- <!-- <unit bldFile="webengine/osswebengine/webkit/s60/webview/webview_api_test/tsrc/group"/> -->
- </component>
- <component id="webkitutils" filter="s60" name="WebKit Utils">
- <unit bldFile="webengine/webkitutils/group"/>
- </component>
- <component id="pagescaler" filter="s60" name="Page Scaler">
- <unit bldFile="webengine/pagescaler/group"/>
- </component>
- <component id="webwidgetinstaller" filter="s60" name="Widget Installer">
- <unit bldFile="webengine/widgetinstaller/group"/>
- </component>
- <component id="widgetregistry" filter="s60" name="Widget Registry">
- <unit bldFile="webengine/widgetregistry/group"/>
- <!-- should this test be #included in the above bld.inf? -->
- <!-- <unit bldFile="webengine/widgetregistry/tsrc/public/basic/group"/> -->
- </component>
- <component id="wmlengine" filter="s60" name="WML Engine">
- <unit bldFile="webengine/wmlengine/group"/>
- </component>
- <component id="device" filter="s60" name="Device">
- <!-- this needs a more meaningful name -->
- <unit bldFile="webengine/device/group"/>
- </component>
- <component id="widgetengine" filter="s60" name="Widget Engine">
- <unit bldFile="webengine/widgetengine/group"/>
- </component>
- <!--Component manually removed as empty and name conflicts with another component-->
- <component id="web_memoryplugin" name="Memory Plugin" filter="s60" class="plugin">
- <unit bldFile="webengine/memoryplugin/group"/>
- </component>
- <component id="widgetmemoryplugin" filter="s60" name="Widget Memory Plugin" class="plugin">
- <unit bldFile="webengine/widgetmemoryplugin/group"/>
- </component>
- <component id="widgetbackuprestore" filter="s60" name="Widget Backup and Restore">
- <unit bldFile="webengine/widgetbackuprestore/group"/>
- </component>
- <component id="browserrecognizers" filter="s60" name="Browser Recognizers" class="plugin">
- <unit bldFile="webengine/browserrecognizers/group"/>
- </component>
- <component id="wrtharvester" filter="s60" name="Web Runtime Harvester" class="plugin">
- <unit bldFile="webengine/wrtharvester/group"/>
- </component>
- <component id="webengine_build" filter="s60" name="Web Engine Build">
- <!-- should be able to break this up into the above bld.infs -->
- <unit bldFile="webengine/group"/>
- </component>
- </collection>
- <collection id="codhandler" name="Content Object Descriptor Handler" level="specific">
- <component id="codeng" filter="s60" name="COD Engine">
- <unit bldFile="codhandler/codeng/group"/>
- </component>
- <component id="codui" filter="s60" name="COD UI">
- <unit bldFile="codhandler/codui/group"/>
- </component>
- <component id="codrecog" filter="s60" name="COD Recogniser" class="plugin">
- <unit bldFile="codhandler/codrecog/group"/>
- </component>
- <component id="codviewer" filter="s60" name="COD Viewer">
- <unit bldFile="codhandler/codviewer/group"/>
- </component>
- <component id="ddrecog" filter="s60" name="Download Descriptor Recogniser" class="plugin">
- <unit bldFile="codhandler/ddrecog/group"/>
- </component>
- <component id="ddviewer" filter="s60" name="Download Descriptor Viewer">
- <unit bldFile="codhandler/ddviewer/group"/>
- </component>
- <component id="coddownload" filter="s60" name="COD Download">
- <unit bldFile="codhandler/coddownload/group"/>
- </component>
- <component id="roapapp" filter="s60" name="ROAP Application">
- <unit bldFile="codhandler/roapapp/group"/>
- </component>
- <component id="codhandler_build" filter="s60" name="COD Handler Build">
- <!-- is there another component these exports can go into? -->
- <unit bldFile="codhandler/group"/>
- </component>
- </collection>
- <collection id="widgets" name="Web Widget Framework" level="generic">
- <component id="widgetrecognizer" filter="s60" name="Widget Recognizer" class="plugin">
- <unit bldFile="widgets/widgetrecognizer/group"/>
- </component>
- <component id="widgetinstaller" filter="s60" name="Widget Installer UI" class="plugin">
- <unit bldFile="widgets/widgetinstaller/group"/>
- </component>
- <component id="widgetlauncher" filter="s60" name="Widget Launcher">
- <unit bldFile="widgets/widgetlauncher/group"/>
- </component>
- <component id="widgetapp" filter="s60" name="Widget UI">
- <unit bldFile="widgets/widgetapp/group"/>
- </component>
- <component id="widgetpreinstaller" filter="s60" name="Widget Pre-Installer">
- <unit bldFile="widgets/widgetpreinstaller/group"/>
- </component>
- <component id="widgetstartup" filter="s60" name="Widget Startup">
- <unit bldFile="widgets/widgetstartup/group"/>
- </component>
- <component id="widgets_build" filter="s60" name="Widgets Build">
- <!-- can this be broken up into the above components? -->
- <unit bldFile="widgets/group"/>
- </component>
- </collection>
- </package>
-</SystemDefinition>
--- a/web_plat/browser_platform_api/inc/Browser_platform_variant.hrh Mon Mar 15 12:44:50 2010 +0200
+++ b/web_plat/browser_platform_api/inc/Browser_platform_variant.hrh Wed Mar 31 23:16:40 2010 +0300
@@ -166,11 +166,21 @@
//To provide WidgetSIDChecker support
#define APP_SID_CHECK_SUPPORT_FF
+//AT&T DownloadMgr path support flag
+#define DOWNLOADMGR_PATH_PLUGIN_ENABLED_FF
+
// One Click Connectivity support flag
#define BRDO_OCC_ENABLED_FF
//Single click flag
#define BRDO_SINGLE_CLICK_ENABLED_FF
+
+//Video player 2, surface aware controller,
+#define BRDO_VIDEOPLAYER2_ENABLED_FF
+
+//To enable for IAD Update (For add-on Browser)
+#define BRDO_IAD_UPDATE_ENABLED_FF
+
/*
* ===================
* S60 3.23
@@ -178,12 +188,22 @@
*/
#if defined(__PLATFORM_VERSION_32__)
+//Video player 2, surface aware controller,
+#undef BRDO_VIDEOPLAYER2_ENABLED_FF
+
+
//OCC support
#undef BRDO_OCC_ENABLED_FF
+//AT&T DownloadMgr path support flag
+#undef DOWNLOADMGR_PATH_PLUGIN_ENABLED_FF
+
//Single click support
#undef BRDO_SINGLE_CLICK_ENABLED_FF
+//To enable for IAD Update (For add-on Browser)
+#undef BRDO_IAD_UPDATE_ENABLED_FF
+
//To provide WidgetSIDChecker support
#undef APP_SID_CHECK_SUPPORT_FF
@@ -257,11 +277,22 @@
*/
#elif defined(__PLATFORM_VERSION_S60_50__)
+
+//Video player 2, surface aware controller,
+#undef BRDO_VIDEOPLAYER2_ENABLED_FF
+
//OCC support
#undef BRDO_OCC_ENABLED_FF
+
+//AT&T DownloadMgr path support flag
+#undef DOWNLOADMGR_PATH_PLUGIN_ENABLED_FF
+
//Single click support
#undef BRDO_SINGLE_CLICK_ENABLED_FF
+//To enable for IAD Update (For add-on Browser)
+#undef BRDO_IAD_UPDATE_ENABLED_FF
+
// Flag for Multi touch enable
#undef BRDO_MULTITOUCH_ENABLED_FF
//To provide WidgetSIDChecker support
@@ -326,11 +357,22 @@
*/
#elif defined(__PLATFORM_VERSION_5250__)
+//Video player 2, surface aware controller,
+#undef BRDO_VIDEOPLAYER2_ENABLED_FF
+
+//AT&T DownloadMgr path support flag
+#undef DOWNLOADMGR_PATH_PLUGIN_ENABLED_FF
+
//OCC support
#undef BRDO_OCC_ENABLED_FF
+
//Single click support
#undef BRDO_SINGLE_CLICK_ENABLED_FF
+//To enable for IAD Update (For add-on Browser)
+#define BRDO_IAD_UPDATE_ENABLED_FF
+
+
// Flag for Multi touch enable
#undef BRDO_MULTITOUCH_ENABLED_FF
@@ -369,11 +411,20 @@
*/
#elif defined(__PLATFORM_VERSION_51__)
+//Video player 2, surface aware controller,
+#undef BRDO_VIDEOPLAYER2_ENABLED_FF
+
+//AT&T DownloadMgr path support flag
+#undef DOWNLOADMGR_PATH_PLUGIN_ENABLED_FF
+
//OCC support
#undef BRDO_OCC_ENABLED_FF
//Single click support
#undef BRDO_SINGLE_CLICK_ENABLED_FF
+//To enable for IAD Update (For add-on Browser)
+#undef BRDO_IAD_UPDATE_ENABLED_FF
+
// Flag for Multi touch enable
#undef BRDO_MULTITOUCH_ENABLED_FF
@@ -405,15 +456,24 @@
#undef BRDO_STATIC_DATA_CLEANUP_SUPPORT_FF
#elif defined(__PLATFORM_VERSION_52_TB92__)
+//Video player 2, surface aware controller,
+#define BRDO_VIDEOPLAYER2_ENABLED_FF
+
// 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
+//AT&T DownloadMgr path support flag
+#define DOWNLOADMGR_PATH_PLUGIN_ENABLED_FF
+
//Single click support
#define BRDO_SINGLE_CLICK_ENABLED_FF
+//To enable for IAD Update (For add-on Browser)
+#define BRDO_IAD_UPDATE_ENABLED_FF
+
#define BRDO_BROWSER_50_FF
#define BRDO_BROWSER_51_FF
#define BRDO_BROWSER_52_FF
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/web_plat/download_path_plugin_api/group/bld.inf Wed Mar 31 23:16:40 2010 +0300
@@ -0,0 +1,33 @@
+/*
+* ==============================================================================
+* Name : bld.inf
+* Part of : web_plat / download_path_plugin_api
+* Description : Build information file for download path plugin api
+* Version : %version: sd1s60p2#1 % << Don't touch! Updated by Synergy at check-out.
+*
+* Copyright (c) 2010 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 <platform_paths.hrh>
+#include "../../browser_platform_api/inc/browser_platform_variant.hrh"
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+../inc/DownloadPathHandler.h MW_LAYER_PLATFORM_EXPORT_PATH( DownloadPathHandler.h )
+../inc/DownloadPathHandler.inl MW_LAYER_PLATFORM_EXPORT_PATH( DownloadPathHandler.inl )
+
+PRJ_MMPFILES
+
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/web_plat/download_path_plugin_api/inc/DownloadPathHandler.h Wed Mar 31 23:16:40 2010 +0300
@@ -0,0 +1,113 @@
+/*****************************************************************************
+ File : DownloadPathHandler.h
+ Part of : web_plat / download_path_plugin_api
+ Description : Download path handler plugin interface definition file
+ Version : %version: 1 % << Don't touch! Updated by Synergy at check-out.
+
+ Copyright (c) 2010 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.
+
+ *****************************************************************************
+ Declaration of the CDownloadPathHandler class
+ *****************************************************************************/
+
+#ifndef DOWNLOADPATHHANDLER_H
+#define DOWNLOADPATHHANDLER_H
+
+// INCLUDES
+#include <e32base.h>
+#include <ECom.h>
+#include <badesca.h>
+
+// FORWARD DECLARATIONS
+
+// UID of this interface
+const TUid KCDownloadPathHandlerUid = { 0x2002682B };
+
+/**
+*
+* @class CDownloadPathHandler DownloadPathHandler.h
+* @brief This is an interface of the Music Download Path Handler ECOM plugin
+*
+* @version 1.0
+*
+*/
+class CDownloadPathHandler : public CBase
+ {
+ public:
+
+ /**
+ * Instantiates an object of this type
+ * using the aMatchString as the resolver parameter.
+ * @param aMatchString - 8 bit resolver parameter (content mime type)
+ * @return CDownloadPathHandler instance
+ */
+ static CDownloadPathHandler* NewL( const TDesC8& aMatchString );
+
+ /**
+ * Instantiates an object of this type
+ * using the aMatchString as the resolver parameter.
+ * Leaves the pointer to the object on the cleanup stack.
+ * @param aMatchString - 8 bit resolver parameter (content mime type)
+ * @return CDownloadPathHandler instance
+ */
+ static CDownloadPathHandler* NewLC( const TDesC8& aMatchString );
+
+ /**
+ * Instantiates an object of this type
+ * using the aMatchString as the resolver parameter.
+ * @param aMatchString - 16 bit resolver parameter (content mime type)
+ * @return CDownloadPathHandler instance
+ */
+ static CDownloadPathHandler* NewL( const TDesC& aMatchString );
+
+ /**
+ * Instantiates an object of this type
+ * using the aMatchString as the resolver parameter.
+ * Leaves the pointer to the object on the cleanup stack.
+ * @param aMatchString - 16 bit resolver parameter (content mime type)
+ * @return CDownloadPathHandler instance
+ */
+ static CDownloadPathHandler* NewLC( const TDesC& aMatchString );
+
+ /**
+ * Destructor.
+ */
+ virtual ~CDownloadPathHandler();
+
+ /**
+ * Request a list of all available implementations which
+ * satisfy this given interface.
+ * @param aImplInfoArray - array to be filled in
+ * @return none
+ */
+ static void ListAllImplementationsL( RImplInfoPtrArray& aImplInfoArray );
+
+ /**
+ * Gets the updated destination path to store downloaded content.
+ * @param aFileName File name with path.
+ * @param aDestPath Destination path of the content.
+ */
+ virtual void GetUpdatedPathL( const TDesC& aFileName, TDes& aDestPath ) = 0;
+
+ protected:
+ /**
+ * Default C++ c'tor
+ */
+ inline CDownloadPathHandler();
+
+ private:
+ // Unique instance identifier key
+ TUid iDtor_ID_Key;
+ };
+
+#include "DownloadPathHandler.inl"
+
+#endif /* DownloadPathHandler_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/web_plat/download_path_plugin_api/inc/DownloadPathHandler.inl Wed Mar 31 23:16:40 2010 +0300
@@ -0,0 +1,110 @@
+/*****************************************************************************
+ File : DownloadPathHandler.inl
+ Part of : web_plat / download_path_plugin_api
+ Description : Music path plugin interface inline implementation file
+ Version : %version: 1 % << Don't touch! Updated by Synergy at check-out.
+
+ Copyright (c) 2010 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.
+
+ *****************************************************************************
+ Definition of the CDownloadPathHandler inline functions
+ *****************************************************************************/
+
+// -----------------------------------------------------------------------------
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+inline CDownloadPathHandler::CDownloadPathHandler()
+ {
+ }
+
+// -----------------------------------------------------------------------------
+// Destructor only uses the ECOM framework and the private member iDtor_ID_Key
+// to destroy the instance
+// -----------------------------------------------------------------------------
+//
+inline CDownloadPathHandler::~CDownloadPathHandler()
+ {
+ // Destroy any instance variables and then
+ // inform the framework that this specific
+ // instance of the interface has been destroyed.
+ REComSession::DestroyedImplementation( iDtor_ID_Key );
+ }
+
+// -----------------------------------------------------------------------------
+// This factory uses a resolver parameter to find appropriate type of the
+// instance to be returned
+// -----------------------------------------------------------------------------
+//
+inline CDownloadPathHandler* CDownloadPathHandler::NewL( const TDesC& aMatchString )
+ {
+ CDownloadPathHandler* handler = CDownloadPathHandler::NewLC( aMatchString );
+ CleanupStack::Pop( handler );
+ return handler;
+ }
+
+// -----------------------------------------------------------------------------
+// This factory uses a resolver parameter to find appropriate type of the
+// instance to be returned. Leaves pointer on the cleanup stack.
+// -----------------------------------------------------------------------------
+//
+inline CDownloadPathHandler* CDownloadPathHandler::NewLC( const TDesC& aMatchString )
+ {
+ HBufC8* matchString8 = HBufC8::NewLC( aMatchString.Length() );
+ matchString8->Des().Copy( aMatchString );
+ CDownloadPathHandler* handler = CDownloadPathHandler::NewLC( matchString8->Des() );
+ CleanupStack::PopAndDestroy( matchString8 );
+ return handler;
+ }
+
+// -----------------------------------------------------------------------------
+// This factory uses a resolver parameter to find appropriate type of the
+// instance to be returned
+// -----------------------------------------------------------------------------
+//
+inline CDownloadPathHandler* CDownloadPathHandler::NewL( const TDesC8& aMatchString )
+ {
+ CDownloadPathHandler* handler = CDownloadPathHandler::NewLC( aMatchString );
+ CleanupStack::Pop( handler );
+ return handler;
+ }
+
+// -----------------------------------------------------------------------------
+// This factory uses a resolver parameter to find appropriate type of the
+// instance to be returned. Leaves pointer on the cleanup stack.
+// -----------------------------------------------------------------------------
+//
+inline CDownloadPathHandler* CDownloadPathHandler::NewLC( const TDesC8& aMatchString )
+ {
+ // Set up the interface find for the default resolver.
+ TEComResolverParams resolverParams;
+ resolverParams.SetDataType( aMatchString );
+ resolverParams.SetWildcardMatch( ETrue ); // Allow wildcard matching
+
+ TAny* ptr = REComSession::CreateImplementationL( KCDownloadPathHandlerUid,
+ _FOFF( CDownloadPathHandler,iDtor_ID_Key ),
+ resolverParams );
+ CleanupStack::PushL( ptr );
+ return REINTERPRET_CAST( CDownloadPathHandler*, ptr );
+ }
+
+// -----------------------------------------------------------------------------
+// This function lists all the implementations currently present in the
+// ECOM framework.
+// -----------------------------------------------------------------------------
+//
+inline void CDownloadPathHandler::ListAllImplementationsL( RImplInfoPtrArray& aImplInfoArray )
+ {
+ REComSession::ListImplementationsL( KCDownloadPathHandlerUid, aImplInfoArray );
+ }
+
+// End of file
--- a/web_plat/group/bld.inf Mon Mar 15 12:44:50 2010 +0200
+++ b/web_plat/group/bld.inf Wed Mar 31 23:16:40 2010 +0300
@@ -25,6 +25,9 @@
#include "../connection_manager_api/group/bld.inf"
#include "../cxml_library_api/group/bld.inf"
#include "../download_mgr_client_api_extn/group/bld.inf"
+#ifdef DOWNLOADMGR_PATH_PLUGIN_ENABLED_FF
+#include "../download_path_plugin_api/group/bld.inf"
+#endif
#include "../feeds_engine_api/group/bld.inf"
#include "../launcher_api/group/bld.inf"
#ifdef BRDO_MULTIPART_PARSER_FF
--- a/web_plat/widget_registry_api/inc/WidgetRegistryConstants.h Mon Mar 15 12:44:50 2010 +0200
+++ b/web_plat/widget_registry_api/inc/WidgetRegistryConstants.h Wed Mar 31 23:16:40 2010 +0300
@@ -29,6 +29,8 @@
const TUid KWidgetRegistryServerUid = { 0x10282F06 };
const TUid KUidWidgetUi = { 0x10282822 };
const TUid KUidWidgetLauncher = { 0x10282821 };
+const TUid KUidWgtWidgetLauncher = { 0x200267DC };
+
#define WIDGETPROPERTYLISTVERSION 4
@@ -73,6 +75,7 @@
_LIT( KWidgetRegistryImage, "WidgetRegistry" ); // DLL/EXE name
_LIT8( KWidgetMime, "application/x-nokia-widget");
_LIT( KLauncherApp, "widgetlauncher.exe" );
+_LIT( KWgtLauncherApp, "wgtwidgetlauncher.exe" );
// Enumerations
--- a/web_pub/browser_control_api/inc/BrCtlDefs.h Mon Mar 15 12:44:50 2010 +0200
+++ b/web_pub/browser_control_api/inc/BrCtlDefs.h Wed Mar 31 23:16:40 2010 +0300
@@ -18,7 +18,7 @@
#ifndef BRCTLDEFS_H
#define BRCTLDEFS_H
-
+#include <browser_platform_variant.hrh>
// INCLUDES
// DATA TYPES
@@ -207,6 +207,14 @@
ECommandLeaveFullscreenBrowsing,
ECommandZoomIn,
ECommandZoomOut
+#ifdef BRDO_OCC_ENABLED_FF
+ ,
+ ECommandRetryTransactions,
+ ECommandSetRetryConnectivityFlag,
+ ECommandUnSetRetryConnectivityFlag,
+ ECommandClearQuedTransactions,
+ ECommandConnToDownloadManager
+#endif
};
/**
* The load event that occurred.
--- a/web_pub/browser_control_api/tsrc/data/ui_browser_control_api.cfg Mon Mar 15 12:44:50 2010 +0200
+++ b/web_pub/browser_control_api/tsrc/data/ui_browser_control_api.cfg Wed Mar 31 23:16:40 2010 +0300
@@ -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
--- a/webengine/device/src/DeviceLiwBinding.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/webengine/device/src/DeviceLiwBinding.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -1149,13 +1149,16 @@
}
CWidgetPropertyValue* displayname = widgetregistry.GetWidgetPropertyValueL(m_Uid, EBundleDisplayName );
+ if(displayname)
+ {
+ CleanupStack::PushL(displayname);
+ if(displayname->iType == EWidgetPropTypeString)
+ m_scriptSession->SetApplicationNameL(*displayname);
+ CleanupStack::PopAndDestroy(); // displayname
+ }
+
User::LeaveIfError(widgetregistry.Disconnect());
- CleanupStack::PopAndDestroy(); //widgetregistry
-
- if ( displayname && displayname->iType == EWidgetPropTypeString )
- {
- m_scriptSession->SetApplicationNameL(*displayname);
- }
+ CleanupStack::PopAndDestroy(); // widgetregistry
);
}
#endif
--- a/webengine/osswebengine/WebCore/bridge/EditorClient.h Mon Mar 15 12:44:50 2010 +0200
+++ b/webengine/osswebengine/WebCore/bridge/EditorClient.h Wed Mar 31 23:16:40 2010 +0300
@@ -138,9 +138,7 @@
virtual bool spellingUIIsShowing() = 0;
virtual void getGuessesForWord(const String&, Vector<String>& guesses) = 0;
virtual void setInputMethodState(bool enabled) = 0;
-#if PLATFORM(SYMBIAN)
- virtual void preFocusChange(Node* oldNode, Node* newNode) = 0;
-#endif
+
};
}
--- a/webengine/osswebengine/WebCore/page/FocusController.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/webengine/osswebengine/WebCore/page/FocusController.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -268,10 +268,7 @@
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) {
--- a/webengine/osswebengine/WebCore/page/symbian/WebCoreFrameBridge.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/webengine/osswebengine/WebCore/page/symbian/WebCoreFrameBridge.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -162,7 +162,8 @@
bool userChosen = !encoding.isNull() && !encoding.isEmpty();
if (encoding.isNull()||encoding.isEmpty())
encoding = textEncodingName;
- m_frame->loader()->setEncoding(encoding, userChosen);
+ if (m_frame && m_frame->loader())
+ m_frame->loader()->setEncoding(encoding, userChosen);
addData(data, length);
}
--- a/webengine/osswebengine/WebCore/platform/network/symbian/HttpConnection.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/webengine/osswebengine/WebCore/platform/network/symbian/HttpConnection.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -709,7 +709,12 @@
const TDesC8& fragment = uriParser.Extract( EUriFragment );
delete m_frag;
m_frag = NULL;
- m_frag = fragment.AllocL();
+ //Browser does not allow fragment size of greater than 2083 bytes
+ TInt32 maxbyte = fragment.Length();
+ if ( maxbyte <= 2083)
+ {
+ m_frag = fragment.AllocL();
+ }
}
HandleSpecialEvent(aEvent.iStatus);
break;
@@ -721,7 +726,10 @@
default:
{
// error handling
- handleError(aEvent.iStatus);
+ if(aEvent.iStatus == KErrNotReady || aEvent.iStatus == KErrDisconnected )
+ StaticObjectsContainer::instance()->resourceLoaderDelegate()->httpSessionManager()->setRetryConnectivityFlag();
+ else
+ handleError(aEvent.iStatus);
break;
}
}
@@ -779,6 +787,13 @@
void HttpConnection::complete(int error)
{
+ TBool retryFlag = StaticObjectsContainer::instance()->resourceLoaderDelegate()->httpSessionManager()->getRetryConnectivityFlag();
+ if( retryFlag )
+ {
+ //m_cancelled = false; //for flash
+ return;
+ }
+
if (m_defersData) {
m_defersData->m_done = true;
m_defersData->m_error = error;
@@ -814,6 +829,7 @@
m_MultipartContentHandler->MarkupContent(), m_maxSize, this);
}
delete m_MultipartContentHandler;
+ m_IsMultipart = false;
}
if (!error) {
// Spawn active object for call to return immediately, to avoid blocking
--- a/webengine/osswebengine/WebCore/platform/network/symbian/HttpSessionManager.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/webengine/osswebengine/WebCore/platform/network/symbian/HttpSessionManager.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -37,6 +37,7 @@
#include "ResourceHandleManagerSymbian.h"
#include "StaticObjectsContainer.h"
#include "WebFrame.h"
+#include "ResourceHandleClient.h"
// CONSTANTS
_LIT8( KHttpProtString, "HTTP/TCP" );
@@ -58,6 +59,7 @@
m_httpDownload = NULL;
m_SelfDownloadContentHandler = NULL;
m_SelfDownloadContentTypes = KNullStr().Alloc();
+ retryConnectivityFlag = EFalse;
}
HttpSessionManager::~HttpSessionManager()
@@ -256,6 +258,28 @@
}
}
+void HttpSessionManager::retryTransactions()
+{
+ Vector<HttpConnection *> requests;
+
+ for(HashMap<HttpConnection *, ResourceHandle *>::iterator tmpit = m_pendingHttpRequests.begin();
+ tmpit != m_pendingHttpRequests.end(); ++tmpit)
+ {
+ ResourceHandle *tmp = tmpit->second;
+ ResourceHandleClient* client = tmp->client();
+ if(!client->isLoadingPlugins())
+ requests.append(tmpit->first);
+ }
+ //Cancel all transactions first
+ //Submit them again
+ for (int i=0; i<requests.size(); ++i)
+ {
+ requests[i]->HttpTransaction()->Cancel();
+ requests[i]->HttpTransaction()->SubmitL();
+ }
+
+}
+
HttpConnection* HttpSessionManager::firstHttpConnection()
{
HashMap<HttpConnection *, ResourceHandle *>::const_iterator it = m_pendingHttpRequests.begin();
--- a/webengine/osswebengine/WebCore/platform/network/symbian/HttpSessionManager.h Mon Mar 15 12:44:50 2010 +0200
+++ b/webengine/osswebengine/WebCore/platform/network/symbian/HttpSessionManager.h Wed Mar 31 23:16:40 2010 +0300
@@ -95,7 +95,12 @@
void UpdateCacheL( const WebCore::String& url, const WebCore::String &equiv, const WebCore::String &content );
void ResetOutstandingSelfDl() {m_OutstandingSelfDl = false; }
const RPointerArray<HBufC8>& ClientAcceptHeaders() const { return m_ClientAcceptHeaders; }
-
+ void retryTransactions();
+ void setRetryConnectivityFlag(){ retryConnectivityFlag = ETrue; }
+ TBool getRetryConnectivityFlag(){ return retryConnectivityFlag; }
+ void unSetRetryConnectivityFlag(){ retryConnectivityFlag = EFalse; }
+ TUint pendingTransactionsCount(){ return m_pendingHttpRequests.size(); }
+
private:
void updateFilters(bool initializing = false);
int count();
@@ -128,6 +133,8 @@
HBufC* m_SelfDownloadContentTypes;
bool m_OutstandingSelfDl;
RPointerArray<HBufC8> m_ClientAcceptHeaders;
+ TBool retryConnectivityFlag;
+
};
#endif // __HTTPSESSIONMANAGER_H__
// end of file
--- a/webengine/osswebengine/WebCore/platform/network/symbian/HttpUiCallbacks.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/webengine/osswebengine/WebCore/platform/network/symbian/HttpUiCallbacks.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -245,7 +245,9 @@
}
// If the user selected "No" or "Cancel", we are cancelling the load
if ( !result )
- {
+ { //Update history view Index also here...
+ if( brctl->historyHandler()->historyController()->historyViewEnabled() )
+ brctl->historyHandler()->historyController()->rollBackIndex();
brctl->HandleBrowserLoadEventL(TBrCtlDefs::EEventContentFinished,0,0);
return KErrCancel;
}
--- a/webengine/osswebengine/WebCore/platform/symbian/FontCacheSymbian.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/webengine/osswebengine/WebCore/platform/symbian/FontCacheSymbian.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -161,6 +161,8 @@
return iDeviceDefaultFont;
}
+const double KFontZoomStepSize = 0.05;
+const double KFontZoomBeginValue = 1.00;
CFont* PlatformFontCache::CreateFont(const ZoomedSpec& spec)
{
CFont* font = 0;
@@ -174,15 +176,26 @@
}
}
-
if (spec.m_spec.iTypeface.iName == KPlatformDefaultFontFamily) {
// fall back to platform default fonts by using TAknFontFamily
font = AknFontAccess::GetClosestFont(*iScreenDevice, spec.m_spec.iFontStyle, spec.m_spec.iHeight * spec.m_zoom/100, (AknFontAccess::TAknFontFamily)0);
}
else {
font = AknFontAccess::GetClosestFont(*iScreenDevice, spec.m_spec.iFontStyle, spec.m_spec.iHeight * spec.m_zoom/100, spec.m_spec.iTypeface.iName);
+
+ if(spec.m_zoom != 100) {
+ CFont *fontAt100Zoom = AknFontAccess::GetClosestFont(*iScreenDevice, spec.m_spec.iFontStyle, spec.m_spec.iHeight, spec.m_spec.iTypeface.iName);
+
+ double zoomout = KFontZoomBeginValue;
+ /* When width zoom ratio exceeds the expected zoom value, adjust it by reducing the font size*/
+ while((font->MaxCharWidthInPixels() * 100.0)/fontAt100Zoom->MaxCharWidthInPixels() > spec.m_zoom) {
+ zoomout = zoomout - KFontZoomStepSize;
+ ReleaseFont(font);
+ font = AknFontAccess::GetClosestFont(*iScreenDevice, spec.m_spec.iFontStyle, (spec.m_spec.iHeight * spec.m_zoom * zoomout)/100, spec.m_spec.iTypeface.iName);
+ }
+ ReleaseFont(fontAt100Zoom);
+ }
}
-
if (font) {
ZoomedSpec newSpec(spec);
--- a/webengine/osswebengine/WebCore/platform/symbian/RenderThemeSymbian.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/webengine/osswebengine/WebCore/platform/symbian/RenderThemeSymbian.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -480,7 +480,9 @@
image = m_selectArrow;
break;
}
- CMaskedBitmap* maskedBitmap = image->getMaskedBitmap();
+ CMaskedBitmap* maskedBitmap = NULL;
+ if(image)
+ maskedBitmap = image->getMaskedBitmap();
if (!maskedBitmap) User::Leave(KErrGeneral); // should not really happen
TSize size = maskedBitmap->SizeInPixels();
size.iWidth = (size.iWidth * scalingFactor) / 100;
--- a/webengine/osswebengine/WebCore/rendering/RenderFrameSet.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/webengine/osswebengine/WebCore/rendering/RenderFrameSet.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -474,8 +474,10 @@
// make the top level frameset at least 800*600 wide/high
calcPrefWidths();
m_width = max(m_width, m_minPrefWidth);
+#ifndef PLATFORM(SYMBIAN)
if (!v->frame()->ownerElement())
m_height = max(m_height, 600);
+#endif
}
}
@@ -518,9 +520,11 @@
if (!flattenFrameset())
return;
+#ifndef PLATFORM(SYMBIAN)
// make the top level frameset at least 800*600 wide/high
if (!parent()->isFrameSet() && !element()->document()->frame()->ownerElement())
m_minPrefWidth = max(m_minPrefWidth, 800);
+#endif
m_maxPrefWidth = m_minPrefWidth;
--- a/webengine/osswebengine/WebCore/rendering/RenderLayer.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/webengine/osswebengine/WebCore/rendering/RenderLayer.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -1298,9 +1298,15 @@
static Image* resizeCornerImage;
if (!resizeCornerImage)
resizeCornerImage = Image::loadPlatformResource("textAreaResizeCorner");
- IntPoint imagePoint(scrollCorner.right() - resizeCornerImage->width(), scrollCorner.bottom() - resizeCornerImage->height());
- p->drawImage(resizeCornerImage, imagePoint);
-
+#if PLATFORM(SYMBIAN)
+ if(resizeCornerImage){
+ IntPoint imagePoint(scrollCorner.right() - resizeCornerImage->width(), scrollCorner.bottom() - resizeCornerImage->height());
+ p->drawImage(resizeCornerImage, imagePoint);
+ }
+#else
+ IntPoint imagePoint(scrollCorner.right() - resizeCornerImage->width(), scrollCorner.bottom() - resizeCornerImage->height());
+ p->drawImage(resizeCornerImage, imagePoint);
+#endif
// Draw a frame around the resizer (1px grey line) if there are any scrollbars present.
// Clipping will exclude the right and bottom edges of this frame.
if (m_hBar || m_vBar) {
--- a/webengine/osswebengine/WebCore/rendering/bidi.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/webengine/osswebengine/WebCore/rendering/bidi.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -760,6 +760,8 @@
int maxTextWidth = v->frameView()->frame()->bridge()->maxBidiWidth();
maxTextWidth = max(maxTextWidth - leftOffset(m_height), 0);
availableWidth = min(availableWidth, maxTextWidth);
+ //total width is more then availaible width.Dont justify based on screen width
+ availableWidth = totWidth > availableWidth ? lineWidth(m_height) : availableWidth ;
}
#endif
spaceAdd = (availableWidth - totWidth)*spaces/numSpaces;
--- a/webengine/osswebengine/WebKit/s60/plugins/PluginSkin.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/webengine/osswebengine/WebKit/s60/plugins/PluginSkin.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -44,6 +44,8 @@
#include "ResourceRequest.h"
#include "Widget.h"
#include "PlatformScrollBar.h"
+#include "Page.h"
+#include "FocusController.h"
#include <ApEngineConsts.h>
#include <Uri8.h>
@@ -52,6 +54,7 @@
#include "WidgetExtension.h"
#include <widgetregistryclient.h>
+
// CONSTANTS
using namespace WebCore;
// scheme for RTSP url
@@ -195,8 +198,11 @@
#endif
TInt uid = wdgtExt->GetWidgetId();
+
CWidgetPropertyValue* AccessValue = widgetregistry.GetWidgetPropertyValueL(TUid::Uid(uid), EAllowNetworkAccess );
- TInt networkAccess = *AccessValue;
+ TInt networkAccess = AccessValue && *AccessValue;
+ delete AccessValue;
+
const TDesC& allowNetworkAccess = KAllowNetworkAccess();
NPN_GenericElement NetworkAccess(allowNetworkAccess,networkAccess);
iGenericElementArray->AppendL(NetworkAccess);
@@ -566,6 +572,7 @@
{
m_active = ETrue;
m_frame->frameView()->topView()->setFocusedElementType(TBrCtlDefs::EElementActivatedObjectBox);
+ control(m_frame)->webView()->page()->focusController()->setFocusedNode(getElement(), control(m_frame)->webView()->page()->focusController()->focusedOrMainFrame());
pluginHandler->setActivePlugin(this);
pluginHandler->setPluginToActivate(NULL);
}
@@ -805,7 +812,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());
@@ -827,8 +834,8 @@
HBufC8* absoluteUrl = makeAbsoluteUrlL(m_url, docUrl, url);
CleanupStack::PushL(absoluteUrl);
- if( (loadmode == ELoadModePlugin ) || (url.FindF(KSwfExtn)!= KErrNotFound) ){
-
+ PluginHandler* pluginHandler = StaticObjectsContainer::instance()->pluginHandler();
+ if( (loadmode == ELoadModePlugin ) || (loadmode == ELoadModeTop && (pluginHandler->pluginMimeByExtention(url) != NULL)) ){
if (m_instance && m_pluginfuncs) {
NetscapePlugInStreamLoaderClient* pluginloader = NetscapePlugInStreamLoaderClient::NewL(url, this, core(m_frame), notifydata, notify);
@@ -1198,3 +1205,40 @@
return EWindowTypeUnknown;
}
+
+void PluginSkin::reCreatePlugin()
+{
+ //destroy the plugin
+
+ Vector<PluginStream*> streams;
+ for (HashSet<PluginStream*>::iterator it = m_streams.begin(); it != m_streams.end(); ++it) {
+ streams.append(*it);
+ }
+ for (int i=0; i<streams.size(); ++i) {
+ streams[i]->close();
+ }
+ m_streams.clear();
+
+ if (m_instance && m_pluginfuncs && m_pluginfuncs->destroy) {
+ m_pluginfuncs->destroy(m_instance, NULL);
+ }
+ User::Free(m_instance); m_instance = 0;
+ delete m_pluginwin; m_pluginwin = 0;
+ delete iJavascriptTimer; iJavascriptTimer = 0;
+
+ RFs& rfs = StaticObjectsContainer::instance()->fsSession();
+ for(TInt i=0; i < m_tempFilesArray.Count(); i++)
+ {
+ rfs.Delete(m_tempFilesArray[i]->Des());
+ }
+
+ m_tempFilesArray.ResetAndDestroy();
+
+
+ //create/load the destroyed plugin again
+
+ NetscapePlugInStreamLoaderClient* pluginloader = NetscapePlugInStreamLoaderClient::NewL(m_url->Des(), this, core(m_frame));
+ if (pluginloader) {
+ pluginloader->start();
+ }
+}
--- a/webengine/osswebengine/WebKit/s60/plugins/PluginSkin.h Mon Mar 15 12:44:50 2010 +0200
+++ b/webengine/osswebengine/WebKit/s60/plugins/PluginSkin.h Wed Mar 31 23:16:40 2010 +0300
@@ -414,6 +414,8 @@
TInt handleNetworkAccess() const;
WebCore::Element* getElement() {return m_element;}
void setElement(WebCore::Element* aElement) {m_element = aElement;}
+ void reCreatePlugin();
+ TInt activeStreams() { return m_streams.size(); }
public: // from MMemoryCollector
TUint Collect(unsigned int aRequired);
--- a/webengine/osswebengine/WebKit/s60/plugins/PluginWin.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/webengine/osswebengine/WebKit/s60/plugins/PluginWin.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -223,6 +223,7 @@
cursor->cursorUpdate(EFalse);
consumed = ETrue;
setPluginFocusL( ETrue );
+ m_pluginskin->pluginFocusChanged(ETrue);
}
else
--- a/webengine/osswebengine/WebKit/s60/webcoresupport/WebEditorClient.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/webengine/osswebengine/WebKit/s60/webcoresupport/WebEditorClient.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -317,7 +317,7 @@
//-----------------------------------------------------------------------------
void WebEditorClient::handleKeypress(KeyboardEvent* event)
{
- if (!m_webView && !m_webView->page()) {
+ if (!(m_webView && m_webView->page())) {
return;
}
@@ -691,12 +691,6 @@
}
}
-void WebEditorClient::preFocusChange(Node* oldNode, Node* newNode)
- {
- TBool contentEditable = m_webView->page()->focusController()->focusedOrMainFrame()->selectionController()->isContentEditable();
- if ( oldNode && newNode && contentEditable ) {
- m_webView->fepTextEditor()->FocusChanging();
- }
- }
+
--- a/webengine/osswebengine/WebKit/s60/webcoresupport/WebEditorClient.h Mon Mar 15 12:44:50 2010 +0200
+++ b/webengine/osswebengine/WebKit/s60/webcoresupport/WebEditorClient.h Wed Mar 31 23:16:40 2010 +0300
@@ -97,7 +97,7 @@
bool spellingUIIsShowing();
void getGuessesForWord(const WebCore::String&, Vector<WebCore::String>& guesses);
void setInputMethodState(bool enabled);
- void preFocusChange(WebCore::Node* oldNode, WebCore::Node* newNode);
+
private:
void handleInsertText(WebCore::Frame* frame, const WebCore::String& text);
--- a/webengine/osswebengine/WebKit/s60/webview/BrCtl.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/webengine/osswebengine/WebKit/s60/webview/BrCtl.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -502,8 +502,6 @@
// Set the rect for BrowserControl (a CCoeControl).
SetRect(aRect);
CCoeEnv::Static()->DisableExitChecks(true);
- Window().AllocPointerMoveBuffer(256, 0);
- Window().DisablePointerMoveBuffer();
Window().PointerFilter(EPointerFilterMove | EPointerFilterDrag | EPointerFilterEnterExit, 0);
ActivateL();
}
@@ -962,6 +960,48 @@
break;
}
+#ifdef BRDO_OCC_ENABLED_FF
+ case TBrCtlDefs::ECommandSetRetryConnectivityFlag:
+ {
+ StaticObjectsContainer::instance()->resourceLoaderDelegate()->httpSessionManager()->setRetryConnectivityFlag();
+ break;
+ }
+ case TBrCtlDefs::ECommandUnSetRetryConnectivityFlag:
+ {
+ StaticObjectsContainer::instance()->resourceLoaderDelegate()->httpSessionManager()->unSetRetryConnectivityFlag();
+ break;
+ }
+ case TBrCtlDefs::ECommandRetryTransactions:
+ {
+ StaticObjectsContainer::instance()->resourceLoaderDelegate()->httpSessionManager()->retryTransactions();
+ m_webView->reCreatePlugins();
+ break;
+ }
+ case TBrCtlDefs::ECommandClearQuedTransactions:
+ {
+ StaticObjectsContainer::instance()->resourceLoaderDelegate()->httpSessionManager()->handleError(KErrCancel);
+ break;
+ }
+ case TBrCtlDefs::ECommandConnToDownloadManager:
+ {
+ TInt connectionPtr = 0;
+ TInt sockSvrHandle = 0;
+ TBool newConn = ETrue;
+ TApBearerType bearerType;
+ TInt error = KErrNone;
+
+ TRAP(error, m_brCtlSpecialLoadObserver->NetworkConnectionNeededL(&connectionPtr, &sockSvrHandle, &newConn, &bearerType));
+ if( error == KErrNone && connectionPtr )
+ {
+ RConnection* connPtr = REINTERPRET_CAST( RConnection*, connectionPtr );
+ TName name;
+ connPtr->Name( name );
+ StaticObjectsContainer::instance()->resourceLoaderDelegate()->httpSessionManager()->httpDownload()->connect(name);
+ }
+ break;
+ }
+#endif
+
default:
{
if ( m_wmlEngineInterface &&
@@ -1169,7 +1209,9 @@
}
int after = aAfter == -1 ? aAfter :0;
- TBrCtlDefs::TBrCtlElementType focusedElementType = FocusedElementType();
+ TBrCtlDefs::TBrCtlElementType focusedElementType;
+ if(m_webView)
+ focusedElementType = FocusedElementType();
int count = sizeof(commandsArray) / sizeof(TCommandsArray);
bool found = false;
@@ -1803,7 +1845,7 @@
m_webView->checkForZoomChange();
}
- if( m_webView->pageFullScreenHandler() && m_webView->pageFullScreenHandler()->isFullScreenMode() ) {
+ if(m_webView && m_webView->pageFullScreenHandler() && m_webView->pageFullScreenHandler()->isFullScreenMode() ) {
if (visible)
m_webView->pageFullScreenHandler()->showEscBtnL();
else
@@ -2100,6 +2142,7 @@
if(StaticObjectsContainer::instance()->isPluginFullscreen())
{
PluginSkin* plugin=m_webView->mainFrame()->focusedPlugin();
+ if(plugin)
plugin->deActivate();
}
newBrctl = m_brCtlWindowObserver->OpenWindowL(emptyUrl, &windowName, userGesture, 0);
--- a/webengine/osswebengine/WebKit/s60/webview/HistoryInterface.h Mon Mar 15 12:44:50 2010 +0200
+++ b/webengine/osswebengine/WebKit/s60/webview/HistoryInterface.h Wed Mar 31 23:16:40 2010 +0300
@@ -242,6 +242,7 @@
virtual TBool possibleWmlOEB() = 0;
virtual void performTransition(int direction) = 0;
+ virtual void rollBackIndex() = 0;
};
--- a/webengine/osswebengine/WebKit/s60/webview/WebCursor.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/webengine/osswebengine/WebKit/s60/webview/WebCursor.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -791,6 +791,9 @@
{
m_pos = pt;
m_sprite->SetPos(pt);
+#ifdef BRDO_TOUCH_ENABLED_FF
+ m_sprite->Hide();
+#endif
WebFrame* frame = getFrameAtPoint(pt);
TBrCtlDefs::TBrCtlElementType elType;
TRect r;
--- a/webengine/osswebengine/WebKit/s60/webview/WebFepTextEditor.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/webengine/osswebengine/WebKit/s60/webview/WebFepTextEditor.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -154,7 +154,7 @@
state->SetPermittedInputModes(EAknEditorSecretAlphaInputMode | EAknEditorNumericInputMode);
state->SetDefaultCase(EAknEditorLowerCase);
state->SetSpecialCharacterTableResourceId(R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG_LATIN_ONLY);
- state->SetNumericKeymap(EAknEditorPlainNumberModeKeymap);
+ state->SetNumericKeymap(EAknEditorStandardNumberModeKeymap);
}
}
else {
@@ -1470,21 +1470,6 @@
}
// -----------------------------------------------------------------------------
-// FocusChanging
-//
-// Called when the focus of the node changes, to commit the text
-// -----------------------------------------------------------------------------
-void CWebFepTextEditor::FocusChanging()
- {
- CAknEdwinState* state = static_cast<CAknEdwinState*>(State(KNullUid));
- if ( state ) {
- TRAP_IGNORE( state->ReportAknEdStateEventL(MAknEdStateObserver::EAknSyncEdwinState ) );
- }
- CommitFepInlineEditL(*CEikonEnv::Static());
- CancelEditingMode();
- }
-
-// -----------------------------------------------------------------------------
// IsLongKeyPress
//
// Called to know the status of the key pressed
--- a/webengine/osswebengine/WebKit/s60/webview/WebFepTextEditor.h Mon Mar 15 12:44:50 2010 +0200
+++ b/webengine/osswebengine/WebKit/s60/webview/WebFepTextEditor.h Wed Mar 31 23:16:40 2010 +0300
@@ -131,7 +131,6 @@
void HandleMaskedInsertText(WebCore::Frame* frame, const String& text);
void HandleMaskedDeleteText(WebCore::Frame* frame);
bool IsWapMaskedModeInput(WebCore::Frame* frame);
- void FocusChanging();
void EnableCcpuL();
private:
--- a/webengine/osswebengine/WebKit/s60/webview/WebFrame.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/webengine/osswebengine/WebKit/s60/webview/WebFrame.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -582,7 +582,7 @@
}
// check if we are close enough and calcualte with zoom factor.
- if (dist< (400/m_view->topView()->scalingFactor() * 100)) {
+ if (result && dist< (400/m_view->topView()->scalingFactor() * 100)) {
IntRect r = result->getRect();
r.inflate(-2);
TPoint docPos(xInRect(r, pt.x()), yInRect(r, pt.y()));
--- a/webengine/osswebengine/WebKit/s60/webview/WebPageScrollHandler.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/webengine/osswebengine/WebKit/s60/webview/WebPageScrollHandler.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -34,7 +34,7 @@
#include "WebScrollbarDrawer.h"
#include "RenderObject.h"
#include "WebScrollingDeceleratorGH.h"
-
+#include "pluginskin.h"
#include "WebKitLogger.h"
using namespace WebCore;
// constants
@@ -649,6 +649,9 @@
m_pageOverviewScrollPeriodic->Cancel();
}
m_webView->closePageView();
+ PluginSkin* plugin = m_webView->mainFrame()->focusedPlugin();
+ if(plugin)
+ plugin->setPluginWinClipedRect();
scrollPageOverviewGH();
m_webView->setViewIsScrolling(false);
m_webView->toggleRepaintTimer(true);
--- a/webengine/osswebengine/WebKit/s60/webview/WebPointerEventHandler.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/webengine/osswebengine/WebKit/s60/webview/WebPointerEventHandler.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -44,7 +44,6 @@
#include "EventHandler.h"
#include "EventNames.h"
#include "HitTestResult.h"
-#include "HitTestRequest.h"
#include "MouseEvent.h"
#include "WebPageFullScreenHandler.h"
#include "PluginSkin.h"
@@ -57,13 +56,6 @@
#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 "WebScrollingDeceleratorGH.h"
@@ -142,9 +134,15 @@
PluginSkin* plugin = m_webview->mainFrame()->focusedPlugin();
if (plugin && plugin->pluginWin()) {
if (plugin->pluginWin()->HandleGesture(aGesture)) {
- if(!plugin->isActive())
+ if(!plugin->isActive()) {
plugin->activate();
- return;
+ }
+ else {
+ m_webview->mainFrame()->frameView()->topView()->setFocusedElementType(TBrCtlDefs::EElementActivatedObjectBox);
+ m_webview->page()->focusController()->setFocusedNode(plugin->getElement(), m_webview->page()->focusController()->focusedOrMainFrame());
+ m_webview->brCtl()->updateDefaultSoftkeys();
+ }
+ return;
}
}
@@ -209,7 +207,10 @@
case stmGesture::EGestureUidPinch:
{
+ if(!m_webview->inPageViewMode())
+ {
handlePinchZoomL(aGesture);
+ }
break;
}
default:
@@ -415,10 +416,6 @@
Element* eventNode = frm->document()->elementFromPoint(pt.iX, pt.iY);
- if (m_isHighlighted){
- dehighlight(pos);
- }
-
m_highlightedNode = NULL;
Node* retNode = 0;
@@ -487,11 +484,7 @@
}
}
#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
@@ -538,15 +531,15 @@
//-----------------------------------------------------------------------------
// WebPointerEventHandler::deHighlight
//-----------------------------------------------------------------------------
-void WebPointerEventHandler::dehighlight(const TPoint &aPoint)
+void WebPointerEventHandler::dehighlight()
{
- // m_highlightPos should be (-1, -1).
+ // send dehighlight event to engine by passing -1, -1
+ // sending any other pointer value may result in highligh of other links
m_highlightPos = TPoint(-1, -1);
m_isHighlighted = EFalse;
Frame* frm = m_webview->page()->focusController()->focusedOrMainFrame();
- m_webview->sendMouseEventToEngine(TPointerEvent::EMove, aPoint, frm);
-
+ m_webview->sendMouseEventToEngine(TPointerEvent::EMove, m_highlightPos, frm);
m_highlightedNode = NULL;
@@ -597,10 +590,6 @@
Frame* coreFrame = core(m_webview->mainFrame());
TPointerEvent event;
-
- if (!IS_NAVIGATION_NONE) {
- m_webview->page()->chrome()->client()->setElementVisibilityChanged(false);
- }
TBrCtlDefs::TBrCtlElementType elType = highlitableElement();
@@ -608,7 +597,8 @@
elType = TBrCtlDefs::EElementNone;
}
m_isHighlighted = (m_highlightedNode != NULL) && (elType != TBrCtlDefs::EElementNone) ;
-
+ m_webview->page()->chrome()->client()->setElementVisibilityChanged(false);
+
/*
* Tabbed navigation might already set the focused node.
* If it's the same as m_highlightedNode FocuseController::setFocusedNode()
@@ -623,12 +613,8 @@
}
if (!IS_NAVIGATION_NONE) {
- //to initiate hover
- if (m_isHighlighted) {
- setFocusRing();
- }
-
- }
+ m_webview->sendMouseEventToEngine(TPointerEvent::EMove, m_highlightPos, coreFrame);
+ }
else {
m_webview->sendMouseEventToEngine(TPointerEvent::EButton1Down, m_highlightPos, coreFrame);
}
@@ -657,25 +643,6 @@
}
}
-//-----------------------------------------------------------------------------
-// WebPointerEventHandler::setFocusRing
-//----------------------------------------------------------------------------
-void WebPointerEventHandler::setFocusRing()
-{
- Element* e = static_cast<Element*>(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
--- a/webengine/osswebengine/WebKit/s60/webview/WebPointerEventHandler.h Mon Mar 15 12:44:50 2010 +0200
+++ b/webengine/osswebengine/WebKit/s60/webview/WebPointerEventHandler.h Wed Mar 31 23:16:40 2010 +0300
@@ -49,7 +49,7 @@
private:
bool checkForEventListener(WebCore::Node* node);
bool canDehighlight(const TPoint &aPoint);
- void dehighlight(const TPoint &aPoint = TPoint(-1,-1));
+ void dehighlight();
bool isHighlitableElement(TBrCtlDefs::TBrCtlElementType& elType);
TBrCtlDefs::TBrCtlElementType highlitableElement();
@@ -61,7 +61,6 @@
void handleMove(const TStmGestureEvent& aGesture);
void doTapL();
void updateCursor(const TPoint& pos);
- void setFocusRing();
void handlePinchZoomL(const TStmGestureEvent& aGesture);
private:
WebPointerEventHandler(WebView* view);
--- a/webengine/osswebengine/WebKit/s60/webview/WebView.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/webengine/osswebengine/WebKit/s60/webview/WebView.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -197,7 +197,6 @@
, m_defaultZoomLevel(KZoomLevelDefaultValue)
, m_pageFullScreenHandler(NULL)
, m_viewIsScrolling(false)
-, m_ptrbuffer(0)
, m_showCursor(false)
, m_allowRepaints(true)
, m_prevEditMode(false)
@@ -231,7 +230,6 @@
m_fastScrollTimer->Cancel();
delete m_fastScrollTimer;
- delete [] m_ptrbuffer;
delete m_pinchZoomHandler;
delete m_repainttimer;
delete m_webfeptexteditor;
@@ -351,7 +349,6 @@
m_pinchZoomHandler = WebPagePinchZoomHandler::NewL(this);
// Create the PointerEventHandler
- m_ptrbuffer = new TPoint[256];
m_webpointerEventHandler = WebPointerEventHandler::NewL(this);
// Create the ScrollHandler
@@ -372,10 +369,12 @@
MakeViewVisible(ETrue);
m_isPluginsVisible=ETrue;
CCoeControl::SetFocus(ETrue);
-#ifdef BRDO_MULTITOUCH_ENABLED_FF
- //To enable advance pointer info for multi-touch
+
+#if defined(BRDO_MULTITOUCH_ENABLED_FF) && !defined (__WINSCW__)
+ //Enable advance pointer info for multi-touch.
Window().EnableAdvancedPointers();
#endif
+
cache()->setCapacities(0, 0, defaultCacheCapacity);
m_waiter = new(ELeave) CActiveSchedulerWait();
@@ -712,13 +711,12 @@
//-------------------------------------------------------------------------------
void WebView::collectOffscreenbitmapL(CFbsBitmap& snapshot)
{
- if( m_widgetextension && m_widgetextension->IsWidgetPublising()) {
- if ( snapshot.Handle() == 0) {
- // Create bitmap only once
- (snapshot).Create(m_brctl->Size(), StaticObjectsContainer::instance()->webSurface()->displayMode());
- }
- CFbsBitmapDevice* device = CFbsBitmapDevice::NewL( &snapshot);
- CleanupStack::PushL(device);
+ if ( snapshot.Handle() == 0) {
+ // Create bitmap only once
+ (snapshot).Create(m_brctl->Size(), StaticObjectsContainer::instance()->webSurface()->displayMode());
+ }
+ CFbsBitmapDevice* device = CFbsBitmapDevice::NewL( &snapshot);
+ CleanupStack::PushL(device);
WebCoreGraphicsContext* gc = WebCoreGraphicsContext::NewL( device, &snapshot, mainFrame()->frameView());
CleanupStack::PushL(gc);
@@ -733,8 +731,7 @@
}
mainFrame()->frameView()->draw( *gc, mainFrame()->frameView()->visibleRect() );
- CleanupStack::PopAndDestroy(2);
- }
+ CleanupStack::PopAndDestroy(2);
}
@@ -2042,7 +2039,7 @@
// some content that we already searched on the first pass. In the worst case, we could search the entire contents of this frame twice.
// To fix this, we'd need to add a mechanism to specify a range in which to search.
if (wrapFlag && lastFrame) {
- if (frame->bridge()->searchFor(keyword, forward, false, true, false))
+ if (frame && frame->bridge() && frame->bridge()->searchFor(keyword, forward, false, true, false))
return TBrCtlDefs::EFindMatch;
}
@@ -2334,9 +2331,9 @@
else {
newMinZoomLevel = KZoomLevelDefaultValue;
}
-
+#ifndef BRDO_MULTITOUCH_ENABLED_FF
newMinZoomLevel = (newMinZoomLevel/m_pageZoomHandler->stepSize())*m_pageZoomHandler->stepSize();
-
+#endif
TBool needsUpdateArray = EFalse;
//Update the new array
if ( m_minZoomLevel!= newMinZoomLevel)
@@ -2374,8 +2371,10 @@
}
m_zoomLevelArray.Reset();
-
+#ifndef BRDO_MULTITOUCH_ENABLED_FF
m_minZoomLevel = TInt(m_minZoomLevel/10) * 10;
+#endif
+
m_zoomLevelArray.Append(KZoomLevelDefaultValue);
//construct the zoom array from the default level
@@ -2609,11 +2608,13 @@
#if USE(LOW_BANDWIDTH_DISPLAY)
m_page->mainFrame()->loader()->setUseLowBandwidthDisplay(false);
#endif
- StaticObjectsContainer::instance()->setIconDatabaseEnabled(false);
+ if (!(m_brctl->capabilities() & TBrCtlDefs::ECapabilityAutoFormFill))
+ StaticObjectsContainer::instance()->setIconDatabaseEnabled(false);
}
//Widgets dont need memory cache for dead objects. hence set it to 0
cache()->setCapacities(0, 0, 0);
+ cache()->setDisabled(true);
return m_widgetextension;
}
@@ -3084,4 +3085,31 @@
m_pinchDocDelta.iY = (float)shiftInView.iY * 100 / zoomLevel;
}
+void WebView::reCreatePlugins()
+{
+ Frame* coreFrame = core(mainFrame());
+ MWebCoreObjectWidget* view = NULL;
+ for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame)) {
+ PassRefPtr<HTMLCollection> objects = frame->document()->objects();
+ for (Node* n = objects->firstItem(); n; n = objects->nextItem()) {
+ view = widget(n);
+ if (view) {
+ PluginSkin* plg = static_cast<PluginSkin*>(view);
+ if(plg->activeStreams() > 0)
+ plg->reCreatePlugin();
+ }
+ }
+
+ PassRefPtr<HTMLCollection> embeds = frame->document()->embeds();
+ for (Node* n = embeds->firstItem(); n; n = embeds->nextItem()) {
+ view = widget(n);
+ if (view) {
+ PluginSkin* plg = static_cast<PluginSkin*>(view);
+ if(plg->activeStreams() > 0)
+ plg->reCreatePlugin();
+ }
+ }
+ }
+}
+
// END OF FILE
--- a/webengine/osswebengine/WebKit/s60/webview/WebView.h Mon Mar 15 12:44:50 2010 +0200
+++ b/webengine/osswebengine/WebKit/s60/webview/WebView.h Wed Mar 31 23:16:40 2010 +0300
@@ -364,6 +364,11 @@
* To set the Bitmap zooming Out for Pinch
*/
void setPinchBitmapZoomOut(int zoomLevel);
+
+ /**
+ * Recreate Plugins in case of Retry Connection
+ */
+ void reCreatePlugins();
public: // from MPageScalerCallback
/**
@@ -584,7 +589,6 @@
WebPageFullScreenHandler* m_pageFullScreenHandler; // owned
bool m_viewIsScrolling;
bool m_viewIsFastScrolling;
- TPoint* m_ptrbuffer;
// synchronous requests
bool m_synchRequestPending;
--- a/webengine/osswebengine/webkit/s60/webview/WebGestureInterface.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/webengine/osswebengine/webkit/s60/webview/WebGestureInterface.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -146,7 +146,9 @@
gestureParams[stmGesture::EEnableFiltering ] = ETrue;
#ifdef BRDO_MULTITOUCH_ENABLED_FF
gestureParams[stmGesture::ECapacitiveUpUsed ] = ETrue;
+#ifndef __WINSCW__
gestureParams[stmGesture::EAdjustYPos ] = ETrue;
+#endif
#else
gestureParams[stmGesture::ECapacitiveUpUsed ] = EFalse;
gestureParams[stmGesture::EAdjustYPos ] = EFalse;
--- a/webengine/webkitutils/HistoryProvider/HistoryController.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/webengine/webkitutils/HistoryProvider/HistoryController.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -152,7 +152,10 @@
CleanupStack::PushL( pageInfo );
return pageInfo;
}
-
+void HistoryController::rollBackIndex()
+ {
+ m_currentIndex = m_tempCurrentIndex;
+ }
/**
*/
void HistoryController::handleHistoryCommandL(int command)
@@ -518,8 +521,11 @@
SelectArray* historyList = new( ELeave ) CArrayFixFlat<TBrCtlSelectOptionData>(10);
CleanupStack::PushL( historyList );
for( int i = m_historyStack.Count() - 1; i >= 0; i-- ) {
- TBrCtlSelectOptionData t( TBrCtlSelectOptionData(entryByIndex(i)->pageTitle(), i == m_currentIndex, false, false) );
- historyList->AppendL(t);
+ if(entryByIndex(i))
+ {
+ TBrCtlSelectOptionData t( TBrCtlSelectOptionData(entryByIndex(i)->pageTitle(), i == m_currentIndex, false, false) );
+ historyList->AppendL(t);
+ }
}
// Display history dialog
bool ret = m_historyCallback->dialogSelectOption(historyList);
--- a/webengine/webkitutils/HistoryProvider/HistoryController.h Mon Mar 15 12:44:50 2010 +0200
+++ b/webengine/webkitutils/HistoryProvider/HistoryController.h Wed Mar 31 23:16:40 2010 +0300
@@ -274,6 +274,7 @@
void performTransition(int direction);
+ virtual void rollBackIndex();
private:
--- a/webengine/webkitutils/ToolBar/ToolBarButton.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/webengine/webkitutils/ToolBar/ToolBarButton.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -861,6 +861,8 @@
}
else
{
+ if(iToolTipMaskContext)
+ {
iToolTipMaskContext->SetPenColor(KRgbBlack);
iToolTipMaskContext->SetBrushColor(KRgbBlack);
iToolTipMaskContext->SetBrushStyle(CGraphicsContext::ESolidBrush);
@@ -919,6 +921,7 @@
iToolTipSprite.Activate();
delete visualText;//visual text
}
+ }
}
}
else // aVisible = false
--- a/webengine/widgetengine/inc/WidgetEngineBridge.h Mon Mar 15 12:44:50 2010 +0200
+++ b/webengine/widgetengine/inc/WidgetEngineBridge.h Wed Mar 31 23:16:40 2010 +0300
@@ -25,7 +25,7 @@
#include <brctldefs.h>
#include "WidgetEngineCallbacks.h"
#include "WidgetJSObjectProtector.h"
-#include "wtf/HashSet.h"
+#include "wtf/HashCountedSet.h"
// CONSTANTS
@@ -102,7 +102,7 @@
CMenuClient* m_menuclient;
CWidgetClient* m_widgetclient;
WidgetPreferences* m_preferences;
- WTF::HashSet<KJS::JSValue*> m_protectedObjects;
+ WTF::HashCountedSet<KJS::JSValue*> m_protectedObjects;
};
--- a/webengine/widgetengine/src/WidgetEngineBridge.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/webengine/widgetengine/src/WidgetEngineBridge.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -96,9 +96,10 @@
void WidgetEngineBridge::Clear()
{
// unprotect objects
- HashSet<JSValue*>::iterator end = m_protectedObjects.end();
- for (HashSet<JSValue*>::iterator it = m_protectedObjects.begin(); it != end; ++it) {
- Collector::unprotect(*it);
+ HashCountedSet<JSValue*>::iterator end = m_protectedObjects.end();
+ for (HashCountedSet<JSValue*>::iterator it = m_protectedObjects.begin(); it != end; ++it) {
+ for(int count = it->second; count > 0; count--)
+ Collector::unprotect(it->first);
}
m_protectedObjects.clear();
--- a/webengine/widgetregistry/Server/src/WidgetRegistryServer.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/webengine/widgetregistry/Server/src/WidgetRegistryServer.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -127,6 +127,12 @@
apparcSession.RegisterNonNativeApplicationTypeL(
KUidWidgetLauncher, KLauncherApp()));
+
+ TRAP_IGNORE(
+ apparcSession.RegisterNonNativeApplicationTypeL(
+ KUidWgtWidgetLauncher, KWgtLauncherApp()));
+
+
apparcSession.PrepareNonNativeApplicationsUpdatesL();
apparcSession.ForceCommitNonNativeApplicationsUpdatesL();
apparcSession.Close();
--- a/webengine/wrtharvester/group/wrtharvester.mmp Mon Mar 15 12:44:50 2010 +0200
+++ b/webengine/wrtharvester/group/wrtharvester.mmp Wed Mar 31 23:16:40 2010 +0300
@@ -24,12 +24,15 @@
CAPABILITY CAP_ECOM_PLUGIN
+// uncomment to enable logs
+//MACRO _DEBUG
+//#define _DEBUG
+
SOURCEPATH ../src
SOURCE wrtharvester.cpp
SOURCE wrtharvesterpsnotifier.cpp
SOURCE wrtharvesterpublisherobserver.cpp
SOURCE wrtharvesterregistryaccess.cpp
-SOURCE wrtusbhandler.cpp
MW_LAYER_SYSTEMINCLUDE
--- a/webengine/wrtharvester/inc/wrtharvester.h Mon Mar 15 12:44:50 2010 +0200
+++ b/webengine/wrtharvester/inc/wrtharvester.h Wed Mar 31 23:16:40 2010 +0300
@@ -24,7 +24,6 @@
#include <contentharvesterplugin.h>
#include <widgetappdefs.rh>
#include "wrtharvesterregistryaccess.h"
-#include "wrtusbhandler.h"
// FORWARD DECLARATIONS
class CWrtHarvesterPSNotifier;
@@ -126,7 +125,7 @@
static TInt DeleteCallback(TAny* aPtr);
- TBool SetSystemShutdown(TBool aState){ iSystemShutdown = aState; }
+ void SetSystemShutdown(TBool aState){ iSystemShutdown = aState; }
private:
@@ -288,6 +287,12 @@
*/
CWrtHarvesterPSNotifier* iWidgetSystemShutdownListener;
+ /**
+ * Publish & Subscribe listener
+ * own
+ */
+ CWrtHarvesterPSNotifier* iMsModeListener;
+
/**
*
*/
--- a/webengine/wrtharvester/inc/wrtharvesterpsnotifier.h Mon Mar 15 12:44:50 2010 +0200
+++ b/webengine/wrtharvester/inc/wrtharvesterpsnotifier.h Wed Mar 31 23:16:40 2010 +0300
@@ -26,7 +26,7 @@
// Content Harvester server secure id
const TUid KPropertyCat = { 0x10282E5A };
// Can not conflict with other Content Harvester plugin keys
-enum TPropertyKeys { EWidgetUIState = 109, EWidgetRegAltered, EWidgetMMCAltered, EWidgetMassStorageMode, EWidgetSystemShutdown };
+enum TPropertyKeys { EWidgetUIState = 109, EWidgetRegAltered, EWidgetMassStorageMode, EWidgetSystemShutdown };
/**
* Publish&Subscribe event listener
--- a/webengine/wrtharvester/inc/wrtusbhandler.h Mon Mar 15 12:44:50 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +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:
-*
-*/
-
-#ifndef WIDGETMMCHANDLER_H
-#define WIDGETMMCHANDLER_H
-
-// INCLUDES
-#include <e32std.h>
-#include <e32base.h>
-#include <f32file.h>
-#include "wrtharvester.h"
-//hb
-#include "wrtharvesterpsnotifier.h"
-
-// FORWARD DECLARATION
-class CWrtHarvester;
-
-/*
- * Inherited CActive, performs a asynchronous conversion operation
- *
- * @since 3.1
- */
-class CWrtUsbHandler : public CActive
- {
-public:
-
- static CWrtUsbHandler* NewL( CWrtHarvester* aHarvester, RFs& aFs );
-
- virtual ~CWrtUsbHandler();
-
- void Start();
- void DoScanAndUpdate();
-
-protected:
-
- void RunL();
-
- TInt RunError( TInt aError );
-
- void DoCancel();
-
-private:
-
- // no copy constructor
- CWrtUsbHandler( const CWrtUsbHandler& );
- // no assignment
- CWrtUsbHandler& operator=( const CWrtUsbHandler& );
-
- CWrtUsbHandler( CWrtHarvester* aHarvester, RFs& aFs );
-
- void ConstructL();
-
- TInt ScanDrives( TInt& aDriveFlags );
-
- // CWidgetRegistry* iRegistry; // not owned
-
- CWrtHarvester* iHarvester;
- RFs iFs;
-
- TInt iDriveFlags;
- };
-
-#endif // #ifndef WIDGETMMCHANDLER_H
--- a/webengine/wrtharvester/src/wrtharvester.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/webengine/wrtharvester/src/wrtharvester.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -230,11 +230,10 @@
iWidgetUIListener = CWrtHarvesterPSNotifier::NewL( this, EWidgetUIState );
iWidgetRegListener = CWrtHarvesterPSNotifier::NewL( this, EWidgetRegAltered );
iWidgetSystemShutdownListener = CWrtHarvesterPSNotifier::NewL( this, EWidgetSystemShutdown );
+ iMsModeListener = CWrtHarvesterPSNotifier::NewL( this, EWidgetMassStorageMode );
User::LeaveIfError( iFs.Connect() );
- iWidgetUsbListener = CWrtUsbHandler::NewL( this, iFs );
- iWidgetUsbListener->Start();
SetMSMode(0);
iCanAccessRegistry = ETrue;
@@ -286,11 +285,12 @@
iObservers.ResetAll();
iWidgetInfo.ResetAll();
iWidgetStateArray.ResetAll();
+
delete iWidgetUIListener;
- delete iWidgetRegListener;
- delete iWidgetMMCListener;
- delete iWidgetUsbListener;
+ delete iWidgetRegListener;
+ delete iMsModeListener;
delete iWidgetSystemShutdownListener;
+
if(iAsyncCallBack)
{
iAsyncCallBack->Cancel();
@@ -327,12 +327,11 @@
{
return ;
}
- if( IsInMSMode() == 1 && aTrigger == KDeActive)
+ if( IsInMSMode() == 1 )
{
- RemovePublisherAndObserverL(aContentId);
-
- if(!iSystemShutdown)
+ if( aTrigger == KDeActive && !iSystemShutdown )
{
+ RemovePublisherAndObserverL(aContentId);
RWidgetRegistryClientSession session;
CleanupClosePushL( session );
User::LeaveIfError( session.Connect() );
@@ -890,8 +889,11 @@
RWidgetRegistryClientSession session;
CleanupClosePushL( session );
User::LeaveIfError( session.Connect() );
- TBool preInstalled = *(session.GetWidgetPropertyValueL( aUid, EPreInstalled ) );
-
+
+ CWidgetPropertyValue* property = session.GetWidgetPropertyValueL( aUid, EPreInstalled );
+ TBool preInstalled = property && *(property);
+ delete property;
+
// Set blanket permission to true for pre-installed widgets
if ( preInstalled )
{
@@ -982,7 +984,11 @@
RWidgetRegistryClientSession session;
CleanupClosePushL( session );
User::LeaveIfError( session.Connect() );
- TBool networkAccess = *(session.GetWidgetPropertyValueL( aUid, EAllowNetworkAccess ) );
+
+ CWidgetPropertyValue* value = session.GetWidgetPropertyValueL( aUid, EAllowNetworkAccess );
+ TBool networkAccess = value && *(value);
+ delete value;
+
CleanupStack::PopAndDestroy( &session );
return networkAccess;
--- a/webengine/wrtharvester/src/wrtharvesterpsnotifier.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/webengine/wrtharvester/src/wrtharvesterpsnotifier.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -19,8 +19,9 @@
#include "wrtharvesterpsnotifier.h"
#include "wrtharvester.h"
#include <UikonInternalPSKeys.h>//For MMC Observing
-#include <usbmsshared.h>//For USB monitor
#include <startupdomainpskeys.h> // For shutdown observer
+#include <UsbWatcherInternalPSKeys.h>// for Mass storage mode observing
+#include <usbpersonalityids.h>
// ============================ MEMBER FUNCTIONS =============================
@@ -72,7 +73,7 @@
{
CActiveScheduler::Add( this );
TInt r(KErrNone);
- if( iKey != EWidgetMMCAltered )
+ if( iKey != EWidgetMassStorageMode )
{
// define property to be integer type
r = RProperty::Define( KPropertyCat, iKey, RProperty::EInt );
@@ -83,13 +84,9 @@
User::LeaveIfError( r );
}
// Attach the key
- if( iKey == EWidgetMMCAltered )
- {
- User::LeaveIfError( iProperty.Attach( KPSUidUikon,KUikMMCInserted ));
- }
- else if( iKey == EWidgetMassStorageMode )
+ if( iKey == EWidgetMassStorageMode )
{
- User::LeaveIfError( iProperty.Attach( KUsbMsDriveState_Category,EUsbMsDriveState_DriveStatus ));
+ User::LeaveIfError( iProperty.Attach( KPSUidUsbWatcher,KUsbWatcherSelectedPersonality));
}
else if( iKey == EWidgetSystemShutdown )
{
@@ -133,8 +130,8 @@
TInt value( 0 );
TInt r (KErrNone);
- TUsbMsDrivesStatus allDrivesStatus;
- if( iKey != EWidgetMMCAltered && iKey != EWidgetMassStorageMode )
+
+ if( iKey != EWidgetMassStorageMode )
{
if (iKey == EWidgetSystemShutdown)
GetValue( value);
@@ -143,8 +140,13 @@
}
else
{
- r = iProperty.Get( allDrivesStatus );
+ r = iProperty.Get( value );
}
+
+#ifdef _DEBUG
+ RDebug::Print(_L("KEY %d VALUE %d "),iKey,value);
+#endif
+
if( r == KErrNone )
{
if( iKey == EWidgetUIState && value == 1 )
@@ -159,7 +161,24 @@
else if( iKey == EWidgetUIState && value == 3 )
{
iHarvester->SetReinstallWidget(ETrue);
- }
+ }
+ else if( iKey == EWidgetMassStorageMode )
+ {
+ if( value == KUsbPersonalityIdMS )
+ {
+#ifdef _DEBUG
+ RDebug::Print(_L("WE are in mass storage mode"));
+#endif
+ iHarvester->SetMSMode(1);
+ }
+ else
+ {
+#ifdef _DEBUG
+ RDebug::Print(_L("NO LONGER in mass storage mode"));
+#endif
+ iHarvester->SetMSMode(0);
+ }
+ }
else if( iKey == EWidgetRegAltered && value == 1 )
{
if(iHarvester->IsInMSMode())
--- a/webengine/wrtharvester/src/wrtusbhandler.cpp Mon Mar 15 12:44:50 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,247 +0,0 @@
-/*
-* 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:
-*
-*/
-
-// INCLUDE FILES
-#include "wrtusbhandler.h"
-#include "wrtharvester.h"
-#include "wrtusbhandler.h"
-#include <DriveInfo.h>
-
-// CONSTANTS
-
-
-// ============================================================================
-// CWrtUsbHandler::NewL()
-// two-phase constructor
-//
-// @since 3.1
-// @param aRegistry - Widget registry for callback.
-// @param aFs - file session
-// @return pointer to CWrtUsbHandler
-// ============================================================================
-//
-CWrtUsbHandler* CWrtUsbHandler::NewL(
- CWrtHarvester* aHarvester,
- RFs& aFs )
- {
- CWrtUsbHandler* self =
- new(ELeave) CWrtUsbHandler( aHarvester , aFs );
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
- return self;
- }
-
-// ============================================================================
-// CWrtUsbHandler::CWrtUsbHandler()
-// C++ default constructor
-//
-// @since 3.1
-// ============================================================================
-//
-CWrtUsbHandler::CWrtUsbHandler( CWrtHarvester* aHarvester,
- RFs& aFs )
- : CActive( CActive::EPriorityUserInput ),
- iHarvester( aHarvester ),
- iFs( aFs ),
- iDriveFlags( 0 )
- {
- CActiveScheduler::Add( this );
- }
-
-// ============================================================================
-// CWrtUsbHandler::ConstructL()
-// Symbian default constructor
-//
-// @since 3.1
-// ============================================================================
-//
-void CWrtUsbHandler::ConstructL()
- {
- if ( KErrNone != ScanDrives( iDriveFlags ) )
- {
- iDriveFlags = 0;
- }
- }
-
-// ============================================================================
-// CWrtUsbHandler::~CWrtUsbHandler()
-// destructor
-//
-// @since 3.1
-// ============================================================================
-CWrtUsbHandler::~CWrtUsbHandler()
- {
- Cancel();
- }
-
-// ============================================================================
-// CWrtUsbHandler::Start()
-// Start monitoring.
-//
-// @since 5.0
-// ============================================================================
-void CWrtUsbHandler::Start()
- {
- iFs.NotifyChange( ENotifyDisk, iStatus );
- SetActive();
- }
-
-// ============================================================================
-// CWrtUsbHandler::RunL()
-// Handle notifications of MMC events.
-//
-// @since 3.1
-// ============================================================================
-void CWrtUsbHandler::RunL()
- {
- TInt status = iStatus.Int();
-
- // Restart NotifyChange
- Start();
-
- if ( status == KErrNone )
- {
- DoScanAndUpdate();
- }
- }
-
-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<<DriveNo))
- massMemAvailable = ETrue;
- }
- }
- }
- if( massMemAltered )
- {
- if(!massMemAvailable)
- {
- // Mass storage is plugged
- iHarvester->SetMSMode(1);
- }
- else
- {
- // Mass storage was unplugged
- if(iHarvester->IsInMSMode() == 1)
- {
- iHarvester->SetMSMode(0);
- iHarvester->ClearAllOperations();
- }
- }
- }
- }
- }
-
-
-// ============================================================================
-// CWrtUsbHandler::RunError()
-// Ignore errors from RunL.
-//
-// @since 5.0
-// ============================================================================
-TInt CWrtUsbHandler::RunError( TInt /* aError */ )
- {
- return KErrNone; // indicates error was handled
- }
-
-// ============================================================================
-// CWrtUsbHandler::DoCancel()
-// Cancel the MMC event handler
-//
-// @since 3.1
-// ============================================================================
-void CWrtUsbHandler::DoCancel()
- {
- iFs.NotifyChangeCancel();
- }
-
-/* Scans drives and records a bit flag for those that exist and are
- * suitable for installing widgets to.
- */
-TInt CWrtUsbHandler::ScanDrives( TInt& aDriveFlags )
- {
- // List all drives in the system
- TDriveList driveList;
- TInt error = iFs.DriveList( driveList );
- if ( KErrNone == error )
- {
- for ( TInt driveNumber = EDriveY;
- driveNumber >= EDriveA;
- driveNumber-- )
- {
- // The drives that will be filtered out are the same ones that
- // WidgetInstaller filters out in CWidgetUIHandler::SelectDriveL()
- if ( (EDriveD == driveNumber)
- || !driveList[driveNumber] )
- {
- // EDriveD is a temporary drive usually a RAM disk
- continue;
- }
-
- TVolumeInfo volInfo;
- if ( iFs.Volume( volInfo, driveNumber ) != KErrNone )
- {
- // volume is not usable (e.g. no media card inserted)
- continue;
- }
- if ( (volInfo.iDrive.iType == EMediaNotPresent) ||
- (volInfo.iDrive.iType == EMediaRom) ||
- (volInfo.iDrive.iType == EMediaRemote) ||
- (volInfo.iDrive.iDriveAtt & KDriveAttRom) ||
- (volInfo.iDrive.iDriveAtt & KDriveAttSubsted) )
- {
- // not a suitable widget install drive
- continue;
- }
-
- // found a usable drive
- aDriveFlags |= (1 << driveNumber);
-
- }
- }
-
- return error;
- }
-
--- a/widgets/widgetapp/inc/cpspublisher.h Mon Mar 15 12:44:50 2010 +0200
+++ b/widgets/widgetapp/inc/cpspublisher.h Wed Mar 31 23:16:40 2010 +0300
@@ -28,6 +28,7 @@
#define CPSPUBLISHER_H
#include <e32base.h>
+#include <e32hashtab.h>
#include <liwcommon.h>
class CFbsBitmap;
@@ -68,9 +69,13 @@
public:
TSize BitmapSize();
- void PublishBitmapL( CFbsBitmap& aBitmap, const TDesC& aBundleName );
- void NetworkConnectionCancelledL();
- void NetworkConnectionAllowedL();
+ void PublishBitmapL( CFbsBitmap& aBitmap, const TDesC& aBundleName );
+ void NetworkConnectionCancelledL();
+ void NetworkConnectionAllowedL();
+ void PublishScreenshotL(const TDesC& aWidget, TInt aWidgetId,
+ CFbsBitmap* aBmp);
+
+ void ClearScreenshotL(const TDesC& aWidget, TInt aWidgetId);
private:
void GetBitmapSizeL();
@@ -81,12 +86,25 @@
void ExecuteCommandL(CLiwDefaultMap* aInFilter, CLiwDefaultMap* aOutDataMap,
const TDesC16& aRegistry );
void ExecuteRegistrationCommandL( TUint aOption );
+ void StoreBitmapL(TInt aWidgetId, CFbsBitmap* aBmp);
+ void RemoveBitmapL(TInt aWidgetId);
+ void PublishScreenshotToCpsL(const TDesC& aWidget,
+ TInt aWidgetId, TInt aBitmap);
+ void RemoveScreenshotFromCpsL(const TDesC& aWidget);
+
private:
CFbsBitmap* iMaskBitmap;
MLiwInterface* iCpsInterface;
CLiwServiceHandler* iServiceHandler;
TSize iSize;
+ /**
+ * Hash table storing the screenshots.
+ * Key: window group id for the screenshot
+ * (the one received in ApplicationChange)
+ * Value: CFbsBitmap*, pointers owned
+ */
+ RHashMap<TInt, CFbsBitmap*> iScreenshots;
};
--- a/widgets/widgetapp/inc/widgetappdefs.rh Mon Mar 15 12:44:50 2010 +0200
+++ b/widgets/widgetapp/inc/widgetappdefs.rh Wed Mar 31 23:16:40 2010 +0300
@@ -61,6 +61,7 @@
WidgetOnline,
WidgetOffline,
WidgetRestart,
+ WidgetFullViewClose,
Uninitialized
};
--- a/widgets/widgetapp/src/WidgetUiWindow.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/widgets/widgetapp/src/WidgetUiWindow.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -720,6 +720,7 @@
CWidgetPropertyValue* propValue = widgetRegistry.GetWidgetPropertyValueL(iUid, EAllowNetworkAccess );
TInt networkAccess = *propValue;
delete propValue;
+
propValue = widgetRegistry.GetWidgetPropertyValueL(iUid, EAllowFullAccess );
TInt fullAccess = *propValue;
delete propValue;
@@ -844,6 +845,11 @@
//Always ask case
TUint32 ap( 0 );
iWindowManager.GetConnection()->SetRequestedAP( ap );
+#ifdef BRDO_OCC_ENABLED_FF
+ TUint32 snapId = 0; //Defaults connects to Internet snap
+ iWindowManager.GetConnection()->SetConnectionType(CMManager::EDestination);
+ iWindowManager.GetConnection()->SetRequestedSnap(snapId);
+#endif
}
}
}
@@ -1172,7 +1178,8 @@
RWidgetRegistryClientSession& widgetRegistry = iWindowManager.WidgetUIClientSession();
TInt inMiniView = !(WidgetMiniViewState()==EMiniViewEnabled || WidgetMiniViewState()==EMiniViewNotEnabled);//widgetRegistry.IsWidgetInMiniView( iUid);
CWidgetPropertyValue* propValue = widgetRegistry.GetWidgetPropertyValueL( iUid, EAllowNetworkAccess );
- TInt netAccessWdgtProp = *propValue; // AllowNetworkAccess in the info.plist file
+ TInt netAccessWdgtProp = propValue && *propValue; // AllowNetworkAccess in the info.plist file
+ delete propValue;
if ( netAccessWdgtProp && ((inMiniView && (iWindowManager.GetNetworkMode() == (TInt)EOnlineMode))
|| (!inMiniView && iUserPermission)) )
--- a/widgets/widgetapp/src/WidgetUiWindowManager.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/widgets/widgetapp/src/WidgetUiWindowManager.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -408,6 +408,12 @@
}
}
break;
+ case WidgetFullViewClose:
+ {
+ Exit( EEikCmdExit, aUid );
+ needToNotify = EFalse ;
+ }
+ break;
}
if(needToNotify)
// Widget is up and running, notify that next one can be launched
@@ -643,6 +649,9 @@
if ( iClientSession.IsWidgetInFullView ( aWidgetWindow->Uid()))
{
+#ifdef BRDO_WRT_HS_FF
+ iCpsPublisher->ClearScreenshotL(*(aWidgetWindow->WidgetBundleId()), aWidgetWindow->Uid().iUid);
+#endif
HideWindow( aWidgetWindow );
if (aWidgetWindow == iActiveFsWindow)
iActiveFsWindow = NULL;
@@ -788,6 +797,10 @@
CWidgetUiWindow* window( GetWindow( aUid ) );
if( !window )
return;
+
+#ifdef BRDO_WRT_HS_FF
+ iCpsPublisher->ClearScreenshotL(*(GetWindow(aUid )->WidgetBundleId()), aUid.iUid);
+#endif
// make widgets act like separate applications by pushing to background
// this way user is sent back to app shell or idle to run another widget
@@ -912,6 +925,18 @@
{
if(iDialogsProvider)
iDialogsProvider->CancelAll();
+
+#ifdef BRDO_WRT_HS_FF
+ CFbsBitmap* bitmap( new CFbsBitmap() );
+ if ( bitmap && iCpsPublisher)
+ {
+ if(iActiveFsWindow)
+ {
+ TRAP_IGNORE(iActiveFsWindow->Engine()->TakeSnapshotL( *bitmap ));
+ TRAP_IGNORE(iCpsPublisher->PublishScreenshotL(*iActiveFsWindow->WidgetBundleId(),iActiveFsWindow->Uid().iUid, bitmap));
+ }
+ }
+#endif
HideWindow( iActiveFsWindow );
}
}
--- a/widgets/widgetapp/src/cpspublisher.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/widgets/widgetapp/src/cpspublisher.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -29,6 +29,12 @@
// TODO use global definitions!
+_LIT( KWidgetBitmap, "widget_bitmap" );
+_LIT8( KWidgetId, "widget_id");
+_LIT8( KBitmapHandle, "bitmap_handle");
+_LIT8( KDelete, "Delete" );
+_LIT( KWidgetUi, "widget_ui");
+_LIT( KScreenshot, "screenshot");
_LIT8( KCPService, "Service.ContentPublishing" );
_LIT8( KCPInterface, "IDataSource" );
@@ -557,6 +563,137 @@
inParam.Reset();
iCpsInterface = msgInterface;
}
+
+
+ // --------------------------------------------------------------------------
+// CCpsPublisher::PublishScreenshotL
+// --------------------------------------------------------------------------
+//
+void CCpsPublisher::PublishScreenshotL(const TDesC& aWidget,
+ TInt aWidgetId, CFbsBitmap* aBmp)
+ {
+ StoreBitmapL(aWidgetId, aBmp);
+ PublishScreenshotToCpsL(aWidget, aWidgetId, aBmp ? aBmp->Handle() : 0);
+ }
+
+// --------------------------------------------------------------------------
+// CCpsPublisher::ClearScreenshotL
+// --------------------------------------------------------------------------
+//
+void CCpsPublisher::ClearScreenshotL(const TDesC& aWidget,
+ TInt aWidgetId)
+ {
+ RemoveScreenshotFromCpsL(aWidget);
+ RemoveBitmapL(aWidgetId);
+ }
+
+// --------------------------------------------------------------------------
+// CCpsPublisher::ClearScreenshotL
+// --------------------------------------------------------------------------
+//
+void CCpsPublisher::StoreBitmapL(TInt aWidgetId, CFbsBitmap* aBmp)
+ {
+ CFbsBitmap** oldbmp = iScreenshots.Find( aWidgetId );
+ if ( oldbmp )
+ {
+ delete *oldbmp;
+ }
+ if ( iScreenshots.Insert( aWidgetId, aBmp ) != KErrNone )
+ {
+ delete aBmp;
+ iScreenshots.Remove( aWidgetId );
+ }
+ }
+
+// --------------------------------------------------------------------------
+// CCpsPublisher::RemoveBitmapL
+// --------------------------------------------------------------------------
+//
+void CCpsPublisher::RemoveBitmapL(TInt aWidgetId)
+ {
+ CFbsBitmap** bmp = iScreenshots.Find( aWidgetId );
+ if ( bmp )
+ {
+ delete *bmp;
+ iScreenshots.Remove( aWidgetId );
+ }
+ }
+
+// --------------------------------------------------------------------------
+// CCpsPublisher::PublishScreenshotToCpsL
+// --------------------------------------------------------------------------
+//
+void CCpsPublisher::PublishScreenshotToCpsL(const TDesC& aWidget,
+ TInt aWidgetId, TInt aBitmap)
+ {
+ CLiwGenericParamList& inparam = iServiceHandler->InParamListL();
+ CLiwGenericParamList& outparam = iServiceHandler->OutParamListL();
+
+ TLiwGenericParam cptype( KType, TLiwVariant( KCpData ));
+ cptype.PushL();
+
+ inparam.AppendL( cptype );
+
+ CLiwDefaultMap* cpdatamap = CLiwDefaultMap::NewLC();
+ CLiwDefaultMap* map = CLiwDefaultMap::NewLC();
+
+ // Add bitmap handle to data map
+ map->InsertL( KWidgetId, TLiwVariant( TInt32(aWidgetId) )); // key - aKey, value - map (stringsMap)
+ map->InsertL( KBitmapHandle, TLiwVariant( TInt32(aBitmap) )); // key - aKey, value - map (stringsMap)
+
+ // Create content data map
+ cpdatamap->InsertL( KPublisherId, TLiwVariant( KWidgetUi ));
+ cpdatamap->InsertL( KContentType, TLiwVariant( KScreenshot ));
+ cpdatamap->InsertL( KContentId, TLiwVariant( aWidget ));
+ cpdatamap->InsertL( KDataMap, TLiwVariant(map) );
+
+ TLiwGenericParam item( KItem, TLiwVariant( cpdatamap ));
+ item.PushL();
+
+ inparam.AppendL( item );
+
+ iCpsInterface->ExecuteCmdL( KAdd , inparam, outparam);
+
+ CleanupStack::PopAndDestroy( &item );
+ CleanupStack::PopAndDestroy( map );
+ CleanupStack::PopAndDestroy( cpdatamap );
+ CleanupStack::PopAndDestroy( &cptype );
+
+ outparam.Reset();
+ inparam.Reset();
+ }
+
+
+// --------------------------------------------------------------------------
+// CCpsPublisher::PublishScreenshotToCpsL
+// --------------------------------------------------------------------------
+//
+void CCpsPublisher::RemoveScreenshotFromCpsL(const TDesC& aWidget)
+ {
+ CLiwGenericParamList& inparam = iServiceHandler->InParamListL();
+ CLiwGenericParamList& outparam = iServiceHandler->OutParamListL();
+
+ CLiwDefaultMap* cpdatamap = CLiwDefaultMap::NewLC();
+
+ // Create content data map
+ cpdatamap->InsertL( KPublisherId, TLiwVariant( KWidgetUi ));
+ cpdatamap->InsertL( KContentType, TLiwVariant( KScreenshot ));
+ cpdatamap->InsertL( KContentId, TLiwVariant( aWidget ));
+
+ TLiwGenericParam item( KItem, TLiwVariant( cpdatamap ));
+ item.PushL();
+
+ inparam.AppendL( item );
+
+ iCpsInterface->ExecuteCmdL( KDelete , inparam, outparam);
+
+ CleanupStack::PopAndDestroy( &item );
+ CleanupStack::PopAndDestroy( cpdatamap );
+
+ outparam.Reset();
+ inparam.Reset();
+ }
+
// END OF FILE
--- a/widgets/widgetinstaller/src/WidgetUIOperationsWatcher.cpp Mon Mar 15 12:44:50 2010 +0200
+++ b/widgets/widgetinstaller/src/WidgetUIOperationsWatcher.cpp Wed Mar 31 23:16:40 2010 +0300
@@ -479,9 +479,15 @@
iWidgetInHS = iRegistry.IsWidgetInMiniView( aUid );
// get original install dir from registry in case user
// decides to "overrite" to another memory location
- iOriginalDir = *( iRegistry.GetWidgetPropertyValueL(
+ CWidgetPropertyValue *propValue = iRegistry.GetWidgetPropertyValueL(
TUid::Uid( *(iPropertyValues[EUid]) ),
- EBasePath ) );
+ EBasePath );
+
+ iOriginalDir.Zero();
+ if(propValue)
+ iOriginalDir = *propValue;
+
+ delete propValue;
}
// uid for a new widget will be gotten once install location (c: or
// e:) is selected
@@ -997,8 +1003,10 @@
if ( !iSilent ) { iUIHandler->DisplayUninstallInProgressL(); }
TBuf<KWidgetRegistryVal> widgetPath;
iRegistry.GetWidgetPath( aUid, widgetPath );
- TBool aVendor = *(iRegistry.GetWidgetPropertyValueL(aUid, ENokiaWidget));
-
+
+ CWidgetPropertyValue* propValue = iRegistry.GetWidgetPropertyValueL(aUid, ENokiaWidget);
+ TBool aVendor = propValue && *(propValue);
+ delete propValue;
// TODO if any of next steps leave does state become inconsistent?