phonebookui/Phonebook2/CommandsExtension/inc/CPbkRclCmd.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2002-2007 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:  A command for launching phonebook info dialog
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CPbkRclCmd_H
       
    21 #define CPbkRclCmd_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <MPbk2Command.h>
       
    25 #include <e32base.h>
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class MPbk2ContactUiControl;
       
    29 class CVPbkContactStoreUriArray;
       
    30 class MPbk2CommandObserver;
       
    31 
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35  *  A command for launching phonebook info dialog
       
    36  */
       
    37 NONSHARABLE_CLASS(CPbkRclCmd) : 
       
    38         public CActive,
       
    39         public MPbk2Command
       
    40     {
       
    41     public:  // Constructors and destructor
       
    42         /**
       
    43          * Two-phased constructor.
       
    44          * @param aUiControl ui control
       
    45          * @return a new instance of this class
       
    46          */
       
    47         static CPbkRclCmd* NewL(
       
    48             MPbk2ContactUiControl& aUiControl);
       
    49         
       
    50         /**
       
    51          * Destructor.
       
    52          */
       
    53         virtual ~CPbkRclCmd();
       
    54 
       
    55     public: // From MPbk2Command.
       
    56         void ExecuteLD();
       
    57         void AddObserver(MPbk2CommandObserver& aObserver);
       
    58         void ResetUiControl(MPbk2ContactUiControl& aUiControl);
       
    59 
       
    60     private: // From CActive
       
    61         void RunL();
       
    62         void DoCancel();
       
    63         TInt RunError(TInt aError);
       
    64         
       
    65     private: // implementation
       
    66         CPbkRclCmd(MPbk2ContactUiControl& aUiControl);
       
    67         void ConstructL();
       
    68         void IssueRequest();
       
    69         void LaunchDialogL();
       
    70         void HandleError(TInt aError);
       
    71                     
       
    72     private:    // Data
       
    73         /// Ref: Observer for the command
       
    74         MPbk2CommandObserver* iCommandObserver;
       
    75         /// Own: State of the active object
       
    76         TInt iState;
       
    77         /// Ref: ui control - used to fetch the findtext
       
    78         MPbk2ContactUiControl& iUiControl;
       
    79     };
       
    80 
       
    81 #endif      // CPbkRclCmd_H
       
    82             
       
    83 // End of File