1 mpbkfielddata.h |
1 /* |
|
2 * Copyright (c) 2002 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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * Interface classes for accessing Phonebook contact data. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef __MPbkFieldData_H__ |
|
21 #define __MPbkFieldData_H__ |
|
22 |
|
23 // INCLUDES |
|
24 #include <cntdef.h> // TStorageType |
|
25 #include "PbkFields.hrh" // TPbkFieldId |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class MPbkFieldData; |
|
29 |
|
30 // CLASS DECLARATION |
|
31 |
|
32 /** |
|
33 * Array of MPbkFieldData objects. |
|
34 */ |
|
35 class MPbkFieldDataArray |
|
36 { |
|
37 public: // Destructor |
|
38 virtual ~MPbkFieldDataArray() {} |
|
39 |
|
40 public: // Abstract interface |
|
41 /** |
|
42 * Returns the number of field data objects in this array. |
|
43 * @return The number of field data objects in this array. |
|
44 */ |
|
45 virtual TInt PbkFieldCount() const = 0; |
|
46 |
|
47 /** |
|
48 * Returns the field data object at aIndex. |
|
49 * @param aIndex The field to index. |
|
50 * @return The field data object at aIndex. |
|
51 */ |
|
52 virtual MPbkFieldData& PbkFieldAt(TInt aIndex) = 0; |
|
53 |
|
54 /** |
|
55 * Returns the const field data object at aIndex. |
|
56 * @return The const field data object at aIndex. |
|
57 */ |
|
58 virtual const MPbkFieldData& PbkFieldAt(TInt aIndex) const = 0; |
|
59 }; |
|
60 |
|
61 /** |
|
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. |
|
66 */ |
|
67 class MPbkFieldData |
|
68 { |
|
69 public: // Destructor |
|
70 /** |
|
71 * Destructor. |
|
72 */ |
|
73 virtual ~MPbkFieldData() {} |
|
74 |
|
75 public: // Interface |
|
76 /** |
|
77 * Returns the type of this field data. |
|
78 * @return KStrorageTypeText or KStoragetTypeDateTime. |
|
79 */ |
|
80 virtual TStorageType PbkFieldType() const = 0; |
|
81 |
|
82 /** |
|
83 * Returns the field id of this field data. |
|
84 */ |
|
85 virtual TPbkFieldId PbkFieldId() const = 0; |
|
86 |
|
87 /** |
|
88 * Returns the text value of this field data. |
|
89 * @precond PbkFieldType()==KStrorageTypeText. |
|
90 */ |
|
91 virtual TPtrC PbkFieldText() const = 0; |
|
92 |
|
93 /** |
|
94 * Returns the Time value of this field data. |
|
95 * @precond PbkFieldType()==KStoragetTypeDateTime. |
|
96 */ |
|
97 virtual TTime PbkFieldTime() const = 0; |
|
98 |
|
99 }; |
|
100 |
|
101 |
|
102 #endif // __MPbkFieldData_H__ |
|
103 |
|
104 // End of File |