Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/ipc/ipdl/PFileSystemParams.cpp
Line
Count
Source (jump to first uncovered line)
1
//
2
// Automatically generated by ipdlc.
3
// Edit at your own risk
4
//
5
6
7
#include "mozilla/dom/PFileSystemParams.h"
8
9
10
//-----------------------------------------------------------------------------
11
// Method definitions for the IPDL type |struct FileSystemGetDirectoryListingParams|
12
//
13
namespace mozilla {
14
namespace dom {
15
auto FileSystemGetDirectoryListingParams::operator==(const FileSystemGetDirectoryListingParams& _o) const -> bool
16
0
{
17
0
    if ((!((filesystem()) == ((_o).filesystem())))) {
18
0
        return false;
19
0
    }
20
0
    if ((!((realPath()) == ((_o).realPath())))) {
21
0
        return false;
22
0
    }
23
0
    if ((!((domPath()) == ((_o).domPath())))) {
24
0
        return false;
25
0
    }
26
0
    if ((!((filters()) == ((_o).filters())))) {
27
0
        return false;
28
0
    }
29
0
    return true;
30
0
}
31
32
auto FileSystemGetDirectoryListingParams::operator!=(const FileSystemGetDirectoryListingParams& _o) const -> bool
33
0
{
34
0
    return (!(operator==(_o)));
35
0
}
36
37
} // namespace dom
38
} // namespace mozilla
39
40
namespace mozilla {
41
namespace ipc {
42
auto IPDLParamTraits<mozilla::dom::FileSystemGetDirectoryListingParams>::Write(
43
        IPC::Message* aMsg,
44
        mozilla::ipc::IProtocol* aActor,
45
        const paramType& aVar) -> void
46
0
{
47
0
    WriteIPDLParam(aMsg, aActor, (aVar).filesystem());
48
0
    // Sentinel = 'filesystem'
49
0
    (aMsg)->WriteSentinel(1299848695);
50
0
    WriteIPDLParam(aMsg, aActor, (aVar).realPath());
51
0
    // Sentinel = 'realPath'
52
0
    (aMsg)->WriteSentinel(2928426273);
53
0
    WriteIPDLParam(aMsg, aActor, (aVar).domPath());
54
0
    // Sentinel = 'domPath'
55
0
    (aMsg)->WriteSentinel(3617779470);
56
0
    WriteIPDLParam(aMsg, aActor, (aVar).filters());
57
0
    // Sentinel = 'filters'
58
0
    (aMsg)->WriteSentinel(4001190422);
59
0
}
60
61
auto IPDLParamTraits<mozilla::dom::FileSystemGetDirectoryListingParams>::Read(
62
        const IPC::Message* aMsg,
63
        PickleIterator* aIter,
64
        mozilla::ipc::IProtocol* aActor,
65
        paramType* aVar) -> bool
66
0
{
67
0
    if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->filesystem())))))) {
68
0
        (aActor)->FatalError("Error deserializing 'filesystem' (nsString) member of 'FileSystemGetDirectoryListingParams'");
69
0
        return false;
70
0
    }
71
0
    // Sentinel = 'filesystem'
72
0
    if ((!((aMsg)->ReadSentinel(aIter, 1299848695)))) {
73
0
        mozilla::ipc::SentinelReadError("Error deserializing 'filesystem' (nsString) member of 'FileSystemGetDirectoryListingParams'");
74
0
        return false;
75
0
    }
76
0
    if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->realPath())))))) {
77
0
        (aActor)->FatalError("Error deserializing 'realPath' (nsString) member of 'FileSystemGetDirectoryListingParams'");
78
0
        return false;
79
0
    }
80
0
    // Sentinel = 'realPath'
81
0
    if ((!((aMsg)->ReadSentinel(aIter, 2928426273)))) {
82
0
        mozilla::ipc::SentinelReadError("Error deserializing 'realPath' (nsString) member of 'FileSystemGetDirectoryListingParams'");
83
0
        return false;
84
0
    }
85
0
    if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->domPath())))))) {
86
0
        (aActor)->FatalError("Error deserializing 'domPath' (nsString) member of 'FileSystemGetDirectoryListingParams'");
87
0
        return false;
88
0
    }
89
0
    // Sentinel = 'domPath'
90
0
    if ((!((aMsg)->ReadSentinel(aIter, 3617779470)))) {
91
0
        mozilla::ipc::SentinelReadError("Error deserializing 'domPath' (nsString) member of 'FileSystemGetDirectoryListingParams'");
92
0
        return false;
93
0
    }
