memspyui/ui/hb/inc/enginewrapper.h
author hgs
Thu, 24 Jun 2010 14:55:55 +0300
changeset 31 e7a04a6385be
parent 26 41ebde60981f
permissions -rw-r--r--
201025
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
17
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     1
/*
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     2
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     3
* All rights reserved.
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     8
*
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     9
* Initial Contributors:
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    11
*
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    12
* Contributors:
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    13
*
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    14
* Description:
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    15
* 
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    16
*/
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    17
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    18
#ifndef ENGINEWRAPPER_H_
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    19
#define ENGINEWRAPPER_H_
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    20
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    21
#include <QObject>
31
hgs
parents: 26
diff changeset
    22
#include <QVariantList>
hgs
parents: 26
diff changeset
    23
#include <QSettings>
17
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    24
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    25
#include <memspysession.h>
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    26
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    27
typedef quint64 ProcessId;
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    28
typedef quint64 ThreadId;
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    29
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    30
enum ThreadPriority
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    31
{
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    32
	ThreadPriorityNull=(-30),
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    33
	ThreadPriorityMuchLess=(-20),
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    34
	ThreadPriorityLess=(-10),
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    35
	ThreadPriorityNormal=0,
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    36
	ThreadPriorityMore=10,
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    37
	ThreadPriorityMuchMore=20,
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    38
	ThreadPriorityRealTime=30,
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    39
	ThreadPriorityAbsoluteVeryLow=100,
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    40
	ThreadPriorityAbsoluteLowNormal=150,
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    41
	ThreadPriorityAbsoluteLow=200,
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    42
	ThreadPriorityAbsoluteBackgroundNormal=250,
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    43
	ThreadPriorityAbsoluteBackground=300,
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    44
	ThreadPriorityAbsoluteForegroundNormal=350,
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    45
	ThreadPriorityAbsoluteForeground=400,
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    46
	ThreadPriorityAbsoluteHighNormal=450,
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    47
	ThreadPriorityAbsoluteHigh=500,
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    48
	ThreadPriorityAbsoluteRealTime1=810,
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    49
	ThreadPriorityAbsoluteRealTime2=820,
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    50
	ThreadPriorityAbsoluteRealTime3=830,
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    51
	ThreadPriorityAbsoluteRealTime4=840,
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    52
	ThreadPriorityAbsoluteRealTime5=850,
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    53
	ThreadPriorityAbsoluteRealTime6=860,
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    54
	ThreadPriorityAbsoluteRealTime7=870, 
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    55
	ThreadPriorityAbsoluteRealTime8=880
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    56
};
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    57
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    58
enum KernelObjectType
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    59
{
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    60
	KernelObjectTypeUnknown = -1,
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    61
	KernelObjectTypeThread = 0,
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    62
	KernelObjectTypeProcess,
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    63
	KernelObjectTypeChunk,
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    64
	KernelObjectTypeLibrary,
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    65
	KernelObjectTypeSemaphore,
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    66
	KernelObjectTypeMutex,
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    67
	KernelObjectTypeTimer,
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    68
	KernelObjectTypeServer,
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    69
	KernelObjectTypeSession,
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    70
	KernelObjectTypeLogicalDevice,
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    71
	KernelObjectTypePhysicalDevice,
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    72
	KernelObjectTypeLogicalChannel,
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    73
	KernelObjectTypeChangeNotifier,
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    74
	KernelObjectTypeUndertaker,
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    75
	KernelObjectTypeMsgQueue,
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    76
	KernelObjectTypePropertyRef,
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    77
	KernelObjectTypeCondVar
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    78
};
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    79
26
hgs
parents: 17
diff changeset
    80
