Friday, June 22, 2007

Filtering the file from a Directory listing :symbian

//Declared in main class ---- CMyclass.h
RArray iFileList;
RArray iDirList;
//

_LIT(KFileExtension,"mp3");
_LIT(KDirPath,"c:\\Nokia\\Sounds\\Digital\\");

void CMyclass::ListDirectory( )
{
CDir* dirs = 0;
CDir* files = 0;

User::LeaveIfError(iFsSession.GetDir(KDirPath,KEntryAttNormal,ESortByName,files, dirs));
TFindFile FindFiles(iFsSession());
TInt err = FindFiles.FindWildByDir(KFileExtension,KDirPath, files);

CleanupStack::PushL(dirs);
CleanupStack::PushL(files);

//get files in base path
While (err == KErrNone)
{
for( TInt i=0; iCount(); i++ )
{
iFileList.Append( (*files)[i] );
iDirList.Append(KDirPath );
}

err = file_finder.FindWild(file_list);
CleanupStack::PopAndDestroy( 2 );
}
}


now the iFileList containes the file of desired extension

Tuesday, June 12, 2007

Been waiting for this



Much appreciated browser enters the windows world..
I have only one word--EXCITED--




Mobile ,.....What am i running!!!!

When ever my mobile goes into my pocket (which I rarely do), I need to close all the running apps. I do this by manually checking the current running application [ long press of menu key]*.
I will be running all kind of application including browser, calendar, IM, yahoo…. And many times I forget what i have some apps running and I simply lock the keypad.Running application eat up a lot of battery power…this happens with me coz i cant keep track of all the apps i started 2-3 hrs ago…this shouldn't be happening.. after all i am using a smart phone. it should know what all application the user has started and if the user is not giving any input for a long time then it should be smart enough to close them [its a crazy idea though!!!]..,,symbian, for developers has given a every “Smart” approach in saving resources while developing application and its called cleanupstack.

Time out [Not in depth]
Cleanupstack is a way in which a developer can concentrate more on his coding rather worrying about the memory mishandling due to crash or abrupt closing of the application.

Nokia has finally given a break for smartphone freaks. In there next version of UI frame work s60 3rd edition FP1, they have this beautiful feature where in on the menu view there is a small icon(running) at the top right corner of folder which indicates that there is a application running from this folder [on the application itself]. ..Kudos NOKIA for this kinda feature. Unfortunately i still haven't upgraded to s60 3rd ed FP1 device !! All in all a useful feature packaged in a nice manner


Picture taken using RDA [N95]

*Note by the way i use Nokia 3250