Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsIAsyncOutputStream.idl
3 : */
4 :
5 : #ifndef __gen_nsIAsyncOutputStream_h__
6 : #define __gen_nsIAsyncOutputStream_h__
7 :
8 :
9 : #ifndef __gen_nsIOutputStream_h__
10 : #include "nsIOutputStream.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 nsIOutputStreamCallback; /* forward declaration */
18 :
19 : class nsIEventTarget; /* forward declaration */
20 :
21 :
22 : /* starting interface: nsIAsyncOutputStream */
23 : #define NS_IASYNCOUTPUTSTREAM_IID_STR "beb632d3-d77a-4e90-9134-f9ece69e8200"
24 :
25 : #define NS_IASYNCOUTPUTSTREAM_IID \
26 : {0xbeb632d3, 0xd77a, 0x4e90, \
27 : { 0x91, 0x34, 0xf9, 0xec, 0xe6, 0x9e, 0x82, 0x00 }}
28 :
29 81 : class NS_NO_VTABLE nsIAsyncOutputStream : public nsIOutputStream {
30 : public:
31 :
32 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IASYNCOUTPUTSTREAM_IID)
33 :
34 : /* void closeWithStatus (in nsresult reason); */
35 : NS_IMETHOD CloseWithStatus(nsresult reason) = 0;
36 :
37 : /* void asyncWait (in nsIOutputStreamCallback aCallback, in unsigned long aFlags, in unsigned long aRequestedCount, in nsIEventTarget aEventTarget); */
38 : NS_IMETHOD AsyncWait(nsIOutputStreamCallback *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(nsIAsyncOutputStream, NS_IASYNCOUTPUTSTREAM_IID)
47 :
48 : /* Use this macro when declaring classes that implement this interface. */
49 : #define NS_DECL_NSIASYNCOUTPUTSTREAM \
50 : NS_IMETHOD CloseWithStatus(nsresult reason) override; \
51 : NS_IMETHOD AsyncWait(nsIOutputStreamCallback *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_NSIASYNCOUTPUTSTREAM \
56 : nsresult CloseWithStatus(nsresult reason); \
57 : nsresult AsyncWait(nsIOutputStreamCallback *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_NSIASYNCOUTPUTSTREAM(_to) \
61 : NS_IMETHOD CloseWithStatus(nsresult reason) override { return _to CloseWithStatus(reason); } \
62 : NS_IMETHOD AsyncWait(nsIOutputStreamCallback *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_NSIASYNCOUTPUTSTREAM(_to) \
66 : NS_IMETHOD CloseWithStatus(nsresult reason) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CloseWithStatus(reason); } \
67 : NS_IMETHOD AsyncWait(nsIOutputStreamCallback *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 nsAsyncOutputStream : public nsIAsyncOutputStream
74 : {
75 : public:
76 : NS_DECL_ISUPPORTS
77 : NS_DECL_NSIASYNCOUTPUTSTREAM
78 :
79 : nsAsyncOutputStream();
80 :
81 : private:
82 : ~nsAsyncOutputStream();
83 :
84 : protected:
85 : /* additional members */
86 : };
87 :
88 : /* Implementation file */
89 : NS_IMPL_ISUPPORTS(nsAsyncOutputStream, nsIAsyncOutputStream)
90 :
91 : nsAsyncOutputStream::nsAsyncOutputStream()
92 : {
93 : /* member initializers and constructor code */
94 : }
95 :
96 : nsAsyncOutputStream::~nsAsyncOutputStream()
97 : {
98 : /* destructor code */
99 : }
100 :
101 : /* void closeWithStatus (in nsresult reason); */
102 : NS_IMETHODIMP nsAsyncOutputStream::CloseWithStatus(nsresult reason)
103 : {
104 : return NS_ERROR_NOT_IMPLEMENTED;
105 : }
106 :
107 : /* void asyncWait (in nsIOutputStreamCallback aCallback, in unsigned long aFlags, in unsigned long aRequestedCount, in nsIEventTarget aEventTarget); */
108 : NS_IMETHODIMP nsAsyncOutputStream::AsyncWait(nsIOutputStreamCallback *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: nsIOutputStreamCallback */
118 : #define NS_IOUTPUTSTREAMCALLBACK_IID_STR "40dbcdff-9053-42c5-a57c-3ec910d0f148"
119 :
120 : #define NS_IOUTPUTSTREAMCALLBACK_IID \
121 : {0x40dbcdff, 0x9053, 0x42c5, \
122 : { 0xa5, 0x7c, 0x3e, 0xc9, 0x10, 0xd0, 0xf1, 0x48 }}
123 :
124 75 : class NS_NO_VTABLE nsIOutputStreamCallback : public nsISupports {
125 : public:
126 :
127 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IOUTPUTSTREAMCALLBACK_IID)
128 :
129 : /* void onOutputStreamReady (in nsIAsyncOutputStream aStream); */
130 : NS_IMETHOD OnOutputStreamReady(nsIAsyncOutputStream *aStream) = 0;
131 :
132 : };
133 :
134 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIOutputStreamCallback, NS_IOUTPUTSTREAMCALLBACK_IID)
135 :
136 : /* Use this macro when declaring classes that implement this interface. */
137 : #define NS_DECL_NSIOUTPUTSTREAMCALLBACK \
138 : NS_IMETHOD OnOutputStreamReady(nsIAsyncOutputStream *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_NSIOUTPUTSTREAMCALLBACK \
143 : nsresult OnOutputStreamReady(nsIAsyncOutputStream *aStream);
144 :
145 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
146 : #define NS_FORWARD_NSIOUTPUTSTREAMCALLBACK(_to) \
147 : NS_IMETHOD OnOutputStreamReady(nsIAsyncOutputStream *aStream) override { return _to OnOutputStreamReady(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_NSIOUTPUTSTREAMCALLBACK(_to) \
151 : NS_IMETHOD OnOutputStreamReady(nsIAsyncOutputStream *aStream) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnOutputStreamReady(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 nsOutputStreamCallback : public nsIOutputStreamCallback
158 : {
159 : public:
160 : NS_DECL_ISUPPORTS
161 : NS_DECL_NSIOUTPUTSTREAMCALLBACK
162 :
163 : nsOutputStreamCallback();
164 :
165 : private:
166 : ~nsOutputStreamCallback();
167 :
168 : protected:
169 : /* additional members */
170 : };
171 :
172 : /* Implementation file */
173 : NS_IMPL_ISUPPORTS(nsOutputStreamCallback, nsIOutputStreamCallback)
174 :
175 : nsOutputStreamCallback::nsOutputStreamCallback()
176 : {
177 : /* member initializers and constructor code */
178 : }
179 :
180 : nsOutputStreamCallback::~nsOutputStreamCallback()
181 : {
182 : /* destructor code */
183 : }
184 :
185 : /* void onOutputStreamReady (in nsIAsyncOutputStream aStream); */
186 : NS_IMETHODIMP nsOutputStreamCallback::OnOutputStreamReady(nsIAsyncOutputStream *aStream)
187 : {
188 : return NS_ERROR_NOT_IMPLEMENTED;
189 : }
190 :
191 : /* End of implementation class template. */
192 : #endif
193 :
194 :
195 : #endif /* __gen_nsIAsyncOutputStream_h__ */
|