usbengines/usbotgwatcher/inc/cusbstatehostaidle.h
changeset 0 1e05558e2206
equal deleted inserted replaced
-1:000000000000 0:1e05558e2206
       
     1 /*
       
     2 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Iplementation of the concret state
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_USBSTATEHOSTAIDLE_H
       
    20 #define C_USBSTATEHOSTAIDLE_H
       
    21 
       
    22 #include "cusbotgwatcher.h"
       
    23 #include "cusbstatehostainitiatebase.h"
       
    24 #ifndef STIF
       
    25 #include "cusbtimer.h"
       
    26 #else
       
    27 #include "mockcusbtimer.h"
       
    28 #endif
       
    29 
       
    30 /**
       
    31  *  This class implements basic behaviour in Idle state (VBus down, IdPin on)
       
    32  *
       
    33  */
       
    34 NONSHARABLE_CLASS( CUsbStateHostAIdle ) : public CUsbStateHostAInitiateBase
       
    35 
       
    36     {
       
    37 
       
    38 public:
       
    39 
       
    40     /**
       
    41      * Two-phased constructor.
       
    42      * @param aWatcher owner
       
    43      */
       
    44     static CUsbStateHostAIdle* NewL(CUsbOtgWatcher* aWatcher);
       
    45 
       
    46     /**
       
    47      * Destructor.
       
    48      */
       
    49     virtual ~CUsbStateHostAIdle();
       
    50 
       
    51 private:
       
    52 
       
    53     /**
       
    54      * Default construction
       
    55      * @param aWatcher owner
       
    56      */
       
    57     CUsbStateHostAIdle(CUsbOtgWatcher* aWatcher);
       
    58 
       
    59     /**
       
    60      * 2nd phase construction
       
    61      */
       
    62     void ConstructL();
       
    63 
       
    64     //from CUsbState
       
    65     /**
       
    66      * State id
       
    67      * @return state id
       
    68      */
       
    69     TUsbStateIds Id();
       
    70 
       
    71     /**
       
    72      * This is called when switched to this state, 
       
    73      * because If all conditions for transition to another state exist, nothing will 
       
    74      * trigger it and transition will not happen. This forces the transition in such cases.
       
    75      *
       
    76      */
       
    77     void JustAdvancedToThisStateL();
       
    78 
       
    79     };
       
    80 
       
    81 #endif //  C_USBSTATEHOSTAIDLE_H