Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsIGIOService.idl
3 : */
4 :
5 : #ifndef __gen_nsIGIOService_h__
6 : #define __gen_nsIGIOService_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 nsIUTF8StringEnumerator; /* forward declaration */
18 :
19 : class nsIURI; /* forward declaration */
20 :
21 :
22 : /* starting interface: nsIGIOMimeApp */
23 : #define NS_IGIOMIMEAPP_IID_STR "ca6bad0c-8a48-48ac-82c7-27bb8f510fbe"
24 :
25 : #define NS_IGIOMIMEAPP_IID \
26 : {0xca6bad0c, 0x8a48, 0x48ac, \
27 : { 0x82, 0xc7, 0x27, 0xbb, 0x8f, 0x51, 0x0f, 0xbe }}
28 :
29 4 : class NS_NO_VTABLE nsIGIOMimeApp : public nsISupports {
30 : public:
31 :
32 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IGIOMIMEAPP_IID)
33 :
34 : enum {
35 : EXPECTS_URIS = 0,
36 : EXPECTS_PATHS = 1,
37 : EXPECTS_URIS_FOR_NON_FILES = 2
38 : };
39 :
40 : /* readonly attribute AUTF8String id; */
41 : NS_IMETHOD GetId(nsACString & aId) = 0;
42 :
43 : /* readonly attribute AUTF8String name; */
44 : NS_IMETHOD GetName(nsACString & aName) = 0;
45 :
46 : /* readonly attribute AUTF8String command; */
47 : NS_IMETHOD GetCommand(nsACString & aCommand) = 0;
48 :
49 : /* readonly attribute long expectsURIs; */
50 : NS_IMETHOD GetExpectsURIs(int32_t *aExpectsURIs) = 0;
51 :
52 : /* readonly attribute nsIUTF8StringEnumerator supportedURISchemes; */
53 : NS_IMETHOD GetSupportedURISchemes(nsIUTF8StringEnumerator * *aSupportedURISchemes) = 0;
54 :
55 : /* void launch (in AUTF8String uri); */
56 : NS_IMETHOD Launch(const nsACString & uri) = 0;
57 :
58 : /* void setAsDefaultForMimeType (in AUTF8String mimeType); */
59 : NS_IMETHOD SetAsDefaultForMimeType(const nsACString & mimeType) = 0;
60 :
61 : /* void setAsDefaultForFileExtensions (in AUTF8String extensions); */
62 : NS_IMETHOD SetAsDefaultForFileExtensions(const nsACString & extensions) = 0;
63 :
64 : /* void setAsDefaultForURIScheme (in AUTF8String uriScheme); */
65 : NS_IMETHOD SetAsDefaultForURIScheme(const nsACString & uriScheme) = 0;
66 :
67 : };
68 :
69 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIGIOMimeApp, NS_IGIOMIMEAPP_IID)
70 :
71 : /* Use this macro when declaring classes that implement this interface. */
72 : #define NS_DECL_NSIGIOMIMEAPP \
73 : NS_IMETHOD GetId(nsACString & aId) override; \
74 : NS_IMETHOD GetName(nsACString & aName) override; \
75 : NS_IMETHOD GetCommand(nsACString & aCommand) override; \
76 : NS_IMETHOD GetExpectsURIs(int32_t *aExpectsURIs) override; \
77 : NS_IMETHOD GetSupportedURISchemes(nsIUTF8StringEnumerator * *aSupportedURISchemes) override; \
78 : NS_IMETHOD Launch(const nsACString & uri) override; \
79 : NS_IMETHOD SetAsDefaultForMimeType(const nsACString & mimeType) override; \
80 : NS_IMETHOD SetAsDefaultForFileExtensions(const nsACString & extensions) override; \
81 : NS_IMETHOD SetAsDefaultForURIScheme(const nsACString & uriScheme) override;
82 :
83 : /* Use this macro when declaring the members of this interface when the
84 : class doesn't implement the interface. This is useful for forwarding. */
85 : #define NS_DECL_NON_VIRTUAL_NSIGIOMIMEAPP \
86 : nsresult GetId(nsACString & aId); \
87 : nsresult GetName(nsACString & aName); \
88 : nsresult GetCommand(nsACString & aCommand); \
89 : nsresult GetExpectsURIs(int32_t *aExpectsURIs); \
90 : nsresult GetSupportedURISchemes(nsIUTF8StringEnumerator * *aSupportedURISchemes); \
91 : nsresult Launch(const nsACString & uri); \
92 : nsresult SetAsDefaultForMimeType(const nsACString & mimeType); \
93 : nsresult SetAsDefaultForFileExtensions(const nsACString & extensions); \
94 : nsresult SetAsDefaultForURIScheme(const nsACString & uriScheme);
95 :
96 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
97 : #define NS_FORWARD_NSIGIOMIMEAPP(_to) \
98 : NS_IMETHOD GetId(nsACString & aId) override { return _to GetId(aId); } \
99 : NS_IMETHOD GetName(nsACString & aName) override { return _to GetName(aName); } \
100 : NS_IMETHOD GetCommand(nsACString & aCommand) override { return _to GetCommand(aCommand); } \
101 : NS_IMETHOD GetExpectsURIs(int32_t *aExpectsURIs) override { return _to GetExpectsURIs(aExpectsURIs); } \
102 : NS_IMETHOD GetSupportedURISchemes(nsIUTF8StringEnumerator * *aSupportedURISchemes) override { return _to GetSupportedURISchemes(aSupportedURISchemes); } \
103 : NS_IMETHOD Launch(const nsACString & uri) override { return _to Launch(uri); } \
104 : NS_IMETHOD SetAsDefaultForMimeType(const nsACString & mimeType) override { return _to SetAsDefaultForMimeType(mimeType); } \
105 : NS_IMETHOD SetAsDefaultForFileExtensions(const nsACString & extensions) override { return _to SetAsDefaultForFileExtensions(extensions); } \
106 : NS_IMETHOD SetAsDefaultForURIScheme(const nsACString & uriScheme) override { return _to SetAsDefaultForURIScheme(uriScheme); }
107 :
108 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
109 : #define NS_FORWARD_SAFE_NSIGIOMIMEAPP(_to) \
110 : NS_IMETHOD GetId(nsACString & aId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetId(aId); } \
111 : NS_IMETHOD GetName(nsACString & aName) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \
112 : NS_IMETHOD GetCommand(nsACString & aCommand) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCommand(aCommand); } \
113 : NS_IMETHOD GetExpectsURIs(int32_t *aExpectsURIs) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetExpectsURIs(aExpectsURIs); } \
114 : NS_IMETHOD GetSupportedURISchemes(nsIUTF8StringEnumerator * *aSupportedURISchemes) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSupportedURISchemes(aSupportedURISchemes); } \
115 : NS_IMETHOD Launch(const nsACString & uri) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Launch(uri); } \
116 : NS_IMETHOD SetAsDefaultForMimeType(const nsACString & mimeType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAsDefaultForMimeType(mimeType); } \
117 : NS_IMETHOD SetAsDefaultForFileExtensions(const nsACString & extensions) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAsDefaultForFileExtensions(extensions); } \
118 : NS_IMETHOD SetAsDefaultForURIScheme(const nsACString & uriScheme) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAsDefaultForURIScheme(uriScheme); }
119 :
120 : #if 0
121 : /* Use the code below as a template for the implementation class for this interface. */
122 :
123 : /* Header file */
124 : class nsGIOMimeApp : public nsIGIOMimeApp
125 : {
126 : public:
127 : NS_DECL_ISUPPORTS
128 : NS_DECL_NSIGIOMIMEAPP
129 :
130 : nsGIOMimeApp();
131 :
132 : private:
133 : ~nsGIOMimeApp();
134 :
135 : protected:
136 : /* additional members */
137 : };
138 :
139 : /* Implementation file */
140 : NS_IMPL_ISUPPORTS(nsGIOMimeApp, nsIGIOMimeApp)
141 :
142 : nsGIOMimeApp::nsGIOMimeApp()
143 : {
144 : /* member initializers and constructor code */
145 : }
146 :
147 : nsGIOMimeApp::~nsGIOMimeApp()
148 : {
149 : /* destructor code */
150 : }
151 :
152 : /* readonly attribute AUTF8String id; */
153 : NS_IMETHODIMP nsGIOMimeApp::GetId(nsACString & aId)
154 : {
155 : return NS_ERROR_NOT_IMPLEMENTED;
156 : }
157 :
158 : /* readonly attribute AUTF8String name; */
159 : NS_IMETHODIMP nsGIOMimeApp::GetName(nsACString & aName)
160 : {
161 : return NS_ERROR_NOT_IMPLEMENTED;
162 : }
163 :
164 : /* readonly attribute AUTF8String command; */
165 : NS_IMETHODIMP nsGIOMimeApp::GetCommand(nsACString & aCommand)
166 : {
167 : return NS_ERROR_NOT_IMPLEMENTED;
168 : }
169 :
170 : /* readonly attribute long expectsURIs; */
171 : NS_IMETHODIMP nsGIOMimeApp::GetExpectsURIs(int32_t *aExpectsURIs)
172 : {
173 : return NS_ERROR_NOT_IMPLEMENTED;
174 : }
175 :
176 : /* readonly attribute nsIUTF8StringEnumerator supportedURISchemes; */
177 : NS_IMETHODIMP nsGIOMimeApp::GetSupportedURISchemes(nsIUTF8StringEnumerator * *aSupportedURISchemes)
178 : {
179 : return NS_ERROR_NOT_IMPLEMENTED;
180 : }
181 :
182 : /* void launch (in AUTF8String uri); */
183 : NS_IMETHODIMP nsGIOMimeApp::Launch(const nsACString & uri)
184 : {
185 : return NS_ERROR_NOT_IMPLEMENTED;
186 : }
187 :
188 : /* void setAsDefaultForMimeType (in AUTF8String mimeType); */
189 : NS_IMETHODIMP nsGIOMimeApp::SetAsDefaultForMimeType(const nsACString & mimeType)
190 : {
191 : return NS_ERROR_NOT_IMPLEMENTED;
192 : }
193 :
194 : /* void setAsDefaultForFileExtensions (in AUTF8String extensions); */
195 : NS_IMETHODIMP nsGIOMimeApp::SetAsDefaultForFileExtensions(const nsACString & extensions)
196 : {
197 : return NS_ERROR_NOT_IMPLEMENTED;
198 : }
199 :
200 : /* void setAsDefaultForURIScheme (in AUTF8String uriScheme); */
201 : NS_IMETHODIMP nsGIOMimeApp::SetAsDefaultForURIScheme(const nsACString & uriScheme)
202 : {
203 : return NS_ERROR_NOT_IMPLEMENTED;
204 : }
205 :
206 : /* End of implementation class template. */
207 : #endif
208 :
209 :
210 : /* starting interface: nsIGIOService */
211 : #define NS_IGIOSERVICE_IID_STR "eda22a30-84e1-4e16-9ca0-cd1553c2b34a"
212 :
213 : #define NS_IGIOSERVICE_IID \
214 : {0xeda22a30, 0x84e1, 0x4e16, \
215 : { 0x9c, 0xa0, 0xcd, 0x15, 0x53, 0xc2, 0xb3, 0x4a }}
216 :
217 1 : class NS_NO_VTABLE nsIGIOService : public nsISupports {
218 : public:
219 :
220 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IGIOSERVICE_IID)
221 :
222 : /* AUTF8String getMimeTypeFromExtension (in AUTF8String extension); */
223 : NS_IMETHOD GetMimeTypeFromExtension(const nsACString & extension, nsACString & _retval) = 0;
224 :
225 : /* nsIGIOMimeApp getAppForURIScheme (in AUTF8String aURIScheme); */
226 : NS_IMETHOD GetAppForURIScheme(const nsACString & aURIScheme, nsIGIOMimeApp * *_retval) = 0;
227 :
228 : /* nsIGIOMimeApp getAppForMimeType (in AUTF8String mimeType); */
229 : NS_IMETHOD GetAppForMimeType(const nsACString & mimeType, nsIGIOMimeApp * *_retval) = 0;
230 :
231 : /* nsIGIOMimeApp createAppFromCommand (in AUTF8String cmd, in AUTF8String appName); */
232 : NS_IMETHOD CreateAppFromCommand(const nsACString & cmd, const nsACString & appName, nsIGIOMimeApp * *_retval) = 0;
233 :
234 : /* AUTF8String getDescriptionForMimeType (in AUTF8String mimeType); */
235 : NS_IMETHOD GetDescriptionForMimeType(const nsACString & mimeType, nsACString & _retval) = 0;
236 :
237 : /* void showURI (in nsIURI uri); */
238 : NS_IMETHOD ShowURI(nsIURI *uri) = 0;
239 :
240 : /* [noscript] void showURIForInput (in ACString uri); */
241 : NS_IMETHOD ShowURIForInput(const nsACString & uri) = 0;
242 :
243 : /* [noscript] void orgFreedesktopFileManager1ShowItems (in ACString path); */
244 : NS_IMETHOD OrgFreedesktopFileManager1ShowItems(const nsACString & path) = 0;
245 :
246 : };
247 :
248 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIGIOService, NS_IGIOSERVICE_IID)
249 :
250 : /* Use this macro when declaring classes that implement this interface. */
251 : #define NS_DECL_NSIGIOSERVICE \
252 : NS_IMETHOD GetMimeTypeFromExtension(const nsACString & extension, nsACString & _retval) override; \
253 : NS_IMETHOD GetAppForURIScheme(const nsACString & aURIScheme, nsIGIOMimeApp * *_retval) override; \
254 : NS_IMETHOD GetAppForMimeType(const nsACString & mimeType, nsIGIOMimeApp * *_retval) override; \
255 : NS_IMETHOD CreateAppFromCommand(const nsACString & cmd, const nsACString & appName, nsIGIOMimeApp * *_retval) override; \
256 : NS_IMETHOD GetDescriptionForMimeType(const nsACString & mimeType, nsACString & _retval) override; \
257 : NS_IMETHOD ShowURI(nsIURI *uri) override; \
258 : NS_IMETHOD ShowURIForInput(const nsACString & uri) override; \
259 : NS_IMETHOD OrgFreedesktopFileManager1ShowItems(const nsACString & path) override;
260 :
261 : /* Use this macro when declaring the members of this interface when the
262 : class doesn't implement the interface. This is useful for forwarding. */
263 : #define NS_DECL_NON_VIRTUAL_NSIGIOSERVICE \
264 : nsresult GetMimeTypeFromExtension(const nsACString & extension, nsACString & _retval); \
265 : nsresult GetAppForURIScheme(const nsACString & aURIScheme, nsIGIOMimeApp * *_retval); \
266 : nsresult GetAppForMimeType(const nsACString & mimeType, nsIGIOMimeApp * *_retval); \
267 : nsresult CreateAppFromCommand(const nsACString & cmd, const nsACString & appName, nsIGIOMimeApp * *_retval); \
268 : nsresult GetDescriptionForMimeType(const nsACString & mimeType, nsACString & _retval); \
269 : nsresult ShowURI(nsIURI *uri); \
270 : nsresult ShowURIForInput(const nsACString & uri); \
271 : nsresult OrgFreedesktopFileManager1ShowItems(const nsACString & path);
272 :
273 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
274 : #define NS_FORWARD_NSIGIOSERVICE(_to) \
275 : NS_IMETHOD GetMimeTypeFromExtension(const nsACString & extension, nsACString & _retval) override { return _to GetMimeTypeFromExtension(extension, _retval); } \
276 : NS_IMETHOD GetAppForURIScheme(const nsACString & aURIScheme, nsIGIOMimeApp * *_retval) override { return _to GetAppForURIScheme(aURIScheme, _retval); } \
277 : NS_IMETHOD GetAppForMimeType(const nsACString & mimeType, nsIGIOMimeApp * *_retval) override { return _to GetAppForMimeType(mimeType, _retval); } \
278 : NS_IMETHOD CreateAppFromCommand(const nsACString & cmd, const nsACString & appName, nsIGIOMimeApp * *_retval) override { return _to CreateAppFromCommand(cmd, appName, _retval); } \
279 : NS_IMETHOD GetDescriptionForMimeType(const nsACString & mimeType, nsACString & _retval) override { return _to GetDescriptionForMimeType(mimeType, _retval); } \
280 : NS_IMETHOD ShowURI(nsIURI *uri) override { return _to ShowURI(uri); } \
281 : NS_IMETHOD ShowURIForInput(const nsACString & uri) override { return _to ShowURIForInput(uri); } \
282 : NS_IMETHOD OrgFreedesktopFileManager1ShowItems(const nsACString & path) override { return _to OrgFreedesktopFileManager1ShowItems(path); }
283 :
284 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
285 : #define NS_FORWARD_SAFE_NSIGIOSERVICE(_to) \
286 : NS_IMETHOD GetMimeTypeFromExtension(const nsACString & extension, nsACString & _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMimeTypeFromExtension(extension, _retval); } \
287 : NS_IMETHOD GetAppForURIScheme(const nsACString & aURIScheme, nsIGIOMimeApp * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAppForURIScheme(aURIScheme, _retval); } \
288 : NS_IMETHOD GetAppForMimeType(const nsACString & mimeType, nsIGIOMimeApp * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAppForMimeType(mimeType, _retval); } \
289 : NS_IMETHOD CreateAppFromCommand(const nsACString & cmd, const nsACString & appName, nsIGIOMimeApp * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateAppFromCommand(cmd, appName, _retval); } \
290 : NS_IMETHOD GetDescriptionForMimeType(const nsACString & mimeType, nsACString & _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDescriptionForMimeType(mimeType, _retval); } \
291 : NS_IMETHOD ShowURI(nsIURI *uri) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ShowURI(uri); } \
292 : NS_IMETHOD ShowURIForInput(const nsACString & uri) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ShowURIForInput(uri); } \
293 : NS_IMETHOD OrgFreedesktopFileManager1ShowItems(const nsACString & path) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OrgFreedesktopFileManager1ShowItems(path); }
294 :
295 : #if 0
296 : /* Use the code below as a template for the implementation class for this interface. */
297 :
298 : /* Header file */
299 : class nsGIOService : public nsIGIOService
300 : {
301 : public:
302 : NS_DECL_ISUPPORTS
303 : NS_DECL_NSIGIOSERVICE
304 :
305 : nsGIOService();
306 :
307 : private:
308 : ~nsGIOService();
309 :
310 : protected:
311 : /* additional members */
312 : };
313 :
314 : /* Implementation file */
315 : NS_IMPL_ISUPPORTS(nsGIOService, nsIGIOService)
316 :
317 : nsGIOService::nsGIOService()
318 : {
319 : /* member initializers and constructor code */
320 : }
321 :
322 : nsGIOService::~nsGIOService()
323 : {
324 : /* destructor code */
325 : }
326 :
327 : /* AUTF8String getMimeTypeFromExtension (in AUTF8String extension); */
328 : NS_IMETHODIMP nsGIOService::GetMimeTypeFromExtension(const nsACString & extension, nsACString & _retval)
329 : {
330 : return NS_ERROR_NOT_IMPLEMENTED;
331 : }
332 :
333 : /* nsIGIOMimeApp getAppForURIScheme (in AUTF8String aURIScheme); */
334 : NS_IMETHODIMP nsGIOService::GetAppForURIScheme(const nsACString & aURIScheme, nsIGIOMimeApp * *_retval)
335 : {
336 : return NS_ERROR_NOT_IMPLEMENTED;
337 : }
338 :
339 : /* nsIGIOMimeApp getAppForMimeType (in AUTF8String mimeType); */
340 : NS_IMETHODIMP nsGIOService::GetAppForMimeType(const nsACString & mimeType, nsIGIOMimeApp * *_retval)
341 : {
342 : return NS_ERROR_NOT_IMPLEMENTED;
343 : }
344 :
345 : /* nsIGIOMimeApp createAppFromCommand (in AUTF8String cmd, in AUTF8String appName); */
346 : NS_IMETHODIMP nsGIOService::CreateAppFromCommand(const nsACString & cmd, const nsACString & appName, nsIGIOMimeApp * *_retval)
347 : {
348 : return NS_ERROR_NOT_IMPLEMENTED;
349 : }
350 :
351 : /* AUTF8String getDescriptionForMimeType (in AUTF8String mimeType); */
352 : NS_IMETHODIMP nsGIOService::GetDescriptionForMimeType(const nsACString & mimeType, nsACString & _retval)
353 : {
354 : return NS_ERROR_NOT_IMPLEMENTED;
355 : }
356 :
357 : /* void showURI (in nsIURI uri); */
358 : NS_IMETHODIMP nsGIOService::ShowURI(nsIURI *uri)
359 : {
360 : return NS_ERROR_NOT_IMPLEMENTED;
361 : }
362 :
363 : /* [noscript] void showURIForInput (in ACString uri); */
364 : NS_IMETHODIMP nsGIOService::ShowURIForInput(const nsACString & uri)
365 : {
366 : return NS_ERROR_NOT_IMPLEMENTED;
367 : }
368 :
369 : /* [noscript] void orgFreedesktopFileManager1ShowItems (in ACString path); */
370 : NS_IMETHODIMP nsGIOService::OrgFreedesktopFileManager1ShowItems(const nsACString & path)
371 : {
372 : return NS_ERROR_NOT_IMPLEMENTED;
373 : }
374 :
375 : /* End of implementation class template. */
376 : #endif
377 :
378 : #define NS_GIOSERVICE_CONTRACTID "@mozilla.org/gio-service;1"
379 :
380 : #endif /* __gen_nsIGIOService_h__ */
|