phonebookui/Phonebook2/Commands/inc/CPbk2PocCmd.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2005-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:  Phonebook 2 PoC command object.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CPBK2POCCMD_H
       
    21 #define CPBK2POCCMD_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <MPbk2Command.h>
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CAiwServiceHandler;
       
    29 class CPbk2CallTypeSelector;
       
    30 class MPbk2ContactUiControl;
       
    31 class MVPbkStoreContact;
       
    32 class MVPbkStoreContactField;
       
    33 
       
    34 // CLASS DECLARATION
       
    35 
       
    36 /**
       
    37  * Phonebook 2 PoC command object.
       
    38  */
       
    39 NONSHARABLE_CLASS(CPbk2PocCmd) : public CBase,
       
    40                                  public MPbk2Command
       
    41     {
       
    42     public: // Construction and destruction
       
    43         /**
       
    44          * Creates a new instance of this class.
       
    45          *
       
    46          * @param aCommandId        Command id.
       
    47          * @param aServiceHandler   Reference to service handler.
       
    48          * @param aSelector         Reference to call type selector.
       
    49          * @param aControl          Contact UI control.
       
    50          * @param aContact          Reference to store contact.
       
    51          * @param aSelectField      Selected contact field,
       
    52          *                          ownership is taken.
       
    53          * @return  A new instance of this class.
       
    54          */
       
    55         static CPbk2PocCmd* NewL(
       
    56                 const TInt aCommandId,
       
    57                 CAiwServiceHandler& aServiceHandler,
       
    58                 CPbk2CallTypeSelector& aSelector,
       
    59                 MPbk2ContactUiControl& aControl,
       
    60                 const MVPbkStoreContact& aContact,
       
    61                 MVPbkStoreContactField* aSelectedField );
       
    62 
       
    63         /**
       
    64          * Destructor.
       
    65          */
       
    66         ~CPbk2PocCmd();
       
    67 
       
    68     public: // From MPbkCommand
       
    69         void ExecuteLD();
       
    70         void ResetUiControl(
       
    71                 MPbk2ContactUiControl& aUiControl );
       
    72         void AddObserver(
       
    73                 MPbk2CommandObserver& aObserver );
       
    74 
       
    75     private: // Implementation
       
    76         CPbk2PocCmd(
       
    77                 const TInt aCommandId,
       
    78                 CAiwServiceHandler& aServiceHandler,
       
    79                 CPbk2CallTypeSelector& aSelector,
       
    80                 MPbk2ContactUiControl& aControl,
       
    81                 const MVPbkStoreContact& aContact,
       
    82                 MVPbkStoreContactField* aSelectedField );
       
    83 
       
    84     private: // Data
       
    85         /// Own: Command id
       
    86         const TInt iCommandId;
       
    87         /// Ref: AIW service handler
       
    88         CAiwServiceHandler& iServiceHandler;
       
    89         /// Ref: Call type selector
       
    90         CPbk2CallTypeSelector& iSelector;
       
    91         /// Ref: Contact UI control
       
    92         MPbk2ContactUiControl* iControl;
       
    93         /// Ref: Contact to call to
       
    94         const MVPbkStoreContact& iContact;
       
    95         /// Own: Field to call to
       
    96         MVPbkStoreContactField* iSelectedField;
       
    97     };
       
    98 
       
    99 #endif // CPBK2POCCMD_H
       
   100 
       
   101 // End of File