examples/SysLibs/ECom/InterfaceImplementation/CImplementationClassTwo.cpp

00001 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
00002 // All rights reserved.
00003 // This component and the accompanying materials are made available
00004 // under the terms of "Eclipse Public License v1.0"
00005 // which accompanies this distribution, and is available
00006 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
00007 //
00008 // Initial Contributors:
00009 // Nokia Corporation - initial contribution.
00010 //
00011 // Contributors:
00012 //
00013 // Description:
00014 //
00015 
00016 #include "CImplementationClassTwo.h"
00017 
00018 // Construction and destruction functions
00019 
00020 CImplementationClassTwo* CImplementationClassTwo::NewL(TAny* aParams)
00021         {
00022         CImplementationClassTwo* self=new(ELeave) CImplementationClassTwo(aParams);  
00023         CleanupStack::PushL(self);
00024         self->ConstructL(); 
00025         CleanupStack::Pop();
00026         return self;
00027         }
00028 
00029 CImplementationClassTwo::~CImplementationClassTwo()
00030         {
00031         delete iDescriptor;
00032         }
00033 
00034 CImplementationClassTwo::CImplementationClassTwo(TAny* aInitParams)
00035 :  iInitParams((CExampleInterface::TExampleInterfaceInitParams*)aInitParams)
00036         {
00037         // See ConstructL() for initialisation completion.
00038         }
00039 
00040 void CImplementationClassTwo::ConstructL()
00041 // Safely complete the initialization of the constructed object 
00042         {
00043         // Set up the data to pass back
00044         _LIT(KDescriptor, "Using Implementation Two\n");
00045         iDescriptor = KDescriptor().AllocL();
00046         }
00047 
00048 
00049 // Implementation of CExampleInterface
00050 
00051 void CImplementationClassTwo::DoMethodL(TDes& aString)
00052         {
00053         aString = *iDescriptor;
00054 
00055         if (iInitParams)
00056                 iInitParams->integer=2;
00057         }
00058 

Generated by  doxygen 1.6.2