Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/nsIURI.h
Line
Count
Source (jump to first uncovered line)
1
/*
2
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM /src/mozilla-central/netwerk/base/nsIURI.idl
3
 */
4
5
#ifndef __gen_nsIURI_h__
6
#define __gen_nsIURI_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
#include "nsString.h"
18
#undef GetPort  // XXX Windows!
19
#undef SetPort  // XXX Windows!
20
namespace mozilla {
21
class Encoding;
22
}
23
class nsIURIMutator; /* forward declaration */
24
25
26
/* starting interface:    nsIURI */
27
#define NS_IURI_IID_STR "92073a54-6d78-4f30-913a-b871813208c6"
28
29
#define NS_IURI_IID \
30
0
  {0x92073a54, 0x6d78, 0x4f30, \
31
0
    { 0x91, 0x3a, 0xb8, 0x71, 0x81, 0x32, 0x08, 0xc6 }}
32
33
class nsIURI : public nsISupports {
34
 public:
35
36
  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IURI_IID)
37
38
  /* readonly attribute AUTF8String spec; */
39
  NS_IMETHOD GetSpec(nsACString& aSpec) = 0;
40
41
     // An infallible wrapper for GetSpec() that returns a failure indication
42
    // string if GetSpec() fails. It is most useful for creating
43
    // logging/warning/error messages produced for human consumption, and when
44
    // matching a URI spec against a fixed spec such as about:blank.
45
    nsCString GetSpecOrDefault()
46
0
    {
47
0
        nsCString spec;
48
0
        nsresult rv = GetSpec(spec);
49
0
        if (NS_FAILED(rv)) {
50
0
            spec.AssignLiteral("[nsIURI::GetSpec failed]");
51
0
        }
52
0
        return spec;
53
0
    }
54
  /* readonly attribute AUTF8String prePath; */
55
  NS_IMETHOD GetPrePath(nsACString& aPrePath) = 0;
56
57
  /* readonly attribute ACString scheme; */
58
  NS_IMETHOD GetScheme(nsACString& aScheme) = 0;
59
60
  /* readonly attribute AUTF8String userPass; */
61
  NS_IMETHOD GetUserPass(nsACString& aUserPass) = 0;
62
63
  /* readonly attribute AUTF8String username; */
64
  NS_IMETHOD GetUsername(nsACString& aUsername) = 0;
65
66
  /* readonly attribute AUTF8String password; */
67
  NS_IMETHOD GetPassword(nsACString& aPassword) = 0;
68
69
  /* readonly attribute AUTF8String hostPort; */
70
  NS_IMETHOD GetHostPort(nsACString& aHostPort) = 0;
71
72
  /* readonly attribute AUTF8String host; */
73
  NS_IMETHOD GetHost(nsACString& aHost) = 0;
74
75
  /* readonly attribute long port; */
76
  NS_IMETHOD GetPort(int32_t *aPort) = 0;
77
78
  /* readonly attribute AUTF8String pathQueryRef; */
79
  NS_IMETHOD GetPathQueryRef(nsACString& aPathQueryRef) = 0;
80
81
  /* boolean equals (in nsIURI other); */
82
  NS_IMETHOD Equals(nsIURI *other, bool *_retval) = 0;
83
84
  /* boolean schemeIs (in string scheme); */
85
  NS_IMETHOD SchemeIs(const char * scheme, bool *_retval) = 0;
86
87
  /* AUTF8String resolve (in AUTF8String relativePath); */
88
  NS_IMETHOD Resolve(const nsACString& relativePath, nsACString& _retval) = 0;
89
90
  /* readonly attribute ACString asciiSpec; */
91
  NS_IMETHOD GetAsciiSpec(nsACString& aAsciiSpec) = 0;
92
93
  /* readonly attribute ACString asciiHostPort; */
94
  NS_IMETHOD GetAsciiHostPort(nsACString& aAsciiHostPort) = 0;
95
96
  /* readonly attribute ACString asciiHost; */
97
  NS_IMETHOD GetAsciiHost(nsACString& aAsciiHost) = 0;
98
99
  /* readonly attribute AUTF8String ref; */
100
  NS_IMETHOD GetRef(nsACString& aRef) = 0;
101
102
  /* boolean equalsExceptRef (in nsIURI other); */
103
  NS_IMETHOD EqualsExceptRef(nsIURI *other, bool *_retval) = 0;
104
105
  /* readonly attribute AUTF8String specIgnoringRef; */
