Ejemplo n.º 1
0
void CPhone::GetOperatorNameSync(TDes& aOperatorName)
	{
	if (IsActive())
		{
		Cancel();
		}
	/*
	CTelephony::TOperatorNameV1Pckg operatorNamePckg(iOpName);
	iTelephony->GetOperatorName(iStatus,operatorNamePckg);
	iFunc = EOperatorName; 
	SetActive();
	StartWait();
	iFunc = ENoneFunc;
	aOperatorName.Copy(iOpName.iOperatorName);
	*/
	CTelephony::TNetworkInfoV1Pckg netInfoPckg(iNetInfo);
	iTelephony->GetCurrentNetworkInfo(iStatus,netInfoPckg);
	iFunc = ECellID;
	SetActive();
	StartWait();
	iFunc = ENoneFunc;
	aOperatorName.Copy(iNetInfo.iShortName);
	if (aOperatorName.Length() == 0)
		{
			aOperatorName.Copy(iNetInfo.iLongName);
		}
		
	}
/** Gets the specified part of the unicode based on the requirement from the user
@param	aBuffer Pointer to CHtmlToCrtConvBuffer
@param	aPartOfUnicode Contains the return value of GetPartOfBufferL()
@test
*/
void CTestHtmlToCrtConverterBufferStep::GetPartOfConvertedBufferL(CHtmlToCrtConvBuffer* aBuffer, TDes& aPartOfBuffer)
	{
	GetBoolFromConfig(ConfigSection(), KGetPartOfBuffer, iGetPartOfBuffer);
	if ( iGetPartOfBuffer == EFalse )
		{
		return;
		}
		
	GetIntFromConfig(ConfigSection(), KStartPosition, iStartPosition);
	GetIntFromConfig(ConfigSection(), KEndPosition, iEndPosition);
	TPtrC	partOfBufferUnicode;
	if ( iEndPosition == 0 )
		{
		// Gets the part of the buffer from the start position till the end
		aBuffer->GetToEndOfBufferL(partOfBufferUnicode, iStartPosition);
		aPartOfBuffer.Copy(partOfBufferUnicode);	
		}
	else if ( (iStartPosition != 0) && (iEndPosition != 0) )
		{
		// Get the specified part of the buffer returned from CHtmlToCrtConverterBuffer
		aBuffer->GetPartOfBufferL(partOfBufferUnicode, iStartPosition, iEndPosition);
		aPartOfBuffer.Copy(partOfBufferUnicode);
		}
	else if ( iEndPosition != 0 )
		{
		TBuf8<KMaxLengthString>	partOfBufferUnicode;
		// Get the sample of text from the file and returns it in the partOfBufferUnicode
		aBuffer->GetSampleOfTextFromFileL(partOfBufferUnicode, iEndPosition, 0);
		aPartOfBuffer.Copy(partOfBufferUnicode);
		}

	}
Ejemplo n.º 3
0
void CntSimStorePrivate::convertStoreNameL(TDes &storeName)
{
    if(storeName.MaxLength() < RMobilePhoneBookStore::KMaxPBIDSize) {
        User::Leave(KErrArgument);
    }

    if (m_storeInfo.m_storeName.isEmpty()) {
        // Default to ADN store
        m_storeInfo.m_storeName = (QLatin1String) KParameterValueSimStoreNameAdn;
        storeName.Copy(KETelIccAdnPhoneBook);
    } else if (m_storeInfo.m_storeName == KParameterValueSimStoreNameFdn) {
        storeName.Copy(KETelIccFdnPhoneBook);
    } else if (m_storeInfo.m_storeName == KParameterValueSimStoreNameAdn) {
        storeName.Copy(KETelIccAdnPhoneBook);
    } else if (m_storeInfo.m_storeName == KParameterValueSimStoreNameSdn) {
        storeName.Copy(KETelIccSdnPhoneBook);
    } else if (m_storeInfo.m_storeName == KParameterValueSimStoreNameOn) {
        storeName.Copy(KETelOwnNumberStore);
    }

    // Check that we got a valid store name
    if(storeName.Length() == 0) {
        User::Leave(KErrArgument);
    }
}
Ejemplo n.º 4
0
//The function constructs a full file path in aFullPath argument (from aDriveNumber, aFileName and aPrivatePath arguments).
//aFullPath must point to a big enough place (ideally TFileName object).
static void ConstructFilePathByName(TDriveNumber aDriveNumber, const TDesC& aFileName, const TDesC& aPrivatePath, TDes& aFullPath)
	{
	TDriveName srcDriveName = TDriveUnit(aDriveNumber).Name();
	aFullPath.Copy(srcDriveName);
	aFullPath.Append(aFileName);
	TParse parse;
	parse.Set(aPrivatePath, &aFullPath, 0);
	aFullPath.Copy(parse.FullName());
	}
