diff -r 0659d0e1a03c -r 1d28c8722707 userlibandfileserver/fileserver/shostmassstorage/server/src/cusbhostmsserver.cpp --- a/userlibandfileserver/fileserver/shostmassstorage/server/src/cusbhostmsserver.cpp Wed Oct 20 13:58:28 2010 +0100 +++ b/userlibandfileserver/fileserver/shostmassstorage/server/src/cusbhostmsserver.cpp Tue Nov 02 15:29:23 2010 +0000 @@ -1,4 +1,4 @@ -// 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 the License "Eclipse Public License v1.0" @@ -12,7 +12,7 @@ // // Description: // cusbhostmsderver.cpp -// +// // /** @@ -27,30 +27,32 @@ #include "usbmshostpanic.h" #include "cusbhostmssession.h" #include "cusbhostmsserver.h" -#include "msdebug.h" -#include "debug.h" #include "securitypolicy.h" +#include "OstTraceDefinitions.h" +#ifdef OST_TRACE_COMPILER_IN_USE +#include "cusbhostmsserverTraces.h" +#endif + + /** Constructs a USB mass storage Server */ CUsbHostMsServer* CUsbHostMsServer::NewLC() - { - __MSFNSLOG - CUsbHostMsServer* r = new (ELeave) CUsbHostMsServer(); - CleanupStack::PushL(r); - r->StartL(KUsbHostMsServerName); - return r; - } + { + CUsbHostMsServer* r = new (ELeave) CUsbHostMsServer(); + CleanupStack::PushL(r); + r->StartL(KUsbHostMsServerName); + return r; + } /** Destructor */ CUsbHostMsServer::~CUsbHostMsServer() - { - __MSFNLOG + { // Intentionally left blank - } + } /** @@ -58,9 +60,8 @@ */ CUsbHostMsServer::CUsbHostMsServer() : CPolicyServer(EPriorityHigh,KUsbMsServerPolicy, EGlobalSharableSessions) - { - __MSFNLOG - } + { + } /** @@ -72,20 +73,19 @@ @return CSession2* A pointer to a session object to be used for the client */ CSession2* CUsbHostMsServer::NewSessionL(const TVersion &aVersion, const RMessage2& /*aMessage*/) const - { - __MSFNSLOG - TVersion v(KUsbHostMsSrvMajorVersionNumber, + { + TVersion v(KUsbHostMsSrvMajorVersionNumber, KUsbHostMsSrvMinorVersionNumber, KUsbHostMsSrvBuildVersionNumber); - if (!User::QueryVersionSupported(v, aVersion)) - User::Leave(KErrNotSupported); + if (!User::QueryVersionSupported(v, aVersion)) + User::Leave(KErrNotSupported); - CUsbHostMsServer* ncThis = const_cast(this); + CUsbHostMsServer* ncThis = const_cast(this); - CUsbHostMsSession* sess = CUsbHostMsSession::NewL(*ncThis); + CUsbHostMsSession* sess = CUsbHostMsSession::NewL(*ncThis); - return sess; - } + return sess; + } /** @@ -94,13 +94,13 @@ @param aError The error that has occurred */ void CUsbHostMsServer::Error(TInt aError) - { - __MSFNLOG - __HOSTPRINT1(_L("CUsbHostMsServer::Error [aError=%d]\n"), aError); + { + OstTrace1(TRACE_SHOSTMASSSTORAGE_HOST, CUSBHOSTMSSERVER_10, + "CUsbHostMsServer::Error [aError=%d]\n", aError); - Message().Complete(aError); - ReStart(); - } + Message().Complete(aError); + ReStart(); + } /** Increment the open session count (iSessionCount) by one. @@ -108,15 +108,13 @@ @post The number of open sessions is incremented by one */ void CUsbHostMsServer::IncrementSessionCount() - { - __MSFNLOG - __HOSTPRINT1(_L("CUsbHostMsServer::IncrementSessionCount %d\n"), iSessionCount); - __ASSERT_DEBUG(iSessionCount >= 0, User::Panic(KUsbMsHostPanicCat, EUsbMsPanicIllegalIPC)); + { + OstTrace1(TRACE_SHOSTMASSSTORAGE_HOST, CUSBHOSTMSSERVER_11, + "CUsbHostMsServer::IncrementSessionCount %d", iSessionCount); + __ASSERT_DEBUG(iSessionCount >= 0, User::Panic(KUsbMsHostPanicCat, EUsbMsPanicIllegalIPC)); - ++iSessionCount; - - __HOSTPRINT(_L("CUsbHostMsServer::IncrementSessionCount\n")); - } + ++iSessionCount; + } /** Decrement the open session count (iSessionCount) by one. @@ -124,12 +122,12 @@ @post The number of open sessions is decremented by one */ void CUsbHostMsServer::DecrementSessionCount() - { - __MSFNLOG - __HOSTPRINT1(_L("CUsbHostMsServer::DecrementSessionCount %d\n"), iSessionCount); + { + OstTrace1(TRACE_SHOSTMASSSTORAGE_HOST, CUSBHOSTMSSERVER_12, + "CUsbHostMsServer::DecrementSessionCount %d", iSessionCount); - __ASSERT_DEBUG(iSessionCount > 0, User::Panic(KUsbMsHostPanicCat, EUsbMsPanicIllegalIPC)); + __ASSERT_DEBUG(iSessionCount > 0, User::Panic(KUsbMsHostPanicCat, EUsbMsPanicIllegalIPC)); - --iSessionCount; - } + --iSessionCount; + }