phonebookui/Phonebook2/UIControls/inc/Pbk2ContactEditorFieldFactory.h
branchRCL_3
changeset 20 f4a778e096c2
parent 0 e686773b3f54
equal deleted inserted replaced
19:5b6f26637ad3 20:f4a778e096c2
       
     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:  Phonebook 2 contact editor field factory.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef PBK2CONTACTEDITORFIELDFACTORY_H
       
    20 #define PBK2CONTACTEDITORFIELDFACTORY_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32std.h>
       
    24 #include <e32base.h>
       
    25 #include "MPbk2UIFieldFactory.h"
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class MPbk2ContactEditorField;
       
    29 class CPbk2PresentationContactField;
       
    30 class MPbk2ContactEditorUiBuilder;
       
    31 class CPbk2IconInfoContainer;
       
    32 class MPbk2ContactEditorExtension;
       
    33 class MPbk2ContactEditorUIField;
       
    34 class MPbk2UIField;
       
    35 
       
    36 // CLASS DECLARATION
       
    37 
       
    38 /**
       
    39  * Phonebook 2 contact editor field factory.
       
    40  * Responsible for creating contact editor fields.
       
    41  */
       
    42 class CPbk2ContactEditorFieldFactory : public CBase,
       
    43 									   public MPbk2UIFieldFactory
       
    44     {
       
    45     public:
       
    46     	~CPbk2ContactEditorFieldFactory();
       
    47     	
       
    48         static CPbk2ContactEditorFieldFactory* NewL(MPbk2ContactEditorUiBuilder& aUiBuilder, 
       
    49         			MPbk2ContactEditorExtension& aEditorExtension);
       
    50         /**
       
    51          * Creates a new contact editor field.
       
    52          *
       
    53          * @param aField             Phonebook2 field.
       
    54          * @param aUiBuilder         Builder for adding the field into dialog.
       
    55          * @param aIconInfoContainer An icon container for setting field icon.
       
    56          * @param aEditorExtension   Contact editor extension.
       
    57          * @param aCustomPosition    Needed only for custom fields to indicate desired
       
    58                                      postion in form. For other fields can be NULL.
       
    59          * @return  A new contact editor field.
       
    60          */
       
    61         MPbk2ContactEditorField* CreateFieldLC(
       
    62                 CPbk2PresentationContactField& aField,
       
    63                 TInt aCustomPosition, CPbk2IconInfoContainer& aIconInfoContainer);
       
    64         
       
    65         /**
       
    66 	     * Creates a new contact editor field.
       
    67 	     *
       
    68 	     * @param aField             Phonebook2 UI field.
       
    69 	     * @param aUiBuilder         Builder for adding the field into dialog.
       
    70 	     * @param aIconInfoContainer An icon container for setting field icon.
       
    71 	     * @param aCustomPosition    Needed only for custom fields to indicate desired
       
    72 	     *                           postion in form. For other fields can be NULL.
       
    73 	     * @param aCustomText	     If not empty, text will be added into field.
       
    74 	     * @return  A new contact editor UI field.
       
    75 	     */
       
    76         MPbk2ContactEditorUIField* CreateFieldLC( 
       
    77                 		MPbk2UIField& aField,
       
    78                 		TInt aCustomPosition, 
       
    79                         MPbk2ContactEditorUiBuilder& aUiBuilder,
       
    80                         const TDesC& aCustomText, CPbk2IconInfoContainer& aIconInfoContainer );
       
    81               
       
    82     private:
       
    83     	void ConstructL();
       
    84     	CPbk2ContactEditorFieldFactory(
       
    85     			MPbk2ContactEditorUiBuilder& aUiBuilder, 
       
    86     			MPbk2ContactEditorExtension& aEditorExtension);
       
    87     	
       
    88     private:
       
    89     	MPbk2ContactEditorExtension& iEditorExtension;
       
    90     	MPbk2ContactEditorUiBuilder& iUiBuilder;
       
    91     };
       
    92 
       
    93 #endif  // PBK2CONTACTEDITORFIELDFACTORY_H
       
    94             
       
    95 // End of File