本文整理汇总了C++中CMsvSession::ChangeAttributesL方法的典型用法代码示例。如果您正苦于以下问题:C++ CMsvSession::ChangeAttributesL方法的具体用法?C++ CMsvSession::ChangeAttributesL怎么用?C++ CMsvSession::ChangeAttributesL使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMsvSession
的用法示例。
在下文中一共展示了CMsvSession::ChangeAttributesL方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TestSetSendingStateAttributeL
LOCAL_C void TestSetSendingStateAttributeL()
{
CDummyObserver* ob = new(ELeave)CDummyObserver;
CleanupStack::PushL(ob);
CMsvSession* session = CMsvSession::OpenSyncL(*ob);
CleanupStack::PushL(session);
CMsvEntry* cEntry = CMsvEntry::NewL(*session, KMsvDraftEntryId, TMsvSelectionOrdering());
CleanupStack::PushL(cEntry);
CMsvEntrySelection* selection = new(ELeave)CMsvEntrySelection;
CleanupStack::PushL(selection);
TMsvEntry entry1;
entry1.iType = KUidMsvMessageEntry;
entry1.iMtm = KUidMsvLocalServiceMtm;
entry1.iServiceId = KMsvLocalServiceIndexEntryId;
entry1.SetSendingState(12);
cEntry->CreateL(entry1);
selection->AppendL(entry1.Id());
TMsvEntry entry2;
entry2.iType = KUidMsvMessageEntry;
entry2.iMtm = KUidMsvLocalServiceMtm;
entry2.iServiceId = KMsvLocalServiceIndexEntryId;
entry2.SetSendingState(3);
cEntry->CreateL(entry2);
selection->AppendL(entry2.Id());
session->ChangeAttributesL(*selection, 6<<KMsvSendingStateShift, 0);
cEntry->SetEntryL(entry1.Id());
test(cEntry->Entry().SendingState() == 6);
cEntry->SetEntryL(entry2.Id());
test(cEntry->Entry().SendingState() == 6);
CleanupStack::PopAndDestroy(4); // selection, cEntry, session, ob
}