memspy/Driver/Kernel/Include/SubChannels/MemSpyDriverLogChanContainerBase.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Wed, 13 Oct 2010 16:17:58 +0300
branchRCL_3
changeset 59 8ad140f3dd41
parent 49 7fdc9a71d314
permissions -rw-r--r--
Revision: 201039 Kit: 201041

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