Line data Source code
1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 :
7 : #include "mozilla/dom/indexedDB/PBackgroundIDBDatabaseRequest.h"
8 :
9 : namespace mozilla {
10 : namespace dom {
11 : namespace indexedDB {
12 : namespace PBackgroundIDBDatabaseRequest {
13 :
14 : nsresult
15 0 : CreateEndpoints(
16 : base::ProcessId aParentDestPid,
17 : base::ProcessId aChildDestPid,
18 : mozilla::ipc::Endpoint<mozilla::dom::indexedDB::PBackgroundIDBDatabaseRequestParent>* aParent,
19 : mozilla::ipc::Endpoint<mozilla::dom::indexedDB::PBackgroundIDBDatabaseRequestChild>* aChild)
20 : {
21 0 : return mozilla::ipc::CreateEndpoints(mozilla::ipc::PrivateIPDLInterface(), aParentDestPid, aChildDestPid, PBackgroundIDBDatabaseRequestMsgStart, PBackgroundIDBDatabaseRequestMsgStartChild, 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___delete__(int32_t routingId)
44 : {
45 0 : return new IPC::Message(routingId, Msg___delete____ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PBackgroundIDBDatabaseRequest::Msg___delete__", true);
46 : }
47 : IPC::Message*
48 0 : Reply___delete__(int32_t routingId)
49 : {
50 0 : return new IPC::Message(routingId, Reply___delete____ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PBackgroundIDBDatabaseRequest::Reply___delete__", true);
51 : }
52 :
53 : } // namespace PBackgroundIDBDatabaseRequest
54 : } // namespace indexedDB
55 : } // namespace dom
56 : } // namespace mozilla
57 :
58 : //-----------------------------------------------------------------------------
59 : // Method definitions for the IPDL type |struct CreateFileRequestResponse|
60 : //
61 : namespace mozilla {
62 : namespace dom {
63 : namespace indexedDB {
64 0 : MOZ_IMPLICIT CreateFileRequestResponse::CreateFileRequestResponse()
65 : {
66 0 : Init();
67 0 : }
68 :
69 0 : CreateFileRequestResponse::~CreateFileRequestResponse()
70 : {
71 0 : }
72 :
73 0 : auto CreateFileRequestResponse::operator==(const CreateFileRequestResponse& _o) const -> bool
74 : {
75 0 : if ((!((mutableFileParent()) == ((_o).mutableFileParent())))) {
76 0 : return false;
77 : }
78 0 : if ((!((mutableFileChild()) == ((_o).mutableFileChild())))) {
79 0 : return false;
80 : }
81 0 : return true;
82 : }
83 :
84 0 : auto CreateFileRequestResponse::operator!=(const CreateFileRequestResponse& _o) const -> bool
85 : {
86 0 : return (!(operator==(_o)));
87 : }
88 :
89 0 : auto CreateFileRequestResponse::Init() -> void
90 : {
91 0 : mutableFileParent_ = nullptr;
92 0 : mutableFileChild_ = nullptr;
93 0 : }
94 :
95 0 : auto CreateFileRequestResponse::Assign(
96 : PBackgroundMutableFileParent* _mutableFileParent,
97 : PBackgroundMutableFileChild* _mutableFileChild) -> void
98 : {
99 0 : mutableFileParent_ = _mutableFileParent;
100 0 : mutableFileChild_ = _mutableFileChild;
101 0 : }
102 :
103 : } // namespace indexedDB
104 : } // namespace dom
105 : } // namespace mozilla
106 :
107 : //-----------------------------------------------------------------------------
108 : // Method definitions for the IPDL type |union DatabaseRequestResponse|
109 : //
110 : namespace mozilla {
111 : namespace dom {
112 : namespace indexedDB {
113 0 : auto DatabaseRequestResponse::MaybeDestroy(Type aNewType) -> bool
114 : {
115 0 : if ((mType) == (T__None)) {
116 0 : return true;
117 : }
118 0 : if ((mType) == (aNewType)) {
119 0 : return false;
120 : }
121 0 : switch (mType) {
122 : case Tnsresult:
123 : {
124 0 : (ptr_nsresult())->~nsresult__tdef();
125 0 : break;
126 : }
127 : case TCreateFileRequestResponse:
128 : {
129 0 : (ptr_CreateFileRequestResponse())->~CreateFileRequestResponse__tdef();
130 0 : break;
131 : }
132 : default:
133 : {
134 0 : mozilla::ipc::LogicError("not reached");
135 0 : break;
136 : }
137 : }
138 0 : return true;
139 : }
140 :
141 0 : MOZ_IMPLICIT DatabaseRequestResponse::DatabaseRequestResponse(const nsresult& aOther)
142 : {
143 0 : new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(aOther);
144 0 : mType = Tnsresult;
145 0 : }
146 :
147 0 : MOZ_IMPLICIT DatabaseRequestResponse::DatabaseRequestResponse(const CreateFileRequestResponse& aOther)
148 : {
149 0 : new (mozilla::KnownNotNull, ptr_CreateFileRequestResponse()) CreateFileRequestResponse(aOther);
150 0 : mType = TCreateFileRequestResponse;
151 0 : }
152 :
153 0 : MOZ_IMPLICIT DatabaseRequestResponse::DatabaseRequestResponse(const DatabaseRequestResponse& aOther)
154 : {
155 0 : (aOther).AssertSanity();
156 0 : switch ((aOther).type()) {
157 : case Tnsresult:
158 : {
159 0 : new (mozilla::KnownNotNull, ptr_nsresult()) nsresult((aOther).get_nsresult());
160 0 : break;
161 : }
162 : case TCreateFileRequestResponse:
163 : {
164 0 : new (mozilla::KnownNotNull, ptr_CreateFileRequestResponse()) CreateFileRequestResponse((aOther).get_CreateFileRequestResponse());
165 0 : break;
166 : }
167 : case T__None:
168 : {
169 0 : break;
170 : }
171 : default:
172 : {
173 0 : mozilla::ipc::LogicError("unreached");
174 0 : return;
175 : }
176 : }
177 0 : mType = (aOther).type();
178 : }
179 :
180 0 : DatabaseRequestResponse::~DatabaseRequestResponse()
181 : {
182 0 : static_cast<void>(MaybeDestroy(T__None));
183 0 : }
184 :
185 0 : auto DatabaseRequestResponse::operator=(const nsresult& aRhs) -> DatabaseRequestResponse&
186 : {
187 0 : if (MaybeDestroy(Tnsresult)) {
188 0 : new (mozilla::KnownNotNull, ptr_nsresult()) nsresult;
189 : }
190 0 : (*(ptr_nsresult())) = aRhs;
191 0 : mType = Tnsresult;
192 0 : return (*(this));
193 : }
194 :
195 0 : auto DatabaseRequestResponse::operator=(const CreateFileRequestResponse& aRhs) -> DatabaseRequestResponse&
196 : {
197 0 : if (MaybeDestroy(TCreateFileRequestResponse)) {
198 0 : new (mozilla::KnownNotNull, ptr_CreateFileRequestResponse()) CreateFileRequestResponse;
199 : }
200 0 : (*(ptr_CreateFileRequestResponse())) = aRhs;
201 0 : mType = TCreateFileRequestResponse;
202 0 : return (*(this));
203 : }
204 :
205 0 : auto DatabaseRequestResponse::operator=(const DatabaseRequestResponse& aRhs) -> DatabaseRequestResponse&
206 : {
207 0 : (aRhs).AssertSanity();
208 0 : Type t = (aRhs).type();
209 0 : switch (t) {
210 : case Tnsresult:
211 : {
212 0 : if (MaybeDestroy(t)) {
213 0 : new (mozilla::KnownNotNull, ptr_nsresult()) nsresult;
214 : }
215 0 : (*(ptr_nsresult())) = (aRhs).get_nsresult();
216 0 : break;
217 : }
218 : case TCreateFileRequestResponse:
219 : {
220 0 : if (MaybeDestroy(t)) {
221 0 : new (mozilla::KnownNotNull, ptr_CreateFileRequestResponse()) CreateFileRequestResponse;
222 : }
223 0 : (*(ptr_CreateFileRequestResponse())) = (aRhs).get_CreateFileRequestResponse();
224 0 : break;
225 : }
226 : case T__None:
227 : {
228 0 : static_cast<void>(MaybeDestroy(t));
229 0 : break;
230 : }
231 : default:
232 : {
233 0 : mozilla::ipc::LogicError("unreached");
234 0 : break;
235 : }
236 : }
237 0 : mType = t;
238 0 : return (*(this));
239 : }
240 :
241 0 : auto DatabaseRequestResponse::operator==(const nsresult& aRhs) const -> bool
242 : {
243 0 : return (get_nsresult()) == (aRhs);
244 : }
245 :
246 0 : auto DatabaseRequestResponse::operator==(const CreateFileRequestResponse& aRhs) const -> bool
247 : {
248 0 : return (get_CreateFileRequestResponse()) == (aRhs);
249 : }
250 :
251 0 : auto DatabaseRequestResponse::operator==(const DatabaseRequestResponse& aRhs) const -> bool
252 : {
253 0 : if ((type()) != ((aRhs).type())) {
254 0 : return false;
255 : }
256 :
257 0 : switch (type()) {
258 : case Tnsresult:
259 : {
260 0 : return (get_nsresult()) == ((aRhs).get_nsresult());
261 : }
262 : case TCreateFileRequestResponse:
263 : {
264 0 : return (get_CreateFileRequestResponse()) == ((aRhs).get_CreateFileRequestResponse());
265 : }
266 : default:
267 : {
268 0 : mozilla::ipc::LogicError("unreached");
269 0 : return false;
270 : }
271 : }
272 : }
273 :
274 0 : auto DatabaseRequestResponse::get(nsresult* aOutValue) const -> void
275 : {
276 0 : (*(aOutValue)) = get_nsresult();
277 0 : }
278 :
279 0 : auto DatabaseRequestResponse::get(CreateFileRequestResponse* aOutValue) const -> void
280 : {
281 0 : (*(aOutValue)) = get_CreateFileRequestResponse();
282 0 : }
283 :
284 : } // namespace indexedDB
285 : } // namespace dom
286 : } // namespace mozilla
|