当前位置: 首页>>代码示例>>C++>>正文


C++ TParse::Name方法代码示例

本文整理汇总了C++中TParse::Name方法的典型用法代码示例。如果您正苦于以下问题:C++ TParse::Name方法的具体用法?C++ TParse::Name怎么用?C++ TParse::Name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TParse的用法示例。


在下文中一共展示了TParse::Name方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ConstructPolicyListL

void CPolicyStore::ConstructPolicyListL()
    {
    // Using two policy lists (one for all and one for the visible
    // ones) makes it easy to support the concept of hidden and
    // visible policies. There's a slight memory penalty but this
    // is not serious as the number of policies is typically small).
    // Hidden policies differ from visible ones in only one aspect - 
    // they are not included in the policy listing returned to
    // the caller.
    
    // A list of all policies (both visible and hidden)
    iPolicyListAll = new (ELeave) CArrayFixFlat<TVpnPolicyInfo>(2);
    // A list of visible policies only
    iPolicyListVisible = new (ELeave) CArrayFixFlat<TVpnPolicyInfo>(2);

    TFindFile fileFinder(iFs);
    CDir* fileList; 

    TPath privateDir;
    User::LeaveIfError(iFs.PrivatePath(privateDir));
    TInt ret = fileFinder.FindWildByDir(KPolFilePat, privateDir, fileList);
    if (ret == KErrNone)
        {
        CleanupStack::PushL(fileList);
        
        for (TInt i = 0; i < fileList->Count(); i++)
            {
            TParse fileNameParser;
            fileNameParser.Set((*fileList)[i].iName, &fileFinder.File(), NULL);

            TVpnPolicyId policyId;
            
            // Only add the policy to the list its ID length is
            // acceptable (this is the case with all policies
            // that have been properly imported to the store)
            if (fileNameParser.Name().Length() <= policyId.MaxLength())
                {
                policyId.Copy(fileNameParser.Name());

                HBufC* pinFile = iFileUtil.GetPinFileNameLC(policyId);

                if (iFileUtil.FileExists(*pinFile))
                    {
                    AddPolicyL(policyId);
                    }
                CleanupStack::PopAndDestroy(pinFile);
                }
            }
        
        CleanupStack::PopAndDestroy(); // fileList
        }
    }
开发者ID:cdaffara,项目名称:symbiandump-mw4,代码行数:52,代码来源:policystore.cpp

示例2: MainL

LOCAL_C void MainL()
/**
 * Main implementation
 */
	{
	CActiveScheduler* sched=NULL;
	sched=new(ELeave) CActiveScheduler;
	CActiveScheduler::Install(sched);
	CTeIpUpsSuite* server = NULL;
		
	CCommandLineArguments* args = CCommandLineArguments::NewLC();
	TPtrC exeName = args->Arg(0);
	TParse fullName;
	fullName.Set(exeName, NULL, NULL);
	CleanupStack::PopAndDestroy(args);
	
	// Create the CTestServer derived server
	TRAPD(err,server = CTeIpUpsSuite::NewL(fullName.Name()));
	if(!err)
		{
		// Sync with the client and enter the active scheduler
		RProcess::Rendezvous(KErrNone);
		sched->Start();
		}
	delete server;
	delete sched;
	}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:27,代码来源:te_ipups_server.cpp

示例3: BuildPolicyIdListL

void CPolicyImporter::BuildPolicyIdListL()
    {
    delete iPolicyIdList;
    iPolicyIdList = NULL;
    iPolicyIdList = new (ELeave) CArrayFixFlat<TExtVpnPolicyId>(2);

    TFindFile* fileFinder = new (ELeave) TFindFile(iFs);
    CleanupStack::PushL(fileFinder);

    CDir* fileList;

    TInt ret = fileFinder->FindWildByDir(KPinFilePat, iImportDir, fileList);

    if (ret == KErrNone)
        {
        CleanupStack::PushL(fileList);

        for (TInt i = 0; i < fileList->Count(); i++)
            {
            TParse* fileNameParser = new (ELeave) TParse();
            CleanupStack::PushL(fileNameParser);

            fileNameParser->Set((*fileList)[i].iName, NULL, NULL);

            TExtVpnPolicyId policyId;
            policyId.Copy(fileNameParser->Name());

            iPolicyIdList->AppendL(policyId);

            CleanupStack::PopAndDestroy(); // fileNameParser
            }
        CleanupStack::PopAndDestroy(); // fileList
        }
    CleanupStack::PopAndDestroy(); // fileFinder
    }
