networkcontrol/iptransportlayer/src/netmcprfactory.cpp
changeset 0 af10295192d8
equal deleted inserted replaced
-1:000000000000 0:af10295192d8
       
     1 // Copyright (c) 2005-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 // This is part of an ECOM plug-in
       
    15 // 
       
    16 //
       
    17 
       
    18 #define SYMBIAN_NETWORKING_UPS
       
    19 
       
    20 #include <ecom/implementationproxy.h>
       
    21 #include "netmcprfactory.h"
       
    22 #ifdef SYMBIAN_NETWORKING_UPS
       
    23 #include "netmcprups.h"
       
    24 #else
       
    25 #include "netmcpr.h"
       
    26 #endif
       
    27 #include <comms-infras/ss_log.h>
       
    28 #include <ss_glob.h>
       
    29 #include <ecom/ecom.h>
       
    30 
       
    31 #include <comms-infras/ss_msgintercept.h>
       
    32 
       
    33 #ifdef __CFLOG_ACTIVE
       
    34 #define KNetMCprFactoryTag KESockMetaConnectionTag
       
    35 _LIT8(KNetMCprFactorySubTag, "netmcprfactory");
       
    36 #endif
       
    37 
       
    38 using namespace ESock;
       
    39 
       
    40 
       
    41 EXPORT_C CNetworkMetaConnectionProviderFactory* CNetworkMetaConnectionProviderFactory::NewL(TAny* aParentContainer)
       
    42 /** Factory function for the factory which manages network level meta connection providers.
       
    43 This function also acts as the single ECom entry point into this object.
       
    44 @param aParentContainer the parent factory container which owns this factory
       
    45 @return factory for IP level meta connection providers
       
    46 */
       
    47 	{
       
    48 	__CFLOG_VAR((KNetMCprFactoryTag, KNetMCprFactorySubTag, _L8("CNetworkMetaConnectionProviderFactory ::\tNewL(%08x)"), aParentContainer));
       
    49  	return new (ELeave) CNetworkMetaConnectionProviderFactory(TUid::Uid(CNetworkMetaConnectionProviderFactory::iUid), *(reinterpret_cast<CMetaConnectionFactoryContainer*>(aParentContainer)));
       
    50 	}
       
    51 
       
    52 CNetworkMetaConnectionProviderFactory::CNetworkMetaConnectionProviderFactory(TUid aFactoryUid, CMetaConnectionFactoryContainer& aParentContainer)
       
    53 	: CMetaConnectionProviderFactoryBase(aFactoryUid,aParentContainer)
       
    54 /** Constructor for Network level meta connection providers.
       
    55 @param aFactoryId the ID which this factory can be looked up by
       
    56 @param aParentContainer the parent factory container which owns this factory
       
    57 */
       
    58 	{
       
    59 	}
       
    60 
       
    61 ACommsFactoryNodeId* CNetworkMetaConnectionProviderFactory::DoCreateObjectL(TFactoryQueryBase& aQuery)
       
    62 	{
       
    63 	const TMetaConnectionFactoryQuery& query = static_cast<const TMetaConnectionFactoryQuery&>(aQuery);
       
    64 #ifdef SYMBIAN_NETWORKING_UPS
       
    65 	CMetaConnectionProviderBase* provider = CUpsNetworkMetaConnectionProvider::NewL(*this,query.iProviderInfo);
       
    66 #else
       
    67 	CMetaConnectionProviderBase* provider = CNetworkMetaConnectionProvider::NewL(*this,query.iProviderInfo);
       
    68 #endif
       
    69 
       
    70 	ESOCK_DEBUG_REGISTER_GENERAL_NODE(iUid, provider);
       
    71 
       
    72 	return provider;
       
    73 	}
       
    74