phonebookengines/VirtualPhonebook/inc/CVPbkContactFieldCollection.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:  Virtual Phonebook contact field collection.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CVPBKCONTACTFIELDCOLLECTION_H
       
    20 #define CVPBKCONTACTFIELDCOLLECTION_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <MVPbkStoreContactFieldCollection.h>
       
    24 
       
    25 class MVPbkStoreContactField;
       
    26 class MVPbkStoreContact;
       
    27 class TVPbkContactFieldIterator;
       
    28 
       
    29 /**
       
    30  * Virtual Phonebook contact field collection.
       
    31  */
       
    32 class CVPbkContactFieldCollection : public CBase,
       
    33         public MVPbkStoreContactFieldCollection
       
    34     {
       
    35     public: // Construction
       
    36         IMPORT_C static CVPbkContactFieldCollection* NewLC(MVPbkStoreContact& aParentContact);
       
    37         ~CVPbkContactFieldCollection();
       
    38 
       
    39     public: // Interface
       
    40         IMPORT_C void AppendL(MVPbkStoreContactField* aField);
       
    41 
       
    42     public: // From MVPbkStoreContactFieldCollection
       
    43         MVPbkBaseContact& ParentContact() const;
       
    44         MVPbkStoreContactField& FieldAt(TInt aIndex);
       
    45         TInt FieldCount() const;
       
    46         const MVPbkStoreContactField& FieldAt(TInt aIndex) const;
       
    47         MVPbkStoreContactField* FieldAtLC(TInt aIndex) const;
       
    48         MVPbkStoreContact& ParentStoreContact() const;
       
    49         MVPbkStoreContactField* RetrieveField(
       
    50             const MVPbkContactLink& aContactLink) const;
       
    51 
       
    52     private:
       
    53         CVPbkContactFieldCollection(MVPbkStoreContact& aParentContact);
       
    54         
       
    55     private: // Data
       
    56         // Not owned: Contact which fields are accessed through this interface
       
    57         MVPbkStoreContact& iParentContact;
       
    58         // Owned: Array of fields
       
    59         RPointerArray<MVPbkStoreContactField> iFields;
       
    60     };
       
    61 
       
    62 #endif // CVPBKCONTACTFIELDCOLLECTION_H
       
    63 // End of file