securitydialogs/Securityobserver/Inc/SecurityObserver.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:  Observer for ETel security events. Uses SecurityNotifier
       
    15 *               which calls appropriate dialog to be opened from SecUi.
       
    16 *
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 #ifndef     __SECURITYOBSERVER_H_
       
    22 #define     __SECURITYOBSERVER_H_
       
    23 
       
    24 //  INCLUDES
       
    25 
       
    26 #include <e32base.h>
       
    27 #include <etelmm.h>
       
    28 #include    <e32property.h>
       
    29 #include "SecObsNotify.h"
       
    30 #include "SecurityObserver.hrh"
       
    31 #include "SecSimLockObserver.h"
       
    32 
       
    33 class CSecurityObserver : public CActive
       
    34     {
       
    35     public:
       
    36         /**
       
    37         * Creates instance of the CSecurityObserver class.
       
    38         *
       
    39         * @return Returns the instance just created.
       
    40         */
       
    41         static  CSecurityObserver* NewL();
       
    42         /**
       
    43         * Destructor.
       
    44         */
       
    45         ~CSecurityObserver();
       
    46     public:
       
    47         /**
       
    48         * Starts asynchronic listening security events
       
    49         *
       
    50         */
       
    51         void StartListen();
       
    52         /**
       
    53         * Is pin1 required or not
       
    54         *
       
    55         * @return ETrue: required
       
    56         *         EFalse: not required
       
    57         */
       
    58         inline TBool IsPin1Required() const;
       
    59         /**
       
    60         * Is puk1 required or not
       
    61         *
       
    62         * @return ETrue: required
       
    63         *         EFalse: not required
       
    64         */
       
    65         inline TBool IsPuk1Required() const;
       
    66         /**
       
    67         * Is security code required or not
       
    68         *
       
    69         * @return ETrue: required
       
    70         *         EFalse: not required
       
    71         */
       
    72         inline TBool IsPassPhraseRequired() const;
       
    73         /**
       
    74         * Is UPIN code required or not
       
    75         *
       
    76         * @return ETrue: required
       
    77         *         EFalse: not required
       
    78         */
       
    79         inline TBool IsUPinRequired() const;
       
    80 
       
    81         //inline TBool CSecurityObserver::IsUSimAppPinRequired() const
       
    82         /**
       
    83         * Is UPUK code required or not
       
    84         *
       
    85         * @return ETrue: required
       
    86         *         EFalse: not required
       
    87         */
       
    88         inline TBool IsUPukRequired() const;
       
    89     protected:
       
    90         /**
       
    91         * Symbian OS constructor.
       
    92         */
       
    93         void ConstructL();
       
    94         /**
       
    95         * C++ default constructor.
       
    96         */
       
    97         CSecurityObserver();
       
    98     private:    //  from CActive
       
    99         /** @see CActive::RunL() */
       
   100         void DoCancel();
       
   101         /** @see CActive::RunL() */
       
   102         void RunL();
       
   103     private:  // data
       
   104 	/*****************************************************
       
   105 	*	Series 60 Customer / ETel
       
   106 	*	Series 60  ETel API
       
   107 	*****************************************************/
       
   108         RTelServer       iServer;
       
   109 		RMobilePhone	iPhone;
       
   110 		CSecObsNotify* iNotifierController;
       
   111         CSimLockObserver* iSimLockObserver;
       
   112 		RMobilePhone::TMobilePhoneSecurityEvent iEvent;
       
   113         RProperty iProperty;
       
   114         TBool iPin1Required;
       
   115         TBool iPuk1Required;
       
   116         TBool iPassPhraseRequired;
       
   117         TBool iUPinRequired;
       
   118         TBool iUPukRequired;
       
   119         TBool iUSimAppPinRequired;
       
   120         };
       
   121 
       
   122     inline TBool CSecurityObserver::IsPin1Required() const
       
   123         {return iPin1Required;}
       
   124     inline TBool CSecurityObserver::IsPuk1Required() const
       
   125         {return iPuk1Required;}
       
   126     inline TBool CSecurityObserver::IsPassPhraseRequired() const
       
   127         {return iPassPhraseRequired;}
       
   128     inline TBool CSecurityObserver::IsUPinRequired() const
       
   129         {return iUPinRequired;}
       
   130     inline TBool CSecurityObserver::IsUPukRequired() const
       
   131         {return iUPukRequired;}
       
   132 #endif
       
   133 
       
   134 // End of file