sl@0: /* sl@0: * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * sl@0: */ sl@0: sl@0: sl@0: sl@0: #include "TestEComInterface2.h" sl@0: sl@0: CTestEComInterface2* CTestEComInterface2::NewL() sl@0: // Intended Usage : Safe construction which leaves nothing upon the cleanup stack sl@0: // Error Condition : Will leave with an appropriate error code sl@0: // Dependencies : CBase sl@0: // @param " " sl@0: // @return CTestEComInterface2* a pointer to the fully instantiated CTestEComInterface2 object sl@0: // @pre None sl@0: // @post The object has been fully instantiated sl@0: // Static member sl@0: { sl@0: CTestEComInterface2* self=new(ELeave) CTestEComInterface2(); // calls constructor sl@0: CleanupStack::PushL(self); // Make the construction safe by using the cleanup stack sl@0: self->ConstructL(); // Complete the 'construction'. sl@0: CleanupStack::Pop(self); sl@0: return self; sl@0: } sl@0: sl@0: CTestEComInterface2::~CTestEComInterface2() sl@0: // Default virtual d'tor sl@0: { sl@0: } sl@0: sl@0: CTestEComInterface2::CTestEComInterface2() sl@0: : CTestEComInterface() sl@0: , iDoMethodL1Calls(0) sl@0: { sl@0: } sl@0: sl@0: void CTestEComInterface2::ConstructL() sl@0: // Intended Usage : Safely complete the initialization of the constructed object sl@0: // Error Condition : Will leave with an appropriate error code sl@0: // Dependencies : CBase sl@0: // @return void sl@0: // @pre CTestEComInterface2 has been constructed sl@0: // @post The CTestEComInterface2 object has been fully instantiated sl@0: // sl@0: { sl@0: } sl@0: sl@0: void CTestEComInterface2::DoMethod1L() sl@0: { sl@0: ++iDoMethodL1Calls; sl@0: } sl@0: sl@0: TInt CTestEComInterface2::DoMethod2L() sl@0: { sl@0: return iDoMethodL1Calls; sl@0: }