Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/nsISiteSecurityService.h
Line
Count
Source (jump to first uncovered line)
1
/*
2
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM /src/mozilla-central/security/manager/ssl/nsISiteSecurityService.idl
3
 */
4
5
#ifndef __gen_nsISiteSecurityService_h__
6
#define __gen_nsISiteSecurityService_h__
7
8
9
#ifndef __gen_nsISupports_h__
10
#include "nsISupports.h"
11
#endif
12
13
#include "js/Value.h"
14
15
#include "mozilla/AlreadyAddRefed.h"
16
#include "mozilla/Assertions.h"
17
#include "mozilla/DebugOnly.h"
18
19
#include "js/GCAnnotations.h"
20
21
/* For IDL files that don't want to include root IDL files. */
22
#ifndef NS_NO_VTABLE
23
#define NS_NO_VTABLE
24
#endif
25
class nsIURI; /* forward declaration */
26
27
class nsIObserver; /* forward declaration */
28
29
class nsIHttpChannel; /* forward declaration */
30
31
class nsITransportSecurityInfo; /* forward declaration */
32
33
class nsISimpleEnumerator; /* forward declaration */
34
35
#include "nsStringFwd.h"
36
#include "nsTArrayForwardDeclare.h"
37
namespace mozilla
38
{
39
  namespace pkix
40
  {
41
    class Time;
42
  }
43
}
44
45
/* starting interface:    nsISiteSecurityState */
46
#define NS_ISITESECURITYSTATE_IID_STR "31313372-842c-4110-bdf1-6aea17c845ad"
47
48
#define NS_ISITESECURITYSTATE_IID \
49
  {0x31313372, 0x842c, 0x4110, \
50
    { 0xbd, 0xf1, 0x6a, 0xea, 0x17, 0xc8, 0x45, 0xad }}
51
52
class NS_NO_VTABLE nsISiteSecurityState : public nsISupports {
53
 public:
54
55
  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISITESECURITYSTATE_IID)
56
57
  /* [must_use] readonly attribute ACString hostname; */
58
  MOZ_MUST_USE NS_IMETHOD GetHostname(nsACString& aHostname) = 0;
59
60
  /* [infallible] readonly attribute long long expireTime; */
61
  NS_IMETHOD GetExpireTime(int64_t *aExpireTime) = 0;
62
  inline int64_t GetExpireTime()
63
0
  {
64
0
    int64_t result;
65
0
    mozilla::DebugOnly<nsresult> rv = GetExpireTime(&result);
66
0
    MOZ_ASSERT(NS_SUCCEEDED(rv));
67
0
    return result;
68
0
  }
69
70
  /* [infallible] readonly attribute short securityPropertyState; */
71
  NS_IMETHOD GetSecurityPropertyState(int16_t *aSecurityPropertyState) = 0;
72
  inline int16_t GetSecurityPropertyState()
73
0
  {
74
0
    int16_t result;
75
0
    mozilla::DebugOnly<nsresult> rv = GetSecurityPropertyState(&result);
76
0
    MOZ_ASSERT(NS_SUCCEEDED(rv));
77
0
    return result;
78
0
  }
79
80
  /* [infallible] readonly attribute boolean includeSubdomains; */
81
  NS_IMETHOD GetIncludeSubdomains(bool *aIncludeSubdomains) = 0;
82
  inline bool GetIncludeSubdomains()
83
0
  {
84
0
    bool result;
85
0
    mozilla::DebugOnly<nsresult> rv = GetIncludeSubdomains(&result);
86
0
    MOZ_ASSERT(NS_SUCCEEDED(rv));
87
0
    return result;
88
0
  }
89
90
  /* [implicit_jscontext,must_use] readonly attribute jsval originAttributes; */
91
  MOZ_MUST_USE NS_IMETHOD GetOriginAttributes(JSContext* cx, JS::MutableHandleValue aOriginAttributes) = 0;
92
93
  enum {
94
    SECURITY_PROPERTY_UNSET = 0,
95
    SECURITY_PROPERTY_SET = 1,
96
    SECURITY_PROPERTY_KNOCKOUT = 2,
97
    SECURITY_PROPERTY_NEGATIVE = 3
98
  };
99
100
};
101
102
  NS_DEFINE_STATIC_IID_ACCESSOR(nsISiteSecurityState, NS_ISITESECURITYSTATE_IID)