94
0
    if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->filters())))))) {
95
0
        (aActor)->FatalError("Error deserializing 'filters' (nsString) member of 'FileSystemGetDirectoryListingParams'");
96
0
        return false;
97
0
    }
98
0
    // Sentinel = 'filters'
99
0
    if ((!((aMsg)->ReadSentinel(aIter, 4001190422)))) {
100
0
        mozilla::ipc::SentinelReadError("Error deserializing 'filters' (nsString) member of 'FileSystemGetDirectoryListingParams'");
101
0
        return false;
102
0
    }
103
0
    return true;
104
0
}
105
106
} // namespace ipc
107
} // namespace mozilla
108
109
//-----------------------------------------------------------------------------
110
// Method definitions for the IPDL type |struct FileSystemGetFilesParams|
111
//
112
namespace mozilla {
113
namespace dom {
114
auto FileSystemGetFilesParams::operator==(const FileSystemGetFilesParams& _o) const -> bool
115
0
{
116
0
    if ((!((filesystem()) == ((_o).filesystem())))) {
117
0
        return false;
118
0
    }
119
0
    if ((!((realPath()) == ((_o).realPath())))) {
120
0
        return false;
121
0
    }
122
0
    if ((!((domPath()) == ((_o).domPath())))) {
123
0
        return false;
124
0
    }
125
0
    if ((!((recursiveFlag()) == ((_o).recursiveFlag())))) {
126
0
        return false;
127
0
    }
128
0
    return true;
129
0
}
130
131
auto FileSystemGetFilesParams::operator!=(const FileSystemGetFilesParams& _o) const -> bool
132
0
{
133
0
    return (!(operator==(_o)));
134
0
}
135
136
} // namespace dom
137
} // namespace mozilla
138
139
namespace mozilla {
140
namespace ipc {
141
auto IPDLParamTraits<mozilla::dom::FileSystemGetFilesParams>::Write(
142
        IPC::Message* aMsg,
143
        mozilla::ipc::IProtocol* aActor,
144
        const paramType& aVar) -> void
145
0
{
146
0
    WriteIPDLParam(aMsg, aActor, (aVar).filesystem());
147
0
    // Sentinel = 'filesystem'
148
0
    (aMsg)->WriteSentinel(1299848695);
149
0
    WriteIPDLParam(aMsg, aActor, (aVar).realPath());
150
0
    // Sentinel = 'realPath'
151
0
    (aMsg)->WriteSentinel(2928426273);
152
0
    WriteIPDLParam(aMsg, aActor, (aVar).domPath());
153
0
    // Sentinel = 'domPath'
154
0
    (aMsg)->WriteSentinel(3617779470);
155
0
    WriteIPDLParam(aMsg, aActor, (aVar).recursiveFlag());
156
0
    // Sentinel = 'recursiveFlag'
157
0
    (aMsg)->WriteSentinel(3824256759);
158
0
}
159
160
auto IPDLParamTraits<mozilla::dom::FileSystemGetFilesParams>::Read(
161
        const IPC::Message* aMsg,
162
        PickleIterator* aIter,
163
        mozilla::ipc::IProtocol* aActor,
164
        paramType* aVar) -> bool
165
0
{
166
0
    if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->filesystem())))))) {
167
0
        (aActor)->FatalError("Error deserializing 'filesystem' (nsString) member of 'FileSystemGetFilesParams'");
168
0
        return false;
169
0
    }
170
0
    // Sentinel = 'filesystem'
171
0
    if ((!((aMsg)->ReadSentinel(aIter, 1299848695)))) {
172
0
        mozilla::ipc::SentinelReadError("Error deserializing 'filesystem' (nsString) member of 'FileSystemGetFilesParams'");
173
0
        return false;
174
0
    }
175
0
    if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->realPath())))))) {
176
0
        (aActor)->FatalError("Error deserializing 'realPath' (nsString) member of 'FileSystemGetFilesParams'");
177
0
        return false;
178
0
    }
179
0
    // Sentinel = 'realPath'
180
0
    if ((!((aMsg)->ReadSentinel(aIter, 2928426273)))) {
181
0
        mozilla::ipc::SentinelReadError("Error deserializing 'realPath' (nsString) member of 'FileSystemGetFilesParams'");
182
0
        return false;
183
0
    }
184
0
    if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->domPath())))))) {
185
0
        (aActor)->FatalError("Error deserializing 'domPath' (nsString) member of 'FileSystemGetFilesParams'");
186
0
        return false;
187
0
    }
188
0
    // Sentinel = 'domPath'
