From 7f7d5cb21bc292cf620f6b5ac38a84e5d9610ffa Mon Sep 17 00:00:00 2001 From: "timeless%mozdev.org" Date: Tue, 2 Mar 2004 01:11:06 +0000 Subject: [PATCH] Bug 235744 Expose StorageStream class to Javascript patch by nsayer@kfu.com r=darin sr=darin --- xpcom/build/nsXPComInit.cpp | 3 +++ xpcom/io/nsStorageStream.h | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/xpcom/build/nsXPComInit.cpp b/xpcom/build/nsXPComInit.cpp index bda82c648a9..f7082e06c56 100644 --- a/xpcom/build/nsXPComInit.cpp +++ b/xpcom/build/nsXPComInit.cpp @@ -47,6 +47,7 @@ #include "nsPersistentProperties.h" #include "nsScriptableInputStream.h" #include "nsBinaryStream.h" +#include "nsStorageStream.h" #include "nsMemoryImpl.h" #include "nsDebugImpl.h" @@ -178,6 +179,7 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsTimerImpl) NS_GENERIC_FACTORY_CONSTRUCTOR(nsTimerManager) NS_GENERIC_FACTORY_CONSTRUCTOR(nsBinaryOutputStream) NS_GENERIC_FACTORY_CONSTRUCTOR(nsBinaryInputStream) +NS_GENERIC_FACTORY_CONSTRUCTOR(nsStorageStream) NS_GENERIC_FACTORY_CONSTRUCTOR(nsVariant) @@ -290,6 +292,7 @@ static const nsModuleComponentInfo components[] = { COMPONENT(SCRIPTABLEINPUTSTREAM, nsScriptableInputStream::Create), COMPONENT(BINARYINPUTSTREAM, nsBinaryInputStreamConstructor), COMPONENT(BINARYOUTPUTSTREAM, nsBinaryOutputStreamConstructor), + COMPONENT(STORAGESTREAM, nsStorageStreamConstructor), #define NS_PROPERTIES_CLASSNAME "Properties" COMPONENT(PROPERTIES, nsProperties::Create), diff --git a/xpcom/io/nsStorageStream.h b/xpcom/io/nsStorageStream.h index 59f22fa2213..4a1f68f2d02 100644 --- a/xpcom/io/nsStorageStream.h +++ b/xpcom/io/nsStorageStream.h @@ -34,6 +34,17 @@ #include "nsIOutputStream.h" #include "nsMemory.h" +#define NS_STORAGESTREAM_CID \ +{ /* 669a9795-6ff7-4ed4-9150-c34ce2971b63 */ \ + 0x669a9795, \ + 0x6ff7, \ + 0x4ed4, \ + {0x91, 0x50, 0xc3, 0x4c, 0xe2, 0x97, 0x1b, 0x63} \ +} + +#define NS_STORAGESTREAM_CONTRACTID "@mozilla.org/storagestream;1" +#define NS_STORAGESTREAM_CLASSNAME "Storage Stream" + class nsSegmentedBuffer; class nsStorageStream : public nsIStorageStream,