networkprotocols/ipeventnotifier/inc/ipeventnotifierinterface.h
author William Roberts <williamr@symbian.org>
Tue, 27 Jul 2010 17:03:19 +0100
branchGCC_SURGE
changeset 47 a96f0f8e6602
parent 0 af10295192d8
permissions -rw-r--r--
Remove spurious "inline" on implementations in MSCHAP.CPP - added to Bug 2629

// Copyright (c) 2004-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:
//

/**
 @file ipeventnotifierinterface.h
 @internalComponent
*/


#ifndef __CIPEVENTNOTIFIERINTERFACE_H__
#define __CIPEVENTNOTIFIERINTERFACE_H__


using namespace IPEvent;

class IPEvent::CMFlagReceived;
class IPEvent::CIPReady;
class IPEvent::CLinklocalAddressKnown;

class CIPEventNotifierInterface : public CBase
	{
public:
	CIPEventNotifierInterface(TUint32 aIndex, const TDesC& aName) :
		iInterfaceIndex(aIndex),
		iInterfaceName(aName),
		iRefCount(0)
		{}

	inline TUint32 GetInterfaceIndex(void) const {return iInterfaceIndex;}
	inline TName   GetInterfaceName(void)  const {return iInterfaceName;}

	inline TInt GetRefCount(void) const {return iRefCount;}

	inline void IncreaseRefCount(void) { ++iRefCount; }
	inline void DecreaseRefCount(void) { --iRefCount; }

	inline ~CIPEventNotifierInterface()
		{
		if(iMFlagReceived) delete iMFlagReceived;
		if(iIPReady) delete iIPReady;
		if(iLinklocalAddressKnown) delete iLinklocalAddressKnown;
		}

public:

	// Pointers to the last received instance of each event message class. So they're only constructed once
	CMFlagReceived* iMFlagReceived;
	CIPReady* iIPReady;
	CLinklocalAddressKnown* iLinklocalAddressKnown;
	
private:
	TUint32 iInterfaceIndex;
	TName   iInterfaceName;

	TInt iRefCount;

	};


#endif // __CIPEVENTNOTIFIERINTERFACE_H__