103
104
/* Use this macro when declaring classes that implement this interface. */
105
#define NS_DECL_NSISITESECURITYSTATE \
106
  MOZ_MUST_USE NS_IMETHOD GetHostname(nsACString& aHostname) override; \
107
  using nsISiteSecurityState::GetExpireTime; \
108
  NS_IMETHOD GetExpireTime(int64_t *aExpireTime) override; \
109
  using nsISiteSecurityState::GetSecurityPropertyState; \
110
  NS_IMETHOD GetSecurityPropertyState(int16_t *aSecurityPropertyState) override; \
111
  using nsISiteSecurityState::GetIncludeSubdomains; \
112
  NS_IMETHOD GetIncludeSubdomains(bool *aIncludeSubdomains) override; \
113
  MOZ_MUST_USE NS_IMETHOD GetOriginAttributes(JSContext* cx, JS::MutableHandleValue aOriginAttributes) override; \
114
115
/* Use this macro when declaring the members of this interface when the
116
   class doesn't implement the interface. This is useful for forwarding. */
117
#define NS_DECL_NON_VIRTUAL_NSISITESECURITYSTATE \
118
  MOZ_MUST_USE nsresult GetHostname(nsACString& aHostname); \
119
  using nsISiteSecurityState::GetExpireTime; \
120
  nsresult GetExpireTime(int64_t *aExpireTime); \
121
  using nsISiteSecurityState::GetSecurityPropertyState; \
122
  nsresult GetSecurityPropertyState(int16_t *aSecurityPropertyState); \
123
  using nsISiteSecurityState::GetIncludeSubdomains; \
124
  nsresult GetIncludeSubdomains(bool *aIncludeSubdomains); \
125
  MOZ_MUST_USE nsresult GetOriginAttributes(JSContext* cx, JS::MutableHandleValue aOriginAttributes); \
126
127
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
128
#define NS_FORWARD_NSISITESECURITYSTATE(_to) \
129
  MOZ_MUST_USE NS_IMETHOD GetHostname(nsACString& aHostname) override { return _to GetHostname(aHostname); } \
130
  using nsISiteSecurityState::GetExpireTime; \
131
  NS_IMETHOD GetExpireTime(int64_t *aExpireTime) override { return _to GetExpireTime(aExpireTime); } \
132
  using nsISiteSecurityState::GetSecurityPropertyState; \
133
  NS_IMETHOD GetSecurityPropertyState(int16_t *aSecurityPropertyState) override { return _to GetSecurityPropertyState(aSecurityPropertyState); } \
134
  using nsISiteSecurityState::GetIncludeSubdomains; \
135
  NS_IMETHOD GetIncludeSubdomains(bool *aIncludeSubdomains) override { return _to GetIncludeSubdomains(aIncludeSubdomains); } \
136
  MOZ_MUST_USE NS_IMETHOD GetOriginAttributes(JSContext* cx, JS::MutableHandleValue aOriginAttributes) override { return _to GetOriginAttributes(cx, aOriginAttributes); } \
137
138
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
139
#define NS_FORWARD_SAFE_NSISITESECURITYSTATE(_to) \
140
  MOZ_MUST_USE NS_IMETHOD GetHostname(nsACString& aHostname) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHostname(aHostname); } \
141
  NS_IMETHOD GetExpireTime(int64_t *aExpireTime) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetExpireTime(aExpireTime); } \
142
  NS_IMETHOD GetSecurityPropertyState(int16_t *aSecurityPropertyState) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSecurityPropertyState(aSecurityPropertyState); } \
143
  NS_IMETHOD GetIncludeSubdomains(bool *aIncludeSubdomains) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIncludeSubdomains(aIncludeSubdomains); } \
144
  MOZ_MUST_USE NS_IMETHOD GetOriginAttributes(JSContext* cx, JS::MutableHandleValue aOriginAttributes) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOriginAttributes(cx, aOriginAttributes); } \
145
146
147
/* starting interface:    nsISiteHSTSState */
148
#define NS_ISITEHSTSSTATE_IID_STR "9ff16e40-1029-496c-95c2-bc819872b216"
149
150
#define NS_ISITEHSTSSTATE_IID \
151
  {0x9ff16e40, 0x1029, 0x496c, \
152
    { 0x95, 0xc2, 0xbc, 0x81, 0x98, 0x72, 0xb2, 0x16 }}