189
0
    if ((!((aMsg)->ReadSentinel(aIter, 3617779470)))) {
190
0
        mozilla::ipc::SentinelReadError("Error deserializing 'domPath' (nsString) member of 'FileSystemGetFilesParams'");
191
0
        return false;
192
0
    }
193
0
    if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->recursiveFlag())))))) {
194
0
        (aActor)->FatalError("Error deserializing 'recursiveFlag' (bool) member of 'FileSystemGetFilesParams'");
195
0
        return false;
196
0
    }
197
0
    // Sentinel = 'recursiveFlag'
198
0
    if ((!((aMsg)->ReadSentinel(aIter, 3824256759)))) {
199
0
        mozilla::ipc::SentinelReadError("Error deserializing 'recursiveFlag' (bool) member of 'FileSystemGetFilesParams'");
200
0
        return false;
201
0
    }
202
0
    return true;
203
0
}
204
205
} // namespace ipc
206
} // namespace mozilla
207
208
//-----------------------------------------------------------------------------
209
// Method definitions for the IPDL type |struct FileSystemGetFileOrDirectoryParams|
210
//
211
namespace mozilla {
212
namespace dom {
213
auto FileSystemGetFileOrDirectoryParams::operator==(const FileSystemGetFileOrDirectoryParams& _o) const -> bool
214
0
{
215
0
    if ((!((filesystem()) == ((_o).filesystem())))) {
216
0
        return false;
217
0
    }
218
0
    if ((!((realPath()) == ((_o).realPath())))) {
219
0
        return false;
220
0
    }
221
0
    return true;
222
0
}
223
224
auto FileSystemGetFileOrDirectoryParams::operator!=(const FileSystemGetFileOrDirectoryParams& _o) const -> bool
225
0
{
226
0
    return (!(operator==(_o)));
227
0
}
228
229
} // namespace dom
230
} // namespace mozilla
231
232
namespace mozilla {
233
namespace ipc {
234
auto IPDLParamTraits<mozilla::dom::FileSystemGetFileOrDirectoryParams>::Write(
235
        IPC::Message* aMsg,
236
        mozilla::ipc::IProtocol* aActor,
237
        const paramType& aVar) -> void
238
0
{
239
0
    WriteIPDLParam(aMsg, aActor, (aVar).filesystem());
240
0
    // Sentinel = 'filesystem'
241
0
    (aMsg)->WriteSentinel(1299848695);
242
0
    WriteIPDLParam(aMsg, aActor, (aVar).realPath());
243
0
    // Sentinel = 'realPath'
244
0
    (aMsg)->WriteSentinel(2928426273);
245
0
}
246
247
auto IPDLParamTraits<mozilla::dom::FileSystemGetFileOrDirectoryParams>::Read(
248
        const IPC::Message* aMsg,
249
        PickleIterator* aIter,
250
        mozilla::ipc::IProtocol* aActor,
251
        paramType* aVar) -> bool
252
0
{
253
0
    if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->filesystem())))))) {
254
0
        (aActor)->FatalError("Error deserializing 'filesystem' (nsString) member of 'FileSystemGetFileOrDirectoryParams'");
255
0
        return false;
256
0
    }
257
0
    // Sentinel = 'filesystem'
258
0
    if ((!((aMsg)->ReadSentinel(aIter, 1299848695)))) {
259
0
        mozilla::ipc::SentinelReadError("Error deserializing 'filesystem' (nsString) member of 'FileSystemGetFileOrDirectoryParams'");
260
0
        return false;
261
0
    }
262
0
    if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->realPath())))))) {
263
0
        (aActor)->FatalError("Error deserializing 'realPath' (nsString) member of 'FileSystemGetFileOrDirectoryParams'");
264
0
        return false;
265
0
    }
266
0
    // Sentinel = 'realPath'
267
0
    if ((!((aMsg)->ReadSentinel(aIter, 2928426273)))) {
268
0
        mozilla::ipc::SentinelReadError("Error deserializing 'realPath' (nsString) member of 'FileSystemGetFileOrDirectoryParams'");
269
0
        return false;
270
0
    }
271
0
    return true;