开发者ID:cdaffara,项目名称:symbiandump-mw4,代码行数:35,代码来源:policyimporter.cpp

示例4: GetFileName

void CCustomCommandAsync::GetFileName(TPtrC path, TFileName* fileName)
{

	TParse p;
	p.Set(path,NULL,NULL);
	fileName->Append(p.DriveAndPath());
	fileName->Append(p.Name());

	fileName->Append(p.Ext());
}
开发者ID:kuailexs,项目名称:symbiandump-mw2,代码行数:10,代码来源:CustomCommandAsync.cpp

示例5: FindAppInListL

RApaApplication* CApaProcess::FindAppInListL(const TDesC& aAppFileName, TUid aUid) const
// returns pointer to a matching app, or NULL if not in list
//
	{
	__ASSERT_DEBUG(iAppList, Panic(EPanicNullPointer));

	TInt index = iAppList->Count();
	if (aUid!=KNullUid)
		{// search by UID
		while(--index >= 0)
			{
			__ASSERT_DEBUG((*iAppList)[index], Panic(EDPanicNoAppHolder));
			if ((*iAppList)[index]->AppFileUid() == aUid)
				{
				(*iAppList)[index]->ScheduleForAsyncDeletion(EFalse);
				return (*iAppList)[index]; // match found
				}
			}
		}
	else
		{// search by name as no UID has been supplied
		TParse app; 
		TParse suspect;
		User::LeaveIfError(app.Set(aAppFileName,NULL,NULL));
		while (--index>=0)
			{
			__ASSERT_DEBUG((*iAppList)[index], Panic(EDPanicNoAppHolder));
			suspect.SetNoWild((*iAppList)[index]->AppFileName(), NULL, NULL);
			if (!app.Name().CompareF(suspect.Name()))
				{
				(*iAppList)[index]->ScheduleForAsyncDeletion(EFalse);
				return (*iAppList)[index]; // match found
				}
			}
		}
		
	return NULL; // no match found
	}
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:38,代码来源:apaproc.cpp

示例6: FindPppFactoryL

CNifFactory* MPppRecvr::FindPppFactoryL(const TDesC& aFilename, TUid aUid2, CObjectCon& aCon)
//
// Basically this is all the stuff required to load a DLL appart from the
// Factory->CreatMe call
//
	{
	CNifFactory* Factory=NULL;
	TParse parse;
	User::LeaveIfError(parse.Set(aFilename, 0, 0));

	TName dummy1;
	TInt find=0;

	if(aCon.FindByName(find, parse.Name(), dummy1)!=KErrNone)
		{

	    // Else load the module
		TAutoClose<RLibrary> lib;
		User::LeaveIfError(lib.iObj.Load(aFilename));
		lib.PushL();

		// The Uid check
		if(lib.iObj.Type()[1]!=aUid2)
			User::Leave(KErrBadLibraryEntryPoint);

		TPppFactoryNewL libEntry=(TPppFactoryNewL)lib.iObj.Lookup(1);
		if (libEntry==NULL)
			User::Leave(KErrNoMemory);

		Factory =(*libEntry)(); // Opens CObject
		if (!Factory)
			User::Leave(KErrBadDriver);

		CleanupStack::PushL(TCleanupItem(CNifFactory::Cleanup, Factory));
		Factory->InitL(lib.iObj, aCon); // Transfers the library object if successful

		// Can pop the library now - auto close will have no effect because handle is null
		CleanupStack::Pop();
		lib.Pop();

		}
	else
		{
		Factory=(CNifFactory*)aCon.At(find);
		Factory->Open();
		}
		return Factory;
	}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:48,代码来源:PPPMISC.CPP

