本文整理汇总了C++中CMsvStore::HasBodyTextL方法的典型用法代码示例。如果您正苦于以下问题:C++ CMsvStore::HasBodyTextL方法的具体用法?C++ CMsvStore::HasBodyTextL怎么用?C++ CMsvStore::HasBodyTextL使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMsvStore
的用法示例。
在下文中一共展示了CMsvStore::HasBodyTextL方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CheckMessageL
TBool CSmsReplyToStep::CheckMessageL()
{
INFO_PRINTF1(_L("Received new message in Inbox - should be status report..."));
TMsvSelectionOrdering ordering;
ordering.ShowInvisibleEntries();
CMsvEntry* entry = CMsvEntry::NewL(*iSession, KMsvGlobalInBoxIndexEntryId,ordering);
CleanupStack::PushL(entry);
CMsvEntrySelection* msvEntrySelection;
msvEntrySelection=entry->ChildrenL();
CleanupStack::PushL(msvEntrySelection);
// Check how many mesasges there are - should be just 1
TInt count = msvEntrySelection->Count();
INFO_PRINTF3(_L("Number of new messages: %d, should be: %d"), count, 1);
// Restore the message
CSmsHeader* header = CSmsHeader::NewL(CSmsPDU::ESmsDeliver, *iTestUtils->iRichText);
CleanupStack::PushL(header);
entry->SetEntryL((*msvEntrySelection)[0]);
CMsvStore* store = entry->ReadStoreL();
CleanupStack::PushL(store);
header->RestoreL(*store);
if(store->HasBodyTextL())
{
store->RestoreBodyTextL(*iTestUtils->iRichText);
}
TBuf<KSmsDescriptionLength> desc;
User::LeaveIfError(TSmsUtilities::GetDescription(header->Message(), desc));
//Check for a reply address field
CSmsReplyAddressOperations& operations = STATIC_CAST(CSmsReplyAddressOperations&,header->Message().GetOperationsForIEL(CSmsInformationElement::ESmsReplyAddressFormat));
TBool result=operations.ContainsReplyAddressIEL();
CleanupStack::PopAndDestroy(4,entry);
return result;
}
示例2: 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);
}