diff -r 7068aba64af5 -r a15c582fbf97 usbengines/usbotgwatcher/inc/cusbstatehostdelayhandle.h --- a/usbengines/usbotgwatcher/inc/cusbstatehostdelayhandle.h Fri Feb 19 23:50:33 2010 +0200 +++ b/usbengines/usbotgwatcher/inc/cusbstatehostdelayhandle.h Fri Mar 12 15:48:40 2010 +0200 @@ -1,43 +1,32 @@ /* -* 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: Implements concrete state + * 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: Implements concrete state + * + */ - -#ifndef C_USBSTATEHOSTDALAYHANDLE_H +#ifndef C_USBSTATEHOSTDELAYHANDLE_H #define C_USBSTATEHOSTDELAYHANDLE_H -#include "cusbotgwatcher.h" #include "cusbstatehosthandle.h" -#ifndef STIF -#include "cusbnotifmanager.h" -#include "cusbtimer.h" -#else -#include "mockcusbnotifmanager.h" -#include "mockcusbtimer.h" -#endif +class CUsbOtgWatcher; /** - * This class implements behaviour when some problem needs vbus drop in a while, and mostly, user action. + * problem handling, vbus not dropping * */ -NONSHARABLE_CLASS( CUsbStateHostDelayHandle ) : public CUsbStateHostHandle, - // MWaitNotifierObserver, - MUsbTimerObserver -// this means only one wait notifier at a time can be shown by this state, might be redesigned +NONSHARABLE_CLASS( CUsbStateHostDelayHandle ) : public CUsbStateHostHandle { friend class CtUsbOtgWatcher; friend class CUsbOtgWatcher; @@ -45,119 +34,39 @@ public: /** - * Two-phased constructor. - * @param aWatcher owner - */ - static CUsbStateHostDelayHandle* NewL(CUsbOtgWatcher* aWatcher); - - /** * Destructor. */ virtual ~CUsbStateHostDelayHandle(); - // From MUsbTimerObserver - /** - * Call back when timer expired - * @param aTimerId timer id - */ - void TimerElapsedL(TUsbTimerId aTimerId); +protected: // From VBus observer /** - * VBus down - */ - void VBusUpL(); - /** - * VBus down + * VBus up */ - void VBusDownL(); - /** - * VBus error happened - */ - void VBusErrorL(); - - // From OTG state observer - /** - * VBus error happen - */ - void AVBusErrorL(); + virtual void VBusUpL(); // From Host Event notification observer /** * Device is attached * @param aInfo Device event data */ - void DeviceAttachedL(TDeviceEventInformation aInfo); - /** - * Device is detached - * @param aInfo Device event data - */ - void DeviceDetachedL(TDeviceEventInformation aInfo); - /** - * Connected to hub in wrong level - */ - void BadHubPositionL(); - - /** - * SRP request received - */ - void SrpReceivedL(); - -//from CUsbState - /** - * State id - * @return state id - */ - TUsbStateIds Id(); - - /** - * This is called when switched to this state, - * because If all conditions for transition to another state exist, nothing will - * trigger it and transition will not happen. This forces the transition in such cases. - * - */ - void JustAdvancedToThisStateL(); - - /** - * This is called when leaving this state, - * - */ - void JustBeforeLeavingThisStateL(); - - /** - * handles issue - */ - void DoHandleL(); - - -private: + virtual void DeviceAttachedL(TDeviceEventInformation aInfo); /** * Default constructor * @param aWatcher owner */ - CUsbStateHostDelayHandle(CUsbOtgWatcher* aWatcher); + CUsbStateHostDelayHandle(CUsbOtgWatcher& aWatcher); /** * 2nd phase construction */ void ConstructL(); - -private: // data - /** - * too much power timer - * own - */ - CUsbTimer* iTooMuchPowerTimer; - - /** - * drivers not found - * own - */ - CUsbTimer* iDriversNotFoundTimer; +private: }; -#endif // C_USBSTATEHOSTHANDLE_H +#endif // C_USBSTATEHOSTDELAYHANDLE_H