hsappkeyhandler/inc/hsappkeyplugin.h
changeset 116 305818acdca4
parent 92 782e3408c2ab
--- a/hsappkeyhandler/inc/hsappkeyplugin.h	Wed Aug 18 10:39:24 2010 +0300
+++ b/hsappkeyhandler/inc/hsappkeyplugin.h	Mon Sep 13 13:26:33 2010 +0300
@@ -12,10 +12,9 @@
 * Contributors:
 *
 * Description:  Main plugin class
- *
+*
 */
 
-
 #ifndef HSAPPKEYPLUGIN_H
 #define HSAPPKEYPLUGIN_H
 
@@ -23,7 +22,6 @@
 #include <hb/hbcore/hbdevicedialogsymbian.h>
 
 class CEikonEnv;
-class CHbDeviceDialogSymbian;
 
 /**
 *  CAppKeyPlugin
@@ -36,65 +34,61 @@
 class CHsAppKeyPlugin : public CSysapKeyHandlerPlugin,
                         public MHbDeviceDialogObserver
     {
-    public: // Constructors and destructor
-        /**
-        * Two-phased constructor.
-        */
-        static CHsAppKeyPlugin* NewL();
-        
-        /**
-        * Destructor.
-        */
-        virtual ~CHsAppKeyPlugin();
-    public: //MHbDeviceDialogObserver interfaces
-        void DataReceived(CHbSymbianVariantMap& aData);
-        
-        void DeviceDialogClosed(TInt aCompletionCode);
-    
-    public: // New functions
-        /**
-        * HandleKeyEventL
-        * @since Series 60 Series60_version 3.0
-        * @param const TKeyEvent& aKeyEvent, TEventCode aType
-        * @return TKeyResponse If key was consumed. Generally it should be, since the KEF calls the plugins only with the right key.
-        */
-        virtual TKeyResponse HandleKeyEventL( const TKeyEvent& aKeyEvent, 
-                                              TEventCode aType );
+public: // Constructors and destructor
+    /**
+    * Two-phased constructor.
+    */
+    static CHsAppKeyPlugin* NewL();
+
+    /**
+    * Destructor.
+    */
+    virtual ~CHsAppKeyPlugin();
+
+public: //MHbDeviceDialogObserver interfaces
+    void DataReceived( CHbSymbianVariantMap& aData );
+    void DeviceDialogClosed( TInt aCompletionCode );
+
+public: // New functions
+    /**
+    * HandleKeyEventL
+    * @since Series 60 Series60_version 3.0
+    * @param const TKeyEvent& aKeyEvent, TEventCode aType
+    * @return TKeyResponse If key was consumed. Generally it should be, since the KEF calls the plugins only with the right key.
+    */
+    virtual TKeyResponse HandleKeyEventL( const TKeyEvent& aKeyEvent,
+                                          TEventCode aType );
 
-        /**
-        * Provides the key events that the plugin wants to listen to.
-        * Plugins should overload this method if they are of version 2 or higher.
-        * iCode, iScanCode and iModifiers MUST be defined in each TKeyEvent.
-        *
-        * @since S60 5.1
-        * @return array of key events
-        */
-        void ProvideKeyEventsL( RArray<TKeyEvent>& aKeyEventArray );
-    private: // Constructors
-        /**
-        * C++ default constructor.
-        */
-        CHsAppKeyPlugin();
+    /**
+    * Provides the key events that the plugin wants to listen to.
+    * Plugins should overload this method if they are of version 2 or higher.
+    * iCode, iScanCode and iModifiers MUST be defined in each TKeyEvent.
+    *
+    * @since S60 5.1
+    * @return array of key events
+    */
+    void ProvideKeyEventsL( RArray<TKeyEvent>& aKeyEventArray );
 
-        /**
-        * By default Symbian 2nd phase constructor is private.
-        */
-        void ConstructL();
-        
-        void HandleShortPressL();
-        
-        void HandleLongPressL();
+private: // Constructors
+    /**
+    * C++ default constructor.
+    */
+    CHsAppKeyPlugin();
 
-    private: //data
-        /** Cached pointer to the CEikonEnv singelton instance */
-        CEikonEnv* iEikEnv;
-        TBool iSecondEvent;
-        CHbDeviceDialogSymbian* mDialog;
+    /**
+    * By default Symbian 2nd phase constructor is private.
+    */
+    void ConstructL();
+
+private: // helper methods
+    void HandleShortPressL();
+    void HandleLongPressL();
+    void DismissTaskSwitcher();
+
+private: //data
+    CEikonEnv* iEikEnv;
+    TBool iSecondEvent;
+    CHbDeviceDialogSymbian* iDialog;
     };
 
 #endif // HSAPPKEYPLUGIN_H
-
-// End of File
-
-
-