153
154
class NS_NO_VTABLE nsISiteHSTSState : public nsISiteSecurityState {
155
 public:
156
157
  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISITEHSTSSTATE_IID)
158
159
};
160
161
  NS_DEFINE_STATIC_IID_ACCESSOR(nsISiteHSTSState, NS_ISITEHSTSSTATE_IID)
162
163
/* Use this macro when declaring classes that implement this interface. */
164
#define NS_DECL_NSISITEHSTSSTATE \
165
  /* no methods! */
166
167
/* Use this macro when declaring the members of this interface when the
168
   class doesn't implement the interface. This is useful for forwarding. */
169
#define NS_DECL_NON_VIRTUAL_NSISITEHSTSSTATE \
170
  /* no methods! */
171
172
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
173
#define NS_FORWARD_NSISITEHSTSSTATE(_to) \
174
  /* no methods! */
175
176
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
177
#define NS_FORWARD_SAFE_NSISITEHSTSSTATE(_to) \
178
  /* no methods! */
179
180
181
/* starting interface:    nsISiteHPKPState */
182
#define NS_ISITEHPKPSTATE_IID_STR "ae395078-c7d0-474d-b147-f4aa203a9b2c"
183
184
#define NS_ISITEHPKPSTATE_IID \
185
  {0xae395078, 0xc7d0, 0x474d, \
186
    { 0xb1, 0x47, 0xf4, 0xaa, 0x20, 0x3a, 0x9b, 0x2c }}
187
188
class NS_NO_VTABLE nsISiteHPKPState : public nsISiteSecurityState {
189
 public:
190
191
  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISITEHPKPSTATE_IID)
192
193
  /* [must_use] readonly attribute nsISimpleEnumerator sha256Keys; */
194
  MOZ_MUST_USE NS_IMETHOD GetSha256Keys(nsISimpleEnumerator **aSha256Keys) = 0;
195
196
};
197
198
  NS_DEFINE_STATIC_IID_ACCESSOR(nsISiteHPKPState, NS_ISITEHPKPSTATE_IID)
199
200
/* Use this macro when declaring classes that implement this interface. */
201
#define NS_DECL_NSISITEHPKPSTATE \
202
  MOZ_MUST_USE NS_IMETHOD GetSha256Keys(nsISimpleEnumerator **aSha256Keys) override; 
203
204
/* Use this macro when declaring the members of this interface when the
205
   class doesn't implement the interface. This is useful for forwarding. */
206
#define NS_DECL_NON_VIRTUAL_NSISITEHPKPSTATE \
207
  MOZ_MUST_USE nsresult GetSha256Keys(nsISimpleEnumerator **aSha256Keys); 
208
209
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
210
#define NS_FORWARD_NSISITEHPKPSTATE(_to) \
211
  MOZ_MUST_USE NS_IMETHOD GetSha256Keys(nsISimpleEnumerator **aSha256Keys) override { return _to GetSha256Keys(aSha256Keys); } 
212
213
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
214
#define NS_FORWARD_SAFE_NSISITEHPKPSTATE(_to) \
215
  MOZ_MUST_USE NS_IMETHOD GetSha256Keys(nsISimpleEnumerator **aSha256Keys) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSha256Keys(aSha256Keys); } 
216
217
218
/* starting interface:    nsISiteSecurityService */
219
#define NS_ISITESECURITYSERVICE_IID_STR "275127f8-dbd7-4681-afbf-6df0c6587a01"
220
221
#define NS_ISITESECURITYSERVICE_IID \
222
  {0x275127f8, 0xdbd7, 0x4681, \
223
    { 0xaf, 0xbf, 0x6d, 0xf0, 0xc6, 0x58, 0x7a, 0x01 }}
224
225
class NS_NO_VTABLE nsISiteSecurityService : public nsISupports {
226
 public:
227
228
  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISITESECURITYSERVICE_IID)
