diff -r 7068aba64af5 -r a15c582fbf97 usbengines/usbotgwatcher/src/cusbstatehostundefined.cpp --- a/usbengines/usbotgwatcher/src/cusbstatehostundefined.cpp Fri Feb 19 23:50:33 2010 +0200 +++ b/usbengines/usbotgwatcher/src/cusbstatehostundefined.cpp Fri Mar 12 15:48:40 2010 +0200 @@ -1,28 +1,22 @@ /* -* 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" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation + * 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" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". * -*/ + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: Implementation + * + */ #include "cusbstatehostundefined.h" -#ifndef STIF - -#else - -#endif - #include "definitions.h" #include "errors.h" @@ -33,8 +27,7 @@ // // --------------------------------------------------------------------------- // -CUsbStateHostUndefined::CUsbStateHostUndefined( - CUsbOtgWatcher* aWatcher) : +CUsbStateHostUndefined::CUsbStateHostUndefined(CUsbOtgWatcher& aWatcher) : CUsbStateHostABase(aWatcher) { } @@ -43,24 +36,25 @@ // // --------------------------------------------------------------------------- // -CUsbStateHostUndefined* CUsbStateHostUndefined::NewL(CUsbOtgWatcher* aWatcher) - { - FLOG( _L( "[USBOTGWATCHER]\tCUsbStateHostUndefined::NewL" ) ); +CUsbStateHostUndefined* CUsbStateHostUndefined::NewL(CUsbOtgWatcher& aWatcher) + { + LOG_FUNC - CUsbStateHostUndefined* self = new (ELeave) CUsbStateHostUndefined(aWatcher); - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(self); - return self; - } - + CUsbStateHostUndefined* self = new (ELeave) CUsbStateHostUndefined( + aWatcher); + CleanupStack::PushL(self); + self->ConstructL(); + CleanupStack::Pop(self); + return self; + } + // --------------------------------------------------------------------------- // // --------------------------------------------------------------------------- // void CUsbStateHostUndefined::ConstructL() { - FLOG( _L( "[USBOTGWATCHER]\tCUsbStateHostUndefined::ConstructL" ) ); + LOG_FUNC CUsbStateHostABase::ConstructL(); @@ -72,8 +66,7 @@ // CUsbStateHostUndefined::~CUsbStateHostUndefined() { - FLOG( _L( "[USBOTGWATCHER]\tCUsbStateHostundefined::~CUsbStateHostUndefined" ) ); - + LOG_FUNC } // --------------------------------------------------------------------------- @@ -85,26 +78,6 @@ return EUsbStateHostUndefined; } -///////////////////////////////////////////////////////////////////////////////////// -// From IdPin observer -// --------------------------------------------------------------------------- -// -// --------------------------------------------------------------------------- -// -void CUsbStateHostUndefined::IdPinOffL() - { - FLOG( _L( "[USBOTGWATCHER]\tCUsbStateHostUndefined::IdPinOffL" ) ); - } - -// --------------------------------------------------------------------------- -// -// --------------------------------------------------------------------------- -// -void CUsbStateHostUndefined::IdPinOnL() - { - FLOG( _L( "[USBOTGWATCHER]\tCUsbStateHostUndefined::IdPinOnL" ) ); - } - // From VBus observer // --------------------------------------------------------------------------- // @@ -112,7 +85,7 @@ // void CUsbStateHostUndefined::VBusDownL() { - FLOG( _L( "[USBOTGWATCHER]\tCUsbStateHostUndefined::VBusDownL" ) ); + LOG_FUNC } // --------------------------------------------------------------------------- @@ -121,7 +94,7 @@ // void CUsbStateHostUndefined::VBusUpL() { - FLOG( _L( "[USBOTGWATCHER]\tCUsbStateHostUndefined::VBusUpL" ) ); + LOG_FUNC } // --------------------------------------------------------------------------- @@ -130,9 +103,8 @@ // void CUsbStateHostUndefined::VBusErrorL() { - FLOG( _L( "[USBOTGWATCHER]\tCUsbStateHostUndefined::VBusErrorL" ) ); - iWatcher->Usb().BusClearError(); - HandleL(EUsbWatcherErrorInConnection, EUsbStateHostHandle); + LOG_FUNC + iWatcher.Usb().BusClearError(); } // From OTG state observer @@ -140,20 +112,10 @@ // // --------------------------------------------------------------------------- // -void CUsbStateHostUndefined::AIdleL() - { - FLOG( _L( "[USBOTGWATCHER]\tCUsbStateHostUndefined::AIdleL" ) ); - } - -// --------------------------------------------------------------------------- -// -// --------------------------------------------------------------------------- -// void CUsbStateHostUndefined::AVBusErrorL() { - FLOG( _L( "[USBOTGWATCHER]\tCUsbStateHostUndefined::AVBusErrorL" ) ); - iWatcher->Usb().BusClearError(); - HandleL(EUsbWatcherErrorInConnection, EUsbStateHostHandle); + LOG_FUNC + iWatcher.Usb().BusClearError(); } // --------------------------------------------------------------------------- @@ -162,7 +124,7 @@ // void CUsbStateHostUndefined::BIdleL() { - FLOG( _L( "[USBOTGWATCHER]\tCUsbStateHostUndefined::BIdleL" ) ); + LOG_FUNC } // --------------------------------------------------------------------------- @@ -171,11 +133,50 @@ // void CUsbStateHostUndefined::BPeripheralL() { - FLOG( _L( "[USBOTGWATCHER]\tCUsbStateHostUndefined::BPeripheralL" ) ); + LOG_FUNC } // From host state observer void CUsbStateHostUndefined::DeviceDetachedL(TDeviceEventInformation /*aInfo*/) { - FLOG( _L( "[USBOTGWATCHER]\tCUsbStateHostUndefined::DeviceDetachedL" ) ); + LOG_FUNC + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +// +void CUsbStateHostUndefined::SrpReceivedL() + { + LOG_FUNC + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +// +void CUsbStateHostUndefined::SessionRequestedL() + { + LOG_FUNC } + +// From message notification observer +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +// +void CUsbStateHostUndefined::MessageNotificationReceivedL(TInt aMessage) + { + LOG_FUNC + LOG1( "Unhandled message aMessage = %d" , aMessage); + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +// +void CUsbStateHostUndefined::BadHubPositionL() + { + LOG_FUNC + Panic( EBadHubPositionNotExpected); + }