|
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 #ifndef STIF |
|
21 |
|
22 #else |
|
23 |
|
24 #endif |
|
25 |
|
26 #include "definitions.h" |
|
27 #include "errors.h" |
|
28 |
|
29 #include "debug.h" |
|
30 #include "panic.h" |
|
31 |
|
32 // --------------------------------------------------------------------------- |
|
33 // |
|
34 // --------------------------------------------------------------------------- |
|
35 // |
|
36 CUsbStateHostUndefined::CUsbStateHostUndefined( |
|
37 CUsbOtgWatcher* aWatcher) : |
|
38 CUsbStateHostABase(aWatcher) |
|
39 { |
|
40 } |
|
41 |
|
42 // --------------------------------------------------------------------------- |
|
43 // |
|
44 // --------------------------------------------------------------------------- |
|
45 // |
|
46 CUsbStateHostUndefined* CUsbStateHostUndefined::NewL(CUsbOtgWatcher* aWatcher) |
|
47 { |
|
48 FLOG( _L( "[USBOTGWATCHER]\tCUsbStateHostUndefined::NewL" ) ); |
|
49 |
|
50 CUsbStateHostUndefined* self = new (ELeave) CUsbStateHostUndefined(aWatcher); |
|
51 CleanupStack::PushL(self); |
|
52 self->ConstructL(); |
|
53 CleanupStack::Pop(self); |
|
54 return self; |
|
55 } |
|
56 |
|
57 // --------------------------------------------------------------------------- |
|
58 // |
|
59 // --------------------------------------------------------------------------- |
|
60 // |
|
61 void CUsbStateHostUndefined::ConstructL() |
|
62 { |
|
63 FLOG( _L( "[USBOTGWATCHER]\tCUsbStateHostUndefined::ConstructL" ) ); |
|
64 |
|
65 CUsbStateHostABase::ConstructL(); |
|
66 |
|
67 } |
|
68 |
|
69 // --------------------------------------------------------------------------- |
|
70 // |
|
71 // --------------------------------------------------------------------------- |
|
72 // |
|
73 CUsbStateHostUndefined::~CUsbStateHostUndefined() |
|
74 { |
|
75 FLOG( _L( "[USBOTGWATCHER]\tCUsbStateHostundefined::~CUsbStateHostUndefined" ) ); |
|
76 |
|
77 } |
|
78 |
|
79 // --------------------------------------------------------------------------- |
|
80 // |
|
81 // --------------------------------------------------------------------------- |
|
82 // |
|
83 TUsbStateIds CUsbStateHostUndefined::Id() |
|
84 { |
|
85 return EUsbStateHostUndefined; |
|
86 } |
|
87 |
|
88 ///////////////////////////////////////////////////////////////////////////////////// |
|
89 // From IdPin observer |
|
90 // --------------------------------------------------------------------------- |
|
91 // |
|
92 // --------------------------------------------------------------------------- |
|
93 // |
|
94 void CUsbStateHostUndefined::IdPinOffL() |
|
95 { |
|
96 FLOG( _L( "[USBOTGWATCHER]\tCUsbStateHostUndefined::IdPinOffL" ) ); |
|
97 } |
|
98 |
|
99 // --------------------------------------------------------------------------- |
|
100 // |
|
101 // --------------------------------------------------------------------------- |
|
102 // |
|
103 void CUsbStateHostUndefined::IdPinOnL() |
|
104 { |
|
105 FLOG( _L( "[USBOTGWATCHER]\tCUsbStateHostUndefined::IdPinOnL" ) ); |
|
106 } |
|
107 |
|
108 // From VBus observer |
|
109 // --------------------------------------------------------------------------- |
|
110 // |
|
111 // --------------------------------------------------------------------------- |
|
112 // |
|
113 void CUsbStateHostUndefined::VBusDownL() |
|
114 { |
|
115 FLOG( _L( "[USBOTGWATCHER]\tCUsbStateHostUndefined::VBusDownL" ) ); |
|
116 } |
|
117 |
|
118 // --------------------------------------------------------------------------- |
|
119 // |
|
120 // --------------------------------------------------------------------------- |
|
121 // |
|
122 void CUsbStateHostUndefined::VBusUpL() |
|
123 { |
|
124 FLOG( _L( "[USBOTGWATCHER]\tCUsbStateHostUndefined::VBusUpL" ) ); |
|
125 } |
|
126 |
|
127 // --------------------------------------------------------------------------- |
|
128 // |
|
129 // --------------------------------------------------------------------------- |
|
130 // |
|
131 void CUsbStateHostUndefined::VBusErrorL() |
|
132 { |
|
133 FLOG( _L( "[USBOTGWATCHER]\tCUsbStateHostUndefined::VBusErrorL" ) ); |
|
134 iWatcher->Usb().BusClearError(); |
|
135 HandleL(EUsbWatcherErrorInConnection, EUsbStateHostHandle); |
|
136 } |
|
137 |
|
138 // From OTG state observer |
|
139 // --------------------------------------------------------------------------- |
|
140 // |
|
141 // --------------------------------------------------------------------------- |
|
142 // |
|
143 void CUsbStateHostUndefined::AIdleL() |
|
144 { |
|
145 FLOG( _L( "[USBOTGWATCHER]\tCUsbStateHostUndefined::AIdleL" ) ); |
|
146 } |
|
147 |
|
148 // --------------------------------------------------------------------------- |
|
149 // |
|
150 // --------------------------------------------------------------------------- |
|
151 // |
|
152 void CUsbStateHostUndefined::AVBusErrorL() |
|
153 { |
|
154 FLOG( _L( "[USBOTGWATCHER]\tCUsbStateHostUndefined::AVBusErrorL" ) ); |
|
155 iWatcher->Usb().BusClearError(); |
|
156 HandleL(EUsbWatcherErrorInConnection, EUsbStateHostHandle); |
|
157 } |
|
158 |
|
159 // --------------------------------------------------------------------------- |
|
160 // |
|
161 // --------------------------------------------------------------------------- |
|
162 // |
|
163 void CUsbStateHostUndefined::BIdleL() |
|
164 { |
|
165 FLOG( _L( "[USBOTGWATCHER]\tCUsbStateHostUndefined::BIdleL" ) ); |
|
166 } |
|
167 |
|
168 // --------------------------------------------------------------------------- |
|
169 // |
|
170 // --------------------------------------------------------------------------- |
|
171 // |
|
172 void CUsbStateHostUndefined::BPeripheralL() |
|
173 { |
|
174 FLOG( _L( "[USBOTGWATCHER]\tCUsbStateHostUndefined::BPeripheralL" ) ); |
|
175 } |
|
176 |
|
177 // From host state observer |
|
178 void CUsbStateHostUndefined::DeviceDetachedL(TDeviceEventInformation /*aInfo*/) |
|
179 { |
|
180 FLOG( _L( "[USBOTGWATCHER]\tCUsbStateHostUndefined::DeviceDetachedL" ) ); |
|
181 } |