Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsIGeolocationProvider.idl
3 : */
4 :
5 : #ifndef __gen_nsIGeolocationProvider_h__
6 : #define __gen_nsIGeolocationProvider_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 nsIURI; /* forward declaration */
18 :
19 : class nsIDOMWindow; /* forward declaration */
20 :
21 : class nsIDOMElement; /* forward declaration */
22 :
23 : class nsIDOMGeoPosition; /* forward declaration */
24 :
25 : class nsIGeolocationPrompt; /* forward declaration */
26 :
27 :
28 : /* starting interface: nsIGeolocationUpdate */
29 : #define NS_IGEOLOCATIONUPDATE_IID_STR "643dc5e9-b911-4b2c-8d44-603162696baf"
30 :
31 : #define NS_IGEOLOCATIONUPDATE_IID \
32 : {0x643dc5e9, 0xb911, 0x4b2c, \
33 : { 0x8d, 0x44, 0x60, 0x31, 0x62, 0x69, 0x6b, 0xaf }}
34 :
35 0 : class NS_NO_VTABLE nsIGeolocationUpdate : public nsISupports {
36 : public:
37 :
38 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IGEOLOCATIONUPDATE_IID)
39 :
40 : /* void update (in nsIDOMGeoPosition position); */
41 : NS_IMETHOD Update(nsIDOMGeoPosition *position) = 0;
42 :
43 : /* void notifyError (in unsigned short error); */
44 : NS_IMETHOD NotifyError(uint16_t error) = 0;
45 :
46 : };
47 :
48 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIGeolocationUpdate, NS_IGEOLOCATIONUPDATE_IID)
49 :
50 : /* Use this macro when declaring classes that implement this interface. */
51 : #define NS_DECL_NSIGEOLOCATIONUPDATE \
52 : NS_IMETHOD Update(nsIDOMGeoPosition *position) override; \
53 : NS_IMETHOD NotifyError(uint16_t error) override;
54 :
55 : /* Use this macro when declaring the members of this interface when the
56 : class doesn't implement the interface. This is useful for forwarding. */
57 : #define NS_DECL_NON_VIRTUAL_NSIGEOLOCATIONUPDATE \
58 : nsresult Update(nsIDOMGeoPosition *position); \
59 : nsresult NotifyError(uint16_t error);
60 :
61 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
62 : #define NS_FORWARD_NSIGEOLOCATIONUPDATE(_to) \
63 : NS_IMETHOD Update(nsIDOMGeoPosition *position) override { return _to Update(position); } \
64 : NS_IMETHOD NotifyError(uint16_t error) override { return _to NotifyError(error); }
65 :
66 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
67 : #define NS_FORWARD_SAFE_NSIGEOLOCATIONUPDATE(_to) \
68 : NS_IMETHOD Update(nsIDOMGeoPosition *position) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Update(position); } \
69 : NS_IMETHOD NotifyError(uint16_t error) override { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyError(error); }
70 :
71 : #if 0
72 : /* Use the code below as a template for the implementation class for this interface. */
73 :
74 : /* Header file */
75 : class nsGeolocationUpdate : public nsIGeolocationUpdate
76 : {
77 : public:
78 : NS_DECL_ISUPPORTS
79 : NS_DECL_NSIGEOLOCATIONUPDATE
80 :
81 : nsGeolocationUpdate();
82 :
83 : private:
84 : ~nsGeolocationUpdate();
85 :
86 : protected:
87 : /* additional members */
88 : };
89 :
90 : /* Implementation file */
91 : NS_IMPL_ISUPPORTS(nsGeolocationUpdate, nsIGeolocationUpdate)
92 :
93 : nsGeolocationUpdate::nsGeolocationUpdate()
94 : {
95 : /* member initializers and constructor code */
96 : }
97 :
98 : nsGeolocationUpdate::~nsGeolocationUpdate()
99 : {
100 : /* destructor code */
101 : }
102 :
103 : /* void update (in nsIDOMGeoPosition position); */
104 : NS_IMETHODIMP nsGeolocationUpdate::Update(nsIDOMGeoPosition *position)
105 : {
106 : return NS_ERROR_NOT_IMPLEMENTED;
107 : }
108 :
109 : /* void notifyError (in unsigned short error); */
110 : NS_IMETHODIMP nsGeolocationUpdate::NotifyError(uint16_t error)
111 : {
112 : return NS_ERROR_NOT_IMPLEMENTED;
113 : }
114 :
115 : /* End of implementation class template. */
116 : #endif
117 :
118 :
119 : /* starting interface: nsIGeolocationProvider */
120 : #define NS_IGEOLOCATIONPROVIDER_IID_STR "ac4a133b-9f92-4f7c-b369-d40cb6b17650"
121 :
122 : #define NS_IGEOLOCATIONPROVIDER_IID \
123 : {0xac4a133b, 0x9f92, 0x4f7c, \
124 : { 0xb3, 0x69, 0xd4, 0x0c, 0xb6, 0xb1, 0x76, 0x50 }}
125 :
126 : class NS_NO_VTABLE nsIGeolocationProvider : public nsISupports {
127 : public:
128 :
129 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IGEOLOCATIONPROVIDER_IID)
130 :
131 : /* void startup (); */
132 : NS_IMETHOD Startup(void) = 0;
133 :
134 : /* void watch (in nsIGeolocationUpdate callback); */
135 : NS_IMETHOD Watch(nsIGeolocationUpdate *callback) = 0;
136 :
137 : /* void shutdown (); */
138 : NS_IMETHOD Shutdown(void) = 0;
139 :
140 : /* void setHighAccuracy (in boolean enable); */
141 : NS_IMETHOD SetHighAccuracy(bool enable) = 0;
142 :
143 : };
144 :
145 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIGeolocationProvider, NS_IGEOLOCATIONPROVIDER_IID)
146 :
147 : /* Use this macro when declaring classes that implement this interface. */
148 : #define NS_DECL_NSIGEOLOCATIONPROVIDER \
149 : NS_IMETHOD Startup(void) override; \
150 : NS_IMETHOD Watch(nsIGeolocationUpdate *callback) override; \
151 : NS_IMETHOD Shutdown(void) override; \
152 : NS_IMETHOD SetHighAccuracy(bool enable) override;
153 :
154 : /* Use this macro when declaring the members of this interface when the
155 : class doesn't implement the interface. This is useful for forwarding. */
156 : #define NS_DECL_NON_VIRTUAL_NSIGEOLOCATIONPROVIDER \
157 : nsresult Startup(void); \
158 : nsresult Watch(nsIGeolocationUpdate *callback); \
159 : nsresult Shutdown(void); \
160 : nsresult SetHighAccuracy(bool enable);
161 :
162 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
163 : #define NS_FORWARD_NSIGEOLOCATIONPROVIDER(_to) \
164 : NS_IMETHOD Startup(void) override { return _to Startup(); } \
165 : NS_IMETHOD Watch(nsIGeolocationUpdate *callback) override { return _to Watch(callback); } \
166 : NS_IMETHOD Shutdown(void) override { return _to Shutdown(); } \
167 : NS_IMETHOD SetHighAccuracy(bool enable) override { return _to SetHighAccuracy(enable); }
168 :
169 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
170 : #define NS_FORWARD_SAFE_NSIGEOLOCATIONPROVIDER(_to) \
171 : NS_IMETHOD Startup(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Startup(); } \
172 : NS_IMETHOD Watch(nsIGeolocationUpdate *callback) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Watch(callback); } \
173 : NS_IMETHOD Shutdown(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Shutdown(); } \
174 : NS_IMETHOD SetHighAccuracy(bool enable) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetHighAccuracy(enable); }
175 :
176 : #if 0
177 : /* Use the code below as a template for the implementation class for this interface. */
178 :
179 : /* Header file */
180 : class nsGeolocationProvider : public nsIGeolocationProvider
181 : {
182 : public:
183 : NS_DECL_ISUPPORTS
184 : NS_DECL_NSIGEOLOCATIONPROVIDER
185 :
186 : nsGeolocationProvider();
187 :
188 : private:
189 : ~nsGeolocationProvider();
190 :
191 : protected:
192 : /* additional members */
193 : };
194 :
195 : /* Implementation file */
196 : NS_IMPL_ISUPPORTS(nsGeolocationProvider, nsIGeolocationProvider)
197 :
198 : nsGeolocationProvider::nsGeolocationProvider()
199 : {
200 : /* member initializers and constructor code */
201 : }
202 :
203 : nsGeolocationProvider::~nsGeolocationProvider()
204 : {
205 : /* destructor code */
206 : }
207 :
208 : /* void startup (); */
209 : NS_IMETHODIMP nsGeolocationProvider::Startup()
210 : {
211 : return NS_ERROR_NOT_IMPLEMENTED;
212 : }
213 :
214 : /* void watch (in nsIGeolocationUpdate callback); */
215 : NS_IMETHODIMP nsGeolocationProvider::Watch(nsIGeolocationUpdate *callback)
216 : {
217 : return NS_ERROR_NOT_IMPLEMENTED;
218 : }
219 :
220 : /* void shutdown (); */
221 : NS_IMETHODIMP nsGeolocationProvider::Shutdown()
222 : {
223 : return NS_ERROR_NOT_IMPLEMENTED;
224 : }
225 :
226 : /* void setHighAccuracy (in boolean enable); */
227 : NS_IMETHODIMP nsGeolocationProvider::SetHighAccuracy(bool enable)
228 : {
229 : return NS_ERROR_NOT_IMPLEMENTED;
230 : }
231 :
232 : /* End of implementation class template. */
233 : #endif
234 :
235 : /*
236 : This must be implemented by geolocation providers. It
237 : must support nsIGeolocationProvider.
238 : */
239 : #define NS_GEOLOCATION_PROVIDER_CONTRACTID "@mozilla.org/geolocation/provider;1"
240 :
241 : #endif /* __gen_nsIGeolocationProvider_h__ */
|