106
  NS_IMETHOD GetSpecIgnoringRef(nsACString& aSpecIgnoringRef) = 0;
107
108
  /* readonly attribute boolean hasRef; */
109
  NS_IMETHOD GetHasRef(bool *aHasRef) = 0;
110
111
  /* readonly attribute AUTF8String filePath; */
112
  NS_IMETHOD GetFilePath(nsACString& aFilePath) = 0;
113
114
  /* readonly attribute AUTF8String query; */
115
  NS_IMETHOD GetQuery(nsACString& aQuery) = 0;
116
117
  /* readonly attribute AUTF8String displayHost; */
118
  NS_IMETHOD GetDisplayHost(nsACString& aDisplayHost) = 0;
119
120
  /* readonly attribute AUTF8String displayHostPort; */
121
  NS_IMETHOD GetDisplayHostPort(nsACString& aDisplayHostPort) = 0;
122
123
  /* readonly attribute AUTF8String displaySpec; */
124
  NS_IMETHOD GetDisplaySpec(nsACString& aDisplaySpec) = 0;
125
126
  /* readonly attribute AUTF8String displayPrePath; */
127
  NS_IMETHOD GetDisplayPrePath(nsACString& aDisplayPrePath) = 0;
128
129
  /* nsIURIMutator mutate (); */
130
  NS_IMETHOD Mutate(nsIURIMutator **_retval) = 0;
131
132
};
133
134
  NS_DEFINE_STATIC_IID_ACCESSOR(nsIURI, NS_IURI_IID)
135
136
/* Use this macro when declaring classes that implement this interface. */
137
#define NS_DECL_NSIURI \
138
  NS_IMETHOD GetSpec(nsACString& aSpec) override; \
139
  NS_IMETHOD GetPrePath(nsACString& aPrePath) override; \
140
  NS_IMETHOD GetScheme(nsACString& aScheme) override; \
141
  NS_IMETHOD GetUserPass(nsACString& aUserPass) override; \
142
  NS_IMETHOD GetUsername(nsACString& aUsername) override; \
143
  NS_IMETHOD GetPassword(nsACString& aPassword) override; \
144
  NS_IMETHOD GetHostPort(nsACString& aHostPort) override; \
145
  NS_IMETHOD GetHost(nsACString& aHost) override; \
146
  NS_IMETHOD GetPort(int32_t *aPort) override; \
147
  NS_IMETHOD GetPathQueryRef(nsACString& aPathQueryRef) override; \
148
  NS_IMETHOD Equals(nsIURI *other, bool *_retval) override; \
149
  NS_IMETHOD SchemeIs(const char * scheme, bool *_retval) override; \
150
  NS_IMETHOD Resolve(const nsACString& relativePath, nsACString& _retval) override; \
151
  NS_IMETHOD GetAsciiSpec(nsACString& aAsciiSpec) override; \
152
  NS_IMETHOD GetAsciiHostPort(nsACString& aAsciiHostPort) override; \
153
  NS_IMETHOD GetAsciiHost(nsACString& aAsciiHost) override; \
154
  NS_IMETHOD GetRef(nsACString& aRef) override; \
155
  NS_IMETHOD EqualsExceptRef(nsIURI *other, bool *_retval) override; \
156
  NS_IMETHOD GetSpecIgnoringRef(nsACString& aSpecIgnoringRef) override; \
157
  NS_IMETHOD GetHasRef(bool *aHasRef) override; \
158
  NS_IMETHOD GetFilePath(nsACString& aFilePath) override; \
159
  NS_IMETHOD GetQuery(nsACString& aQuery) override; \
160
  NS_IMETHOD GetDisplayHost(nsACString& aDisplayHost) override; \
161
  NS_IMETHOD GetDisplayHostPort(nsACString& aDisplayHostPort) override; \
162
  NS_IMETHOD GetDisplaySpec(nsACString& aDisplaySpec) override; \
163
  NS_IMETHOD GetDisplayPrePath(nsACString& aDisplayPrePath) override; \
164
  NS_IMETHOD Mutate(nsIURIMutator **_retval) override; 
165
166
/* Use this macro when declaring the members of this interface when the
167
   class doesn't implement the interface. This is useful for forwarding. */
168
#define NS_DECL_NON_VIRTUAL_NSIURI \
169
  nsresult GetSpec(nsACString& aSpec); \
170
  nsresult GetPrePath(nsACString& aPrePath); \
171
  nsresult GetScheme(nsACString& aScheme); \