enum ThreadInfoType
hgs
parents: 17
diff changeset
    81
{
hgs
parents: 17
diff changeset
    82
	ThreadInfoTypeGeneral = EMemSpyThreadInfoItemTypeGeneralInfo,
hgs
parents: 17
diff changeset
    83
	ThreadInfoTypeHeap = EMemSpyThreadInfoItemTypeHeap,
hgs
parents: 17
diff changeset
    84
	ThreadInfoTypeStack = EMemSpyThreadInfoItemTypeStack,
hgs
parents: 17
diff changeset
    85
	ThreadInfoTypeChunk = EMemSpyThreadInfoItemTypeChunk,
hgs
parents: 17
diff changeset
    86
	ThreadInfoTypeCodeSeg = EMemSpyThreadInfoItemTypeCodeSeg,
hgs
parents: 17
diff changeset
    87
	ThreadInfoTypeOpenFiles = EMemSpyThreadInfoItemTypeOpenFiles,
hgs
parents: 17
diff changeset
    88
	ThreadInfoTypeActiveObjects = EMemSpyThreadInfoItemTypeActiveObject,
hgs
parents: 17
diff changeset
    89
	ThreadInfoTypeOwnedThreadHandles = EMemSpyThreadInfoItemTypeOwnedThreadHandles,
hgs
parents: 17
diff changeset
    90
	ThreadInfoTypeOwnedProcessHandles = EMemSpyThreadInfoItemTypeOwnedProcessHandles,
hgs
parents: 17
diff changeset
    91
	ThreadInfoTypeServer = EMemSpyThreadInfoItemTypeServer,
hgs
parents: 17
diff changeset
    92
	ThreadInfoTypeSession = EMemSpyThreadInfoItemTypeSession,
hgs
parents: 17
diff changeset
    93
	ThreadInfoTypeSemaphore = EMemSpyThreadInfoItemTypeSemaphore,
hgs
parents: 17
diff changeset
    94
	ThreadInfoTypeOtherThreads = EMemSpyThreadInfoItemTypeOtherThreads,
hgs
parents: 17
diff changeset
    95
	ThreadInfoTypeOtherProcesses = EMemSpyThreadInfoItemTypeOtherProcesses,
hgs
parents: 17
diff changeset
    96
	ThreadInfoTypeMutex = EMemSpyThreadInfoItemTypeMutex,
hgs
parents: 17
diff changeset
    97
	ThreadInfoTypeTimer = EMemSpyThreadInfoItemTypeTimer,
hgs
parents: 17
diff changeset
    98
	ThreadInfoTypeChannel = EMemSpyThreadInfoItemTypeLogicalChannel,
hgs
parents: 17
diff changeset
    99
	ThreadInfoTypeChangeNotifier = EMemSpyThreadInfoItemTypeChangeNotifier,
hgs
parents: 17
diff changeset
   100
	ThreadInfoTypeUndertaker = EMemSpyThreadInfoItemTypeUndertaker,
hgs
parents: 17
diff changeset
   101
	ThreadInfoTypeMessageQueue = EMemSpyThreadInfoItemTypeMessageQueue,
hgs
parents: 17
diff changeset
   102
	ThreadInfoTypeConditionalVariable = EMemSpyThreadInfoItemTypeConditionalVariable,
hgs
parents: 17
diff changeset
   103
	ThreadInfoTypeLDD = EMemSpyThreadInfoItemTypeLDD,
hgs
parents: 17
diff changeset
   104
	ThreadInfoTypePDD = EMemSpyThreadInfoItemTypePDD,
hgs
parents: 17
diff changeset
   105
};
hgs
parents: 17
diff changeset
   106
31
hgs
parents: 26
diff changeset
   107
enum DeviceWideOperation
hgs
parents: 26
diff changeset
   108
{
hgs
parents: 26
diff changeset
   109
	OutputPhoneInfo = 0,
hgs
parents: 26
diff changeset
   110
	    
hgs
parents: 26
diff changeset
   111
	OutputDetailedPhoneInfo,
hgs
parents: 26
diff changeset
   112
	    
hgs
parents: 26
diff changeset
   113
	OutputHeapInfo,
hgs
parents: 26
diff changeset
   114
	    
hgs
parents: 26
diff changeset
   115
	OutputCompactHeapInfo,
hgs
parents: 26
diff changeset
   116
	    
hgs
parents: 26
diff changeset
   117
	OutputHeapCellListing,
hgs
parents: 26
diff changeset
   118
	    
hgs
parents: 26
diff changeset
   119
	OutputHeapData,
hgs
parents: 26
diff changeset
   120
	    
hgs
parents: 26
diff changeset
   121
	OutputStackInfo,
hgs
parents: 26
diff changeset
   122
	    
hgs
parents: 26
diff changeset
   123
	OutputCompactStackInfo,
hgs
parents: 26
diff changeset
   124
	    
hgs
parents: 26
diff changeset
   125
	OutputUserStackData,
hgs
parents: 26
diff changeset
   126
	    
hgs
parents: 26
diff changeset
   127
	OutputKernelStackData
hgs
parents: 26
diff changeset
   128
};
hgs
parents: 26
diff changeset
   129
