本文整理汇总了C++中TMsvEntry::SetOffPeak方法的典型用法代码示例。如果您正苦于以下问题:C++ TMsvEntry::SetOffPeak方法的具体用法?C++ TMsvEntry::SetOffPeak怎么用?C++ TMsvEntry::SetOffPeak使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TMsvEntry
的用法示例。
在下文中一共展示了TMsvEntry::SetOffPeak方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CreateMessageLC
EXPORT_C TMsvId CSchSendTestUtils::CreateMessageLC(TMsvEntry& aEntry, TMsvId aDestFolder, TTime aSendTime, TBool aOffPeak)
{
//Make a TMsvEntry
iMsvEntry->SetEntryL(aDestFolder);
aEntry.iType = KUidMsvMessageEntry;
aEntry.iMtm = KSchSendTestMtmUid;
aEntry.iServiceId = KMsvLocalServiceIndexEntryId;
aEntry.iDate = aSendTime;
aEntry.SetOffPeak(aOffPeak);
//Create the entry in the server
CMsvOperationWait* wait = CMsvOperationWait::NewLC();
wait->Start();
CMsvOperation* opert = iMsvEntry->CreateL(aEntry, wait->iStatus);
CleanupStack::PushL(opert);
CActiveScheduler::Start(); // operation complete
//Find out the ID of the entry we made
TMsvLocalOperationProgress details;
TPckgC<TMsvLocalOperationProgress> package(details);
package.Set(opert->ProgressL());
if(wait->iStatus.Int()!=KErrNone)
User::Leave(wait->iStatus.Int());
if(package().iError!=KErrNone)
User::Leave(package().iError);
*(TMsvId*)&aEntry = package().iId;
TMsvId testMsvId = aEntry.Id();
CleanupStack::PopAndDestroy(2);//opert, wait
iMsvSession->CleanupEntryPushL(testMsvId);
return testMsvId;
}