|
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Definitions used between the Core Dump Server interface library and the server. |
|
15 // |
|
16 |
|
17 |
|
18 |
|
19 /** |
|
20 @file |
|
21 @publishedPartner |
|
22 @released |
|
23 */ |
|
24 |
|
25 #ifndef CORE_DUMP_SERVER_API_H |
|
26 #define CORE_DUMP_SERVER_API_H |
|
27 |
|
28 #include <plugindata.h> |
|
29 #include <optionconfig.h> |
|
30 |
|
31 /** Core Dump Server executable name */ |
|
32 _LIT(KCoreDumpServerName, "coredump_svr"); |
|
33 |
|
34 /** Core Dump Server UID */ |
|
35 const TUid KCoreDumpServUid = { 0x10282FE5 }; |
|
36 |
|
37 /** Core Dump Server major version */ |
|
38 const TUint KCoreDumpServMajorVersionNumber=1; |
|
39 |
|
40 /** Core Dump Server minor version */ |
|
41 const TUint KCoreDumpServMinorVersionNumber=1; |
|
42 |
|
43 /** Core Dump Server build number */ |
|
44 const TUint KCoreDumpServBuildVersionNumber=2; |
|
45 |
|
46 /** @see ECrashMediaName |
|
47 * Length of each entry in the property ECrashMediaName |
|
48 */ |
|
49 const TInt KMaxEntryLength = 160; |
|
50 |
|
51 /** @see ECrashMediaName |
|
52 * Number of entries in the property ECrashMediaName |
|
53 */ |
|
54 const TInt KNumofEntries = 5; |
|
55 |
|
56 /** @see ECrashMediaName |
|
57 * Size of Media Name in the property ECrashMediaName |
|
58 */ |
|
59 const TInt KMaxMediaLength = 148; |
|
60 |
|
61 /** @see ECrashMediaName |
|
62 * Length of UID in the property ECrashMediaName |
|
63 */ |
|
64 const TInt KMaxUIDLength = 10; |
|
65 |
|
66 /** @see ECrashMediaName |
|
67 * Length of the status in the property ECrashMediaName |
|
68 */ |
|
69 const TInt KMaxStatusLength = 1; |
|
70 |
|
71 /** @see ECrashMediaName |
|
72 * Length of the end character in the property ECrashMediaName |
|
73 */ |
|
74 const TInt KMaxEndLength = 1; |
|
75 |
|
76 /** @see ECrashMediaName |
|
77 * Length of the crash progress buffer ECrashProgress |
|
78 */ |
|
79 const TInt KMaxCrashProgressBuffer = 50; |
|
80 |
|
81 enum TCoreDumpConfigParameters |
|
82 { |
|
83 ECrashEventTypes, |
|
84 EPreCrashEventAction, |
|
85 EPostCrashEventAction, |
|
86 ELastParam |
|
87 }; |
|
88 |
|
89 /** |
|
90 Core Dump Server client-server requests |
|
91 @internalTechnology |
|
92 */ |
|
93 enum TCoreDumpServRqst |
|
94 { |
|
95 /** Obtain a plugin list. |
|
96 @see RCoreDumpSession::GetPluginListL(). */ |
|
97 ECoreDumpServGetPluginList, |
|
98 |
|
99 /** Generic call to obtain data about a list from the Core Dump Server. |
|
100 @see RCoreDumpSession::GetListLC(). */ |
|
101 ECoreDumpGetListInfo, |
|
102 |
|
103 /** Generic call to obtain the list from the Core Dump Server. |
|
104 @see RCoreDumpSession::GetListLC(). */ |
|
105 ECoreDumpGetListData, |
|
106 |
|
107 /** Request the loading or unloading of a plugin. |
|
108 @see RCoreDumpSession::PluginRequestL(). */ |
|
109 ECoreDumpPluginRequest, |
|
110 |
|
111 /** Obtain the current number of configuration parameters. |
|
112 @see RCoreDumpSession::GetNumberConfigParametersL(). */ |
|
113 ECoreDumpGetNumberConfigParams, |
|
114 |
|
115 /** Obtain a configuration parameter. |
|
116 @see RCoreDumpSession::GetConfigParameterL(). */ |
|
117 ECoreDumpGetConfigParam, |
|
118 |
|
119 /** Change a configuration parameter. |
|
120 @see RCoreDumpSession::SetConfigParameterL(). */ |
|
121 ECoreDumpSetConfigParam, |
|
122 |
|
123 |
|
124 /** Unused */ |
|
125 ECoreDumpAttachThread, |
|
126 |
|
127 /** Unused */ |
|
128 ECoreDumpDetachThread, |
|
129 |
|
130 /** Unused */ |
|
131 ECoreDumpAttachProcess, |
|
132 |
|
133 /** Unused */ |
|
134 ECoreDumpDetachProcess, |
|
135 |
|
136 /** Request the observation of a target or the cancellation of an observation. |
|
137 @see RCoreDumpSession::ObservationRequestL(). */ |
|
138 ECoreDumpObservationRequest, |
|
139 |
|
140 /** Request the restoration of a configuration. |
|
141 @see RCoreDumpSession::LoadConfigL(). */ |
|
142 ECoreDumpLoadConfig, |
|
143 |
|
144 /** Request the saving of a configuration. |
|
145 @see RCoreDumpSession::SaveConfigL(). */ |
|
146 ECoreDumpSaveConfig, |
|
147 |
|
148 /** Deletes a crash in the flash partition */ |
|
149 ECoreDumpDeleteLogRequest, |
|
150 |
|
151 /** Deletes entire flash partition */ |
|
152 ECoreDumpDeleteCrashPartitionRequest, |
|
153 |
|
154 /** Processes a crash in the flash partition */ |
|
155 ECoreDumpProcessFlashCrash, |
|
156 |
|
157 /** Asynchronously processes a crash */ |
|
158 ECoreDumpProcessCrashAsync, |
|
159 |
|
160 /** Cancel asynchronous processesing a crash */ |
|
161 ECoreDumpCancelProcessCrashAsync, |
|
162 |
|
163 /** Guard */ |
|
164 ECoreDumpServEndMarker |
|
165 |
|
166 }; |
|
167 |
|
168 /** Number of asynchronous requests */ |
|
169 #define KTTMaxAsyncRequests (4) |
|
170 |
|
171 /** Default number of message slots per session |
|
172 Same as KTTMaxAsyncRequests as synchronous requests provided |
|
173 by framework */ |
|
174 #define KTTDefaultMessageSlots (KTTMaxAsyncRequests) |
|
175 |
|
176 |
|
177 /** |
|
178 @internalTechnology |
|
179 Number of plugin details in a plugin transfer block. |
|
180 Used between server library and cds |
|
181 */ |
|
182 #define KNumPluginDetails 5 |
|
183 |
|
184 |
|
185 /** |
|
186 @internalTechnology |
|
187 Class used for transfering fixed sized blocks of plugin information |
|
188 between the Core Dump Server and its clients. This makes it easier |
|
189 accross the client/server interface. |
|
190 @see TPluginInfo |
|
191 */ |
|
192 class TPluginInfoBlock |
|
193 { |
|
194 public: |
|
195 |
|
196 /** |
|
197 A simple array is used as the transfer block across the |
|
198 process boundary. |
|
199 */ |
|
200 TPluginInfo plugins[ KNumPluginDetails ]; |
|
201 }; |
|
202 |
|
203 |
|
204 /** |
|
205 Enumerations that identify the RProperty objects shared between various parts |
|
206 of the core dump server system, plugins and clients. |
|
207 |
|
208 The properties are defined by the Core Dump Session at startup. |
|
209 These properties have the uid of the Core Dump Server. |
|
210 |
|
211 @publishedPartner |
|
212 @released |
|
213 @see CCoreDumpSession::ConstructL(). |
|
214 */ |
|
215 enum TCrashProgress |
|
216 { |
|
217 /** Current crash status. Updated by formatters during a crash. |
|
218 RProperty of type RProperty::EText. */ |
|
219 ECrashProgress, |
|
220 |
|
221 /** Cancels the generation of a crash when set to non-zero. |
|
222 RProperty of type RProperty::EInt. */ |
|
223 ECancelCrash, |
|
224 |
|
225 /** Number of crashes served by this session of the Core Dump Server. |
|
226 RProperty of type RProperty::EInt. */ |
|
227 ECrashCount, |
|
228 |
|
229 /** Name of the Crash Media Dump created. Updated by the CDS/Formatter |
|
230 RProperty of type RProperty::EText. */ |
|
231 ECrashMediaName |
|
232 }; |
|
233 |
|
234 |
|
235 |
|
236 /** |
|
237 @publishedPartner |
|
238 @released |
|
239 |
|
240 Class for requesting lists from the Core Dump Server. |
|
241 The requestor appends the results of each request to obtain an entire list. |
|
242 Uses "T<type>InfoBlock" classes to transfer data accross the process boundary. |
|
243 */ |
|
244 class TListRequest |
|
245 { |
|
246 public: |
|
247 |
|
248 /** Type of data to supply for this request */ |
|
249 enum TListRequestType |
|
250 { |
|
251 /** This request is for the formatter plugin list */ |
|
252 EFormatterList, |
|
253 |
|
254 /** This request is for the writer plugin list */ |
|
255 EWriterList, |
|
256 |
|
257 /** This request is for the thread list */ |
|
258 EThreadList, |
|
259 |
|
260 /** This request is for the process list */ |
|
261 EProcessList, |
|
262 |
|
263 /** This request is for the executable list */ |
|
264 EExecutableList, |
|
265 |
|
266 /** This request is for the crashes in flash */ |
|
267 ECrashList, |
|
268 |
|
269 /** |
|
270 @internalTechnology |
|
271 Last marker |
|
272 */ |
|
273 EUnknownRequest |
|
274 |
|
275 }; |
|
276 |
|
277 /** Type of data to supply for this request */ |
|
278 TListRequestType iListType; |
|
279 |
|
280 /** Sub identifiers for the request. These are auxiliary ids that |
|
281 can be used to refine the request. */ |
|
282 TUint32 iSubId1; |
|
283 TUint32 iSubId2; |
|
284 |
|
285 /** Requestor sets iIndex. iIndex==0 means the supplier should refresh the |
|
286 list and supply from index 0. iIndex > 0 means supply element |
|
287 [iIndex-1] and onwards. Requestor should thus increase iIndex |
|
288 by how many elements were supplied on each call. */ |
|
289 TUint iIndex; |
|
290 |
|
291 /** Supplier writes iSupplied according to how many items |
|
292 it copied into the buffer on this call */ |
|
293 TUint iSupplied; |
|
294 |
|
295 /** Supplier writes iRemaining to indicate how many items it |
|
296 has yet to supply. */ |
|
297 TUint iRemaining; |
|
298 |
|
299 /** Number of bytes required to hold the resulting data */ |
|
300 TUint iRequiredDescriptorSize; |
|
301 |
|
302 /** |
|
303 Spare variables for future expansion. |
|
304 @internalTechnology */ |
|
305 TUint32 iSpare0; |
|
306 /** @internalTechnology */ |
|
307 TUint32 iSpare1; |
|
308 /** @internalTechnology */ |
|
309 TUint32 iSpare2; |
|
310 /** @internalTechnology */ |
|
311 TUint32 iSpare3; |
|
312 |
|
313 }; |
|
314 |
|
315 /** |
|
316 @publishedPartner |
|
317 @released |
|
318 |
|
319 Class for requesting change in configuration parameter from the CDS and loaded plugins. |
|
320 */ |
|
321 class TConfigRequest |
|
322 { |
|
323 public: |
|
324 /** Type of data to supply for this request */ |
|
325 COptionConfig::TParameterSource iSource; |
|
326 |
|
327 /** Sub identifiers for the request. These are auxiliary ids that |
|
328 can be used to refine the request. */ |
|
329 TUint32 iIndex; |
|
330 TUint32 iInstance; |
|
331 |
|
332 /** |
|
333 Spare variables for future expansion. |
|
334 @internalTechnology */ |
|
335 TUint32 iSpare0; |
|
336 /** @internalTechnology */ |
|
337 TUint32 iSpare1; |
|
338 }; |
|
339 |
|
340 #endif // CORE_DUMP_SERVER_API_H |