Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsIDOMDataChannel.idl
3 : */
4 :
5 : #ifndef __gen_nsIDOMDataChannel_h__
6 : #define __gen_nsIDOMDataChannel_h__
7 :
8 :
9 : #ifndef __gen_nsIDOMEventTarget_h__
10 : #include "nsIDOMEventTarget.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 : #ifdef GetBinaryType
20 : // Windows apparently has a #define for GetBinaryType...
21 : #undef GetBinaryType
22 : #endif
23 : class nsIVariant; /* forward declaration */
24 :
25 :
26 : /* starting interface: nsIDOMDataChannel */
27 : #define NS_IDOMDATACHANNEL_IID_STR "b00a4ca7-312e-4926-84f6-8ebb43e53d83"
28 :
29 : #define NS_IDOMDATACHANNEL_IID \
30 : {0xb00a4ca7, 0x312e, 0x4926, \
31 : { 0x84, 0xf6, 0x8e, 0xbb, 0x43, 0xe5, 0x3d, 0x83 }}
32 :
33 0 : class NS_NO_VTABLE nsIDOMDataChannel : public nsIDOMEventTarget {
34 : public:
35 :
36 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDOMDATACHANNEL_IID)
37 :
38 : /* readonly attribute DOMString label; */
39 : NS_IMETHOD GetLabel(nsAString & aLabel) = 0;
40 :
41 : /* readonly attribute DOMString protocol; */
42 : NS_IMETHOD GetProtocol(nsAString & aProtocol) = 0;
43 :
44 : /* readonly attribute boolean reliable; */
45 : NS_IMETHOD GetReliable(bool *aReliable) = 0;
46 :
47 : /* readonly attribute boolean ordered; */
48 : NS_IMETHOD GetOrdered(bool *aOrdered) = 0;
49 :
50 : /* readonly attribute DOMString readyState; */
51 : NS_IMETHOD GetReadyState(nsAString & aReadyState) = 0;
52 :
53 : /* readonly attribute unsigned long bufferedAmount; */
54 : NS_IMETHOD GetBufferedAmount(uint32_t *aBufferedAmount) = 0;
55 :
56 : /* readonly attribute unsigned short id; */
57 : NS_IMETHOD GetId(uint16_t *aId) = 0;
58 :
59 : /* [implicit_jscontext] attribute jsval onopen; */
60 : NS_IMETHOD GetOnopen(JSContext* cx, JS::MutableHandleValue aOnopen) = 0;
61 : NS_IMETHOD SetOnopen(JSContext* cx, JS::HandleValue aOnopen) = 0;
62 :
63 : /* [implicit_jscontext] attribute jsval onerror; */
64 : NS_IMETHOD GetOnerror(JSContext* cx, JS::MutableHandleValue aOnerror) = 0;
65 : NS_IMETHOD SetOnerror(JSContext* cx, JS::HandleValue aOnerror) = 0;
66 :
67 : /* [implicit_jscontext] attribute jsval onclose; */
68 : NS_IMETHOD GetOnclose(JSContext* cx, JS::MutableHandleValue aOnclose) = 0;
69 : NS_IMETHOD SetOnclose(JSContext* cx, JS::HandleValue aOnclose) = 0;
70 :
71 : /* [implicit_jscontext] attribute jsval onmessage; */
72 : NS_IMETHOD GetOnmessage(JSContext* cx, JS::MutableHandleValue aOnmessage) = 0;
73 : NS_IMETHOD SetOnmessage(JSContext* cx, JS::HandleValue aOnmessage) = 0;
74 :
75 : /* attribute DOMString binaryType; */
76 : NS_IMETHOD GetBinaryType(nsAString & aBinaryType) = 0;
77 : NS_IMETHOD SetBinaryType(const nsAString & aBinaryType) = 0;
78 :
79 : /* void close (); */
80 : NS_IMETHOD Close(void) = 0;
81 :
82 : };
83 :
84 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIDOMDataChannel, NS_IDOMDATACHANNEL_IID)
85 :
86 : /* Use this macro when declaring classes that implement this interface. */
87 : #define NS_DECL_NSIDOMDATACHANNEL \
88 : NS_IMETHOD GetLabel(nsAString & aLabel) override; \
89 : NS_IMETHOD GetProtocol(nsAString & aProtocol) override; \
90 : NS_IMETHOD GetReliable(bool *aReliable) override; \
91 : NS_IMETHOD GetOrdered(bool *aOrdered) override; \
92 : NS_IMETHOD GetReadyState(nsAString & aReadyState) override; \
93 : NS_IMETHOD GetBufferedAmount(uint32_t *aBufferedAmount) override; \
94 : NS_IMETHOD GetId(uint16_t *aId) override; \
95 : NS_IMETHOD GetOnopen(JSContext* cx, JS::MutableHandleValue aOnopen) override; \
96 : NS_IMETHOD SetOnopen(JSContext* cx, JS::HandleValue aOnopen) override; \
97 : NS_IMETHOD GetOnerror(JSContext* cx, JS::MutableHandleValue aOnerror) override; \
98 : NS_IMETHOD SetOnerror(JSContext* cx, JS::HandleValue aOnerror) override; \
99 : NS_IMETHOD GetOnclose(JSContext* cx, JS::MutableHandleValue aOnclose) override; \
100 : NS_IMETHOD SetOnclose(JSContext* cx, JS::HandleValue aOnclose) override; \
101 : NS_IMETHOD GetOnmessage(JSContext* cx, JS::MutableHandleValue aOnmessage) override; \
102 : NS_IMETHOD SetOnmessage(JSContext* cx, JS::HandleValue aOnmessage) override; \
103 : NS_IMETHOD GetBinaryType(nsAString & aBinaryType) override; \
104 : NS_IMETHOD SetBinaryType(const nsAString & aBinaryType) override; \
105 : NS_IMETHOD Close(void) override;
106 :
107 : /* Use this macro when declaring the members of this interface when the
108 : class doesn't implement the interface. This is useful for forwarding. */
109 : #define NS_DECL_NON_VIRTUAL_NSIDOMDATACHANNEL \
110 : nsresult GetLabel(nsAString & aLabel); \
111 : nsresult GetProtocol(nsAString & aProtocol); \
112 : nsresult GetReliable(bool *aReliable); \
113 : nsresult GetOrdered(bool *aOrdered); \
114 : nsresult GetReadyState(nsAString & aReadyState); \
115 : nsresult GetBufferedAmount(uint32_t *aBufferedAmount); \
116 : nsresult GetId(uint16_t *aId); \
117 : nsresult GetOnopen(JSContext* cx, JS::MutableHandleValue aOnopen); \
118 : nsresult SetOnopen(JSContext* cx, JS::HandleValue aOnopen); \
119 : nsresult GetOnerror(JSContext* cx, JS::MutableHandleValue aOnerror); \
120 : nsresult SetOnerror(JSContext* cx, JS::HandleValue aOnerror); \
121 : nsresult GetOnclose(JSContext* cx, JS::MutableHandleValue aOnclose); \
122 : nsresult SetOnclose(JSContext* cx, JS::HandleValue aOnclose); \
123 : nsresult GetOnmessage(JSContext* cx, JS::MutableHandleValue aOnmessage); \
124 : nsresult SetOnmessage(JSContext* cx, JS::HandleValue aOnmessage); \
125 : nsresult GetBinaryType(nsAString & aBinaryType); \
126 : nsresult SetBinaryType(const nsAString & aBinaryType); \
127 : nsresult Close(void);
128 :
129 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
130 : #define NS_FORWARD_NSIDOMDATACHANNEL(_to) \
131 : NS_IMETHOD GetLabel(nsAString & aLabel) override { return _to GetLabel(aLabel); } \
132 : NS_IMETHOD GetProtocol(nsAString & aProtocol) override { return _to GetProtocol(aProtocol); } \
133 : NS_IMETHOD GetReliable(bool *aReliable) override { return _to GetReliable(aReliable); } \
134 : NS_IMETHOD GetOrdered(bool *aOrdered) override { return _to GetOrdered(aOrdered); } \
135 : NS_IMETHOD GetReadyState(nsAString & aReadyState) override { return _to GetReadyState(aReadyState); } \
136 : NS_IMETHOD GetBufferedAmount(uint32_t *aBufferedAmount) override { return _to GetBufferedAmount(aBufferedAmount); } \
137 : NS_IMETHOD GetId(uint16_t *aId) override { return _to GetId(aId); } \
138 : NS_IMETHOD GetOnopen(JSContext* cx, JS::MutableHandleValue aOnopen) override { return _to GetOnopen(cx, aOnopen); } \
139 : NS_IMETHOD SetOnopen(JSContext* cx, JS::HandleValue aOnopen) override { return _to SetOnopen(cx, aOnopen); } \
140 : NS_IMETHOD GetOnerror(JSContext* cx, JS::MutableHandleValue aOnerror) override { return _to GetOnerror(cx, aOnerror); } \
141 : NS_IMETHOD SetOnerror(JSContext* cx, JS::HandleValue aOnerror) override { return _to SetOnerror(cx, aOnerror); } \
142 : NS_IMETHOD GetOnclose(JSContext* cx, JS::MutableHandleValue aOnclose) override { return _to GetOnclose(cx, aOnclose); } \
143 : NS_IMETHOD SetOnclose(JSContext* cx, JS::HandleValue aOnclose) override { return _to SetOnclose(cx, aOnclose); } \
144 : NS_IMETHOD GetOnmessage(JSContext* cx, JS::MutableHandleValue aOnmessage) override { return _to GetOnmessage(cx, aOnmessage); } \
145 : NS_IMETHOD SetOnmessage(JSContext* cx, JS::HandleValue aOnmessage) override { return _to SetOnmessage(cx, aOnmessage); } \
146 : NS_IMETHOD GetBinaryType(nsAString & aBinaryType) override { return _to GetBinaryType(aBinaryType); } \
147 : NS_IMETHOD SetBinaryType(const nsAString & aBinaryType) override { return _to SetBinaryType(aBinaryType); } \
148 : NS_IMETHOD Close(void) override { return _to Close(); }
149 :
150 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
151 : #define NS_FORWARD_SAFE_NSIDOMDATACHANNEL(_to) \
152 : NS_IMETHOD GetLabel(nsAString & aLabel) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLabel(aLabel); } \
153 : NS_IMETHOD GetProtocol(nsAString & aProtocol) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProtocol(aProtocol); } \
154 : NS_IMETHOD GetReliable(bool *aReliable) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetReliable(aReliable); } \
155 : NS_IMETHOD GetOrdered(bool *aOrdered) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOrdered(aOrdered); } \
156 : NS_IMETHOD GetReadyState(nsAString & aReadyState) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetReadyState(aReadyState); } \
157 : NS_IMETHOD GetBufferedAmount(uint32_t *aBufferedAmount) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBufferedAmount(aBufferedAmount); } \
158 : NS_IMETHOD GetId(uint16_t *aId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetId(aId); } \
159 : NS_IMETHOD GetOnopen(JSContext* cx, JS::MutableHandleValue aOnopen) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOnopen(cx, aOnopen); } \
160 : NS_IMETHOD SetOnopen(JSContext* cx, JS::HandleValue aOnopen) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetOnopen(cx, aOnopen); } \
161 : NS_IMETHOD GetOnerror(JSContext* cx, JS::MutableHandleValue aOnerror) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOnerror(cx, aOnerror); } \
162 : NS_IMETHOD SetOnerror(JSContext* cx, JS::HandleValue aOnerror) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetOnerror(cx, aOnerror); } \
163 : NS_IMETHOD GetOnclose(JSContext* cx, JS::MutableHandleValue aOnclose) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOnclose(cx, aOnclose); } \
164 : NS_IMETHOD SetOnclose(JSContext* cx, JS::HandleValue aOnclose) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetOnclose(cx, aOnclose); } \
165 : NS_IMETHOD GetOnmessage(JSContext* cx, JS::MutableHandleValue aOnmessage) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOnmessage(cx, aOnmessage); } \
166 : NS_IMETHOD SetOnmessage(JSContext* cx, JS::HandleValue aOnmessage) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetOnmessage(cx, aOnmessage); } \
167 : NS_IMETHOD GetBinaryType(nsAString & aBinaryType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBinaryType(aBinaryType); } \
168 : NS_IMETHOD SetBinaryType(const nsAString & aBinaryType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetBinaryType(aBinaryType); } \
169 : NS_IMETHOD Close(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Close(); }
170 :
171 : #if 0
172 : /* Use the code below as a template for the implementation class for this interface. */
173 :
174 : /* Header file */
175 : class nsDOMDataChannel : public nsIDOMDataChannel
176 : {
177 : public:
178 : NS_DECL_ISUPPORTS
179 : NS_DECL_NSIDOMDATACHANNEL
180 :
181 : nsDOMDataChannel();
182 :
183 : private:
184 : ~nsDOMDataChannel();
185 :
186 : protected:
187 : /* additional members */
188 : };
189 :
190 : /* Implementation file */
191 : NS_IMPL_ISUPPORTS(nsDOMDataChannel, nsIDOMDataChannel)
192 :
193 : nsDOMDataChannel::nsDOMDataChannel()
194 : {
195 : /* member initializers and constructor code */
196 : }
197 :
198 : nsDOMDataChannel::~nsDOMDataChannel()
199 : {
200 : /* destructor code */
201 : }
202 :
203 : /* readonly attribute DOMString label; */
204 : NS_IMETHODIMP nsDOMDataChannel::GetLabel(nsAString & aLabel)
205 : {
206 : return NS_ERROR_NOT_IMPLEMENTED;
207 : }
208 :
209 : /* readonly attribute DOMString protocol; */
210 : NS_IMETHODIMP nsDOMDataChannel::GetProtocol(nsAString & aProtocol)
211 : {
212 : return NS_ERROR_NOT_IMPLEMENTED;
213 : }
214 :
215 : /* readonly attribute boolean reliable; */
216 : NS_IMETHODIMP nsDOMDataChannel::GetReliable(bool *aReliable)
217 : {
218 : return NS_ERROR_NOT_IMPLEMENTED;
219 : }
220 :
221 : /* readonly attribute boolean ordered; */
222 : NS_IMETHODIMP nsDOMDataChannel::GetOrdered(bool *aOrdered)
223 : {
224 : return NS_ERROR_NOT_IMPLEMENTED;
225 : }
226 :
227 : /* readonly attribute DOMString readyState; */
228 : NS_IMETHODIMP nsDOMDataChannel::GetReadyState(nsAString & aReadyState)
229 : {
230 : return NS_ERROR_NOT_IMPLEMENTED;
231 : }
232 :
233 : /* readonly attribute unsigned long bufferedAmount; */
234 : NS_IMETHODIMP nsDOMDataChannel::GetBufferedAmount(uint32_t *aBufferedAmount)
235 : {
236 : return NS_ERROR_NOT_IMPLEMENTED;
237 : }
238 :
239 : /* readonly attribute unsigned short id; */
240 : NS_IMETHODIMP nsDOMDataChannel::GetId(uint16_t *aId)
241 : {
242 : return NS_ERROR_NOT_IMPLEMENTED;
243 : }
244 :
245 : /* [implicit_jscontext] attribute jsval onopen; */
246 : NS_IMETHODIMP nsDOMDataChannel::GetOnopen(JSContext* cx, JS::MutableHandleValue aOnopen)
247 : {
248 : return NS_ERROR_NOT_IMPLEMENTED;
249 : }
250 : NS_IMETHODIMP nsDOMDataChannel::SetOnopen(JSContext* cx, JS::HandleValue aOnopen)
251 : {
252 : return NS_ERROR_NOT_IMPLEMENTED;
253 : }
254 :
255 : /* [implicit_jscontext] attribute jsval onerror; */
256 : NS_IMETHODIMP nsDOMDataChannel::GetOnerror(JSContext* cx, JS::MutableHandleValue aOnerror)
257 : {
258 : return NS_ERROR_NOT_IMPLEMENTED;
259 : }
260 : NS_IMETHODIMP nsDOMDataChannel::SetOnerror(JSContext* cx, JS::HandleValue aOnerror)
261 : {
262 : return NS_ERROR_NOT_IMPLEMENTED;
263 : }
264 :
265 : /* [implicit_jscontext] attribute jsval onclose; */
266 : NS_IMETHODIMP nsDOMDataChannel::GetOnclose(JSContext* cx, JS::MutableHandleValue aOnclose)
267 : {
268 : return NS_ERROR_NOT_IMPLEMENTED;
269 : }
270 : NS_IMETHODIMP nsDOMDataChannel::SetOnclose(JSContext* cx, JS::HandleValue aOnclose)
271 : {
272 : return NS_ERROR_NOT_IMPLEMENTED;
273 : }
274 :
275 : /* [implicit_jscontext] attribute jsval onmessage; */
276 : NS_IMETHODIMP nsDOMDataChannel::GetOnmessage(JSContext* cx, JS::MutableHandleValue aOnmessage)
277 : {
278 : return NS_ERROR_NOT_IMPLEMENTED;
279 : }
280 : NS_IMETHODIMP nsDOMDataChannel::SetOnmessage(JSContext* cx, JS::HandleValue aOnmessage)
281 : {
282 : return NS_ERROR_NOT_IMPLEMENTED;
283 : }
284 :
285 : /* attribute DOMString binaryType; */
286 : NS_IMETHODIMP nsDOMDataChannel::GetBinaryType(nsAString & aBinaryType)
287 : {
288 : return NS_ERROR_NOT_IMPLEMENTED;
289 : }
290 : NS_IMETHODIMP nsDOMDataChannel::SetBinaryType(const nsAString & aBinaryType)
291 : {
292 : return NS_ERROR_NOT_IMPLEMENTED;
293 : }
294 :
295 : /* void close (); */
296 : NS_IMETHODIMP nsDOMDataChannel::Close()
297 : {
298 : return NS_ERROR_NOT_IMPLEMENTED;
299 : }
300 :
301 : /* End of implementation class template. */
302 : #endif
303 :
304 :
305 : #endif /* __gen_nsIDOMDataChannel_h__ */
|