From 09ee7c3d28146022a5cc36bc5a44c3c51a711e0e Mon Sep 17 00:00:00 2001 From: "warren%netscape.com" Date: Thu, 22 Apr 1999 21:06:04 +0000 Subject: [PATCH] Added sourceOffset parameter to OnDataAvailable. --- netwerk/protocol/ftp/src/nsFtpFactory.cpp | 2 -- netwerk/protocol/ftp/src/nsFtpStreamListenerEvent.cpp | 9 ++++++--- netwerk/protocol/ftp/src/nsFtpStreamListenerEvent.h | 5 +++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/netwerk/protocol/ftp/src/nsFtpFactory.cpp b/netwerk/protocol/ftp/src/nsFtpFactory.cpp index 6a1907392f1..5dfe6e92680 100644 --- a/netwerk/protocol/ftp/src/nsFtpFactory.cpp +++ b/netwerk/protocol/ftp/src/nsFtpFactory.cpp @@ -104,8 +104,6 @@ nsresult nsNetFactory::LockFactory(PRBool aLock) extern "C" PR_IMPLEMENT(nsresult) NSGetFactory(nsISupports* aServMgr, const nsCID &aClass, - const char *aClassName, - const char *aProgID, nsIFactory **aFactory) { if (aFactory == nsnull) diff --git a/netwerk/protocol/ftp/src/nsFtpStreamListenerEvent.cpp b/netwerk/protocol/ftp/src/nsFtpStreamListenerEvent.cpp index c700dc353b2..941a0b9e839 100644 --- a/netwerk/protocol/ftp/src/nsFtpStreamListenerEvent.cpp +++ b/netwerk/protocol/ftp/src/nsFtpStreamListenerEvent.cpp @@ -117,9 +117,11 @@ nsFtpOnDataAvailableEvent::~nsFtpOnDataAvailableEvent() } nsresult -nsFtpOnDataAvailableEvent::Init(nsIInputStream* aIStream, PRUint32 aLength) +nsFtpOnDataAvailableEvent::Init(nsIInputStream* aIStream, + PRUint32 aSourceOffset, PRUint32 aLength) { mLength = aLength; + mSourceOffset = aSourceOffset; mIStream = aIStream; NS_ADDREF(mIStream); return NS_OK; @@ -129,12 +131,13 @@ NS_IMETHODIMP nsFtpOnDataAvailableEvent::HandleEvent() { nsIStreamListener* receiver = (nsIStreamListener*)mListener; - return receiver->OnDataAvailable(mContext, mIStream, mLength); + return receiver->OnDataAvailable(mContext, mIStream, mSourceOffset, mLength); } /* NS_IMETHODIMP nsMarshalingStreamListener::OnDataAvailable(nsISupports* context, nsIInputStream *aIStream, + PRUint32 aSourceOffset, PRUint32 aLength) { nsresult rv = GetStatus(); @@ -145,7 +148,7 @@ nsMarshalingStreamListener::OnDataAvailable(nsISupports* context, if (event == nsnull) return NS_ERROR_OUT_OF_MEMORY; - rv = event->Init(aIStream, aLength); + rv = event->Init(aIStream, aSourceOffset, aLength); if (NS_FAILED(rv)) goto failed; rv = event->Fire(mEventQueue); if (NS_FAILED(rv)) goto failed; diff --git a/netwerk/protocol/ftp/src/nsFtpStreamListenerEvent.h b/netwerk/protocol/ftp/src/nsFtpStreamListenerEvent.h index fe644662c10..be2f2421a74 100644 --- a/netwerk/protocol/ftp/src/nsFtpStreamListenerEvent.h +++ b/netwerk/protocol/ftp/src/nsFtpStreamListenerEvent.h @@ -60,11 +60,12 @@ public: mIStream(nsnull), mLength(0) {} virtual ~nsFtpOnDataAvailableEvent(); - nsresult Init(nsIInputStream* aIStream, PRUint32 aLength); + nsresult Init(nsIInputStream* aIStream, PRUint32 aSourceOffset, PRUint32 aLength); NS_IMETHOD HandleEvent(); protected: nsIInputStream* mIStream; + PRUint32 mSourceOffset; PRUint32 mLength; }; @@ -85,4 +86,4 @@ protected: nsIString* mMessage; }; -#endif // ___nsftpstreamlistener_h__ \ No newline at end of file +#endif // ___nsftpstreamlistener_h__