Ejemplo n.º 5
0
void CYBRecognizer1::FileTypeL(TInt aIndex,TDes& aFileType)
{
	switch(aIndex)	
	{
	case 0:
		aFileType.Copy(KtxTypeIMageMIF);
		break;
	case 1:
		aFileType.Copy(KtxTypeIMageMBM);
		break;
	}
}
Ejemplo n.º 6
0
// -----------------------------------------------------------------------------
// TXmlParser::StrCopy(TDes& aTarget, const TDesC& aSource)
// Function performs string copy with length checking.
// -----------------------------------------------------------------------------
//
void TXmlParser::StrCopy(TDes& aTarget, const TDesC& aSource)
    {
    TInt len=aTarget.MaxLength();
    if(len<aSource.Length()) 
        {
        aTarget.Copy(aSource.Left(len));
        }        
    else
        {
        aTarget.Copy(aSource);
        }
    }
// -----------------------------------------------------------------------------
// CStatusPaneHandler::StrCopy
//
// -----------------------------------------------------------------------------
//
void CStatusPaneHandler::StrCopy( TDes& aTarget, const TDesC& aSource )
    {
    WLOG("CStatusPaneHandler::StrCopy >");
    TInt len = aTarget.MaxLength();
    if( len < aSource.Length() ) 
        {
        aTarget.Copy( aSource.Left(len) );
        return;
        }
    aTarget.Copy( aSource );
    WLOG("CStatusPaneHandler::StrCopy <");
    }
/**
 * Converts the view type information in TViewData::TContactViewType to string format 
 */
void TViewData::ConvertViewTypeToString(TViewData::TContactViewType aViewType, TDes& aViewTypeInString)
	{
	if ( aViewType == TViewData::ELocalView )
		{
		aViewTypeInString.Copy(KLocalView);
		}
	else if ( aViewType == TViewData::ERemoteView)
		{
		aViewTypeInString.Copy(KRemoteView);
		}
	else if ( aViewType == TViewData::ENamedRemoteView)
		{
		aViewTypeInString.Copy(KNamedRemoteView);
		}
	else if ( aViewType == TViewData::EGroupView)
		{
		aViewTypeInString.Copy(KGroupView);
		}
	else if ( aViewType == TViewData::EFindView)
		{
		aViewTypeInString.Copy(KFindView);
		}
	else if ( aViewType == TViewData::EFilteredView)
		{
		aViewTypeInString.Copy(KFilteredView);
		}
	else if ( aViewType == TViewData::EConcatenatedView)
		{
		aViewTypeInString.Copy(KConcatenatedView);
		}
	else if ( aViewType == TViewData::ESubView)
		{
		aViewTypeInString.Copy(KSubView);
		}
	}
