diff options
author | Zeeshan Ali <zeenix@collabora.co.uk> | 2019-03-09 19:49:09 +0100 |
---|---|---|
committer | Zeeshan Ali <zeenix@collabora.co.uk> | 2019-03-11 21:16:52 +0100 |
commit | 5741556d9401c400511069ebb84000583610c103 (patch) | |
tree | 19cda1a1febad980508080e81b931314273f6805 /interface/net.hadess.SensorProxy.xml | |
parent | 77d142bfd9736617a38e2bdcaf780ac7d2845016 (diff) | |
download | geoclue-5741556d9401c400511069ebb84000583610c103.tar.gz |
Move D-Bus interface XML & code into separate dir
This simplifies the code structure a bit and will make it easy to oxidize
the service in the future.
Diffstat (limited to 'interface/net.hadess.SensorProxy.xml')
-rw-r--r-- | interface/net.hadess.SensorProxy.xml | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/interface/net.hadess.SensorProxy.xml b/interface/net.hadess.SensorProxy.xml new file mode 100644 index 0000000..7abef9f --- /dev/null +++ b/interface/net.hadess.SensorProxy.xml @@ -0,0 +1,61 @@ +<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" +"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> + +<node> + + <!-- + net.hadess.SensorProxy.Compass: + @short_description: D-Bus proxy to access Compass sensors + + After checking the availability of the sensor type you want to monitor, + call the net.hadess.SensorProxy.ClaimCompass() method to start updating + the properties from the hardware readings. + + The object path will be "/net/hadess/SensorProxy/Compass". + --> + <interface name="net.hadess.SensorProxy.Compass"> + <!-- + HasCompass: + + Whether a supported compass is present on the system. + --> + <property name='HasCompass' type='b' access='read'/> + + <!-- + CompassHeading: + + The compass heading in degrees with respect to magnetic North direction, in + clockwise order. That means North becomes 0 degree, East: 90 degrees, + South: 180 degrees, West: 270 degrees and so on. When unknown, + it's set to -1.0. + --> + <property name='CompassHeading' type='d' access='read'/> + + <!-- + ClaimCompass: + + To start receiving compass heading updates from the proxy, the + application must call the net.hadess.SensorProxy.ClaimCompass() method. It can do so + whether a compass is available or not, updates would then be sent + when such a sensor appears. + + Applications should call net.hadess.SensorProxy.ReleaseCompass() when readings are + not required anymore. This prevents the sensor proxy from polling the device, thus + increasing wake-ups and reducing battery life. + + Note that Compass information is only available to Geoclue by default, which will + proxy the magnetic heading information, and transform it to True North heading. + --> + <method name="ClaimCompass"/> + + <!-- + ReleaseCompass: + + This should be called as soon as readings are not required anymore. Note + that resources are freed up if a monitoring application exits without + calling net.hadess.SensorProxy.ReleaseCompass(), crashes or the sensor disappears. + --> + <method name="ReleaseCompass"/> + + </interface> +</node> |