开发学院手机开发Symbian 开发 symbian 实现删除发件箱里面的短信 阅读

symbian 实现删除发件箱里面的短信

 2010-05-31 20:23:00 来源:WEB开发网   
核心提示:在短信引擎的函数 void HandleSessionEventL( TMsvSessionEvent aEvent, TAny* aArg1,TAny* aArg2, TAny* aArg3 );中添加:case EMsvEntriesMoved://移除短信{// Entry id is obtained from

在短信引擎的函数 void HandleSessionEventL( TMsvSessionEvent aEvent, TAny* aArg1,

TAny* aArg2, TAny* aArg3 );中添加:

case EMsvEntriesMoved://移除短信

{

// Entry id is obtained from the session event arguments.

TMsvId* entryId = STATIC_CAST( TMsvId*, aArg2 );

// We are interested in messages that are moved to Sent Item Folder

if ( *entryId == KMsvSentEntryId )

{

TMsvSelectionOrdering sort;

sort.SetSorting(EMsvSortByDateReverse);

sort.SetShowInvisibleEntries(ETrue); // we want to handle also the invisible entries

CMsvEntry* parentEntry = CMsvEntry::NewL(*iSession, KMsvSentEntryId, sort);

CleanupStack::PushL(parentEntry);

CMsvEntrySelection* entries = parentEntry->ChildrenL();

CleanupStack::PushL(entries);

for(TInt i = 0; i < entries->Count(); i++)

{

if( parentEntry->ChildDataL(entries->At(i)).iMtmData3 != KUidMsgTypeSMS.iUid )

{

parentEntry->DeleteL(entries->At(i));

break;

}

}

CleanupStack::PopAndDestroy( entries );

CleanupStack::PopAndDestroy( parentEntry );

}

break;

}

Tags:symbian 实现 删除

编辑录入:coldstar [复制链接] [打 印]
[]
  • 好
  • 好的评价 如果觉得好,就请您
      0%(0)
  • 差
  • 差的评价 如果觉得差,就请您
      0%(0)
赞助商链接