usbengines/usbotgwatcher/inc/cusbindicatornotifier.h
branchRCL_3
changeset 80 e02eb84a14d2
parent 79 25fce757be94
--- a/usbengines/usbotgwatcher/inc/cusbindicatornotifier.h	Tue Aug 31 16:13:57 2010 +0300
+++ b/usbengines/usbotgwatcher/inc/cusbindicatornotifier.h	Wed Sep 01 12:20:49 2010 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+ * Copyright (c) 2009 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,32 +19,20 @@
 #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 MUsbOtgWatcherStateObserver, MUsbVBusObserver
+NONSHARABLE_CLASS( CUsbIndicatorNotifier ): public CUsbNotifier, MUsbOtgWatcherStateObserver, MUsbVBusObserver
     {
-
-    friend class CtUsbOtgWatcher;
-    
 public:
     /**
      * Two-phased constructor.
@@ -81,6 +69,12 @@
      */
     virtual void VBusObserverErrorL(TInt aError);
 
+    // From base class CUsbNotifier
+    /**
+     * Start to show notifier
+     */
+    virtual void ShowL();
+
     /**
      * Stop showing notifier
      */
@@ -101,15 +95,28 @@
     void ConstructL();
 
     /**
-     * Set USB Connecting indicator On or Off
+     * Set USB indicator On or Off
      * @param aState Indicator states 
      */
-    void ToggleConnectingIndicator(TBool aEnable);
+    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();
 
     /**
      * Sets indicator accordingly
      */
-    void SetIndicator();
+    void SetIndicatorL();
 
 private:
     // data
@@ -120,17 +127,11 @@
      */
     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