Files
ModemManager/introspection/mm-modem-location.xml
T
Dan Williams 3232a3f7d6 api: better handling of Location API security issues
Since D-Bus signals cannot by nature be restricted to authenticated
clients (unless using private D-Bus connections) we can handle the
security a bit differently here.  Since the Enable() call can be
authenticated, we'll trust the client to say whether higher
security should be used by disallowing location update signals.  This
does mean the client will have to poll for location updates, but at
least then clients requesting location information can be
authenticated.
2010-03-05 18:17:51 -08:00

123 lines
5.3 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<node name="/" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<interface name="org.freedesktop.ModemManager.Modem.Location">
<tp:docstring>
This interface allows devices to provide location information to client
applications. Not all devices can provide this information, or even if
they do, they may not be able to provide it while a data session is
active.
</tp:docstring>
<property name="Capabilities" type="u" access="read" tp:type="MM_MODEM_LOCATION_CAPABILITIES">
<tp:docstring>
Location capabilities of the device.
</tp:docstring>
</property>
<property name="Enabled" type="b" access="read">
<tp:docstring>
TRUE if location information gathering is enabled for this device, FALSE
if it is disabled. When disabled, the device will not provide location
information.
</tp:docstring>
</property>
<method name="Enable">
<tp:docstring>
Enable or disable location information gathering. This method may
require the client to authenticate itself.
</tp:docstring>
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_modem_location_enable"/>
<arg name="enable" type="b" direction="in">
<tp:docstring>
TRUE to enable location information gathering, FALSE to disable.
</tp:docstring>
</arg>
<arg name="signal_location" type="b" direction="in">
<tp:docstring>
When enabling location information gathering, this argument controls
whether the device emits signals with new location information or not.
When signals are emitted, any client application (including malicious
ones!) can listen for location updates unless D-Bus permissions
restrict these signals from certain users. If further security is
desired, this argument can be set to FALSE to disable location
updates via D-Bus signals and require applications to call
authenticated APIs (like GetLocation) to get location information.
This argument is ignored when disabling location information
gathering.
</tp:docstring>
</arg>
</method>
<method name="GetLocation">
<tp:docstring>
Return current location information, if any. This method may require
the client to authenticate itself.
</tp:docstring>
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_modem_location_get_location"/>
<arg name="Location" type="a{uv}" access="read" direction="out" tp:type="Location_Information_Map">
<tp:docstring>
Dict of available location information when location information
gathering is enabled. If the modem supports multiple location types
it may return more than one here.
</tp:docstring>
</arg>
</method>
<property name="SignalsLocation" type="b" access="read">
<tp:docstring>
TRUE if location updates will be emitted via D-Bus signals, FALSE
if location updates will not be emitted. See the Enable method for
more information.
</tp:docstring>
</property>
<property name="Location" type="a{uv}" access="read" tp:type="Location_Information_Map">
<tp:docstring>
Dict of available location information when location information
gathering is enabled. If the modem supports multiple location types
it may return more than one here. Note that if the device was told
not to emit updated location information when location information
gathering was initially enabled, this property may not return
any location information for security reasons.
</tp:docstring>
</property>
<tp:mapping name="Location_Information_Map">
<tp:docstring>
A mapping from location type to type-specific location information.
</tp:docstring>
<tp:member type="u" name="Type" tp:type="MM_MODEM_LOCATION_CAPABILITIES">
<tp:docstring>
Identifies the type and format of the associated location information. Contrary to the value description, this is not a bitfield but uses the same values as the MM_MODEM_LOCATION_CAPABILITIES bitfield.
</tp:docstring>
</tp:member>
<tp:member type="v" name="Data">
<tp:docstring>
Contains type-specific location information. GSM_LAC_CI data is a string with the format "LAC,CI" (ex "84CD,00D30156") while GPS_NMEA is a string in NMEA-compatible format.
</tp:docstring>
</tp:member>
</tp:mapping>
<tp:flags name="MM_MODEM_LOCATION_CAPABILITIES" value-prefix="MM_MODEM_LOCATION_CAPABILITY" type="u">
<tp:flag suffix="UNKNOWN" value="0x0">
<tp:docstring>Unknown or no capabilties.</tp:docstring>
</tp:flag>
<tp:flag suffix="ANY" value="0x1">
<tp:docstring>Reserved.</tp:docstring>
</tp:flag>
<tp:flag suffix="GPS_NMEA" value="0x2">
<tp:docstring>The device is capable of providing GPS NMEA-format location information.</tp:docstring>
</tp:flag>
<tp:flag suffix="GSM_LAC_CI" value="0x4">
<tp:docstring>The device is capable of providing GSM Location Area Code/Cell ID location information.</tp:docstring>
</tp:flag>
</tp:flags>
</interface>
</node>