172
  nsresult GetUserPass(nsACString& aUserPass); \
173
  nsresult GetUsername(nsACString& aUsername); \
174
  nsresult GetPassword(nsACString& aPassword); \
175
  nsresult GetHostPort(nsACString& aHostPort); \
176
  nsresult GetHost(nsACString& aHost); \
177
  nsresult GetPort(int32_t *aPort); \
178
  nsresult GetPathQueryRef(nsACString& aPathQueryRef); \
179
  nsresult Equals(nsIURI *other, bool *_retval); \
180
  nsresult SchemeIs(const char * scheme, bool *_retval); \
181
  nsresult Resolve(const nsACString& relativePath, nsACString& _retval); \
182
  nsresult GetAsciiSpec(nsACString& aAsciiSpec); \
183
  nsresult GetAsciiHostPort(nsACString& aAsciiHostPort); \
184
  nsresult GetAsciiHost(nsACString& aAsciiHost); \
185
  nsresult GetRef(nsACString& aRef); \
186
  nsresult EqualsExceptRef(nsIURI *other, bool *_retval); \
187
  nsresult GetSpecIgnoringRef(nsACString& aSpecIgnoringRef); \
188
  nsresult GetHasRef(bool *aHasRef); \
189
  nsresult GetFilePath(nsACString& aFilePath); \
190
  nsresult GetQuery(nsACString& aQuery); \
191
  nsresult GetDisplayHost(nsACString& aDisplayHost); \
192
  nsresult GetDisplayHostPort(nsACString& aDisplayHostPort); \
193
  nsresult GetDisplaySpec(nsACString& aDisplaySpec); \
194
  nsresult GetDisplayPrePath(nsACString& aDisplayPrePath); \
195
  nsresult Mutate(nsIURIMutator **_retval); 
196
197
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
198
#define NS_FORWARD_NSIURI(_to) \
199
  NS_IMETHOD GetSpec(nsACString& aSpec) override { return _to GetSpec(aSpec); } \
200
  NS_IMETHOD GetPrePath(nsACString& aPrePath) override { return _to GetPrePath(aPrePath); } \
201
  NS_IMETHOD GetScheme(nsACString& aScheme) override { return _to GetScheme(aScheme); } \
202
  NS_IMETHOD GetUserPass(nsACString& aUserPass) override { return _to GetUserPass(aUserPass); } \
203
  NS_IMETHOD GetUsername(nsACString& aUsername) override { return _to GetUsername(aUsername); } \
204
  NS_IMETHOD GetPassword(nsACString& aPassword) override { return _to GetPassword(aPassword); } \
205
  NS_IMETHOD GetHostPort(nsACString& aHostPort) override { return _to GetHostPort(aHostPort); } \
206
  NS_IMETHOD GetHost(nsACString& aHost) override { return _to GetHost(aHost); } \
207
  NS_IMETHOD GetPort(int32_t *aPort) override { return _to GetPort(aPort); } \
208
  NS_IMETHOD GetPathQueryRef(nsACString& aPathQueryRef) override { return _to GetPathQueryRef(aPathQueryRef); } \
209
  NS_IMETHOD Equals(nsIURI *other, bool *_retval) override { return _to Equals(other, _retval); } \
210
  NS_IMETHOD SchemeIs(const char * scheme, bool *_retval) override { return _to SchemeIs(scheme, _retval); } \
211
  NS_IMETHOD Resolve(const nsACString& relativePath, nsACString& _retval) override { return _to Resolve(relativePath, _retval); } \
212
  NS_IMETHOD GetAsciiSpec(nsACString& aAsciiSpec) override { return _to GetAsciiSpec(aAsciiSpec); } \
213
  NS_IMETHOD GetAsciiHostPort(nsACString& aAsciiHostPort) override { return _to GetAsciiHostPort(aAsciiHostPort); } \
214
  NS_IMETHOD GetAsciiHost(nsACString& aAsciiHost) override { return _to GetAsciiHost(aAsciiHost); } \
215
  NS_IMETHOD GetRef(nsACString& aRef) override { return _to GetRef(aRef); } \
216
  NS_IMETHOD EqualsExceptRef(nsIURI *other, bool *_retval) override { return _to EqualsExceptRef(other, _retval); } \
217
  NS_IMETHOD GetSpecIgnoringRef(nsACString& aSpecIgnoringRef) override { return _to GetSpecIgnoringRef(aSpecIgnoringRef); } \
218
  NS_IMETHOD GetHasRef(bool *aHasRef) override { return _to GetHasRef(aHasRef); } \
