securitydialogs/Autolock/inc/AutolockWait.h
branchRCL_3
changeset 21 09b1ac925e3f
parent 20 63339781d179
child 22 03674e5abf46
equal deleted inserted replaced
20:63339781d179 21:09b1ac925e3f
     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 
       
    20 #ifndef     __AUTOLOCKWAIT_H
       
    21 #define     __AUTOLOCKWAIT_H
       
    22 
       
    23 //  INCLUDES
       
    24 
       
    25 #include    <e32base.h>
       
    26 #include	<eikappui.h>
       
    27 #include    <coecntrl.h>
       
    28 
       
    29 //  CLASS DEFINITIONS 
       
    30 class  CWait : public CActive
       
    31     {
       
    32      public:
       
    33        /**
       
    34         * Creates instance of the CWait class.
       
    35         *
       
    36 		* @return Returns the instance just created.
       
    37         */
       
    38 		static CWait* NewL();
       
    39 		/**
       
    40         * Destructor.
       
    41         */
       
    42         ~CWait();
       
    43     public:
       
    44         /**
       
    45 		* Starts waiting for aReqStatus. 
       
    46 		*/
       
    47 		TInt WaitForRequestL();
       
    48     public:
       
    49         /**
       
    50         * Sets active request type. 
       
    51         */
       
    52         void SetRequestType(TInt aRequestType);
       
    53         /**
       
    54         * Gets active request type. 
       
    55         */
       
    56         TInt GetRequestType();
       
    57 	private:
       
    58 		/**
       
    59 		* C++ default constructor.
       
    60 		*/
       
    61 		CWait();
       
    62 		/**
       
    63 		* Symbian OS constructor.
       
    64 		*/
       
    65 		void ConstructL();
       
    66 	private: // from CActive
       
    67         /** @see CActive::RunL() */
       
    68 		void RunL();
       
    69 		/** @see CActive::DoCancel() */
       
    70         void DoCancel();
       
    71 		RTimer iTimer;
       
    72 		CActiveSchedulerWait iWait;
       
    73 		// Used if there is a need to cancel an active request;
       
    74         // namely in situations where destructor is called when Wait
       
    75         // is active.
       
    76         TInt iRequestType;
       
    77 	};
       
    78 
       
    79 
       
    80 // CWaitAbsorbingControl, absorbs all the key presses.
       
    81 class CWaitAbsorbingControl : public CCoeControl
       
    82     {
       
    83     public:
       
    84         static CWaitAbsorbingControl* NewLC();
       
    85         virtual ~CWaitAbsorbingControl();
       
    86     private:
       
    87         virtual TKeyResponse OfferKeyEventL(const TKeyEvent& /*aKeyEvent*/,TEventCode /*aType*/);
       
    88     private:
       
    89         CWaitAbsorbingControl();
       
    90         void ConstructL();
       
    91     private: // Data
       
    92          CEikAppUi*  iAppUi;
       
    93     };
       
    94 
       
    95 #endif
       
    96 
       
    97 // End of file