Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/nsIMIMEInfo.h
Line
Count
Source (jump to first uncovered line)
1
/*
2
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM /src/mozilla-central/netwerk/mime/nsIMIMEInfo.idl
3
 */
4
5
#ifndef __gen_nsIMIMEInfo_h__
6
#define __gen_nsIMIMEInfo_h__
7
8
9
#ifndef __gen_nsISupports_h__
10
#include "nsISupports.h"
11
#endif
12
13
#include "js/GCAnnotations.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
class nsIURI; /* forward declaration */
20
21
class nsIFile; /* forward declaration */
22
23
class nsIUTF8StringEnumerator; /* forward declaration */
24
25
class nsIHandlerApp; /* forward declaration */
26
27
class nsIArray; /* forward declaration */
28
29
class nsIMutableArray; /* forward declaration */
30
31
class nsIInterfaceRequestor; /* forward declaration */
32
33
typedef int32_t  nsHandlerInfoAction;
34
35
36
/* starting interface:    nsIHandlerInfo */
37
#define NS_IHANDLERINFO_IID_STR "325e56a7-3762-4312-aec7-f1fcf84b4145"
38
39
#define NS_IHANDLERINFO_IID \
40
  {0x325e56a7, 0x3762, 0x4312, \
41
    { 0xae, 0xc7, 0xf1, 0xfc, 0xf8, 0x4b, 0x41, 0x45 }}
42
43
class NS_NO_VTABLE nsIHandlerInfo : public nsISupports {
44
 public:
45
46
  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IHANDLERINFO_IID)
47
48
  /* readonly attribute ACString type; */
49
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetType(nsACString& aType) = 0;
50
51
  /* attribute AString description; */
52
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetDescription(nsAString& aDescription) = 0;
53
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetDescription(const nsAString& aDescription) = 0;
54
55
  /* attribute nsIHandlerApp preferredApplicationHandler; */
56
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetPreferredApplicationHandler(nsIHandlerApp **aPreferredApplicationHandler) = 0;
57
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetPreferredApplicationHandler(nsIHandlerApp *aPreferredApplicationHandler) = 0;
58
59
  /* readonly attribute nsIMutableArray possibleApplicationHandlers; */
60
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetPossibleApplicationHandlers(nsIMutableArray **aPossibleApplicationHandlers) = 0;
61
62
  /* readonly attribute boolean hasDefaultHandler; */
63
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetHasDefaultHandler(bool *aHasDefaultHandler) = 0;
64
65
  /* readonly attribute AString defaultDescription; */
66
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetDefaultDescription(nsAString& aDefaultDescription) = 0;
67
68
  /* void launchWithURI (in nsIURI aURI, [optional] in nsIInterfaceRequestor aWindowContext); */
69
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD LaunchWithURI(nsIURI *aURI, nsIInterfaceRequestor *aWindowContext) = 0;
70
71
  /* attribute nsHandlerInfoAction preferredAction; */
72
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetPreferredAction(nsHandlerInfoAction *aPreferredAction) = 0;
73
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetPreferredAction(nsHandlerInfoAction aPreferredAction) = 0;
74
75
  enum {
76
    saveToDisk = 0,
77
    alwaysAsk = 1,
78
    useHelperApp = 2,
79
    handleInternally = 3,
80
    useSystemDefault = 4
81
  };
82
83
  /* attribute boolean alwaysAskBeforeHandling; */
84
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetAlwaysAskBeforeHandling(bool *aAlwaysAskBeforeHandling) = 0;
85
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetAlwaysAskBeforeHandling(bool aAlwaysAskBeforeHandling) = 0;
86
87
};
88
89
  NS_DEFINE_STATIC_IID_ACCESSOR(nsIHandlerInfo, NS_IHANDLERINFO_IID)
90
91
/* Use this macro when declaring classes that implement this interface. */
92
#define NS_DECL_NSIHANDLERINFO \
93
  NS_IMETHOD GetType(nsACString& aType) override; \
94
  NS_IMETHOD GetDescription(nsAString& aDescription) override; \
95
  NS_IMETHOD SetDescription(const nsAString& aDescription) override; \
96
  NS_IMETHOD GetPreferredApplicationHandler(nsIHandlerApp **aPreferredApplicationHandler) override; \
97
  NS_IMETHOD SetPreferredApplicationHandler(nsIHandlerApp *aPreferredApplicationHandler) override; \
98
  NS_IMETHOD GetPossibleApplicationHandlers(nsIMutableArray **aPossibleApplicationHandlers) override; \
99
  NS_IMETHOD GetHasDefaultHandler(bool *aHasDefaultHandler) override; \
