connectionutilities/ConnectionDialogs/cconndlg/inc/AuthenticationDialog.h
branchRCL_3
changeset 58 83ca720e2b9a
parent 0 5a93021fdf25
equal deleted inserted replaced
57:05bc53fe583b 58:83ca720e2b9a
       
     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:  Declaration of class CAuthenticationDialog.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __AUTHENTICATIONDIALOG_H__
       
    20 #define __AUTHENTICATIONDIALOG_H__
       
    21 
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <AknQueryDialog.h>
       
    26 
       
    27 #include "ExpiryTimerCallback.h"
       
    28 
       
    29 // FORWARD DECLARATION
       
    30 class CConnDlgAuthenticationPlugin;
       
    31 class CExpiryTimer;
       
    32 
       
    33 // CLASS DECLARATION
       
    34 /**
       
    35  * Class implementing Authentication (username and password) dialog
       
    36  */
       
    37 NONSHARABLE_CLASS( CAuthenticationDialog ) : 
       
    38                                             public CAknMultiLineDataQueryDialog, public MExpiryTimerCallback
       
    39     {
       
    40     public:
       
    41         /**
       
    42         * NewL function
       
    43         * @param aPlugin    plugin pointer
       
    44         * @param aDb        database pointer
       
    45         * @param aUsername  username
       
    46         * @param aPassword  password
       
    47         * return CAuthenticationDialog*
       
    48         */
       
    49         static CAuthenticationDialog* NewL( 
       
    50                                         CConnDlgAuthenticationPlugin* aPlugin,
       
    51                                         TDes& aUsername, 
       
    52                                         TDes& aPassword );
       
    53 
       
    54     private:
       
    55         /**
       
    56         * CAuthenticationDialog default constructor
       
    57         * @param aPlugin    plugin pointer
       
    58         * @param aDb        database pointer
       
    59         * @param aUsername  username
       
    60         * @param aPassword  password
       
    61         */
       
    62         CAuthenticationDialog( CConnDlgAuthenticationPlugin* aPlugin );
       
    63 
       
    64         /**
       
    65         * OkToExitL destructor
       
    66         * @param  aButtonId button exit id
       
    67         * @return TBool exit or no
       
    68         */
       
    69         virtual TBool OkToExitL( TInt aButtonId );
       
    70 
       
    71         /**
       
    72         * ~CAuthenticationDialog destructor
       
    73         * @param    -
       
    74         */
       
    75         ~CAuthenticationDialog();
       
    76 
       
    77         /**
       
    78         * HandleQueryEditorStateEventL function
       
    79         * @param    aQueryControl   Control to be queried
       
    80         * @param    aEventType      Type of event (not used)
       
    81         * @param    aStatus         Status of the control (empty or not)
       
    82         * return    TBool
       
    83         */
       
    84         TBool HandleQueryEditorStateEventL( CAknQueryControl* aQueryControl, 
       
    85                                             TQueryControlEvent aEventType, 
       
    86                                             TQueryValidationStatus aStatus );
       
    87         
       
    88         /**
       
    89         * Dialog expiration timeout callback
       
    90         */
       
    91         void HandleTimedOut();
       
    92 
       
    93     private:
       
    94         /**
       
    95         * PreLayoutDynInitL function
       
    96         * @param    -
       
    97         */
       
    98         virtual void PreLayoutDynInitL();
       
    99 
       
   100         /**
       
   101         * SetInitialCurrentLine function
       
   102         * @param    -
       
   103         */
       
   104         virtual void SetInitialCurrentLine();
       
   105 
       
   106 
       
   107     private:
       
   108         // Status of username field (empty or not)
       
   109         TBool iFirstEmpty;
       
   110 
       
   111         // Status of password field (empty or not)
       
   112         TBool iSecondEmpty;
       
   113 
       
   114         // Pointer to the plugin
       
   115         CConnDlgAuthenticationPlugin* iPlugin;
       
   116         
       
   117         // Pointer for dialog expiration timer
       
   118         CExpiryTimer* iExpiryTimer;
       
   119     };
       
   120 
       
   121 
       
   122 #endif
       
   123 
       
   124 // End of File