Line data Source code
1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 :
7 : #include "mozilla/dom/indexedDB/PBackgroundIDBFactory.h"
8 :
9 : namespace mozilla {
10 : namespace dom {
11 : namespace indexedDB {
12 : namespace PBackgroundIDBFactory {
13 :
14 : nsresult
15 0 : CreateEndpoints(
16 : base::ProcessId aParentDestPid,
17 : base::ProcessId aChildDestPid,
18 : mozilla::ipc::Endpoint<mozilla::dom::indexedDB::PBackgroundIDBFactoryParent>* aParent,
19 : mozilla::ipc::Endpoint<mozilla::dom::indexedDB::PBackgroundIDBFactoryChild>* aChild)
20 : {
21 0 : return mozilla::ipc::CreateEndpoints(mozilla::ipc::PrivateIPDLInterface(), aParentDestPid, aChildDestPid, PBackgroundIDBFactoryMsgStart, PBackgroundIDBFactoryMsgStartChild, aParent, aChild);
22 : }
23 : void
24 0 : Transition(
25 : MessageType msg,
26 : State* next)
27 : {
28 0 : switch ((*(next))) {
29 : case __Null:
30 0 : if ((Msg___delete____ID) == (msg)) {
31 0 : (*(next)) = __Dead;
32 : }
33 0 : break;
34 : case __Dead:
35 0 : mozilla::ipc::LogicError("__delete__()d actor");
36 0 : break;
37 : default:
38 0 : mozilla::ipc::LogicError("corrupted actor state");
39 0 : break;
40 : }
41 0 : }
42 : IPC::Message*
43 0 : Msg_DeleteMe(int32_t routingId)
44 : {
45 0 : return new IPC::Message(routingId, Msg_DeleteMe__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PBackgroundIDBFactory::Msg_DeleteMe", true);
46 : }
47 : IPC::Message*
48 0 : Msg_PBackgroundIDBFactoryRequestConstructor(int32_t routingId)
49 : {
50 0 : return new IPC::Message(routingId, Msg_PBackgroundIDBFactoryRequestConstructor__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PBackgroundIDBFactory::Msg_PBackgroundIDBFactoryRequestConstructor", true);
51 : }
52 : IPC::Message*
53 0 : Reply_PBackgroundIDBFactoryRequestConstructor(int32_t routingId)
54 : {
55 0 : return new IPC::Message(routingId, Reply_PBackgroundIDBFactoryRequestConstructor__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PBackgroundIDBFactory::Reply_PBackgroundIDBFactoryRequestConstructor", true);
56 : }
57 : IPC::Message*
58 0 : Msg_IncrementLoggingRequestSerialNumber(int32_t routingId)
59 : {
60 0 : return new IPC::Message(routingId, Msg_IncrementLoggingRequestSerialNumber__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PBackgroundIDBFactory::Msg_IncrementLoggingRequestSerialNumber", true);
61 : }
62 : IPC::Message*
63 0 : Msg___delete__(int32_t routingId)
64 : {
65 0 : return new IPC::Message(routingId, Msg___delete____ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PBackgroundIDBFactory::Msg___delete__", true);
66 : }
67 : IPC::Message*
68 0 : Reply___delete__(int32_t routingId)
69 : {
70 0 : return new IPC::Message(routingId, Reply___delete____ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PBackgroundIDBFactory::Reply___delete__", true);
71 : }
72 : IPC::Message*
73 0 : Msg_PBackgroundIDBDatabaseConstructor(int32_t routingId)
74 : {
75 0 : return new IPC::Message(routingId, Msg_PBackgroundIDBDatabaseConstructor__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PBackgroundIDBFactory::Msg_PBackgroundIDBDatabaseConstructor", true);
76 : }
77 : IPC::Message*
78 0 : Reply_PBackgroundIDBDatabaseConstructor(int32_t routingId)
79 : {
80 0 : return new IPC::Message(routingId, Reply_PBackgroundIDBDatabaseConstructor__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PBackgroundIDBFactory::Reply_PBackgroundIDBDatabaseConstructor", true);
81 : }
82 :
83 : } // namespace PBackgroundIDBFactory
84 : } // namespace indexedDB
85 : } // namespace dom
86 : } // namespace mozilla
87 :
88 : //-----------------------------------------------------------------------------
89 : // Method definitions for the IPDL type |struct CommonFactoryRequestParams|
90 : //
91 : namespace mozilla {
92 : namespace dom {
93 : namespace indexedDB {
94 0 : MOZ_IMPLICIT CommonFactoryRequestParams::CommonFactoryRequestParams() :
95 0 : privateBrowsingMode_()
96 : {
97 0 : Init();
98 0 : }
99 :
100 0 : CommonFactoryRequestParams::~CommonFactoryRequestParams()
101 : {
102 0 : }
103 :
104 0 : auto CommonFactoryRequestParams::operator==(const CommonFactoryRequestParams& _o) const -> bool
105 : {
106 0 : if ((!((metadata()) == ((_o).metadata())))) {
107 0 : return false;
108 : }
109 0 : if ((!((principalInfo()) == ((_o).principalInfo())))) {
110 0 : return false;
111 : }
112 0 : if ((!((privateBrowsingMode()) == ((_o).privateBrowsingMode())))) {
113 0 : return false;
114 : }
115 0 : return true;
116 : }
117 :
118 0 : auto CommonFactoryRequestParams::operator!=(const CommonFactoryRequestParams& _o) const -> bool
119 : {
120 0 : return (!(operator==(_o)));
121 : }
122 :
123 0 : auto CommonFactoryRequestParams::Init() -> void
124 : {
125 0 : }
126 :
127 0 : auto CommonFactoryRequestParams::Assign(
128 : const DatabaseMetadata& _metadata,
129 : const PrincipalInfo& _principalInfo,
130 : const bool& _privateBrowsingMode) -> void
131 : {
132 0 : metadata_ = _metadata;
133 0 : principalInfo_ = _principalInfo;
134 0 : privateBrowsingMode_ = _privateBrowsingMode;
135 0 : }
136 :
137 : } // namespace indexedDB
138 : } // namespace dom
139 : } // namespace mozilla
140 :
141 : //-----------------------------------------------------------------------------
142 : // Method definitions for the IPDL type |struct OpenDatabaseRequestParams|
143 : //
144 : namespace mozilla {
145 : namespace dom {
146 : namespace indexedDB {
147 0 : MOZ_IMPLICIT OpenDatabaseRequestParams::OpenDatabaseRequestParams()
148 : {
149 0 : Init();
150 0 : }
151 :
152 0 : OpenDatabaseRequestParams::~OpenDatabaseRequestParams()
153 : {
154 0 : }
155 :
156 0 : auto OpenDatabaseRequestParams::operator==(const OpenDatabaseRequestParams& _o) const -> bool
157 : {
158 0 : if ((!((commonParams()) == ((_o).commonParams())))) {
159 0 : return false;
160 : }
161 0 : return true;
162 : }
163 :
164 0 : auto OpenDatabaseRequestParams::operator!=(const OpenDatabaseRequestParams& _o) const -> bool
165 : {
166 0 : return (!(operator==(_o)));
167 : }
168 :
169 0 : auto OpenDatabaseRequestParams::Init() -> void
170 : {
171 0 : }
172 :
173 0 : auto OpenDatabaseRequestParams::Assign(const CommonFactoryRequestParams& _commonParams) -> void
174 : {
175 0 : commonParams_ = _commonParams;
176 0 : }
177 :
178 : } // namespace indexedDB
179 : } // namespace dom
180 : } // namespace mozilla
181 :
182 : //-----------------------------------------------------------------------------
183 : // Method definitions for the IPDL type |struct DeleteDatabaseRequestParams|
184 : //
185 : namespace mozilla {
186 : namespace dom {
187 : namespace indexedDB {
188 0 : MOZ_IMPLICIT DeleteDatabaseRequestParams::DeleteDatabaseRequestParams()
189 : {
190 0 : Init();
191 0 : }
192 :
193 0 : DeleteDatabaseRequestParams::~DeleteDatabaseRequestParams()
194 : {
195 0 : }
196 :
197 0 : auto DeleteDatabaseRequestParams::operator==(const DeleteDatabaseRequestParams& _o) const -> bool
198 : {
199 0 : if ((!((commonParams()) == ((_o).commonParams())))) {
200 0 : return false;
201 : }
202 0 : return true;
203 : }
204 :
205 0 : auto DeleteDatabaseRequestParams::operator!=(const DeleteDatabaseRequestParams& _o) const -> bool
206 : {
207 0 : return (!(operator==(_o)));
208 : }
209 :
210 0 : auto DeleteDatabaseRequestParams::Init() -> void
211 : {
212 0 : }
213 :
214 0 : auto DeleteDatabaseRequestParams::Assign(const CommonFactoryRequestParams& _commonParams) -> void
215 : {
216 0 : commonParams_ = _commonParams;
217 0 : }
218 :
219 : } // namespace indexedDB
220 : } // namespace dom
221 : } // namespace mozilla
222 :
223 : //-----------------------------------------------------------------------------
224 : // Method definitions for the IPDL type |union FactoryRequestParams|
225 : //
226 : namespace mozilla {
227 : namespace dom {
228 : namespace indexedDB {
229 0 : auto FactoryRequestParams::MaybeDestroy(Type aNewType) -> bool
230 : {
231 0 : if ((mType) == (T__None)) {
232 0 : return true;
233 : }
234 0 : if ((mType) == (aNewType)) {
235 0 : return false;
236 : }
237 0 : switch (mType) {
238 : case TOpenDatabaseRequestParams:
239 : {
240 0 : (ptr_OpenDatabaseRequestParams())->~OpenDatabaseRequestParams__tdef();
241 0 : break;
242 : }
243 : case TDeleteDatabaseRequestParams:
244 : {
245 0 : (ptr_DeleteDatabaseRequestParams())->~DeleteDatabaseRequestParams__tdef();
246 0 : break;
247 : }
248 : default:
249 : {
250 0 : mozilla::ipc::LogicError("not reached");
251 0 : break;
252 : }
253 : }
254 0 : return true;
255 : }
256 :
257 0 : MOZ_IMPLICIT FactoryRequestParams::FactoryRequestParams(const OpenDatabaseRequestParams& aOther)
258 : {
259 0 : new (mozilla::KnownNotNull, ptr_OpenDatabaseRequestParams()) OpenDatabaseRequestParams(aOther);
260 0 : mType = TOpenDatabaseRequestParams;
261 0 : }
262 :
263 0 : MOZ_IMPLICIT FactoryRequestParams::FactoryRequestParams(const DeleteDatabaseRequestParams& aOther)
264 : {
265 0 : new (mozilla::KnownNotNull, ptr_DeleteDatabaseRequestParams()) DeleteDatabaseRequestParams(aOther);
266 0 : mType = TDeleteDatabaseRequestParams;
267 0 : }
268 :
269 0 : MOZ_IMPLICIT FactoryRequestParams::FactoryRequestParams(const FactoryRequestParams& aOther)
270 : {
271 0 : (aOther).AssertSanity();
272 0 : switch ((aOther).type()) {
273 : case TOpenDatabaseRequestParams:
274 : {
275 0 : new (mozilla::KnownNotNull, ptr_OpenDatabaseRequestParams()) OpenDatabaseRequestParams((aOther).get_OpenDatabaseRequestParams());
276 0 : break;
277 : }
278 : case TDeleteDatabaseRequestParams:
279 : {
280 0 : new (mozilla::KnownNotNull, ptr_DeleteDatabaseRequestParams()) DeleteDatabaseRequestParams((aOther).get_DeleteDatabaseRequestParams());
281 0 : break;
282 : }
283 : case T__None:
284 : {
285 0 : break;
286 : }
287 : default:
288 : {
289 0 : mozilla::ipc::LogicError("unreached");
290 0 : return;
291 : }
292 : }
293 0 : mType = (aOther).type();
294 : }
295 :
296 0 : FactoryRequestParams::~FactoryRequestParams()
297 : {
298 0 : static_cast<void>(MaybeDestroy(T__None));
299 0 : }
300 :
301 0 : auto FactoryRequestParams::operator=(const OpenDatabaseRequestParams& aRhs) -> FactoryRequestParams&
302 : {
303 0 : if (MaybeDestroy(TOpenDatabaseRequestParams)) {
304 0 : new (mozilla::KnownNotNull, ptr_OpenDatabaseRequestParams()) OpenDatabaseRequestParams;
305 : }
306 0 : (*(ptr_OpenDatabaseRequestParams())) = aRhs;
307 0 : mType = TOpenDatabaseRequestParams;
308 0 : return (*(this));
309 : }
310 :
311 0 : auto FactoryRequestParams::operator=(const DeleteDatabaseRequestParams& aRhs) -> FactoryRequestParams&
312 : {
313 0 : if (MaybeDestroy(TDeleteDatabaseRequestParams)) {
314 0 : new (mozilla::KnownNotNull, ptr_DeleteDatabaseRequestParams()) DeleteDatabaseRequestParams;
315 : }
316 0 : (*(ptr_DeleteDatabaseRequestParams())) = aRhs;
317 0 : mType = TDeleteDatabaseRequestParams;
318 0 : return (*(this));
319 : }
320 :
321 0 : auto FactoryRequestParams::operator=(const FactoryRequestParams& aRhs) -> FactoryRequestParams&
322 : {
323 0 : (aRhs).AssertSanity();
324 0 : Type t = (aRhs).type();
325 0 : switch (t) {
326 : case TOpenDatabaseRequestParams:
327 : {
328 0 : if (MaybeDestroy(t)) {
329 0 : new (mozilla::KnownNotNull, ptr_OpenDatabaseRequestParams()) OpenDatabaseRequestParams;
330 : }
331 0 : (*(ptr_OpenDatabaseRequestParams())) = (aRhs).get_OpenDatabaseRequestParams();
332 0 : break;
333 : }
334 : case TDeleteDatabaseRequestParams:
335 : {
336 0 : if (MaybeDestroy(t)) {
337 0 : new (mozilla::KnownNotNull, ptr_DeleteDatabaseRequestParams()) DeleteDatabaseRequestParams;
338 : }
339 0 : (*(ptr_DeleteDatabaseRequestParams())) = (aRhs).get_DeleteDatabaseRequestParams();
340 0 : break;
341 : }
342 : case T__None:
343 : {
344 0 : static_cast<void>(MaybeDestroy(t));
345 0 : break;
346 : }
347 : default:
348 : {
349 0 : mozilla::ipc::LogicError("unreached");
350 0 : break;
351 : }
352 : }
353 0 : mType = t;
354 0 : return (*(this));
355 : }
356 :
357 0 : auto FactoryRequestParams::operator==(const OpenDatabaseRequestParams& aRhs) const -> bool
358 : {
359 0 : return (get_OpenDatabaseRequestParams()) == (aRhs);
360 : }
361 :
362 0 : auto FactoryRequestParams::operator==(const DeleteDatabaseRequestParams& aRhs) const -> bool
363 : {
364 0 : return (get_DeleteDatabaseRequestParams()) == (aRhs);
365 : }
366 :
367 0 : auto FactoryRequestParams::operator==(const FactoryRequestParams& aRhs) const -> bool
368 : {
369 0 : if ((type()) != ((aRhs).type())) {
370 0 : return false;
371 : }
372 :
373 0 : switch (type()) {
374 : case TOpenDatabaseRequestParams:
375 : {
376 0 : return (get_OpenDatabaseRequestParams()) == ((aRhs).get_OpenDatabaseRequestParams());
377 : }
378 : case TDeleteDatabaseRequestParams:
379 : {
380 0 : return (get_DeleteDatabaseRequestParams()) == ((aRhs).get_DeleteDatabaseRequestParams());
381 : }
382 : default:
383 : {
384 0 : mozilla::ipc::LogicError("unreached");
385 0 : return false;
386 : }
387 : }
388 : }
389 :
390 0 : auto FactoryRequestParams::get(OpenDatabaseRequestParams* aOutValue) const -> void
391 : {
392 0 : (*(aOutValue)) = get_OpenDatabaseRequestParams();
393 0 : }
394 :
395 0 : auto FactoryRequestParams::get(DeleteDatabaseRequestParams* aOutValue) const -> void
396 : {
397 0 : (*(aOutValue)) = get_DeleteDatabaseRequestParams();
398 0 : }
399 :
400 : } // namespace indexedDB
401 : } // namespace dom
402 : } // namespace mozilla
|