62
|
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/memspyapichunk.h>
|
|
19 |
#include <memspy/engine/memspychunkdata.h>
|
|
20 |
|
|
21 |
|
|
22 |
EXPORT_C CMemSpyApiChunk::~CMemSpyApiChunk()
|
|
23 |
{
|
|
24 |
delete iChunkData;
|
|
25 |
}
|
|
26 |
|
|
27 |
EXPORT_C const TDesC& CMemSpyApiChunk::Name() const
|
|
28 |
{
|
|
29 |
return iChunkData->iName;
|
|
30 |
}
|
|
31 |
|
|
32 |
EXPORT_C const TDesC& CMemSpyApiChunk::OwnerName() const
|
|
33 |
{
|
|
34 |
return iChunkData->iOwnerName;
|
|
35 |
}
|
|
36 |
|
|
37 |
EXPORT_C TUint8* CMemSpyApiChunk::Handle() const
|
|
38 |
{
|
|
39 |
return iChunkData->iHandle;
|
|
40 |
}
|
|
41 |
|
|
42 |
EXPORT_C TUint8* CMemSpyApiChunk::BaseAddress() const
|
|
43 |
{
|
|
44 |
return iChunkData->iBaseAddress;
|
|
45 |
}
|
|
46 |
|
|
47 |
EXPORT_C TUint CMemSpyApiChunk::Size() const
|
|
48 |
{
|
|
49 |
return iChunkData->iSize;
|
|
50 |
}
|
|
51 |
|
|
52 |
EXPORT_C TUint CMemSpyApiChunk::MaxSize() const
|
|
53 |
{
|
|
54 |
return iChunkData->iMaxSize;
|
|
55 |
}
|
|
56 |
|
|
57 |
EXPORT_C TUint CMemSpyApiChunk::OwnerId() const
|
|
58 |
{
|
|
59 |
return iChunkData->iOwnerId;
|
|
60 |
}
|
|
61 |
|
|
62 |
EXPORT_C TMemSpyDriverChunkType CMemSpyApiChunk::ChunkType() const
|
|
63 |
{
|
|
64 |
return iChunkData->iType;
|
|
65 |
}
|
|
66 |
|
|
67 |
EXPORT_C TInt CMemSpyApiChunk::Attributes() const
|
|
68 |
{
|
|
69 |
return iChunkData->iAttributes;
|
|
70 |
}
|
|
71 |
|
|
72 |
CMemSpyApiChunk::CMemSpyApiChunk() : iChunkData(0)
|
|
73 |
{
|
|
74 |
}
|
|
75 |
|
|
76 |
void CMemSpyApiChunk::ConstructL(const TMemSpyChunkData& aData)
|
|
77 |
{
|
|
78 |
iChunkData = new (ELeave) TMemSpyChunkData(aData);
|
|
79 |
}
|
|
80 |
|
|
81 |
CMemSpyApiChunk* CMemSpyApiChunk::NewL(const TMemSpyChunkData& aData)
|
|
82 |
{
|
|
83 |
CMemSpyApiChunk* self = CMemSpyApiChunk::NewLC(aData);
|
|
84 |
CleanupStack::Pop(self);
|
|
85 |
return (self);
|
|
86 |
}
|
|
87 |
|
|
88 |
CMemSpyApiChunk* CMemSpyApiChunk::NewLC(const TMemSpyChunkData& aData)
|
|
89 |
{
|
|
90 |
CMemSpyApiChunk* self = new (ELeave) CMemSpyApiChunk;
|
|
91 |
CleanupStack::PushL(self);
|
|
92 |
self->ConstructL(aData);
|
|
93 |
return (self);
|
|
94 |
}
|