bthci/bthci2/hctl/src/hctlbase.cpp
changeset 0 29b1cd4cb562
equal deleted inserted replaced
-1:000000000000 0:29b1cd4cb562
       
     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 //
       
    15 
       
    16 /**
       
    17  @file
       
    18  @internalComponent
       
    19 */
       
    20 
       
    21 #include "hctlbase.h"
       
    22 #include <bluetooth/hci/hciutil.h>
       
    23 #include <bluetooth/logger.h>
       
    24 #include <bluetooth/hci/hctlbase.hrh>
       
    25 
       
    26 #ifdef __FLOG_ACTIVE
       
    27 _LIT8(KLogComponent, LOG_COMPONENT_HCTL_BASE);
       
    28 #endif
       
    29 
       
    30 /** 
       
    31 @param aImplementationUid is used by ECom to load the implementation.
       
    32 @return Ownership of a new HCTL plugin.
       
    33 */
       
    34 EXPORT_C CHCTLBase* CHCTLBase::NewL(TUid aImplementationUid)
       
    35 	{
       
    36 	LOG_STATIC_FUNC
       
    37 
       
    38 	CHCTLBase* self = reinterpret_cast<CHCTLBase*> (CHciUtil::LoadImplementationL(TUid::Uid(KHCTLBaseEcomInterfaceUid), 
       
    39 																				  aImplementationUid, 
       
    40 													                              _FOFF(CHCTLBase, iInstanceId)));	
       
    41 	return self;
       
    42 	}
       
    43 
       
    44 /** 
       
    45 @return Ownership of a new HCTL plugin.
       
    46 */
       
    47 EXPORT_C CHCTLBase* CHCTLBase::NewL()
       
    48 	{
       
    49 	LOG_STATIC_FUNC
       
    50 
       
    51 	CHCTLBase* self = reinterpret_cast<CHCTLBase*> (CHciUtil::LoadImplementationL(TUid::Uid(KHCTLBaseEcomInterfaceUid), 
       
    52 									  											  _FOFF(CHCTLBase, iInstanceId)));	
       
    53 	return self;
       
    54 	}
       
    55 
       
    56 EXPORT_C CHCTLBase::~CHCTLBase()
       
    57     {
       
    58 	LOG_FUNC
       
    59 
       
    60  	CHciUtil::DestroyedImplementation(iInstanceId);
       
    61  	CLOSE_LOGGER
       
    62     }
       
    63 
       
    64 EXPORT_C CHCTLBase::CHCTLBase()
       
    65     {
       
    66 	CONNECT_LOGGER
       
    67 	LOG_FUNC
       
    68     }