--- a/usbmgmt/usbmgr/host/functiondrivers/ms/msmm/server/src/msmmengine.cpp Tue Aug 31 17:01:47 2010 +0300
+++ b/usbmgmt/usbmgr/host/functiondrivers/ms/msmm/server/src/msmmengine.cpp Wed Sep 01 12:35:00 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-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"
@@ -24,64 +24,54 @@
#include "msmmnodebase.h"
#include <usb/usblogger.h>
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "msmmengineTraces.h"
+
+#ifdef __FLOG_ACTIVE
+_LIT8(KLogComponent, "UsbHostMsmmServer");
#endif
-
CMsmmEngine::~CMsmmEngine()
{
- OstTraceFunctionEntry0( CMSMMENGINE_CMSMMENGINE_DES_ENTRY );
-
+ LOG_FUNC
if (iDataEntrys)
{
delete iDataEntrys;
}
- OstTraceFunctionExit0( CMSMMENGINE_CMSMMENGINE_DES_EXIT );
}
CMsmmEngine* CMsmmEngine::NewL()
{
- OstTraceFunctionEntry0( CMSMMENGINE_NEWL_ENTRY );
-
+ LOG_STATIC_FUNC_ENTRY
CMsmmEngine* self = CMsmmEngine::NewLC();
CleanupStack::Pop(self);
- OstTraceFunctionExit0( CMSMMENGINE_NEWL_EXIT );
return self;
}
CMsmmEngine* CMsmmEngine::NewLC()
{
- OstTraceFunctionEntry0( CMSMMENGINE_NEWLC_ENTRY );
-
+ LOG_STATIC_FUNC_ENTRY
CMsmmEngine* self = new (ELeave) CMsmmEngine();
CleanupStack::PushL(self);
self->ConstructL();
- OstTraceFunctionExit0( CMSMMENGINE_NEWLC_EXIT );
return self;
}
void CMsmmEngine::AddUsbMsDeviceL(const TUSBMSDeviceDescription& aDevice)
{
- OstTraceFunctionEntry0( CMSMMENGINE_ADDUSBMSDEVICEL_ENTRY );
-
+ LOG_FUNC
TUsbMsDevice* device = SearchDevice(aDevice.iDeviceId);
if (!device)
{
device = new (ELeave) TUsbMsDevice(aDevice);
iDataEntrys->AddChild(device);
}
- OstTraceFunctionExit0( CMSMMENGINE_ADDUSBMSDEVICEL_EXIT );
}
TUsbMsInterface* CMsmmEngine::AddUsbMsInterfaceL(TInt aDeviceId, TUint8 aInterfaceNumber,
TInt32 aInterfaceToken)
{
- OstTraceFunctionEntry0( CMSMMENGINE_ADDUSBMSINTERFACEL_ENTRY );
-
+ LOG_FUNC
TUsbMsDevice* device = SearchDevice(aDeviceId);
if (!device)
{
@@ -97,15 +87,13 @@
{
interface = AddUsbMsInterfaceNodeL(device, aInterfaceNumber, aInterfaceToken);
}
- OstTraceFunctionExit0( CMSMMENGINE_ADDUSBMSINTERFACEL_EXIT );
return interface;
}
void CMsmmEngine::AddUsbMsLogicalUnitL(TInt aDeviceId,
TInt aInterfaceNumber, TInt aLogicalUnitNumber, TText aDrive)
{
- OstTraceFunctionEntry0( CMSMMENGINE_ADDUSBMSLOGICALUNITL_ENTRY );
-
+ LOG_FUNC
TUsbMsDevice* device = SearchDevice(aDeviceId);
if (!device)
{
@@ -121,21 +109,17 @@
{
User::Leave(KErrArgument); // A proper interface node can't be found
}
- OstTraceFunctionExit0( CMSMMENGINE_ADDUSBMSLOGICALUNITL_EXIT );
}
void CMsmmEngine::RemoveUsbMsNode(TMsmmNodeBase* aNodeToBeRemoved)
{
- OstTraceFunctionEntry0( CMSMMENGINE_REMOVEUSBMSNODE_ENTRY );
-
+ LOG_FUNC
delete aNodeToBeRemoved;
- OstTraceFunctionExit0( CMSMMENGINE_REMOVEUSBMSNODE_EXIT );
}
TUsbMsDevice* CMsmmEngine::SearchDevice(TInt aDeviceId) const
{
- OstTraceFunctionEntry0( CMSMMENGINE_SEARCHDEVICE_ENTRY );
-
+ LOG_FUNC
return static_cast<TUsbMsDevice*>(
iDataEntrys->SearchInChildren(aDeviceId));
}
@@ -143,37 +127,31 @@
TUsbMsInterface* CMsmmEngine::SearchInterface(TMsmmNodeBase* aDevice,
TInt aInterfaceNumber) const
{
- OstTraceFunctionEntry0( CMSMMENGINE_SEARCHINTERFACE_ENTRY );
-
+ LOG_FUNC
return static_cast<TUsbMsInterface*>(
aDevice->SearchInChildren(aInterfaceNumber));
}
CMsmmEngine::CMsmmEngine()
{
- OstTraceFunctionEntry0( CMSMMENGINE_CMSMMENGINE_CONS_ENTRY );
-
+ LOG_FUNC
}
void CMsmmEngine::ConstructL()
{
- OstTraceFunctionEntry0( CMSMMENGINE_CONSTRUCTL_ENTRY );
-
+ LOG_FUNC
// Create the root of the whole node tree
iDataEntrys = new (ELeave) TMsmmNodeBase(0x0);
- OstTraceFunctionExit0( CMSMMENGINE_CONSTRUCTL_EXIT );
}
TUsbMsInterface* CMsmmEngine::AddUsbMsInterfaceNodeL(TUsbMsDevice* iParent,
TInt aInterfaceNumber, TInt aInterfaceToken)
{
- OstTraceFunctionEntry0( CMSMMENGINE_ADDUSBMSINTERFACENODEL_ENTRY );
-
+ LOG_FUNC
TUsbMsInterface* interface = new (ELeave) TUsbMsInterface(
aInterfaceNumber, aInterfaceToken);
iParent->AddChild(interface);
- OstTraceFunctionExit0( CMSMMENGINE_ADDUSBMSINTERFACENODEL_EXIT );
return interface;
}
@@ -181,13 +159,11 @@
TUsbMsInterface* iParent, TInt aLogicalUnitNumber,
TText aDrive)
{
- OstTraceFunctionEntry0( CMSMMENGINE_ADDUSBMSLOGICALUNITNODEL_ENTRY );
-
+ LOG_FUNC
TUsbMsLogicalUnit* logicalUnit = new (ELeave) TUsbMsLogicalUnit(
aLogicalUnitNumber, aDrive);
iParent->AddChild(logicalUnit);
- OstTraceFunctionExit0( CMSMMENGINE_ADDUSBMSLOGICALUNITNODEL_EXIT );
return logicalUnit;
}