From 65654404f98b67e9baf63297a4cbbefd019029d8 Mon Sep 17 00:00:00 2001 From: "nisheeth%netscape.com" Date: Thu, 6 May 1999 01:48:56 +0000 Subject: [PATCH] Added a key as a parameter to all the different versions of the Parse method in nsIParser. --- htmlparser/src/nsIParser.h | 4 ++-- htmlparser/src/nsParser.cpp | 4 ++-- htmlparser/src/nsParser.h | 4 ++-- parser/htmlparser/src/nsIParser.h | 4 ++-- parser/htmlparser/src/nsParser.cpp | 4 ++-- parser/htmlparser/src/nsParser.h | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/htmlparser/src/nsIParser.h b/htmlparser/src/nsIParser.h index 58f03895ecd7..7b2137fd5c72 100644 --- a/htmlparser/src/nsIParser.h +++ b/htmlparser/src/nsIParser.h @@ -163,8 +163,8 @@ class nsIParser : public nsISupports { ******************************************************************************************/ virtual PRBool EnableParser(PRBool aState) = 0; virtual PRBool IsParserEnabled() = 0; - virtual nsresult Parse(nsIURL* aURL,nsIStreamObserver* aListener = nsnull,PRBool aEnableVerify=PR_FALSE) = 0; - virtual nsresult Parse(nsIInputStream& aStream, PRBool aEnableVerify=PR_FALSE) = 0; + virtual nsresult Parse(nsIURL* aURL,nsIStreamObserver* aListener = nsnull,PRBool aEnableVerify=PR_FALSE, void* aKey=0) = 0; + virtual nsresult Parse(nsIInputStream& aStream, PRBool aEnableVerify=PR_FALSE, void* aKey=0) = 0; virtual nsresult Parse(nsString& aSourceBuffer,void* aKey,const nsString& aContentType,PRBool aEnableVerify,PRBool aLastCall) = 0; virtual PRBool IsValidFragment(nsString& aSourceBuffer,nsITagStack& aStack,PRUint32 anInsertPos,const nsString& aContentType)=0; diff --git a/htmlparser/src/nsParser.cpp b/htmlparser/src/nsParser.cpp index f0be71ab6912..1e09e310ea52 100644 --- a/htmlparser/src/nsParser.cpp +++ b/htmlparser/src/nsParser.cpp @@ -607,7 +607,7 @@ nsParser::IsParserEnabled() * @param aFilename -- const char* containing file to be parsed. * @return error code -- 0 if ok, non-zero if error. */ -nsresult nsParser::Parse(nsIURL* aURL,nsIStreamObserver* aListener,PRBool aVerifyEnabled) { +nsresult nsParser::Parse(nsIURL* aURL,nsIStreamObserver* aListener,PRBool aVerifyEnabled, void* aKey) { NS_PRECONDITION(0!=aURL,kNullURL); nsresult result=kBadURL; @@ -661,7 +661,7 @@ nsresult nsParser::Parse(nsIURL* aURL,nsIStreamObserver* aListener,PRBool aVerif * @param aStream is the i/o source * @return error code -- 0 if ok, non-zero if error. */ -nsresult nsParser::Parse(nsIInputStream& aStream,PRBool aVerifyEnabled){ +nsresult nsParser::Parse(nsIInputStream& aStream,PRBool aVerifyEnabled, void* aKey){ mDTDVerification=aVerifyEnabled; nsresult result=NS_ERROR_OUT_OF_MEMORY; diff --git a/htmlparser/src/nsParser.h b/htmlparser/src/nsParser.h index 1138c2dff203..5f0872e04891 100644 --- a/htmlparser/src/nsParser.h +++ b/htmlparser/src/nsParser.h @@ -165,7 +165,7 @@ friend class CTokenHandler; * @param aListener is a listener to forward notifications to * @return TRUE if all went well -- FALSE otherwise */ - virtual nsresult Parse(nsIURL* aURL,nsIStreamObserver* aListener,PRBool aEnableVerify=PR_FALSE); + virtual nsresult Parse(nsIURL* aURL,nsIStreamObserver* aListener,PRBool aEnableVerify=PR_FALSE, void* aKey=0); /** * Cause parser to parse input from given stream @@ -173,7 +173,7 @@ friend class CTokenHandler; * @param aStream is the i/o source * @return TRUE if all went well -- FALSE otherwise */ - virtual nsresult Parse(nsIInputStream& aStream,PRBool aEnableVerify=PR_FALSE); + virtual nsresult Parse(nsIInputStream& aStream,PRBool aEnableVerify=PR_FALSE, void* aKey=0); /** * @update gess5/11/98 diff --git a/parser/htmlparser/src/nsIParser.h b/parser/htmlparser/src/nsIParser.h index 58f03895ecd7..7b2137fd5c72 100644 --- a/parser/htmlparser/src/nsIParser.h +++ b/parser/htmlparser/src/nsIParser.h @@ -163,8 +163,8 @@ class nsIParser : public nsISupports { ******************************************************************************************/ virtual PRBool EnableParser(PRBool aState) = 0; virtual PRBool IsParserEnabled() = 0; - virtual nsresult Parse(nsIURL* aURL,nsIStreamObserver* aListener = nsnull,PRBool aEnableVerify=PR_FALSE) = 0; - virtual nsresult Parse(nsIInputStream& aStream, PRBool aEnableVerify=PR_FALSE) = 0; + virtual nsresult Parse(nsIURL* aURL,nsIStreamObserver* aListener = nsnull,PRBool aEnableVerify=PR_FALSE, void* aKey=0) = 0; + virtual nsresult Parse(nsIInputStream& aStream, PRBool aEnableVerify=PR_FALSE, void* aKey=0) = 0; virtual nsresult Parse(nsString& aSourceBuffer,void* aKey,const nsString& aContentType,PRBool aEnableVerify,PRBool aLastCall) = 0; virtual PRBool IsValidFragment(nsString& aSourceBuffer,nsITagStack& aStack,PRUint32 anInsertPos,const nsString& aContentType)=0; diff --git a/parser/htmlparser/src/nsParser.cpp b/parser/htmlparser/src/nsParser.cpp index f0be71ab6912..1e09e310ea52 100644 --- a/parser/htmlparser/src/nsParser.cpp +++ b/parser/htmlparser/src/nsParser.cpp @@ -607,7 +607,7 @@ nsParser::IsParserEnabled() * @param aFilename -- const char* containing file to be parsed. * @return error code -- 0 if ok, non-zero if error. */ -nsresult nsParser::Parse(nsIURL* aURL,nsIStreamObserver* aListener,PRBool aVerifyEnabled) { +nsresult nsParser::Parse(nsIURL* aURL,nsIStreamObserver* aListener,PRBool aVerifyEnabled, void* aKey) { NS_PRECONDITION(0!=aURL,kNullURL); nsresult result=kBadURL; @@ -661,7 +661,7 @@ nsresult nsParser::Parse(nsIURL* aURL,nsIStreamObserver* aListener,PRBool aVerif * @param aStream is the i/o source * @return error code -- 0 if ok, non-zero if error. */ -nsresult nsParser::Parse(nsIInputStream& aStream,PRBool aVerifyEnabled){ +nsresult nsParser::Parse(nsIInputStream& aStream,PRBool aVerifyEnabled, void* aKey){ mDTDVerification=aVerifyEnabled; nsresult result=NS_ERROR_OUT_OF_MEMORY; diff --git a/parser/htmlparser/src/nsParser.h b/parser/htmlparser/src/nsParser.h index 1138c2dff203..5f0872e04891 100644 --- a/parser/htmlparser/src/nsParser.h +++ b/parser/htmlparser/src/nsParser.h @@ -165,7 +165,7 @@ friend class CTokenHandler; * @param aListener is a listener to forward notifications to * @return TRUE if all went well -- FALSE otherwise */ - virtual nsresult Parse(nsIURL* aURL,nsIStreamObserver* aListener,PRBool aEnableVerify=PR_FALSE); + virtual nsresult Parse(nsIURL* aURL,nsIStreamObserver* aListener,PRBool aEnableVerify=PR_FALSE, void* aKey=0); /** * Cause parser to parse input from given stream @@ -173,7 +173,7 @@ friend class CTokenHandler; * @param aStream is the i/o source * @return TRUE if all went well -- FALSE otherwise */ - virtual nsresult Parse(nsIInputStream& aStream,PRBool aEnableVerify=PR_FALSE); + virtual nsresult Parse(nsIInputStream& aStream,PRBool aEnableVerify=PR_FALSE, void* aKey=0); /** * @update gess5/11/98