mmshplugins/mmshsettingsuiplugin/src/mussettingscontainer.cpp
branchRCL_3
changeset 22 73a1feb507fb
parent 21 33a5d2bbf6fc
child 23 bc78a40cd63c
equal deleted inserted replaced
21:33a5d2bbf6fc 22:73a1feb507fb
    10 * Nokia Corporation - initial contribution.
    10 * Nokia Corporation - initial contribution.
    11 *
    11 *
    12 * Contributors:
    12 * Contributors:
    13 *
    13 *
    14 * Description:  Container for MUSSettingsPlugin.
    14 * Description:  Container for MUSSettingsPlugin.
    15 *  Version     : %version: be1sipx1#22 % << Don't touch! Updated by Synergy at check-out.
       
    16 *
    15 *
    17 */
    16 */
    18 
    17 
    19 
    18 
    20 
    19 
    21 #include "mussettingscontainer.h"
    20 #include    "mussettingscontainer.h"
    22 #include "mussettingsplugin.h"
    21 #include    "mussettingsplugin.h"
    23 #include "mussettingsmodel.h"
    22 #include    "mussettingsmodel.h"
    24 #include "gslistbox.h"
    23 #include    "gslistbox.h"
    25 #include "mussettingsplugin.hrh"
    24 #include    "mussettingsplugin.hrh"
    26 #include <mussettingsuirsc.rsg>
    25 #include    <mussettingsuirsc.rsg>
    27 #include <aknlists.h>
    26 #include    <aknlists.h>
    28 #include <akntitle.h>
    27 #include    <akntitle.h>
    29 #include <aknnotewrappers.h>
    28 #include 	<aknnotewrappers.h>
    30 #include <csxhelp/msh.hlp.hrh>
    29 #include    <csxhelp/msh.hlp.hrh>
    31 #include <gsfwviewuids.h>
    30 #include    <gsfwviewuids.h>
    32 #include <StringLoader.h>
    31 #include    <StringLoader.h>
    33 #include <sipmanagedprofile.h>
    32 #include 	<sipmanagedprofile.h>
    34 #include <ctsydomainpskeys.h>
    33 #include 	<ctsydomainpskeys.h>
    35 #include <e32property.h>
    34 #include	<e32property.h>
    36 #include <pathinfo.h>
    35 #include    <pathinfo.h>
    37 
    36 
    38 
    37 
    39 #ifdef RD_MULTIPLE_DRIVE
       
    40 #include    <CAknMemorySelectionDialogMultiDrive.h>
    38 #include    <CAknMemorySelectionDialogMultiDrive.h>
    41 
    39 
    42 #endif
       
    43 
    40 
    44 /** default SIP profile is selected */
    41 /** default SIP profile is selected */
    45 const TInt KDefaultSipProfile = 0;
    42 const TInt KDefaultSipProfile = 0;
    46 
    43 
    47 /** No SIP profile is selected */
    44 /** No SIP profile is selected */
    63 
    60 
    64 void CMusSettingsContainer::ConstructL( const TRect& aRect )
    61 void CMusSettingsContainer::ConstructL( const TRect& aRect )
    65     {
    62     {
    66     MUS_LOG( "[MUSSET] -> CMusSettingsContainer::ConstructL()" )
    63     MUS_LOG( "[MUSSET] -> CMusSettingsContainer::ConstructL()" )
    67 
    64 
    68     iOperatorVariant = MultimediaSharingSettings::OperatorVariantSettingL();
    65     iOperatorVariant = iModel.VSSettingsOperatorVariantL();
    69 
    66 
    70     iListBox = new( ELeave ) CAknSettingStyleListBox;
    67     iListBox = new( ELeave ) CAknSettingStyleListBox;
    71 
    68 
    72     if ( iOperatorVariant == MusSettingsKeys::EStandard )
    69     if ( iOperatorVariant == MusSettingsKeys::EStandard )
    73     	{
    70     	{
    84 
    81 
    85 CMusSettingsContainer::~CMusSettingsContainer()
    82 CMusSettingsContainer::~CMusSettingsContainer()
    86     {
    83     {
    87     MUS_LOG( "[MUSSET] -> CMusSettingsContainer::~CMusSettingsContainer()" )
    84     MUS_LOG( "[MUSSET] -> CMusSettingsContainer::~CMusSettingsContainer()" )
    88     delete iActivationItems;
    85     delete iActivationItems;
    89     delete iProfileItems;
    86   	delete iProfileItems;
    90     delete iAutoRecordItems;
    87   	delete iAutoRecordItems;
    91     delete iNoteItems;
    88    	delete iListboxItemArray;
    92     delete iListboxItemArray;
    89    	delete iNoteItems;
    93     MUS_LOG( "[MUSSET] <- CMusSettingsContainer::~CMusSettingsContainer()" )
    90     MUS_LOG( "[MUSSET] <- CMusSettingsContainer::~CMusSettingsContainer()" )
    94     }
    91     }
    95 
    92 
    96 
    93 
    97 // -----------------------------------------------------------------------------
    94 // ---------------------------------------------------------------------------
    98 // Constructs a listbox from a specified resource id.
    95 // Constructs a listbox from a specified resource id.
    99 // -----------------------------------------------------------------------------
    96 // ---------------------------------------------------------------------------
   100 //
    97 //
   101 void CMusSettingsContainer::ConstructListBoxL( TInt aResLbxId )
    98 void CMusSettingsContainer::ConstructListBoxL( TInt aResLbxId )
   102     {
    99     {
   103     MUS_LOG( "[MUSSET] -> CMusSettingsContainer::ConstructListBoxL()" )
   100     MUS_LOG( "[MUSSET] -> CMusSettingsContainer::ConstructListBoxL()" )
   104     iListBox->ConstructL( this, EAknListBoxSelectionList );
   101     iListBox->ConstructL( this, EAknListBoxSelectionList );
   105     iListboxItemArray = CGSListBoxItemTextArray::NewL(
   102     iListboxItemArray = CGSListBoxItemTextArray::NewL(
   106         aResLbxId, *iListBox, *iCoeEnv );
   103         aResLbxId, *iListBox, *iCoeEnv );
   107     iListBox->Model()->SetItemTextArray( iListboxItemArray );
   104     iListBox->Model()->SetItemTextArray( iListboxItemArray );
   108     iListBox->Model()->SetOwnershipType( ELbmDoesNotOwnItemArray );
   105     iListBox->Model()->SetOwnershipType( ELbmDoesNotOwnItemArray );
   109 
   106 
   110     // OCC: removed "Automatic in home network" choice
   107     if ( iOperatorVariant == MusSettingsKeys::EStandard )
   111     iActivationItems =
   108     	{
   112             iCoeEnv->ReadDesC16ArrayResourceL(
   109     	iActivationItems = iCoeEnv->ReadDesC16ArrayResourceL( 
   113             R_OPERATOR_ACTIVATION_SETTING_PAGE_LBX );
   110     	                                R_ACTIVATION_SETTING_PAGE_LBX );
       
   111     	}
       
   112     else
       
   113     	{
       
   114     	iActivationItems =
       
   115     		iCoeEnv->ReadDesC16ArrayResourceL(
       
   116     		R_OPERATOR_ACTIVATION_SETTING_PAGE_LBX );
       
   117     	}
   114 
   118 
   115     iAutoRecordItems = iCoeEnv->ReadDesC16ArrayResourceL(
   119     iAutoRecordItems = iCoeEnv->ReadDesC16ArrayResourceL(
   116                                     R_VS_VIDEO_SAVING_SETTING_PAGE_LBX );
   120                                     R_VS_VIDEO_SAVING_SETTING_PAGE_LBX );
   117 
   121 
   118     iProfileItems = iCoeEnv->ReadDesC16ArrayResourceL(
   122     iProfileItems = iCoeEnv->ReadDesC16ArrayResourceL(
   119     	R_SIP_PROFILE_SETTING_PAGE_LBX );
   123     	R_SIP_PROFILE_SETTING_PAGE_LBX );
   120 
   124 
   121     iNoteItems = iCoeEnv->ReadDesC16ArrayResourceL(
   125     if ( iOperatorVariant == MusSettingsKeys::EStandard )
   122 							R_VS_AUDIO_SETTING_PAGE_LBX );
   126     	{
   123     
   127         iNoteItems = iCoeEnv->ReadDesC16ArrayResourceL(
       
   128         	R_VS_AUDIO_SETTING_PAGE_LBX );
       
   129         }
       
   130     else
       
   131         {
       
   132         iNoteItems = iCoeEnv->ReadDesC16ArrayResourceL(
       
   133             R_VS_NOTE_SETTING_PAGE_LBX );
       
   134         }
       
   135 
   124     CreateListBoxItemsL();
   136     CreateListBoxItemsL();
   125 
   137 
   126     // Operator variant mode needs some item should not be visible to user.
   138     // Operator variant mode needs some item should not be visible to user.
   127     // Hide those items.
   139     // Hide those items.
   128     if ( iOperatorVariant == MusSettingsKeys::EOperatorSpecific )
   140     if ( iOperatorVariant == MusSettingsKeys::EOperatorSpecific )
   129     	{        
   141     	{        
   130         // Hide VS Activation Settings. If needed in future it can be made
   142         // Hide VS Activation Settings. If needed in future it can be made
   131         // visible.
   143         // visible.
   132     	// 
   144         HideItemsL( KGSSettIdVSActivation );
   133         //HideItemsL( KGSSettIdVSActivation );
       
   134         // Hide SIP Profile choosing option.If needed in future it can be made
   145         // Hide SIP Profile choosing option.If needed in future it can be made
   135         // visible.
   146         // visible.
   136         HideItemsL( KGSSettIdSIPProfile );
   147         HideItemsL( KGSSettIdSIPProfile );
   137         }    
   148         }    
   138     MUS_LOG( "[MUSSET] <- CMusSettingsContainer::ConstructListBoxL()" )
   149     MUS_LOG( "[MUSSET] <- CMusSettingsContainer::ConstructListBoxL()" )
   139     }
   150     }
   140 
   151 
   141 
   152 
   142 // -----------------------------------------------------------------------------
   153 // ---------------------------------------------------------------------------
   143 // Populates listbox items.
   154 // Populates listbox items.
   144 // -----------------------------------------------------------------------------
   155 // ---------------------------------------------------------------------------
   145 //
   156 //
   146 void CMusSettingsContainer::CreateListBoxItemsL()
   157 void CMusSettingsContainer::CreateListBoxItemsL()
   147     {
   158     {
   148     MUS_LOG( "[MUSSET] -> CMusSettingsContainer::CreateListBoxItemsL()" )
   159     MUS_LOG( "[MUSSET] -> CMusSettingsContainer::CreateListBoxItemsL()" )
   149     if ( iOperatorVariant == MusSettingsKeys::EStandard )
   160     if ( iOperatorVariant == MusSettingsKeys::EStandard )
   160     MakeNoteItemL();
   171     MakeNoteItemL();
   161     MUS_LOG( "[MUSSET] <- CMusSettingsContainer::CreateListBoxItemsL()" )
   172     MUS_LOG( "[MUSSET] <- CMusSettingsContainer::CreateListBoxItemsL()" )
   162     }
   173     }
   163 
   174 
   164 
   175 
   165 // -----------------------------------------------------------------------------
   176 // ---------------------------------------------------------------------------
   166 // Updates a specified feature (item in listbox).
   177 // Updates a specified feature (item in listbox).
   167 // -----------------------------------------------------------------------------
   178 // ---------------------------------------------------------------------------
   168 //
   179 //
   169 void CMusSettingsContainer::UpdateListBoxL( TInt aFeatureId )
   180 void CMusSettingsContainer::UpdateListBoxL( TInt aFeatureId )
   170     {
   181     {
   171     MUS_LOG1( "[MUSSET] <- CMusSettingsContainer::UpdateListBoxL()( %d )",
   182     MUS_LOG1( "[MUSSET] <- CMusSettingsContainer::UpdateListBoxL()( %d )",
   172               aFeatureId )
   183               aFeatureId )
   179             	}
   190             	}
   180             else
   191             else
   181             	{
   192             	{
   182             	MakeOperatorActivationItemL();
   193             	MakeOperatorActivationItemL();
   183             	}
   194             	}
   184             break;
   195 	        break;
   185         case KGSSettIdSIPProfile:
   196         case KGSSettIdSIPProfile:
   186             MakeSIPProfileItemL();
   197             MakeSIPProfileItemL();
   187             break;
   198             break;
   188         case KGSSettIdAutoRecord:
   199         case KGSSettIdAutoRecord:
   189             MakeAutoRecordItemL();
   200             MakeAutoRecordItemL();
   190             break;
   201         	break;
   191         case KGSSettIdRecordedVideoSaving:
   202         case KGSSettIdRecordedVideoSaving:
   192             MakeRecordedVideoSavingItemL();
   203         	MakeRecordedVideoSavingItemL();
   193             break;
   204         	break;
   194         case KGSSettIdNote:
   205         case KGSSettIdNote:
   195             MakeNoteItemL();
   206         	MakeNoteItemL();
   196             break;
   207         	break;
   197         default:
   208         default:
   198             break;
   209             break;
   199         }
   210         }
   200 
   211 
   201     iListBox->HandleItemAdditionL();
   212     iListBox->HandleItemAdditionL();
   202     MUS_LOG( "[MUSSET] <- CMusSettingsContainer::UpdateListBoxL()" )
   213     MUS_LOG( "[MUSSET] <- CMusSettingsContainer::UpdateListBoxL()" )
   203     }
   214     }
   204 
   215 
   205 
   216 
   206 // -----------------------------------------------------------------------------
   217 // ---------------------------------------------------------------------------
   207 // Generic method to add an item to listbox and make it visible.
   218 // Generic method to add an item to listbox and make it visible.
   208 // -----------------------------------------------------------------------------
   219 // ---------------------------------------------------------------------------
   209 //
   220 //
   210 void CMusSettingsContainer::AddItemL( TInt aId, const TPtrC aText )
   221 void CMusSettingsContainer::AddItemL( TInt aId, const TPtrC aText )
   211     {
   222 	{
   212     MUS_LOG( "[MUSSET] -> CMusSettingsContainer::AddItemL()" )
   223 	MUS_LOG( "[MUSSET] -> CMusSettingsContainer::AddItemL()" )
   213     iListboxItemArray->SetDynamicTextL( aId, aText );
   224     iListboxItemArray->SetDynamicTextL( aId, aText );
   214     iListboxItemArray->SetItemVisibilityL( aId,
   225     iListboxItemArray->SetItemVisibilityL( aId,
   215     CGSListBoxItemTextArray::EVisible );
   226     	CGSListBoxItemTextArray::EVisible );
   216     MUS_LOG( "[MUSSET] <- CMusSettingsContainer::AddItemL()" )
   227 	MUS_LOG( "[MUSSET] <- CMusSettingsContainer::AddItemL()" )
   217     }
   228 	}
   218 
   229 
   219 
   230 
   220 // -----------------------------------------------------------------------------
   231 // ---------------------------------------------------------------------------
   221 // Adds activation setting item to listbox.
   232 // Adds activation setting item to listbox.
   222 // -----------------------------------------------------------------------------
   233 // ---------------------------------------------------------------------------
   223 //
   234 //
   224 void CMusSettingsContainer::MakeActivationItemL()
   235 void CMusSettingsContainer::MakeActivationItemL()
   225     {
   236     {
   226     MUS_LOG( "[MUSSET] -> CMusSettingsContainer::MakeActivationItemL()" )
   237     MUS_LOG( "[MUSSET] -> CMusSettingsContainer::MakeActivationItemL()" )
   227 
   238 
   228     MusSettingsKeys::TActivation activation = 
   239    	iVSActication = iModel.VSSettingsActivationL();
   229                                 MultimediaSharingSettings::ActivationSettingL();
   240    	AddItemL( KGSSettIdVSActivation, ( *iActivationItems )[ iVSActication ] );
   230  
       
   231     if ( activation != MusSettingsKeys::EAlwaysActive )
       
   232         {
       
   233         // We make sure that if someone has written to CenRep value bigger
       
   234         // than 1 (which after OCC changes means 'Off') we treat it as 'Off'.
       
   235         activation = MusSettingsKeys::EActiveInHomeNetworks;
       
   236         }
       
   237     
       
   238     AddItemL( KGSSettIdVSActivation, ( *iActivationItems )[ activation ] );
       
   239 
   241 
   240     MUS_LOG( "[MUSSET] <- CMusSettingsContainer::MakeActivationItemL()" )
   242     MUS_LOG( "[MUSSET] <- CMusSettingsContainer::MakeActivationItemL()" )
   241     }
   243     }
   242 
   244 
   243 
   245 
   244 // -----------------------------------------------------------------------------
   246 // ---------------------------------------------------------------------------
   245 // Adds operator specific activation setting item to listbox.
   247 // Adds operator specific activation setting item to listbox.
   246 // -----------------------------------------------------------------------------
   248 // ---------------------------------------------------------------------------
   247 //
   249 //
   248 void CMusSettingsContainer::MakeOperatorActivationItemL()
   250 void CMusSettingsContainer::MakeOperatorActivationItemL()
   249     {
   251     {
   250     MUS_LOG( "[MUSSET] -> CMusSettingsContainer::MakeOperatorActivationItemL()" )
   252     MUS_LOG( "[MUSSET] -> CMusSettingsContainer::MakeOperatorActivationItemL()" )
   251             
   253 
   252     //sync with real value, if op specifig
   254    	iVSActication = iModel.VSSettingsActivationL();
   253     iModel.InitializeProfileEnablerL();
   255    	if ( iVSActication == MusSettingsKeys::ENever ) // ==2
   254     
   256     	{ // operator specific one is different from usual one
   255     MUS_LOG1( "Activation item=%d (0=VS enabled, 1=VS disabled)", iModel.ActivationItem() )
   257     	iVSActication = MusSettingsKeys::EActiveInHomeNetworks; //==1
   256     AddItemL( KGSSettIdVSActivation, ( *iActivationItems )[ iModel.ActivationItem() ] );
   258     	}
       
   259 
       
   260 	AddItemL( KGSSettIdVSActivation, ( *iActivationItems )[ iVSActication ] );
   257 
   261 
   258     MUS_LOG( "[MUSSET] <- CMusSettingsContainer::MakeOperatorActivationItemL()" )
   262     MUS_LOG( "[MUSSET] <- CMusSettingsContainer::MakeOperatorActivationItemL()" )
   259     }
   263     }
   260 
   264 
   261 
   265 
   262 // -----------------------------------------------------------------------------
   266 // ---------------------------------------------------------------------------
   263 // Adds SIP profile setting item to settings listbox. Item will contain
   267 // Adds SIP profile setting item to settings listbox. Item will contain
   264 // indication of [no SIP profile selected], [using default SIP profile] or
   268 // indication of [no SIP profile selected], [using default SIP profile] or
   265 // [name of SIP profile specified to be used]
   269 // [name of SIP profile specified to be used]
   266 // -----------------------------------------------------------------------------
   270 // ---------------------------------------------------------------------------
   267 //
   271 //
   268 void CMusSettingsContainer::MakeSIPProfileItemL()
   272 void CMusSettingsContainer::MakeSIPProfileItemL()
   269     {
   273     {
   270     MUS_LOG( "[MUSSET] -> CMusSettingsContainer::MakeSIPProfileItemL()" )
   274     MUS_LOG( "[MUSSET] -> CMusSettingsContainer::MakeSIPProfileItemL()" )
   271 
   275 
   272     TInt profile = MultimediaSharingSettings::SipProfileSettingL();
   276     TInt profile = iModel.VSSettingsProfileL();
   273 
   277 
   274     if ( profile != KDefaultSipProfile && profile != KNoSipProfileSelected )
   278     if ( profile != KDefaultSipProfile && profile != KNoSipProfileSelected )
   275     	{
   279     	{
   276         // profile id defined, get profile name
   280     	// profile id defined, get profile name
   277         HBufC* name = iModel.ProfileNameL( profile );
   281 		HBufC* name = iModel.ProfileNameL( profile );
   278 
   282 
   279         if ( name )
   283 		if ( name )
   280             {
   284 			{
   281             CleanupStack::PushL( name );
   285 			CleanupStack::PushL( name );
   282             AddItemL( KGSSettIdSIPProfile, *name );
   286 			AddItemL( KGSSettIdSIPProfile, *name );
   283             CleanupStack::PopAndDestroy( name );
   287 			CleanupStack::PopAndDestroy( name );
   284             }
   288     		}
   285     	else
   289     	else
   286             {
   290     		{
   287             // show profile value not selected
   291     		// show profile value not selected
   288             AddItemL( KGSSettIdSIPProfile,
   292     		AddItemL( KGSSettIdSIPProfile,
   289                     ( *iProfileItems )[ CMusSettingsModel::KVsSipProfileSelectNone ] );
   293     			( *iProfileItems )[ CMusSettingsModel::KVsSipProfileSelectNone ] );
   290                     }
   294 			}
   291             }
   295 		}
   292     else if ( profile == KNoSipProfileSelected )
   296     else if ( profile == KNoSipProfileSelected )
   293     	{
   297     	{
   294     	AddItemL( KGSSettIdSIPProfile,
   298     	AddItemL( KGSSettIdSIPProfile,
   295     		( *iProfileItems )[ CMusSettingsModel::KVsSipProfileSelectNone ] );
   299     		( *iProfileItems )[ CMusSettingsModel::KVsSipProfileSelectNone ] );
   296         }
   300 		}
   297     else
   301     else
   298     	{
   302     	{
   299         AddItemL(
   303 	    AddItemL(
   300             KGSSettIdSIPProfile,
   304 	    	KGSSettIdSIPProfile,
   301             ( *iProfileItems )[ CMusSettingsModel::KVsSipProfileDefault ] );
   305 	    	( *iProfileItems )[ CMusSettingsModel::KVsSipProfileDefault ] );
   302             }
   306 		}
   303 
   307 
   304     MUS_LOG( "[MUSSET] <- CMusSettingsContainer::MakeSIPProfileItemL()" )
   308     MUS_LOG( "[MUSSET] <- CMusSettingsContainer::MakeSIPProfileItemL()" )
   305     }
   309     }
   306 
   310 
   307 
   311 
   308 // -----------------------------------------------------------------------------
   312 // ---------------------------------------------------------------------------
   309 // Adds autorecord item to listbox.
   313 // Adds autorecord item to listbox.
   310 // -----------------------------------------------------------------------------
   314 // ---------------------------------------------------------------------------
   311 //
   315 //
   312 void CMusSettingsContainer::MakeAutoRecordItemL()
   316 void CMusSettingsContainer::MakeAutoRecordItemL()
   313     {
   317     {
   314     MUS_LOG( "[MUSSET] -> CMusSettingsContainer::MakeAutoRecordItemL()" )
   318     MUS_LOG( "[MUSSET] -> CMusSettingsContainer::MakeAutoRecordItemL()" )
   315     TInt autoRecordMode = MultimediaSharingSettings::AutoRecordSettingL();
   319     TInt autoRecordMode = iModel.VSSettingsAutoRecordL();
   316     
   320     
   317     MUS_LOG1( "[MUSSET]    autoRecordMode: %d", autoRecordMode  )
   321     MUS_LOG1( "[MUSSET]    autoRecordMode: %d", autoRecordMode  )
   318     MUS_LOG1( "[MUSSET]    iAutoRecordItems.Count: %d", iAutoRecordItems->Count() )
   322     MUS_LOG1( "[MUSSET]    iAutoRecordItems.Count: %d", iAutoRecordItems->Count() )
   319 
   323 
   320     if ( autoRecordMode > iAutoRecordItems->Count() - 1 )
   324     if ( autoRecordMode > iAutoRecordItems->Count() - 1 )
   328     
   332     
   329     MUS_LOG( "[MUSSET] <- CMusSettingsContainer::MakeAutoRecordItemL()" )
   333     MUS_LOG( "[MUSSET] <- CMusSettingsContainer::MakeAutoRecordItemL()" )
   330     }
   334     }
   331 
   335 
   332 
   336 
   333 // -----------------------------------------------------------------------------
   337 // ---------------------------------------------------------------------------
   334 // Adds recorded video saving item to listbox.
   338 // Adds recorded video saving item to listbox.
   335 // -----------------------------------------------------------------------------
   339 // ---------------------------------------------------------------------------
   336 //
   340 //
   337 void CMusSettingsContainer::MakeRecordedVideoSavingItemL()
   341 void CMusSettingsContainer::MakeRecordedVideoSavingItemL()
   338     {
   342     {
   339     MUS_LOG(
   343     MUS_LOG(
   340     	"[MUSSET] -> CMusSettingsContainer::MakeRecordedVideoSavingItemL()" )
   344     	"[MUSSET] -> CMusSettingsContainer::MakeRecordedVideoSavingItemL()" )
   346     TDriveNumber driveNumber = ( TDriveNumber )savingMode;
   350     TDriveNumber driveNumber = ( TDriveNumber )savingMode;
   347     TInt index = dlg->FindIndexByDrive( driveNumber );
   351     TInt index = dlg->FindIndexByDrive( driveNumber );
   348     
   352     
   349     if ( index == KErrNotFound )
   353     if ( index == KErrNotFound )
   350         {
   354         {
   351         MUS_LOG( "[MUSSET]    Preferred drive doesn't exist anymore, " )
   355         MUS_LOG( "[MUSSET] -> preferred drive doesn't exist anymore \
   352         MUS_LOG( "[MUSSET]    e.g. remote drive deleted, using system drive" )
   356 (e.g. remote drive deleted), taking system drive..." )
   353 
   357 
   354         driveNumber = RFs::GetSystemDrive();
   358         driveNumber = RFs::GetSystemDrive();
   355         index = dlg->FindIndexByDrive( driveNumber );
   359         index = dlg->FindIndexByDrive( driveNumber );
   356         MultimediaSharingSettings::SetVideoLocationSettingL( driveNumber );
   360         iModel.SetVSSettingsRecordedVideoSavingL( driveNumber );
   357         }
   361         }
   358 
   362 
   359     TFileName item( KNullDesC );  
   363     TFileName item( KNullDesC );  
   360     dlg->GetItem( index, item );
   364     dlg->GetItem( index, item );
   361     MUS_LOG1( "[MUSSET]     Current drive:%d", driveNumber )
   365     MUS_LOG1( "[MUSSET]     Current drive:%d", driveNumber )
   367     MUS_LOG(
   371     MUS_LOG(
   368     	"[MUSSET] <- CMusSettingsContainer::MakeRecordedVideoSavingItemL()" )
   372     	"[MUSSET] <- CMusSettingsContainer::MakeRecordedVideoSavingItemL()" )
   369     }
   373     }
   370 
   374 
   371 
   375 
   372 // -----------------------------------------------------------------------------
   376 // ---------------------------------------------------------------------------
   373 // Adds note item to listbox. (Alerts setting). Present only with operator
   377 // Adds note item to listbox. (Alerts setting). Present only with operator
   374 // variant set.
   378 // variant set.
   375 // -----------------------------------------------------------------------------
   379 // ---------------------------------------------------------------------------
   376 //
   380 //
   377 void CMusSettingsContainer::MakeNoteItemL()
   381 void CMusSettingsContainer::MakeNoteItemL()
   378     {
   382     {
   379     MUS_LOG( "[MUSSET] -> CMusSettingsContainer::MakeNoteItemL()" )
   383     MUS_LOG(
   380 
   384     	"[MUSSET] -> CMusSettingsContainer::MakeNoteItemL()" )
   381     MusSettingsKeys::TAuditoryNotification auditoryNotification = 
   385 
   382                     MultimediaSharingSettings::AuditoryNotificationSettingL();
   386     TInt savingMode = iModel.VSSettingsNoteL();
   383 
   387 
   384     MUS_LOG1( "[MUSSET] -> CMusSettingsContainer::Mode:%d()", 
   388     MUS_LOG1( "[MUSSET] -> CMusSettingsContainer::Mode:%d()", savingMode );
   385               auditoryNotification )
       
   386 
   389 
   387     // If unset, use and set default value
   390     // If unset, use and set default value
   388     if ( auditoryNotification < 0 || auditoryNotification > 1 )
   391     if ( savingMode < 0 || savingMode > 1 )
   389         {
   392 	    {
   390         auditoryNotification = MusSettingsKeys::EAuditoryNotificationOff;
   393 	    savingMode = 0;
   391         MultimediaSharingSettings::SetAuditoryNotificationSettingL(
   394 	    iModel.SetVSSettingsNoteL(
   392                                     MusSettingsKeys::EAuditoryNotificationOff );
   395 	        MusSettingsKeys::EAuditoryNotificationOff );
   393         }
   396 	    }
   394 
   397 
   395     AddItemL( KGSSettIdNote, ( *iNoteItems )[ auditoryNotification ] );
   398 	AddItemL( KGSSettIdNote, ( *iNoteItems )[ savingMode ] );
   396 	
   399 
   397     MUS_LOG( "[MUSSET] <- CMusSettingsContainer::MakeNoteItemL()" )
   400     MUS_LOG(
   398     }
   401     	"[MUSSET] <- CMusSettingsContainer::MakeNoteItemL()" )
   399 
   402     }
   400 
   403 
   401 // -----------------------------------------------------------------------------
   404 
       
   405 // ---------------------------------------------------------------------------
   402 // Gets help context.
   406 // Gets help context.
   403 // -----------------------------------------------------------------------------
   407 // ---------------------------------------------------------------------------
   404 //
   408 //
   405 void CMusSettingsContainer::GetHelpContext( TCoeHelpContext& aContext ) const
   409 void CMusSettingsContainer::GetHelpContext( TCoeHelpContext& aContext ) const
   406     {
   410     {
   407     MUS_LOG( "[MUSSET] -> CMusSettingsContainer::GetHelpContext()" )
   411     MUS_LOG( "[MUSSET] -> CMusSettingsContainer::GetHelpContext()" )
   408     aContext.iMajor = KUidMUSH;
   412     aContext.iMajor = KUidMUSH;
   409     aContext.iContext = KMSH_HLP_SETTINGS;
   413     aContext.iContext = KMSH_HLP_SETTINGS;
   410     MUS_LOG( "[MUSSET] <- CMusSettingsContainer::GetHelpContext()" )
   414     MUS_LOG( "[MUSSET] <- CMusSettingsContainer::GetHelpContext()" )
   411     }
   415     }
   412 
   416 
   413 
   417 
   414 // -----------------------------------------------------------------------------
   418 // ---------------------------------------------------------------------------
   415 // Returns currently selected feature (listbox item).
   419 // Returns currently selected feature (listbox item).
   416 // -----------------------------------------------------------------------------
   420 // ---------------------------------------------------------------------------
   417 //
   421 //
   418 TInt CMusSettingsContainer::CurrentFeatureId() const
   422 TInt CMusSettingsContainer::CurrentFeatureId() const
   419     {
   423     {
   420     MUS_LOG( "[MUSSET] <- CMusSettingsContainer::CurrentFeatureId()" )
   424     MUS_LOG( "[MUSSET] <- CMusSettingsContainer::CurrentFeatureId()" )
   421     return iListboxItemArray->CurrentFeature( );
   425     return iListboxItemArray->CurrentFeature( );
   422     }
   426     }
   423 
   427 
   424 
   428 
   425 // -----------------------------------------------------------------------------
   429 // ----------------------------------------------------------------------------
   426 // If call is on, informs user with note that new profile is going to be active
   430 // If call is on, informs user with note that new profile is going to be active
   427 // after current call.
   431 // after current call.
   428 // -----------------------------------------------------------------------------
   432 // ----------------------------------------------------------------------------
   429 //
   433 //
   430 void CMusSettingsContainer::ShowNewProfileActiveAfterCallL()
   434 void CMusSettingsContainer::ShowNewProfileActiveAfterCallL()
   431     {
   435     {
   432     MUS_LOG(
   436     MUS_LOG(
   433     	"[MUSSET] -> CMusSettingsContainer::ShowNewProfileActiveAfterCallL()" )
   437     	"[MUSSET] -> CMusSettingsContainer::ShowNewProfileActiveAfterCallL()" )
   434     TPSCTsyCallState callState;
   438 	TPSCTsyCallState callState;
   435     User::LeaveIfError( RProperty::Get( KPSUidCtsyCallInformation,
   439 	User::LeaveIfError( RProperty::Get( KPSUidCtsyCallInformation,
   436                     KCTsyCallState,
   440 			KCTsyCallState,
   437                     (TInt&)callState) );
   441 			(TInt&)callState) );
   438     
   442 	if ( callState == EPSCTsyCallStateAlerting ||
   439     if ( callState == EPSCTsyCallStateAlerting ||
   443 		callState ==  EPSCTsyCallStateRinging ||
   440          callState ==  EPSCTsyCallStateRinging ||
   444 		callState ==  EPSCTsyCallStateDialling ||
   441          callState ==  EPSCTsyCallStateDialling ||
   445 		callState ==  EPSCTsyCallStateAnswering ||
   442          callState ==  EPSCTsyCallStateAnswering ||
   446 		callState ==  EPSCTsyCallStateDisconnecting ||
   443          callState ==  EPSCTsyCallStateDisconnecting ||
   447 		callState ==  EPSCTsyCallStateConnected ||
   444          callState ==  EPSCTsyCallStateConnected ||
   448 		callState ==  EPSCTsyCallStateHold)
   445          callState ==  EPSCTsyCallStateHold)
   449 		{
   446         {
   450 		HBufC* infoTxt = StringLoader::LoadLC( R_QTN_MSH_SET_PROFILE_NOTE );
   447         HBufC* infoTxt = StringLoader::LoadLC( R_QTN_MSH_SET_PROFILE_NOTE );
   451 	    CAknInformationNote* note = new ( ELeave ) CAknInformationNote( ETrue );
   448         CAknInformationNote* note = new ( ELeave ) CAknInformationNote( ETrue );
   452 	    note->ExecuteLD( infoTxt->Des() );
   449         note->ExecuteLD( infoTxt->Des() );
   453 	    CleanupStack::PopAndDestroy( infoTxt );
   450         CleanupStack::PopAndDestroy( infoTxt );
   454 	    MUS_LOG(
   451         }
   455 	    	"[MUSSET] <- CMusSettingsContainer::ShowNewProfileActiveAfterCallL()" )
   452     
   456 		}
   453     MUS_LOG(
   457     }
   454         "[MUSSET] <- CMusSettingsContainer::ShowNewProfileActiveAfterCallL()" )
   458 
   455     }
   459 // ----------------------------------------------------------------------------
   456 
       
   457 // -----------------------------------------------------------------------------
       
   458 // void CMusSettingsContainer::HideItemsL(TInt aItemIndex)
   460 // void CMusSettingsContainer::HideItemsL(TInt aItemIndex)
   459 // Some items are unwanted by operators.Hide those items from listbox item
   461 // Some items are unwanted by operators.Hide those items from listbox item
   460 // -----------------------------------------------------------------------------
   462 // ----------------------------------------------------------------------------
   461 //
   463 //
   462 void CMusSettingsContainer::HideItemsL(TInt aItemIndex)
   464 void CMusSettingsContainer::HideItemsL(TInt aItemIndex)
   463     {
   465     {
   464     MUS_LOG1("[MUSSET] -> CMusSettingsContainer::HideItemsL() %d",aItemIndex )    
   466     MUS_LOG1("[MUSSET] -> CMusSettingsContainer::HideItemsL() %d",aItemIndex )    
   465     iListboxItemArray->SetItemVisibilityL( aItemIndex,
   467     iListboxItemArray->SetItemVisibilityL( aItemIndex,
   466             	CGSListBoxItemTextArray::EInvisible );
   468             	CGSListBoxItemTextArray::EInvisible );
   467     MUS_LOG("[MUSSET] <- CMusSettingsContainer::HideItemsL()" )	
   469 	MUS_LOG("[MUSSET] <- CMusSettingsContainer::HideItemsL()" )	
   468     }
   470     }
   469