aboutsummaryrefslogtreecommitdiff
path: root/spec/context.xml
blob: ba9df4c68b43205b827851888be1071d8fa3e3b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
<?xml version="1.0"?>
<properties xmlns="http://contextkit.freedesktop.org/Provider">
  <doc>
Core Context Properties
=======================

This is the list of the core contextual properties of the Maemo
platform.

This document is maintained as part of the +contextkit+ package.
Please report change requests as bugs against the +contextkit+
package.
 
*NOTE:* Most of these properties are unstable and their definition will
change for some time still.  Only the ones explicitly marked as stable
should be used for now.

  </doc>
  <node name="Screen">
    <doc>
Display screens
---------------

These properties talk about the display screens of the device.
    </doc>
    <key name="TopEdge" type="string-enum">
      <!-- type
	<string-enum>
	  <top/>
	  <bottom/>
	  <left/>
	  <right/>
	</string-enum>
      /type -->
      <doc>
The edge of the main display screen where the user expects
the top-most UI elements to be.  Possible values are the
strings "top", "bottom", "left", and "right", which refer to
the edges of the screen in its normal orientation as defined
by the graphics hardware.  _(stable)_
      </doc>
    </key>
    <key name="IsCovered" type="bool">
      <doc>
Whether or not the main display screen is covered and can thus not be
seen by the user.  This might mean that the device is laying face down
on a table, or that its lid is closed if it has one.  _(stable)_
      </doc>
    </key>
  </node>
  <node name="Location">
    <doc>
Location
--------

Best effort location information. If any of the keys are not
appliciable to the current location, they will be unavailable.
    </doc>
    <key name="Latitude" type="double">
      <doc>The latitude of the current position in degrees.</doc>
    </key>
    <key name="Longitude" type="double">
      <doc>The longitude of the current position in degrees.</doc>
    </key>
    <key name="Altitude" type="double">
      <doc>The altitude of the current position in meters.</doc>
    </key>
    <key name="Street" type="string">
      <doc>The street nearest the location of the device.</doc>
    </key>
    <key name="PostalCode" type="string">
      <doc>The postcode of the location of the device.</doc>
    </key>
    <key name="Area" type="string">
      <doc>The name of the local area where the device is, for example a neighborhood or campus.</doc>
    </key>
    <key name="Locality" type="string">
      <doc>The name of the village, town or city where the device is.</doc>
    </key>
    <key name="Region" type="string">
      <doc>The administrative region which contains the location of the device.</doc>
    </key>
    <key name="Country" type="string">
      <doc>The country which contains the location of the device.</doc>
    </key>
    <key name="CountryCode" type="string">
      <doc>The ISO 3166 two letter country code of the country which contains the location of the device.</doc>
    </key>
    <key name="Continent" type="string">
      <doc>The localized name of the current continent, as a string.</doc>
    </key>
    <key name="Planet" type="string">
      <doc>The localized name of the current planet (or dwarf planet), as a string.</doc>
    </key>
  </node>
  <node name="Battery">
    <doc>
Battery
-------

Information about the batteries of the device.
    </doc>
    <key name="ChargePercentage" type="INT">
      <doc>
The average charge level of the currently connected batteries. 
Expressed as percentage of the maximum charge level.
      </doc>
    </key>
    <key name="OnBattery" type="TRUTH">
      <doc>
Whether or not the device is currently running on battery power,
i.e., whether at least one of its batteries is currently discharging.
      </doc>
    </key>
    <key name="LowBattery" type="TRUTH">
      <doc>
Whether or not the device is currently running on low battery power.
True if OnBattery is true and the charge levels of all 
batteries are below 10%.
      </doc>
    </key>
    <key name="IsCharging" type="TRUTH">
      <doc>
Whether or not the device is currently charging at least one of its batteries.
      </doc>
    </key>
    <key name="TimeUntilLow" type="INT">
      <doc>
Estimates the time that the device can run on battery before the property 
OnLowBattery becomes true. In seconds.
      </doc>
    </key>
    <key name="TimeUntilFull" type="INT">
      <doc>
Estimates the needed charging time of the device. In seconds.
      </doc>
    </key>
  </node>
  <node name="Connectivity">
    <doc>
Network connectivity
--------------------

Information about the network connectivity of the device.
    </doc>
    <key name="SignalStrength" type="percentage">
      <doc>
	The strength of the radio connection.
      </doc>
    </key>
  </node>
  <node name="Environment">
    <doc>
Environment
-----------

Information about the environment the device is in.
    </doc>
    <key name="IsDark" type="bool">
      <doc>
Whether or not it is dark.
      </doc>
    </key>
    <key name="SunRise" type="time">
      <doc>
The time of sun rise.
      </doc>
    </key>
    <key name="SunSet" type="time">
      <doc>
The time of sun set.
      </doc>
    </key>
    <key name="Weather" type="map">
      <!-- type
	<map>
	  <allowed-keys>
	    <Condition type="string">
	      <doc>
The current weather condition, as a localized, human readable string.
Examples are "Cloudy", "Raining", etc.
	      </doc>
	    </Condition>
	    <ConditionCode>
	      <type>
		<string-enum>
		  <cloudy/>
		  ...
		</string-enum>
	      </type>
	      <doc>
The current weather condition, as a symbolic string.  The set of
symbols is to be defined, but it will be fixed and quite small so that
you can provide an icon for each of them, etc.
	      </doc>
	    </ConditionCode>
	    ...
	  </allowed-keys>
	</map>
      /type -->
      <doc>
The current weather.  See http://www.ominous-valve.com/wx_codes.txt for
more information about codifying weather conditions.  We should lift
something from there, if just for extra geek points.
+
The value of the weather property is a dictionary with the following
keys.  All keys are optional and additional keys might be present.
+
- *Condition*
+
The current weather condition, as a localized, human readable string.
Examples are "Cloudy", "Raining", etc.
+
- *ConditionCode*
+
The current weather condition, as a symbolic string.  The set of
symbols is to be defined, but it will be fixed and quite small so that
you can provide an icon for each of them, etc.
+
- *Humidity*
+
The relative humidity in percent.
+
- *Temperature*
+
The temperature as a localized string.  This string represents the
temperature in the way preferred by the user.  Most often this means
either degrees Celsius or degrees Fahrenheit, but it could be some
other unit entirely.
+
- *TemperatureK*
+
The temperature in Kelvin.
+
- *ApparentTemperature*
+
The felt temperature as a localized string, analogous to Temperature.
+
- *ApparentTemperatureK*
+
The felt temperature in Kelvin.
+
- *DewPoint*
+
The dew point as a localized string, analogous to Temperature.
+
- *DewPointK*
+
The dew point in Kelvin.
+
- *Pressure*
+
The atmospheric pressure in milli bar.
+
- *Precipitation*
+
The rain or snow fall in millimeter per square meter per hour (or some
other more common unit).
+
- *Visibility*
+
The visibility in meter.
+
- *WindSpeed*
+
The wind speed in meters per second.
+
- *WindDirection*
+
The wind direction as a localized string.  The direction is given in
compass terms: North, South-West, etc.
+
- *WindDirectionD*
+
The wind direction in degrees.  North is 0, east is 90, etc.
      </doc>
    </key>
  </node>
</properties>