1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 : #ifndef PCrashReporter_h
7 : #define PCrashReporter_h
8 :
9 : #include "mozilla/Attributes.h"
10 : #include "base/basictypes.h"
11 : #include "prtime.h"
12 : #include "nscore.h"
13 : #include "IPCMessageStart.h"
14 : #include "IPC/IPCMessageUtils.h"
15 : #include "nsAutoPtr.h"
16 : #include "nsStringGlue.h"
17 : #include "nsTArray.h"
18 : #include "nsIFile.h"
19 : #include "mozilla/ipc/ProtocolUtils.h"
20 :
21 :
22 : //-----------------------------------------------------------------------------
23 : // Declaration of the IPDL type |struct Mapping|
24 : //
25 : namespace mozilla {
26 : namespace dom {
27 : class Mapping MOZ_FINAL
28 : {
29 : private:
30 :
31 : public:
32 : Mapping();
33 :
34 : Mapping(
35 : const nsCString& _library_name,
36 : const nsCString& _file_id,
37 : const uintptr_t& _start_address,
38 : const size_t& _mapping_length,
39 : const size_t& _file_offset)
40 : {
41 : Init();
42 : Assign(_library_name, _file_id, _start_address, _mapping_length, _file_offset);
43 : }
44 :
45 : Mapping(const Mapping& _o)
46 : {
47 : Init();
48 : Assign((_o).library_name(), (_o).file_id(), (_o).start_address(), (_o).mapping_length(), (_o).file_offset());
49 : }
50 :
51 : ~Mapping();
52 :
53 : void
54 : operator=(const Mapping& _o)
55 : {
56 : Assign((_o).library_name(), (_o).file_id(), (_o).start_address(), (_o).mapping_length(), (_o).file_offset());
57 : }
58 :
59 : bool
60 : operator==(const Mapping& _o) const;
61 :
62 : nsCString&
63 0 : library_name()
64 : {
65 0 : return library_name_;
66 : }
67 : const nsCString&
68 0 : library_name() const
69 : {
70 0 : return library_name_;
71 : }
72 :
73 : nsCString&
74 0 : file_id()
75 : {
76 0 : return file_id_;
77 : }
78 : const nsCString&
79 0 : file_id() const
80 : {
81 0 : return file_id_;
82 : }
83 :
84 : uintptr_t&
85 0 : start_address()
86 : {
87 0 : return start_address_;
88 : }
89 : const uintptr_t&
90 0 : start_address() const
91 : {
92 0 : return start_address_;
93 : }
94 :
95 : size_t&
96 0 : mapping_length()
97 : {
98 0 : return mapping_length_;
99 : }
100 : const size_t&
101 0 : mapping_length() const
102 : {
103 0 : return mapping_length_;
104 : }
105 :
106 : size_t&
107 0 : file_offset()
108 : {
109 0 : return file_offset_;
110 : }
111 : const size_t&
112 0 : file_offset() const
113 : {
114 0 : return file_offset_;
115 : }
116 :
117 : private:
118 : void
119 : Init();
120 :
121 : void
122 : Assign(
123 : const nsCString& _library_name,
124 : const nsCString& _file_id,
125 : const uintptr_t& _start_address,
126 : const size_t& _mapping_length,
127 : const size_t& _file_offset);
128 :
129 : nsCString library_name_;
130 : nsCString file_id_;
131 : uintptr_t start_address_;
132 : size_t mapping_length_;
133 : size_t file_offset_;
134 : };
135 : } // namespace dom
136 : } // namespace mozilla
137 :
138 : //-----------------------------------------------------------------------------
139 : // Code common to PCrashReporterChild and PCrashReporterParent
140 : //
141 : namespace mozilla {
142 : namespace dom {
143 : namespace PCrashReporter {
144 :
145 : enum State {
146 : __Dead,
147 : __Null,
148 : __Error,
149 : __Start = __Null
150 : };
151 :
152 : enum MessageType {
153 : PCrashReporterStart = PCrashReporterMsgStart << 16,
154 : PCrashReporterPreStart = (PCrashReporterMsgStart << 16) - 1,
155 : Msg_AddLibraryMappings__ID,
156 : Msg_AnnotateCrashReport__ID,
157 : Msg_AppendAppNotes__ID,
158 : Msg___delete____ID,
159 : Reply___delete____ID,
160 : PCrashReporterEnd
161 : };
162 :
163 : bool
164 : Transition(
165 : State from,
166 : mozilla::ipc::Trigger trigger,
167 : State* next);
168 :
169 : class Msg_AddLibraryMappings :
170 : public IPC::Message
171 0 : {
172 : private:
173 : typedef mozilla::ipc::ActorHandle ActorHandle;
174 : typedef mozilla::dom::Mapping Mapping;
175 : typedef mozilla::ipc::Shmem Shmem;
176 :
177 : public:
178 : enum {
179 : ID = Msg_AddLibraryMappings__ID
180 : };
181 0 : Msg_AddLibraryMappings() :
182 0 : IPC::Message(MSG_ROUTING_NONE, ID, PRIORITY_NORMAL, "PCrashReporter::Msg_AddLibraryMappings")
183 : {
184 0 : }
185 :
186 : void
187 0 : Log(
188 : const std::string& __pfx,
189 : FILE* __outf) const
190 : {
191 0 : std::string __logmsg;
192 0 : StringAppendF((&(__logmsg)), "[time:%" PRId64 "]", PR_Now());
193 0 : (__logmsg).append(__pfx);
194 0 : (__logmsg).append("Msg_AddLibraryMappings(");
195 :
196 0 : (__logmsg).append("[TODO])\n");
197 0 : fputs((__logmsg).c_str(), __outf);
198 0 : }
199 : };
200 :
201 : class Msg_AnnotateCrashReport :
202 : public IPC::Message
203 0 : {
204 : private:
205 : typedef mozilla::ipc::ActorHandle ActorHandle;
206 : typedef mozilla::dom::Mapping Mapping;
207 : typedef mozilla::ipc::Shmem Shmem;
208 :
209 : public:
210 : enum {
211 : ID = Msg_AnnotateCrashReport__ID
212 : };
213 0 : Msg_AnnotateCrashReport() :
214 0 : IPC::Message(MSG_ROUTING_NONE, ID, PRIORITY_NORMAL, "PCrashReporter::Msg_AnnotateCrashReport")
215 : {
216 0 : }
217 :
218 : void
219 0 : Log(
220 : const std::string& __pfx,
221 : FILE* __outf) const
222 : {
223 0 : std::string __logmsg;
224 0 : StringAppendF((&(__logmsg)), "[time:%" PRId64 "]", PR_Now());
225 0 : (__logmsg).append(__pfx);
226 0 : (__logmsg).append("Msg_AnnotateCrashReport(");
227 :
228 0 : (__logmsg).append("[TODO])\n");
229 0 : fputs((__logmsg).c_str(), __outf);
230 0 : }
231 : };
232 :
233 : class Msg_AppendAppNotes :
234 : public IPC::Message
235 0 : {
236 : private:
237 : typedef mozilla::ipc::ActorHandle ActorHandle;
238 : typedef mozilla::dom::Mapping Mapping;
239 : typedef mozilla::ipc::Shmem Shmem;
240 :
241 : public:
242 : enum {
243 : ID = Msg_AppendAppNotes__ID
244 : };
245 0 : Msg_AppendAppNotes() :
246 0 : IPC::Message(MSG_ROUTING_NONE, ID, PRIORITY_NORMAL, "PCrashReporter::Msg_AppendAppNotes")
247 : {
248 0 : }
249 :
250 : void
251 0 : Log(
252 : const std::string& __pfx,
253 : FILE* __outf) const
254 : {
255 0 : std::string __logmsg;
256 0 : StringAppendF((&(__logmsg)), "[time:%" PRId64 "]", PR_Now());
257 0 : (__logmsg).append(__pfx);
258 0 : (__logmsg).append("Msg_AppendAppNotes(");
259 :
260 0 : (__logmsg).append("[TODO])\n");
261 0 : fputs((__logmsg).c_str(), __outf);
262 0 : }
263 : };
264 :
265 : class Msg___delete__ :
266 : public IPC::Message
267 0 : {
268 : private:
269 : typedef mozilla::ipc::ActorHandle ActorHandle;
270 : typedef mozilla::dom::Mapping Mapping;
271 : typedef mozilla::ipc::Shmem Shmem;
272 :
273 : public:
274 : enum {
275 : ID = Msg___delete____ID
276 : };
277 0 : Msg___delete__() :
278 0 : IPC::Message(MSG_ROUTING_NONE, ID, PRIORITY_NORMAL, "PCrashReporter::Msg___delete__")
279 : {
280 0 : }
281 :
282 : void
283 0 : Log(
284 : const std::string& __pfx,
285 : FILE* __outf) const
286 : {
287 0 : std::string __logmsg;
288 0 : StringAppendF((&(__logmsg)), "[time:%" PRId64 "]", PR_Now());
289 0 : (__logmsg).append(__pfx);
290 0 : (__logmsg).append("Msg___delete__(");
291 :
292 0 : (__logmsg).append("[TODO])\n");
293 0 : fputs((__logmsg).c_str(), __outf);
294 0 : }
295 : };
296 :
297 : class Reply___delete__ :
298 : public IPC::Message
299 : {
300 : private:
301 : typedef mozilla::ipc::ActorHandle ActorHandle;
302 : typedef mozilla::dom::Mapping Mapping;
303 : typedef mozilla::ipc::Shmem Shmem;
304 :
305 : public:
306 : enum {
307 : ID = Reply___delete____ID
308 : };
309 : Reply___delete__() :
310 : IPC::Message(MSG_ROUTING_NONE, ID, PRIORITY_NORMAL, "PCrashReporter::Reply___delete__")
311 : {
312 : }
313 :
314 : void
315 : Log(
316 : const std::string& __pfx,
317 : FILE* __outf) const
318 : {
319 : std::string __logmsg;
320 : StringAppendF((&(__logmsg)), "[time:%" PRId64 "]", PR_Now());
321 : (__logmsg).append(__pfx);
322 : (__logmsg).append("Reply___delete__(");
323 :
324 : (__logmsg).append("[TODO])\n");
325 : fputs((__logmsg).c_str(), __outf);
326 : }
327 : };
328 :
329 :
330 :
331 : } // namespace PCrashReporter
332 : } // namespace dom
333 : } // namespace mozilla
334 :
335 : #endif // ifndef PCrashReporter_h
|