hgs
parents: 26
diff changeset
   130
enum SwmtMode
hgs
parents: 26
diff changeset
   131
{
hgs
parents: 26
diff changeset
   132
	SwmtModeBasic = 0,
hgs
parents: 26
diff changeset
   133
	SwmtModeFull,
hgs
parents: 26
diff changeset
   134
	SwmtModeCustom
hgs
parents: 26
diff changeset
   135
};
hgs
parents: 26
diff changeset
   136
hgs
parents: 26
diff changeset
   137
enum HeapDumpsMode
hgs
parents: 26
diff changeset
   138
{
hgs
parents: 26
diff changeset
   139
	HeapDumpsModeKernel = 0,
hgs
parents: 26
diff changeset
   140
	HeapDumpsModeUser,
hgs
parents: 26
diff changeset
   141
	HeapDumpsModeBoth
hgs
parents: 26
diff changeset
   142
};
hgs
parents: 26
diff changeset
   143
hgs
parents: 26
diff changeset
   144
enum OutputMode
hgs
parents: 26
diff changeset
   145
{
hgs
parents: 26
diff changeset
   146
	OutputModeTrace = 0,
hgs
parents: 26
diff changeset
   147
	OutputModeFile
hgs
parents: 26
diff changeset
   148
};
hgs
parents: 26
diff changeset
   149
26
hgs
parents: 17
diff changeset
   150
class MemSpyProcess
hgs
parents: 17
diff changeset
   151
{
hgs
parents: 17
diff changeset
   152
public:
hgs
parents: 17
diff changeset
   153
	MemSpyProcess(CMemSpyApiProcess* process)
hgs
parents: 17
diff changeset
   154
		: mProcess(process)
hgs
parents: 17
diff changeset
   155
	{}
hgs
parents: 17
diff changeset
   156
	
31
hgs
parents: 26
diff changeset
   157
	virtual  ~MemSpyProcess() { delete mProcess; }
26
hgs
parents: 17
diff changeset
   158
	
hgs
parents: 17
diff changeset
   159
	ProcessId id() const { return mProcess->Id(); }
hgs
parents: 17
diff changeset
   160
	
hgs
parents: 17
diff changeset
   161
	QString name() const { return QString((QChar*) mProcess->Name().Ptr(), mProcess->Name().Length()); }
hgs
parents: 17
diff changeset
   162
	
31
hgs
parents: 26
diff changeset
   163
	QString exitInfo() const;
hgs
parents: 26
diff changeset
   164
	
hgs
parents: 26
diff changeset
   165
	int priority() const { return mProcess->Priority(); }
hgs
parents: 26
diff changeset
   166
	
hgs
parents: 26
diff changeset
   167
	int threadCount() const { return mProcess->ThreadCount(); }
hgs
parents: 26
diff changeset
   168
	
hgs
parents: 26
diff changeset
   169
	int sid() const { return mProcess->SID(); }
hgs
parents: 26
diff changeset
   170
	
hgs
parents: 26
diff changeset
   171
	int vid() const { return mProcess->VID(); }
hgs
parents: 26
diff changeset
   172
	
hgs
parents: 26
diff changeset
   173
	bool isDead() const { return mProcess->IsDead(); }
26
hgs
parents: 17
diff changeset
   174
	
hgs
parents: 17
diff changeset
   175
private:
hgs
parents: 17
diff changeset
   176
	CMemSpyApiProcess *mProcess;
hgs
parents: 17
diff changeset
   177
};
hgs
parents: 17
diff changeset
   178
