phonebookui/Phonebook2/xSPExtensionManager/src/CxSPCommand.h
branchRCL_3
changeset 20 f4a778e096c2
parent 0 e686773b3f54
equal deleted inserted replaced
19:5b6f26637ad3 20:f4a778e096c2
       
     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: 
       
    15 *       xSP command
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef __CXSPCOMMAND_H__
       
    21 #define __CXSPCOMMAND_H__
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <MPbk2Command.h>
       
    26 
       
    27 // forward declarations
       
    28 class CxSPViewManager;
       
    29 class MPbk2ContactUiControl;
       
    30 class MPbk2CommandObserver;
       
    31 
       
    32 /**
       
    33  * xSP command class
       
    34  */
       
    35 class CxSPCommand : public CBase,
       
    36                     public MPbk2Command
       
    37     {
       
    38     public:
       
    39 
       
    40         /**
       
    41          * Static factory function that performs the 2-phased construction.
       
    42          *
       
    43          * @param CommandId Command id for this instance
       
    44          * @param aUiControl ui control of this command
       
    45          * @param aViewManager View manager to be used
       
    46          *
       
    47          * @return Newly created CxSPCommand.
       
    48          */
       
    49         static CxSPCommand* NewL( TInt aCommandId,
       
    50         						  MPbk2ContactUiControl& aUiControl,
       
    51         						  CxSPViewManager& aViewManager );
       
    52 
       
    53         /**
       
    54          * Destructor.
       
    55          */
       
    56         ~CxSPCommand();
       
    57 
       
    58     public: // from MPbk2Command
       
    59 
       
    60       	void ExecuteLD();
       
    61       	void ResetUiControl( MPbk2ContactUiControl& aUiControl );
       
    62       	void AddObserver( MPbk2CommandObserver& aObserver );
       
    63 
       
    64 
       
    65     private:
       
    66         /**
       
    67          * Standard C++ constructor.
       
    68          *
       
    69          * @param CommandId Command id for this instance
       
    70          * @param aUiControl ui control of this command
       
    71          * @param aViewManager View manager to be used
       
    72          */
       
    73         CxSPCommand( TInt aCommandId,
       
    74         			 MPbk2ContactUiControl& aUiControl,
       
    75         			 CxSPViewManager& aViewManager );
       
    76 
       
    77     private: // Data
       
    78     	/// Command id of this instance
       
    79     	TInt iCommandId;
       
    80 
       
    81     	/// Own: ui control of this command
       
    82     	MPbk2ContactUiControl* iUiControl;
       
    83 
       
    84     	/// Ref: view manager
       
    85     	CxSPViewManager& iViewManager;
       
    86 
       
    87     	/// Not owned: command observer
       
    88     	MPbk2CommandObserver* iCommandObserver;
       
    89     };
       
    90 
       
    91 
       
    92 #endif // __CXSPCOMMAND_H__
       
    93 
       
    94 // End of File