memspy/Driver/Kernel/Include/SubChannels/MemSpyDriverLogChanContainerBase.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 02 Feb 2010 01:57:15 +0200
changeset 0 a03f92240627
child 20 ca8a1b6995f6
permissions -rw-r--r--
Revision: 201003 Kit: 201005

/*
* 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