100
  NS_IMETHOD GetDefaultDescription(nsAString& aDefaultDescription) override; \
101
  NS_IMETHOD LaunchWithURI(nsIURI *aURI, nsIInterfaceRequestor *aWindowContext) override; \
102
  NS_IMETHOD GetPreferredAction(nsHandlerInfoAction *aPreferredAction) override; \
103
  NS_IMETHOD SetPreferredAction(nsHandlerInfoAction aPreferredAction) override; \
104
  NS_IMETHOD GetAlwaysAskBeforeHandling(bool *aAlwaysAskBeforeHandling) override; \
105
  NS_IMETHOD SetAlwaysAskBeforeHandling(bool aAlwaysAskBeforeHandling) 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_NSIHANDLERINFO \
110
  nsresult GetType(nsACString& aType); \
111
  nsresult GetDescription(nsAString& aDescription); \
112
  nsresult SetDescription(const nsAString& aDescription); \
113
  nsresult GetPreferredApplicationHandler(nsIHandlerApp **aPreferredApplicationHandler); \
114
  nsresult SetPreferredApplicationHandler(nsIHandlerApp *aPreferredApplicationHandler); \
115
  nsresult GetPossibleApplicationHandlers(nsIMutableArray **aPossibleApplicationHandlers); \
116
  nsresult GetHasDefaultHandler(bool *aHasDefaultHandler); \
117
  nsresult GetDefaultDescription(nsAString& aDefaultDescription); \
118
  nsresult LaunchWithURI(nsIURI *aURI, nsIInterfaceRequestor *aWindowContext); \
119
  nsresult GetPreferredAction(nsHandlerInfoAction *aPreferredAction); \
120
  nsresult SetPreferredAction(nsHandlerInfoAction aPreferredAction); \
121
  nsresult GetAlwaysAskBeforeHandling(bool *aAlwaysAskBeforeHandling); \
122
  nsresult SetAlwaysAskBeforeHandling(bool aAlwaysAskBeforeHandling); 
123
124
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
125
#define NS_FORWARD_NSIHANDLERINFO(_to) \
126
0
  NS_IMETHOD GetType(nsACString& aType) override { return _to GetType(aType); } \
127
0
  NS_IMETHOD GetDescription(nsAString& aDescription) override { return _to GetDescription(aDescription); } \
128
0
  NS_IMETHOD SetDescription(const nsAString& aDescription) override { return _to SetDescription(aDescription); } \
129
0
  NS_IMETHOD GetPreferredApplicationHandler(nsIHandlerApp **aPreferredApplicationHandler) override { return _to GetPreferredApplicationHandler(aPreferredApplicationHandler); } \
130
0
  NS_IMETHOD SetPreferredApplicationHandler(nsIHandlerApp *aPreferredApplicationHandler) override { return _to SetPreferredApplicationHandler(aPreferredApplicationHandler); } \
131
0
  NS_IMETHOD GetPossibleApplicationHandlers(nsIMutableArray **aPossibleApplicationHandlers) override { return _to GetPossibleApplicationHandlers(aPossibleApplicationHandlers); } \
132
0
  NS_IMETHOD GetHasDefaultHandler(bool *aHasDefaultHandler) override { return _to GetHasDefaultHandler(aHasDefaultHandler); } \
133
0
  NS_IMETHOD GetDefaultDescription(nsAString& aDefaultDescription) override { return _to GetDefaultDescription(aDefaultDescription); } \
134
0
  NS_IMETHOD LaunchWithURI(nsIURI *aURI, nsIInterfaceRequestor *aWindowContext) override { return _to LaunchWithURI(aURI, aWindowContext); } \
135
0
  NS_IMETHOD GetPreferredAction(nsHandlerInfoAction *aPreferredAction) override { return _to GetPreferredAction(aPreferredAction); } \
136
0
  NS_IMETHOD SetPreferredAction(nsHandlerInfoAction aPreferredAction) override { return _to SetPreferredAction(aPreferredAction); } \
137
0
  NS_IMETHOD GetAlwaysAskBeforeHandling(bool *aAlwaysAskBeforeHandling) override { return _to GetAlwaysAskBeforeHandling(aAlwaysAskBeforeHandling); } \
138
0
  NS_IMETHOD SetAlwaysAskBeforeHandling(bool aAlwaysAskBeforeHandling) override { return _to SetAlwaysAskBeforeHandling(aAlwaysAskBeforeHandling); } 
139
140
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
141
#define NS_FORWARD_SAFE_NSIHANDLERINFO(_to) \
142
  NS_IMETHOD GetType(nsACString& aType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetType(aType); } \
