Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.


From Wiki
Jump to: navigation, search
Article Metadata
Created: samiudd (05 Jul 2007)
Last edited: hamishwillee (19 Jul 2012)

CMPRecentList is used to access the recently accessed file list of media player. we can make use of these API's to know all the files which were accessed most recently, at the same time we can add and update the files to recent list, load the list and save the recent list.

Below is the example code that demostrate the usuage of CMPRecentList:

void CTestMPRecentListAppUi::ConstructL()
iMPRecentList = CMPRecentList::NewL();
void CTestMPRecentListAppUi::RecentList()
//RecentList is a recent file list which returns pointer to array of recent files.
MDesCArray* iList = iMPRecentList->RecentList();
// get the count of the list items
TInt i = iList->MdcaCount();
TBuf<20> aText;
CEikonEnv::InfoWinL(_L("List Count:"),aText);
for (int k = 0;k<i; k++)
//gets the list item name at a perticular index
TPtrC iName = iList->MdcaPoint(k);
CEikonEnv::InfoWinL(_L("List Item:"),aText);
void CTestMPRecentListAppUi::AddRecentListL()
//Add a file KFile to recent file list
void CTestMPRecentListAppUi::UpdateRecentListL()
//Reads, updates, and saves KFile1 to the recent list
void CTestMPRecentListAppUi::SaveRecentList()
//Saves recent file list
void CTestMPRecentListAppUi::LoadRecentList()
//Loads recent file list
This page was last modified on 19 July 2012, at 06:17.
41 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.