eventsui/eventsutils/inc/evtkeylockhandler.h
branchRCL_3
changeset 17 1fc85118c3ae
parent 16 8173571d354e
child 18 870918037e16
equal deleted inserted replaced
16:8173571d354e 17:1fc85118c3ae
     1 /*
       
     2 * Copyright (c) 2008 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 "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:  Key Lock Settings Handler.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_EVTKEYLOCKHANDLER_H
       
    20 #define C_EVTKEYLOCKHANDLER_H
       
    21 
       
    22 // System Includes
       
    23 #include <e32base.h>
       
    24 #include <aknkeylock.h> 
       
    25     
       
    26 /**
       
    27  *  Interface class to maintain Key Lock Settings.
       
    28  *
       
    29  *  @lib 
       
    30  *  @since S60 v9.1
       
    31  */
       
    32 NONSHARABLE_CLASS( CEvtKeyLockHandler ): public CBase
       
    33 {
       
    34 public:
       
    35     /**
       
    36      * Constructs a new instance of Key Lock Handler.
       
    37      *
       
    38      * @return The new instance of Key Lock Handler object.
       
    39      * @leave System wide error code if the object creation fails.         
       
    40      */
       
    41     IMPORT_C static CEvtKeyLockHandler* NewL( );
       
    42     
       
    43     /**
       
    44      * Constructs a new instance of Key Lock Handler.
       
    45      * Leaves the created instance on the cleanup stack.
       
    46      *
       
    47      * @return The new instance of Key Lock Handler object.
       
    48      * @leave System wide error code if the object creation fails.         
       
    49      */
       
    50     IMPORT_C static CEvtKeyLockHandler* NewLC( );  
       
    51 
       
    52     /**
       
    53     * Destructor.
       
    54     */
       
    55     IMPORT_C virtual ~CEvtKeyLockHandler();
       
    56 
       
    57 public:  // Public Functions	
       
    58 
       
    59         /**
       
    60         * Maintains the Current State of Key Lock - Lock or Unlock.
       
    61         */
       
    62         IMPORT_C void MaintainState( );
       
    63 
       
    64         /**
       
    65         * Set the Flag to Enable or Diable the Key Lock.
       
    66         * @param TBool Flag to Enable/Diable the Key Lock.
       
    67         */
       
    68         IMPORT_C void EnableKeyLock( TBool aFlag );
       
    69 
       
    70         /**
       
    71         * Update the updated state of Key Lock With Note - Lock or Unlock.
       
    72         */
       
    73         IMPORT_C void UpdateStateWithNote( );
       
    74 
       
    75         /**
       
    76         * Update the updated state of Key Lock Without Note - Lock or Unlock.
       
    77         */
       
    78         IMPORT_C void UpdateStateWithoutNote( );
       
    79 
       
    80 private: 
       
    81 
       
    82     /**
       
    83      * Default C++ Constructor.
       
    84      */
       
    85 	CEvtKeyLockHandler( );
       
    86 
       
    87     /**
       
    88      * Second phase of the two phase constructor.
       
    89      */
       
    90     void ConstructL();
       
    91 
       
    92 private: // data
       
    93 
       
    94 	/**
       
    95 	 * Handle to Key Lock Settings.
       
    96 	 */
       
    97 	 RAknKeylock2 iKeyLock;
       
    98 
       
    99 	/**
       
   100 	 * Key Lock Settings.
       
   101 	 */
       
   102      TBool iKeyLocked;
       
   103 };
       
   104 
       
   105 #endif C_EVTKEYLOCKHANDLER_H