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