Bug 46777. Redesigned stream interfaces to allows stream observers to be decoupled from pipe implementation. Needed for embedding to fix 'spin' problem. r=rpotts,valeski,ruslan
git-svn-id: svn://10.0.0.236/trunk@76875 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
#include "nsByteArrayInputStream.h"
|
||||
#include "nsMemory.h"
|
||||
|
||||
NS_IMPL_THREADSAFE_ISUPPORTS3(nsByteArrayInputStream, nsIInputStream, nsIBaseStream, nsIByteArrayInputStream)
|
||||
NS_IMPL_THREADSAFE_ISUPPORTS2(nsByteArrayInputStream, nsIInputStream, nsIByteArrayInputStream)
|
||||
|
||||
nsByteArrayInputStream::nsByteArrayInputStream (char *buffer, PRUint32 bytes)
|
||||
: _buffer (buffer), _nbytes (bytes), _pos (0)
|
||||
@@ -81,6 +81,34 @@ nsByteArrayInputStream::Read (char* aBuffer, PRUint32 aCount, PRUint32 *aNumRead
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsByteArrayInputStream::ReadSegments(nsWriteSegmentFun writer, void * closure, PRUint32 count, PRUint32 *_retval)
|
||||
{
|
||||
NS_NOTREACHED("ReadSegments");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsByteArrayInputStream::GetNonBlocking(PRBool *aNonBlocking)
|
||||
{
|
||||
NS_NOTREACHED("GetNonBlocking");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsByteArrayInputStream::GetObserver(nsIInputStreamObserver * *aObserver)
|
||||
{
|
||||
NS_NOTREACHED("GetObserver");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsByteArrayInputStream::SetObserver(nsIInputStreamObserver * aObserver)
|
||||
{
|
||||
NS_NOTREACHED("SetObserver");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsByteArrayInputStream::Close ()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user