2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
15 * Interface classes for accessing Phonebook contact data.
20 #ifndef __MPbkFieldData_H__
21 #define __MPbkFieldData_H__
24 #include <cntdef.h> // TStorageType
25 #include "PbkFields.hrh" // TPbkFieldId
27 // FORWARD DECLARATIONS
33 * Array of MPbkFieldData objects.
35 class MPbkFieldDataArray
38 virtual ~MPbkFieldDataArray() {}
40 public: // Abstract interface
42 * Returns the number of field data objects in this array.
43 * @return The number of field data objects in this array.
45 virtual TInt PbkFieldCount() const = 0;
48 * Returns the field data object at aIndex.
49 * @param aIndex The field to index.
50 * @return The field data object at aIndex.
52 virtual MPbkFieldData& PbkFieldAt(TInt aIndex) = 0;
55 * Returns the const field data object at aIndex.
56 * @return The const field data object at aIndex.
58 virtual const MPbkFieldData& PbkFieldAt(TInt aIndex) const = 0;
62 * Phonebook field data abstract interface. The interface is used as an
63 * abstraction to handle phonebook contact item field data access.
64 * The Phonebook contact item field abstraction TPbkContactItemField
65 * implements this interface.
73 virtual ~MPbkFieldData() {}
77 * Returns the type of this field data.
78 * @return KStrorageTypeText or KStoragetTypeDateTime.
80 virtual TStorageType PbkFieldType() const = 0;
83 * Returns the field id of this field data.
85 virtual TPbkFieldId PbkFieldId() const = 0;
88 * Returns the text value of this field data.
89 * @precond PbkFieldType()==KStrorageTypeText.
91 virtual TPtrC PbkFieldText() const = 0;
94 * Returns the Time value of this field data.
95 * @precond PbkFieldType()==KStoragetTypeDateTime.
97 virtual TTime PbkFieldTime() const = 0;
102 #endif // __MPbkFieldData_H__