26
|
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 |
#include <memspy/api/memspyapithread.h>
|
|
19 |
#include <memspy/engine/memspythreaddata.h>
|
|
20 |
|
|
21 |
|
|
22 |
EXPORT_C CMemSpyApiThread::~CMemSpyApiThread()
|
|
23 |
{
|
|
24 |
delete iThreadData;
|
|
25 |
}
|
|
26 |
|
|
27 |
EXPORT_C TThreadId CMemSpyApiThread::Id() const
|
|
28 |
{
|
|
29 |
return iThreadData->iId;
|
|
30 |
}
|
|
31 |
|
|
32 |
EXPORT_C TProcessId CMemSpyApiThread::ProcessId() const
|
|
33 |
{
|
|
34 |
return iThreadData->iPid;
|
|
35 |
}
|
|
36 |
|
|
37 |
EXPORT_C const TDesC& CMemSpyApiThread::Name() const
|
|
38 |
{
|
|
39 |
return iThreadData->iName;
|
|
40 |
}
|
|
41 |
|
|
42 |
EXPORT_C TInt CMemSpyApiThread::SID() const
|
|
43 |
{
|
|
44 |
return iThreadData->iSID;
|
|
45 |
}
|
|
46 |
|
|
47 |
|
|
48 |
EXPORT_C TInt CMemSpyApiThread::VID() const
|
|
49 |
{
|
|
50 |
return iThreadData->iVID;
|
|
51 |
}
|
|
52 |
|
|
53 |
EXPORT_C TThreadPriority CMemSpyApiThread::ThreadPriority() const
|
|
54 |
{
|
|
55 |
return iThreadData->iThreadPriority;
|
|
56 |
}
|
|
57 |
|
|
58 |
EXPORT_C TProcessPriority CMemSpyApiThread::ProcessPriority() const
|
|
59 |
{
|
|
60 |
return iThreadData->iProcessPriority;
|
|
61 |
}
|
|
62 |
|
|
63 |
EXPORT_C TInt CMemSpyApiThread::RequestCount() const
|
|
64 |
{
|
|
65 |
return iThreadData->iRequestCount;
|
|
66 |
}
|
|
67 |
|
|
68 |
EXPORT_C TInt CMemSpyApiThread::ThreadHandles() const
|
|
69 |
{
|
|
70 |
return iThreadData->iThreadHandles;
|
|
71 |
}
|
|
72 |
|
|
73 |
EXPORT_C TInt CMemSpyApiThread::ProcessHandles() const
|
|
74 |
{
|
|
75 |
return iThreadData->iProcessHandles;
|
|
76 |
}
|
|
77 |
|
|
78 |
EXPORT_C TInt CMemSpyApiThread::ThreadNumberUsing() const
|
|
79 |
{
|
|
80 |
return iThreadData->iThreadNumberUsing;
|
|
81 |
}
|
|
82 |
|
|
83 |
EXPORT_C TInt CMemSpyApiThread::ProcessNumberUsing() const
|
|
84 |
{
|
|
85 |
return iThreadData->iProcessNumberUsing;
|
|
86 |
}
|
|
87 |
|
|
88 |
EXPORT_C TInt CMemSpyApiThread::Attributes() const
|
|
89 |
{
|
|
90 |
return iThreadData->iAttributes;
|
|
91 |
}
|
|
92 |
|
|
93 |
EXPORT_C TInt CMemSpyApiThread::CpuUse() const
|
|
94 |
{
|
|
95 |
return iThreadData->iCpuUse;
|
|
96 |
}
|
|
97 |
|
|
98 |
EXPORT_C TExitType CMemSpyApiThread::ExitType() const
|
|
99 |
{
|
|
100 |
return iThreadData->iExitType;
|
|
101 |
}
|
|
102 |
|
|
103 |
CMemSpyApiThread::CMemSpyApiThread() : iThreadData(0)
|
|
104 |
{
|
|
105 |
}
|
|
106 |
|
|
107 |
void CMemSpyApiThread::ConstructL(const TMemSpyThreadData& aData)
|
|
108 |
{
|
|
109 |
iThreadData = new (ELeave) TMemSpyThreadData(aData);
|
|
110 |
}
|
|
111 |
|
|
112 |
CMemSpyApiThread* CMemSpyApiThread::NewL(const TMemSpyThreadData& aData)
|
|
113 |
{
|
|
114 |
CMemSpyApiThread* self = CMemSpyApiThread::NewLC(aData);
|
|
115 |
CleanupStack::Pop(self);
|
|
116 |
return (self);
|
|
117 |
}
|
|
118 |
|
|
119 |
CMemSpyApiThread* CMemSpyApiThread::NewLC(const TMemSpyThreadData& aData)
|
|
120 |
{
|
|
121 |
CMemSpyApiThread* self = new (ELeave) CMemSpyApiThread;
|
|
122 |
CleanupStack::PushL(self);
|
|
123 |
self->ConstructL(aData);
|
|
124 |
return (self);
|
|
125 |
}
|