This page was last modified 06:28, 25 September 2007.
CMPRecentList:
From Forum Nokia Wiki
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(); ... } _LIT(KFile,"c:\\sample.wav"); _LIT(KFile1,"c:\\sample1.wav"); 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; aText.AppendNum(i); CEikonEnv::InfoWinL(_L("List Count:"),aText); for (int k = 0;k<i; k++) { aText.Zero(); //gets the list item name at a perticular index TPtrC iName = iList->MdcaPoint(k); aText.Append(iName); CEikonEnv::InfoWinL(_L("List Item:"),aText); } } void CTestMPRecentListAppUi::AddRecentListL() { //Add a file KFile to recent file list iMPRecentList->AddRecentFileL(KFile); } void CTestMPRecentListAppUi::UpdateRecentListL() { //Reads, updates, and saves KFile1 to the recent list iMPRecentList->UpdateRecentListL(KFile1); } void CTestMPRecentListAppUi::SaveRecentList() { //Saves recent file list iMPRecentList->SaveRecentList(); } void CTestMPRecentListAppUi::LoadRecentList() { //Loads recent file list iMPRecentList->LoadRecentList(); }
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| MediaPlayerEngine API | felixksp | General Symbian C++ | 4 | 2008-01-18 15:00 |
| Information about song(MP3) currently being played | stenlik | Symbian Media (Graphics & Sounds) | 4 | 2008-02-23 19:15 |
| Nokia Player | felixksp | General Symbian C++ | 9 | 2008-04-14 17:59 |
| CMPRecentList | felixksp | General Symbian C++ | 6 | 2008-04-14 17:56 |
