Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsIInputStreamTee.idl
3 : */
4 :
5 : #ifndef __gen_nsIInputStreamTee_h__
6 : #define __gen_nsIInputStreamTee_h__
7 :
8 :
9 : #ifndef __gen_nsIInputStream_h__
10 : #include "nsIInputStream.h"
11 : #endif
12 :
13 : /* For IDL files that don't want to include root IDL files. */
14 : #ifndef NS_NO_VTABLE
15 : #define NS_NO_VTABLE
16 : #endif
17 : class nsIOutputStream; /* forward declaration */
18 :
19 : class nsIEventTarget; /* forward declaration */
20 :
21 :
22 : /* starting interface: nsIInputStreamTee */
23 : #define NS_IINPUTSTREAMTEE_IID_STR "90a9d790-3bca-421e-a73b-98f68e13c917"
24 :
25 : #define NS_IINPUTSTREAMTEE_IID \
26 : {0x90a9d790, 0x3bca, 0x421e, \
27 : { 0xa7, 0x3b, 0x98, 0xf6, 0x8e, 0x13, 0xc9, 0x17 }}
28 :
29 2 : class NS_NO_VTABLE nsIInputStreamTee : public nsIInputStream {
30 : public:
31 :
32 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IINPUTSTREAMTEE_IID)
33 :
34 : /* attribute nsIInputStream source; */
35 : NS_IMETHOD GetSource(nsIInputStream * *aSource) = 0;
36 : NS_IMETHOD SetSource(nsIInputStream *aSource) = 0;
37 :
38 : /* attribute nsIOutputStream sink; */
39 : NS_IMETHOD GetSink(nsIOutputStream * *aSink) = 0;
40 : NS_IMETHOD SetSink(nsIOutputStream *aSink) = 0;
41 :
42 : /* attribute nsIEventTarget eventTarget; */
43 : NS_IMETHOD GetEventTarget(nsIEventTarget * *aEventTarget) = 0;
44 : NS_IMETHOD SetEventTarget(nsIEventTarget *aEventTarget) = 0;
45 :
46 : };
47 :
48 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIInputStreamTee, NS_IINPUTSTREAMTEE_IID)
49 :
50 : /* Use this macro when declaring classes that implement this interface. */
51 : #define NS_DECL_NSIINPUTSTREAMTEE \
52 : NS_IMETHOD GetSource(nsIInputStream * *aSource) override; \
53 : NS_IMETHOD SetSource(nsIInputStream *aSource) override; \
54 : NS_IMETHOD GetSink(nsIOutputStream * *aSink) override; \
55 : NS_IMETHOD SetSink(nsIOutputStream *aSink) override; \
56 : NS_IMETHOD GetEventTarget(nsIEventTarget * *aEventTarget) override; \
57 : NS_IMETHOD SetEventTarget(nsIEventTarget *aEventTarget) override;
58 :
59 : /* Use this macro when declaring the members of this interface when the
60 : class doesn't implement the interface. This is useful for forwarding. */
61 : #define NS_DECL_NON_VIRTUAL_NSIINPUTSTREAMTEE \
62 : nsresult GetSource(nsIInputStream * *aSource); \
63 : nsresult SetSource(nsIInputStream *aSource); \
64 : nsresult GetSink(nsIOutputStream * *aSink); \
65 : nsresult SetSink(nsIOutputStream *aSink); \
66 : nsresult GetEventTarget(nsIEventTarget * *aEventTarget); \
67 : nsresult SetEventTarget(nsIEventTarget *aEventTarget);
68 :
69 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
70 : #define NS_FORWARD_NSIINPUTSTREAMTEE(_to) \
71 : NS_IMETHOD GetSource(nsIInputStream * *aSource) override { return _to GetSource(aSource); } \
72 : NS_IMETHOD SetSource(nsIInputStream *aSource) override { return _to SetSource(aSource); } \
73 : NS_IMETHOD GetSink(nsIOutputStream * *aSink) override { return _to GetSink(aSink); } \
74 : NS_IMETHOD SetSink(nsIOutputStream *aSink) override { return _to SetSink(aSink); } \
75 : NS_IMETHOD GetEventTarget(nsIEventTarget * *aEventTarget) override { return _to GetEventTarget(aEventTarget); } \
76 : NS_IMETHOD SetEventTarget(nsIEventTarget *aEventTarget) override { return _to SetEventTarget(aEventTarget); }
77 :
78 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
79 : #define NS_FORWARD_SAFE_NSIINPUTSTREAMTEE(_to) \
80 : NS_IMETHOD GetSource(nsIInputStream * *aSource) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSource(aSource); } \
81 : NS_IMETHOD SetSource(nsIInputStream *aSource) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSource(aSource); } \
82 : NS_IMETHOD GetSink(nsIOutputStream * *aSink) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSink(aSink); } \
83 : NS_IMETHOD SetSink(nsIOutputStream *aSink) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSink(aSink); } \
84 : NS_IMETHOD GetEventTarget(nsIEventTarget * *aEventTarget) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEventTarget(aEventTarget); } \
85 : NS_IMETHOD SetEventTarget(nsIEventTarget *aEventTarget) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetEventTarget(aEventTarget); }
86 :
87 : #if 0
88 : /* Use the code below as a template for the implementation class for this interface. */
89 :
90 : /* Header file */
91 : class nsInputStreamTee : public nsIInputStreamTee
92 : {
93 : public:
94 : NS_DECL_ISUPPORTS
95 : NS_DECL_NSIINPUTSTREAMTEE
96 :
97 : nsInputStreamTee();
98 :
99 : private:
100 : ~nsInputStreamTee();
101 :
102 : protected:
103 : /* additional members */
104 : };
105 :
106 : /* Implementation file */
107 : NS_IMPL_ISUPPORTS(nsInputStreamTee, nsIInputStreamTee)
108 :
109 : nsInputStreamTee::nsInputStreamTee()
110 : {
111 : /* member initializers and constructor code */
112 : }
113 :
114 : nsInputStreamTee::~nsInputStreamTee()
115 : {
116 : /* destructor code */
117 : }
118 :
119 : /* attribute nsIInputStream source; */
120 : NS_IMETHODIMP nsInputStreamTee::GetSource(nsIInputStream * *aSource)
121 : {
122 : return NS_ERROR_NOT_IMPLEMENTED;
123 : }
124 : NS_IMETHODIMP nsInputStreamTee::SetSource(nsIInputStream *aSource)
125 : {
126 : return NS_ERROR_NOT_IMPLEMENTED;
127 : }
128 :
129 : /* attribute nsIOutputStream sink; */
130 : NS_IMETHODIMP nsInputStreamTee::GetSink(nsIOutputStream * *aSink)
131 : {
132 : return NS_ERROR_NOT_IMPLEMENTED;
133 : }
134 : NS_IMETHODIMP nsInputStreamTee::SetSink(nsIOutputStream *aSink)
135 : {
136 : return NS_ERROR_NOT_IMPLEMENTED;
137 : }
138 :
139 : /* attribute nsIEventTarget eventTarget; */
140 : NS_IMETHODIMP nsInputStreamTee::GetEventTarget(nsIEventTarget * *aEventTarget)
141 : {
142 : return NS_ERROR_NOT_IMPLEMENTED;
143 : }
144 : NS_IMETHODIMP nsInputStreamTee::SetEventTarget(nsIEventTarget *aEventTarget)
145 : {
146 : return NS_ERROR_NOT_IMPLEMENTED;
147 : }
148 :
149 : /* End of implementation class template. */
150 : #endif
151 :
152 : // factory methods
153 : extern nsresult
154 : NS_NewInputStreamTee(nsIInputStream **tee, // read from this input stream
155 : nsIInputStream *source,
156 : nsIOutputStream *sink);
157 :
158 : extern nsresult
159 : NS_NewInputStreamTeeAsync(nsIInputStream **tee, // read from this input stream
160 : nsIInputStream *source,
161 : nsIOutputStream *sink,
162 : nsIEventTarget *eventTarget);
163 :
164 : #endif /* __gen_nsIInputStreamTee_h__ */
|