/work/obj-fuzz/dist/include/mozilla/dom/PresentationConnectionBinding.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* THIS FILE IS AUTOGENERATED FROM PresentationConnection.webidl BY Codegen.py - DO NOT EDIT */ |
2 | | |
3 | | #ifndef mozilla_dom_PresentationConnectionBinding_h |
4 | | #define mozilla_dom_PresentationConnectionBinding_h |
5 | | |
6 | | #include "GeckoProfiler.h" |
7 | | #include "js/RootingAPI.h" |
8 | | #include "jspubtd.h" |
9 | | #include "mozilla/ErrorResult.h" |
10 | | #include "mozilla/dom/BindingDeclarations.h" |
11 | | #include "mozilla/dom/Nullable.h" |
12 | | #include "mozilla/dom/PrototypeList.h" |
13 | | |
14 | | namespace mozilla { |
15 | | namespace dom { |
16 | | |
17 | | struct NativePropertyHooks; |
18 | | class PresentationConnection; |
19 | | struct PresentationConnectionAtoms; |
20 | | class ProtoAndIfaceCache; |
21 | | |
22 | | } // namespace dom |
23 | | } // namespace mozilla |
24 | | |
25 | | namespace mozilla { |
26 | | namespace dom { |
27 | | |
28 | | enum class PresentationConnectionState : uint8_t { |
29 | | Connecting, |
30 | | Connected, |
31 | | Closed, |
32 | | Terminated, |
33 | | EndGuard_ |
34 | | }; |
35 | | |
36 | | namespace PresentationConnectionStateValues { |
37 | | extern const EnumEntry strings[5]; |
38 | | } // namespace PresentationConnectionStateValues |
39 | | |
40 | | bool |
41 | | ToJSValue(JSContext* aCx, PresentationConnectionState aArgument, JS::MutableHandle<JS::Value> aValue); |
42 | | |
43 | | |
44 | | enum class PresentationConnectionBinaryType : uint8_t { |
45 | | Blob, |
46 | | Arraybuffer, |
47 | | EndGuard_ |
48 | | }; |
49 | | |
50 | | namespace PresentationConnectionBinaryTypeValues { |
51 | | extern const EnumEntry strings[3]; |
52 | | } // namespace PresentationConnectionBinaryTypeValues |
53 | | |
54 | | bool |
55 | | ToJSValue(JSContext* aCx, PresentationConnectionBinaryType aArgument, JS::MutableHandle<JS::Value> aValue); |
56 | | |
57 | | |
58 | | namespace PresentationConnection_Binding { |
59 | | |
60 | | typedef mozilla::dom::PresentationConnection NativeType; |
61 | | |
62 | | bool |
63 | | ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj); |
64 | | |
65 | | const JSClass* |
66 | | GetJSClass(); |
67 | | |
68 | | bool |
69 | | Wrap(JSContext* aCx, mozilla::dom::PresentationConnection* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector); |
70 | | |
71 | | template <class T> |
72 | | inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto) |
73 | 0 | { |
74 | 0 | JS::Rooted<JSObject*> reflector(aCx); |
75 | 0 | return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr; |
76 | 0 | } |
77 | | |
78 | | // We declare this as an array so that retrieving a pointer to this |
79 | | // binding's property hooks only requires compile/link-time resolvable |
80 | | // address arithmetic. Declaring it as a pointer instead would require |
81 | | // doing a run-time load to fetch a pointer to this binding's property |
82 | | // hooks. And then structures which embedded a pointer to this structure |
83 | | // would require a run-time load for proper initialization, which would |
84 | | // then induce static constructors. Lots of static constructors. |
85 | | extern const NativePropertyHooks sNativePropertyHooks[]; |
86 | | |
87 | | void |
88 | | CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal); |
89 | | |
90 | | inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx) |
91 | 0 | { |
92 | 0 | /* Get the interface prototype object for this class. This will create the |
93 | 0 | object as needed. */ |
94 | 0 | return GetPerInterfaceObjectHandle(aCx, prototypes::id::PresentationConnection, |
95 | 0 | &CreateInterfaceObjects, |
96 | 0 | /* aDefineOnGlobal = */ true); |
97 | 0 |
|
98 | 0 | } |
99 | | |
100 | | inline JS::Handle<JSObject*> GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true) |
101 | 0 | { |
102 | 0 | /* Get the interface object for this class. This will create the object as |
103 | 0 | needed. */ |
104 | 0 |
|
105 | 0 | return GetPerInterfaceObjectHandle(aCx, constructors::id::PresentationConnection, |
106 | 0 | &CreateInterfaceObjects, |
107 | 0 | aDefineOnGlobal); |
108 | 0 | } |
109 | | |
110 | | JSObject* |
111 | | GetConstructorObject(JSContext* aCx); |
112 | | |
113 | | } // namespace PresentationConnection_Binding |
114 | | |
115 | | |
116 | | |
117 | | } // namespace dom |
118 | | } // namespace mozilla |
119 | | |
120 | | #endif // mozilla_dom_PresentationConnectionBinding_h |