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


C++ TMsvEntry::SetFailed方法代码示例

本文整理汇总了C++中TMsvEntry::SetFailed方法的典型用法代码示例。如果您正苦于以下问题:C++ TMsvEntry::SetFailed方法的具体用法?C++ TMsvEntry::SetFailed怎么用?C++ TMsvEntry::SetFailed使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TMsvEntry的用法示例。


在下文中一共展示了TMsvEntry::SetFailed方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: CleanUpOnDestructL

void CMsgImOutboxSend::CleanUpOnDestructL()
    {
	if(!iSetDisconnected)
		{
		DisconnectUnsentMessagesL();
		}

	if (iStatus.Int() != KErrNone)
		{
		if ((iCurrentMessageNo != -1) && (iCurrentMessageNo<iTotalMessages))
			{
			TInt err=iServerEntry.SetEntry(iEntrySelection.At(iCurrentMessageNo));
			if(err == KErrNotFound)
				{
				User::Leave(KErrNotFound);
				}
			__ASSERT_DEBUG(err == KErrNone, gPanic(EImsmServerError));
			TMsvEntry entry = iServerEntry.Entry();

			RestoreBccRecipientsToHeaderL();

			//	Set date info and completion data..update the iServerEntry with this data..
			TInt errorCode = (TSmtpSessionError)iStatus.Int();
			entry.iDate.UniversalTime();
			if(errorCode!=KErrCancel)
				{
				entry.SetFailed(errorCode != KErrNone);
				entry.SetSendingState(errorCode==KErrNone? KMsvSendStateSent: KMsvSendStateWaiting);  //set it to send agian.
				if (errorCode)
					entry.iError=CalculateError(errorCode);
				}
			else
				{
				entry.SetFailed(EFalse);
				entry.SetSendingState(KMsvSendStateSuspended);
				entry.iError=KErrNone;
				}
			entry.SetConnected(EFalse);
		#ifdef _DEBUG
			err = 
		#endif
			iServerEntry.ChangeEntry(entry);
			__ASSERT_DEBUG(err == KErrNone, gPanic(EImsmServerError));
			}
		}
	}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:46,代码来源:IMSM.CPP

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

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

示例4: CreateBIOEntryL

TMsvId TestUniDataModelVCalPlugin::CreateBIOEntryL(TDesC& aText,
                                                   TBIOMessageType aMessageType)
{
		// Ensure that we have a valid service ID to work with:
		TMsvId iBioServiceId;

		iBioServiceId = SetBIOServiceIdL();

		HBufC* localBuffer = aText.AllocL();
		CleanupStack::PushL(localBuffer);

		TPtr messDes = localBuffer->Des();

		if (aMessageType != EBiovCardMessage && aMessageType
            != EBiovCalenderMessage)
			{
				// convert \r\n to \n since this is what is expected from SMS when not vCard data
				for (TInt i = 0; i < messDes.Length(); i++)
					{
						if (messDes[i] == (TText) '\r' && i < messDes.Length() - 1
								&& messDes[i + 1] == (TText) '\n')
							messDes.Delete(i, 1);
					}
			}

		//  Create and fill a CRichText object for the jobbie:
		CParaFormatLayer* paraFormatLayer = CParaFormatLayer::NewL();
		CleanupStack::PushL(paraFormatLayer);
		CCharFormatLayer* charFormatLayer = CCharFormatLayer::NewL();
		CleanupStack::PushL(charFormatLayer);
		CRichText* richText = CRichText::NewL(paraFormatLayer, charFormatLayer);
		CleanupStack::PushL(richText);

		TInt pos = richText->DocumentLength();
		richText->InsertL(pos, messDes);

		TMsvEntry newBioEntry;
		newBioEntry.SetNew(ETrue);
		newBioEntry.SetComplete(EFalse);
		newBioEntry.SetUnread(ETrue);
		newBioEntry.SetVisible(ETrue);
		newBioEntry.SetReadOnly(EFalse);
		newBioEntry.SetFailed(EFalse);
		newBioEntry.SetOperation(EFalse);
		newBioEntry.SetMultipleRecipients(EFalse);
		newBioEntry.SetAttachment(EFalse);
		newBioEntry.iMtm = KUidBIOMessageTypeMtm;
		newBioEntry.iType = KUidMsvMessageEntry;
		newBioEntry.iServiceId = iBioServiceId;
		TTime now;
		now.UniversalTime();
		newBioEntry.iDate = now;

		TTime unixEpoch(KUnixEpoch);
		TTimeIntervalSeconds seconds;
		TTime timeStamp = newBioEntry.iDate;
		timeStamp.SecondsFrom(unixEpoch, seconds);
		retTimeStamp.setTime_t(seconds.Int());

		newBioEntry.iDescription.Set(richText->Read(0, richText->DocumentLength()));
		TBufC<KTelephoneNumberMaxLength> telNumber;

		QString recepient(TEST_MSG_FROM1);
		tempNumber = XQConversions::qStringToS60Desc(recepient);

		telNumber = tempNumber->Des();
		newBioEntry.iDetails.Set(telNumber);

		SetForMtmTypeL(newBioEntry, aMessageType);

		newBioEntry.iSize = richText->DocumentLength();// msgSize;
		CreateBioEntryClientSideL(newBioEntry, *richText);

		CleanupStack::PopAndDestroy(4); // richText, charFormatLayer, paraFormatLayer, localBuffer
		return newBioEntry.Id();
}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:76,代码来源:testunidatamodelvcalplugin.cpp


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