| 1 |
<?xml version="1.0"?> |
| 2 |
<!-- |
| 3 |
Copyright (C) 2018 Red Hat, Inc. |
| 4 |
|
| 5 |
SPDX-License-Identifier: LGPL-2.1-or-later |
| 6 |
|
| 7 |
This library is free software; you can redistribute it and/or |
| 8 |
modify it under the terms of the GNU Lesser General Public |
| 9 |
License as published by the Free Software Foundation; either |
| 10 |
version 2.1 of the License, or (at your option) any later version. |
| 11 |
|
| 12 |
This library is distributed in the hope that it will be useful, |
| 13 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 |
Lesser General Public License for more details. |
| 16 |
|
| 17 |
You should have received a copy of the GNU Lesser General Public |
| 18 |
License along with this library. If not, see <http://www.gnu.org/licenses/>. |
| 19 |
|
| 20 |
Author: Matthias Clasen <[email protected]> |
| 21 |
--> |
| 22 |
|
| 23 |
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd"> |
| 24 |
<!-- |
| 25 |
org.freedesktop.portal.Location: |
| 26 |
@short_description: Portal for obtaining information about the location |
| 27 |
|
| 28 |
This simple interface lets sandboxed applications query basic |
| 29 |
information about the location. |
| 30 |
|
| 31 |
This documentation describes version 1 of this interface. |
| 32 |
--> |
| 33 |
<interface name="org.freedesktop.portal.Location"> |
| 34 |
<!-- |
| 35 |
CreateSession: |
| 36 |
@options: Vardict with optional further information |
| 37 |
@handle: Object path for the created :ref:`org.freedesktop.portal.Session` object |
| 38 |
|
| 39 |
Create a location session. A successfully created session can at |
| 40 |
any time be closed using :ref:`org.freedesktop.portal.Session.Close`, or may |
| 41 |
at any time be closed by the portal implementation, which will be |
| 42 |
signalled via :ref:`org.freedesktop.portal.Session::Closed`. |
| 43 |
|
| 44 |
Supported keys in the @options vardict include: |
| 45 |
|
| 46 |
* ``session_handle_token`` (``s``) |
| 47 |
|
| 48 |
A string that will be used as the last element of the session handle. Must be a valid |
| 49 |
object path element. See the :ref:`org.freedesktop.portal.Session` documentation for |
| 50 |
more information about the session handle. |
| 51 |
|
| 52 |
* ``distance-threshold`` (``u``) |
| 53 |
|
| 54 |
Distance threshold in meters. Default is 0. |
| 55 |
|
| 56 |
* ``time-threshold`` (``u``) |
| 57 |
|
| 58 |
Time threshold in seconds. Default is 0. |
| 59 |
|
| 60 |
* ``accuracy`` (``u``) |
| 61 |
|
| 62 |
Requested accuracy. Default is ``EXACT``. Supported values: |
| 63 |
|
| 64 |
- ``NONE``: 0 |
| 65 |
- ``COUNTRY``: 1 |
| 66 |
- ``CITY``: 2 |
| 67 |
- ``NEIGHBORHOOD``: 3 |
| 68 |
- ``STREET``: 4 |
| 69 |
- ``EXACT``: 5 |
| 70 |
--> |
| 71 |
<method name="CreateSession"> |
| 72 |
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/> |
| 73 |
<arg type="a{sv}" name="options" direction="in"/> |
| 74 |
<arg type="o" name="handle" direction="out"/> |
| 75 |
</method> |
| 76 |
|
| 77 |
<!-- |
| 78 |
Start: |
| 79 |
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object |
| 80 |
@parent_window: Identifier for the application window, see :doc:`window-identifiers` |
| 81 |
@options: Vardict with optional further information |
| 82 |
@handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call |
| 83 |
|
| 84 |
Start the location session. |
| 85 |
An application can only attempt start a session once. |
| 86 |
|
| 87 |
Supported keys in the @options vardict include: |
| 88 |
|
| 89 |
* ``handle_token`` (``s``) |
| 90 |
|
| 91 |
A string that will be used as the last element of the @handle. Must be a valid |
| 92 |
object path element. See the :ref:`org.freedesktop.portal.Request` documentation for |
| 93 |
more information about the @handle. |
| 94 |
--> |
| 95 |
<method name="Start"> |
| 96 |
<arg type="o" name="session_handle" direction="in"/> |
| 97 |
<arg type="s" name="parent_window" direction="in"/> |
| 98 |
<annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QVariantMap"/> |
| 99 |
<arg type="a{sv}" name="options" direction="in"/> |
| 100 |
<arg type="o" name="handle" direction="out"/> |
| 101 |
</method> |
| 102 |
|
| 103 |
<!-- |
| 104 |
LocationUpdated: |
| 105 |
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object |
| 106 |
@location: Vardict with the current location data |
| 107 |
|
| 108 |
The LocationUpdated signal is emitted when the location has changed, as well |
| 109 |
as when the initial location has been determined. |
| 110 |
|
| 111 |
The following results may get returned via the @location: |
| 112 |
|
| 113 |
* ``Latitude`` (``d``) |
| 114 |
|
| 115 |
The latitude, in degrees. |
| 116 |
|
| 117 |
* ``Longitude`` (``d``) |
| 118 |
|
| 119 |
The longitude, in degrees. |
| 120 |
|
| 121 |
* ``Altitude`` (``d``) |
| 122 |
|
| 123 |
The altitude, in meters. |
| 124 |
|
| 125 |
* ``Accuracy`` (``d``) |
| 126 |
|
| 127 |
The accuracy, in meters. |
| 128 |
|
| 129 |
* ``Speed`` (``d``) |
| 130 |
|
| 131 |
The speed, in meters per second. |
| 132 |
|
| 133 |
* ``Heading`` (``d``) |
| 134 |
|
| 135 |
The heading, in degrees, going clockwise. North 0, East 90, South 180, West 270. |
| 136 |
|
| 137 |
* ``Timestamp`` (``(tt)``) |
| 138 |
|
| 139 |
The timestamp, as seconds and microseconds since the Unix epoch. |
| 140 |
--> |
| 141 |
<signal name="LocationUpdated"> |
| 142 |
<arg type="o" name="session_handle" direction="out"/> |
| 143 |
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/> |
| 144 |
<arg type="a{sv}" name="location" direction="out"/> |
| 145 |
</signal> |
| 146 |
|
| 147 |
<property name="version" type="u" access="read"/> |
| 148 |
</interface> |
| 149 |
</node> |