contacts_plat/virtual_phonebook_engine_api/inc/CVPbkFieldTypeRefsList.h
branchRCL_3
changeset 63 f4a778e096c2
child 64 c1e8ba0c2b16
equal deleted inserted replaced
62:5b6f26637ad3 63:f4a778e096c2
       
     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:  An list for field type references. Implements 
       
    15 *                MVPbkFieldTypeList so can be used e.g. as parameter to Find
       
    16 *                operation.
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 #ifndef CVPBKFIELDTYPEREFSLIST_H
       
    22 #define CVPBKFIELDTYPEREFSLIST_H
       
    23 
       
    24 // INCLUDES
       
    25 #include <e32base.h>
       
    26 #include <MVPbkFieldType.h>
       
    27 
       
    28 // CLASS DECLARATIONS
       
    29 
       
    30 /**
       
    31  * A collection of referenced Virtual Phonebook field types.
       
    32  */
       
    33 class CVPbkFieldTypeRefsList : public CBase, public MVPbkFieldTypeList
       
    34     {
       
    35     public:  // Constructors and destructor
       
    36         /**
       
    37          * Creates a new instance of this class.
       
    38          */
       
    39         IMPORT_C static CVPbkFieldTypeRefsList* NewL();
       
    40 
       
    41         /**
       
    42          * Destructor.
       
    43          */        
       
    44         ~CVPbkFieldTypeRefsList();
       
    45 
       
    46         /**
       
    47          * Append a referenced field type.
       
    48          *
       
    49          * @param aFieldType    Virtual Phonebook field type.
       
    50          */
       
    51         IMPORT_C void AppendL(const MVPbkFieldType& aFieldType);
       
    52 
       
    53         /**
       
    54          * Remove aFieldType from this reference list.
       
    55          *
       
    56          * @param aFieldType    The type to be removed
       
    57          */
       
    58         IMPORT_C void Remove(const MVPbkFieldType& aFieldType);
       
    59         
       
    60         /**
       
    61          * Resets the array.
       
    62          */
       
    63         IMPORT_C void Reset();
       
    64 
       
    65 
       
    66     public: // from MVPbkFieldTypeList
       
    67         TInt FieldTypeCount() const;
       
    68         const MVPbkFieldType& FieldTypeAt(TInt aIndex) const;
       
    69         TBool ContainsSame(const MVPbkFieldType& aFieldType) const;
       
    70         TInt MaxMatchPriority() const;
       
    71         const MVPbkFieldType* FindMatch
       
    72             (const TVPbkFieldVersitProperty& aMatchProperty,
       
    73             TInt aMatchPriority) const;
       
    74         const MVPbkFieldType* FindMatch
       
    75             (TVPbkNonVersitFieldType aNonVersitType) const;
       
    76         const MVPbkFieldType* Find(TInt aFieldTypeResId) const;
       
    77 
       
    78     private:  // Implementation
       
    79         CVPbkFieldTypeRefsList();
       
    80 
       
    81     private: // Data
       
    82         ///Ref: reference to virtual phonebook field types
       
    83         RPointerArray<MVPbkFieldType> iFieldTypes;
       
    84         ///Own: max match priority
       
    85         TInt iMaxMatchPriority;
       
    86     };
       
    87 
       
    88 #endif // CVPBKFIELDTYPEREFSLIST_H
       
    89 
       
    90 //End of file