1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM /builds/slave/m-beta-lnx-codecoverage/build/content/base/public/nsIWebSocket.idl
3 : */
4 :
5 : #ifndef __gen_nsIWebSocket_h__
6 : #define __gen_nsIWebSocket_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 nsIDOMEventListener; /* forward declaration */
18 :
19 : class nsIPrincipal; /* forward declaration */
20 :
21 : class nsIScriptContext; /* forward declaration */
22 :
23 : class nsPIDOMWindow; /* forward declaration */
24 :
25 : class nsIDOMDOMStringList; /* forward declaration */
26 :
27 : class nsIVariant; /* forward declaration */
28 :
29 : #include "nsTArray.h"
30 : class nsString;
31 :
32 : /* starting interface: nsIWebSocket */
33 : #define NS_IWEBSOCKET_IID_STR "f463b9b5-1408-4057-9224-e4f5bc33f17b"
34 :
35 : #define NS_IWEBSOCKET_IID \
36 : {0xf463b9b5, 0x1408, 0x4057, \
37 : { 0x92, 0x24, 0xe4, 0xf5, 0xbc, 0x33, 0xf1, 0x7b }}
38 :
39 0 : class NS_NO_VTABLE NS_SCRIPTABLE nsIWebSocket : public nsISupports {
40 : public:
41 :
42 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IWEBSOCKET_IID)
43 :
44 : /* readonly attribute DOMString url; */
45 : NS_SCRIPTABLE NS_IMETHOD GetUrl(nsAString & aUrl) = 0;
46 :
47 : /* readonly attribute DOMString extensions; */
48 : NS_SCRIPTABLE NS_IMETHOD GetExtensions(nsAString & aExtensions) = 0;
49 :
50 : /* readonly attribute DOMString protocol; */
51 : NS_SCRIPTABLE NS_IMETHOD GetProtocol(nsAString & aProtocol) = 0;
52 :
53 : enum {
54 : CONNECTING = 0U,
55 : OPEN = 1U,
56 : CLOSING = 2U,
57 : CLOSED = 3U
58 : };
59 :
60 : /* readonly attribute unsigned short readyState; */
61 : NS_SCRIPTABLE NS_IMETHOD GetReadyState(PRUint16 *aReadyState) = 0;
62 :
63 : /* readonly attribute unsigned long bufferedAmount; */
64 : NS_SCRIPTABLE NS_IMETHOD GetBufferedAmount(PRUint32 *aBufferedAmount) = 0;
65 :
66 : /* attribute DOMString binaryType; */
67 : NS_SCRIPTABLE NS_IMETHOD GetBinaryType(nsAString & aBinaryType) = 0;
68 : NS_SCRIPTABLE NS_IMETHOD SetBinaryType(const nsAString & aBinaryType) = 0;
69 :
70 : /* attribute nsIDOMEventListener onopen; */
71 : NS_SCRIPTABLE NS_IMETHOD GetOnopen(nsIDOMEventListener * *aOnopen) = 0;
72 : NS_SCRIPTABLE NS_IMETHOD SetOnopen(nsIDOMEventListener *aOnopen) = 0;
73 :
74 : /* attribute nsIDOMEventListener onmessage; */
75 : NS_SCRIPTABLE NS_IMETHOD GetOnmessage(nsIDOMEventListener * *aOnmessage) = 0;
76 : NS_SCRIPTABLE NS_IMETHOD SetOnmessage(nsIDOMEventListener *aOnmessage) = 0;
77 :
78 : /* attribute nsIDOMEventListener onerror; */
79 : NS_SCRIPTABLE NS_IMETHOD GetOnerror(nsIDOMEventListener * *aOnerror) = 0;
80 : NS_SCRIPTABLE NS_IMETHOD SetOnerror(nsIDOMEventListener *aOnerror) = 0;
81 :
82 : /* attribute nsIDOMEventListener onclose; */
83 : NS_SCRIPTABLE NS_IMETHOD GetOnclose(nsIDOMEventListener * *aOnclose) = 0;
84 : NS_SCRIPTABLE NS_IMETHOD SetOnclose(nsIDOMEventListener *aOnclose) = 0;
85 :
86 : /* void send (in nsIVariant data); */
87 : NS_SCRIPTABLE NS_IMETHOD Send(nsIVariant *data) = 0;
88 :
89 : /* [optional_argc] void close ([optional] in unsigned short code, [optional] in DOMString reason); */
90 : NS_SCRIPTABLE NS_IMETHOD Close(PRUint16 code, const nsAString & reason, PRUint8 _argc) = 0;
91 :
92 : /* [noscript] void init (in nsIPrincipal principal, in nsIScriptContext scriptContext, in nsPIDOMWindow ownerWindow, in DOMString url, in nsStringTArrayRef protocol); */
93 : NS_IMETHOD Init(nsIPrincipal *principal, nsIScriptContext *scriptContext, nsPIDOMWindow *ownerWindow, const nsAString & url, nsTArray<nsString> & protocol) = 0;
94 :
95 : };
96 :
97 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIWebSocket, NS_IWEBSOCKET_IID)
98 :
99 : /* Use this macro when declaring classes that implement this interface. */
100 : #define NS_DECL_NSIWEBSOCKET \
101 : NS_SCRIPTABLE NS_IMETHOD GetUrl(nsAString & aUrl); \
102 : NS_SCRIPTABLE NS_IMETHOD GetExtensions(nsAString & aExtensions); \
103 : NS_SCRIPTABLE NS_IMETHOD GetProtocol(nsAString & aProtocol); \
104 : NS_SCRIPTABLE NS_IMETHOD GetReadyState(PRUint16 *aReadyState); \
105 : NS_SCRIPTABLE NS_IMETHOD GetBufferedAmount(PRUint32 *aBufferedAmount); \
106 : NS_SCRIPTABLE NS_IMETHOD GetBinaryType(nsAString & aBinaryType); \
107 : NS_SCRIPTABLE NS_IMETHOD SetBinaryType(const nsAString & aBinaryType); \
108 : NS_SCRIPTABLE NS_IMETHOD GetOnopen(nsIDOMEventListener * *aOnopen); \
109 : NS_SCRIPTABLE NS_IMETHOD SetOnopen(nsIDOMEventListener *aOnopen); \
110 : NS_SCRIPTABLE NS_IMETHOD GetOnmessage(nsIDOMEventListener * *aOnmessage); \
111 : NS_SCRIPTABLE NS_IMETHOD SetOnmessage(nsIDOMEventListener *aOnmessage); \
112 : NS_SCRIPTABLE NS_IMETHOD GetOnerror(nsIDOMEventListener * *aOnerror); \
113 : NS_SCRIPTABLE NS_IMETHOD SetOnerror(nsIDOMEventListener *aOnerror); \
114 : NS_SCRIPTABLE NS_IMETHOD GetOnclose(nsIDOMEventListener * *aOnclose); \
115 : NS_SCRIPTABLE NS_IMETHOD SetOnclose(nsIDOMEventListener *aOnclose); \
116 : NS_SCRIPTABLE NS_IMETHOD Send(nsIVariant *data); \
117 : NS_SCRIPTABLE NS_IMETHOD Close(PRUint16 code, const nsAString & reason, PRUint8 _argc); \
118 : NS_IMETHOD Init(nsIPrincipal *principal, nsIScriptContext *scriptContext, nsPIDOMWindow *ownerWindow, const nsAString & url, nsTArray<nsString> & protocol);
119 :
120 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
121 : #define NS_FORWARD_NSIWEBSOCKET(_to) \
122 : NS_SCRIPTABLE NS_IMETHOD GetUrl(nsAString & aUrl) { return _to GetUrl(aUrl); } \
123 : NS_SCRIPTABLE NS_IMETHOD GetExtensions(nsAString & aExtensions) { return _to GetExtensions(aExtensions); } \
124 : NS_SCRIPTABLE NS_IMETHOD GetProtocol(nsAString & aProtocol) { return _to GetProtocol(aProtocol); } \
125 : NS_SCRIPTABLE NS_IMETHOD GetReadyState(PRUint16 *aReadyState) { return _to GetReadyState(aReadyState); } \
126 : NS_SCRIPTABLE NS_IMETHOD GetBufferedAmount(PRUint32 *aBufferedAmount) { return _to GetBufferedAmount(aBufferedAmount); } \
127 : NS_SCRIPTABLE NS_IMETHOD GetBinaryType(nsAString & aBinaryType) { return _to GetBinaryType(aBinaryType); } \
128 : NS_SCRIPTABLE NS_IMETHOD SetBinaryType(const nsAString & aBinaryType) { return _to SetBinaryType(aBinaryType); } \
129 : NS_SCRIPTABLE NS_IMETHOD GetOnopen(nsIDOMEventListener * *aOnopen) { return _to GetOnopen(aOnopen); } \
130 : NS_SCRIPTABLE NS_IMETHOD SetOnopen(nsIDOMEventListener *aOnopen) { return _to SetOnopen(aOnopen); } \
131 : NS_SCRIPTABLE NS_IMETHOD GetOnmessage(nsIDOMEventListener * *aOnmessage) { return _to GetOnmessage(aOnmessage); } \
132 : NS_SCRIPTABLE NS_IMETHOD SetOnmessage(nsIDOMEventListener *aOnmessage) { return _to SetOnmessage(aOnmessage); } \
133 : NS_SCRIPTABLE NS_IMETHOD GetOnerror(nsIDOMEventListener * *aOnerror) { return _to GetOnerror(aOnerror); } \
134 : NS_SCRIPTABLE NS_IMETHOD SetOnerror(nsIDOMEventListener *aOnerror) { return _to SetOnerror(aOnerror); } \
135 : NS_SCRIPTABLE NS_IMETHOD GetOnclose(nsIDOMEventListener * *aOnclose) { return _to GetOnclose(aOnclose); } \
136 : NS_SCRIPTABLE NS_IMETHOD SetOnclose(nsIDOMEventListener *aOnclose) { return _to SetOnclose(aOnclose); } \
137 : NS_SCRIPTABLE NS_IMETHOD Send(nsIVariant *data) { return _to Send(data); } \
138 : NS_SCRIPTABLE NS_IMETHOD Close(PRUint16 code, const nsAString & reason, PRUint8 _argc) { return _to Close(code, reason, _argc); } \
139 : NS_IMETHOD Init(nsIPrincipal *principal, nsIScriptContext *scriptContext, nsPIDOMWindow *ownerWindow, const nsAString & url, nsTArray<nsString> & protocol) { return _to Init(principal, scriptContext, ownerWindow, url, protocol); }
140 :
141 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
142 : #define NS_FORWARD_SAFE_NSIWEBSOCKET(_to) \
143 : NS_SCRIPTABLE NS_IMETHOD GetUrl(nsAString & aUrl) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUrl(aUrl); } \
144 : NS_SCRIPTABLE NS_IMETHOD GetExtensions(nsAString & aExtensions) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetExtensions(aExtensions); } \
145 : NS_SCRIPTABLE NS_IMETHOD GetProtocol(nsAString & aProtocol) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProtocol(aProtocol); } \
146 : NS_SCRIPTABLE NS_IMETHOD GetReadyState(PRUint16 *aReadyState) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetReadyState(aReadyState); } \
147 : NS_SCRIPTABLE NS_IMETHOD GetBufferedAmount(PRUint32 *aBufferedAmount) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBufferedAmount(aBufferedAmount); } \
148 : NS_SCRIPTABLE NS_IMETHOD GetBinaryType(nsAString & aBinaryType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBinaryType(aBinaryType); } \
149 : NS_SCRIPTABLE NS_IMETHOD SetBinaryType(const nsAString & aBinaryType) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetBinaryType(aBinaryType); } \
150 : NS_SCRIPTABLE NS_IMETHOD GetOnopen(nsIDOMEventListener * *aOnopen) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOnopen(aOnopen); } \
151 : NS_SCRIPTABLE NS_IMETHOD SetOnopen(nsIDOMEventListener *aOnopen) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetOnopen(aOnopen); } \
152 : NS_SCRIPTABLE NS_IMETHOD GetOnmessage(nsIDOMEventListener * *aOnmessage) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOnmessage(aOnmessage); } \
153 : NS_SCRIPTABLE NS_IMETHOD SetOnmessage(nsIDOMEventListener *aOnmessage) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetOnmessage(aOnmessage); } \
154 : NS_SCRIPTABLE NS_IMETHOD GetOnerror(nsIDOMEventListener * *aOnerror) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOnerror(aOnerror); } \
155 : NS_SCRIPTABLE NS_IMETHOD SetOnerror(nsIDOMEventListener *aOnerror) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetOnerror(aOnerror); } \
156 : NS_SCRIPTABLE NS_IMETHOD GetOnclose(nsIDOMEventListener * *aOnclose) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOnclose(aOnclose); } \
157 : NS_SCRIPTABLE NS_IMETHOD SetOnclose(nsIDOMEventListener *aOnclose) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetOnclose(aOnclose); } \
158 : NS_SCRIPTABLE NS_IMETHOD Send(nsIVariant *data) { return !_to ? NS_ERROR_NULL_POINTER : _to->Send(data); } \
159 : NS_SCRIPTABLE NS_IMETHOD Close(PRUint16 code, const nsAString & reason, PRUint8 _argc) { return !_to ? NS_ERROR_NULL_POINTER : _to->Close(code, reason, _argc); } \
160 : NS_IMETHOD Init(nsIPrincipal *principal, nsIScriptContext *scriptContext, nsPIDOMWindow *ownerWindow, const nsAString & url, nsTArray<nsString> & protocol) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(principal, scriptContext, ownerWindow, url, protocol); }
161 :
162 : #if 0
163 : /* Use the code below as a template for the implementation class for this interface. */
164 :
165 : /* Header file */
166 : class nsWebSocket : public nsIWebSocket
167 : {
168 : public:
169 : NS_DECL_ISUPPORTS
170 : NS_DECL_NSIWEBSOCKET
171 :
172 : nsWebSocket();
173 :
174 : private:
175 : ~nsWebSocket();
176 :
177 : protected:
178 : /* additional members */
179 : };
180 :
181 : /* Implementation file */
182 : NS_IMPL_ISUPPORTS1(nsWebSocket, nsIWebSocket)
183 :
184 : nsWebSocket::nsWebSocket()
185 : {
186 : /* member initializers and constructor code */
187 : }
188 :
189 : nsWebSocket::~nsWebSocket()
190 : {
191 : /* destructor code */
192 : }
193 :
194 : /* readonly attribute DOMString url; */
195 : NS_IMETHODIMP nsWebSocket::GetUrl(nsAString & aUrl)
196 : {
197 : return NS_ERROR_NOT_IMPLEMENTED;
198 : }
199 :
200 : /* readonly attribute DOMString extensions; */
201 : NS_IMETHODIMP nsWebSocket::GetExtensions(nsAString & aExtensions)
202 : {
203 : return NS_ERROR_NOT_IMPLEMENTED;
204 : }
205 :
206 : /* readonly attribute DOMString protocol; */
207 : NS_IMETHODIMP nsWebSocket::GetProtocol(nsAString & aProtocol)
208 : {
209 : return NS_ERROR_NOT_IMPLEMENTED;
210 : }
211 :
212 : /* readonly attribute unsigned short readyState; */
213 : NS_IMETHODIMP nsWebSocket::GetReadyState(PRUint16 *aReadyState)
214 : {
215 : return NS_ERROR_NOT_IMPLEMENTED;
216 : }
217 :
218 : /* readonly attribute unsigned long bufferedAmount; */
219 : NS_IMETHODIMP nsWebSocket::GetBufferedAmount(PRUint32 *aBufferedAmount)
220 : {
221 : return NS_ERROR_NOT_IMPLEMENTED;
222 : }
223 :
224 : /* attribute DOMString binaryType; */
225 : NS_IMETHODIMP nsWebSocket::GetBinaryType(nsAString & aBinaryType)
226 : {
227 : return NS_ERROR_NOT_IMPLEMENTED;
228 : }
229 : NS_IMETHODIMP nsWebSocket::SetBinaryType(const nsAString & aBinaryType)
230 : {
231 : return NS_ERROR_NOT_IMPLEMENTED;
232 : }
233 :
234 : /* attribute nsIDOMEventListener onopen; */
235 : NS_IMETHODIMP nsWebSocket::GetOnopen(nsIDOMEventListener * *aOnopen)
236 : {
237 : return NS_ERROR_NOT_IMPLEMENTED;
238 : }
239 : NS_IMETHODIMP nsWebSocket::SetOnopen(nsIDOMEventListener *aOnopen)
240 : {
241 : return NS_ERROR_NOT_IMPLEMENTED;
242 : }
243 :
244 : /* attribute nsIDOMEventListener onmessage; */
245 : NS_IMETHODIMP nsWebSocket::GetOnmessage(nsIDOMEventListener * *aOnmessage)
246 : {
247 : return NS_ERROR_NOT_IMPLEMENTED;
248 : }
249 : NS_IMETHODIMP nsWebSocket::SetOnmessage(nsIDOMEventListener *aOnmessage)
250 : {
251 : return NS_ERROR_NOT_IMPLEMENTED;
252 : }
253 :
254 : /* attribute nsIDOMEventListener onerror; */
255 : NS_IMETHODIMP nsWebSocket::GetOnerror(nsIDOMEventListener * *aOnerror)
256 : {
257 : return NS_ERROR_NOT_IMPLEMENTED;
258 : }
259 : NS_IMETHODIMP nsWebSocket::SetOnerror(nsIDOMEventListener *aOnerror)
260 : {
261 : return NS_ERROR_NOT_IMPLEMENTED;
262 : }
263 :
264 : /* attribute nsIDOMEventListener onclose; */
265 : NS_IMETHODIMP nsWebSocket::GetOnclose(nsIDOMEventListener * *aOnclose)
266 : {
267 : return NS_ERROR_NOT_IMPLEMENTED;
268 : }
269 : NS_IMETHODIMP nsWebSocket::SetOnclose(nsIDOMEventListener *aOnclose)
270 : {
271 : return NS_ERROR_NOT_IMPLEMENTED;
272 : }
273 :
274 : /* void send (in nsIVariant data); */
275 : NS_IMETHODIMP nsWebSocket::Send(nsIVariant *data)
276 : {
277 : return NS_ERROR_NOT_IMPLEMENTED;
278 : }
279 :
280 : /* [optional_argc] void close ([optional] in unsigned short code, [optional] in DOMString reason); */
281 : NS_IMETHODIMP nsWebSocket::Close(PRUint16 code, const nsAString & reason, PRUint8 _argc)
282 : {
283 : return NS_ERROR_NOT_IMPLEMENTED;
284 : }
285 :
286 : /* [noscript] void init (in nsIPrincipal principal, in nsIScriptContext scriptContext, in nsPIDOMWindow ownerWindow, in DOMString url, in nsStringTArrayRef protocol); */
287 : NS_IMETHODIMP nsWebSocket::Init(nsIPrincipal *principal, nsIScriptContext *scriptContext, nsPIDOMWindow *ownerWindow, const nsAString & url, nsTArray<nsString> & protocol)
288 : {
289 : return NS_ERROR_NOT_IMPLEMENTED;
290 : }
291 :
292 : /* End of implementation class template. */
293 : #endif
294 :
295 :
296 : #endif /* __gen_nsIWebSocket_h__ */
|