示例7: FLog

void CMsvSendExe::FLog(const TDesC& aFileName, TRefByValue<const TDesC16> aFmt, ...)
	{
	VA_LIST list;
	VA_START(list, aFmt);

	TParse parse;
	parse.Set(aFileName, NULL, NULL);

	TBuf<256> buf;
	buf.Append(parse.Name());
	buf.Append(_L(": "));
	buf.AppendFormatList(aFmt, list);

	RFileLogger::Write(KSchSendLogDir, KSchSendExeLogFile, KSchSendExeLoggingMode,
				buf);
	}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:16,代码来源:SchSendExe.cpp

示例8: LoadLibraryHandleL

// ---------------------------------------------------------
// CPhoneStateHandle::LoadLibraryHandleL
// ---------------------------------------------------------
void CPhoneStateHandle::LoadLibraryHandleL( 
    const TDesC& aFileName,
    const TUid aFactoryUid )
    {

    TBool factoryFound = EFalse;
    TParse fullentry;
    fullentry.Set( aFileName, NULL, NULL );

    if ( iFactoryLibrary.Load( fullentry.Name(), fullentry.DriveAndPath() ) 
        == KErrNone )
        {
        if ( iFactoryLibrary.Type()[1] == aFactoryUid )
            {
            factoryFound = ETrue;
            }
        else
            {
            iFactoryLibrary.Close();
            }
        }

    // If Factory not found:
    if ( !factoryFound )
        {
        Panic( EPhoneCtrlFactoryLibraryNotFound );
        }
    // Look for the 1st exported function
    iEntry = iFactoryLibrary.Lookup( KPhoneUiStateMachineOrdinal ); 

    // Create the state machine factory
    iStateMachineFactory = (CPhoneUIStateMachineFactoryBase*) iEntry();

    // Create the state machine
    iPhoneStateMachine = iStateMachineFactory->CreatePhoneStateMachineL(
        iViewCommandHandle );

    // Create the phone resource resolver
    iPhoneResourceResolver = 
        iStateMachineFactory->CreatePhoneResourceResolverL();
    
    // Create the phone error messages handler    
    iPhoneErrorMessagesHandler = 
        iStateMachineFactory->CreatePhoneErrorMessagesHandlerL( 
                            iViewCommandHandle, iPhoneStateMachine );
    }
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:49,代码来源:cphonestatehandle.cpp

示例9: FigureOutRealPathL

	// class CIconFileHandle : public CBase, public MContextBase, 	
void FigureOutRealPathL(const TDesC& aFullPath, TDes& aRealPath, RFs& aFs) 
	{
		CALLSTACKITEMSTATIC_N(_CL("JuikIcons"), _CL("FigureOutRealPathL"));

		if ( aFullPath == AknIconUtils::AvkonIconFileName() )
			{
				aRealPath.Copy( aFullPath );
				return;
			}
#ifdef __S60V3__
		// Change path to c:\\resource 
		TParse p; p.Set( aFullPath, 0, 0);
		aRealPath=_L("c:\\resource\\");
		aRealPath.Append(p.NameAndExt());
#else
		// Just use given path
		aRealPath=aFullPath;
#endif
		
#ifdef __WINS__
		// in WINS, read always from Z 
		aRealPath.Replace(0, 1, _L("z"));
#else
		// In device, if file doesn't exist, read from E
		TBool try_mif=EFalse;
		if (p.Ext().CompareF(_L(".mbm"))==0) try_mif=ETrue;
again:
		if (! BaflUtils::FileExists(aFs, aRealPath)) {
			aRealPath.Replace(0, 1, _L("e"));
			if (! BaflUtils::FileExists(aFs, aRealPath)) {
				if (try_mif) {
					aRealPath=_L("c:\\resource\\");
					aRealPath.Append(p.Name());
					aRealPath.Append(_L(".mif"));
					try_mif=EFalse;
					goto again;
				}
				User::Leave(KErrNotFound);
			}
		}
#endif
	}