Ejemplo n.º 9
0
TInt CImConvertCharconv::StraightCopy( const TDesC8& aBufIn, TDes& rBufOut)
	{
	TInt inLen=aBufIn.Length();
	TInt outMaxLen=rBufOut.MaxLength();

	if (inLen >= outMaxLen)
		{
		TPtrC8 in = aBufIn.Left(outMaxLen);
		rBufOut.Copy(in);
		return (inLen-outMaxLen);
		}
	else
		rBufOut.Copy(aBufIn);
	return 0;
	}
void RA3FDevSoundTestBase::SampleRateFromTUintToString(TUint aSampleRate, TDes& aStringSampleRate)
	{
	const TSampleRateToString SampleRateLookUp [] =
	{
	{0x00000001,	KEMMFSampleRate8000Hz() },
	{0x00000002,	KEMMFSampleRate11025Hz()},
	{0x00000004,  	KEMMFSampleRate16000Hz()},
	{0x00000008,	KEMMFSampleRate22050Hz()},
	{0x00000010,	KEMMFSampleRate32000Hz()},
	{0x00000020,	KEMMFSampleRate44100Hz()},
	{0x00000040,	KEMMFSampleRate48000Hz()},
	{0x00000080,	KEMMFSampleRate88200Hz()},
	{0x00000100,	KEMMFSampleRate96000Hz()},
	{0x00000200,	KEMMFSampleRate12000Hz()},
	{0x00000400,	KEMMFSampleRate24000Hz()},
	{0x00000800,	KEMMFSampleRate64000Hz()}
	};

	const TInt length = sizeof SampleRateLookUp / sizeof *SampleRateLookUp;

	for (TInt i =0; i < length; i++)
		{
		if(aSampleRate == SampleRateLookUp[i].iTUIntSampleRate)
			{
			aStringSampleRate.Copy(SampleRateLookUp[i].iTPtrSampleRate);
			return;
			}
		}
		ERR_PRINTF1(_L("SampleRate doesn't match any of the specified sample rates"));
		StopTest(KErrGeneral);
	}
/**
 * Connection is opened to location server,and closed
 *
 * If anything fails during the execution of this test, then function
 * leaves with proper error code.
 *
 * Parameters:
 **/
void LocationRequestThreadMainPartL(TDes& aErrorBuf)
    {
    // Open connection to Location server
    RPositionServer server;

    TInt err = server.Connect(); 

    if (err != KErrNone)
        {
        _LIT(KErrOpen, "Server open failed with code %d\r\n");
        aErrorBuf.Format(KErrOpen, err);
        }
    else
        {
        _LIT(KOkOpen, "Server open ok\r\n");
        aErrorBuf.Copy(KOkOpen);
        }

    User::LeaveIfError(err);

    CleanupClosePushL(server);


    CleanupStack::PopAndDestroy(1); // server, positioner

    _LIT(KInfTestComplet, "Test completed ok for this thread\r\n");
    aErrorBuf.Append(KInfTestComplet);
    }
