Enabling ByteArrayInputStream. Needed to fix 32600, r=warren

This commit is contained in:
ruslan%netscape.com 2000-03-22 02:50:56 +00:00
Родитель 9016cdb15c
Коммит 6ebbc29aa6
6 изменённых файлов: 16 добавлений и 9 удалений

Просмотреть файл

@ -11,3 +11,4 @@ nsStorageStream.h
nsLocalFile.h
nsLocalFileMac.h
nsILocalFileMac.h
nsIByteArrayInputStream.h

Просмотреть файл

@ -6,3 +6,4 @@ nsIOutputStream.idl
nsIPipe.idl
nsIFile.idl
nsILocalFile.idl
nsIByteArrayInputStream.idl

Просмотреть файл

@ -50,6 +50,7 @@ CPPSRCS = \
nsBinaryStream.cpp \
nsStorageStream.cpp \
nsScriptableInputStream.cpp \
nsByteArrayInputStream.cpp \
$(NULL)
EXPORTS = \
@ -67,6 +68,7 @@ EXPORTS = \
nsSpecialSystemDirectory.h \
nsScriptableInputStream.h \
nsStorageStream.h \
nsIByteArrayInputStream.h \
$(NULL)
XPIDLSRCS = \
@ -84,6 +86,7 @@ XPIDLSRCS = \
nsIScriptableInputStream.idl \
nsIStorageStream.idl \
nsIDirectoryService.idl \
nsIByteArrayInputStream.idl \
$(NULL)
EXPORTS := $(addprefix $(srcdir)/, $(EXPORTS))

Просмотреть файл

@ -19,8 +19,6 @@
#
# Contributor(s):
DEPTH=..\..
MODULE = xpcom
@ -40,6 +38,7 @@ EXPORTS = \
nsStorageStream.h \
nsScriptableInputStream.h \
nsDirectoryService.h \
nsIByteArrayInputStream.h \
$(NULL)
NO_XPT_GEN=1
@ -60,6 +59,7 @@ XPIDLSRCS = \
.\nsIFile.idl \
.\nsILocalFile.idl \
.\nsIDirectoryService.idl \
.\nsIByteArrayInputStream.idl \
$(NULL)
################################################################################
@ -95,6 +95,7 @@ CPP_OBJS = \
.\$(OBJDIR)\nsFileSpecImpl.obj \
.\$(OBJDIR)\nsFileSpecStreaming.obj \
.\$(OBJDIR)\nsSpecialSystemDirectory.obj \
.\$(OBJDIR)\nsByteArrayInputStream.obj \
$(NULL)
include <$(DEPTH)\config\rules.mak>

Просмотреть файл

@ -22,9 +22,12 @@
#include "nsByteArrayInputStream.h"
#include "nsIAllocator.h"
NS_IMPL_THREADSAFE_ISUPPORTS2(nsByteArrayInputStream, nsIInputStream, nsIBaseStream)
nsByteArrayInputStream::nsByteArrayInputStream (char *buffer, PRUint32 bytes)
: _buffer (buffer), _nbytes (bytes), _pos (0)
{
NS_INIT_REFCNT ();
}
nsByteArrayInputStream::~nsByteArrayInputStream ()
@ -33,8 +36,6 @@ nsByteArrayInputStream::~nsByteArrayInputStream ()
nsAllocator::Free (_buffer);
}
NS_IMPL_THREADSAFE_ISUPPORTS (nsByteArrayInputStream, NS_GET_IID (nsIByteArrayInputStream))
NS_IMETHODIMP
nsByteArrayInputStream::Available (PRUint32* aResult)
{

Просмотреть файл

@ -24,11 +24,6 @@
class nsByteArrayInputStream : public nsIByteArrayInputStream
{
public:
nsByteArrayInputStream (char *buffer, PRUint32 nbytes);
virtual ~nsByteArrayInputStream();
private:
// nsISupports methods
NS_DECL_ISUPPORTS
@ -37,7 +32,12 @@ private:
// nsIInputStream methods
NS_DECL_NSIINPUTSTREAM
public:
nsByteArrayInputStream (char *buffer, PRUint32 nbytes);
virtual ~nsByteArrayInputStream ();
private:
char *_buffer;
PRUint32 _nbytes;
PRUint32 _pos;