Symbian obtains the number of unread messages in the inbox.
First, use kmsvglobalinboxindexentrThe Yid parameter creates a cmsventry object entry pointing to the inbox. You can use the entry-> childrenl () function to obtain the cmsventryselection object pointing to all information IDs in the inbox. Then, you can use tmsventry: unread () the function determines whether the SMS is unread and counts the number of unreadcoun messages that are returned. The following are relatedCodeFragment
Cmsventry * entry = cmsventry: newl (* imsvsession, kmsvglobalinboxindexentrYid, tmsvselectionordering (); cleanupstack: pushl (entry );
Cmsventryselection * entries = entry-> childrenl ();
Cleanupstack: pushl (entries );
Tint unreadcount;
For (tint I = 0; I <entries-> count (); I ++)
{
Entry-> setentryl (entries-> at (I ));
Tmsventry msventry (Entry-> entry ());
If (msventry. unread () unreadcount ++;
}
Cleanupstack: popanddestroy (2 );