1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM /builds/slave/m-beta-lnx-codecoverage/build/content/base/public/nsIEventSource.idl
3 : */
4 :
5 : #ifndef __gen_nsIEventSource_h__
6 : #define __gen_nsIEventSource_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 :
26 : /* starting interface: nsIEventSource */
27 : #define NS_IEVENTSOURCE_IID_STR "a3d3181e-47c1-4f2e-b2c7-94775a86f5c5"
28 :
29 : #define NS_IEVENTSOURCE_IID \
30 : {0xa3d3181e, 0x47c1, 0x4f2e, \
31 : { 0xb2, 0xc7, 0x94, 0x77, 0x5a, 0x86, 0xf5, 0xc5 }}
32 :
33 0 : class NS_NO_VTABLE NS_SCRIPTABLE nsIEventSource : public nsISupports {
34 : public:
35 :
36 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IEVENTSOURCE_IID)
37 :
38 : /* readonly attribute DOMString url; */
39 : NS_SCRIPTABLE NS_IMETHOD GetUrl(nsAString & aUrl) = 0;
40 :
41 : enum {
42 : CONNECTING = 0U,
43 : OPEN = 1U,
44 : CLOSED = 2U
45 : };
46 :
47 : /* readonly attribute long readyState; */
48 : NS_SCRIPTABLE NS_IMETHOD GetReadyState(PRInt32 *aReadyState) = 0;
49 :
50 : /* readonly attribute boolean withCredentials; */
51 : NS_SCRIPTABLE NS_IMETHOD GetWithCredentials(bool *aWithCredentials) = 0;
52 :
53 : /* attribute nsIDOMEventListener onopen; */
54 : NS_SCRIPTABLE NS_IMETHOD GetOnopen(nsIDOMEventListener * *aOnopen) = 0;
55 : NS_SCRIPTABLE NS_IMETHOD SetOnopen(nsIDOMEventListener *aOnopen) = 0;
56 :
57 : /* attribute nsIDOMEventListener onmessage; */
58 : NS_SCRIPTABLE NS_IMETHOD GetOnmessage(nsIDOMEventListener * *aOnmessage) = 0;
59 : NS_SCRIPTABLE NS_IMETHOD SetOnmessage(nsIDOMEventListener *aOnmessage) = 0;
60 :
61 : /* attribute nsIDOMEventListener onerror; */
62 : NS_SCRIPTABLE NS_IMETHOD GetOnerror(nsIDOMEventListener * *aOnerror) = 0;
63 : NS_SCRIPTABLE NS_IMETHOD SetOnerror(nsIDOMEventListener *aOnerror) = 0;
64 :
65 : /* void close (); */
66 : NS_SCRIPTABLE NS_IMETHOD Close(void) = 0;
67 :
68 : /* [noscript] void init (in nsIPrincipal principal, in nsIScriptContext scriptContext, in nsPIDOMWindow ownerWindow, in DOMString url, in boolean withCredentials); */
69 : NS_IMETHOD Init(nsIPrincipal *principal, nsIScriptContext *scriptContext, nsPIDOMWindow *ownerWindow, const nsAString & url, bool withCredentials) = 0;
70 :
71 : };
72 :
73 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIEventSource, NS_IEVENTSOURCE_IID)
74 :
75 : /* Use this macro when declaring classes that implement this interface. */
76 : #define NS_DECL_NSIEVENTSOURCE \
77 : NS_SCRIPTABLE NS_IMETHOD GetUrl(nsAString & aUrl); \
78 : NS_SCRIPTABLE NS_IMETHOD GetReadyState(PRInt32 *aReadyState); \
79 : NS_SCRIPTABLE NS_IMETHOD GetWithCredentials(bool *aWithCredentials); \
80 : NS_SCRIPTABLE NS_IMETHOD GetOnopen(nsIDOMEventListener * *aOnopen); \
81 : NS_SCRIPTABLE NS_IMETHOD SetOnopen(nsIDOMEventListener *aOnopen); \
82 : NS_SCRIPTABLE NS_IMETHOD GetOnmessage(nsIDOMEventListener * *aOnmessage); \
83 : NS_SCRIPTABLE NS_IMETHOD SetOnmessage(nsIDOMEventListener *aOnmessage); \
84 : NS_SCRIPTABLE NS_IMETHOD GetOnerror(nsIDOMEventListener * *aOnerror); \
85 : NS_SCRIPTABLE NS_IMETHOD SetOnerror(nsIDOMEventListener *aOnerror); \
86 : NS_SCRIPTABLE NS_IMETHOD Close(void); \
87 : NS_IMETHOD Init(nsIPrincipal *principal, nsIScriptContext *scriptContext, nsPIDOMWindow *ownerWindow, const nsAString & url, bool withCredentials);
88 :
89 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
90 : #define NS_FORWARD_NSIEVENTSOURCE(_to) \
91 : NS_SCRIPTABLE NS_IMETHOD GetUrl(nsAString & aUrl) { return _to GetUrl(aUrl); } \
92 : NS_SCRIPTABLE NS_IMETHOD GetReadyState(PRInt32 *aReadyState) { return _to GetReadyState(aReadyState); } \
93 : NS_SCRIPTABLE NS_IMETHOD GetWithCredentials(bool *aWithCredentials) { return _to GetWithCredentials(aWithCredentials); } \
94 : NS_SCRIPTABLE NS_IMETHOD GetOnopen(nsIDOMEventListener * *aOnopen) { return _to GetOnopen(aOnopen); } \
95 : NS_SCRIPTABLE NS_IMETHOD SetOnopen(nsIDOMEventListener *aOnopen) { return _to SetOnopen(aOnopen); } \
96 : NS_SCRIPTABLE NS_IMETHOD GetOnmessage(nsIDOMEventListener * *aOnmessage) { return _to GetOnmessage(aOnmessage); } \
97 : NS_SCRIPTABLE NS_IMETHOD SetOnmessage(nsIDOMEventListener *aOnmessage) { return _to SetOnmessage(aOnmessage); } \
98 : NS_SCRIPTABLE NS_IMETHOD GetOnerror(nsIDOMEventListener * *aOnerror) { return _to GetOnerror(aOnerror); } \
99 : NS_SCRIPTABLE NS_IMETHOD SetOnerror(nsIDOMEventListener *aOnerror) { return _to SetOnerror(aOnerror); } \
100 : NS_SCRIPTABLE NS_IMETHOD Close(void) { return _to Close(); } \
101 : NS_IMETHOD Init(nsIPrincipal *principal, nsIScriptContext *scriptContext, nsPIDOMWindow *ownerWindow, const nsAString & url, bool withCredentials) { return _to Init(principal, scriptContext, ownerWindow, url, withCredentials); }
102 :
103 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
104 : #define NS_FORWARD_SAFE_NSIEVENTSOURCE(_to) \
105 : NS_SCRIPTABLE NS_IMETHOD GetUrl(nsAString & aUrl) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUrl(aUrl); } \
106 : NS_SCRIPTABLE NS_IMETHOD GetReadyState(PRInt32 *aReadyState) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetReadyState(aReadyState); } \
107 : NS_SCRIPTABLE NS_IMETHOD GetWithCredentials(bool *aWithCredentials) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWithCredentials(aWithCredentials); } \
108 : NS_SCRIPTABLE NS_IMETHOD GetOnopen(nsIDOMEventListener * *aOnopen) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOnopen(aOnopen); } \
109 : NS_SCRIPTABLE NS_IMETHOD SetOnopen(nsIDOMEventListener *aOnopen) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetOnopen(aOnopen); } \
110 : NS_SCRIPTABLE NS_IMETHOD GetOnmessage(nsIDOMEventListener * *aOnmessage) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOnmessage(aOnmessage); } \
111 : NS_SCRIPTABLE NS_IMETHOD SetOnmessage(nsIDOMEventListener *aOnmessage) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetOnmessage(aOnmessage); } \
112 : NS_SCRIPTABLE NS_IMETHOD GetOnerror(nsIDOMEventListener * *aOnerror) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOnerror(aOnerror); } \
113 : NS_SCRIPTABLE NS_IMETHOD SetOnerror(nsIDOMEventListener *aOnerror) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetOnerror(aOnerror); } \
114 : NS_SCRIPTABLE NS_IMETHOD Close(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Close(); } \
115 : NS_IMETHOD Init(nsIPrincipal *principal, nsIScriptContext *scriptContext, nsPIDOMWindow *ownerWindow, const nsAString & url, bool withCredentials) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(principal, scriptContext, ownerWindow, url, withCredentials); }
116 :
117 : #if 0
118 : /* Use the code below as a template for the implementation class for this interface. */
119 :
120 : /* Header file */
121 : class nsEventSource : public nsIEventSource
122 : {
123 : public:
124 : NS_DECL_ISUPPORTS
125 : NS_DECL_NSIEVENTSOURCE
126 :
127 : nsEventSource();
128 :
129 : private:
130 : ~nsEventSource();
131 :
132 : protected:
133 : /* additional members */
134 : };
135 :
136 : /* Implementation file */
137 : NS_IMPL_ISUPPORTS1(nsEventSource, nsIEventSource)
138 :
139 : nsEventSource::nsEventSource()
140 : {
141 : /* member initializers and constructor code */
142 : }
143 :
144 : nsEventSource::~nsEventSource()
145 : {
146 : /* destructor code */
147 : }
148 :
149 : /* readonly attribute DOMString url; */
150 : NS_IMETHODIMP nsEventSource::GetUrl(nsAString & aUrl)
151 : {
152 : return NS_ERROR_NOT_IMPLEMENTED;
153 : }
154 :
155 : /* readonly attribute long readyState; */
156 : NS_IMETHODIMP nsEventSource::GetReadyState(PRInt32 *aReadyState)
157 : {
158 : return NS_ERROR_NOT_IMPLEMENTED;
159 : }
160 :
161 : /* readonly attribute boolean withCredentials; */
162 : NS_IMETHODIMP nsEventSource::GetWithCredentials(bool *aWithCredentials)
163 : {
164 : return NS_ERROR_NOT_IMPLEMENTED;
165 : }
166 :
167 : /* attribute nsIDOMEventListener onopen; */
168 : NS_IMETHODIMP nsEventSource::GetOnopen(nsIDOMEventListener * *aOnopen)
169 : {
170 : return NS_ERROR_NOT_IMPLEMENTED;
171 : }
172 : NS_IMETHODIMP nsEventSource::SetOnopen(nsIDOMEventListener *aOnopen)
173 : {
174 : return NS_ERROR_NOT_IMPLEMENTED;
175 : }
176 :
177 : /* attribute nsIDOMEventListener onmessage; */
178 : NS_IMETHODIMP nsEventSource::GetOnmessage(nsIDOMEventListener * *aOnmessage)
179 : {
180 : return NS_ERROR_NOT_IMPLEMENTED;
181 : }
182 : NS_IMETHODIMP nsEventSource::SetOnmessage(nsIDOMEventListener *aOnmessage)
183 : {
184 : return NS_ERROR_NOT_IMPLEMENTED;
185 : }
186 :
187 : /* attribute nsIDOMEventListener onerror; */
188 : NS_IMETHODIMP nsEventSource::GetOnerror(nsIDOMEventListener * *aOnerror)
189 : {
190 : return NS_ERROR_NOT_IMPLEMENTED;
191 : }
192 : NS_IMETHODIMP nsEventSource::SetOnerror(nsIDOMEventListener *aOnerror)
193 : {
194 : return NS_ERROR_NOT_IMPLEMENTED;
195 : }
196 :
197 : /* void close (); */
198 : NS_IMETHODIMP nsEventSource::Close()
199 : {
200 : return NS_ERROR_NOT_IMPLEMENTED;
201 : }
202 :
203 : /* [noscript] void init (in nsIPrincipal principal, in nsIScriptContext scriptContext, in nsPIDOMWindow ownerWindow, in DOMString url, in boolean withCredentials); */
204 : NS_IMETHODIMP nsEventSource::Init(nsIPrincipal *principal, nsIScriptContext *scriptContext, nsPIDOMWindow *ownerWindow, const nsAString & url, bool withCredentials)
205 : {
206 : return NS_ERROR_NOT_IMPLEMENTED;
207 : }
208 :
209 : /* End of implementation class template. */
210 : #endif
211 :
212 :
213 : #endif /* __gen_nsIEventSource_h__ */
|