17
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   179
class MemSpyThread
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   180
{
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   181
public:
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   182
	MemSpyThread(CMemSpyApiThread* thread)
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   183
		: mThread(thread)
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   184
	{}
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   185
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   186
	virtual ~MemSpyThread() { delete mThread;	}
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   187
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   188
	ThreadId id() const { return mThread->Id(); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   189
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   190
	QString name() const { return QString((QChar*) mThread->Name().Ptr(), mThread->Name().Length()); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   191
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   192
	int priority() const { return mThread->ThreadPriority(); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   193
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   194
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   195
private:
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   196
	CMemSpyApiThread *mThread;
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   197
};
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   198
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   199
class MemSpyKernelObjectType
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   200
{
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   201
public:
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   202
	MemSpyKernelObjectType(CMemSpyApiKernelObject* type)
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   203
		: mType(type)
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   204
	{}
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   205
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   206
	virtual ~MemSpyKernelObjectType() { delete mType; }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   207
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   208
	int id() const { return mType->Type(); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   209
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   210
	QString name() const { return QString((QChar*) mType->Name().Ptr(), mType->Name().Length()); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   211
	
26
hgs
parents: 17
diff changeset
   212
	int count() const { return mType->Count(); }
hgs
parents: 17
diff changeset
   213
	
hgs
parents: 17
diff changeset
   214
	qint64 size() const { return mType->Size(); }
hgs
parents: 17
diff changeset
   215
	
17
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   216
private:
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   217
	CMemSpyApiKernelObject *mType;
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   218
};
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   219
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   220
class MemSpyKernelObject
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   221
{
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   222
public:
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   223
	MemSpyKernelObject(CMemSpyApiKernelObjectItem* object)
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   224
		: mObject(object)
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   225
	{}
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   226
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   227
	virtual ~MemSpyKernelObject() { delete mObject; }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   228
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   229
	int type() const { return mObject->Type(); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   230
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   231
	QString name() const { return QString::fromLatin1((char*)mObject->Name().Ptr(), mObject->Name().Length()); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   232
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   233
	QString nameDetail() const { return QString::fromLatin1((char*)mObject->NameDetail().Ptr(), mObject->NameDetail().Length()); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   234
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   235
	int accessCount() const { return mObject->AccessCount(); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   236
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   237
	int uniqueId() const { return mObject->UniqueID(); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   238
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   239
	unsigned int protection() const { return mObject->Protection(); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   240
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   241
	unsigned int addressOfKernelOwner() const { return reinterpret_cast<unsigned int>(mObject->AddressOfKernelOwner()); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   242
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   243
	unsigned int kernelAddress() const { return reinterpret_cast<unsigned int>(mObject->Handle()); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   244
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   245
	unsigned int addressOfOwningProcess() const { return reinterpret_cast<unsigned int>(mObject->AddressOfOwningProcess()); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   246
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   247
	int id() const { return mObject->Id(); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   248
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   249
	int priority() const { return mObject->Priority(); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   250
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   251
	QString nameOfOwner() const { return QString::fromLatin1((char*)mObject->NameOfOwner().Ptr(), mObject->NameOfOwner().Length()); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   252
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   253
	unsigned int creatorId() const { return mObject->CreatorId(); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   254
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   255
	int attributes() const { return mObject->Attributes(); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   256
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   257
	unsigned int addressOfDataBssStackChunk() const { return reinterpret_cast<unsigned int>(mObject->AddressOfDataBssStackChunk()); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   258
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   259
	unsigned int securityZone() const { return mObject->SecurityZone(); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   260
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   261
	unsigned int size() const { return mObject->Size(); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   262
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   263
	unsigned int maxSize() const { return mObject->MaxSize(); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   264
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   265
	unsigned int bottom() const { return mObject->Bottom(); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   266
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   267
	unsigned int top() const { return mObject->Top(); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   268
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   269
	unsigned int startPos() const { return mObject->StartPos(); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   270
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   271
	unsigned int controllingOwner() const { return mObject->ControllingOwner(); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   272
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   273
	unsigned int restrictions() const { return mObject->Restrictions(); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   274
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   275
	unsigned int mapAttr() const { return mObject->Restrictions(); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   276
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   277
	unsigned int chunkType() const { return mObject->ChunkType(); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   278
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   279
	int mapCount() const { return mObject->MapCount(); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   280
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   281
	unsigned int state() const { return mObject->State(); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   282
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   283
	unsigned int addressOfCodeSeg() const { return reinterpret_cast<unsigned int>(mObject->AddressOfCodeSeg()); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   284
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   285
	unsigned int resetting() const { return mObject->Resetting(); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   286
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   287
	unsigned int order() const { return mObject->Order(); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   288
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   289
	QString version() const { return QString((QChar*) mObject->Version().Name().Ptr(), mObject->Version().Name().Length()); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   290
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   291
	unsigned int parseMask() const { return mObject->ParseMask(); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   292
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   293
	unsigned int unitsMask() const { return mObject->UnitsMask(); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   294
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   295
	unsigned int changes() const { return mObject->Changes(); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   296
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   297
	int count() const { return mObject->Count(); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   298
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   299
	int waitCount() const { return mObject->WaitCount(); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   300
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   301
	int sessionType() const { return mObject->SessionType(); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   302
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   303
	int timerType() const { return mObject->TimerType(); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   304
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   305
	int timerState() const { return mObject->TimerState(); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   306
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   307
	unsigned int addressOfOwningThread() const { return reinterpret_cast<unsigned int>(mObject->AddressOfOwningThread()); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   308
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   309
	unsigned int addressOfServer() const { return reinterpret_cast<unsigned int>(mObject->AddressOfServer()); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   310
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   311
	unsigned int svrSessionType() const { return mObject->SvrSessionType(); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   312
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   313
	int msgCount() const { return mObject->MsgCount(); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   314
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   315
	int msgLimit() const { return mObject->MsgLimit(); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   316
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   317
	unsigned int totalAccessCount() const { return mObject->TotalAccessCount(); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   318
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   319
	int openChannels() const { return mObject->OpenChannels(); }
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   320
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   321
private:
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   322
	CMemSpyApiKernelObjectItem *mObject;
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   323
};
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   324
26
hgs
parents: 17
diff changeset
   325
class MemSpyThreadInfoItem 
hgs
parents: 17
diff changeset
   326
{
hgs
parents: 17
diff changeset
   327
public:
hgs
parents: 17
diff changeset
   328
	MemSpyThreadInfoItem(CMemSpyApiThreadInfoItem *item)
hgs
parents: 17
diff changeset
   329
		: mItem(item)
hgs
parents: 17
diff changeset
   330
	{}
hgs
parents: 17
diff changeset
   331
	
hgs
parents: 17
diff changeset
   332
	virtual  ~MemSpyThreadInfoItem() { delete mItem;	}
hgs
parents: 17
diff changeset
   333
	
hgs
parents: 17
diff changeset
   334
	QString caption() const { return QString((QChar*) mItem->Caption().Ptr(), mItem->Caption().Length()); }
hgs
parents: 17
diff changeset
   335
	
hgs
parents: 17
diff changeset
   336
	QString value() const { return QString((QChar*) mItem->Value().Ptr(), mItem->Value().Length()); }
hgs
parents: 17
diff changeset
   337
	
hgs
parents: 17
diff changeset
   338
private:
hgs
parents: 17
diff changeset
   339
	CMemSpyApiThreadInfoItem* mItem;
hgs
parents: 17
diff changeset
   340
};
hgs
parents: 17
diff changeset
   341
31
hgs
parents: 26
diff changeset
   342
class MemSpyDwoProgressTracker : public QObject, public CActive
hgs
parents: 26
diff changeset
   343
{
hgs
parents: 26
diff changeset
   344
	Q_OBJECT
hgs
parents: 26
diff changeset
   345
hgs
parents: 26
diff changeset
   346
public:
hgs
parents: 26
diff changeset
   347
	MemSpyDwoProgressTracker(RMemSpySession &session);
hgs
parents: 26
diff changeset
   348
	virtual ~MemSpyDwoProgressTracker();
hgs
parents: 26
diff changeset
   349
	
hgs
parents: 26
diff changeset
   350
public slots:
hgs
parents: 26
diff changeset
   351
hgs
parents: 26
diff changeset
   352
	void start();
hgs
parents: 26
diff changeset
   353
hgs
parents: 26
diff changeset
   354
	void cancel();
hgs
parents: 26
diff changeset
   355
	
hgs
parents: 26
diff changeset
   356
protected: // from CActive
hgs
parents: 26
diff changeset
   357
	
hgs
parents: 26
diff changeset
   358
	virtual void RunL();
hgs
parents: 26
diff changeset
   359
	 
hgs
parents: 26
diff changeset
   360
	virtual void DoCancel();
hgs
parents: 26
diff changeset
   361
	 
hgs
parents: 26
diff changeset
   362
	virtual TInt RunError(TInt aError);
hgs
parents: 26
diff changeset
   363
	
hgs
parents: 26
diff changeset
   364
signals:
hgs
parents: 26
diff changeset
   365
	void progress(int progress, const QString& processName);
hgs
parents: 26
diff changeset
   366
	
hgs
parents: 26
diff changeset
   367
private:
hgs
parents: 26
diff changeset
   368
	TMemSpyDeviceWideOperationProgress mProgress;
hgs
parents: 26
diff changeset
   369
	RMemSpySession mSession;
hgs
parents: 26
diff changeset
   370
};
hgs
parents: 26
diff changeset
   371
hgs
parents: 26
diff changeset
   372
class MemSpyDwoTracker : public QObject, public CActive
hgs
parents: 26
diff changeset
   373
{
hgs
parents: 26
diff changeset
   374
	Q_OBJECT
hgs
parents: 26
diff changeset
   375
hgs
parents: 26
diff changeset
   376
public:
hgs
parents: 26
diff changeset
   377
	MemSpyDwoTracker(RMemSpySession &session, DeviceWideOperation operation);
hgs
parents: 26
diff changeset
   378
	virtual ~MemSpyDwoTracker();
hgs
parents: 26
diff changeset
   379
	
hgs
parents: 26
diff changeset
   380
public slots:
hgs
parents: 26
diff changeset
   381
hgs
parents: 26
diff changeset
   382
	void start();
hgs
parents: 26
diff changeset
   383
	
hgs
parents: 26
diff changeset
   384
	void cancel();
hgs
parents: 26
diff changeset
   385
	
hgs
parents: 26
diff changeset
   386
protected: // from CActive
hgs
parents: 26
diff changeset
   387
	
hgs
parents: 26
diff changeset
   388
	virtual void RunL();
hgs
parents: 26
diff changeset
   389
	 
hgs
parents: 26
diff changeset
   390
	virtual void DoCancel();
hgs
parents: 26
diff changeset
   391
	 
hgs
parents: 26
diff changeset
   392
	virtual TInt RunError(TInt aError);
hgs
parents: 26
diff changeset
   393
	
hgs
parents: 26
diff changeset
   394
signals:
hgs
parents: 26
diff changeset
   395
	void finished(int errorCode);
hgs
parents: 26
diff changeset
   396
	void progress(int progress, const QString& processName);
hgs
parents: 26
diff changeset
   397
	
hgs
parents: 26
diff changeset
   398
private:
hgs
parents: 26
diff changeset
   399
	RMemSpySession mSession;
hgs
parents: 26
diff changeset
   400
	MemSpyDwoProgressTracker *mProgressTracker;
hgs
parents: 26
diff changeset
   401
	DeviceWideOperation mOperation;
hgs
parents: 26
diff changeset
   402
};
hgs
parents: 26
diff changeset
   403
hgs
parents: 26
diff changeset
   404
class MemSpyAsyncTracker : public QObject, public CActive
hgs
parents: 26
diff changeset
   405
{
hgs
parents: 26
diff changeset
   406
	Q_OBJECT
hgs
parents: 26
diff changeset
   407
	
hgs
parents: 26
diff changeset
   408
public:
hgs
parents: 26
diff changeset
   409
	
hgs
parents: 26
diff changeset
   410
	MemSpyAsyncTracker(RMemSpySession& session, void (RMemSpySession::*function)(TRequestStatus&));
hgs
parents: 26
diff changeset
   411
	
hgs
parents: 26
diff changeset
   412
	void start();
hgs
parents: 26
diff changeset
   413
	
hgs
parents: 26
diff changeset
   414
	virtual void RunL();
hgs
parents: 26
diff changeset
   415
	
hgs
parents: 26
diff changeset
   416
	virtual void DoCancel();
hgs
parents: 26
diff changeset
   417
	
hgs
parents: 26
diff changeset
   418
	virtual TInt RunError(TInt aError);
hgs
parents: 26
diff changeset
   419
	
hgs
parents: 26
diff changeset
   420
signals:
hgs
parents: 26
diff changeset
   421
	
hgs
parents: 26
diff changeset
   422
	void finished(int errorCode);
hgs
parents: 26
diff changeset
   423
	
hgs
parents: 26
diff changeset
   424
private:
hgs
parents: 26
diff changeset
   425
	void (RMemSpySession::*mFunction)(TRequestStatus&);
hgs
parents: 26
diff changeset
   426
	RMemSpySession& mSession;
hgs
parents: 26
diff changeset
   427
};
hgs
parents: 26
diff changeset
   428
hgs
parents: 26
diff changeset
   429
class MemSpySwmtDumpTracker : public MemSpyAsyncTracker
17
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   430
{
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   431
public:
31
hgs
parents: 26
diff changeset
   432
	MemSpySwmtDumpTracker(RMemSpySession& session) : 
hgs
parents: 26
diff changeset
   433
		MemSpyAsyncTracker(session, &RMemSpySession::ForceSwmtUpdate)
hgs
parents: 26
diff changeset
   434
	{}
hgs
parents: 26
diff changeset
   435
};
hgs
parents: 26
diff changeset
   436
hgs
parents: 26
diff changeset
   437
class MemSpyKernelHeapDumpTracker : public MemSpyAsyncTracker
hgs
parents: 26
diff changeset
   438
{
hgs
parents: 26
diff changeset
   439
public:
hgs
parents: 26
diff changeset
   440
	MemSpyKernelHeapDumpTracker(RMemSpySession& session) : 
hgs
parents: 26
diff changeset
   441
		MemSpyAsyncTracker(session, &RMemSpySession::OutputKernelHeapData)
hgs
parents: 26
diff changeset
   442
	{}
hgs
parents: 26
diff changeset
   443
};
hgs
parents: 26
diff changeset
   444
hgs
parents: 26
diff changeset
   445
class MemSpySettings : private QSettings
hgs
parents: 26
diff changeset
   446
{
hgs
parents: 26
diff changeset
   447
public:
hgs
parents: 26
diff changeset
   448
	
hgs
parents: 26
diff changeset
   449
	MemSpySettings();
hgs
parents: 26
diff changeset
   450
	
hgs
parents: 26
diff changeset
   451
	OutputMode outputMode() const;
hgs
parents: 26
diff changeset
   452
	void setOutputMode(OutputMode mode);
hgs
parents: 26
diff changeset
   453
	
hgs
parents: 26
diff changeset
   454
	QString outputPath() const;
hgs
parents: 26
diff changeset
   455
	void setOutputPath(const QString& path);
hgs
parents: 26
diff changeset
   456
		
hgs
parents: 26
diff changeset
   457
	int swmtTimerPeriod() const;
hgs
parents: 26
diff changeset
   458
	void setSwmtTimerPeriod(int period);
hgs
parents: 26
diff changeset
   459
	
hgs
parents: 26
diff changeset
   460
	SwmtMode swmtMode() const;
hgs
parents: 26
diff changeset
   461
	void setSwmtMode(SwmtMode mode);
hgs
parents: 26
diff changeset
   462
	
hgs
parents: 26
diff changeset
   463
	QVariantList swmtCategories() const;
hgs
parents: 26
diff changeset
   464
	void setSwmtCategories(const QVariantList& categories);
hgs
parents: 26
diff changeset
   465
	
hgs
parents: 26
diff changeset
   466
	HeapDumpsMode heapDumpsMode() const;
hgs
parents: 26
diff changeset
   467
	void setHeapDumpsMode(HeapDumpsMode mode);
hgs
parents: 26
diff changeset
   468
};
hgs
parents: 26
diff changeset
   469
hgs
parents: 26
diff changeset
   470
class EngineWrapper : public QObject
hgs
parents: 26
diff changeset
   471
{
hgs
parents: 26
diff changeset
   472
	Q_OBJECT
hgs
parents: 26
diff changeset
   473
	
hgs
parents: 26
diff changeset
   474
public:
hgs
parents: 26
diff changeset
   475
	EngineWrapper();
hgs
parents: 26
diff changeset
   476
	
17
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   477
	virtual ~EngineWrapper();
31
hgs
parents: 26
diff changeset
   478
	
17
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   479
	bool initialize();
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   480
	
31
hgs
parents: 26
diff changeset
   481
	MemSpySettings& settings();
hgs
parents: 26
diff changeset
   482
	
hgs
parents: 26
diff changeset
   483
	const MemSpySettings& settings() const;
hgs
parents: 26
diff changeset
   484
	
hgs
parents: 26
diff changeset
   485
	
hgs
parents: 26
diff changeset
   486
	
17
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   487
	QList<MemSpyProcess*> getProcesses();
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   488
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   489
	QList<MemSpyThread*> getThreads(ProcessId processId);
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   490
	
26
hgs
parents: 17
diff changeset
   491
	QList<MemSpyThreadInfoItem*> getThreadInfo(ThreadId threadId, ThreadInfoType type);
hgs
parents: 17
diff changeset
   492
	
17
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   493
	void setThreadPriority(ThreadId threadId, ThreadPriority priority);
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   494
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   495
	QList<MemSpyKernelObjectType*> getKernelObjectTypes();
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   496
	
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   497
	QList<MemSpyKernelObject*> getKernelObjects(int type);
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   498
	
31
hgs
parents: 26
diff changeset
   499
	MemSpyDwoTracker* createDeviceWideOperation(DeviceWideOperation operation);
hgs
parents: 26
diff changeset
   500
	
hgs
parents: 26
diff changeset
   501
	MemSpyKernelHeapDumpTracker* createKernelHeapDumpTracker();
hgs
parents: 26
diff changeset
   502
	
hgs
parents: 26
diff changeset
   503
	MemSpySwmtDumpTracker* createSwmtDumpTracker();
hgs
parents: 26
diff changeset
   504
	
hgs
parents: 26
diff changeset
   505
	void setSwmtSettings(SwmtMode mode, const QVariantList& categories);
hgs
parents: 26
diff changeset
   506
	
hgs
parents: 26
diff changeset
   507
	bool isSwmtRunning();
hgs
parents: 26
diff changeset
   508
	
hgs
parents: 26
diff changeset
   509
	void startSwmt(int period);
hgs
parents: 26
diff changeset
   510
	
hgs
parents: 26
diff changeset
   511
	void stopSwmt();
hgs
parents: 26
diff changeset
   512
	
hgs
parents: 26
diff changeset
   513
	void forceSwmtDump();
hgs
parents: 26
diff changeset
   514
	
hgs
parents: 26
diff changeset
   515
	void outputKernelHeapData();
hgs
parents: 26
diff changeset
   516
	
hgs
parents: 26
diff changeset
   517
	int outputThreadHeapData(const QString& filter);
hgs
parents: 26
diff changeset
   518
	
hgs
parents: 26
diff changeset
   519
	void updateOutputSettings();
hgs
parents: 26
diff changeset
   520
	
17
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   521
private:
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   522
	RMemSpySession mSession;
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   523
	
31
hgs
parents: 26
diff changeset
   524
	bool mSwmtRunning;
hgs
parents: 26
diff changeset
   525
	
hgs
parents: 26
diff changeset
   526
	MemSpySettings mSettings;
17
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   527
};
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   528
4f2773374eff Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   529
#endif /* ENGINEWRAPPER_H_ */