phonebookui/Phonebook2/USIMExtension/inc/CPsu2SecUi.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2002-2007 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:  Encapsulates the usage of s60 security UI component
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CPSU2SECUI_H
       
    21 #define CPSU2SECUI_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <MVPbkSimPhoneObserver.h>
       
    25 #include <e32base.h>
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CSecuritySettings;
       
    29 class MVPbkSimPhone;
       
    30 
       
    31 // CLASS DECLARATION
       
    32 
       
    33 /**
       
    34 *  Encapsulates the usage of s60 security UI component
       
    35 *  Offers an functions for activating and deactivating fixed dialling numbers.
       
    36 *  Keeps status of accepted PIN2
       
    37 *
       
    38 */
       
    39 class CPsu2SecUi : public CBase,
       
    40                    private MVPbkSimPhoneObserver
       
    41     {
       
    42     public:  // Constructors and destructor
       
    43 
       
    44         /**
       
    45         * Two-phased constructor.
       
    46         * @param aPhone the sim phone for getting fdn activity info
       
    47         * @return a new instance of this class
       
    48         */
       
    49         static CPsu2SecUi* NewL(MVPbkSimPhone& aPhone);
       
    50 
       
    51         /**
       
    52         * Destructor.
       
    53         */
       
    54         virtual ~CPsu2SecUi();
       
    55 
       
    56     public: // New functions
       
    57 
       
    58         /**
       
    59         * Activates FDN if not activated
       
    60         */
       
    61         void ActivateFDNL();
       
    62 
       
    63         /**
       
    64         * Deactivates FDN if activated
       
    65         */
       
    66         void DeactivateFDNL();
       
    67 
       
    68         /**
       
    69         * Shows PIN2 query if PIN2 hasn't been confirmed
       
    70         * @return ETrue if user has given a correct PIN2
       
    71         */
       
    72         TBool ConfirmPin2L();
       
    73 
       
    74         /**
       
    75         * Checks the FDN activity status
       
    76         * @return ETrue if FDN is active
       
    77         */
       
    78         TBool IsFDNActive();
       
    79 
       
    80         /**
       
    81         * Shows PIN2 query if PIN2 hasn't been confirmed
       
    82         * @return ETrue if user has given a correct PIN2
       
    83         */
       
    84         TBool AskPin2L();
       
    85 
       
    86         /**
       
    87         * Reset PIN2 query information
       
    88         */
       
    89        void Reset();
       
    90 
       
    91     private: // Construction
       
    92 
       
    93         /**
       
    94         * C++ default constructor.
       
    95         */
       
    96         CPsu2SecUi(MVPbkSimPhone& aPhone);
       
    97 
       
    98         /**
       
    99         * By default Symbian 2nd phase constructor is private.
       
   100         */
       
   101         void ConstructL();
       
   102 
       
   103     private:    // Functions from base classes
       
   104 
       
   105         /**
       
   106         * From MVPbkSimPhoneObserver
       
   107         */
       
   108         void PhoneOpened(MVPbkSimPhone& aPhone);
       
   109 
       
   110         /**
       
   111         * From MVPbkSimPhoneObserver
       
   112         */
       
   113         void PhoneError(MVPbkSimPhone& aPhone,
       
   114             TErrorIdentifier aIdentifier, TInt aError);
       
   115 
       
   116         /**
       
   117         * From MVPbkSimPhoneObserver
       
   118         */
       
   119         void ServiceTableUpdated(TUint32 aServiceTable);
       
   120 
       
   121         /**
       
   122         * From MVPbkSimPhoneObserver
       
   123         */
       
   124         void FixedDiallingStatusChanged(
       
   125             TInt aFDNStatus );
       
   126 
       
   127     private:    // Data
       
   128         /// Ref: The sim phone for getting actuvity information
       
   129         MVPbkSimPhone& iPhone;
       
   130         // Own: ETrue if PIN2 has already been confirmed
       
   131         TBool iPin2Confirmed;
       
   132         // Own: s60 security settings UI
       
   133         CSecuritySettings* iSecuritySettings;
       
   134     };
       
   135 
       
   136 #endif      // CPSU2SECUI_H
       
   137 
       
   138 // End of File