272
0
}
273
274
} // namespace ipc
275
} // namespace mozilla
276
277
//-----------------------------------------------------------------------------
278
// Method definitions for the IPDL type |union FileSystemParams|
279
//
280
namespace mozilla {
281
namespace dom {
282
auto FileSystemParams::MaybeDestroy(Type aNewType) -> bool
283
0
{
284
0
    if ((mType) == (T__None)) {
285
0
        return true;
286
0
    }
287
0
    if ((mType) == (aNewType)) {
288
0
        return false;
289
0
    }
290
0
    switch (mType) {
291
0
    case TFileSystemGetDirectoryListingParams:
292
0
        {
293
0
            (ptr_FileSystemGetDirectoryListingParams())->~FileSystemGetDirectoryListingParams__tdef();
294
0
            break;
295
0
        }
296
0
    case TFileSystemGetFilesParams:
297
0
        {
298
0
            (ptr_FileSystemGetFilesParams())->~FileSystemGetFilesParams__tdef();
299
0
            break;
300
0
        }
301
0
    case TFileSystemGetFileOrDirectoryParams:
302
0
        {
303
0
            (ptr_FileSystemGetFileOrDirectoryParams())->~FileSystemGetFileOrDirectoryParams__tdef();
304
0
            break;
305
0
        }
306
0
    default:
307
0
        {
308
0
            mozilla::ipc::LogicError("not reached");
309
0
            break;
310
0
        }
311
0
    }
312
0
    return true;
313
0
}
314
315
MOZ_IMPLICIT FileSystemParams::FileSystemParams(const FileSystemGetDirectoryListingParams& aOther)
316
0
{
317
0
    new (mozilla::KnownNotNull, ptr_FileSystemGetDirectoryListingParams()) FileSystemGetDirectoryListingParams(aOther);
318
0
    mType = TFileSystemGetDirectoryListingParams;
319
0
}
320
321
MOZ_IMPLICIT FileSystemParams::FileSystemParams(FileSystemGetDirectoryListingParams&& aOther)
322
0
{
323
0
    new (mozilla::KnownNotNull, ptr_FileSystemGetDirectoryListingParams()) FileSystemGetDirectoryListingParams(std::move(aOther));
324
0
    mType = TFileSystemGetDirectoryListingParams;
325
0
}
326
327
MOZ_IMPLICIT FileSystemParams::FileSystemParams(const FileSystemGetFilesParams& aOther)
328
0
{
329
0
    new (mozilla::KnownNotNull, ptr_FileSystemGetFilesParams()) FileSystemGetFilesParams(aOther);
330
0
    mType = TFileSystemGetFilesParams;
331
0
}
332
333
MOZ_IMPLICIT FileSystemParams::FileSystemParams(FileSystemGetFilesParams&& aOther)
334
0
{
335
0
    new (mozilla::KnownNotNull, ptr_FileSystemGetFilesParams()) FileSystemGetFilesParams(std::move(aOther));
336
0
    mType = TFileSystemGetFilesParams;
337
0
}
338
339
MOZ_IMPLICIT FileSystemParams::FileSystemParams(const FileSystemGetFileOrDirectoryParams& aOther)
340
0
{
341
0
    new (mozilla::KnownNotNull, ptr_FileSystemGetFileOrDirectoryParams()) FileSystemGetFileOrDirectoryParams(aOther);
342
0
    mType = TFileSystemGetFileOrDirectoryParams;
343
0
}
344
345
MOZ_IMPLICIT FileSystemParams::FileSystemParams(FileSystemGetFileOrDirectoryParams&& aOther)
346
0
{
347
0
    new (mozilla::KnownNotNull, ptr_FileSystemGetFileOrDirectoryParams()) FileSystemGetFileOrDirectoryParams(std::move(aOther));
348
0
    mType = TFileSystemGetFileOrDirectoryParams;
349
0
}
350
351
MOZ_IMPLICIT FileSystemParams::FileSystemParams(const FileSystemParams& aOther)
352
0
{
353
0
    (aOther).AssertSanity();
354
0
    switch ((aOther).type()) {
355
0
    case TFileSystemGetDirectoryListingParams:
356
0
        {
357
0
            new (mozilla::KnownNotNull, ptr_FileSystemGetDirectoryListingParams()) FileSystemGetDirectoryListingParams((aOther).get_FileSystemGetDirectoryListingParams());
358
0
            break;
359
0
        }
360
0
    case TFileSystemGetFilesParams:
361
0
        {
362
0
            new (mozilla::KnownNotNull, ptr_FileSystemGetFilesParams()) FileSystemGetFilesParams((aOther).get_FileSystemGetFilesParams());
363
0
            break;
364
0
        }
365
0
    case TFileSystemGetFileOrDirectoryParams:
366
0
        {
367
0
            new (mozilla::KnownNotNull, ptr_FileSystemGetFileOrDirectoryParams()) FileSystemGetFileOrDirectoryParams((aOther).get_FileSystemGetFileOrDirectoryParams());
368
0
            break;
369
0
        }
370
0
    case T__None:
371
0
        {
372
0
            break;
373
0
        }
374
0
    default:
375
0
        {
376
0
            mozilla::ipc::LogicError("unreached");
377
0
            return;
378
0
        }
379
0
    }
380
0
    mType = (aOther).type();
381
0
}
382
383
MOZ_IMPLICIT FileSystemParams::FileSystemParams(FileSystemParams&& aOther)
384
0
{
385
0
    (aOther).AssertSanity();
386
0
    Type t = (aOther).type();
387
0
    switch (t) {
388
0
    case TFileSystemGetDirectoryListingParams:
389
0
        {
390
0
            new (mozilla::KnownNotNull, ptr_FileSystemGetDirectoryListingParams()) FileSystemGetDirectoryListingParams(std::move((aOther).get_FileSystemGetDirectoryListingParams()));
391
0
            static_cast<void>((aOther).MaybeDestroy(T__None));
392
0
            break;
393
0
        }
394
0
    case TFileSystemGetFilesParams:
395
0
        {
396
0
            new (mozilla::KnownNotNull, ptr_FileSystemGetFilesParams()) FileSystemGetFilesParams(std::move((aOther).get_FileSystemGetFilesParams()));
397
0
            static_cast<void>((aOther).MaybeDestroy(T__None));
398
0
            break;
399
0
        }
400
0
    case TFileSystemGetFileOrDirectoryParams:
401
0
        {
402
0
            new (mozilla::KnownNotNull, ptr_FileSystemGetFileOrDirectoryParams()) FileSystemGetFileOrDirectoryParams(std::move((aOther).get_FileSystemGetFileOrDirectoryParams()));
403
0
            static_cast<void>((aOther).MaybeDestroy(T__None));
404
0
            break;
405
0
        }
406
0
    case T__None:
407
0
        {
408
0
            break;
409
0
        }
410
0
    default:
411
0
        {
412
0
            mozilla::ipc::LogicError("unreached");
413
0
            return;
414
0
        }
415
0
    }
416
0
    (aOther).mType = T__None;
417
0
    mType = t;
418
0
}
419
420
FileSystemParams::~FileSystemParams()
421
0
{
422
0
    static_cast<void>(MaybeDestroy(T__None));
423
0
}
424
425
auto FileSystemParams::operator=(const FileSystemGetDirectoryListingParams& aRhs) -> FileSystemParams&
426
0
{
427
0
    if (MaybeDestroy(TFileSystemGetDirectoryListingParams)) {
428
0
        new (mozilla::KnownNotNull, ptr_FileSystemGetDirectoryListingParams()) FileSystemGetDirectoryListingParams;
429
0
    }
430
0
    (*(ptr_FileSystemGetDirectoryListingParams())) = aRhs;
431
0
    mType = TFileSystemGetDirectoryListingParams;
432
0
    return (*(this));
433
0
}
434
435
auto FileSystemParams::operator=(FileSystemGetDirectoryListingParams&& aRhs) -> FileSystemParams&
436
0
{
437
0
    if (MaybeDestroy(TFileSystemGetDirectoryListingParams)) {
438
0
        new (mozilla::KnownNotNull, ptr_FileSystemGetDirectoryListingParams()) FileSystemGetDirectoryListingParams;
439
0
    }
440
0
    (*(ptr_FileSystemGetDirectoryListingParams())) = std::move(aRhs);
441
0
    mType = TFileSystemGetDirectoryListingParams;
442
0
    return (*(this));
443
0
}
444
445
auto FileSystemParams::operator=(const FileSystemGetFilesParams& aRhs) -> FileSystemParams&
446
0
{
447
0
    if (MaybeDestroy(TFileSystemGetFilesParams)) {
448
0
        new (mozilla::KnownNotNull, ptr_FileSystemGetFilesParams()) FileSystemGetFilesParams;
449
0
    }
450
0
    (*(ptr_FileSystemGetFilesParams())) = aRhs;
451
0
    mType = TFileSystemGetFilesParams;
452
0
    return (*(this));
453
0
}
454
455
auto FileSystemParams::operator=(FileSystemGetFilesParams&& aRhs) -> FileSystemParams&
456
0
{
457
0
    if (MaybeDestroy(TFileSystemGetFilesParams)) {
458
0
        new (mozilla::KnownNotNull, ptr_FileSystemGetFilesParams()) FileSystemGetFilesParams;
459
0
    }
460
0
    (*(ptr_FileSystemGetFilesParams())) = std::move(aRhs);
461
0
    mType = TFileSystemGetFilesParams;
462
0
    return (*(this));
463
0
}
464
465
auto FileSystemParams::operator=(const FileSystemGetFileOrDirectoryParams& aRhs) -> FileSystemParams&
466
0
{
467
0
    if (MaybeDestroy(TFileSystemGetFileOrDirectoryParams)) {
468
0
        new (mozilla::KnownNotNull, ptr_FileSystemGetFileOrDirectoryParams()) FileSystemGetFileOrDirectoryParams;
469
0
    }
470
0
    (*(ptr_FileSystemGetFileOrDirectoryParams())) = aRhs;
471
0
    mType = TFileSystemGetFileOrDirectoryParams;
472
0
    return (*(this));
473
0
}
474
475
auto FileSystemParams::operator=(FileSystemGetFileOrDirectoryParams&& aRhs) -> FileSystemParams&
476
0
{
477
0
    if (MaybeDestroy(TFileSystemGetFileOrDirectoryParams)) {
478
0
        new (mozilla::KnownNotNull, ptr_FileSystemGetFileOrDirectoryParams()) FileSystemGetFileOrDirectoryParams;
479
0
    }
480
0
    (*(ptr_FileSystemGetFileOrDirectoryParams())) = std::move(aRhs);
481
0
    mType = TFileSystemGetFileOrDirectoryParams;
482
0
    return (*(this));
483
0
}
484
485
auto FileSystemParams::operator=(const FileSystemParams& aRhs) -> FileSystemParams&
486
0
{
487
0
    (aRhs).AssertSanity();
488
0
    Type t = (aRhs).type();
489
0
    switch (t) {
490
0
    case TFileSystemGetDirectoryListingParams:
491
0
        {
492
0
            if (MaybeDestroy(t)) {
493
0
                new (mozilla::KnownNotNull, ptr_FileSystemGetDirectoryListingParams()) FileSystemGetDirectoryListingParams;
494
0
            }
495
0
            (*(ptr_FileSystemGetDirectoryListingParams())) = (aRhs).get_FileSystemGetDirectoryListingParams();
496
0
            break;
497
0
        }
498
0
    case TFileSystemGetFilesParams:
499
0
        {
500
0
            if (MaybeDestroy(t)) {
501
0
                new (mozilla::KnownNotNull, ptr_FileSystemGetFilesParams()) FileSystemGetFilesParams;
502
0
            }
503
0
            (*(ptr_FileSystemGetFilesParams())) = (aRhs).get_FileSystemGetFilesParams();
504
0
            break;
505
0
        }
506
0
    case TFileSystemGetFileOrDirectoryParams:
507
0
        {
508
0
            if (MaybeDestroy(t)) {
509
0
                new (mozilla::KnownNotNull, ptr_FileSystemGetFileOrDirectoryParams()) FileSystemGetFileOrDirectoryParams;
510
0
            }
511
0
            (*(ptr_FileSystemGetFileOrDirectoryParams())) = (aRhs).get_FileSystemGetFileOrDirectoryParams();
512
0
            break;
513
0
        }
514
0
    case T__None:
515
0
        {
516
0
            static_cast<void>(MaybeDestroy(t));
517
0
            break;
518
0
        }
519
0
    default:
520
0
        {
521
0
            mozilla::ipc::LogicError("unreached");
522
0
            break;
523
0
        }
524
0
    }
525
0
    mType = t;
526
0
    return (*(this));
527
0
}
528
529
auto FileSystemParams::operator=(FileSystemParams&& aRhs) -> FileSystemParams&
530
0
{
531
0
    (aRhs).AssertSanity();
532
0
    Type t = (aRhs).type();
533
0
    switch (t) {
534
0
    case TFileSystemGetDirectoryListingParams:
535
0
        {
536
0
            if (MaybeDestroy(t)) {
537
0
                new (mozilla::KnownNotNull, ptr_FileSystemGetDirectoryListingParams()) FileSystemGetDirectoryListingParams;
538
0
            }
539
0
            (*(ptr_FileSystemGetDirectoryListingParams())) = std::move((aRhs).get_FileSystemGetDirectoryListingParams());
540
0
            static_cast<void>((aRhs).MaybeDestroy(T__None));
541
0
            break;
542
0
        }
543
0
    case TFileSystemGetFilesParams:
544
0
        {
545
0
            if (MaybeDestroy(t)) {
546
0
                new (mozilla::KnownNotNull, ptr_FileSystemGetFilesParams()) FileSystemGetFilesParams;
547
0
            }
548
0
            (*(ptr_FileSystemGetFilesParams())) = std::move((aRhs).get_FileSystemGetFilesParams());
549
0
            static_cast<void>((aRhs).MaybeDestroy(T__None));
550
0
            break;
551
0
        }
552
0
    case TFileSystemGetFileOrDirectoryParams:
553
0
        {
554
0
            if (MaybeDestroy(t)) {
555
0
                new (mozilla::KnownNotNull, ptr_FileSystemGetFileOrDirectoryParams()) FileSystemGetFileOrDirectoryParams;
556
0
            }
557
0
            (*(ptr_FileSystemGetFileOrDirectoryParams())) = std::move((aRhs).get_FileSystemGetFileOrDirectoryParams());
558
0
            static_cast<void>((aRhs).MaybeDestroy(T__None));
559
0
            break;
560
0
        }
561
0
    case T__None:
562
0
        {
563
0
            static_cast<void>(MaybeDestroy(t));
564
0
            break;
565
0
        }
566
0
    default:
567
0
        {
568
0
            mozilla::ipc::LogicError("unreached");
569
0
            break;
570
0
        }
571
0
    }
572
0
    (aRhs).mType = T__None;
573
0
    mType = t;
574
0
    return (*(this));
575
0
}
576
577
auto FileSystemParams::operator==(const FileSystemGetDirectoryListingParams& aRhs) const -> bool
578
0
{
579
0
    return (get_FileSystemGetDirectoryListingParams()) == (aRhs);
580
0
}
581
582
auto FileSystemParams::operator==(const FileSystemGetFilesParams& aRhs) const -> bool
583
0
{
584
0
    return (get_FileSystemGetFilesParams()) == (aRhs);
585
0
}
586
587
auto FileSystemParams::operator==(const FileSystemGetFileOrDirectoryParams& aRhs) const -> bool
588
0
{
589
0
    return (get_FileSystemGetFileOrDirectoryParams()) == (aRhs);
590
0
}
591
592
auto FileSystemParams::operator==(const FileSystemParams& aRhs) const -> bool
593
0
{
594
0
    if ((type()) != ((aRhs).type())) {
595
0
        return false;
596
0
    }
597
0
598
0
    switch (type()) {
599
0
    case TFileSystemGetDirectoryListingParams:
600
0
        {
601
0
            return (get_FileSystemGetDirectoryListingParams()) == ((aRhs).get_FileSystemGetDirectoryListingParams());
602
0
        }
603
0
    case TFileSystemGetFilesParams:
604
0
        {
605
0
            return (get_FileSystemGetFilesParams()) == ((aRhs).get_FileSystemGetFilesParams());
606
0
        }
607
0
    case TFileSystemGetFileOrDirectoryParams:
608
0
        {
609
0
            return (get_FileSystemGetFileOrDirectoryParams()) == ((aRhs).get_FileSystemGetFileOrDirectoryParams());
610
0
        }
611
0
    default:
612
0
        {
613
0
            mozilla::ipc::LogicError("unreached");
614
0
            return false;
615
0
        }
616
0
    }
617
0
}
618
619
auto FileSystemParams::get(FileSystemGetDirectoryListingParams* aOutValue) const -> void
620
0
{
621
0
    (*(aOutValue)) = get_FileSystemGetDirectoryListingParams();
622
0
}
623
624
auto FileSystemParams::get(FileSystemGetFilesParams* aOutValue) const -> void
625
0
{
626
0
    (*(aOutValue)) = get_FileSystemGetFilesParams();
627
0
}
628
629
auto FileSystemParams::get(FileSystemGetFileOrDirectoryParams* aOutValue) const -> void
630
0
{
631
0
    (*(aOutValue)) = get_FileSystemGetFileOrDirectoryParams();
632
0
}
633
634
} // namespace dom
635
} // namespace mozilla
636
637
namespace mozilla {
638
namespace ipc {
639
auto IPDLParamTraits<mozilla::dom::FileSystemParams>::Write(
640
        IPC::Message* aMsg,
641
        mozilla::ipc::IProtocol* aActor,
642
        const paramType& aVar) -> void
643
{
644
    typedef mozilla::dom::FileSystemParams union__;
645
    int type;
646
    type = (aVar).type();
647
    WriteIPDLParam(aMsg, aActor, type);
648
    // Sentinel = 'FileSystemParams'
649
    (aMsg)->WriteSentinel(109932807);
650
651
    switch (type) {
652
    case union__::TFileSystemGetDirectoryListingParams:
653
        {
654
            WriteIPDLParam(aMsg, aActor, (aVar).get_FileSystemGetDirectoryListingParams());
655
            // Sentinel = 'TFileSystemGetDirectoryListingParams'
656
            (aMsg)->WriteSentinel(2814132262);
657
            return;
658
        }
659
    case union__::TFileSystemGetFilesParams:
660
        {
661
            WriteIPDLParam(aMsg, aActor, (aVar).get_FileSystemGetFilesParams());
662
            // Sentinel = 'TFileSystemGetFilesParams'
663
            (aMsg)->WriteSentinel(2793550675);
664
            return;
665
        }
666
    case union__::TFileSystemGetFileOrDirectoryParams:
667
        {
668
            WriteIPDLParam(aMsg, aActor, (aVar).get_FileSystemGetFileOrDirectoryParams());
669
            // Sentinel = 'TFileSystemGetFileOrDirectoryParams'
670
            (aMsg)->WriteSentinel(411751270);
671
            return;
672
        }
673
    default:
674
        {
675
            (aActor)->FatalError("unknown union type");
676
            return;
677
        }
678
    }
679
}
680
681
auto IPDLParamTraits<mozilla::dom::FileSystemParams>::Read(
682
        const IPC::Message* aMsg,
683
        PickleIterator* aIter,
684
        mozilla::ipc::IProtocol* aActor,
685
        paramType* aVar) -> bool
686
0
{
687
0
    typedef mozilla::dom::FileSystemParams union__;
688
0
    int type;
689
0
    if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&(type)))))) {
690
0
        (aActor)->FatalError("Error deserializing type of union FileSystemParams");
691
0
        return false;
692
0
    }
