Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsIUDPSocketChild.idl
3 : */
4 :
5 : #ifndef __gen_nsIUDPSocketChild_h__
6 : #define __gen_nsIUDPSocketChild_h__
7 :
8 :
9 : #ifndef __gen_nsISupports_h__
10 : #include "nsISupports.h"
11 : #endif
12 :
13 : #ifndef __gen_nsINetAddr_h__
14 : #include "nsINetAddr.h"
15 : #endif
16 :
17 : /* For IDL files that don't want to include root IDL files. */
18 : #ifndef NS_NO_VTABLE
19 : #define NS_NO_VTABLE
20 : #endif
21 : class nsIUDPSocketInternal; /* forward declaration */
22 :
23 : class nsIInputStream; /* forward declaration */
24 :
25 : class nsIPrincipal; /* forward declaration */
26 :
27 : class nsIEventTarget; /* forward declaration */
28 :
29 : namespace mozilla {
30 : namespace net {
31 : union NetAddr;
32 : }
33 : }
34 :
35 : /* starting interface: nsIUDPSocketChild */
36 : #define NS_IUDPSOCKETCHILD_IID_STR "1e6ad73b-6c05-4d78-9a88-2d357b88f58b"
37 :
38 : #define NS_IUDPSOCKETCHILD_IID \
39 : {0x1e6ad73b, 0x6c05, 0x4d78, \
40 : { 0x9a, 0x88, 0x2d, 0x35, 0x7b, 0x88, 0xf5, 0x8b }}
41 :
42 0 : class NS_NO_VTABLE nsIUDPSocketChild : public nsISupports {
43 : public:
44 :
45 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IUDPSOCKETCHILD_IID)
46 :
47 : /* readonly attribute unsigned short localPort; */
48 : NS_IMETHOD GetLocalPort(uint16_t *aLocalPort) = 0;
49 :
50 : /* readonly attribute AUTF8String localAddress; */
51 : NS_IMETHOD GetLocalAddress(nsACString & aLocalAddress) = 0;
52 :
53 : /* attribute AUTF8String filterName; */
54 : NS_IMETHOD GetFilterName(nsACString & aFilterName) = 0;
55 : NS_IMETHOD SetFilterName(const nsACString & aFilterName) = 0;
56 :
57 : /* [noscript] void setBackgroundSpinsEvents (); */
58 : NS_IMETHOD SetBackgroundSpinsEvents(void) = 0;
59 :
60 : /* void bind (in nsIUDPSocketInternal socket, in nsIPrincipal principal, in AUTF8String host, in unsigned short port, in bool addressReuse, in bool loopback, in uint32_t recvBufferSize, in uint32_t sendBufferSize, [optional] in nsIEventTarget mainThreadTarget); */
61 : NS_IMETHOD Bind(nsIUDPSocketInternal *socket, nsIPrincipal *principal, const nsACString & host, uint16_t port, bool addressReuse, bool loopback, uint32_t recvBufferSize, uint32_t sendBufferSize, nsIEventTarget *mainThreadTarget) = 0;
62 :
63 : /* void connect (in nsIUDPSocketInternal socket, in AUTF8String host, in unsigned short port); */
64 : NS_IMETHOD Connect(nsIUDPSocketInternal *socket, const nsACString & host, uint16_t port) = 0;
65 :
66 : /* void send (in AUTF8String host, in unsigned short port, [array, size_is (byteLength), const] in uint8_t bytes, in unsigned long byteLength); */
67 : NS_IMETHOD Send(const nsACString & host, uint16_t port, const uint8_t *bytes, uint32_t byteLength) = 0;
68 :
69 : /* void sendWithAddr (in nsINetAddr addr, [array, size_is (byteLength), const] in uint8_t bytes, in unsigned long byteLength); */
70 : NS_IMETHOD SendWithAddr(nsINetAddr *addr, const uint8_t *bytes, uint32_t byteLength) = 0;
71 :
72 : /* [noscript] void sendWithAddress ([const] in NetAddrPtr addr, [array, size_is (byteLength), const] in uint8_t bytes, in unsigned long byteLength); */
73 : NS_IMETHOD SendWithAddress(const mozilla::net::NetAddr *addr, const uint8_t *bytes, uint32_t byteLength) = 0;
74 :
75 : /* void sendBinaryStream (in AUTF8String host, in unsigned short port, in nsIInputStream stream); */
76 : NS_IMETHOD SendBinaryStream(const nsACString & host, uint16_t port, nsIInputStream *stream) = 0;
77 :
78 : /* void close (); */
79 : NS_IMETHOD Close(void) = 0;
80 :
81 : /* void joinMulticast (in AUTF8String multicastAddress, in AUTF8String iface); */
82 : NS_IMETHOD JoinMulticast(const nsACString & multicastAddress, const nsACString & iface) = 0;
83 :
84 : /* void leaveMulticast (in AUTF8String multicastAddress, in AUTF8String iface); */
85 : NS_IMETHOD LeaveMulticast(const nsACString & multicastAddress, const nsACString & iface) = 0;
86 :
87 : };
88 :
89 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIUDPSocketChild, NS_IUDPSOCKETCHILD_IID)
90 :
91 : /* Use this macro when declaring classes that implement this interface. */
92 : #define NS_DECL_NSIUDPSOCKETCHILD \
93 : NS_IMETHOD GetLocalPort(uint16_t *aLocalPort) override; \
94 : NS_IMETHOD GetLocalAddress(nsACString & aLocalAddress) override; \
95 : NS_IMETHOD GetFilterName(nsACString & aFilterName) override; \
96 : NS_IMETHOD SetFilterName(const nsACString & aFilterName) override; \
97 : NS_IMETHOD SetBackgroundSpinsEvents(void) override; \
98 : NS_IMETHOD Bind(nsIUDPSocketInternal *socket, nsIPrincipal *principal, const nsACString & host, uint16_t port, bool addressReuse, bool loopback, uint32_t recvBufferSize, uint32_t sendBufferSize, nsIEventTarget *mainThreadTarget) override; \
99 : NS_IMETHOD Connect(nsIUDPSocketInternal *socket, const nsACString & host, uint16_t port) override; \
100 : NS_IMETHOD Send(const nsACString & host, uint16_t port, const uint8_t *bytes, uint32_t byteLength) override; \
101 : NS_IMETHOD SendWithAddr(nsINetAddr *addr, const uint8_t *bytes, uint32_t byteLength) override; \
102 : NS_IMETHOD SendWithAddress(const mozilla::net::NetAddr *addr, const uint8_t *bytes, uint32_t byteLength) override; \
103 : NS_IMETHOD SendBinaryStream(const nsACString & host, uint16_t port, nsIInputStream *stream) override; \
104 : NS_IMETHOD Close(void) override; \
105 : NS_IMETHOD JoinMulticast(const nsACString & multicastAddress, const nsACString & iface) override; \
106 : NS_IMETHOD LeaveMulticast(const nsACString & multicastAddress, const nsACString & iface) override;
107 :
108 : /* Use this macro when declaring the members of this interface when the
109 : class doesn't implement the interface. This is useful for forwarding. */
110 : #define NS_DECL_NON_VIRTUAL_NSIUDPSOCKETCHILD \
111 : nsresult GetLocalPort(uint16_t *aLocalPort); \
112 : nsresult GetLocalAddress(nsACString & aLocalAddress); \
113 : nsresult GetFilterName(nsACString & aFilterName); \
114 : nsresult SetFilterName(const nsACString & aFilterName); \
115 : nsresult SetBackgroundSpinsEvents(void); \
116 : nsresult Bind(nsIUDPSocketInternal *socket, nsIPrincipal *principal, const nsACString & host, uint16_t port, bool addressReuse, bool loopback, uint32_t recvBufferSize, uint32_t sendBufferSize, nsIEventTarget *mainThreadTarget); \
117 : nsresult Connect(nsIUDPSocketInternal *socket, const nsACString & host, uint16_t port); \
118 : nsresult Send(const nsACString & host, uint16_t port, const uint8_t *bytes, uint32_t byteLength); \
119 : nsresult SendWithAddr(nsINetAddr *addr, const uint8_t *bytes, uint32_t byteLength); \
120 : nsresult SendWithAddress(const mozilla::net::NetAddr *addr, const uint8_t *bytes, uint32_t byteLength); \
121 : nsresult SendBinaryStream(const nsACString & host, uint16_t port, nsIInputStream *stream); \
122 : nsresult Close(void); \
123 : nsresult JoinMulticast(const nsACString & multicastAddress, const nsACString & iface); \
124 : nsresult LeaveMulticast(const nsACString & multicastAddress, const nsACString & iface);
125 :
126 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
127 : #define NS_FORWARD_NSIUDPSOCKETCHILD(_to) \
128 : NS_IMETHOD GetLocalPort(uint16_t *aLocalPort) override { return _to GetLocalPort(aLocalPort); } \
129 : NS_IMETHOD GetLocalAddress(nsACString & aLocalAddress) override { return _to GetLocalAddress(aLocalAddress); } \
130 : NS_IMETHOD GetFilterName(nsACString & aFilterName) override { return _to GetFilterName(aFilterName); } \
131 : NS_IMETHOD SetFilterName(const nsACString & aFilterName) override { return _to SetFilterName(aFilterName); } \
132 : NS_IMETHOD SetBackgroundSpinsEvents(void) override { return _to SetBackgroundSpinsEvents(); } \
133 : NS_IMETHOD Bind(nsIUDPSocketInternal *socket, nsIPrincipal *principal, const nsACString & host, uint16_t port, bool addressReuse, bool loopback, uint32_t recvBufferSize, uint32_t sendBufferSize, nsIEventTarget *mainThreadTarget) override { return _to Bind(socket, principal, host, port, addressReuse, loopback, recvBufferSize, sendBufferSize, mainThreadTarget); } \
134 : NS_IMETHOD Connect(nsIUDPSocketInternal *socket, const nsACString & host, uint16_t port) override { return _to Connect(socket, host, port); } \
135 : NS_IMETHOD Send(const nsACString & host, uint16_t port, const uint8_t *bytes, uint32_t byteLength) override { return _to Send(host, port, bytes, byteLength); } \
136 : NS_IMETHOD SendWithAddr(nsINetAddr *addr, const uint8_t *bytes, uint32_t byteLength) override { return _to SendWithAddr(addr, bytes, byteLength); } \
137 : NS_IMETHOD SendWithAddress(const mozilla::net::NetAddr *addr, const uint8_t *bytes, uint32_t byteLength) override { return _to SendWithAddress(addr, bytes, byteLength); } \
138 : NS_IMETHOD SendBinaryStream(const nsACString & host, uint16_t port, nsIInputStream *stream) override { return _to SendBinaryStream(host, port, stream); } \
139 : NS_IMETHOD Close(void) override { return _to Close(); } \
140 : NS_IMETHOD JoinMulticast(const nsACString & multicastAddress, const nsACString & iface) override { return _to JoinMulticast(multicastAddress, iface); } \
141 : NS_IMETHOD LeaveMulticast(const nsACString & multicastAddress, const nsACString & iface) override { return _to LeaveMulticast(multicastAddress, iface); }
142 :
143 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
144 : #define NS_FORWARD_SAFE_NSIUDPSOCKETCHILD(_to) \
145 : NS_IMETHOD GetLocalPort(uint16_t *aLocalPort) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLocalPort(aLocalPort); } \
146 : NS_IMETHOD GetLocalAddress(nsACString & aLocalAddress) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLocalAddress(aLocalAddress); } \
147 : NS_IMETHOD GetFilterName(nsACString & aFilterName) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFilterName(aFilterName); } \
148 : NS_IMETHOD SetFilterName(const nsACString & aFilterName) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFilterName(aFilterName); } \
149 : NS_IMETHOD SetBackgroundSpinsEvents(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetBackgroundSpinsEvents(); } \
150 : NS_IMETHOD Bind(nsIUDPSocketInternal *socket, nsIPrincipal *principal, const nsACString & host, uint16_t port, bool addressReuse, bool loopback, uint32_t recvBufferSize, uint32_t sendBufferSize, nsIEventTarget *mainThreadTarget) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Bind(socket, principal, host, port, addressReuse, loopback, recvBufferSize, sendBufferSize, mainThreadTarget); } \
151 : NS_IMETHOD Connect(nsIUDPSocketInternal *socket, const nsACString & host, uint16_t port) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Connect(socket, host, port); } \
152 : NS_IMETHOD Send(const nsACString & host, uint16_t port, const uint8_t *bytes, uint32_t byteLength) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Send(host, port, bytes, byteLength); } \
153 : NS_IMETHOD SendWithAddr(nsINetAddr *addr, const uint8_t *bytes, uint32_t byteLength) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SendWithAddr(addr, bytes, byteLength); } \
154 : NS_IMETHOD SendWithAddress(const mozilla::net::NetAddr *addr, const uint8_t *bytes, uint32_t byteLength) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SendWithAddress(addr, bytes, byteLength); } \
155 : NS_IMETHOD SendBinaryStream(const nsACString & host, uint16_t port, nsIInputStream *stream) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SendBinaryStream(host, port, stream); } \
156 : NS_IMETHOD Close(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Close(); } \
157 : NS_IMETHOD JoinMulticast(const nsACString & multicastAddress, const nsACString & iface) override { return !_to ? NS_ERROR_NULL_POINTER : _to->JoinMulticast(multicastAddress, iface); } \
158 : NS_IMETHOD LeaveMulticast(const nsACString & multicastAddress, const nsACString & iface) override { return !_to ? NS_ERROR_NULL_POINTER : _to->LeaveMulticast(multicastAddress, iface); }
159 :
160 : #if 0
161 : /* Use the code below as a template for the implementation class for this interface. */
162 :
163 : /* Header file */
164 : class nsUDPSocketChild : public nsIUDPSocketChild
165 : {
166 : public:
167 : NS_DECL_ISUPPORTS
168 : NS_DECL_NSIUDPSOCKETCHILD
169 :
170 : nsUDPSocketChild();
171 :
172 : private:
173 : ~nsUDPSocketChild();
174 :
175 : protected:
176 : /* additional members */
177 : };
178 :
179 : /* Implementation file */
180 : NS_IMPL_ISUPPORTS(nsUDPSocketChild, nsIUDPSocketChild)
181 :
182 : nsUDPSocketChild::nsUDPSocketChild()
183 : {
184 : /* member initializers and constructor code */
185 : }
186 :
187 : nsUDPSocketChild::~nsUDPSocketChild()
188 : {
189 : /* destructor code */
190 : }
191 :
192 : /* readonly attribute unsigned short localPort; */
193 : NS_IMETHODIMP nsUDPSocketChild::GetLocalPort(uint16_t *aLocalPort)
194 : {
195 : return NS_ERROR_NOT_IMPLEMENTED;
196 : }
197 :
198 : /* readonly attribute AUTF8String localAddress; */
199 : NS_IMETHODIMP nsUDPSocketChild::GetLocalAddress(nsACString & aLocalAddress)
200 : {
201 : return NS_ERROR_NOT_IMPLEMENTED;
202 : }
203 :
204 : /* attribute AUTF8String filterName; */
205 : NS_IMETHODIMP nsUDPSocketChild::GetFilterName(nsACString & aFilterName)
206 : {
207 : return NS_ERROR_NOT_IMPLEMENTED;
208 : }
209 : NS_IMETHODIMP nsUDPSocketChild::SetFilterName(const nsACString & aFilterName)
210 : {
211 : return NS_ERROR_NOT_IMPLEMENTED;
212 : }
213 :
214 : /* [noscript] void setBackgroundSpinsEvents (); */
215 : NS_IMETHODIMP nsUDPSocketChild::SetBackgroundSpinsEvents()
216 : {
217 : return NS_ERROR_NOT_IMPLEMENTED;
218 : }
219 :
220 : /* void bind (in nsIUDPSocketInternal socket, in nsIPrincipal principal, in AUTF8String host, in unsigned short port, in bool addressReuse, in bool loopback, in uint32_t recvBufferSize, in uint32_t sendBufferSize, [optional] in nsIEventTarget mainThreadTarget); */
221 : NS_IMETHODIMP nsUDPSocketChild::Bind(nsIUDPSocketInternal *socket, nsIPrincipal *principal, const nsACString & host, uint16_t port, bool addressReuse, bool loopback, uint32_t recvBufferSize, uint32_t sendBufferSize, nsIEventTarget *mainThreadTarget)
222 : {
223 : return NS_ERROR_NOT_IMPLEMENTED;
224 : }
225 :
226 : /* void connect (in nsIUDPSocketInternal socket, in AUTF8String host, in unsigned short port); */
227 : NS_IMETHODIMP nsUDPSocketChild::Connect(nsIUDPSocketInternal *socket, const nsACString & host, uint16_t port)
228 : {
229 : return NS_ERROR_NOT_IMPLEMENTED;
230 : }
231 :
232 : /* void send (in AUTF8String host, in unsigned short port, [array, size_is (byteLength), const] in uint8_t bytes, in unsigned long byteLength); */
233 : NS_IMETHODIMP nsUDPSocketChild::Send(const nsACString & host, uint16_t port, const uint8_t *bytes, uint32_t byteLength)
234 : {
235 : return NS_ERROR_NOT_IMPLEMENTED;
236 : }
237 :
238 : /* void sendWithAddr (in nsINetAddr addr, [array, size_is (byteLength), const] in uint8_t bytes, in unsigned long byteLength); */
239 : NS_IMETHODIMP nsUDPSocketChild::SendWithAddr(nsINetAddr *addr, const uint8_t *bytes, uint32_t byteLength)
240 : {
241 : return NS_ERROR_NOT_IMPLEMENTED;
242 : }
243 :
244 : /* [noscript] void sendWithAddress ([const] in NetAddrPtr addr, [array, size_is (byteLength), const] in uint8_t bytes, in unsigned long byteLength); */
245 : NS_IMETHODIMP nsUDPSocketChild::SendWithAddress(const mozilla::net::NetAddr *addr, const uint8_t *bytes, uint32_t byteLength)
246 : {
247 : return NS_ERROR_NOT_IMPLEMENTED;
248 : }
249 :
250 : /* void sendBinaryStream (in AUTF8String host, in unsigned short port, in nsIInputStream stream); */
251 : NS_IMETHODIMP nsUDPSocketChild::SendBinaryStream(const nsACString & host, uint16_t port, nsIInputStream *stream)
252 : {
253 : return NS_ERROR_NOT_IMPLEMENTED;
254 : }
255 :
256 : /* void close (); */
257 : NS_IMETHODIMP nsUDPSocketChild::Close()
258 : {
259 : return NS_ERROR_NOT_IMPLEMENTED;
260 : }
261 :
262 : /* void joinMulticast (in AUTF8String multicastAddress, in AUTF8String iface); */
263 : NS_IMETHODIMP nsUDPSocketChild::JoinMulticast(const nsACString & multicastAddress, const nsACString & iface)
264 : {
265 : return NS_ERROR_NOT_IMPLEMENTED;
266 : }
267 :
268 : /* void leaveMulticast (in AUTF8String multicastAddress, in AUTF8String iface); */
269 : NS_IMETHODIMP nsUDPSocketChild::LeaveMulticast(const nsACString & multicastAddress, const nsACString & iface)
270 : {
271 : return NS_ERROR_NOT_IMPLEMENTED;
272 : }
273 :
274 : /* End of implementation class template. */
275 : #endif
276 :
277 :
278 : /* starting interface: nsIUDPSocketInternal */
279 : #define NS_IUDPSOCKETINTERNAL_IID_STR "613dd3ad-598b-4da9-ad63-bbda50c20098"
280 :
281 : #define NS_IUDPSOCKETINTERNAL_IID \
282 : {0x613dd3ad, 0x598b, 0x4da9, \
283 : { 0xad, 0x63, 0xbb, 0xda, 0x50, 0xc2, 0x00, 0x98 }}
284 :
285 0 : class NS_NO_VTABLE nsIUDPSocketInternal : public nsISupports {
286 : public:
287 :
288 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IUDPSOCKETINTERNAL_IID)
289 :
290 : /* void callListenerOpened (); */
291 : NS_IMETHOD CallListenerOpened(void) = 0;
292 :
293 : /* void callListenerConnected (); */
294 : NS_IMETHOD CallListenerConnected(void) = 0;
295 :
296 : /* void callListenerClosed (); */
297 : NS_IMETHOD CallListenerClosed(void) = 0;
298 :
299 : /* void callListenerReceivedData (in AUTF8String host, in unsigned short port, [array, size_is (dataLength), const] in uint8_t data, in unsigned long dataLength); */
300 : NS_IMETHOD CallListenerReceivedData(const nsACString & host, uint16_t port, const uint8_t *data, uint32_t dataLength) = 0;
301 :
302 : /* void callListenerError (in AUTF8String message, in AUTF8String filename, in uint32_t lineNumber); */
303 : NS_IMETHOD CallListenerError(const nsACString & message, const nsACString & filename, uint32_t lineNumber) = 0;
304 :
305 : };
306 :
307 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIUDPSocketInternal, NS_IUDPSOCKETINTERNAL_IID)
308 :
309 : /* Use this macro when declaring classes that implement this interface. */
310 : #define NS_DECL_NSIUDPSOCKETINTERNAL \
311 : NS_IMETHOD CallListenerOpened(void) override; \
312 : NS_IMETHOD CallListenerConnected(void) override; \
313 : NS_IMETHOD CallListenerClosed(void) override; \
314 : NS_IMETHOD CallListenerReceivedData(const nsACString & host, uint16_t port, const uint8_t *data, uint32_t dataLength) override; \
315 : NS_IMETHOD CallListenerError(const nsACString & message, const nsACString & filename, uint32_t lineNumber) override;
316 :
317 : /* Use this macro when declaring the members of this interface when the
318 : class doesn't implement the interface. This is useful for forwarding. */
319 : #define NS_DECL_NON_VIRTUAL_NSIUDPSOCKETINTERNAL \
320 : nsresult CallListenerOpened(void); \
321 : nsresult CallListenerConnected(void); \
322 : nsresult CallListenerClosed(void); \
323 : nsresult CallListenerReceivedData(const nsACString & host, uint16_t port, const uint8_t *data, uint32_t dataLength); \
324 : nsresult CallListenerError(const nsACString & message, const nsACString & filename, uint32_t lineNumber);
325 :
326 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
327 : #define NS_FORWARD_NSIUDPSOCKETINTERNAL(_to) \
328 : NS_IMETHOD CallListenerOpened(void) override { return _to CallListenerOpened(); } \
329 : NS_IMETHOD CallListenerConnected(void) override { return _to CallListenerConnected(); } \
330 : NS_IMETHOD CallListenerClosed(void) override { return _to CallListenerClosed(); } \
331 : NS_IMETHOD CallListenerReceivedData(const nsACString & host, uint16_t port, const uint8_t *data, uint32_t dataLength) override { return _to CallListenerReceivedData(host, port, data, dataLength); } \
332 : NS_IMETHOD CallListenerError(const nsACString & message, const nsACString & filename, uint32_t lineNumber) override { return _to CallListenerError(message, filename, lineNumber); }
333 :
334 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
335 : #define NS_FORWARD_SAFE_NSIUDPSOCKETINTERNAL(_to) \
336 : NS_IMETHOD CallListenerOpened(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CallListenerOpened(); } \
337 : NS_IMETHOD CallListenerConnected(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CallListenerConnected(); } \
338 : NS_IMETHOD CallListenerClosed(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CallListenerClosed(); } \
339 : NS_IMETHOD CallListenerReceivedData(const nsACString & host, uint16_t port, const uint8_t *data, uint32_t dataLength) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CallListenerReceivedData(host, port, data, dataLength); } \
340 : NS_IMETHOD CallListenerError(const nsACString & message, const nsACString & filename, uint32_t lineNumber) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CallListenerError(message, filename, lineNumber); }
341 :
342 : #if 0
343 : /* Use the code below as a template for the implementation class for this interface. */
344 :
345 : /* Header file */
346 : class nsUDPSocketInternal : public nsIUDPSocketInternal
347 : {
348 : public:
349 : NS_DECL_ISUPPORTS
350 : NS_DECL_NSIUDPSOCKETINTERNAL
351 :
352 : nsUDPSocketInternal();
353 :
354 : private:
355 : ~nsUDPSocketInternal();
356 :
357 : protected:
358 : /* additional members */
359 : };
360 :
361 : /* Implementation file */
362 : NS_IMPL_ISUPPORTS(nsUDPSocketInternal, nsIUDPSocketInternal)
363 :
364 : nsUDPSocketInternal::nsUDPSocketInternal()
365 : {
366 : /* member initializers and constructor code */
367 : }
368 :
369 : nsUDPSocketInternal::~nsUDPSocketInternal()
370 : {
371 : /* destructor code */
372 : }
373 :
374 : /* void callListenerOpened (); */
375 : NS_IMETHODIMP nsUDPSocketInternal::CallListenerOpened()
376 : {
377 : return NS_ERROR_NOT_IMPLEMENTED;
378 : }
379 :
380 : /* void callListenerConnected (); */
381 : NS_IMETHODIMP nsUDPSocketInternal::CallListenerConnected()
382 : {
383 : return NS_ERROR_NOT_IMPLEMENTED;
384 : }
385 :
386 : /* void callListenerClosed (); */
387 : NS_IMETHODIMP nsUDPSocketInternal::CallListenerClosed()
388 : {
389 : return NS_ERROR_NOT_IMPLEMENTED;
390 : }
391 :
392 : /* void callListenerReceivedData (in AUTF8String host, in unsigned short port, [array, size_is (dataLength), const] in uint8_t data, in unsigned long dataLength); */
393 : NS_IMETHODIMP nsUDPSocketInternal::CallListenerReceivedData(const nsACString & host, uint16_t port, const uint8_t *data, uint32_t dataLength)
394 : {
395 : return NS_ERROR_NOT_IMPLEMENTED;
396 : }
397 :
398 : /* void callListenerError (in AUTF8String message, in AUTF8String filename, in uint32_t lineNumber); */
399 : NS_IMETHODIMP nsUDPSocketInternal::CallListenerError(const nsACString & message, const nsACString & filename, uint32_t lineNumber)
400 : {
401 : return NS_ERROR_NOT_IMPLEMENTED;
402 : }
403 :
404 : /* End of implementation class template. */
405 : #endif
406 :
407 :
408 : #endif /* __gen_nsIUDPSocketChild_h__ */
|