summaryrefslogtreecommitdiffstats
path: root/src/plugins/geoservices/nokia/placesv2/qplacesearchreplyhere.h
blob: d7fa6d338b0e4f61e8beb4c07c7c9a8c5c2aab2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright (C) 2015 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only

#ifndef QPLACESEARCHREPLYHERE_H
#define QPLACESEARCHREPLYHERE_H

#include <QtNetwork/QNetworkReply>
#include <QtLocation/QPlaceSearchReply>

QT_BEGIN_NAMESPACE

class QPlaceManagerEngineNokiaV2;
class QPlaceResult;
class QPlaceProposedSearchResult;

class QPlaceSearchReplyHere : public QPlaceSearchReply
{
    Q_OBJECT

public:
    explicit QPlaceSearchReplyHere(const QPlaceSearchRequest &request,
                                   QNetworkReply *reply,
                                   QPlaceManagerEngineNokiaV2 *parent);
    ~QPlaceSearchReplyHere();

private slots:
    void setError(QPlaceReply::Error error_, const QString &errorString);
    void replyFinished();
    void replyError(QNetworkReply::NetworkError error);

private:
    QPlaceResult parsePlaceResult(const QJsonObject &item) const;
    QPlaceProposedSearchResult parseSearchResult(const QJsonObject &item) const;

    QPlaceManagerEngineNokiaV2 *m_engine;
};

QT_END_NAMESPACE

#endif // QPLACESEARCHREPLYHERE_H