Update contrib.
1 // Copyright (c) 2004-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 the License "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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // e32test\mmu\d_export.cpp
18 #include <kernel/kern_priv.h>
25 class DExportFactory : public DLogicalDevice
29 virtual TInt Install();
30 virtual void GetCaps(TDes8& aDes) const;
31 virtual TInt Create(DLogicalChannelBase*& aChannel);
34 class DExportChannel : public DLogicalChannelBase
39 virtual TInt DoCreate(TInt aUnit, const TDesC8* anInfo, const TVersion& aVer);
40 virtual TInt Request(TInt aFunction, TAny* a1, TAny* a2);
42 DExportFactory* iFactory;
49 TInt DExportFactory::Install()
51 return SetName(&KExportTestLddName);
54 DExportFactory::~DExportFactory()
58 void DExportFactory::GetCaps(TDes8& /*aDes*/) const
60 // Not used but required as DLogicalDevice::GetCaps is pure virtual
63 TInt DExportFactory::Create(DLogicalChannelBase*& aChannel)
66 DExportChannel* channel=new DExportChannel;
69 channel->iFactory = this;
74 DECLARE_STANDARD_LDD()
76 return new DExportFactory;
83 TInt DExportChannel::DoCreate(TInt /*aUnit*/, const TDesC8* /*aInfo*/, const TVersion& /*aVer*/)
88 DExportChannel::DExportChannel()
92 DExportChannel::~DExportChannel()
97 TInt DExportChannel::Request(TInt aFunction, TAny* a1, TAny* a2)
99 TInt r=KErrNotSupported;
103 case RExportLdd::ERunExport:
104 r = ExportMultiplyFunction((TUint)a1, (TUint)a2);
110 EXPORT_C TInt ExportMultiplyFunction(TUint aNum0, TUint aNum1)
112 return aNum0 * aNum1;