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_USBSTATEHOSTAHOST_H |
|
19 #define C_USBSTATEHOSTAHOST_H |
|
20 |
|
21 #include "cusbstatehostabase.h" |
|
22 |
|
23 class CUsbOtgWatcher; |
|
24 |
|
25 /** |
|
26 * This class implements behaviour in Host state (Drivers loaded, device is in Host role) |
|
27 * |
|
28 */ |
|
29 NONSHARABLE_CLASS( CUsbStateHostAHost ) : public CUsbStateHostABase |
|
30 { |
|
31 public: |
|
32 |
|
33 /** |
|
34 * Two-phased constructor. |
|
35 * @param aWatcher Owner |
|
36 */ |
|
37 static CUsbStateHostAHost* NewL(CUsbOtgWatcher& aWatcher); |
|
38 |
|
39 /** |
|
40 * Destructor. |
|
41 */ |
|
42 virtual ~CUsbStateHostAHost(); |
|
43 |
|
44 private: |
|
45 |
|
46 /** |
|
47 * Default construction |
|
48 * @param aWatcher owner |
|
49 */ |
|
50 CUsbStateHostAHost(CUsbOtgWatcher& aWatcher); |
|
51 |
|
52 /** |
|
53 * 2nd phase construction |
|
54 */ |
|
55 void ConstructL(); |
|
56 |
|
57 //from CUsbState |
|
58 /** |
|
59 * State id |
|
60 * @return state id |
|
61 */ |
|
62 TUsbStateIds Id(); |
|
63 |
|
64 /** |
|
65 * This is called when switched to this state, |
|
66 * because If all conditions for transition to another state exist, nothing will |
|
67 * trigger it and transition will not happen. This forces the transition in such cases. |
|
68 * |
|
69 */ |
|
70 virtual void JustAdvancedToThisStateL(); |
|
71 |
|
72 /** |
|
73 * State machine calls this, state object to perform any initial |
|
74 * activity, just before leaving this state |
|
75 * |
|
76 */ |
|
77 virtual void JustBeforeLeavingThisStateL(); |
|
78 |
|
79 // From Host Event notification observer |
|
80 /** |
|
81 * Device is detached |
|
82 * @param aInfo Device event data |
|
83 */ |
|
84 virtual void DeviceDetachedL(TDeviceEventInformation aInfo); |
|
85 |
|
86 // From message notification observer |
|
87 /** |
|
88 * Connected to hub in wrong level |
|
89 */ |
|
90 virtual void BadHubPositionL(); |
|
91 |
|
92 private: |
|
93 // data |
|
94 }; |
|
95 |
|
96 #endif // C_USBSTATEHOSTAHOST_H |
|