Ejemplo n.º 12
0
/** 
Retrieve the field text for the given field type and contact item ID.

The behaviour differs when a specific field type is not given i.e. when
aFieldType is KUidContactFieldMatchAll:

- First tries to find an email for the given contact item ID.
- If there is no email then it retrieves the first entry in Fast Access fields
for the given contact item ID.
- If there is no Fast Access fields then it retrieves the first entry in the
text fields blob for the given contact item ID.

Text for all other field types are retrieved from the text fields blob.

The caller must determine that the given contact item ID exists before calling
this method.
*/
void CCntPplViewSession::TextFieldL(RSqlStatement& aSqlStatement, const CCntSqlStatement& aCntSqlStmt, const CContactTemplate& aSystemTemplate, TFieldType aFieldType, TDes& aText)
	{
	TPtrC8 textHeader;
	aSqlStatement.ColumnBinary(aCntSqlStmt.ParameterIndex(KContactTextFieldHeader()), textHeader);
	RDesReadStream textHeaderStream(textHeader);
	CleanupClosePushL(textHeaderStream);	
    CEmbeddedStore* textHeaderStore = CEmbeddedStore::FromLC(textHeaderStream);
    
	RStoreReadStream textHeaderStoreStream;
   	textHeaderStoreStream.OpenLC(*textHeaderStore,textHeaderStore->Root());

	TPtrC textFieldPtrC = aSqlStatement.ColumnTextL(aCntSqlStmt.ParameterIndex(KContactTextFields()));
	HBufC* textFieldsBuf = textFieldPtrC.AllocLC();
	
	if(aFieldType == KUidContactFieldMatchAll)
		{
		if (TCntPersistenceUtility::FindTxtFieldInTextBlobL(textHeaderStoreStream, textFieldsBuf, aSystemTemplate, aFieldType, aText) == EFalse)
			{
			CContactDatabase::TTextFieldMinimal	fastAccessText;
			if (HasTxtFieldInFastAccessFieldsL(aSqlStatement, aCntSqlStmt, fastAccessText))
				{
				aText.Copy(fastAccessText);		
				}
			}
		} 
	else
		{
		if (SpecificTxtFieldInFastAccessFieldsL(aSqlStatement, aCntSqlStmt, aFieldType, aText) == EFalse)
			{
			TCntPersistenceUtility::FindTxtFieldInTextBlobL(textHeaderStoreStream, textFieldsBuf, aSystemTemplate, aFieldType, aText);
			}
		}
		
	CleanupStack::PopAndDestroy(4, &textHeaderStream); //textHeaderStore, textHeaderStream, textHeaderStoreStream, textFieldsBuf
	}
Ejemplo n.º 13
0
void RTestExecuteLogServ::GetCPPModuleName(TDes& aModuleName, const TText8* aCPPFileName)
/**
 * @return aModuleName - Filename in descriptor
 * @param aCppFileName - Filename
 * Borrowed from scheduletest
 */
	{
	TPtrC8 fileNamePtrC8(aCPPFileName);
	// We do our own filename munging here; TParse can't help us since that's
	// expressly for EPOC filepaths and here we've got whatever the build system is
	// At present Win32 and Unix directory delimiters are supported
	TInt lastDelimiter = Max(fileNamePtrC8.LocateReverse('\\'), fileNamePtrC8.LocateReverse('/'));
	if(lastDelimiter >= 0 && lastDelimiter < fileNamePtrC8.Length() - 1)
		{
		// Found a delimiter which isn't trailing; update the ptr to start at the next char
		TInt fileNameLen = Min(KMaxFilename, fileNamePtrC8.Length() - (lastDelimiter + 1));
		fileNamePtrC8.Set(aCPPFileName + lastDelimiter + 1, fileNameLen);
		}
	else
		{
		// Didn't find a delimiter; take as much of the right-end of the name as fits
		fileNamePtrC8.Set(aCPPFileName + Max(0, fileNamePtrC8.Length() - KMaxFilename), Min(fileNamePtrC8.Length(), KMaxFilename));
		}
	aModuleName.Copy(fileNamePtrC8);
	}
// ----------------------------------------------------
// CAlfExCalendarEngine::NumberOfEvents
// ----------------------------------------------------
void CAlfExCalendarEngine::GetEventInformation( 
    const TTime& aDate, 
    TInt aIndex, 
    TDes& aTextBuffer)
    {
    aTextBuffer.Zero();
    TInt count = KErrNotFound;
    TDateTime requestedDate = aDate.DateTime();
    const TInt arrayCount = iCalendarEventArray.Count();
    for(TInt loop = 0; loop < arrayCount; loop++ )
        {
        TDateTime eventDate = iCalendarEventArray[loop].iItemDay.DateTime();
        if(eventDate.Day() == requestedDate.Day() && 
           eventDate.Month() == requestedDate.Month() &&
           eventDate.Year() == requestedDate.Year())
            {
            count++;
            }
        if(aIndex == count)
            {
            aTextBuffer.Copy(iCalendarEventArray[loop].iItemText);
            loop = arrayCount;
            }
        }
    }
