Copy as Markdown
Other Tools
/* THIS FILE IS AUTOGENERATED FROM KeyAlgorithm.webidl BY Codegen.py - DO NOT EDIT */
#ifndef DOM_KEYALGORITHMBINDING_H_
#define DOM_KEYALGORITHMBINDING_H_
#include "js/CallAndConstruct.h"
#include "js/RootingAPI.h"
#include "js/TypeDecls.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/dom/Nullable.h"
#include "mozilla/dom/TypedArray.h"
namespace mozilla {
namespace dom {
struct AesKeyAlgorithmAtoms;
struct DhKeyAlgorithmAtoms;
struct EcKeyAlgorithmAtoms;
struct HmacKeyAlgorithmAtoms;
struct KeyAlgorithm;
struct KeyAlgorithmAtoms;
struct NativePropertyHooks;
class ProtoAndIfaceCache;
struct RsaHashedKeyAlgorithmAtoms;
} // namespace dom
} // namespace mozilla
namespace mozilla::dom {
struct KeyAlgorithm : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR nsString mName;
KeyAlgorithm();
explicit inline KeyAlgorithm(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
KeyAlgorithm(KeyAlgorithm&& aOther) = default;
explicit inline KeyAlgorithm(const KeyAlgorithm& 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);
KeyAlgorithm&
operator=(const KeyAlgorithm& aOther);
private:
static bool
InitIds(JSContext* cx, KeyAlgorithmAtoms* atomsCache);
};
namespace binding_detail {
struct FastKeyAlgorithm : public KeyAlgorithm
{
inline FastKeyAlgorithm()
: KeyAlgorithm(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct AesKeyAlgorithm : public KeyAlgorithm
{
MOZ_INIT_OUTSIDE_CTOR uint16_t mLength;
AesKeyAlgorithm();
explicit inline AesKeyAlgorithm(const FastDictionaryInitializer& )
: KeyAlgorithm(FastDictionaryInitializer())
{
// Do nothing here; this is used by our "Fast" subclass
}
AesKeyAlgorithm(AesKeyAlgorithm&& aOther) = default;
explicit inline AesKeyAlgorithm(const AesKeyAlgorithm& aOther)
: KeyAlgorithm(FastDictionaryInitializer())
{
*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);
AesKeyAlgorithm&
operator=(const AesKeyAlgorithm& aOther);
private:
static bool
InitIds(JSContext* cx, AesKeyAlgorithmAtoms* atomsCache);
};
namespace binding_detail {
struct FastAesKeyAlgorithm : public AesKeyAlgorithm
{
inline FastAesKeyAlgorithm()
: AesKeyAlgorithm(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct DhKeyAlgorithm : public KeyAlgorithm
{
MOZ_INIT_OUTSIDE_CTOR Uint8Array mGenerator;
MOZ_INIT_OUTSIDE_CTOR Uint8Array mPrime;
DhKeyAlgorithm();
explicit inline DhKeyAlgorithm(const FastDictionaryInitializer& )
: KeyAlgorithm(FastDictionaryInitializer())
{
// Do nothing here; this is used by our "Fast" subclass
}
DhKeyAlgorithm(DhKeyAlgorithm&& aOther) = default;
private:
DhKeyAlgorithm(const DhKeyAlgorithm&) = delete;
DhKeyAlgorithm& operator=(const DhKeyAlgorithm&) = delete;
static bool
InitIds(JSContext* cx, DhKeyAlgorithmAtoms* atomsCache);
public:
bool
Init(const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
void
TraceDictionary(JSTracer* trc);
};
namespace binding_detail {
struct FastDhKeyAlgorithm : public DhKeyAlgorithm
{
inline FastDhKeyAlgorithm()
: DhKeyAlgorithm(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct EcKeyAlgorithm : public KeyAlgorithm
{
MOZ_INIT_OUTSIDE_CTOR nsString mNamedCurve;
EcKeyAlgorithm();
explicit inline EcKeyAlgorithm(const FastDictionaryInitializer& )
: KeyAlgorithm(FastDictionaryInitializer())
{
// Do nothing here; this is used by our "Fast" subclass
}
EcKeyAlgorithm(EcKeyAlgorithm&& aOther) = default;
explicit inline EcKeyAlgorithm(const EcKeyAlgorithm& aOther)
: KeyAlgorithm(FastDictionaryInitializer())
{
*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);
EcKeyAlgorithm&
operator=(const EcKeyAlgorithm& aOther);
private:
static bool
InitIds(JSContext* cx, EcKeyAlgorithmAtoms* atomsCache);
};
namespace binding_detail {
struct FastEcKeyAlgorithm : public EcKeyAlgorithm
{
inline FastEcKeyAlgorithm()
: EcKeyAlgorithm(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct HmacKeyAlgorithm : public KeyAlgorithm
{
MOZ_INIT_OUTSIDE_CTOR KeyAlgorithm mHash;
MOZ_INIT_OUTSIDE_CTOR uint32_t mLength;
HmacKeyAlgorithm();
explicit inline HmacKeyAlgorithm(const FastDictionaryInitializer& )
: KeyAlgorithm(FastDictionaryInitializer()),
mHash(FastDictionaryInitializer())
{
// Do nothing here; this is used by our "Fast" subclass
}
HmacKeyAlgorithm(HmacKeyAlgorithm&& aOther) = default;
explicit inline HmacKeyAlgorithm(const HmacKeyAlgorithm& aOther)
: KeyAlgorithm(FastDictionaryInitializer()),
mHash(FastDictionaryInitializer())
{
*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);
HmacKeyAlgorithm&
operator=(const HmacKeyAlgorithm& aOther);
private:
static bool
InitIds(JSContext* cx, HmacKeyAlgorithmAtoms* atomsCache);
};
namespace binding_detail {
struct FastHmacKeyAlgorithm : public HmacKeyAlgorithm
{
inline FastHmacKeyAlgorithm()
: HmacKeyAlgorithm(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct RsaHashedKeyAlgorithm : public KeyAlgorithm
{
MOZ_INIT_OUTSIDE_CTOR KeyAlgorithm mHash;
MOZ_INIT_OUTSIDE_CTOR uint16_t mModulusLength;
MOZ_INIT_OUTSIDE_CTOR Uint8Array mPublicExponent;
RsaHashedKeyAlgorithm();
explicit inline RsaHashedKeyAlgorithm(const FastDictionaryInitializer& )
: KeyAlgorithm(FastDictionaryInitializer()),
mHash(FastDictionaryInitializer())
{
// Do nothing here; this is used by our "Fast" subclass
}
RsaHashedKeyAlgorithm(RsaHashedKeyAlgorithm&& aOther) = default;
private:
RsaHashedKeyAlgorithm(const RsaHashedKeyAlgorithm&) = delete;
RsaHashedKeyAlgorithm& operator=(const RsaHashedKeyAlgorithm&) = delete;
static bool
InitIds(JSContext* cx, RsaHashedKeyAlgorithmAtoms* atomsCache);
public:
bool
Init(const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
void
TraceDictionary(JSTracer* trc);
};
namespace binding_detail {
struct FastRsaHashedKeyAlgorithm : public RsaHashedKeyAlgorithm
{
inline FastRsaHashedKeyAlgorithm()
: RsaHashedKeyAlgorithm(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
} // namespace mozilla::dom
#endif // DOM_KEYALGORITHMBINDING_H_