securitydialogs/Autolock/inc/AutoKeyguardCenRepI.h
changeset 0 164170e6151a
equal deleted inserted replaced
-1:000000000000 0:164170e6151a
       
     1 /*
       
     2 * Copyright (c) 2002 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:
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef _AUTOKEYGUARDCENREPI_H__
       
    20 #define _AUTOKEYGUARDCENREPI_H__
       
    21 
       
    22 #include <e32std.h>
       
    23 #include <cenrepnotifyhandler.h> // link against CenRepNotifHandler.lib
       
    24 
       
    25 class CAutoKeyguardObserver;
       
    26 
       
    27 class CAutoKeyguardCenRepI : public CBase, public MCenRepNotifyHandlerCallback
       
    28 	{
       
    29 	public:
       
    30 		/**
       
    31         * Creates instance of the CAutoKeyguardCenRepI class.
       
    32         *
       
    33 		* @param aObserver (pointer to keyguard timeout observer)
       
    34 		* @return Returns the instance just created.
       
    35         */
       
    36 		static CAutoKeyguardCenRepI* NewLC(CAutoKeyguardObserver* aObserver);
       
    37 		/**
       
    38         * Creates instance of the CAutoKeyguardCenRepI class.
       
    39         *
       
    40 		* @param aObserver (pointer to keyguard timeout observer)
       
    41 		* @return Returns the instance just created.
       
    42         */
       
    43 		static CAutoKeyguardCenRepI* NewL(CAutoKeyguardObserver* aObserver);
       
    44 		/**
       
    45         * Destructor.
       
    46         */      
       
    47 		~CAutoKeyguardCenRepI();
       
    48 	public:
       
    49 		/**
       
    50         * Current autokeyguard period
       
    51         *
       
    52 		* @return TInt (curenst autokeyguard period in minutes) 
       
    53 		*/      
       
    54 		TInt Timeout();	
       
    55         /**
       
    56         * From MCenRepNotifyHandlerCallback. Handles period changed event. Called by CenRep.
       
    57 		*
       
    58 		* @param aId (The id of the changed setting)
       
    59         * @param aNewValue (The new value of the changed setting)
       
    60         * @return KErNone
       
    61 		*/
       
    62         void HandleNotifyInt(TUint32 aId, TInt aNewValue);
       
    63 
       
    64         void HandleNotifyError(TUint32 aId, TInt error, CCenRepNotifyHandler* aHandler);
       
    65 
       
    66         void HandleNotifyGeneric(TUint32 aId);
       
    67 
       
    68 	private:
       
    69 		/**
       
    70         * C++ default constructor.
       
    71 		*
       
    72 		* @param aObserver (pointer to keyguard timeout observer)
       
    73         */
       
    74 		CAutoKeyguardCenRepI(CAutoKeyguardObserver* aObserver);
       
    75 		/**
       
    76         * Symbian OS constructor.
       
    77         */
       
    78 		void ConstructL();
       
    79 	private:
       
    80 		/**
       
    81         * Tells observer that keyguard period has been changed
       
    82 		*/
       
    83 		void ResetInactivityTimeout();	
       
    84 	private: // data
       
    85 		CAutoKeyguardObserver* iObserver; //not owned!
       
    86         CCenRepNotifyHandler* iNotifyHandler;
       
    87         CRepository* iSession;
       
    88 
       
    89 	};
       
    90 
       
    91 #endif
       
    92 // END OF FILE