phonebookengines/contactsmodel/cntplsql/src/cntpplviewsession.cpp
branchRCL_3
changeset 23 5586b4d2ec3e
parent 0 e686773b3f54
child 26 0d28c1c5b6dd
equal deleted inserted replaced
21:b3431bff8c19 23:5586b4d2ec3e
   689 	return iViewId;
   689 	return iViewId;
   690 	}
   690 	}
   691 
   691 
   692 
   692 
   693 TBool CCntPplViewSession::ContactCorrectType(TUid aContactTypeUid, TContactViewPreferences aTypeToInclude)
   693 TBool CCntPplViewSession::ContactCorrectType(TUid aContactTypeUid, TContactViewPreferences aTypeToInclude)
   694 	{
   694     {
   695 	TBool correctType(EFalse);
   695     TBool correctType = EFalse;
   696 	if (aContactTypeUid==KUidContactCard || aContactTypeUid==KUidContactOwnCard)
   696 
   697 		{
   697     if (aContactTypeUid == KUidContactCard)
   698 		// Ignore Unsorted Contacts flags & White Space flag
   698         {
   699 		// catch non- contact views
   699         if (!(aTypeToInclude & (EGroupsOnly | EICCEntriesOnly)))
   700 		// Should be EContactsOnly, EContactAndGroups & EICCEntriesAndContacts
   700             {
   701 		if (0 == ((aTypeToInclude & ~(ESingleWhiteSpaceIsEmptyField | EIgnoreUnSorted | EUnSortedAtBeginning | EUnSortedAtEnd))
   701             correctType = ETrue;
   702 				& (EGroupsOnly | EICCEntriesOnly))) // Ignore 'UnSorted' flags, exclude Groups Only & ICC Only 
   702             }
   703 			{
   703         }
   704 			correctType = ETrue;
   704     else if (aContactTypeUid == KUidContactOwnCard)
   705 			}
   705         {
   706 		}
   706         if (!(aTypeToInclude & (EGroupsOnly | EICCEntriesOnly | EContactCardsOnly)))
   707 	else if (aContactTypeUid == KUidContactGroup)
   707             {
   708 		{
   708             correctType = ETrue;
   709 		if (aTypeToInclude & (EGroupsOnly | EContactAndGroups))
   709             }
   710 			{
   710         }
   711 			correctType = ETrue;
   711     else if (aContactTypeUid == KUidContactGroup)
   712 			}
   712         {
   713 		}
   713         if (aTypeToInclude & (EGroupsOnly | EContactAndGroups))
   714 	else if (aContactTypeUid == KUidContactICCEntry)
   714             {
   715 		{
   715             correctType = ETrue;
   716 		if (aTypeToInclude & (EICCEntriesOnly | EICCEntriesAndContacts))
   716             }
   717 			{
   717         }
   718 			correctType = ETrue;
   718     else if (aContactTypeUid == KUidContactICCEntry)
   719 			}
   719         {
   720 		}
   720         if (aTypeToInclude & (EICCEntriesOnly | EICCEntriesAndContacts))
   721 	return correctType;
   721             {
   722 	}
   722             correctType = ETrue;
   723 
   723             }
   724 	
   724         }
       
   725 
       
   726     return correctType;
       
   727     }
       
   728 
       
   729