Ejemplo n.º 15
0
//The function constructs a full path in aDestPath argument (from aDriveNumber and aPrivatePath arguments).
//aDestPath must point to a big enough place (ideally TFileName object).
static void ConstructDestPath(TDriveNumber aDriveNumber, const TDesC& aPrivatePath, TDes& aDestPath)
	{
	TDriveName destDriveName = TDriveUnit(aDriveNumber).Name();
	TParse parse;
	parse.Set(aPrivatePath, &destDriveName, 0);
	aDestPath.Copy(parse.FullName());
	}
Ejemplo n.º 16
0
void CPhone::GetPhoneIdSync(TDes& aManufacturer, TDes& aModel)
	{
	if (IsActive())
		{
		Cancel();
		}

	CTelephony::TPhoneIdV1Pckg phoneIdPckg(iPhoneId);
	iTelephony->GetPhoneId(iStatus,phoneIdPckg);
	iFunc = EImei; 
	SetActive();
	StartWait();
	iFunc = ENoneFunc;
	aManufacturer.Copy(iPhoneId.iManufacturer);
	aModel.Copy(iPhoneId.iModel);
	}
Ejemplo n.º 17
0
 // ---------------------------------------------------------------------------
 // CGpxConverterAO::GetTrackLogPathL
 // Resolve where to save tracklog file
 // ---------------------------------------------------------------------------
void CGpxConverterAO::GetTrackLogPathL( TDes& aFileName )
	{
	LOG("CGpxConverterAO::GetTrackLogPathL start");
	_LIT( KPathTrackLog, "TrackLog\\" );
	
	TFileName* path = new (ELeave) TFileName();
	CleanupStack::PushL( path );
	
	// check for memory card
	*path = PathInfo::MemoryCardRootPath();
	TLex lex( *path );
	TInt drive;
	iFs.CharToDrive( lex.Get(), drive );
	TVolumeInfo* volumeinfo = new (ELeave) TVolumeInfo;
	
	TInt err = iFs.Volume( *volumeinfo, drive );
	if( err != KErrNone )
		{
		LOG("CGpxConverterAO::GetTrackLogPathL - MMC not available");
		*path = PathInfo::PhoneMemoryRootPath();
		}
	delete volumeinfo;
	
	path->Append( KPathTrackLog );
	
	aFileName.Copy( *path );
	CleanupStack::PopAndDestroy( path );
	LOG("CGpxConverterAO::GetTrackLogPathL end");
	}
Ejemplo n.º 18
0
// -----------------------------------------------------------------------------
// CEcmtEmuConfigPlugin::GetEpocIniFilename
// 
// -----------------------------------------------------------------------------
//
void CEcmtEmuConfigPlugin::GetEpocIniFilename( TDes& aBuff ) const
    {
    aBuff.Copy( EcmtOsUtils::Epocroot() );
    _LIT( KEpocIni, "epoc32\\data\\epoc.ini" );

    aBuff += KEpocIni;
    aBuff.ZeroTerminate();
    }
Ejemplo n.º 19
0
// -----------------------------------------------------------------------------
// CEcmtEmuConfigPlugin::GetEpocWindFilename
// 
// -----------------------------------------------------------------------------
//
void CEcmtEmuConfigPlugin::GetEpocWindFilename( TDes& aBuff ) const
    {
    aBuff.Copy( EcmtOsUtils::TempDir() );
    _LIT( KEpocWind, "epocwind.out" );

    aBuff += KEpocWind;
    aBuff.ZeroTerminate();
    }
Ejemplo n.º 20
0
EXPORT_C void CTestUtils::ReadResourceStringL(RResourceFile& aResFile, TInt aId, TDes& rString)
	{
	HBufC8* buf = aResFile.AllocReadLC(aId);
	TResourceReader reader;
	reader.SetBuffer(buf);
	rString.Copy(reader.ReadTPtrC());
	CleanupStack::PopAndDestroy(buf);
	}
