This section explains the tasks that can be performed using System Utilities such as retrieving software and language package versions and device type information.
To retrieve the software version of the device, call GetSWVersion() function. This function sets the parameter passed to a Unicode string holding the current software version.
TBuf<KSysUtilVersionTextLength> version; if( SysUtil::GetSWVersion( version ) == KErrNone ) { // Use the version string. ... }
To retrieve the software version of the device which is compatible with the currently installed language package, call GetLangSWVersion(). This function sets the parameter passed to a Unicode string holding the required software version.
To retrieve the version of the currently installed language package, call GetLangVersion(). This function sets the parameter passed to a Unicode string holding the language package.
Note: The following functions read data from text files:
GetSWVersion() reads from Z:\\resource\\versions\\sw.txt
GetLangSWVersion() reads from Z:\\resource\\versions\\langsw.txt
GetLangVersion() reads from Z:\\resource\\versions\\lang.txt
The GetSWVersion() and GetLangSWVersion() functions convert the newline character "\n" to the Unicode newline character but GetLangVersion()function does not convert.
To retrieve the device type information, call GetDeviceTypeInfoL() function. It consists of a pointer to an instance of CDeviceTypeInformation. This instance contains the complete set of device type information attributes that are provisioned by the device manufacturer.
TPtrC16 modelNamePtrC; if( User::LeaveIfError( deviceTypeInfo->GetModelName( modelNamePtrC ) ) == CDeviceTypeInformation::KDefaultValue ) { // We have a default attribute value, do something else ... } else { // We have a device creator supplied attribute value. ... }
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.