1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MEMSPYENGINECLIENTINTERFACE_H |
|
20 #define MEMSPYENGINECLIENTINTERFACE_H |
|
21 |
|
22 |
|
23 // System includes |
|
24 #include <e32base.h> |
|
25 #include <u32std.h> |
|
26 |
|
27 // Constants |
|
28 const TInt KMemSpyClientServerVersion = 2; |
|
29 const TInt KMemSpyListInfoForAllThreads = -1; |
|
30 |
|
31 /** |
|
32 * Special constant to be used to indicate kernel thread id |
|
33 * when performing kernel-specific thread agnostic operations. |
|
34 * |
|
35 * Note that the kernel thread is not supported for all thread-specific |
|
36 * operation types. |
|
37 * |
|
38 * Use this value to indicate that the kernel thread is the target |
|
39 * thread when calling the thread-specific overload of PerformOperation(). |
|
40 */ |
|
41 const TUint32 KMemSpyClientServerThreadIdKernel = KMaxTUint32; |
|
42 |
|
43 // Internal constants |
|
44 const TInt KMemSpyOpFlagsTypeMask = 0x0000FFFF; |
|
45 const TInt KMemSpyOpFlagsInclusionMask = 0xFFFF0000; |
|
46 const TInt KMemSpyOpFlagsIncludesThreadId = 0x00010000; |
|
47 const TInt KMemSpyOpFlagsIncludesThreadName = 0x00020000; |
|
48 const TInt KMemSpyOpFlagsAsyncOperation = 0x00040000; |
|
49 // Literal constants |
|
50 _LIT( KMemSpyServerName, "MemSpyServer" ); |
|
51 _LIT( KMemSpyProcessName0, "MemSpyServer.exe" ); |
|
52 _LIT( KMemSpyProcessName1, "MemSpyUI.exe" ); |
|
53 //_LIT( KMemSpyProcessName2, "MemSpyConsole.exe" ); |
|
54 |
|
55 // |
|
56 // Supported MemSpy operation types |
|
57 // |
|
58 // Operations which can only be applied to a specific thread are |
|
59 // prefixed by [TS] - i.e. it is permitted to use the thread-specific |
|
60 // overload of PerformOperation() for this operation type. |
|
61 // |
|
62 // Operations that can be applied only to the entire device are |
|
63 // prefixed by [ED] - i.e. it is permitted to use the |
|
64 // thread-agnostic overload of PerformOperation() for this operation type. |
|
65 // |
|
66 // Operations that support kernel-thread-specific requests |
|
67 // are prefixed by [KS] - i.e. it is permitted to use the |
|
68 // thread-specific overload of PerformOperation() and the thread |
|
69 // identification parameter should correspond to KMemSpyClientServerThreadIdKernel. |
|
70 // NB: The overload of PerformOperation() which supports a descriptor cannot |
|
71 // be used. |
|
72 // |
|
73 // Operations that are not relevant to a thread are prefixed |
|
74 // by [NT] - i.e. use the thread-agnostic overload of |
|
75 // PerformOperation() |
|
76 // |
|
77 // All other op codes are deemed internal and are not to be |
|
78 // used except via provided APIs. |
|
79 // |
|
80 enum TMemSpyClientServerOp |
|
81 { |
|
82 /** |
|
83 * [INTERNAL REQUEST] |
|
84 */ |
|
85 EMemSpyClientServerOpMarkerFirst = 0, |
|
86 |
|
87 /** |
|
88 * [TS][ED] |
|
89 * Show basic summary information about a thread/process |
|
90 */ |
|
91 EMemSpyClientServerOpSummaryInfo = EMemSpyClientServerOpMarkerFirst, |
|
92 |
|
93 /** |
|
94 * [TS][ED] |
|
95 * Show detailed summary information about a thread/process |
|
96 */ |
|
97 EMemSpyClientServerOpSummaryInfoDetailed, |
|
98 |
|
99 /** |
|
100 * [TS][ED][KS] |
|
101 * Show heap information & statistics for a user-side thread |
|
102 */ |
|
103 EMemSpyClientServerOpHeapInfo, |
|
104 |
|
105 /** |
|
106 * [TS][ED] |
|
107 * Prvide heap cell listings for a thread |
|
108 */ |
|
109 EMemSpyClientServerOpHeapCellListing, |
|
110 |
|
111 /** |
|
112 * [TS][ED][KS] |
|
113 * Dump a thread's heap |
|
114 */ |
|
115 EMemSpyClientServerOpHeapData, |
|
116 |
|
117 /** |
|
118 * [TS][ED] |
|
119 * Show summary information about a thread's stack |
|
120 */ |
|
121 EMemSpyClientServerOpStackInfo, |
|
122 |
|
123 /** |
|
124 * [TS][ED] |
|
125 * Dump a thread's user-side stack |
|
126 */ |
|
127 EMemSpyClientServerOpStackDataUser, |
|
128 |
|
129 /** |
|
130 * [TS][ED] |
|
131 * Dump a thread's kernel-side stack |
|
132 */ |
|
133 EMemSpyClientServerOpStackDataKernel, |
|
134 |
|
135 /** |
|
136 * [TS][ED] |
|
137 * List all open files in the OS or then the open files |
|
138 * for a given thread. |
|
139 */ |
|
140 EMemSpyClientServerOpOpenFiles, |
|
141 |
|
142 /** |
|
143 * [INTERNAL REQUEST] |
|
144 */ |
|
145 EMemSpyClientServerOpMarkerThreadAgnosticFirst, |
|
146 |
|
147 /** |
|
148 * [ED] |
|
149 * Provide compact heap information for the entire device, which |
|
150 * can be compared with other similar listings using Heap Analyser. |
|
151 */ |
|
152 EMemSpyClientServerOpHeapInfoCompact = EMemSpyClientServerOpMarkerThreadAgnosticFirst, |
|
153 |
|
154 /** |
|
155 * [ED] |
|
156 * Show compact stack information for the device |
|
157 */ |
|
158 EMemSpyClientServerOpStackInfoCompact, |
|
159 |
|
160 /** |
|
161 * [NT] |
|
162 * Start the system wide memory tracker (SWMT) running, so that when |
|
163 * the timer expires, the system characteristics will be sampled |
|
164 * and any changes notified. NB: Starting the SWMT running for the first time |
|
165 * will cause an initial preparatory cycle to be established. Future updates |
|
166 * will then follow when the timer tick period expires |
|
167 */ |
|
168 EMemSpyClientServerOpSystemWideMemoryTrackingTimerStart, |
|
169 |
|
170 /** |
|
171 * [NT] |
|
172 * Stop the system wide memory tracker. No futher automatic timer-based |
|
173 * SWMT cycles will be performed unless "Force update" is utilised or the timer |
|
174 * is started again. |
|
175 */ |
|
176 EMemSpyClientServerOpSystemWideMemoryTrackingTimerStop, |
|
177 |
|
178 /** |
|
179 * [NT] |
|
180 * Reset the SWMT so that all existing cycles are discarded (which can free |
|
181 * quite a lot of memory). All operations are cancelled, the SWMT will be idle. |
|
182 * |
|
183 * If performing manual "force updates" to the SWMT, then the SWMT should be reset |
|
184 * before starting a new test run. For timer-based SWMT sampling, this operation |
|
185 * is performed internally by MemSpy and therefore is redundant in that situation. |
|
186 */ |
|
187 EMemSpyClientServerOpSystemWideMemoryTrackingReset, |
|
188 |
|
189 /** |
|
190 * [NT] |
|
191 * Force the system wide memory tracker (internal to memspy) to |
|
192 * perform a refresh |
|
193 */ |
|
194 EMemSpyClientServerOpSystemWideMemoryTrackingForceUpdate, |
|
195 |
|
196 /** |
|
197 * [INTERNAL REQUEST] |
|
198 */ |
|
199 EMemSpyClientServerOpSystemWideMemoryTrackingTimerPeriodSet, |
|
200 |
|
201 /** |
|
202 * [INTERNAL REQUEST] |
|
203 */ |
|
204 EMemSpyClientServerOpSwitchOutputSinkFile, |
|
205 |
|
206 /** |
|
207 * [INTERNAL REQUEST] |
|
208 */ |
|
209 EMemSpyClientServerOpSwitchOutputSinkTrace, |
|
210 |
|
211 /** |
|
212 * [INTERNAL REQUEST] |
|
213 */ |
|
214 EMemSpyClientServerOpEnumerateKernelContainer, |
|
215 |
|
216 /** |
|
217 * [INTERNAL REQUEST] |
|
218 */ |
|
219 EMemSpyClientServerOpEnumerateKernelContainerAll, |
|
220 |
|
221 /** |
|
222 * [INTERNAL REQUEST] |
|
223 */ |
|
224 EMemSpyClientServerOpBitmapsSave, |
|
225 |
|
226 /** |
|
227 * [INTERNAL REQUEST] |
|
228 */ |
|
229 EMemSpyClientServerOpDisableAknIconCache, |
|
230 |
|
231 /** |
|
232 * [INTERNAL REQUEST] |
|
233 */ |
|
234 EMemSpyClientServerOpSendToBackground, |
|
235 |
|
236 /** |
|
237 * [INTERNAL REQUEST] |
|
238 */ |
|
239 EMemSpyClientServerOpBringToForeground, |
|
240 |
|
241 /** |
|
242 * [INTERNAL REQUEST] |
|
243 */ |
|
244 EMemSpyClientServerOpExit, |
|
245 |
|
246 /** |
|
247 * [INTERNAL REQUEST] |
|
248 */ |
|
249 EMemSpyClientServerOpSystemWideMemoryTrackingCategoriesSet, |
|
250 |
|
251 /** |
|
252 * [INTERNAL REQUEST] |
|
253 */ |
|
254 EMemSpyClientServerOpSystemWideMemoryTrackingThreadNameFilterSet, |
|
255 |
|
256 /** |
|
257 * [INTERNAL REQUEST] |
|
258 */ |
|
259 EMemSpyClientServerOpSystemWideMemoryTrackingHeapDumpSet, |
|
260 |
|
261 /** |
|
262 * [INTERNAL REQUEST] |
|
263 */ |
|
264 EMemSpyClientServerOpMarkerUiFirst, |
|
265 |
|
266 EMemSpyClientServerOpGetProcessCount = EMemSpyClientServerOpMarkerUiFirst, |
|
267 |
|
268 EMemSpyClientServerOpGetProcesses, |
|
269 |
|
270 EMemSpyClienServerOpGetProcessIdByName, |
|
271 |
|
272 EMemSpyClientServerOpGetThreadCount, |
|
273 |
|
274 EMemSpyClientServerOpGetThreads, |
|
275 |
|
276 EMemSpyClientServerOpSetThreadPriority, |
|
277 |
|
278 EMemSpyClientServerOpProcessSystemPermanentOrCritical, |
|
279 |
|
280 EMemSpyClientServerOpEndProcess, |
|
281 |
|
282 EMemSpyClientServerOpSwitchToProcess, |
|
283 |
|
284 //Threads operations |
|
285 EMemSpyClientServerOpThreadSystemPermanentOrCritical, |
|
286 |
|
287 EMemSpyClientServerOpEndThread, |
|
288 |
|
289 EMemSpyClientServerOpSwitchToThread, |
|
290 |
|
291 EMemSpyClientServerOpGetInfoItemType, |
|
292 |
|
293 EMemSpyClientServerOpGetThreadInfoItemsCount, |
|
294 |
|
295 EMemSpyClientServerOpGetThreadInfoItems, |
|
296 |
|
297 EMemSpyClientServerOpOutputInfoHandles, |
|
298 |
|
299 EMemSpyClientServerOpOutputAOList, |
|
300 |
|
301 |
|
302 //Kernel Objects operations |
|
303 EMemSpyClientServerOpGetKernelObjectCount, |
|
304 |
|
305 EMemSpyClientServerOpGetKernelObjects, |
|
306 |
|
307 EMemSpyClientServerOpGetKernelObjectItemCount, |
|
308 |
|
309 EMemSpyClientServerOpGetKernelObjectItems, |
|
310 |
|
311 EMemSpyClientServerOpGetHeap, |
|
312 |
|
313 EMemSpyClientServerOpGetMemoryTrackingCycleCount, |
|
314 |
|
315 EMemSpyClientServerOpGetMemoryTrackingCycles, |
|
316 |
|
317 /** |
|
318 * [INTERNAL REQUEST] |
|
319 * Register for notifications of device wide operation progress. |
|
320 */ |
|
321 EMemSpyClientServerOpNotifyDeviceWideOperationProgress, |
|
322 |
|
323 /** |
|
324 * [INTERNAL REQUEST] |
|
325 * Cancel current device wide operation |
|
326 */ |
|
327 EMemSpyClientServerOpCancelDeviceWideOperation, |
|
328 |
|
329 EMemSpyClientServerOpOutputAllContainerContents, |
|
330 |
|
331 EMemSpyClientServerOpDumpKernelHeap, |
|
332 |
|
333 EMemSpyClientServerOpSetSwmtConfig, |
|
334 |
|
335 EMemSpyClientServerOpSetSwmtAutoStartProcessList, |
|
336 |
|
337 EMemSpyClientServerOpGetOutputSink, |
|
338 |
|
339 /** |
|
340 * [INTERNAL REQUEST] |
|
341 * Check if system wide memory tracking timer is running. |
|
342 */ |
|
343 EMemSpyClientServerOpIsSwmtRunning, |
|
344 |
|
345 EMemSpyClientServerOpMarkerUiLast, |
|
346 |
|
347 /** |
|
348 * [INTERNAL REQUEST] |
|
349 */ |
|
350 EMemSpyClientServerOpMarkerLast, |
|
351 }; |
|
352 |
|
353 |
|
354 enum TMemSpyEndType |
|
355 { |
|
356 ETerminate, |
|
357 EKill, |
|
358 EPanic |
|
359 }; |
|
360 |
|
361 |
|
362 |
|
363 |
|
364 |
|
365 NONSHARABLE_CLASS( RMemSpyEngineClientInterface ) : public RSessionBase |
|
366 { |
|
367 public: |
|
368 inline RMemSpyEngineClientInterface(); |
|
369 inline TInt Connect(); |
|
370 inline void Close(); |
|
371 |
|
372 public: // API |
|
373 |
|
374 /** |
|
375 * Thread-agnostic request function. Performs the operation in the context of |
|
376 * the entire device. |
|
377 * |
|
378 * I.e. can only be used for [NT] or [ED] requests. |
|
379 */ |
|
380 inline TInt PerformOperation( TMemSpyClientServerOp aOperation ); |
|
381 |
|
382 /** |
|
383 * Thread-specific request functions. Perform the requested operation in the context |
|
384 * of the specified thread id, or (possibly partial) thread name. |
|
385 * |
|
386 * To perform the operation in the context of the current thread, invoke the |
|
387 * function as follows: |
|
388 * |
|
389 * PerformOperation( <...>, RThread().Id() ); |
|
390 * |
|
391 * I.e. can only be used for [TS] requests. |
|
392 */ |
|
393 inline TInt PerformOperation( TMemSpyClientServerOp aOperation, TThreadId aId ); |
|
394 inline TInt PerformOperation( TMemSpyClientServerOp aOperation, const TDesC& aThreadName ); |
|
395 |
|
396 /** |
|
397 * General functions to switch MemSpy's output mode. |
|
398 */ |
|
399 inline TInt SwitchOutputModeFile(); |
|
400 inline TInt SwitchOutputModeTrace(); |
|
401 |
|
402 /** |
|
403 * Configure the system wide memory tracker timer interval (for automatic timer-based polling). |
|
404 * Change will take effect next time SWMT is started. |
|
405 */ |
|
406 inline TInt SystemWideMemoryTrackerTimerIntervalSet( TInt aInterval ); |
|
407 |
|
408 /** |
|
409 * Configure the system wide memory tracker categories. |
|
410 * Change will take effect next time SWMT is started. |
|
411 */ |
|
412 inline TInt SystemWideMemoryTrackerCategoriesSet( TInt aCategories ); |
|
413 |
|
414 /** |
|
415 * Configure the system wide memory tracker for filtering user heaps by thread name. |
|
416 * Change will take effect next time SWMT is started. |
|
417 */ |
|
418 inline TInt SystemWideMemoryTrackerThreadFilterSet( const TDesC& aFilter ); |
|
419 |
|
420 /** |
|
421 * Configure the system wide memory tracker for enabling/disabling Heap dumps during SWMT. |
|
422 * Change will take effect next time SWMT is started. |
|
423 */ |
|
424 inline TInt SystemWideMemoryTrackerHeapDumpSet( TBool aDumpEnabled ); |
|
425 |
|
426 /** |
|
427 * List the contents of a specific kernel container. See TObjectType for types. |
|
428 */ |
|
429 inline TInt EnumerateKernelContainer( TObjectType aType ); |
|
430 |
|
431 /** |
|
432 * List the contents of all kernel containers |
|
433 */ |
|
434 inline TInt EnumerateKernelContainerAll(); |
|
435 |
|
436 /** |
|
437 * Save bitmaps to memory card |
|
438 */ |
|
439 inline TInt SaveAllBitmaps(); |
|
440 |
|
441 /** |
|
442 * Disable AknIcon caching |
|
443 */ |
|
444 inline TInt DisableAknIconCache(); |
|
445 |
|
446 /** |
|
447 * Send MemSpy to the background/bring to foreground |
|
448 */ |
|
449 inline TInt SendToBackground(); |
|
450 inline TInt BringToForeground(); |
|
451 |
|
452 /** |
|
453 * Exit MemSpy |
|
454 */ |
|
455 inline TInt Exit(); |
|
456 }; |
|
457 |
|
458 |
|
459 |
|
460 |
|
461 |
|
462 |
|
463 |
|
464 |
|
465 |
|
466 |
|
467 |
|
468 |
|
469 |
|
470 |
|
471 inline RMemSpyEngineClientInterface::RMemSpyEngineClientInterface() |
|
472 { |
|
473 } |
|
474 |
|
475 |
|
476 inline TInt RMemSpyEngineClientInterface::Connect() |
|
477 { |
|
478 TVersion version( KMemSpyClientServerVersion, 0, 0 ); |
|
479 return CreateSession( KMemSpyServerName, version ); |
|
480 } |
|
481 |
|
482 |
|
483 inline void RMemSpyEngineClientInterface::Close() |
|
484 { |
|
485 RSessionBase::Close(); |
|
486 } |
|
487 |
|
488 |
|
489 inline TInt RMemSpyEngineClientInterface::PerformOperation( TMemSpyClientServerOp aOperation ) |
|
490 { |
|
491 TInt error = KErrNotReady; |
|
492 if ( Handle() != KNullHandle ) |
|
493 { |
|
494 const TInt opCode = aOperation; |
|
495 const TIpcArgs args( KMemSpyListInfoForAllThreads ); |
|
496 // |
|
497 error = SendReceive( opCode, args ); |
|
498 } |
|
499 return error; |
|
500 } |
|
501 |
|
502 |
|
503 inline TInt RMemSpyEngineClientInterface::PerformOperation( TMemSpyClientServerOp aOperation, TThreadId aId ) |
|
504 { |
|
505 TInt error = KErrNotReady; |
|
506 if ( Handle() != KNullHandle ) |
|
507 { |
|
508 const TInt opCode = aOperation | KMemSpyOpFlagsIncludesThreadId; |
|
509 const TIpcArgs args( aId ); |
|
510 // |
|
511 error = SendReceive( opCode, args ); |
|
512 } |
|
513 return error; |
|
514 } |
|
515 |
|
516 |
|
517 inline TInt RMemSpyEngineClientInterface::PerformOperation( TMemSpyClientServerOp aOperation, const TDesC& aThreadName ) |
|
518 { |
|
519 TInt error = KErrNotReady; |
|
520 if ( Handle() != KNullHandle ) |
|
521 { |
|
522 const TInt opCode = aOperation | KMemSpyOpFlagsIncludesThreadName; |
|
523 const TIpcArgs args( &aThreadName ); |
|
524 // |
|
525 error = SendReceive( opCode, args ); |
|
526 } |
|
527 return error; |
|
528 } |
|
529 |
|
530 |
|
531 |
|
532 |
|
533 |
|
534 |
|
535 inline TInt RMemSpyEngineClientInterface::SwitchOutputModeFile() |
|
536 { |
|
537 TInt error = KErrNotReady; |
|
538 if ( Handle() != KNullHandle ) |
|
539 { |
|
540 const TInt opCode = EMemSpyClientServerOpSwitchOutputSinkFile; |
|
541 error = SendReceive( opCode ); |
|
542 } |
|
543 return error; |
|
544 } |
|
545 |
|
546 |
|
547 inline TInt RMemSpyEngineClientInterface::SwitchOutputModeTrace() |
|
548 { |
|
549 TInt error = KErrNotReady; |
|
550 if ( Handle() != KNullHandle ) |
|
551 { |
|
552 const TInt opCode = EMemSpyClientServerOpSwitchOutputSinkTrace; |
|
553 error = SendReceive( opCode ); |
|
554 } |
|
555 return error; |
|
556 } |
|
557 |
|
558 |
|
559 |
|
560 |
|
561 |
|
562 |
|
563 |
|
564 |
|
565 inline TInt RMemSpyEngineClientInterface::SystemWideMemoryTrackerTimerIntervalSet( TInt aInterval ) |
|
566 { |
|
567 TInt error = KErrNotReady; |
|
568 if ( Handle() != KNullHandle ) |
|
569 { |
|
570 const TInt opCode = EMemSpyClientServerOpSystemWideMemoryTrackingTimerPeriodSet; |
|
571 const TIpcArgs args( aInterval ); |
|
572 // |
|
573 error = SendReceive( opCode, args ); |
|
574 } |
|
575 return error; |
|
576 } |
|
577 |
|
578 |
|
579 inline TInt RMemSpyEngineClientInterface::SystemWideMemoryTrackerCategoriesSet( TInt aCategories ) |
|
580 { |
|
581 TInt error = KErrNotReady; |
|
582 if ( Handle() != KNullHandle ) |
|
583 { |
|
584 const TInt opCode = EMemSpyClientServerOpSystemWideMemoryTrackingCategoriesSet; |
|
585 const TIpcArgs args( aCategories ); |
|
586 // |
|
587 error = SendReceive( opCode, args ); |
|
588 } |
|
589 return error; |
|
590 } |
|
591 |
|
592 |
|
593 inline TInt RMemSpyEngineClientInterface::SystemWideMemoryTrackerThreadFilterSet( const TDesC& aFilter ) |
|
594 { |
|
595 TInt error = KErrNotReady; |
|
596 if ( Handle() != KNullHandle ) |
|
597 { |
|
598 const TInt opCode = EMemSpyClientServerOpSystemWideMemoryTrackingThreadNameFilterSet; |
|
599 TIpcArgs args( &aFilter ); |
|
600 error = SendReceive( opCode, args ); |
|
601 } |
|
602 return error; |
|
603 } |
|
604 |
|
605 |
|
606 inline TInt RMemSpyEngineClientInterface::SystemWideMemoryTrackerHeapDumpSet( TBool aDumpEnabled ) |
|
607 { |
|
608 TInt error = KErrNotReady; |
|
609 if ( Handle() != KNullHandle ) |
|
610 { |
|
611 const TInt opCode = EMemSpyClientServerOpSystemWideMemoryTrackingHeapDumpSet; |
|
612 const TIpcArgs args( aDumpEnabled ); |
|
613 error = SendReceive( opCode, args ); |
|
614 } |
|
615 return error; |
|
616 } |
|
617 |
|
618 |
|
619 inline TInt RMemSpyEngineClientInterface::EnumerateKernelContainer( TObjectType aType ) |
|
620 { |
|
621 TInt error = KErrNotReady; |
|
622 if ( Handle() != KNullHandle ) |
|
623 { |
|
624 const TInt opCode = EMemSpyClientServerOpEnumerateKernelContainer; |
|
625 const TIpcArgs args( aType ); |
|
626 // |
|
627 error = SendReceive( opCode, args ); |
|
628 } |
|
629 return error; |
|
630 } |
|
631 |
|
632 |
|
633 inline TInt RMemSpyEngineClientInterface::EnumerateKernelContainerAll() |
|
634 { |
|
635 TInt error = KErrNotReady; |
|
636 if ( Handle() != KNullHandle ) |
|
637 { |
|
638 const TInt opCode = EMemSpyClientServerOpEnumerateKernelContainerAll; |
|
639 error = SendReceive( opCode ); |
|
640 } |
|
641 return error; |
|
642 } |
|
643 |
|
644 |
|
645 inline TInt RMemSpyEngineClientInterface::SaveAllBitmaps() |
|
646 { |
|
647 TInt error = KErrNotReady; |
|
648 if ( Handle() != KNullHandle ) |
|
649 { |
|
650 const TInt opCode = EMemSpyClientServerOpBitmapsSave; |
|
651 error = SendReceive( opCode ); |
|
652 } |
|
653 return error; |
|
654 } |
|
655 |
|
656 |
|
657 inline TInt RMemSpyEngineClientInterface::DisableAknIconCache() |
|
658 { |
|
659 TInt error = KErrNotReady; |
|
660 if ( Handle() != KNullHandle ) |
|
661 { |
|
662 const TInt opCode = EMemSpyClientServerOpDisableAknIconCache; |
|
663 error = SendReceive( opCode ); |
|
664 } |
|
665 return error; |
|
666 } |
|
667 |
|
668 |
|
669 inline TInt RMemSpyEngineClientInterface::SendToBackground() |
|
670 { |
|
671 TInt error = KErrNotReady; |
|
672 if ( Handle() != KNullHandle ) |
|
673 { |
|
674 const TInt opCode = EMemSpyClientServerOpSendToBackground; |
|
675 error = SendReceive( opCode ); |
|
676 } |
|
677 return error; |
|
678 } |
|
679 |
|
680 |
|
681 inline TInt RMemSpyEngineClientInterface::BringToForeground() |
|
682 { |
|
683 TInt error = KErrNotReady; |
|
684 if ( Handle() != KNullHandle ) |
|
685 { |
|
686 const TInt opCode = EMemSpyClientServerOpBringToForeground; |
|
687 error = SendReceive( opCode ); |
|
688 } |
|
689 return error; |
|
690 } |
|
691 |
|
692 |
|
693 inline TInt RMemSpyEngineClientInterface::Exit() |
|
694 { |
|
695 TInt error = KErrNotReady; |
|
696 if ( Handle() != KNullHandle ) |
|
697 { |
|
698 const TInt opCode = EMemSpyClientServerOpExit; |
|
699 error = SendReceive( opCode ); |
|
700 } |
|
701 return error; |
|
702 } |
|
703 |
|
704 |
|
705 #endif |
|