# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1271249395 -10800 # Node ID 6134b50290790ca0e089ef6330de0ee5d434a1af # Parent ed1e38b404e52a900ed675401e63cf693debe25d Revision: 201013 Kit: 201015 diff -r ed1e38b404e5 -r 6134b5029079 callcontinuity/vcc/src/cvccdirector.cpp --- a/callcontinuity/vcc/src/cvccdirector.cpp Wed Mar 31 21:20:05 2010 +0300 +++ b/callcontinuity/vcc/src/cvccdirector.cpp Wed Apr 14 15:49:55 2010 +0300 @@ -296,11 +296,19 @@ // Check call type and translate it into domain type CVccPerformer* perf; TBool csOriginated = EFalse; + if( aParameters.CallType() == CCPCall::ECallTypeCSVoice ) { + RUBY_DEBUG0("CS Call"); + iHoTrigger->SetCurrentDomainType( CVccHoTrigger::ECallDomainTypeCS ); csOriginated = ETrue; iHoTrigger->ReadHoAllowedWhenCsOriginatedSettingL(); } + else + { + RUBY_DEBUG0("PS Call"); + iHoTrigger->SetCurrentDomainType( CVccHoTrigger::ECallDomainTypePS ); + } perf = CVccPerformer::NewL( iProviders, iStateInit, @@ -601,10 +609,19 @@ TBool csOriginated = EFalse; if( aCall->Parameters().CallType() == CCPCall::ECallTypeCSVoice ) { + RUBY_DEBUG0("incoming CS Call"); + iHoTrigger->SetCurrentDomainType( CVccHoTrigger::ECallDomainTypeCS ); csOriginated = ETrue; iHoTrigger->ReadHoAllowedWhenCsOriginatedSettingL(); } + + else + { + RUBY_DEBUG0("incoming PS Call"); + iHoTrigger->SetCurrentDomainType( CVccHoTrigger::ECallDomainTypePS ); + } + //Create 1 performer for each call CVccPerformer* perf = CVccPerformer::NewL( iProviders, diff -r ed1e38b404e5 -r 6134b5029079 callcontinuity/vcc/src/cvccperformer.cpp --- a/callcontinuity/vcc/src/cvccperformer.cpp Wed Mar 31 21:20:05 2010 +0300 +++ b/callcontinuity/vcc/src/cvccperformer.cpp Wed Apr 14 15:49:55 2010 +0300 @@ -685,6 +685,19 @@ MCCPCallObserver::ECCPNotifyRemotePartyInfoChange; iCallObs->CallEventOccurred( event, this ); + RUBY_DEBUG0("Let HoTrigger know about changed domain"); + + if( params->CallType() == CCPCall::ECallTypeCSVoice ) + { + RUBY_DEBUG0("New domain is CS"); + iVccHoTrigger.SetCurrentDomainType( CVccHoTrigger::ECallDomainTypeCS ); + } + else + { + RUBY_DEBUG0("New domain is PS"); + iVccHoTrigger.SetCurrentDomainType( CVccHoTrigger::ECallDomainTypePS ); + } + delete params; } diff -r ed1e38b404e5 -r 6134b5029079 callcontinuity/vcchotrigger/src/vcchotrigger.cpp --- a/callcontinuity/vcchotrigger/src/vcchotrigger.cpp Wed Mar 31 21:20:05 2010 +0300 +++ b/callcontinuity/vcchotrigger/src/vcchotrigger.cpp Wed Apr 14 15:49:55 2010 +0300 @@ -349,9 +349,10 @@ TVccHoStatus hoStatus( EVccHoStateUnknown ); iEngPsProperty->GetCurrentHoStatus( hoStatus ); - if( hoStatus != EVccCsToPsHoStarted || hoStatus != EVccCsToPsHoInprogress ) + if( hoStatus != EVccCsToPsHoStarted || hoStatus != EVccCsToPsHoInprogress + || hoStatus != EVccPsToCsHoStarted || hoStatus != EVccPsToCsHoInprogress ) { - RUBY_DEBUG0( "CS to PS HO in progress, not updating keys" ); + RUBY_DEBUG0( "HO not in progress, updating keys" ); TRAP_IGNORE( UpdatePsKeysL() ); } @@ -562,6 +563,8 @@ void CVccHoTrigger::TriggerHo() { RUBY_DEBUG_BLOCK( "CVccHoTrigger::TriggerHo" ); + + RUBY_DEBUG1("Current domain is: %d", iDomainType); //Check if manual ho is already made during this call and the //service availability. if( iManualHoDone || !ServicesAvailable() || iHoNotAllowed ) @@ -582,7 +585,7 @@ if ( ( iWlanClass == ESignalClassWeak || iCchServiceStatus == EServiceUnavailable )&& iGsmClass == ESignalClassNormal && - ( iPolicy.AllowedDirection() & EPsToCsAllowed )) + ( iPolicy.AllowedDirection() & EPsToCsAllowed ) && iDomainType == ECallDomainTypePS ) { RUBY_DEBUG0( "VccHoTrigger::WlanSignalChanged - NotifySubscriberL" ); @@ -668,7 +671,7 @@ else if ( (iPolicy.PreferredDomain() == EPsPreferred) && iWlanClass == ESignalClassNormal && iCchServiceStatus != EServiceUnavailable && - ( iPolicy.AllowedDirection() & ECsToPsAllowed ) ) + ( iPolicy.AllowedDirection() & ECsToPsAllowed ) && iDomainType != ECallDomainTypePS ) { // Current call is CS, PS signal is ok, preferred domain is PS and // immediate HO is requested -> HANDOVER to PS diff -r ed1e38b404e5 -r 6134b5029079 commsconfig/cscapplicationui/inc/cscconstants.h --- a/commsconfig/cscapplicationui/inc/cscconstants.h Wed Mar 31 21:20:05 2010 +0300 +++ b/commsconfig/cscapplicationui/inc/cscconstants.h Wed Apr 14 15:49:55 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -38,8 +38,8 @@ _LIT( KCSCAifFile, "csc_aif.mif"); // For icon size -const TInt KIconSizeQvgaPortrait = 58; -const TInt KIconSizeQvgaLandscape = 59; -const TInt KItemHeightQvgaLandscape = 67; +const TInt KItemHeightPortrait = 67; +const TInt KIconSizeCorrectionPortrait = 8; +const TInt KIconSizeCorrectionLandscape = 7; #endif // CSCCONSTANTS_H diff -r ed1e38b404e5 -r 6134b5029079 commsconfig/cscapplicationui/inc/cscservicecontainer.h --- a/commsconfig/cscapplicationui/inc/cscservicecontainer.h Wed Mar 31 21:20:05 2010 +0300 +++ b/commsconfig/cscapplicationui/inc/cscservicecontainer.h Wed Apr 14 15:49:55 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -463,6 +463,11 @@ * Pen down point */ TPoint iPenDownPoint; + + /** + * Holds current listbox item height + */ + TInt iListBoxItemHeight; #ifdef _DEBUG friend class UT_CSC; diff -r ed1e38b404e5 -r 6134b5029079 commsconfig/cscapplicationui/src/cscservicecontainer.cpp --- a/commsconfig/cscapplicationui/src/cscservicecontainer.cpp Wed Mar 31 21:20:05 2010 +0300 +++ b/commsconfig/cscapplicationui/src/cscservicecontainer.cpp Wed Apr 14 15:49:55 2010 +0300 @@ -220,14 +220,19 @@ uiPlugins.AppendL( uiExtension ); } } - - const TInt itemHeight( iListBox->ItemHeight() ); - TInt iconSize( KIconSizeQvgaPortrait ); // Default icon size (QVGA portrait). - if ( KItemHeightQvgaLandscape == itemHeight ) // QVGA landscape + + iListBoxItemHeight = iListBox->ItemHeight(); + + TInt iconSize( 0 ); + if ( iListBoxItemHeight == KItemHeightPortrait ) { - iconSize = KIconSizeQvgaLandscape; + iconSize = iListBoxItemHeight - KIconSizeCorrectionPortrait; } - + else + { + iconSize = iListBoxItemHeight - KIconSizeCorrectionLandscape; + } + for ( TUint i( 0 ) ; i < iUiExtensionCount ; i++ ) { TUiExtensionPluginInfo uiExtension = uiPlugins[i]; @@ -751,6 +756,12 @@ if ( iListBox ) { iListBox->SetRect( Rect() ); + + // Update view if portrait/landscape change happened + if ( iListBoxItemHeight != iListBox->ItemHeight() ) + { + TRAP_IGNORE( UpdateServiceViewL() ); + } } } diff -r ed1e38b404e5 -r 6134b5029079 commsconfig/cscapplicationui/src/cscserviceview.cpp --- a/commsconfig/cscapplicationui/src/cscserviceview.cpp Wed Mar 31 21:20:05 2010 +0300 +++ b/commsconfig/cscapplicationui/src/cscserviceview.cpp Wed Apr 14 15:49:55 2010 +0300 @@ -819,14 +819,17 @@ CCSCNoteUtilities::TCSCNoteType type = CCSCNoteUtilities::ECSCConfigureServiceQuery; - - if ( CCSCNoteUtilities::ShowCommonQueryL( - type, iPluginInfo.iProviderName ) ) - { - iServicePluginHandler.DoProvisioningL( + + TRAP_IGNORE + ( + if ( CCSCNoteUtilities::ShowCommonQueryL( + type, iPluginInfo.iProviderName ) ) + { + iServicePluginHandler.DoProvisioningL( iPluginInfo.iPluginsUid, KCSCServiceViewId ); - } - + } + ); + iNextPluginIndex++; TInt pluginCount = iServicePluginHandler.PluginCount( CCSCEngServicePluginHandler::EInitialized ); diff -r ed1e38b404e5 -r 6134b5029079 commsconfig/cscsettingsui/data/cscsettingsui.rss --- a/commsconfig/cscsettingsui/data/cscsettingsui.rss Wed Mar 31 21:20:05 2010 +0300 +++ b/commsconfig/cscsettingsui/data/cscsettingsui.rss Wed Apr 14 15:49:55 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -23,6 +23,7 @@ #include #include #include +#include #include "cscsettingsui.hrh" @@ -114,6 +115,11 @@ }, MENU_ITEM { + command = ECSCSettingsUiDelete; + txt = qtn_voip_csc_option_delete_service; + }, + MENU_ITEM + { command = EAknCmdHelp; txt = qtn_options_help; }, diff -r ed1e38b404e5 -r 6134b5029079 commsconfig/cscsettingsui/group/cscsettingsui.mmp --- a/commsconfig/cscsettingsui/group/cscsettingsui.mmp Wed Mar 31 21:20:05 2010 +0300 +++ b/commsconfig/cscsettingsui/group/cscsettingsui.mmp Wed Apr 14 15:49:55 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -68,3 +68,4 @@ LIBRARY commonengine.lib LIBRARY vimpstsettings.lib // for IM tone path LIBRARY xspviewservices.lib +LIBRARY ecom.lib diff -r ed1e38b404e5 -r 6134b5029079 commsconfig/cscsettingsui/inc/cscsettingsui.hrh --- a/commsconfig/cscsettingsui/inc/cscsettingsui.hrh Wed Mar 31 21:20:05 2010 +0300 +++ b/commsconfig/cscsettingsui/inc/cscsettingsui.hrh Wed Apr 14 15:49:55 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -24,7 +24,8 @@ { ECSCSettingsUiChange = 99, ECSCSettingsUiOpen, - ECSCMSKSettingsUiChange + ECSCMSKSettingsUiChange, + ECSCSettingsUiDelete }; // CSCSettingsUi preferred service setting list values. diff -r ed1e38b404e5 -r 6134b5029079 commsconfig/cscsettingsui/inc/cscsettingsuimaincontainer.h --- a/commsconfig/cscsettingsui/inc/cscsettingsuimaincontainer.h Wed Mar 31 21:20:05 2010 +0300 +++ b/commsconfig/cscsettingsui/inc/cscsettingsuimaincontainer.h Wed Apr 14 15:49:55 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -19,8 +19,13 @@ #ifndef C_CSCSETTINGSUIMAINCONTAINER_H #define C_CSCSETTINGSUIMAINCONTAINER_H +#include "mcscengserviceobserver.h" +#include "mcscengprovisioningobserver.h" + class CCSCSettingsUiModel; class CAknSettingStyleListBox; +class MCSCEngServiceObserver; +class MCSCEngProvisioningObserver; /** * TListBoxItem class @@ -71,245 +76,240 @@ */ NONSHARABLE_CLASS( CCSCSettingsUiMainContainer ) : public CCoeControl { - public: - - CCSCSettingsUiMainContainer( - CCSCSettingsUiModel& aModel ); - - - void ConstructL( - const TRect& aRect ); - - - virtual ~CCSCSettingsUiMainContainer(); - - - /** - * Updates container and redraws listbox items. - * - * @since S60 v3.2 - */ - void UpdateContainerL(); +public: + + CCSCSettingsUiMainContainer( + CCSCSettingsUiModel& aModel ); + void ConstructL( const TRect& aRect ); + virtual ~CCSCSettingsUiMainContainer(); + + /** + * Updates container and redraws listbox items. + * + * @since S60 v3.2 + */ + void UpdateContainerL(); + + /** + * Shows a query which changes handover notification tone setting + * + * @since S60 v5.0 + */ + void HandoverNotificationToneQueryL(); + + /** + * Shows a query which changes presence request preference + * + * @since S60 v3.2 + */ + void PresenceReqPrefQueryL(); + + /** + * For saving IM tone path to service tab storage. + * + * @param aTonePath tone path to be saved. + * @since S60 v5.0 + */ + void SaveImTonePathL( const TDesC& aTonePath ); + + /** + * Returns handle to the listbox. + * + * @since S60 v3.2 + * @return handle to the listbox + */ + CAknSettingStyleListBox* ListBox(); + + /** + * Returns selected list box item + * + * @since S60 v3.2 + * @return selected list box item + */ + TMainListBoxItem CurrentItem() const; - - /** - * Shows a query which changes handover notification tone setting - * - * @since S60 v5.0 - */ - void HandoverNotificationToneQueryL(); - - - /** - * Shows a query which changes presence request preference - * - * @since S60 v3.2 - */ - void PresenceReqPrefQueryL(); - - /** - * For saving IM tone path to service tab storage. - * - * @param aTonePath tone path to be saved. - * @since S60 v5.0 - */ - void SaveImTonePathL( const TDesC& aTonePath ); + /** + * Deletes the service in hand. + * + * @since S60 v5.2 + */ + void DeleteServiceL(); + + /** + * Launches cleanup plugin to remove settings. + * + * @since S60 v5.2 + * @param aServiceId ID of service to be removed. + */ + void LaunchCleanupPluginL( TUint aServiceId ) const; + +// from base class CCoeControl + + /** + * From CCoeControl. + */ + CCoeControl* ComponentControl( TInt aIndex ) const; + + /** + * From CCoeControl. + */ + TKeyResponse OfferKeyEventL( + const TKeyEvent& aKeyEvent, + TEventCode aType ); - - /** - * Returns handle to the listbox. - * - * @since S60 v3.2 - * @return handle to the listbox - */ - CAknSettingStyleListBox* ListBox(); - - - /** - * Returns selected list box item - * - * @since S60 v3.2 - * @return selected list box item - */ - TMainListBoxItem CurrentItem() const; + /** + * From CCoeControl. + */ + void HandleResourceChange( TInt aType ); +private: + + /** + * Creates listbox item for setting items. + * + * @since S60 v3.2 + */ + void ConstructListBoxL(); - // from base class CCoeControl + /** + * Return caption for setting item. + * + * @since S60 v3.2 + * @param aItem for setting list item to be constructed + * @return setting item caption + */ + HBufC* GetCaptionL( TMainListBoxItem::TSettingItems aItem ); - /** - * From CCoeControl. - */ - CCoeControl* ComponentControl( TInt aIndex ) const; - - - /** - * From CCoeControl. - */ - TKeyResponse OfferKeyEventL( - const TKeyEvent& aKeyEvent, - TEventCode aType ); - - - /** - * From CCoeControl. - */ - void HandleResourceChange( TInt aType ); - + /** + * Get username. + * + * @since S60 v5.0 + * @param aUsername username is set to this. + */ + void GetUsernameL( RBuf& aUsername ); - private: - - /** - * Creates listbox item for setting items. - * - * @since S60 v3.2 - */ - void ConstructListBoxL(); - - - /** - * Return caption for setting item. - * - * @since S60 v3.2 - * @param aItem for setting list item to be constructed - * @return setting item caption - */ - HBufC* GetCaptionL( TMainListBoxItem::TSettingItems aItem ); - - - /** - * Get username. - * - * @since S60 v5.0 - * @param aUsername username is set to this. - */ - void GetUsernameL( RBuf& aUsername ); - - - /** - * Get preferred service setting. - * - * @since S60 v5.0 - * @param aValue presence pref setting value is stored to this. - */ - void GetPreferredServiceSettingL( RBuf& aValue ); - - - /** - * Get preferred service setting when VCC is supported. - * - * @since S60 v5.0 - * @param aValue presence pref setting value is stored to this. - */ - void GetVccPreferredServiceSettingL( RBuf& aValue ); - - - /** - * Get handover notification tone setting. - * - * @since S60 v5.0 - * @param aValue handover notification tone setting value is stored - * to this. - */ - void GetHandoverNotificationTonePrefL( RBuf& aValue ); - - - /** - * Get precence preferred setting. - * - * @since S60 v5.0 - * @param aValue presence pref setting value is stored to this. - */ - void GetPresencePrefSettingL( RBuf& aValue ); - - - /** - * Get IM message tone setting. - * - * @since S60 v5.0 - * @param aValue im tone setting value is stored to this. - */ - void GetImToneSettingL( RBuf& aValue ); - - - /** - * Get SNAP settings. - * - * @since S60 v5.0 - * @param aValue snap setting value is stored to this. - */ - void GetSnapSettingL( RBuf& aValue ); - - - /** - * Draws setting items at the first time - * after the initialization is completed. - * - * @since S60 v3.2 - */ - void InitializeSettingItemsL(); - - - /** - * Constructs setting list items. - * - * @since S60 v3.2 - * @param aItem for setting list item to be constructed - */ - void MakeSettingItemL( TMainListBoxItem::TSettingItems aItem ); - - - // from base class CCoeControl - - /** - * From CCoeControl. - */ - TInt CountComponentControls() const; - - - /** - * From CCoeControl - */ - void GetHelpContext( TCoeHelpContext& aContext ) const; + /** + * Get preferred service setting. + * + * @since S60 v5.0 + * @param aValue presence pref setting value is stored to this. + */ + void GetPreferredServiceSettingL( RBuf& aValue ); + + /** + * Get preferred service setting when VCC is supported. + * + * @since S60 v5.0 + * @param aValue presence pref setting value is stored to this. + */ + void GetVccPreferredServiceSettingL( RBuf& aValue ); + + /** + * Get handover notification tone setting. + * + * @since S60 v5.0 + * @param aValue handover notification tone setting value is stored + * to this. + */ + void GetHandoverNotificationTonePrefL( RBuf& aValue ); + + /** + * Get precence preferred setting. + * + * @since S60 v5.0 + * @param aValue presence pref setting value is stored to this. + */ + void GetPresencePrefSettingL( RBuf& aValue ); + + /** + * Get IM message tone setting. + * + * @since S60 v5.0 + * @param aValue im tone setting value is stored to this. + */ + void GetImToneSettingL( RBuf& aValue ); + + /** + * Get SNAP settings. + * + * @since S60 v5.0 + * @param aValue snap setting value is stored to this. + */ + void GetSnapSettingL( RBuf& aValue ); + + /** + * Draws setting items at the first time + * after the initialization is completed. + * + * @since S60 v3.2 + */ + void InitializeSettingItemsL(); - - /** - * From CCoeControl. - */ - void SizeChanged(); + /** + * Constructs setting list items. + * + * @since S60 v3.2 + * @param aItem for setting list item to be constructed + */ + void MakeSettingItemL( TMainListBoxItem::TSettingItems aItem ); + /** + * Cleanup RImplInfoPtrArray + * + * @since S60 v5.2 + * @param aArray Array to be destroyed. + */ + static void ResetAndDestroy( TAny* aArray ); - /** - * From CoeControl. - */ - void FocusChanged( TDrawNow aDrawNow ); +// from base class CCoeControl + + /** + * From CCoeControl. + */ + TInt CountComponentControls() const; + + /** + * From CCoeControl + */ + void GetHelpContext( TCoeHelpContext& aContext ) const; - private: // data - - /** - * Reference to model class for settings handling. - */ - CCSCSettingsUiModel& iModel; - - /** - * Listbox for main view setting page items. - * Own. - */ - CAknSettingStyleListBox* iListBox; - - /** - * Listbox item array - */ - RArray iListBoxItemArray; - - /** - * Setting item caption - */ - HBufC* iCaption; - + /** + * From CCoeControl. + */ + void SizeChanged(); + + /** + * From CoeControl. + */ + void FocusChanged( TDrawNow aDrawNow ); + +private: // data + + /** + * Reference to model class for settings handling. + */ + CCSCSettingsUiModel& iModel; + + /** + * Listbox for main view setting page items. + * Own. + */ + CAknSettingStyleListBox* iListBox; + + /** + * Listbox item array + */ + RArray iListBoxItemArray; + + /** + * Setting item caption + */ + HBufC* iCaption; + #ifdef _DEBUG friend class UT_cscsettingsui; #endif - + }; #endif // C_CSCSETTINGSUIMAINCONTAINER_H diff -r ed1e38b404e5 -r 6134b5029079 commsconfig/cscsettingsui/inc/cscsettingsuimainview.h --- a/commsconfig/cscsettingsui/inc/cscsettingsuimainview.h Wed Mar 31 21:20:05 2010 +0300 +++ b/commsconfig/cscsettingsui/inc/cscsettingsuimainview.h Wed Apr 14 15:49:55 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -35,252 +35,246 @@ */ NONSHARABLE_CLASS( CCSCSettingsUiMainView ) : public CAknView, public MEikListBoxObserver - { - public: - - /** - * Two-phased constructor. - * - * @param aModel for reference to the model - */ - static CCSCSettingsUiMainView* NewL( - CCSCSettingsUiModel& aModel ); + { +public: + + /** + * Two-phased constructor. + * + * @param aModel for reference to the model + */ + static CCSCSettingsUiMainView* NewL( + CCSCSettingsUiModel& aModel ); - - /** - * Two-phased constructor. - * - * @param aModel for reference to the model - */ - static CCSCSettingsUiMainView* NewLC( - CCSCSettingsUiModel& aModel ); + /** + * Two-phased constructor. + * + * @param aModel for reference to the model + */ + static CCSCSettingsUiMainView* NewLC( + CCSCSettingsUiModel& aModel ); + /** + * Destructor. + */ + virtual ~CCSCSettingsUiMainView(); - /** - * Destructor. - */ - virtual ~CCSCSettingsUiMainView(); + /** + * Processes situation when softkeys need to be changed. + * + * @since S60 v3.2 + */ + void UpdateSoftkeysL(); + + /** + * Resets service settings when switching services. + * + * @since S60 v5.2 + */ + void ResetViewL(); + +// from base class CAknView - - /** - * Processes situation when softkeys need to be changed. - * - * @since S60 v3.2 - */ - void UpdateSoftkeysL( ); - - /** - * Resets service settings when switching services. - * - * @since S60 v5.2 - */ - void ResetViewL(); + /** + * From CAknView. + */ + TUid Id() const; + +private: - - // from base class CAknView + CCSCSettingsUiMainView( + CCSCSettingsUiModel& aModel ); + void ConstructL(); + + /** + * Changes given service name to title pane. + * + * @since S60 v3.2 + */ + void SetTitleTextL(); - /** - * From CAknView. - */ - TUid Id() const; - + /** + * For checking if editing of preferred service setting is allowed + * + * @since S60 v3.2 + * @return ETrue if editing allowed + */ + TBool IsEditPreferredServiceSettingAllowedL(); - private: - - CCSCSettingsUiMainView( - CCSCSettingsUiModel& aModel ); - - void ConstructL(); - - - /** - * Changes given service name to title pane. - * - * @since S60 v3.2 - */ - void SetTitleTextL(); + /** + * Shows preferred service setting page. + * + * @since S60 v5.0 + */ + void ShowUsernameSettingPageL(); + + /** + * Shows preferred service setting page. + * + * @since S60 v3.2 + */ + void ShowPasswordSettingPageL(); + + /** + * Shows preferred service setting page. + * + * @since S60 v3.2 + */ + void ShowPrefServiceSettingPageL(); - - /** - * For checking if editing of preferred service setting is allowed - * - * @since S60 v3.2 - * @return ETrue if editing allowed - */ - TBool IsEditPreferredServiceSettingAllowedL(); + /** + * Shows preferred service setting page when VCC is supported. + * + * @since S60 v5.0 + */ + void ShowVccPrefServiceSettingPageL(); + + /** + * Shows IM tone selection list. + * + * @since S60 v5.0 + */ + void ShowImToneSelectionListL(); - - /** - * Shows preferred service setting page. - * - * @since S60 v5.0 - */ - void ShowUsernameSettingPageL(); - - - /** - * Shows preferred service setting page. - * - * @since S60 v3.2 - */ - void ShowPasswordSettingPageL(); + /** + * Handles 'change' middle softkey selection. + * + * @param aListBoxItem listbox item + * @since S60 v5.0 + */ + void HandleMskChangeSelectionL( TMainListBoxItem aListBoxItem ); + + /** + * Changes preferred telephony setting value. + * From VoIP(PS) to CS or vice versa. + * @since S60 v3.2 + */ + void ChangePrefTelephonyValueL(); - - /** - * Shows preferred service setting page. - * - * @since S60 v3.2 - */ - void ShowPrefServiceSettingPageL(); - - - /** - * Shows preferred service setting page when VCC is supported. - * - * @since S60 v5.0 - */ - void ShowVccPrefServiceSettingPageL(); - - - /** - * Shows IM tone selection list. - * - * @since S60 v5.0 - */ - void ShowImToneSelectionListL(); - - /** - * Handles 'change' middle softkey selection. - * - * @param aListBoxItem listbox item - * @since S60 v5.0 - */ - void HandleMskChangeSelectionL( TMainListBoxItem aListBoxItem ); - - /** - * Changes preferred telephony setting value. - * From VoIP(PS) to CS or vice versa. - * @since S60 v3.2 - */ - void ChangePrefTelephonyValueL(); - - /** - * Changes handover notify tone value (on/off). - * @since S60 v5.0 - */ - void ChangeHandoverNotifToneValueL(); - - /** - * Appends resource texts to the des array. - * - * @since S60 v3.2 - * @param aList Text array. - * @param aItem Text resource id. - */ - void AppendItemL(CDesCArrayFlat& aList, TInt aItem); - - - /** - * Launches Connection Method Settings Ui for editing destinations. - * - * @since S60 v5.0 - */ - void LaunchCMSettingsUiL(); - - - /** - * Handles returning to previous view where settingsui was launced. - * - * @since S60 v5.0 - */ - void HandleReturnToPreviousViewL(); - - - /** - * Handles exist from settingsui. - * - * @since S60 v5.0 - */ - void HandleSettingsUiExitL(); - - - // from base class CEikAppUi - - /** - * From CEikAppUi. - */ - void HandleCommandL( TInt aCommand ); - - - // from base class CAknView - - /** - * From CAknView. - */ - void DoActivateL( - const TVwsViewId& aPrevViewId, - TUid aCustomMessageId, - const TDesC8& aCustomMessage ); + /** + * Changes handover notify tone value (on/off). + * @since S60 v5.0 + */ + void ChangeHandoverNotifToneValueL(); + + /** + * Appends resource texts to the des array. + * + * @since S60 v3.2 + * @param aList Text array. + * @param aItem Text resource id. + */ + void AppendItemL(CDesCArrayFlat& aList, TInt aItem); + + /** + * Launches Connection Method Settings Ui for editing destinations. + * + * @since S60 v5.0 + */ + void LaunchCMSettingsUiL(); + + /** + * Handles returning to previous view where settingsui was launced. + * + * @since S60 v5.0 + */ + void HandleReturnToPreviousViewL(); + + /** + * Handles exist from settingsui. + * + * @since S60 v5.0 + */ + void HandleSettingsUiExitL(); + +// from base class CEikAppUi + + /** + * From CEikAppUi. + */ + void HandleCommandL( TInt aCommand ); + +// from base class CAknView + + /** + * From CAknView. + */ + void DoActivateL( + const TVwsViewId& aPrevViewId, + TUid aCustomMessageId, + const TDesC8& aCustomMessage ); + + /** + * From CAknView. + */ + void DoDeactivate(); + +// from base class MEikListBoxObserver - - /** - * From CAknView. - */ - void DoDeactivate(); - - - // from base class MEikListBoxObserver - - /** - * From MEikListBoxObserver. - */ - void HandleListBoxEventL( - CEikListBox* aListBox, - TListBoxEvent aEventType ); - - - /** - * From MEikListBoxObserver. - */ - void HandleListBoxSelectionL(); - - - /** - * From MEikListBoxObserver. - */ - void DynInitMenuPaneL( - TInt aResourceId, - CEikMenuPane* aMenuPane ); - - private: // data - - /** - * Handle to model class for settings handling. - */ - CCSCSettingsUiModel& iModel; - - /** - * Handle to title pane. - * Not own. - */ - CAknTitlePane* iTitlePane; - - /** - * Container class for main view. - * Own. - */ - CCSCSettingsUiMainContainer* iContainer; - - CAknNavigationControlContainer* iNaviPane; - - CAknNavigationDecorator* iNaviDecorator; - - TBool iImToneSelectionListOpen; + /** + * From MEikListBoxObserver. + */ + void HandleListBoxEventL( + CEikListBox* aListBox, + TListBoxEvent aEventType ); + + /** + * From MEikListBoxObserver. + */ + void HandleListBoxSelectionL(); + + /** + * From MEikListBoxObserver. + */ + void DynInitMenuPaneL( + TInt aResourceId, + CEikMenuPane* aMenuPane ); + +private: // data + + /** + * Handle to model class for settings handling. + */ + CCSCSettingsUiModel& iModel; + + /** + * Handle to title pane. + * Not own. + */ + CAknTitlePane* iTitlePane; + + /** + * Container class for main view. + * Own. + */ + CCSCSettingsUiMainContainer* iContainer; + + /** + * Navigation pane. + * Not own. + */ + CAknNavigationControlContainer* iNaviPane; + + /** + * Navigation decorator. + * Own. + */ + CAknNavigationDecorator* iNaviDecorator; + + /** + * Flag for telling if IM tone selection list is open. + */ + TBool iImToneSelectionListOpen; + + /** + * Flag for telling if service is deleted. + */ + TBool iDeleted; #ifdef _DEBUG friend class UT_cscsettingsui; -#endif - +#endif + }; #endif // C_CSCSETTINGSUIMAINVIEW_H diff -r ed1e38b404e5 -r 6134b5029079 commsconfig/cscsettingsui/inc/cscsettingsuimodel.h --- a/commsconfig/cscsettingsui/inc/cscsettingsuimodel.h Wed Mar 31 21:20:05 2010 +0300 +++ b/commsconfig/cscsettingsui/inc/cscsettingsuimodel.h Wed Apr 14 15:49:55 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -21,12 +21,15 @@ #include "mcscengcchobserver.h" #include "mcscengserviceobserver.h" +#include "mcscengprovisioningobserver.h" class CCSCEngCCHHandler; class CCSCEngServiceHandler; class CCSCEngBrandingHandler; class CCSCEngDestinationsHandler; class MCSCSettingsUiModelObserver; +class CCSCEngServicePluginHandler; +class MCSCEngProvisioningObserver; /** * CCSCSettingsUiModel class @@ -37,183 +40,202 @@ */ NONSHARABLE_CLASS( CCSCSettingsUiModel ) : public CBase, public MCSCEngCCHObserver, - public MCSCEngServiceObserver + public MCSCEngServiceObserver, + public MCSCEngProvisioningObserver { - public: - - /** - * Two-phased constructor. - * @param aObserver for settings ui observer - * @param aEikEnv for Eikon environment - */ - static CCSCSettingsUiModel* NewL( - MCSCSettingsUiModelObserver& aObserver, - CEikonEnv& aEikEnv ); +public: + + /** + * Two-phased constructor. + * @param aObserver for settings ui observer + * @param aEikEnv for Eikon environment + */ + static CCSCSettingsUiModel* NewL( + MCSCSettingsUiModelObserver& aObserver, + CEikonEnv& aEikEnv ); - /** - * Two-phased constructor. - * @param aObserver for settings ui observer - * @param aEikEnv for Eikon environment - */ - static CCSCSettingsUiModel* NewLC( - MCSCSettingsUiModelObserver& aObserver, - CEikonEnv& aEikEnv ); - - - /** - * Destructor. - */ - virtual ~CCSCSettingsUiModel(); - - - /** - * Returns reference to CSC's Service Provider Settings Handler. - * - * @since S60 v3.2 - * @return reference to SPS handle - */ - CCSCEngServiceHandler& SettingsHandler() const; - - - /** - * Returns reference to CSC's Converged Connection Handler. - * - * @since S60 v3.2 - * @return reference to CCH handle - */ - CCSCEngCCHHandler& CCHHandler() const; - - - /** - * Returns reference to CSC's Destinations Handler. - * - * @since S60 v3.2 - * @return reference to Destinations handle - */ - CCSCEngDestinationsHandler& DestinationsHandler() const; - - - /** - * Returns reference to CSC's Branding Server Handler. - * - * @since S60 v3.2 - * @return reference to Branding Server handle - */ - CCSCEngBrandingHandler& BSHandler() const; - - - /** - * Stores initialization information. - * Function leaves if given service doesn't exists. - * - * @since S60 v3.2 - * @param aViewId for view id to be activated when exiting - * @param aServiceId for service settings entry id - */ - void StoreInitializationDataL( - const TUid& aViewId, - TUint aServiceId ); - - - /** - * To notify when softkeys need to be changed. - * - * @since S60 v3.2 - */ - void UpdateSoftkeys(); - - - /** - * Returns uid of the view where to be returned. - * - * @since S60 v3.2 - * @return uid of the return view - */ - TUid ReturnViewId() const; - + /** + * Two-phased constructor. + * @param aObserver for settings ui observer + * @param aEikEnv for Eikon environment + */ + static CCSCSettingsUiModel* NewLC( + MCSCSettingsUiModelObserver& aObserver, + CEikonEnv& aEikEnv ); + + /** + * Destructor. + */ + virtual ~CCSCSettingsUiModel(); + + /** + * Returns reference to CSC's Service Provider Settings Handler. + * + * @since S60 v3.2 + * @return reference to SPS handle + */ + CCSCEngServiceHandler& SettingsHandler() const; + + /** + * Returns reference to CSC's Converged Connection Handler. + * + * @since S60 v3.2 + * @return reference to CCH handle + */ + CCSCEngCCHHandler& CCHHandler() const; + + /** + * Returns reference to CSC's Destinations Handler. + * + * @since S60 v3.2 + * @return reference to Destinations handle + */ + CCSCEngDestinationsHandler& DestinationsHandler() const; + + /** + * Returns reference to CSC's Branding Server Handler. + * + * @since S60 v3.2 + * @return reference to Branding Server handle + */ + CCSCEngBrandingHandler& BSHandler() const; + + /** + * Returns reference to CSC's Service Plugin Handler. + * + * @since S60 v5.2 + * @return Reference to Service Plugin Handler. + */ + CCSCEngServicePluginHandler& ServicePluginHandler() const; + + /** + * Stores initialization information. + * Function leaves if given service doesn't exists. + * + * @since S60 v3.2 + * @param aViewId for view id to be activated when exiting + * @param aServiceId for service settings entry id + */ + void StoreInitializationDataL( + const TUid& aViewId, + TUint aServiceId ); + + /** + * To notify when softkeys need to be changed. + * + * @since S60 v3.2 + */ + void UpdateSoftkeys(); + + /** + * Returns uid of the view where to be returned. + * + * @since S60 v3.2 + * @return uid of the return view + */ + TUid ReturnViewId() const; + + /** + * Returns currently selected service provider entry id. + * + * @since S60 v3.2 + * @return id of the currently selected service entry id + */ + TUint CurrentSPEntryId() const; + +// from base class MCSCEngCCHObserver + + /** + * From MCSCEngCCHObserver. + */ + void ServiceStatusChanged( + TUint aServiceId, + TCCHSubserviceType aType, + const TCchServiceStatus& aServiceStatus ); + +// from base class MCSCEngServiceObserver + + /** + * From MCSCEngServiceObserver. + */ + void NotifyServiceChange(); + +// from base class MCSCProvisioningObserver - /** - * Returns currently selected service provider entry id. - * - * @since S60 v3.2 - * @return id of the currently selected service entry id - */ - TUint CurrentSPEntryId() const; - - - // from base class MCSCEngCCHObserver + /** + * From MCSCProvisioningObserver + * Notifies when configuring of service plug-in is done. + * + * @since S60 v3.2 + * @param aResponse plug-in response type + * @param aIndex index + * @param aPluginUid plugins uid + */ + void NotifyServicePluginResponse( + const CCSCEngServicePluginHandler::TServicePluginResponse& aResponse, + const TInt aIndex, + const TUid& aPluginUid ); + +private: - /** - * From MCSCEngCCHObserver. - */ - void ServiceStatusChanged( - TUint aServiceId, - TCCHSubserviceType aType, - const TCchServiceStatus& aServiceStatus ); - - - // from base class MCSCEngServiceObserver + CCSCSettingsUiModel( + MCSCSettingsUiModelObserver& aObserver, + CEikonEnv& aEikEnv ); + + void ConstructL(); + +private: // data - /** - * From MCSCEngServiceObserver. - */ - void NotifyServiceChange(); - - - private: + /** + * Reference to settings ui model observer. + */ + MCSCSettingsUiModelObserver& iObserver; - CCSCSettingsUiModel( - MCSCSettingsUiModelObserver& aObserver, - CEikonEnv& aEikEnv ); - - void ConstructL(); + /** + * Reference to Eikon environment. + */ + CEikonEnv& iEikEnv; - private: // data - - /** - * Reference to settings ui model observer. - */ - MCSCSettingsUiModelObserver& iObserver; - - /** - * Reference to Eikon environment. - */ - CEikonEnv& iEikEnv; - - /** - * Handle to CSC's Service Provider Settings Handler. - * Own. - */ - CCSCEngServiceHandler* iSPSHandler; - - /** - * Handle to CSC's Converged Connection Handler. - * Own. - */ - CCSCEngCCHHandler* iCCHHandler; - - /** - * Handle to CSC's Destinations Handler. - * Own. - */ - CCSCEngDestinationsHandler* iDestinationsHandler; - - /** - * Handle to CSC's Branding Server Handler. - * Own. - */ - CCSCEngBrandingHandler* iBSHandler; - - /** - * Initialization data: Customer application return view id. - */ - TUid iViewId; + /** + * Handle to CSC's Service Provider Settings Handler. + * Own. + */ + CCSCEngServiceHandler* iSPSHandler; + + /** + * Handle to CSC's Converged Connection Handler. + * Own. + */ + CCSCEngCCHHandler* iCCHHandler; + + /** + * Handle to CSC's Destinations Handler. + * Own. + */ + CCSCEngDestinationsHandler* iDestinationsHandler; - /** - * Initialization data: Service Provider Settings Entry id. - */ - TUint iServiceId; + /** + * Handle to CSC's Branding Server Handler. + * Own. + */ + CCSCEngBrandingHandler* iBSHandler; + + /** + * CSC's Service Plugin Handler. + * Own. + */ + CCSCEngServicePluginHandler* iServicePluginHandler; + + /** + * Initialization data: Customer application return view id. + */ + TUid iViewId; + + /** + * Initialization data: Service Provider Settings Entry id. + */ + TUint iServiceId; }; #endif // C_CSCSETTINGSUIMODEL_H diff -r ed1e38b404e5 -r 6134b5029079 commsconfig/cscsettingsui/src/cscsettingsuimaincontainer.cpp --- a/commsconfig/cscsettingsui/src/cscsettingsuimaincontainer.cpp Wed Mar 31 21:20:05 2010 +0300 +++ b/commsconfig/cscsettingsui/src/cscsettingsuimaincontainer.cpp Wed Apr 14 15:49:55 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -26,6 +26,8 @@ #include #include #include +#include +#include #include "cscconstants.h" #include "cscsettingsui.hrh" @@ -36,6 +38,9 @@ #include "cscengdestinationshandler.h" #include "cipapputilsaddressresolver.h" #include "cscsettingsuimaincontainer.h" +#include "cscengservicepluginhandler.h" +#include "cscnoteutilities.h" +#include "cscengsettingscleanupplugininterface.h" // Format of the setting item. _LIT( KCSCSettingsUiListItemTextFormat, "\t%S\t\t%S" ); @@ -59,15 +64,15 @@ // --------------------------------------------------------------------------- // void CCSCSettingsUiMainContainer::ConstructL( - const TRect& aRect ) + const TRect& aRect) { CSCSETUIDEBUG( "CCSCSettingsUiMainContainer::ConstructL - begin" ); - + CreateWindowL(); ConstructListBoxL(); SetRect( aRect ); ActivateL(); - + CSCSETUIDEBUG( "CCSCSettingsUiMainContainer::ConstructL - end" ); } @@ -103,17 +108,17 @@ void CCSCSettingsUiMainContainer::UpdateContainerL() { CSCSETUIDEBUG( "CCSCSettingsUiMainContainer::UpdateContainerL - begin" ); - + // Get listbox items from model. CTextListBoxModel* model = iListBox->Model(); MDesCArray* textArray = model->ItemTextArray(); CDesCArray* listBoxItems = static_cast( textArray ); listBoxItems->Reset(); iListBoxItemArray.Reset(); - + // Initialize setting items. InitializeSettingItemsL(); - + CSCSETUIDEBUG( "CCSCSettingsUiMainContainer::UpdateContainerL - end" ); } @@ -126,25 +131,25 @@ { CDesCArrayFlat* items = new ( ELeave ) CDesCArrayFlat( 2 ); CleanupStack::PushL( items ); - + HBufC* onItem = StringLoader::LoadLC( R_CSCSETTINGSUI_SETTING_HANDOVER_NOTIF_TONE_ON ); items->AppendL( *onItem ); CleanupStack::PopAndDestroy( onItem ); - + HBufC* offItem = StringLoader::LoadLC( R_CSCSETTINGSUI_SETTING_HANDOVER_NOTIF_TONE_OFF ); items->AppendL( *offItem ); CleanupStack::PopAndDestroy( offItem ); - + TInt index( 0 ); CAknListQueryDialog* dialog = new ( ELeave ) CAknListQueryDialog( &index ); - + dialog->PrepareLC( R_CSCSETTINGSUI_HANDOVER_NOTIFICATION_TONE_QUERY ); dialog->SetItemTextArray( items ); dialog->SetOwnershipType( ELbmDoesNotOwnItemArray ); - + if ( dialog->RunLD() ) { // Update setting according user selection @@ -170,7 +175,7 @@ { // cancelled } - + CleanupStack::PopAndDestroy( items ); UpdateContainerL(); } @@ -184,25 +189,25 @@ { CDesCArrayFlat* items = new ( ELeave ) CDesCArrayFlat( 2 ); CleanupStack::PushL( items ); - + HBufC* alwaysAskItem = StringLoader::LoadLC( R_CSCSETTINGSUI_PRES_PREF_ALWAYS_ASK ); items->AppendL( *alwaysAskItem ); CleanupStack::PopAndDestroy( alwaysAskItem ); - + HBufC* autoAcceptItem = StringLoader::LoadLC( R_CSCSETTINGSUI_PRES_PREF_ACCEPT_AUTOMATICALLY ); items->AppendL( *autoAcceptItem ); CleanupStack::PopAndDestroy( autoAcceptItem ); - + TInt index( 0 ); CAknListQueryDialog* dialog = new ( ELeave ) CAknListQueryDialog( &index ); - + dialog->PrepareLC( R_CSCSETTINGSUI_PRESENCE_REQUEST_PREF_QUERY ); dialog->SetItemTextArray( items ); dialog->SetOwnershipType( ELbmDoesNotOwnItemArray ); - + if ( dialog->RunLD() ) { // Update setting according user selection @@ -228,7 +233,7 @@ { // canceled } - + CleanupStack::PopAndDestroy( items ); UpdateContainerL(); } @@ -241,7 +246,7 @@ void CCSCSettingsUiMainContainer::SaveImTonePathL( const TDesC& aTonePath ) { MVIMPSTSettingsStore* settings = CVIMPSTSettingsStore::NewLC(); - + User::LeaveIfError( settings->SetL( iModel.CurrentSPEntryId(), EServiceToneFileName, aTonePath ) ); @@ -258,7 +263,6 @@ return iListBox; } - // --------------------------------------------------------------------------- // CCSCSettingsUiMainContainer::CurrentItemIndex // Returns index of selected listbox item. @@ -270,7 +274,6 @@ return iListBoxItemArray[ currentItemIndex ]; } - // --------------------------------------------------------------------------- // From class CoeControl // CCSCSettingsUiMainContainer::ComponentControl @@ -282,7 +285,6 @@ return iListBox; } - // ----------------------------------------------------------------------------- // From class CoeControl // For getting help context @@ -305,13 +307,13 @@ { TKeyResponse response = EKeyWasNotConsumed; response = iListBox->OfferKeyEventL( aKeyEvent, aType ); - + if ( EKeyUpArrow == aKeyEvent.iCode || EKeyDownArrow == aKeyEvent.iCode ) { iModel.UpdateSoftkeys(); } - + return response; } @@ -332,7 +334,7 @@ SetRect( mainPaneRect ); DrawNow(); } - + CCoeControl::HandleResourceChange( aType ); } @@ -345,7 +347,7 @@ void CCSCSettingsUiMainContainer::ConstructListBoxL() { CSCSETUIDEBUG( "CCSCSettingsUiMainContainer::ConstructListBoxL - begin" ); - + // Create listbox and array for listbox items. iListBox = new( ELeave ) CAknSettingStyleListBox; iListBox->ConstructL( this, EAknListBoxSelectionList ); @@ -357,10 +359,10 @@ CDesCArrayFlat* itemsArray = new ( ELeave ) CDesCArrayFlat( KCSCSettingsUiArrayGranularity ); iListBox->Model()->SetItemTextArray( itemsArray ); - + // Initialize setting items. InitializeSettingItemsL(); - + CSCSETUIDEBUG( "CCSCSettingsUiMainContainer::ConstructListBoxL - end" ); } @@ -374,7 +376,7 @@ { CSCSETUIDEBUG( "CCSCSettingsUiMainContainer::InitializeSettingItemsL - begin" ); - + // Get supported subservices TSupportedSubServices supSubServices; iModel.CCHHandler().SupportedSubServicesL( @@ -382,7 +384,7 @@ // Make username setting MakeSettingItemL ( TMainListBoxItem::EUsername ); - + // Make password setting MakeSettingItemL ( TMainListBoxItem::EPassword ); @@ -410,30 +412,28 @@ } } } - + // Make setting item if IM is supported by service if ( supSubServices.iIm ) { // IM tone setting. MakeSettingItemL( TMainListBoxItem::EImTone ); } - + // Make setting item if presence is supported by service if ( supSubServices.iPresence ) { // Presence request preference MakeSettingItemL( TMainListBoxItem::EAutoacceptInv ); } - + // Connectivity setting (cannot be changed) MakeSettingItemL( TMainListBoxItem::EServiceConn ); - - + CSCSETUIDEBUG( "CCSCSettingsUiMainContainer::InitializeSettingItemsL - end" ); } - // --------------------------------------------------------------------------- // CCSCSettingsUiMainContainer::MakeSettingItemL // Constructs setting list items. @@ -444,23 +444,23 @@ { CSCSETUIDEBUG( "CCSCSettingsUiMainContainer::MakeSettingItemL - begin" ); - + // Get listbox items from model. CTextListBoxModel* model = iListBox->Model(); MDesCArray* textArray = model->ItemTextArray(); CDesCArray* listBoxItems = static_cast( textArray ); - + TBuf listBoxItemText ( KNullDesC ); - + TMainListBoxItem listBoxItem; listBoxItem.iItem = aItem; - + RBuf value; CleanupClosePushL( value ); - + value.CreateL( 1 ); value.Copy( KNullDesC ); - + switch ( aItem ) { case TMainListBoxItem::EUsername: @@ -513,19 +513,18 @@ KCSCSettingsUiListItemTextFormat, GetCaptionL( aItem ), &value ); - + CleanupStack::PopAndDestroy( &value ); - + // Add to listbox iListBoxItemArray.Append( listBoxItem ); listBoxItems->AppendL( listBoxItemText ); iListBox->HandleItemAdditionL(); - + CSCSETUIDEBUG( "CCSCSettingsUiMainContainer::MakeSettingItemL - end" ); } - // --------------------------------------------------------------------------- // CCSCSettingsUiMainContainer::GetCaptionL // Constructs setting list items. @@ -534,12 +533,12 @@ HBufC* CCSCSettingsUiMainContainer::GetCaptionL( TMainListBoxItem::TSettingItems aItem ) { - if( iCaption != NULL ) + if ( iCaption != NULL ) { delete iCaption; iCaption = NULL; } - + switch ( aItem ) { case TMainListBoxItem::EUsername: @@ -594,7 +593,7 @@ User::Leave( KErrArgument ); break; } - + return iCaption; } @@ -606,9 +605,8 @@ { aUsername.ReAllocL( KCCHMaxUsernameLength ); User::LeaveIfError( iModel.CCHHandler().GetConnectionParameter( - iModel.CurrentSPEntryId(), ECchUsername, aUsername ) ); + iModel.CurrentSPEntryId(), ECchUsername, aUsername ) ); } - // --------------------------------------------------------------------------- // CCSCSettingsUiMainContainer::GetPresencePrefSettingL @@ -618,18 +616,17 @@ { // Select text resource for the current pref telephony value TInt resource = ( iModel.SettingsHandler().IsPreferredTelephonyVoip() && - iModel.SettingsHandler().IsPreferredService( - iModel.CurrentSPEntryId() ) ) ? - R_CSCSETTINGSUI_SETTING_PREFERRED_SERVICE_ON : - R_CSCSETTINGSUI_SETTING_PREFERRED_SERVICE_OFF; - + iModel.SettingsHandler().IsPreferredService( + iModel.CurrentSPEntryId() ) ) ? + R_CSCSETTINGSUI_SETTING_PREFERRED_SERVICE_ON : + R_CSCSETTINGSUI_SETTING_PREFERRED_SERVICE_OFF; + HBufC* value = StringLoader::LoadLC( resource ); aValue.ReAllocL( value->Length() ); aValue.Copy( value->Des() ); CleanupStack::PopAndDestroy( value ); } - // --------------------------------------------------------------------------- // CCSCSettingsUiMainContainer::GetVccPreferredServiceSettingL // --------------------------------------------------------------------------- @@ -638,18 +635,17 @@ { // Select text resource for the current pref telephony value TInt resource = ( iModel.SettingsHandler().IsPreferredTelephonyVoip() && - iModel.SettingsHandler().IsPreferredService( - iModel.CurrentSPEntryId() ) ) ? - R_CSCSETTINGSUI_SETTING_VCC_PREFERRED_SERVICE_ON : - R_CSCSETTINGSUI_SETTING_VCC_PREFERRED_SERVICE_OFF; - + iModel.SettingsHandler().IsPreferredService( + iModel.CurrentSPEntryId() ) ) ? + R_CSCSETTINGSUI_SETTING_VCC_PREFERRED_SERVICE_ON : + R_CSCSETTINGSUI_SETTING_VCC_PREFERRED_SERVICE_OFF; + HBufC* value = StringLoader::LoadLC( resource ); aValue.ReAllocL( value->Length() ); aValue.Copy( value->Des() ); CleanupStack::PopAndDestroy( value ); } - // --------------------------------------------------------------------------- // CCSCSettingsUiMainContainer::GetHandoverNotificationToneL // --------------------------------------------------------------------------- @@ -659,10 +655,10 @@ { HBufC* value = NULL; TOnOff onOff = EOff; - + TRAPD( err, onOff = iModel.SettingsHandler().HandoverNotifTonePrefL( iModel.CurrentSPEntryId() ) ); - + if ( KErrNotFound == err ) { iModel.SettingsHandler().SetHandoverNotifTonePrefL( @@ -676,7 +672,7 @@ { // nothing to do } - + if ( EOff == onOff ) { value = StringLoader::LoadLC( @@ -699,14 +695,13 @@ { User::Leave( KErrGeneral ); } - + aValue.ReAllocL( value->Length() ); aValue.Copy( value->Des() ); - + CleanupStack::PopAndDestroy( value ); } - // --------------------------------------------------------------------------- // CCSCSettingsUiMainContainer::GetImToneSettingL // --------------------------------------------------------------------------- @@ -714,25 +709,25 @@ void CCSCSettingsUiMainContainer::GetImToneSettingL( RBuf& aValue ) { aValue.ReAllocL( KCSCMaxImToneLength ); - + MVIMPSTSettingsStore* settings = CVIMPSTSettingsStore::NewLC(); - + TInt err = settings->GetL( iModel.CurrentSPEntryId(), EServiceToneFileName, aValue ); - + // If tone path is not found from settings, set Off text if ( KErrNotFound == err || aValue.Length() < 2 ) { HBufC* noToneSelected = StringLoader::LoadLC( R_CSCSETTINGSUI_IM_TONE_OFF ); - + User::LeaveIfError( settings->SetL( iModel.CurrentSPEntryId(), EServiceToneFileName, *noToneSelected ) ); // Get tone. User::LeaveIfError( settings->GetL( iModel.CurrentSPEntryId(), EServiceToneFileName, aValue ) ); - + CleanupStack::PopAndDestroy( noToneSelected ); } else if ( err ) @@ -743,18 +738,17 @@ { // KErrNone -> do nothing } - + TInt pos( 0 ); while ( KErrNotFound != pos ) { pos = aValue.Find( KDoubleBackSlash ); aValue.Delete( 0, pos+1 ); } - + CleanupStack::PopAndDestroy(); } - // --------------------------------------------------------------------------- // CCSCSettingsUiMainContainer::GetPresencePrefSettingL // --------------------------------------------------------------------------- @@ -763,10 +757,10 @@ { HBufC* value = NULL; TOnOff onOff = EOff; - + TRAPD( err, onOff = iModel.SettingsHandler().PresenceReqPrefL( iModel.CurrentSPEntryId() ) ); - + if ( KErrNotFound == err ) { iModel.SettingsHandler().SetPresenceReqPrefL( @@ -780,7 +774,7 @@ { // nothing to do } - + if ( EOff == onOff ) { value = StringLoader::LoadLC( @@ -804,14 +798,13 @@ { User::Leave( KErrGeneral ); } - + aValue.ReAllocL( value->Length() ); aValue.Copy( value->Des() ); - + CleanupStack::PopAndDestroy( value ); } - // --------------------------------------------------------------------------- // CCSCSettingsUiMainContainer::GetSnapSettingL // --------------------------------------------------------------------------- @@ -823,7 +816,7 @@ TInt snapId( 0 ); TInt err = iModel.CCHHandler().GetConnectionParameter( iModel.CurrentSPEntryId(), ECchSnapId, snapId ); - + // If no error, try to get snap name. if ( KErrNone == err ) { @@ -839,7 +832,6 @@ } } - // --------------------------------------------------------------------------- // From class CoeControl // CCSCSettingsUiMainContainer::CountComponentControls @@ -850,7 +842,6 @@ return 1; } - // --------------------------------------------------------------------------- // From class CoeControl // CCSCSettingsUiMainContainer::SizeChanged @@ -861,7 +852,6 @@ iListBox->SetRect( Rect() ); } - // --------------------------------------------------------------------------- // From class CoeControl // CCSCSettingsUiMainContainer::FocusChanged @@ -871,9 +861,107 @@ TDrawNow aDrawNow ) { CCoeControl::FocusChanged( aDrawNow ); - - if( iListBox ) + + if ( iListBox ) { iListBox->SetFocus( IsFocused() ); } } + +// --------------------------------------------------------------------------- +// Deletes service. +// --------------------------------------------------------------------------- +// +void CCSCSettingsUiMainContainer::DeleteServiceL() + { + CSCSETUIDEBUG( "CCSCSettingsUiMainContainer::DeleteServiceL - begin" ); + + // Show confirmation query for service deletion. + // Create confirmation query dialog. + HBufC* string = NULL; + CAknQueryDialog* query = + new( ELeave ) CAknQueryDialog( CAknQueryDialog::ENoTone ); + + CleanupStack::PushL( query ); + query->PrepareLC( R_CSC_DELETE_SERVICE_QUERY ); + string = StringLoader::LoadLC( + R_QTN_CSC_DELETE_SERVICE_QUERY, + iModel.SettingsHandler().ServiceNameL( iModel.CurrentSPEntryId() ) ); + query->SetPromptL( *string ); + CleanupStack::PopAndDestroy( string ); + CleanupStack::Pop( query ); + if ( query->RunLD() ) + { + // First check if there is a service plugin UID. + TInt count = iModel.ServicePluginHandler().PluginCount( + CCSCEngServicePluginHandler::EInitialized ); + + TRAPD( err, LaunchCleanupPluginL( iModel.CurrentSPEntryId() ) ); + if ( KErrNone != err ) + { + iModel.SettingsHandler().DeleteServiceL( + iModel.CurrentSPEntryId() ); + } + } + + CSCSETUIDEBUG( "CCSCSettingsUiMainContainer::DeleteServiceL - end" ); + } + +// --------------------------------------------------------------------------- +// Launches cleanup plugin to remove settings. +// --------------------------------------------------------------------------- +// +void CCSCSettingsUiMainContainer::LaunchCleanupPluginL( + TUint aServiceId ) const + { + CSCSETUIDEBUG( + "CCSCSettingsUiMainContainer::LaunchCleanupPluginL - begin" ); + + RImplInfoPtrArray implInfoArray; + CleanupStack::PushL( TCleanupItem( + ResetAndDestroy, &implInfoArray ) ); + + REComSession::ListImplementationsL( + KCSCSettingsCleanupPluginInterfaceUid, + implInfoArray ); + + for ( TInt i( 0 ) ; i < implInfoArray.Count() ; i++ ) + { + CCSCEngSettingsCleanupPluginInterface* plugin = + CCSCEngSettingsCleanupPluginInterface::NewL( + implInfoArray[i]->ImplementationUid() ); + + CleanupStack::PushL( plugin ); + + if ( CCSCEngSettingsCleanupPluginInterface::ESipVoIPCleanupPlugin + == plugin->PluginType() ) + { + plugin->RemoveSettingsL( aServiceId ); + } + + CleanupStack::PopAndDestroy( plugin ); + } + + CleanupStack::PopAndDestroy( &implInfoArray ); + REComSession::FinalClose(); + + CSCSETUIDEBUG( + "CCSCSettingsUiMainContainer::LaunchCleanupPluginL - end" ); + } + +// --------------------------------------------------------------------------- +// CCSCSettingsUiMainContainer::ResetAndDestroy +// --------------------------------------------------------------------------- +// +void CCSCSettingsUiMainContainer::ResetAndDestroy( TAny* aArray ) + { + if ( aArray ) + { + RImplInfoPtrArray* array = + reinterpret_cast( aArray ); + array->ResetAndDestroy(); + } + } + +// End of file. + diff -r ed1e38b404e5 -r 6134b5029079 commsconfig/cscsettingsui/src/cscsettingsuimainview.cpp --- a/commsconfig/cscsettingsui/src/cscsettingsuimainview.cpp Wed Mar 31 21:20:05 2010 +0300 +++ b/commsconfig/cscsettingsui/src/cscsettingsuimainview.cpp Wed Apr 14 15:49:55 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -38,6 +38,8 @@ #include #include #include +#include +#include #include "cscconstants.h" #include "cscsettingsui.hrh" @@ -48,6 +50,7 @@ #include "cscsettingsuimainview.h" #include "cscsettingsuiconstants.h" #include "cscengservicepluginhandler.h" +#include "cscappui.h" #define AppUi() (static_cast(iAvkonAppUi) ) @@ -245,7 +248,7 @@ { CArrayFix* buf = AppUi()->AppHelpContextL(); HlpLauncher::LaunchHelpApplicationL( - iEikonEnv->WsSession(), buf ); + iEikonEnv->WsSession(), buf ); } break; } @@ -254,6 +257,14 @@ HandleReturnToPreviousViewL(); break; } + case ECSCSettingsUiDelete: + { + CSCSETUIDEBUG( " HandleCommandL - delete service" ); + iContainer->DeleteServiceL(); + iDeleted = ETrue; + HandleReturnToPreviousViewL(); + break; + } case EEikCmdExit: case EAknSoftkeyExit: { @@ -280,7 +291,7 @@ const TDesC8& /*aCustomMessage*/ ) { CSCSETUIDEBUG( "CCSCSettingsUiMainView::DoActivateL - begin" ); - + // Create container when view is activated. if ( !iContainer ) { @@ -290,22 +301,22 @@ AppUi()->AddToStackL( *this, iContainer ); iContainer->ListBox()->SetListBoxObserver( this ); } - + SetTitleTextL(); UpdateSoftkeysL(); iContainer->UpdateContainerL(); - - if (!iNaviPane) + + if ( !iNaviPane ) { iNaviPane = static_cast( iAvkonAppUi->StatusPane()->ControlL( TUid::Uid(EEikStatusPaneUidNavi))); } - + if ( !iNaviDecorator ) { iNaviDecorator = iNaviPane->CreateNavigationLabelL(); - iNaviPane->PushL(*iNaviDecorator); + iNaviPane->PushL( *iNaviDecorator ); } CSCSETUIDEBUG( "CCSCSettingsUiMainView::DoActivateL - end" ); @@ -321,9 +332,9 @@ { CSCSETUIDEBUG( "CCSCSettingsUiMainView::DoDeactivate - begin" ); - if (iNaviPane && iNaviDecorator) + if ( iNaviPane && iNaviDecorator ) { - iNaviPane->Pop(iNaviDecorator); + iNaviPane->Pop( iNaviDecorator ); } delete iNaviDecorator; iNaviDecorator = NULL; @@ -430,7 +441,7 @@ { TMainListBoxItem listBoxItem = iContainer->CurrentItem(); - switch( listBoxItem.iItem ) + switch ( listBoxItem.iItem ) { // Hide "Change" and show "Open" case TMainListBoxItem::EServiceConn: @@ -454,6 +465,11 @@ aMenuPane->SetItemDimmed( ECSCSettingsUiOpen, ETrue ); break; } + if ( !(iModel.CCHHandler().IsServiceDisabled( + iModel.CurrentSPEntryId() ) ) ) + { + aMenuPane->SetItemDimmed( ECSCSettingsUiDelete, ETrue ); + } } CSCSETUIDEBUG( "CCSCSettingsUiMainView::DynInitMenuPaneL - end" ); @@ -856,25 +872,36 @@ if ( iModel.ReturnViewId() != KNullUid ) { TUid tabview( KNullUid ); - TRAPD( err, tabview.iUid = iModel.SettingsHandler().ServiceTabViewIdL( + + // Error code not needed. + TRAP_IGNORE( + tabview.iUid = iModel.SettingsHandler().ServiceTabViewIdL( iModel.CurrentSPEntryId() ) ) - - if ( tabview.iUid == iModel.ReturnViewId().iUid && !err ) + + if ( iDeleted && KCSCServiceViewId != iModel.ReturnViewId() ) + { + TVwsViewId idleId; + AknDef::GetPhoneIdleViewId( idleId ); + ActivateViewL( idleId ); + AppUi()->HandleCommandL( EEikCmdExit ); + } + else if ( tabview.iUid == iModel.ReturnViewId().iUid ) { RxSPViewServices viewServices; TInt err = viewServices.Activate( KPhoneBookTabUid.iUid, iModel.ReturnViewId().iUid ); - + CSCSETUIDEBUG2( " --> ACTIVATE ERR=%d", err ); - + AppUi()->HandleCommandL( EEikCmdExit ); } else - { - // Not launched from service tab, activate previsous view + { + // Not deleted or launched from service tab, + // activate previous view. AppUi()->ActivateLocalViewL( iModel.ReturnViewId() ); - } + } } CSCSETUIDEBUG( @@ -942,3 +969,5 @@ CSCSETUIDEBUG( "CCSCSettingsUiMainView::ResetViewL - OUT" ); } +// End of file. + diff -r ed1e38b404e5 -r 6134b5029079 commsconfig/cscsettingsui/src/cscsettingsuimodel.cpp --- a/commsconfig/cscsettingsui/src/cscsettingsuimodel.cpp Wed Mar 31 21:20:05 2010 +0300 +++ b/commsconfig/cscsettingsui/src/cscsettingsuimodel.cpp Wed Apr 14 15:49:55 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -31,6 +31,7 @@ #include "cscsettingsuiconstants.h" #include "cscengdestinationshandler.h" #include "mcscsettingsuimodelobserver.h" +#include "cscengservicepluginhandler.h" // ======== MEMBER FUNCTIONS ======== @@ -52,19 +53,23 @@ void CCSCSettingsUiModel::ConstructL() { CSCSETUIDEBUG( "CCSCSettingsUiModel::ConstructL - begin" ); - + // Create handle to CSC's Service Provider Settings Handler. iSPSHandler = CCSCEngServiceHandler::NewL( this ); - + // Create handle to CSC's Converged Connection Handler. iCCHHandler = CCSCEngCCHHandler::NewL( *this ); - + // Create handle to CSC's Destinations Handler. iDestinationsHandler = CCSCEngDestinationsHandler::NewL(); - + // Create handle to CSC's Branding Server Handler. iBSHandler = CCSCEngBrandingHandler::NewL(); - + + // Create CSC's Service Plugin Handler. + iServicePluginHandler = CCSCEngServicePluginHandler::NewL( + iEikEnv, *this, *iSPSHandler ); + CSCSETUIDEBUG( "CCSCSettingsUiModel::ConstructL - end" ); } @@ -109,6 +114,7 @@ delete iSPSHandler; delete iCCHHandler; delete iDestinationsHandler; + delete iServicePluginHandler; CSCSETUIDEBUG( "CCSCSettingsUiModel::~CCSCSettingsUiModel - end" ); } @@ -157,6 +163,16 @@ } // --------------------------------------------------------------------------- +// CCSCSettingsUiModel::ServicePluginHandler +// Returns reference to CSC's Service Plugin Handler. +// --------------------------------------------------------------------------- +// +CCSCEngServicePluginHandler& CCSCSettingsUiModel::ServicePluginHandler() const + { + return *iServicePluginHandler; + } + +// --------------------------------------------------------------------------- // CCSCSettingsUiModel::StoreInitializationDataL // Stores initialization information. // --------------------------------------------------------------------------- @@ -166,10 +182,10 @@ TUint aServiceId ) { CSCSETUIDEBUG( "CCSCSettingsUiModel::StoreInitializationDataL - begin" ); - + // View id for customer application return view id. iViewId = aViewId; - + // Check that service exists in service table. RArray spEntryIds; CleanupClosePushL( spEntryIds ); @@ -177,7 +193,7 @@ User::LeaveIfError( spEntryIds.Find( aServiceId ) ); CleanupStack::PopAndDestroy( &spEntryIds ); iServiceId = aServiceId; - + CSCSETUIDEBUG( "CCSCSettingsUiModel::StoreInitializationDataL - end" ); } @@ -227,7 +243,7 @@ TCCHSubserviceType /*aType*/, const TCchServiceStatus& /*aServiceStatus*/ ) { - // not used + // Not used. } @@ -238,6 +254,16 @@ // void CCSCSettingsUiModel::NotifyServiceChange() { - // not used + // Not used. } - + +// --------------------------------------------------------------------------- +// From MCSCProvisioningObserver. +// CCSCSettingsUiModel::NotifyServicePluginResponse +// --------------------------------------------------------------------------- +// +void CCSCSettingsUiModel::NotifyServicePluginResponse( + const CCSCEngServicePluginHandler::TServicePluginResponse& /*aResponse*/, + const TInt /*aIndex*/, const TUid& /*aPluginUid*/ ) + { + } diff -r ed1e38b404e5 -r 6134b5029079 commsconfig/cscsipvoipcleanupplugin/src/cscsvcpluginhandler.cpp --- a/commsconfig/cscsipvoipcleanupplugin/src/cscsvcpluginhandler.cpp Wed Mar 31 21:20:05 2010 +0300 +++ b/commsconfig/cscsipvoipcleanupplugin/src/cscsvcpluginhandler.cpp Wed Apr 14 15:49:55 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -252,7 +252,8 @@ internetSnapId = dest.MetadataL( CMManager::ESnapMetadataInternet ); if( internetSnapId == KErrNone ) { - dest.DeleteLD(); + // May leave if some connection method inside SNAP is in use + TRAP_IGNORE( dest.DeleteLD() ); } CleanupStack::PopAndDestroy( &dest ); diff -r ed1e38b404e5 -r 6134b5029079 commsconfig/help/group/bld.inf --- a/commsconfig/help/group/bld.inf Wed Mar 31 21:20:05 2010 +0300 +++ b/commsconfig/help/group/bld.inf Wed Apr 14 15:49:55 2010 +0300 @@ -1,19 +1,17 @@ /* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* 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 -* +* Nokia Corporation - initial contribution. +* * Contributors: -* -* -* Description: -* Export help related files. +* +* Description: Export help related files. * */ diff -r ed1e38b404e5 -r 6134b5029079 convergedconnectionhandler/cchclientapi/cchuinotif/inc/cchuinotifier.h --- a/convergedconnectionhandler/cchclientapi/cchuinotif/inc/cchuinotifier.h Wed Mar 31 21:20:05 2010 +0300 +++ b/convergedconnectionhandler/cchclientapi/cchuinotif/inc/cchuinotifier.h Wed Apr 14 15:49:55 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -265,6 +265,11 @@ */ TUint iServiceId; + /** + * Flag to determine if application key is blocked. + */ + TBool iAppKeyBlocked; + CCHUI_UNIT_TEST( T_CchUiNotifierBase ) }; diff -r ed1e38b404e5 -r 6134b5029079 convergedconnectionhandler/cchclientapi/cchuinotif/src/cchuinotifier.cpp --- a/convergedconnectionhandler/cchclientapi/cchuinotif/src/cchuinotifier.cpp Wed Mar 31 21:20:05 2010 +0300 +++ b/convergedconnectionhandler/cchclientapi/cchuinotif/src/cchuinotifier.cpp Wed Apr 14 15:49:55 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -29,6 +29,8 @@ #include #include // KCRUidCoreApplicationUIs, // KCoreAppUIsNetworkConnectionAllowed +#include // Application Key enable/disable + #include "cchuilogger.h" #include "cchuinotifier.h" #include "cchuinotifconnectionhandler.h" @@ -41,7 +43,8 @@ // ======== MEMBER FUNCTIONS ======== -CCCHUiNotifierBase::CCCHUiNotifierBase(): CActive(EPriorityStandard) +CCCHUiNotifierBase::CCCHUiNotifierBase(): + CActive(EPriorityStandard), iAppKeyBlocked( EFalse ) { CActiveScheduler::Add(this); } @@ -78,6 +81,13 @@ CCCHUiNotifierBase::~CCCHUiNotifierBase() { CCHUIDEBUG( "CCCHUiNotifierBase::~CCCHUiNotifierBase - IN" ); + + if( iAppKeyBlocked ) + { + (void) ((CAknNotifierAppServerAppUi*) + iEikEnv->EikAppUi())->SuppressAppSwitching(EFalse); + } + Cancel(); delete iSettings; @@ -170,7 +180,7 @@ // --------------------------------------------------------------------------- // void CCCHUiNotifierBase::StartL( - const TDesC8& aBuffer, + const TDesC8& /*aBuffer*/, TInt aReplySlot, const RMessagePtr2& aMessage ) { diff -r ed1e38b404e5 -r 6134b5029079 convergedconnectionhandler/cchclientapi/cchuinotif/src/cchuinotifierimpl.cpp --- a/convergedconnectionhandler/cchclientapi/cchuinotif/src/cchuinotifierimpl.cpp Wed Mar 31 21:20:05 2010 +0300 +++ b/convergedconnectionhandler/cchclientapi/cchuinotif/src/cchuinotifierimpl.cpp Wed Apr 14 15:49:55 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -26,6 +26,7 @@ #include #include #include +#include // Application Key enable/disable #include "cchuilogger.h" #include "cchuicommon.hrh" @@ -60,6 +61,14 @@ { CCHUIDEBUG( "CCCHUiNotifierImpl::~CCCHUiNotifierImpl - IN" ); + if ( iAppKeyBlocked ) + { + // Remove application key blocking + (void) ((CAknNotifierAppServerAppUi*) + iEikEnv->EikAppUi())->SuppressAppSwitching(EFalse); + iAppKeyBlocked = EFalse; + } + CCCHUiNotifierBase::Cancel(); iListQueryDialog = NULL; delete iBrandingHandler; @@ -146,6 +155,11 @@ CAknMultiLineDataQueryDialog* dlg = CAknMultiLineDataQueryDialog::NewL( ptrUserName, ptrPassWord ); + + // Block application key while showing query + (void) ((CAknNotifierAppServerAppUi*) + iEikEnv->EikAppUi())->SuppressAppSwitching(ETrue); + iAppKeyBlocked = ETrue; if ( dlg->ExecuteLD( R_CCHUINOTIF_USERNAME_PWD_DIALOG ) ) { @@ -163,6 +177,12 @@ CCHUIDEBUG( "ShowUsernamePasswordQueryL - cancelled" ); CompleteMessage( KErrCancel ); } + + // Remove application key blocking + (void) ((CAknNotifierAppServerAppUi*) + iEikEnv->EikAppUi())->SuppressAppSwitching(EFalse); + iAppKeyBlocked = EFalse; + CleanupStack::PopAndDestroy( passWord ); CleanupStack::PopAndDestroy( userName ); @@ -263,7 +283,12 @@ { // Error occurred in RetrieveServiceIconL. Nothing to do. } - + + // Block application key while showing query + (void) ((CAknNotifierAppServerAppUi*) + iEikEnv->EikAppUi())->SuppressAppSwitching(ETrue); + iAppKeyBlocked = ETrue; + CCHUIDEBUG( "ShowNoConnectionsQueryL - run dialog" ); iListQueryDialog->RunLD(); CCHUIDEBUG( "ShowNoConnectionsQueryL - run dialog done" ); @@ -289,6 +314,12 @@ CCHUIDEBUG( "ShowNoConnectionsQueryL - complete with cancel" ); CompleteMessage( KErrCancel ); } + + // Remove application key blocking + (void) ((CAknNotifierAppServerAppUi*) + iEikEnv->EikAppUi())->SuppressAppSwitching(EFalse); + iAppKeyBlocked = EFalse; + CleanupStack::PopAndDestroy( string ); CleanupStack::PopAndDestroy( &commandArray ); CleanupStack::PopAndDestroy( arrayforDialog ); @@ -399,7 +430,12 @@ { // Error occurred in RetrieveServiceIconL. Nothing to do. } - + + // Block application key while showing query + (void) ((CAknNotifierAppServerAppUi*) + iEikEnv->EikAppUi())->SuppressAppSwitching(ETrue); + iAppKeyBlocked = ETrue; + CCHUIDEBUG( "ShowChangeConnectionQueryL - run dialog" ); // List query dialog is deleted via RunLD except if there is @@ -435,6 +471,11 @@ iListQueryDialog = NULL; } + // Remove application key blocking + (void) ((CAknNotifierAppServerAppUi*) + iEikEnv->EikAppUi())->SuppressAppSwitching(EFalse); + iAppKeyBlocked = EFalse; + CleanupStack::PopAndDestroy( string ); CleanupStack::PopAndDestroy( &iapName ); CleanupStack::PopAndDestroy( &commandArray ); @@ -622,6 +663,11 @@ query->SetPromptL( *textForQuery ); CleanupStack::PopAndDestroy( textForQuery ); CleanupStack::Pop( query ); + + // Block application key while showing query + (void) ((CAknNotifierAppServerAppUi*) + iEikEnv->EikAppUi())->SuppressAppSwitching(ETrue); + iAppKeyBlocked = ETrue; // Run query if( query->RunLD() ) @@ -657,6 +703,11 @@ CompleteMessage( KErrCancel ); } + // Remove application key blocking + (void) ((CAknNotifierAppServerAppUi*) + iEikEnv->EikAppUi())->SuppressAppSwitching(EFalse); + iAppKeyBlocked = EFalse; + CleanupStack::PopAndDestroy( &iapName ); CCHUIDEBUG( "CCCHUiNotifierImpl::ShowConfirmChangeConnectionL - OUT" ); @@ -699,6 +750,11 @@ CCHUIDEBUG( "ShowGprsSelectionL - set item array" ); dialog->SetItemTextArray( arrayforDialog ); dialog->SetOwnershipType( ELbmDoesNotOwnItemArray ); + + // Block application key while showing query + (void) ((CAknNotifierAppServerAppUi*) + iEikEnv->EikAppUi())->SuppressAppSwitching(ETrue); + iAppKeyBlocked = ETrue; CCHUIDEBUG( "ShowGprsSelectionL - run dialog" ); dialog->RunLD(); @@ -714,6 +770,11 @@ { User::Leave( KErrCancel ); } + + // Remove application key blocking + (void) ((CAknNotifierAppServerAppUi*) + iEikEnv->EikAppUi())->SuppressAppSwitching(EFalse); + iAppKeyBlocked = EFalse; CleanupStack::PopAndDestroy( string ); CleanupStack::PopAndDestroy( arrayforDialog ); diff -r ed1e38b404e5 -r 6134b5029079 convergedconnectionhandler/cchclientapi/src/cchserviceimpl.cpp --- a/convergedconnectionhandler/cchclientapi/src/cchserviceimpl.cpp Wed Mar 31 21:20:05 2010 +0300 +++ b/convergedconnectionhandler/cchclientapi/src/cchserviceimpl.cpp Wed Apr 14 15:49:55 2010 +0300 @@ -136,10 +136,29 @@ TInt CCchServiceImpl::Enable( TCCHSubserviceType aType ) { CCHLOGSTRING( "CCchServiceImpl::Enable: IN" ); - - iAsynchroniser->Enable(aType); + TInt error = KErrNone; + if (iCch.ConnectivityDialogsAllowed()) + { + CCHLOGSTRING( "CCchServiceImpl::Enable: Async mode" ); + iAsynchroniser->Enable(aType); + } + else + { + CCHLOGSTRING( "CCchServiceImpl::Enable: Sync mode" ); + TServiceSelection selection( iServiceId, aType ); + TRequestStatus status = KErrNone; + iCch.CchClient().EnableService( selection, status, EFalse ); + + //even the cchclient api seems to be asynchronous, + //this method is completed immediately + User::WaitForRequest( status ); + error = status.Int(); + } + + CCHLOGSTRING2( " CCchServiceImpl::Enable: return %d", error ); + CCHLOGSTRING( "CCchServiceImpl::Enable: OUT" ); - return KErrNone; + return error; } // --------------------------------------------------------------------------- diff -r ed1e38b404e5 -r 6134b5029079 convergedconnectionhandler/cchclientapi/src/cchuiconnectionhandler.cpp --- a/convergedconnectionhandler/cchclientapi/src/cchuiconnectionhandler.cpp Wed Mar 31 21:20:05 2010 +0300 +++ b/convergedconnectionhandler/cchclientapi/src/cchuiconnectionhandler.cpp Wed Apr 14 15:49:55 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -431,8 +431,9 @@ if ( destination.Id() != aDestination.Id() ) { CCHUIDEBUG( "Copy existing connection method to destination" ); - iCmManagerExt.CopyConnectionMethodL( - aDestination, connectionMethod ); + + aDestination.AddConnectionMethodL( + connectionMethod.CreateCopyL() ); } TRAP_IGNORE( aDestination.ModifyPriorityL( connectionMethod, KCmHighestPriority ) ); @@ -649,7 +650,7 @@ TInt conMethodCount = targetSnap.ConnectionMethodCount(); TUint32 sourceIapId = sourceConn.GetIntAttributeL( CMManager::ECmIapId ); - TBool matchFound = false; + TBool matchFound( EFalse ); for ( TInt ndx = 0 ; ndx < conMethodCount && matchFound == 0; ndx ++ ) { @@ -660,16 +661,16 @@ if( targetIapId == sourceIapId ) { - matchFound =true; + matchFound = ETrue; } CleanupStack::PopAndDestroy( &cm ); } if( !matchFound ) { CCHUIDEBUG( - "CopyIapToServiceSnapL - Get source connection ok -> copy connection"); + "CopyIapToServiceSnapL - Get source connection ok -> add connection"); - iCmManagerExt.CopyConnectionMethodL( targetSnap, sourceConn ); + targetSnap.AddConnectionMethodL( sourceConn.CreateCopyL() ); } CleanupStack::PopAndDestroy( &sourceConn ); CleanupStack::PopAndDestroy( &targetSnap ); diff -r ed1e38b404e5 -r 6134b5029079 convergedconnectionhandler/cchserver/src/cchservicehandler.cpp --- a/convergedconnectionhandler/cchserver/src/cchservicehandler.cpp Wed Mar 31 21:20:05 2010 +0300 +++ b/convergedconnectionhandler/cchserver/src/cchservicehandler.cpp Wed Apr 14 15:49:55 2010 +0300 @@ -614,7 +614,6 @@ CCHLOGSTRING2( "CCCHServiceHandler[0x%x]::HandleDelayedNotifyEvent IN", this ); - iDelayedHandleNotifyServiceId = 0; CancelHandleNotifyDelayTimer(); TServiceSelection selection; @@ -659,6 +658,7 @@ TRAP_IGNORE( UpdateL( ETrue ) ); } + iDelayedHandleNotifyServiceId = 0; CCHLOGSTRING( "CCCHServiceHandler::HandleDelayedNotifyEvent OUT" ); } diff -r ed1e38b404e5 -r 6134b5029079 sipvoipprovider/inc/svpconsts.h --- a/sipvoipprovider/inc/svpconsts.h Wed Mar 31 21:20:05 2010 +0300 +++ b/sipvoipprovider/inc/svpconsts.h Wed Apr 14 15:49:55 2010 +0300 @@ -115,6 +115,8 @@ _LIT8( KSVPRightBracketMark, ">"); _LIT( KSVPRightBracketMark2, ">" ); _LIT8( KSVPAuthidentity, "?X-Sipx-Authidentity="); +_LIT8( KSVPAuthidentity2, "?X-sipX-Authidentity="); + // uri length const TUint KSVPMaxUriLength = 100; // codec name length, max @@ -173,6 +175,8 @@ _LIT8( KSVPTo_tag, "%3Bto-tag%3D" ); _LIT8( KSVPFrom_tag, "%3Bfrom-tag%3D" ); _LIT8( KSVPFromPrompt, "From: "); +_LIT8( KSVPPIdentity, "P-Preferred-Identity: "); + const TUint KSVPFromPromptStringlength = 6; _LIT8( KSVPReplacesColonTxt, "Replaces:" ); diff -r ed1e38b404e5 -r 6134b5029079 sipvoipprovider/inc/svpsipconsts.h --- a/sipvoipprovider/inc/svpsipconsts.h Wed Mar 31 21:20:05 2010 +0300 +++ b/sipvoipprovider/inc/svpsipconsts.h Wed Apr 14 15:49:55 2010 +0300 @@ -36,7 +36,8 @@ _LIT8( KSVPNotifyOK, "SIP/2.0 200 OK" ); _LIT8( KSVPBusyHereReason, "SIP/2.0 486 Busy Here" ); _LIT8( KSVPNotifyServiceUnavailable, "SIP/2.0 503 Service Unavailable" ); - +_LIT8( KSVPNotifyRinging183, "SIP/2.0 183 Ringing" ); +_LIT8( KSVPNotifyOk2, "SIP/2.0 200 Ok" ); //Response messages //Provisional 1xx diff -r ed1e38b404e5 -r 6134b5029079 sipvoipprovider/inc/svputility.h --- a/sipvoipprovider/inc/svputility.h Wed Mar 31 21:20:05 2010 +0300 +++ b/sipvoipprovider/inc/svputility.h Wed Apr 14 15:49:55 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -217,6 +217,17 @@ */ HBufC8* SetMoFromHeaderLC( TUint aSecurityStatus ); + + /** + * Adds P-Preferred-Identity to user headers. + * @since Series 60 3.2 + * @param aUserAgentHeaders user agent headers. + * @param aUri own sip uri. + * @return void + */ + void AddPPreferredIdentityToUserHeadersL( + CDesC8Array& aUserAgentHeaders, const TDesC8& aUri ); + /** * Updates the jitterbuffer size to given RTP source. Function resets * the iJitterBufferSize member, which is got when finding MO/MT codecs diff -r ed1e38b404e5 -r 6134b5029079 sipvoipprovider/src/svpmosession.cpp --- a/sipvoipprovider/src/svpmosession.cpp Wed Mar 31 21:20:05 2010 +0300 +++ b/sipvoipprovider/src/svpmosession.cpp Wed Apr 14 15:49:55 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -114,6 +114,19 @@ userEqphone ); CleanupStack::PushL( uri ); + // Add P-Preferred-Identity header if CLIR is on + if ( iSVPUtility.IsCLIROnL() ) + { + const TDesC8* userAor = NULL; + TInt err = profile->GetParameter( KSIPUserAor, userAor ); + + if ( !err ) + { + iSVPUtility.AddPPreferredIdentityToUserHeadersL( + *aUserHeaders, *userAor ); + } + } + // create Mce out session if ( KSVPStatusNonSecure == aSecurityStatus ) { diff -r ed1e38b404e5 -r 6134b5029079 sipvoipprovider/src/svpsessionbase.cpp --- a/sipvoipprovider/src/svpsessionbase.cpp Wed Mar 31 21:20:05 2010 +0300 +++ b/sipvoipprovider/src/svpsessionbase.cpp Wed Apr 14 15:49:55 2010 +0300 @@ -1574,6 +1574,18 @@ SVPDEBUG1( "CSVPSessionBase::HandleStreamStateChange - Resume ICMP, Sink" ) TRAP_IGNORE( StartTimerL( KSVPSinkResumeICMPErrorTime, KSVPSinkResumeICMPErrorTimerExpired ) ) } + + else if ( !HasHoldController() && !aSink.IsEnabled() && CMceSession::EEstablished == sessionState && + CMceMediaStream::EDisabled == aStream.State() ) + { + // Not a hold case, mediaStream and sink is disabled -> try enable after a while + SVPDEBUG1( "CSVPSessionBase::HandleStreamStateChange - ICMP, Sink and MediaStream" ) + if ( !IsSessionMuted() ) + { + SVPDEBUG1( "CSVPSessionBase::HandleStreamStateChange - ICMP, Sink not enabled -> enable" ) + aSink.EnableL(); + } + } } SVPDEBUG1( "CSVPSessionBase::HandleStreamStateChange(aStream,aSink) Out" ) @@ -1616,6 +1628,18 @@ SVPDEBUG1( "CSVPSessionBase::HandleStreamStateChange - Resume ICMP, Source" ) TRAP_IGNORE( StartTimerL( KSVPSourceResumeICMPErrorTime, KSVPSourceResumeICMPErrorTimerExpired ) ) } + + else if ( !HasHoldController() && !aSource.IsEnabled() && CMceSession::EEstablished == sessionState && + CMceMediaStream::EDisabled == aStream.State() ) + { + // Not a hold case, mediaStream and source is disabled -> try enable after a while + SVPDEBUG1( "CSVPSessionBase::HandleStreamStateChange - ICMP, Source and MediaStream" ) + if ( !IsSessionMuted() ) + { + SVPDEBUG1( "CSVPSessionBase::HandleStreamStateChange - ICMP, Source not enabled -> enable" ) + aSource.EnableL(); + } + } } SVPDEBUG1( "CSVPSessionBase::HandleStreamStateChange(aStream,aSource) Out" ) diff -r ed1e38b404e5 -r 6134b5029079 sipvoipprovider/src/svpsslogcall.cpp --- a/sipvoipprovider/src/svpsslogcall.cpp Wed Mar 31 21:20:05 2010 +0300 +++ b/sipvoipprovider/src/svpsslogcall.cpp Wed Apr 14 15:49:55 2010 +0300 @@ -220,8 +220,8 @@ } } else - { - title = tempContactItem->GetContactTitleL(); + { + title = tempContactItem->GetContactTitleL(); compId = contactId; ind = count; } @@ -281,42 +281,42 @@ TLogString number; CnvUtfConverter::ConvertToUnicodeFromUtf8( number, aFrom ); - RemoveUnusedCharsFromSipAddress( number ); - SVPDEBUG2(" CSVPSSLogCall::HandleCallLoggingL, number = %S", &number ); + RemoveUnusedCharsFromSipAddress( number ); + SVPDEBUG2(" CSVPSSLogCall::HandleCallLoggingL, number = %S", &number ); if ( KErrNotFound == aFrom.Find( KSVPAnonymousName8 ) ) { SVPDEBUG1(" CSVPSSLogCall::HandleCallLoggingL, URI address is seen" ); HBufC* contactName = FindContactTitleL( number ); - if ( contactName ) - { - // Phonebook contact id has been found - tempBufTwo.Copy( number ); - iLogEvent->SetRemoteParty( contactName->Des() ); - } - else - { // No phonebook contact id has been found - tempBufTwo.Copy( number ); - iLogEvent->SetRemoteParty( number ); - } - - if ( contactName ) - { - delete contactName; - contactName = NULL; - } - - tempBufOne.Append( tempBufTwo ); - tempBufTwo.Zero(); - tempBufOne.Append( KLogFieldDelimiter() ); - tempBufOne.Append( KLogTagMA() ); - tempBufOne.Append( KLogValueDelimiter() ); - } + if ( contactName ) + { + // Phonebook contact id has been found + tempBufTwo.Copy( number ); + iLogEvent->SetRemoteParty( contactName->Des() ); + } + else + { // No phonebook contact id has been found + tempBufTwo.Copy( number ); + iLogEvent->SetRemoteParty( number ); + } + + if ( contactName ) + { + delete contactName; + contactName = NULL; + } + + tempBufOne.Append( tempBufTwo ); + tempBufTwo.Zero(); + tempBufOne.Append( KLogFieldDelimiter() ); + tempBufOne.Append( KLogTagMA() ); + tempBufOne.Append( KLogValueDelimiter() ); + } else - { + { SVPDEBUG1(" CSVPSSLogCall::HandleCallLoggingL, URI address is Anonymous" ); iLogEvent->SetRemoteParty( KSVPPrivateNumber ); - } + } TRAP_IGNORE( iLogEvent->SetDataL( tempBufOne ) ); TTime eventTime; eventTime.UniversalTime(); diff -r ed1e38b404e5 -r 6134b5029079 sipvoipprovider/src/svputility.cpp --- a/sipvoipprovider/src/svputility.cpp Wed Mar 31 21:20:05 2010 +0300 +++ b/sipvoipprovider/src/svputility.cpp Wed Apr 14 15:49:55 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -1685,6 +1685,25 @@ } // --------------------------------------------------------------------------- +// CSVPUtility::AddPPreferredIdentityToUserHeaders +// --------------------------------------------------------------------------- +// +void CSVPUtility::AddPPreferredIdentityToUserHeadersL( + CDesC8Array& aUserAgentHeaders, const TDesC8& aUri ) + { + SVPDEBUG1( "CSVPUtility::AddPPreferredIdentityToUserHeadersL In" ) + + TBuf8 pPreferredHeaderString; + pPreferredHeaderString.Append( KSVPPIdentity ); + pPreferredHeaderString.Append( KSVPLeftBracketMark ); + pPreferredHeaderString.Append( aUri ); + pPreferredHeaderString.Append( KSVPRightBracketMark ); + aUserAgentHeaders.AppendL( pPreferredHeaderString ); + + SVPDEBUG1( "CSVPUtility::AddPPreferredIdentityToUserHeadersL Out " ) + } + +// --------------------------------------------------------------------------- // CSVPUtility::GetTerminalTypeL // --------------------------------------------------------------------------- // diff -r ed1e38b404e5 -r 6134b5029079 sipvoipprovider/svptransfer/src/svptransfercontroller.cpp --- a/sipvoipprovider/svptransfer/src/svptransfercontroller.cpp Wed Mar 31 21:20:05 2010 +0300 +++ b/sipvoipprovider/svptransfer/src/svptransfercontroller.cpp Wed Apr 14 15:49:55 2010 +0300 @@ -27,10 +27,6 @@ #include "svpsipconsts.h" #include "svpconsts.h" -// These have to be handled as well -_LIT8( KSVPNotifyRinging183, "SIP/2.0 183 Ringing" ); -_LIT8( KSVPNotifyOk, "SIP/2.0 200 Ok" ); - // --------------------------------------------------------------------------- // CSVPTransferController::CSVPTransferController // --------------------------------------------------------------------------- @@ -230,7 +226,7 @@ } } else if ( !content->Find( TPtrC8( KSVPNotifyOK ) ) || - !content->Find( TPtrC8( KSVPNotifyOk ) ) ) + !content->Find( TPtrC8( KSVPNotifyOk2 ) ) ) { if ( iTransferContext->IsAttended() ) { diff -r ed1e38b404e5 -r 6134b5029079 sipvoipprovider/svptransfer/src/svptransferstatecontext.cpp --- a/sipvoipprovider/svptransfer/src/svptransferstatecontext.cpp Wed Mar 31 21:20:05 2010 +0300 +++ b/sipvoipprovider/svptransfer/src/svptransferstatecontext.cpp Wed Apr 14 15:49:55 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -275,13 +275,29 @@ { if ( iIncomingReplaces && IsAttended() ) { - SVPDEBUG1( "CSVPTransferStateContext::SetTransferDataL: add replaces header" ) - TBuf8 replacesString; - replacesString.Append( KSVPReplacesColonTxt ); - // add IncomingReplaces - replacesString.Append( IncomingReplaces() ); + SVPDEBUG1( "CSVPTransferStateContext::SetTransferDataL: Add replaces header" ) + // fetch "replaces:" string + HBufC* replacesStringHeap16 = IncomingReplaces().AllocLC(); // CS: 1 + + // Copy incoming replaces to 8-bit buffer + HBufC8* replacesStringHeap8 = + HBufC8::NewLC( replacesStringHeap16->Length() + + KSVPReplacesColonTxt().Length() ); // CS: 2 + + replacesStringHeap8->Des().Copy( *replacesStringHeap16 ); + CleanupStack::Pop( 1 ); + CleanupStack::PushL( replacesStringHeap8 ); // ReAlloc possible + + // add replaces header + replacesStringHeap8->Des().Insert( 0, KSVPReplacesColonTxt ); + CleanupStack::Pop( 1 ); + CleanupStack::PushL( replacesStringHeap8 ); // ReAlloc possible + SVPDEBUG2( "CSVPTransferStateContext::SetTransferDataL - length: %d", replacesStringHeap8->Length() ) + // Finally add collected Replaces string to header - aUserAgentHeaders->AppendL( replacesString ); + aUserAgentHeaders->AppendL( *replacesStringHeap8 ); + CleanupStack::PopAndDestroy( replacesStringHeap8 ); // CS: 1 + CleanupStack::PopAndDestroy( replacesStringHeap16 ); // CS: 0 } if ( iIncomingReferredBy ) @@ -736,7 +752,14 @@ TInt CSVPTransferStateContext::CheckAuthidentity( const TDesC8& aUri ) const { SVPDEBUG1( "CSVPTransferStateContext::CheckAuthidentity" ) - return ( aUri.Find( KSVPAuthidentity ) ); + TInt returnValue = aUri.Find( KSVPAuthidentity ); + SVPDEBUG2( "CSVPTransferStateContext::CheckAuthidentity return: %d", returnValue ) + if ( returnValue == KErrNotFound ) + { + returnValue = aUri.Find( KSVPAuthidentity2 ); + SVPDEBUG2( "CSVPTransferStateContext::CheckAuthidentity second return: %d", returnValue ) + } + return returnValue; } // --------------------------------------------------------------------------- diff -r ed1e38b404e5 -r 6134b5029079 voipplugins/sipconnectionprovider/group/sipconnectionprovider.mmp --- a/voipplugins/sipconnectionprovider/group/sipconnectionprovider.mmp Wed Mar 31 21:20:05 2010 +0300 +++ b/voipplugins/sipconnectionprovider/group/sipconnectionprovider.mmp Wed Apr 14 15:49:55 2010 +0300 @@ -80,6 +80,7 @@ LIBRARY ipvoicemailengine.lib LIBRARY bafl.lib LIBRARY inetprotutil.lib +LIBRARY cmmanager.lib // access to uiservicetabsettings LIBRARY vimpstsettings.lib diff -r ed1e38b404e5 -r 6134b5029079 voipplugins/sipconnectionprovider/inc/scpservicemanager.h --- a/voipplugins/sipconnectionprovider/inc/scpservicemanager.h Wed Mar 31 21:20:05 2010 +0300 +++ b/voipplugins/sipconnectionprovider/inc/scpservicemanager.h Wed Apr 14 15:49:55 2010 +0300 @@ -325,6 +325,14 @@ const TDesC8& aPassword, TBool aSetPassword ); + /** + * Checks restricted connections. In case where voip is not + * allowed via 3g and 3g ap is first ap, leave with error + * KCCHErrorAccessPointNotDefined so user can select another ap. + * @param aServiceId Service Id + */ + void CheckRestrictedConnectionsL( TUint aServiceId ); + private: /** diff -r ed1e38b404e5 -r 6134b5029079 voipplugins/sipconnectionprovider/inc/scpsipconnection.h --- a/voipplugins/sipconnectionprovider/inc/scpsipconnection.h Wed Mar 31 21:20:05 2010 +0300 +++ b/voipplugins/sipconnectionprovider/inc/scpsipconnection.h Wed Apr 14 15:49:55 2010 +0300 @@ -254,6 +254,13 @@ */ TBool IsSnapConnectionAvailable( TInt aSnapId ) const; + /** + * Checks if IAP connection method used by sip profile is + * available + * @return ETrue if available + */ + TBool IsIapConnectionAvailable( TInt aIapId ) const; + #ifdef _DEBUG void GetInfo( TDes& aInfo ) const; #endif @@ -309,13 +316,6 @@ */ TBool IsNetworkConnectionAvailable() const; - /** - * Checks if IAP connection method used by sip profile is - * available - * @return ETrue if available - */ - TBool IsIapConnectionAvailable( TInt aIapId ) const; - private: /** diff -r ed1e38b404e5 -r 6134b5029079 voipplugins/sipconnectionprovider/src/scpservicemanager.cpp --- a/voipplugins/sipconnectionprovider/src/scpservicemanager.cpp Wed Mar 31 21:20:05 2010 +0300 +++ b/voipplugins/sipconnectionprovider/src/scpservicemanager.cpp Wed Apr 14 15:49:55 2010 +0300 @@ -16,6 +16,10 @@ */ #include #include +#include +#include +#include +#include #include "scpservicemanager.h" #include "scpsettinghandler.h" @@ -181,7 +185,9 @@ SCPLOGSTRING2( "CScpServiceManager::EnableServiceL service:%i", aServiceId ); SCPLOGSTRING2( "CScpServiceManager::EnableServiceL type:%i", aSubServiceType ); __ASSERT_DEBUG( aServiceId > 0, User::Panic( KNullDesC, KErrNotFound ) ); - + + CheckRestrictedConnectionsL( aServiceId ); + CScpService* service = GetServiceL( aServiceId, aSubServiceType ); if( !service ) @@ -805,22 +811,25 @@ if( aParameter==ECchUsername ) { - HBufC* buffer = NULL; TBuf16 tempBuf; TBuf8 username; if( sipConnection->GetUsername( username ) == KErrNone ) { - tempBuf.Copy( username ); + // Decode encoded username (spaces to %20). + HBufC8* decodedUsername = EscapeUtils::EscapeDecodeL( username ); + CleanupStack::PushL( decodedUsername ); - // Decode encoded username (spaces to %20). - buffer = EscapeUtils::EscapeDecodeL( tempBuf ); + HBufC* userName16 = + EscapeUtils::ConvertToUnicodeFromUtf8L( decodedUsername->Des() ); - if ( buffer ) + CleanupStack::PopAndDestroy( decodedUsername ); + + if ( userName16 ) { - aValue.Copy( buffer->Des() ); - delete buffer; - buffer = NULL; + aValue.Copy( userName16->Des() ); + delete userName16; + userName16 = NULL; } else { @@ -1007,4 +1016,86 @@ } } +// ----------------------------------------------------------------------------- +// CScpServiceManager::CheckRestrictedConnectionsL +// ----------------------------------------------------------------------------- +// +void CScpServiceManager::CheckRestrictedConnectionsL( TUint aServiceId ) + { + if ( !iSettingHandler->IsVoIPOverWcdmaAllowedL( aServiceId ) ) + { + SCPLOGSTRING( "CScpServiceManager::CheckRestrictedConnectionsL WCDMA not allowed" ); + + TBool sipConnectionCreated( EFalse ); + CScpSipConnection* sipConnection = GetSipConnectionL( + aServiceId, + ECCHVoIPSub, + sipConnectionCreated ); + + if( sipConnectionCreated ) + { + CleanupStack::PushL( sipConnection ); + } + + TUint32 snapId( KErrNone ); + sipConnection->GetSnap( snapId ); + + RArray iaps; + CleanupClosePushL( iaps ); + // get first iap and iap's bearer, there must be atleast + // one iap if not cch does not work as it should + RCmManager cmm; + cmm.OpenL(); + CleanupClosePushL( cmm ); + RCmDestination destination( cmm.DestinationL( snapId ) ); + CleanupClosePushL( destination ); + + for ( TInt i = 0; i < destination.ConnectionMethodCount(); i++ ) + { + RCmConnectionMethod cm = destination.ConnectionMethodL( i ); + CleanupClosePushL( cm ); + + if( KUidWlanBearerType == + cm.GetIntAttributeL( CMManager::ECmBearerType ) ) + { + SCPLOGSTRING( "CScpServiceManager::CheckAvailableConnectionsL WLAN IAP found" ); + iaps.Append( cm.GetIntAttributeL( CMManager::ECmIapId ) ); + } + else + { + SCPLOGSTRING2( "CScpServiceManager::CheckAvailableConnectionsL iaps count = %d", iaps.Count() ); + SCPLOGSTRING( "CScpServiceManager::CheckAvailableConnectionsL 3G IAP found break the loop" ); + i = destination.ConnectionMethodCount(); + } + + CleanupStack::PopAndDestroy( &cm ); + } + + TBool available( EFalse ); + for ( TInt j( 0 ); j < iaps.Count(); j++ ) + { + if ( sipConnection->IsIapConnectionAvailable( iaps[ j ] ) ) + { + SCPLOGSTRING( "CScpServiceManager::CheckAvailableConnectionsL WLAN IAP available" ); + available = ETrue; + break; + } + } + + CleanupStack::PopAndDestroy( &destination ); + CleanupStack::PopAndDestroy( &cmm ); + CleanupStack::PopAndDestroy( &iaps ); + + if( sipConnectionCreated ) + { + CleanupStack::PopAndDestroy( sipConnection ); + } + + if ( !available ) + { + User::Leave( KCCHErrorAccessPointNotDefined ); + } + } + } + // End of file diff -r ed1e38b404e5 -r 6134b5029079 voipplugins/voipadapters/voipxmlprovisioning/provisioningrecognizer/data/20026FE1.rss --- a/voipplugins/voipadapters/voipxmlprovisioning/provisioningrecognizer/data/20026FE1.rss Wed Mar 31 21:20:05 2010 +0300 +++ b/voipplugins/voipadapters/voipxmlprovisioning/provisioningrecognizer/data/20026FE1.rss Wed Apr 14 15:49:55 2010 +0300 @@ -19,25 +19,25 @@ #include RESOURCE REGISTRY_INFO r_registry -{ - dll_uid = 0x20026FE1; // dll uid - - interfaces = - { - INTERFACE_INFO - { - interface_uid = 0x101F7D87; // Const for all data recognizers - implementations = - { - IMPLEMENTATION_INFO - { - implementation_uid = 0x20026FE2; // implementation uid - version_no = 1; - display_name = "VoIP provisioning recognizer"; - default_data = ""; - opaque_data = ""; - } - }; - } - }; -} + { + dll_uid = 0x20026FE1; // dll uid + + interfaces = + { + INTERFACE_INFO + { + interface_uid = 0x101F7D87; // Const for all data recognizers + implementations = + { + IMPLEMENTATION_INFO + { + implementation_uid = 0x20026FE2; // implementation uid + version_no = 1; + display_name = "VoIP provisioning recognizer"; + default_data = ""; + opaque_data = ""; + } + }; + } + }; + } diff -r ed1e38b404e5 -r 6134b5029079 voipplugins/voipadapters/voipxmlprovisioning/provisioningrecognizer/group/VoIPProvisioningRecognizer.mmp --- a/voipplugins/voipadapters/voipxmlprovisioning/provisioningrecognizer/group/VoIPProvisioningRecognizer.mmp Wed Mar 31 21:20:05 2010 +0300 +++ b/voipplugins/voipadapters/voipxmlprovisioning/provisioningrecognizer/group/VoIPProvisioningRecognizer.mmp Wed Apr 14 15:49:55 2010 +0300 @@ -33,7 +33,7 @@ START RESOURCE 20026FE1.rss #ifdef SYMBIAN_SECURE_ECOM -TARGET VoIPProvRec.rsc +TARGET voipprovrec.rsc #endif END diff -r ed1e38b404e5 -r 6134b5029079 voipplugins/voipadapters/voipxmlprovisioning/rom/voipxmlprovisioning.iby --- a/voipplugins/voipadapters/voipxmlprovisioning/rom/voipxmlprovisioning.iby Wed Mar 31 21:20:05 2010 +0300 +++ b/voipplugins/voipadapters/voipxmlprovisioning/rom/voipxmlprovisioning.iby Wed Apr 14 15:49:55 2010 +0300 @@ -24,7 +24,7 @@ file=ABI_DIR\BUILD_DIR\voipxmlprocessor.dll SHARED_LIB_DIR\voipxmlprocessor.dll - ECOM_PLUGIN( voipprovrec.dll,20026FE1.rsc ) + ECOM_PLUGIN( voipprovrec.dll, 20026FE1.rsc ) S60_APP_EXE(voipprovisioningapp) S60_UPGRADABLE_APP_REG_RSC(voipprovisioningapp) diff -r ed1e38b404e5 -r 6134b5029079 voipplugins/voipadapters/voipxmlprovisioning/rom/voipxmlprovisioningresources.iby --- a/voipplugins/voipadapters/voipxmlprovisioning/rom/voipxmlprovisioningresources.iby Wed Mar 31 21:20:05 2010 +0300 +++ b/voipplugins/voipadapters/voipxmlprovisioning/rom/voipxmlprovisioningresources.iby Wed Apr 14 15:49:55 2010 +0300 @@ -22,7 +22,6 @@ #include - DATA=DATAZ_\RESOURCE_FILES_DIR\VoIPProvRec.rsc RESOURCE_FILES_DIR\VoIPProvRec.rsc S60_APP_RESOURCE(VoIPProvisioningApp) // S60_APP_CAPTION(VoIPProvisioningApp) diff -r ed1e38b404e5 -r 6134b5029079 voipplugins/voipadapters/voipxmlprovisioning/voipxmlprocessor/inc/voipxmlprocessordefaults.h --- a/voipplugins/voipadapters/voipxmlprovisioning/voipxmlprocessor/inc/voipxmlprocessordefaults.h Wed Mar 31 21:20:05 2010 +0300 +++ b/voipplugins/voipadapters/voipxmlprovisioning/voipxmlprocessor/inc/voipxmlprocessordefaults.h Wed Apr 14 15:49:55 2010 +0300 @@ -83,6 +83,7 @@ _LIT( KParamValueAutoEnable, "autoenable" ); _LIT( KParamValueEnableSipIm, "enablesipim" ); _LIT( KParamValueBrandId, "brandid" ); +_LIT( KParamValueDefault, "default" ); // Voice mailbox specific. _LIT( KParamValueMwiUri, "mwiuri" ); _LIT( KParamValueListeningUri, "listeninguri" ); @@ -276,6 +277,7 @@ EAutoEnable, EEnableSipIm, EBrandId, + EDefault, // Voice mailbox parameters EMwiUri, EListeningUri, diff -r ed1e38b404e5 -r 6134b5029079 voipplugins/voipadapters/voipxmlprovisioning/voipxmlprocessor/inc/voipxmlvoiphandler.h --- a/voipplugins/voipadapters/voipxmlprovisioning/voipxmlprocessor/inc/voipxmlvoiphandler.h Wed Mar 31 21:20:05 2010 +0300 +++ b/voipplugins/voipadapters/voipxmlprovisioning/voipxmlprocessor/inc/voipxmlvoiphandler.h Wed Apr 14 15:49:55 2010 +0300 @@ -322,6 +322,13 @@ */ void AddDefaultCodecsL(); + /** + * Sets the service as default service and preferred telephony as PS. + * + * @since S60 v5.1 + */ + void SetAsDefaultL(); + private: CVoipXmlVoipHandler(); @@ -378,6 +385,11 @@ * will be stored to SPSettings in FinalizedSettings method. */ TUint32 iDestinationId; + + /** + * Tells if the service is to be set as default service. + */ + TBool iDefault; }; #endif // VOIPXMLVOIPHANDLER_H diff -r ed1e38b404e5 -r 6134b5029079 voipplugins/voipadapters/voipxmlprovisioning/voipxmlprocessor/src/voipxmlparamhandler.cpp --- a/voipplugins/voipadapters/voipxmlprovisioning/voipxmlprocessor/src/voipxmlparamhandler.cpp Wed Mar 31 21:20:05 2010 +0300 +++ b/voipplugins/voipadapters/voipxmlprovisioning/voipxmlprocessor/src/voipxmlparamhandler.cpp Wed Apr 14 15:49:55 2010 +0300 @@ -443,6 +443,10 @@ { return EBrandId; } + else if ( KParamValueDefault() == name ) + { + return EDefault; + } // ============================== // VoIP voicemailbox parameters. // ============================== diff -r ed1e38b404e5 -r 6134b5029079 voipplugins/voipadapters/voipxmlprovisioning/voipxmlprocessor/src/voipxmlvoiphandler.cpp --- a/voipplugins/voipadapters/voipxmlprovisioning/voipxmlprocessor/src/voipxmlvoiphandler.cpp Wed Mar 31 21:20:05 2010 +0300 +++ b/voipplugins/voipadapters/voipxmlprovisioning/voipxmlprocessor/src/voipxmlvoiphandler.cpp Wed Apr 14 15:49:55 2010 +0300 @@ -23,10 +23,12 @@ #include #include #include -#include // SIP User-Agent header info. +#include // SIP User-Agent header info. #include // SIP User-Agent header info. -#include // For getting phone rom root path. -#include // For IM tone path +#include // For getting phone rom root path. +#include // For IM tone path +#include // For default service. +#include // For default service. #include "voipxmlvoiphandler.h" #include "voipxmlprocessorlogger.h" @@ -156,6 +158,7 @@ // from registry so that we'll get all the values registry has // added to the entry (AddL takes entry as const reference). TRAP_IGNORE( iRegistry->FindL( profileId, *iEntry ) ); + iServiceId = iEntry->iServiceProviderId; } else { @@ -237,6 +240,10 @@ // ParamHandler is only intrested in KErrNone and KErrCompletion. err = KErrCompletion; } + if ( iDefault ) + { + TRAP_IGNORE( SetAsDefaultL() ); + } return err; } @@ -545,6 +552,15 @@ } break; } + case EDefault: + { + if ( KErrNone == VoipXmlUtils::DesToInt( aValue, intValue ) ) + { + iDefault = (TBool)intValue; + iSettingsSet = ETrue; + } + break; + } default: break; } @@ -1285,4 +1301,17 @@ CleanupStack::PopAndDestroy( codec ); } +// --------------------------------------------------------------------------- +// Sets the service as default service and preferred telephony as PS. +// --------------------------------------------------------------------------- +// +void CVoipXmlVoipHandler::SetAsDefaultL() + { + // Set the preferred service ID and preferred telephony as PS. + CRepository* repository = CRepository::NewL( KCRUidRichCallSettings ); + repository->Set( KRCSPSPreferredService, (TInt)iServiceId ); + repository->Set( KRCSEPreferredTelephony, 1 ); + delete repository; + } + // End of File