本文整理汇总了C++中TMsvEntry::SetScheduled方法的典型用法代码示例。如果您正苦于以下问题:C++ TMsvEntry::SetScheduled方法的具体用法?C++ TMsvEntry::SetScheduled怎么用?C++ TMsvEntry::SetScheduled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TMsvEntry
的用法示例。
在下文中一共展示了TMsvEntry::SetScheduled方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdateEntryAfterSchedule
/**
Utility function that updates message index entry fields to reflect
the message's scheduling.
@param aRef
Scheduler item.
@param aInfo
Scheduler task information.
@param aTime
Schedule start time.
@param aFinalState
Sending state flag.
@param aEntry
On return, updated index entry.
@param aData
On return, populated messaging scheduling data.
*/
EXPORT_C void CMsvScheduleSend::UpdateEntryAfterSchedule(const TSchedulerItemRef& aRef, const TTaskInfo& aInfo, const TTime& aTime, TInt aFinalState, TMsvEntry& aEntry, TMsvEntryScheduleData& aData)
{
aEntry.SetScheduled(ETrue);
aEntry.SetFailed(EFalse);
aEntry.SetSendingState(aFinalState);
aEntry.SetConnected(EFalse);
aEntry.iDate = aTime;
aData.iRef = aRef;
aData.iTaskId = aInfo.iTaskId;
}
示例2: PopulateMessageL
/*
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
*/
void CSMSSender::PopulateMessageL(TMsvEntry& aMsvEntry,TDes& aDescription,TDes& aDetails)
{
ASSERT(iMtm);
// We get the message body from Mtm and insert a bodytext
CRichText& mtmBody = iMtm->Body();
mtmBody.Reset();
mtmBody.InsertL(0, iMessage); // insert our msg tag as the body text
if(iDescription)
{
if(iDescription->Des().Length() > 30)
aDescription.Copy(iDescription->Des().Left(30));
else
aDescription.Copy(iDescription->Des());
}
else
{
if(iMessage.Length() > 30)
aDescription.Copy(iMessage.Left(30));
else
aDescription.Copy(iMessage);
}
if(iDetails)
{
if(iDetails->Des().Length() > 30)
aDetails.Copy(iDetails->Des().Left(30));
else
aDetails.Copy(iDetails->Des());
}
else
{
if(iRecipients.Length() > 30)
aDetails.Copy(iRecipients.Left(30));
else
aDetails.Copy(iRecipients);
}
aMsvEntry.SetInPreparation(EFalse);
aMsvEntry.SetScheduled(EFalse);
aMsvEntry.iDate.UniversalTime();
aMsvEntry.SetSendingState(KMsvSendStateWaiting);
}
示例3: CheckScheduleL
/**
Verifies that the schedule information stored in specified messages is the
same as that on the task scheduler.
@param aSelection
Array of message IDs that need to be checked against the task scheduler.
@panic ScheduleSend-DLL 0
The array of message IDs is empty.
Debug build only.
*/
EXPORT_C void CMsvScheduleSend::CheckScheduleL(const CMsvEntrySelection& aSelection)
{
__ASSERT_DEBUG(aSelection.Count(), gPanic(EMessageSelectionEmpty));
GetMessagesL(aSelection); //Leaves with KErrNotFound if there are no messages returned in iSchEntries
TInt entryCount = iSchEntries->Count();
SCHSENDLOG(FLog(_L8("Asked to check schedule for %d msgs"), entryCount));
ConnectAndRegisterL();
while (entryCount--)
{
TBool found = EFalse;
TTsTime schTime;
CMsvScheduledEntry& sEntry = *iSchEntries->At(entryCount);
if (!sEntry.iData.IsReset())
{
TSchedulerItemRef ref;
TInt size = 0;
TTaskInfo info;
TInt err = iScheduler.GetTaskDataSize(sEntry.iData.iTaskId, size);
if (!err)
{
HBufC* buf = HBufC::NewLC(size);
TPtr ptr = buf->Des();
User::LeaveIfError(iScheduler.GetTaskInfoL(sEntry.iData.iTaskId, info, ptr, ref, schTime));
CleanupStack::PopAndDestroy(buf);
found = ETrue;
}
else if (err != KErrNotFound)
{
User::Leave(err);
}
}
if (iServerEntry.SetEntry(sEntry.Id()) == KErrNone)
{
TMsvEntry entry = iServerEntry.Entry();
TInt sendingState = entry.SendingState();
if (sendingState == KMsvSendStateScheduled || sendingState == KMsvSendStateResend || entry.Scheduled())
{
if (found)
{
entry.SetScheduled(ETrue);
entry.iDate = schTime.GetUtcTime();
User::LeaveIfError(iServerEntry.ChangeEntry(entry));
}
else
{
entry.SetScheduled(EFalse);
entry.SetSendingState(KMsvSendStateUnknown);
entry.iDate.UniversalTime();
User::LeaveIfError(iServerEntry.ChangeEntry(entry));
SendingCompleteL(sEntry, EFalse);
}
}
}
}
}