void CScrEMMCComponentStep::ImplTestStepL()
    {
    TInt noOfComponents(0);
    GetIntFromConfig(ConfigSection(), KNoOfComponents, noOfComponents);
    
    TPtrC formatDrive;
    GetStringFromConfig(ConfigSection(), KFormatDrive, formatDrive);
    TInt drive;
    RFs fs;
    User::LeaveIfError(fs.Connect());
    User::LeaveIfError(fs.CharToDrive(formatDrive[0], drive));
    fs.Close();
    TDriveList filterFormatDrive;
    filterFormatDrive.FillZ(KMaxDrives);
    filterFormatDrive[drive] = 1;
        
    CComponentFilter* componentFilter = CComponentFilter::NewLC();
    componentFilter->SetInstalledDrivesL(filterFormatDrive);
            
    RArray<TComponentId> foundComponentIds;
    CleanupClosePushL(foundComponentIds);
        
    iScrSession.GetComponentIdsL(foundComponentIds, componentFilter);
    
    if (foundComponentIds.Count() != noOfComponents)
        {
        ERR_PRINTF1(_L("Mismatch for number of components found."));
        SetTestStepResult(EFail);
        }
    CleanupStack::PopAndDestroy(2);
    }
// ---------------------------------------------------------------------------
// CSisxSifPluginUiHandler::AddMemorySelectionL()
// ---------------------------------------------------------------------------
//
void CSisxSifPluginUiHandler::AddMemorySelectionL()
    {
    TInt64 adjustedSize = iMaxInstalledSize + KFreeSpaceTreshold;

    TDriveList driveList;
    TInt driveCount = 0;
    TInt err = DriveInfo::GetUserVisibleDrives( iFs, driveList, driveCount );
    User::LeaveIfError( err );

    iSelectableDrives.Reset();
    TInt driveListLength = driveList.Length();
    for( TInt driveNumber = 0; driveNumber < driveListLength; driveNumber++ )
        {
        if( driveList[ driveNumber ] )
            {
            TUint driveStatus = 0;
            err = DriveInfo::GetDriveStatus( iFs, driveNumber, driveStatus );
            if( !err && !( driveStatus & DriveInfo::EDriveRemote ) )
                {
                TVolumeInfo volumeInfo;
                err = iFs.Volume( volumeInfo, driveNumber );
                if( !err && volumeInfo.iFree > adjustedSize )
                    {
                    iSelectableDrives.Append( driveNumber );
                    }
                }
            }
        }

    iSifUi->SetMemorySelectionL( iSelectableDrives );
    }
void CReferencePolicyPlugin::AvailableDriveListL()
    {
    OstTraceFunctionEntry0( REF_CREFERENCEPOLICYPLUGIN_AVAILABLEDRIVELISTL_ENTRY );
    
    TBuf8<KPermittedDrvRangeBufLen> permittedRange;
    TDriveList forbiddenList;

    PrepareAvailableDriveList();

    User::LeaveIfError(iRepository->Get(KPermittedRangeUid, permittedRange));
    User::LeaveIfError(iRepository->Get(KForbiddenListUid, forbiddenList));

    for (TInt index = 'A'; index <= 'Z'; index++ )
        {
        if ((index >= permittedRange[0]) && (index <= permittedRange[1]))
            {
            if (KErrNotFound == forbiddenList.Locate(TChar(index)))
                {
                // Permitted
                iAvailableDrvList[index - 'A'] = 0x01;
                }
            }
        }
    OstTraceFunctionExit0( REF_CREFERENCEPOLICYPLUGIN_AVAILABLEDRIVELISTL_EXIT );
    }
