wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/wllddpowerhandler.h
changeset 0 c40eb8fe8501
equal deleted inserted replaced
-1:000000000000 0:c40eb8fe8501
       
     1 /*
       
     2 * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:   Declaration of the DWlanPowerHandler class.
       
    15 *
       
    16 */
       
    17 
       
    18 /*
       
    19 * %version: 6 %
       
    20 */
       
    21 
       
    22 #ifndef D_WLANPOWERHANDLER_H
       
    23 #define D_WLANPOWERHANDLER_H
       
    24 
       
    25 #include <kpower.h> 
       
    26 
       
    27 class MWlanPowerIndicator;
       
    28 
       
    29 /**
       
    30 *  Power handler which listens to Power Manager instructions
       
    31 *
       
    32 *  @since S60 v3.1
       
    33 */
       
    34 class DWlanPowerHandler : public DPowerHandler
       
    35     {
       
    36     
       
    37 public:
       
    38 
       
    39     /**
       
    40     * Constructor.
       
    41     *
       
    42     * @since S60 3.1
       
    43     * @param aWlanLdd The indicator interface class
       
    44     */
       
    45     explicit DWlanPowerHandler( 
       
    46         MWlanPowerIndicator& aWlanLdd,
       
    47         TDynamicDfcQue& aDfcQ );
       
    48 
       
    49     /**
       
    50     * Destructor.
       
    51     *
       
    52     * @since S60 3.1
       
    53     */
       
    54     virtual ~DWlanPowerHandler();
       
    55 
       
    56     /**
       
    57     * Power Down DFC function
       
    58     */
       
    59     static void PowerDownDfcFn( TAny *aPtr );        
       
    60 
       
    61     /**
       
    62     * Power Up DFC function
       
    63     */
       
    64     static void PowerUpDfcFn( TAny *aPtr );
       
    65 
       
    66     /**
       
    67     * Called by power manager. Requests peripheral power down.
       
    68     *
       
    69     * @since S60 3.1
       
    70     */
       
    71     virtual void PowerDown( TPowerState );
       
    72 
       
    73     /**
       
    74     * Called by power manager. Notifies of system power up.
       
    75     *
       
    76     * @since S60 3.1
       
    77     */
       
    78     virtual void PowerUp();
       
    79 
       
    80     /**
       
    81     * Called when the device has been powered down. Informs the power
       
    82     * manager about that.
       
    83     *
       
    84     * @since S60 3.1
       
    85     */
       
    86     virtual void OnPowerDownDone();
       
    87 
       
    88     /**
       
    89     * Called when power up handling for the device has been done.
       
    90     * Informs the power manager about that.
       
    91     *
       
    92     * @since S60 3.1
       
    93     */
       
    94     virtual void OnPowerUpDone();
       
    95     
       
    96 private:
       
    97 
       
    98     /** Default C++ Ctor */
       
    99     DWlanPowerHandler();
       
   100 
       
   101     /**
       
   102     * Called by the Power Down DFC function. Triggers the actual
       
   103     * power down handling
       
   104     *
       
   105     * @since S60 3.1
       
   106     */
       
   107     void PowerDownOperation();
       
   108 
       
   109     /**
       
   110     * Called by the Power Up DFC function. Triggers the actual
       
   111     * power down handling
       
   112     *
       
   113     * @since S60 3.1
       
   114     */
       
   115     void PowerUpOperation();
       
   116 
       
   117     // Prohibit copy constructor
       
   118     DWlanPowerHandler( const DWlanPowerHandler& );
       
   119     // Prohibit assigment operator
       
   120     DWlanPowerHandler& operator= ( const DWlanPowerHandler& );
       
   121 
       
   122 private:    // Data
       
   123 
       
   124     /** Pointer to the indicator interface class. Not own */
       
   125     MWlanPowerIndicator* iWlanLdd;
       
   126     /** Power Up DFC object */
       
   127     TDfc iPowerUpDfc;
       
   128     /** Power Down DFC object */
       
   129     TDfc iPowerDownDfc;
       
   130     };
       
   131 
       
   132 #endif // D_WLANPOWERHANDLER_H