# HG changeset patch # User William Roberts # Date 1268572286 0 # Node ID c32fb9f4b91ee5890b43d8e3690b690f50728ec4 # Parent c65663728cf1621edbf72d085bb8353837328116# Parent 2e6c4614c58e4b423b45782901d33ff6117a77cb Automatic merge from PDK_3.0.h diff -r c65663728cf1 -r c32fb9f4b91e accesspointcontrol/apcontrollistplugin/inc/apcontrollistplugin.h --- a/accesspointcontrol/apcontrollistplugin/inc/apcontrollistplugin.h Mon Mar 08 21:43:55 2010 +0000 +++ b/accesspointcontrol/apcontrollistplugin/inc/apcontrollistplugin.h Sun Mar 14 13:11:26 2010 +0000 @@ -21,7 +21,7 @@ // System includes #include -#include +#include #include // This UID is used for both the view UID and the ECOM plugin implementation UID. diff -r c65663728cf1 -r c32fb9f4b91e alwayson_net_plugin/pdpcontextmanager2/src/caoconnectionmonitorimpl.cpp --- a/alwayson_net_plugin/pdpcontextmanager2/src/caoconnectionmonitorimpl.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/alwayson_net_plugin/pdpcontextmanager2/src/caoconnectionmonitorimpl.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -16,7 +16,7 @@ */ // INCLUDE FILES -#include +#include #include "caoconnectionmonitorimpl.h" #include "maosettings.h" #include "logger.h" diff -r c65663728cf1 -r c32fb9f4b91e apengine/apeng/src/APNetworks.cpp --- a/apengine/apeng/src/APNetworks.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/apengine/apeng/src/APNetworks.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -26,7 +26,7 @@ #include #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS -#include +#include #else #include #endif diff -r c65663728cf1 -r c32fb9f4b91e apengine/apeng/src/APSelect.cpp --- a/apengine/apeng/src/APSelect.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/apengine/apeng/src/APSelect.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -24,7 +24,7 @@ #include #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS -#include +#include #else #include #endif diff -r c65663728cf1 -r c32fb9f4b91e apengine/apeng/src/ApProtHandler.cpp --- a/apengine/apeng/src/ApProtHandler.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/apengine/apeng/src/ApProtHandler.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -22,7 +22,7 @@ #include #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS -#include +#include #include #else #include diff -r c65663728cf1 -r c32fb9f4b91e apengine/apeng/src/VpnApEngine.cpp --- a/apengine/apeng/src/VpnApEngine.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/apengine/apeng/src/VpnApEngine.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -880,10 +880,11 @@ CleanupStack::PopAndDestroy( buf ); // buf - t->ReadUintL( TPtrC(VPN_SERVICE_IAP), aVpnApItem.iRealIapId ); - - t->ReadUintL( TPtrC(VPN_SERVICE_NETWORKID), aVpnApItem.iHomeNetwork ); - + // These fields might be missing from CommsDat. + // ApEngine does not support SNAPs, use CmManager API to get full support. + TRAP_IGNORE( t->ReadUintL( TPtrC(VPN_SERVICE_IAP), aVpnApItem.iRealIapId ) ) + TRAP_IGNORE( t->ReadUintL( TPtrC(VPN_SERVICE_NETWORKID), aVpnApItem.iHomeNetwork ) ) + CleanupStack::PopAndDestroy( t ); // t // Get real IAP name !!!!! diff -r c65663728cf1 -r c32fb9f4b91e apengine/apsettingshandlerui/inc/ApSettingsLookups.h --- a/apengine/apsettingshandlerui/inc/ApSettingsLookups.h Mon Mar 08 21:43:55 2010 +0000 +++ b/apengine/apsettingshandlerui/inc/ApSettingsLookups.h Sun Mar 14 13:11:26 2010 +0000 @@ -24,7 +24,7 @@ // INCLUDE FILES #include -#include +#include #include diff -r c65663728cf1 -r c32fb9f4b91e apengine/apsettingshandlerui/src/ApNetSelPopupList.cpp --- a/apengine/apsettingshandlerui/src/ApNetSelPopupList.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/apengine/apsettingshandlerui/src/ApNetSelPopupList.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -29,7 +29,7 @@ #include "ApNetSelPopupList.h" #include "ApNetSelectorListBoxModel.h" #include "ApSettingsModel.h" -#include +#include #include "ApsettingshandleruiImpl.h" diff -r c65663728cf1 -r c32fb9f4b91e apengine/apsettingshandlerui/src/ApSelPopupList.cpp --- a/apengine/apsettingshandlerui/src/ApSelPopupList.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/apengine/apsettingshandlerui/src/ApSelPopupList.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -21,7 +21,7 @@ #include "APSettingsHandlerUIVariant.hrh" #include -#include +#include #include #include diff -r c65663728cf1 -r c32fb9f4b91e apengine/apsettingshandlerui/src/ApSelQueryDialog.cpp --- a/apengine/apsettingshandlerui/src/ApSelQueryDialog.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/apengine/apsettingshandlerui/src/ApSelQueryDialog.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include diff -r c65663728cf1 -r c32fb9f4b91e apengine/apsettingshandlerui/src/ApSelectorDialog.cpp --- a/apengine/apsettingshandlerui/src/ApSelectorDialog.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/apengine/apsettingshandlerui/src/ApSelectorDialog.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -25,7 +25,7 @@ #include #include -#include +#include #include diff -r c65663728cf1 -r c32fb9f4b91e apengine/apsettingshandlerui/src/ApSelectorListBox.cpp --- a/apengine/apsettingshandlerui/src/ApSelectorListBox.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/apengine/apsettingshandlerui/src/ApSelectorListBox.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -23,7 +23,7 @@ //#include #include #include -#include +#include #include #include "ApSelectorListbox.h" diff -r c65663728cf1 -r c32fb9f4b91e apengine/apsettingshandlerui/src/ApSettingsCommons.cpp --- a/apengine/apsettingshandlerui/src/ApSettingsCommons.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/apengine/apsettingshandlerui/src/ApSettingsCommons.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -24,7 +24,7 @@ #include #include #include "ApSettingsHandlerUI.hrh" -#include +#include #include #include #include diff -r c65663728cf1 -r c32fb9f4b91e apengine/apsettingshandlerui/src/ApSettingsDlg.cpp --- a/apengine/apsettingshandlerui/src/ApSettingsDlg.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/apengine/apsettingshandlerui/src/ApSettingsDlg.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -41,7 +41,7 @@ #include "ApSettingsLookups.h" #include "ApSettingsDlg.h" #include "ApSettingsModel.h" -#include +#include #include diff -r c65663728cf1 -r c32fb9f4b91e apengine/apsettingshandlerui/src/ApSettingsModel.cpp --- a/apengine/apsettingshandlerui/src/ApSettingsModel.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/apengine/apsettingshandlerui/src/ApSettingsModel.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include diff -r c65663728cf1 -r c32fb9f4b91e apengine/apsettingshandlerui/src/apsettingsdeleteoperation.cpp --- a/apengine/apsettingshandlerui/src/apsettingsdeleteoperation.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/apengine/apsettingshandlerui/src/apsettingsdeleteoperation.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -42,7 +42,7 @@ #include "ApSelectorListBoxModel.h" #include "ApSettingsHandlerLogger.h" -#include +#include // TEST ENDS diff -r c65663728cf1 -r c32fb9f4b91e apengine/apsettingshandlerui/src/apsettingshandleruiImpl.cpp --- a/apengine/apsettingshandlerui/src/apsettingshandleruiImpl.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/apengine/apsettingshandlerui/src/apsettingshandleruiImpl.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include "ApsettingshandleruiImpl.h" diff -r c65663728cf1 -r c32fb9f4b91e apengine/apsettingsplugin/inc/APSettingsPlugin.h --- a/apengine/apsettingsplugin/inc/APSettingsPlugin.h Mon Mar 08 21:43:55 2010 +0000 +++ b/apengine/apsettingsplugin/inc/APSettingsPlugin.h Sun Mar 14 13:11:26 2010 +0000 @@ -22,7 +22,7 @@ // System includes #include #include -#include +#include #include // Forward declaration @@ -110,4 +110,4 @@ }; #endif //__AP_SETTINGS_PLUGIN_H__ -//End of file \ No newline at end of file +//End of file diff -r c65663728cf1 -r c32fb9f4b91e apengine/apsettingsplugin/src/APSettingsPlugin.cpp --- a/apengine/apsettingsplugin/src/APSettingsPlugin.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/apengine/apsettingsplugin/src/APSettingsPlugin.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include diff -r c65663728cf1 -r c32fb9f4b91e bearermanagement/S60MCPR/inc/s60mcpractivities.h --- a/bearermanagement/S60MCPR/inc/s60mcpractivities.h Mon Mar 08 21:43:55 2010 +0000 +++ b/bearermanagement/S60MCPR/inc/s60mcpractivities.h Sun Mar 14 13:11:26 2010 +0000 @@ -767,12 +767,12 @@ * STATE: Waits for preferred carrier message. * @return ETrue if preferred carrier notification is received. */ - DECLARE_SMELEMENT_HEADER( TAwaitingPreferredCarrierOrCancelOrRejected, + DECLARE_SMELEMENT_HEADER( TAwaitingPreferredCarrierOrCancelOrRejectedOrErrorNotification, MeshMachine::TState, NetStateMachine::MState, CS60MobilityActivity::TContext) virtual TBool Accept(); - DECLARE_SMELEMENT_FOOTER( TAwaitingPreferredCarrierOrCancelOrRejected ) + DECLARE_SMELEMENT_FOOTER( TAwaitingPreferredCarrierOrCancelOrRejectedOrErrorNotification ) /** * FORK/DECISION: Decides what happens after IPCPR responds to migration offer. diff -r c65663728cf1 -r c32fb9f4b91e bearermanagement/S60MCPR/inc/s60tiermanagerselector.h --- a/bearermanagement/S60MCPR/inc/s60tiermanagerselector.h Mon Mar 08 21:43:55 2010 +0000 +++ b/bearermanagement/S60MCPR/inc/s60tiermanagerselector.h Sun Mar 14 13:11:26 2010 +0000 @@ -60,6 +60,7 @@ ESock::CMetaConnectionProviderBase* FindOrCreateProviderL( TUint aAccessPoint ); private: TUint32 iDefaultAp; + TSubSessionUniqueId iSubSessionUniqueId; }; #endif // S60IPTIERMANAGERSELECTOR_H diff -r c65663728cf1 -r c32fb9f4b91e bearermanagement/S60MCPR/src/s60mcpractivities.cpp --- a/bearermanagement/S60MCPR/src/s60mcpractivities.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/bearermanagement/S60MCPR/src/s60mcpractivities.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -265,7 +265,7 @@ // Clear handshake status and wait for preferred carrier or mobility API close. NODEACTIVITY_ENTRY( MobilityMCprStates::KStartMobilityHandshake, CS60MobilityActivity::TClearHandshakingFlag, - CS60MobilityActivity::TAwaitingPreferredCarrierOrCancelOrRejected, // Ok. Error is fatal. + CS60MobilityActivity::TAwaitingPreferredCarrierOrCancelOrRejectedOrErrorNotification, // Ok. Error is fatal. S60MCprMobilityActivity::TInformMigrationAvailableOrCancelTag ) // Application rejected active carrier THROUGH_NODEACTIVITY_ENTRY( S60MCprStates::KSendInitialApplicationReject, diff -r c65663728cf1 -r c32fb9f4b91e bearermanagement/S60MCPR/src/s60mcprmobilityactivity.cpp --- a/bearermanagement/S60MCPR/src/s60mcprmobilityactivity.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/bearermanagement/S60MCPR/src/s60mcprmobilityactivity.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -500,12 +500,12 @@ } // ----------------------------------------------------------------------------- - // CS60MobilityActivity::TAwaitingPreferredCarrierOrCancelOrRejected::Accept + // CS60MobilityActivity::TAwaitingPreferredCarrierOrCancelOrRejectedOrErrorNotification::Accept // ----------------------------------------------------------------------------- // - DEFINE_SMELEMENT( CS60MobilityActivity::TAwaitingPreferredCarrierOrCancelOrRejected, + DEFINE_SMELEMENT( CS60MobilityActivity::TAwaitingPreferredCarrierOrCancelOrRejectedOrErrorNotification, NetStateMachine::MState, TContext ) - TBool CS60MobilityActivity::TAwaitingPreferredCarrierOrCancelOrRejected::Accept() + TBool CS60MobilityActivity::TAwaitingPreferredCarrierOrCancelOrRejectedOrErrorNotification::Accept() { TBool result( EFalse ); @@ -518,7 +518,7 @@ TMpmNotificationPrefIAPAvailable* notif = (TMpmNotificationPrefIAPAvailable*)msg->iPtr; - S60MCPRLOGSTRING4("S60MCPR<%x>::TAwaitingPreferredCarrierOrCancelOrRejected::Accept() TMPMPreferredCarrierAvailableMsg %d -> %d upgrade=%d", + S60MCPRLOGSTRING4("S60MCPR<%x>::TAwaitingPreferredCarrierOrCancelOrRejectedOrErrorNotification::Accept() TMPMPreferredCarrierAvailableMsg %d -> %d upgrade=%d", (TInt*)&iContext.Node(), notif->iOldIapId, notif->iNewIapId, notif->iIsUpgrade) // notif must be there. ASSERT(notif); @@ -538,18 +538,28 @@ } else if ( iContext.iMessage.IsMessage() ) { - S60MCPRLOGSTRING1("S60MCPR<%x>::TAwaitingPreferredCarrierOrCancelOrRejected::Accept() TCancel", + S60MCPRLOGSTRING1("S60MCPR<%x>::TAwaitingPreferredCarrierOrCancelOrRejectedOrErrorNotification::Accept() TCancel", (TInt*)&iContext.Node()) result = ETrue; } else if ( iContext.iMessage.IsMessage() ) { - S60MCPRLOGSTRING1("S60MCPR<%x>::TAwaitingPreferredCarrierOrCancelOrRejected::Accept() TMigrationRejected", + S60MCPRLOGSTRING1("S60MCPR<%x>::TAwaitingPreferredCarrierOrCancelOrRejectedOrErrorNotification::Accept() TMigrationRejected", (TInt*)&iContext.Node()) result = ETrue; } + else if ( iContext.iMessage.IsMessage() ) + { + CS60MobilityActivity& activity = static_cast(*iContext.iNodeActivity); + TCFS60MCPRMessage::TMPMErrorNotificationMsg* msg = + message_cast( &iContext.iMessage ); + S60MCPRLOGSTRING2("S60MCPR<%x>::TAwaitingPreferredCarrierOrCancelOrRejectedOrErrorNotification::Accept() TMPMErrorNotificationMsg %d",(TInt*)&iContext.Node(),msg->iValue) + ASSERT( msg->iValue != KErrNone ); + activity.SetError( msg->iValue ); + result = ETrue; + } return result; } diff -r c65663728cf1 -r c32fb9f4b91e bearermanagement/S60MCPR/src/s60mcprsimpleselectactivity.cpp --- a/bearermanagement/S60MCPR/src/s60mcprsimpleselectactivity.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/bearermanagement/S60MCPR/src/s60mcprsimpleselectactivity.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -155,12 +155,11 @@ TSelectionPrefs prefs; - ESock::RConnPrefList::TIter iterCSR = node.ConnPrefList().getIter(); - //There should be one and only one CSR pref - ASSERT(iterCSR[0] != NULL && iterCSR[1] == NULL); - TConnCSRPref* csrprefs = iterCSR[0]; - - prefs.SetSubSessionUniqueId(csrprefs->SubSessionUniqueId()); + ESock::RConnPrefList::TIter iterCSR = node.ConnPrefList().getIter(); + //There should be one and only one CSR pref + ASSERT(iterCSR[0] != NULL && iterCSR[1] == NULL); + TConnCSRPref* csrprefs = iterCSR[0]; + prefs.SetSubSessionUniqueId(node.SubSessionUniqueId()); prefs.SetFlags(csrprefs->Flags()); prefs.SetScope(csrprefs->Scope()); @@ -172,7 +171,6 @@ node.ConnPrefList().AppendL(nextAP); CleanupStack::Pop(); /* END OF HACK */ - // Attach. 399 attach shouldn't be visible here. if ( prefs.Scope()&TSelectionPrefs::ESelectFromExisting ) @@ -185,6 +183,7 @@ else { S60MCPRLOGSTRING1("S60MCPR<%x>::TSelectNextLayer::DoL() Start",(TInt*)&iContext.Node()) + TCommDbConnPref ippprefs; ippprefs.SetIapId( node.PolicyPrefs().IapId() ); ippprefs.SetNetId( node.PolicyPrefs().NetId() ); @@ -296,11 +295,15 @@ } #endif //_DEBUG + TSelectionPrefs newPrefs; + newPrefs = node.SelectionPrefs(); + newPrefs.SetSubSessionUniqueId( node.SubSessionUniqueId() ); + // Attach. 399 attach shouldn't be visible here. if ( node.SelectionPrefs().Scope()&TSelectionPrefs::ESelectFromExisting ) { S60MCPRLOGSTRING1("S60MCPR<%x>::TSelectNextLayer::DoL() Attach ",(TInt*)&iContext.Node()) - TCFSelector::TSimpleSelect msg( node.SelectionPrefs() ); + TCFSelector::TSimpleSelect msg( newPrefs ); iContext.iNodeActivity->PostRequestTo( ac.iTierManager, msg ); } // Start @@ -312,8 +315,6 @@ ippprefs.SetNetId( node.PolicyPrefs().NetId() ); //node.MapPolicyPrefsToConnPrefL( node.PolicyPrefs(), tmppref ); // don't use reference we want to preserve the original TSelectionPrefs. - TSelectionPrefs newPrefs; - newPrefs = node.SelectionPrefs(); newPrefs.SetPrefs( ippprefs ); TCFSelector::TSimpleSelect msg(newPrefs); iContext.iNodeActivity->PostRequestTo(ac.iTierManager, msg); @@ -349,16 +350,7 @@ CleanupStack::PushL( cb ); // Resolve application uid. - TSubSessionUniqueId subSessionUniqueId = node.SelectionPrefs().SubSessionUniqueId(); - - if ( !node.ConnPrefList().Count() ) - { - subSessionUniqueId = node.SelectionPrefs().SubSessionUniqueId(); - } - else - { - subSessionUniqueId = node.SubSessionUniqueId(); - } + TSubSessionUniqueId subSessionUniqueId = node.SubSessionUniqueId(); TSecureId secureId( 0 ); diff -r c65663728cf1 -r c32fb9f4b91e bearermanagement/S60MCPR/src/s60tiermanagerselector.cpp --- a/bearermanagement/S60MCPR/src/s60tiermanagerselector.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/bearermanagement/S60MCPR/src/s60tiermanagerselector.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -97,6 +97,8 @@ //Legacy Attach -case handling is in NetMCPR and IPProtoTM // 399 Attach is not supported const TConnPref& prefs = iSelectionPrefs.Prefs(); + iSubSessionUniqueId = iSelectionPrefs.SubSessionUniqueId(); + switch ( prefs.ExtensionId() ) { case TConnPref::EConnPrefCommDbMulti: @@ -164,6 +166,7 @@ // Provision selection preferences to S60 NetMCPR. prov->SetSelectionPrefs( iSelectionPrefs ); + prov->SetSubSessionUniqueId( iSubSessionUniqueId ); // Change the provider info so that this provider is never found by other selections const TProviderInfo& pi = provider->ProviderInfo(); diff -r c65663728cf1 -r c32fb9f4b91e bearermanagement/mpm/group/mpmserver.mmp --- a/bearermanagement/mpm/group/mpmserver.mmp Mon Mar 08 21:43:55 2010 +0000 +++ b/bearermanagement/mpm/group/mpmserver.mmp Sun Mar 14 13:11:26 2010 +0000 @@ -55,6 +55,7 @@ SOURCE mpmcsidwatcher.cpp SOURCE mpmdialogbase.cpp SOURCE mpmwlanavailability.cpp +SOURCE mpmdatausagewatcher.cpp USERINCLUDE ../inc diff -r c65663728cf1 -r c32fb9f4b91e bearermanagement/mpm/inc/mpmconnmonevents.h --- a/bearermanagement/mpm/inc/mpmconnmonevents.h Mon Mar 08 21:43:55 2010 +0000 +++ b/bearermanagement/mpm/inc/mpmconnmonevents.h Sun Mar 14 13:11:26 2010 +0000 @@ -32,7 +32,7 @@ #include #include #endif -#include +#include #include "mpmserver.h" // FORWARD DECLARATIONS diff -r c65663728cf1 -r c32fb9f4b91e bearermanagement/mpm/inc/mpmcsidwatcher.h --- a/bearermanagement/mpm/inc/mpmcsidwatcher.h Mon Mar 08 21:43:55 2010 +0000 +++ b/bearermanagement/mpm/inc/mpmcsidwatcher.h Sun Mar 14 13:11:26 2010 +0000 @@ -18,6 +18,9 @@ #ifndef MPMCSIDWATCHER_H #define MPMCSIDWATCHER_H +// INCLUDES +#include + class CRepository; /** diff -r c65663728cf1 -r c32fb9f4b91e bearermanagement/mpm/inc/mpmdatausagewatcher.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bearermanagement/mpm/inc/mpmdatausagewatcher.h Sun Mar 14 13:11:26 2010 +0000 @@ -0,0 +1,100 @@ +/* +* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "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: Listen cellular data usage key changes in central repository. +* +*/ + +#ifndef MPMDATAUSAGEWATCHER_H +#define MPMDATAUSAGEWATCHER_H + +// INCLUDES +#include + +class CRepository; +class CMPMServer; + +/** + * Class for accessing central repository. + * Follows KCurrentCellularDataUsage key in central repository. + * @since 5.2 + */ +class CMpmDataUsageWatcher : public CActive + { + +public: + + /** + * New for calling the two-phased constructor. + */ + static CMpmDataUsageWatcher* NewL( CMPMServer* aServer ); + + /** + * Destructor. + */ + virtual ~CMpmDataUsageWatcher(); + + /** + * Start to listen for events. + */ + void StartL(); + + /** + * Active object's RunL. + */ + void RunL(); + + /** + * Active object's RunError. + */ + TInt RunError( TInt aError ); + + /** + * Active object's DoCancel. + */ + void DoCancel(); + +private: + + /** + * C++ default constructor. + */ + CMpmDataUsageWatcher( CMPMServer* aServer ); + + /** + * Symbian 2nd phase constructor. + */ + void ConstructL(); + +private: // data + + /** + * Central repository handle. + * Own. + */ + CRepository* iRepository; + + /** + * Data usage value. + */ + TInt iCellularDataUsage; // type: TCmCellularDataUsage + + /** + * Pointer to the MPM Server object. + * Not own. + */ + CMPMServer* iServer; + + }; + +#endif // MPMDATAUSAGEWATCHER_H diff -r c65663728cf1 -r c32fb9f4b91e bearermanagement/mpm/inc/mpmroamingwatcher.h --- a/bearermanagement/mpm/inc/mpmroamingwatcher.h Mon Mar 08 21:43:55 2010 +0000 +++ b/bearermanagement/mpm/inc/mpmroamingwatcher.h Sun Mar 14 13:11:26 2010 +0000 @@ -77,11 +77,6 @@ */ TMPMRoamingStatus RoamingStatus() const; - TBool AskCellularDataUsageAbroad() const; - - void SetAskCellularDataUsageAbroad(TBool aAskUsage); - - protected: // Constructors and destructor /** @@ -148,14 +143,6 @@ * Current country */ RMobilePhone::TMobilePhoneNetworkCountryCode iCurrentCountryCode; - - /** - * This variable indicates wheather cellular data usage abroad must be confirmed from the user - * This variable is set to TRUE when roaming to visitor network happens and it is set to FALSE when - * Confirm Dialog is presented first time in current foreign country. It is also set to FALSE every - * time when mobile comes back to home network or moves to other foreign country - */ - TBool iAskCellularDataUsageAbroad; }; #endif // MPMROAMINGWATCHER_H diff -r c65663728cf1 -r c32fb9f4b91e bearermanagement/mpm/inc/mpmserver.h --- a/bearermanagement/mpm/inc/mpmserver.h Mon Mar 08 21:43:55 2010 +0000 +++ b/bearermanagement/mpm/inc/mpmserver.h Sun Mar 14 13:11:26 2010 +0000 @@ -37,6 +37,7 @@ class CMPMCommsDatAccess; class CMpmCsIdWatcher; +class CMpmDataUsageWatcher; // CONSTANTS _LIT( KMPMPanicCategory, "Mobility Policy Manager Server" ); @@ -834,6 +835,12 @@ */ CMPMServerSession* GetServerSession( TConnectionId aConnId ) const; + /** + * Stops cellular connections, except MMS + * @since 5.2 + */ + void StopCellularConns(); + private: /** @@ -938,6 +945,11 @@ */ CMpmCsIdWatcher* iMpmCsIdWatcher; + /** + * Handle to another central repository watcher + */ + CMpmDataUsageWatcher* iMpmDataUsageWatcher; + // Iap id of the active connection TUint32 iActiveIapId; diff -r c65663728cf1 -r c32fb9f4b91e bearermanagement/mpm/src/mpmconfirmdlgstarting.cpp --- a/bearermanagement/mpm/src/mpmconfirmdlgstarting.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/bearermanagement/mpm/src/mpmconfirmdlgstarting.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -266,13 +266,6 @@ TRAP_IGNORE(iServer.CommsDatAccess()->WriteGenConnSettingsL( genConnSettings )); } } - else - { - //In foreign country connect automatically is not stored in commsdat - //even user selected so. We just do not ask confirmation for the cellular - //connection again in this country: - iServer.RoamingWatcher()->SetAskCellularDataUsageAbroad( false ); - } TBool wlanNeeded( EFalse ); TRAPD( err, wlanNeeded = iIapSelection.StartWlanQueryIfNeededL( iIAP ) ) diff -r c65663728cf1 -r c32fb9f4b91e bearermanagement/mpm/src/mpmdatausagewatcher.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bearermanagement/mpm/src/mpmdatausagewatcher.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -0,0 +1,149 @@ +/* + * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "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: Listen cellular data usage key changes in central repository. + * + */ + +#include +#include +#include +#include + +#include "mpmlogger.h" +#include "mpmserver.h" +#include "mpmdatausagewatcher.h" + +// --------------------------------------------------------------------------- +// Default C++ constructor. +// --------------------------------------------------------------------------- +// +CMpmDataUsageWatcher::CMpmDataUsageWatcher( CMPMServer* aServer ) : + CActive( EPriorityStandard ), iServer( aServer ) + { + MPMLOGSTRING( "CMpmDataUsageWatcher::CMpmDataUsageWatcher" ) + + CActiveScheduler::Add( this ); + } + +// --------------------------------------------------------------------------- +// Symbian 2nd phase constructor. Creates a central repository object. +// --------------------------------------------------------------------------- +// +void CMpmDataUsageWatcher::ConstructL() + { + MPMLOGSTRING( "CMpmDataUsageWatcher::ConstructL" ) + + iRepository = CRepository::NewL( KCRUidCmManager ); + } + +// --------------------------------------------------------------------------- +// Creates a new object by calling the two-phased constructor. +// --------------------------------------------------------------------------- +// +CMpmDataUsageWatcher* CMpmDataUsageWatcher::NewL( CMPMServer* aServer ) + { + MPMLOGSTRING( "CMpmDataUsageWatcher::NewL" ) + + CMpmDataUsageWatcher* self = new( ELeave ) CMpmDataUsageWatcher( aServer ); + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop( self ); + return self; + } + +// --------------------------------------------------------------------------- +// Destructor. +// --------------------------------------------------------------------------- +// +CMpmDataUsageWatcher::~CMpmDataUsageWatcher() + { + MPMLOGSTRING( "CMpmDataUsageWatcher::~CMpmDataUsageWatcher" ) + + Cancel(); + delete iRepository; + } + +// --------------------------------------------------------------------------- +// Order notification from changes. +// --------------------------------------------------------------------------- +// +void CMpmDataUsageWatcher::StartL() + { + MPMLOGSTRING( "CMpmDataUsageWatcher::StartL" ) + + // Request notification + User::LeaveIfError( iRepository->NotifyRequest( KCurrentCellularDataUsage, + iStatus ) ); + SetActive(); + + // Get value from central repository + User::LeaveIfError( iRepository->Get( KCurrentCellularDataUsage, + iCellularDataUsage ) ); + } + +// --------------------------------------------------------------------------- +// From class CActive. +// Event is received when there is a change in central repository key. +// --------------------------------------------------------------------------- +// +void CMpmDataUsageWatcher::RunL() + { + MPMLOGSTRING( "CMpmDataUsageWatcher::RunL" ) + + User::LeaveIfError( iStatus.Int() ); + + // Request new notification + User::LeaveIfError( iRepository->NotifyRequest( KCurrentCellularDataUsage, + iStatus ) ); + SetActive(); + + TInt oldCellularDataUsage = iCellularDataUsage; + + // Get the new value from central repository + User::LeaveIfError( iRepository->Get( KCurrentCellularDataUsage, + iCellularDataUsage ) ); + + // Stop cellular connections if the setting changes into Disabled + if (oldCellularDataUsage != ECmCellularDataUsageDisabled && + iCellularDataUsage == ECmCellularDataUsageDisabled) + { + // TODO: Uncomment this when trying to get stopping working. + // iServer->StopCellularConns(); + } + } + +// --------------------------------------------------------------------------- +// From class CActive. +// Nothing to do over here. +// --------------------------------------------------------------------------- +// +TInt CMpmDataUsageWatcher::RunError( TInt /*aError*/ ) + { + MPMLOGSTRING( "CMpmDataUsageWatcher::RunError" ) + + return KErrNone; + } + +// --------------------------------------------------------------------------- +// From class CActive. +// Cancel outstanding request. +// --------------------------------------------------------------------------- +// +void CMpmDataUsageWatcher::DoCancel() + { + MPMLOGSTRING( "CMpmDataUsageWatcher::DoCancel" ) + + iRepository->NotifyCancel( KCurrentCellularDataUsage ); + } + diff -r c65663728cf1 -r c32fb9f4b91e bearermanagement/mpm/src/mpmiapselection.cpp --- a/bearermanagement/mpm/src/mpmiapselection.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/bearermanagement/mpm/src/mpmiapselection.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -117,12 +117,6 @@ iChooseIapPref = aChooseIapPref; - // Update iNewWlansAllowed information. - // No need to filter away cellular iaps here based on UI's Allow Cellular Usage - // setting, since ConnMon checks the setting and reports only correct IAPs - // available for MPM. - iSession->IsWlanOnlyL( iNewWlansAllowed ); - // Always use stored connection info. // If stored information doesn't exist, a normal sequence is used. TUint32 snap( 0 ); @@ -148,6 +142,9 @@ MPMLOGSTRING2( "CMPMIapSelection::ChooseIapL: IapID: %i", iChooseIapPref.IapId() ) + // Update WLAN only information and whether new WLAN network usage is allowed. + TBool wlanOnly = iSession->IsWlanOnlyL( iNewWlansAllowed ); + // Check if direct IAP connection is tried to make if ( iChooseIapPref.IapId() != 0 ) { @@ -156,11 +153,10 @@ // Complete selection with error code if wlan only was set and cellular IAP other // than MMS IAP was tried to access - if ( ( iChooseIapPref.BearerSet() == - TExtendedConnPref::EExtendedConnBearerWLAN ) && + if ( wlanOnly && ( bearerType == EMPMBearerTypePacketData ) && ( iSession->IsMMSIap( iChooseIapPref.IapId() ) == EFalse ) ) - { + { ChooseIapComplete( KErrPermissionDenied, NULL ); return; } @@ -367,8 +363,7 @@ { // Check if we are roaming and cellular data usage query has not yet been presented // to the user in this country - if ( iSession->MyServer().RoamingWatcher()->RoamingStatus() == EMPMInternationalRoaming - && iSession->MyServer().RoamingWatcher()->AskCellularDataUsageAbroad() == true ) + if ( iSession->MyServer().RoamingWatcher()->RoamingStatus() == EMPMInternationalRoaming ) { // Check whether queries are enabled if ( !( iChooseIapPref.NoteBehaviour() & TExtendedConnPref::ENoteBehaviourConnDisableQueries ) ) @@ -543,34 +538,17 @@ { if ( iSession->MyServer().RoamingWatcher()->RoamingStatus() == EMPMInternationalRoaming ) { - // Check if cellular data usage query has already been presented to the user in this country - if ( iSession->MyServer().RoamingWatcher()->AskCellularDataUsageAbroad() == true ) - { - // International roaming - iConfirmDlgStarting = CMPMConfirmDlgStarting::NewL( - *this, - connId, - snap, - validateIapId, - CMPMConfirmDlg::EConfirmDlgVisitorNetwork, - iChooseIapPref, - iSession->MyServer(), - *iSession, - EExplicitConnection ); - } - else - { - // If user has already been queried in this country just complete the IAP selection. - - iSession->MyServer().AppendBMConnection( connId, - snap, - validateIapId, - EStarting, - *iSession ); - - ChooseIapComplete( KErrNone, &iChooseIapPref ); - } - + // International roaming + iConfirmDlgStarting = CMPMConfirmDlgStarting::NewL( + *this, + connId, + snap, + validateIapId, + CMPMConfirmDlg::EConfirmDlgVisitorNetwork, + iChooseIapPref, + iSession->MyServer(), + *iSession, + EExplicitConnection ); } else { @@ -753,17 +731,19 @@ TBool connectionAlreadyActive = iSession->MyServer().CheckIfStarted( aPolicyPref->IapId() ); CConnectionUiUtilities* connUiUtils = NULL; - TRAPD( popupError, - connUiUtils = CConnectionUiUtilities::NewL(); - connUiUtils->ConnectingViaDiscreetPopup( - aPolicyPref->IapId(), - connectionAlreadyActive ); - delete connUiUtils; ); - if ( popupError && connUiUtils ) - { - delete connUiUtils; - } - } + if ( !connectionAlreadyActive ) + { + TRAPD( popupError, + connUiUtils = CConnectionUiUtilities::NewL(); + connUiUtils->ConnectingViaDiscreetPopup( + aPolicyPref->IapId()); + delete connUiUtils; ); + if ( popupError && connUiUtils ) + { + delete connUiUtils; + } + } + } if( iWlanDialog ) { @@ -951,8 +931,7 @@ { // Check if we are roaming and cellular data usage query has not yet been presented // to the user in this country - if ( iSession->MyServer().RoamingWatcher()->RoamingStatus() == EMPMInternationalRoaming - && iSession->MyServer().RoamingWatcher()->AskCellularDataUsageAbroad() == true ) + if ( iSession->MyServer().RoamingWatcher()->RoamingStatus() == EMPMInternationalRoaming ) { // Check whether queries are enabled if ( !( iChooseIapPref.NoteBehaviour() & TExtendedConnPref::ENoteBehaviourConnDisableQueries ) ) diff -r c65663728cf1 -r c32fb9f4b91e bearermanagement/mpm/src/mpmroamingwatcher.cpp --- a/bearermanagement/mpm/src/mpmroamingwatcher.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/bearermanagement/mpm/src/mpmroamingwatcher.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -58,8 +58,7 @@ iMobilePhone( aMobilePhone ), iRegistrationStatus( RMobilePhone::ERegistrationUnknown ), iRoamingStatus( EMPMRoamingStatusUnknown ), - iCurrentCountryCode( 0 ), - iAskCellularDataUsageAbroad( true ) + iCurrentCountryCode( 0 ) { MPMLOGSTRING( "CMPMRoamingWatcher::CMPMRoamingWatcher" ) CActiveScheduler::Add( this ); @@ -188,7 +187,6 @@ case RMobilePhone::ERegisteredOnHomeNetwork: { roamingStatus = EMPMHomenetwork; - iAskCellularDataUsageAbroad = false; break; } @@ -221,11 +219,6 @@ else { roamingStatus = EMPMInternationalRoaming; - // - if ( iCurrentCountryCode != countryCode ) - { - iAskCellularDataUsageAbroad = ETrue; - } } iCurrentCountryCode = countryCode; } @@ -256,20 +249,6 @@ return iRoamingStatus; } - -TBool CMPMRoamingWatcher::AskCellularDataUsageAbroad() const - { - MPMLOGSTRING2( "CMPMRoamingWatcher::AskCellularDataUsageAbroad iAskCellularDataUsageAbroad: %d", iAskCellularDataUsageAbroad ) - return iAskCellularDataUsageAbroad; - } - -void CMPMRoamingWatcher::SetAskCellularDataUsageAbroad(TBool aAskUsage) - { - iAskCellularDataUsageAbroad = aAskUsage; - MPMLOGSTRING2( "CMPMRoamingWatcher::SetAskCellularDataUsageAbroad iAskCellularDataUsageAbroad: %d", iAskCellularDataUsageAbroad ) - } - - // ========================== OTHER EXPORTED FUNCTIONS ========================= // None. diff -r c65663728cf1 -r c32fb9f4b91e bearermanagement/mpm/src/mpmserver.cpp --- a/bearermanagement/mpm/src/mpmserver.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/bearermanagement/mpm/src/mpmserver.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -41,6 +41,8 @@ #include "mpmdialog.h" #include "mpmprivatecrkeys.h" #include "mpmcsidwatcher.h" +#include "mpmdatausagewatcher.h" +#include "mpmpropertydef.h" // ============================= LOCAL FUNCTIONS =============================== @@ -170,6 +172,20 @@ iMpmCsIdWatcher = CMpmCsIdWatcher::NewL(); iMpmCsIdWatcher->StartL(); + // Create another central repository watcher and start it + // TODO: Trapped, because currently it may fatally leave in HW. + // (Possibly because of the capability updates of data usage watcher's CR-keys.) + TRAPD( duwErr, iMpmDataUsageWatcher = CMpmDataUsageWatcher::NewL( this ) ); + if (duwErr == KErrNone) + { + iMpmDataUsageWatcher->StartL(); + } + else + { + iMpmDataUsageWatcher = NULL; + MPMLOGSTRING( "CMPMServer::ConstructL: CMpmDataUsageWatcher::NewL() failed!" ) + } + // Define P&S keys (snap & iap) for the user connection TInt ret = RProperty::Define( KMPMUserConnectionCategory, KMPMPSKeyUserConnectionSnap, @@ -326,6 +342,8 @@ delete iMpmCsIdWatcher; + delete iMpmDataUsageWatcher; + iDedicatedClients.Close(); delete iCommsDatAccess; @@ -1784,7 +1802,7 @@ RAvailableIAPList iapList; CleanupClosePushL( iapList ); - for ( TInt index = 0; index < aIapInfo.iCount; index++ ) + for ( TUint index = 0; index < aIapInfo.iCount; index++ ) { if ( CommsDatAccess()->CheckWlanL( aIapInfo.iIap[index].iIapId ) != ENotWlanIap ) { @@ -1847,7 +1865,7 @@ RArray packetDataIapIds; CleanupClosePushL( packetDataIapIds ); - for ( TInt index = 0; index < aIapInfo.iCount; index++ ) + for ( TUint index = 0; index < aIapInfo.iCount; index++ ) { if ( CommsDatAccess()->GetBearerTypeL( aIapInfo.iIap[index].iIapId ) == EMPMBearerTypePacketData ) @@ -1876,7 +1894,7 @@ { // Check if used WLAN is still available TBool currentWlanIapAvailable = EFalse; - for ( TInt iapIndex = 0; iapIndex < aIapInfo.iCount; iapIndex++ ) + for ( TUint iapIndex = 0; iapIndex < aIapInfo.iCount; iapIndex++ ) { if ( aIapInfo.iIap[iapIndex].iIapId == iActiveBMConns[index].iConnInfo.iIapId ) @@ -2063,6 +2081,49 @@ return serverSession; } +// --------------------------------------------------------------------------- +// CMPMServer::StopCellularConns +// Stop all cellular connections except MMS +// --------------------------------------------------------------------------- +// +void CMPMServer::StopCellularConns() + { + MPMLOGSTRING( "CMPMServer::StopCellularConns" ) + + TUint32 iapId; + TMPMBearerType bearerType = EMPMBearerTypeNone; + + // No cleanup stack used cause this function doesn't leave. + RArray stoppedIaps; + + // Check through active connections + for (TInt i = 0; i < iActiveBMConns.Count(); i++) + { + iapId = iActiveBMConns[i].iConnInfo.iIapId; + + // Don't stop the same IAP twice. + if (stoppedIaps.Find( iapId ) == KErrNotFound) + { + TRAPD( err, bearerType = CommsDatAccess()->GetBearerTypeL( iapId ) ); + if (err == KErrNone && + iapId != 0 && + bearerType == EMPMBearerTypePacketData) + { + TInt mmsIap( 0 ); + err = RProperty::Get( KMPMCathegory, KMPMPropertyKeyMMS, mmsIap ); + // Check that it's not MMS IAP. + if (!(err == KErrNone && iapId == mmsIap)) + { + // Stop the conn / IAP. + StopConnections( iapId ); + stoppedIaps.Append( iapId ); + } + } + } + } + stoppedIaps.Close(); + } + // ----------------------------------------------------------------------------- // TMPMBlackListConnId::Append // ----------------------------------------------------------------------------- diff -r c65663728cf1 -r c32fb9f4b91e bearermanagement/mpm/src/mpmserversession.cpp --- a/bearermanagement/mpm/src/mpmserversession.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/bearermanagement/mpm/src/mpmserversession.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -933,22 +933,13 @@ { if ( MyServer().RoamingWatcher()->RoamingStatus() == EMPMInternationalRoaming ) { - //Check if cellular data usage query has already been presented to the user in this country - if ( MyServer().RoamingWatcher()->AskCellularDataUsageAbroad() == true ) - { - //International roaming - iConfirmDlgRoaming = CMPMConfirmDlgRoaming::NewL( - *this, - snapId, - iMigrateIap, - CMPMConfirmDlg::EConfirmDlgVisitorNetwork, - reconnect ); - } - else - { - //Handle like user would have answered "Connect this time" to dialog - RoamingConfirmationCompletedL( KErrNone, EMsgQueryThisTime, reconnect ); - } + //International roaming + iConfirmDlgRoaming = CMPMConfirmDlgRoaming::NewL( + *this, + snapId, + iMigrateIap, + CMPMConfirmDlg::EConfirmDlgVisitorNetwork, + reconnect ); } else { @@ -1105,13 +1096,6 @@ TRAP_IGNORE(MyServer().CommsDatAccess()->WriteGenConnSettingsL( genConnSettings )); } } - else - { - //In foreign country connect automatically is not stored in commsdat - //even user selected so. We just do not ask confirmation for the cellular - //connection again in this country: - MyServer().RoamingWatcher()->SetAskCellularDataUsageAbroad( false ); - } } //user selected connect this time @@ -2841,15 +2825,17 @@ { TBool connectionAlreadyActive = iMyServer.CheckIfStarted( aIapId ); CConnectionUiUtilities* connUiUtils = NULL; - TRAPD( popupError, - connUiUtils = CConnectionUiUtilities::NewL(); - connUiUtils->ConnectingViaDiscreetPopup( - aIapId, - connectionAlreadyActive ); - delete connUiUtils; ); - if ( popupError && connUiUtils ) + if (!connectionAlreadyActive ) { - delete connUiUtils; + TRAPD( popupError, + connUiUtils = CConnectionUiUtilities::NewL(); + connUiUtils->ConnectingViaDiscreetPopup( + aIapId ); + delete connUiUtils; ); + if ( popupError && connUiUtils ) + { + delete connUiUtils; + } } } diff -r c65663728cf1 -r c32fb9f4b91e cmmanager/cmmgr/Framework/Inc/cmdlg.h --- a/cmmanager/cmmgr/Framework/Inc/cmdlg.h Mon Mar 08 21:43:55 2010 +0000 +++ b/cmmanager/cmmgr/Framework/Inc/cmdlg.h Sun Mar 14 13:11:26 2010 +0000 @@ -187,6 +187,11 @@ virtual void ConstructCMArrayL( RArray& aCmIds ); + /** + * Remove hidden Connection Methods from the Array + */ + virtual void ClearHiddenCMsFromArrayL( RArray& aCmIds ); + public: /** * From base class MCmdExec @@ -214,11 +219,7 @@ * Reorder connection methods according to underlying connection in case of vpn */ void ReOrderCMsL(); - - /** - * Remove hidden Connection Methods from the Array - */ - void ClearHiddenCMsFromArrayL( RArray& aCmIds ); + /** * Get a proper index in list for priority diff -r c65663728cf1 -r c32fb9f4b91e cmmanager/cmmgr/Framework/Inc/uncatdlg.h --- a/cmmanager/cmmgr/Framework/Inc/uncatdlg.h Mon Mar 08 21:43:55 2010 +0000 +++ b/cmmanager/cmmgr/Framework/Inc/uncatdlg.h Sun Mar 14 13:11:26 2010 +0000 @@ -69,6 +69,11 @@ */ void ConstructCMArrayL( RArray& aCmIds ); + /** + * Remove hidden Connection Methods from the Array + */ + void ClearHiddenCMsFromArrayL( RArray& aCmIds ); + public: // From MCmCommsDatWatcher /** @@ -122,4 +127,4 @@ #endif -// End of File \ No newline at end of file +// End of File diff -r c65663728cf1 -r c32fb9f4b91e cmmanager/cmmgr/Framework/Src/uncatdlg.cpp --- a/cmmanager/cmmgr/Framework/Src/uncatdlg.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/cmmanager/cmmgr/Framework/Src/uncatdlg.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -389,6 +389,36 @@ } // -------------------------------------------------------------------------- +// CCmDlg::ClearHiddenCMsFromArrayL +// -------------------------------------------------------------------------- +// +void CUncatDlg::ClearHiddenCMsFromArrayL( RArray& aCmIds ) + { + TBool hidden( EFalse ); + TInt err( KErrNone ); + for ( TInt index = 0; index < aCmIds.Count(); index++ ) + { + TUint recId = aCmIds[index]; + TRAP( err, hidden = iCmManager->GetConnectionMethodInfoBoolL( recId, ECmHidden ) ); + if ( err || hidden ) + { + aCmIds.Remove( index ); + index--; + // Remove the same item from iCmUncatItems array + for( TInt i = 0; i < iCmUncatItems.Count(); i++ ) + { + if( iCmUncatItems[i].iCmId == recId ) + { + iCmUncatItems.Remove( i ); + break; + } + } + } + } + } + + +// -------------------------------------------------------------------------- // CUncatDlg::CleanupUncatArray // -------------------------------------------------------------------------- // diff -r c65663728cf1 -r c32fb9f4b91e cmmanager/cmmgr/Framework/SrcData/cmmanager.rss --- a/cmmanager/cmmgr/Framework/SrcData/cmmanager.rss Mon Mar 08 21:43:55 2010 +0000 +++ b/cmmanager/cmmgr/Framework/SrcData/cmmanager.rss Sun Mar 14 13:11:26 2010 +0000 @@ -565,6 +565,7 @@ { type = KDestListboxType; id = KDestListboxId; + itemflags = EEikDlgItemTakesEnterKey; control= LISTBOX { flags = EAknListBoxSelectionList;}; } }; @@ -715,6 +716,7 @@ { type = KCmListboxType; id = KCmListboxId; + itemflags = EEikDlgItemTakesEnterKey; control= LISTBOX { flags = EAknListBoxSelectionList;}; } }; diff -r c65663728cf1 -r c32fb9f4b91e cmmanager/cmmgr/Framework/conf/cmmanager_10207376.crml Binary file cmmanager/cmmgr/Framework/conf/cmmanager_10207376.crml has changed diff -r c65663728cf1 -r c32fb9f4b91e cmmanager/cmmgr/Plugins/cmpluginvpn/src/cmpluginvpn.cpp --- a/cmmanager/cmmgr/Plugins/cmpluginvpn/src/cmpluginvpn.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/cmmanager/cmmgr/Plugins/cmpluginvpn/src/cmpluginvpn.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -31,7 +31,7 @@ #include // #include #include -#include +#include #include #include #include diff -r c65663728cf1 -r c32fb9f4b91e cmmanager/cmmgr/database/src/cmmanagertableformats.cpp --- a/cmmanager/cmmgr/database/src/cmmanagertableformats.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/cmmanager/cmmgr/database/src/cmmanagertableformats.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -133,7 +133,10 @@ | KCDTIdCellularDataUsageHome ), iCellularDataUsageVisitor( ( aElementId & KCDMaskShowRecordType ) | KCDTIdCellularDataUsageVisitor ) - {}; + { + iCellularDataUsageHome.SetAttributes(ECDProtectedWrite); + iCellularDataUsageVisitor.SetAttributes(ECDProtectedWrite); + }; EXPORT_C TMDBElementId CCDDefConnRecord::TableIdL( CMDBSession& aSession ) diff -r c65663728cf1 -r c32fb9f4b91e cmmanager/gsconnsettingsplugin/data/gsconnsettingspluginrsc.rss --- a/cmmanager/gsconnsettingsplugin/data/gsconnsettingspluginrsc.rss Mon Mar 08 21:43:55 2010 +0000 +++ b/cmmanager/gsconnsettingsplugin/data/gsconnsettingspluginrsc.rss Sun Mar 14 13:11:26 2010 +0000 @@ -323,22 +323,6 @@ //---------------------------------------------------- // -// r_usage_of_new_wlan_setting_page -// Resource for "Join new WLAN networks" setting page. -// -//---------------------------------------------------- -// -RESOURCE AVKON_SETTING_PAGE r_usage_of_wlan_setting_page - { - number = EAknSettingPageNoOrdinalDisplayed; - label = qtn_occ_sett_usage_of_wlan; - softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK; - type = EAknSetListBox; - editor_resource_id = r_setting_listbox; - } - -//---------------------------------------------------- -// // r_usage_of_new_wlan_setting_page_lbx // Resource for "Join new WLAN networks" listbox items // @@ -419,6 +403,10 @@ LBUF { txt = qtn_occ_sett_data_usage_abroad_confirm; + }, + LBUF + { + txt = qtn_occ_sett_data_usage_abroad_disabled; } }; } @@ -483,6 +471,10 @@ LBUF { txt = qtn_occ_sett_data_usage_home_nw_confirm; + }, + LBUF + { + txt = qtn_occ_sett_data_usage_home_nw_disabled; } }; } @@ -520,20 +512,4 @@ // RESOURCE TBUF r_gs_conn_settings_rsk_label_exit { buf = text_softkey_exit; } - -RESOURCE ARRAY r_usage_of_wlan_info_popup_texts - { - items = - { - LBUF - { - txt = qtn_occ_info_popup_wlan_usage_known; - }, - LBUF - { - txt = qtn_occ_info_popup_wlan_usage_manual; - } - }; - } - // End of file diff -r c65663728cf1 -r c32fb9f4b91e cmmanager/gsconnsettingsplugin/inc/gsconnsettingsplugin.h --- a/cmmanager/gsconnsettingsplugin/inc/gsconnsettingsplugin.h Mon Mar 08 21:43:55 2010 +0000 +++ b/cmmanager/gsconnsettingsplugin/inc/gsconnsettingsplugin.h Sun Mar 14 13:11:26 2010 +0000 @@ -20,8 +20,8 @@ #define GSCONNSETTINGSPLUGIN_H // Includes -#include -#include +#include +#include #include "gsconnsettingsmskobserver.h" #include diff -r c65663728cf1 -r c32fb9f4b91e cmmanager/gsconnsettingsplugin/inc/gsconnsettingsplugin.hrh --- a/cmmanager/gsconnsettingsplugin/inc/gsconnsettingsplugin.hrh Mon Mar 08 21:43:55 2010 +0000 +++ b/cmmanager/gsconnsettingsplugin/inc/gsconnsettingsplugin.hrh Sun Mar 14 13:11:26 2010 +0000 @@ -50,7 +50,8 @@ enum { EDataUsageAbroadAutomatic = 0, EDataUsageAbroadConfirm = 1, - EDataUsageAbroadWlanOnly = 2 + EDataUsageAbroadWlanOnly = 2, + EDataUsageAbroadDisabled = 3 }; //Indexes for data usage in home NW values @@ -59,7 +60,8 @@ enum { EDataUsageHomeNwAutomatic = 0, EDataUsageHomeNwConfirm = 1, - EDataUsageHomeNwWlanOnly = 2 + EDataUsageHomeNwWlanOnly = 2, + EDataUsageHomeNwDisabled = 3 }; #endif // GSCONNECTIVITYSETTINGSPLUGIN_HRH diff -r c65663728cf1 -r c32fb9f4b91e cmmanager/gsconnsettingsplugin/inc/gsconnsettingsplugincontainer.h --- a/cmmanager/gsconnsettingsplugin/inc/gsconnsettingsplugincontainer.h Mon Mar 08 21:43:55 2010 +0000 +++ b/cmmanager/gsconnsettingsplugin/inc/gsconnsettingsplugincontainer.h Sun Mar 14 13:11:26 2010 +0000 @@ -21,7 +21,7 @@ // INCLUDES #include "gsconnsettingspluginmodel.h" -#include +#include // CONSTANTS diff -r c65663728cf1 -r c32fb9f4b91e cmmanager/gsconnsettingsplugin/inc/gsconnsettingspluginmodel.h --- a/cmmanager/gsconnsettingsplugin/inc/gsconnsettingspluginmodel.h Mon Mar 08 21:43:55 2010 +0000 +++ b/cmmanager/gsconnsettingsplugin/inc/gsconnsettingspluginmodel.h Sun Mar 14 13:11:26 2010 +0000 @@ -130,6 +130,11 @@ */ TCmGenConnSettings iSettings; + /** + * Flag is set when wlan is supported + */ + TBool iIsWlanSupported; + }; #endif //GSCONNSETTINGSPLUGINMODEL_H diff -r c65663728cf1 -r c32fb9f4b91e cmmanager/gsconnsettingsplugin/loc/gsconnsettingsplugin.loc --- a/cmmanager/gsconnsettingsplugin/loc/gsconnsettingsplugin.loc Mon Mar 08 21:43:55 2010 +0000 +++ b/cmmanager/gsconnsettingsplugin/loc/gsconnsettingsplugin.loc Sun Mar 14 13:11:26 2010 +0000 @@ -82,6 +82,12 @@ //r: 5.2 #define qtn_occ_sett_data_usage_abroad_wlan_only "WLAN only" +//d:Text in radio button list +//l:list_set_graphic_pane_t1 +//w: +//r: 5.2 +#define qtn_occ_sett_data_usage_abroad_disabled "Disabled" + //d:Text of a list item in Connectivity Settings plugin main view's list //d:Item opens "Cellular data usage in home network" radio button setting page @@ -108,6 +114,11 @@ //r: 5.2 #define qtn_occ_sett_data_usage_home_nw_wlan_only "WLAN only" +//d:Text in radio button list +//l:list_set_graphic_pane_t1 +//w: +//r: 5.2 +#define qtn_occ_sett_data_usage_home_nw_disabled "Disabled" //d: Info popup note for "Known" selection of "Join WLAN networks" //l: popup_preview_text_window_t1/opt5 diff -r c65663728cf1 -r c32fb9f4b91e cmmanager/gsconnsettingsplugin/src/gsconnsettingsplugin.cpp --- a/cmmanager/gsconnsettingsplugin/src/gsconnsettingsplugin.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/cmmanager/gsconnsettingsplugin/src/gsconnsettingsplugin.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -28,11 +28,11 @@ #include // Includes from GS framework: -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include // For HlpLauncher #include @@ -115,7 +115,7 @@ FeatureManager::InitializeLibL(); iIsWlanSupported = FeatureManager::FeatureSupported( KFeatureIdProtocolWlan ); // Unload FeatureManager - FeatureManager::UnInitializeLib(); + FeatureManager::UnInitializeLib(); OpenLocalizedResourceFileL( KGSConnSettingsPluginResourceFileName, iResourceLoader ); @@ -456,35 +456,12 @@ // void CGSConnSettingsPlugin::ShowUsageOfWlanSettingPageL() { - - CDesCArrayFlat* items = iCoeEnv->ReadDesC16ArrayResourceL( - R_USAGE_OF_WLAN_SETTING_PAGE_LBX ); - CleanupStack::PushL( items ); - - TInt currentItem = iModel->UsageOfWlan(); - TInt oldItem = currentItem; - - CGSConnSettingsSelectionDlg* dlg = CGSConnSettingsSelectionDlg::NewL( - R_USAGE_OF_WLAN_SETTING_PAGE, - currentItem, - items, - R_USAGE_OF_WLAN_INFO_POPUP_TEXTS ); - - if ( dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ) ) - { - - if( currentItem != oldItem ) - { - iModel->SetUsageOfWlan( currentItem ); - UpdateListBoxL( EGSSettIdUsageOfWlan ); - //Save current settings when the setting is changed - //If function leaves it is trapped and ignored as there is nothing that we can do about it - TRAP_IGNORE(iModel->SaveSettingsL()); - } - } - - CleanupStack::PopAndDestroy( items ); - + TBool currentItem = (TBool)iModel->UsageOfWlan(); + iModel->SetUsageOfWlan( !currentItem ); + UpdateListBoxL( EGSSettIdUsageOfWlan ); + //Save current settings when the setting is changed + //If function leaves it is trapped and ignored as there is nothing that we can do about it + TRAP_IGNORE(iModel->SaveSettingsL()); } // --------------------------------------------------------------------------- @@ -511,6 +488,14 @@ CleanupStack::PushL( items ); TInt currentItem = iModel->DataUsageAbroad(); + + // We may have to do in this way because EDataUsageAbroadDisabled is equal to 3 + // and the actual index number should be 2 in this case + if( !iIsWlanSupported && currentItem == EDataUsageAbroadDisabled ) + { + currentItem --; + } + TInt oldItem = currentItem; CAknSettingPage* dlg = new( ELeave ) CAknRadioButtonSettingPage( @@ -555,6 +540,14 @@ CleanupStack::PushL( items ); TInt currentItem = iModel->DataUsageInHomeNw(); + + // We may have to do in this way because EDataUsageAbroadDisabled is equal to 3 + // and the actual index number should be 2 in this case + if( !iIsWlanSupported && currentItem == EDataUsageAbroadDisabled ) + { + currentItem --; + } + TInt oldItem = currentItem; CAknSettingPage* dlg = new( ELeave ) CAknRadioButtonSettingPage( diff -r c65663728cf1 -r c32fb9f4b91e cmmanager/gsconnsettingsplugin/src/gsconnsettingsplugincontainer.cpp --- a/cmmanager/gsconnsettingsplugin/src/gsconnsettingsplugincontainer.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/cmmanager/gsconnsettingsplugin/src/gsconnsettingsplugincontainer.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -26,8 +26,8 @@ #include #include -#include // for KUidGS -#include +#include // for KUidGS +#include // EXTERNAL DATA STRUCTURES @@ -143,7 +143,9 @@ MGSConnSettingsMskObserver& aMskObserver ) : iMskObserver( aMskObserver ) { + FeatureManager::InitializeLibL(); iIsWlanSupported = FeatureManager::FeatureSupported( KFeatureIdProtocolWlan ); + FeatureManager::UnInitializeLib(); } void CGSConnSettingsPluginContainer::SetPluginArray ( @@ -311,6 +313,13 @@ { TInt currValue = iModel->DataUsageAbroad(); + // We may have to do in this way because EDataUsageAbroadDisabled is equal to 3 + // and the actual index number should be 2 in this case + if( !iIsWlanSupported && currValue == EDataUsageAbroadDisabled ) + { + currValue --; + } + AppendListItemL( Index( EGSSettIdDataUsageAbroad ), iListItems->operator[]( Index( EGSSettIdDataUsageAbroad ) ), ( *iDataUsageAbroadItems )[currValue] ); @@ -326,6 +335,13 @@ { TInt currValue = iModel->DataUsageInHomeNw(); + // We may have to do in this way because EDataUsageAbroadDisabled is equal to 3 + // and the actual index number should be 2 in this case + if( !iIsWlanSupported && currValue == EDataUsageAbroadDisabled ) + { + currValue --; + } + AppendListItemL( Index( EGSSettIdDataUsageHomeNw ), iListItems->operator[]( Index( EGSSettIdDataUsageHomeNw ) ), ( *iDataUsageHomeNwItems )[currValue] ); diff -r c65663728cf1 -r c32fb9f4b91e cmmanager/gsconnsettingsplugin/src/gsconnsettingspluginmodel.cpp --- a/cmmanager/gsconnsettingsplugin/src/gsconnsettingspluginmodel.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/cmmanager/gsconnsettingsplugin/src/gsconnsettingspluginmodel.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -18,6 +18,7 @@ // INCLUDE FILES +#include #include "gsconnsettingsplugincontainer.h" #include "gsconnsettingspluginmodel.h" #include "cmmanager.h" @@ -87,6 +88,9 @@ // void CGSConnSettingsPluginModel::ConstructL() { + FeatureManager::InitializeLibL(); + iIsWlanSupported = FeatureManager::FeatureSupported( KFeatureIdProtocolWlan ); + FeatureManager::UnInitializeLib(); } @@ -189,7 +193,14 @@ break; case ECmCellularDataUsageDisabled: - mappedValue = EDataUsageAbroadWlanOnly; // Wlan only + if( iIsWlanSupported ) + { + mappedValue = EDataUsageAbroadWlanOnly; // Wlan only + } + else + { + mappedValue = EDataUsageAbroadDisabled; // Disabled when nowlan + } break; default: @@ -220,7 +231,14 @@ break; case ECmCellularDataUsageDisabled: - mappedValue = EDataUsageHomeNwWlanOnly; // Wlan only + if( iIsWlanSupported ) + { + mappedValue = EDataUsageHomeNwWlanOnly; // Wlan only + } + else + { + mappedValue = EDataUsageHomeNwDisabled; // Disabled when nowlan + } break; default: @@ -271,6 +289,7 @@ break; case EDataUsageAbroadWlanOnly: //Wlan only + case EDataUsageAbroadDisabled: iSettings.iCellularDataUsageVisitor = ECmCellularDataUsageDisabled; break; @@ -298,6 +317,7 @@ break; case EDataUsageHomeNwWlanOnly: //Wlan only + case EDataUsageHomeNwDisabled: iSettings.iCellularDataUsageHome = ECmCellularDataUsageDisabled; break; diff -r c65663728cf1 -r c32fb9f4b91e cmmanager/gsconnsettingsplugin/traces/OstTraceDefinitions.h --- a/cmmanager/gsconnsettingsplugin/traces/OstTraceDefinitions.h Mon Mar 08 21:43:55 2010 +0000 +++ b/cmmanager/gsconnsettingsplugin/traces/OstTraceDefinitions.h Sun Mar 14 13:11:26 2010 +0000 @@ -1,4 +1,4 @@ #ifndef __OSTTRACEDEFINITIONS_H__ #define __OSTTRACEDEFINITIONS_H__ -#include +#include #endif diff -r c65663728cf1 -r c32fb9f4b91e connectionmonitoring/connectionmonitorplugin/inc/connectionmonitorplugin.h --- a/connectionmonitoring/connectionmonitorplugin/inc/connectionmonitorplugin.h Mon Mar 08 21:43:55 2010 +0000 +++ b/connectionmonitoring/connectionmonitorplugin/inc/connectionmonitorplugin.h Sun Mar 14 13:11:26 2010 +0000 @@ -21,7 +21,7 @@ // User includes // System includes -#include +#include #include #include #include diff -r c65663728cf1 -r c32fb9f4b91e connectionmonitoring/connectionmonitorplugin/src/connectionmonitorplugin.cpp --- a/connectionmonitoring/connectionmonitorplugin/src/connectionmonitorplugin.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/connectionmonitoring/connectionmonitorplugin/src/connectionmonitorplugin.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -18,12 +18,12 @@ // User includes #include "connectionmonitorplugin.h" -#include -#include +#include +#include #include // GUI Resource #include -#include -#include +#include +#include // System includes #include diff -r c65663728cf1 -r c32fb9f4b91e connectionmonitoring/connectionmonitorui/inc/ConnectionMonitorUiView.h --- a/connectionmonitoring/connectionmonitorui/inc/ConnectionMonitorUiView.h Mon Mar 08 21:43:55 2010 +0000 +++ b/connectionmonitoring/connectionmonitorui/inc/ConnectionMonitorUiView.h Sun Mar 14 13:11:26 2010 +0000 @@ -90,7 +90,13 @@ * Observe the connection stat and set the right Soft Keys. */ void ConnectionKeyObserver() const; - + + /** + * Workaround for Avkon event sequence problem, occuring when + * connection list has been added elements. + */ + void HandleItemAdditionL(); + protected: /** * from MEikListBoxObserver diff -r c65663728cf1 -r c32fb9f4b91e connectionmonitoring/connectionmonitorui/src/ConnectionInfoBase.cpp --- a/connectionmonitoring/connectionmonitorui/src/ConnectionInfoBase.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/connectionmonitoring/connectionmonitorui/src/ConnectionInfoBase.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -19,7 +19,7 @@ // INCLUDE FILES #include -#include +#include #include #include #include diff -r c65663728cf1 -r c32fb9f4b91e connectionmonitoring/connectionmonitorui/src/ConnectionMonitorUiAppUi.cpp --- a/connectionmonitoring/connectionmonitorui/src/ConnectionMonitorUiAppUi.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/connectionmonitoring/connectionmonitorui/src/ConnectionMonitorUiAppUi.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include "ConnectionMonitorUi.hrh" #include "ConnectionMonitorUiAppUi.h" @@ -354,8 +354,10 @@ break; } } - - if ( newConn ) + + index = iConnectionArray->GetArrayIndex( connectionId ); + + if ( newConn || ( index < 0 ) ) { if ( connectionId > 0) { @@ -385,6 +387,11 @@ CleanupStack::PushL( connectionInfo ); iConnectionArray->AppendL( connectionInfo ); CleanupStack::Pop( connectionInfo ); + + // Avkon: This is needed due to events' timing issues: + CConnectionMonitorUiView* view = + ( CConnectionMonitorUiView* )iView; + view->HandleItemAdditionL(); } } diff -r c65663728cf1 -r c32fb9f4b91e connectionmonitoring/connectionmonitorui/src/ConnectionMonitorUiView.cpp --- a/connectionmonitoring/connectionmonitorui/src/ConnectionMonitorUiView.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/connectionmonitoring/connectionmonitorui/src/ConnectionMonitorUiView.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -416,6 +416,15 @@ } } +// --------------------------------------------------------- +// CConnectionMonitorUiView::HandleItemAdditionL +// --------------------------------------------------------- +// +void CConnectionMonitorUiView::HandleItemAdditionL() + { + iContainer->ListBox()->HandleItemAdditionL(); + } + // End of File diff -r c65663728cf1 -r c32fb9f4b91e connectionmonitoring/connmon/connectionmonitor/src/ConnMonIAP.cpp --- a/connectionmonitoring/connmon/connectionmonitor/src/ConnMonIAP.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/connectionmonitoring/connmon/connectionmonitor/src/ConnMonIAP.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -33,6 +33,7 @@ #include "connmontelnoti.h" #include "ConnMonBearerNotifier.h" #include "log.h" +#include "cellulardatausagekeyupdater.h" // ============================ MEMBER FUNCTIONS =============================== @@ -2007,8 +2008,15 @@ iNetwRegistrationNotifier = CNetwRegistrationNotifier::NewL( iServer, iMobilePhone ); } if ( !iNetwRegistrationNotifier->IsActive() ) - { + { iNetwRegistrationNotifier->Receive(); // (re)start listening + + // We might have missed the network registration notification before + // we started listening for notifications here. Update the + // network registration information. + TInt registration( ENetworkRegistrationExtNotAvailable ); + User::LeaveIfError( GetNetworkRegistration_v2( registration ) ); + iServer->CellularDataUsageKeyUpdater()->UpdateKeyL( registration ); } // Bearer change (GPRS/Edge GPRS) status events diff -r c65663728cf1 -r c32fb9f4b91e connectionmonitoring/connmon/connectionmonitor/src/cellulardatausagekeyupdater.cpp --- a/connectionmonitoring/connmon/connectionmonitor/src/cellulardatausagekeyupdater.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/connectionmonitoring/connmon/connectionmonitor/src/cellulardatausagekeyupdater.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -29,7 +29,7 @@ #include "cellulardatausagekeyupdater.h" #include "ConnMonServ.h" #include "ConnMonAvailabilityManager.h" -#include "ConnMonIap.h" +#include "ConnMonIAP.h" #include "ConnMonDef.h" #include "log.h" @@ -86,12 +86,17 @@ TCmGenConnSettings occSettings = ReadGenConnSettingsL(); - TInt value( occSettings.iCellularDataUsageHome ); + TInt value( ECmCellularDataUsageDisabled ); if ( aRegistration == ENetworkRegistrationExtRoamingInternational ) { value = occSettings.iCellularDataUsageVisitor; } + else if ( aRegistration == ENetworkRegistrationExtHomeNetwork || + aRegistration == ENetworkRegistrationExtRoamingNational ) + { + value = occSettings.iCellularDataUsageHome; + } CRepository* cmRepository = NULL; @@ -106,10 +111,12 @@ { cmRepository->Set( KCurrentCellularDataUsage, value ); LOGIT1("KCurrentCellularDataUsage set to %d", value) - - LOGIT("CCellularDataUsageKeyUpdater triggered HandleAvailabilityChange()") - iServer->AvailabilityManager()->HandleAvailabilityChange(); - } + } + else + { + LOGIT1("KCurrentCellularDataUsage already up-to-date %d", previous) + } + delete cmRepository; } else @@ -219,6 +226,9 @@ iErrorCounter = 0; TRAPD( leaveCode, UpdateKeyL() ) + + LOGIT("CCellularDataUsageKeyUpdater triggered HandleAvailabilityChange()") + iServer->AvailabilityManager()->HandleAvailabilityChange(); if ( leaveCode ) { diff -r c65663728cf1 -r c32fb9f4b91e connectionmonitoring/connmon/dataconnectionlogger/src/saeobserver.cpp --- a/connectionmonitoring/connmon/dataconnectionlogger/src/saeobserver.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/connectionmonitoring/connmon/dataconnectionlogger/src/saeobserver.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -15,7 +15,7 @@ * */ -#include +#include #include #include diff -r c65663728cf1 -r c32fb9f4b91e connectionutilities/ConnectionDialogs/ConnectionUiUtilities/BWinsCw/ConnectionUiUtilities_PROTU.def --- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/BWinsCw/ConnectionUiUtilities_PROTU.def Mon Mar 08 21:43:55 2010 +0000 +++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/BWinsCw/ConnectionUiUtilities_PROTU.def Sun Mar 14 13:11:26 2010 +0000 @@ -51,6 +51,6 @@ ?EasyWapiDlg@CConnectionUiUtilities@@QAEHPAVTDes16@@@Z @ 50 NONAME ; int CConnectionUiUtilities::EasyWapiDlg(class TDes16 *) ?NoWLANNetworksAvailableNote@CConnectionUiUtilities@@QAEXXZ @ 51 NONAME ; void CConnectionUiUtilities::NoWLANNetworksAvailableNote(void) ?ConfirmMethodUsageQuery@CConnectionUiUtilities@@QAEXAAW4TMsgQueryLinkedResults@@HAAVTRequestStatus@@@Z @ 52 NONAME ; void CConnectionUiUtilities::ConfirmMethodUsageQuery(enum TMsgQueryLinkedResults &, int, class TRequestStatus &) - ?ConnectingViaDiscreetPopup@CConnectionUiUtilities@@QAEXABKH@Z @ 53 NONAME ; void CConnectionUiUtilities::ConnectingViaDiscreetPopup(unsigned long const &, int) + ?ConnectingViaDiscreetPopup@CConnectionUiUtilities@@QAEXABK@Z @ 53 NONAME ; void CConnectionUiUtilities::ConnectingViaDiscreetPopup(unsigned long const &) ?ConnectionErrorDiscreetPopup@CConnectionUiUtilities@@QAEXABH@Z @ 54 NONAME ; void CConnectionUiUtilities::ConnectionErrorDiscreetPopup(int const &) diff -r c65663728cf1 -r c32fb9f4b91e connectionutilities/ConnectionDialogs/ConnectionUiUtilities/EABI/ConnectionUiUtilities_PROTU.def --- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/EABI/ConnectionUiUtilities_PROTU.def Mon Mar 08 21:43:55 2010 +0000 +++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/EABI/ConnectionUiUtilities_PROTU.def Sun Mar 14 13:11:26 2010 +0000 @@ -52,7 +52,7 @@ _ZN22CConnectionUiUtilities27CancelWlanPowerSaveTestNoteEv @ 51 NONAME _ZN22CConnectionUiUtilities11EasyWapiDlgEP6TDes16 @ 52 NONAME _ZN22CConnectionUiUtilities23ConfirmMethodUsageQueryER22TMsgQueryLinkedResultsiR14TRequestStatus @ 53 NONAME - _ZN22CConnectionUiUtilities26ConnectingViaDiscreetPopupERKmi @ 54 NONAME + _ZN22CConnectionUiUtilities26ConnectingViaDiscreetPopupERKm @ 54 NONAME _ZN22CConnectionUiUtilities27NoWLANNetworksAvailableNoteEv @ 55 NONAME _ZN22CConnectionUiUtilities28ConnectionErrorDiscreetPopupERKi @ 56 NONAME diff -r c65663728cf1 -r c32fb9f4b91e connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/ConfirmationQuery.h --- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/ConfirmationQuery.h Mon Mar 08 21:43:55 2010 +0000 +++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/ConfirmationQuery.h Sun Mar 14 13:11:26 2010 +0000 @@ -30,7 +30,7 @@ // CLASS DECLARATIONS /** - * Class implements a query dialog. + * Class implements a query dialog in home network. */ NONSHARABLE_CLASS( CConfirmationQuery ) : public CAknListQueryDialog, public MExpiryTimerCallback { @@ -105,6 +105,72 @@ }; +/** + * Class implements a query dialog in visitor network. + */ +NONSHARABLE_CLASS( CConfirmationQueryVisitor ) : public CAknMessageQueryDialog, public MExpiryTimerCallback + { + public: + /** + * Constructor the CConfirmationQuery class + * @param aNotif notifier pointer + * @param aNameOfConnMethod + * @param aUIId + * @return - + */ + CConfirmationQueryVisitor( CConfirmationQueryNotif* aNotif ); + + /** + * Exit function the CConfirmationQuery + * @param aButtonId + * @return TBool exit or no + */ + virtual TBool OkToExitL( TInt aButtonId ); + + /** + * Dialog expiration timeout callback + */ + void HandleTimedOut(); + + /** + * Destructor + */ + virtual ~CConfirmationQueryVisitor(); + + /** + * Tries to exit the dialog when the specified button is pressed, if this + * button should exit the dialog. + * + * See @c OkToExitL() to determine which buttons can exit the dialog. + * + * This will fail if user exit is prevented by the + * @c EEikDialogFlagNoUserExit flag. If the @c EEikDialogFlagNotifyEsc flag + * is not set and the dialog has been cancelled it immediately deletes + * itself. + * + * @param aButtonId The id of the pressed button. + */ + void TryExitL( TInt aButtonId ); + + TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, + TEventCode aType); + + + private: + /** + * PreLayoutDynInitL + * @param - + */ + virtual void PreLayoutDynInitL(); + + private: + CConfirmationQueryNotif* iNotif; // Pointer to the Notifier, not owned + + // Pointer for dialog expiration timer + CExpiryTimer* iExpiryTimer; + }; + + #endif // __CONFIRMATION_QUERY_H__ // End of File diff -r c65663728cf1 -r c32fb9f4b91e connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/ConfirmationQueryNotif.h --- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/ConfirmationQueryNotif.h Mon Mar 08 21:43:55 2010 +0000 +++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/ConfirmationQueryNotif.h Sun Mar 14 13:11:26 2010 +0000 @@ -30,6 +30,7 @@ // FORWARD DECLARATIONS class CConfirmationQuery; +class CConfirmationQueryVisitor; class CRoamingInfo; /** @@ -115,10 +116,18 @@ */ static TInt LaunchDialogL( TAny* aObject ); + /** + * Callback is called to launch dialog asynchronously + * @param aObject Pointer to notifier object. + * return Error code + */ + static TInt LaunchDialogVisitorL( TAny* aObject ); + private: TBool iTryNextBest; TUint32 iConnMethod; - CConfirmationQuery* iDialog; // Pointer to the dialog + CConfirmationQuery* iDialog; // Home network dialog + CConfirmationQueryVisitor* iDialogVisitor; // Visitor network dialog TBool iIsVisitorNetwork; TMsgQueryLinkedResults iChoice; TConnUiUiDestConnMethodNoteId iNoteInfo; diff -r c65663728cf1 -r c32fb9f4b91e connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/connectingviadiscreetpopup.h --- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/connectingviadiscreetpopup.h Mon Mar 08 21:43:55 2010 +0000 +++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/connectingviadiscreetpopup.h Sun Mar 14 13:11:26 2010 +0000 @@ -56,7 +56,7 @@ /** * StartL Function for making the initial request */ - void StartL(TUint32 aIapId, TBool aConnectionAlreadyActive); + void StartL(TUint32 aIapId ); private: /** diff -r c65663728cf1 -r c32fb9f4b91e connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ConfirmationQuery.cpp --- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ConfirmationQuery.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ConfirmationQuery.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -39,6 +39,7 @@ // // --------------------------------------------------------- // CConfirmationQuery::CConfirmationQuery +// HOME NETWORK // --------------------------------------------------------- // CConfirmationQuery::CConfirmationQuery( CConfirmationQueryNotif* aNotif ) @@ -47,8 +48,7 @@ iButtonGroupPreviouslyChanged( EFalse ) { } - - + // --------------------------------------------------------- // CConfirmationQuery::~CConfirmationQuery // --------------------------------------------------------- @@ -60,8 +60,6 @@ delete iExpiryTimer; } - - // --------------------------------------------------------- // CConfirmationQuery::OkToExitL // --------------------------------------------------------- @@ -96,7 +94,6 @@ return result; } - // --------------------------------------------------------- // CConfirmationQuery::PreLayoutDynInitL() // --------------------------------------------------------- @@ -112,7 +109,6 @@ iExpiryTimer->Start(); } - // --------------------------------------------------------- // CConfirmationQuery::TryExitL() // --------------------------------------------------------- @@ -159,4 +155,117 @@ } +// ================= MEMBER FUNCTIONS ======================= +// +// --------------------------------------------------------- +// CConfirmationQueryVisitor::CConfirmationQueryVisitor +// VISITOR NETWORK +// --------------------------------------------------------- +// +CConfirmationQueryVisitor::CConfirmationQueryVisitor( + CConfirmationQueryNotif* aNotif ) + : + iNotif( aNotif ) + { + } + +// --------------------------------------------------------- +// CConfirmationQueryVisitor::~CConfirmationQueryVisitor +// --------------------------------------------------------- +// +CConfirmationQueryVisitor::~CConfirmationQueryVisitor() + { + STATIC_CAST( CEikServAppUi*, + CCoeEnv::Static()->AppUi() )->SuppressAppSwitching( EFalse ); + delete iExpiryTimer; + } + +// --------------------------------------------------------- +// CConfirmationQueryVisitor::OkToExitL +// --------------------------------------------------------- +// +TBool CConfirmationQueryVisitor::OkToExitL( TInt aButtonId ) + { + CLOG_ENTERFN( "CConfirmationQueryVisitor::OkToExitL" ); + TBool result( EFalse ); + TInt status = KErrCancel; + + if ( aButtonId == EAknSoftkeySelect || + aButtonId == EAknSoftkeyDone || aButtonId == EAknSoftkeyOk ) + { + iNotif->SetSelectedChoiceL( EMsgQueryThisTime ); + result = ETrue; + status = KErrNone; + } + else if ( aButtonId == EAknSoftkeyCancel ) + { + status = KErrCancel; + result = ETrue; + } + + if ( result ) + { + CLOG_WRITEF( _L( "aButtonId = %d" ), aButtonId ); + if ( iNotif ) + { + iNotif->CompleteL( status ); + } + } + + CLOG_LEAVEFN( "CConfirmationQueryVisitor::OkToExitL" ); + + return result; + } + +// --------------------------------------------------------- +// CConfirmationQueryVisitor::PreLayoutDynInitL() +// --------------------------------------------------------- +// +void CConfirmationQueryVisitor::PreLayoutDynInitL() + { + CAknMessageQueryDialog::PreLayoutDynInitL(); + + STATIC_CAST( CEikServAppUi*, + CCoeEnv::Static()->AppUi() )->SuppressAppSwitching( ETrue ); + + iExpiryTimer = CExpiryTimer::NewL( *this ); + iExpiryTimer->Start(); + } + +// --------------------------------------------------------- +// CConfirmationQueryVisitor::TryExitL() +// --------------------------------------------------------- +// +void CConfirmationQueryVisitor::TryExitL( TInt aButtonId ) + { + CLOG_ENTERFN( "CConfirmationQueryVisitor::TryExitL" ); + CAknMessageQueryDialog::TryExitL( aButtonId ); + CLOG_LEAVEFN( "CConfirmationQueryVisitor::TryExitL" ); + } + +// --------------------------------------------------------- +// CConfirmationQueryVisitor::OfferKeyEventL +// --------------------------------------------------------- +// +TKeyResponse CConfirmationQueryVisitor::OfferKeyEventL( const TKeyEvent& aKeyEvent, + TEventCode aType) + { + if( aType == EEventKey && aKeyEvent.iCode == EKeyPhoneSend ) + { + // Let's not obscure the Dialer in the background + if ( iExpiryTimer ) + { + iExpiryTimer->Cancel(); + iExpiryTimer->StartShort(); + } + } + + return CAknMessageQueryDialog::OfferKeyEventL( aKeyEvent,aType ); + } + +void CConfirmationQueryVisitor::HandleTimedOut() + { + TRAP_IGNORE( TryExitL(EAknSoftkeyCancel) ); + } + // End of File diff -r c65663728cf1 -r c32fb9f4b91e connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ConfirmationQueryNotif.cpp --- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ConfirmationQueryNotif.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ConfirmationQueryNotif.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -32,7 +32,7 @@ #include #include #include - +#include using namespace CMManager; @@ -109,6 +109,24 @@ } } + // Check if emergency call is ongoing. If it is then do not display the dialog. + TInt err( KErrNone ); + TInt state( 0 ); + + err = RProperty::Get( + KPSUidCtsyEmergencyCallInfo, + KCTSYEmergencyCallInfo, + state ); + + if ( err == KErrNone && state ) + { + // Emergency call is active. Cancel connection. + CLOG_WRITE( "CConfirmationQueryNotif::StartL: Emergency call is active!" ); + aMessage.WriteL( aReplySlot, TPckg( EMsgQueryCancelled ) ); + aMessage.Complete( KErrNone ); + return; + } + iChoice = EMsgQueryCancelled; TPckgBuf input; input.Copy( aBuffer ); @@ -117,14 +135,24 @@ iReplySlot = aReplySlot; iMessage = aMessage; iCancelled = EFalse; - - TCallBack cb( LaunchDialogL, this ); + + if ( iLaunchDialogAsync ) + { + delete iLaunchDialogAsync; + iLaunchDialogAsync = NULL; + } - if ( !iLaunchDialogAsync ) + if ( iNoteInfo.iNoteId == EConfirmMethodUsageQueryInHomeNetwork ) { + TCallBack cb( LaunchDialogL, this ); iLaunchDialogAsync = new( ELeave ) CAsyncCallBack( cb, CActive::EPriorityHigh ); } - + else + { + TCallBack cb( LaunchDialogVisitorL, this ); + iLaunchDialogAsync = new( ELeave ) CAsyncCallBack( cb, CActive::EPriorityHigh ); + } + iLaunchDialogAsync->CallBack(); } @@ -144,8 +172,17 @@ iMessage.Complete( KErrCancel ); } - delete iDialog; - iDialog = NULL; + if ( iDialog ) + { + delete iDialog; + iDialog = NULL; + } + + if ( iDialogVisitor ) + { + delete iDialog; + iDialog = NULL; + } } CLOG_LEAVEFN( "CConfirmationQueryNotif::Cancel" ); @@ -210,27 +247,14 @@ automatic = StringLoader::LoadLC( R_QTN_OCC_LIST_CS_DATA_HOME_NW_AUTOMATIC ); thisTime = StringLoader::LoadLC( R_QTN_OCC_LIST_CS_DATA_HOME_NW_THIS_TIME ); - if ( myself->iNoteInfo.iNoteId == EConfirmMethodUsageQueryInHomeNetwork ) - { - heading = StringLoader::LoadLC( R_QTN_OCC_PRMPT_CS_DATA_HOME_NW ); - messageBase = StringLoader::LoadLC( R_QTN_OCC_DETAIL_CS_DATA_HOME_NW ); - // the order of the query options depends on the location - choices.Append(EMsgQueryAutomatically); - choices.Append(EMsgQueryThisTime); - array->AppendL( *automatic ); - array->AppendL( *thisTime ); - } - else - { - heading = StringLoader::LoadLC( R_QTN_OCC_PRMPT_CS_DATA_FOREIGN_NW ); - messageBase = StringLoader::LoadLC( R_QTN_OCC_DETAIL_CS_DATA_FOREIGN_NW ); - // the order of the query options depends on the location - choices.Append(EMsgQueryThisTime); - choices.Append(EMsgQueryAutomatically); - array->AppendL( *thisTime ); - array->AppendL( *automatic ); - } - + heading = StringLoader::LoadLC( R_QTN_OCC_PRMPT_CS_DATA_HOME_NW ); + messageBase = StringLoader::LoadLC( R_QTN_OCC_DETAIL_CS_DATA_HOME_NW ); + // the order of the query options depends on the location + choices.Append(EMsgQueryAutomatically); + choices.Append(EMsgQueryThisTime); + array->AppendL( *automatic ); + array->AppendL( *thisTime ); + // Set the dialog heading and message text myself->iDialog->Heading()->SetTextL(*heading); myself->iDialog->MessageBox()->SetMessageTextL(messageBase); @@ -253,4 +277,50 @@ return 0; } +// --------------------------------------------------------- +// TInt CConfirmationQueryNotif::LaunchDialogVisitorL() +// --------------------------------------------------------- +// +TInt CConfirmationQueryNotif::LaunchDialogVisitorL( TAny* aObject ) + { + CLOG_ENTERFN( "CCConfirmationQueryNotif::LaunchDialogVisitorL" ); + CConfirmationQueryNotif* myself = + static_cast( aObject ); + + myself->iDialogVisitor = new ( ELeave ) CConfirmationQueryVisitor( myself ); + myself->iDialogVisitor->PrepareLC( R_VISITOR_QUERY ); + + HBufC* heading = NULL; + HBufC* message = NULL; + TInt resourceId = R_QTN_OCC_DETAIL_CS_DATA_FOREIGN_NW; + heading = StringLoader::LoadLC( + R_QTN_OCC_PRMPT_CS_DATA_FOREIGN_NW ); + + CDesCArrayFlat* strings = new( ELeave ) CDesCArrayFlat( 2 ); + CleanupStack::PushL( strings ); + + HBufC* messageBase = StringLoader::LoadL( resourceId, *strings ); + CleanupStack::PopAndDestroy( strings ); + + CleanupStack::PushL( messageBase ); + TInt lenMsg = messageBase->Des().Length(); + + message = HBufC::NewL( lenMsg ); + TPtr messagePtr = message->Des(); + messagePtr.Append( messageBase->Des() ); + + CleanupStack::PopAndDestroy( messageBase ); + + CleanupStack::PushL( message ); + myself->iDialogVisitor->SetMessageTextL( *message ); + CleanupStack::PopAndDestroy( message ); + + myself->iDialogVisitor->QueryHeading()->SetTextL( *heading ); + CleanupStack::PopAndDestroy( heading ); + + myself->iDialogVisitor->RunLD(); + CLOG_LEAVEFN( "CConfirmationQueryNotif::LaunchDialogVisitorL" ); + return 0; + } + // End of File diff -r c65663728cf1 -r c32fb9f4b91e connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/connectingviadiscreetpopup.cpp --- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/connectingviadiscreetpopup.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/connectingviadiscreetpopup.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -122,19 +122,14 @@ // CConnectingViaDiscreetPopup::StartL // --------------------------------------------------------- // -void CConnectingViaDiscreetPopup::StartL(TUint32 aIapId, - TBool aConnectionAlreadyActive) +void CConnectingViaDiscreetPopup::StartL( TUint32 aIapId ) { Cancel(); // Cancel any request, just to be sure iBearerType = 0; delete iConnectionName; iConnectionName = NULL; - - if (!aConnectionAlreadyActive) - { - iPopupFlags = KAknDiscreetPopupDurationLong; - } - + iPopupFlags = KAknDiscreetPopupDurationLong; + RCmConnectionMethod plugin; CleanupClosePushL(plugin); if (aIapId) diff -r c65663728cf1 -r c32fb9f4b91e connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/connectingviadiscreetpopupnotif.cpp --- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/connectingviadiscreetpopupnotif.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/connectingviadiscreetpopupnotif.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -60,7 +60,7 @@ TPckgBuf data; data.Copy(aBuffer); - iActiveNote->StartL( data().iIapId, data().iConnectionAlreadyActive ); + iActiveNote->StartL( data().iIapId ); iCancelled = EFalse; } diff -r c65663728cf1 -r c32fb9f4b91e connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/connectionerrordiscreetpopup.cpp --- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/connectionerrordiscreetpopup.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/connectionerrordiscreetpopup.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -299,6 +299,8 @@ // Group 8 case KErrPermissionDenied: + icon = EIconNone; // Permission denied may come with any bearer. + // Fall through case KErrWlanPasswordExpired: case KErrWlanNoDialinPermissions: case KErrWlanAccountDisabled: diff -r c65663728cf1 -r c32fb9f4b91e connectionutilities/ConnectionDialogs/ConnectionUiUtilities/data/ConnUiUtilsNotif.rss --- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/data/ConnUiUtilsNotif.rss Mon Mar 08 21:43:55 2010 +0000 +++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/data/ConnUiUtilsNotif.rss Sun Mar 14 13:11:26 2010 +0000 @@ -500,4 +500,44 @@ buf = qtn_occ_list_cs_data_home_nw_this_time; } +RESOURCE CBA r_softkeys_connect_cancel__connect + { + buttons = + { + CBA_BUTTON {id=EAknSoftkeySelect; txt=qtn_netw_conset_softkey_connect; }, + CBA_BUTTON {id=EAknSoftkeyCancel; txt=text_softkey_cancel; }, + CBA_BUTTON {id=EAknSoftkeySelect; txt=qtn_netw_conset_softkey_connect; } + }; + } + +RESOURCE DIALOG r_visitor_query + { + flags = EEikDialogFlagNoDrag | EEikDialogFlagNoTitleBar | + EEikDialogFlagCbaButtons | EEikDialogFlagNoBorder | + EEikDialogFlagNoShadow | EEikDialogFlagNotifyEsc; + buttons = r_softkeys_connect_cancel__connect; + items = + { + DLG_LINE + { + type = EAknCtPopupHeadingPane; + id = EAknMessageQueryHeaderId; + control = AVKON_HEADING + { + label = ""; + headinglayout = R_AVKON_WML_SIGN_QUERY_HEADING_PANE; + }; + }, + + DLG_LINE + { + type = EAknCtMessageQuery; + id = EAknMessageQueryContentId; + control = AVKON_MESSAGE_QUERY + { + }; + } + }; + } + // End of File diff -r c65663728cf1 -r c32fb9f4b91e connectionutilities/ConnectionDialogs/ConnectionUiUtilities/inc/ConnectionUiUtilitiesCommon.h --- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/inc/ConnectionUiUtilitiesCommon.h Mon Mar 08 21:43:55 2010 +0000 +++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/inc/ConnectionUiUtilitiesCommon.h Sun Mar 14 13:11:26 2010 +0000 @@ -87,7 +87,6 @@ { public: TUint32 iIapId; - TBool iConnectionAlreadyActive; }; #endif // CONNECTIONUIUTILITIES_COMMON_H diff -r c65663728cf1 -r c32fb9f4b91e connectionutilities/ConnectionDialogs/ConnectionUiUtilities/inc/ConnectionUiUtilitiesImpl.h --- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/inc/ConnectionUiUtilitiesImpl.h Mon Mar 08 21:43:55 2010 +0000 +++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/inc/ConnectionUiUtilitiesImpl.h Sun Mar 14 13:11:26 2010 +0000 @@ -487,8 +487,7 @@ * Discreet popup. Shows "Connecting via %U" discreet popup * @param aIapId IAP id of the access point. */ - void ConnectingViaDiscreetPopup( const TUint32& aIapId, - TBool aConnectionAlreadyActive ); + void ConnectingViaDiscreetPopup( const TUint32& aIapId ); /** diff -r c65663728cf1 -r c32fb9f4b91e connectionutilities/ConnectionDialogs/ConnectionUiUtilities/loc/connectionuiutilities.loc --- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/loc/connectionuiutilities.loc Mon Mar 08 21:43:55 2010 +0000 +++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/loc/connectionuiutilities.loc Sun Mar 14 13:11:26 2010 +0000 @@ -312,7 +312,7 @@ //w: //r:5.2 // -#define qtn_occ_detail_cs_data_foreign_nw "Connect to Internet in this country using cellular data? Data costs may increase considerably." +#define qtn_occ_detail_cs_data_foreign_nw "Connect to Internet using cellular data? Phone is outside of home network, and data costs may increase considerably.\nTo allow connecting automatically, adjust the Connection settings." //d:Option for connection query in foreign network. //l:list_single_pane_t1_cp2 @@ -437,4 +437,11 @@ // #define qtn_occ_config_failed_discreet_popup_text1 "Configuration failed" +//d:Softkey used to confirm the query +//l:control_pane_t1/opt7 +//w: +//r:5.2 +// +#define qtn_netw_conset_softkey_connect "Connect" + // End of File diff -r c65663728cf1 -r c32fb9f4b91e connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/ConnectionUiUtilities.cpp --- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/ConnectionUiUtilities.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/ConnectionUiUtilities.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -608,10 +608,9 @@ // --------------------------------------------------------- // EXPORT_C void CConnectionUiUtilities::ConnectingViaDiscreetPopup( - const TUint32& aIapId, - TBool aConnectionAlreadyActive ) + const TUint32& aIapId ) { - iImpl->ConnectingViaDiscreetPopup( aIapId, aConnectionAlreadyActive ); + iImpl->ConnectingViaDiscreetPopup( aIapId ); } // --------------------------------------------------------- diff -r c65663728cf1 -r c32fb9f4b91e connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/ConnectionUiUtilitiesImpl.cpp --- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/ConnectionUiUtilitiesImpl.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/ConnectionUiUtilitiesImpl.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -1122,10 +1122,9 @@ // CConnectionUiUtilitiesImpl::ConnectingViaDiscreetPopup // --------------------------------------------------------- // -void CConnectionUiUtilitiesImpl::ConnectingViaDiscreetPopup( const TUint32& aIapId, TBool aConnectionAlreadyActive ) +void CConnectionUiUtilitiesImpl::ConnectingViaDiscreetPopup( const TUint32& aIapId ) { iConnInfo().iIapId = aIapId; - iConnInfo().iConnectionAlreadyActive = aConnectionAlreadyActive; if ( !iActiveWrapper[ EConnectingViaDiscreetPopup ] ) { diff -r c65663728cf1 -r c32fb9f4b91e connectionutilities/ConnectionDialogs/cconndlg/src/SelectConnectionDialog.cpp --- a/connectionutilities/ConnectionDialogs/cconndlg/src/SelectConnectionDialog.cpp Mon Mar 08 21:43:55 2010 +0000 +++ b/connectionutilities/ConnectionDialogs/cconndlg/src/SelectConnectionDialog.cpp Sun Mar 14 13:11:26 2010 +0000 @@ -135,6 +135,15 @@ STATIC_CAST( CEikServAppUi*, CCoeEnv::Static()->AppUi() )->SuppressAppSwitching( ETrue ); + + // Hide Options button if single-click enabled + // + if ( static_cast< CAknAppUi* >( iCoeEnv->AppUi() )->IsSingleClickCompatible() ) + { + CEikButtonGroupContainer* cba = CEikButtonGroupContainer::Current(); + cba->MakeCommandVisible( EAknSoftkeyOptions, EFalse ); + cba->DrawDeferred(); + } iExpiryTimer = CExpiryTimer::NewL( *this ); iExpiryTimer->Start(); @@ -177,17 +186,7 @@ } else if ( aButtonId == EAknSoftkeyOptions ) { - if ( !( ListBox()->View()->ItemDrawer()->Flags() - & CListItemDrawer::EDisableHighlight ) ) - { - DisplayMenuL(); - } - else - { - ListBox()->View()->ItemDrawer()->ClearFlags( - CListItemDrawer::EDisableHighlight ); - DrawNow(); - } + DisplayMenuL(); } if ( result ) @@ -447,6 +446,26 @@ cba.DrawDeferred(); } + // Show Options button if some listbox row gets highlighted + // + if ( static_cast< CAknAppUi* >( iCoeEnv->AppUi() )->IsSingleClickCompatible() ) + { + CEikButtonGroupContainer* cba = CEikButtonGroupContainer::Current(); + + if ( ( ListBox()->View()->ItemDrawer()->Flags() + & CListItemDrawer::ESingleClickDisabledHighlight ) + ) + { + cba->MakeCommandVisible( EAknSoftkeyOptions, EFalse ); + } + else + { + cba->MakeCommandVisible( EAknSoftkeyOptions, ETrue ); + } + + cba->DrawDeferred(); + } + CLOG_LEAVEFN( "CSelectConnectionDialog::OfferKeyEventL" ); return result; diff -r c65663728cf1 -r c32fb9f4b91e data/cccccc00_emulator.cre Binary file data/cccccc00_emulator.cre has changed diff -r c65663728cf1 -r c32fb9f4b91e ipcm_plat/bearer_settings_plugin_api/inc/cmpbasesettingsdlg.h --- a/ipcm_plat/bearer_settings_plugin_api/inc/cmpbasesettingsdlg.h Mon Mar 08 21:43:55 2010 +0000 +++ b/ipcm_plat/bearer_settings_plugin_api/inc/cmpbasesettingsdlg.h Sun Mar 14 13:11:26 2010 +0000 @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include diff -r c65663728cf1 -r c32fb9f4b91e ipcm_plat/bearer_settings_plugin_api/inc/cmpbasesettingsdlgadv.h --- a/ipcm_plat/bearer_settings_plugin_api/inc/cmpbasesettingsdlgadv.h Mon Mar 08 21:43:55 2010 +0000 +++ b/ipcm_plat/bearer_settings_plugin_api/inc/cmpbasesettingsdlgadv.h Sun Mar 14 13:11:26 2010 +0000 @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include // FORWARD DECLARATIONS diff -r c65663728cf1 -r c32fb9f4b91e ipcm_plat/bearer_settings_plugin_api/inc/cmpluginbaseeng.h --- a/ipcm_plat/bearer_settings_plugin_api/inc/cmpluginbaseeng.h Mon Mar 08 21:43:55 2010 +0000 +++ b/ipcm_plat/bearer_settings_plugin_api/inc/cmpluginbaseeng.h Sun Mar 14 13:11:26 2010 +0000 @@ -25,7 +25,7 @@ #include #include // For REComSession #include -#include +#include #define IAP_ELEMENT_ID( iapRecId ) (KCDTIdIAPRecord | \ KCDMaskShowFieldType | \ diff -r c65663728cf1 -r c32fb9f4b91e ipcm_plat/bearer_settings_plugin_api/inc/cmpluginlanbase.h --- a/ipcm_plat/bearer_settings_plugin_api/inc/cmpluginlanbase.h Mon Mar 08 21:43:55 2010 +0000 +++ b/ipcm_plat/bearer_settings_plugin_api/inc/cmpluginlanbase.h Sun Mar 14 13:11:26 2010 +0000 @@ -23,7 +23,7 @@ #include #include #include -#include +#include #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS #include #endif diff -r c65663728cf1 -r c32fb9f4b91e ipcm_plat/commsdat_wlan_api/inc/cmmanagertablefields.h --- a/ipcm_plat/commsdat_wlan_api/inc/cmmanagertablefields.h Mon Mar 08 21:43:55 2010 +0000 +++ b/ipcm_plat/commsdat_wlan_api/inc/cmmanagertablefields.h Sun Mar 14 13:11:26 2010 +0000 @@ -23,9 +23,9 @@ // INCLUDES #include -#include +#include #include -#include +#include using namespace CommsDat; diff -r c65663728cf1 -r c32fb9f4b91e ipcm_plat/commsdat_wlan_api/inc/wlancontainer.h --- a/ipcm_plat/commsdat_wlan_api/inc/wlancontainer.h Mon Mar 08 21:43:55 2010 +0000 +++ b/ipcm_plat/commsdat_wlan_api/inc/wlancontainer.h Sun Mar 14 13:11:26 2010 +0000 @@ -23,8 +23,8 @@ // INCLUDES #include -#include -#include +#include +#include #include // FORWARD DECLARATIONS diff -r c65663728cf1 -r c32fb9f4b91e ipcm_plat/connection_ui_utilities_api/inc/ConnectionUiUtilities.h --- a/ipcm_plat/connection_ui_utilities_api/inc/ConnectionUiUtilities.h Mon Mar 08 21:43:55 2010 +0000 +++ b/ipcm_plat/connection_ui_utilities_api/inc/ConnectionUiUtilities.h Sun Mar 14 13:11:26 2010 +0000 @@ -112,9 +112,8 @@ * This method should only be used from the MPM in order to provide * a consistent popup behavior across the platform. * @param aIAPId The id of the access point. - * @param aConnectionActive is connection already active. */ - IMPORT_C void ConnectingViaDiscreetPopup( const TUint32& aIAPId, TBool aConnectionAlreadyActive ); + IMPORT_C void ConnectingViaDiscreetPopup( const TUint32& aIAPId ); /** * Pops up a discreet popup indicating a connection error. diff -r c65663728cf1 -r c32fb9f4b91e ipcm_plat/extended_connection_settings_api/inc/cmdestinationext.h --- a/ipcm_plat/extended_connection_settings_api/inc/cmdestinationext.h Mon Mar 08 21:43:55 2010 +0000 +++ b/ipcm_plat/extended_connection_settings_api/inc/cmdestinationext.h Sun Mar 14 13:11:26 2010 +0000 @@ -19,7 +19,7 @@ #define DESTINATIONEXT_H // System includes -#include +#include #include #include #include diff -r c65663728cf1 -r c32fb9f4b91e ipcm_plat/extended_connection_settings_api/inc/cmmanagerext.h --- a/ipcm_plat/extended_connection_settings_api/inc/cmmanagerext.h Mon Mar 08 21:43:55 2010 +0000 +++ b/ipcm_plat/extended_connection_settings_api/inc/cmmanagerext.h Sun Mar 14 13:11:26 2010 +0000 @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include diff -r c65663728cf1 -r c32fb9f4b91e ipcm_plat/extended_connection_settings_api/inc/cmsettingsui.h --- a/ipcm_plat/extended_connection_settings_api/inc/cmsettingsui.h Mon Mar 08 21:43:55 2010 +0000 +++ b/ipcm_plat/extended_connection_settings_api/inc/cmsettingsui.h Sun Mar 14 13:11:26 2010 +0000 @@ -18,7 +18,7 @@ #ifndef C_CMSETTINGSUI_H #define C_CMSETTINGSUI_H -#include +#include #include class CCmSettingsUiImpl; diff -r c65663728cf1 -r c32fb9f4b91e ipcm_pub/connection_settings_api/inc/cmdestination.h --- a/ipcm_pub/connection_settings_api/inc/cmdestination.h Mon Mar 08 21:43:55 2010 +0000 +++ b/ipcm_pub/connection_settings_api/inc/cmdestination.h Sun Mar 14 13:11:26 2010 +0000 @@ -21,7 +21,7 @@ // System includes #include #include -#include +#include #include #include diff -r c65663728cf1 -r c32fb9f4b91e ipcm_pub/connection_settings_api/inc/cmmanagerdef.h --- a/ipcm_pub/connection_settings_api/inc/cmmanagerdef.h Mon Mar 08 21:43:55 2010 +0000 +++ b/ipcm_pub/connection_settings_api/inc/cmmanagerdef.h Sun Mar 14 13:11:26 2010 +0000 @@ -19,7 +19,7 @@ #define CMMANAGERDEF_H // System includes -#include +#include #include namespace CMManager diff -r c65663728cf1 -r c32fb9f4b91e ipcm_pub/connection_settings_api/inc/cmsettingsui.h --- a/ipcm_pub/connection_settings_api/inc/cmsettingsui.h Mon Mar 08 21:43:55 2010 +0000 +++ b/ipcm_pub/connection_settings_api/inc/cmsettingsui.h Sun Mar 14 13:11:26 2010 +0000 @@ -18,7 +18,7 @@ #ifndef C_CMSETTINGSUI_H #define C_CMSETTINGSUI_H -#include +#include #include class CCmSettingsUiImpl; diff -r c65663728cf1 -r c32fb9f4b91e ipcm_pub/connection_settings_ui_api/inc/cmapplicationsettingsui.h --- a/ipcm_pub/connection_settings_ui_api/inc/cmapplicationsettingsui.h Mon Mar 08 21:43:55 2010 +0000 +++ b/ipcm_pub/connection_settings_ui_api/inc/cmapplicationsettingsui.h Sun Mar 14 13:11:26 2010 +0000 @@ -18,7 +18,7 @@ #ifndef C_CMAPPLICATIONSETTINGSUI_H #define C_CMAPPLICATIONSETTINGSUI_H -#include +#include #include class CCmConnSettingsUiImpl;