--- a/usbengines/usbotgwatcher/inc/cusbindicatornotifier.h Thu Aug 19 10:54:11 2010 +0300
+++ b/usbengines/usbotgwatcher/inc/cusbindicatornotifier.h Tue Aug 31 16:13:57 2010 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -19,20 +19,32 @@
#define C_USBINDICATORNOTIFIER_H
#include <e32base.h>
-#include <AknNotifyStd.h> // SAknSmallIndicatorParams
-#include <AknNotifySignature.h> // SAknNotifierPackage
-#include <avkon.hrh> // EAknIndicatorUSBConnection
#include "cusbnotifier.h"
#include "cusbvbusobserver.h"
#include "cusbotgwatcher.h"
+class CHbIndicatorSymbian;
+
+_LIT(KUsbConnectingIndicator, "com.nokia.hb.indicator.usb.device.inprogress/1.0");
+
+// indicator states
+enum
+ {
+ EIndicatorStateOff,
+ EIndicatorStateOn,
+ EIndicatorConnecting
+ };
+
/**
* Class implements functionality of showing/blinking usb indicator
* Class does not provide method to get response from the user
*/
-NONSHARABLE_CLASS( CUsbIndicatorNotifier ): public CUsbNotifier, MUsbOtgWatcherStateObserver, MUsbVBusObserver
+NONSHARABLE_CLASS( CUsbIndicatorNotifier ): public MUsbOtgWatcherStateObserver, MUsbVBusObserver
{
+
+ friend class CtUsbOtgWatcher;
+
public:
/**
* Two-phased constructor.
@@ -69,12 +81,6 @@
*/
virtual void VBusObserverErrorL(TInt aError);
- // From base class CUsbNotifier
- /**
- * Start to show notifier
- */
- virtual void ShowL();
-
/**
* Stop showing notifier
*/
@@ -95,28 +101,15 @@
void ConstructL();
/**
- * Set USB indicator On or Off
+ * Set USB Connecting indicator On or Off
* @param aState Indicator states
*/
- void SetIndicatorStateL(const TInt aState);
-
- /**
- * Show/hide static icon of the indicator.
- * If the indicator is blinking, stop blinking it and show/hide the static
- * form of the indicator.
- * @param aVisible ETrue - Show the indicator, EFalse - Hide the indicator
- */
- void ShowStaticL(TBool aVisible);
-
- /**
- * Blinks indicator
- */
- void BlinkL();
+ void ToggleConnectingIndicator(TBool aEnable);
/**
* Sets indicator accordingly
*/
- void SetIndicatorL();
+ void SetIndicator();
private:
// data
@@ -127,11 +120,17 @@
*/
CUsbOtgWatcher& iOtgWatcher;
- /**
- * Current indicator state
- */
- TInt iIndicatorState;
+ /**
+ * Pointer to a class for using Orbit indicator framework
+ * Owned
+ */
+ CHbIndicatorSymbian* iUsbConnectingIndicator;
+
+ /**
+ * Whether we have activated the connecting indicator
+ */
+ TBool iConnectingIndicatorOn;
};
#endif // C_USBINDICATORNOTIFIER_H