Copy as Markdown

Other Tools

/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/xpcom/io/nsIRandomAccessStream.idl
*/
#ifndef __gen_nsIRandomAccessStream_h__
#define __gen_nsIRandomAccessStream_h__
#include "nsISupports.h"
#include "nsISeekableStream.h"
/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class nsIInputStream; /* forward declaration */
class nsIInterfaceRequestor; /* forward declaration */
class nsIOutputStream; /* forward declaration */
namespace mozilla::ipc {
class RandomAccessStreamParams;
} // namespace mozilla::ipc
/* starting interface: nsIRandomAccessStream */
#define NS_IRANDOMACCESSSTREAM_IID_STR "9b5904a8-886a-420f-a1d8-847de8ffc133"
#define NS_IRANDOMACCESSSTREAM_IID \
{0x9b5904a8, 0x886a, 0x420f, \
{ 0xa1, 0xd8, 0x84, 0x7d, 0xe8, 0xff, 0xc1, 0x33 }}
class NS_NO_VTABLE nsIRandomAccessStream : public nsISeekableStream {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IRANDOMACCESSSTREAM_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIRandomAccessStream;
/* nsIInputStream getInputStream (); */
NS_IMETHOD GetInputStream(nsIInputStream **_retval) = 0;
/* nsIOutputStream getOutputStream (); */
NS_IMETHOD GetOutputStream(nsIOutputStream **_retval) = 0;
/* [nostdcall,notxpcom] nsIInputStream inputStream (); */
virtual nsIInputStream * InputStream(void) = 0;
/* [nostdcall,notxpcom] nsIOutputStream outputStream (); */
virtual nsIOutputStream * OutputStream(void) = 0;
/* [nostdcall,notxpcom] RandomAccessStreamParams serialize (in nsIInterfaceRequestor aCallbacks); */
virtual mozilla::ipc::RandomAccessStreamParams Serialize(nsIInterfaceRequestor *aCallbacks) = 0;
/* [nostdcall,notxpcom] boolean deserialize (inout RandomAccessStreamParamsRef params); */
virtual bool Deserialize(mozilla::ipc::RandomAccessStreamParams & params) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIRandomAccessStream, NS_IRANDOMACCESSSTREAM_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIRANDOMACCESSSTREAM \
NS_IMETHOD GetInputStream(nsIInputStream **_retval) override; \
NS_IMETHOD GetOutputStream(nsIOutputStream **_retval) override; \
virtual nsIInputStream * InputStream(void) override; \
virtual nsIOutputStream * OutputStream(void) override; \
virtual mozilla::ipc::RandomAccessStreamParams Serialize(nsIInterfaceRequestor *aCallbacks) override; \
virtual bool Deserialize(mozilla::ipc::RandomAccessStreamParams & params) override;
/* Use this macro when declaring the members of this interface when the
class doesn't implement the interface. This is useful for forwarding. */
#define NS_DECL_NON_VIRTUAL_NSIRANDOMACCESSSTREAM \
nsresult GetInputStream(nsIInputStream **_retval); \
nsresult GetOutputStream(nsIOutputStream **_retval); \
nsIInputStream * InputStream(void); \
nsIOutputStream * OutputStream(void); \
mozilla::ipc::RandomAccessStreamParams Serialize(nsIInterfaceRequestor *aCallbacks); \
bool Deserialize(mozilla::ipc::RandomAccessStreamParams & params);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIRANDOMACCESSSTREAM(_to) \
NS_IMETHOD GetInputStream(nsIInputStream **_retval) override { return _to GetInputStream(_retval); } \
NS_IMETHOD GetOutputStream(nsIOutputStream **_retval) override { return _to GetOutputStream(_retval); } \
virtual nsIInputStream * InputStream(void) override { return _to InputStream(); } \
virtual nsIOutputStream * OutputStream(void) override { return _to OutputStream(); } \
virtual mozilla::ipc::RandomAccessStreamParams Serialize(nsIInterfaceRequestor *aCallbacks) override { return _to Serialize(aCallbacks); } \
virtual bool Deserialize(mozilla::ipc::RandomAccessStreamParams & params) override { return _to Deserialize(params); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIRANDOMACCESSSTREAM(_to) \
NS_IMETHOD GetInputStream(nsIInputStream **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetInputStream(_retval); } \
NS_IMETHOD GetOutputStream(nsIOutputStream **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOutputStream(_retval); } \
virtual nsIInputStream * InputStream(void) override; \
virtual nsIOutputStream * OutputStream(void) override; \
virtual mozilla::ipc::RandomAccessStreamParams Serialize(nsIInterfaceRequestor *aCallbacks) override; \
virtual bool Deserialize(mozilla::ipc::RandomAccessStreamParams & params) override;
#endif /* __gen_nsIRandomAccessStream_h__ */