|
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 "cusbstatehostdelayhandle.h" |
|
19 |
|
20 #include "errors.h" |
|
21 #include "debug.h" |
|
22 #include "panic.h" |
|
23 |
|
24 // --------------------------------------------------------------------------- |
|
25 // |
|
26 // --------------------------------------------------------------------------- |
|
27 // |
|
28 CUsbStateHostDelayHandle::CUsbStateHostDelayHandle(CUsbOtgWatcher& aWatcher) : |
|
29 CUsbStateHostHandle(aWatcher) |
|
30 { |
|
31 } |
|
32 |
|
33 // --------------------------------------------------------------------------- |
|
34 // |
|
35 // --------------------------------------------------------------------------- |
|
36 // |
|
37 void CUsbStateHostDelayHandle::ConstructL() |
|
38 { |
|
39 LOG_FUNC |
|
40 |
|
41 CUsbStateHostHandle::ConstructL(); |
|
42 } |
|
43 |
|
44 // --------------------------------------------------------------------------- |
|
45 // |
|
46 // --------------------------------------------------------------------------- |
|
47 // |
|
48 CUsbStateHostDelayHandle::~CUsbStateHostDelayHandle() |
|
49 { |
|
50 LOG_FUNC |
|
51 } |
|
52 |
|
53 ///////////////////////////////////////////////////////////////////////////////////// |
|
54 // From VBus observer |
|
55 // --------------------------------------------------------------------------- |
|
56 // |
|
57 // --------------------------------------------------------------------------- |
|
58 // |
|
59 void CUsbStateHostDelayHandle::VBusUpL() |
|
60 { |
|
61 LOG_FUNC |
|
62 // this is not expected, due to in this state vbus already up, since entering the state |
|
63 Panic( EVBusUpNotExpected); |
|
64 } |
|
65 |
|
66 // From Host Event notification observer |
|
67 // --------------------------------------------------------------------------- |
|
68 // |
|
69 // --------------------------------------------------------------------------- |
|
70 // |
|
71 void CUsbStateHostDelayHandle::DeviceAttachedL( |
|
72 TDeviceEventInformation aDevEventInfo) |
|
73 { |
|
74 LOG_FUNC |
|
75 |
|
76 ChangeHostStateL( EUsbStateHostAInitiate); |
|
77 iWatcher.DeviceAttachedL(aDevEventInfo); |
|
78 } |