219
  NS_IMETHOD GetFilePath(nsACString& aFilePath) override { return _to GetFilePath(aFilePath); } \
220
  NS_IMETHOD GetQuery(nsACString& aQuery) override { return _to GetQuery(aQuery); } \
221
  NS_IMETHOD GetDisplayHost(nsACString& aDisplayHost) override { return _to GetDisplayHost(aDisplayHost); } \
222
  NS_IMETHOD GetDisplayHostPort(nsACString& aDisplayHostPort) override { return _to GetDisplayHostPort(aDisplayHostPort); } \
223
  NS_IMETHOD GetDisplaySpec(nsACString& aDisplaySpec) override { return _to GetDisplaySpec(aDisplaySpec); } \
224
  NS_IMETHOD GetDisplayPrePath(nsACString& aDisplayPrePath) override { return _to GetDisplayPrePath(aDisplayPrePath); } \
225
  NS_IMETHOD Mutate(nsIURIMutator **_retval) override { return _to Mutate(_retval); } 
226
227
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
228
#define NS_FORWARD_SAFE_NSIURI(_to) \
229
  NS_IMETHOD GetSpec(nsACString& aSpec) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSpec(aSpec); } \
230
  NS_IMETHOD GetPrePath(nsACString& aPrePath) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPrePath(aPrePath); } \
231
  NS_IMETHOD GetScheme(nsACString& aScheme) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetScheme(aScheme); } \
232
  NS_IMETHOD GetUserPass(nsACString& aUserPass) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUserPass(aUserPass); } \
233
  NS_IMETHOD GetUsername(nsACString& aUsername) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUsername(aUsername); } \
234
  NS_IMETHOD GetPassword(nsACString& aPassword) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPassword(aPassword); } \
235
  NS_IMETHOD GetHostPort(nsACString& aHostPort) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHostPort(aHostPort); } \
236
  NS_IMETHOD GetHost(nsACString& aHost) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHost(aHost); } \
237
  NS_IMETHOD GetPort(int32_t *aPort) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPort(aPort); } \
238
  NS_IMETHOD GetPathQueryRef(nsACString& aPathQueryRef) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPathQueryRef(aPathQueryRef); } \
239
  NS_IMETHOD Equals(nsIURI *other, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Equals(other, _retval); } \
240
  NS_IMETHOD SchemeIs(const char * scheme, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SchemeIs(scheme, _retval); } \
241
  NS_IMETHOD Resolve(const nsACString& relativePath, nsACString& _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Resolve(relativePath, _retval); } \
242
  NS_IMETHOD GetAsciiSpec(nsACString& aAsciiSpec) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAsciiSpec(aAsciiSpec); } \
243
  NS_IMETHOD GetAsciiHostPort(nsACString& aAsciiHostPort) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAsciiHostPort(aAsciiHostPort); } \
244
  NS_IMETHOD GetAsciiHost(nsACString& aAsciiHost) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAsciiHost(aAsciiHost); } \
245
  NS_IMETHOD GetRef(nsACString& aRef) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRef(aRef); } \
246
  NS_IMETHOD EqualsExceptRef(nsIURI *other, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->EqualsExceptRef(other, _retval); } \
247
  NS_IMETHOD GetSpecIgnoringRef(nsACString& aSpecIgnoringRef) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSpecIgnoringRef(aSpecIgnoringRef); } \
248
  NS_IMETHOD GetHasRef(bool *aHasRef) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHasRef(aHasRef); } \
249
  NS_IMETHOD GetFilePath(nsACString& aFilePath) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFilePath(aFilePath); } \
250
  NS_IMETHOD GetQuery(nsACString& aQuery) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetQuery(aQuery); } \
251
  NS_IMETHOD GetDisplayHost(nsACString& aDisplayHost) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDisplayHost(aDisplayHost); } \
252
  NS_IMETHOD GetDisplayHostPort(nsACString& aDisplayHostPort) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDisplayHostPort(aDisplayHostPort); } \
253
  NS_IMETHOD GetDisplaySpec(nsACString& aDisplaySpec) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDisplaySpec(aDisplaySpec); } \
254
  NS_IMETHOD GetDisplayPrePath(nsACString& aDisplayPrePath) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDisplayPrePath(aDisplayPrePath); } \
255
  NS_IMETHOD Mutate(nsIURIMutator **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Mutate(_retval); } 
256
257
258
#endif /* __gen_nsIURI_h__ */