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 of the concret state |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef C_USBSTATEHOSTUNDEFINED_H |
|
19 #define C_USBSTATEHOSTUNDEFINED_H |
|
20 |
|
21 #include "cusbstatehostabase.h" |
|
22 |
|
23 class CUsbOtgWatcher; |
|
24 /** |
|
25 * This class implements behaviour in undefined state (when host) |
|
26 * |
|
27 */ |
|
28 NONSHARABLE_CLASS( CUsbStateHostUndefined ) : public CUsbStateHostABase |
|
29 { |
|
30 public: |
|
31 |
|
32 /** |
|
33 * Destruction |
|
34 */ |
|
35 virtual ~CUsbStateHostUndefined(); |
|
36 |
|
37 /** |
|
38 * Two-phased constructor. |
|
39 * @param aWatcher owner |
|
40 */ |
|
41 static CUsbStateHostUndefined* NewL(CUsbOtgWatcher& aWatcher); |
|
42 |
|
43 private: |
|
44 /** |
|
45 * default constructor is protected to be able to be inherited by child classes |
|
46 * @param aOwner owner of the state |
|
47 */ |
|
48 CUsbStateHostUndefined(CUsbOtgWatcher& aOwner); |
|
49 |
|
50 /** |
|
51 * Second phase construction |
|
52 */ |
|
53 void ConstructL(); |
|
54 |
|
55 /** |
|
56 * This function is needed to find a real state by id |
|
57 * This might be used in switching states in watcher. New state object searched by its id |
|
58 * @return Id |
|
59 */ |
|
60 TUsbStateIds Id(); |
|
61 |
|
62 // From VBus observer |
|
63 /** |
|
64 * VBus down |
|
65 */ |
|
66 void VBusDownL(); |
|
67 |
|
68 /** |
|
69 * VBus UP |
|
70 */ |
|
71 void VBusUpL(); |
|
72 |
|
73 /** |
|
74 * VBus error |
|
75 */ |
|
76 void VBusErrorL(); |
|
77 |
|
78 /** |
|
79 * AVBus Error |
|
80 */ |
|
81 void AVBusErrorL(); |
|
82 |
|
83 /** |
|
84 * Became to Idle when B |
|
85 */ |
|
86 void BIdleL(); |
|
87 |
|
88 /** |
|
89 * Became to Peripheral when B |
|
90 */ |
|
91 void BPeripheralL(); |
|
92 |
|
93 // From Host Event notification observer |
|
94 /** |
|
95 * Device is attached |
|
96 * @param aInfo Device event data |
|
97 */ |
|
98 void DeviceAttachedL(TDeviceEventInformation aInfo); |
|
99 |
|
100 /** |
|
101 * Device is detached |
|
102 * @param aInfo Device event data |
|
103 */ |
|
104 void DeviceDetachedL(TDeviceEventInformation aInfo); |
|
105 |
|
106 /** |
|
107 * Drivers successfully loaded |
|
108 * @param aInfo Device event data |
|
109 */ |
|
110 void DriverLoadSuccessL(TDeviceEventInformation aInfo); |
|
111 |
|
112 /** |
|
113 * Drivers loaded partially |
|
114 * @param aInfo Device event data |
|
115 */ |
|
116 void DriverLoadPartialSuccessL(TDeviceEventInformation aInfo); |
|
117 /** |
|
118 * Drivers loading failed |
|
119 * @param aInfo Device event data |
|
120 */ |
|
121 void DriverLoadFailureL(TDeviceEventInformation aInfo); |
|
122 |
|
123 // From message notification observer |
|
124 /** |
|
125 * Message received |
|
126 * @param aMessage message id |
|
127 */ |
|
128 void MessageNotificationReceivedL(TInt aMessage); |
|
129 |
|
130 /** |
|
131 * SRP request received |
|
132 */ |
|
133 void SrpReceivedL(); |
|
134 |
|
135 /** |
|
136 * Connected to hub in wrong level |
|
137 */ |
|
138 void BadHubPositionL(); |
|
139 |
|
140 /** |
|
141 * Session request received |
|
142 */ |
|
143 void SessionRequestedL(); |
|
144 |
|
145 private: |
|
146 // data |
|
147 }; |
|
148 |
|
149 #endif // C_USBSTATEHOSTUNDEFINED_H |
|