usbengines/usbotgwatcher/src/cusbstate.cpp
branchRCL_3
changeset 7 ff9df6630274
parent 6 a15c582fbf97
equal deleted inserted replaced
6:a15c582fbf97 7:ff9df6630274
     1 /*
     1 /*
     2  * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
     2  * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
     3  * All rights reserved.
     3  * All rights reserved.
     4  * This component and the accompanying materials are made available
     4  * This component and the accompanying materials are made available
     5  * under the terms of "Eclipse Public License v1.0"
     5  * under the terms of "Eclipse Public License v1.0"
     6  * which accompanies this distribution, and is available
     6  * which accompanies this distribution, and is available
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    13  *
    13  *
    14  * Description:  Implementation
    14  * Description:  Implementation
    15  *
    15  *
    16  */
    16  */
    17 
    17 
       
    18 #include "cusbotgwatcher.h"
    18 #include "cusbstate.h"
    19 #include "cusbstate.h"
    19 
    20 
    20 #include "panic.h"
    21 #include "panic.h"
    21 #include "debug.h"
    22 #include "debug.h"
    22 
    23 
   146 // ---------------------------------------------------------------------------
   147 // ---------------------------------------------------------------------------
   147 //
   148 //
   148 void CUsbState::IdPinOffL()
   149 void CUsbState::IdPinOffL()
   149     {
   150     {
   150     LOG_FUNC
   151     LOG_FUNC
   151     Panic(EIdPinOffNotExpected);
   152     PANIC(EIdPinOffNotExpected);
   152     }
   153     }
   153 
   154 
   154 // ---------------------------------------------------------------------------
   155 // ---------------------------------------------------------------------------
   155 // 
   156 // 
   156 // ---------------------------------------------------------------------------
   157 // ---------------------------------------------------------------------------
   157 //
   158 //
   158 void CUsbState::IdPinOnL()
   159 void CUsbState::IdPinOnL()
   159     {
   160     {
   160     LOG_FUNC
   161     LOG_FUNC
   161     Panic(EIdPinOnNotExpected);
   162     PANIC(EIdPinOnNotExpected);
   162     }
   163     }
   163 
   164 
   164 // From VBus observer
   165 // From VBus observer
   165 // ---------------------------------------------------------------------------
   166 // ---------------------------------------------------------------------------
   166 // 
   167 // 
   167 // ---------------------------------------------------------------------------
   168 // ---------------------------------------------------------------------------
   168 //
   169 //
   169 void CUsbState::VBusDownL()
   170 void CUsbState::VBusDownL()
   170     {
   171     {
   171     LOG_FUNC
   172     LOG_FUNC
   172     Panic(EVBusDownNotExpected);
   173     PANIC(EVBusDownNotExpected);
   173     }
   174     }
   174 
   175 
   175 // ---------------------------------------------------------------------------
   176 // ---------------------------------------------------------------------------
   176 // 
   177 // 
   177 // ---------------------------------------------------------------------------
   178 // ---------------------------------------------------------------------------
   178 //
   179 //
   179 void CUsbState::VBusUpL()
   180 void CUsbState::VBusUpL()
   180     {
   181     {
   181     LOG_FUNC
   182     LOG_FUNC
   182     Panic(EVBusUpNotExpected);
   183     PANIC(EVBusUpNotExpected);
   183     }
   184     }
   184 
   185 
   185 // From OTG state observer
   186 // From OTG state observer
   186 // ---------------------------------------------------------------------------
   187 // ---------------------------------------------------------------------------
   187 // 
   188 // 
   188 // ---------------------------------------------------------------------------
   189 // ---------------------------------------------------------------------------
   189 //
   190 //
   190 void CUsbState::AIdleL()
   191 void CUsbState::AIdleL()
   191     {
   192     {
   192     LOG_FUNC
   193     LOG_FUNC
   193     Panic(EAIdleNotExpected);
   194     PANIC(EAIdleNotExpected);
   194     }
   195     }
   195 
   196 
   196 // ---------------------------------------------------------------------------
   197 // ---------------------------------------------------------------------------
   197 // 
   198 // 
   198 // ---------------------------------------------------------------------------
   199 // ---------------------------------------------------------------------------
   199 //
   200 //
   200 void CUsbState::AHostL()
   201 void CUsbState::AHostL()
   201     {
   202     {
   202     LOG_FUNC
   203     LOG_FUNC
   203     Panic(EAHostNotExpected);
   204     PANIC(EAHostNotExpected);
   204     }
   205     }
   205 
   206 
   206 // ---------------------------------------------------------------------------
   207 // ---------------------------------------------------------------------------
   207 // 
   208 // 
   208 // ---------------------------------------------------------------------------
   209 // ---------------------------------------------------------------------------
   209 //
   210 //
   210 void CUsbState::APeripheralL()
   211 void CUsbState::APeripheralL()
   211     {
   212     {
   212     LOG_FUNC
   213     LOG_FUNC
   213     Panic(EAPeripheralNotExpected);
   214     PANIC(EAPeripheralNotExpected);
   214     }
   215     }
   215 
   216 
   216 // ---------------------------------------------------------------------------
   217 // ---------------------------------------------------------------------------
   217 // 
   218 // 
   218 // ---------------------------------------------------------------------------
   219 // ---------------------------------------------------------------------------
   219 //
   220 //
   220 void CUsbState::AVBusErrorL()
   221 void CUsbState::AVBusErrorL()
   221     {
   222     {
   222     LOG_FUNC
   223     LOG_FUNC
   223     Panic(EAVBusErrorNotExpected);
   224     PANIC(EAVBusErrorNotExpected);
   224     }
   225     }
   225 
   226 
   226 // ---------------------------------------------------------------------------
   227 // ---------------------------------------------------------------------------
   227 // 
   228 // 
   228 // ---------------------------------------------------------------------------
   229 // ---------------------------------------------------------------------------
   229 //
   230 //
   230 void CUsbState::BIdleL()
   231 void CUsbState::BIdleL()
   231     {
   232     {
   232     LOG_FUNC
   233     LOG_FUNC
   233     Panic(EBIdleNotExpected);
   234     PANIC(EBIdleNotExpected);
   234     }
   235     }
   235 
   236 
   236 // ---------------------------------------------------------------------------
   237 // ---------------------------------------------------------------------------
   237 // 
   238 // 
   238 // ---------------------------------------------------------------------------
   239 // ---------------------------------------------------------------------------
   239 //
   240 //
   240 void CUsbState::BPeripheralL()
   241 void CUsbState::BPeripheralL()
   241     {
   242     {
   242     LOG_FUNC
   243     LOG_FUNC
   243     Panic(EBPeripheralNotExpected);
   244     PANIC(EBPeripheralNotExpected);
   244     }
   245     }
   245 
   246 
   246 // ---------------------------------------------------------------------------
   247 // ---------------------------------------------------------------------------
   247 // 
   248 // 
   248 // ---------------------------------------------------------------------------
   249 // ---------------------------------------------------------------------------
   249 //
   250 //
   250 void CUsbState::BHostL()
   251 void CUsbState::BHostL()
   251     {
   252     {
   252     LOG_FUNC
   253     LOG_FUNC
   253     Panic(EBHostNotExpected);
   254     PANIC(EBHostNotExpected);
   254     }
   255     }
   255 
   256 
   256 // From bus activity observer
   257 // From bus activity observer
   257 // ---------------------------------------------------------------------------
   258 // ---------------------------------------------------------------------------
   258 // 
   259 // 
   259 // ---------------------------------------------------------------------------
   260 // ---------------------------------------------------------------------------
   260 //
   261 //
   261 void CUsbState::BusIdleL()
   262 void CUsbState::BusIdleL()
   262     {
   263     {
   263     LOG_FUNC
   264     LOG_FUNC
   264     Panic(EBusIdleNotExpected);
   265     PANIC(EBusIdleNotExpected);
   265     }
   266     }
   266 
   267 
   267 // ---------------------------------------------------------------------------
   268 // ---------------------------------------------------------------------------
   268 // 
   269 // 
   269 // ---------------------------------------------------------------------------
   270 // ---------------------------------------------------------------------------
   270 //
   271 //
   271 void CUsbState::BusActiveL()
   272 void CUsbState::BusActiveL()
   272     {
   273     {
   273     LOG_FUNC
   274     LOG_FUNC
   274     Panic(EBusActiveNotExpected);
   275     PANIC(EBusActiveNotExpected);
   275     }
   276     }
   276 
   277 
   277 // From Host Event notification observer
   278 // From Host Event notification observer
   278 // ---------------------------------------------------------------------------
   279 // ---------------------------------------------------------------------------
   279 // 
   280 // 
   280 // ---------------------------------------------------------------------------
   281 // ---------------------------------------------------------------------------
   281 //
   282 //
   282 void CUsbState::DeviceAttachedL(TDeviceEventInformation)
   283 void CUsbState::DeviceAttachedL(TDeviceEventInformation)
   283     {
   284     {
   284     LOG_FUNC
   285     LOG_FUNC
   285     Panic(EDeviceAttachedNotExpected);
   286     PANIC(EDeviceAttachedNotExpected);
   286     }
   287     }
   287 
   288 
   288 // ---------------------------------------------------------------------------
   289 // ---------------------------------------------------------------------------
   289 // 
   290 // 
   290 // ---------------------------------------------------------------------------
   291 // ---------------------------------------------------------------------------
   291 //
   292 //
   292 void CUsbState::DeviceDetachedL(TDeviceEventInformation)
   293 void CUsbState::DeviceDetachedL(TDeviceEventInformation)
   293     {
   294     {
   294     LOG_FUNC
   295     LOG_FUNC
   295     Panic(EDeviceDetachedNotExpected);
   296     PANIC(EDeviceDetachedNotExpected);
   296     }
   297     }
   297 
   298 
   298 // ---------------------------------------------------------------------------
   299 // ---------------------------------------------------------------------------
   299 // 
   300 // 
   300 // ---------------------------------------------------------------------------
   301 // ---------------------------------------------------------------------------
   301 //
   302 //
   302 void CUsbState::DriverLoadSuccessL(TDeviceEventInformation)
   303 void CUsbState::DriverLoadSuccessL(TDeviceEventInformation)
   303     {
   304     {
   304     LOG_FUNC
   305     LOG_FUNC
   305     Panic(EDriverLoadSuccessNotExpected);
   306     PANIC(EDriverLoadSuccessNotExpected);
   306     }
   307     }
   307 
   308 
   308 // ---------------------------------------------------------------------------
   309 // ---------------------------------------------------------------------------
   309 // 
   310 // 
   310 // ---------------------------------------------------------------------------
   311 // ---------------------------------------------------------------------------
   311 //
   312 //
   312 void CUsbState::DriverLoadPartialSuccessL(TDeviceEventInformation)
   313 void CUsbState::DriverLoadPartialSuccessL(TDeviceEventInformation)
   313     {
   314     {
   314     LOG_FUNC
   315     LOG_FUNC
   315     Panic(EDriverLoadPartialSuccessNotExpected);
   316     PANIC(EDriverLoadPartialSuccessNotExpected);
   316     }
   317     }
   317 
   318 
   318 // ---------------------------------------------------------------------------
   319 // ---------------------------------------------------------------------------
   319 // 
   320 // 
   320 // ---------------------------------------------------------------------------
   321 // ---------------------------------------------------------------------------
   321 //
   322 //
   322 void CUsbState::DriverLoadFailureL(TDeviceEventInformation)
   323 void CUsbState::DriverLoadFailureL(TDeviceEventInformation)
   323     {
   324     {
   324     LOG_FUNC
   325     LOG_FUNC
   325     Panic(EDriverLoadFailureNotExpected);
   326     PANIC(EDriverLoadFailureNotExpected);
   326     }
   327     }
   327 
   328 
   328 // ---------------------------------------------------------------------------
   329 // ---------------------------------------------------------------------------
   329 // 
   330 // 
   330 // ---------------------------------------------------------------------------
   331 // ---------------------------------------------------------------------------
   331 //
   332 //
   332 void CUsbState::BadHubPositionL()
   333 void CUsbState::BadHubPositionL()
   333     {
   334     {
   334     LOG_FUNC
   335     LOG_FUNC
   335     Panic(EBadHubPositionNotExpected);
   336     PANIC(EBadHubPositionNotExpected);
   336     }
   337     }
   337 
   338 
   338 // ---------------------------------------------------------------------------
   339 // ---------------------------------------------------------------------------
   339 // 
   340 // 
   340 // ---------------------------------------------------------------------------
   341 // ---------------------------------------------------------------------------
   341 //
   342 //
   342 void CUsbState::VBusErrorL()
   343 void CUsbState::VBusErrorL()
   343     {
   344     {
   344     LOG_FUNC
   345     LOG_FUNC
   345     Panic(EVBusErrorNotExpected);
   346     PANIC(EVBusErrorNotExpected);
   346     }
   347     }
   347 
   348 
   348 // ---------------------------------------------------------------------------
   349 // ---------------------------------------------------------------------------
   349 // 
   350 // 
   350 // ---------------------------------------------------------------------------
   351 // ---------------------------------------------------------------------------
   351 //
   352 //
   352 void CUsbState::MessageNotificationReceivedL(TInt)
   353 void CUsbState::MessageNotificationReceivedL(TInt)
   353     {
   354     {
   354     LOG_FUNC
   355     LOG_FUNC
   355     Panic(EMessageNotificationNotExpected);
   356     PANIC(EMessageNotificationNotExpected);
   356     }
   357     }
   357 
   358 
   358 // ---------------------------------------------------------------------------
   359 // ---------------------------------------------------------------------------
   359 // 
   360 // 
   360 // ---------------------------------------------------------------------------
   361 // ---------------------------------------------------------------------------
   361 //
   362 //
   362 void CUsbState::SrpReceivedL()
   363 void CUsbState::SrpReceivedL()
   363     {
   364     {
   364     LOG_FUNC
   365     LOG_FUNC
   365     Panic(ESrpNotExpected);
   366     PANIC(ESrpNotExpected);
   366     }
   367     }
   367 
   368 
   368 // ---------------------------------------------------------------------------
   369 // ---------------------------------------------------------------------------
   369 // 
   370 // 
   370 // ---------------------------------------------------------------------------
   371 // ---------------------------------------------------------------------------
   371 //
   372 //
   372 void CUsbState::SessionRequestedL()
   373 void CUsbState::SessionRequestedL()
   373     {
   374     {
   374     LOG_FUNC
   375     LOG_FUNC
   375     Panic(ESessionRequestNotExpected);
   376     PANIC(ESessionRequestNotExpected);
   376     }
   377     }