phonebookui/Phonebook2/inc/CPbk2StoreSpecificFieldPropertyArray.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 store specific field property array.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPBK2STORESPECIFICFIELDPROPERTYARRAY_H
       
    20 #define CPBK2STORESPECIFICFIELDPROPERTYARRAY_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32base.h>
       
    24 #include <MPbk2FieldPropertyArray.h>
       
    25 #include <MPbk2FieldPropertyArray2.h>
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CPbk2StorePropertyArray;
       
    29 class MVPbkContactStore;
       
    30 class TVPbkContactStoreUriPtr;
       
    31 class MVPbkFieldTypeList;
       
    32 
       
    33 // CLASS DECLARATION
       
    34 
       
    35 /**
       
    36  * Phonebook 2 store specific field property array.
       
    37  * Overloads properties with store specific ones.
       
    38  */
       
    39 class CPbk2StoreSpecificFieldPropertyArray : public CBase,
       
    40                                              public MPbk2FieldPropertyArray,
       
    41                                              public MPbk2FieldPropertyArray2
       
    42     {
       
    43     public: // Constructors and destructor
       
    44 
       
    45         /**
       
    46          * Creates a new instance of this class.
       
    47          *
       
    48          * @param aFieldProperties  The base properties that are
       
    49          *                          overwritten by store specific properties.
       
    50          * @param aStoreProperties  Store properties for getting store
       
    51          *                          property and field property information.
       
    52          * @param aFieldTypes       The field types that are used to
       
    53          *                          build the properties.
       
    54          * @param aStore            The store whose properties are build.
       
    55          * @return  A new instance of this class.
       
    56          */
       
    57         IMPORT_C static CPbk2StoreSpecificFieldPropertyArray* NewL(
       
    58                 MPbk2FieldPropertyArray& aFieldProperties,
       
    59                 CPbk2StorePropertyArray& aStoreProperties,
       
    60                 const MVPbkFieldTypeList& aFieldTypes,
       
    61                 MVPbkContactStore& aStore );
       
    62 
       
    63         /**
       
    64          * Destructor.
       
    65          */
       
    66         virtual ~CPbk2StoreSpecificFieldPropertyArray();
       
    67 
       
    68     public: // From MPbk2FieldPropertyArray
       
    69         const MPbk2FieldProperty* FindProperty(
       
    70                 const MVPbkFieldType& aFieldType ) const;
       
    71         TInt Count() const;
       
    72         const MPbk2FieldProperty& At(
       
    73                 TInt aIndex ) const;
       
    74         TAny* FieldPropertyArrayExtension( TUid aExtensionUid );
       
    75     
       
    76     public: // From MPbk2FieldPropertyArray2            
       
    77        const MPbk2FieldProperty* FindProperty(
       
    78                     const MVPbkFieldType& aFieldType,
       
    79                     const TDesC& aName ) const;
       
    80 
       
    81     private: // Implementation
       
    82         CPbk2StoreSpecificFieldPropertyArray(
       
    83                 MPbk2FieldPropertyArray& aFieldProperties );
       
    84         void ConstructL(
       
    85                 CPbk2StorePropertyArray& aStoreProperties,
       
    86                 const MVPbkFieldTypeList& aFieldTypes,
       
    87                 const TVPbkContactStoreUriPtr& aStoreUri );
       
    88 
       
    89     private: // Data
       
    90         /// Ref: Base field properties
       
    91         MPbk2FieldPropertyArray& iFieldProperties;
       
    92         /// Own: Store specific field properties
       
    93         MPbk2FieldPropertyArray* iSpecificFieldProperties;
       
    94     };
       
    95 
       
    96 #endif // CPBK2STORESPECIFICFIELDPROPERTYARRAY_H
       
    97 
       
    98 // End of File