229
230
  enum {
231
    HEADER_HSTS = 0U,
232
    HEADER_HPKP = 1U,
233
    HEADER_OMS = 2U,
234
    Success = 0U,
235
    ERROR_UNKNOWN = 1U,
236
    ERROR_UNTRUSTWORTHY_CONNECTION = 2U,
237
    ERROR_COULD_NOT_PARSE_HEADER = 3U,
238
    ERROR_NO_MAX_AGE = 4U,
239
    ERROR_MULTIPLE_MAX_AGES = 5U,
240
    ERROR_INVALID_MAX_AGE = 6U,
241
    ERROR_MULTIPLE_INCLUDE_SUBDOMAINS = 7U,
242
    ERROR_INVALID_INCLUDE_SUBDOMAINS = 8U,
243
    ERROR_INVALID_PIN = 9U,
244
    ERROR_MULTIPLE_REPORT_URIS = 10U,
245
    ERROR_PINSET_DOES_NOT_MATCH_CHAIN = 11U,
246
    ERROR_NO_BACKUP_PIN = 12U,
247
    ERROR_COULD_NOT_SAVE_STATE = 13U,
248
    ERROR_ROOT_NOT_BUILT_IN = 14U,
249
    SOURCE_UNKNOWN = 0U,
250
    SOURCE_PRELOAD_LIST = 1U,
251
    SOURCE_ORGANIC_REQUEST = 2U
252
  };
253
254
  /* [binaryname(ProcessHeader),must_use,noscript] void processHeaderNative (in uint32_t aType, in nsIURI aSourceURI, in ACString aHeader, in nsITransportSecurityInfo aSecInfo, in uint32_t aFlags, in uint32_t aSource, in const_OriginAttributesRef aOriginAttributes, [optional] out unsigned long long aMaxAge, [optional] out boolean aIncludeSubdomains, [optional] out uint32_t aFailureResult); */
255
  MOZ_MUST_USE NS_IMETHOD ProcessHeader(uint32_t aType, nsIURI *aSourceURI, const nsACString& aHeader, nsITransportSecurityInfo *aSecInfo, uint32_t aFlags, uint32_t aSource, const mozilla::OriginAttributes & aOriginAttributes, uint64_t *aMaxAge = nullptr, bool *aIncludeSubdomains = nullptr, uint32_t *aFailureResult = nullptr) = 0;
256
257
  /* [binaryname(ProcessHeaderScriptable),implicit_jscontext,must_use,optional_argc] void processHeader (in uint32_t aType, in nsIURI aSourceURI, in ACString aHeader, in nsITransportSecurityInfo aSecInfo, in uint32_t aFlags, in uint32_t aSource, [optional] in jsval aOriginAttributes, [optional] out unsigned long long aMaxAge, [optional] out boolean aIncludeSubdomains, [optional] out uint32_t aFailureResult); */
258
  JS_HAZ_CAN_RUN_SCRIPT MOZ_MUST_USE NS_IMETHOD ProcessHeaderScriptable(uint32_t aType, nsIURI *aSourceURI, const nsACString& aHeader, nsITransportSecurityInfo *aSecInfo, uint32_t aFlags, uint32_t aSource, JS::HandleValue aOriginAttributes, uint64_t *aMaxAge, bool *aIncludeSubdomains, uint32_t *aFailureResult, JSContext* cx, uint8_t _argc) = 0;
259
260
  /* [implicit_jscontext,must_use,optional_argc] void removeState (in uint32_t aType, in nsIURI aURI, in uint32_t aFlags, [optional] in jsval aOriginAttributes); */
261
  JS_HAZ_CAN_RUN_SCRIPT MOZ_MUST_USE NS_IMETHOD RemoveState(uint32_t aType, nsIURI *aURI, uint32_t aFlags, JS::HandleValue aOriginAttributes, JSContext* cx, uint8_t _argc) = 0;
262
263
  /* [binaryname(IsSecureURI),must_use,noscript] boolean isSecureURINative (in uint32_t aType, in nsIURI aURI, in uint32_t aFlags, in const_OriginAttributesRef aOriginAttributes, [optional] out boolean aCached, [optional] out uint32_t aSource); */
264
  MOZ_MUST_USE NS_IMETHOD IsSecureURI(uint32_t aType, nsIURI *aURI, uint32_t aFlags, const mozilla::OriginAttributes & aOriginAttributes, bool *aCached, uint32_t *aSource, bool *_retval) = 0;
265
266
  /* [binaryname(IsSecureURIScriptable),implicit_jscontext,must_use,optional_argc] boolean isSecureURI (in uint32_t aType, in nsIURI aURI, in uint32_t aFlags, [optional] in jsval aOriginAttributes, [optional] out boolean aCached, [optional] out uint32_t aSource); */
