2014-05-05 21:30:43 +04: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 15:12:37 +04: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/. */
|
1999-12-04 23:29:42 +03:00
|
|
|
|
|
|
|
#ifndef ___nsscriptableinputstream___h_
|
|
|
|
#define ___nsscriptableinputstream___h_
|
|
|
|
|
|
|
|
#include "nsIScriptableInputStream.h"
|
|
|
|
#include "nsIInputStream.h"
|
|
|
|
#include "nsCOMPtr.h"
|
2012-06-06 03:51:58 +04:00
|
|
|
#include "mozilla/Attributes.h"
|
1999-12-04 23:29:42 +03:00
|
|
|
|
|
|
|
#define NS_SCRIPTABLEINPUTSTREAM_CID \
|
|
|
|
{ 0x7225c040, 0xa9bf, 0x11d3, { 0xa1, 0x97, 0x0, 0x50, 0x4, 0x1c, 0xaf, 0x44 } }
|
|
|
|
|
2000-09-14 03:57:52 +04:00
|
|
|
#define NS_SCRIPTABLEINPUTSTREAM_CONTRACTID "@mozilla.org/scriptableinputstream;1"
|
1999-12-04 23:29:42 +03:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
class nsScriptableInputStream final : public nsIScriptableInputStream
|
2014-05-15 00:15:46 +04:00
|
|
|
{
|
1999-12-04 23:29:42 +03:00
|
|
|
public:
|
2014-05-05 21:30:43 +04:00
|
|
|
// nsISupports methods
|
|
|
|
NS_DECL_ISUPPORTS
|
1999-12-04 23:29:42 +03:00
|
|
|
|
2014-05-05 21:30:43 +04:00
|
|
|
// nsIScriptableInputStream methods
|
|
|
|
NS_DECL_NSISCRIPTABLEINPUTSTREAM
|
1999-12-04 23:29:42 +03:00
|
|
|
|
2014-05-05 21:30:43 +04:00
|
|
|
// nsScriptableInputStream methods
|
2014-05-15 00:15:46 +04:00
|
|
|
nsScriptableInputStream()
|
|
|
|
{
|
|
|
|
}
|
1999-12-04 23:29:42 +03:00
|
|
|
|
2014-05-05 21:30:43 +04:00
|
|
|
static nsresult
|
2014-05-15 00:15:46 +04:00
|
|
|
Create(nsISupports* aOuter, REFNSIID aIID, void** aResult);
|
2004-01-15 09:14:18 +03:00
|
|
|
|
1999-12-04 23:29:42 +03:00
|
|
|
private:
|
2014-05-15 00:15:46 +04:00
|
|
|
~nsScriptableInputStream()
|
|
|
|
{
|
|
|
|
}
|
2004-01-15 09:14:18 +03:00
|
|
|
|
2014-05-05 21:30:43 +04:00
|
|
|
nsresult ReadHelper(char* aBuffer, uint32_t aCount);
|
2014-03-27 19:20:08 +04:00
|
|
|
|
2014-05-05 21:30:43 +04:00
|
|
|
nsCOMPtr<nsIInputStream> mInputStream;
|
1999-12-04 23:29:42 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // ___nsscriptableinputstream___h_
|