diff -r 000000000000 -r af10295192d8 tcpiputils/dhcp/te_dhcp/ramods/ramodfamily.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tcpiputils/dhcp/te_dhcp/ramods/ramodfamily.cpp Tue Jan 26 15:23:49 2010 +0200 @@ -0,0 +1,83 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +/** + @file ramodfamily.cpp + @internalComponent +*/ + + +#include "ramodfamily.h" +#include "ramod.h" +//TODO why is this header included? #include +#include + +/* + * @internalTechnology + */ +IMPORT_C CProtocolFamilyBase* Install(void); + +/* + * @internalTechnology + */ +EXPORT_C CProtocolFamilyBase* Install(void) + { + return new (ELeave) CramodProtocolFamily; + } + +/** + * CramodProtocolFamily + */ +CramodProtocolFamily::CramodProtocolFamily() + { + __DECLARE_NAME(_S("CramodProtocolFamily")); + } + +CramodProtocolFamily::~CramodProtocolFamily() + { + } + +TInt CramodProtocolFamily::Install() + { + return KErrNone; + } + +TInt CramodProtocolFamily::Remove() + { + return KErrNone; + } + +TUint CramodProtocolFamily::ProtocolList(TServerProtocolDesc*& aProtocolList) + { + TServerProtocolDesc* p = new (ELeave) TServerProtocolDesc[1]; // Esock catches this leave + + Cramod::FillIdentification(p[0]); + aProtocolList = p; + return 1; + } + +CProtocolBase* CramodProtocolFamily::NewProtocolL(TUint /*aSockType*/, + TUint aProtocol) + { + __ASSERT_ALWAYS(aProtocol == KMyProtocolId, User::Leave(KErrNotSupported) ); + + CProtocolBase* pProto=Cramod::NewL(); + + return pProto; + } + + + +