143
  NS_IMETHOD GetDescription(nsAString& aDescription) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDescription(aDescription); } \
144
  NS_IMETHOD SetDescription(const nsAString& aDescription) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDescription(aDescription); } \
145
  NS_IMETHOD GetPreferredApplicationHandler(nsIHandlerApp **aPreferredApplicationHandler) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPreferredApplicationHandler(aPreferredApplicationHandler); } \
146
  NS_IMETHOD SetPreferredApplicationHandler(nsIHandlerApp *aPreferredApplicationHandler) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPreferredApplicationHandler(aPreferredApplicationHandler); } \
147
  NS_IMETHOD GetPossibleApplicationHandlers(nsIMutableArray **aPossibleApplicationHandlers) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPossibleApplicationHandlers(aPossibleApplicationHandlers); } \
148
  NS_IMETHOD GetHasDefaultHandler(bool *aHasDefaultHandler) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHasDefaultHandler(aHasDefaultHandler); } \
149
  NS_IMETHOD GetDefaultDescription(nsAString& aDefaultDescription) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefaultDescription(aDefaultDescription); } \
150
  NS_IMETHOD LaunchWithURI(nsIURI *aURI, nsIInterfaceRequestor *aWindowContext) override { return !_to ? NS_ERROR_NULL_POINTER : _to->LaunchWithURI(aURI, aWindowContext); } \
151
  NS_IMETHOD GetPreferredAction(nsHandlerInfoAction *aPreferredAction) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPreferredAction(aPreferredAction); } \
152
  NS_IMETHOD SetPreferredAction(nsHandlerInfoAction aPreferredAction) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPreferredAction(aPreferredAction); } \
153
  NS_IMETHOD GetAlwaysAskBeforeHandling(bool *aAlwaysAskBeforeHandling) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAlwaysAskBeforeHandling(aAlwaysAskBeforeHandling); } \
154
  NS_IMETHOD SetAlwaysAskBeforeHandling(bool aAlwaysAskBeforeHandling) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAlwaysAskBeforeHandling(aAlwaysAskBeforeHandling); } 
155
156
157
/* starting interface:    nsIMIMEInfo */
158
#define NS_IMIMEINFO_IID_STR "1c21acef-c7a1-40c6-9d40-a20480ee53a1"
159
160
#define NS_IMIMEINFO_IID \
161
  {0x1c21acef, 0xc7a1, 0x40c6, \
162
    { 0x9d, 0x40, 0xa2, 0x04, 0x80, 0xee, 0x53, 0xa1 }}
163
164
class NS_NO_VTABLE nsIMIMEInfo : public nsIHandlerInfo {
165
 public:
166
167
  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IMIMEINFO_IID)
168
169
  /* nsIUTF8StringEnumerator getFileExtensions (); */
170
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetFileExtensions(nsIUTF8StringEnumerator **_retval) = 0;
171
172
  /* void setFileExtensions (in AUTF8String aExtensions); */
173
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetFileExtensions(const nsACString& aExtensions) = 0;
174
175
  /* boolean extensionExists (in AUTF8String aExtension); */
176
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD ExtensionExists(const nsACString& aExtension, bool *_retval) = 0;
177
178
  /* void appendExtension (in AUTF8String aExtension); */
179
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD AppendExtension(const nsACString& aExtension) = 0;
180
181
  /* attribute AUTF8String primaryExtension; */
182
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetPrimaryExtension(nsACString& aPrimaryExtension) = 0;
183
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetPrimaryExtension(const nsACString& aPrimaryExtension) = 0;
184
185
  /* readonly attribute ACString MIMEType; */
186
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetMIMEType(nsACString& aMIMEType) = 0;
187
188
  /* boolean equals (in nsIMIMEInfo aMIMEInfo); */
189
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Equals(nsIMIMEInfo *aMIMEInfo, bool *_retval) = 0;
190
191
  /* readonly attribute nsIArray possibleLocalHandlers; */
192
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetPossibleLocalHandlers(nsIArray **aPossibleLocalHandlers) = 0;
193
194
  /* void launchWithFile (in nsIFile aFile); */
195
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD LaunchWithFile(nsIFile *aFile) = 0;
196
197
};
198
199
  NS_DEFINE_STATIC_IID_ACCESSOR(nsIMIMEInfo, NS_IMIMEINFO_IID)
200
201
/* Use this macro when declaring classes that implement this interface. */
202
#define NS_DECL_NSIMIMEINFO \
203
  NS_IMETHOD GetFileExtensions(nsIUTF8StringEnumerator **_retval) override; \
