# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1265062147 -7200 # Node ID b31261fd4e04df1f6eaeb52c8c9367360361868b # Parent 065f1826587f8d5dcc8df4fc54ddb6fc81550b21 Revision: 201003 Kit: 201005 diff -r 065f1826587f -r b31261fd4e04 mmsharing/mmshengine/src/musengmceoutsession.cpp --- a/mmsharing/mmshengine/src/musengmceoutsession.cpp Thu Jan 07 12:45:29 2010 +0200 +++ b/mmsharing/mmshengine/src/musengmceoutsession.cpp Tue Feb 02 00:09:07 2010 +0200 @@ -64,6 +64,9 @@ const TInt KMusEngSipReasonCodeDecline = 603; const TInt KMusEngSipReasonCodeNotAcceptable = 606; // The next code represents unofficial sip error code +// "478 Unresolveable Destination, we were not able to process the URI (478/TM) +const TInt KMusEngSipReasonCode478NotAbleToProcessURI = 478; +// The next code represents unofficial sip error code // "479 Regretfuly, we were not able to process the URI (479/SL) const TInt KMusEngSipReasonCode479NotAbleToProcessURI = 479; @@ -251,7 +254,9 @@ iOutSessionObserver.SessionPaymentRequired(); break; } - case KMusEngSipReasonCodeRecipientNotFound : + case KMusEngSipReasonCodeRecipientNotFound : + //lint -fallthrough + case KMusEngSipReasonCode478NotAbleToProcessURI: //lint -fallthrough case KMusEngSipReasonCode479NotAbleToProcessURI: //lint -fallthrough diff -r 065f1826587f -r b31261fd4e04 mmsharing/mmshui/src/musuisendview.cpp --- a/mmsharing/mmshui/src/musuisendview.cpp Thu Jan 07 12:45:29 2010 +0200 +++ b/mmsharing/mmshui/src/musuisendview.cpp Tue Feb 02 00:09:07 2010 +0200 @@ -61,12 +61,16 @@ { MUS_LOG_TDESC( "mus: [MUSUI ] -> CMusUiSendView::ManualAddressEntryL: ", aAddress ); - - TBuf address( aAddress ); + + CAknAppUiBase::TAppUiOrientation aOrientation ; + + TBuf address( aAddress ); if ( SendController() && MusUiDialogUtil::ShowTextQueryDialogL( R_MUS_TEXT_ENTER_ADDRESS_DIALOG_PROMPT, address ) ) { + //to get the AppOrientation before sending invatation + aOrientation = MusAppUi()->AppOrientation(); SendController()->InviteL( address ); } else @@ -76,7 +80,10 @@ MusAppUi()->HandleExit(); } - SendController()->ChangeOrientationL( iSavedOrientation ); + if( aOrientation != iSavedOrientation) + { + SendController()->ChangeOrientationL( iSavedOrientation ); + } MUS_LOG( "mus: [MUSUI ] <- CMusUiSendView::ManualAddressEntryL" ); } diff -r 065f1826587f -r b31261fd4e04 mmshplugins/mmshsettingsuiplugin/inc/mmussipprofilehandler.h --- a/mmshplugins/mmshsettingsuiplugin/inc/mmussipprofilehandler.h Thu Jan 07 12:45:29 2010 +0200 +++ b/mmshplugins/mmshsettingsuiplugin/inc/mmussipprofilehandler.h Tue Feb 02 00:09:07 2010 +0200 @@ -13,7 +13,7 @@ * * Description: Mixin-class that provides functionality for manipulating * MuS specific settings. -* Version : %version: 4.1.3 % << Don't touch! Updated by Synergy at check-out. +* Version : %version: 6 % << Don't touch! Updated by Synergy at check-out. * */ @@ -21,13 +21,15 @@ #ifndef M_MMUSSIPPROFILEHANDLER_H #define M_MMUSSIPPROFILEHANDLER_H -#include +#include +#include + +class CSIPProfile; /** * MMusSIPProfileHandler class * Mixin class for SIP profile manipulation. * Handles SIP profile manipulations. -* @since S60 v3.2 */ class MMusSIPProfileHandler { @@ -39,17 +41,17 @@ * default SIP profile. */ virtual TInt DefaultProfileIndex() = 0; - + /** - * Returns pointer to the SIP profile array, does not change ownership. + * Returns a reference to the SIP profile array. * Note that previously returned value goes out of scope after a new * call to ProfileArrayL. So it is not advised to store return value * in long persistent variable, but rather to be used like stack * variables for safety. * - * @return Pointer to internally cached SIP profile array. + * @return Reference to internally cached SIP profile array. */ - virtual CArrayPtr* ProfileArrayL() = 0; + virtual RPointerArray& ProfileArrayL() = 0; /** * Returns the id of the default SIP profile. diff -r 065f1826587f -r b31261fd4e04 mmshplugins/mmshsettingsuiplugin/inc/mussettingscontainer.h --- a/mmshplugins/mmshsettingsuiplugin/inc/mussettingscontainer.h Thu Jan 07 12:45:29 2010 +0200 +++ b/mmshplugins/mmshsettingsuiplugin/inc/mussettingscontainer.h Tue Feb 02 00:09:07 2010 +0200 @@ -185,11 +185,6 @@ MusSettingsKeys::TOperatorVariant iOperatorVariant; /** - * VS activation current value. - */ - MusSettingsKeys::TActivation iVSActication; - - /** * Listbox items. */ CGSListBoxItemTextArray* iListboxItemArray; diff -r 065f1826587f -r b31261fd4e04 mmshplugins/mmshsettingsuiplugin/inc/mussettingsmodel.h --- a/mmshplugins/mmshsettingsuiplugin/inc/mussettingsmodel.h Thu Jan 07 12:45:29 2010 +0200 +++ b/mmshplugins/mmshsettingsuiplugin/inc/mussettingsmodel.h Tue Feb 02 00:09:07 2010 +0200 @@ -12,7 +12,7 @@ * Contributors: * * Description: MUSSettingsPlugin model class. -* Version : %version: 8.1.2.1.3 % << Don't touch! Updated by Synergy at check-out. +* Version : %version: 10 % << Don't touch! Updated by Synergy at check-out. * */ @@ -21,20 +21,17 @@ #ifndef C_MUSSETTINGSMODEL_H #define C_MUSSETTINGSMODEL_H -#include "mussettings.h" - +#include +#include +//class CDesCArray; class MMusSIPProfileHandler; class CMusSIPProfileModel; -class MultimediaSharingSettings; - class CAknMemorySelectionDialogMultiDrive; /** * CMusSettingsModel is the model class of GS application. * It provides functions to get and set setting values. - * - * @since S60 v3.2 */ class CMusSettingsModel : public CBase { @@ -53,84 +50,11 @@ ~CMusSettingsModel(); /** - * Returns operator variant mode. - * @return 0: Standard (MusSettingsKeys::EStandard) - * 1: Operator Specific (MusSettingsKeys::EOperatorSpecific) - */ - MusSettingsKeys::TOperatorVariant VSSettingsOperatorVariantL(); - - /** - * Returns VS activation mode. - * @return 0: Always (MusSettingsKeys::EAlwaysActive) - * 1: Automatic (MusSettingsKeys::EActiveInHomeNetworks) - * 2: Off (MusSettingsKeys::ENever) - */ - MusSettingsKeys::TActivation VSSettingsActivationL(); - - /** - * Returns SIP profile mode. - * @return 0: Use default SIP profile. - * 1: Use user selected SIP profile. - */ - TInt VSSettingsProfileL(); - - /** - * Returns video autorecord mode. - * @return 0: on (MusSettingsKeys::EAutoRecordOn) - * 1: off (MusSettingsKeys::EAutoRecordOff) - */ - MusSettingsKeys::TAutoRecord VSSettingsAutoRecordL(); - - /** * Returns recorded video saving mode. * @return 2: phone memory * 4: memory card */ TInt VSSettingsRecordedVideoSavingL(); - - /** - * Returns state of note (on/off). This setting is called "Capability - * auditory note" in standard variant and "Alerts" in operator specific - * variant. - * @return 0: enabled (MusSettingsKeys::EAuditoryNotificationOn) - * 1: disabled (MusSettingsKeys::EAuditoryNotificationOff) - */ - MusSettingsKeys::TAuditoryNotification VSSettingsNoteL(); - - /** - * Sets packet data VS activation mode. - * @param aActivation Activation mode. - */ - void SetVSSettingsActivationL( - const MusSettingsKeys::TActivation aActivation ); - - /** - * Sets SIP profile mode. - * @param aProfile Profile id. - */ - void SetVSSettingsProfileL( const TInt aProfile ); - - /** - * Sets video autorecord mode. - * @param aAutoRecord save mode of video. - */ - void SetVSSettingsAutoRecordL( - const MusSettingsKeys::TAutoRecord aAutoRecord ); - - /** - * Sets location of video saving. - * @param aVideoLocation location of video - */ - void SetVSSettingsRecordedVideoSavingL( const TInt aVideoLocation ); - - /** - * Sets mode of note ("Capability auditory note" in standard variant and - * "Alerts" in operator specific variant). - * @param aValue New state for note (enabled/disabled). - */ - void SetVSSettingsNoteL( - const MusSettingsKeys::TAuditoryNotification aValue ); - /** * operator specific variant @@ -139,12 +63,12 @@ */ void SetActivationItem( TBool aActive ); - /** * operator specific variant * @return activation item */ TBool ActivationItem( ); + /** * Returns the array containing the profile names. * NOTE! The ownership of the array is transferred to the caller. @@ -233,12 +157,6 @@ * SIP profile handler. */ MMusSIPProfileHandler& iHandler; - - /** - * Central repository keys of video sharing. - * Own. - */ - MultimediaSharingSettings* iMSSettingsKeys; /** * Operator variant. If SIP profile disabled diff -r 065f1826587f -r b31261fd4e04 mmshplugins/mmshsettingsuiplugin/inc/mussettingsplugin.h --- a/mmshplugins/mmshsettingsuiplugin/inc/mussettingsplugin.h Thu Jan 07 12:45:29 2010 +0200 +++ b/mmshplugins/mmshsettingsuiplugin/inc/mussettingsplugin.h Tue Feb 02 00:09:07 2010 +0200 @@ -12,7 +12,7 @@ * Contributors: * * Description: MUSSettingsPlugin implementation. -* Version : %version: 16.1.11 % << Don't touch! Updated by Synergy at check-out. +* Version : %version: 21 % << Don't touch! Updated by Synergy at check-out. * */ @@ -185,11 +185,6 @@ private: /** - * Shows VS activation Setting dialog. - */ - void ShowVSSettingsActivationSettingDialogL(); - - /** * Shows Profile Setting dialog. */ void ShowVSSettingsProfileSettingDialogL(); diff -r 065f1826587f -r b31261fd4e04 mmshplugins/mmshsettingsuiplugin/inc/mussipprofilemodel.h --- a/mmshplugins/mmshsettingsuiplugin/inc/mussipprofilemodel.h Thu Jan 07 12:45:29 2010 +0200 +++ b/mmshplugins/mmshsettingsuiplugin/inc/mussipprofilemodel.h Tue Feb 02 00:09:07 2010 +0200 @@ -12,7 +12,7 @@ * Contributors: * * Description: Class implementing SIP profile model. -* Version : %version: 5.1.6 % << Don't touch! Updated by Synergy at check-out. +* Version : %version: 7 % << Don't touch! Updated by Synergy at check-out. * */ @@ -24,19 +24,16 @@ #include "mmussipprofilehandler.h" #include -#include -#include #include class CSIPManagedProfileRegistry; +class CMusSettingsModel; /** * CMusSIPProfileModel model class. * Model class implementing SIP profile model. - * - * @since S60 v3.2 */ class CMusSIPProfileModel :public CBase, @@ -107,15 +104,15 @@ /** * From MMusSIPProfileHandler. - * Returns pointer to the SIP profile array, does not change ownership. + * Returns a reference to the SIP profile array. * Note that previously returned value goes out of scope after a new * call to ProfileArrayL. So it is not advised to store return value * in long persistent variable, but rather to be used like stack * variables for safety. * - * @return Pointer to internally cached SIP profile array. + * @return Reference to internally cached SIP profile array. */ - virtual CArrayPtr* ProfileArrayL(); + virtual RPointerArray& ProfileArrayL(); public: // From base class MSIPProfileRegistryObserver. @@ -138,40 +135,29 @@ virtual void ProfileRegistryErrorOccurred( TUint32 aSIPProfileId, TInt aError ); + + + + /** + * Set CMusSettingsModel to handle ProfileRegistry Event. + * @param aCMusSettingsModel the CMusSettingsModel to handle ProfileRegistry Event + */ + void SetCMusSettingsModel(CMusSettingsModel* aCMusSettingsModel); protected: /** - * Reads the profile array from SIP Profile Client. - */ - void ReadArrayFromEngineL(); - - /** * Sorts internal array of SIP profiles by id. */ void SortProfilesL(); - /** - * Deletes internally cached profiles. - */ - void DeleteProfiles(); - - /** - * Reads profile list from the engine; if reading fails, - * keeps the old list safe. - */ - void ReadProfileListFromEngineSafeL(); private: CMusSIPProfileModel(); void ConstructL(); - - /** - * For deleting RPointerArray in case of leave. - */ - static void ResetAndDestroy( TAny* aPointerArray ); + private: // data @@ -183,9 +169,14 @@ /** * Locally cached array of SIP profiles. - * Own. */ - CArrayPtrFlat* iProfiles; + RPointerArray iProfiles; + + /** + * CMusSettingsModel to handle ProfileRegistry + * Event + */ + CMusSettingsModel* iCMusSettingsModel; }; diff -r 065f1826587f -r b31261fd4e04 mmshplugins/mmshsettingsuiplugin/src/mussettingscontainer.cpp --- a/mmshplugins/mmshsettingsuiplugin/src/mussettingscontainer.cpp Thu Jan 07 12:45:29 2010 +0200 +++ b/mmshplugins/mmshsettingsuiplugin/src/mussettingscontainer.cpp Tue Feb 02 00:09:07 2010 +0200 @@ -12,7 +12,7 @@ * Contributors: * * Description: Container for MUSSettingsPlugin. -* Version : %version: 15.2.4.1.7 % << Don't touch! Updated by Synergy at check-out. +* Version : %version: 20 % << Don't touch! Updated by Synergy at check-out. * */ @@ -65,7 +65,7 @@ { MUS_LOG( "[MUSSET] -> CMusSettingsContainer::ConstructL()" ) - iOperatorVariant = iModel.VSSettingsOperatorVariantL(); + iOperatorVariant = MultimediaSharingSettings::OperatorVariantSettingL(); iListBox = new( ELeave ) CAknSettingStyleListBox; @@ -93,9 +93,9 @@ } -// --------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // Constructs a listbox from a specified resource id. -// --------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // void CMusSettingsContainer::ConstructListBoxL( TInt aResLbxId ) { @@ -135,9 +135,9 @@ } -// --------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // Populates listbox items. -// --------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // void CMusSettingsContainer::CreateListBoxItemsL() { @@ -158,9 +158,9 @@ } -// --------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // Updates a specified feature (item in listbox). -// --------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // void CMusSettingsContainer::UpdateListBoxL( TInt aFeatureId ) { @@ -199,9 +199,9 @@ } -// --------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // Generic method to add an item to listbox and make it visible. -// --------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // void CMusSettingsContainer::AddItemL( TInt aId, const TPtrC aText ) { @@ -213,24 +213,33 @@ } -// --------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // Adds activation setting item to listbox. -// --------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // void CMusSettingsContainer::MakeActivationItemL() { MUS_LOG( "[MUSSET] -> CMusSettingsContainer::MakeActivationItemL()" ) - iVSActication = iModel.VSSettingsActivationL(); - AddItemL( KGSSettIdVSActivation, ( *iActivationItems )[ iVSActication ] ); + MusSettingsKeys::TActivation activation = + MultimediaSharingSettings::ActivationSettingL(); + + if ( activation != MusSettingsKeys::EAlwaysActive ) + { + // We make sure that if someone has written to CenRep value bigger + // than 1 (which after OCC changes means 'Off') we treat it as 'Off'. + activation = MusSettingsKeys::EActiveInHomeNetworks; + } + + AddItemL( KGSSettIdVSActivation, ( *iActivationItems )[ activation ] ); MUS_LOG( "[MUSSET] <- CMusSettingsContainer::MakeActivationItemL()" ) } -// --------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // Adds operator specific activation setting item to listbox. -// --------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // void CMusSettingsContainer::MakeOperatorActivationItemL() { @@ -243,17 +252,17 @@ } -// --------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // Adds SIP profile setting item to settings listbox. Item will contain // indication of [no SIP profile selected], [using default SIP profile] or // [name of SIP profile specified to be used] -// --------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // void CMusSettingsContainer::MakeSIPProfileItemL() { MUS_LOG( "[MUSSET] -> CMusSettingsContainer::MakeSIPProfileItemL()" ) - TInt profile = iModel.VSSettingsProfileL(); + TInt profile = MultimediaSharingSettings::SipProfileSettingL(); if ( profile != KDefaultSipProfile && profile != KNoSipProfileSelected ) { @@ -289,14 +298,14 @@ } -// --------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // Adds autorecord item to listbox. -// --------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // void CMusSettingsContainer::MakeAutoRecordItemL() { MUS_LOG( "[MUSSET] -> CMusSettingsContainer::MakeAutoRecordItemL()" ) - TInt autoRecordMode = iModel.VSSettingsAutoRecordL(); + TInt autoRecordMode = MultimediaSharingSettings::AutoRecordSettingL(); MUS_LOG1( "[MUSSET] autoRecordMode: %d", autoRecordMode ) MUS_LOG1( "[MUSSET] iAutoRecordItems.Count: %d", iAutoRecordItems->Count() ) @@ -314,9 +323,9 @@ } -// --------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // Adds recorded video saving item to listbox. -// --------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // void CMusSettingsContainer::MakeRecordedVideoSavingItemL() { @@ -332,12 +341,12 @@ if ( index == KErrNotFound ) { - MUS_LOG( "[MUSSET] -> preferred drive doesn't exist anymore \ -(e.g. remote drive deleted), taking system drive..." ) + MUS_LOG( "[MUSSET] Preferred drive doesn't exist anymore, " ) + MUS_LOG( "[MUSSET] e.g. remote drive deleted, using system drive" ) driveNumber = RFs::GetSystemDrive(); index = dlg->FindIndexByDrive( driveNumber ); - iModel.SetVSSettingsRecordedVideoSavingL( driveNumber ); + MultimediaSharingSettings::SetVideoLocationSettingL( driveNumber ); } TFileName item( KNullDesC ); @@ -353,40 +362,38 @@ } -// --------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // Adds note item to listbox. (Alerts setting). Present only with operator // variant set. -// --------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // void CMusSettingsContainer::MakeNoteItemL() { - MUS_LOG( - "[MUSSET] -> CMusSettingsContainer::MakeNoteItemL()" ) + MUS_LOG( "[MUSSET] -> CMusSettingsContainer::MakeNoteItemL()" ) - TInt savingMode = iModel.VSSettingsNoteL(); + MusSettingsKeys::TAuditoryNotification auditoryNotification = + MultimediaSharingSettings::AuditoryNotificationSettingL(); - MUS_LOG1( "[MUSSET] -> CMusSettingsContainer::Mode:%d()", savingMode ); + MUS_LOG1( "[MUSSET] -> CMusSettingsContainer::Mode:%d()", + auditoryNotification ) // If unset, use and set default value - if ( savingMode < 0 || savingMode > 1 ) + if ( auditoryNotification < 0 || auditoryNotification > 1 ) { - MUS_LOG( "[MUSSET] -> SetVSSettingsNoteL" ); - savingMode = 0; - iModel.SetVSSettingsNoteL( - MusSettingsKeys::EAuditoryNotificationOff ); - MUS_LOG( "[MUSSET] <- SetVSSettingsNoteL" ); + auditoryNotification = MusSettingsKeys::EAuditoryNotificationOff; + MultimediaSharingSettings::SetAuditoryNotificationSettingL( + MusSettingsKeys::EAuditoryNotificationOff ); } - MUS_LOG( "[MUSSET] -> AddItemL" ); - AddItemL( KGSSettIdNote, ( *iActivationItems )[ savingMode ] ); - MUS_LOG( "[MUSSET] <- SetVSSettingsNoteL" ); - MUS_LOG( - "[MUSSET] <- CMusSettingsContainer::MakeNoteItemL()" ) + + AddItemL( KGSSettIdNote, ( *iActivationItems )[ auditoryNotification ] ); + + MUS_LOG( "[MUSSET] <- CMusSettingsContainer::MakeNoteItemL()" ) } -// --------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // Gets help context. -// --------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // void CMusSettingsContainer::GetHelpContext( TCoeHelpContext& aContext ) const { @@ -397,9 +404,9 @@ } -// --------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // Returns currently selected feature (listbox item). -// --------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // TInt CMusSettingsContainer::CurrentFeatureId() const { @@ -408,10 +415,10 @@ } -// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // If call is on, informs user with note that new profile is going to be active // after current call. -// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // void CMusSettingsContainer::ShowNewProfileActiveAfterCallL() { @@ -438,10 +445,10 @@ } } -// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // void CMusSettingsContainer::HideItemsL(TInt aItemIndex) // Some items are unwanted by operators.Hide those items from listbox item -// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // void CMusSettingsContainer::HideItemsL(TInt aItemIndex) { diff -r 065f1826587f -r b31261fd4e04 mmshplugins/mmshsettingsuiplugin/src/mussettingsmodel.cpp --- a/mmshplugins/mmshsettingsuiplugin/src/mussettingsmodel.cpp Thu Jan 07 12:45:29 2010 +0200 +++ b/mmshplugins/mmshsettingsuiplugin/src/mussettingsmodel.cpp Tue Feb 02 00:09:07 2010 +0200 @@ -12,19 +12,19 @@ * Contributors: * * Description: Document model class for MUSSettingsPlugin. -* Version : %version: 15 % << Don't touch! Updated by Synergy at check-out. +* Version : %version: 17 % << Don't touch! Updated by Synergy at check-out. * */ - -#include "mmussipprofilehandler.h" #include "mussettingsmodel.h" +#include "muslogger.h" #include "mussipprofilemodel.h" -#include "muslogger.h" +#include "mussettings.h" +#include "mmussipprofilehandler.h" + +#include #include -#include - #include #include #include // GUI Resource @@ -75,8 +75,8 @@ void CMusSettingsModel::ConstructL() { MUS_LOG( "[MUSSET] -> CMusSettingsModel::ConstructL()" ) - iMSSettingsKeys = new (ELeave) MultimediaSharingSettings; InitializeProfileEnablerL(); + static_cast (&iHandler)->SetCMusSettingsModel(this); MUS_LOG( "[MUSSET] <- CMusSettingsModel::ConstructL()" ) } @@ -88,78 +88,9 @@ CMusSettingsModel::~CMusSettingsModel() { MUS_LOG( "[MUSSET] -> CMusSettingsModel::~CMusSettingsModel()" ) - delete iMSSettingsKeys; - iMSSettingsKeys = NULL; MUS_LOG( "[MUSSET] <- CMusSettingsModel::~CMusSettingsModel()" ) } - -// ----------------------------------------------------------------------------- -// Returns operator variant mode (normal or operator specific. This is used for -// runtime variation of Settings UI. -// ----------------------------------------------------------------------------- -// -MusSettingsKeys::TOperatorVariant CMusSettingsModel::VSSettingsOperatorVariantL() - { - MUS_LOG( "[MUSSET] -> CMusSettingsModel::VSSettingsOperatorVariantL()" ) - - MusSettingsKeys::TOperatorVariant operatorVariant = - iMSSettingsKeys->OperatorVariantSettingL(); - - MUS_LOG1( - "[MUSSET] <- CMusSettingsContainer::VSSettingsOperatorVariantL()( %d )", - operatorVariant ) - return operatorVariant; - } - - -// ----------------------------------------------------------------------------- -// Returns VS activation mode. -// ----------------------------------------------------------------------------- -// -MusSettingsKeys::TActivation CMusSettingsModel::VSSettingsActivationL() - { - MUS_LOG( "[MUSSET] -> CMusSettingsModel::VSSettingsActivationL()" ) - MusSettingsKeys::TActivation activationMode = - iMSSettingsKeys->ActivationSettingL(); - MUS_LOG1( - "[MUSSET] <- CMusSettingsContainer::VSSettingsActivationL()( %d )", - activationMode ) - return activationMode; - } - - -// ----------------------------------------------------------------------------- -// Returns SIP profile mode. -// ----------------------------------------------------------------------------- -// -TInt CMusSettingsModel::VSSettingsProfileL() - { - MUS_LOG( "[MUSSET] -> CMusSettingsModel::VSSettingsProfileL()" ) - TInt vsProfileMode = iMSSettingsKeys->SipProfileSettingL(); - MUS_LOG1( - "[MUSSET] <- CMusSettingsContainer::VSSettingsProfileL()( %d )", - vsProfileMode ) - return vsProfileMode; - } - - -// ----------------------------------------------------------------------------- -// Returns video autorecord mode. -// ----------------------------------------------------------------------------- -// -MusSettingsKeys::TAutoRecord CMusSettingsModel::VSSettingsAutoRecordL() - { - MUS_LOG( "[MUSSET] -> CMusSettingsModel::VSSettingsAutoRecordL()" ) - MusSettingsKeys::TAutoRecord vsAutoRecordMode = - iMSSettingsKeys->AutoRecordSettingL(); - MUS_LOG1( - "[MUSSET] <- CMusSettingsContainer::VSSettingsAutoRecordL()( %d )", - vsAutoRecordMode ) - return vsAutoRecordMode; - } - - // ----------------------------------------------------------------------------- // Returns recorded video saving mode. // ----------------------------------------------------------------------------- @@ -167,103 +98,13 @@ TInt CMusSettingsModel::VSSettingsRecordedVideoSavingL() { MUS_LOG( "[MUSSET] -> CMusSettingsModel::VSSettingsRecordedVideoSavingL()" ) - TInt vsVideoLocationMode = iMSSettingsKeys->VideoLocationSettingL(); + TInt vsVideoLocationMode = MultimediaSharingSettings::VideoLocationSettingL(); MUS_LOG1( "[MUSSET] <- CMusSettingsContainer::VSSettingsRecordedVideoSavingL()( %d )", vsVideoLocationMode ) return vsVideoLocationMode; } - -// ----------------------------------------------------------------------------- -// Returns mode of audible note. -// ----------------------------------------------------------------------------- -// -MusSettingsKeys::TAuditoryNotification CMusSettingsModel::VSSettingsNoteL() - { - MUS_LOG( "[MUSSET] -> CMusSettingsModel::VSSettingsNoteL()" ) - MusSettingsKeys::TAuditoryNotification vsNoteMode = - iMSSettingsKeys->AuditoryNotificationSettingL(); - MUS_LOG1( - "[MUSSET] <- CMusSettingsContainer::VSSettingsNoteL()( %d )", - vsNoteMode ) - return vsNoteMode; - } - - -// ----------------------------------------------------------------------------- -// Sets VS activation mode. -// ----------------------------------------------------------------------------- -// -void CMusSettingsModel::SetVSSettingsActivationL( - const MusSettingsKeys::TActivation aActivation) - { - MUS_LOG1( - "[MUSSET] -> CMusSettingsContainer::SetVSSettingsActivationL()( %d )", - aActivation ) - iMSSettingsKeys->SetActivationSettingL( aActivation ); - MUS_LOG( "[MUSSET] <- CMusSettingsModel::SetVSSettingsActivationL()" ) - } - - -// ----------------------------------------------------------------------------- -// Sets SIP Profile mode. -// ----------------------------------------------------------------------------- -// -void CMusSettingsModel::SetVSSettingsProfileL( const TInt aProfile ) - { - MUS_LOG1( - "[MUSSET] -> CMusSettingsContainer::SetVSSettingsProfileL()( %d )", - aProfile ) - iMSSettingsKeys->SetSipProfileSettingL( aProfile ); - MUS_LOG( "[MUSSET] <- CMusSettingsModel::SetVSSettingsProfileL()" ) - } - - -// ----------------------------------------------------------------------------- -// Sets video autorecord mode. -// ----------------------------------------------------------------------------- -// -void CMusSettingsModel::SetVSSettingsAutoRecordL( - const MusSettingsKeys::TAutoRecord aAutoRecord ) - { - MUS_LOG1( - "[MUSSET] -> CMusSettingsContainer::SetVSSettingsAutoRecordL()( %d )", - aAutoRecord ) - iMSSettingsKeys->SetAutoRecordSettingL( aAutoRecord ); - MUS_LOG( "[MUSSET] <- CMusSettingsModel::SetVSSettingsAutoRecordL()" ) - } - - -// ----------------------------------------------------------------------------- -// Sets video location. -// ----------------------------------------------------------------------------- -// -void CMusSettingsModel::SetVSSettingsRecordedVideoSavingL( - const TInt aVideoLocation ) - { - MUS_LOG1( - "[MUSSET] -> CMusSettingsContainer::SetVSSettingsRecordedVideoSavingL()( %d )", - aVideoLocation ) - iMSSettingsKeys->SetVideoLocationSettingL( aVideoLocation ); - MUS_LOG( - "[MUSSET] <- CMusSettingsModel::SetVSSettingsRecordedVideoSavingL()" ) - } - - -// ----------------------------------------------------------------------------- -// Sets mode of auditory note. -// ----------------------------------------------------------------------------- -// -void CMusSettingsModel::SetVSSettingsNoteL( - const MusSettingsKeys::TAuditoryNotification aValue ) - { - MUS_LOG1( "[MUSSET] -> CMusSettingsContainer::SetVSSettingsNoteL()( %d )", - aValue ) - iMSSettingsKeys->SetAuditoryNotificationSettingL( aValue ); - MUS_LOG( "[MUSSET] <- CMusSettingsContainer::SetActivationItem()" ) - } - // ---------------------------------------------------------------------------- // Change Activation. // ---------------------------------------------------------------------------- @@ -271,8 +112,7 @@ void CMusSettingsModel::SetActivationItem( TBool aActive ) { MUS_LOG( "[MUSSET] -> CMusSettingsContainer::SetActivationItem()" ) - MUS_LOG1( "Profile disabled? ( %d )", - aActive ) + MUS_LOG1( " Profile disabled? ( %d )", aActive ) iProfileDisabled = aActive; MUS_LOG( "[MUSSET] <- CMusSettingsContainer::SetActivationItem()" ) } @@ -294,16 +134,16 @@ CDesCArray* CMusSettingsModel::ListOfProfileNamesL() { MUS_LOG( "[MUSSET] -> CMusSettingsModel::ListOfProfileNamesL()" ) - CArrayPtr* list = iHandler.ProfileArrayL(); + RPointerArray& list = iHandler.ProfileArrayL(); CDesCArray* array = new ( ELeave ) CDesCArrayFlat( KSIPGranularity ); CleanupStack::PushL( array ); - for ( TInt i = 0; i < list->Count(); i++ ) + for ( TInt i = 0; i < list.Count(); i++ ) { const TDesC8* providerName = 0; User::LeaveIfError( - list->At(i)->GetParameter( KSIPProviderName, providerName ) ); + list[i]->GetParameter( KSIPProviderName, providerName ) ); HBufC8* decodedProvider = EscapeUtils::EscapeDecodeL( *providerName ); @@ -339,7 +179,7 @@ if ( index >= 0 ) { - if ( KErrNone == iHandler.ProfileArrayL()->At( index )-> + if ( KErrNone == iHandler.ProfileArrayL()[index]-> GetParameter( KSIPProviderName, providerName ) ) { HBufC8* decodedProvider = @@ -407,7 +247,7 @@ void CMusSettingsModel::InitializeProfileEnablerL() { MUS_LOG( "[MUSSET] -> CMusSettingsModel::InitializeProfileEnabler()" ) - if ( VSSettingsOperatorVariantL() == + if ( MultimediaSharingSettings::OperatorVariantSettingL() == MusSettingsKeys::EOperatorSpecific ) { TBool enabled(EFalse); diff -r 065f1826587f -r b31261fd4e04 mmshplugins/mmshsettingsuiplugin/src/mussettingsplugin.cpp --- a/mmshplugins/mmshsettingsuiplugin/src/mussettingsplugin.cpp Thu Jan 07 12:45:29 2010 +0200 +++ b/mmshplugins/mmshsettingsuiplugin/src/mussettingsplugin.cpp Tue Feb 02 00:09:07 2010 +0200 @@ -12,7 +12,7 @@ * Contributors: * * Description: MUSSettingsPlugin implementation. -* Version : %version: 24.1.9.1.5.1.1 % << Don't touch! Updated by Synergy at check-out. +* Version : %version: 34 % << Don't touch! Updated by Synergy at check-out. * */ @@ -55,13 +55,20 @@ // ======== MEMBER FUNCTIONS ======== +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +// CMusSettingsPlugin::CMusSettingsPlugin() : iResources( *iCoeEnv ) { MUS_LOG( "[MUSSET] <- CMusSettingsPlugin::CMusSettingsPlugin()" ) } - +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +// CMusSettingsPlugin::~CMusSettingsPlugin() { MUS_LOG( "[MUSSET] -> CMusSettingsPlugin::~CMusSettingsPlugin()" ) @@ -84,7 +91,11 @@ MUS_LOG( "[MUSSET] <- CMusSettingsPlugin::~CMusSettingsPlugin()" ) } - +// ----------------------------------------------------------------------------- +// +// +// ----------------------------------------------------------------------------- +// void CMusSettingsPlugin::ConstructL() { MUS_LOG( "[MUSSET] -> CMusSettingsPlugin::ConstructL()" ) @@ -108,7 +119,11 @@ MUS_LOG( "[MUSSET] <- CMusSettingsPlugin::ConstructL()" ) } - +// ----------------------------------------------------------------------------- +// +// +// ----------------------------------------------------------------------------- +// CMusSettingsPlugin* CMusSettingsPlugin::NewL( TAny* /*aInitParams*/ ) { MUS_LOG( "[MUSSET] -> CMusSettingsPlugin::NewL()" ) @@ -120,11 +135,10 @@ return self; } - -// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // From class CAknView. // Returns UID of *this* settings plugin. -// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // TUid CMusSettingsPlugin::Id() const { @@ -133,11 +147,10 @@ return KGSVSSettingsPluginUID; } - -// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // Hides non-virtual member from base class CGSBaseView. // Handles a change in client rectangle size. -// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // void CMusSettingsPlugin::HandleClientRectChange() { @@ -149,11 +162,10 @@ MUS_LOG( "[MUSSET] <- CMusSettingsPlugin::HandleClientRectChange()" ) } - -// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // From class CAknView. // Called by framework when *this* control is to be activated/focused. -// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // void CMusSettingsPlugin::DoActivateL( const TVwsViewId& aPrevViewId, @@ -166,11 +178,10 @@ MUS_LOG( "[MUSSET] <- CMusSettingsPlugin::DoActivateL()" ) } - -// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // From class CAknView. // Called by framework when *this* control is to be deactivated. -// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // void CMusSettingsPlugin::DoDeactivate() { @@ -180,11 +191,10 @@ MUS_LOG( "[MUSSET] <- CMusSettingsPlugin::DoDeactivate()" ) } - -// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // From class CAknView. // Handles a user selected menu command. -// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // void CMusSettingsPlugin::HandleCommandL( TInt aCommand ) { @@ -224,11 +234,10 @@ MUS_LOG( "[MUSSET] <- CMusSettingsPlugin::HandleCommandL()" ) } - -// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // From class CGSPluginInterface. // Gets caption text of *this* plugin. -// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // void CMusSettingsPlugin::GetCaptionL( TDes& aCaption ) const { @@ -241,11 +250,10 @@ MUS_LOG( "[MUSSET] <- CMusSettingsPlugin::GetCaptionL()" ) } - -// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // From class CGSPluginInterface. // Returns provider category of *this* plugin. -// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // TInt CMusSettingsPlugin::PluginProviderCategory() const { @@ -253,11 +261,10 @@ return KGSPluginProviderInternal; } - -// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // From class MEikMenuObserver. // Called by framework before creating menus -// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // void CMusSettingsPlugin::DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ) @@ -271,12 +278,11 @@ } } } - -// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // From MDiskNotifyHandlerCallback // Called by framework When disk status changed -// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // void CMusSettingsPlugin::HandleNotifyDisk( TInt /*aError*/, const TDiskEvent& /*aEvent*/ ) @@ -296,11 +302,10 @@ MUS_LOG( "[MUSSET] <- CMusSettingsPlugin::HandleNotifyDisk()" ) } - -// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // From class CGSBaseView. // Called by GS framework to create a GS container for *this* plugin. -// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // void CMusSettingsPlugin::NewContainerL() { @@ -308,11 +313,10 @@ iContainer = new( ELeave ) CMusSettingsContainer( *iModel ); } - -// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // From class CGSBaseView. // Handles users "middle click" aka MSK on selected feature. -// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // void CMusSettingsPlugin::HandleListBoxSelectionL() { @@ -320,61 +324,35 @@ CMusSettingsContainer& container = *static_cast( iContainer ); const TInt currentItem = container.CurrentFeatureId(); - - RDebug::Print( _L( - "[CMusSettingsPlugin] Item selected: %d" ), - currentItem ); - - MusSettingsKeys::TOperatorVariant operatorVarValue = - iModel->VSSettingsOperatorVariantL(); + MUS_LOG1( "[MUSSET] Item selected: ", currentItem ) switch ( currentItem ) { case KGSSettIdVSActivation: { - if ( operatorVarValue == MusSettingsKeys::EOperatorSpecific ) - { - SwitchOnOffValueL( KGSSettIdVSActivation ); - container.UpdateListBoxL( KGSSettIdVSActivation ); - } - else - { - ShowVSSettingsActivationSettingDialogL(); - } + SwitchOnOffValueL( KGSSettIdVSActivation ); break; } - case KGSSettIdSIPProfile: { ShowVSSettingsProfileSettingDialogL(); break; } - case KGSSettIdAutoRecord: { SwitchOnOffValueL( KGSSettIdAutoRecord ); - container.UpdateListBoxL( KGSSettIdAutoRecord ); break; } - case KGSSettIdRecordedVideoSaving: { - ShowVSSettingsRecordedVideoSavingSettingDialogL(); - -// SwitchOnOffValueL( KGSSettIdRecordedVideoSaving ); -// container.UpdateListBoxL( KGSSettIdRecordedVideoSaving ); - break; } - case KGSSettIdNote: { SwitchOnOffValueL( KGSSettIdNote ); - container.UpdateListBoxL( KGSSettIdNote ); break; } - default: { break; @@ -383,12 +361,11 @@ MUS_LOG( "[MUSSET] <- CMusSettingsPlugin::HandleListBoxSelectionL()" ) } - -// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // From class CGSBaseView. // Returns container class of *this* plugin. iContainer is always garanteed to // be of type CMusSettingsContainer*. -// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // CMusSettingsContainer* CMusSettingsPlugin::Container() { @@ -396,57 +373,17 @@ return static_cast( iContainer ); } - -// ---------------------------------------------------------------------------- -// Shows a dialog for user to modify VS activation setting. Note that this -// method has an alternative method for operator specific variant. -// ---------------------------------------------------------------------------- -// -void CMusSettingsPlugin::ShowVSSettingsActivationSettingDialogL() - { - MUS_LOG( - "[MUSSET] -> CMusSettingsPlugin::ShowVSSettingsActivationSettingDialogL()" ) - - MusSettingsKeys::TActivation currentValue = - iModel->VSSettingsActivationL(); - - CDesCArrayFlat* items = iCoeEnv->ReadDesC16ArrayResourceL( - R_OPERATOR_ACTIVATION_SETTING_PAGE_LBX ); - - CleanupStack::PushL( items ); - TInt intCurrentValue = static_cast( currentValue ); - - CAknRadioButtonSettingPage* dlg = - new ( ELeave ) CAknRadioButtonSettingPage( - R_ACTIVATION_SETTING_PAGE, - intCurrentValue, - items); - - if ( dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ) ) - { - currentValue = - static_cast( intCurrentValue ); - - iModel->SetVSSettingsActivationL( currentValue ); - Container()->UpdateListBoxL( KGSSettIdVSActivation ); - } - - CleanupStack::PopAndDestroy( items ); - MUS_LOG( - "[MUSSET] <- CMusSettingsPlugin::ShowVSSettingsActivationSettingDialogL()" ) - } - -// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // Shows SIP profile setting dialog (i.e. "use default profile" or "select // profile from list"). If select profile from list is selected, a list of // SIP profiles is provided for user to choose wanted SIP profile. -// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // void CMusSettingsPlugin::ShowVSSettingsProfileSettingDialogL() { MUS_LOG( "[MUSSET] -> CMusSettingsPlugin::ShowVSSettingsProfileSettingDialogL()" ) - TInt cenRepValue = iModel->VSSettingsProfileL(); + TInt cenRepValue = MultimediaSharingSettings::SipProfileSettingL(); TInt profileMode = CMusSettingsModel::KVsSipProfileDefault; if ( cenRepValue != CMusSettingsModel::KVsSipProfileDefault ) { @@ -470,8 +407,8 @@ { if ( oldProfileMode != profileMode ) { - iModel->SetVSSettingsProfileL( - CMusSettingsModel::KVsSipProfileDefault ); + MultimediaSharingSettings::SetSipProfileSettingL( + CMusSettingsModel::KVsSipProfileDefault ); Container()->ShowNewProfileActiveAfterCallL(); Container()->UpdateListBoxL( KGSSettIdSIPProfile ); } @@ -486,10 +423,10 @@ "[MUSSET] <- CMusSettingsPlugin::ShowVSSettingsProfileSettingDialogL()" ) } -// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // Provides user a list of SIP profiles to select from. If no SIP profiles // exist an error note is displayed. -// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // void CMusSettingsPlugin::ShowVSSettingsSelectSipProfileDialogL() { @@ -504,7 +441,7 @@ else { TInt selectedIndex = iModel->ProfileIndexByIdL( - iModel->VSSettingsProfileL() ); + MultimediaSharingSettings::SipProfileSettingL() ); TInt currentIndex ( selectedIndex ); if ( selectedIndex == KErrNotFound ) @@ -527,7 +464,7 @@ // User has changed the selected profile, set new // setting to persistent storage TUint newValue = iModel->ProfileIdByIndex( selectedIndex ); - iModel->SetVSSettingsProfileL( newValue ); + MultimediaSharingSettings::SetSipProfileSettingL( newValue ); Container()->ShowNewProfileActiveAfterCallL(); Container()->UpdateListBoxL( KGSSettIdSIPProfile ); } @@ -537,11 +474,10 @@ CleanupStack::PopAndDestroy( array ); // array } - -// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // Provides a dialog for user to choose saving location for recorderded video. // (locations are naturally phone memory or memory card). -// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // void CMusSettingsPlugin::ShowVSSettingsRecordedVideoSavingSettingDialogL() { @@ -551,20 +487,9 @@ TParsePtrC( PathInfo::PhoneMemoryRootPath() ).Drive() ); TDriveUnit mmcUnit( TParsePtrC( PathInfo::MemoryCardRootPath() ).Drive() ); TInt currentValue = iModel->VSSettingsRecordedVideoSavingL(); - - - CAknMemorySelectionDialogMultiDrive* dlg = - iModel->MemorySelectionDialogLC(); - - // Use ECFDDialogTypeSave to have double list box in the query -/* CAknMemorySelectionDialog* dlg = CAknMemorySelectionDialog::NewL( - ECFDDialogTypeSave, - R_VS_RECORDED_VIDEO_SAVING_SETTING_PAGE, - EFalse ); - CleanupStack::PushL( dlg ); -*/ - + CAknMemorySelectionDialogMultiDrive* dlg = + iModel->MemorySelectionDialogLC(); TBool result( EFalse ); TDriveNumber driveNumber((TDriveNumber)currentValue); @@ -573,67 +498,37 @@ if ( result != CAknCommonDialogsBase::TReturnKey( CAknCommonDialogsBase::ERightSoftkey) ) { - if ( ( TInt ) driveNumber != currentValue ) + if ( /*( TInt )*/ driveNumber != currentValue ) { - iModel->SetVSSettingsRecordedVideoSavingL( ( TInt ) driveNumber ); + MultimediaSharingSettings::SetVideoLocationSettingL( ( TInt ) driveNumber ); } Container()->UpdateListBoxL( KGSSettIdRecordedVideoSaving ); } -/* CAknMemorySelectionDialog::TMemory mem; - if ( currentValue == ( TInt )mmcUnit ) - { - mem = CAknMemorySelectionDialog::EMemoryCard; - } - else - { - mem = CAknMemorySelectionDialog::EPhoneMemory; - } - - TFileName ignore; - TFileName path; - - if ( dlg->ExecuteL( mem, &path, &ignore ) ) - { - if ( mem == CAknMemorySelectionDialog::EPhoneMemory - && currentValue != ( TInt ) phoneMemUnit ) - { - iModel->SetVSSettingsRecordedVideoSavingL( ( TInt )phoneMemUnit ); - Container()->UpdateListBoxL( KGSSettIdRecordedVideoSaving ); - } - else if ( mem == CAknMemorySelectionDialog::EMemoryCard - && currentValue != ( TInt )mmcUnit ) - { - iModel->SetVSSettingsRecordedVideoSavingL( ( TInt )mmcUnit ); - Container()->UpdateListBoxL( KGSSettIdRecordedVideoSaving ); - } - } -*/ - CleanupStack::PopAndDestroy(dlg); MUS_LOG( "[MUSSET] <- CMusSettingsPlugin::ShowVSSettingsRecordedVideoSavingSettingDialogL()" ) } - -// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // In standard variant provides user a "Capability auditory note" setting // dialog, and in operator variant provides user an "Alerts" setting dialog. // Note that in both variants the different dialogs toggle the same setting. -// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // void CMusSettingsPlugin::ShowVSSettingsNoteSettingDialogL() { MUS_LOG( "[MUSSET] -> CMusSettingsPlugin::ShowVSSettingsNoteSettingDialogL()" ) MusSettingsKeys::TAuditoryNotification currentValue = - iModel->VSSettingsNoteL(); + MultimediaSharingSettings::AuditoryNotificationSettingL(); TInt intCurrentValue = static_cast( currentValue ); CAknRadioButtonSettingPage* dlg; CDesCArrayFlat* items; - if ( iModel->VSSettingsOperatorVariantL() == MusSettingsKeys::EStandard ) + if ( MultimediaSharingSettings::OperatorVariantSettingL() == + MusSettingsKeys::EStandard ) { items = iCoeEnv->ReadDesC16ArrayResourceL( R_VS_AUDIO_SETTING_PAGE_LBX ); @@ -657,9 +552,9 @@ if ( dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ) ) { currentValue = - static_cast - ( intCurrentValue ); - iModel->SetVSSettingsNoteL( currentValue ); + static_cast( intCurrentValue ); + MultimediaSharingSettings::SetAuditoryNotificationSettingL( + currentValue ); Container()->UpdateListBoxL( KGSSettIdNote ); } @@ -668,10 +563,9 @@ "[MUSSET] <- CMusSettingsPlugin::ShowVSSettingsNoteSettingDialogL()" ) } - -// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // Shows a notifications that no SIP profiles exists. -// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // void CMusSettingsPlugin::ShowNoProfilesNotificationL() { @@ -683,109 +577,119 @@ MUS_LOG( "[MUSSET] <- CMusSettingsPlugin::ShowNoProfilesNotificationL()" ) } - -// --------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // Switches between two possible values from one to another (i.e. toggles a // setting on/off). Toggled setting is passed in aValue parameter. -// --------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // void CMusSettingsPlugin::SwitchOnOffValueL( TInt aValue ) { MUS_LOG( "[MUSSET] -> CMusSettingsPlugin::SwitchOnOffValueL()" ) + switch( aValue ) { case KGSSettIdVSActivation: { - TInt aCallCount = 0; - RProperty::Get( NMusSessionInformationApi::KCategoryUid, - NMusSessionInformationApi::KMusCallCount, - aCallCount ); - MUS_LOG1( "CallCount ( %d )", aCallCount) - if ( aCallCount == 0 ) - { - TBool enabled = EFalse; - TRAPD( error, enabled = iHandler->ProfileEnabledL( )); - if ( error != KErrNone ) - { - // Problems with re-reading profiles; use existing array - MUS_LOG1("Error returned( %d )", - error ) - } - else - { - if( enabled ) - { - TRAPD( error, iHandler->EnableProfileL() ); - if ( error != KErrNone ) - { - // Problems with re-reading profiles; use existing array - iModel->SetActivationItem( ETrue ); - } - iModel->SetActivationItem( EFalse ); - } - else - { - TRAP_IGNORE( iHandler->DisableProfileL() ); - iModel->SetActivationItem( ETrue ); - } - } - } + MusSettingsKeys::TOperatorVariant operatorVarValue = + MultimediaSharingSettings::OperatorVariantSettingL(); + + if ( operatorVarValue == MusSettingsKeys::EOperatorSpecific ) + { + + TInt aCallCount = 0; + RProperty::Get( NMusSessionInformationApi::KCategoryUid, + NMusSessionInformationApi::KMusCallCount, + aCallCount ); + MUS_LOG1( "CallCount ( %d )", aCallCount) + if ( aCallCount == 0 ) + { + TBool enabled = EFalse; + TRAPD( error, enabled = iHandler->ProfileEnabledL( )); + if ( error != KErrNone ) + { + // Problems with re-reading profiles; use existing array + MUS_LOG1("Error returned( %d )", error ) + } + else + { + if( enabled ) + { + TRAPD( error, iHandler->EnableProfileL() ); + if ( error != KErrNone ) + { + // Problems with re-reading profiles; use existing array + iModel->SetActivationItem( ETrue ); + } + iModel->SetActivationItem( EFalse ); + } + else + { + TRAP_IGNORE( iHandler->DisableProfileL() ); + iModel->SetActivationItem( ETrue ); + } + } + } + } + else + { + if ( MusSettingsKeys::EAlwaysActive == + MultimediaSharingSettings::ActivationSettingL() ) + { + MUS_LOG( "[MUSSET] Activation setting set off" ) + //MusSettingsKeys::ENever = 2 can not be used anymore + //EActiveInHomeNetworks = 1 is used instead -> off + MultimediaSharingSettings::SetActivationSettingL( + MusSettingsKeys::EActiveInHomeNetworks ); + } + else + { + MUS_LOG( "[MUSSET] Activation setting set on" ) + MultimediaSharingSettings::SetActivationSettingL( + MusSettingsKeys::EAlwaysActive ); + } + } break; } case KGSSettIdAutoRecord: { if ( MusSettingsKeys::EAutoRecordOff == - iModel->VSSettingsAutoRecordL() ) + MultimediaSharingSettings::AutoRecordSettingL() ) { - iModel->SetVSSettingsAutoRecordL( - MusSettingsKeys::EAutoRecordOn ); + MultimediaSharingSettings::SetAutoRecordSettingL( + MusSettingsKeys::EAutoRecordOn ); } else { - iModel->SetVSSettingsAutoRecordL( - MusSettingsKeys::EAutoRecordOff ); + MultimediaSharingSettings::SetAutoRecordSettingL( + MusSettingsKeys::EAutoRecordOff ); } break; } - case KGSSettIdRecordedVideoSaving: - { - TDriveUnit phoneMemUnit( - TParsePtrC( PathInfo::PhoneMemoryRootPath() ).Drive() ); - TDriveUnit mmcUnit( - TParsePtrC( PathInfo::MemoryCardRootPath() ).Drive() ); - - if ( ( TInt )phoneMemUnit - == iModel->VSSettingsRecordedVideoSavingL() ) - { - iModel->SetVSSettingsRecordedVideoSavingL( ( TInt )mmcUnit ); - } - else - { - iModel->SetVSSettingsRecordedVideoSavingL( ( TInt )phoneMemUnit ); - } - break; - } case KGSSettIdNote: { - if ( MusSettingsKeys::EAuditoryNotificationOn - == iModel->VSSettingsNoteL() ) + if ( MusSettingsKeys::EAuditoryNotificationOn == + MultimediaSharingSettings::AuditoryNotificationSettingL() ) { - iModel->SetVSSettingsNoteL( + MultimediaSharingSettings::SetAuditoryNotificationSettingL( MusSettingsKeys::EAuditoryNotificationOff ); } else { - iModel->SetVSSettingsNoteL( + MultimediaSharingSettings::SetAuditoryNotificationSettingL( MusSettingsKeys::EAuditoryNotificationOn ); } break; } + default: { MUS_LOG( "[MUSSET] -> CMusSettingsPlugin::SwitchOnOffValueL() - error unknown setting" ) User::Leave( KErrArgument ); } } + + Container()->UpdateListBoxL( aValue ); + MUS_LOG( "[MUSSET] <- CMusSettingsPlugin::SwitchOnOffValueL()" ) } @@ -804,11 +708,11 @@ CleanupStack::PopAndDestroy( dlg ); } -// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // From class CGSPluginInterface. // Creates a new icon of desired type. Overrided to provide custom icons. // Ownership of the created icon is transferred to the caller. -// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // CGulIcon* CMusSettingsPlugin::CreateIconL( const TUid aIconType ) { @@ -849,23 +753,37 @@ return icon; } +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +// void CMusSettingsPlugin::OpenResourceFileL() { - if (!iResourceFileOpen) - { - HBufC* fileName = MusResourceFinderUtil::ResourcePathL( - KVSSettingsResourceFileName ); - TFileName fName(*fileName); - delete fileName; - MUS_LOG_TDESC( "[MUSSET] Resource FileName ",fName ) - iResources.OpenL(fName); - iResourceFileOpen = true; - } + MUS_LOG( "[MUSSET] -> CMusSettingsPlugin::OpenResourceFileL()" ) + + if (!iResourceFileOpen) + { + HBufC* fileName = MusResourceFinderUtil::ResourcePathL( + KVSSettingsResourceFileName ); + TFileName fName(*fileName); + delete fileName; + MUS_LOG_TDESC( "[MUSSET] Resource FileName ",fName ) + iResources.OpenL(fName); + iResourceFileOpen = true; + } + + MUS_LOG( "[MUSSET] <- CMusSettingsPlugin::OpenResourceFileL()" ) } - + +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +// void CMusSettingsPlugin::CloseResourceFile() - { - iResources.Close(); - iResourceFileOpen = false; - MUS_LOG( "[MUSSET] Resource file closed " ) - } + { + MUS_LOG( "[MUSSET] -> CMusSettingsPlugin::CloseResourceFile()" ) + iResources.Close(); + iResourceFileOpen = false; + MUS_LOG( "[MUSSET] <- CMusSettingsPlugin::CloseResourceFile()" ) + } + diff -r 065f1826587f -r b31261fd4e04 mmshplugins/mmshsettingsuiplugin/src/mussipprofilemodel.cpp --- a/mmshplugins/mmshsettingsuiplugin/src/mussipprofilemodel.cpp Thu Jan 07 12:45:29 2010 +0200 +++ b/mmshplugins/mmshsettingsuiplugin/src/mussipprofilemodel.cpp Tue Feb 02 00:09:07 2010 +0200 @@ -12,7 +12,7 @@ * Contributors: * * Description: Model for managing SIP profiles. -* Version : %version: 14 % << Don't touch! Updated by Synergy at check-out. +* Version : %version: 16 % << Don't touch! Updated by Synergy at check-out. * */ @@ -25,10 +25,11 @@ #include #include #include +#include #include +#include "mussettingsmodel.h" -const TInt KSIPGranularity = 5; const TInt KUnknownProfileId = 0; /** @@ -40,20 +41,30 @@ // ======== MEMBER FUNCTIONS ======== +// ---------------------------------------------------------------------------- +// +// ---------------------------------------------------------------------------- +// CMusSIPProfileModel::CMusSIPProfileModel() { - MUS_LOG( "[MUSSET] <- CMusSIPProfileModel::CMusSIPProfileModel()" ) } - +// ---------------------------------------------------------------------------- +// +// ---------------------------------------------------------------------------- +// void CMusSIPProfileModel::ConstructL() { MUS_LOG( "[MUSSET] <- CMusSIPProfileModel::ConstructL()" ) iEngine = CSIPManagedProfileRegistry::NewL( *this ); - ReadArrayFromEngineL(); + iEngine->ProfilesL( iProfiles ); + SortProfilesL(); } - +// ---------------------------------------------------------------------------- +// +// ---------------------------------------------------------------------------- +// CMusSIPProfileModel* CMusSIPProfileModel::NewL() { MUS_LOG( "[MUSSET] -> CMusSIPProfileModel::NewL()" ) @@ -67,30 +78,28 @@ return self; } - +// ---------------------------------------------------------------------------- +// +// ---------------------------------------------------------------------------- +// CMusSIPProfileModel::~CMusSIPProfileModel() { MUS_LOG( "[MUSSET] -> CMusSIPProfileModel::~CMusSIPProfileModel()" ) - DeleteProfiles(); + iProfiles.ResetAndDestroy(); delete iEngine; - iEngine = NULL; MUS_LOG( "[MUSSET] <- CMusSIPProfileModel::~CMusSIPProfileModel()" ) } - // ---------------------------------------------------------------------------- -// Returns pointer to the locally cached SIP profile array. +// Returns reference to the locally cached SIP profile array. // ---------------------------------------------------------------------------- // -CArrayPtr* CMusSIPProfileModel::ProfileArrayL() +RPointerArray& CMusSIPProfileModel::ProfileArrayL() { - MUS_LOG( "[MUSSET] -> CMusSIPProfileModel::ProfileArrayL()" ) - ReadProfileListFromEngineSafeL(); - MUS_LOG( "[MUSSET] <- CMusSIPProfileModel::ProfileArrayL()" ) + MUS_LOG( "[MUSSET] <-> CMusSIPProfileModel::ProfileArrayL()" ) return iProfiles; } - // ---------------------------------------------------------------------------- // Returns index to the default SIP profile in locally cached array. // ---------------------------------------------------------------------------- @@ -100,12 +109,12 @@ MUS_LOG( "[MUSSET] -> CMusSIPProfileModel::DefaultProfileIndex()" ) TInt index( KErrNotFound ); - for ( TInt i = 0; i < iProfiles->Count(); i++ ) + for ( TInt i = 0; i < iProfiles.Count(); i++ ) { TBool defProfile( EFalse ); if ( KErrNone == - iProfiles->At( i )->GetParameter( KSIPDefaultProfile, defProfile ) + iProfiles[i]->GetParameter( KSIPDefaultProfile, defProfile ) && defProfile ) { index = i; @@ -118,7 +127,6 @@ return index; } - // ---------------------------------------------------------------------------- // Returns id of the default SIP profile. If default SIP profile is not found // KUnknownProfileId is returned. @@ -129,15 +137,13 @@ MUS_LOG( "[MUSSET] -> CMusSIPProfileModel::DefaultProfileId()" ) TUint32 id( KUnknownProfileId ); - for ( TInt i = 0; i < iProfiles->Count(); i++ ) + for ( TInt i = 0; i < iProfiles.Count(); i++ ) { TBool defProfile( EFalse ); - if ( - KErrNone == - iProfiles->At( i )->GetParameter( KSIPDefaultProfile, defProfile ) - && defProfile ) + TInt error = iProfiles[i]->GetParameter( KSIPDefaultProfile, defProfile ); + if ( error == KErrNone && defProfile ) { - iProfiles->At( i )->GetParameter( KSIPProfileId, id ); + iProfiles[i]->GetParameter( KSIPProfileId, id ); break; } } @@ -146,6 +152,7 @@ id ) return id; } + // ----------------------------------------------------------------------------- // Disable SIP Registration. // ----------------------------------------------------------------------------- @@ -204,6 +211,7 @@ MUS_LOG( "[MUSSET] <- CMusAvaRegisterAvailability::ProfileEnabledL " ) return enabled; } + // ---------------------------------------------------------------------------- // Returns index of the default SIP profile on locally cached array. If default // SIP profile is not found, KErrNotFound is returned. @@ -213,14 +221,12 @@ { MUS_LOG( "[MUSSET] -> CMusSIPProfileModel::ProfileIndexByIdL()" ) TInt index( KErrNotFound ); - - ReadProfileListFromEngineSafeL(); - for ( TInt i = 0; i < iProfiles->Count(); i++ ) + + for ( TInt i = 0; i < iProfiles.Count(); i++ ) { TUint32 id( KUnknownProfileId ); - - if ( KErrNone == iProfiles->At( i )->GetParameter( KSIPProfileId, id ) - && id == aId ) + TInt error = iProfiles[i]->GetParameter( KSIPProfileId, id ); + if ( error == KErrNone && id == aId ) { index = i; break; @@ -242,10 +248,9 @@ MUS_LOG1( "[MUSSET] -> CMusSIPProfileModel::ProfileIdByIndex()( %d )", aIndex ) TUint32 profileId( KUnknownProfileId ); - if ( iProfiles->Count() > aIndex ) + if ( aIndex < iProfiles.Count() ) { - if ( iProfiles->At( aIndex )->GetParameter( - KSIPProfileId, profileId ) ) + if ( iProfiles[aIndex]->GetParameter( KSIPProfileId, profileId ) ) { profileId = KUnknownProfileId; } @@ -255,41 +260,6 @@ return profileId; } - -// ---------------------------------------------------------------------------- -// Reads SIP profiles from SIP Profile Client array to locally cached array. -// ---------------------------------------------------------------------------- -// -void CMusSIPProfileModel::ReadArrayFromEngineL() - { - MUS_LOG( "[MUSSET] -> CMusSIPProfileModel::ReadArrayFromEngineL()" ) - - DeleteProfiles(); - - // Create the profile pointer array - iProfiles = - new ( ELeave ) CArrayPtrFlat( KSIPGranularity ); - - RPointerArray profilePointerArray; - TCleanupItem clItem( ResetAndDestroy, &profilePointerArray ); - CleanupStack::PushL( clItem ); - - iEngine->ProfilesL( profilePointerArray ); - for ( TInt i = 0; i < profilePointerArray.Count(); i++ ) - { - iProfiles->AppendL( - static_cast( profilePointerArray[i] ) ); - } - - profilePointerArray.Reset(); - CleanupStack::PopAndDestroy(); // clItem (profilePointerArray) - - SortProfilesL(); - - MUS_LOG( "[MUSSET] <- CMusSIPProfileModel::ReadArrayFromEngineL()" ) - } - - // ---------------------------------------------------------------------------- // Sorts internal array of SIP profiles by id. Used algorithm is generally // slower than quicksort and selectionsort but very feasible for expected @@ -300,52 +270,69 @@ { TUint32 profileIdFirst( 0 ); TUint32 profileIdSecond( 0 ); - for ( TInt a = 0; a < iProfiles->Count() - 1; a++ ) + for ( TInt a = 0; a < iProfiles.Count() - 1; a++ ) { - for ( TInt b = a + 1; b < iProfiles->Count(); b++ ) + for ( TInt b = a + 1; b < iProfiles.Count(); b++ ) { - User::LeaveIfError( iProfiles->At( a )->GetParameter( + User::LeaveIfError( iProfiles[a]->GetParameter( KSIPProfileId, profileIdFirst ) ); - User::LeaveIfError( iProfiles->At( b )->GetParameter( + User::LeaveIfError( iProfiles[b]->GetParameter( KSIPProfileId, profileIdSecond ) ); if ( profileIdFirst > profileIdSecond ) { - CSIPManagedProfile* tmp = iProfiles->At( b ); - iProfiles->At( b ) = iProfiles->At( a ); - iProfiles->At( a ) = tmp; + CSIPProfile* tmp = iProfiles[b]; + iProfiles[b] = iProfiles[a]; + iProfiles[a] = tmp; } } } } - -// ---------------------------------------------------------------------------- -// Deletes internally cached SIP profiles. -// ---------------------------------------------------------------------------- -// -void CMusSIPProfileModel::DeleteProfiles() - { - if ( iProfiles ) - { - iProfiles->ResetAndDestroy(); - delete iProfiles; - iProfiles = NULL; - } - } - - // ---------------------------------------------------------------------------- // From class MSIPProfileRegistryObserver. // Notifies of an event in SIP profile registry. // ---------------------------------------------------------------------------- // void CMusSIPProfileModel::ProfileRegistryEventOccurred( - TUint32 /*aSIPProfileId*/, TEvent /*aEvent*/ ) - { + TUint32 aSIPProfileId, TEvent aEvent ) + { + MUS_LOG("[MUSSET] -> CMusSIPProfileModel::ProfileRegistryEventOccurred()" ) + MUS_LOG2(" SIPProfileId is %d,Event is %d",aSIPProfileId,aEvent) + + // We revert back to default settings if the profile used by MuS is deleted + if ( aEvent == EProfileDestroyed ) + { + TRAP_IGNORE( + //if the profile is the profile used by mush + if ( MultimediaSharingSettings::SipProfileSettingL() == + aSIPProfileId ) + { + //set the profile to default + MultimediaSharingSettings::SetSipProfileSettingL( + CMusSettingsModel::KVsSipProfileDefault ); + //set mush off + MultimediaSharingSettings::SetActivationSettingL( + MusSettingsKeys::EActiveInHomeNetworks ); + } + ); + } + + if ( aEvent == EProfileCreated || + aEvent == EProfileUpdated || + aEvent == EProfileDestroyed ) + { + // Profiles have been manipulated in SIP side, we must delete client + // side profile objects and retrieve them again. If fetching fails, + // we have empty array which is better than showing wrong values to + // user. + iProfiles.ResetAndDestroy(); + TRAP_IGNORE( iEngine->ProfilesL( iProfiles ) ); + TRAP_IGNORE( SortProfilesL() ); + } + MUS_LOG( "[MUSSET] <- CMusSIPProfileModel::ProfileRegistryEventOccurred()" ) } - // ---------------------------------------------------------------------------- // From class MSIPProfileRegistryObserver. // An asynchronous error has occurred related to SIP profile @@ -358,50 +345,11 @@ MUS_LOG( "[MUSSET] <- CMusSIPProfileModel::ProfileRegistryErrorOccurred()" ) } - // ---------------------------------------------------------------------------- -// Reads SIP profile list from engine; if reading fails, old cached list is -// kept and returned. +//Set CMusSettingsModel to handle ProfileRegistry Event. // ---------------------------------------------------------------------------- // -void CMusSIPProfileModel::ReadProfileListFromEngineSafeL() - { - MUS_LOG( - "[MUSSET] -> CMusSIPProfileModel::ReadProfileListFromEngineSafeL()" ) - // To prevent complete disaster it we'll save the pointer of the old array - CArrayPtrFlat* profiles = iProfiles; - iProfiles = 0; - TRAPD( error, ReadArrayFromEngineL() ); - - if ( error ) - { - // Problems with re-reading profiles; use existing array - DeleteProfiles(); - iProfiles = profiles; - User::Leave( error ); - } - else - { - // No problems; delete backup array - profiles->ResetAndDestroy(); - delete profiles; - } - MUS_LOG( - "[MUSSET] <- CMusSIPProfileModel::ReadProfileListFromEngineSafeL()" ) - } - - -// ---------------------------------------------------------------------------- -// For deleting RPointerArray in case of leave (used in association with -// TCleanupItem). -// ---------------------------------------------------------------------------- -// -void CMusSIPProfileModel::ResetAndDestroy( TAny* aPointerArray ) - { - MUS_LOG( "[MUSSET] -> CMusSIPProfileModel::ResetAndDestroy()" ) - RPointerArray* array = - static_cast*>( aPointerArray ); - array->ResetAndDestroy(); - array->Close(); - MUS_LOG( "[MUSSET] <- CMusSIPProfileModel::ResetAndDestroy()" ) - } +void CMusSIPProfileModel::SetCMusSettingsModel(CMusSettingsModel* aCMusSettingsModel) + { + iCMusSettingsModel = aCMusSettingsModel; + } diff -r 065f1826587f -r b31261fd4e04 tsrc/CenrepEditor/data/cenrepeditor.rss --- a/tsrc/CenrepEditor/data/cenrepeditor.rss Thu Jan 07 12:45:29 2010 +0200 +++ b/tsrc/CenrepEditor/data/cenrepeditor.rss Tue Feb 02 00:09:07 2010 +0200 @@ -495,9 +495,8 @@ { items = { - AVKON_ENUMERATED_TEXT { value=0; text = "0.EAlwaysActive"; }, - AVKON_ENUMERATED_TEXT { value=1; text = "1.EActiveInHomeNetworks"; }, - AVKON_ENUMERATED_TEXT { value=2; text = "2.ENever"; } + AVKON_ENUMERATED_TEXT { value=0; text = "0.EAlwaysActive"; }, + AVKON_ENUMERATED_TEXT { value=1; text = "1.ENever"; } }; } @@ -506,8 +505,7 @@ items = { LBUF { txt = "0.EAlwaysActive"; }, - LBUF { txt = "1.EActiveInHomeNetworks"; }, - LBUF { txt = "2.ENever"; } + LBUF { txt = "1.ENever"; } }; }