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


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

本文整理汇总了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);
    }
}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:35,代码来源:cpimagneventadapter.cpp

示例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();
    }
}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:18,代码来源:cpimagnapptadapter.cpp

示例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

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

示例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) ;
}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:68,代码来源:tcal_BadRRule.cpp


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