|
1 /* |
|
2 * Copyright (c) 2008 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: Field property array for service details view field types. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CVIMPSTFIELDPROPERTYARRAY_H |
|
20 #define CVIMPSTFIELDPROPERTYARRAY_H |
|
21 |
|
22 // INCLUDE FILES |
|
23 #include <e32base.h> |
|
24 #include "cvimpstdetailscontacthandler.h" |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class TResourceReader; |
|
28 class MVPbkFieldTypeList; |
|
29 class CVIMPSTFieldProperty; |
|
30 class MVPbkStoreContact; |
|
31 // CLASS DECLARATION |
|
32 |
|
33 /** |
|
34 * Field property array for service details view field types. |
|
35 * part of vimpstdetailsviewplugin.dll |
|
36 * @since s60 v5.0 |
|
37 */ |
|
38 class CVIMPSTFieldPropertyArray : public CBase |
|
39 { |
|
40 public: // Construction and destruction |
|
41 |
|
42 /** |
|
43 * Creates a new instance of this class. |
|
44 * |
|
45 * @param aSupportedFieldTypeList , A list of field types. |
|
46 * If this is the master fieldtype |
|
47 * list then all the properties |
|
48 * are loaded, otherwise only those |
|
49 * properties that have the field |
|
50 * type in the list are loaded. |
|
51 * @param aContact , store contact |
|
52 * @param aReader, resource reader reference |
|
53 * @aParam aPresenceSupported, check for presence supported or not |
|
54 * @return A new instance of this class. |
|
55 * @since s60 v5.0 |
|
56 */ |
|
57 static CVIMPSTFieldPropertyArray* NewL( |
|
58 const MVPbkFieldTypeList& aSupportedFieldTypeList,MVPbkStoreContact& aContact, |
|
59 TResourceReader& aReader , |
|
60 TBool aPresenceSupported , |
|
61 TDesC& aServiceName, TStoreType aStoreType); |
|
62 |
|
63 |
|
64 /** |
|
65 * Destructor. |
|
66 * @since s60 v5.0 |
|
67 */ |
|
68 ~CVIMPSTFieldPropertyArray(); |
|
69 |
|
70 public: |
|
71 |
|
72 /** |
|
73 * @return the field count. |
|
74 * @since s60 v5.0 |
|
75 */ |
|
76 TInt Count() const; |
|
77 |
|
78 /** |
|
79 * @param aIndex , index of field |
|
80 * @return the field located at aIndex . |
|
81 * @since s60 v5.0 |
|
82 */ |
|
83 CVIMPSTFieldProperty& At(TInt aIndex ) const; |
|
84 |
|
85 /** |
|
86 * @param aFieldId , index of field |
|
87 * @return the field find field by id |
|
88 * @since s60 v5.0 |
|
89 */ |
|
90 CVIMPSTFieldProperty* GetFieldById( TInt aFieldId ) ; |
|
91 |
|
92 |
|
93 private: // Implementation |
|
94 |
|
95 /** |
|
96 * @param aFieldId , index of field |
|
97 * @return the field find field by id |
|
98 * @since s60 v5.0 |
|
99 */ |
|
100 CVIMPSTFieldPropertyArray(MVPbkStoreContact& aContact ); |
|
101 |
|
102 /** |
|
103 * provide two phase contructions |
|
104 * @param aSupportedFieldTypeList , A list of field types. |
|
105 * If this is the master fieldtype |
|
106 * list then all the properties |
|
107 * are loaded, otherwise only those |
|
108 * properties that have the field |
|
109 * type in the list are loaded. |
|
110 * @param aReader, resource reader reference |
|
111 * @aParam aPresenceSupported, check for presence supported or not |
|
112 * @since s60 v5.0 |
|
113 */ |
|
114 void ConstructL( |
|
115 const MVPbkFieldTypeList& aSupportedFieldTypeList, |
|
116 TResourceReader& aReader, |
|
117 TBool aPresenceSupported, |
|
118 TDesC& aServiceName, TStoreType aStoreType); |
|
119 |
|
120 /** |
|
121 * helper function to read the feld from resource |
|
122 * @param aSupportedFieldTypeList , A list of field types. |
|
123 * If this is the master fieldtype |
|
124 * list then all the properties |
|
125 * are loaded, otherwise only those |
|
126 * properties that have the field |
|
127 * type in the list are loaded. |
|
128 * @param aReader, resource reader reference |
|
129 * @aParam aPresenceSupported, check for presence supported or not |
|
130 * @since s60 v5.0 |
|
131 */ |
|
132 void ReadFieldPropertiesL( TResourceReader& aReader, |
|
133 const MVPbkFieldTypeList& aSupportedFieldTypeList, |
|
134 TBool aPresenceSupported, |
|
135 TDesC& aServiceName, TStoreType aStoreType); |
|
136 |
|
137 private: // Data |
|
138 /// Own: Field properties |
|
139 RPointerArray<CVIMPSTFieldProperty> iFieldProperties; |
|
140 |
|
141 // Not Owns : reference to StoreContact |
|
142 MVPbkStoreContact& iContact; |
|
143 |
|
144 }; |
|
145 |
|
146 #endif // CVIMPSTFIELDPROPERTYARRAY_H |
|
147 |
|
148 // End of File |