|
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="JavaScript SystemInfo Service API (WRT 1.1)"/><meta name="DC.Relation" scheme="URI" content="GUID-1A678A11-0BDD-4F64-9F40-013F6CDB81D7"/><meta name="DC.Relation" scheme="URI" content="GUID-B77C2006-879F-4AC6-B7BF-04B25B563A29"/><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.Format" content="XHTML"/><meta name="DC.Identifier" content="GUID-AEB26A58-1DE2-46CB-81EC-6DB3A477B7A3"/><title>JavaScript SystemInfo |
|
5 Service API (WRT 1.1) </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-AEB26A58-1DE2-46CB-81EC-6DB3A477B7A3"><span>JavaScript</span> SystemInfo |
|
8 Service API<span> (WRT 1.1)</span></h1><div> |
|
9 <p><span>This</span> <a href="GUID-E0ED671A-BBDA-4C07-828F-BD35782D9B36.html#GUID-E0ED671A-BBDA-4C07-828F-BD35782D9B36">SystemInfo Service</a> API |
|
10 is supported since <a href="GUID-1A3ECAC1-3F09-4602-A1CD-82164040A664.html#GUID-1A3ECAC1-3F09-4602-A1CD-82164040A664">WRT 1.1</a>.</p> |
|
11 <p>The SystemInfo Service API allows <span>widgets</span> to |
|
12 access and modify system information on a device. The API is integrated into <span>WRT</span> through |
|
13 the <a href="GUID-571AF37F-1E95-462A-92D2-FEA2E62F1559.html#GUID-571AF37F-1E95-462A-92D2-FEA2E62F1559"><code>device</code></a> object.</p> |
|
14 <p>For an overview of the service and the API, see section <a href="GUID-E0ED671A-BBDA-4C07-828F-BD35782D9B36.html#GUID-E0ED671A-BBDA-4C07-828F-BD35782D9B36">Accessing and modifying system information</a>.</p> |
|
15 <div><h3>Using the SystemInfo Service API</h3> |
|
16 <p>To use the SystemInfo Service API, your <span>widget</span> must |
|
17 first create <span>a service object for it |
|
18 using the <a href="GUID-04095E9A-50E7-4E5F-BD6F-71DA281A0080.html#GUID-04095E9A-50E7-4E5F-BD6F-71DA281A0080"><code>device.getServiceObject()</code></a> method</span>. |
|
19 Use <code>Service.SysInfo</code> to identify the service provider |
|
20 and <code>ISysInfo</code> to identify the supported interface:</p> |
|
21 |
|
22 <pre class="codeblock" id="GUID-9F7EE91E-7245-44A9-BFAE-BF043CA4E67D-GENIDd0e67882">var so = device.getServiceObject("Service.SysInfo", "ISysInfo");</pre> |
|
23 <p>This service object can then be used to access the services provided |
|
24 by the API:</p> |
|
25 <ul> |
|
26 <li><p><a href="GUID-279A3698-D09B-44BF-8340-739E19F94727.html#GUID-279A3698-D09B-44BF-8340-739E19F94727"><code>ISysInfo.GetInfo()</code></a></p> |
|
27 </li> |
|
28 <li><p><a href="GUID-4347A7F1-1560-4B28-B4A8-DC570864F505.html#GUID-4347A7F1-1560-4B28-B4A8-DC570864F505"><code>ISysInfo.SetInfo()</code></a></p> |
|
29 </li> |
|
30 <li><p><a href="GUID-7978FAFD-5BAC-45FD-9C44-5CF7BC484A1E.html#GUID-7978FAFD-5BAC-45FD-9C44-5CF7BC484A1E"><code>ISysInfo.GetNotification()</code></a></p> |
|
31 </li> |
|
32 <li><p><a href="GUID-BF044B8D-C16A-47DC-84F3-9103D9DCE09B.html#GUID-BF044B8D-C16A-47DC-84F3-9103D9DCE09B"><code>ISysInfo.Cancel()</code></a></p> |
|
33 </li> |
|
34 </ul> |
|
35 </div> |
|
36 <div><h3>Emulator support</h3> |
|
37 <p>The S60 5th Edition SDK emulator provides partial support for system |
|
38 information. The following table lists the <a href="GUID-B796D072-4E51-4BC7-9259-84530DB3539D.html#GUID-B796D072-4E51-4BC7-9259-84530DB3539D">system |
|
39 attributes</a> supported by the emulator.</p> |
|
40 <div class="tablenoborder"><a name="GUID-9C3D4648-D3C7-4A15-BB75-144F9338B822"><!----></a><table cellpadding="4" cellspacing="0" summary="" id="GUID-9C3D4648-D3C7-4A15-BB75-144F9338B822" frame="border" border="1" rules="all"><caption><strong>Table: </strong>Supported system |
|
41 attributes</caption> |
|
42 <thead align="left"> |
|
43 <tr class="title "><th class="cellrowborder" valign="top" id="d0e67116"> |
|
44 <p>Entity</p> |
|
45 </th><th class="cellrowborder" valign="top" id="d0e67121"> |
|
46 <p>Key</p> |
|
47 </th></tr> |
|
48 </thead> |
|
49 <tbody> |
|
50 <tr class=""> |
|
51 <td class="cellrowborder" valign="top" headers="d0e67116 "> |
|
52 <p><code>Device</code></p> |
|
53 </td> |
|
54 <td class="cellrowborder" valign="top" headers="d0e67121 "> |
|
55 <p><code>PlatformVersion</code></p> |
|
56 </td> |
|
57 </tr> |
|
58 <tr class="bg "> |
|
59 <td class="cellrowborder" valign="top" headers="d0e67116 "> </td> |
|
60 <td class="cellrowborder" valign="top" headers="d0e67121 "> |
|
61 <p><code>PhoneModel</code></p> |
|
62 </td> |
|
63 </tr> |
|
64 <tr class=""> |
|
65 <td class="cellrowborder" colspan="2" valign="top" headers="d0e67116 d0e67121 "> </td> |
|
66 </tr> |
|
67 <tr class="bg "> |
|
68 <td class="cellrowborder" valign="top" headers="d0e67116 "> |
|
69 <p><code>Display</code></p> |
|
70 </td> |
|
71 <td class="cellrowborder" valign="top" headers="d0e67121 "> |
|
72 <p><code>ScreenSaverTimeout</code></p> |
|
73 </td> |
|
74 </tr> |
|
75 <tr class=""> |
|
76 <td class="cellrowborder" valign="top" headers="d0e67116 "> </td> |
|
77 <td class="cellrowborder" valign="top" headers="d0e67121 "> |
|
78 <p><code>UserInactivity</code></p> |
|
79 </td> |
|
80 </tr> |
|
81 <tr class="bg "> |
|
82 <td class="cellrowborder" valign="top" headers="d0e67116 "> </td> |
|
83 <td class="cellrowborder" valign="top" headers="d0e67121 "> |
|
84 <p><code>KeyGuardTime</code></p> |
|
85 </td> |
|
86 </tr> |
|
87 <tr class=""> |
|
88 <td class="cellrowborder" valign="top" headers="d0e67116 "> </td> |
|
89 <td class="cellrowborder" valign="top" headers="d0e67121 "> |
|
90 <p><code>AutoLockTime</code></p> |
|
91 </td> |
|
92 </tr> |
|
93 <tr class="bg "> |
|
94 <td class="cellrowborder" valign="top" headers="d0e67116 "> </td> |
|
95 <td class="cellrowborder" valign="top" headers="d0e67121 "> |
|
96 <p><code>AutoLockStatus</code></p> |
|
97 </td> |
|
98 </tr> |
|
99 <tr class=""> |
|
100 <td class="cellrowborder" valign="top" headers="d0e67116 "> </td> |
|
101 <td class="cellrowborder" valign="top" headers="d0e67121 "> |
|
102 <p><code>Wallpaper</code></p> |
|
103 </td> |
|
104 </tr> |
|
105 <tr class="bg "> |
|
106 <td class="cellrowborder" valign="top" headers="d0e67116 "> </td> |
|
107 <td class="cellrowborder" valign="top" headers="d0e67121 "> |
|
108 <p><code>LightTimeout</code></p> |
|
109 </td> |
|
110 </tr> |
|
111 <tr class=""> |
|
112 <td class="cellrowborder" valign="top" headers="d0e67116 "> </td> |
|
113 <td class="cellrowborder" valign="top" headers="d0e67121 "> |
|
114 <p><code>DisplayResolution</code></p> |
|
115 </td> |
|
116 </tr> |
|
117 <tr class="bg "> |
|
118 <td class="cellrowborder" valign="top" headers="d0e67116 "> </td> |
|
119 <td class="cellrowborder" valign="top" headers="d0e67121 "> |
|
120 <p><code>DisplayOrientation</code></p> |
|
121 </td> |
|
122 </tr> |
|
123 <tr class=""> |
|
124 <td class="cellrowborder" colspan="2" valign="top" headers="d0e67116 d0e67121 "> </td> |
|
125 </tr> |
|
126 <tr class="bg "> |
|
127 <td class="cellrowborder" valign="top" headers="d0e67116 "> |
|
128 <p><code>General</code></p> |
|
129 </td> |
|
130 <td class="cellrowborder" valign="top" headers="d0e67121 "> |
|
131 <p><code>InputLanguage</code></p> |
|
132 </td> |
|
133 </tr> |
|
134 <tr class=""> |
|
135 <td class="cellrowborder" valign="top" headers="d0e67116 "> </td> |
|
136 <td class="cellrowborder" valign="top" headers="d0e67121 "> |
|
137 <p><code>SupportedLanguages</code></p> |
|
138 </td> |
|
139 </tr> |
|
140 <tr class="bg "> |
|
141 <td class="cellrowborder" valign="top" headers="d0e67116 "> </td> |
|
142 <td class="cellrowborder" valign="top" headers="d0e67121 "> |
|
143 <p><code>PredictiveText</code></p> |
|
144 </td> |
|
145 </tr> |
|
146 <tr class=""> |
|
147 <td class="cellrowborder" colspan="2" valign="top" headers="d0e67116 d0e67121 "> </td> |
|
148 </tr> |
|
149 <tr class="bg "> |
|
150 <td class="cellrowborder" valign="top" headers="d0e67116 "> |
|
151 <p><code>Memory</code></p> |
|
152 </td> |
|
153 <td class="cellrowborder" valign="top" headers="d0e67121 "> |
|
154 <p><code>ListDrives</code></p> |
|
155 </td> |
|
156 </tr> |
|
157 <tr class=""> |
|
158 <td class="cellrowborder" valign="top" headers="d0e67116 "> </td> |
|
159 <td class="cellrowborder" valign="top" headers="d0e67121 "> |
|
160 <p><code>DriveInfo</code></p> |
|
161 </td> |
|
162 </tr> |
|
163 </tbody> |
|
164 </table></div></div> |
|
165 </div></div></div><div class="footer"><hr/><div class="copy">© Nokia 2009.</div></div></body></html> |