usbmgmt/usbmgr/host/fdf/production/fdcbase/src/fdcplugin.cpp
branchRCL_3
changeset 16 012cc2ee6408
parent 15 f92a4f87e424
equal deleted inserted replaced
15:f92a4f87e424 16:012cc2ee6408
     1 /*
     1 /*
     2 * Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    22 */
    22 */
    23 
    23 
    24 #include <ecom/ecom.h>
    24 #include <ecom/ecom.h>
    25 #include <usbhost/internal/fdcplugin.h>
    25 #include <usbhost/internal/fdcplugin.h>
    26 #include <usbhost/internal/fdcpluginobserver.h>
    26 #include <usbhost/internal/fdcpluginobserver.h>
       
    27 #include <usb/usblogger.h>
    27 
    28 
    28 #include "OstTraceDefinitions.h"
    29 #ifdef __FLOG_ACTIVE
    29 #ifdef OST_TRACE_COMPILER_IN_USE
    30 _LIT8(KLogComponent, "fdcplugin");
    30 #include "fdcpluginTraces.h"
       
    31 #endif
    31 #endif
    32 
       
    33 
    32 
    34 EXPORT_C CFdcPlugin::~CFdcPlugin()
    33 EXPORT_C CFdcPlugin::~CFdcPlugin()
    35 	{
    34 	{
    36     OstTraceFunctionEntry0( CFDCPLUGIN_CFDCPLUGIN_DES_ENTRY );
    35 	LOG_FUNC
    37     
    36 
    38 	REComSession::DestroyedImplementation(iInstanceId);
    37 	REComSession::DestroyedImplementation(iInstanceId);
    39 	}
    38 	}
    40 
    39 
    41 EXPORT_C CFdcPlugin::CFdcPlugin(MFdcPluginObserver& aObserver)
    40 EXPORT_C CFdcPlugin::CFdcPlugin(MFdcPluginObserver& aObserver)
    42 :	iObserver(aObserver)
    41 :	iObserver(aObserver)
    43 	{
    42 	{
    44     OstTraceFunctionEntry0( CFDCPLUGIN_CFDCPLUGIN_CONS_ENTRY );
    43 	LOG_FUNC
    45     
       
    46 	}
    44 	}
    47 
    45 
    48 EXPORT_C CFdcPlugin* CFdcPlugin::NewL(TUid aImplementationUid, MFdcPluginObserver& aObserver)
    46 EXPORT_C CFdcPlugin* CFdcPlugin::NewL(TUid aImplementationUid, MFdcPluginObserver& aObserver)
    49 	{
    47 	{
    50     OstTraceFunctionEntry0( CFDCPLUGIN_NEWL_ENTRY );
    48 	LOG_STATIC_FUNC_ENTRY
    51     
    49 
    52     OstTrace1( TRACE_NORMAL, CFDCPLUGIN_NEWL, "\t\tFDC implementation UID: 0x%08x", aImplementationUid.iUid);
    50 	LOGTEXT2(_L8("\t\tFDC implementation UID: 0x%08x"), aImplementationUid);
    53 
    51 
    54 	CFdcPlugin* plugin = reinterpret_cast<CFdcPlugin*>(
    52 	CFdcPlugin* plugin = reinterpret_cast<CFdcPlugin*>(
    55 		REComSession::CreateImplementationL(
    53 		REComSession::CreateImplementationL(
    56 			aImplementationUid, 
    54 			aImplementationUid, 
    57 			_FOFF(CFdcPlugin, iInstanceId),
    55 			_FOFF(CFdcPlugin, iInstanceId),
    58 			&aObserver
    56 			&aObserver
    59 			)
    57 			)
    60 		);
    58 		);
    61 
    59 
    62 	OstTrace1( TRACE_NORMAL, CFDCPLUGIN_NEWL_DUP1, "\tplugin = 0x%08x", plugin);
    60 	LOGTEXT2(_L8("\tplugin = 0x%08x"), plugin);
    63 
       
    64 	return plugin;
    61 	return plugin;
    65 	}
    62 	}
    66 
    63 
    67 EXPORT_C MFdcPluginObserver& CFdcPlugin::Observer()
    64 EXPORT_C MFdcPluginObserver& CFdcPlugin::Observer()
    68 	{
    65 	{