networkcontrol/qosfwconfig/qos/src/Family.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 27 Apr 2010 18:14:09 +0300
branchRCL_3
changeset 15 9bab6ffc7f45
parent 0 af10295192d8
permissions -rw-r--r--
Revision: 201017 Kit: 201017

// Copyright (c) 2003-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:
//

#include "family.h"
#include "qos_prot.h"

// DLL Install
GLDEF_C TInt E32Dll()
	{
	return(KErrNone);
	}

// Force export of non-mangled name
extern "C" { IMPORT_C CProtocolFamilyBase *Install(); }
EXPORT_C CProtocolFamilyBase *Install()
	{
	return new CProtocolFamilyQoS;
	}


// Protocol Family
CProtocolFamilyQoS::CProtocolFamilyQoS()
	{
	}

CProtocolFamilyQoS::~CProtocolFamilyQoS()
	{
	}


TInt CProtocolFamilyQoS::Install()
	{
	// Nothing to do here
	return KErrNone;
	}

TInt CProtocolFamilyQoS::Remove()
	{
	return KErrNone;
	}

TUint CProtocolFamilyQoS::ProtocolList(TServerProtocolDesc *& aProtocolList)
	{
	aProtocolList = new TServerProtocolDesc[1];
	if (aProtocolList == NULL)
		return 0;
	CProtocolQoS::Identify(aProtocolList[0]);
	return 1;
	}

CProtocolBase* CProtocolFamilyQoS::NewProtocolL(TUint aSockType,TUint aProtocol)
	{
	if (aProtocol != KProtocolQoS)
		User::Leave(KErrNotSupported);

	// KSockDatagram has no meaning here??
	if (aSockType != KSockDatagram)
		User::Leave(KErrNotSupported);

	return new (ELeave) CProtocolQoS;
	}