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