Symbian3/PDK/Source/GUID-79370E26-4549-5F31-99A3-8D0341F58F08.dita
changeset 1 25a17d01db0c
child 3 46218c8b8afa
equal deleted inserted replaced
0:89d6a7a84779 1:25a17d01db0c
       
     1 <?xml version="1.0" encoding="utf-8"?>
       
     2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
       
     3 <!-- This component and the accompanying materials are made available under the terms of the License 
       
     4 "Eclipse Public License v1.0" which accompanies this distribution, 
       
     5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
       
     6 <!-- Initial Contributors:
       
     7     Nokia Corporation - initial contribution.
       
     8 Contributors: 
       
     9 -->
       
    10 <!DOCTYPE concept
       
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
       
    12 <concept id="GUID-79370E26-4549-5F31-99A3-8D0341F58F08" xml:lang="en"><title>Retrieving
       
    13 Versions and Device Type Information </title><abstract><p>This section explains the tasks that can be performed using System
       
    14 Utilities such as retrieving software and language package versions and device
       
    15 type information. </p></abstract><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    16 <section id="GUID-1884087E-5436-4E3D-A730-64AAF0212595"><title>Retrieving
       
    17 the current software version</title><p>To retrieve the software version of
       
    18 the device, call <codeph>GetSWVersion()</codeph> function. This function sets
       
    19 the parameter passed to a Unicode string holding the current software version. </p><codeblock xml:space="preserve">TBuf&lt;KSysUtilVersionTextLength&gt; version;
       
    20 if( SysUtil::GetSWVersion( version ) == KErrNone )
       
    21      {     // Use the version string.     ...
       
    22      }
       
    23 </codeblock></section>
       
    24 <section id="GUID-8B03C857-EEE3-4E30-8E64-F6E71919D484"><title>Retrieving
       
    25 the current software version for the current language package</title><p>To
       
    26 retrieve the software version of the device which is compatible with the currently
       
    27 installed language package, call <codeph>GetLangSWVersion()</codeph>. This
       
    28 function sets the parameter passed to a Unicode string holding the required
       
    29 software version. </p></section>
       
    30 <section id="GUID-B887AAAC-F785-499A-98EB-54D14C1350A9"><title>Retrieving
       
    31 the current language package version</title><p>To retrieve the version of
       
    32 the currently installed language package, call <codeph>GetLangVersion()</codeph>.
       
    33 This function sets the parameter passed to a Unicode string holding the language
       
    34 package. </p><p><b>Note</b>: The following functions read data from text files: </p><ul>
       
    35 <li><p><codeph>GetSWVersion()</codeph> reads from <filepath>Z:\\resource\\versions\\sw.txt</filepath></p></li>
       
    36 <li><p><codeph>GetLangSWVersion()</codeph> reads from <filepath>Z:\\resource\\versions\\langsw.txt</filepath> </p></li>
       
    37 <li><p><codeph>GetLangVersion()</codeph> reads from <filepath>Z:\\resource\\versions\\lang.txt</filepath> </p></li>
       
    38 </ul><p>The GetSWVersion() and GetLangSWVersion() functions convert the newline
       
    39 character "\n" to the Unicode newline character but GetLangVersion()function
       
    40 does not convert.</p></section>
       
    41 <section id="GUID-9D638BAD-9A37-45FE-BF12-BAEFFB740D47"><title>Retrieving
       
    42 the device type information</title><p>To retrieve the device type information,
       
    43 call GetDeviceTypeInfoL() function. It consists of a pointer to an instance
       
    44 of CDeviceTypeInformation. This instance contains the complete set of device
       
    45 type information attributes that are provisioned by the device manufacturer. </p><codeblock xml:space="preserve">TPtrC16 modelNamePtrC;
       
    46 if( User::LeaveIfError( deviceTypeInfo-&gt;GetModelName( modelNamePtrC ) ) == CDeviceTypeInformation::KDefaultValue )
       
    47           {
       
    48           // We have a default attribute value, do something else
       
    49           ...
       
    50           }
       
    51 else
       
    52           {
       
    53           // We have a device creator supplied attribute value.
       
    54           ...
       
    55           }
       
    56 </codeblock></section>
       
    57 </conbody><related-links>
       
    58 <link href="GUID-ED6ED5E6-5A95-54F2-B5B2-6145A10F44BE.dita"><linktext>System Utilities
       
    59 Overview</linktext></link>
       
    60 <link href="GUID-3AFA592E-ED32-5AC6-B331-E7191CF2D5E2.dita"><linktext>Checking
       
    61 the Availability of Memory</linktext></link>
       
    62 </related-links></concept>