phonebookui/Phonebook2/inc/Pbk2ContactFieldCopy.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 utility for copying fields between contacts.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef PBK2CONTACTFIELDCOPY_H
       
    20 #define PBK2CONTACTFIELDCOPY_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 
       
    25 // FORWARD DECLARATIONS
       
    26 class MPbk2ContactNameFormatter;
       
    27 class MVPbkStoreContact;
       
    28 class MVPbkStoreContactField;
       
    29 class MVPbkFieldType;
       
    30 
       
    31 // CLASS DECLARATION
       
    32 
       
    33 /**
       
    34  * Phonebook 2 utility for copying fields between contacts.
       
    35  */
       
    36 class Pbk2ContactFieldCopy
       
    37     {
       
    38     public: // Interface
       
    39 
       
    40         /**
       
    41          * Copies title fields from the source contact to the target
       
    42          * contact. The field is not copied if the contact already contains
       
    43          * a field of the same type.
       
    44          *
       
    45          * @param aSourceContact    Contact whose title is copied.
       
    46          * @param aTargetContact    Target contact.
       
    47          * @param aNameFormatter    Name formatter for title field
       
    48          *                          selection.
       
    49          */
       
    50         IMPORT_C static void CopyTitleFieldsL(
       
    51                 const MVPbkStoreContact& aSourceContact,
       
    52                 MVPbkStoreContact& aTargetContact,
       
    53                 MPbk2ContactNameFormatter& aNameFormatter );
       
    54 
       
    55         /**
       
    56          * Creates a new field to the target contact. Copies the data
       
    57          * and the label from the source contact.
       
    58          *
       
    59          * @param aSourceField      The field to copy
       
    60          * @param aType             The type of the field to create.
       
    61          * @param aTargetContact    The contact into which the new field
       
    62          *                          is added.
       
    63          */
       
    64         IMPORT_C static void CopyFieldL(
       
    65                 const MVPbkStoreContactField& aSourceField,
       
    66                 const MVPbkFieldType& aType,
       
    67                 MVPbkStoreContact& aTargetContact );
       
    68 
       
    69     private: // Disabled functions
       
    70         Pbk2ContactFieldCopy()
       
    71                 {}
       
    72     };
       
    73 
       
    74 #endif // PBK2CONTACTFIELDCOPY_H
       
    75 
       
    76 // End of File