267
  JS_HAZ_CAN_RUN_SCRIPT MOZ_MUST_USE NS_IMETHOD IsSecureURIScriptable(uint32_t aType, nsIURI *aURI, uint32_t aFlags, JS::HandleValue aOriginAttributes, bool *aCached, uint32_t *aSource, JSContext* cx, uint8_t _argc, bool *_retval) = 0;
268
269
  /* [must_use] void clearAll (); */
270
  JS_HAZ_CAN_RUN_SCRIPT MOZ_MUST_USE NS_IMETHOD ClearAll(void) = 0;
271
272
  /* [must_use] void clearPreloads (); */
273
  JS_HAZ_CAN_RUN_SCRIPT MOZ_MUST_USE NS_IMETHOD ClearPreloads(void) = 0;
274
275
  /* [must_use,noscript] boolean getKeyPinsForHostname (in ACString aHostname, in mozillaPkixTime evalTime, in const_OriginAttributesRef aOriginAttributes, out nsCStringTArrayRef aPinArray, out boolean aIncludeSubdomains); */
276
  MOZ_MUST_USE NS_IMETHOD GetKeyPinsForHostname(const nsACString& aHostname, mozilla::pkix::Time & evalTime, const mozilla::OriginAttributes & aOriginAttributes, nsTArray<nsCString> & aPinArray, bool *aIncludeSubdomains, bool *_retval) = 0;
277
278
  /* [implicit_jscontext,must_use,optional_argc] boolean setKeyPins (in ACString aHost, in boolean aIncludeSubdomains, in int64_t aExpires, in unsigned long aPinCount, [array, size_is (aPinCount)] in string aSha256Pins, [optional] in boolean aIsPreload, [optional] in jsval aOriginAttributes); */
279
  JS_HAZ_CAN_RUN_SCRIPT MOZ_MUST_USE NS_IMETHOD SetKeyPins(const nsACString& aHost, bool aIncludeSubdomains, int64_t aExpires, uint32_t aPinCount, const char * *aSha256Pins, bool aIsPreload, JS::HandleValue aOriginAttributes, JSContext* cx, uint8_t _argc, bool *_retval) = 0;
280
281
  /* [must_use] boolean setHSTSPreload (in ACString aHost, in boolean aIncludesSubdomains, in int64_t aExpires); */
282
  JS_HAZ_CAN_RUN_SCRIPT MOZ_MUST_USE NS_IMETHOD SetHSTSPreload(const nsACString& aHost, bool aIncludesSubdomains, int64_t aExpires, bool *_retval) = 0;
283
284
  /* [must_use] nsISimpleEnumerator enumerate (in uint32_t aType); */
285
  JS_HAZ_CAN_RUN_SCRIPT MOZ_MUST_USE NS_IMETHOD Enumerate(uint32_t aType, nsISimpleEnumerator **_retval) = 0;
286
287
};
288
289
  NS_DEFINE_STATIC_IID_ACCESSOR(nsISiteSecurityService, NS_ISITESECURITYSERVICE_IID)
290
291
/* Use this macro when declaring classes that implement this interface. */
292
#define NS_DECL_NSISITESECURITYSERVICE \
293
  MOZ_MUST_USE NS_IMETHOD ProcessHeader(uint32_t aType, nsIURI *aSourceURI, const nsACString& aHeader, nsITransportSecurityInfo *aSecInfo, uint32_t aFlags, uint32_t aSource, const mozilla::OriginAttributes & aOriginAttributes, uint64_t *aMaxAge = nullptr, bool *aIncludeSubdomains = nullptr, uint32_t *aFailureResult = nullptr) override; \
294
  MOZ_MUST_USE NS_IMETHOD ProcessHeaderScriptable(uint32_t aType, nsIURI *aSourceURI, const nsACString& aHeader, nsITransportSecurityInfo *aSecInfo, uint32_t aFlags, uint32_t aSource, JS::HandleValue aOriginAttributes, uint64_t *aMaxAge, bool *aIncludeSubdomains, uint32_t *aFailureResult, JSContext* cx, uint8_t _argc) override; \
295
  MOZ_MUST_USE NS_IMETHOD RemoveState(uint32_t aType, nsIURI *aURI, uint32_t aFlags, JS::HandleValue aOriginAttributes, JSContext* cx, uint8_t _argc) override; \
296
  MOZ_MUST_USE NS_IMETHOD IsSecureURI(uint32_t aType, nsIURI *aURI, uint32_t aFlags, const mozilla::OriginAttributes & aOriginAttributes, bool *aCached, uint32_t *aSource, bool *_retval) override; \
