本文整理汇总了C++中CContactItem::TemplateRefId方法的典型用法代码示例。如果您正苦于以下问题:C++ CContactItem::TemplateRefId方法的具体用法?C++ CContactItem::TemplateRefId怎么用?C++ CContactItem::TemplateRefId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CContactItem
的用法示例。
在下文中一共展示了CContactItem::TemplateRefId方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: pure
/**
Merging pure (minimal) contact with the template should be out of scope of the
Persistence Layer. The only reason to have this functions in the test interface
is that CContactItem::RestoreTemplateFieldsL() is not exported.
*/
void CLplTester::MergeContactWithTemplateL(CContactItem& aContact, const CContactItem& aTempl, const CContactItemViewDef& aView) const
{
if (aContact.TemplateRefId()!=KNullContactId && aContact.Type() != KUidContactCardTemplate)
{
aContact.RestoreTemplateFieldsL(iProps.SystemTemplateL().CardFields(), aTempl.CardFields(), aView);
}
}
示例2: Compare
TBool CPackagerCntComparator::Compare(const CContactItem& anItem1, const CContactItem& anItem2) const
/** Compares two CContactItem items.
@param anItem1 The first CContactItem to be compared.
@param anItem2 The second CContactItem to be compared.
@return ETrue if the two items are equal, EFalse otherwise. */
{
return (DoCompareCContactItemType(anItem1, anItem2) &
DoCompareCContactItemFieldSet(anItem1.CardFields(), anItem2.CardFields()) &
DoCompareCContactItemAttribute(anItem1, anItem2) &
DoCompareTContactItemId(anItem1.Id(), anItem2.Id()) &
DoCompareTContactItemId(anItem1.TemplateRefId(), anItem2.TemplateRefId()) &
DoCompareTTime(anItem1.LastModified(), anItem2.LastModified()) &
DoCompareTTime(anItem1.iCreationDate, anItem2.iCreationDate) &
DoCompareTInt(anItem1.AccessCount(), anItem2.AccessCount()) &
DoCompareTPtrC(const_cast<CContactItem&>(anItem1).Guid(), const_cast<CContactItem&>(anItem2).Guid()));
}
示例3: CheckTemplateL
/**
* Verify that the template was correctly added
* @param aTemplate CContactCardTemplate template item
*/
void CheckTemplateL(CContactItem& aTemplate)
{
test(aTemplate.Type() == KUidContactCardTemplate);
test(aTemplate.TemplateRefId() == KNullContactId);
test(static_cast<CContactCardTemplate&>(aTemplate).GetTemplateLabelL() == KTemplateName);
CContactItemFieldSet& fieldset = aTemplate.CardFields();
TInt pos = fieldset.Find(KUidContactFieldTemplateLabel);
test(pos!=KErrNotFound);
TInt count = fieldset.Count();
test(count==5); //label, name, number, ICC slot, phonebook
}