usbmgmt/usbmgr/host/functiondrivers/ms/msmm/referencepolicyplugin/src/refppnotificationman.cpp
--- a/usbmgmt/usbmgr/host/functiondrivers/ms/msmm/referencepolicyplugin/src/refppnotificationman.cpp Tue Aug 31 17:01:47 2010 +0300
+++ b/usbmgmt/usbmgr/host/functiondrivers/ms/msmm/referencepolicyplugin/src/refppnotificationman.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,13 +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"
+
+
+#ifdef __FLOG_ACTIVE
+_LIT8(KLogComponent, "UsbHostMsmmRefPP");
#endif
-
-
#ifdef __OVER_DUMMYCOMPONENT__
const TUid KMountPolicyNotifierUid = {0x1028653E};
#else
@@ -39,112 +38,89 @@
CMsmmPolicyNotificationManager::~CMsmmPolicyNotificationManager()
{
- OstTraceFunctionEntry0( REF_CMSMMPOLICYNOTIFICATIONMANAGER_CMSMMPOLICYNOTIFICATIONMANAGER_DES_ENTRY );
-
+ LOG_FUNC
Cancel();
iErrorQueue.Close();
iNotifier.Close();
- OstTraceFunctionExit0( REF_CMSMMPOLICYNOTIFICATIONMANAGER_CMSMMPOLICYNOTIFICATIONMANAGER_DES_EXIT );
}
CMsmmPolicyNotificationManager* CMsmmPolicyNotificationManager::NewL()
{
- OstTraceFunctionEntry0( REF_CMSMMPOLICYNOTIFICATIONMANAGER_NEWL_ENTRY );
-
+ LOG_STATIC_FUNC_ENTRY
CMsmmPolicyNotificationManager* self =
CMsmmPolicyNotificationManager::NewLC();
CleanupStack::Pop(self);
- OstTraceFunctionExit0( REF_CMSMMPOLICYNOTIFICATIONMANAGER_NEWL_EXIT );
return self;
}
CMsmmPolicyNotificationManager* CMsmmPolicyNotificationManager::NewLC()
{
- OstTraceFunctionEntry0( REF_CMSMMPOLICYNOTIFICATIONMANAGER_NEWLC_ENTRY );
-
+ LOG_STATIC_FUNC_ENTRY
CMsmmPolicyNotificationManager* self =
new (ELeave) CMsmmPolicyNotificationManager();
CleanupStack::PushL(self);
self->ConstructL();
- OstTraceFunctionExit0( REF_CMSMMPOLICYNOTIFICATIONMANAGER_NEWLC_EXIT );
return self;
}
void CMsmmPolicyNotificationManager::SendErrorNotificationL(
const THostMsErrData& aErrData)
{
- OstTraceFunctionEntry0( REF_CMSMMPOLICYNOTIFICATIONMANAGER_SENDERRORNOTIFICATIONL_ENTRY );
-
+ LOG_FUNC
// Print error notification data to log
- 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 );
-
+ 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);
+
THostMsErrorDataPckg errPckg = aErrData;
iErrorQueue.AppendL(errPckg);
if (!IsActive())
{
SendNotification();
}
- OstTraceFunctionExit0( REF_CMSMMPOLICYNOTIFICATIONMANAGER_SENDERRORNOTIFICATIONL_EXIT );
}
void CMsmmPolicyNotificationManager::RunL()
{
- OstTraceFunctionEntry0( REF_CMSMMPOLICYNOTIFICATIONMANAGER_RUNL_ENTRY );
-
+ LOG_FUNC
iErrorQueue.Remove(0);
if (iErrorQueue.Count() > 0)
{
SendNotification();
}
- OstTraceFunctionExit0( REF_CMSMMPOLICYNOTIFICATIONMANAGER_RUNL_EXIT );
}
void CMsmmPolicyNotificationManager::DoCancel()
{
- OstTraceFunctionEntry0( REF_CMSMMPOLICYNOTIFICATIONMANAGER_DOCANCEL_ENTRY );
-
+ LOG_FUNC
iErrorQueue.Reset();
iNotifier.CancelNotifier(KMountPolicyNotifierUid);
- OstTraceFunctionExit0( REF_CMSMMPOLICYNOTIFICATIONMANAGER_DOCANCEL_EXIT );
}
CMsmmPolicyNotificationManager::CMsmmPolicyNotificationManager():
CActive(EPriorityStandard)
{
- OstTraceFunctionEntry0( REF_CMSMMPOLICYNOTIFICATIONMANAGER_CMSMMPOLICYNOTIFICATIONMANAGER_ENTRY );
-
+ LOG_FUNC
CActiveScheduler::Add(this);
- OstTraceFunctionExit0( REF_CMSMMPOLICYNOTIFICATIONMANAGER_CMSMMPOLICYNOTIFICATIONMANAGER_EXIT );
}
void CMsmmPolicyNotificationManager::ConstructL()
{
- OstTraceFunctionEntry0( REF_CMSMMPOLICYNOTIFICATIONMANAGER_CONSTRUCTL_ENTRY );
-
+ LOG_FUNC
User::LeaveIfError(iNotifier.Connect());
- OstTraceFunctionExit0( REF_CMSMMPOLICYNOTIFICATIONMANAGER_CONSTRUCTL_EXIT );
}
void CMsmmPolicyNotificationManager::SendNotification()
{
- OstTraceFunctionEntry0( REF_CMSMMPOLICYNOTIFICATIONMANAGER_SENDNOTIFICATION_ENTRY );
-
+ LOG_FUNC
iNotifier.StartNotifierAndGetResponse(
iStatus, KMountPolicyNotifierUid, iErrorQueue[0], iResponse);
SetActive();
- OstTraceFunctionExit0( REF_CMSMMPOLICYNOTIFICATIONMANAGER_SENDNOTIFICATION_EXIT );
}
// End of file