phonebookui/Phonebook2/ServerApplication/inc/CPbk2AssignMultiProperty.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 multi contact assign.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef CPBK2ASSIGNMULTIPROPERTY_H
       
    21 #define CPBK2ASSIGNMULTIPROPERTY_H
       
    22 
       
    23 // INCLUDES
       
    24 #include "CPbk2SelectFieldPropertyBase.h"
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class MVPbkContactLinkArray;
       
    28 class MVPbkFieldTypeList;
       
    29 
       
    30 // CLASS DECLARATION
       
    31 
       
    32 /**
       
    33  * Phonebook 2 contact field property selector for multi contact assign.
       
    34  * Responsible for validating created add item wrappers.
       
    35  */
       
    36 class CPbk2AssignMultiProperty : public CPbk2SelectFieldPropertyBase
       
    37     {
       
    38     public: // Construction and destruction
       
    39 
       
    40         /**
       
    41          * Creates a new instance of this class.
       
    42          *
       
    43          * @param aSelector         Externalized field type selector buffer.
       
    44          * @param aMarkedEntries    Marked contacts.
       
    45          * @return  A new instance of this class.
       
    46          */
       
    47         static CPbk2AssignMultiProperty* NewL(
       
    48                 HBufC8& aSelector,
       
    49                 MVPbkContactLinkArray& aMarkedEntries );
       
    50 
       
    51         /**
       
    52          * Destructor.
       
    53          */
       
    54         ~CPbk2AssignMultiProperty();
       
    55 
       
    56     public: // From MPbk2AssignSelectFieldProperty
       
    57         void PrepareL();
       
    58         TInt ExecuteL();
       
    59         TInt SelectedFieldIndex() const;
       
    60 
       
    61     private: // Implementation
       
    62         CPbk2AssignMultiProperty(
       
    63                 HBufC8& aSelector,
       
    64                 TInt aResourceId,
       
    65                 MVPbkContactLinkArray& aMarkedEntries );
       
    66         void ConstructL();
       
    67         TBool AreAllContactsFromSameStore(
       
    68                 MVPbkContactLinkArray& aMarkedEntries );
       
    69         void CreateWrappersFromCntDbL();
       
    70 
       
    71     private: // Data
       
    72         /// Ref: Marked contacts
       
    73         MVPbkContactLinkArray& iMarkedEntries;
       
    74     };
       
    75 
       
    76 #endif // CPBK2ASSIGNMULTIPROPERTY_H
       
    77 
       
    78 // End of File