1 /* |
1 /* |
2 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2008-2009 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". |
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Implementation of the concret state |
|
15 * |
8 * |
16 */ |
9 * Initial Contributors: |
17 |
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Implementation of the concret state |
|
15 * |
|
16 */ |
18 |
17 |
19 #ifndef C_USBSTATEHOSTAHOST_H |
18 #ifndef C_USBSTATEHOSTAHOST_H |
20 #define C_USBSTATEHOSTAHOST_H |
19 #define C_USBSTATEHOSTAHOST_H |
21 |
20 |
22 #include "cusbotgwatcher.h" |
|
23 #include "cusbstatehostabase.h" |
21 #include "cusbstatehostabase.h" |
24 #ifndef STIF |
22 |
25 #include "cusbtimer.h" |
23 class CUsbOtgWatcher; |
26 #else |
|
27 #include "mockcusbtimer.h" |
|
28 #endif |
|
29 |
24 |
30 /** |
25 /** |
31 * This class implements behaviour in Host state (Drivers loaded, device is in Host role) |
26 * This class implements behaviour in Host state (Drivers loaded, device is in Host role) |
32 * |
27 * |
33 */ |
28 */ |
70 * This is called when switched to this state, |
65 * This is called when switched to this state, |
71 * because If all conditions for transition to another state exist, nothing will |
66 * because If all conditions for transition to another state exist, nothing will |
72 * trigger it and transition will not happen. This forces the transition in such cases. |
67 * trigger it and transition will not happen. This forces the transition in such cases. |
73 * |
68 * |
74 */ |
69 */ |
75 void JustAdvancedToThisStateL(); |
70 virtual void JustAdvancedToThisStateL(); |
76 |
71 |
77 /** |
72 /** |
78 * State machine calls this, state object to perform any initial |
73 * State machine calls this, state object to perform any initial |
79 * activity, just before leaving this state |
74 * activity, just before leaving this state |
80 * |
75 * |
81 */ |
76 */ |
82 void JustBeforeLeavingThisStateL(); |
77 virtual void JustBeforeLeavingThisStateL(); |
83 |
78 |
84 // From OTG state observer |
|
85 /** |
|
86 * Became a Host when A |
|
87 */ |
|
88 void AHostL(); |
|
89 |
|
90 /** |
|
91 * Became a Peripheral when A |
|
92 */ |
|
93 void APeripheralL(); |
|
94 |
|
95 // From Host Event notification observer |
79 // From Host Event notification observer |
96 /** |
80 /** |
97 * Device is detached |
81 * Device is detached |
98 * @param aInfo Device event data |
82 * @param aInfo Device event data |
99 */ |
83 */ |
100 void DeviceDetachedL(TDeviceEventInformation aInfo); |
84 virtual void DeviceDetachedL(TDeviceEventInformation aInfo); |
101 |
85 |
102 // From message notification observer |
86 // From message notification observer |
103 /** |
87 /** |
104 * Connected to hub in wrong level |
88 * Connected to hub in wrong level |
105 */ |
89 */ |
106 void BadHubPositionL(); |
90 virtual void BadHubPositionL(); |
107 |
91 |
108 private: |
92 private: |
109 // data |
93 // data |
110 }; |
94 }; |
111 |
95 |