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