org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-B796D072-4E51-4BC7-9259-84530DB3539D.html
changeset 229 716254ccbcc0
equal deleted inserted replaced
228:913c9751c067 229:716254ccbcc0
       
     1 
       
     2 <!DOCTYPE html
       
     3   PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
       
     4 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><meta name="copyright" content="(C) Copyright 2009"/><meta name="DC.rights.owner" content="(C) Copyright 2009"/><meta name="DC.Type" content="mobileconcept"/><meta name="DC.Title" content="System attributes"/><meta name="DC.Relation" scheme="URI" content="GUID-1D78998F-2A45-4100-AAD0-FCCAC300DBC1"/><meta name="DC.Relation" scheme="URI" content="GUID-BF044B8D-C16A-47DC-84F3-9103D9DCE09B"/><meta name="DC.Relation" scheme="URI" content="GUID-7C69DDA4-16F1-4A8F-BDB2-4CB0015B4E81"/><meta name="DC.Relation" scheme="URI" content="GUID-65AAF569-D347-462B-B59A-9D7CA184AB9C"/><meta name="DC.Relation" scheme="URI" content="GUID-AEB26A58-1DE2-46CB-81EC-6DB3A477B7A3"/><meta name="DC.Format" content="XHTML"/><meta name="DC.Identifier" content="GUID-B796D072-4E51-4BC7-9259-84530DB3539D"/><title>System
       
     5 attributes </title><script type="text/javascript">
       
     6       function initPage() {}
       
     7     </script><link href="../PRODUCT_PLUGIN/book.css" rel="stylesheet" type="text/css"/><link href="css/s60/style.css" rel="stylesheet" type="text/css" media="all"/></head><body onload="initPage();"><div class="body"><div class="contentLeft prTxt"><h1 class="pageHeading" id="GUID-B796D072-4E51-4BC7-9259-84530DB3539D">System
       
     8 attributes</h1><div>
       
     9 <p/>
       
    10 <p>System information is represented as system attributes. Each system
       
    11 attribute consists of an <strong>entity</strong> and a <strong>key</strong>. The entity broadly
       
    12 represents a device component or feature, such as battery or connectivity.
       
    13 The key is an attribute of the entity. Entities can have multiple keys, with
       
    14 each entity-key pair representing a single system attribute. For example,
       
    15 battery strength and charging status are attributes of battery. The system
       
    16 attributes for these are <code>Battery - BatteryStrength</code> and <code>Battery
       
    17 - ChargingStatus</code>, respectively (see <a href="GUID-DBB90F32-C1FA-4B0C-9BCA-89177140A60D.html#GUID-DBA52090-BEA7-4D30-A2EB-C3B0BDFDAB11">Table:
       
    18 Battery system attributes</a>). Each system attribute has a value that
       
    19 contains data about the attribute. For some system attributes, the value can
       
    20 be <a href="GUID-4347A7F1-1560-4B28-B4A8-DC570864F505.html#GUID-4347A7F1-1560-4B28-B4A8-DC570864F505">modified</a>.</p>
       
    21 <p>For more information about the supported system attributes, see section <a href="GUID-DBB90F32-C1FA-4B0C-9BCA-89177140A60D.html#GUID-DBB90F32-C1FA-4B0C-9BCA-89177140A60D">Supported system attributes (entities and keys)</a>.</p>
       
    22 <p>For more information about the system data types that determine system
       
    23 attribute values, see section <a href="GUID-4C79E511-1C1A-475D-BBBB-4F1F6D406340.html#GUID-4C79E511-1C1A-475D-BBBB-4F1F6D406340">System data types</a>.</p>
       
    24 <p>In <span>JavaScript</span>,
       
    25 a system attribute is represented as an object, with the entity, key, and
       
    26 value as properties of that object:</p>
       
    27 <div class="tablenoborder"><a name="GUID-0FA117EC-0049-43F7-BFB8-C777A4D2414D"><!----></a><table cellpadding="4" cellspacing="0" summary="" id="GUID-0FA117EC-0049-43F7-BFB8-C777A4D2414D" frame="border" border="1" rules="all"><caption><strong>Table: </strong>System attribute
       
    28 object</caption>
       
    29 <thead align="left">
       
    30 <tr class="title "><th class="cellrowborder" valign="top" width="25%" id="d0e69463">
       
    31 <p>Property</p>
       
    32 </th><th class="cellrowborder" valign="top" width="25%" id="d0e69468">
       
    33 <p>Description</p>
       
    34 </th><th class="cellrowborder" valign="top" width="25%" id="d0e69473">
       
    35 <p>Type</p>
       
    36 </th><th class="cellrowborder" valign="top" width="25%" id="d0e69478">
       
    37 <p>Value</p>
       
    38 </th></tr>
       
    39 </thead>
       
    40 <tbody>
       
    41 <tr class="">
       
    42 <td class="cellrowborder" valign="top" width="25%" headers="d0e69463 ">
       
    43 <p><code>Entity</code></p>
       
    44 </td>
       
    45 <td class="cellrowborder" valign="top" width="25%" headers="d0e69468 ">
       
    46 <p>Specifies the entity of the system attribute.</p>
       
    47 <p>Together with <code>Key</code>, this specifies the system attribute.</p>
       
    48 </td>
       
    49 <td class="cellrowborder" valign="top" width="25%" headers="d0e69473 ">
       
    50 <p>string</p>
       
    51 </td>
       
    52 <td class="cellrowborder" valign="top" width="25%" headers="d0e69478 ">
       
    53 <p>For a complete list of supported entities, see section <a href="GUID-DBB90F32-C1FA-4B0C-9BCA-89177140A60D.html#GUID-DBB90F32-C1FA-4B0C-9BCA-89177140A60D">Supported system attributes (entities and keys)</a>.</p>
       
    54 </td>
       
    55 </tr>
       
    56 <tr class="bg ">
       
    57 <td class="cellrowborder" valign="top" width="25%" headers="d0e69463 ">
       
    58 <p><code>Key</code></p>
       
    59 </td>
       
    60 <td class="cellrowborder" valign="top" width="25%" headers="d0e69468 ">
       
    61 <p>Specifies the key of the system attribute. The available keys depend
       
    62 on the entity.</p>
       
    63 <p>Together with <code>Entity</code>, this specifies the system
       
    64 attribute.</p>
       
    65 </td>
       
    66 <td class="cellrowborder" valign="top" width="25%" headers="d0e69473 ">
       
    67 <p>string</p>
       
    68 </td>
       
    69 <td class="cellrowborder" valign="top" width="25%" headers="d0e69478 ">
       
    70 <p>For a complete list of supported keys per entity, see the <strong>Key</strong> column
       
    71 of the tables in section <a href="GUID-DBB90F32-C1FA-4B0C-9BCA-89177140A60D.html#GUID-DBB90F32-C1FA-4B0C-9BCA-89177140A60D">Supported system attributes (entities and keys)</a>.</p>
       
    72 </td>
       
    73 </tr>
       
    74 <tr class="">
       
    75 <td class="cellrowborder" valign="top" width="25%" headers="d0e69463 ">
       
    76 <p>&lt;<code>Value</code>&gt;</p>
       
    77 </td>
       
    78 <td class="cellrowborder" valign="top" width="25%" headers="d0e69468 ">
       
    79 <p>Specifies the value of the system attribute.</p>
       
    80 <p/>
       
    81 <p>The name, type, and content of this property depend on the system attribute
       
    82 and whether the system attribute object is used as input or output:</p>
       
    83 <p><strong>INPUT</strong></p>
       
    84 <p>If the system attribute object is used as input for a method call, this
       
    85 property is an object named <code>SystemData</code>. The actual system
       
    86 attribute value is represented as one or more properties of the <code>SystemData</code> object.
       
    87 The exact set of properties depends on the <a href="GUID-DBB90F32-C1FA-4B0C-9BCA-89177140A60D.html#GUID-DBB90F32-C1FA-4B0C-9BCA-89177140A60D">specific
       
    88 system attribute</a> and its <a href="GUID-4C79E511-1C1A-475D-BBBB-4F1F6D406340.html#GUID-4C79E511-1C1A-475D-BBBB-4F1F6D406340">system
       
    89 data type</a> for input.</p>
       
    90 <p>For example: If you input the <code>Battery - BatteryStrength</code> system
       
    91 attribute, whose input data type is <a href="GUID-4C79E511-1C1A-475D-BBBB-4F1F6D406340.html#GUID-EBD34604-6A55-4CEA-9F2E-8F00F681D50A"><code>Status</code></a>, the <code>criteria</code> argument takes the following
       
    92 properties:</p>
       
    93 <ul>
       
    94 <li><p><code>criteria</code><code>.Entity</code></p>
       
    95 </li>
       
    96 <li><p><code>criteria</code><code>.Key</code></p>
       
    97 </li>
       
    98 <li><p><code>criteria</code><code>.SystemData.Status</code></p>
       
    99 </li>
       
   100 </ul>
       
   101 <p>Here, <code>criteria</code> is the input object representing
       
   102 the system attribute, <code>SystemData</code> is the object containing
       
   103 the system attribute value, and <code>Status</code> is the object
       
   104 property specifying the actual value (as defined by the system data type).</p>
       
   105 <p>Similarly, if you input the <code>Memory - DriveInfo</code> system
       
   106 attribute, whose input data type is <a href="GUID-4C79E511-1C1A-475D-BBBB-4F1F6D406340.html#GUID-3D531FEF-1D7D-4FAC-8208-52794A252C10"><code>DriveInfo</code></a>, the <code>criteria</code> argument takes the following
       
   107 properties:</p>
       
   108 <ul>
       
   109 <li><p><code>criteria</code><code>.Entity</code></p>
       
   110 </li>
       
   111 <li><p><code>criteria</code><code>.Key</code></p>
       
   112 </li>
       
   113 <li><p><code>criteria</code><code>.SystemData.Drive</code></p>
       
   114 </li>
       
   115 <li><p><code>criteria</code><code>.SystemData.&lt;...&gt;</code> (other
       
   116 properties associated with <code>DriveInfo</code>)</p></li>
       
   117 </ul>
       
   118 <p><strong>OUTPUT</strong></p>
       
   119 <p>If the system attribute object is received as output from a method call,
       
   120 the system attribute value is represented as one or more properties of the <code>ReturnValue</code> object
       
   121 returned by the call. The exact set of properties depends on the <a href="GUID-DBB90F32-C1FA-4B0C-9BCA-89177140A60D.html#GUID-DBB90F32-C1FA-4B0C-9BCA-89177140A60D">specific
       
   122 system attribute</a> and its <a href="GUID-4C79E511-1C1A-475D-BBBB-4F1F6D406340.html#GUID-4C79E511-1C1A-475D-BBBB-4F1F6D406340">system
       
   123 data type</a> for output.</p>
       
   124 <p>For example: If the <code>Battery - BatteryStrength</code> system
       
   125 attribute, whose output data type is <a href="GUID-4C79E511-1C1A-475D-BBBB-4F1F6D406340.html#GUID-EBD34604-6A55-4CEA-9F2E-8F00F681D50A"><code>Status</code></a>, is received as output, the <code>ReturnValue</code> object
       
   126 contains the following properties:</p>
       
   127 <ul>
       
   128 <li><p><code>ReturnValue.Entity</code></p></li>
       
   129 <li><p><code>ReturnValue.Key</code></p></li>
       
   130 <li><p><code>ReturnValue.Status</code></p></li>
       
   131 </ul>
       
   132 <p>Here, <code>ReturnValue</code> is the output object representing
       
   133 the system attribute, and <code>Status</code> is the object property
       
   134 specifying the system attribute value (as defined by the system data type).</p>
       
   135 <p>Similarly, if the <code>Memory - DriveInfo</code> system attribute,
       
   136 whose output data type is <a href="GUID-4C79E511-1C1A-475D-BBBB-4F1F6D406340.html#GUID-3D531FEF-1D7D-4FAC-8208-52794A252C10"><code>DriveInfo</code></a>, is received as output, the <code>ReturnValue</code> object
       
   137 contains the following properties:</p>
       
   138 <ul>
       
   139 <li><p><code>ReturnValue.Entity</code></p></li>
       
   140 <li><p><code>ReturnValue.Key</code></p></li>
       
   141 <li><p><code>ReturnValue.Drive</code></p></li>
       
   142 <li><p><code>ReturnValue.TotalSpace</code></p></li>
       
   143 <li><p><code>ReturnValue.FreeSpace</code></p></li>
       
   144 <li><p><code>ReturnValue.CriticalSpace</code></p></li>
       
   145 <li><p><code>ReturnValue.MediaType</code></p></li>
       
   146 <li><p><code>ReturnValue.BatteryState</code></p></li>
       
   147 <li><p><code>ReturnValue.DriveName</code></p></li>
       
   148 </ul>
       
   149 </td>
       
   150 <td class="cellrowborder" valign="top" width="25%" headers="d0e69473 ">&nbsp;</td>
       
   151 <td class="cellrowborder" valign="top" width="25%" headers="d0e69478 ">
       
   152 <p>See the <strong>Input</strong> and <strong>Output</strong> columns of the tables in section <a href="GUID-DBB90F32-C1FA-4B0C-9BCA-89177140A60D.html#GUID-DBB90F32-C1FA-4B0C-9BCA-89177140A60D">Supported system attributes (entities and keys)</a>.</p>
       
   153 </td>
       
   154 </tr>
       
   155 </tbody>
       
   156 </table></div></div></div></div><div class="footer"><hr/><div class="copy">© Nokia 2009.</div></div></body></html>