usbengines/usbotgwatcher/src/cusbstatehostaperipheral.cpp
changeset 35 9d8b04ca6939
child 63 ef2686f7597e
equal deleted inserted replaced
34:7858bc6ead78 35:9d8b04ca6939
       
     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:  Implementation
       
    15  *
       
    16  */
       
    17 
       
    18 #include <usbuinotif.h>
       
    19 
       
    20 #include "cusbstatehostaperipheral.h"
       
    21 
       
    22 #include "errors.h"
       
    23 #include "debug.h"
       
    24 #include "panic.h"
       
    25 
       
    26 // ---------------------------------------------------------------------------
       
    27 // 
       
    28 // ---------------------------------------------------------------------------
       
    29 //
       
    30 CUsbStateHostAPeripheral::CUsbStateHostAPeripheral(CUsbOtgWatcher& aWatcher) :
       
    31     CUsbStateHostABase(aWatcher)
       
    32     {
       
    33     }
       
    34 
       
    35 // ---------------------------------------------------------------------------
       
    36 // 
       
    37 // ---------------------------------------------------------------------------
       
    38 //
       
    39 void CUsbStateHostAPeripheral::ConstructL()
       
    40     {
       
    41     LOG_FUNC
       
    42 
       
    43     CUsbStateHostABase::ConstructL();
       
    44     }
       
    45 
       
    46 // ---------------------------------------------------------------------------
       
    47 // 
       
    48 // ---------------------------------------------------------------------------
       
    49 //
       
    50 CUsbStateHostAPeripheral* CUsbStateHostAPeripheral::NewL(
       
    51         CUsbOtgWatcher& aWatcher)
       
    52     {
       
    53     LOG_FUNC
       
    54 
       
    55     CUsbStateHostAPeripheral* self = new (ELeave) CUsbStateHostAPeripheral(
       
    56             aWatcher);
       
    57     CleanupStack::PushL(self);
       
    58     self->ConstructL();
       
    59     CleanupStack::Pop(self);
       
    60     return self;
       
    61     }
       
    62 
       
    63 // ---------------------------------------------------------------------------
       
    64 // 
       
    65 // ---------------------------------------------------------------------------
       
    66 //
       
    67 CUsbStateHostAPeripheral::~CUsbStateHostAPeripheral()
       
    68     {
       
    69     LOG_FUNC
       
    70     }
       
    71 
       
    72 // ---------------------------------------------------------------------------
       
    73 // 
       
    74 // ---------------------------------------------------------------------------
       
    75 //
       
    76 TUsbStateIds CUsbStateHostAPeripheral::Id()
       
    77     {
       
    78     return EUsbStateHostAPeripheral;
       
    79     }
       
    80 
       
    81 // From OTG state observer
       
    82 // ---------------------------------------------------------------------------
       
    83 // 
       
    84 // ---------------------------------------------------------------------------
       
    85 //
       
    86 void CUsbStateHostAPeripheral::AHostL()
       
    87     {
       
    88     LOG_FUNC
       
    89     ChangeHostStateL( EUsbStateHostAInitiate);
       
    90     }
       
    91 
       
    92 // ---------------------------------------------------------------------------
       
    93 //
       
    94 // ---------------------------------------------------------------------------
       
    95 //
       
    96 void CUsbStateHostAPeripheral::AIdleL()
       
    97     {
       
    98     LOG_FUNC
       
    99     ChangeHostStateL( EUsbStateHostAInitiate);
       
   100     }