本文整理汇总了C++中CCalEntry::ReplicationStatusL方法的典型用法代码示例。如果您正苦于以下问题:C++ CCalEntry::ReplicationStatusL方法的具体用法?C++ CCalEntry::ReplicationStatusL怎么用?C++ CCalEntry::ReplicationStatusL使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCalEntry
的用法示例。
在下文中一共展示了CCalEntry::ReplicationStatusL方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ReadIntFieldsL
// -----------------------------------------------------------------------------
// CPIMAgnToDoAdapter::ReadIntFieldsL
// (other items were commented in a header)
// -----------------------------------------------------------------------------
//
void CPIMAgnToDoAdapter::ReadIntFieldsL(MPIMItemData& aData, CCalEntry& aEntry)
{
JELOG2(EPim);
// Convert synchornization field to PIM API. The default value is private
// and unrecognized priority values are mapped also to private due to
// security reasons
TPIMToDoClassValue value = EPIMToDoClassPrivate;
const CCalEntry::TReplicationStatus status = aEntry.ReplicationStatusL();
if (status == CCalEntry::EOpen)
{
// Open is mapped as public synhronization
value = EPIMToDoClassPublic;
}
else if (status == CCalEntry::ERestricted)
{
// Open is mapped as user confidential synhronization
value = EPIMToDoClassConfidential;
}
// Note that boolean and integer fields must be identified in the constructor
TPIMFieldData classData(EPIMToDoClass, EPIMFieldInt, KPIMAttrNone, value);
aData.AddValueL(classData);
// Default value is zero acording to vCalendar specification. PIM API default
// priority is medium which indicates normal native priority
// See common/pimtodo.h for platform-specific native priorities.
TUint nativePriority = aEntry.PriorityL();
TPIMToDoPriority priority = EPIMToDoPriorityMedium;
if (nativePriority == EPIMToDoNativePriorityHigh)
{
// Native priority value High is mapped to value 1
priority = EPIMToDoPriorityHigh;
}
else if (nativePriority == EPIMToDoNativePriorityLow)
{
// Native priority value Low is mapped to value 7
priority = EPIMToDoPriorityLow;
}
// Note that boolean and integer fields must be identified in the constructor
TPIMFieldData
prData(EPIMToDoPriority, EPIMFieldInt, KPIMAttrNone, priority);
aData.AddValueL(prData);
}
示例2: ReadClassFromAgnL
// -----------------------------------------------------------------------------
// CPIMAgnEventAdapter::ReadClassFromAgnL
// Reads entry's class details and converts them into PIM class.
// -----------------------------------------------------------------------------
//
void CPIMAgnEventAdapter::ReadClassFromAgnL(MPIMEventItem& aItem,
CCalEntry& aEntry)
{
JELOG2(EPim);
TPIMEventClassValue eClassValue = EPIMEventClassPrivate;
const CCalEntry::TReplicationStatus replicationStatus =
aEntry.ReplicationStatusL();
// Map calendar entry values to pim value
switch (replicationStatus)
{
case CCalEntry::EOpen:
{
eClassValue = EPIMEventClassPublic;
break;
}
case CCalEntry::EPrivate:
{
eClassValue = EPIMEventClassPrivate;
break;
}
case CCalEntry::ERestricted:
{
eClassValue = EPIMEventClassConfidential;
break;
}
default:
{
User::Leave(KErrArgument);
break;
}
}
TPIMFieldData fieldData(EPIMEventClass, EPIMFieldInt, KPIMAttrNone,
eClassValue);
// Set value for the class item
aItem.ItemData().AddValueL(fieldData);
}