Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsISocketTransport.idl
3 : */
4 :
5 : #ifndef __gen_nsISocketTransport_h__
6 : #define __gen_nsISocketTransport_h__
7 :
8 :
9 : #ifndef __gen_nsITransport_h__
10 : #include "nsITransport.h"
11 : #endif
12 :
13 : #include "js/Value.h"
14 :
15 : /* For IDL files that don't want to include root IDL files. */
16 : #ifndef NS_NO_VTABLE
17 : #define NS_NO_VTABLE
18 : #endif
19 : class nsIInterfaceRequestor; /* forward declaration */
20 :
21 : class nsINetAddr; /* forward declaration */
22 :
23 : #include "mozilla/BasePrincipal.h"
24 : namespace mozilla {
25 : namespace net {
26 : union NetAddr;
27 : class TCPFastOpen;
28 : }
29 : }
30 :
31 : /* starting interface: nsISocketTransport */
32 : #define NS_ISOCKETTRANSPORT_IID_STR "79221831-85e2-43a8-8152-05d77d6fde31"
33 :
34 : #define NS_ISOCKETTRANSPORT_IID \
35 : {0x79221831, 0x85e2, 0x43a8, \
36 : { 0x81, 0x52, 0x05, 0xd7, 0x7d, 0x6f, 0xde, 0x31 }}
37 :
38 3 : class NS_NO_VTABLE nsISocketTransport : public nsITransport {
39 : public:
40 :
41 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISOCKETTRANSPORT_IID)
42 :
43 : /* readonly attribute AUTF8String host; */
44 : NS_IMETHOD GetHost(nsACString & aHost) = 0;
45 :
46 : /* readonly attribute long port; */
47 : NS_IMETHOD GetPort(int32_t *aPort) = 0;
48 :
49 : /* [binaryname(ScriptableOriginAttributes),implicit_jscontext] attribute jsval originAttributes; */
50 : NS_IMETHOD GetScriptableOriginAttributes(JSContext* cx, JS::MutableHandleValue aOriginAttributes) = 0;
51 : NS_IMETHOD SetScriptableOriginAttributes(JSContext* cx, JS::HandleValue aOriginAttributes) = 0;
52 :
53 : /* [binaryname(GetOriginAttributes),noscript,nostdcall] OriginAttributes binaryGetOriginAttributes (); */
54 : virtual nsresult GetOriginAttributes(mozilla::OriginAttributes *_retval) = 0;
55 :
56 : /* [binaryname(SetOriginAttributes),noscript,nostdcall] void binarySetOriginAttributes (in const_OriginAttributesRef aOriginAttrs); */
57 : virtual nsresult SetOriginAttributes(const mozilla::OriginAttributes & aOriginAttrs) = 0;
58 :
59 : /* attribute ACString networkInterfaceId; */
60 : NS_IMETHOD GetNetworkInterfaceId(nsACString & aNetworkInterfaceId) = 0;
61 : NS_IMETHOD SetNetworkInterfaceId(const nsACString & aNetworkInterfaceId) = 0;
62 :
63 : /* [noscript] NetAddr getPeerAddr (); */
64 : NS_IMETHOD GetPeerAddr(mozilla::net::NetAddr *_retval) = 0;
65 :
66 : /* [noscript] NetAddr getSelfAddr (); */
67 : NS_IMETHOD GetSelfAddr(mozilla::net::NetAddr *_retval) = 0;
68 :
69 : /* [noscript] void bind (in NetAddrPtr aLocalAddr); */
70 : NS_IMETHOD Bind(mozilla::net::NetAddr *aLocalAddr) = 0;
71 :
72 : /* nsINetAddr getScriptablePeerAddr (); */
73 : NS_IMETHOD GetScriptablePeerAddr(nsINetAddr * *_retval) = 0;
74 :
75 : /* nsINetAddr getScriptableSelfAddr (); */
76 : NS_IMETHOD GetScriptableSelfAddr(nsINetAddr * *_retval) = 0;
77 :
78 : /* readonly attribute nsISupports securityInfo; */
79 : NS_IMETHOD GetSecurityInfo(nsISupports * *aSecurityInfo) = 0;
80 :
81 : /* attribute nsIInterfaceRequestor securityCallbacks; */
82 : NS_IMETHOD GetSecurityCallbacks(nsIInterfaceRequestor * *aSecurityCallbacks) = 0;
83 : NS_IMETHOD SetSecurityCallbacks(nsIInterfaceRequestor *aSecurityCallbacks) = 0;
84 :
85 : /* boolean isAlive (); */
86 : NS_IMETHOD IsAlive(bool *_retval) = 0;
87 :
88 : /* unsigned long getTimeout (in unsigned long aType); */
89 : NS_IMETHOD GetTimeout(uint32_t aType, uint32_t *_retval) = 0;
90 :
91 : /* void setTimeout (in unsigned long aType, in unsigned long aValue); */
92 : NS_IMETHOD SetTimeout(uint32_t aType, uint32_t aValue) = 0;
93 :
94 : /* void setReuseAddrPort (in bool reuseAddrPort); */
95 : NS_IMETHOD SetReuseAddrPort(bool reuseAddrPort) = 0;
96 :
97 : enum {
98 : TIMEOUT_CONNECT = 0U,
99 : TIMEOUT_READ_WRITE = 1U,
100 : STATUS_RESOLVING = 2152398851U,
101 : STATUS_RESOLVED = 2152398859U,
102 : STATUS_CONNECTING_TO = 2152398855U,
103 : STATUS_CONNECTED_TO = 2152398852U,
104 : STATUS_SENDING_TO = 2152398853U,
105 : STATUS_WAITING_FOR = 2152398858U,
106 : STATUS_RECEIVING_FROM = 2152398854U
107 : };
108 :
109 : /* attribute unsigned long connectionFlags; */
110 : NS_IMETHOD GetConnectionFlags(uint32_t *aConnectionFlags) = 0;
111 : NS_IMETHOD SetConnectionFlags(uint32_t aConnectionFlags) = 0;
112 :
113 : enum {
114 : BYPASS_CACHE = 1U,
115 : ANONYMOUS_CONNECT = 2U,
116 : DISABLE_IPV6 = 4U,
117 : NO_PERMANENT_STORAGE = 8U,
118 : DISABLE_IPV4 = 16U,
119 : DISABLE_RFC1918 = 32U,
120 : MITM_OK = 64U,
121 : BE_CONSERVATIVE = 128U
122 : };
123 :
124 : /* attribute octet QoSBits; */
125 : NS_IMETHOD GetQoSBits(uint8_t *aQoSBits) = 0;
126 : NS_IMETHOD SetQoSBits(uint8_t aQoSBits) = 0;
127 :
128 : /* attribute unsigned long recvBufferSize; */
129 : NS_IMETHOD GetRecvBufferSize(uint32_t *aRecvBufferSize) = 0;
130 : NS_IMETHOD SetRecvBufferSize(uint32_t aRecvBufferSize) = 0;
131 :
132 : /* attribute unsigned long sendBufferSize; */
133 : NS_IMETHOD GetSendBufferSize(uint32_t *aSendBufferSize) = 0;
134 : NS_IMETHOD SetSendBufferSize(uint32_t aSendBufferSize) = 0;
135 :
136 : /* attribute boolean keepaliveEnabled; */
137 : NS_IMETHOD GetKeepaliveEnabled(bool *aKeepaliveEnabled) = 0;
138 : NS_IMETHOD SetKeepaliveEnabled(bool aKeepaliveEnabled) = 0;
139 :
140 : /* void setKeepaliveVals (in long keepaliveIdleTime, in long keepaliveRetryInterval); */
141 : NS_IMETHOD SetKeepaliveVals(int32_t keepaliveIdleTime, int32_t keepaliveRetryInterval) = 0;
142 :
143 : /* [noscript] void setFastOpenCallback (in TCPFastOpenPtr aFastOpen); */
144 : NS_IMETHOD SetFastOpenCallback(mozilla::net::TCPFastOpen *aFastOpen) = 0;
145 :
146 : };
147 :
148 : NS_DEFINE_STATIC_IID_ACCESSOR(nsISocketTransport, NS_ISOCKETTRANSPORT_IID)
149 :
150 : /* Use this macro when declaring classes that implement this interface. */
151 : #define NS_DECL_NSISOCKETTRANSPORT \
152 : NS_IMETHOD GetHost(nsACString & aHost) override; \
153 : NS_IMETHOD GetPort(int32_t *aPort) override; \
154 : NS_IMETHOD GetScriptableOriginAttributes(JSContext* cx, JS::MutableHandleValue aOriginAttributes) override; \
155 : NS_IMETHOD SetScriptableOriginAttributes(JSContext* cx, JS::HandleValue aOriginAttributes) override; \
156 : virtual nsresult GetOriginAttributes(mozilla::OriginAttributes *_retval) override; \
157 : virtual nsresult SetOriginAttributes(const mozilla::OriginAttributes & aOriginAttrs) override; \
158 : NS_IMETHOD GetNetworkInterfaceId(nsACString & aNetworkInterfaceId) override; \
159 : NS_IMETHOD SetNetworkInterfaceId(const nsACString & aNetworkInterfaceId) override; \
160 : NS_IMETHOD GetPeerAddr(mozilla::net::NetAddr *_retval) override; \
161 : NS_IMETHOD GetSelfAddr(mozilla::net::NetAddr *_retval) override; \
162 : NS_IMETHOD Bind(mozilla::net::NetAddr *aLocalAddr) override; \
163 : NS_IMETHOD GetScriptablePeerAddr(nsINetAddr * *_retval) override; \
164 : NS_IMETHOD GetScriptableSelfAddr(nsINetAddr * *_retval) override; \
165 : NS_IMETHOD GetSecurityInfo(nsISupports * *aSecurityInfo) override; \
166 : NS_IMETHOD GetSecurityCallbacks(nsIInterfaceRequestor * *aSecurityCallbacks) override; \
167 : NS_IMETHOD SetSecurityCallbacks(nsIInterfaceRequestor *aSecurityCallbacks) override; \
168 : NS_IMETHOD IsAlive(bool *_retval) override; \
169 : NS_IMETHOD GetTimeout(uint32_t aType, uint32_t *_retval) override; \
170 : NS_IMETHOD SetTimeout(uint32_t aType, uint32_t aValue) override; \
171 : NS_IMETHOD SetReuseAddrPort(bool reuseAddrPort) override; \
172 : NS_IMETHOD GetConnectionFlags(uint32_t *aConnectionFlags) override; \
173 : NS_IMETHOD SetConnectionFlags(uint32_t aConnectionFlags) override; \
174 : NS_IMETHOD GetQoSBits(uint8_t *aQoSBits) override; \
175 : NS_IMETHOD SetQoSBits(uint8_t aQoSBits) override; \
176 : NS_IMETHOD GetRecvBufferSize(uint32_t *aRecvBufferSize) override; \
177 : NS_IMETHOD SetRecvBufferSize(uint32_t aRecvBufferSize) override; \
178 : NS_IMETHOD GetSendBufferSize(uint32_t *aSendBufferSize) override; \
179 : NS_IMETHOD SetSendBufferSize(uint32_t aSendBufferSize) override; \
180 : NS_IMETHOD GetKeepaliveEnabled(bool *aKeepaliveEnabled) override; \
181 : NS_IMETHOD SetKeepaliveEnabled(bool aKeepaliveEnabled) override; \
182 : NS_IMETHOD SetKeepaliveVals(int32_t keepaliveIdleTime, int32_t keepaliveRetryInterval) override; \
183 : NS_IMETHOD SetFastOpenCallback(mozilla::net::TCPFastOpen *aFastOpen) override;
184 :
185 : /* Use this macro when declaring the members of this interface when the
186 : class doesn't implement the interface. This is useful for forwarding. */
187 : #define NS_DECL_NON_VIRTUAL_NSISOCKETTRANSPORT \
188 : nsresult GetHost(nsACString & aHost); \
189 : nsresult GetPort(int32_t *aPort); \
190 : nsresult GetScriptableOriginAttributes(JSContext* cx, JS::MutableHandleValue aOriginAttributes); \
191 : nsresult SetScriptableOriginAttributes(JSContext* cx, JS::HandleValue aOriginAttributes); \
192 : nsresult GetOriginAttributes(mozilla::OriginAttributes *_retval); \
193 : nsresult SetOriginAttributes(const mozilla::OriginAttributes & aOriginAttrs); \
194 : nsresult GetNetworkInterfaceId(nsACString & aNetworkInterfaceId); \
195 : nsresult SetNetworkInterfaceId(const nsACString & aNetworkInterfaceId); \
196 : nsresult GetPeerAddr(mozilla::net::NetAddr *_retval); \
197 : nsresult GetSelfAddr(mozilla::net::NetAddr *_retval); \
198 : nsresult Bind(mozilla::net::NetAddr *aLocalAddr); \
199 : nsresult GetScriptablePeerAddr(nsINetAddr * *_retval); \
200 : nsresult GetScriptableSelfAddr(nsINetAddr * *_retval); \
201 : nsresult GetSecurityInfo(nsISupports * *aSecurityInfo); \
202 : nsresult GetSecurityCallbacks(nsIInterfaceRequestor * *aSecurityCallbacks); \
203 : nsresult SetSecurityCallbacks(nsIInterfaceRequestor *aSecurityCallbacks); \
204 : nsresult IsAlive(bool *_retval); \
205 : nsresult GetTimeout(uint32_t aType, uint32_t *_retval); \
206 : nsresult SetTimeout(uint32_t aType, uint32_t aValue); \
207 : nsresult SetReuseAddrPort(bool reuseAddrPort); \
208 : nsresult GetConnectionFlags(uint32_t *aConnectionFlags); \
209 : nsresult SetConnectionFlags(uint32_t aConnectionFlags); \
210 : nsresult GetQoSBits(uint8_t *aQoSBits); \
211 : nsresult SetQoSBits(uint8_t aQoSBits); \
212 : nsresult GetRecvBufferSize(uint32_t *aRecvBufferSize); \
213 : nsresult SetRecvBufferSize(uint32_t aRecvBufferSize); \
214 : nsresult GetSendBufferSize(uint32_t *aSendBufferSize); \
215 : nsresult SetSendBufferSize(uint32_t aSendBufferSize); \
216 : nsresult GetKeepaliveEnabled(bool *aKeepaliveEnabled); \
217 : nsresult SetKeepaliveEnabled(bool aKeepaliveEnabled); \
218 : nsresult SetKeepaliveVals(int32_t keepaliveIdleTime, int32_t keepaliveRetryInterval); \
219 : nsresult SetFastOpenCallback(mozilla::net::TCPFastOpen *aFastOpen);
220 :
221 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
222 : #define NS_FORWARD_NSISOCKETTRANSPORT(_to) \
223 : NS_IMETHOD GetHost(nsACString & aHost) override { return _to GetHost(aHost); } \
224 : NS_IMETHOD GetPort(int32_t *aPort) override { return _to GetPort(aPort); } \
225 : NS_IMETHOD GetScriptableOriginAttributes(JSContext* cx, JS::MutableHandleValue aOriginAttributes) override { return _to GetScriptableOriginAttributes(cx, aOriginAttributes); } \
226 : NS_IMETHOD SetScriptableOriginAttributes(JSContext* cx, JS::HandleValue aOriginAttributes) override { return _to SetScriptableOriginAttributes(cx, aOriginAttributes); } \
227 : virtual nsresult GetOriginAttributes(mozilla::OriginAttributes *_retval) override { return _to GetOriginAttributes(_retval); } \
228 : virtual nsresult SetOriginAttributes(const mozilla::OriginAttributes & aOriginAttrs) override { return _to SetOriginAttributes(aOriginAttrs); } \
229 : NS_IMETHOD GetNetworkInterfaceId(nsACString & aNetworkInterfaceId) override { return _to GetNetworkInterfaceId(aNetworkInterfaceId); } \
230 : NS_IMETHOD SetNetworkInterfaceId(const nsACString & aNetworkInterfaceId) override { return _to SetNetworkInterfaceId(aNetworkInterfaceId); } \
231 : NS_IMETHOD GetPeerAddr(mozilla::net::NetAddr *_retval) override { return _to GetPeerAddr(_retval); } \
232 : NS_IMETHOD GetSelfAddr(mozilla::net::NetAddr *_retval) override { return _to GetSelfAddr(_retval); } \
233 : NS_IMETHOD Bind(mozilla::net::NetAddr *aLocalAddr) override { return _to Bind(aLocalAddr); } \
234 : NS_IMETHOD GetScriptablePeerAddr(nsINetAddr * *_retval) override { return _to GetScriptablePeerAddr(_retval); } \
235 : NS_IMETHOD GetScriptableSelfAddr(nsINetAddr * *_retval) override { return _to GetScriptableSelfAddr(_retval); } \
236 : NS_IMETHOD GetSecurityInfo(nsISupports * *aSecurityInfo) override { return _to GetSecurityInfo(aSecurityInfo); } \
237 : NS_IMETHOD GetSecurityCallbacks(nsIInterfaceRequestor * *aSecurityCallbacks) override { return _to GetSecurityCallbacks(aSecurityCallbacks); } \
238 : NS_IMETHOD SetSecurityCallbacks(nsIInterfaceRequestor *aSecurityCallbacks) override { return _to SetSecurityCallbacks(aSecurityCallbacks); } \
239 : NS_IMETHOD IsAlive(bool *_retval) override { return _to IsAlive(_retval); } \
240 : NS_IMETHOD GetTimeout(uint32_t aType, uint32_t *_retval) override { return _to GetTimeout(aType, _retval); } \
241 : NS_IMETHOD SetTimeout(uint32_t aType, uint32_t aValue) override { return _to SetTimeout(aType, aValue); } \
242 : NS_IMETHOD SetReuseAddrPort(bool reuseAddrPort) override { return _to SetReuseAddrPort(reuseAddrPort); } \
243 : NS_IMETHOD GetConnectionFlags(uint32_t *aConnectionFlags) override { return _to GetConnectionFlags(aConnectionFlags); } \
244 : NS_IMETHOD SetConnectionFlags(uint32_t aConnectionFlags) override { return _to SetConnectionFlags(aConnectionFlags); } \
245 : NS_IMETHOD GetQoSBits(uint8_t *aQoSBits) override { return _to GetQoSBits(aQoSBits); } \
246 : NS_IMETHOD SetQoSBits(uint8_t aQoSBits) override { return _to SetQoSBits(aQoSBits); } \
247 : NS_IMETHOD GetRecvBufferSize(uint32_t *aRecvBufferSize) override { return _to GetRecvBufferSize(aRecvBufferSize); } \
248 : NS_IMETHOD SetRecvBufferSize(uint32_t aRecvBufferSize) override { return _to SetRecvBufferSize(aRecvBufferSize); } \
249 : NS_IMETHOD GetSendBufferSize(uint32_t *aSendBufferSize) override { return _to GetSendBufferSize(aSendBufferSize); } \
250 : NS_IMETHOD SetSendBufferSize(uint32_t aSendBufferSize) override { return _to SetSendBufferSize(aSendBufferSize); } \
251 : NS_IMETHOD GetKeepaliveEnabled(bool *aKeepaliveEnabled) override { return _to GetKeepaliveEnabled(aKeepaliveEnabled); } \
252 : NS_IMETHOD SetKeepaliveEnabled(bool aKeepaliveEnabled) override { return _to SetKeepaliveEnabled(aKeepaliveEnabled); } \
253 : NS_IMETHOD SetKeepaliveVals(int32_t keepaliveIdleTime, int32_t keepaliveRetryInterval) override { return _to SetKeepaliveVals(keepaliveIdleTime, keepaliveRetryInterval); } \
254 : NS_IMETHOD SetFastOpenCallback(mozilla::net::TCPFastOpen *aFastOpen) override { return _to SetFastOpenCallback(aFastOpen); }
255 :
256 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
257 : #define NS_FORWARD_SAFE_NSISOCKETTRANSPORT(_to) \
258 : NS_IMETHOD GetHost(nsACString & aHost) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHost(aHost); } \
259 : NS_IMETHOD GetPort(int32_t *aPort) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPort(aPort); } \
260 : NS_IMETHOD GetScriptableOriginAttributes(JSContext* cx, JS::MutableHandleValue aOriginAttributes) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetScriptableOriginAttributes(cx, aOriginAttributes); } \
261 : NS_IMETHOD SetScriptableOriginAttributes(JSContext* cx, JS::HandleValue aOriginAttributes) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetScriptableOriginAttributes(cx, aOriginAttributes); } \
262 : virtual nsresult GetOriginAttributes(mozilla::OriginAttributes *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOriginAttributes(_retval); } \
263 : virtual nsresult SetOriginAttributes(const mozilla::OriginAttributes & aOriginAttrs) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetOriginAttributes(aOriginAttrs); } \
264 : NS_IMETHOD GetNetworkInterfaceId(nsACString & aNetworkInterfaceId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNetworkInterfaceId(aNetworkInterfaceId); } \
265 : NS_IMETHOD SetNetworkInterfaceId(const nsACString & aNetworkInterfaceId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetNetworkInterfaceId(aNetworkInterfaceId); } \
266 : NS_IMETHOD GetPeerAddr(mozilla::net::NetAddr *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPeerAddr(_retval); } \
267 : NS_IMETHOD GetSelfAddr(mozilla::net::NetAddr *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSelfAddr(_retval); } \
268 : NS_IMETHOD Bind(mozilla::net::NetAddr *aLocalAddr) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Bind(aLocalAddr); } \
269 : NS_IMETHOD GetScriptablePeerAddr(nsINetAddr * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetScriptablePeerAddr(_retval); } \
270 : NS_IMETHOD GetScriptableSelfAddr(nsINetAddr * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetScriptableSelfAddr(_retval); } \
271 : NS_IMETHOD GetSecurityInfo(nsISupports * *aSecurityInfo) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSecurityInfo(aSecurityInfo); } \
272 : NS_IMETHOD GetSecurityCallbacks(nsIInterfaceRequestor * *aSecurityCallbacks) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSecurityCallbacks(aSecurityCallbacks); } \
273 : NS_IMETHOD SetSecurityCallbacks(nsIInterfaceRequestor *aSecurityCallbacks) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSecurityCallbacks(aSecurityCallbacks); } \
274 : NS_IMETHOD IsAlive(bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->IsAlive(_retval); } \
275 : NS_IMETHOD GetTimeout(uint32_t aType, uint32_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTimeout(aType, _retval); } \
276 : NS_IMETHOD SetTimeout(uint32_t aType, uint32_t aValue) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetTimeout(aType, aValue); } \
277 : NS_IMETHOD SetReuseAddrPort(bool reuseAddrPort) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetReuseAddrPort(reuseAddrPort); } \
278 : NS_IMETHOD GetConnectionFlags(uint32_t *aConnectionFlags) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetConnectionFlags(aConnectionFlags); } \
279 : NS_IMETHOD SetConnectionFlags(uint32_t aConnectionFlags) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetConnectionFlags(aConnectionFlags); } \
280 : NS_IMETHOD GetQoSBits(uint8_t *aQoSBits) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetQoSBits(aQoSBits); } \
281 : NS_IMETHOD SetQoSBits(uint8_t aQoSBits) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetQoSBits(aQoSBits); } \
282 : NS_IMETHOD GetRecvBufferSize(uint32_t *aRecvBufferSize) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRecvBufferSize(aRecvBufferSize); } \
283 : NS_IMETHOD SetRecvBufferSize(uint32_t aRecvBufferSize) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetRecvBufferSize(aRecvBufferSize); } \
284 : NS_IMETHOD GetSendBufferSize(uint32_t *aSendBufferSize) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSendBufferSize(aSendBufferSize); } \
285 : NS_IMETHOD SetSendBufferSize(uint32_t aSendBufferSize) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSendBufferSize(aSendBufferSize); } \
286 : NS_IMETHOD GetKeepaliveEnabled(bool *aKeepaliveEnabled) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetKeepaliveEnabled(aKeepaliveEnabled); } \
287 : NS_IMETHOD SetKeepaliveEnabled(bool aKeepaliveEnabled) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetKeepaliveEnabled(aKeepaliveEnabled); } \
288 : NS_IMETHOD SetKeepaliveVals(int32_t keepaliveIdleTime, int32_t keepaliveRetryInterval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetKeepaliveVals(keepaliveIdleTime, keepaliveRetryInterval); } \
289 : NS_IMETHOD SetFastOpenCallback(mozilla::net::TCPFastOpen *aFastOpen) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFastOpenCallback(aFastOpen); }
290 :
291 : #if 0
292 : /* Use the code below as a template for the implementation class for this interface. */
293 :
294 : /* Header file */
295 : class nsSocketTransport : public nsISocketTransport
296 : {
297 : public:
298 : NS_DECL_ISUPPORTS
299 : NS_DECL_NSISOCKETTRANSPORT
300 :
301 : nsSocketTransport();
302 :
303 : private:
304 : ~nsSocketTransport();
305 :
306 : protected:
307 : /* additional members */
308 : };
309 :
310 : /* Implementation file */
311 : NS_IMPL_ISUPPORTS(nsSocketTransport, nsISocketTransport)
312 :
313 : nsSocketTransport::nsSocketTransport()
314 : {
315 : /* member initializers and constructor code */
316 : }
317 :
318 : nsSocketTransport::~nsSocketTransport()
319 : {
320 : /* destructor code */
321 : }
322 :
323 : /* readonly attribute AUTF8String host; */
324 : NS_IMETHODIMP nsSocketTransport::GetHost(nsACString & aHost)
325 : {
326 : return NS_ERROR_NOT_IMPLEMENTED;
327 : }
328 :
329 : /* readonly attribute long port; */
330 : NS_IMETHODIMP nsSocketTransport::GetPort(int32_t *aPort)
331 : {
332 : return NS_ERROR_NOT_IMPLEMENTED;
333 : }
334 :
335 : /* [binaryname(ScriptableOriginAttributes),implicit_jscontext] attribute jsval originAttributes; */
336 : NS_IMETHODIMP nsSocketTransport::GetScriptableOriginAttributes(JSContext* cx, JS::MutableHandleValue aOriginAttributes)
337 : {
338 : return NS_ERROR_NOT_IMPLEMENTED;
339 : }
340 : NS_IMETHODIMP nsSocketTransport::SetScriptableOriginAttributes(JSContext* cx, JS::HandleValue aOriginAttributes)
341 : {
342 : return NS_ERROR_NOT_IMPLEMENTED;
343 : }
344 :
345 : /* [binaryname(GetOriginAttributes),noscript,nostdcall] OriginAttributes binaryGetOriginAttributes (); */
346 : nsresult nsSocketTransport::GetOriginAttributes(mozilla::OriginAttributes *_retval)
347 : {
348 : return NS_ERROR_NOT_IMPLEMENTED;
349 : }
350 :
351 : /* [binaryname(SetOriginAttributes),noscript,nostdcall] void binarySetOriginAttributes (in const_OriginAttributesRef aOriginAttrs); */
352 : nsresult nsSocketTransport::SetOriginAttributes(const mozilla::OriginAttributes & aOriginAttrs)
353 : {
354 : return NS_ERROR_NOT_IMPLEMENTED;
355 : }
356 :
357 : /* attribute ACString networkInterfaceId; */
358 : NS_IMETHODIMP nsSocketTransport::GetNetworkInterfaceId(nsACString & aNetworkInterfaceId)
359 : {
360 : return NS_ERROR_NOT_IMPLEMENTED;
361 : }
362 : NS_IMETHODIMP nsSocketTransport::SetNetworkInterfaceId(const nsACString & aNetworkInterfaceId)
363 : {
364 : return NS_ERROR_NOT_IMPLEMENTED;
365 : }
366 :
367 : /* [noscript] NetAddr getPeerAddr (); */
368 : NS_IMETHODIMP nsSocketTransport::GetPeerAddr(mozilla::net::NetAddr *_retval)
369 : {
370 : return NS_ERROR_NOT_IMPLEMENTED;
371 : }
372 :
373 : /* [noscript] NetAddr getSelfAddr (); */
374 : NS_IMETHODIMP nsSocketTransport::GetSelfAddr(mozilla::net::NetAddr *_retval)
375 : {
376 : return NS_ERROR_NOT_IMPLEMENTED;
377 : }
378 :
379 : /* [noscript] void bind (in NetAddrPtr aLocalAddr); */
380 : NS_IMETHODIMP nsSocketTransport::Bind(mozilla::net::NetAddr *aLocalAddr)
381 : {
382 : return NS_ERROR_NOT_IMPLEMENTED;
383 : }
384 :
385 : /* nsINetAddr getScriptablePeerAddr (); */
386 : NS_IMETHODIMP nsSocketTransport::GetScriptablePeerAddr(nsINetAddr * *_retval)
387 : {
388 : return NS_ERROR_NOT_IMPLEMENTED;
389 : }
390 :
391 : /* nsINetAddr getScriptableSelfAddr (); */
392 : NS_IMETHODIMP nsSocketTransport::GetScriptableSelfAddr(nsINetAddr * *_retval)
393 : {
394 : return NS_ERROR_NOT_IMPLEMENTED;
395 : }
396 :
397 : /* readonly attribute nsISupports securityInfo; */
398 : NS_IMETHODIMP nsSocketTransport::GetSecurityInfo(nsISupports * *aSecurityInfo)
399 : {
400 : return NS_ERROR_NOT_IMPLEMENTED;
401 : }
402 :
403 : /* attribute nsIInterfaceRequestor securityCallbacks; */
404 : NS_IMETHODIMP nsSocketTransport::GetSecurityCallbacks(nsIInterfaceRequestor * *aSecurityCallbacks)
405 : {
406 : return NS_ERROR_NOT_IMPLEMENTED;
407 : }
408 : NS_IMETHODIMP nsSocketTransport::SetSecurityCallbacks(nsIInterfaceRequestor *aSecurityCallbacks)
409 : {
410 : return NS_ERROR_NOT_IMPLEMENTED;
411 : }
412 :
413 : /* boolean isAlive (); */
414 : NS_IMETHODIMP nsSocketTransport::IsAlive(bool *_retval)
415 : {
416 : return NS_ERROR_NOT_IMPLEMENTED;
417 : }
418 :
419 : /* unsigned long getTimeout (in unsigned long aType); */
420 : NS_IMETHODIMP nsSocketTransport::GetTimeout(uint32_t aType, uint32_t *_retval)
421 : {
422 : return NS_ERROR_NOT_IMPLEMENTED;
423 : }
424 :
425 : /* void setTimeout (in unsigned long aType, in unsigned long aValue); */
426 : NS_IMETHODIMP nsSocketTransport::SetTimeout(uint32_t aType, uint32_t aValue)
427 : {
428 : return NS_ERROR_NOT_IMPLEMENTED;
429 : }
430 :
431 : /* void setReuseAddrPort (in bool reuseAddrPort); */
432 : NS_IMETHODIMP nsSocketTransport::SetReuseAddrPort(bool reuseAddrPort)
433 : {
434 : return NS_ERROR_NOT_IMPLEMENTED;
435 : }
436 :
437 : /* attribute unsigned long connectionFlags; */
438 : NS_IMETHODIMP nsSocketTransport::GetConnectionFlags(uint32_t *aConnectionFlags)
439 : {
440 : return NS_ERROR_NOT_IMPLEMENTED;
441 : }
442 : NS_IMETHODIMP nsSocketTransport::SetConnectionFlags(uint32_t aConnectionFlags)
443 : {
444 : return NS_ERROR_NOT_IMPLEMENTED;
445 : }
446 :
447 : /* attribute octet QoSBits; */
448 : NS_IMETHODIMP nsSocketTransport::GetQoSBits(uint8_t *aQoSBits)
449 : {
450 : return NS_ERROR_NOT_IMPLEMENTED;
451 : }
452 : NS_IMETHODIMP nsSocketTransport::SetQoSBits(uint8_t aQoSBits)
453 : {
454 : return NS_ERROR_NOT_IMPLEMENTED;
455 : }
456 :
457 : /* attribute unsigned long recvBufferSize; */
458 : NS_IMETHODIMP nsSocketTransport::GetRecvBufferSize(uint32_t *aRecvBufferSize)
459 : {
460 : return NS_ERROR_NOT_IMPLEMENTED;
461 : }
462 : NS_IMETHODIMP nsSocketTransport::SetRecvBufferSize(uint32_t aRecvBufferSize)
463 : {
464 : return NS_ERROR_NOT_IMPLEMENTED;
465 : }
466 :
467 : /* attribute unsigned long sendBufferSize; */
468 : NS_IMETHODIMP nsSocketTransport::GetSendBufferSize(uint32_t *aSendBufferSize)
469 : {
470 : return NS_ERROR_NOT_IMPLEMENTED;
471 : }
472 : NS_IMETHODIMP nsSocketTransport::SetSendBufferSize(uint32_t aSendBufferSize)
473 : {
474 : return NS_ERROR_NOT_IMPLEMENTED;
475 : }
476 :
477 : /* attribute boolean keepaliveEnabled; */
478 : NS_IMETHODIMP nsSocketTransport::GetKeepaliveEnabled(bool *aKeepaliveEnabled)
479 : {
480 : return NS_ERROR_NOT_IMPLEMENTED;
481 : }
482 : NS_IMETHODIMP nsSocketTransport::SetKeepaliveEnabled(bool aKeepaliveEnabled)
483 : {
484 : return NS_ERROR_NOT_IMPLEMENTED;
485 : }
486 :
487 : /* void setKeepaliveVals (in long keepaliveIdleTime, in long keepaliveRetryInterval); */
488 : NS_IMETHODIMP nsSocketTransport::SetKeepaliveVals(int32_t keepaliveIdleTime, int32_t keepaliveRetryInterval)
489 : {
490 : return NS_ERROR_NOT_IMPLEMENTED;
491 : }
492 :
493 : /* [noscript] void setFastOpenCallback (in TCPFastOpenPtr aFastOpen); */
494 : NS_IMETHODIMP nsSocketTransport::SetFastOpenCallback(mozilla::net::TCPFastOpen *aFastOpen)
495 : {
496 : return NS_ERROR_NOT_IMPLEMENTED;
497 : }
498 :
499 : /* End of implementation class template. */
500 : #endif
501 :
502 :
503 : #endif /* __gen_nsISocketTransport_h__ */
|