204
  NS_IMETHOD SetFileExtensions(const nsACString& aExtensions) override; \
205
  NS_IMETHOD ExtensionExists(const nsACString& aExtension, bool *_retval) override; \
206
  NS_IMETHOD AppendExtension(const nsACString& aExtension) override; \
207
  NS_IMETHOD GetPrimaryExtension(nsACString& aPrimaryExtension) override; \
208
  NS_IMETHOD SetPrimaryExtension(const nsACString& aPrimaryExtension) override; \
209
  NS_IMETHOD GetMIMEType(nsACString& aMIMEType) override; \
210
  NS_IMETHOD Equals(nsIMIMEInfo *aMIMEInfo, bool *_retval) override; \
211
  NS_IMETHOD GetPossibleLocalHandlers(nsIArray **aPossibleLocalHandlers) override; \
212
  NS_IMETHOD LaunchWithFile(nsIFile *aFile) override; 
213
214
/* Use this macro when declaring the members of this interface when the
215
   class doesn't implement the interface. This is useful for forwarding. */
216
#define NS_DECL_NON_VIRTUAL_NSIMIMEINFO \
217
  nsresult GetFileExtensions(nsIUTF8StringEnumerator **_retval); \
218
  nsresult SetFileExtensions(const nsACString& aExtensions); \
219
  nsresult ExtensionExists(const nsACString& aExtension, bool *_retval); \
220
  nsresult AppendExtension(const nsACString& aExtension); \
221
  nsresult GetPrimaryExtension(nsACString& aPrimaryExtension); \
222
  nsresult SetPrimaryExtension(const nsACString& aPrimaryExtension); \
223
  nsresult GetMIMEType(nsACString& aMIMEType); \
224
  nsresult Equals(nsIMIMEInfo *aMIMEInfo, bool *_retval); \
225
  nsresult GetPossibleLocalHandlers(nsIArray **aPossibleLocalHandlers); \
226
  nsresult LaunchWithFile(nsIFile *aFile); 
227
228
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
229
#define NS_FORWARD_NSIMIMEINFO(_to) \
230
  NS_IMETHOD GetFileExtensions(nsIUTF8StringEnumerator **_retval) override { return _to GetFileExtensions(_retval); } \
231
  NS_IMETHOD SetFileExtensions(const nsACString& aExtensions) override { return _to SetFileExtensions(aExtensions); } \
232
  NS_IMETHOD ExtensionExists(const nsACString& aExtension, bool *_retval) override { return _to ExtensionExists(aExtension, _retval); } \
233
  NS_IMETHOD AppendExtension(const nsACString& aExtension) override { return _to AppendExtension(aExtension); } \
234
  NS_IMETHOD GetPrimaryExtension(nsACString& aPrimaryExtension) override { return _to GetPrimaryExtension(aPrimaryExtension); } \
235
  NS_IMETHOD SetPrimaryExtension(const nsACString& aPrimaryExtension) override { return _to SetPrimaryExtension(aPrimaryExtension); } \
236
  NS_IMETHOD GetMIMEType(nsACString& aMIMEType) override { return _to GetMIMEType(aMIMEType); } \
237
  NS_IMETHOD Equals(nsIMIMEInfo *aMIMEInfo, bool *_retval) override { return _to Equals(aMIMEInfo, _retval); } \
238
  NS_IMETHOD GetPossibleLocalHandlers(nsIArray **aPossibleLocalHandlers) override { return _to GetPossibleLocalHandlers(aPossibleLocalHandlers); } \
239
  NS_IMETHOD LaunchWithFile(nsIFile *aFile) override { return _to LaunchWithFile(aFile); } 
240
241
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
242
#define NS_FORWARD_SAFE_NSIMIMEINFO(_to) \
243
  NS_IMETHOD GetFileExtensions(nsIUTF8StringEnumerator **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFileExtensions(_retval); } \
244
  NS_IMETHOD SetFileExtensions(const nsACString& aExtensions) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFileExtensions(aExtensions); } \
245
  NS_IMETHOD ExtensionExists(const nsACString& aExtension, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ExtensionExists(aExtension, _retval); } \
246
  NS_IMETHOD AppendExtension(const nsACString& aExtension) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AppendExtension(aExtension); } \
247
  NS_IMETHOD GetPrimaryExtension(nsACString& aPrimaryExtension) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPrimaryExtension(aPrimaryExtension); } \
248
  NS_IMETHOD SetPrimaryExtension(const nsACString& aPrimaryExtension) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPrimaryExtension(aPrimaryExtension); } \