693
0
    // Sentinel = 'FileSystemParams'
694
0
    if ((!((aMsg)->ReadSentinel(aIter, 109932807)))) {
695
0
        mozilla::ipc::SentinelReadError("Error deserializing type of union FileSystemParams");
696
0
        return false;
697
0
    }
698
0
699
0
    switch (type) {
700
0
    case union__::TFileSystemGetDirectoryListingParams:
701
0
        {
702
0
            mozilla::dom::FileSystemGetDirectoryListingParams tmp = mozilla::dom::FileSystemGetDirectoryListingParams();
703
0
            (*(aVar)) = tmp;
704
0
            if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_FileSystemGetDirectoryListingParams())))))) {
705
0
                (aActor)->FatalError("Error deserializing variant TFileSystemGetDirectoryListingParams of union FileSystemParams");
706
0
                return false;
707
0
            }
708
0
            // Sentinel = 'TFileSystemGetDirectoryListingParams'
709
0
            if ((!((aMsg)->ReadSentinel(aIter, 2814132262)))) {
710
0
                mozilla::ipc::SentinelReadError("Error deserializing variant TFileSystemGetDirectoryListingParams of union FileSystemParams");
711
0
                return false;
712
0
            }
713
0
            return true;
714
0
        }
715
0
    case union__::TFileSystemGetFilesParams:
