/* * DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/xpcom/io/nsIInputStreamTee.idl */ #ifndef __gen_nsIInputStreamTee_h__ #define __gen_nsIInputStreamTee_h__ #include "nsIInputStream.h" /* For IDL files that don't want to include root IDL files. */ #ifndef NS_NO_VTABLE #define NS_NO_VTABLE #endif class nsIOutputStream; /* forward declaration */ class nsIEventTarget; /* forward declaration */ /* starting interface: nsIInputStreamTee */ #define NS_IINPUTSTREAMTEE_IID_STR "90a9d790-3bca-421e-a73b-98f68e13c917" #define NS_IINPUTSTREAMTEE_IID \ {0x90a9d790, 0x3bca, 0x421e, \ { 0xa7, 0x3b, 0x98, 0xf6, 0x8e, 0x13, 0xc9, 0x17 }} class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIInputStreamTee) nsIInputStreamTee : public nsIInputStream { public: NS_INLINE_DECL_STATIC_IID(NS_IINPUTSTREAMTEE_IID) /* Used by ToJSValue to check which scriptable interface is implemented. */ using ScriptableInterfaceType = nsIInputStreamTee; /* attribute nsIInputStream source; */ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIInputStreamTee_source) NS_IMETHOD GetSource(nsIInputStream **aSource) = 0; MOZ_BINDING(binding_to, idl, setter, XPIDL_nsIInputStreamTee_source) NS_IMETHOD SetSource(nsIInputStream *aSource) = 0; /* attribute nsIOutputStream sink; */ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIInputStreamTee_sink) NS_IMETHOD GetSink(nsIOutputStream **aSink) = 0; MOZ_BINDING(binding_to, idl, setter, XPIDL_nsIInputStreamTee_sink) NS_IMETHOD SetSink(nsIOutputStream *aSink) = 0; /* attribute nsIEventTarget eventTarget; */ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIInputStreamTee_eventTarget) NS_IMETHOD GetEventTarget(nsIEventTarget **aEventTarget) = 0; MOZ_BINDING(binding_to, idl, setter, XPIDL_nsIInputStreamTee_eventTarget) NS_IMETHOD SetEventTarget(nsIEventTarget *aEventTarget) = 0; }; /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_NSIINPUTSTREAMTEE \ NS_IMETHOD GetSource(nsIInputStream **aSource) override; \ NS_IMETHOD SetSource(nsIInputStream *aSource) override; \ NS_IMETHOD GetSink(nsIOutputStream **aSink) override; \ NS_IMETHOD SetSink(nsIOutputStream *aSink) override; \ NS_IMETHOD GetEventTarget(nsIEventTarget **aEventTarget) override; \ NS_IMETHOD SetEventTarget(nsIEventTarget *aEventTarget) 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_NSIINPUTSTREAMTEE \ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIInputStreamTee_source)\ nsresult GetSource(nsIInputStream **aSource); \ MOZ_BINDING(binding_to, idl, setter, XPIDL_nsIInputStreamTee_source)\ nsresult SetSource(nsIInputStream *aSource); \ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIInputStreamTee_sink)\ nsresult GetSink(nsIOutputStream **aSink); \ MOZ_BINDING(binding_to, idl, setter, XPIDL_nsIInputStreamTee_sink)\ nsresult SetSink(nsIOutputStream *aSink); \ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIInputStreamTee_eventTarget)\ nsresult GetEventTarget(nsIEventTarget **aEventTarget); \ MOZ_BINDING(binding_to, idl, setter, XPIDL_nsIInputStreamTee_eventTarget)\ nsresult SetEventTarget(nsIEventTarget *aEventTarget); /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_NSIINPUTSTREAMTEE(_to) \ NS_IMETHOD GetSource(nsIInputStream **aSource) override { return _to GetSource(aSource); } \ NS_IMETHOD SetSource(nsIInputStream *aSource) override { return _to SetSource(aSource); } \ NS_IMETHOD GetSink(nsIOutputStream **aSink) override { return _to GetSink(aSink); } \ NS_IMETHOD SetSink(nsIOutputStream *aSink) override { return _to SetSink(aSink); } \ NS_IMETHOD GetEventTarget(nsIEventTarget **aEventTarget) override { return _to GetEventTarget(aEventTarget); } \ NS_IMETHOD SetEventTarget(nsIEventTarget *aEventTarget) override { return _to SetEventTarget(aEventTarget); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_NSIINPUTSTREAMTEE(_to) \ NS_IMETHOD GetSource(nsIInputStream **aSource) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSource(aSource); } \ NS_IMETHOD SetSource(nsIInputStream *aSource) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSource(aSource); } \ NS_IMETHOD GetSink(nsIOutputStream **aSink) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSink(aSink); } \ NS_IMETHOD SetSink(nsIOutputStream *aSink) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSink(aSink); } \ NS_IMETHOD GetEventTarget(nsIEventTarget **aEventTarget) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEventTarget(aEventTarget); } \ NS_IMETHOD SetEventTarget(nsIEventTarget *aEventTarget) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetEventTarget(aEventTarget); } // %{C++:30-40 // factory methods extern nsresult NS_NewInputStreamTee(nsIInputStream **tee, // read from this input stream nsIInputStream *source, nsIOutputStream *sink); extern nsresult NS_NewInputStreamTeeAsync(nsIInputStream **tee, // read from this input stream nsIInputStream *source, nsIOutputStream *sink, nsIEventTarget *eventTarget); // %} #endif /* __gen_nsIInputStreamTee_h__ */