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