phonebookui/Phonebook2/ServerApplication/inc/CPbk2SelectFieldPropertyBase.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 contact field property selector base.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPBK2SELECTFIELDPROPERTYBASE_H
       
    20 #define CPBK2SELECTFIELDPROPERTYBASE_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 #include "MPbk2SelectFieldProperty.h"
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class TPbk2AddItemWrapper;
       
    28 class TVPbkContactStoreUriPtr;
       
    29 class MVPbkContactStore;
       
    30 class CPbk2FieldPropertyArray;
       
    31 class MVPbkFieldType;
       
    32 class MPbk2DialogEliminator;
       
    33 
       
    34 // CLASS DECLARATION
       
    35 
       
    36 /**
       
    37  * Phonebook 2 contact field property selector base.
       
    38  * Responsible for:
       
    39  * - creating add item wrappers
       
    40  * - launching the select field query dialog
       
    41  * - returning the selected field type
       
    42  */
       
    43 class CPbk2SelectFieldPropertyBase : public CBase,
       
    44                                      public MPbk2SelectFieldProperty
       
    45     {
       
    46     public: // Construction and destruction
       
    47 
       
    48         /**
       
    49          * Destructor.
       
    50          */
       
    51         ~CPbk2SelectFieldPropertyBase();
       
    52 
       
    53     public: // From MPbk2SelectFieldProperty
       
    54         const MVPbkFieldType* SelectedFieldType() const;
       
    55         void Cancel(
       
    56                 TInt aCommandId );
       
    57 
       
    58     protected: // Implementation
       
    59         CPbk2SelectFieldPropertyBase(
       
    60                 HBufC8& aSelector,
       
    61                 TInt aResourceId );
       
    62         void BaseConstructL();
       
    63         void CreateFieldPropertiesArrayL(
       
    64                 MVPbkContactStore& aStore );
       
    65         void CreateWrappersL(
       
    66                 TVPbkContactStoreUriPtr aStoreUri );
       
    67         TInt ShowSelectFieldQueryL();
       
    68 
       
    69     protected: // Data
       
    70         /// Own: Add item field type wrappers
       
    71         RArray<TPbk2AddItemWrapper> iWrappers;
       
    72         /// Own: Phonebook field properties
       
    73         CPbk2FieldPropertyArray* iFieldProperties;
       
    74         /// Ref: Add item dialog eliminator
       
    75         MPbk2DialogEliminator* iAddItemDlgEliminator;
       
    76         /// Ref: Selected add item field type
       
    77         const MVPbkFieldType* iSelectedFieldType;
       
    78         /// Ref: Externalized field type selector buffer
       
    79         HBufC8& iSelector;
       
    80         /// Ref: Resource id of the dialog title
       
    81         TInt iDialogTitleResourceId;
       
    82     };
       
    83 
       
    84 #endif // CPBK2SELECTFIELDPROPERTYBASE_H
       
    85 
       
    86 // End of File