michael@0: /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef ___nsscriptableinputstream___h_ michael@0: #define ___nsscriptableinputstream___h_ michael@0: michael@0: #include "nsIScriptableInputStream.h" michael@0: #include "nsIInputStream.h" michael@0: #include "nsCOMPtr.h" michael@0: #include "mozilla/Attributes.h" michael@0: michael@0: #define NS_SCRIPTABLEINPUTSTREAM_CID \ michael@0: { 0x7225c040, 0xa9bf, 0x11d3, { 0xa1, 0x97, 0x0, 0x50, 0x4, 0x1c, 0xaf, 0x44 } } michael@0: michael@0: #define NS_SCRIPTABLEINPUTSTREAM_CONTRACTID "@mozilla.org/scriptableinputstream;1" michael@0: michael@0: class nsScriptableInputStream MOZ_FINAL : public nsIScriptableInputStream { michael@0: public: michael@0: // nsISupports methods michael@0: NS_DECL_ISUPPORTS michael@0: michael@0: // nsIScriptableInputStream methods michael@0: NS_DECL_NSISCRIPTABLEINPUTSTREAM michael@0: michael@0: // nsScriptableInputStream methods michael@0: nsScriptableInputStream() {} michael@0: michael@0: static nsresult michael@0: Create(nsISupports *aOuter, REFNSIID aIID, void **aResult); michael@0: michael@0: private: michael@0: ~nsScriptableInputStream() {} michael@0: michael@0: nsresult ReadHelper(char* aBuffer, uint32_t aCount); michael@0: michael@0: nsCOMPtr mInputStream; michael@0: }; michael@0: michael@0: #endif // ___nsscriptableinputstream___h_