# HG changeset patch # User hgs # Date 1280746868 -10800 # Node ID 920c9a7249297cc795e707d70eae5e1f0ba994cd # Parent 50b444048a8d58eb3f2a0dab26eff2ac2f242d2f 201029_02 diff -r 50b444048a8d -r 920c9a724929 coreapplicationuis/Rfs/eabi/rfsU.DEF --- a/coreapplicationuis/Rfs/eabi/rfsU.DEF Fri Jul 16 10:30:52 2010 +0300 +++ b/coreapplicationuis/Rfs/eabi/rfsU.DEF Mon Aug 02 14:01:08 2010 +0300 @@ -33,4 +33,6 @@ _ZTV12CRfsShutdown @ 32 NONAME ; ## _ZTV13CRfsCompleter @ 33 NONAME ; ## _ZTV9CRfsAppUi @ 34 NONAME ; ## + _ZTI12CRfsConTimer @ 35 NONAME + _ZTV12CRfsConTimer @ 36 NONAME diff -r 50b444048a8d -r 920c9a724929 coreapplicationuis/Rfs/group/rfs.mmp --- a/coreapplicationuis/Rfs/group/rfs.mmp Fri Jul 16 10:30:52 2010 +0300 +++ b/coreapplicationuis/Rfs/group/rfs.mmp Mon Aug 02 14:01:08 2010 +0300 @@ -49,6 +49,7 @@ SOURCE rfsShutdown.cpp SOURCE rfsCompleter.cpp SOURCE rfsConnectionObserver.cpp +SOURCE rfscontimer.cpp START RESOURCE ../src/rfs.rss TARGETPATH RESOURCE_FILES_DIR diff -r 50b444048a8d -r 920c9a724929 coreapplicationuis/Rfs/inc/rfsConTimer.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/coreapplicationuis/Rfs/inc/rfsConTimer.h Mon Aug 02 14:01:08 2010 +0300 @@ -0,0 +1,58 @@ +/* +* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "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 __RFSCONTIMER_H +#define __RFSCONTIMER_H + +#include +#include +#include + +#include "rfsConnectionObserver.h" + +class CRfsConnectionObserver; + +class CRfsConTimer : public CActive + { + private: + + CRfsConTimer(CRfsConnectionObserver * aRfsConnectionObserver); // Construction + + + +public: + + static CRfsConTimer* CRfsConTimer::NewL(CRfsConnectionObserver * aRfsConnectionObserver); + ~CRfsConTimer(); // Destruction + void IssueTimerRequest(); // issue request + +protected: + void DoCancel(); // Cancel request + void RunL(); // service completed request. + +public: + + RTimer iTimer; // Asynchronous service provider. + CRfsConnectionObserver* iRfsConnectionObserver; + +private: // friend classes + + friend class CRfsConnectionObserver; + }; + +#endif //__RFSCONTIMER_H diff -r 50b444048a8d -r 920c9a724929 coreapplicationuis/Rfs/inc/rfsConnectionObserver.h --- a/coreapplicationuis/Rfs/inc/rfsConnectionObserver.h Fri Jul 16 10:30:52 2010 +0300 +++ b/coreapplicationuis/Rfs/inc/rfsConnectionObserver.h Mon Aug 02 14:01:08 2010 +0300 @@ -21,13 +21,22 @@ #include +// P&S KEYS FROM SIP & PDP CONNECTION +#include +#include +#include + +#include "rfscontimer.h" + +class CRfsConTimer; + enum TRfsConnectionCloseState { ESipConnectionClose, EPdpConnectionClose // this should be the last enum }; -NONSHARABLE_CLASS( CRfsConnectionObserver ): CActive,public MHbDeviceProgressDialogObserver +NONSHARABLE_CLASS( CRfsConnectionObserver ): public CActive,public MHbDeviceProgressDialogObserver { public: @@ -68,13 +77,22 @@ void ReOpenPDPConnection(); void ReportRfsFailureToSip(); void ReportRfsCompletionToSip(); + /** + * Subscribes PDP property + * + * @since S60 v3.1 + */ + void Subscribe(); + + -private: +protected: /** * From base class CActive */ - + void DoCancel(); + /** * From CActive * @@ -82,25 +100,13 @@ */ void RunL(); - /** - * From CActive - * - * @since S60 v3.1 - */ - void DoCancel(); - + private: /** * New methods */ - /** - * Subscribes PDP property - * - * @since S60 v3.1 - */ - void Subscribe(); /** * Dismisses closing connections dialog @@ -166,16 +172,19 @@ */ TBool iAllConnectionClosed; TBool iIsWaitForDialogExecuted; - TInt iIsPDPFeatureEnabled; TBool iIsSIPConnectionsPresent; TBool iIsDialogNeedToBeDisplayed; TBool iIsSipInformedForClosingAllConnection; TBool iIsPDPInformedforClosingAllConnection; TBool iIsClosingConnectionsApplicable; - - TRfsConnectionCloseState iState; //for synchronous dialog handling CActiveSchedulerWait *iWait; + + +public: + TRfsConnectionCloseState iState; + TInt iIsPDPFeatureEnabled; + CRfsConTimer* iRfsConTimer; }; #endif //RFSPDPOBSERVER_H diff -r 50b444048a8d -r 920c9a724929 coreapplicationuis/Rfs/src/rfsConnectionObserver.cpp --- a/coreapplicationuis/Rfs/src/rfsConnectionObserver.cpp Fri Jul 16 10:30:52 2010 +0300 +++ b/coreapplicationuis/Rfs/src/rfsConnectionObserver.cpp Mon Aug 02 14:01:08 2010 +0300 @@ -23,14 +23,10 @@ #include #include #include -#include #include #include -// P&S KEYS FROM SIP & PDP CONNECTION -#include -#include -#include + // USER INCLUDES #include "rfsConnectionObserver.h" @@ -141,6 +137,9 @@ Subscribe(); } + // Create the Timer Active Object + iRfsConTimer = CRfsConTimer :: NewL(this); + TRACES("CRfsConnectionObserver::ConstructL(): End"); } @@ -170,6 +169,11 @@ CRfsConnectionObserver::~CRfsConnectionObserver() { TRACES("CRfsConnectionObserver::~CRfsConnectionObserver()"); + + if(iRfsConTimer) + { + delete iRfsConTimer; + } Cancel(); delete iWait; TRACES("CRfsConnectionObserver::~CRfsConnectionObserver(): End"); @@ -191,16 +195,21 @@ // only perform the following operation if the 'iIsClosingConnectionsApplicable' is ETrue iAllConnectionClosed = EFalse; - // Send P&S notification to SIP that RFS has started TInt err(KErrNone); if (iIsSIPConnectionsPresent && iState == ESipConnectionClose) { + // Send P&S notification to SIP that RFS has started and start the timer + err = iSIPProperty.Set(KPSSipRfsUid, KSipRfsState, ESipRfsStarted ); + iRfsConTimer->IssueTimerRequest(); iIsSipInformedForClosingAllConnection = ETrue; } else if (iIsPDPFeatureEnabled && iState == EPdpConnectionClose) { + // Send P&S notification to PDP that RFS has started and start the timer + err = iPDPProperty.Set(KPDPContextManager2,KPDPContextManagerFactorySettingsReset,EPDPContextManagerFactorySettingsResetStart ); + iRfsConTimer->IssueTimerRequest(); iIsPDPInformedforClosingAllConnection = ETrue; } @@ -208,12 +217,6 @@ // Leave from here is there is any error setting the intial handshake information // This means that RFS has failed as there was some problem setting the P&S keys User::LeaveIfError(err); - if(err != KErrNone) - { - TRACES1("CRfsConnectionObserver::CloseAlwaysOnConnectionL(): Err = %d", err); - // This means that the RFS has failed - return EFalse; - } // we set the flag to indicate showl is called and the dialog needs to be // dismissed from within the RunL() @@ -255,9 +258,11 @@ { iPDPProperty.Set(KPDPContextManager2,KPDPContextManagerFactorySettingsReset,EPDPContextManagerFactorySettingsResetStop); } - - - + if(iRfsConTimer) + { + // Cancel the Active timer if the user cancel the Rfs operation + iRfsConTimer->Cancel(); + } } @@ -345,7 +350,9 @@ { // set the information that we have closed all the active connections // here itself because the PDP connection/feature doen't exist + // Cancel the outstanding timer request iAllConnectionClosed = ETrue; + iRfsConTimer->Cancel(); DismissWaitDialog(); } @@ -354,7 +361,14 @@ iPDPProperty.Set(KPDPContextManager2,KPDPContextManagerFactorySettingsReset,EPDPContextManagerFactorySettingsResetStart ); // change the state to the next from within this as we are done with closing the SIP connection - iState = EPdpConnectionClose; + // Cancel the Outstanding SIP and timer request + // Subscribe to PDP and start the timer + Cancel(); + iRfsConTimer->Cancel(); + iState = EPdpConnectionClose; + Subscribe(); + iRfsConTimer->IssueTimerRequest(); + // // Under following cases the 'iIsPDPInformedforClosingAllConnection' will be set // @@ -395,6 +409,7 @@ // Now we may proceed to dsmiss the dialog and also set the state to the True for // all active connections closed iAllConnectionClosed = ETrue; + iRfsConTimer->Cancel(); DismissWaitDialog(); } } @@ -429,17 +444,19 @@ { TRACES("CRfsConnectionObserver::DoCancel()"); - if(iIsPDPFeatureEnabled) + if(iIsSIPConnectionsPresent && iState == ESipConnectionClose) + { + iSIPProperty.Cancel(); + if(!iIsPDPFeatureEnabled) + { + DismissWaitDialog(); + } + } + if(iIsPDPFeatureEnabled && iState == EPdpConnectionClose) { iPDPProperty.Cancel(); + DismissWaitDialog(); } - if(iIsSIPConnectionsPresent) - { - iSIPProperty.Cancel(); - } - - DismissWaitDialog(); - TRACES("CRfsConnectionObserver::DoCancel(): End"); } diff -r 50b444048a8d -r 920c9a724929 coreapplicationuis/Rfs/src/rfscontimer.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/coreapplicationuis/Rfs/src/rfscontimer.cpp Mon Aug 02 14:01:08 2010 +0300 @@ -0,0 +1,90 @@ +/* +* Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Implements CRFsScript class which controls the parsing of the Rfs scripts +* +*/ + +#include + +#include "rfscontimer.h" +#include "RfsTraces.h" + +const TInt KRfsConnectionTimeOut = 60000000; + +CRfsConTimer :: CRfsConTimer(CRfsConnectionObserver * aRfsConnectionObserver):CActive( EPriorityStandard ) + { + iRfsConnectionObserver = aRfsConnectionObserver; + iTimer.CreateLocal(); + CActiveScheduler::Add( this ); + } + +CRfsConTimer :: ~CRfsConTimer() + { + TRACES("CRfsConTimer :: ~CRfsConTimer()"); + + iRfsConnectionObserver = NULL; + Cancel(); + iTimer.Close(); + } + +CRfsConTimer* CRfsConTimer::NewL(CRfsConnectionObserver * aRfsConnectionObserver) + { + TRACES("CRfsConTimer :: NewL()"); + + CRfsConTimer* self = new (ELeave) CRfsConTimer(aRfsConnectionObserver ); + return self; + } + +void CRfsConTimer :: IssueTimerRequest() + { + TRACES("CRfsConTimer :: IssueTimerRequest()"); + + if(!IsActive()) + { + iTimer.After(iStatus, KRfsConnectionTimeOut); + SetActive(); + } + } +void CRfsConTimer :: RunL() + { + TRACES("CRfsConTimer :: RunL()"); + + if(iRfsConnectionObserver->iState == ESipConnectionClose && iRfsConnectionObserver->iIsPDPFeatureEnabled) + { + // If SIP doesn't respond with in the set time, RunL will be called, + // Rfs cancels the outstanding SIP request and If PDP connection exists, + // Rfs will inform the PDP and start the timer. + + iRfsConnectionObserver->Cancel(); + iRfsConnectionObserver->iState = EPdpConnectionClose; + iRfsConnectionObserver->Subscribe(); + iTimer.After(iStatus, KRfsConnectionTimeOut); + SetActive(); + } + else + { + iRfsConnectionObserver->Cancel(); + } + } + +void CRfsConTimer :: DoCancel() + { + TRACES("CRfsConTimer :: DoCancel()"); + + if(IsActive()) + { + iTimer.Cancel(); + } + } diff -r 50b444048a8d -r 920c9a724929 coreapplicationuis/SysAp/conf/coreapplicationuis_101F876C.crml Binary file coreapplicationuis/SysAp/conf/coreapplicationuis_101F876C.crml has changed diff -r 50b444048a8d -r 920c9a724929 coreapplicationuis/powersaveutilities/pluginlauncher/pluginlauncher.pro --- a/coreapplicationuis/powersaveutilities/pluginlauncher/pluginlauncher.pro Fri Jul 16 10:30:52 2010 +0300 +++ b/coreapplicationuis/powersaveutilities/pluginlauncher/pluginlauncher.pro Mon Aug 02 14:01:08 2010 +0300 @@ -23,6 +23,7 @@ SOURCES += src/*.cpp CONFIG += hb +CONFIG += no_icon MOC_DIR = moc OBJECT_DIR = obj diff -r 50b444048a8d -r 920c9a724929 systemsettings/accindicatorplugin/accindicatorsettings/accindicatorsettings.pro --- a/systemsettings/accindicatorplugin/accindicatorsettings/accindicatorsettings.pro Fri Jul 16 10:30:52 2010 +0300 +++ b/systemsettings/accindicatorplugin/accindicatorsettings/accindicatorsettings.pro Mon Aug 02 14:01:08 2010 +0300 @@ -6,6 +6,7 @@ DEPENDPATH += . inc resources src INCLUDEPATH += . CONFIG += Hb +CONFIG += no_icon INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE # Input diff -r 50b444048a8d -r 920c9a724929 tzservices/tzloc/inc/TzLocalizationDbAccessor.h --- a/tzservices/tzloc/inc/TzLocalizationDbAccessor.h Fri Jul 16 10:30:52 2010 +0300 +++ b/tzservices/tzloc/inc/TzLocalizationDbAccessor.h Mon Aug 02 14:01:08 2010 +0300 @@ -88,8 +88,10 @@ private: TInt CreateFrequentlyUsedZoneTableL(); TInt CreateUserCityTableL(); + TBool IsTableCreatedL(const TDesC& aTableName) const; void CloseDb(); void OpenDbL(); + protected: //Member data diff -r 50b444048a8d -r 920c9a724929 tzservices/tzloc/src/TzLocalizationDbAccessor.cpp --- a/tzservices/tzloc/src/TzLocalizationDbAccessor.cpp Fri Jul 16 10:30:52 2010 +0300 +++ b/tzservices/tzloc/src/TzLocalizationDbAccessor.cpp Mon Aug 02 14:01:08 2010 +0300 @@ -103,29 +103,21 @@ { //Database file doesn't exist. Attempt to create a new one. error = iLocalizedTimeZoneDb.Create(iDbsSession,KTzLocalizationDbName,KTzLocalizationDbSecurityPolicy); - if (error == KErrNone) - { - User::LeaveIfError(CreateFrequentlyUsedZoneTableL()); - User::LeaveIfError(CreateUserCityTableL()); - } - } - User::LeaveIfError(error); - // Check if both tables are created. - CDbColSet *colSet = NULL; - TRAP(error, colSet = iLocalizedTimeZoneDb.ColSetL(KCZTableName)); - delete colSet; - if (error) - { - User::LeaveIfError(CreateFrequentlyUsedZoneTableL()); - } - TRAP(error, colSet = iLocalizedTimeZoneDb.ColSetL(KUCTableName)); - delete colSet; - if (error) - { - User::LeaveIfError(CreateUserCityTableL()); - } + User::LeaveIfError(error); + + //Check whether tables exist and create them if they do not + if (!IsTableCreatedL(KCZTableName)) + { + User::LeaveIfError(CreateFrequentlyUsedZoneTableL()); + } + if (!IsTableCreatedL(KUCTableName)) + { + User::LeaveIfError(CreateUserCityTableL()); + } + } } + /** Destructor Closes the database tables, the database and the database session @@ -317,3 +309,24 @@ User::LeaveIfError(iZoneView.EvaluateAll()); } +TBool CTzLocalizationDbAccessor::IsTableCreatedL(const TDesC& aTableName) const + { + TBool result = EFalse; + CDbTableNames* tableNames = iLocalizedTimeZoneDb.TableNamesL(); + CleanupStack::PushL(tableNames); + if(tableNames) + { + const TInt count = tableNames->Count(); + for(TInt i = 0; i < count; i++) + { + if((*tableNames)[i] == aTableName) + { + result = ETrue; + break; + } + } + } + CleanupStack::PopAndDestroy(tableNames); + return result; + } +