usbengines/usbotgwatcher/inc/cusbstatehostaperipheral.h
changeset 34 7858bc6ead78
parent 31 dfdd8240f7c8
child 35 9d8b04ca6939
equal deleted inserted replaced
31:dfdd8240f7c8 34:7858bc6ead78
     1 /*
       
     2  * Copyright (c) 2008 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:  Implements concrete state
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef C_USBSTATEHOSTAPERIPHERAL_H
       
    19 #define C_USBSTATEHOSTAPERIPHERAL_H
       
    20 
       
    21 #include "cusbstatehostabase.h"
       
    22 
       
    23 class CUsbOtgWatcher;
       
    24 
       
    25 /**
       
    26  *  This class implements behaviour when A device performs peripheral role, from OTG point of view
       
    27  *
       
    28  */
       
    29 NONSHARABLE_CLASS( CUsbStateHostAPeripheral ) : public CUsbStateHostABase
       
    30     {
       
    31 
       
    32 public:
       
    33 
       
    34     /**
       
    35      * Two-phased constructor.
       
    36      * @param aWatcher owner
       
    37      */
       
    38     static CUsbStateHostAPeripheral* NewL(CUsbOtgWatcher& aWatcher);
       
    39 
       
    40     /**
       
    41      * Destructor.
       
    42      */
       
    43     virtual ~CUsbStateHostAPeripheral();
       
    44 
       
    45 private:
       
    46 
       
    47     /**
       
    48      * default constructor
       
    49      * @param aWatcher owner
       
    50      */
       
    51     CUsbStateHostAPeripheral(CUsbOtgWatcher& aWatcher);
       
    52 
       
    53     /**
       
    54      * 2nd phase construction
       
    55      */
       
    56     void ConstructL();
       
    57 
       
    58     //from CUsbState
       
    59     /**
       
    60      * state id
       
    61      * @return state id
       
    62      */
       
    63     TUsbStateIds Id();
       
    64 
       
    65     // From OTG state observer
       
    66     /**
       
    67      * Became a host when A
       
    68      */
       
    69     void AHostL();
       
    70     
       
    71     /**
       
    72      * Became to Idle when A
       
    73      */
       
    74     void AIdleL();
       
    75 
       
    76 private:
       
    77     // data
       
    78 
       
    79     };
       
    80 
       
    81 #endif //  C_USBSTATEHOSTAPERIPHERAL_H