Line data Source code
1 : /* THIS FILE IS AUTOGENERATED FROM RTCCertificate.webidl BY Codegen.py - DO NOT EDIT */
2 :
3 : #ifndef mozilla_dom_RTCCertificateBinding_h
4 : #define mozilla_dom_RTCCertificateBinding_h
5 :
6 : #include "js/RootingAPI.h"
7 : #include "jspubtd.h"
8 : #include "mozilla/ErrorResult.h"
9 : #include "mozilla/dom/BindingDeclarations.h"
10 : #include "mozilla/dom/Nullable.h"
11 :
12 : namespace mozilla {
13 : namespace dom {
14 :
15 : struct NativePropertyHooks;
16 : class ProtoAndIfaceCache;
17 : class RTCCertificate;
18 : struct RTCCertificateAtoms;
19 : struct RTCCertificateExpirationAtoms;
20 :
21 : } // namespace dom
22 : } // namespace mozilla
23 :
24 : namespace mozilla {
25 : namespace dom {
26 :
27 0 : struct RTCCertificateExpiration : public DictionaryBase
28 : {
29 : MOZ_INIT_OUTSIDE_CTOR Optional<uint64_t> mExpires;
30 :
31 : RTCCertificateExpiration();
32 :
33 : explicit inline RTCCertificateExpiration(const FastDictionaryInitializer& )
34 : {
35 : // Do nothing here; this is used by our "Fast" subclass
36 : }
37 :
38 : explicit inline RTCCertificateExpiration(const RTCCertificateExpiration& aOther)
39 : {
40 : *this = aOther;
41 : }
42 :
43 : bool
44 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
45 :
46 : bool
47 : Init(const nsAString& aJSON);
48 :
49 : bool
50 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
51 :
52 : bool
53 : ToJSON(nsAString& aJSON) const;
54 :
55 : void
56 : TraceDictionary(JSTracer* trc);
57 :
58 : RTCCertificateExpiration&
59 : operator=(const RTCCertificateExpiration& aOther);
60 :
61 : private:
62 : static bool
63 : InitIds(JSContext* cx, RTCCertificateExpirationAtoms* atomsCache);
64 : };
65 :
66 : namespace binding_detail {
67 : struct FastRTCCertificateExpiration : public RTCCertificateExpiration
68 : {
69 : inline FastRTCCertificateExpiration()
70 : : RTCCertificateExpiration(FastDictionaryInitializer())
71 : {
72 : // Doesn't matter what int we pass to the parent constructor
73 : }
74 : };
75 : } // namespace binding_detail
76 :
77 :
78 : namespace RTCCertificateBinding {
79 :
80 : typedef mozilla::dom::RTCCertificate NativeType;
81 :
82 : bool
83 : ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
84 :
85 : JSObject*
86 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
87 :
88 : const JSClass*
89 : GetJSClass();
90 :
91 : bool
92 : Wrap(JSContext* aCx, mozilla::dom::RTCCertificate* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
93 :
94 : template <class T>
95 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
96 : {
97 0 : JS::Rooted<JSObject*> reflector(aCx);
98 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
99 : }
100 :
101 : // We declare this as an array so that retrieving a pointer to this
102 : // binding's property hooks only requires compile/link-time resolvable
103 : // address arithmetic. Declaring it as a pointer instead would require
104 : // doing a run-time load to fetch a pointer to this binding's property
105 : // hooks. And then structures which embedded a pointer to this structure
106 : // would require a run-time load for proper initialization, which would
107 : // then induce static constructors. Lots of static constructors.
108 : extern const NativePropertyHooks sNativePropertyHooks[];
109 :
110 : void
111 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
112 :
113 : JS::Handle<JSObject*>
114 : GetProtoObjectHandle(JSContext* aCx);
115 :
116 : JS::Handle<JSObject*>
117 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
118 :
119 : JSObject*
120 : GetConstructorObject(JSContext* aCx);
121 :
122 : } // namespace RTCCertificateBinding
123 :
124 :
125 :
126 : } // namespace dom
127 : } // namespace mozilla
128 :
129 : #endif // mozilla_dom_RTCCertificateBinding_h
|