lowlevellibsandfws/pluginfw/Framework/HeapTestImpl/HeapTestInterface.h
changeset 0 e4d67989cc36
equal deleted inserted replaced
-1:000000000000 0:e4d67989cc36
       
     1 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 
       
    15 #ifndef __HEAPTESTINTERFACE_H_
       
    16 #define __HEAPTESTINTERFACE_H_
       
    17 
       
    18 #include <e32base.h>
       
    19 #include <ecom/ecom.h>
       
    20 
       
    21 class CHeapTestInterface : public CBase
       
    22 {
       
    23 public:
       
    24 	static CHeapTestInterface* NewL();
       
    25 	virtual ~CHeapTestInterface();
       
    26 	virtual TUid ImplId() = 0;
       
    27 	virtual void DisplayMessage()=0;
       
    28 
       
    29 
       
    30 protected:
       
    31 	inline CHeapTestInterface();
       
    32 
       
    33 private:
       
    34 	TUid iDtor_ID_Key;
       
    35 
       
    36 };
       
    37 
       
    38 const TUid KCHeapTestInterfaceUid = {0x101FE392};
       
    39 const TUid KCHeapTestImplementationUid = {0x101FE392};
       
    40 
       
    41 inline CHeapTestInterface::CHeapTestInterface() :
       
    42 	CBase()
       
    43 	{
       
    44 	}
       
    45 
       
    46 inline CHeapTestInterface::~CHeapTestInterface()
       
    47 	{
       
    48 	REComSession::DestroyedImplementation(iDtor_ID_Key);
       
    49 	}
       
    50 
       
    51 inline CHeapTestInterface* CHeapTestInterface::NewL()
       
    52 	{
       
    53 	TUid implUid = {0x101FE393};
       
    54 	return REINTERPRET_CAST(CHeapTestInterface*, 
       
    55 		REComSession::CreateImplementationL(implUid, 
       
    56 											_FOFF(CHeapTestInterface, iDtor_ID_Key)));
       
    57 	}
       
    58 
       
    59 
       
    60 #endif //__HEAPTESTINTERFACE_H_
       
    61