|
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: Implements concrete state |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_USBSTATEHOSTAPERIPHERAL_H |
|
20 #define C_USBSTATEHOSTAPERIPHERAL_H |
|
21 |
|
22 #include "cusbotgwatcher.h" |
|
23 #include "cusbstatehostabase.h" |
|
24 #ifndef STIF |
|
25 #include "cusbtimer.h" |
|
26 #else |
|
27 #include "mockcusbtimer.h" |
|
28 #endif |
|
29 |
|
30 /** |
|
31 * This class implements behaviour when A device performs peripheral role, from OTG point of view |
|
32 * |
|
33 */ |
|
34 NONSHARABLE_CLASS( CUsbStateHostAPeripheral ) : public CUsbStateHostABase |
|
35 { |
|
36 |
|
37 public: |
|
38 |
|
39 /** |
|
40 * Two-phased constructor. |
|
41 * @param aWatcher owner |
|
42 */ |
|
43 static CUsbStateHostAPeripheral* NewL(CUsbOtgWatcher* aWatcher); |
|
44 |
|
45 /** |
|
46 * Destructor. |
|
47 */ |
|
48 virtual ~CUsbStateHostAPeripheral(); |
|
49 |
|
50 private: |
|
51 |
|
52 /** |
|
53 * default constructor |
|
54 * @param aWatcher owner |
|
55 */ |
|
56 CUsbStateHostAPeripheral(CUsbOtgWatcher* aWatcher); |
|
57 |
|
58 /** |
|
59 * 2nd phase construction |
|
60 */ |
|
61 void ConstructL(); |
|
62 |
|
63 /** |
|
64 * State machine calls this, state object to perform any initial |
|
65 * activity, once just entered this state |
|
66 * |
|
67 */ |
|
68 void JustAdvancedToThisStateL(); |
|
69 |
|
70 //from CUsbState |
|
71 /** |
|
72 * state id |
|
73 * @return state id |
|
74 */ |
|
75 TUsbStateIds Id(); |
|
76 |
|
77 // From OTG state observer |
|
78 /** |
|
79 * Became a host when A |
|
80 */ |
|
81 void AHostL(); |
|
82 |
|
83 private: |
|
84 // data |
|
85 |
|
86 }; |
|
87 |
|
88 #endif // C_USBSTATEHOSTAPERIPHERAL_H |