|
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 |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "cusbotgwatcher.h" |
|
19 #include "cusbstatehostdelayhandle.h" |
|
20 |
|
21 #include "errors.h" |
|
22 #include "debug.h" |
|
23 #include "panic.h" |
|
24 |
|
25 // --------------------------------------------------------------------------- |
|
26 // |
|
27 // --------------------------------------------------------------------------- |
|
28 // |
|
29 CUsbStateHostDelayHandle::CUsbStateHostDelayHandle(CUsbOtgWatcher& aWatcher) : |
|
30 CUsbStateHostHandle(aWatcher) |
|
31 { |
|
32 } |
|
33 |
|
34 // --------------------------------------------------------------------------- |
|
35 // |
|
36 // --------------------------------------------------------------------------- |
|
37 // |
|
38 void CUsbStateHostDelayHandle::ConstructL() |
|
39 { |
|
40 LOG_FUNC |
|
41 |
|
42 CUsbStateHostHandle::ConstructL(); |
|
43 } |
|
44 |
|
45 // --------------------------------------------------------------------------- |
|
46 // |
|
47 // --------------------------------------------------------------------------- |
|
48 // |
|
49 CUsbStateHostDelayHandle::~CUsbStateHostDelayHandle() |
|
50 { |
|
51 LOG_FUNC |
|
52 } |
|
53 |
|
54 ///////////////////////////////////////////////////////////////////////////////////// |
|
55 // From VBus observer |
|
56 // --------------------------------------------------------------------------- |
|
57 // |
|
58 // --------------------------------------------------------------------------- |
|
59 // |
|
60 void CUsbStateHostDelayHandle::VBusUpL() |
|
61 { |
|
62 LOG_FUNC |
|
63 // this is not expected, due to in this state vbus already up, since entering the state |
|
64 PANIC( EVBusUpNotExpected); |
|
65 } |
|
66 |
|
67 // From Host Event notification observer |
|
68 // --------------------------------------------------------------------------- |
|
69 // |
|
70 // --------------------------------------------------------------------------- |
|
71 // |
|
72 void CUsbStateHostDelayHandle::DeviceAttachedL( |
|
73 TDeviceEventInformation aDevEventInfo) |
|
74 { |
|
75 LOG_FUNC |
|
76 |
|
77 ChangeHostStateL( EUsbStateHostAInitiate); |
|
78 iWatcher.DeviceAttachedL(aDevEventInfo); |
|
79 } |