digiKam
backend-geonames-rg.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date : 2010-05-12
7  * Description : Backend for reverse geocoding using geonames.org (non-US)
8  *
9  * Copyright (C) 2010 by Michael G. Hansen <mike at mghansen dot de>
10  * Copyright (C) 2010 by Gabriel Voicu <ping dot gabi at gmail dot com>
11  *
12  * This program is free software; you can redistribute it
13  * and/or modify it under the terms of the GNU General
14  * Public License as published by the Free Software Foundation;
15  * either version 2, or (at your option)
16  * any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * ============================================================ */
24 
25 #ifndef DIGIKAM_BACKEND_GEONAMES_RG_H
26 #define DIGIKAM_BACKEND_GEONAMES_RG_H
27 
28 // Qt includes
29 
30 #include <QNetworkReply>
31 #include <QString>
32 #include <QList>
33 #include <QUrl>
34 #include <QMap>
35 
36 // Local includes
37 
38 #include "backend-rg.h"
39 #include "digikam_export.h"
40 
41 namespace Digikam
42 {
43 
44 class DIGIKAM_EXPORT BackendGeonamesRG : public RGBackend
45 {
46  Q_OBJECT
47 
48 public:
49 
50  explicit BackendGeonamesRG(QObject* const parent);
51  ~BackendGeonamesRG() override;
52 
53  QMap<QString, QString> makeQMapFromXML(const QString& xmlData);
54 
55  void callRGBackend(const QList<RGInfo>& rgList, const QString& language) override;
56  QString getErrorMessage() override;
57  QString backendName() override;
58  void cancelRequests() override;
59 
60 private Q_SLOTS:
61 
62  void nextPhoto();
63  void slotFinished(QNetworkReply* reply);
64 
65 private:
66 
67  class Private;
68  Private* const d;
69 };
70 
71 } // namespace Digikam
72 
73 #endif // DIGIKAM_BACKEND_GEONAMES_RG_H
This class calls Geonames' reverse geocoding service.
Definition: backend-geonames-rg.h:45
This class is a base class for Open Street Map and Geonames backends.
Definition: backend-rg.h:37
Definition: piwigotalker.h:48
Definition: datefolderview.cpp:43