297
  MOZ_MUST_USE NS_IMETHOD IsSecureURIScriptable(uint32_t aType, nsIURI *aURI, uint32_t aFlags, JS::HandleValue aOriginAttributes, bool *aCached, uint32_t *aSource, JSContext* cx, uint8_t _argc, bool *_retval) override; \
298
  MOZ_MUST_USE NS_IMETHOD ClearAll(void) override; \
299
  MOZ_MUST_USE NS_IMETHOD ClearPreloads(void) override; \
300
  MOZ_MUST_USE NS_IMETHOD GetKeyPinsForHostname(const nsACString& aHostname, mozilla::pkix::Time & evalTime, const mozilla::OriginAttributes & aOriginAttributes, nsTArray<nsCString> & aPinArray, bool *aIncludeSubdomains, bool *_retval) override; \
301
  MOZ_MUST_USE NS_IMETHOD SetKeyPins(const nsACString& aHost, bool aIncludeSubdomains, int64_t aExpires, uint32_t aPinCount, const char * *aSha256Pins, bool aIsPreload, JS::HandleValue aOriginAttributes, JSContext* cx, uint8_t _argc, bool *_retval) override; \
302
  MOZ_MUST_USE NS_IMETHOD SetHSTSPreload(const nsACString& aHost, bool aIncludesSubdomains, int64_t aExpires, bool *_retval) override; \
303
  MOZ_MUST_USE NS_IMETHOD Enumerate(uint32_t aType, nsISimpleEnumerator **_retval) override; 
304
305
/* Use this macro when declaring the members of this interface when the
306
   class doesn't implement the interface. This is useful for forwarding. */
307
#define NS_DECL_NON_VIRTUAL_NSISITESECURITYSERVICE \
308
  MOZ_MUST_USE nsresult ProcessHeader(uint32_t aType, nsIURI *aSourceURI, const nsACString& aHeader, nsITransportSecurityInfo *aSecInfo, uint32_t aFlags, uint32_t aSource, const mozilla::OriginAttributes & aOriginAttributes, uint64_t *aMaxAge = nullptr, bool *aIncludeSubdomains = nullptr, uint32_t *aFailureResult = nullptr); \
309
  MOZ_MUST_USE nsresult ProcessHeaderScriptable(uint32_t aType, nsIURI *aSourceURI, const nsACString& aHeader, nsITransportSecurityInfo *aSecInfo, uint32_t aFlags, uint32_t aSource, JS::HandleValue aOriginAttributes, uint64_t *aMaxAge, bool *aIncludeSubdomains, uint32_t *aFailureResult, JSContext* cx, uint8_t _argc); \
310
  MOZ_MUST_USE nsresult RemoveState(uint32_t aType, nsIURI *aURI, uint32_t aFlags, JS::HandleValue aOriginAttributes, JSContext* cx, uint8_t _argc); \
311
  MOZ_MUST_USE nsresult IsSecureURI(uint32_t aType, nsIURI *aURI, uint32_t aFlags, const mozilla::OriginAttributes & aOriginAttributes, bool *aCached, uint32_t *aSource, bool *_retval); \
312
  MOZ_MUST_USE nsresult IsSecureURIScriptable(uint32_t aType, nsIURI *aURI, uint32_t aFlags, JS::HandleValue aOriginAttributes, bool *aCached, uint32_t *aSource, JSContext* cx, uint8_t _argc, bool *_retval); \
313
  MOZ_MUST_USE nsresult ClearAll(void); \
314
  MOZ_MUST_USE nsresult ClearPreloads(void); \
315
  MOZ_MUST_USE nsresult GetKeyPinsForHostname(const nsACString& aHostname, mozilla::pkix::Time & evalTime, const mozilla::OriginAttributes & aOriginAttributes, nsTArray<nsCString> & aPinArray, bool *aIncludeSubdomains, bool *_retval); \
316
  MOZ_MUST_USE nsresult SetKeyPins(const nsACString& aHost, bool aIncludeSubdomains, int64_t aExpires, uint32_t aPinCount, const char * *aSha256Pins, bool aIsPreload, JS::HandleValue aOriginAttributes, JSContext* cx, uint8_t _argc, bool *_retval); \
317
  MOZ_MUST_USE nsresult SetHSTSPreload(const nsACString& aHost, bool aIncludesSubdomains, int64_t aExpires, bool *_retval); \
