diff -r 8d540f55e491 -r 425d8f4f7fa5 linklayerprotocols/tundriver/src/tundrivermcprfactory.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/linklayerprotocols/tundriver/src/tundrivermcprfactory.cpp Wed Sep 15 00:18:51 2010 +0300 @@ -0,0 +1,69 @@ +/** +* Copyright (c) 2010 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: +* Factory implementation for tunnel driver mcpr. +* +* +*/ + +/** + @file tundrivermcprfactory.cpp + @internalTechnology +*/ + +#include +#include "tundrivermcprfactory.h" +#include "tundrivermcpr.h" +#include +#include +#include + +#include + +using namespace ESock; + +CTunDriverMetaConnectionProviderFactory* CTunDriverMetaConnectionProviderFactory::NewL(TAny* aParentContainer) +/** +* CTunDriverMetaConnectionProviderFactory::NewL constructs a Default MCPR Flow Factory +* @param aParentContainer construction data passed by ECOM +* @returns pointer to a constructed factory object. +*/ + { + return new (ELeave) CTunDriverMetaConnectionProviderFactory(TUid::Uid(CTunDriverMetaConnectionProviderFactory::iUid), *(reinterpret_cast(aParentContainer))); + } + +CTunDriverMetaConnectionProviderFactory::CTunDriverMetaConnectionProviderFactory(TUid aFactoryId, CMetaConnectionFactoryContainer& aParentContainer) + : CMetaConnectionProviderFactoryBase(aFactoryId, aParentContainer) +/** +* CTunDriverMetaConnectionProviderFactory::CTunDriverMetaConnectionProviderFactory is a default constructor. +* @return +*/ + { + } + +ESock::ACommsFactoryNodeId* CTunDriverMetaConnectionProviderFactory::DoCreateObjectL(ESock::TFactoryQueryBase& aQuery) +/** +* CTunDriverMetaConnectionProviderFactory::DoCreateObjectL is called from UpperlLayer. +* @return +*/ + { + const TMetaConnectionFactoryQuery& query = static_cast(aQuery); + CMetaConnectionProviderBase* provider = CTunDriverMetaConnectionProvider::NewL(*this, query.iProviderInfo); + + ESOCK_DEBUG_REGISTER_GENERAL_NODE(iUid, provider); + + return provider; + } + +