1 /* |
1 /* |
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2009-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". |
17 |
17 |
18 #ifndef C_USBINDICATORNOTIFIER_H |
18 #ifndef C_USBINDICATORNOTIFIER_H |
19 #define C_USBINDICATORNOTIFIER_H |
19 #define C_USBINDICATORNOTIFIER_H |
20 |
20 |
21 #include <e32base.h> |
21 #include <e32base.h> |
22 #include <AknNotifyStd.h> // SAknSmallIndicatorParams |
|
23 #include <AknNotifySignature.h> // SAknNotifierPackage |
|
24 #include <avkon.hrh> // EAknIndicatorUSBConnection |
|
25 |
22 |
26 #include "cusbnotifier.h" |
23 #include "cusbnotifier.h" |
27 #include "cusbvbusobserver.h" |
24 #include "cusbvbusobserver.h" |
28 #include "cusbotgwatcher.h" |
25 #include "cusbotgwatcher.h" |
29 |
26 |
|
27 class CHbIndicatorSymbian; |
|
28 |
|
29 _LIT(KUsbConnectingIndicator, "com.nokia.hb.indicator.usb.device.inprogress/1.0"); |
|
30 |
|
31 // indicator states |
|
32 enum |
|
33 { |
|
34 EIndicatorStateOff, |
|
35 EIndicatorStateOn, |
|
36 EIndicatorConnecting |
|
37 }; |
|
38 |
30 /** |
39 /** |
31 * Class implements functionality of showing/blinking usb indicator |
40 * Class implements functionality of showing/blinking usb indicator |
32 * Class does not provide method to get response from the user |
41 * Class does not provide method to get response from the user |
33 */ |
42 */ |
34 NONSHARABLE_CLASS( CUsbIndicatorNotifier ): public CUsbNotifier, MUsbOtgWatcherStateObserver, MUsbVBusObserver |
43 NONSHARABLE_CLASS( CUsbIndicatorNotifier ): public CUsbNotifier, MUsbOtgWatcherStateObserver, MUsbVBusObserver |
96 |
105 |
97 /** |
106 /** |
98 * Set USB indicator On or Off |
107 * Set USB indicator On or Off |
99 * @param aState Indicator states |
108 * @param aState Indicator states |
100 */ |
109 */ |
101 void SetIndicatorStateL(const TInt aState); |
110 void SetIndicatorState(const TInt aState); |
102 |
111 |
103 /** |
112 /** |
104 * Show/hide static icon of the indicator. |
113 * Show/hide static icon of the indicator. |
105 * If the indicator is blinking, stop blinking it and show/hide the static |
114 * If the indicator is blinking, stop blinking it and show/hide the static |
106 * form of the indicator. |
115 * form of the indicator. |
107 * @param aVisible ETrue - Show the indicator, EFalse - Hide the indicator |
116 * @param aVisible ETrue - Show the indicator, EFalse - Hide the indicator |
108 */ |
117 */ |
109 void ShowStaticL(TBool aVisible); |
118 void ShowStatic(TBool aVisible); |
110 |
119 |
111 /** |
120 /** |
112 * Blinks indicator |
121 * Blinks indicator |
113 */ |
122 */ |
114 void BlinkL(); |
123 void Blink(); |
115 |
124 |
116 /** |
125 /** |
117 * Sets indicator accordingly |
126 * Sets indicator accordingly |
118 */ |
127 */ |
119 void SetIndicatorL(); |
128 void SetIndicator(); |
120 |
129 |
121 private: |
130 private: |
122 // data |
131 // data |
123 |
132 |
124 /** |
133 /** |
125 * OtgWatcher |
134 * OtgWatcher |
126 * not own |
135 * not own |
127 */ |
136 */ |
128 CUsbOtgWatcher& iOtgWatcher; |
137 CUsbOtgWatcher& iOtgWatcher; |
129 |
138 |
130 /** |
|
131 * Current indicator state |
|
132 */ |
|
133 TInt iIndicatorState; |
|
134 |
139 |
|
140 /** |
|
141 * Pointer to a class for using Orbit indicator framework |
|
142 * Owned |
|
143 */ |
|
144 CHbIndicatorSymbian* iUsbConnectingIndicator; |
|
145 |
|
146 /** |
|
147 * Whether we have activated the connecting indicator |
|
148 */ |
|
149 TBool iConnectingIndicatorOn; |
135 }; |
150 }; |
136 |
151 |
137 #endif // C_USBINDICATORNOTIFIER_H |
152 #endif // C_USBINDICATORNOTIFIER_H |