phonebookengines/contactsmodel/cntview/LocalView.cpp
branchRCL_3
changeset 23 5586b4d2ec3e
parent 0 e686773b3f54
child 64 c1e8ba0c2b16
equal deleted inserted replaced
21:b3431bff8c19 23:5586b4d2ec3e
  1679 
  1679 
  1680 	return okayToInsert;
  1680 	return okayToInsert;
  1681 	}
  1681 	}
  1682 
  1682 
  1683 TBool CContactLocalView::ContactCorrectType(TUid aType,TContactViewPreferences aTypeToInclude)
  1683 TBool CContactLocalView::ContactCorrectType(TUid aType,TContactViewPreferences aTypeToInclude)
  1684 	{
  1684     {
  1685 	TBool correctType(EFalse);
  1685     TBool correctType = EFalse;
  1686 	if (aType==KUidContactCard || aType==KUidContactOwnCard)
  1686 
  1687 		{
  1687     if (aType == KUidContactCard)
  1688 		// Ignore Unsorted Contacts flags & White Space flag
  1688         {
  1689 		// catch non- contact views
  1689         if (!(aTypeToInclude & (EGroupsOnly | EICCEntriesOnly)))
  1690 		// Should be EContactsOnly, EContactAndGroups & EICCEntriesAndContacts
  1690             {
  1691 		if (0 == ((aTypeToInclude & ~(ESingleWhiteSpaceIsEmptyField | EIgnoreUnSorted | EUnSortedAtBeginning | EUnSortedAtEnd))
  1691             correctType = ETrue;
  1692 				& (EGroupsOnly | EICCEntriesOnly))) // Ignore 'UnSorted' flags, exclude Groups Only & ICC Only 
  1692             }
  1693 			{
  1693         }
  1694 			correctType = ETrue;
  1694     else if (aType == KUidContactOwnCard)
  1695 			}
  1695         {
  1696 		}
  1696         if (!(aTypeToInclude & (EGroupsOnly | EICCEntriesOnly | EContactCardsOnly)))
       
  1697             {
       
  1698             correctType = ETrue;
       
  1699             }
       
  1700         }
  1697 	else if (aType==KUidContactGroup)
  1701 	else if (aType==KUidContactGroup)
  1698 		{
  1702 		{
  1699 		if (aTypeToInclude & (EGroupsOnly | EContactAndGroups))
  1703         if (aTypeToInclude & (EGroupsOnly | EContactAndGroups))
  1700 			{
  1704             {
  1701 			correctType = ETrue;
  1705             correctType = ETrue;
  1702 			}
  1706             }
  1703 		}
  1707         }
  1704 	else if (aType == KUidContactICCEntry)
  1708 	else if (aType == KUidContactICCEntry)
  1705 		{
  1709         {
  1706 		if (aTypeToInclude & (EICCEntriesOnly | EICCEntriesAndContacts))
  1710         if (aTypeToInclude & (EICCEntriesOnly | EICCEntriesAndContacts))
  1707 			{
  1711             {
  1708 			correctType = ETrue;
  1712             correctType = ETrue;
  1709 			}
  1713             }
  1710 		}
  1714         }
  1711 	return correctType;
  1715 
  1712 	}
  1716     return correctType;
  1713 
  1717     }
  1714 
  1718 
  1715 void CIdleContactSorter::ContactPhbkSyncEventHandler(TPhonebookState aPhbkState)
  1719 void CIdleContactSorter::ContactPhbkSyncEventHandler(TPhonebookState aPhbkState)
  1716 	{
  1720 	{
  1717 #if defined(__VERBOSE_DEBUG__)
  1721 #if defined(__VERBOSE_DEBUG__)
  1718 	RDebug::Print(_L("[CNTMODEL] CIdleContactSorter{RequestedView = 0x%08X, SortView = 0x%08X}::ContactPhbkSyncEventHandler\r\n"),
  1722 	RDebug::Print(_L("[CNTMODEL] CIdleContactSorter{RequestedView = 0x%08X, SortView = 0x%08X}::ContactPhbkSyncEventHandler\r\n"),