servicediscoveryandcontrol/pnp/test/upnp/Client/pnp/src/cpnpservicepublisherbase.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 //
       
    15 
       
    16 #include "cpnpservicepublisherbase.h"
       
    17 #include <ecom/ecomresolverparams.h>
       
    18 #include <ecom/ecom.h>
       
    19 #include <upnpconstants.h>
       
    20 
       
    21 CPnPServicePublisherBase* CPnPServicePublisherBase::NewL( TUint aTierID )
       
    22 	{
       
    23 	_LIT8(KServer,"/Server");
       
    24 	TBuf8<128> tierId;
       
    25 	tierId.Num(aTierID);
       
    26 	tierId.Append(KServer);
       
    27 	// Set resolving parameters
       
    28 	TEComResolverParams resolverParams;
       
    29 	resolverParams.SetDataType(tierId);
       
    30 	return (REINTERPRET_CAST(CPnPServicePublisherBase*,
       
    31 		REComSession::CreateImplementationL(KPnPInterfaceId,_FOFF(CPnPServicePublisherBase, iEcomDtorID),resolverParams)));
       
    32 	}
       
    33 
       
    34 
       
    35 EXPORT_C CPnPServicePublisherBase::CPnPServicePublisherBase()
       
    36 	{
       
    37 	}
       
    38 
       
    39 EXPORT_C CPnPServicePublisherBase::~CPnPServicePublisherBase()
       
    40 	{
       
    41 	if (iEcomDtorID.iUid)
       
    42 		{
       
    43 		REComSession::DestroyedImplementation(iEcomDtorID);
       
    44 		}
       
    45 	}