wvuing/wvcommandutils/Inc/CCALoginCmd.h
changeset 0 094583676ce7
equal deleted inserted replaced
-1:000000000000 0:094583676ce7
       
     1 /*
       
     2 * Copyright (c) 2006 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: Login Command class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CCALOGINCMD_H
       
    21 #define CCALOGINCMD_H
       
    22 
       
    23 
       
    24 //  INCLUDES
       
    25 #include <e32base.h>
       
    26 #include "MCACommand.h"
       
    27 
       
    28 
       
    29 
       
    30 // FORWARD DECLARATIONS
       
    31 class MCAProcessManager;
       
    32 class CCASessionHandlerCmd;
       
    33 class MCAUiLoginCmdCB;
       
    34 
       
    35 
       
    36 
       
    37 // CLASS DECLARATION
       
    38 /**
       
    39 *  Login Command class.
       
    40 *
       
    41 */
       
    42 NONSHARABLE_CLASS( CCALoginCmd ) : public CBase, public MCACommand
       
    43     {
       
    44 public:
       
    45     // Constructors and destructor
       
    46 
       
    47     /**
       
    48     * Two Phase Constructor
       
    49     * @param aProcessManager Ref. to Appln's Process Manager
       
    50     * @param aUiLoginCmdCB Ref. to UI Login Call Back Interface
       
    51     * @param aSessionHandlerCmd Ref. to Command Session Handler
       
    52     */
       
    53     static CCALoginCmd* NewL( MCAProcessManager& aProcessManager,
       
    54     MCAUiLoginCmdCB& aUiLoginCmdCB, CCASessionHandlerCmd& aSessionHandlerCmd  );
       
    55 
       
    56     /**
       
    57     * Two Phase Constructor
       
    58     * Created Object would be pushed to cleanupstack
       
    59     * @param aProcessManager Ref. to Appln's Process Manager
       
    60     * @param aUiLoginCmdCB Ref. to UI Login Call Back Interface
       
    61     * @param aSessionHandlerCmd Ref. to Command Session Handler
       
    62     */
       
    63     static CCALoginCmd* NewLC( MCAProcessManager& aProcessManager,
       
    64                                MCAUiLoginCmdCB& aUiLoginCmdCB, CCASessionHandlerCmd& aSessionHandlerCmd  );
       
    65 
       
    66     /**
       
    67     * Destructor.
       
    68     */
       
    69     virtual ~CCALoginCmd();
       
    70 
       
    71 private:
       
    72 
       
    73     /**
       
    74     * C++ default constructor.
       
    75     * @param aProcessManager Ref. to Appln's Process Manager
       
    76     * @param aUiLoginCmdCB Ref. to UI Login Call Back Interface
       
    77     * @param aSessionHandlerCmd Ref. to Command Session Handler
       
    78     */
       
    79 
       
    80     CCALoginCmd( MCAProcessManager& aProcessManager,
       
    81                  CCASessionHandlerCmd& aSessionHandlerCmd,
       
    82                  MCAUiLoginCmdCB& aUiLoginCmdCB );
       
    83 
       
    84 public:
       
    85 
       
    86     /**
       
    87     * Set command observer.
       
    88     *
       
    89     * @param aObserver Command observer
       
    90     */
       
    91     void SetObserver( MCACommandObserver& aObserver );
       
    92 
       
    93     /**
       
    94     * Cancel command.
       
    95     *
       
    96     */
       
    97     void CancelCommand();
       
    98     /**
       
    99     * Executes the command.
       
   100     *
       
   101     */
       
   102     void ExecuteCommandL();
       
   103 
       
   104     /**
       
   105     *
       
   106     * @return ETrue if the command is asynchronous, otherwise EFalse.
       
   107     */
       
   108     TBool IsAsynchronous();
       
   109 
       
   110 protected:
       
   111 
       
   112     /**
       
   113     * Complete command.
       
   114     *
       
   115     * @param aError Commend completed with this error code
       
   116     */
       
   117     void CompletedL( TInt aError );
       
   118 
       
   119 private:
       
   120     // command observer
       
   121     MCACommandObserver* iObserver;
       
   122     // Ref. to Process Manager
       
   123     MCAProcessManager& iProcessManager;
       
   124     // Ref. to Command Session Handler
       
   125     CCASessionHandlerCmd& iSessionHandlerCmd;
       
   126     //Ref. to UI Login Call Back Interface
       
   127     MCAUiLoginCmdCB& iUiLoginCmdCB;
       
   128 
       
   129     };
       
   130 
       
   131 #endif      // CCALoginCmd_H
       
   132 
       
   133 // End of File