Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/mozilla/dom/RTCRtpSourcesBinding.h
Line
Count
Source (jump to first uncovered line)
1
/* THIS FILE IS AUTOGENERATED FROM RTCRtpSources.webidl BY Codegen.py - DO NOT EDIT */
2
3
#ifndef mozilla_dom_RTCRtpSourcesBinding_h
4
#define mozilla_dom_RTCRtpSourcesBinding_h
5
6
#include "GeckoProfiler.h"
7
#include "RTCRtpSourcesBinding.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/Nullable.h"
13
14
namespace mozilla {
15
namespace dom {
16
17
struct NativePropertyHooks;
18
class ProtoAndIfaceCache;
19
struct RTCRtpContributingSourceAtoms;
20
struct RTCRtpSourceEntryAtoms;
21
struct RTCRtpSynchronizationSourceAtoms;
22
23
} // namespace dom
24
} // namespace mozilla
25
26
namespace mozilla {
27
namespace dom {
28
29
enum class RTCRtpSourceEntryType : uint8_t {
30
  Contributing,
31
  Synchronization,
32
  EndGuard_
33
};
34
35
namespace RTCRtpSourceEntryTypeValues {
36
extern const EnumEntry strings[3];
37
} // namespace RTCRtpSourceEntryTypeValues
38
39
bool
40
ToJSValue(JSContext* aCx, RTCRtpSourceEntryType aArgument, JS::MutableHandle<JS::Value> aValue);
41
42
43
struct RTCRtpContributingSource : public DictionaryBase
44
{
45
  MOZ_INIT_OUTSIDE_CTOR Optional<double> mAudioLevel;
46
  MOZ_INIT_OUTSIDE_CTOR uint32_t mSource;
47
  MOZ_INIT_OUTSIDE_CTOR double mTimestamp;
48
49
  RTCRtpContributingSource();
50
51
  explicit inline RTCRtpContributingSource(const FastDictionaryInitializer& )
52
0
  {
53
0
    // Do nothing here; this is used by our "Fast" subclass
54
0
  }
55
56
  explicit inline RTCRtpContributingSource(const RTCRtpContributingSource& aOther)
57
0
  {
58
0
    *this = aOther;
59
0
  }
60
61
  bool
62
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
63
64
  bool
65
  Init(const nsAString& aJSON);
66
67
  bool
68
  ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
69
70
  bool
71
  ToJSON(nsAString& aJSON) const;
72
73
  void
74
  TraceDictionary(JSTracer* trc);
75
76
  RTCRtpContributingSource&
77
  operator=(const RTCRtpContributingSource& aOther);
78
79
private:
80
  static bool
81
  InitIds(JSContext* cx, RTCRtpContributingSourceAtoms* atomsCache);
82
};
83
84
namespace binding_detail {
85
struct FastRTCRtpContributingSource : public RTCRtpContributingSource
86
{
87
  inline FastRTCRtpContributingSource()
88
    : RTCRtpContributingSource(FastDictionaryInitializer())
89
0
  {
90
0
    // Doesn't matter what int we pass to the parent constructor
91
0
  }
92
};
93
} // namespace binding_detail
94
95
96
struct RTCRtpSynchronizationSource : public RTCRtpContributingSource
97
{
98
  MOZ_INIT_OUTSIDE_CTOR Optional<Nullable<bool>> mVoiceActivityFlag;
99
100
  RTCRtpSynchronizationSource();
101
102
  explicit inline RTCRtpSynchronizationSource(const FastDictionaryInitializer& )
103
    : RTCRtpContributingSource(FastDictionaryInitializer())
104
0
  {
105
0
    // Do nothing here; this is used by our "Fast" subclass
106
0
  }
107
108
  explicit inline RTCRtpSynchronizationSource(const RTCRtpSynchronizationSource& aOther)
109
0
  {
110
0
    *this = aOther;
111
0
  }
112
113
  bool
114
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
115
116
  bool
117
  Init(const nsAString& aJSON);
118
119
  bool
120
  ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
121
122
  bool
123
  ToJSON(nsAString& aJSON) const;
124
125
  void
126
  TraceDictionary(JSTracer* trc);
127
128
  RTCRtpSynchronizationSource&
129
  operator=(const RTCRtpSynchronizationSource& aOther);
130
131
private:
132
  static bool
133
  InitIds(JSContext* cx, RTCRtpSynchronizationSourceAtoms* atomsCache);
134
};
135
136
namespace binding_detail {
137
struct FastRTCRtpSynchronizationSource : public RTCRtpSynchronizationSource
138
{
139
  inline FastRTCRtpSynchronizationSource()
140
    : RTCRtpSynchronizationSource(FastDictionaryInitializer())
141
0
  {
142
0
    // Doesn't matter what int we pass to the parent constructor
143
0
  }
144
};
145
} // namespace binding_detail
146
147
148
struct RTCRtpSourceEntry : public RTCRtpSynchronizationSource
149
{
150
  MOZ_INIT_OUTSIDE_CTOR RTCRtpSourceEntryType mSourceType;
151
152
  RTCRtpSourceEntry();
153
154
  explicit inline RTCRtpSourceEntry(const FastDictionaryInitializer& )
155
    : RTCRtpSynchronizationSource(FastDictionaryInitializer())
156
0
  {
157
0
    // Do nothing here; this is used by our "Fast" subclass
158
0
  }
159
160
  explicit inline RTCRtpSourceEntry(const RTCRtpSourceEntry& aOther)
161
0
  {
162
0
    *this = aOther;
163
0
  }
164
165
  bool
166
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
167
168
  bool
169
  Init(const nsAString& aJSON);
170
171
  bool
172
  ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
173
174
  bool
175
  ToJSON(nsAString& aJSON) const;
176
177
  void
178
  TraceDictionary(JSTracer* trc);
179
180
  RTCRtpSourceEntry&
181
  operator=(const RTCRtpSourceEntry& aOther);
182
183
private:
184
  static bool
185
  InitIds(JSContext* cx, RTCRtpSourceEntryAtoms* atomsCache);
186
};
187
188
namespace binding_detail {
189
struct FastRTCRtpSourceEntry : public RTCRtpSourceEntry
190
{
191
  inline FastRTCRtpSourceEntry()
192
    : RTCRtpSourceEntry(FastDictionaryInitializer())
193
0
  {
194
0
    // Doesn't matter what int we pass to the parent constructor
195
0
  }
196
};
197
} // namespace binding_detail
198
199
200
} // namespace dom
201
} // namespace mozilla
202
203
#endif // mozilla_dom_RTCRtpSourcesBinding_h