本文整理汇总了C++中CCalEntry::GetRRuleL方法的典型用法代码示例。如果您正苦于以下问题:C++ CCalEntry::GetRRuleL方法的具体用法?C++ CCalEntry::GetRRuleL怎么用?C++ CCalEntry::GetRRuleL使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCalEntry
的用法示例。
在下文中一共展示了CCalEntry::GetRRuleL方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ReadRepeatFromAgnL
// -----------------------------------------------------------------------------
// CPIMAgnEventAdapter::ReadRepeatFromAgnL
// Reads entry's repeat details and converts them into PIM repeat rule.
// -----------------------------------------------------------------------------
//
void CPIMAgnEventAdapter::ReadRepeatFromAgnL(MPIMEventItem& aItem,
CCalEntry& aEntry)
{
JELOG2(EPim);
MPIMRepeatRuleData* repeatRuleData = aItem.GetRepeat();
TCalRRule agnRRule;
if (aEntry.GetRRuleL(agnRRule))
{
repeatRuleData->clear();
PIMRepeatRuleConverter::ConvertSupportedRepeatToPIML(*repeatRuleData,
agnRRule);
CopyExceptionDatesToPimL(aEntry, *repeatRuleData);
// Anniv does not need to have an end date, so clear that field to be sure
if (aEntry.EntryTypeL() == CCalEntry::EAnniv)
{
repeatRuleData->ClearFieldL(EPIMRepeatRuleEnd);
}
aItem.SetRepeating(ETrue);
}
else
{
repeatRuleData->clear();
aItem.SetRepeating(EFalse);
}
}
示例2: ReadAgnToItemL
// -----------------------------------------------------------------------------
// CPIMAgnApptAdapter::ReadAgnToItemL
// Reads an Agenda Model Appointment item and converts it to framework PIM item.
// -----------------------------------------------------------------------------
//
void CPIMAgnApptAdapter::ReadAgnToItemL(MPIMEventItem& aItem, CCalEntry& aEntry)
{
JELOG2(EPim);
ReadFieldsFromAgnL(aItem, aEntry, KPIMSupportedApptFields,
KPIMSupportedApptFieldsCount);
TCalRRule tempRepeat;
if (aEntry.GetRRuleL(tempRepeat))
{
ReadRepeatFromAgnL(aItem, aEntry);
aItem.GetRepeat()->BackupRepeatL();
}
}
示例3: CreateToDoEntryL
void CBadRRule::CreateToDoEntryL()
{
RPointerArray<CCalEntry> entryarr ;
CleanupResetAndDestroyPushL(entryarr);
TInt num ;
HBufC8* guid = KGUID1().AllocLC(); // ownership of guid gets transferred
CCalEntry *entry = CCalEntry::NewL(CCalEntry::ETodo, guid, CCalEntry::EMethodNone, 0) ;
CleanupStack::Pop(guid);
CleanupStack::PushL(entry) ;
TCalTime startTime ;
TCalTime endTime ;
startTime.SetTimeUtcL(TTime(TDateTime(2006, EJanuary, 8, 10, 30, 0, 0))) ;
endTime.SetTimeUtcL(startTime.TimeUtcL() + TTimeIntervalDays(1)) ;
entry->SetStartAndEndTimeL(startTime, endTime) ;
TCalTime endTime1 ;
endTime1.SetTimeUtcL(TTime(TDateTime(2006, EJanuary, 23, 10, 5, 0, 0))) ;
TCalRRule rrule(TCalRRule::EWeekly) ;
rrule.SetDtStart(startTime);
rrule.SetUntil(endTime1);
rrule.SetInterval(1);
RArray<TDay> days;
CleanupClosePushL(days);
days.AppendL(ETuesday);
rrule.SetByDay(days);
CleanupStack::PopAndDestroy(&days);
entry->SetRRuleL(rrule) ;
// both entry and rrule start time should be aligned to the first instance
TCalRRule setRRule ;
entry->GetRRuleL(setRRule) ;
test(setRRule.DtStart().TimeUtcL() == rrule.DtStart().TimeUtcL()) ;
entryarr.AppendL(entry) ;
CleanupStack::Pop(entry);
iCalEntryView->StoreL(entryarr, num) ;
entryarr.ResetAndDestroy();
TCalTime recId;
recId.SetTimeUtcL(TTime(TDateTime(2006, EJanuary, 9, 10, 30, 0, 0))); // creating recurrence id
guid = KGUID1().AllocLC(); // ownership of guid gets transferred
entry = CCalEntry::NewL(CCalEntry::ETodo, guid, CCalEntry::EMethodNone, 0, recId, CalCommon::EThisOnly);
CleanupStack::Pop(guid);
CleanupStack::PushL(entry) ;
TCalTime startTime3 ;
TCalTime endTime3 ;
startTime3.SetTimeUtcL(TTime(TDateTime(2006, EJanuary, 7, 10, 2, 0, 0))) ;
endTime3.SetTimeUtcL(startTime3.TimeUtcL() + TTimeIntervalHours(1)) ;
entry->SetStartAndEndTimeL(startTime3, endTime3) ;
entryarr.AppendL(entry) ;
CleanupStack::Pop(entry) ;
iCalEntryView->StoreL(entryarr, num) ;
CleanupStack::PopAndDestroy(&entryarr);
RArray<TTime> insTimes ;
insTimes.Append(TTime(TDateTime(2006, EJanuary, 7, 11, 2, 0, 0))) ;
insTimes.Append(TTime(TDateTime(2006, EJanuary, 16, 10, 30, 0, 0))) ;
CleanupClosePushL(insTimes) ;
CheckInstancesL(insTimes) ;
CleanupStack::PopAndDestroy(&insTimes) ;
// time portion of repeat's end eliminates the third instance
}
示例4: CreateParentL
void CBadRRule::CreateParentL()
{
RPointerArray<CCalEntry> entryarr ;
CleanupResetAndDestroyPushL(entryarr);
TInt num ;
HBufC8* guid = KGUID().AllocLC(); // ownership of guid gets transferred
CCalEntry *entry = CCalEntry::NewL(CCalEntry::EEvent, guid, CCalEntry::EMethodNone, 0) ;
CleanupStack::Pop(guid);
CleanupStack::PushL(entry) ;
TCalTime startTime ;
TCalTime endTime ;
startTime.SetTimeUtcL(TTime(TDateTime(2006, EJanuary, 7, 10, 1, 0, 0))) ;
endTime.SetTimeUtcL(startTime.TimeUtcL() + TTimeIntervalHours(1)) ;
entry->SetStartAndEndTimeL(startTime, endTime) ;
TCalTime endTime1;
endTime1.SetTimeUtcL(TTime(TDateTime(2006, EJanuary, 23, 10, 5, 0, 0))) ;
TCalRRule rrule(TCalRRule::EWeekly) ;
rrule.SetDtStart(startTime);
rrule.SetUntil(endTime1);
rrule.SetInterval(1);
RArray<TDay> days;
CleanupClosePushL(days);
days.AppendL(ETuesday);
rrule.SetByDay(days);
CleanupStack::PopAndDestroy(&days);
entry->SetRRuleL(rrule) ;
TCalRRule setRRule ;
entry->GetRRuleL(setRRule) ;
test(setRRule.DtStart().TimeUtcL() == rrule.DtStart().TimeUtcL()) ;
entryarr.AppendL(entry) ;
CleanupStack::Pop(entry);
iCalEntryView->StoreL(entryarr, num) ;
entryarr.ResetAndDestroy() ;
iCalEntryView->FetchL(KGUID(), entryarr);
TCalRRule savedRRule ;
entryarr[0]->GetRRuleL(savedRRule) ;
TCalTime matchTime ; /* Jan 10, 2006 is the first Tuesday */
matchTime.SetTimeUtcL(TTime(TDateTime(2006, EJanuary, 9, 10, 1, 0, 0))) ;
//When the entry is stored, the repeat start time is adjusted so that it fits the rule (10th January is Tuesday
test(savedRRule.DtStart().TimeUtcL() == matchTime.TimeUtcL()) ;
test(entryarr[0]->StartTimeL().TimeUtcL() == (matchTime.TimeUtcL())) ;
CleanupStack::PopAndDestroy(&entryarr) ;
RArray<TTime> insTimes ;
insTimes.Append(TTime(TDateTime(2006, EJanuary, 9, 10, 1, 0, 0))) ;
insTimes.Append(TTime(TDateTime(2006, EJanuary, 16, 10, 1, 0, 0))) ;
insTimes.Append(TTime(TDateTime(2006, EJanuary, 23, 10, 1, 0, 0))) ;
CleanupClosePushL(insTimes) ;
CheckInstancesL(insTimes) ;
CleanupStack::PopAndDestroy(&insTimes) ;
}