equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2006-2010 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". |
21 |
21 |
22 #include <e32std.h> |
22 #include <e32std.h> |
23 #include <c32comm.h> |
23 #include <c32comm.h> |
24 #include <usbman.h> |
24 #include <usbman.h> |
25 #include "DunPlugin.h" |
25 #include "DunPlugin.h" |
26 |
|
27 enum TUsbListenState |
|
28 { |
|
29 EUsbListenStateIdle, |
|
30 EUsbListenStateListening |
|
31 }; |
|
32 |
26 |
33 /** |
27 /** |
34 * DUN USB plugin's listener class |
28 * DUN USB plugin's listener class |
35 * This class starts listening for USB device state to change to configured. |
29 * This class starts listening for USB device state to change to configured. |
36 * When change to configured is detected, parent (CDunUsbPlugin) is notified |
30 * When change to configured is detected, parent (CDunUsbPlugin) is notified |
79 |
73 |
80 /** |
74 /** |
81 * Stops listening |
75 * Stops listening |
82 * |
76 * |
83 * @since S60 3.2 |
77 * @since S60 3.2 |
84 * @return Symbian error code on error, KErrNone otherwise |
78 * @return None |
85 */ |
79 */ |
86 TInt Stop(); |
80 void Stop(); |
87 |
81 |
88 private: |
82 private: |
89 |
83 |
90 CDunUsbListen( MDunServerCallback* aServer, |
84 CDunUsbListen( MDunServerCallback* aServer, |
91 MDunListenCallback* aParent, |
85 MDunListenCallback* aParent, |
141 * Not own. |
135 * Not own. |
142 */ |
136 */ |
143 MDunListenCallback* iParent; |
137 MDunListenCallback* iParent; |
144 |
138 |
145 /** |
139 /** |
146 * Current state of listening: active or inactive |
|
147 */ |
|
148 TUsbListenState iListenState; |
|
149 |
|
150 /** |
|
151 * USB server (USB manager) needed for device state notifications |
140 * USB server (USB manager) needed for device state notifications |
152 * Device states needed to create transporter channel |
141 * Device states needed to create transporter channel |
153 */ |
142 */ |
154 RUsb& iUsbServer; |
143 RUsb& iUsbServer; |
155 |
144 |