| Top |
| void | xdp_portal_location_monitor_start () |
| gboolean | xdp_portal_location_monitor_start_finish () |
| void | xdp_portal_location_monitor_stop () |
Location monitoring makes location information available via the “location-updated” signal.
void xdp_portal_location_monitor_start (XdpPortal *portal,XdpParent *parent,guint distance_threshold,guint time_threshold,XdpLocationAccuracy accuracy,XdpLocationMonitorFlags flags,GCancellable *cancellable,GAsyncReadyCallback callback,gpointer data);
Makes XdpPortal start monitoring location changes.
When the location changes, the “location-updated”. signal is emitted.
Use xdp_portal_location_monitor_stop() to stop monitoring.
Note that XdpPortal only maintains a single location monitor
at a time. If you want to change the distance_threshold
,
time_threshold
or accuracy
of the current monitor, you
first have to call xdp_portal_location_monitor_stop() to
stop monitoring.
portal |
||
parent |
a XdpParent, or |
[nullable] |
distance_threshold |
distance threshold, in meters |
|
time_threshold |
time threshold, in seconds |
|
accuracy |
desired accuracy |
|
flags |
options for this call |
|
cancellable |
optional GCancellable. |
[nullable] |
callback |
a callback to call when the request is done. |
[scope async] |
data |
data to pass to |
[closure] |
gboolean xdp_portal_location_monitor_start_finish (XdpPortal *portal,GAsyncResult *result,GError **error);
Finishes a location-monitor request, and returns the result in the form of boolean.
void
xdp_portal_location_monitor_stop (XdpPortal *portal);
Stops location monitoring that was started with
xdp_portal_location_monitor_start().