Ejemplo n.º 21
0
void CFileLogger::ReadStream(TDes &aDes)
	{
	TBuf8<50> buf;
	TInt pos = 0;
	User::LeaveIfError(iFile.Seek(ESeekStart, pos));
	iFile.Read(buf);
	aDes.Copy((TUint16* )buf.Ptr(), buf.Size()/2);
	}
Ejemplo n.º 22
0
// -----------------------------------------------------------------------------
// CapParser::ReplaceSpecialCharsL( TDes& aText, const TDesC& aValue )
// Replaces special characters to xml compliant.
// -----------------------------------------------------------------------------
//
void CapParser::ReplaceSpecialCharsL( TDes& aText, const TDesC& aValue )
    {
    if ( aValue.Length() > aText.MaxLength() )
        {
        User::Leave(KErrTooBig);
        }
    aText.Copy( aValue );
    
    //Replace special characters
    for( TInt i = 0; i < aText.Length(); i++ )
        {
        switch( aText[i] )
            {
            case KFind1:
                if ( aText.Length()+KReplace1().Length()-1 > aText.MaxLength() )
                    {
                    User::Leave(KErrTooBig);
                    }
                aText.Replace( i, 1, KReplace1 );
                i+=KReplace1().Length()-1;
                break;
            case KFind2:
                if ( aText.Length()+KReplace2().Length()-1 > aText.MaxLength() )
                    {
                    User::Leave(KErrTooBig);
                    }
                aText.Replace( i, 1, KReplace2 );
                i+=KReplace2().Length()-1;
                break;
            case KFind3:
                if ( aText.Length()+KReplace3().Length()-1 > aText.MaxLength() )
                    {
                    User::Leave(KErrTooBig);
                    }
                aText.Replace( i, 1, KReplace3 );
                i+=KReplace3().Length()-1;
                break;
            case KFind4:
                if ( aText.Length()+KReplace4().Length()-1 > aText.MaxLength() )
                    {
                    User::Leave(KErrTooBig);
                    }
                aText.Replace( i, 1, KReplace4 );
                i+=KReplace4().Length()-1;
                break;
            case KFind5:
                if ( aText.Length()+KReplace5().Length()-1 > aText.MaxLength() )
                    {
                    User::Leave(KErrTooBig);
                    }
                aText.Replace( i, 1, KReplace5 );
                i+=KReplace5().Length()-1;
                break;
            default:
                break;
            }
        }
    }
void CSCOMOAdapterDb::PrepareLuidQuery(TInt aLuid, TDes& aSqlQuery)
{
	aSqlQuery.Copy(_L("SELECT * FROM "));
    aSqlQuery.Append(KTableAMMgmtObject);
    aSqlQuery.Append(_L(" WHERE "));
    aSqlQuery.Append(NCol2);
    aSqlQuery.Append(_L(" = "));
    aSqlQuery.AppendNum(aLuid);
}
/**
Return the filename of the current default Contact database file.

@param aCntFile On return holds current default Contacts database filename.
*/
void CCntDbManagerController::DefaultDatabaseL(TDes& aCntFile) const
	{

	if ((iDefaultDriveUnit.Name().Length() + KContactsBaseFilename().Length()) > aCntFile.MaxLength())
		{
		User::Leave(KErrOverflow);		
		}
	aCntFile.Copy(iDefaultDriveUnit.Name());
	aCntFile.Append(KContactsBaseFilename);
	}
