servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/src/upnppintfactory.cpp
changeset 0 f5a58ecadc66
equal deleted inserted replaced
-1:000000000000 0:f5a58ecadc66
       
     1 // Copyright (c) 2008-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 // @file
       
    15 // @internalComponent
       
    16 // 
       
    17 //
       
    18 
       
    19 #include "upnppint.h"
       
    20 
       
    21 using namespace ESock;
       
    22 // =====================================================================================
       
    23 // UPnP Protocol-Interface Factory
       
    24 
       
    25 CUPnPProtocolIntfFactory* CUPnPProtocolIntfFactory::NewL(TUid aFactoryId, CProtocolIntfFactoryContainer& aParentContainer)
       
    26 	{
       
    27 	CUPnPProtocolIntfFactory* factory = new (ELeave) CUPnPProtocolIntfFactory(aFactoryId, aParentContainer);
       
    28 	//Note!!!! UPnP PINT Factory is not a Plugin,so make self construct that adds this factory to its
       
    29 	//parent container, which is not the case with other factory that were created as Plugin's
       
    30 	CleanupStack::PushL(factory);
       
    31     factory->ConstructL();
       
    32     CleanupStack::Pop(factory);
       
    33 	return factory;
       
    34 	}
       
    35 
       
    36 CUPnPProtocolIntfFactory::CUPnPProtocolIntfFactory(TUid aFactoryId,
       
    37 												   CProtocolIntfFactoryContainer& aParentContainer)
       
    38 												: CProtocolIntfFactoryBase(aFactoryId, aParentContainer)
       
    39 	{
       
    40 	}
       
    41 
       
    42 CProtocolIntfBase* CUPnPProtocolIntfFactory::DoCreateProtocolIntfL(TFactoryQueryBase& aQuery)
       
    43 	{	
       
    44 	const TDefaultProtocolIntfFactoryQuery& query = static_cast<const TDefaultProtocolIntfFactoryQuery&>(aQuery);
       
    45 	return CUPnPProtocolIntfBase::NewL(*this, query.iCprId);
       
    46 	}
       
    47