63 // --------------------------------------------------------------------------- |
63 // --------------------------------------------------------------------------- |
64 // CESMRViewerFieldStorage::NewL |
64 // CESMRViewerFieldStorage::NewL |
65 // --------------------------------------------------------------------------- |
65 // --------------------------------------------------------------------------- |
66 // |
66 // |
67 CESMRViewerFieldStorage* CESMRViewerFieldStorage::NewL( |
67 CESMRViewerFieldStorage* CESMRViewerFieldStorage::NewL( |
68 CESMRPolicy* aPolicy, |
68 const CESMRPolicy& aPolicy, |
69 MESMRResponseObserver* aResponseObserver, |
69 MESMRResponseObserver* aResponseObserver, |
70 TBool aResponseReady, |
70 TBool aResponseReady, |
71 MESMRFieldEventObserver& aEventObserver, |
71 MESMRFieldEventObserver& aEventObserver, |
72 TInt aReqAttendee, |
72 TInt aReqAttendee, |
73 TInt aOptAttendee ) |
73 TInt aOptAttendee ) |
86 // --------------------------------------------------------------------------- |
86 // --------------------------------------------------------------------------- |
87 // CESMRViewerFieldStorage::ConstructL |
87 // CESMRViewerFieldStorage::ConstructL |
88 // --------------------------------------------------------------------------- |
88 // --------------------------------------------------------------------------- |
89 // |
89 // |
90 void CESMRViewerFieldStorage::ConstructL( |
90 void CESMRViewerFieldStorage::ConstructL( |
91 CESMRPolicy* aPolicy, |
91 const CESMRPolicy& aPolicy, |
92 MESMRResponseObserver* aResponseObserver, |
92 MESMRResponseObserver* aResponseObserver, |
93 TBool aResponseReady, |
93 TBool aResponseReady, |
94 const TInt &aReqAttendee, |
94 const TInt &aReqAttendee, |
95 const TInt &aOptAttendee |
95 const TInt &aOptAttendee |
96 ) |
96 ) |
125 |
125 |
126 // --------------------------------------------------------------------------- |
126 // --------------------------------------------------------------------------- |
127 // CESMRViewerFieldStorage::CreatePolicyFieldsL |
127 // CESMRViewerFieldStorage::CreatePolicyFieldsL |
128 // --------------------------------------------------------------------------- |
128 // --------------------------------------------------------------------------- |
129 // |
129 // |
130 void CESMRViewerFieldStorage::CreatePolicyFieldsL(CESMRPolicy* aPolicy, |
130 void CESMRViewerFieldStorage::CreatePolicyFieldsL( |
|
131 const CESMRPolicy& aPolicy, |
131 MESMRResponseObserver* aResponseObserver, |
132 MESMRResponseObserver* aResponseObserver, |
132 TBool aResponseReady) |
133 TBool aResponseReady) |
133 { |
134 { |
134 FUNC_LOG; |
135 FUNC_LOG; |
135 CESMRField* field = NULL; |
136 CESMRField* field = NULL; |
136 |
137 |
137 RArray<TESMREntryField> fields = aPolicy->Fields(); |
138 RArray<TESMREntryField> fields = aPolicy.Fields(); |
138 const TInt count = fields.Count(); |
139 const TInt count = fields.Count(); |
139 for ( TInt i(0); i < count ; i++ ) |
140 for ( TInt i(0); i < count ; i++ ) |
140 { |
141 { |
141 field = CreateViewerFieldL( |
142 field = CreateViewerFieldL( |
142 aResponseObserver, fields[i], aResponseReady ); |
143 aResponseObserver, fields[i], aResponseReady ); |
143 |
144 |
144 TBool visible( ETrue ); |
145 TBool visible( ETrue ); |
145 |
146 |
146 switch ( fields[i].iFieldId ) |
|
147 { |
|
148 case EESMRFieldResponseArea: |
|
149 { |
|
150 if ( aResponseReady ) |
|
151 { |
|
152 visible = EFalse; |
|
153 } |
|
154 break; |
|
155 } |
|
156 case EESMRFieldResponseReadyArea: |
|
157 { |
|
158 if ( !aResponseReady ) |
|
159 { |
|
160 visible = EFalse; |
|
161 } |
|
162 break; |
|
163 } |
|
164 default: |
|
165 { |
|
166 break; |
|
167 } |
|
168 } |
|
169 |
|
170 CleanupStack::PushL( field ); |
147 CleanupStack::PushL( field ); |
171 AddFieldL( field, visible ); |
148 AddFieldL( field, visible ); |
172 CleanupStack::Pop( field ); |
149 CleanupStack::Pop( field ); |
173 } |
150 } |
174 } |
151 } |
175 |
152 |
176 // --------------------------------------------------------------------------- |
153 // --------------------------------------------------------------------------- |
177 // CESMRViewerFieldStorage::CreateTrackingFieldsL |
154 // CESMRViewerFieldStorage::CreateTrackingFieldsL |
178 // --------------------------------------------------------------------------- |
155 // --------------------------------------------------------------------------- |
179 // |
156 // |
180 void CESMRViewerFieldStorage::CreateTrackingFieldsL(CESMRPolicy* aPolicy, |
157 void CESMRViewerFieldStorage::CreateTrackingFieldsL( |
|
158 const CESMRPolicy& aPolicy, |
181 MESMRResponseObserver* aResponseObserver, |
159 MESMRResponseObserver* aResponseObserver, |
182 TBool aResponseReady, |
160 TBool aResponseReady, |
183 const TInt &aReqAttendee, |
161 const TInt &aReqAttendee, |
184 const TInt &aOptAttendee) |
162 const TInt &aOptAttendee) |
185 { |
163 { |
186 FUNC_LOG; |
164 FUNC_LOG; |
187 CESMRField* field = NULL; |
165 CESMRField* field = NULL; |
188 RArray<TESMREntryField> fields = aPolicy->Fields(); |
166 RArray<TESMREntryField> fields = aPolicy.Fields(); |
189 |
167 |
190 if (aReqAttendee > 0) |
168 if (aReqAttendee > 0) |
191 { |
169 { |
192 //create "required attendee" label |
170 //create "required attendee" label |
193 field = CreateViewerFieldL( |
171 field = CreateViewerFieldL( |