当前位置: 首页>>代码示例>>C++>>正文


C++ CCalEntry::SetReplicationStatusL方法代码示例

本文整理汇总了C++中CCalEntry::SetReplicationStatusL方法的典型用法代码示例。如果您正苦于以下问题:C++ CCalEntry::SetReplicationStatusL方法的具体用法?C++ CCalEntry::SetReplicationStatusL怎么用?C++ CCalEntry::SetReplicationStatusL使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CCalEntry的用法示例。


在下文中一共展示了CCalEntry::SetReplicationStatusL方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: AddDefaultValuesToEntryL

// -----------------------------------------------------------------------------
// CPIMAgnToDoAdapter::AddDefaultValuesToEntryL
// (other items were commented in a header)
// -----------------------------------------------------------------------------
//
void CPIMAgnToDoAdapter::AddDefaultValuesToEntryL(const MPIMItemData& aData,
        CCalEntry& aEntry) const
{
    JELOG2(EPim);
    // Calendar creates medium priority ToDos by default
    if (!aData.CountValues(EPIMToDoPriority))
    {
        aEntry.SetPriorityL(EPIMToDoNativePriorityMedium);
    }
    // Calendar uses private synchronization by default
    if (!aData.CountValues(EPIMToDoClass))
    {
        aEntry.SetReplicationStatusL(CCalEntry::EPrivate);
    }
    // Calendar does not support timed ToDo so the time is set to 00:00 o'clock
    if (!aData.CountValues(EPIMToDoDue))
    {
        TTime thisTime;
        thisTime.HomeTime();
        // Set time to calendar specific due time. Currently this is the start
        // of the date. Note that No conversion needed since time is local
        TCalTime calThisTime;
        // Set time as local time since acquired above as local time
        calThisTime.SetTimeLocalL(StartOfDay(thisTime));
        aEntry.SetStartAndEndTimeL(calThisTime, calThisTime);
    }
    if (!aData.CountValues(EPIMToDoCompletionDate) && !aData.CountValues(
                EPIMToDoCompleted))
    {
        aEntry.SetCompletedL(EFalse, aEntry.CompletedTimeL());
    }

}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:38,代码来源:cpimagntodoadapter.cpp

示例2: AddDefaultValuesToEntryL

// -----------------------------------------------------------------------------
// CPIMAgnEventAdapter::AddDefaultValuesToEntryL
// -----------------------------------------------------------------------------
//
void CPIMAgnEventAdapter::AddDefaultValuesToEntryL(const MPIMEventItem& aItem,
        CCalEntry& aEntry) const
{
    JELOG2(EPim);
    const MPIMItemData& data = aItem.ItemData();
    // Default calendar synchronisation is private
    if (data.CountValues(EPIMEventClass) == 0)
    {
        aEntry.SetReplicationStatusL(CCalEntry::EPrivate);
    }
}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:15,代码来源:cpimagneventadapter.cpp

示例3: ConvertClassToAgnL

// -----------------------------------------------------------------------------
// CPIMAgnEventAdapter::ConvertClassToAgnL
// Makes conversion from framework PIM item class to native entry class.
// -----------------------------------------------------------------------------
//
void CPIMAgnEventAdapter::ConvertClassToAgnL(const MPIMEventItem& aItem,
        CCalEntry& aEntry)
{
    JELOG2(EPim);
    CCalEntry::TReplicationStatus replicationStatus = CCalEntry::EPrivate;

    // There should and MUST be only one value in the
    // class field so get the value from the first index
    const TPIMFieldData& fieldData = aItem.ItemData().ValueL(EPIMEventClass, 0);
    TInt eClassValue = fieldData.IntegerValue();

    // Map pim class value to calendar entry value
    switch (eClassValue)
    {
    case EPIMEventClassPrivate:
    {
        replicationStatus = CCalEntry::EPrivate;
        break;
    }
    case EPIMEventClassConfidential:
    {
        replicationStatus = CCalEntry::ERestricted;
        break;
    }
    case EPIMEventClassPublic:
    {
        replicationStatus = CCalEntry::EOpen;
        break;
    }
    default:
    {
        User::Leave(KErrArgument);
        break;
    }
    }
    aEntry.SetReplicationStatusL(replicationStatus);
}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:42,代码来源:cpimagneventadapter.cpp

示例4: ConvertIntToAgnL

// -----------------------------------------------------------------------------
// CPIMAgnToDoAdapter::ConvertIntToAgnL
// Makes int conversion from framework PIM item data field to To-do item field.
// -----------------------------------------------------------------------------
//
void CPIMAgnToDoAdapter::ConvertIntToAgnL(TPIMToDoField aField, // Int field to be converted
        TInt aIndex, // Index of the date field
        CCalEntry& aEntry, // The Agenda model entry typecasted to a Todo item
        const MPIMItemData& aItemData) // The PIM item to read the field from
{
    JELOG2(EPim);
    const TPIMFieldData fieldData = aItemData.ValueL(aField, aIndex);
    switch (aField)
    {
    case EPIMToDoPriority:
    {
        TInt intField = fieldData.IntegerValue();

        if ((EPIMToDoPriorityHigh <= intField) && (intField
                < EPIMToDoPriorityMedium))
        {
            aEntry.SetPriorityL(EPIMToDoNativePriorityHigh);
        }
        else if ((EPIMToDoPriorityMedium <= intField) && (intField
                 < EPIMToDoPriorityLow))
        {
            aEntry.SetPriorityL(EPIMToDoNativePriorityMedium);
        }
        else if ((EPIMToDoPriorityLow <= intField) && (intField
                 <= EPIMToDoPriorityMaxValue))
        {
            aEntry.SetPriorityL(EPIMToDoNativePriorityLow);
        }
        else
        {
            // From requirement specification: Imported to-do items with
            // priority set to zero must be mapped to the native priority
            // value Medium.
            aEntry.SetPriorityL(EPIMToDoNativePriorityMedium);
        }
        break;
    }
    case EPIMToDoClass:
    {
        CCalEntry::TReplicationStatus replicationStatus = CCalEntry::EPrivate;

        // Single value assumed
        TInt classValue = fieldData.IntegerValue();

        switch (classValue)
        {
        case EPIMToDoClassPrivate:
        {
            replicationStatus = CCalEntry::EPrivate;
            break;
        }
        case EPIMToDoClassConfidential:
        {
            replicationStatus = CCalEntry::ERestricted;
            break;
        }
        case EPIMToDoClassPublic:
        {
            replicationStatus = CCalEntry::EOpen;
            break;
        }
        default:
        {
            User::Leave(KErrArgument);
            break;
        }
        }
        aEntry.SetReplicationStatusL(replicationStatus);
        break;
    }
    case EPIMToDoExtAlarm:
    {
        CCalAlarm* agnAlarm = CCalAlarm::NewL();
        CleanupStack::PushL(agnAlarm);
        agnAlarm->SetTimeOffset(AlarmOffsetL(aItemData, aEntry));
        aEntry.SetAlarmL(agnAlarm);
        CleanupStack::PopAndDestroy(agnAlarm);
        break;
    }
    default:
    {
        // Should not happen
        __ASSERT_DEBUG(EFalse, User::Invariant());
    }
    }
}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:91,代码来源:cpimagntodoadapter.cpp


注:本文中的CCalEntry::SetReplicationStatusL方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。