usbmgmt/usbmgr/device/classdrivers/acm/classimplementation/ecacm/src/acmsession.cpp
branchRCL_3
changeset 15 f92a4f87e424
parent 0 c9bc50fca66e
child 16 012cc2ee6408
--- a/usbmgmt/usbmgr/device/classdrivers/acm/classimplementation/ecacm/src/acmsession.cpp	Thu Jul 15 20:42:20 2010 +0300
+++ b/usbmgmt/usbmgr/device/classdrivers/acm/classimplementation/ecacm/src/acmsession.cpp	Tue Aug 31 17:01:47 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-2010 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,37 +24,37 @@
 #include "acmserverconsts.h"
 #include "acmsession.h"
 #include "AcmPortFactory.h"
-#include <usb/usblogger.h>
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "acmsessionTraces.h"
+#endif
 
-#ifdef __FLOG_ACTIVE
-_LIT8(KLogComponent, "ECACM");
-#endif
 
 CAcmSession* CAcmSession::NewL(MAcmController& aAcmController)
 	{
-	LOG_STATIC_FUNC_ENTRY
-
+	OstTraceFunctionEntry0( CACMSESSION_NEWL_ENTRY );
 	CAcmSession* self = new(ELeave) CAcmSession(aAcmController);
+	OstTraceFunctionExit0( CACMSESSION_NEWL_EXIT );
 	return self;
 	}
 
 CAcmSession::CAcmSession(MAcmController& aAcmController)
  :	iAcmController(aAcmController)
 	{
-	LOG_FUNC
+	OstTraceFunctionEntry0( CACMSESSION_CACMSESSION_CONS_ENTRY );
+	OstTraceFunctionExit0( CACMSESSION_CACMSESSION_CONS_EXIT );
 	}
 
 CAcmSession::~CAcmSession()
 	{
-	LOG_FUNC
+	OstTraceFunctionEntry0( CACMSESSION_CACMSESSION_DES_ENTRY );	
+	OstTraceFunctionExit0( CACMSESSION_CACMSESSION_DES_EXIT );
 	}
 	
 void CAcmSession::CreateFunctionsL(const RMessage2& aMessage)
 	{
-	LOG_FUNC
-
+	OstTraceFunctionEntry0( CACMSESSION_CREATEFUNCTIONSL_ENTRY );
 	RBuf acmControlIfcName, acmDataIfcName;
-
 	TInt size = aMessage.GetDesLengthL(2);
 	acmControlIfcName.CreateL(size);
 	acmControlIfcName.CleanupClosePushL();
@@ -65,19 +65,27 @@
 	acmDataIfcName.CleanupClosePushL();
 	aMessage.ReadL(3, acmDataIfcName);
 
-	LOGTEXT5(_L("\taNoAcms = %d, aProtocolNum = %d, Control Ifc Name = %S, Data Ifc Name = %S"),
-			aMessage.Int0(), aMessage.Int1(), &acmControlIfcName, &acmDataIfcName);
+	OstTraceExt4( TRACE_DUMP, CACMSESSION_CREATEFUNCTIONSL, 
+			"CAcmSession::CreateFunctionsL;\taNoAcms = %d, aProtocolNum = %d, "
+			"Control Ifc Name = %S, Data Ifc Name = %S", 
+			aMessage.Int0(), aMessage.Int1(), acmControlIfcName, acmDataIfcName );
+	
 
-	LEAVEIFERRORL(iAcmController.CreateFunctions(aMessage.Int0(), aMessage.Int1(), acmControlIfcName, acmDataIfcName));
+	TInt err = iAcmController.CreateFunctions(aMessage.Int0(), aMessage.Int1(), acmControlIfcName, acmDataIfcName);
+	if (err < 0)
+		{
+		OstTrace1( TRACE_NORMAL, CACMSESSION_CREATEFUNCTIONSL_DUP1, "CAcmSession::CreateFunctionsL;err=%d", err );
+		User::Leave(err);
+		}
 
 	CleanupStack::PopAndDestroy(2);
+	OstTraceFunctionExit0( CACMSESSION_CREATEFUNCTIONSL_EXIT );
 	}
 
 void CAcmSession::ServiceL(const RMessage2& aMessage)
 	{
-	LOG_FUNC
-	LOGTEXT2(_L8("\taMessage.Function() = %d"), aMessage.Function());
-
+	OstTraceFunctionEntry0( CACMSESSION_SERVICEL_ENTRY );
+	OstTrace1( TRACE_NORMAL, CACMSESSION_SERVICEL, "CAcmSession::ServiceL;aMessage.Function()=%d", aMessage.Function() );
 	switch ( aMessage.Function() )
 		{
 	case EAcmCreateAcmFunctions:
@@ -99,4 +107,5 @@
 		aMessage.Panic(KAcmSrvPanic, EAcmBadAcmMessage);
 		break;
 		}
+	OstTraceFunctionExit0( CACMSESSION_SERVICEL_EXIT );
 	}