示例#4
0
EXPORT_C void CCntTest::SelectDriveL()
	{
	TDriveList driveList;
	iFs.DriveList(driveList);
	driveList[25]=0;	// Get rid of Z:
	TBuf<2> drive;
	drive.Copy(_L("C:"));
	TInt driveCount=0;
	for(TInt loop0=0;loop0<driveList.Size();loop0++)
		if (driveList[loop0])
			driveCount++;
	if (driveCount>1)
		{
		iTest->Printf(_L("Select drive for multi access test:\n"));
		for(TInt loop=0;loop<driveList.Size();loop++)
			if (driveList[loop])
				iTest->Printf(_L("%c:\n"),loop+'A');
		FOREVER
			{
			TChar key=iTest->Getch();
			TInt index=key.GetLowerCase()-'a';
			if (index>=0 && index<driveList.Size() && driveList[index])
				{
				drive[0]=(TText)(index+'A');
				break;
				}
			}
		}
示例#5
0
// Manual test - requires user to move a card between two physical slots
extern TInt E32Main()
	{
	test.Start(_L("T_MULTISLOT Test"));
	test(fs.Connect()==KErrNone);
	
	// Get the list of removable drive driver-letters
	TDriveList driveList;
	test(fs.DriveList(driveList,KDriveAttRemovable)==KErrNone);
	
	
	TInt length=driveList.Length();
	TBool pass = EFalse;
	
	// i is drive letter (as int)
	// for every removable media logical drive
	for(TInt i=0; i<length; i++)
		{
		if(driveList[i] == 0)
			{
			continue;
			}

		TChar driveChar = i+'A';
		test.Next(_L("Testing Logical Drive"));
		

		TInt FirstlocDrvNum = KErrNotFound;
		TInt SecondlocDrvNum = KErrNotFound;
		TInt driveNum = -1;
		driveNum = i+'A';
		test.Printf(_L("Logical Drive : %d"), driveNum);
		
		// Get local drive number by gettin ghr Serial number fo the card (RFs call), then 
		// enumerating the TBusLocalDrives and finding one that matches.
		test(FindMmcLocalDriveNumber(driveChar,FirstlocDrvNum,driveNum)==KErrNone);
		// Got first local drive number, now move card into second slot.
		test.Printf(_L("<Move MMC Card to second slot, then press any key>"));
		test.Getch();
		// Get second local drive number for same logical drive (should be different local drive number).
		test(FindMmcLocalDriveNumber(driveChar,SecondlocDrvNum,driveNum)==KErrNone);
		if(FirstlocDrvNum!=SecondlocDrvNum)
			{
			pass=ETrue;
			break;
			}
		// else perhaps this wasn't a multislot drive
		}
	test(pass);
	test.End();
	test.Close();
	
	fs.Close();
	return KErrNone;
	}
void QDriveWatcherEngine::CompareDriveLists(const TDriveList &aDriveList)
{
    if (!(aDriveList.Length() > KMaxDrives - 1) || !(m_previousDriveList.Length() > KMaxDrives - 1))
        return;

    for (int i = 0; i < KMaxDrives; i++) {
        if (aDriveList[i] == KDriveAbsent && m_previousDriveList[i] == KDriveAbsent)
            continue;

        if (aDriveList[i] > KDriveAbsent && m_previousDriveList[i] > KDriveAbsent)
            continue;

        if (aDriveList[i] == KDriveAbsent && m_previousDriveList[i] > KDriveAbsent) {
            TChar volumeChar;
            QString volume;
            if (iFs.DriveToChar(i, volumeChar) == KErrNone)
                volume = QChar(volumeChar).toLatin1();

            m_watcher->emitDriveRemoved(volume);
        } else if (aDriveList[i] > KDriveAbsent && m_previousDriveList[i] == KDriveAbsent) {
            TChar volumeChar;
            QString volume;
            if (iFs.DriveToChar(i, volumeChar) == KErrNone)
                volume = QChar(volumeChar).toLatin1();

            m_watcher->emitDriveAdded(volume);
        }
    }
    m_previousDriveList.Copy(aDriveList);
}
示例#7
0
void CMMCStorageStatus::CompareDriveLists(const TDriveList &aDriveList)
{
    if (!(aDriveList.Length() > KMaxDrives - 1) || !(m_previousDriveList.Length() > KMaxDrives - 1))
        return;

    for (int i = 0; i < KMaxDrives; i++) {

        if (aDriveList[i] == KDriveAbsent && m_previousDriveList[i] == KDriveAbsent) {
            continue;
        } else if (aDriveList[i] > KDriveAbsent && m_previousDriveList[i] > KDriveAbsent) {
            continue;
        } else if (aDriveList[i] == KDriveAbsent && m_previousDriveList[i] > KDriveAbsent) {
            TChar volumeChar;
            QString volume;
            bool driveInserted = false;
            if (iFs.DriveToChar(i, volumeChar) == KErrNone)
                volume = QChar(volumeChar).toAscii();

            foreach (MStorageStatusObserver *observer, m_observers)
                observer->storageStatusChanged(driveInserted, volume);
            break;
        } else if (aDriveList[i] > KDriveAbsent && m_previousDriveList[i] == KDriveAbsent) {
            TChar volumeChar;
            QString volume;
            bool driveInserted = true;
            if (iFs.DriveToChar(i, volumeChar) == KErrNone)
                volume = QChar(volumeChar).toAscii();

            foreach (MStorageStatusObserver *observer, m_observers)
                observer->storageStatusChanged(driveInserted, volume);
            break;
        }
    }
    m_previousDriveList.Copy(aDriveList);
}
// ---------------------------------------------------------------------------
// CAppMngr2SisxRuntime::GetAdditionalDirsToScanL()
// ---------------------------------------------------------------------------
//
void CAppMngr2SisxRuntime::GetAdditionalDirsToScanL( RFs& aFsSession,
        RPointerArray<HBufC>& aDirs )
    {
    // Return KAppMngr2DaemonPrivateFolder directories that may contain
    // untrusted applications. Untrusted application is partially installed
    // and user needs to install it's SISX from KAppMngr2DaemonPrivateFolder
    // to complete it's installation. For example, when memory card is inserted
    // in mobile phone, installer processes applications installed in the memory
    // card. If some memory card application requires user-granted capabilities,
    // installer creates SISX in KAppMngr2DaemonPrivateFolder. The SISX must be
    // installed to grant the capabilities to the application.
    TDriveList driveList;
    TInt driveCount = 0;
    User::LeaveIfError( DriveInfo::GetUserVisibleDrives( aFsSession, driveList, driveCount ) );
    
    TInt driveListLength = driveList.Length();
    for( TInt driveNumber = 0; driveNumber < driveListLength; driveNumber++ )
        {
        if( driveList[ driveNumber ] )
            {
            // Internal and remote drives are not listed. Internal drives cannot
            // be removed/replaced, so there are no untrusted applications either.
            // Remote drives cannot be used to install applications at all.
            TUint driveStatus = 0;
            TInt err = DriveInfo::GetDriveStatus( aFsSession, driveNumber, driveStatus );
            if( err == KErrNone && !( driveStatus & DriveInfo::EDriveRemote ) &&
                    !( driveStatus & DriveInfo::EDriveInternal ) )
                {
                TChar driveLetter;
                if( RFs::DriveToChar( driveNumber, driveLetter ) == KErrNone )
                    {
                    const TInt dirLength = KDriveSpec().Length() +
                            KAppMngr2DaemonPrivateFolder().Length(); 
                    HBufC* dir = HBufC::NewLC( dirLength );
                    TPtr dirPtr = dir->Des();
                    dirPtr.Format( KDriveSpec, static_cast<TUint>( driveLetter ) );
                    dirPtr.Append( KAppMngr2DaemonPrivateFolder );
                    aDirs.AppendL( dir );
                    FLOG( "CAppMngr2SisxRuntime::GetAdditionalDirsToScanL: adding %S", dir );
                    CleanupStack::Pop( dir );
                    }
                }
            }
        }
    }
void CReferencePolicyPlugin::RetrieveDriveLetterL(TText& aDriveName,
        const TPolicyRequestData& aData)
    {
    OstTraceFunctionEntry0( REF_CREFERENCEPOLICYPLUGIN_RETRIEVEDRIVELETTERL_TTEXT_TPOLICYREQUESTDATA_ENTRY );
    
    TDriveList availableNames;
    FilterFsForbiddenDriveListL(availableNames);

    if (!availableNames.Length())
        {
        // Not any drive letter available
        User::Leave(KErrNotFound);
        }

    // According to REQ8922, When a particular Logical Unit is mounted 
    // for the first time, RefPP shall always try to allocate an 
    // available and unused drive letter to it. Only if such a drive letter
    // can not be found, RefPP shall use the first one in available name
    // list;
    
    // Initialize aDriveName by the first available drive letter
    aDriveName = availableNames[0];
    // Find first such drive letter from available letter list. If it can
    // be found, it will be used.
    FindFirstNotUsedDriveLetter(availableNames, aDriveName);    
    // Search history record
    TInt historyIndex = SearchHistoryByLogicUnit(aData);
    if (KErrNotFound != historyIndex)
        {
        // Find a match one in history
        const TPolicyMountRecord& history = *iHistory[historyIndex];
        TInt location = availableNames.Locate(TChar(history.iDriveName));
        if (KErrNotFound != location)
            {
            // And it is available now. RefPP allocate it to the 
            // LU currently mounted.
            aDriveName = history.iDriveName;
            }
        }
    OstTraceFunctionExit0( REF_CREFERENCEPOLICYPLUGIN_RETRIEVEDRIVELETTERL_TTEXT_TPOLICYREQUESTDATA_EXIT );
    }
void CReferencePolicyPlugin::FilterFsForbiddenDriveListL(
        TDriveList& aAvailableNames)
    {
    OstTraceFunctionEntry0( REF_CREFERENCEPOLICYPLUGIN_FILTERFSFORBIDDENDRIVELISTL_ENTRY );
    
    TDriveList names;
    names.SetLength(KMaxDrives);

    TDriveList drives;
    User::LeaveIfError(iFs.DriveList(drives));

    TUint count(0);
    for (TInt index = 0; index < KMaxDrives; index++ )
        {
        if ((drives[index] == 0x0) && (iAvailableDrvList[index]))
            {
            names[count++] = index+'A';
            }
        }
    names.SetLength(count);
    aAvailableNames = names;
    OstTraceFunctionExit0( REF_CREFERENCEPOLICYPLUGIN_FILTERFSFORBIDDENDRIVELISTL_EXIT );
    }
void CReferencePolicyPlugin::FindFirstNotUsedDriveLetter(
        const TDriveList& aAvailableNames,
        TText& aDriveName)
    {
    OstTraceFunctionEntry0( REF_CREFERENCEPOLICYPLUGIN_FINDFIRSTNOTUSEDDRIVELETTER_ENTRY );
    
    TDriveList usedLetter;
    TUint index = 0;
    for (index = 0; index < iHistory.Count(); index++)
        {
        const TPolicyMountRecord& record = *iHistory[index];
        usedLetter.Append(TChar(record.iDriveName));
        }
    for (index = 0; index < aAvailableNames.Length(); index++)
        {
        if (usedLetter.Locate(aAvailableNames[index]) == KErrNotFound)
            {
            aDriveName = aAvailableNames[index];
            OstTraceFunctionExit0( REF_CREFERENCEPOLICYPLUGIN_FINDFIRSTNOTUSEDDRIVELETTER_EXIT );
            return; // A unused drive letter found out
            }
        }
    OstTraceFunctionExit0( REF_CREFERENCEPOLICYPLUGIN_FINDFIRSTNOTUSEDDRIVELETTER_EXIT_DUP1 );
    }
//------------------------------------------------------------------------
//CHttpDownloadManagerServerEngine::QueryDynDriveListLC
//------------------------------------------------------------------------
HBufC8* CHttpDownloadManagerServerEngine::QueryDynDriveListLC()
    {
    TDriveList driveList;
    TInt driveCount( 0 );
    TInt err;
    TChar driveLetter;
    TBuf8<KMaxDriveListStrLen> driveLettersDyn;

    // Checking validity of drives in Cenrep List
    // drive letters are separated by semicolons
    // Destination is FFS in default
    TInt drive;
    User::LeaveIfError(
        DriveInfo::GetDefaultDrive( DriveInfo::EDefaultPhoneMemory, drive ) );

    for( TInt i = 0; i < iDriveLettersCenRep.Length(); i = i + 2 )
        {
        if( iRfs.CharToDrive( iDriveLettersCenRep[i], drive ) == KErrNone )
            {
            TUint status;
            if ( DriveInfo::GetDriveStatus( iRfs, drive, status ) == KErrNone )
                {
                if ( ( status & ( DriveInfo::EDriveUserVisible | DriveInfo::EDrivePresent ) ) )
                    {
                    CLOG_WRITE_1( "Drive %d is present and visible", drive);
                    }
                }
            }
        }

    if ( iDriveLettersCenRep.Length() > 0 )
        {
        driveLettersDyn.Append( iDriveLettersCenRep );
        if ( driveLettersDyn[driveLettersDyn.Length() - 1] != ';' )
            {
            driveLettersDyn.Append( KDefaultDriveListSep );
            }
        }

    // get the list of drives available in real time
    err = DriveInfo::GetUserVisibleDrives( iRfs, driveList, driveCount );
    if ( err == KErrNone )
        {
        TInt count( driveList.Length() );
        for ( TInt i( 0 ); i < count; ++i )
            {
            if ( driveList[ i ] )
                {
                User::LeaveIfError( iRfs.DriveToChar( i, driveLetter) );
                TInt drivePos = driveLettersDyn.LocateF( driveLetter );
                if ( drivePos == KErrNotFound )
                    {
                    driveLettersDyn.Append( driveLetter ); 
                    driveLettersDyn.Append( KDefaultDriveListSep ); 
                    }
                }
            }

        CLOG_WRITE_1( "Pref. drive list dynamic: [%S]", &driveLettersDyn );
        }
    else
        {
        CLOG_WRITE_1( "GetUserVisibleDrives failed with %d", err );
        }

    HBufC8* driveLetters = HBufC8::NewLC( KMaxDriveListStrLen );
    driveLetters->Des().Copy( driveLettersDyn );
    return driveLetters;
    }
示例#13
0
TBool CPMRfsPlugin::IsMMCFormatFlagEnabledL()
	{
	RDEBUG("CPMRfsPlugin::IsMMCFormatFlagEnabledL()");
	
	RFs rfs;
	User::LeaveIfError( rfs.Connect() );
	CleanupClosePushL( rfs );	
#ifndef RD_MULTIPLE_DRIVE
	TFileName fullPath;
	fullPath.Append( _L("e") );
	fullPath.Append( MDriveColon );	
	fullPath.Append( KDMUtilServerPrivatePath );
	fullPath.Append( KMMCEraseFlagFileName );
		
	RFile file;
	TInt err = file.Open( rfs, fullPath, EFileRead );
	file.Close();
	
	CleanupStack::PopAndDestroy( &rfs );
	
	if( err == KErrNone )
		{
		RDEBUG("CPMRfsPlugin::IsMMCFormatFlagEnabled() - returned: ETrue");
		return ETrue;
		}
	
	RDEBUG_2("CPMRfsPlugin::IsMMCFormatFlagEnabled() - returned: EFalse: %d)", err);
	return EFalse;
#else
	TDriveList driveList;
	TInt driveCount;
	TBool fileReplace = EFalse;
	TInt err = KErrNone;
	
	//Get all removeable drive, both physically and logically
	User::LeaveIfError(DriveInfo::GetUserVisibleDrives(
            rfs,  driveList,  driveCount, KDriveAttRemovable ));
    
    TInt max(driveList.Length());
    
    RFileWriteStream file;
    for(TInt i=0; i<max;++i)
    {
    	if (driveList[i])
    	{
    		TUint status;
    		DriveInfo::GetDriveStatus(rfs, i, status);
    		//To make sure the drive is physically removeable not logically removeable	
    		//need to format internal mass memory also. So no need to check the below condition
    		//if (status & DriveInfo::EDriveRemovable)
    		{
    			TChar driveLetter;
    			rfs.DriveToChar(i,driveLetter);
				
				TFileName fullPath;
				fullPath.Append( driveLetter );
				fullPath.Append( MDriveColon );
				fullPath.Append( KDMUtilServerPrivatePath );
				fullPath.Append( KMMCEraseFlagFileName );
				
				RFile flagfile;
				err = flagfile.Open( rfs, fullPath, EFileRead );
				flagfile.Close();

				if( err == KErrNone )
				{
					if (!fileReplace)
					{
						User::LeaveIfError(file.Temp(rfs, _L("C:\\"),iFileName, EFileWrite));	
						file.WriteInt16L(65279);
						CleanupClosePushL(file);  
							
						fileReplace = ETrue;
						RDEBUG("CPMRfsPlugin::IsMMCFormatFlagEnabled() - File created on private path");
					}
			
					file.WriteL(_L("FORMAT"));
					file.WriteL(_L(" "));
					TBuf<4> DriveLetterBuf;
					DriveLetterBuf.Append(driveLetter);
					file.WriteL(DriveLetterBuf);
					file.WriteL(_L(":"));
					file.WriteL(_L("\r\n"));
					
				}
					
			}
    	}
     }
     
   	if (fileReplace)
   	{
   		file.CommitL();
   		CleanupStack::PopAndDestroy(); // pop file
   	}
		
	CleanupStack::PopAndDestroy( &rfs );	
     if (fileReplace)
     {
     	RDEBUG("CPMRfsPlugin::IsMMCFormatFlagEnabled() - returned: ETrue:");
     	return ETrue;
     }
     else
     {
     	RDEBUG_2("CPMRfsPlugin::IsMMCFormatFlagEnabled() - returned: EFalse: %d)", err);
     	return EFalse;
     }
    

#endif //RD_MULTIPLE_DRIVE
	}
示例#14
0
void CListCommand::OptionHandlerL(const TPtrC& aName, const RArray<TPtrC>& aValues)
	{
	// Configure the component query filter:
	
	// Component name
	if (aName == KTxtListOptName)
		{
		AssertNumValuesL(aValues, 1);
		iFilter->SetNameL(aValues[0]);
		}

	// Vendor
	else if (aName == KTxtListOptVendor)
		{
		AssertNumValuesL(aValues, 1);
		iFilter->SetVendorL(aValues[0]);
		}

	// Software type
	else if (aName == KTxtListOptType)
		{
		AssertNumValuesL(aValues, 1);
		iFilter->SetSoftwareTypeL(aValues[0]);
		}

	// SCOMO state - Activated
	else if (aName == KTxtListOptActivated)
		{
		AssertNumValuesL(aValues, 0);

		// The activated and deactivated options are mutually exclusive
		if (iScomoStateSet)
			{
			User::Leave(KErrArgument);
			}
		iScomoStateSet = ETrue;

		iFilter->SetScomoStateL(EActivated);
		}

	// SCOMO state - Deactivated
	else if (aName == KTxtListOptDeactivated)
		{
		AssertNumValuesL(aValues, 0);

		// The activated and deactivated options are mutually exclusive
		if (iScomoStateSet)
			{
			User::Leave(KErrArgument);
			}
		iScomoStateSet = ETrue;

		iFilter->SetScomoStateL(EDeactivated);
		}

	// Removable
	else if (aName == KTxtListOptRemovable)
		{
		AssertNumValuesL(aValues, 0);
		iFilter->SetRemovable(ETrue);
		}

	// String property
	else if (aName == KTxtListOptProperty)
		{
		const TInt numValues = aValues.Count();
		if (numValues < 2 || numValues > 3)
			{
			User::Leave(KErrArgument);
			}

		// Convert language from string to int if specified
		TInt language = KUnspecifiedLocale;
		if (numValues == 3)
			{
			TLex lex(aValues[2]);
			if (lex.Val(language) != KErrNone || language < ELangEnglish || language >= ELangMaximum)
				{
				User::Leave(KErrArgument);
				}
			}

		// Add the property to the filter
		iFilter->AddPropertyL(aValues[0], aValues[1], static_cast<TLanguage>(language));
		}

	// Integer property
	else if (aName == KTxtListOptIntProperty)
		{
		AssertNumValuesL(aValues, 2);
		TLex lex(aValues[1]);
		TInt64 val;
		if (lex.Val(val) != KErrNone)
			{
			User::Leave(KErrArgument);
			}
		iFilter->AddPropertyL(aValues[0], val);
		}

	// Drives
	else if (aName == KTxtListOptDrives)
		{
 	 	AssertNumValuesL(aValues, 1);
 	 	TPtrC drives = aValues[0];
 	 	TDriveList driveList;
 	 	driveList.FillZ(KMaxDrives);
 	 	for (TInt i=0; i<drives.Length(); ++i)
 	 	   	{
 	 	  	TChar driveLetter = static_cast<TChar>(drives[i]);
 	 	   	TInt driveNumber = 0;
 	 	   	User::LeaveIfError(RFs::CharToDrive(driveLetter, driveNumber));
 	 	   	driveList[driveNumber] = ETrue;
 	 	   	}
 	 	iFilter->SetInstalledDrivesL(driveList);
		}

	// Locale
	else if (aName == KTxtListOptLocale)
		{
		AssertNumValuesL(aValues, 1);
		TLex lex(aValues[0]);
		TInt val;
		if (lex.Val(val) != KErrNone || val < ELangEnglish || val >= ELangNone)
			{
			User::Leave(KErrArgument);
			}
		iLocale = static_cast<TLanguage>(val);
		}
	
	// Unknown
	else
		{
		User::Leave(KErrArgument);
		}
	}