开发者ID:flaithbheartaigh,项目名称:jaikuengine-mobile-client,代码行数:43,代码来源:juik_icons.cpp

示例10: VsReadFileSection

/**
@internalComponent
*/
TInt CTestVirusHook::VsReadFileSection(TFsPluginRequest& aRequest)
	{

	// The t_virus test uses a filename clean.txt, a read length of 8 and a read position of 0.
	TFileName fileName;
	TInt len;
	TInt pos;

	// test getting name on read file section intercept
	TInt err = GetName(&aRequest, fileName);
	if(err != KErrNone)
		{
		return(err);
		}
	TParse parse;
	parse.Set(fileName,NULL,NULL);
	TPtrC name = parse.Name();
	if(name.CompareF(_L("clean"))!=0)
		{
		return(KErrGeneral);
		}
	TPtrC ext = parse.Ext();
	if(ext.CompareF(_L(".txt"))!=0)
		{
		return(KErrGeneral);
		}

	// test getting read length and required file position on read file section intercept
	err = GetFileAccessInfo(&aRequest, len, pos);
	if(err != KErrNone)
		{
		return(err);
		}
	if ((len != 8) || (pos != 0))
		{
		return(KErrGeneral);
		}
	
	return KErrNone;
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:43,代码来源:t_vshook.cpp

示例11: CleanCachedPage

void CResourceManager::CleanCachedPage(nid aPageId)
{
    int len = GetCachePath().Length();
    HBufC* cache = HBufC::New(len + 64);
    TPtr p = cache->Des();
    TPtr path = GetCachePath();
    p.Format(KCachePathFormat, &path, aPageId);
    
    _LIT(KWildName, "*.*");
    RFs& fs = CCoeEnv::Static()->FsSession();
    TFindFile file_finder(fs);
    CDir* file_list;
    TInt err = file_finder.FindWildByDir(KWildName, p, file_list);
    while (err == KErrNone) {
        for (TInt i = 0; i < file_list->Count(); i++) {
            if ((*file_list)[i].IsDir())
                continue;

            TParse fullentry;
            fullentry.Set((*file_list)[i].iName, &file_finder.File(), NULL);
            if (fullentry.ExtPresent()) {
                err = fs.Delete(fullentry.FullName());
            }
            else {
                TFileName filename;
                filename.Append(fullentry.DriveAndPath());
                filename.Append(fullentry.Name());
                err = fs.Delete(filename);
            }
        }
        delete file_list;
        err = file_finder.FindWild(file_list);
    }

    err = fs.RmDir(p);
    delete cache;
}
开发者ID:github188,项目名称:homebrew,代码行数:37,代码来源:ResourceManager.cpp

示例12: ConstructL

/**
Protected constructor.

Extracts the initialisation data provided by the calling functions: ConstructSourceL() and 
ConstructSinkL(). Creates a file server session and sets up file name. If there is a file name and 
it cannot be found this function leaves. If there is no file name the function leaves. Does not 
attempt to open the file or check whether the file exists.

If aInitData contains a TMMFFileHandleParams instead of TMMFFileParams, the source/sink is constructed from 
the file handle provided by the caller

@param  aInitData
Initialisation data packaged in a TMMFFileParams or in a TMMFFileHandleParams (File Handle)
*/
void CFileMultimediaSource::ConstructL(const TDesC8& aInitData,TMMFileMode aFileMode)
    {
    User::LeaveIfError(iFsSession.Connect());
    // on IPCv2 we auto attach
    User::LeaveIfError(iFsSession.ShareAuto());
    
    User::LeaveIfError(iFsSession.ShareProtected());
    
    TBool fileInit = EFalse;
    HBufC* filename = NULL; 
    TBool filenamePushed = EFalse;
    
    iCAFParameters = new (ELeave) CCAFParameters;
    TBool drmContent = EFalse;
    RDesReadStream stream(aInitData);
    CleanupClosePushL(stream);

    TUid initUid;
    
    initUid = TUid::Uid(stream.ReadInt32L());
    
    if (initUid == KMMFileHandleSourceUid)
        {
        TPckgBuf<RFile*> fileptr;
        stream.ReadL(fileptr);
        
        iHandle.Duplicate(*fileptr());
        
        TInt length;
        length = stream.ReadInt32L();
        if (length>0)
            {
            iCAFParameters->iUniqueId = HBufC::NewL(length);
            TPtr16 ptr = iCAFParameters->iUniqueId->Des();
            stream.ReadL(ptr, length);
            }
        iFileHandle = ETrue;
        filename = HBufC::NewMaxL(KMaxFileName);
        TPtr ptr = filename->Des();
        iHandle.Name(ptr);
        fileInit = ETrue;
        drmContent = ETrue;
        
        iCAFParameters->iEnableUI = stream.ReadInt32L();
        }
    
    else if (initUid == KMMFileSourceUid)
        {
        TInt length;
        length = stream.ReadInt32L();
        filename = HBufC::NewMaxLC(length);
        TPtr ptr = filename->Des();
        stream.ReadL(ptr, length);
        
        length = stream.ReadInt32L();
        if (length>0)
            {
            iCAFParameters->iUniqueId = HBufC::NewMaxL(length);
            ptr.Set(iCAFParameters->iUniqueId->Des());
            stream.ReadL(ptr, length);
            }
        CleanupStack::Pop(filename);
        
        fileInit = ETrue;
        drmContent = ETrue;
        iFileHandle = EFalse; 
        iCAFParameters->iEnableUI = stream.ReadInt32L();
        }
    else
        {
        //		TODO If the UID is unknown we should reject, but  currently
        //		code also used for older calls that just supply filename.
        //		User::Leave(KErrNotSupported);
        }
    
    CleanupStack::PopAndDestroy(&stream);
    
    if (!fileInit && aInitData.Length() == sizeof(TMMFFileHandleParams))
        {
        TMMFFileHandleParams params;
        TPckgC<TMMFFileHandleParams> config(params);
        config.Set(aInitData);
        params = config();
        
        
        if (params.iUid == KFileHandleUid)
//.........这里部分代码省略.........
开发者ID:kuailexs,项目名称:symbiandump-mw2,代码行数:101,代码来源:FileSource.cpp

示例13: doTestStepPreambleL

TVerdict CUpsClientStep::doTestStepPreambleL()
/**
 * @return - TVerdict code
 * Override of base class virtual
 */
	{
	
 	__UHEAP_MARK;
 	
	// Read values to config servers from INI file. (ARRAY of values)
 	
    // Read how many times the test step needs to be repeated.
    TName fStepRepeat(_L("StepRepeat"));
    TInt  repeats;
    
    if(GetIntFromConfig(ConfigSection(),fStepRepeat,repeats))
	    {
	   	iStepRepeat=repeats;
	    }
	else
		{
		iStepRepeat=1;		
		}
    
    // Read values for test sequence from INI file. (ARRAY of values)
	TInt index=0;
	TName fUseServiceUID;
	fUseServiceUID.Format(_L("UseServiceUID_%d"),index);
	TName fUseServerName;
	fUseServerName.Format(_L("UseServerName_%d"),index);
	TName fDestination;
	fDestination.Format(_L("Destination_%d"),index);
	TName fExpectedError;
	fExpectedError.Format(_L("ExpectedError_%d"),index);
	TName fUseOpaqueData;
	fUseOpaqueData.Format(_L("UseOpaqueData_%d"),index);
	TName fSelectDialogOption;
	fSelectDialogOption.Format(_L("SelectDialogOption_%d"),index); 
	TName fButtonsDisplayed;
	fButtonsDisplayed.Format(_L("ButtonsDisplayed_%d"),index);
	TName fDialogCreatorInvoked;
	fDialogCreatorInvoked.Format(_L("DialogCreatorInvoked_%d"),index);
	TName fPolicyEvaluatorInvoked;
	fPolicyEvaluatorInvoked.Format(_L("PolicyEvaluatorInvoked_%d"),index);
	TName fAccessGranted;
	fAccessGranted.Format(_L("AccessGranted_%d"), index);
	TName fCloseSession;
	fCloseSession.Format(_L("CloseSession_%d"), index);
	TName fHoldEvaluatorOpen;
	fHoldEvaluatorOpen.Format(_L("HoldEvaluatorOpen_%d"), index);
	TName fHoldPrepareDialogOpen;
	fHoldPrepareDialogOpen.Format(_L("HoldPrepareDialogOpen_%d"), index);
	TName fHoldDisplayDialogOpen;
	fHoldDisplayDialogOpen.Format(_L("HoldDisplayDialogOpen_%d"), index);
	TName fRequestDurationThreshold;
	fRequestDurationThreshold.Format(_L("RequestDurationThreshold_%d"), index);
	TName fLeaveDialog;
	fLeaveDialog.Format(_L("LeaveDialog_%d"), index);
	TName fLeaveEvaluator;
	fLeaveEvaluator.Format(_L("LeaveEvaluator_%d"), index);
	TName fCancelUpsRequest;
	fCancelUpsRequest.Format(_L("CancelUpsRequest_%d"), index);
	TName fPlatSecPass;
	fPlatSecPass.Format(_L("PlatSecPass_%d"), index);
	TName fForcePrompt;
	fForcePrompt.Format(_L("ForcePrompt_%d"), index);
	TName fExpectedEvaInfo;
	fExpectedEvaInfo.Format(_L("ExpectedEvaluatorInfo_%d"), index);
	TName fSelectFingerprint;
	fSelectFingerprint.Format(_L("SelectFingerprint_%d"), index);
	TName fWaitUntilFileAppears;
	fWaitUntilFileAppears.Format(_L("WaitUntilFileAppears_%d"), index);
	
	TInt	useServiceUID;
	TPtrC   useServerName;
	TPtrC   destination;
	TInt	expectedError;
	TPtrC   useOpaqueData;
    TPtrC	selectDialogOption;
	TInt	buttonsDisplayed;
	TInt    dialogCreatorInvoked;
	TInt	policyEvaluatorInvoked;
	TPtrC	accessGranted;
	TBool	closeSession;
	TBool   holdEvaluatorOpen;
	TBool   holdPrepareDialogOpen;
	TBool   holdDisplayDialogOpen;
	TInt 	requestDurationThreshold;
	TBool   leaveDialog;
	TBool   leaveEvaluator;
	TBool   cancelUpsRequest;
	TBool   platSecPass;
	TBool   forcePrompt;
	TInt    expectedEvaInfo;
	TInt	selectFingerprint;
	TPtrC   waitUntilFileAppears;	
	
	while (GetHexFromConfig(ConfigSection(), fUseServiceUID,useServiceUID)
		&& GetStringFromConfig(ConfigSection(),fUseServerName,useServerName)
		&& GetStringFromConfig(ConfigSection(),fDestination,destination)
//.........这里部分代码省略.........
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:101,代码来源:tupsclientstep.cpp

示例14: ProcessMainL

/**
 * Subroutine performing pre-processing tasks for testexecute execution
 * Also, responsible for triggering the state machine through instance of ScriptMaster
 * @param aScheduler - Instance of ActiveScheduler created through MainL()
 * @param aSysDrive - Default system drive letter to be used for all script parsing
 */
LOCAL_C void ProcessMainL(CActiveScheduler* aScheduler, const TDriveName aSysDrive)
	{
	TDriveName defaultSysDrive(aSysDrive);
	TDriveName testSysDrive(KTEFLegacySysDrive);
	TInt waitForLoggingTime = 0;
	TBuf<KMaxTestExecuteNameLength> htmlLogPath;
	// Create a object of the Parser for TestExecute.ini
	CTestExecuteIniData* parseTestExecuteIni = NULL;
	TRAPD(err, parseTestExecuteIni = CTestExecuteIniData::NewL(defaultSysDrive));
	if (err == KErrNone)
		{
		CleanupStack::PushL(parseTestExecuteIni);
		// Extract all the key values within the object
		parseTestExecuteIni->ExtractValuesFromIni();
		}

	// Read and parse the command line for the flags
	// -d -slf -help and -v
	TBuf<KMaxTestExecuteCommandLength> commandLine;
	TDesC* selTestCfgFileData = NULL; //the pointer to the data of in the .tcs file
	ReadCommandLineL(commandLine);
	
	// Make lower case because we parse it for flags and search for ".script"
	commandLine.LowerCase();
	TBool separateLogFiles(EFalse); // -slf
	TBool justInTime(EFalse); // -d
	TBool graphicalWindowServer(EFalse); // -gws
	TBool helpRequest(EFalse); // -help
	TBool versionRequest(EFalse); // -v

	TBool includeSelectiveCases(EFalse); // -tci
	TBool excludeSelectiveCases(EFalse); // -tcx
	TBool pipe(EFalse) ; 
	
	// Set up the bools from the command line
	ParseCommandLine(commandLine,separateLogFiles,justInTime,graphicalWindowServer,includeSelectiveCases, excludeSelectiveCases,pipe, helpRequest,versionRequest,*parseTestExecuteIni,err);
	// If -d then set Just In Time debugging. Panicks break into debug on emulator
	(justInTime) ? (User::SetJustInTime(ETrue)) : (User::SetJustInTime(EFalse)); 

	// Hooks for creating the Graphical Window server
	#ifdef GWS
	#endif

	// Create a console
	_LIT(KMessage,"TestExecute Script Engine");
	CConsoleBase* console = Console::NewL(KMessage,TSize(KConsFullScreen,KConsFullScreen));
	CleanupStack::PushL(console);
	console->SetCursorHeight(0);
	RConsoleLogger consoleLogger(*console);
	
	CScriptControl::iRunScriptFailCount=0;
	// A lex for getting the first command line argument, ie the script file path
	TLex lex(commandLine);
	TPtrC scriptFilePath(lex.NextToken());
	TInt ret = KErrNotFound;
	if (scriptFilePath.CompareF(KNull) != 0)
		{
		_LIT(KTEFSwitchPrefix, "-");
		if(scriptFilePath.Mid(0,1).CompareF(KTEFSwitchPrefix) == 0)
			{
			// If the first command line argument is not the script file path but a optional switches
			// Then set the script file path for the execution to be 'blank'
			scriptFilePath.Set(KNull);
			}
		else
			{
			TBuf<KBuffSize> tempScriptPath(scriptFilePath);

			// Check whether script name is provided along with folder path in the command line
			// If not, take the path from testexecute.ini & name from the command line
			ret=scriptFilePath.FindC(KTEFColon);
			if(ret==KErrNotFound)
				{
				if (parseTestExecuteIni != NULL)
					{
					TBuf<KMaxTestExecuteNameLength> tempBuffer;
					parseTestExecuteIni->GetKeyValueFromIni(KTEFDefaultScriptPath, tempBuffer);
 					// If the relative script file path does not refer to the root,
 					// we will look for DefaultScriptDir entry in testexecute.ini
 					// If available prepend it to the relative path
 					// else if the relative path refers to root,
 					// then set the default system drive, i.e. c:
 					// else leaving it as it is (considering invalid path)
 					if (scriptFilePath.Left(1).CompareF(KTEFSlash) != 0 &&
 					 tempBuffer.Length() > 0)
 						scriptFilePath.Set(tempBuffer);
 					else if (scriptFilePath.Left(1).CompareF(KTEFSlash) == 0)
 						scriptFilePath.Set(defaultSysDrive);
 					else
 						scriptFilePath.Set(KNull);
					}
				else
					{
					// If the file path is not provided in command line as well as in testexecute.ini
//.........这里部分代码省略.........
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:101,代码来源:testexecute.cpp

示例15: doTestStepPreambleL

TVerdict CUPSDbManagementStep::doTestStepPreambleL()
/**
 * @return - TVerdict code
 * Override of base class virtual
 */
	{
 	__UHEAP_MARK;
 	
 	INFO_PRINTF2(_L("START CELLS: %d"), User::CountAllocCells());
 	
 	// reads client name and SID
	TParse clientFullName;
	RThread client;
	clientFullName.Set(client.FullName(),NULL, NULL);
	iTEFServerName=clientFullName.Name();
	iExpectedClientSid = client.SecureId() ;
	client.Close();
 	
    // Read how many times the test step needs to be repeated.
    TName fStepRepeat(_L("StepRepeat"));
    TInt  repeats;
    
    if(GetIntFromConfig(ConfigSection(),fStepRepeat,repeats))
    	{
    	iStepRepeat=repeats;
    	}
	else
		{	
		iStepRepeat=1;		
		}
    
    // Read values for test sequence from INI file. (ARRAY of values)
	TInt index=0;
	TName fOperation;
	fOperation.Format(_L("Operation_%d"), index);
	TName fClientSid;
	fClientSid.Format(_L("ClientSid_%d"),index);
	TName fEvaluatorId;
	fEvaluatorId.Format(_L("EvaluatorId_%d"),index);
	TName fServiceId;
	fServiceId.Format(_L("ServiceId_%d"),index);
	TName fServerSid;
	fServerSid.Format(_L("ServerSid_%d"),index);
	TName fFingerprint;
	fFingerprint.Format(_L("Fingerprint_%d"),index);
	TName fClientEntity;
	fClientEntity.Format(_L("ClientEntity_%d"),index);
	TName fDescription;
	fDescription.Format(_L("Description_%d"),index);
	TName fDecisionResult;
	fDecisionResult.Format(_L("DecisionResult_%d"),index);
	TName fMajorPolicyVersion;
	fMajorPolicyVersion.Format(_L("MajorPolicyVersion_%d"),index);
	TName fRecordId;
	fRecordId.Format(_L("RecordId_%d"),index);
	TName fEvaluatorInfo;
	fEvaluatorInfo.Format(_L("EvaluatorInfo_%d"),index);
	TName fExpectedDecisionCount;
	fExpectedDecisionCount.Format(_L("ExpectedDecisionCount_%d"),index);
	
	TPtrC 	operation;
	TInt	clientSid;
	TInt	evaluatorId;
	TInt	serviceId;
	TInt	serverSid;
	TPtrC	fingerprint;
	TPtrC	clientEntity;
	TPtrC	description;
	TPtrC	decisionResult;
	TInt	majorPolicyVersion;
	TInt 	recordId;
	TInt	evaluatorInfo;
	TInt 	expectedDecisionCount;
	
	while (GetStringFromConfig(ConfigSection(),fOperation,operation))
		{
		
		// Create an instance of a new request
		CUpsDbRequest* newRequest = CUpsDbRequest::NewL();
		CleanupStack::PushL(newRequest);
		
		// Set the operation to be performed
	    newRequest->iOperation = operation;
	    
	    if(GetHexFromConfig(ConfigSection(),fClientSid,clientSid))
		    {
		    newRequest->iClientSid = clientSid;
		  	newRequest->iDecisionFilter->SetClientSid(TSecureId(clientSid),EEqual);
		    }
	    
		if(GetHexFromConfig(ConfigSection(),fEvaluatorId,evaluatorId))
			{
			newRequest->iEvaluatorId = evaluatorId;	
			newRequest->iDecisionFilter->SetEvaluatorId(TUid::Uid(evaluatorId),EEqual);
			}
		
		if(GetHexFromConfig(ConfigSection(),fServiceId,serviceId))
			{
			newRequest->iServiceId = serviceId;	
			newRequest->iDecisionFilter->SetServiceId(TUid::Uid(serviceId),EEqual);
//.........这里部分代码省略.........
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:101,代码来源:tupsdbmanagementstep.cpp


注:本文中的TParse::Name方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。