phonebookui/Phonebook2/Presentation/src/CPbk2PresentationContactFieldCollection.cpp
branchRCL_3
changeset 6 e8e3147d53eb
parent 0 e686773b3f54
equal deleted inserted replaced
5:81f8547efd4f 6:e8e3147d53eb
   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