usbmgmt/usbmgr/host/functiondrivers/ms/msmm/referencepolicyplugin/src/refppnotificationman.cpp
--- a/usbmgmt/usbmgr/host/functiondrivers/ms/msmm/referencepolicyplugin/src/refppnotificationman.cpp Thu Jul 15 20:42:20 2010 +0300
+++ b/usbmgmt/usbmgr/host/functiondrivers/ms/msmm/referencepolicyplugin/src/refppnotificationman.cpp Tue Aug 31 17:01:47 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-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,11 +24,12 @@
#include <usb/usblogger.h>
#include <usb/hostms/policypluginnotifier.hrh>
#include "srvpanic.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "refppnotificationmanTraces.h"
+#endif
-
-#ifdef __FLOG_ACTIVE
-_LIT8(KLogComponent, "UsbHostMsmmRefPP");
-#endif
+
#ifdef __OVER_DUMMYCOMPONENT__
const TUid KMountPolicyNotifierUid = {0x1028653E};
@@ -38,89 +39,112 @@
CMsmmPolicyNotificationManager::~CMsmmPolicyNotificationManager()
{
- LOG_FUNC
+ OstTraceFunctionEntry0( REF_CMSMMPOLICYNOTIFICATIONMANAGER_CMSMMPOLICYNOTIFICATIONMANAGER_DES_ENTRY );
+
Cancel();
iErrorQueue.Close();
iNotifier.Close();
+ OstTraceFunctionExit0( REF_CMSMMPOLICYNOTIFICATIONMANAGER_CMSMMPOLICYNOTIFICATIONMANAGER_DES_EXIT );
}
CMsmmPolicyNotificationManager* CMsmmPolicyNotificationManager::NewL()
{
- LOG_STATIC_FUNC_ENTRY
+ OstTraceFunctionEntry0( REF_CMSMMPOLICYNOTIFICATIONMANAGER_NEWL_ENTRY );
+
CMsmmPolicyNotificationManager* self =
CMsmmPolicyNotificationManager::NewLC();
CleanupStack::Pop(self);
+ OstTraceFunctionExit0( REF_CMSMMPOLICYNOTIFICATIONMANAGER_NEWL_EXIT );
return self;
}
CMsmmPolicyNotificationManager* CMsmmPolicyNotificationManager::NewLC()
{
- LOG_STATIC_FUNC_ENTRY
+ OstTraceFunctionEntry0( REF_CMSMMPOLICYNOTIFICATIONMANAGER_NEWLC_ENTRY );
+
CMsmmPolicyNotificationManager* self =
new (ELeave) CMsmmPolicyNotificationManager();
CleanupStack::PushL(self);
self->ConstructL();
+ OstTraceFunctionExit0( REF_CMSMMPOLICYNOTIFICATIONMANAGER_NEWLC_EXIT );
return self;
}
void CMsmmPolicyNotificationManager::SendErrorNotificationL(
const THostMsErrData& aErrData)
{
- LOG_FUNC
+ OstTraceFunctionEntry0( REF_CMSMMPOLICYNOTIFICATIONMANAGER_SENDERRORNOTIFICATIONL_ENTRY );
+
// Print error notification data to log
- LOGTEXT2(_L("Err:iError = %d"), aErrData.iError);
- LOGTEXT2(_L("Err:iE32Error = %d"), aErrData.iE32Error);
- LOGTEXT2(_L("Err:iDriveName = %d"), aErrData.iDriveName);
- LOGTEXT2(_L("Err:iManufacturerString = %S"), &aErrData.iManufacturerString);
- LOGTEXT2(_L("Err:iProductString = %S"), &aErrData.iProductString);
-
+ OstTrace1( TRACE_NORMAL, REF_CMSMMPOLICYNOTIFICATIONMANAGER_SENDERRORNOTIFICATIONL,
+ "Err:iError = %d", aErrData.iError );
+ OstTrace1( TRACE_NORMAL, REF_CMSMMPOLICYNOTIFICATIONMANAGER_SENDERRORNOTIFICATIONL_DUP1,
+ "Err:iE32Error = %d", aErrData.iE32Error );
+ OstTrace1( TRACE_NORMAL, REF_CMSMMPOLICYNOTIFICATIONMANAGER_SENDERRORNOTIFICATIONL_DUP2,
+ "Err:iDriveName = %d", aErrData.iDriveName );
+ OstTraceExt1( TRACE_NORMAL, REF_CMSMMPOLICYNOTIFICATIONMANAGER_SENDERRORNOTIFICATIONL_DUP3,
+ "Err:iManufacturerString = %S", aErrData.iManufacturerString );
+ OstTraceExt1( TRACE_NORMAL, REF_CMSMMPOLICYNOTIFICATIONMANAGER_SENDERRORNOTIFICATIONL_DUP4,
+ "Err:iProductString = %S", aErrData.iProductString );
+
THostMsErrorDataPckg errPckg = aErrData;
iErrorQueue.AppendL(errPckg);
if (!IsActive())
{
SendNotification();
}
+ OstTraceFunctionExit0( REF_CMSMMPOLICYNOTIFICATIONMANAGER_SENDERRORNOTIFICATIONL_EXIT );
}
void CMsmmPolicyNotificationManager::RunL()
{
- LOG_FUNC
+ OstTraceFunctionEntry0( REF_CMSMMPOLICYNOTIFICATIONMANAGER_RUNL_ENTRY );
+
iErrorQueue.Remove(0);
if (iErrorQueue.Count() > 0)
{
SendNotification();
}
+ OstTraceFunctionExit0( REF_CMSMMPOLICYNOTIFICATIONMANAGER_RUNL_EXIT );
}
void CMsmmPolicyNotificationManager::DoCancel()
{
- LOG_FUNC
+ OstTraceFunctionEntry0( REF_CMSMMPOLICYNOTIFICATIONMANAGER_DOCANCEL_ENTRY );
+
iErrorQueue.Reset();
iNotifier.CancelNotifier(KMountPolicyNotifierUid);
+ OstTraceFunctionExit0( REF_CMSMMPOLICYNOTIFICATIONMANAGER_DOCANCEL_EXIT );
}
CMsmmPolicyNotificationManager::CMsmmPolicyNotificationManager():
CActive(EPriorityStandard)
{
- LOG_FUNC
+ OstTraceFunctionEntry0( REF_CMSMMPOLICYNOTIFICATIONMANAGER_CMSMMPOLICYNOTIFICATIONMANAGER_ENTRY );
+
CActiveScheduler::Add(this);
+ OstTraceFunctionExit0( REF_CMSMMPOLICYNOTIFICATIONMANAGER_CMSMMPOLICYNOTIFICATIONMANAGER_EXIT );
}
void CMsmmPolicyNotificationManager::ConstructL()
{
- LOG_FUNC
+ OstTraceFunctionEntry0( REF_CMSMMPOLICYNOTIFICATIONMANAGER_CONSTRUCTL_ENTRY );
+
User::LeaveIfError(iNotifier.Connect());
+ OstTraceFunctionExit0( REF_CMSMMPOLICYNOTIFICATIONMANAGER_CONSTRUCTL_EXIT );
}
void CMsmmPolicyNotificationManager::SendNotification()
{
- LOG_FUNC
+ OstTraceFunctionEntry0( REF_CMSMMPOLICYNOTIFICATIONMANAGER_SENDNOTIFICATION_ENTRY );
+
iNotifier.StartNotifierAndGetResponse(
iStatus, KMountPolicyNotifierUid, iErrorQueue[0], iResponse);
SetActive();
+ OstTraceFunctionExit0( REF_CMSMMPOLICYNOTIFICATIONMANAGER_SENDNOTIFICATION_EXIT );
}
// End of file