usbengines/usbotgwatcher/src/cusbstatehostundefined.cpp
changeset 25 8c311f9acc5e
child 26 0ae0f29418cd
equal deleted inserted replaced
8:7e15987c4500 25:8c311f9acc5e
       
     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:  Implementation
       
    15  *
       
    16  */
       
    17 
       
    18 #include "cusbstatehostundefined.h"
       
    19 
       
    20 #include "definitions.h"
       
    21 #include "errors.h"
       
    22 
       
    23 #include "debug.h"
       
    24 #include "panic.h"
       
    25 
       
    26 // ---------------------------------------------------------------------------
       
    27 // 
       
    28 // ---------------------------------------------------------------------------
       
    29 //
       
    30 CUsbStateHostUndefined::CUsbStateHostUndefined(CUsbOtgWatcher& aWatcher) :
       
    31     CUsbStateHostABase(aWatcher)
       
    32     {
       
    33     }
       
    34 
       
    35 // ---------------------------------------------------------------------------
       
    36 // 
       
    37 // ---------------------------------------------------------------------------
       
    38 //
       
    39 CUsbStateHostUndefined* CUsbStateHostUndefined::NewL(CUsbOtgWatcher& aWatcher)
       
    40     {
       
    41     LOG_FUNC
       
    42 
       
    43     CUsbStateHostUndefined* self = new (ELeave) CUsbStateHostUndefined(
       
    44             aWatcher);
       
    45     CleanupStack::PushL(self);
       
    46     self->ConstructL();
       
    47     CleanupStack::Pop(self);
       
    48     return self;
       
    49     }
       
    50 
       
    51 // ---------------------------------------------------------------------------
       
    52 // 
       
    53 // ---------------------------------------------------------------------------
       
    54 //
       
    55 void CUsbStateHostUndefined::ConstructL()
       
    56     {
       
    57     LOG_FUNC
       
    58 
       
    59     CUsbStateHostABase::ConstructL();
       
    60 
       
    61     }
       
    62 
       
    63 // ---------------------------------------------------------------------------
       
    64 // 
       
    65 // ---------------------------------------------------------------------------
       
    66 //
       
    67 CUsbStateHostUndefined::~CUsbStateHostUndefined()
       
    68     {
       
    69     LOG_FUNC
       
    70     }
       
    71 
       
    72 // ---------------------------------------------------------------------------
       
    73 // 
       
    74 // ---------------------------------------------------------------------------
       
    75 //
       
    76 TUsbStateIds CUsbStateHostUndefined::Id()
       
    77     {
       
    78     return EUsbStateHostUndefined;
       
    79     }
       
    80 
       
    81 // From VBus observer
       
    82 // ---------------------------------------------------------------------------
       
    83 // 
       
    84 // ---------------------------------------------------------------------------
       
    85 //
       
    86 void CUsbStateHostUndefined::VBusDownL()
       
    87     {
       
    88     LOG_FUNC
       
    89     }
       
    90 
       
    91 // ---------------------------------------------------------------------------
       
    92 // 
       
    93 // ---------------------------------------------------------------------------
       
    94 //
       
    95 void CUsbStateHostUndefined::VBusUpL()
       
    96     {
       
    97     LOG_FUNC
       
    98     }
       
    99 
       
   100 // ---------------------------------------------------------------------------
       
   101 // 
       
   102 // ---------------------------------------------------------------------------
       
   103 //
       
   104 void CUsbStateHostUndefined::VBusErrorL()
       
   105     {
       
   106     LOG_FUNC
       
   107     iWatcher.Usb().BusClearError();
       
   108     }
       
   109 
       
   110 // From OTG state observer
       
   111 // ---------------------------------------------------------------------------
       
   112 // 
       
   113 // ---------------------------------------------------------------------------
       
   114 //
       
   115 void CUsbStateHostUndefined::AVBusErrorL()
       
   116     {
       
   117     LOG_FUNC
       
   118     iWatcher.Usb().BusClearError();
       
   119     }
       
   120 
       
   121 // ---------------------------------------------------------------------------
       
   122 // 
       
   123 // ---------------------------------------------------------------------------
       
   124 //
       
   125 void CUsbStateHostUndefined::BIdleL()
       
   126     {
       
   127     LOG_FUNC
       
   128     }
       
   129 
       
   130 // ---------------------------------------------------------------------------
       
   131 // 
       
   132 // ---------------------------------------------------------------------------
       
   133 //
       
   134 void CUsbStateHostUndefined::BPeripheralL()
       
   135     {
       
   136     LOG_FUNC
       
   137     }
       
   138 
       
   139 // From host state observer
       
   140 void CUsbStateHostUndefined::DeviceDetachedL(TDeviceEventInformation /*aInfo*/)
       
   141     {
       
   142     LOG_FUNC
       
   143     }
       
   144 
       
   145 // ---------------------------------------------------------------------------
       
   146 // 
       
   147 // ---------------------------------------------------------------------------
       
   148 //
       
   149 void CUsbStateHostUndefined::SrpReceivedL()
       
   150     {
       
   151     LOG_FUNC
       
   152     }
       
   153 
       
   154 // ---------------------------------------------------------------------------
       
   155 // 
       
   156 // ---------------------------------------------------------------------------
       
   157 //
       
   158 void CUsbStateHostUndefined::SessionRequestedL()
       
   159     {
       
   160     LOG_FUNC
       
   161     }
       
   162 
       
   163 // From message notification observer
       
   164 // ---------------------------------------------------------------------------
       
   165 // 
       
   166 // ---------------------------------------------------------------------------
       
   167 //
       
   168 void CUsbStateHostUndefined::MessageNotificationReceivedL(TInt aMessage)
       
   169     {
       
   170     LOG_FUNC
       
   171     LOG1( "Unhandled message aMessage = %d" , aMessage);
       
   172     }
       
   173 
       
   174 // ---------------------------------------------------------------------------
       
   175 // 
       
   176 // ---------------------------------------------------------------------------
       
   177 //
       
   178 void CUsbStateHostUndefined::BadHubPositionL()
       
   179     {
       
   180     LOG_FUNC
       
   181     Panic( EBadHubPositionNotExpected);
       
   182     }