wvuing/IMPSConnectionUI/OperationStepSrc/CCnUiAALoginCntrlStep.h
changeset 0 094583676ce7
equal deleted inserted replaced
-1:000000000000 0:094583676ce7
       
     1 /*
       
     2 * Copyright (c) 2004 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:  AA login control.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __CCNUIAALOGINCNTRLSTEP_H
       
    19 #define __CCNUIAALOGINCNTRLSTEP_H
       
    20 
       
    21 //  INCLUDES
       
    22 #include <E32Base.h>
       
    23 #include "MCnUiCntrlStep.h"
       
    24 #include "MCnUiClientPlugin.h"
       
    25 #include "impspresenceconnectionuiconstsng.h"
       
    26 
       
    27 
       
    28 
       
    29 //FORWARD DECLARATION
       
    30 class MCnUiBaseControlContext;
       
    31 class CIMPSSAPSettings;
       
    32 class CCnUiConnOpener;
       
    33 class CCnUiConnCloser;
       
    34 class CPEngNWSessionSlotID;
       
    35 
       
    36 // CLASS DECLARATION
       
    37 /**
       
    38  * AA login control.
       
    39  * Performs a AA login to default SAP
       
    40  *
       
    41  * @since 2.1
       
    42  */
       
    43 NONSHARABLE_CLASS( CCnUiAALoginCntrlStep ) : public CBase,
       
    44         public MCnUiCntrlStep
       
    45     {
       
    46 public:  // Two-phased constructors and destructor
       
    47 
       
    48     /**
       
    49      * Two-phased constructor.
       
    50      */
       
    51     static CCnUiAALoginCntrlStep* NewLC( MCnUiBaseControlContext& aCCntxt,
       
    52     CIMPSSAPSettings& aLoginSap,
       
    53     TBool aShowDetailedError,
       
    54     CPEngNWSessionSlotID2& aNWSessionSlotID );
       
    55 
       
    56 
       
    57     /**
       
    58      * Destructor.
       
    59      */
       
    60     virtual ~CCnUiAALoginCntrlStep();
       
    61 
       
    62 
       
    63 private:
       
    64 
       
    65     /**
       
    66      * C++ constructor.
       
    67      */
       
    68     CCnUiAALoginCntrlStep( MCnUiBaseControlContext& aCCntxt,
       
    69                            CIMPSSAPSettings& aLoginSap,
       
    70                            TBool aShowDetailedError,
       
    71                            CPEngNWSessionSlotID2& aNWSessionSlotID );
       
    72 
       
    73 
       
    74     /**
       
    75      * Symbian OS constructor.
       
    76      */
       
    77     void ConstructL();
       
    78 
       
    79 
       
    80 
       
    81 public: // New functions from MCnUiCntrlStep
       
    82 
       
    83 
       
    84     /**
       
    85      * Runs connection open / login step.
       
    86      *
       
    87      * @since 2.1
       
    88      * @return Errorcode from login.
       
    89      */
       
    90     TInt RunStepL();
       
    91 
       
    92 
       
    93     /**
       
    94      * Handles complete.
       
    95      *
       
    96      * @since 2.1
       
    97      * @return Always ECnUiStepContinueTeardown.
       
    98      */
       
    99     TCnUiHandleCompleteStatus HandleCompleteL();
       
   100 
       
   101 
       
   102     /**
       
   103      * Handles undo.
       
   104      *
       
   105      * @since 2.1
       
   106      */
       
   107     void UndoStepL();
       
   108 
       
   109 
       
   110 
       
   111 public: // New functions, left public to allow testing
       
   112 
       
   113     /**
       
   114      * Runs connection open / login step.
       
   115      *
       
   116      * @since 2.1
       
   117      * @return Error code from login.
       
   118      */
       
   119     TInt DoRunStepL();
       
   120 
       
   121 
       
   122     /**
       
   123      * Loads default SAP from SAP Settings
       
   124      * store as login SAP.
       
   125      *
       
   126      * @since 2.1
       
   127      * @param aSap
       
   128      * @return KErrNone / KCnUiErrorNoProperDefaultSap.
       
   129      */
       
   130     TInt LoadDefaultSapL( CIMPSSAPSettings& aSap );
       
   131 
       
   132 private: // new helper
       
   133     /**
       
   134       * Gets the current client information from TLS
       
   135       *
       
   136       * @since 3.0
       
   137       */
       
   138     TIMPSConnectionClient ConnectionClient();
       
   139 
       
   140 private: // data
       
   141 
       
   142     ///<Base control context, not owned
       
   143     MCnUiBaseControlContext&               iCCntxt;
       
   144 
       
   145     ///<Login SAP, not owned
       
   146     CIMPSSAPSettings&                      iLoginSap;
       
   147 
       
   148     ///<Connection opener, owned
       
   149     CCnUiConnOpener*                       iConnOpener;
       
   150 
       
   151     ///<Connection closer, owned
       
   152     CCnUiConnCloser*						iConnCloser;
       
   153 
       
   154     // Tells wether we should show a detailed error
       
   155     // note in case an error occurs during login
       
   156     TBool									iShowDetailedError;
       
   157 
       
   158     // does not own
       
   159     CPEngNWSessionSlotID2&                   iNWSessionSlotID;
       
   160 
       
   161     MCnUiClientPlugin*                      iLogoutPlugin;
       
   162     };
       
   163 
       
   164 #endif      //  __CCNUIAALOGINCNTRLSTEP_H
       
   165 
       
   166 //  End of File
       
   167