249
  NS_IMETHOD GetMIMEType(nsACString& aMIMEType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMIMEType(aMIMEType); } \
250
  NS_IMETHOD Equals(nsIMIMEInfo *aMIMEInfo, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Equals(aMIMEInfo, _retval); } \
251
  NS_IMETHOD GetPossibleLocalHandlers(nsIArray **aPossibleLocalHandlers) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPossibleLocalHandlers(aPossibleLocalHandlers); } \
252
  NS_IMETHOD LaunchWithFile(nsIFile *aFile) override { return !_to ? NS_ERROR_NULL_POINTER : _to->LaunchWithFile(aFile); } 
253
254
255
/* starting interface:    nsIHandlerApp */
256
#define NS_IHANDLERAPP_IID_STR "8bdf20a4-9170-4548-af52-78311a44f920"
257
258
#define NS_IHANDLERAPP_IID \
259
  {0x8bdf20a4, 0x9170, 0x4548, \
260
    { 0xaf, 0x52, 0x78, 0x31, 0x1a, 0x44, 0xf9, 0x20 }}
261
262
class NS_NO_VTABLE nsIHandlerApp : public nsISupports {
263
 public:
264
265
  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IHANDLERAPP_IID)
266
267
  /* attribute AString name; */
268
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetName(nsAString& aName) = 0;
269
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetName(const nsAString& aName) = 0;
270
271
  /* attribute AString detailedDescription; */
272
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetDetailedDescription(nsAString& aDetailedDescription) = 0;
273
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetDetailedDescription(const nsAString& aDetailedDescription) = 0;
274
275
  /* boolean equals (in nsIHandlerApp aHandlerApp); */
276
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Equals(nsIHandlerApp *aHandlerApp, bool *_retval) = 0;
277
278
  /* void launchWithURI (in nsIURI aURI, [optional] in nsIInterfaceRequestor aWindowContext); */
279
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD LaunchWithURI(nsIURI *aURI, nsIInterfaceRequestor *aWindowContext) = 0;
280
281
};
282
283
  NS_DEFINE_STATIC_IID_ACCESSOR(nsIHandlerApp, NS_IHANDLERAPP_IID)
284
285
/* Use this macro when declaring classes that implement this interface. */
286
#define NS_DECL_NSIHANDLERAPP \
287
  NS_IMETHOD GetName(nsAString& aName) override; \
288
  NS_IMETHOD SetName(const nsAString& aName) override; \
289
  NS_IMETHOD GetDetailedDescription(nsAString& aDetailedDescription) override; \
290
  NS_IMETHOD SetDetailedDescription(const nsAString& aDetailedDescription) override; \
291
  NS_IMETHOD Equals(nsIHandlerApp *aHandlerApp, bool *_retval) override; \
292
  NS_IMETHOD LaunchWithURI(nsIURI *aURI, nsIInterfaceRequestor *aWindowContext) override; 
293
294
/* Use this macro when declaring the members of this interface when the
295
   class doesn't implement the interface. This is useful for forwarding. */
296
#define NS_DECL_NON_VIRTUAL_NSIHANDLERAPP \
297
  nsresult GetName(nsAString& aName); \
298
  nsresult SetName(const nsAString& aName); \
299
  nsresult GetDetailedDescription(nsAString& aDetailedDescription); \
300
  nsresult SetDetailedDescription(const nsAString& aDetailedDescription); \
301
  nsresult Equals(nsIHandlerApp *aHandlerApp, bool *_retval); \
302
  nsresult LaunchWithURI(nsIURI *aURI, nsIInterfaceRequestor *aWindowContext); 
303
304
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
305
#define NS_FORWARD_NSIHANDLERAPP(_to) \
306
  NS_IMETHOD GetName(nsAString& aName) override { return _to GetName(aName); } \
307
  NS_IMETHOD SetName(const nsAString& aName) override { return _to SetName(aName); } \
308
  NS_IMETHOD GetDetailedDescription(nsAString& aDetailedDescription) override { return _to GetDetailedDescription(aDetailedDescription); } \
309
  NS_IMETHOD SetDetailedDescription(const nsAString& aDetailedDescription) override { return _to SetDetailedDescription(aDetailedDescription); } \
310
  NS_IMETHOD Equals(nsIHandlerApp *aHandlerApp, bool *_retval) override { return _to Equals(aHandlerApp, _retval); } \
311
  NS_IMETHOD LaunchWithURI(nsIURI *aURI, nsIInterfaceRequestor *aWindowContext) override { return _to LaunchWithURI(aURI, aWindowContext); } 
