本文整理汇总了C++中CMsvStore::DeleteBodyTextL方法的典型用法代码示例。如果您正苦于以下问题:C++ CMsvStore::DeleteBodyTextL方法的具体用法?C++ CMsvStore::DeleteBodyTextL怎么用?C++ CMsvStore::DeleteBodyTextL使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMsvStore
的用法示例。
在下文中一共展示了CMsvStore::DeleteBodyTextL方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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);
}