Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsITransport.idl
3 : */
4 :
5 : #ifndef __gen_nsITransport_h__
6 : #define __gen_nsITransport_h__
7 :
8 :
9 : #ifndef __gen_nsISupports_h__
10 : #include "nsISupports.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 nsIInputStream; /* forward declaration */
18 :
19 : class nsIOutputStream; /* forward declaration */
20 :
21 : class nsITransportEventSink; /* forward declaration */
22 :
23 : class nsIEventTarget; /* forward declaration */
24 :
25 :
26 : /* starting interface: nsITransport */
27 : #define NS_ITRANSPORT_IID_STR "2a8c6334-a5e6-4ec3-9865-1256541446fb"
28 :
29 : #define NS_ITRANSPORT_IID \
30 : {0x2a8c6334, 0xa5e6, 0x4ec3, \
31 : { 0x98, 0x65, 0x12, 0x56, 0x54, 0x14, 0x46, 0xfb }}
32 :
33 69 : class NS_NO_VTABLE nsITransport : public nsISupports {
34 : public:
35 :
36 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_ITRANSPORT_IID)
37 :
38 : enum {
39 : OPEN_BLOCKING = 1U,
40 : OPEN_UNBUFFERED = 2U
41 : };
42 :
43 : /* nsIInputStream openInputStream (in unsigned long aFlags, in unsigned long aSegmentSize, in unsigned long aSegmentCount); */
44 : NS_IMETHOD OpenInputStream(uint32_t aFlags, uint32_t aSegmentSize, uint32_t aSegmentCount, nsIInputStream * *_retval) = 0;
45 :
46 : /* nsIOutputStream openOutputStream (in unsigned long aFlags, in unsigned long aSegmentSize, in unsigned long aSegmentCount); */
47 : NS_IMETHOD OpenOutputStream(uint32_t aFlags, uint32_t aSegmentSize, uint32_t aSegmentCount, nsIOutputStream * *_retval) = 0;
48 :
49 : /* void close (in nsresult aReason); */
50 : NS_IMETHOD Close(nsresult aReason) = 0;
51 :
52 : /* void setEventSink (in nsITransportEventSink aSink, in nsIEventTarget aEventTarget); */
53 : NS_IMETHOD SetEventSink(nsITransportEventSink *aSink, nsIEventTarget *aEventTarget) = 0;
54 :
55 : enum {
56 : STATUS_READING = 2152398856U,
57 : STATUS_WRITING = 2152398857U
58 : };
59 :
60 : };
61 :
62 : NS_DEFINE_STATIC_IID_ACCESSOR(nsITransport, NS_ITRANSPORT_IID)
63 :
64 : /* Use this macro when declaring classes that implement this interface. */
65 : #define NS_DECL_NSITRANSPORT \
66 : NS_IMETHOD OpenInputStream(uint32_t aFlags, uint32_t aSegmentSize, uint32_t aSegmentCount, nsIInputStream * *_retval) override; \
67 : NS_IMETHOD OpenOutputStream(uint32_t aFlags, uint32_t aSegmentSize, uint32_t aSegmentCount, nsIOutputStream * *_retval) override; \
68 : NS_IMETHOD Close(nsresult aReason) override; \
69 : NS_IMETHOD SetEventSink(nsITransportEventSink *aSink, nsIEventTarget *aEventTarget) override; \
70 :
71 : /* Use this macro when declaring the members of this interface when the
72 : class doesn't implement the interface. This is useful for forwarding. */
73 : #define NS_DECL_NON_VIRTUAL_NSITRANSPORT \
74 : nsresult OpenInputStream(uint32_t aFlags, uint32_t aSegmentSize, uint32_t aSegmentCount, nsIInputStream * *_retval); \
75 : nsresult OpenOutputStream(uint32_t aFlags, uint32_t aSegmentSize, uint32_t aSegmentCount, nsIOutputStream * *_retval); \
76 : nsresult Close(nsresult aReason); \
77 : nsresult SetEventSink(nsITransportEventSink *aSink, nsIEventTarget *aEventTarget); \
78 :
79 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
80 : #define NS_FORWARD_NSITRANSPORT(_to) \
81 : NS_IMETHOD OpenInputStream(uint32_t aFlags, uint32_t aSegmentSize, uint32_t aSegmentCount, nsIInputStream * *_retval) override { return _to OpenInputStream(aFlags, aSegmentSize, aSegmentCount, _retval); } \
82 : NS_IMETHOD OpenOutputStream(uint32_t aFlags, uint32_t aSegmentSize, uint32_t aSegmentCount, nsIOutputStream * *_retval) override { return _to OpenOutputStream(aFlags, aSegmentSize, aSegmentCount, _retval); } \
83 : NS_IMETHOD Close(nsresult aReason) override { return _to Close(aReason); } \
84 : NS_IMETHOD SetEventSink(nsITransportEventSink *aSink, nsIEventTarget *aEventTarget) override { return _to SetEventSink(aSink, aEventTarget); } \
85 :
86 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
87 : #define NS_FORWARD_SAFE_NSITRANSPORT(_to) \
88 : NS_IMETHOD OpenInputStream(uint32_t aFlags, uint32_t aSegmentSize, uint32_t aSegmentCount, nsIInputStream * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OpenInputStream(aFlags, aSegmentSize, aSegmentCount, _retval); } \
89 : NS_IMETHOD OpenOutputStream(uint32_t aFlags, uint32_t aSegmentSize, uint32_t aSegmentCount, nsIOutputStream * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OpenOutputStream(aFlags, aSegmentSize, aSegmentCount, _retval); } \
90 : NS_IMETHOD Close(nsresult aReason) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Close(aReason); } \
91 : NS_IMETHOD SetEventSink(nsITransportEventSink *aSink, nsIEventTarget *aEventTarget) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetEventSink(aSink, aEventTarget); } \
92 :
93 : #if 0
94 : /* Use the code below as a template for the implementation class for this interface. */
95 :
96 : /* Header file */
97 : class nsTransport : public nsITransport
98 : {
99 : public:
100 : NS_DECL_ISUPPORTS
101 : NS_DECL_NSITRANSPORT
102 :
103 : nsTransport();
104 :
105 : private:
106 : ~nsTransport();
107 :
108 : protected:
109 : /* additional members */
110 : };
111 :
112 : /* Implementation file */
113 : NS_IMPL_ISUPPORTS(nsTransport, nsITransport)
114 :
115 : nsTransport::nsTransport()
116 : {
117 : /* member initializers and constructor code */
118 : }
119 :
120 : nsTransport::~nsTransport()
121 : {
122 : /* destructor code */
123 : }
124 :
125 : /* nsIInputStream openInputStream (in unsigned long aFlags, in unsigned long aSegmentSize, in unsigned long aSegmentCount); */
126 : NS_IMETHODIMP nsTransport::OpenInputStream(uint32_t aFlags, uint32_t aSegmentSize, uint32_t aSegmentCount, nsIInputStream * *_retval)
127 : {
128 : return NS_ERROR_NOT_IMPLEMENTED;
129 : }
130 :
131 : /* nsIOutputStream openOutputStream (in unsigned long aFlags, in unsigned long aSegmentSize, in unsigned long aSegmentCount); */
132 : NS_IMETHODIMP nsTransport::OpenOutputStream(uint32_t aFlags, uint32_t aSegmentSize, uint32_t aSegmentCount, nsIOutputStream * *_retval)
133 : {
134 : return NS_ERROR_NOT_IMPLEMENTED;
135 : }
136 :
137 : /* void close (in nsresult aReason); */
138 : NS_IMETHODIMP nsTransport::Close(nsresult aReason)
139 : {
140 : return NS_ERROR_NOT_IMPLEMENTED;
141 : }
142 :
143 : /* void setEventSink (in nsITransportEventSink aSink, in nsIEventTarget aEventTarget); */
144 : NS_IMETHODIMP nsTransport::SetEventSink(nsITransportEventSink *aSink, nsIEventTarget *aEventTarget)
145 : {
146 : return NS_ERROR_NOT_IMPLEMENTED;
147 : }
148 :
149 : /* End of implementation class template. */
150 : #endif
151 :
152 :
153 : /* starting interface: nsITransportEventSink */
154 : #define NS_ITRANSPORTEVENTSINK_IID_STR "eda4f520-67f7-484b-a691-8c3226a5b0a6"
155 :
156 : #define NS_ITRANSPORTEVENTSINK_IID \
157 : {0xeda4f520, 0x67f7, 0x484b, \
158 : { 0xa6, 0x91, 0x8c, 0x32, 0x26, 0xa5, 0xb0, 0xa6 }}
159 :
160 1199 : class NS_NO_VTABLE nsITransportEventSink : public nsISupports {
161 : public:
162 :
163 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_ITRANSPORTEVENTSINK_IID)
164 :
165 : /* void onTransportStatus (in nsITransport aTransport, in nsresult aStatus, in long long aProgress, in long long aProgressMax); */
166 : NS_IMETHOD OnTransportStatus(nsITransport *aTransport, nsresult aStatus, int64_t aProgress, int64_t aProgressMax) = 0;
167 :
168 : };
169 :
170 : NS_DEFINE_STATIC_IID_ACCESSOR(nsITransportEventSink, NS_ITRANSPORTEVENTSINK_IID)
171 :
172 : /* Use this macro when declaring classes that implement this interface. */
173 : #define NS_DECL_NSITRANSPORTEVENTSINK \
174 : NS_IMETHOD OnTransportStatus(nsITransport *aTransport, nsresult aStatus, int64_t aProgress, int64_t aProgressMax) override;
175 :
176 : /* Use this macro when declaring the members of this interface when the
177 : class doesn't implement the interface. This is useful for forwarding. */
178 : #define NS_DECL_NON_VIRTUAL_NSITRANSPORTEVENTSINK \
179 : nsresult OnTransportStatus(nsITransport *aTransport, nsresult aStatus, int64_t aProgress, int64_t aProgressMax);
180 :
181 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
182 : #define NS_FORWARD_NSITRANSPORTEVENTSINK(_to) \
183 : NS_IMETHOD OnTransportStatus(nsITransport *aTransport, nsresult aStatus, int64_t aProgress, int64_t aProgressMax) override { return _to OnTransportStatus(aTransport, aStatus, aProgress, aProgressMax); }
184 :
185 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
186 : #define NS_FORWARD_SAFE_NSITRANSPORTEVENTSINK(_to) \
187 : NS_IMETHOD OnTransportStatus(nsITransport *aTransport, nsresult aStatus, int64_t aProgress, int64_t aProgressMax) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnTransportStatus(aTransport, aStatus, aProgress, aProgressMax); }
188 :
189 : #if 0
190 : /* Use the code below as a template for the implementation class for this interface. */
191 :
192 : /* Header file */
193 : class nsTransportEventSink : public nsITransportEventSink
194 : {
195 : public:
196 : NS_DECL_ISUPPORTS
197 : NS_DECL_NSITRANSPORTEVENTSINK
198 :
199 : nsTransportEventSink();
200 :
201 : private:
202 : ~nsTransportEventSink();
203 :
204 : protected:
205 : /* additional members */
206 : };
207 :
208 : /* Implementation file */
209 : NS_IMPL_ISUPPORTS(nsTransportEventSink, nsITransportEventSink)
210 :
211 : nsTransportEventSink::nsTransportEventSink()
212 : {
213 : /* member initializers and constructor code */
214 : }
215 :
216 : nsTransportEventSink::~nsTransportEventSink()
217 : {
218 : /* destructor code */
219 : }
220 :
221 : /* void onTransportStatus (in nsITransport aTransport, in nsresult aStatus, in long long aProgress, in long long aProgressMax); */
222 : NS_IMETHODIMP nsTransportEventSink::OnTransportStatus(nsITransport *aTransport, nsresult aStatus, int64_t aProgress, int64_t aProgressMax)
223 : {
224 : return NS_ERROR_NOT_IMPLEMENTED;
225 : }
226 :
227 : /* End of implementation class template. */
228 : #endif
229 :
230 :
231 : #endif /* __gen_nsITransport_h__ */
|