aboutsummaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorMarius Vollmer <marius.vollmer@nokia.com>2009-10-15 10:35:15 +0300
committerMarius Vollmer <marius.vollmer@nokia.com>2009-10-15 10:36:16 +0300
commitbefb5612f7154479cb7c83710d602d4a2a6cba2f (patch)
tree17ce8a863c8096875e5b9c0b8f73ec2a333a4124 /spec
parent7a13b16ad0418b86273aca13d82dcbcc3b8a827a (diff)
Cleaned up type definitions in core.context. Use typedoc to document the real types.
Diffstat (limited to 'spec')
-rwxr-xr-xspec/context2asciidoc.pl10
-rw-r--r--spec/core.context353
2 files changed, 172 insertions, 191 deletions
diff --git a/spec/context2asciidoc.pl b/spec/context2asciidoc.pl
index eb08f609..dfa8bcb8 100755
--- a/spec/context2asciidoc.pl
+++ b/spec/context2asciidoc.pl
@@ -132,10 +132,16 @@ sub output_key {
# dump_nano_dom (0, "Key", $key);
+ my $type = $key->{typedoc};
+ if (!$type)
+ {
+ $type = $key->{type};
+ }
+
print "\n";
- print "*" . $key->{name} . "* (" . type_short_desc ($key->{type}) . ")::\n";
+ print "*" . $key->{name} . "* (" . type_short_desc ($type) . ")::\n";
print $key->{doc} . "\n";
- print_type_long_desc ($key->{type});
+ print_type_long_desc ($type);
}
my $document = XML::DOM::Parser->new()->parse(STDIN);
diff --git a/spec/core.context b/spec/core.context
index a0c9e0c9..13c52c85 100644
--- a/spec/core.context
+++ b/spec/core.context
@@ -20,16 +20,16 @@ Display screens
These properties talk about the display screens of the device.
</doc>
- <key name="Screen.TopEdge">
- <type>
- string
- <!-- string-enum>
+ <key name="Screen.TopEdge"
+ type="string">
+ <typedoc>
+ <string-enum>
<top/>
<bottom/>
<left/>
<right/>
- </string-enum !-->
- </type>
+ </string-enum>
+ </typedoc>
<doc>
The edge of the main display screen where the user expects
the top-most UI elements to be. Possible values are the
@@ -38,8 +38,8 @@ the edges of the screen in its normal orientation as defined
by the graphics hardware. _(stable)_
</doc>
</key>
- <key name="Screen.IsCovered">
- <type>bool</type>
+ <key name="Screen.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
@@ -54,9 +54,9 @@ Best effort location information. If any of the keys are not
appliciable to the current location, they will be unavailable.
</doc>
<key name="Location.Coordinates">
- <type>
- <!--<uniform-list type="double"/>-->
- </type>
+ <typedoc>
+ <uniform-list type="double"/>
+ </typedoc>
<doc>
The coordinates of the current position as a list of two or three
doubles. The first two elemets are latitude and longitude,
@@ -64,67 +64,65 @@ respectivly, in degrees. The third element, when present, is the
altitude in meter.
</doc>
</key>
- <key name="Location.Street">
- <type>string</type>
+ <key name="Location.Street"
+ type="string">
<doc>The street nearest the location of the device, as a localized string.</doc>
</key>
- <key name="Location.PostalCode">
- <type>string</type>
+ <key name="Location.PostalCode"
+ type="string">
<doc>The postcode of the location of the device, as a localized string.</doc>
</key>
- <key name="Location.Area">
- <type>string</type>
+ <key name="Location.Area"
+ type="string">
<doc>
The name of the local area where the device is, for example a
neighborhood or campus, as a localized string.
</doc>
</key>
- <key name="Location.Locality">
- <type>string</type>
+ <key name="Location.Locality"
+ type="string">
<doc>The name of the village, town or city where the device is, as a localized string.</doc>
</key>
- <key name="Location.Region">
- <type>string</type>
+ <key name="Location.Region"
+ type="string">
<doc>The administrative region which contains the location of the device, as a localized string.</doc>
</key>
- <key name="Location.Country">
- <type>string</type>
+ <key name="Location.Country"
+ type="string">
<doc>The country which contains the location of the device, as a localized string.</doc>
</key>
- <key name="Location.CountryCode">
- <type>string</type>
+ <key name="Location.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="Location.Timezone">
- <type>string</type>
+ <key name="Location.Timezone"
+ type="string">
<doc>TBD</doc>
</key>
- <key name="Location.TimezoneOffset">
- <type>
- <!--duration-->
- int32
- </type>
+ <key name="Location.TimezoneOffset"
+ type="int32"
+ typedoc="duration">
<doc>TBD</doc>
</key>
- <key name="Location.Continent">
- <type>string</type>
+ <key name="Location.Continent"
+ type="string">
<doc>The name of the current continent, as a localized string.</doc>
</key>
- <key name="Location.Planet">
- <type>string</type>
+ <key name="Location.Planet"
+ type="string">
<doc>The name of the current planet (or dwarf planet), as a localized string.</doc>
</key>
- <key name="Location.PointOfInterest">
- <type>string</type>
+ <key name="Location.PointOfInterest"
+ type="string">
<doc>
The URI of the current point of interest, if any. (The URI points to
a Nepomuk object inside the Content Framework.)
</doc>
</key>
<key name="Location.NearbyContacts">
- <type>
- <!--<uniform-list type="nepomuk-uri"/>-->
- </type>
+ <typedoc>
+ <uniform-list type="nepomuk-uri"/>
+ </typedoc>
<doc>
A list of URIs for contacts that are physically nearby.
</doc>
@@ -135,52 +133,46 @@ Battery
Information about the batteries of the device.
</doc>
- <key name="Battery.ChargePercentage">
- <type>
- <!--percentage-->
- int32
- </type>
+ <key name="Battery.ChargePercentage"
+ type="int32"
+ typedoc="percentage">
<doc>
The average charge level of the currently connected batteries.
Expressed as percentage of the maximum charge level.
</doc>
</key>
- <key name="Battery.OnBattery">
- <type>bool</type>
+ <key name="Battery.OnBattery"
+ type="bool">
<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="Battery.LowBattery">
- <type>bool</type>
+ <key name="Battery.LowBattery"
+ type="bool">
<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="Battery.IsCharging">
- <type>bool</type>
+ <key name="Battery.IsCharging"
+ type="bool">
<doc>
Whether or not the device is currently charging at least one of its batteries.
</doc>
</key>
- <key name="Battery.TimeUntilLow">
- <type>
- <!--duration-->
- int32
- </type>
+ <key name="Battery.TimeUntilLow"
+ type="int32"
+ typedoc="duration">
<doc>
Estimates the time that the device can run on battery before the property
OnLowBattery becomes true. In seconds.
</doc>
</key>
- <key name="Battery.TimeUntilFull">
- <type>
- <!--duration-->
- int32
- </type>
+ <key name="Battery.TimeUntilFull"
+ type="int32"
+ typedoc="duration">
<doc>
Estimates the needed charging time of the device. In seconds.
</doc>
@@ -191,8 +183,15 @@ System
Information about the current state of the device.
</doc>
- <key name="System.MemoryPressure">
- <type>int32</type>
+ <key name="System.MemoryPressure"
+ type="int32">
+ <typedoc>
+ <int-enum>
+ <normal value="0"/>
+ <high value="1"/>
+ <critical value="2"/>
+ </int-enum>
+ </typedoc>
<doc>
Current memory load. Possible values: 0 (normal), 1 (high; low watermark exceeded), 2 (critical; high watermark exceeded).
</doc>
@@ -218,33 +217,31 @@ are still TBD.
</doc>
</key>
- <key name="Internet.NetworkName">
- <type>string</type>
+ <key name="Internet.NetworkName"
+ type="string">
<doc>
The name of the current network.
</doc>
</key>
- <key name="Internet.NetworkState">
- <type>
- <!--<string-enum>
+ <key name="Internet.NetworkState"
+ type="string">
+ <typedoc>
+ <string-enum>
<disconnected/>
<connecting/>
<connected/>
- </string-enum>-->
- string
- </type>
+ </string-enum>
+ </typedoc>
<doc>
The state of the Internet connection, values TBD but will include
things like "connected", "disconnected", "connecting".
</doc>
</key>
- <key name="Internet.SignalStrength">
- <type>
- <!--percentage-->
- int32
- </type>
+ <key name="Internet.SignalStrength"
+ type="int32"
+ typedoc="percentage">
<doc>
The signal strength of the current connection to the Internet. For
example, when Internet.NetworkType is "cellular", this is the signal
@@ -253,21 +250,17 @@ strength at the WLAN radio.
</doc>
</key>
- <key name="Internet.TrafficOut">
- <type>
- <!--percentage-->
- int32
- </type>
+ <key name="Internet.TrafficOut"
+ type="int32"
+ typedoc="percentage">
<doc>
A rough indication of the current traffic rate to the Internet, in
percent of the maximum possible rate.
</doc>
</key>
- <key name="Internet.TrafficIn">
- <type>
- <!--percentage-->
- int32
- </type>
+ <key name="Internet.TrafficIn"
+ type="int32"
+ typedoc="percentage">
<doc>
A rough indication of the current traffic rate from the Internet, in
percent of the maximum possible rate.
@@ -279,14 +272,14 @@ Bluetooth
Information about Bluetooth related things.
</doc>
- <key name="Bluetooth.Enabled">
- <type>bool</type>
+ <key name="Bluetooth.Enabled"
+ type="bool">
<doc>
A boolean indicating whether or not the Bluetooth radio is enabled.
</doc>
</key>
- <key name="Bluetooth.Visible">
- <type>bool</type>
+ <key name="Bluetooth.Visible"
+ type="bool">
<doc>
A boolean indicating whether or not the device is visible to other
Bluetooth devices when they search for others.
@@ -304,52 +297,50 @@ Information about the cellular radio.
The name of the cellular network.
</doc>
</key>
- <key name="Cellular.SignalStrength">
- <type>
- <!--percentage-->
- int32
- </type>
+ <key name="Cellular.SignalStrength"
+ type="int32"
+ typedoc="percentage">
<doc>
The signal strength at the cellular radio, in percent of the maximum.
</doc>
</key>
- <key name="Cellular.Technology">
- <type>
- <!--<string-enum>
+ <key name="Cellular.Technology"
+ type="string">
+ <typedoc>
+ <string-enum>
<gsm/>
<umts/>
- </string-enum>-->
- string
- </type>
+ </string-enum>
+ </typedoc>
<doc>
The currently used Radio Access Technology.
</doc>
</key>
- <key name="Cellular.DataTechnology">
- <type>
- <!--<string-enum>
+ <key name="Cellular.DataTechnology"
+ type="string">
+ <typedoc>
+ <string-enum>
<gprs/>
<egprs/>
<umts/>
<hspa/>
- </string-enum>-->
- string
- </type>
+ </string-enum>
+ </typedoc>
<doc>
The currently used Radio Access Technology for data transfer.
</doc>
</key>
- <key name="Cellular.RegistrationStatus">
- <type>
- <!--<string-enum>
+ <key name="Cellular.RegistrationStatus"
+ type="string">
+ <typedoc>
+ <string-enum>
<home doc="Registered with the home network"/>
<roam doc="Roaming"/>
<no-sim doc="No SIM card is present"/>
<offline doc="Cellular radio is powered off"/>
<forbidden doc="Cellular access is denied, e.g., because of invalid SIM"/>
- </string-enum>-->
- string
- </type>
+ </string-enum>
+ </typedoc>
<doc>
The current cellular network registration status.
</doc>
@@ -362,37 +353,38 @@ Information about the alams set by the user. We assume, that the user
can disable or enable all the alarms. In addition, the user can enable
or disable each alarm individually.
</doc>
- <key name="UserAlarm.Present">
- <type>bool</type>
+ <key name="UserAlarm.Present"
+ type="bool">
<doc>
Indicates whether there is an upcoming alarm set by the user. Can be
true even if alarms are disabled.
</doc>
</key>
- <key name="UserAlarm.Enabled">
- <type>bool</type>
+ <key name="UserAlarm.Enabled"
+ type="bool">
<doc>
Indicates whether the alarms are enabled or disabled by the user. If
there are no alarms, UserAlarm.Enabled is true.
</doc>
</key>
- <key name="UserAlarm.NextTime">
- <type>int32</type>
+ <key name="UserAlarm.NextTime"
+ type="int32"
+ typedoc="time">
<doc>
The time of the next (enabled) alarm, in Unix time (the number of
seconds since January 1.1.1970 00:00 UTC). If no alarms are present,
the value is Unknown.
</doc>
</key>
- <key name="UserAlarm.NextDescription">
- <type>string</type>
+ <key name="UserAlarm.NextDescription"
+ type="string">
<doc>
The description of the next (enabled) alarm. If no alarms are present,
the value is Unknown.
</doc>
</key>
- <key name="UserAlarm.NextCookie">
- <type>int32</type>
+ <key name="UserAlarm.NextCookie"
+ type="int32">
<doc>
The cookie of the next (enabled) alarm. The cookie can be used for
referring to the alarm when communicating with timed.
@@ -404,27 +396,23 @@ Environment
Information about the environment the device is in.
</doc>
- <key name="Environment.SunRise">
- <type>
- <!--time-->
- int32
- </type>
+ <key name="Environment.SunRise"
+ type="int32"
+ typedoc="time">
<doc>
The time of sun rise.
</doc>
</key>
- <key name="Environment.SunSet">
- <type>
- <!--time-->
- int32
- </type>
+ <key name="Environment.SunSet"
+ type="int32"
+ typedoc="time">
<doc>
The time of sun set.
</doc>
</key>
<key name="Environment.Weather">
- <type>
- <!--<map>
+ <typedoc>
+ <map>
<allowed-keys>
<Condition>
<type>string</type>
@@ -517,9 +505,8 @@ The wind direction in degrees. North is 0, east is 90, etc.
</doc>
</WindDirectionD>
</allowed-keys>
- </map>-->
- string
- </type>
+ </map>
+ </typedoc>
<doc>
The current weather. See http://www.ominous-valve.com/wx_codes.txt for
more information about codifying weather conditions. We should lift
@@ -553,10 +540,8 @@ a hierarchy: InMeeting includes AtWork.
Not much is known about all this right now.
</doc>
- <key name="Use.Situations">
- <type>
- <!--string-list-->
- </type>
+ <key name="Use.Situations"
+ typedoc="string-list">
<doc>
The symbolic names of the currently active Situations. Note that more
than one situation might be active at the same time.
@@ -566,8 +551,8 @@ than one situation might be active at the same time.
<doc>
The current main usage mode of the device.
</doc>
- <type>
- <!--<string-enum>
+ <typedoc>
+ <string-enum>
<editing>
<doc>
The user is interacting closely with the device and is creating new
@@ -639,38 +624,37 @@ The user is doing system-wide maintenance work such as restoring a
backup or upgrading the OS software.
</doc>
</maintenance>
- </string-enum>-->
- string
- </type>
+ </string-enum>
+ </typedoc>
</key>
<key name="Use.ConnectedContacts">
- <type>
- <!--<uniform-list type="nepomuk-uri"/>-->
- </type>
+ <typedoc>
+ <uniform-list type="nepomuk-uri"/>
+ </typedoc>
<doc>
A list of URIs for contacts that the user is currently engaged in
conversations with. (The URIs point to Nepomuk objects.)
</doc>
</key>
<key name="Use.RecentDocuments">
- <type>
- <!--<uniform-list type="nepomuk-uri"/>-->
- </type>
+ <typedoc>
+ <uniform-list type="nepomuk-uri"/>
+ </typedoc>
<doc>
A list of URIs for recently used documents, at most ten elements long.
(The URIs point to Nepomuk objects.)
</doc>
</key>
- <key name="Use.Keyboarding">
- <type>bool</type>
+ <key name="Use.Keyboarding"
+ type="bool">
<doc>
Whether or not the user is ready to use the keyboard. This property
is true when a slideout keyboard has been slided out, for example, or
when a transformer laptop with a tablet mode is in "laptop mode".
</doc>
</key>
- <key name="Use.Phoning">
- <type>bool</type>
+ <key name="Use.Phoning"
+ type="bool">
<doc>
Whether or not the user is using the device as a telephone handset,
holding it next to ear and mouth.
@@ -683,37 +667,33 @@ Events
Information about current and upcoming calendar entries.
</doc>
<key name="Event.Current">
- <type>
- <!--<uniform-list type="nepomuk-uri"/>-->
- </type>
+ <typedoc>
+ <uniform-list type="nepomuk-uri"/>
+ </typedoc>
<doc>
The currently active events, as a list of Nepomuk URIs. The list
contains all events whose start time is earlier than or equal to the
current time, and whose end time is later.
</doc>
</key>
- <key name="Event.CurrentStart">
- <type>
- <!--time-->
- int32
- </type>
+ <key name="Event.CurrentStart"
+ type="int32"
+ typedoc="time">
<doc>
The earliest start time of the events in Events.Current.
</doc>
</key>
- <key name="Event.CurrentEnd">
- <type>
- <!--time-->
- int32
- </type>
+ <key name="Event.CurrentEnd"
+ type="int32"
+ typedoc="time">
<doc>
The latest end time of the events in Events.Current.
</doc>
</key>
<key name="Event.Next">
- <type>
- <!--<uniform-list type="nepomuk-uri"/>-->
- </type>
+ <typedoc>
+ <uniform-list type="nepomuk-uri"/>
+ </typedoc>
<doc>
The upcoming events, as a list of Nepomuk URIs. The list contains
those events whose start time is later than the current time and
@@ -721,20 +701,16 @@ closest to now. If there are multiple events in the list, they all
start at exactly the same time.
</doc>
</key>
- <key name="Event.NextStart">
- <type>
- <!--time-->
- int32
- </type>
+ <key name="Event.NextStart"
+ type="int32"
+ typedoc="time">
<doc>
The earliest start time of the events in Events.Next.
</doc>
</key>
- <key name="Event.NextEnd">
- <type>
- <!--time-->
- int32
- </type>
+ <key name="Event.NextEnd"
+ type="int32"
+ typedoc="time">
<doc>
The latest end time of the events in Events.Next.
</doc>
@@ -761,16 +737,15 @@ Information about the current user session. If there is no current
session, all values are null.
</doc>
<key name="Session.State">
- <type>
- <!--<string-enum>
+ <typedoc>
+ <string-enum>
<starting/>
<running/>
<suspended/>
<eclipsed/>
<terminating/>
- </string-enum>-->
- string
- </type>
+ </string-enum>
+ </typedoc>
<doc>
The state of the current session, as string valued enumeration. When
a session is started, it remains in the "starting" state until it is