00001 #include "epoc-s60-version.hpp" 00002 00003 // from http://wiki.forum.nokia.com/index.php/CS000933_-_Detecting_S60_platform_version_at_run_time 00004 00005 _LIT(KS60ProductIDFile, "Series60v*.sis"); 00006 _LIT(KROMInstallDir, "z:\\system\\install\\"); 00007 00008 void GetS60PlatformVersionL(RFs& aFs, TPlatformVersion& aVersion) 00009 { 00010 TFindFile ff( aFs ); 00011 CDir* result; 00012 User::LeaveIfError( ff.FindWildByDir( KS60ProductIDFile, KROMInstallDir, result ) ); 00013 CleanupStack::PushL( result ); 00014 User::LeaveIfError( result->Sort( ESortByName|EDescending ) ); 00015 aVersion.iMajor = (*result)[0].iName[9] - '0'; 00016 aVersion.iMinor = (*result)[0].iName[11] - '0'; 00017 CleanupStack::PopAndDestroy(); // result 00018 } 00019 00020 void GetS60PlatformVersionL(TPlatformVersion& aVersion) 00021 { 00022 RFs fs; 00023 User::LeaveIfError(fs.Connect()); 00024 CleanupClosePushL(fs); 00025 GetS60PlatformVersionL(fs, aVersion); 00026 CleanupStack::PopAndDestroy(); // fs 00027 }
ContextLogger2—ContextLogger2 Logger Daemon Internals—Generated on Mon May 2 13:49:52 2011 by Doxygen 1.6.1