memspy/Driver/Kernel/Include/SubChannels/MemSpyDriverLogChanContainerBase.h
author Pat Downey <patd@symbian.org>
Wed, 01 Sep 2010 12:37:10 +0100
branchRCL_3
changeset 21 52e343bb8f80
parent 20 ca8a1b6995f6
permissions -rw-r--r--
Revert incorrect RCL_3 drop: Revision: 201033 Kit: 201035

/*
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:
*
*/

#ifndef MEMSPYDRIVERLOGICALCHANCONTAINERBASE_H
#define MEMSPYDRIVERLOGICALCHANCONTAINERBASE_H

// System includes
#include <e32cmn.h>
#include <kern_priv.h>

// User includes
#include "MemSpyDriverLogChanBase.h"
#include <memspy/driver/memspydriverenumerationsshared.h>

// Classes referenced
class DMemSpyDriverDevice;

// Constants
const TInt KMemSpyDriverMaxHandles = 1024 * 2;


class DMemSpyDriverLogChanContainerBase : public DMemSpyDriverLogChanBase
	{
public:
	DMemSpyDriverLogChanContainerBase( DMemSpyDriverDevice& aDevice, DThread& aThread );
	~DMemSpyDriverLogChanContainerBase();

protected: // Internal methods
    static TObjectType ObjectTypeFromMemSpyContainerType( TMemSpyDriverContainerType aType );

    /** Returns with System Locked */
    DObject* CheckIfObjectIsInContainer( TMemSpyDriverContainerType aContainerType, DObject* aSearchFor, TBool aQuick = EFalse );

protected: // Internal methods
    void ResetTempHandles();
    void AddTempHandle( TAny* aHandle);
    TAny* TempHandleAt( TInt aIndex ) const;
    TInt TempHandleCount() const;
    TInt WriteToClient( TAny** aHandlePtr, TInt* aCountPtr, TInt aMaxCount );

private: // Data members
	TInt iTempHandleCount;
	TAny* iTempHandles[ KMemSpyDriverMaxHandles ];
	};


#endif