1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/syslibsapitest/syslibssvs/ecom/TestPlugin/Src/TestEComInterface2.cpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,69 @@
1.4 +/*
1.5 +* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description:
1.18 +*
1.19 +*/
1.20 +
1.21 +
1.22 +
1.23 +#include "TestEComInterface2.h"
1.24 +
1.25 +CTestEComInterface2* CTestEComInterface2::NewL()
1.26 +// Intended Usage : Safe construction which leaves nothing upon the cleanup stack
1.27 +// Error Condition : Will leave with an appropriate error code
1.28 +// Dependencies : CBase
1.29 +// @param " "
1.30 +// @return CTestEComInterface2* a pointer to the fully instantiated CTestEComInterface2 object
1.31 +// @pre None
1.32 +// @post The object has been fully instantiated
1.33 +// Static member
1.34 + {
1.35 + CTestEComInterface2* self=new(ELeave) CTestEComInterface2(); // calls constructor
1.36 + CleanupStack::PushL(self); // Make the construction safe by using the cleanup stack
1.37 + self->ConstructL(); // Complete the 'construction'.
1.38 + CleanupStack::Pop(self);
1.39 + return self;
1.40 + }
1.41 +
1.42 +CTestEComInterface2::~CTestEComInterface2()
1.43 +// Default virtual d'tor
1.44 + {
1.45 + }
1.46 +
1.47 +CTestEComInterface2::CTestEComInterface2()
1.48 +: CTestEComInterface()
1.49 +, iDoMethodL1Calls(0)
1.50 + {
1.51 + }
1.52 +
1.53 +void CTestEComInterface2::ConstructL()
1.54 +// Intended Usage : Safely complete the initialization of the constructed object
1.55 +// Error Condition : Will leave with an appropriate error code
1.56 +// Dependencies : CBase
1.57 +// @return void
1.58 +// @pre CTestEComInterface2 has been constructed
1.59 +// @post The CTestEComInterface2 object has been fully instantiated
1.60 +//
1.61 + {
1.62 + }
1.63 +
1.64 +void CTestEComInterface2::DoMethod1L()
1.65 + {
1.66 + ++iDoMethodL1Calls;
1.67 + }
1.68 +
1.69 +TInt CTestEComInterface2::DoMethod2L()
1.70 + {
1.71 + return iDoMethodL1Calls;
1.72 + }