51
|
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 |
#ifndef MEMSPYDRIVERLOGICALCHANCONTAINERBASE_H
|
|
19 |
#define MEMSPYDRIVERLOGICALCHANCONTAINERBASE_H
|
|
20 |
|
|
21 |
// System includes
|
|
22 |
#include <e32cmn.h>
|
|
23 |
#include <kern_priv.h>
|
|
24 |
|
|
25 |
// User includes
|
|
26 |
#include "MemSpyDriverLogChanBase.h"
|
|
27 |
#include <memspy/driver/memspydriverenumerationsshared.h>
|
|
28 |
|
|
29 |
// Classes referenced
|
|
30 |
class DMemSpyDriverDevice;
|
|
31 |
|
|
32 |
// Constants
|
|
33 |
const TInt KMemSpyDriverMaxHandles = 1024 * 2;
|
|
34 |
|
|
35 |
|
|
36 |
class DMemSpyDriverLogChanContainerBase : public DMemSpyDriverLogChanBase
|
|
37 |
{
|
|
38 |
public:
|
|
39 |
DMemSpyDriverLogChanContainerBase( DMemSpyDriverDevice& aDevice, DThread& aThread );
|
|
40 |
~DMemSpyDriverLogChanContainerBase();
|
|
41 |
|
|
42 |
protected: // Internal methods
|
|
43 |
static TObjectType ObjectTypeFromMemSpyContainerType( TMemSpyDriverContainerType aType );
|
|
44 |
|
|
45 |
// Must be in critical section to call
|
|
46 |
DObject* CheckedOpen(TMemSpyDriverContainerType aContainerType, DObject* aObject, TBool aQuick=EFalse);
|
|
47 |
|
|
48 |
protected: // Internal methods
|
|
49 |
void ResetTempHandles();
|
|
50 |
void AddTempHandle( TAny* aHandle);
|
|
51 |
TAny* TempHandleAt( TInt aIndex ) const;
|
|
52 |
TInt TempHandleCount() const;
|
|
53 |
TInt WriteToClient( TAny** aHandlePtr, TInt* aCountPtr, TInt aMaxCount );
|
|
54 |
|
|
55 |
private: // Data members
|
|
56 |
TInt iTempHandleCount;
|
|
57 |
TAny* iTempHandles[ KMemSpyDriverMaxHandles ];
|
|
58 |
};
|
|
59 |
|
|
60 |
|
|
61 |
#endif
|