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


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

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


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

示例1: AddUserFolderL

// -----------------------------------------------------------------------------
// CMmsAdapterMsvApi::AddUserFolderL
// Creates new user folder
// -----------------------------------------------------------------------------        
TInt CMmsAdapterMsvApi::AddUserFolderL( TMsvId& aFolder, const TDesC& aName )
    {
    TRACE_FUNC_ENTRY;
    LOGGER_WRITE_1( "aName: %S", &aName );
        
    // Make sure that we are not going to add same folder twise
    TBool found( EFalse );
    found = FindUserFolderL( aName, aFolder );
    if ( found )
        {
        LOGGER_WRITE( "Folder already exists" );
        LOGGER_LEAVEFN( "CMmsAdapterMsvApi::AddUserFolderL" );
        return KErrNone;
        } 
        
    CMsvEntry* entry = iSession.GetEntryL(KMsvMyFoldersEntryIdValue);
    CleanupStack::PushL( entry );
    
    TTime date;
    date.UniversalTime();    
    
    TMsvEntry folderEntry;
    folderEntry.iType = KUidMsvFolderEntry;
    folderEntry.iMtm = KUidMsvLocalServiceMtm;
    folderEntry.iDetails.Set( aName );   
    folderEntry.iServiceId = KMsvLocalServiceIndexEntryIdValue;
    folderEntry.iSize = sizeof( folderEntry );
    folderEntry.iDate = date;
    folderEntry.SetStandardFolder( EFalse );
    folderEntry.SetVisible( ETrue );
    folderEntry.SetComplete( ETrue );
    folderEntry.SetInPreparation( EFalse ); 
    folderEntry.SetReadOnly( EFalse );
    
    entry->CreateL( folderEntry );
    CleanupStack::PopAndDestroy( entry );
    
    aFolder = folderEntry.Id();
    
    TRACE_FUNC_EXIT;
    return KErrNone;
    }
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:46,代码来源:mmsadaptermsvapi.cpp

示例2:

void CImPop3TransferMessage::RunL()
	{
	if (iStatus == KErrNone)
		{
		if (iTransferMethod == EImPop3MoveTransfer)
			// If the data under the message entry has been moved then mark it as incomplete
			{
			TInt err;
			err = iEntry.SetEntry(iSourceMessage);
			if (err == KErrNone)
				{
				TMsvEntry entry = iEntry.Entry();
				entry.SetComplete(EFalse);
				err = iEntry.ChangeEntry(entry);
				if (err != KErrNone)
					iStatus = err;
				}
			}
		}
	else
		// If the message hasn't been copied or moved correctly then
		// delete the new message.
		// The old source message is still in a valid state.
		{
		TInt err;
		err = iEntry.SetEntry(iDestFolder);
		if (err == KErrNone)
			{
			err = iEntry.DeleteEntry(iCopiedMessageId);
			if (err != KErrNone)
				iStatus = err;
			}
		}

	User::RequestComplete(iReportStatus, iStatus.Int());
	}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:36,代码来源:popstran.cpp

示例3: CreateBioEntryClientSideL

void TestUniDataModelVCalPlugin::CreateBioEntryClientSideL(TMsvEntry& aEntry,
                                                           CRichText& aBody)
{
		if (inbox)
			{
				iMsvEntry->SetEntryL(KMsvGlobalInBoxIndexEntryId);
			}
		else if (drafts)
			{
				iMsvEntry->SetEntryL(KMsvDraftEntryId);
			}
		//  Get the global inbox.   

		iMsvEntry->CreateL(aEntry);
		iMsvEntry->SetEntryL(aEntry.Id());

		// Save all the changes
		CMsvStore* store = iMsvEntry->EditStoreL();
		CleanupStack::PushL(store);

		if (store->HasBodyTextL())
			{
				store->DeleteBodyTextL();
			}

		CPlainText* pText = CPlainText::NewL();
		CleanupStack::PushL(pText);

		if (inbox)
			{
				CSmsHeader* smsHeader = CSmsHeader::NewL(CSmsPDU::ESmsDeliver, *pText);
				CleanupStack::PushL(smsHeader);
				smsHeader->SetFromAddressL(*tempNumber);
				smsHeader->StoreL(*store);
				
			}
		else if (drafts)
			{

			QString recepient(TEST_MSG_FROM1);
			QString recepient2(TEST_MSG_FROM2);
			QString alias(TEST_MSG_ALIAS1);

			HBufC* addr = XQConversions::qStringToS60Desc(recepient);
			HBufC* addr2 = XQConversions::qStringToS60Desc(recepient2);
			HBufC* alias1 = XQConversions::qStringToS60Desc(alias);

			CSmsHeader* smsHeader = CSmsHeader::NewL(CSmsPDU::ESmsSubmit, *pText);
			CleanupStack::PushL(smsHeader);

			CSmsNumber* number1 = CSmsNumber::NewL(); // create the instance
			CleanupStack::PushL(number1);

			number1->SetNameL(TPtrC());
			number1->SetAddressL(*addr);
			smsHeader->Recipients().AppendL(number1);
			CleanupStack::Pop(number1);

			CSmsNumber* number2 = CSmsNumber::NewL();
			CleanupStack::PushL(number2);

			number2->SetNameL(*alias1);
			number2->SetAddressL(*addr2);

			smsHeader->Recipients().AppendL(number2);
			CleanupStack::Pop(number2);
			smsHeader->StoreL(*store);

			}

    store->StoreBodyTextL(aBody);
    store->CommitL();

    CleanupStack::PopAndDestroy(3); //store - close the store

    aEntry.SetComplete(ETrue);
    // Update the entry
    iMsvEntry->ChangeL(aEntry);
    iMsvEntry->SetEntryL(KMsvRootIndexEntryId);
}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:80,代码来源:testunidatamodelvcalplugin.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::SetComplete方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。