// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only

/*!
\page qtlocation-geoservices.html
\title Qt Location GeoServices
\brief Implementing Qt Location GeoService plugins

The Qt Location provides the majority of its functionality through GeoService plugins. This
document outlines how to develop a new GeoService plugin.

\section1 Plugin Description

Each plugin is described by a json file. The json describes the plugins capabilities and
version. Below is an example of a json file used by the OpenStreenMap plugin:


\quotefile ../../../plugins/geoservices/osm/osm_plugin.json

The entries have the following meaning:

\table
    \header
        \li Key
        \li Description
    \row
        \li Keys
        \li The unique name/key of the plugin. Each GeoService plugin must have a unique name.
    \row
        \li Provider
        \li The provider name of the services. Multiple plugins may have the same name.
            In such cases the Version string will be used to further distinguish the plugins.
    \row
        \li Experimental
        \li Marks the service plugin as experimental. API developers may choose to ignore
            such plugins when instanciating \l QGeoServiceProvider::QGeoServiceProvider().
    \row
        \li Version
        \li The plugin version. If multiple plugins have the same provider name, the plugin
            with the higest version will be used.
    \row
        \li Features
        \li List of features provided by the plugin/service. Each feature is a string
        representation of the corresponding features in \l QGeoServiceProvider. For more
        details see \l QGeoServiceProvider::routingFeatures(),
        \l QGeoServiceProvider::geocodingFeatures() and \l QGeoServiceProvider::placesFeatures().

\endtable

\section1 Implementing Plugins

A plugin implementer needs to subclass QGeoServiceProviderFactory and as
many of the ManagerEngine classes as they want to provide implementations for.

Subclassing QGeoServiceProviderFactory will only involves overriding of one of the following
methods:

\list
    \li \l QGeoServiceProviderFactory::createGeocodingManagerEngine()
    \li \l QGeoServiceProviderFactory::createRoutingManagerEngine()
    \li \l QGeoServiceProviderFactory::createPlaceManagerEngine()
\endlist

If a plugin does not provide an engine the relevant function should return \nullptr.

\annotatedlist QtLocation-impl

*/
