usbengines/usbotgwatcher/src/cusbstatehostundefined.cpp
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:  Implementation
       
    15  *
       
    16  */
       
    17 
       
    18 #include "cusbotgwatcher.h"
       
    19 #include "cusbstatehostundefined.h"
       
    20 
       
    21 #include "definitions.h"
       
    22 #include "errors.h"
       
    23 
       
    24 #include "debug.h"
       
    25 #include "panic.h"
       
    26 
       
    27 // ---------------------------------------------------------------------------
       
    28 // 
       
    29 // ---------------------------------------------------------------------------
       
    30 //
       
    31 CUsbStateHostUndefined::CUsbStateHostUndefined(CUsbOtgWatcher& aWatcher) :
       
    32     CUsbStateHostABase(aWatcher)
       
    33     {
       
    34     }
       
    35 
       
    36 // ---------------------------------------------------------------------------
       
    37 // 
       
    38 // ---------------------------------------------------------------------------
       
    39 //
       
    40 CUsbStateHostUndefined* CUsbStateHostUndefined::NewL(CUsbOtgWatcher& aWatcher)
       
    41     {
       
    42     LOG_FUNC
       
    43 
       
    44     CUsbStateHostUndefined* self = new (ELeave) CUsbStateHostUndefined(
       
    45             aWatcher);
       
    46     CleanupStack::PushL(self);
       
    47     self->ConstructL();
       
    48     CleanupStack::Pop(self);
       
    49     return self;
       
    50     }
       
    51 
       
    52 // ---------------------------------------------------------------------------
       
    53 // 
       
    54 // ---------------------------------------------------------------------------
       
    55 //
       
    56 void CUsbStateHostUndefined::ConstructL()
       
    57     {
       
    58     LOG_FUNC
       
    59 
       
    60     CUsbStateHostABase::ConstructL();
       
    61 
       
    62     }
       
    63 
       
    64 // ---------------------------------------------------------------------------
       
    65 // 
       
    66 // ---------------------------------------------------------------------------
       
    67 //
       
    68 CUsbStateHostUndefined::~CUsbStateHostUndefined()
       
    69     {
       
    70     LOG_FUNC
       
    71     }
       
    72 
       
    73 // ---------------------------------------------------------------------------
       
    74 // 
       
    75 // ---------------------------------------------------------------------------
       
    76 //
       
    77 TUsbStateIds CUsbStateHostUndefined::Id()
       
    78     {
       
    79     return EUsbStateHostUndefined;
       
    80     }
       
    81 
       
    82 // From VBus observer
       
    83 // ---------------------------------------------------------------------------
       
    84 // 
       
    85 // ---------------------------------------------------------------------------
       
    86 //
       
    87 void CUsbStateHostUndefined::VBusDownL()
       
    88     {
       
    89     LOG_FUNC
       
    90     }
       
    91 
       
    92 // ---------------------------------------------------------------------------
       
    93 // 
       
    94 // ---------------------------------------------------------------------------
       
    95 //
       
    96 void CUsbStateHostUndefined::VBusUpL()
       
    97     {
       
    98     LOG_FUNC
       
    99     }
       
   100 
       
   101 // ---------------------------------------------------------------------------
       
   102 // 
       
   103 // ---------------------------------------------------------------------------
       
   104 //
       
   105 void CUsbStateHostUndefined::VBusErrorL()
       
   106     {
       
   107     LOG_FUNC
       
   108     iWatcher.Usb().BusClearError();
       
   109     }
       
   110 
       
   111 // From OTG state observer
       
   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 // ---------------------------------------------------------------------------
       
   141 // 
       
   142 // ---------------------------------------------------------------------------
       
   143 //
       
   144 void CUsbStateHostUndefined::DeviceAttachedL(TDeviceEventInformation)
       
   145     {
       
   146     LOG_FUNC
       
   147     }
       
   148 
       
   149 // ---------------------------------------------------------------------------
       
   150 // 
       
   151 // ---------------------------------------------------------------------------
       
   152 //
       
   153 void CUsbStateHostUndefined::DeviceDetachedL(TDeviceEventInformation)
       
   154     {
       
   155     LOG_FUNC
       
   156     }
       
   157 
       
   158 // ---------------------------------------------------------------------------
       
   159 // 
       
   160 // ---------------------------------------------------------------------------
       
   161 //
       
   162 void CUsbStateHostUndefined::DriverLoadSuccessL(TDeviceEventInformation)
       
   163     {
       
   164     LOG_FUNC
       
   165     }
       
   166 
       
   167 // ---------------------------------------------------------------------------
       
   168 // 
       
   169 // ---------------------------------------------------------------------------
       
   170 //
       
   171 void CUsbStateHostUndefined::DriverLoadPartialSuccessL(TDeviceEventInformation)
       
   172     {
       
   173     LOG_FUNC
       
   174     }
       
   175 
       
   176 // ---------------------------------------------------------------------------
       
   177 // 
       
   178 // ---------------------------------------------------------------------------
       
   179 //
       
   180 void CUsbStateHostUndefined::DriverLoadFailureL(TDeviceEventInformation)
       
   181     {
       
   182     LOG_FUNC
       
   183     }
       
   184 
       
   185 // ---------------------------------------------------------------------------
       
   186 // 
       
   187 // ---------------------------------------------------------------------------
       
   188 //
       
   189 void CUsbStateHostUndefined::SrpReceivedL()
       
   190     {
       
   191     LOG_FUNC
       
   192     }
       
   193 
       
   194 // ---------------------------------------------------------------------------
       
   195 // 
       
   196 // ---------------------------------------------------------------------------
       
   197 //
       
   198 void CUsbStateHostUndefined::SessionRequestedL()
       
   199     {
       
   200     LOG_FUNC
       
   201     }
       
   202 
       
   203 // From message notification observer
       
   204 // ---------------------------------------------------------------------------
       
   205 // 
       
   206 // ---------------------------------------------------------------------------
       
   207 //
       
   208 void CUsbStateHostUndefined::MessageNotificationReceivedL(TInt aMessage)
       
   209     {
       
   210     LOG_FUNC
       
   211     LOG1( "Unhandled message aMessage = %d" , aMessage);
       
   212     }
       
   213 
       
   214 // ---------------------------------------------------------------------------
       
   215 // 
       
   216 // ---------------------------------------------------------------------------
       
   217 //
       
   218 void CUsbStateHostUndefined::BadHubPositionL()
       
   219     {
       
   220     LOG_FUNC
       
   221     PANIC( EBadHubPositionNotExpected);
       
   222     }