318
  MOZ_MUST_USE nsresult Enumerate(uint32_t aType, nsISimpleEnumerator **_retval); 
319
320
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
321
#define NS_FORWARD_NSISITESECURITYSERVICE(_to) \
322
  MOZ_MUST_USE NS_IMETHOD ProcessHeader(uint32_t aType, nsIURI *aSourceURI, const nsACString& aHeader, nsITransportSecurityInfo *aSecInfo, uint32_t aFlags, uint32_t aSource, const mozilla::OriginAttributes & aOriginAttributes, uint64_t *aMaxAge = nullptr, bool *aIncludeSubdomains = nullptr, uint32_t *aFailureResult = nullptr) override { return _to ProcessHeader(aType, aSourceURI, aHeader, aSecInfo, aFlags, aSource, aOriginAttributes, aMaxAge, aIncludeSubdomains, aFailureResult); } \
323
  MOZ_MUST_USE NS_IMETHOD ProcessHeaderScriptable(uint32_t aType, nsIURI *aSourceURI, const nsACString& aHeader, nsITransportSecurityInfo *aSecInfo, uint32_t aFlags, uint32_t aSource, JS::HandleValue aOriginAttributes, uint64_t *aMaxAge, bool *aIncludeSubdomains, uint32_t *aFailureResult, JSContext* cx, uint8_t _argc) override { return _to ProcessHeaderScriptable(aType, aSourceURI, aHeader, aSecInfo, aFlags, aSource, aOriginAttributes, aMaxAge, aIncludeSubdomains, aFailureResult, cx, _argc); } \
324
  MOZ_MUST_USE NS_IMETHOD RemoveState(uint32_t aType, nsIURI *aURI, uint32_t aFlags, JS::HandleValue aOriginAttributes, JSContext* cx, uint8_t _argc) override { return _to RemoveState(aType, aURI, aFlags, aOriginAttributes, cx, _argc); } \
325
  MOZ_MUST_USE NS_IMETHOD IsSecureURI(uint32_t aType, nsIURI *aURI, uint32_t aFlags, const mozilla::OriginAttributes & aOriginAttributes, bool *aCached, uint32_t *aSource, bool *_retval) override { return _to IsSecureURI(aType, aURI, aFlags, aOriginAttributes, aCached, aSource, _retval); } \
326
  MOZ_MUST_USE NS_IMETHOD IsSecureURIScriptable(uint32_t aType, nsIURI *aURI, uint32_t aFlags, JS::HandleValue aOriginAttributes, bool *aCached, uint32_t *aSource, JSContext* cx, uint8_t _argc, bool *_retval) override { return _to IsSecureURIScriptable(aType, aURI, aFlags, aOriginAttributes, aCached, aSource, cx, _argc, _retval); } \
327
  MOZ_MUST_USE NS_IMETHOD ClearAll(void) override { return _to ClearAll(); } \
328
  MOZ_MUST_USE NS_IMETHOD ClearPreloads(void) override { return _to ClearPreloads(); } \
329
  MOZ_MUST_USE NS_IMETHOD GetKeyPinsForHostname(const nsACString& aHostname, mozilla::pkix::Time & evalTime, const mozilla::OriginAttributes & aOriginAttributes, nsTArray<nsCString> & aPinArray, bool *aIncludeSubdomains, bool *_retval) override { return _to GetKeyPinsForHostname(aHostname, evalTime, aOriginAttributes, aPinArray, aIncludeSubdomains, _retval); } \
330
  MOZ_MUST_USE NS_IMETHOD SetKeyPins(const nsACString& aHost, bool aIncludeSubdomains, int64_t aExpires, uint32_t aPinCount, const char * *aSha256Pins, bool aIsPreload, JS::HandleValue aOriginAttributes, JSContext* cx, uint8_t _argc, bool *_retval) override { return _to SetKeyPins(aHost, aIncludeSubdomains, aExpires, aPinCount, aSha256Pins, aIsPreload, aOriginAttributes, cx, _argc, _retval); } \
331
  MOZ_MUST_USE NS_IMETHOD SetHSTSPreload(const nsACString& aHost, bool aIncludesSubdomains, int64_t aExpires, bool *_retval) override { return _to SetHSTSPreload(aHost, aIncludesSubdomains, aExpires, _retval); } \
332
  MOZ_MUST_USE NS_IMETHOD Enumerate(uint32_t aType, nsISimpleEnumerator **_retval) override { return _to Enumerate(aType, _retval); } 
