wvuing/wvcommandutils/Inc/CCACommandManager.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:  Command Manager for creating the commands
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CCACOMMANDMANAGER_H
       
    21 #define CCACOMMANDMANAGER_H
       
    22 
       
    23 //  INCLUDES
       
    24 
       
    25 #include <e32base.h>
       
    26 #include "MCACommand.h"
       
    27 #include "MCASettingsCommand.h"
       
    28 #include "MCACommandFactory.h"
       
    29 #include "MCAUiContactEditCmdCB.h"
       
    30 #include "MCASessionHandlerCmd.h"
       
    31 
       
    32 
       
    33 //FORWARD DECLARATIONS
       
    34 class  MCAProcessManager;
       
    35 class  MCAUiLoginCmdCB;
       
    36 class  CCASessionHandlerCmd;
       
    37 class  MCAUiSettingsDialogCmdCB;
       
    38 
       
    39 
       
    40 
       
    41 
       
    42 // CLASS DECLARATION
       
    43 
       
    44 /**
       
    45 *  Command Manager.
       
    46 *
       
    47 */
       
    48 NONSHARABLE_CLASS( CCACommandManager ) : public CBase,
       
    49         public MCACommandFactory
       
    50 
       
    51     {
       
    52 public:  // Constructors and destructor
       
    53 
       
    54     /**
       
    55     * Two-phased constructor.
       
    56     */
       
    57     static CCACommandManager* NewL();
       
    58 
       
    59     /**
       
    60     * Destructor.
       
    61     */
       
    62     virtual ~CCACommandManager();
       
    63 
       
    64 private:
       
    65     /**
       
    66     * Default Constructor.
       
    67     */
       
    68     CCACommandManager();
       
    69 
       
    70 public:
       
    71     /**
       
    72     * Initializes the session handler
       
    73     * @param aSessionHandlerCmd : holds the session handler instance
       
    74     */
       
    75     void Initialize( CCASessionHandlerCmd* aSessionHandlerCmd );
       
    76 
       
    77 
       
    78 public: // From MCACommandFactory
       
    79     /**
       
    80     * Creates a new command object corresponding to given command id.
       
    81     *
       
    82     * @param aCommandId Id of the command to be created
       
    83     * @return Pointer to the created object, ownership is transferred.
       
    84     */
       
    85     MCACommand* NewCommandLC( TInt aCommandId,
       
    86                               MCAProcessManager& aProcessManager, MCAUiLoginCmdCB& aUiLoginCmdCB );
       
    87     /**
       
    88     * Creates a new command object corresponding to given command id.
       
    89     *
       
    90     * @param aCommandId Id of the command to be created
       
    91     * @return Pointer to the created object, ownership is transferred.
       
    92     */
       
    93     MCASettingsCommand* NewCommandLC( TInt aCommandId,
       
    94                                       MCAProcessManager& aProcessManager, MCAUiSettingsDialogCmdCB& aUiCmdCB );
       
    95 
       
    96     /**
       
    97     * Creates a new command object corresponding to given command id.
       
    98     *
       
    99     * @param aCommandId Id of the command to be created
       
   100     * @return Pointer to the created object, ownership is transferred.
       
   101     */
       
   102     MCASettingsCommand* NewCommandL( TInt aCommandId,
       
   103                                      MCAProcessManager& aProcessManager, MCAUiSettingsDialogCmdCB& aUiCmdCB );
       
   104 
       
   105     MCACommand* NewCommandLC( TInt aCommandId, MCAProcessManager& , MCAUiContactEditCmdCB& );
       
   106     MCACommand* NewCommandL ( TInt aCommandId, MCAProcessManager& , MCAUiContactEditCmdCB& );
       
   107 
       
   108     /**
       
   109     * @see MCACommandFactory
       
   110     */
       
   111     MCASessionHandlerCmd* GetSessionHandlerCmd() ;
       
   112 
       
   113 private:    // Data
       
   114 
       
   115     CCASessionHandlerCmd* iSessionHandlerCmd;
       
   116 
       
   117     };
       
   118 
       
   119 #endif      // CCACOMMANDMANAGER_H
       
   120 
       
   121 // End of File