312
313
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
314
#define NS_FORWARD_SAFE_NSIHANDLERAPP(_to) \
315
  NS_IMETHOD GetName(nsAString& aName) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \
316
  NS_IMETHOD SetName(const nsAString& aName) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetName(aName); } \
317
  NS_IMETHOD GetDetailedDescription(nsAString& aDetailedDescription) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDetailedDescription(aDetailedDescription); } \
318
  NS_IMETHOD SetDetailedDescription(const nsAString& aDetailedDescription) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDetailedDescription(aDetailedDescription); } \
319
  NS_IMETHOD Equals(nsIHandlerApp *aHandlerApp, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Equals(aHandlerApp, _retval); } \
320
  NS_IMETHOD LaunchWithURI(nsIURI *aURI, nsIInterfaceRequestor *aWindowContext) override { return !_to ? NS_ERROR_NULL_POINTER : _to->LaunchWithURI(aURI, aWindowContext); } 
321
322
323
/* starting interface:    nsILocalHandlerApp */
324
#define NS_ILOCALHANDLERAPP_IID_STR "d36b6329-52ae-4f45-80f4-b2536ae5f8b2"
325
326
#define NS_ILOCALHANDLERAPP_IID \
327
  {0xd36b6329, 0x52ae, 0x4f45, \
328
    { 0x80, 0xf4, 0xb2, 0x53, 0x6a, 0xe5, 0xf8, 0xb2 }}
329
330
class NS_NO_VTABLE nsILocalHandlerApp : public nsIHandlerApp {
331
 public:
332
333
  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ILOCALHANDLERAPP_IID)
334
335
  /* attribute nsIFile executable; */
336
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetExecutable(nsIFile **aExecutable) = 0;
337
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetExecutable(nsIFile *aExecutable) = 0;
338
339
  /* readonly attribute unsigned long parameterCount; */
340
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetParameterCount(uint32_t *aParameterCount) = 0;
341
342
  /* void clearParameters (); */
343
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD ClearParameters(void) = 0;
344
345
  /* void appendParameter (in AString param); */
346
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD AppendParameter(const nsAString& param) = 0;
347
348
  /* AString getParameter (in unsigned long parameterIndex); */
349
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetParameter(uint32_t parameterIndex, nsAString& _retval) = 0;
350
351
  /* boolean parameterExists (in AString param); */
352
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD ParameterExists(const nsAString& param, bool *_retval) = 0;
353
354
};
355
356
  NS_DEFINE_STATIC_IID_ACCESSOR(nsILocalHandlerApp, NS_ILOCALHANDLERAPP_IID)
357
358
/* Use this macro when declaring classes that implement this interface. */
359
#define NS_DECL_NSILOCALHANDLERAPP \
360
  NS_IMETHOD GetExecutable(nsIFile **aExecutable) override; \
361
  NS_IMETHOD SetExecutable(nsIFile *aExecutable) override; \
362
  NS_IMETHOD GetParameterCount(uint32_t *aParameterCount) override; \
363
  NS_IMETHOD ClearParameters(void) override; \
364
  NS_IMETHOD AppendParameter(const nsAString& param) override; \
365
  NS_IMETHOD GetParameter(uint32_t parameterIndex, nsAString& _retval) override; \
366
  NS_IMETHOD ParameterExists(const nsAString& param, bool *_retval) override; 
367
368
/* Use this macro when declaring the members of this interface when the
369
   class doesn't implement the interface. This is useful for forwarding. */
370
#define NS_DECL_NON_VIRTUAL_NSILOCALHANDLERAPP \
371
  nsresult GetExecutable(nsIFile **aExecutable); \
372
  nsresult SetExecutable(nsIFile *aExecutable); \
373
  nsresult GetParameterCount(uint32_t *aParameterCount); \
374
  nsresult ClearParameters(void); \
375
  nsresult AppendParameter(const nsAString& param); \
376
  nsresult GetParameter(uint32_t parameterIndex, nsAString& _retval); \
377
  nsresult ParameterExists(const nsAString& param, bool *_retval); 
378
379
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
380
#define NS_FORWARD_NSILOCALHANDLERAPP(_to) \
381
  NS_IMETHOD GetExecutable(nsIFile **aExecutable) override { return _to GetExecutable(aExecutable); } \
382
  NS_IMETHOD SetExecutable(nsIFile *aExecutable) override { return _to SetExecutable(aExecutable); } \
383
  NS_IMETHOD GetParameterCount(uint32_t *aParameterCount) override { return _to GetParameterCount(aParameterCount); } \
384
  NS_IMETHOD ClearParameters(void) override { return _to ClearParameters(); } \