333
334
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
335
#define NS_FORWARD_SAFE_NSISITESECURITYSERVICE(_to) \
336
  MOZ_MUST_USE NS_IMETHOD ProcessHeader(uint32_t aType, nsIURI *aSourceURI, const nsACString& aHeader, nsITransportSecurityInfo *aSecInfo, uint32_t aFlags, uint32_t aSource, const mozilla::OriginAttributes & aOriginAttributes, uint64_t *aMaxAge = nullptr, bool *aIncludeSubdomains = nullptr, uint32_t *aFailureResult = nullptr) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ProcessHeader(aType, aSourceURI, aHeader, aSecInfo, aFlags, aSource, aOriginAttributes, aMaxAge, aIncludeSubdomains, aFailureResult); } \
337
  MOZ_MUST_USE NS_IMETHOD ProcessHeaderScriptable(uint32_t aType, nsIURI *aSourceURI, const nsACString& aHeader, nsITransportSecurityInfo *aSecInfo, uint32_t aFlags, uint32_t aSource, JS::HandleValue aOriginAttributes, uint64_t *aMaxAge, bool *aIncludeSubdomains, uint32_t *aFailureResult, JSContext* cx, uint8_t _argc) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ProcessHeaderScriptable(aType, aSourceURI, aHeader, aSecInfo, aFlags, aSource, aOriginAttributes, aMaxAge, aIncludeSubdomains, aFailureResult, cx, _argc); } \
338
  MOZ_MUST_USE NS_IMETHOD RemoveState(uint32_t aType, nsIURI *aURI, uint32_t aFlags, JS::HandleValue aOriginAttributes, JSContext* cx, uint8_t _argc) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveState(aType, aURI, aFlags, aOriginAttributes, cx, _argc); } \
339
  MOZ_MUST_USE NS_IMETHOD IsSecureURI(uint32_t aType, nsIURI *aURI, uint32_t aFlags, const mozilla::OriginAttributes & aOriginAttributes, bool *aCached, uint32_t *aSource, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->IsSecureURI(aType, aURI, aFlags, aOriginAttributes, aCached, aSource, _retval); } \
340
  MOZ_MUST_USE NS_IMETHOD IsSecureURIScriptable(uint32_t aType, nsIURI *aURI, uint32_t aFlags, JS::HandleValue aOriginAttributes, bool *aCached, uint32_t *aSource, JSContext* cx, uint8_t _argc, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->IsSecureURIScriptable(aType, aURI, aFlags, aOriginAttributes, aCached, aSource, cx, _argc, _retval); } \
341
  MOZ_MUST_USE NS_IMETHOD ClearAll(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ClearAll(); } \
342
  MOZ_MUST_USE NS_IMETHOD ClearPreloads(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ClearPreloads(); } \
343
  MOZ_MUST_USE NS_IMETHOD GetKeyPinsForHostname(const nsACString& aHostname, mozilla::pkix::Time & evalTime, const mozilla::OriginAttributes & aOriginAttributes, nsTArray<nsCString> & aPinArray, bool *aIncludeSubdomains, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetKeyPinsForHostname(aHostname, evalTime, aOriginAttributes, aPinArray, aIncludeSubdomains, _retval); } \
344
  MOZ_MUST_USE NS_IMETHOD SetKeyPins(const nsACString& aHost, bool aIncludeSubdomains, int64_t aExpires, uint32_t aPinCount, const char * *aSha256Pins, bool aIsPreload, JS::HandleValue aOriginAttributes, JSContext* cx, uint8_t _argc, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetKeyPins(aHost, aIncludeSubdomains, aExpires, aPinCount, aSha256Pins, aIsPreload, aOriginAttributes, cx, _argc, _retval); } \
345
  MOZ_MUST_USE NS_IMETHOD SetHSTSPreload(const nsACString& aHost, bool aIncludesSubdomains, int64_t aExpires, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetHSTSPreload(aHost, aIncludesSubdomains, aExpires, _retval); } \
346
  MOZ_MUST_USE NS_IMETHOD Enumerate(uint32_t aType, nsISimpleEnumerator **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Enumerate(aType, _retval); } 
347
348
0
#define NS_SSSERVICE_CONTRACTID "@mozilla.org/ssservice;1"
349
350
#endif /* __gen_nsISiteSecurityService_h__ */