|
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 of the concret state |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_USBSTATEHOSTUNDEFINED_H |
|
20 #define C_USBSTATEHOSTUNDEFINED_H |
|
21 |
|
22 #include "cusbotgwatcher.h" |
|
23 #include "cusbstatehostabase.h" |
|
24 #ifndef STIF |
|
25 |
|
26 #else |
|
27 |
|
28 #endif |
|
29 |
|
30 /** |
|
31 * This class implements behaviour in undefined state (when host) |
|
32 * |
|
33 */ |
|
34 NONSHARABLE_CLASS( CUsbStateHostUndefined ) : public CUsbStateHostABase |
|
35 { |
|
36 public: |
|
37 |
|
38 /** |
|
39 * Destruction |
|
40 */ |
|
41 virtual ~CUsbStateHostUndefined(); |
|
42 |
|
43 /** |
|
44 * Two-phased constructor. |
|
45 * @param aWatcher owner |
|
46 */ |
|
47 static CUsbStateHostUndefined* NewL(CUsbOtgWatcher* aWatcher); |
|
48 |
|
49 private: |
|
50 /** |
|
51 * default constructor is protected to be able to be inherited by child classes |
|
52 * @param aOwner owner of the state |
|
53 */ |
|
54 CUsbStateHostUndefined(CUsbOtgWatcher* aOwner); |
|
55 |
|
56 /** |
|
57 * Second phase construction |
|
58 */ |
|
59 void ConstructL(); |
|
60 |
|
61 /** |
|
62 * This function is needed to find a real state by id |
|
63 * This might be used in switching states in watcher. New state object searched by its id |
|
64 * @return Id |
|
65 */ |
|
66 virtual TUsbStateIds Id(); |
|
67 |
|
68 /** |
|
69 * Id Pin OFF |
|
70 */ |
|
71 void IdPinOffL(); |
|
72 /** |
|
73 * Id Pin On |
|
74 */ |
|
75 void IdPinOnL(); |
|
76 |
|
77 // From VBus observer |
|
78 /** |
|
79 * VBus down |
|
80 */ |
|
81 void VBusDownL(); |
|
82 /** |
|
83 * VBus UP |
|
84 */ |
|
85 void VBusUpL(); |
|
86 |
|
87 /** |
|
88 * VBus error |
|
89 */ |
|
90 void VBusErrorL(); |
|
91 |
|
92 // From OTG state observer |
|
93 /** |
|
94 * Became to Idle when A |
|
95 */ |
|
96 void AIdleL(); |
|
97 /** |
|
98 * AVBus Error |
|
99 */ |
|
100 void AVBusErrorL(); |
|
101 /** |
|
102 * Became to Idle when B |
|
103 */ |
|
104 void BIdleL(); |
|
105 /** |
|
106 * Became to Peripheral when B |
|
107 */ |
|
108 void BPeripheralL(); |
|
109 |
|
110 // From Host Event notification observer |
|
111 /** |
|
112 * Device is detached |
|
113 * @param aInfo Device event data |
|
114 */ |
|
115 virtual void DeviceDetachedL(TDeviceEventInformation aInfo); |
|
116 |
|
117 private: |
|
118 // data |
|
119 }; |
|
120 |
|
121 #endif // C_USBSTATEHOSTUNDEFINED_H |