connectionutilities/ConnectionDialogs/cconndlg/clientinc/ActiveLogin.h
branchRCL_3
changeset 58 83ca720e2b9a
parent 0 5a93021fdf25
equal deleted inserted replaced
57:05bc53fe583b 58:83ca720e2b9a
       
     1 /*
       
     2 * Copyright (c) 2003 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 __ACTIVELOGIN_H__
       
    21 #define __ACTIVELOGIN_H__
       
    22 
       
    23 // INCLUDES
       
    24 #include "ConnDlgPlugin.h"
       
    25 #include <e32base.h>
       
    26 
       
    27 
       
    28 // CLASS DECLARATION
       
    29 
       
    30 /**
       
    31 * ActiveObject for asynchronous operations
       
    32 */
       
    33 NONSHARABLE_CLASS( CActiveLogin ) : public CActive
       
    34     {
       
    35     private:
       
    36         /**
       
    37         * C++ default constructor.
       
    38         * @param aUsername The address where the caller of the Authenticate
       
    39         *                  dialog needs to save the username data inserted by 
       
    40         *                  the user.
       
    41         * @param aPassword The address where the caller of the Authenticate
       
    42         *                  dialog needs to save the password data inserted by 
       
    43         *                  the user.
       
    44         */
       
    45         CActiveLogin( TDes& aUsername, TDes& aPassword );
       
    46 
       
    47         /**
       
    48         * By default Symbian 2nd phase constructor is private.
       
    49         */
       
    50         void ConstructL();
       
    51 
       
    52 
       
    53     public:  // Constructors and destructor
       
    54         /**
       
    55         * Two-phased constructor.
       
    56         * @param aUsername The address where the caller of the Authenticate
       
    57         *                  dialog needs to save the username data inserted by 
       
    58         *                  the user.
       
    59         * @param aPassword The address where the caller of the Authenticate
       
    60         *                  dialog needs to save the password data inserted by 
       
    61         *                  the user.
       
    62         */
       
    63         static CActiveLogin* NewL( TDes& aUsername, TDes& aPassword );
       
    64 
       
    65         /**
       
    66         * Destructor.
       
    67         */
       
    68         virtual ~CActiveLogin();
       
    69 
       
    70 
       
    71     public: // From base class
       
    72         /**
       
    73         * This function is called when the scheduled function ends.
       
    74         */
       
    75         void RunL();
       
    76 
       
    77         /**
       
    78         * Cancel operations.
       
    79         */
       
    80         void DoCancel();
       
    81 
       
    82 
       
    83     public: // New functions
       
    84         /**
       
    85         * Add this class on the ActiveScheduler and puts itself active.
       
    86         * @param aStatus The status that is checked by the caller of the 
       
    87         *                Authenticate dialog.
       
    88         */
       
    89         void Observe( TRequestStatus &aStatus );
       
    90 
       
    91         /**
       
    92         * Returns the TAuthenticationPairBuff 
       
    93         * @return A pointer to iAuthenticationPairBuff.
       
    94         */
       
    95         TPckgBuf<TAuthenticationPairBuff>* GetBuffer();
       
    96 
       
    97 
       
    98     private:    // Data
       
    99         // The status that is checked by the caller of the Authentication 
       
   100         // dialog. Not owned.
       
   101         TRequestStatus* iRs;    
       
   102 
       
   103         // The address of the area where the caller of the Authentication 
       
   104         // dialog expects the value for username. Not owned.
       
   105         TDes* iUsername;
       
   106 
       
   107         // The address of the area where the caller of the Authentication 
       
   108         // dialog expects the value for password. Not owned.
       
   109         TDes* iPassword;
       
   110 
       
   111         // Packed buffer containing user name and password used as input and 
       
   112         // output for Authentication dialog.
       
   113         TPckgBuf<TAuthenticationPairBuff> iAuthenticationPairBuff;
       
   114     };
       
   115 
       
   116 
       
   117 #endif
       
   118 
       
   119 // End of File