Coverage Report

Created: 2018-09-25 14:53

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