Copy as Markdown

Other Tools

/* THIS FILE IS AUTOGENERATED FROM FailedCertSecurityInfo.webidl BY Codegen.py - DO NOT EDIT */
#ifndef DOM_FAILEDCERTSECURITYINFOBINDING_H_
#define DOM_FAILEDCERTSECURITYINFOBINDING_H_
#include "js/CallAndConstruct.h"
#include "js/RootingAPI.h"
#include "js/TypeDecls.h"
#include "mozilla/ArrayUtils.h"
#include "mozilla/EnumTypeTraits.h"
#include "mozilla/Span.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/dom/Nullable.h"
namespace mozilla {
namespace dom {
struct FailedCertSecurityInfoAtoms;
struct NativePropertyHooks;
class ProtoAndIfaceCache;
} // namespace dom
} // namespace mozilla
namespace mozilla {
namespace dom {
enum class OverridableErrorCategory : uint8_t {
Unset,
Trust_error,
Domain_mismatch,
Expired_or_not_yet_valid,
};
namespace binding_detail {
template <> struct EnumStrings<OverridableErrorCategory> {
static constexpr nsLiteralCString Values[4] {
"unset"_ns,
"trust-error"_ns,
"domain-mismatch"_ns,
"expired-or-not-yet-valid"_ns,
};
};
} // namespace binding_detail
bool
ToJSValue(JSContext* aCx, OverridableErrorCategory aArgument, JS::MutableHandle<JS::Value> aValue);
struct FailedCertSecurityInfo : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<nsString>> mCertChainStrings;
MOZ_INIT_OUTSIDE_CTOR uint64_t mCertValidityRangeNotAfter;
MOZ_INIT_OUTSIDE_CTOR uint64_t mCertValidityRangeNotBefore;
MOZ_INIT_OUTSIDE_CTOR uint32_t mChannelStatus;
MOZ_INIT_OUTSIDE_CTOR nsString mErrorCodeString;
MOZ_INIT_OUTSIDE_CTOR nsString mErrorMessage;
MOZ_INIT_OUTSIDE_CTOR bool mHasHPKP;
MOZ_INIT_OUTSIDE_CTOR bool mHasHSTS;
MOZ_INIT_OUTSIDE_CTOR nsString mIssuerCommonName;
MOZ_INIT_OUTSIDE_CTOR OverridableErrorCategory mOverridableErrorCategory;
MOZ_INIT_OUTSIDE_CTOR uint64_t mValidNotAfter;
MOZ_INIT_OUTSIDE_CTOR uint64_t mValidNotBefore;
FailedCertSecurityInfo();
explicit inline FailedCertSecurityInfo(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
FailedCertSecurityInfo(FailedCertSecurityInfo&& aOther) = default;
explicit inline FailedCertSecurityInfo(const FailedCertSecurityInfo& aOther)
{
*this = aOther;
}
bool
Init(const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
void
TraceDictionary(JSTracer* trc);
FailedCertSecurityInfo&
operator=(const FailedCertSecurityInfo& aOther);
private:
static bool
InitIds(JSContext* cx, FailedCertSecurityInfoAtoms* atomsCache);
};
namespace binding_detail {
struct FastFailedCertSecurityInfo : public FailedCertSecurityInfo
{
inline FastFailedCertSecurityInfo()
: FailedCertSecurityInfo(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
} // namespace dom
template <>
struct MaxContiguousEnumValue<dom::OverridableErrorCategory>
{
static constexpr dom::OverridableErrorCategory value = dom::OverridableErrorCategory::Expired_or_not_yet_valid;
static_assert(static_cast<uint8_t>(dom::OverridableErrorCategory::Unset) == 0,
"We rely on this in ContiguousEnumValues");
static_assert(std::size(dom::binding_detail::EnumStrings<dom::OverridableErrorCategory>::Values) - 1 == UnderlyingValue(value),
"Mismatch between enum strings and enum count");
};
} // namespace mozilla
#endif // DOM_FAILEDCERTSECURITYINFOBINDING_H_