本文整理汇总了C++中TMsvEntry::Failed方法的典型用法代码示例。如果您正苦于以下问题:C++ TMsvEntry::Failed方法的具体用法?C++ TMsvEntry::Failed怎么用?C++ TMsvEntry::Failed使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TMsvEntry
的用法示例。
在下文中一共展示了TMsvEntry::Failed方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetLastMessageStatusL
void CMsgImOutboxSend::SetLastMessageStatusL(const TTime& aTimeNow, TInt aCompletionReason)
{
// If its the first message && there are messages to be sent change status..
if (iTotalMessages>0)
{
iProgress.SetStatus(EMsgOutboxProgressSending);
}
// Store the file progress for the last file sent. This will be used in
// the situation where we cancel the operation to do a bearer migration
// so that the progress information is for the last file completed as
// opposed to the one we have just cancelled.
if (iSession)
{
iProgress.iSendFileProgress = iSession->FileProgress();
}
// Fill in the iServerEntry details with data from the last message
// IMCV may had left this inconsistent... so reset the iServerEntry
// explicitly....
if (iCurrentMessageNo != -1)
{
TInt err;
err = iServerEntry.SetEntry(iEntrySelection.At(iCurrentMessageNo));
__ASSERT_DEBUG( err == KErrNone, gPanic(EImsmServerError));
TMsvEntry entry = iServerEntry.Entry();
// Set date info and completion data..update the iServerEntry with this data..
entry.iDate=aTimeNow;
if(aCompletionReason!=KErrCancel)
{
entry.SetFailed(aCompletionReason != KErrNone);
entry.SetSendingState(aCompletionReason==KErrNone? KMsvSendStateSent: KMsvSendStateWaiting); //set it to send agian.
if (aCompletionReason)
entry.iError=CalculateError(aCompletionReason);
}
else
{
entry.SetFailed(EFalse);
entry.SetSendingState(KMsvSendStateSuspended);
entry.iError=KErrNone;
}
// if (aCompletionReason<=KErrNone)
// {
// ignore any +ve errors which may leak from the SMTP code
// entry.iError=aCompletionReason;
// entry.SetSendingState(aCompletionReason==KErrNone? KMsvSendStateSent: KMsvSendStateWaiting); //set it to send agian.
// }
RestoreBccRecipientsToHeaderL();
entry.SetConnected(EFalse);
err = iServerEntry.ChangeEntry(entry);
__ASSERT_DEBUG( err == KErrNone, gPanic(EImsmServerError));
UpdateSummaryInfo(aCompletionReason);
// If it went move to the "Sent" folder..
if(!entry.Failed() && aCompletionReason!=KErrCancel)
{
TMsvId id = entry.Id();
err = iServerEntry.SetEntry(KMsvSentEntryIdValue);
if(err == KErrNone)
{
err = iServerEntry.SetEntry(KMsvGlobalOutBoxIndexEntryId);
if(err == KErrNone)
{
// Move it....
err = iServerEntry.MoveEntryWithinService(id, KMsvSentEntryIdValue);
}
}
}
}
}