summaryrefslogtreecommitdiff
path: root/src/location/places/provider/qplacesearchreplyimpl.h
blob: 3dccb603cbb56e79134f1ecdd4404bd71e0fe7c2 (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
#ifndef QPLACESEARCHREPLYIMPL_H
#define QPLACESEARCHREPLYIMPL_H

#include <QObject>
#include <QHash>

#include "../qplacesearchreply.h"
#include "qplacerestreply.h"
#include "qplacejsonsearchparser.h"

namespace QT_PLACES_NAMESPACE {

class QPlaceSearchReplyImpl : public QPlaceSearchReply
{
    Q_OBJECT
public:
    explicit QPlaceSearchReplyImpl(QPlaceRestReply *reply, QObject *parent = 0);
    ~QPlaceSearchReplyImpl();
    void abort();

Q_SIGNALS:
    void processingFinished(QPlaceReply *reply);
    void processingError(QPlaceReply *reply, const Error &error, const QString &errorMessage);

private slots:
    void restError(QPlaceRestReply::Error error);
    void predictionsReady(const QPlaceJSonSearchParser::Error &error,
                          const QString &errorMessage);

private:
    QPlaceRestReply *restReply;
    QPlaceJSonSearchParser *parser;
};

} // QT_PLACES_NAMESPACE

#endif // QPLACESEARCHREPLYIMPL_H