Line data Source code
1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 :
7 : #include "mozilla/plugins/PluginTypes.h"
8 :
9 :
10 : //-----------------------------------------------------------------------------
11 : // Method definitions for the IPDL type |struct PluginTag|
12 : //
13 : namespace mozilla {
14 : namespace plugins {
15 0 : MOZ_IMPLICIT PluginTag::PluginTag() :
16 : id_(),
17 : name_(),
18 : description_(),
19 : isJavaPlugin_(),
20 : isFlashPlugin_(),
21 : supportsAsyncRender_(),
22 : filename_(),
23 : version_(),
24 : lastModifiedTime_(),
25 : isFromExtension_(),
26 0 : sandboxLevel_()
27 : {
28 0 : Init();
29 0 : }
30 :
31 0 : PluginTag::~PluginTag()
32 : {
33 0 : }
34 :
35 0 : auto PluginTag::operator==(const PluginTag& _o) const -> bool
36 : {
37 0 : if ((!((id()) == ((_o).id())))) {
38 0 : return false;
39 : }
40 0 : if ((!((name()) == ((_o).name())))) {
41 0 : return false;
42 : }
43 0 : if ((!((description()) == ((_o).description())))) {
44 0 : return false;
45 : }
46 0 : if ((!((mimeTypes()) == ((_o).mimeTypes())))) {
47 0 : return false;
48 : }
49 0 : if ((!((mimeDescriptions()) == ((_o).mimeDescriptions())))) {
50 0 : return false;
51 : }
52 0 : if ((!((extensions()) == ((_o).extensions())))) {
53 0 : return false;
54 : }
55 0 : if ((!((isJavaPlugin()) == ((_o).isJavaPlugin())))) {
56 0 : return false;
57 : }
58 0 : if ((!((isFlashPlugin()) == ((_o).isFlashPlugin())))) {
59 0 : return false;
60 : }
61 0 : if ((!((supportsAsyncRender()) == ((_o).supportsAsyncRender())))) {
62 0 : return false;
63 : }
64 0 : if ((!((filename()) == ((_o).filename())))) {
65 0 : return false;
66 : }
67 0 : if ((!((version()) == ((_o).version())))) {
68 0 : return false;
69 : }
70 0 : if ((!((lastModifiedTime()) == ((_o).lastModifiedTime())))) {
71 0 : return false;
72 : }
73 0 : if ((!((isFromExtension()) == ((_o).isFromExtension())))) {
74 0 : return false;
75 : }
76 0 : if ((!((sandboxLevel()) == ((_o).sandboxLevel())))) {
77 0 : return false;
78 : }
79 0 : return true;
80 : }
81 :
82 0 : auto PluginTag::operator!=(const PluginTag& _o) const -> bool
83 : {
84 0 : return (!(operator==(_o)));
85 : }
86 :
87 0 : auto PluginTag::Init() -> void
88 : {
89 0 : }
90 :
91 0 : auto PluginTag::Assign(
92 : const uint32_t& _id,
93 : const nsCString& _name,
94 : const nsCString& _description,
95 : const nsTArray<nsCString>& _mimeTypes,
96 : const nsTArray<nsCString>& _mimeDescriptions,
97 : const nsTArray<nsCString>& _extensions,
98 : const bool& _isJavaPlugin,
99 : const bool& _isFlashPlugin,
100 : const bool& _supportsAsyncRender,
101 : const nsCString& _filename,
102 : const nsCString& _version,
103 : const int64_t& _lastModifiedTime,
104 : const bool& _isFromExtension,
105 : const int32_t& _sandboxLevel) -> void
106 : {
107 0 : id_ = _id;
108 0 : name_ = _name;
109 0 : description_ = _description;
110 0 : mimeTypes_ = _mimeTypes;
111 0 : mimeDescriptions_ = _mimeDescriptions;
112 0 : extensions_ = _extensions;
113 0 : isJavaPlugin_ = _isJavaPlugin;
114 0 : isFlashPlugin_ = _isFlashPlugin;
115 0 : supportsAsyncRender_ = _supportsAsyncRender;
116 0 : filename_ = _filename;
117 0 : version_ = _version;
118 0 : lastModifiedTime_ = _lastModifiedTime;
119 0 : isFromExtension_ = _isFromExtension;
120 0 : sandboxLevel_ = _sandboxLevel;
121 0 : }
122 :
123 : } // namespace plugins
124 : } // namespace mozilla
125 :
126 : //-----------------------------------------------------------------------------
127 : // Method definitions for the IPDL type |struct FakePluginTag|
128 : //
129 : namespace mozilla {
130 : namespace plugins {
131 0 : MOZ_IMPLICIT FakePluginTag::FakePluginTag() :
132 : id_(),
133 : name_(),
134 : description_(),
135 : niceName_(),
136 0 : sandboxScript_()
137 : {
138 0 : Init();
139 0 : }
140 :
141 0 : FakePluginTag::~FakePluginTag()
142 : {
143 0 : }
144 :
145 0 : auto FakePluginTag::operator==(const FakePluginTag& _o) const -> bool
146 : {
147 0 : if ((!((id()) == ((_o).id())))) {
148 0 : return false;
149 : }
150 0 : if ((!((handlerURI()) == ((_o).handlerURI())))) {
151 0 : return false;
152 : }
153 0 : if ((!((name()) == ((_o).name())))) {
154 0 : return false;
155 : }
156 0 : if ((!((description()) == ((_o).description())))) {
157 0 : return false;
158 : }
159 0 : if ((!((mimeTypes()) == ((_o).mimeTypes())))) {
160 0 : return false;
161 : }
162 0 : if ((!((mimeDescriptions()) == ((_o).mimeDescriptions())))) {
163 0 : return false;
164 : }
165 0 : if ((!((extensions()) == ((_o).extensions())))) {
166 0 : return false;
167 : }
168 0 : if ((!((niceName()) == ((_o).niceName())))) {
169 0 : return false;
170 : }
171 0 : if ((!((sandboxScript()) == ((_o).sandboxScript())))) {
172 0 : return false;
173 : }
174 0 : return true;
175 : }
176 :
177 0 : auto FakePluginTag::operator!=(const FakePluginTag& _o) const -> bool
178 : {
179 0 : return (!(operator==(_o)));
180 : }
181 :
182 0 : auto FakePluginTag::Init() -> void
183 : {
184 0 : }
185 :
186 0 : auto FakePluginTag::Assign(
187 : const uint32_t& _id,
188 : const URIParams& _handlerURI,
189 : const nsCString& _name,
190 : const nsCString& _description,
191 : const nsTArray<nsCString>& _mimeTypes,
192 : const nsTArray<nsCString>& _mimeDescriptions,
193 : const nsTArray<nsCString>& _extensions,
194 : const nsCString& _niceName,
195 : const nsString& _sandboxScript) -> void
196 : {
197 0 : id_ = _id;
198 0 : handlerURI_ = _handlerURI;
199 0 : name_ = _name;
200 0 : description_ = _description;
201 0 : mimeTypes_ = _mimeTypes;
202 0 : mimeDescriptions_ = _mimeDescriptions;
203 0 : extensions_ = _extensions;
204 0 : niceName_ = _niceName;
205 0 : sandboxScript_ = _sandboxScript;
206 0 : }
207 :
208 : } // namespace plugins
209 : } // namespace mozilla
210 :
211 : //-----------------------------------------------------------------------------
212 : // Method definitions for the IPDL type |union PluginIdentifier|
213 : //
214 : namespace mozilla {
215 : namespace plugins {
216 0 : auto PluginIdentifier::MaybeDestroy(Type aNewType) -> bool
217 : {
218 0 : if ((mType) == (T__None)) {
219 0 : return true;
220 : }
221 0 : if ((mType) == (aNewType)) {
222 0 : return false;
223 : }
224 0 : switch (mType) {
225 : case TnsCString:
226 : {
227 0 : (ptr_nsCString())->~nsCString__tdef();
228 0 : break;
229 : }
230 : case Tint32_t:
231 : {
232 0 : (ptr_int32_t())->~int32_t__tdef();
233 0 : break;
234 : }
235 : default:
236 : {
237 0 : mozilla::ipc::LogicError("not reached");
238 0 : break;
239 : }
240 : }
241 0 : return true;
242 : }
243 :
244 0 : MOZ_IMPLICIT PluginIdentifier::PluginIdentifier(const nsCString& aOther)
245 : {
246 0 : new (mozilla::KnownNotNull, ptr_nsCString()) nsCString(aOther);
247 0 : mType = TnsCString;
248 0 : }
249 :
250 0 : MOZ_IMPLICIT PluginIdentifier::PluginIdentifier(const int32_t& aOther)
251 : {
252 0 : new (mozilla::KnownNotNull, ptr_int32_t()) int32_t(aOther);
253 0 : mType = Tint32_t;
254 0 : }
255 :
256 0 : MOZ_IMPLICIT PluginIdentifier::PluginIdentifier(const PluginIdentifier& aOther)
257 : {
258 0 : (aOther).AssertSanity();
259 0 : switch ((aOther).type()) {
260 : case TnsCString:
261 : {
262 0 : new (mozilla::KnownNotNull, ptr_nsCString()) nsCString((aOther).get_nsCString());
263 0 : break;
264 : }
265 : case Tint32_t:
266 : {
267 0 : new (mozilla::KnownNotNull, ptr_int32_t()) int32_t((aOther).get_int32_t());
268 0 : break;
269 : }
270 : case T__None:
271 : {
272 0 : break;
273 : }
274 : default:
275 : {
276 0 : mozilla::ipc::LogicError("unreached");
277 0 : return;
278 : }
279 : }
280 0 : mType = (aOther).type();
281 : }
282 :
283 0 : PluginIdentifier::~PluginIdentifier()
284 : {
285 0 : static_cast<void>(MaybeDestroy(T__None));
286 0 : }
287 :
288 0 : auto PluginIdentifier::operator=(const nsCString& aRhs) -> PluginIdentifier&
289 : {
290 0 : if (MaybeDestroy(TnsCString)) {
291 0 : new (mozilla::KnownNotNull, ptr_nsCString()) nsCString;
292 : }
293 0 : (*(ptr_nsCString())) = aRhs;
294 0 : mType = TnsCString;
295 0 : return (*(this));
296 : }
297 :
298 0 : auto PluginIdentifier::operator=(const int32_t& aRhs) -> PluginIdentifier&
299 : {
300 0 : if (MaybeDestroy(Tint32_t)) {
301 0 : new (mozilla::KnownNotNull, ptr_int32_t()) int32_t;
302 : }
303 0 : (*(ptr_int32_t())) = aRhs;
304 0 : mType = Tint32_t;
305 0 : return (*(this));
306 : }
307 :
308 0 : auto PluginIdentifier::operator=(const PluginIdentifier& aRhs) -> PluginIdentifier&
309 : {
310 0 : (aRhs).AssertSanity();
311 0 : Type t = (aRhs).type();
312 0 : switch (t) {
313 : case TnsCString:
314 : {
315 0 : if (MaybeDestroy(t)) {
316 0 : new (mozilla::KnownNotNull, ptr_nsCString()) nsCString;
317 : }
318 0 : (*(ptr_nsCString())) = (aRhs).get_nsCString();
319 0 : break;
320 : }
321 : case Tint32_t:
322 : {
323 0 : if (MaybeDestroy(t)) {
324 0 : new (mozilla::KnownNotNull, ptr_int32_t()) int32_t;
325 : }
326 0 : (*(ptr_int32_t())) = (aRhs).get_int32_t();
327 0 : break;
328 : }
329 : case T__None:
330 : {
331 0 : static_cast<void>(MaybeDestroy(t));
332 0 : break;
333 : }
334 : default:
335 : {
336 0 : mozilla::ipc::LogicError("unreached");
337 0 : break;
338 : }
339 : }
340 0 : mType = t;
341 0 : return (*(this));
342 : }
343 :
344 0 : auto PluginIdentifier::operator==(const nsCString& aRhs) const -> bool
345 : {
346 0 : return (get_nsCString()) == (aRhs);
347 : }
348 :
349 0 : auto PluginIdentifier::operator==(const int32_t& aRhs) const -> bool
350 : {
351 0 : return (get_int32_t()) == (aRhs);
352 : }
353 :
354 0 : auto PluginIdentifier::operator==(const PluginIdentifier& aRhs) const -> bool
355 : {
356 0 : if ((type()) != ((aRhs).type())) {
357 0 : return false;
358 : }
359 :
360 0 : switch (type()) {
361 : case TnsCString:
362 : {
363 0 : return (get_nsCString()) == ((aRhs).get_nsCString());
364 : }
365 : case Tint32_t:
366 : {
367 0 : return (get_int32_t()) == ((aRhs).get_int32_t());
368 : }
369 : default:
370 : {
371 0 : mozilla::ipc::LogicError("unreached");
372 0 : return false;
373 : }
374 : }
375 : }
376 :
377 0 : auto PluginIdentifier::get(nsCString* aOutValue) const -> void
378 : {
379 0 : (*(aOutValue)) = get_nsCString();
380 0 : }
381 :
382 0 : auto PluginIdentifier::get(int32_t* aOutValue) const -> void
383 : {
384 0 : (*(aOutValue)) = get_int32_t();
385 0 : }
386 :
387 : } // namespace plugins
388 : } // namespace mozilla
|