secsrv_plat/security_code_ui_api/inc/SecUiSecurityHandler.h
changeset 0 164170e6151a
child 30 cc1cea6aabaf
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 *		Provides api for handling security events.
       
    16 *
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 #ifndef     __CSECURIHANDLER_H__
       
    22 #define     __CSECURIHANDLER_H__
       
    23 
       
    24 //  INCLUDES
       
    25 
       
    26 #include <etelmm.h>
       
    27 #include <rmmcustomapi.h>
       
    28 #include <aknquerydialog.h>
       
    29 #include <aknnotedialog.h>
       
    30 
       
    31 
       
    32 // FORWARD DECLARATIONS
       
    33 class RTASecuritySession;
       
    34 class CCodeQueryDialog;
       
    35 
       
    36 //  CLASS DEFINITIONS 
       
    37 class CSecurityHandler : public CBase
       
    38 	{
       
    39     public:  
       
    40 		/**
       
    41         * C++ default constructor.
       
    42         */
       
    43 		IMPORT_C CSecurityHandler(RMobilePhone& aPhone);	
       
    44 		/**
       
    45         * Destructor.
       
    46         */
       
    47 		IMPORT_C ~CSecurityHandler();
       
    48 	public:
       
    49 		/**
       
    50 		* Handles different security events. Called from security notifier
       
    51 		*
       
    52 		* @param aEvent MAdvGsmPhoneSecurity::TSecurityEvent
       
    53 		*/	
       
    54 		IMPORT_C void HandleEventL(RMobilePhone::TMobilePhoneSecurityEvent aEvent);
       
    55         IMPORT_C void HandleEventL( RMobilePhone::TMobilePhoneSecurityEvent aEvent, TInt& aResult );
       
    56         IMPORT_C void HandleEventL( RMobilePhone::TMobilePhoneSecurityEvent aEvent, TBool aStartup, TInt& aResult );
       
    57 		/**
       
    58 		* Asks and verifies the security code.
       
    59         *
       
    60 		* @return ETrue: code was accepted
       
    61         *         EFalse: user canceled the code query		  
       
    62 		*/			
       
    63 		IMPORT_C TBool AskSecCodeL();			
       
    64 		/**
       
    65         * Clears activated security query. Called from security notifier when
       
    66 		* there is incoming call
       
    67      	*/	
       
    68 		IMPORT_C void CancelSecCodeQuery();	
       
    69 		/**
       
    70 		* Asks and verifies the security code when device is locked.
       
    71         * Unlocks the device if code was accepted
       
    72 		*
       
    73 		* @return ETrue: code was accepted and device is unlocked
       
    74         *         EFalse: user canceled the code query		  
       
    75 		*/			
       
    76 		IMPORT_C TBool AskSecCodeInAutoLockL(); 		
       
    77 	private:    
       
    78 		/**
       
    79         * Handles EPin1Required security event
       
    80      	*/	
       
    81         TInt Pin1RequiredL();
       
    82 		/**
       
    83         * Handles EPuk1Required security event
       
    84      	*/	
       
    85         TInt Puk1RequiredL();
       
    86 		/**
       
    87         * Handles EPin2Required security event
       
    88      	*/	
       
    89 		void Pin2RequiredL();
       
    90 		/**
       
    91         * Handles EPuk2Required security event
       
    92      	*/	
       
    93 		void Puk2RequiredL();
       
    94         /**
       
    95         * Handles EUniversalPinRequired security event
       
    96      	*/	
       
    97         TInt UPinRequiredL();
       
    98         /**
       
    99         * Handles EUniversalPukRequired security event
       
   100      	*/	
       
   101         TInt UPukRequiredL();
       
   102 		/**
       
   103         * Handles EPassPhraseRequired security event
       
   104      	*/	
       
   105         TInt PassPhraseRequiredL();
       
   106 		/**
       
   107         * Handles sim lock pending event
       
   108      	*/	
       
   109 		void SimLockEventL();
       
   110         /**
       
   111         *  Removes the splashscreen
       
   112         */
       
   113         void RemoveSplashScreenL() const;
       
   114         
       
   115         void ShowGenericErrorNoteL(TInt aStatus);
       
   116 	private: // DATA
       
   117 		/*****************************************************
       
   118 		*	Series 60 Customer / ETel
       
   119 		*	Series 60  ETel API
       
   120 		*****************************************************/
       
   121 		RMobilePhone& iPhone;
       
   122 		TBool iQueryCanceled;
       
   123 		CCodeQueryDialog* iSecurityDlg;
       
   124 		CAknNoteDialog* iNoteDlg;
       
   125 		TBool* iDestroyedPtr;
       
   126         RMmCustomAPI iCustomPhone;
       
   127         RTASecuritySession* iSecuritySession;
       
   128         TBool iStartup; // System state: true means we are in the middle of a boot.
       
   129 	};
       
   130 #endif                  
       
   131 // End of file