bthci/bthci2/hctl/src/hctlbase.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 14 Sep 2010 23:28:24 +0300
branchRCL_3
changeset 25 99439b07e980
parent 0 29b1cd4cb562
permissions -rw-r--r--
Revision: 201031 Kit: 201035

// Copyright (c) 2006-2009 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:
//

/**
 @file
 @internalComponent
*/

#include "hctlbase.h"
#include <bluetooth/hci/hciutil.h>
#include <bluetooth/logger.h>
#include <bluetooth/hci/hctlbase.hrh>

#ifdef __FLOG_ACTIVE
_LIT8(KLogComponent, LOG_COMPONENT_HCTL_BASE);
#endif

/** 
@param aImplementationUid is used by ECom to load the implementation.
@return Ownership of a new HCTL plugin.
*/
EXPORT_C CHCTLBase* CHCTLBase::NewL(TUid aImplementationUid)
	{
	LOG_STATIC_FUNC

	CHCTLBase* self = reinterpret_cast<CHCTLBase*> (CHciUtil::LoadImplementationL(TUid::Uid(KHCTLBaseEcomInterfaceUid), 
																				  aImplementationUid, 
													                              _FOFF(CHCTLBase, iInstanceId)));	
	return self;
	}

/** 
@return Ownership of a new HCTL plugin.
*/
EXPORT_C CHCTLBase* CHCTLBase::NewL()
	{
	LOG_STATIC_FUNC

	CHCTLBase* self = reinterpret_cast<CHCTLBase*> (CHciUtil::LoadImplementationL(TUid::Uid(KHCTLBaseEcomInterfaceUid), 
									  											  _FOFF(CHCTLBase, iInstanceId)));	
	return self;
	}

EXPORT_C CHCTLBase::~CHCTLBase()
    {
	LOG_FUNC

 	CHciUtil::DestroyedImplementation(iInstanceId);
 	CLOSE_LOGGER
    }

EXPORT_C CHCTLBase::CHCTLBase()
    {
	CONNECT_LOGGER
	LOG_FUNC
    }