385
  NS_IMETHOD AppendParameter(const nsAString& param) override { return _to AppendParameter(param); } \
386
  NS_IMETHOD GetParameter(uint32_t parameterIndex, nsAString& _retval) override { return _to GetParameter(parameterIndex, _retval); } \
387
  NS_IMETHOD ParameterExists(const nsAString& param, bool *_retval) override { return _to ParameterExists(param, _retval); } 
388
389
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
390
#define NS_FORWARD_SAFE_NSILOCALHANDLERAPP(_to) \
391
  NS_IMETHOD GetExecutable(nsIFile **aExecutable) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetExecutable(aExecutable); } \
392
  NS_IMETHOD SetExecutable(nsIFile *aExecutable) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetExecutable(aExecutable); } \
393
  NS_IMETHOD GetParameterCount(uint32_t *aParameterCount) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetParameterCount(aParameterCount); } \
394
  NS_IMETHOD ClearParameters(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ClearParameters(); } \
395
  NS_IMETHOD AppendParameter(const nsAString& param) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AppendParameter(param); } \
396
  NS_IMETHOD GetParameter(uint32_t parameterIndex, nsAString& _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetParameter(parameterIndex, _retval); } \
397
  NS_IMETHOD ParameterExists(const nsAString& param, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ParameterExists(param, _retval); } 
398
399
400
/* starting interface:    nsIWebHandlerApp */
401
#define NS_IWEBHANDLERAPP_IID_STR "7521a093-c498-45ce-b462-df7ba0d882f6"
402
403
#define NS_IWEBHANDLERAPP_IID \
404
  {0x7521a093, 0xc498, 0x45ce, \
405
    { 0xb4, 0x62, 0xdf, 0x7b, 0xa0, 0xd8, 0x82, 0xf6 }}
406
407
class NS_NO_VTABLE nsIWebHandlerApp : public nsIHandlerApp {
408
 public:
409
410
  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IWEBHANDLERAPP_IID)
411
412
  /* attribute AUTF8String uriTemplate; */
413
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetUriTemplate(nsACString& aUriTemplate) = 0;
414
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetUriTemplate(const nsACString& aUriTemplate) = 0;
415
416
};
417
418
  NS_DEFINE_STATIC_IID_ACCESSOR(nsIWebHandlerApp, NS_IWEBHANDLERAPP_IID)
419
420
/* Use this macro when declaring classes that implement this interface. */
421
#define NS_DECL_NSIWEBHANDLERAPP \
422
  NS_IMETHOD GetUriTemplate(nsACString& aUriTemplate) override; \
423
  NS_IMETHOD SetUriTemplate(const nsACString& aUriTemplate) override; 
424
425
/* Use this macro when declaring the members of this interface when the
426
   class doesn't implement the interface. This is useful for forwarding. */
427
#define NS_DECL_NON_VIRTUAL_NSIWEBHANDLERAPP \
428
  nsresult GetUriTemplate(nsACString& aUriTemplate); \
429
  nsresult SetUriTemplate(const nsACString& aUriTemplate); 
430
431
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
432
#define NS_FORWARD_NSIWEBHANDLERAPP(_to) \
433
  NS_IMETHOD GetUriTemplate(nsACString& aUriTemplate) override { return _to GetUriTemplate(aUriTemplate); } \
434
  NS_IMETHOD SetUriTemplate(const nsACString& aUriTemplate) override { return _to SetUriTemplate(aUriTemplate); } 
435
436
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
437
#define NS_FORWARD_SAFE_NSIWEBHANDLERAPP(_to) \
438
  NS_IMETHOD GetUriTemplate(nsACString& aUriTemplate) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUriTemplate(aUriTemplate); } \
439
  NS_IMETHOD SetUriTemplate(const nsACString& aUriTemplate) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetUriTemplate(aUriTemplate); } 
440
441
442
/* starting interface:    nsIDBusHandlerApp */
443
#define NS_IDBUSHANDLERAPP_IID_STR "1ffc274b-4cbf-4bb5-a635-05ad2cbb6534"
444
445
#define NS_IDBUSHANDLERAPP_IID \
446
  {0x1ffc274b, 0x4cbf, 0x4bb5, \
447
    { 0xa6, 0x35, 0x05, 0xad, 0x2c, 0xbb, 0x65, 0x34 }}
448
449
class NS_NO_VTABLE nsIDBusHandlerApp : public nsIHandlerApp {
450
 public:
451
452
  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDBUSHANDLERAPP_IID)
453
454
  /* attribute AUTF8String service; */
