| 1 | /**************************************************************************** | 
| 2 | ** | 
| 3 | ** Copyright (C) 2015 The Qt Company Ltd. | 
| 4 | ** Contact: http://www.qt.io/licensing/ | 
| 5 | ** | 
| 6 | ** This file is part of the QtLocation module of the Qt Toolkit. | 
| 7 | ** | 
| 8 | ** $QT_BEGIN_LICENSE:LGPL3$ | 
| 9 | ** Commercial License Usage | 
| 10 | ** Licensees holding valid commercial Qt licenses may use this file in | 
| 11 | ** accordance with the commercial license agreement provided with the | 
| 12 | ** Software or, alternatively, in accordance with the terms contained in | 
| 13 | ** a written agreement between you and The Qt Company. For licensing terms | 
| 14 | ** and conditions see http://www.qt.io/terms-conditions. For further | 
| 15 | ** information use the contact form at http://www.qt.io/contact-us. | 
| 16 | ** | 
| 17 | ** GNU Lesser General Public License Usage | 
| 18 | ** Alternatively, this file may be used under the terms of the GNU Lesser | 
| 19 | ** General Public License version 3 as published by the Free Software | 
| 20 | ** Foundation and appearing in the file LICENSE.LGPLv3 included in the | 
| 21 | ** packaging of this file. Please review the following information to | 
| 22 | ** ensure the GNU Lesser General Public License version 3 requirements | 
| 23 | ** will be met: https://www.gnu.org/licenses/lgpl.html. | 
| 24 | ** | 
| 25 | ** GNU General Public License Usage | 
| 26 | ** Alternatively, this file may be used under the terms of the GNU | 
| 27 | ** General Public License version 2.0 or later as published by the Free | 
| 28 | ** Software Foundation and appearing in the file LICENSE.GPL included in | 
| 29 | ** the packaging of this file. Please review the following information to | 
| 30 | ** ensure the GNU General Public License version 2.0 requirements will be | 
| 31 | ** met: http://www.gnu.org/licenses/gpl-2.0.html. | 
| 32 | ** | 
| 33 | ** $QT_END_LICENSE$ | 
| 34 | ** | 
| 35 | ****************************************************************************/ | 
| 36 |  | 
| 37 | #include "qgeoserviceproviderfactory.h" | 
| 38 |  | 
| 39 | QT_BEGIN_NAMESPACE | 
| 40 |  | 
| 41 | /*! | 
| 42 |     \class QGeoServiceProviderFactory | 
| 43 |     \inmodule QtLocation | 
| 44 |     \ingroup QtLocation-impl | 
| 45 |     \since 5.6 | 
| 46 |     \deprecated | 
| 47 |  | 
| 48 |     \brief The QGeoServiceProviderFactory class is a factory class used as the | 
| 49 |     plugin interface for services related to geographical information. | 
| 50 |  | 
| 51 |     Implementers must provide a unique combination of providerName() and | 
| 52 |     providerVersion() per plugin. | 
| 53 |  | 
| 54 |     The other functions should be overridden if the plugin supports the | 
| 55 |     associated set of functionality. | 
| 56 |  | 
| 57 |     \sa QGeoServiceProviderFactoryV2 | 
| 58 | */ | 
| 59 |  | 
| 60 | /*! | 
| 61 | \fn QGeoServiceProviderFactory::~QGeoServiceProviderFactory() | 
| 62 |  | 
| 63 | Destroys this QGeoServiceProviderFactory instance. | 
| 64 | */ | 
| 65 |  | 
| 66 | /*! | 
| 67 |     Returns a new QGeoCodingManagerEngine instance, initialized with \a | 
| 68 |     parameters, which implements the location geocoding functionality. | 
| 69 |  | 
| 70 |     If \a error is not 0 it should be set to QGeoServiceProvider::NoError on | 
| 71 |     success or an appropriate QGeoServiceProvider::Error on failure. | 
| 72 |  | 
| 73 |     If \a errorString is not 0 it should be set to a string describing any | 
| 74 |     error which occurred. | 
| 75 |  | 
| 76 |     The default implementation returns 0, which causes a | 
| 77 |     QGeoServiceProvider::NotSupportedError in QGeoServiceProvider. | 
| 78 | */ | 
| 79 | QGeoCodingManagerEngine *QGeoServiceProviderFactory::createGeocodingManagerEngine(const QVariantMap ¶meters, | 
| 80 |                                                                                   QGeoServiceProvider::Error *error, | 
| 81 |                                                                                   QString *errorString) const | 
| 82 | { | 
| 83 |     Q_UNUSED(parameters); | 
| 84 |     Q_UNUSED(error); | 
| 85 |     Q_UNUSED(errorString); | 
| 86 |  | 
| 87 |     return 0; | 
| 88 | } | 
| 89 |  | 
| 90 | /*! | 
| 91 |     Returns a new QGeoMappingManagerEngine instance, initialized with \a | 
| 92 |     parameters, which implements mapping functionality. | 
| 93 |  | 
| 94 |     If \a error is not 0 it should be set to QGeoServiceProvider::NoError on | 
| 95 |     success or an appropriate QGeoServiceProvider::Error on failure. | 
| 96 |  | 
| 97 |     If \a errorString is not 0 it should be set to a string describing any | 
| 98 |     error which occurred. | 
| 99 |  | 
| 100 |     The default implementation returns 0, which causes a | 
| 101 |     QGeoServiceProvider::NotSupportedError in QGeoServiceProvider. | 
| 102 |  | 
| 103 |     \internal | 
| 104 | */ | 
| 105 | QGeoMappingManagerEngine *QGeoServiceProviderFactory::createMappingManagerEngine(const QVariantMap ¶meters, | 
| 106 |                                                                                  QGeoServiceProvider::Error *error, | 
| 107 |                                                                                  QString *errorString) const | 
| 108 | { | 
| 109 |     Q_UNUSED(parameters); | 
| 110 |     Q_UNUSED(error); | 
| 111 |     Q_UNUSED(errorString); | 
| 112 |  | 
| 113 |     return 0; | 
| 114 | } | 
| 115 |  | 
| 116 | /*! | 
| 117 |     Returns a new QGeoRoutingManagerEngine instance, initialized with \a | 
| 118 |     parameters, which implements routing functionality. | 
| 119 |  | 
| 120 |     If \a error is not 0 it should be set to QGeoServiceProvider::NoError on | 
| 121 |     success or an appropriate QGeoServiceProvider::Error on failure. | 
| 122 |  | 
| 123 |     If \a errorString is not 0 it should be set to a string describing any | 
| 124 |     error which occurred. | 
| 125 |  | 
| 126 |     The default implementation returns 0, which causes a | 
| 127 |     QGeoServiceProvider::NotSupportedError in QGeoServiceProvider. | 
| 128 | */ | 
| 129 | QGeoRoutingManagerEngine *QGeoServiceProviderFactory::createRoutingManagerEngine(const QVariantMap ¶meters, | 
| 130 |                                                                                  QGeoServiceProvider::Error *error, | 
| 131 |                                                                                  QString *errorString) const | 
| 132 |  | 
| 133 | { | 
| 134 |     Q_UNUSED(parameters); | 
| 135 |     Q_UNUSED(error); | 
| 136 |     Q_UNUSED(errorString); | 
| 137 |  | 
| 138 |     return 0; | 
| 139 | } | 
| 140 |  | 
| 141 | /*! | 
| 142 |     Returns a new QPlaceManagerEngine instance, initialized with \a | 
| 143 |     parameters, which implements the place searching functionality. | 
| 144 |  | 
| 145 |     If \a error is not 0 it should be set to QGeoServiceProvider::NoError on | 
| 146 |     success or an appropriate QGeoServiceProvider::Error on failure. | 
| 147 |  | 
| 148 |     If \a errorString is not 0 it should be set to a string describing any | 
| 149 |     error which occurred. | 
| 150 |  | 
| 151 |     The default implementation returns 0, which causes a | 
| 152 |     QGeoServiceProvider::NotSupportedError in QGeoServiceProvider. | 
| 153 | */ | 
| 154 | QPlaceManagerEngine *QGeoServiceProviderFactory::createPlaceManagerEngine(const QVariantMap ¶meters, | 
| 155 |                                                                           QGeoServiceProvider::Error *error, | 
| 156 |                                                                           QString *errorString) const | 
| 157 |  | 
| 158 | { | 
| 159 |     Q_UNUSED(parameters); | 
| 160 |     Q_UNUSED(error); | 
| 161 |     Q_UNUSED(errorString); | 
| 162 |  | 
| 163 |     return 0; | 
| 164 | } | 
| 165 |  | 
| 166 | /*! | 
| 167 |     \class QGeoServiceProviderFactoryV2 | 
| 168 |     \inmodule QtLocation | 
| 169 |     \ingroup QtLocation-impl | 
| 170 |     \since 5.11 | 
| 171 |  | 
| 172 |     \brief The QGeoServiceProviderFactoryV2 class is a factory class used as the | 
| 173 |     plugin interface for services related to geographical information. | 
| 174 |  | 
| 175 |     Implementers must provide a unique combination of providerName() and | 
| 176 |     providerVersion() per plugin. | 
| 177 |  | 
| 178 |     The other functions should be overridden if the plugin supports the | 
| 179 |     associated set of functionality. | 
| 180 | */ | 
| 181 |  | 
| 182 | /*! | 
| 183 | \fn QGeoServiceProviderFactoryV2::~QGeoServiceProviderFactoryV2() | 
| 184 |  | 
| 185 | Destroys this QGeoServiceProviderFactoryV2 instance. | 
| 186 | */ | 
| 187 |  | 
| 188 | /*! | 
| 189 |     Returns a new QNavigationManagerEngine instance, initialized with \a | 
| 190 |     parameters, which implements navigation functionality. | 
| 191 |  | 
| 192 |     If \a error is not nullptr, it should be set to QGeoServiceProvider::NoError on | 
| 193 |     success or an appropriate QGeoServiceProvider::Error on failure. | 
| 194 |  | 
| 195 |     If \a errorString is not nullptr, it should be set to a string describing any | 
| 196 |     error which occurred. | 
| 197 |  | 
| 198 |     The default implementation returns nullptr, which causes a | 
| 199 |     QGeoServiceProvider::NotSupportedError in QGeoServiceProvider. | 
| 200 | */ | 
| 201 | QNavigationManagerEngine *QGeoServiceProviderFactoryV2::createNavigationManagerEngine(const QVariantMap ¶meters, QGeoServiceProvider::Error *error, QString *errorString) const | 
| 202 | { | 
| 203 |     Q_UNUSED(parameters); | 
| 204 |     Q_UNUSED(error); | 
| 205 |     Q_UNUSED(errorString); | 
| 206 |  | 
| 207 |     return 0; | 
| 208 | } | 
| 209 |  | 
| 210 | /*! | 
| 211 |     Notify the plugin when the qml engine is ready. In this moment the plugins can use it | 
| 212 |     to register Image Providers. | 
| 213 |  | 
| 214 |     The default implementation does nothing. | 
| 215 |     \since 5.12 | 
| 216 | */ | 
| 217 | void QGeoServiceProviderFactoryV3::setQmlEngine(QQmlEngine *engine) | 
| 218 | { | 
| 219 |     Q_UNUSED(engine); | 
| 220 | } | 
| 221 |  | 
| 222 | QT_END_NAMESPACE | 
| 223 |  | 
| 224 |  |