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