1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
5\page qtpositioning-plugins.html
6\title Qt Positioning Plugins
7\brief Default Plugins and Implementing Qt Positioning plugins
9Qt Positioning provides the majority of its functionality through plugins.
10This document outlines how to develop a new position plugin.
12\section1 Default plugins
13Some plugins already ship with Qt. These are:
18 \li Wraps Android positioning subsystem. Available only on Android.
21 \li Wraps iOS and macOS positioning subsystems. Available only on Apple platforms supporting corelocation.
24 \li A \l {Qt Positioning GeoClue v2 plugin}{GeoClue v2} backend that
25 provides an interface to the GeoClue v2 D-Bus service.
28 \li A \l {Qt Positioning Gypsy plugin}{Gypsy} backend that provides
29 an interface to the Gypsy daemon.
32 \li Wraps WinRT positioning subsystem. Available only on WinRT and Windows10.
35 \li An \l {Qt Positioning NMEA plugin}{NMEA} backend that parses NMEA
36 streams from a GPS receiver to provide position updates. This plugin can
37 use serial port, socket or file as a source.
40 \li A backend providing only area monitoring functionalities via polling on position updates.
44\section1 Plugin Description
46Each plugin is described by a json file. The json describes the plugins capabilities and
47version. Below is an example of a json file used by the postionpoll plugin:
49\quotefile ../../../plugins/position/positionpoll/plugin.json
51The entries have the following meaning:
59 \li The unique name/key of the plugin. Each position plugin must have a unique name.
62 \li The provider name of the services. Multiple plugins may have the same name.
63 In such cases the Version string will be used to further distinguish the plugins.
66 \li Set to \c true if the plugin implements a \l QGeoPositionInfoSource.
69 \li Set to \c true if the plugin implements a \l QGeoSatelliteInfoSource.
72 \li Set to \c true if the plugin implements a \l QGeoAreaMonitorSource.
75 \li The plugin priority. If multiple plugins have the same provider name, the plugin
76 with the higest priority will be used.
79\section1 Implementing Plugins
81A plugin implementer needs to subclass \l QGeoPositionInfoSourceFactory and override one or more of
82its functions. If a plugin does not support a specific feature the function should return 0 or
83utilize the default implementation.
86 \li \l QGeoPositionInfoSourceFactory::areaMonitor()
87 \li \l QGeoPositionInfoSourceFactory::positionInfoSource()
88 \li \l QGeoPositionInfoSourceFactory::satelliteInfoSource()