716
0
        {
717
0
            mozilla::dom::FileSystemGetFilesParams tmp = mozilla::dom::FileSystemGetFilesParams();
718
0
            (*(aVar)) = tmp;
719
0
            if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_FileSystemGetFilesParams())))))) {
720
0
                (aActor)->FatalError("Error deserializing variant TFileSystemGetFilesParams of union FileSystemParams");
721
0
                return false;
722
0
            }
723
0
            // Sentinel = 'TFileSystemGetFilesParams'
724
0
            if ((!((aMsg)->ReadSentinel(aIter, 2793550675)))) {
725
0
                mozilla::ipc::SentinelReadError("Error deserializing variant TFileSystemGetFilesParams of union FileSystemParams");
726
0
                return false;
727
0
            }
728
0
            return true;
729
0
        }
730
0
    case union__::TFileSystemGetFileOrDirectoryParams:
731
0
        {
732
0
            mozilla::dom::FileSystemGetFileOrDirectoryParams tmp = mozilla::dom::FileSystemGetFileOrDirectoryParams();
733
0
            (*(aVar)) = tmp;
734
0
            if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_FileSystemGetFileOrDirectoryParams())))))) {
735
0
                (aActor)->FatalError("Error deserializing variant TFileSystemGetFileOrDirectoryParams of union FileSystemParams");
736
0
                return false;
737
0
            }
738
0
            // Sentinel = 'TFileSystemGetFileOrDirectoryParams'
739
0
            if ((!((aMsg)->ReadSentinel(aIter, 411751270)))) {
740
0
                mozilla::ipc::SentinelReadError("Error deserializing variant TFileSystemGetFileOrDirectoryParams of union FileSystemParams");
741
0
                return false;
742
0
            }
743
0
            return true;
744
0
        }
745
0
    default:
746
0
        {
747
0
            (aActor)->FatalError("unknown union type");
748
0
            return false;
749
0
        }
750
0
    }
751
0
}
752
753
} // namespace ipc
754
} // namespace mozilla