1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/xpcom/io/nsScriptableInputStream.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,41 @@ 1.4 +/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#ifndef ___nsscriptableinputstream___h_ 1.10 +#define ___nsscriptableinputstream___h_ 1.11 + 1.12 +#include "nsIScriptableInputStream.h" 1.13 +#include "nsIInputStream.h" 1.14 +#include "nsCOMPtr.h" 1.15 +#include "mozilla/Attributes.h" 1.16 + 1.17 +#define NS_SCRIPTABLEINPUTSTREAM_CID \ 1.18 +{ 0x7225c040, 0xa9bf, 0x11d3, { 0xa1, 0x97, 0x0, 0x50, 0x4, 0x1c, 0xaf, 0x44 } } 1.19 + 1.20 +#define NS_SCRIPTABLEINPUTSTREAM_CONTRACTID "@mozilla.org/scriptableinputstream;1" 1.21 + 1.22 +class nsScriptableInputStream MOZ_FINAL : public nsIScriptableInputStream { 1.23 +public: 1.24 + // nsISupports methods 1.25 + NS_DECL_ISUPPORTS 1.26 + 1.27 + // nsIScriptableInputStream methods 1.28 + NS_DECL_NSISCRIPTABLEINPUTSTREAM 1.29 + 1.30 + // nsScriptableInputStream methods 1.31 + nsScriptableInputStream() {} 1.32 + 1.33 + static nsresult 1.34 + Create(nsISupports *aOuter, REFNSIID aIID, void **aResult); 1.35 + 1.36 +private: 1.37 + ~nsScriptableInputStream() {} 1.38 + 1.39 + nsresult ReadHelper(char* aBuffer, uint32_t aCount); 1.40 + 1.41 + nsCOMPtr<nsIInputStream> mInputStream; 1.42 +}; 1.43 + 1.44 +#endif // ___nsscriptableinputstream___h_