|
1 /* |
|
2 * Copyright (c) 2004-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 base interface for contact field collections. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MVPBKBASECONTACTFIELDCOLLECTION_H |
|
20 #define MVPBKBASECONTACTFIELDCOLLECTION_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32cmn.h> |
|
24 #include <e32def.h> |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class MVPbkBaseContact; |
|
28 class MVPbkBaseContactField; |
|
29 class MVPbkFieldType; |
|
30 |
|
31 // CLASS DECLARATIONS |
|
32 |
|
33 /** |
|
34 * Virtual Phonebook base contact field collection interface. |
|
35 * An abstract collection of read-only Virtual Phonebook contact fields. |
|
36 */ |
|
37 class MVPbkBaseContactFieldCollection |
|
38 { |
|
39 public: // Destructor |
|
40 /** |
|
41 * Destructor. |
|
42 */ |
|
43 virtual ~MVPbkBaseContactFieldCollection() { } |
|
44 |
|
45 public: // Interface |
|
46 /** |
|
47 * Returns the parent contact of this field set. |
|
48 * @return The parent contact of this field set. |
|
49 */ |
|
50 virtual MVPbkBaseContact& ParentContact() const =0; |
|
51 |
|
52 /** |
|
53 * Returns the number of fields in this collection. |
|
54 * @return The number of fields in this collection. |
|
55 */ |
|
56 virtual TInt FieldCount() const =0; |
|
57 |
|
58 /** |
|
59 * Returns a read-only field in this collection. |
|
60 * |
|
61 * @param aIndex Zero-based index of the field to return. |
|
62 * @return Reference to a field at aIndex. Reference is |
|
63 * valid until FieldAt is called again. |
|
64 * @see MVPbkBaseContactFieldCollection::ConstFieldAt |
|
65 * @precond aIndex >= 0 && aIndex < FieldCount() |
|
66 * Panic VPbkError::EInvalidFieldIndex is raised if the |
|
67 * precondition does not hold. |
|
68 */ |
|
69 virtual const MVPbkBaseContactField& FieldAt( |
|
70 TInt aIndex) const =0; |
|
71 |
|
72 /** |
|
73 * Returns an extension point for this interface or NULL. |
|
74 * @param aExtensionUid Uid of extension |
|
75 * @return Extension point or NULL |
|
76 */ |
|
77 virtual TAny* BaseContactFieldCollectionExtension( |
|
78 TUid /*aExtensionUid*/) { return NULL; } |
|
79 }; |
|
80 |
|
81 |
|
82 #endif // MVPBKBASECONTACTFIELDCOLLECTION_H |
|
83 |
|
84 //End of file |