Ejemplo n.º 25
0
void ScrShotsGenUtils::GenerateUniqueFileNameL(const TDesC& aNameSeries, TDes& aOutFileName)
{
    TStringPoolObj fileName(128);
    fileName.Des().Format(_L("%S%d"),&aNameSeries,User::TickCount());
    if(fileName.Des().Length() > aOutFileName.MaxLength())
        User::Leave(KErrArgument);
    else{
        aOutFileName.Copy(fileName.Des());
    }
}
Ejemplo n.º 26
0
void CPodcastAppUi::GetErrorTextL(TDes &aErrorMessage, TInt aErrorCode)
	{
	switch (aErrorCode)
		{
		case KErrNotFound:
			{
			HBufC* error = iCoeEnv->AllocReadResourceLC(R_ERROR_INVALID_ADDRESS);
			aErrorMessage.Copy(*error);
			CleanupStack::PopAndDestroy(error);
			}
			break;
		case KErrDiskFull:
			{
			HBufC* error = iCoeEnv->AllocReadResourceLC(R_ERROR_DISK_FULL);
			aErrorMessage.Copy(*error);
			CleanupStack::PopAndDestroy(error);
			}
			break;
		case 404:
			{
			HBufC* error = iCoeEnv->AllocReadResourceLC(R_ERROR_NOTFOUND);
			aErrorMessage.Copy(*error);
			CleanupStack::PopAndDestroy(error);
			}
			break;
		default:
			{
			if (aErrorCode > 200)
				{
				HBufC* error = iCoeEnv->AllocReadResourceLC(R_ERROR_HTTP);
				aErrorMessage.Format(*error, aErrorCode);
				CleanupStack::PopAndDestroy(error);
				}
			else
				{
				HBufC* error = iCoeEnv->AllocReadResourceLC(R_ERROR_GENERAL);
				aErrorMessage.Format(*error, aErrorCode);
				CleanupStack::PopAndDestroy(error);
				}
			}
			break;
		}
	}
Ejemplo n.º 27
0
// ---------------------------------------------------------------------------
// CGbaServer::MakePrivateFilenameL()
// ---------------------------------------------------------------------------
//
void CGbaServer::MakePrivateFilenameL(RFs& aFs, const TDesC& aLeafName,
                                      TDes& aNameOut) const
{
    aNameOut.Copy(KGBAStoreStandardDrive);
    // Get private path
    TBuf<KPrivateFilepathLength> privatePath;
    aFs.PrivatePath(privatePath);
    aNameOut.Append(privatePath);
    aNameOut.Append(aLeafName);
}
Ejemplo n.º 28
0
TInt CLanxBearer::GetName(TDes& aName)
/**
Return the interface name

@param aName Out parameter to return the name
@return KErrNone
*/
	{
	aName.Copy(iIfName);
	return KErrNone;
	}
Ejemplo n.º 29
0
void CPMRfsPlugin::GetScriptL( const TRfsReason /*aType*/, TDes& aPath )
    {
    RDEBUG("CPMRfsPlugin::GetScriptL()");
    
        
    if( IsMMCFormatFlagEnabledL() )
        {
        RDEBUG("CPMRfsPlugin::GetScriptL() - Format MMC flag enabled");
    #ifndef RD_MULTIPLE_DRIVE
        aPath.Copy( KScriptFormat_E );
    #else
    	aPath.Copy( iFileName);
    	
    #endif
        }
    else
        {
        RDEBUG("CPMRfsPlugin::GetScriptL() - Format MMC flag disabled");
        }
    }
/*
Helper function to create command list path for start-up.
Implements fallback mechanism to launch 'sysstart.exe' if static command list for 'start-up' state is not found.
This temporary implementation is required during migration from existing 'sysstart' to 'ssma start-up'.
*/
void CGsaStatePolicyStartup::GetCommandListPath(TUint aBootMode, TDes& aCmdListPath)
	{
	aCmdListPath.Format(KCommandListPath, aBootMode);
	TBool found = BaflUtils::FolderExists(iFs, aCmdListPath);

	// This Fallback mechanism is used internally during migration from 'sysstart' to 'ssma start-up' and is not required otherwise.
	if (!found)
		{
		aCmdListPath.Copy(KFallbackCmdListPath());
		iLaunchSysStart = ETrue;	// launch 'sysstart.exe'
		}
	}