phonebookui/Phonebook2/ServerApplication/inc/CPbk2AssignCreateNewProperty.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
       
    15 *              : for new contact creation.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef CPBK2ASSIGNCREATENEWPROPERTY_H
       
    21 #define CPBK2ASSIGNCREATENEWPROPERTY_H
       
    22 
       
    23 // INCLUDES
       
    24 #include "CPbk2SelectFieldPropertyBase.h"
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class MVPbkContactStore;
       
    28 class CPbk2StorePropertyArray;
       
    29 class CVPbkContactManager;
       
    30 
       
    31 // CLASS DECLARATION
       
    32 
       
    33 /**
       
    34  * Phonebook 2 contact field property selector for new contact creation.
       
    35  * Responsible for:
       
    36  * - validating created add item wrappers
       
    37  * - changing target store if selected store does not handle the field type
       
    38  */
       
    39 class CPbk2AssignCreateNewProperty : public CPbk2SelectFieldPropertyBase
       
    40     {
       
    41     public: // Construction and destruction
       
    42 
       
    43         /**
       
    44          * Creates a new instance of this class.
       
    45          *
       
    46          * @param aSelector         Externalized field type selector buffer.
       
    47          * @param aContactStore     Selected saving store.
       
    48          * @param aStoreProperties  Store properties
       
    49          * @param aContactManager   Virtual Phonebook contact manager.
       
    50          * @return  A new instance of this class.
       
    51          */
       
    52         static CPbk2AssignCreateNewProperty* NewL(
       
    53                 HBufC8& aSelector,
       
    54                 MVPbkContactStore*& aContactStore,
       
    55                 const CPbk2StorePropertyArray& aStoreProperties,
       
    56                 CVPbkContactManager& aContactManager );
       
    57 
       
    58         /**
       
    59          * Destructor.
       
    60          */
       
    61         ~CPbk2AssignCreateNewProperty();
       
    62 
       
    63     public: // From MPbk2AssignSelectFieldProperty
       
    64         void PrepareL();
       
    65         TInt ExecuteL();
       
    66         TInt SelectedFieldIndex() const;
       
    67 
       
    68     private: // Implementation
       
    69         CPbk2AssignCreateNewProperty(
       
    70                 HBufC8& aSelector,
       
    71                 TInt aResourceId,
       
    72                 MVPbkContactStore*& aContactStore,
       
    73                 const CPbk2StorePropertyArray& aStoreProperties,
       
    74                 CVPbkContactManager& aContactManager );
       
    75         void ConstructL();
       
    76 
       
    77     private: // Data
       
    78         /// Ref: Saving store
       
    79         MVPbkContactStore*& iContactStore;
       
    80         /// Ref: Phonebook store properties
       
    81         const CPbk2StorePropertyArray& iStoreProperties;
       
    82         /// Ref: Virtual Phonebook contact manager
       
    83         CVPbkContactManager& iContactManager;
       
    84     };
       
    85 
       
    86 #endif // CPBK2ASSIGNCREATENEWPROPERTY_H
       
    87 
       
    88 // End of File