linklayerprotocols/ethernetnif/EthInt/ethmcprfactory.cpp
changeset 0 af10295192d8
equal deleted inserted replaced
-1:000000000000 0:af10295192d8
       
     1 // Copyright (c) 2006-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 "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".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // Ethernet MCPR Factory
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file
       
    20  @internalComponent
       
    21 */
       
    22 
       
    23 #include "ethmcprfactory.h"
       
    24 #include "ethmcpr.h"
       
    25 #include <comms-infras/ss_log.h>
       
    26 #include <ss_glob.h>
       
    27 
       
    28 #include <comms-infras/ss_msgintercept.h>
       
    29 
       
    30 #ifdef __CFLOG_ACTIVE
       
    31 	#define KEthMCprFactoryTag KESockMetaConnectionTag
       
    32 	//_LIT8(KEthMCprFactorySubTag, "ethmcprfactory");
       
    33 #endif
       
    34 
       
    35 using namespace ESock;
       
    36 
       
    37 //-=========================================================
       
    38 //
       
    39 // CEthMetaConnectionProviderFactory methods
       
    40 //
       
    41 //-=========================================================	
       
    42 CEthMetaConnectionProviderFactory* CEthMetaConnectionProviderFactory::NewL(TAny* aParentContainer)
       
    43 	{
       
    44 	__CFLOG_VAR((KEthMCprFactoryTag, KEthMCprFactorySubTag, _L8("CEthMetaConnectionProviderFactory ::\tNewL(%08x)"), aParentContainer));
       
    45  	return new (ELeave) CEthMetaConnectionProviderFactory(TUid::Uid(CEthMetaConnectionProviderFactory::iUid), *(reinterpret_cast<CMetaConnectionFactoryContainer*>(aParentContainer)));
       
    46 	}
       
    47 
       
    48 CEthMetaConnectionProviderFactory::CEthMetaConnectionProviderFactory(TUid aFactoryId, CMetaConnectionFactoryContainer& aParentContainer)
       
    49 	: CMetaConnectionProviderFactoryBase(aFactoryId,aParentContainer)
       
    50 	{
       
    51 	__CFLOG_VAR((KEthMCprFactoryTag, KEthMCprFactorySubTag, _L8("CEthMetaConnectionProviderFactory %08x:\tCEthMetaConnectionProviderFactory Constructor"), this));
       
    52 	}
       
    53 
       
    54 ESock::ACommsFactoryNodeId* CEthMetaConnectionProviderFactory::DoCreateObjectL(ESock::TFactoryQueryBase& aQuery)
       
    55 	{
       
    56 	const TMetaConnectionFactoryQuery& query = static_cast<const TMetaConnectionFactoryQuery&>(aQuery);
       
    57 	__CFLOG_VAR((KEthMCprFactoryTag, KEthMCprFactorySubTag, _L8("CEthMetaConnectionProviderFactory %08x:\tDoCreateL()"), this));
       
    58 	CMetaConnectionProviderBase* provider = CEthMetaConnectionProvider::NewL(*this, query.iProviderInfo);
       
    59 	
       
    60 	ESOCK_DEBUG_REGISTER_GENERAL_NODE(iUid, provider);
       
    61 	
       
    62 	return provider;
       
    63 	}