Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsIAsyncInputStream.idl
3 : */
4 :
5 : #ifndef __gen_nsIAsyncInputStream_h__
6 : #define __gen_nsIAsyncInputStream_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 nsIInputStreamCallback; /* forward declaration */
18 :
19 : class nsIEventTarget; /* forward declaration */
20 :
21 :
22 : /* starting interface: nsIAsyncInputStream */
23 : #define NS_IASYNCINPUTSTREAM_IID_STR "a5f255ab-4801-4161-8816-277ac92f6ad1"
24 :
25 : #define NS_IASYNCINPUTSTREAM_IID \
26 : {0xa5f255ab, 0x4801, 0x4161, \
27 : { 0x88, 0x16, 0x27, 0x7a, 0xc9, 0x2f, 0x6a, 0xd1 }}
28 :
29 185 : class NS_NO_VTABLE nsIAsyncInputStream : public nsIInputStream {
30 : public:
31 :
32 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IASYNCINPUTSTREAM_IID)
33 :
34 : /* void closeWithStatus (in nsresult aStatus); */
35 : NS_IMETHOD CloseWithStatus(nsresult aStatus) = 0;
36 :
37 : /* void asyncWait (in nsIInputStreamCallback aCallback, in unsigned long aFlags, in unsigned long aRequestedCount, in nsIEventTarget aEventTarget); */
38 : NS_IMETHOD AsyncWait(nsIInputStreamCallback *aCallback, uint32_t aFlags, uint32_t aRequestedCount, nsIEventTarget *aEventTarget) = 0;
39 :
40 : enum {
41 : WAIT_CLOSURE_ONLY = 1U
42 : };
43 :
44 : };
45 :
46 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIAsyncInputStream, NS_IASYNCINPUTSTREAM_IID)
47 :
48 : /* Use this macro when declaring classes that implement this interface. */
49 : #define NS_DECL_NSIASYNCINPUTSTREAM \
50 : NS_IMETHOD CloseWithStatus(nsresult aStatus) override; \
51 : NS_IMETHOD AsyncWait(nsIInputStreamCallback *aCallback, uint32_t aFlags, uint32_t aRequestedCount, nsIEventTarget *aEventTarget) override; \
52 :
53 : /* Use this macro when declaring the members of this interface when the
54 : class doesn't implement the interface. This is useful for forwarding. */
55 : #define NS_DECL_NON_VIRTUAL_NSIASYNCINPUTSTREAM \
56 : nsresult CloseWithStatus(nsresult aStatus); \
57 : nsresult AsyncWait(nsIInputStreamCallback *aCallback, uint32_t aFlags, uint32_t aRequestedCount, nsIEventTarget *aEventTarget); \
58 :
59 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
60 : #define NS_FORWARD_NSIASYNCINPUTSTREAM(_to) \
61 : NS_IMETHOD CloseWithStatus(nsresult aStatus) override { return _to CloseWithStatus(aStatus); } \
62 : NS_IMETHOD AsyncWait(nsIInputStreamCallback *aCallback, uint32_t aFlags, uint32_t aRequestedCount, nsIEventTarget *aEventTarget) override { return _to AsyncWait(aCallback, aFlags, aRequestedCount, aEventTarget); } \
63 :
64 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
65 : #define NS_FORWARD_SAFE_NSIASYNCINPUTSTREAM(_to) \
66 : NS_IMETHOD CloseWithStatus(nsresult aStatus) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CloseWithStatus(aStatus); } \
67 : NS_IMETHOD AsyncWait(nsIInputStreamCallback *aCallback, uint32_t aFlags, uint32_t aRequestedCount, nsIEventTarget *aEventTarget) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AsyncWait(aCallback, aFlags, aRequestedCount, aEventTarget); } \
68 :
69 : #if 0
70 : /* Use the code below as a template for the implementation class for this interface. */
71 :
72 : /* Header file */
73 : class nsAsyncInputStream : public nsIAsyncInputStream
74 : {
75 : public:
76 : NS_DECL_ISUPPORTS
77 : NS_DECL_NSIASYNCINPUTSTREAM
78 :
79 : nsAsyncInputStream();
80 :
81 : private:
82 : ~nsAsyncInputStream();
83 :
84 : protected:
85 : /* additional members */
86 : };
87 :
88 : /* Implementation file */
89 : NS_IMPL_ISUPPORTS(nsAsyncInputStream, nsIAsyncInputStream)
90 :
91 : nsAsyncInputStream::nsAsyncInputStream()
92 : {
93 : /* member initializers and constructor code */
94 : }
95 :
96 : nsAsyncInputStream::~nsAsyncInputStream()
97 : {
98 : /* destructor code */
99 : }
100 :
101 : /* void closeWithStatus (in nsresult aStatus); */
102 : NS_IMETHODIMP nsAsyncInputStream::CloseWithStatus(nsresult aStatus)
103 : {
104 : return NS_ERROR_NOT_IMPLEMENTED;
105 : }
106 :
107 : /* void asyncWait (in nsIInputStreamCallback aCallback, in unsigned long aFlags, in unsigned long aRequestedCount, in nsIEventTarget aEventTarget); */
108 : NS_IMETHODIMP nsAsyncInputStream::AsyncWait(nsIInputStreamCallback *aCallback, uint32_t aFlags, uint32_t aRequestedCount, nsIEventTarget *aEventTarget)
109 : {
110 : return NS_ERROR_NOT_IMPLEMENTED;
111 : }
112 :
113 : /* End of implementation class template. */
114 : #endif
115 :
116 :
117 : /* starting interface: nsIInputStreamCallback */
118 : #define NS_IINPUTSTREAMCALLBACK_IID_STR "d1f28e94-3a6e-4050-a5f5-2e81b1fc2a43"
119 :
120 : #define NS_IINPUTSTREAMCALLBACK_IID \
121 : {0xd1f28e94, 0x3a6e, 0x4050, \
122 : { 0xa5, 0xf5, 0x2e, 0x81, 0xb1, 0xfc, 0x2a, 0x43 }}
123 :
124 327 : class NS_NO_VTABLE nsIInputStreamCallback : public nsISupports {
125 : public:
126 :
127 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IINPUTSTREAMCALLBACK_IID)
128 :
129 : /* void onInputStreamReady (in nsIAsyncInputStream aStream); */
130 : NS_IMETHOD OnInputStreamReady(nsIAsyncInputStream *aStream) = 0;
131 :
132 : };
133 :
134 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIInputStreamCallback, NS_IINPUTSTREAMCALLBACK_IID)
135 :
136 : /* Use this macro when declaring classes that implement this interface. */
137 : #define NS_DECL_NSIINPUTSTREAMCALLBACK \
138 : NS_IMETHOD OnInputStreamReady(nsIAsyncInputStream *aStream) override;
139 :
140 : /* Use this macro when declaring the members of this interface when the
141 : class doesn't implement the interface. This is useful for forwarding. */
142 : #define NS_DECL_NON_VIRTUAL_NSIINPUTSTREAMCALLBACK \
143 : nsresult OnInputStreamReady(nsIAsyncInputStream *aStream);
144 :
145 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
146 : #define NS_FORWARD_NSIINPUTSTREAMCALLBACK(_to) \
147 : NS_IMETHOD OnInputStreamReady(nsIAsyncInputStream *aStream) override { return _to OnInputStreamReady(aStream); }
148 :
149 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
150 : #define NS_FORWARD_SAFE_NSIINPUTSTREAMCALLBACK(_to) \
151 : NS_IMETHOD OnInputStreamReady(nsIAsyncInputStream *aStream) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnInputStreamReady(aStream); }
152 :
153 : #if 0
154 : /* Use the code below as a template for the implementation class for this interface. */
155 :
156 : /* Header file */
157 : class nsInputStreamCallback : public nsIInputStreamCallback
158 : {
159 : public:
160 : NS_DECL_ISUPPORTS
161 : NS_DECL_NSIINPUTSTREAMCALLBACK
162 :
163 : nsInputStreamCallback();
164 :
165 : private:
166 : ~nsInputStreamCallback();
167 :
168 : protected:
169 : /* additional members */
170 : };
171 :
172 : /* Implementation file */
173 : NS_IMPL_ISUPPORTS(nsInputStreamCallback, nsIInputStreamCallback)
174 :
175 : nsInputStreamCallback::nsInputStreamCallback()
176 : {
177 : /* member initializers and constructor code */
178 : }
179 :
180 : nsInputStreamCallback::~nsInputStreamCallback()
181 : {
182 : /* destructor code */
183 : }
184 :
185 : /* void onInputStreamReady (in nsIAsyncInputStream aStream); */
186 : NS_IMETHODIMP nsInputStreamCallback::OnInputStreamReady(nsIAsyncInputStream *aStream)
187 : {
188 : return NS_ERROR_NOT_IMPLEMENTED;
189 : }
190 :
191 : /* End of implementation class template. */
192 : #endif
193 :
194 :
195 : #endif /* __gen_nsIAsyncInputStream_h__ */
|