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