Line data Source code
1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 :
7 : #include "mozilla/ipc/PPendingIPCBlob.h"
8 :
9 : namespace mozilla {
10 : namespace ipc {
11 : namespace PPendingIPCBlob {
12 :
13 : nsresult
14 0 : CreateEndpoints(
15 : base::ProcessId aParentDestPid,
16 : base::ProcessId aChildDestPid,
17 : mozilla::ipc::Endpoint<mozilla::ipc::PPendingIPCBlobParent>* aParent,
18 : mozilla::ipc::Endpoint<mozilla::ipc::PPendingIPCBlobChild>* aChild)
19 : {
20 0 : return mozilla::ipc::CreateEndpoints(mozilla::ipc::PrivateIPDLInterface(), aParentDestPid, aChildDestPid, PPendingIPCBlobMsgStart, PPendingIPCBlobMsgStartChild, aParent, aChild);
21 : }
22 : void
23 0 : Transition(
24 : MessageType msg,
25 : State* next)
26 : {
27 0 : switch ((*(next))) {
28 : case __Null:
29 0 : if ((Msg___delete____ID) == (msg)) {
30 0 : (*(next)) = __Dead;
31 : }
32 0 : break;
33 : case __Dead:
34 0 : mozilla::ipc::LogicError("__delete__()d actor");
35 0 : break;
36 : default:
37 0 : mozilla::ipc::LogicError("corrupted actor state");
38 0 : break;
39 : }
40 0 : }
41 : IPC::Message*
42 0 : Msg___delete__(int32_t routingId)
43 : {
44 0 : return new IPC::Message(routingId, Msg___delete____ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PPendingIPCBlob::Msg___delete__", true);
45 : }
46 : IPC::Message*
47 0 : Reply___delete__(int32_t routingId)
48 : {
49 0 : return new IPC::Message(routingId, Reply___delete____ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PPendingIPCBlob::Reply___delete__", true);
50 : }
51 :
52 : } // namespace PPendingIPCBlob
53 : } // namespace ipc
54 : } // namespace mozilla
55 :
56 : //-----------------------------------------------------------------------------
57 : // Method definitions for the IPDL type |struct PendingIPCFileData|
58 : //
59 : namespace mozilla {
60 : namespace ipc {
61 0 : MOZ_IMPLICIT PendingIPCFileData::PendingIPCFileData() :
62 : name_(),
63 0 : lastModified_()
64 : {
65 0 : Init();
66 0 : }
67 :
68 0 : PendingIPCFileData::~PendingIPCFileData()
69 : {
70 0 : }
71 :
72 0 : auto PendingIPCFileData::operator==(const PendingIPCFileData& _o) const -> bool
73 : {
74 0 : if ((!((name()) == ((_o).name())))) {
75 0 : return false;
76 : }
77 0 : if ((!((lastModified()) == ((_o).lastModified())))) {
78 0 : return false;
79 : }
80 0 : return true;
81 : }
82 :
83 0 : auto PendingIPCFileData::operator!=(const PendingIPCFileData& _o) const -> bool
84 : {
85 0 : return (!(operator==(_o)));
86 : }
87 :
88 0 : auto PendingIPCFileData::Init() -> void
89 : {
90 0 : }
91 :
92 0 : auto PendingIPCFileData::Assign(
93 : const nsString& _name,
94 : const int64_t& _lastModified) -> void
95 : {
96 0 : name_ = _name;
97 0 : lastModified_ = _lastModified;
98 0 : }
99 :
100 : } // namespace ipc
101 : } // namespace mozilla
102 :
103 : //-----------------------------------------------------------------------------
104 : // Method definitions for the IPDL type |union PendingIPCFileUnion|
105 : //
106 : namespace mozilla {
107 : namespace ipc {
108 0 : auto PendingIPCFileUnion::MaybeDestroy(Type aNewType) -> bool
109 : {
110 0 : if ((mType) == (T__None)) {
111 0 : return true;
112 : }
113 0 : if ((mType) == (aNewType)) {
114 0 : return false;
115 : }
116 0 : switch (mType) {
117 : case Tvoid_t:
118 : {
119 0 : (ptr_void_t())->~void_t__tdef();
120 0 : break;
121 : }
122 : case TPendingIPCFileData:
123 : {
124 0 : (ptr_PendingIPCFileData())->~PendingIPCFileData__tdef();
125 0 : break;
126 : }
127 : default:
128 : {
129 0 : mozilla::ipc::LogicError("not reached");
130 0 : break;
131 : }
132 : }
133 0 : return true;
134 : }
135 :
136 0 : MOZ_IMPLICIT PendingIPCFileUnion::PendingIPCFileUnion(const void_t& aOther)
137 : {
138 0 : new (mozilla::KnownNotNull, ptr_void_t()) void_t(aOther);
139 0 : mType = Tvoid_t;
140 0 : }
141 :
142 0 : MOZ_IMPLICIT PendingIPCFileUnion::PendingIPCFileUnion(const PendingIPCFileData& aOther)
143 : {
144 0 : new (mozilla::KnownNotNull, ptr_PendingIPCFileData()) PendingIPCFileData(aOther);
145 0 : mType = TPendingIPCFileData;
146 0 : }
147 :
148 0 : MOZ_IMPLICIT PendingIPCFileUnion::PendingIPCFileUnion(const PendingIPCFileUnion& aOther)
149 : {
150 0 : (aOther).AssertSanity();
151 0 : switch ((aOther).type()) {
152 : case Tvoid_t:
153 : {
154 0 : new (mozilla::KnownNotNull, ptr_void_t()) void_t((aOther).get_void_t());
155 0 : break;
156 : }
157 : case TPendingIPCFileData:
158 : {
159 0 : new (mozilla::KnownNotNull, ptr_PendingIPCFileData()) PendingIPCFileData((aOther).get_PendingIPCFileData());
160 0 : break;
161 : }
162 : case T__None:
163 : {
164 0 : break;
165 : }
166 : default:
167 : {
168 0 : mozilla::ipc::LogicError("unreached");
169 0 : return;
170 : }
171 : }
172 0 : mType = (aOther).type();
173 : }
174 :
175 0 : PendingIPCFileUnion::~PendingIPCFileUnion()
176 : {
177 0 : static_cast<void>(MaybeDestroy(T__None));
178 0 : }
179 :
180 0 : auto PendingIPCFileUnion::operator=(const void_t& aRhs) -> PendingIPCFileUnion&
181 : {
182 0 : if (MaybeDestroy(Tvoid_t)) {
183 0 : new (mozilla::KnownNotNull, ptr_void_t()) void_t;
184 : }
185 0 : (*(ptr_void_t())) = aRhs;
186 0 : mType = Tvoid_t;
187 0 : return (*(this));
188 : }
189 :
190 0 : auto PendingIPCFileUnion::operator=(const PendingIPCFileData& aRhs) -> PendingIPCFileUnion&
191 : {
192 0 : if (MaybeDestroy(TPendingIPCFileData)) {
193 0 : new (mozilla::KnownNotNull, ptr_PendingIPCFileData()) PendingIPCFileData;
194 : }
195 0 : (*(ptr_PendingIPCFileData())) = aRhs;
196 0 : mType = TPendingIPCFileData;
197 0 : return (*(this));
198 : }
199 :
200 0 : auto PendingIPCFileUnion::operator=(const PendingIPCFileUnion& aRhs) -> PendingIPCFileUnion&
201 : {
202 0 : (aRhs).AssertSanity();
203 0 : Type t = (aRhs).type();
204 0 : switch (t) {
205 : case Tvoid_t:
206 : {
207 0 : if (MaybeDestroy(t)) {
208 0 : new (mozilla::KnownNotNull, ptr_void_t()) void_t;
209 : }
210 0 : (*(ptr_void_t())) = (aRhs).get_void_t();
211 0 : break;
212 : }
213 : case TPendingIPCFileData:
214 : {
215 0 : if (MaybeDestroy(t)) {
216 0 : new (mozilla::KnownNotNull, ptr_PendingIPCFileData()) PendingIPCFileData;
217 : }
218 0 : (*(ptr_PendingIPCFileData())) = (aRhs).get_PendingIPCFileData();
219 0 : break;
220 : }
221 : case T__None:
222 : {
223 0 : static_cast<void>(MaybeDestroy(t));
224 0 : break;
225 : }
226 : default:
227 : {
228 0 : mozilla::ipc::LogicError("unreached");
229 0 : break;
230 : }
231 : }
232 0 : mType = t;
233 0 : return (*(this));
234 : }
235 :
236 0 : auto PendingIPCFileUnion::operator==(const void_t& aRhs) const -> bool
237 : {
238 0 : return (get_void_t()) == (aRhs);
239 : }
240 :
241 0 : auto PendingIPCFileUnion::operator==(const PendingIPCFileData& aRhs) const -> bool
242 : {
243 0 : return (get_PendingIPCFileData()) == (aRhs);
244 : }
245 :
246 0 : auto PendingIPCFileUnion::operator==(const PendingIPCFileUnion& aRhs) const -> bool
247 : {
248 0 : if ((type()) != ((aRhs).type())) {
249 0 : return false;
250 : }
251 :
252 0 : switch (type()) {
253 : case Tvoid_t:
254 : {
255 0 : return (get_void_t()) == ((aRhs).get_void_t());
256 : }
257 : case TPendingIPCFileData:
258 : {
259 0 : return (get_PendingIPCFileData()) == ((aRhs).get_PendingIPCFileData());
260 : }
261 : default:
262 : {
263 0 : mozilla::ipc::LogicError("unreached");
264 0 : return false;
265 : }
266 : }
267 : }
268 :
269 0 : auto PendingIPCFileUnion::get(void_t* aOutValue) const -> void
270 : {
271 0 : (*(aOutValue)) = get_void_t();
272 0 : }
273 :
274 0 : auto PendingIPCFileUnion::get(PendingIPCFileData* aOutValue) const -> void
275 : {
276 0 : (*(aOutValue)) = get_PendingIPCFileData();
277 0 : }
278 :
279 : } // namespace ipc
280 : } // namespace mozilla
281 :
282 : //-----------------------------------------------------------------------------
283 : // Method definitions for the IPDL type |struct PendingIPCBlobData|
284 : //
285 : namespace mozilla {
286 : namespace ipc {
287 0 : MOZ_IMPLICIT PendingIPCBlobData::PendingIPCBlobData() :
288 : type_(),
289 0 : size_()
290 : {
291 0 : Init();
292 0 : }
293 :
294 0 : PendingIPCBlobData::~PendingIPCBlobData()
295 : {
296 0 : }
297 :
298 0 : auto PendingIPCBlobData::operator==(const PendingIPCBlobData& _o) const -> bool
299 : {
300 0 : if ((!((type()) == ((_o).type())))) {
301 0 : return false;
302 : }
303 0 : if ((!((size()) == ((_o).size())))) {
304 0 : return false;
305 : }
306 0 : if ((!((file()) == ((_o).file())))) {
307 0 : return false;
308 : }
309 0 : return true;
310 : }
311 :
312 0 : auto PendingIPCBlobData::operator!=(const PendingIPCBlobData& _o) const -> bool
313 : {
314 0 : return (!(operator==(_o)));
315 : }
316 :
317 0 : auto PendingIPCBlobData::Init() -> void
318 : {
319 0 : }
320 :
321 0 : auto PendingIPCBlobData::Assign(
322 : const nsString& _type,
323 : const uint64_t& _size,
324 : const PendingIPCFileUnion& _file) -> void
325 : {
326 0 : type_ = _type;
327 0 : size_ = _size;
328 0 : file_ = _file;
329 0 : }
330 :
331 : } // namespace ipc
332 : } // namespace mozilla
|