314 __ASSERT_DEBUG(EFalse, Panic(EGetStoreContactIndex_PostCond)); |
314 __ASSERT_DEBUG(EFalse, Panic(EGetStoreContactIndex_PostCond)); |
315 return KErrNotFound; |
315 return KErrNotFound; |
316 } |
316 } |
317 |
317 |
318 // -------------------------------------------------------------------------- |
318 // -------------------------------------------------------------------------- |
|
319 // CPbk2PresentationContactFieldCollection::FieldIndexOfStoreField |
|
320 // -------------------------------------------------------------------------- |
|
321 // |
|
322 EXPORT_C TInt CPbk2PresentationContactFieldCollection::FieldIndexOfStoreField( |
|
323 TInt aStoreFieldIndex) const |
|
324 { |
|
325 __ASSERT_DEBUG(aStoreFieldIndex >= 0 && |
|
326 aStoreFieldIndex < iFieldCollection.FieldCount(), |
|
327 Panic(EGetStoreContactIndex_PreCond)); |
|
328 |
|
329 const TInt count = iFields.Count(); |
|
330 const MVPbkStoreContactField& collectionField = iFieldCollection.FieldAt( aStoreFieldIndex ); |
|
331 for (TInt i = 0; i < count; ++i) |
|
332 { |
|
333 MVPbkStoreContactField& field = iFields[i]->StoreField(); |
|
334 if ( field.IsSame( collectionField ) ) |
|
335 { |
|
336 return i; |
|
337 } |
|
338 } |
|
339 __ASSERT_DEBUG(EFalse, Panic(EGetStoreContactIndex_PostCond)); |
|
340 return KErrNotFound; |
|
341 } |
|
342 |
|
343 |
|
344 // -------------------------------------------------------------------------- |
319 // CPbk2PresentationContactFieldCollection::ParentContact |
345 // CPbk2PresentationContactFieldCollection::ParentContact |
320 // -------------------------------------------------------------------------- |
346 // -------------------------------------------------------------------------- |
321 // |
347 // |
322 MVPbkBaseContact& |
348 MVPbkBaseContact& |
323 CPbk2PresentationContactFieldCollection::ParentContact() const |
349 CPbk2PresentationContactFieldCollection::ParentContact() const |