File indexing completed on 2025-03-09 03:57:14

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2010-05-12
0007  * Description : OSM Nominatim backend for Reverse Geocoding
0008  *
0009  * SPDX-FileCopyrightText: 2010-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0010  * SPDX-FileCopyrightText: 2010      by Michael G. Hansen <mike at mghansen dot de>
0011  * SPDX-FileCopyrightText: 2010      by Gabriel Voicu <ping dot gabi at gmail dot com>
0012  *
0013  * SPDX-License-Identifier: GPL-2.0-or-later
0014  *
0015  * ============================================================ */
0016 
0017 #ifndef DIGIKAM_BACKEND_OSM_RG_H
0018 #define DIGIKAM_BACKEND_OSM_RG_H
0019 
0020 // Qt includes
0021 
0022 #include <QNetworkReply>
0023 #include <QList>
0024 #include <QUrl>
0025 #include <QMap>
0026 
0027 // Local includes
0028 
0029 #include "backend-rg.h"
0030 #include "digikam_export.h"
0031 
0032 namespace Digikam
0033 {
0034 
0035 class DIGIKAM_EXPORT BackendOsmRG : public RGBackend
0036 {
0037     Q_OBJECT
0038 
0039 public:
0040 
0041     explicit BackendOsmRG(QObject* const parent);
0042     ~BackendOsmRG()                                                         override;
0043 
0044     QMap<QString, QString> makeQMapFromXML(const QString& xmlData);
0045 
0046     void callRGBackend(const QList<RGInfo>& rgList,const QString& language) override;
0047     QString getErrorMessage()                                               override;
0048     QString backendName()                                                   override;
0049     void cancelRequests()                                                   override;
0050 
0051 private Q_SLOTS:
0052 
0053     void nextPhoto();
0054     void slotFinished(QNetworkReply* reply);
0055 
0056 private:
0057 
0058     class Private;
0059     Private* const d;
0060 };
0061 
0062 } // namespace Digikam
0063 
0064 #endif // DIGIKAM_BACKEND_OSM_RG_H