455
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetService(nsACString& aService) = 0;
456
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetService(const nsACString& aService) = 0;
457
458
  /* attribute AUTF8String objectPath; */
459
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetObjectPath(nsACString& aObjectPath) = 0;
460
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetObjectPath(const nsACString& aObjectPath) = 0;
461
462
  /* attribute AUTF8String dBusInterface; */
463
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetDBusInterface(nsACString& aDBusInterface) = 0;
464
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetDBusInterface(const nsACString& aDBusInterface) = 0;
465
466
  /* attribute AUTF8String method; */
467
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetMethod(nsACString& aMethod) = 0;
468
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetMethod(const nsACString& aMethod) = 0;
469
470
};
471
472
  NS_DEFINE_STATIC_IID_ACCESSOR(nsIDBusHandlerApp, NS_IDBUSHANDLERAPP_IID)
473
474
/* Use this macro when declaring classes that implement this interface. */
475
#define NS_DECL_NSIDBUSHANDLERAPP \
476
  NS_IMETHOD GetService(nsACString& aService) override; \
477
  NS_IMETHOD SetService(const nsACString& aService) override; \
478
  NS_IMETHOD GetObjectPath(nsACString& aObjectPath) override; \
479
  NS_IMETHOD SetObjectPath(const nsACString& aObjectPath) override; \
480
  NS_IMETHOD GetDBusInterface(nsACString& aDBusInterface) override; \
481
  NS_IMETHOD SetDBusInterface(const nsACString& aDBusInterface) override; \
482
  NS_IMETHOD GetMethod(nsACString& aMethod) override; \
483
  NS_IMETHOD SetMethod(const nsACString& aMethod) override; 
484
485
/* Use this macro when declaring the members of this interface when the
486
   class doesn't implement the interface. This is useful for forwarding. */
487
#define NS_DECL_NON_VIRTUAL_NSIDBUSHANDLERAPP \
488
  nsresult GetService(nsACString& aService); \
489
  nsresult SetService(const nsACString& aService); \
490
  nsresult GetObjectPath(nsACString& aObjectPath); \
491
  nsresult SetObjectPath(const nsACString& aObjectPath); \
492
  nsresult GetDBusInterface(nsACString& aDBusInterface); \
493
  nsresult SetDBusInterface(const nsACString& aDBusInterface); \
494
  nsresult GetMethod(nsACString& aMethod); \
495
  nsresult SetMethod(const nsACString& aMethod); 
496
497
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
498
#define NS_FORWARD_NSIDBUSHANDLERAPP(_to) \
499
  NS_IMETHOD GetService(nsACString& aService) override { return _to GetService(aService); } \
500
  NS_IMETHOD SetService(const nsACString& aService) override { return _to SetService(aService); } \
501
  NS_IMETHOD GetObjectPath(nsACString& aObjectPath) override { return _to GetObjectPath(aObjectPath); } \
502
  NS_IMETHOD SetObjectPath(const nsACString& aObjectPath) override { return _to SetObjectPath(aObjectPath); } \
503
  NS_IMETHOD GetDBusInterface(nsACString& aDBusInterface) override { return _to GetDBusInterface(aDBusInterface); } \
504
  NS_IMETHOD SetDBusInterface(const nsACString& aDBusInterface) override { return _to SetDBusInterface(aDBusInterface); } \
505
  NS_IMETHOD GetMethod(nsACString& aMethod) override { return _to GetMethod(aMethod); } \
506
  NS_IMETHOD SetMethod(const nsACString& aMethod) override { return _to SetMethod(aMethod); } 
507
508
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
509
#define NS_FORWARD_SAFE_NSIDBUSHANDLERAPP(_to) \
510
  NS_IMETHOD GetService(nsACString& aService) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetService(aService); } \
511
  NS_IMETHOD SetService(const nsACString& aService) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetService(aService); } \
512
  NS_IMETHOD GetObjectPath(nsACString& aObjectPath) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetObjectPath(aObjectPath); } \
513
  NS_IMETHOD SetObjectPath(const nsACString& aObjectPath) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetObjectPath(aObjectPath); } \
514
  NS_IMETHOD GetDBusInterface(nsACString& aDBusInterface) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDBusInterface(aDBusInterface); } \
515
  NS_IMETHOD SetDBusInterface(const nsACString& aDBusInterface) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDBusInterface(aDBusInterface); } \
516
  NS_IMETHOD GetMethod(nsACString& aMethod) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMethod(aMethod); } \
517
  NS_IMETHOD SetMethod(const nsACString& aMethod) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetMethod(aMethod); } 
518
519
520
#endif /* __gen_nsIMIMEInfo_h__ */