core/src/parser.h
changeset 78 b3ffff030d5c
parent 66 2a78c4ff2eab
child 83 706c7a69e448
equal deleted inserted replaced
77:8df58d8c99e8 78:b3ffff030d5c
    40 		EDebug				= 0x00000002,
    40 		EDebug				= 0x00000002,
    41 		EExportLineNumbers	= 0x00000004
    41 		EExportLineNumbers	= 0x00000004
    42 		};
    42 		};
    43 public:
    43 public:
    44 	static CParser* NewL(TUint aMode, const TDesC& aDes, RIoSession& aIoSession, RIoReadHandle& aStdin, RIoWriteHandle& aStdout, RIoWriteHandle& aStderr, IoUtils::CEnvironment& aEnv, CCommandFactory& aFactory, MParserObserver* aObserver, TInt aStartingLineNumber = 1);
    44 	static CParser* NewL(TUint aMode, const TDesC& aDes, RIoSession& aIoSession, RIoReadHandle& aStdin, RIoWriteHandle& aStdout, RIoWriteHandle& aStderr, IoUtils::CEnvironment& aEnv, CCommandFactory& aFactory, MParserObserver* aObserver, TInt aStartingLineNumber = 1);
       
    45 	static CParser* NewL(TUint aMode, RIoReadHandle& aSourceHandle, RIoSession& aIoSession, RIoReadHandle& aStdin, RIoWriteHandle& aStdout, RIoWriteHandle& aStderr, IoUtils::CEnvironment& aEnv, CCommandFactory& aFactory, MParserObserver* aObserver);
    45 	~CParser();
    46 	~CParser();
    46 	void Start();
    47 	void Start();
    47 	void Start(TBool& aIsForeground);
    48 	void Start(TBool& aIsForeground);
    48 	void Kill();
    49 	void Kill();
    49 	TInt Suspend();
    50 	TInt Suspend();
    60 		EAnd,
    61 		EAnd,
    61 		EOr,
    62 		EOr,
    62 		EAndOr
    63 		EAndOr
    63 		};
    64 		};
    64 private:
    65 private:
    65 	CParser(TUint aMode, const TDesC& aDes, RIoSession& aIoSession, RIoReadHandle& aStdin, RIoWriteHandle& aStdout, RIoWriteHandle& aStderr, IoUtils::CEnvironment& aEnv, CCommandFactory& aFactory, MParserObserver* aObserver, TInt aStartingLineNumber=1);
    66 	CParser(TUint aMode, RIoSession& aIoSession, RIoReadHandle& aStdin, RIoWriteHandle& aStdout, RIoWriteHandle& aStderr, IoUtils::CEnvironment& aEnv, CCommandFactory& aFactory, MParserObserver* aObserver, TInt aStartingLineNumber=1);
    66 	void ConstructL();
    67 	void ConstructL(const TDesC* aDes, RIoReadHandle* aSourceHandle);
    67 	void CreateNextPipeLine(TBool* aIsForeground);
    68 	void CreateNextPipeLine(TBool* aIsForeground);
    68 	void CreateNextPipeLineL(TBool* aIsForeground);
    69 	void CreateNextPipeLineL(TBool* aIsForeground);
    69 	void FindNextPipeLineL(TPtrC& aData, TCondition& aCondition, TBool& aReachedLineEnd);
    70 	void FindNextPipeLineL(TPtrC& aData, TCondition& aCondition, TBool& aReachedLineEnd);
    70 	HBufC* ExpandVariablesLC(const TDesC& aData);
    71 	HBufC* ExpandVariablesLC(const TDesC& aData);
    71 	TInt SkipLineRemainder();
    72 	void SkipLineRemainderL();
       
    73 	void DoSkipLineRemainderL();
    72 	void SkipToEnd();
    74 	void SkipToEnd();
       
    75 	TBool MoreSourceData() const;
       
    76 	void HandlePipeLineCompleteL(CPipeLine& aPipeLine, const TError& aError);
    73 	static TInt CompletionCallBack(TAny* aSelf);
    77 	static TInt CompletionCallBack(TAny* aSelf);
    74 	static TInt NextCallBack(TAny* aSelf);
    78 	static TInt NextCallBack(TAny* aSelf);
    75 	static TInt ExitCallBack(TAny* aSelf);
    79 	static TInt ExitCallBack(TAny* aSelf);
    76 private:	// From MPipeLineObserver.
    80 private:	// From MPipeLineObserver.
    77 	virtual void HandlePipeLineComplete(CPipeLine& aPipeLine, const TError& aError);
    81 	virtual void HandlePipeLineComplete(CPipeLine& aPipeLine, const TError& aError);
    78 private:
    82 private:
    79 	const TUint iMode;
    83 	const TUint iMode;
    80 	const TPtrC iData;
       
    81 	TCondition iCondition;
    84 	TCondition iCondition;
    82 	RIoSession& iIoSession;
    85 	RIoSession& iIoSession;
    83 	RIoReadHandle iStdin;
    86 	RIoReadHandle iStdin;
    84 	RIoWriteHandle iStdout;
    87 	RIoWriteHandle iStdout;
    85 	RIoWriteHandle iStderr;
    88 	RIoWriteHandle iStderr;