diff options
Diffstat (limited to 'src/location/places/provider/qplacetextpredictionreplyimpl.h')
-rw-r--r-- | src/location/places/provider/qplacetextpredictionreplyimpl.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/location/places/provider/qplacetextpredictionreplyimpl.h b/src/location/places/provider/qplacetextpredictionreplyimpl.h new file mode 100644 index 00000000..0e1b7655 --- /dev/null +++ b/src/location/places/provider/qplacetextpredictionreplyimpl.h @@ -0,0 +1,37 @@ +#ifndef QPLACETEXTPREDICTIONREPLYIMPL_H +#define QPLACETEXTPREDICTIONREPLYIMPL_H + +#include <QObject> +#include <QHash> + +#include "../qplacetextpredictionreply.h" +#include "qplacerestreply.h" +#include "qplacejsontextpredictionparser.h" + +namespace QT_PLACES_NAMESPACE { + +class QPlaceTextPreditionReplyImpl : public QPlaceTextPredictionReply +{ + Q_OBJECT +public: + explicit QPlaceTextPreditionReplyImpl(QPlaceRestReply *reply, QObject *parent = 0); + ~QPlaceTextPreditionReplyImpl(); + 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 QPlaceJSonTextPredictionParser::Error &error, + const QString &errorMessage); + +private: + QPlaceRestReply *restReply; + QPlaceJSonTextPredictionParser *parser; +}; + +} // QT_PLACES_NAMESPACE + +#endif // QPLACETEXTPREDICTIONREPLYIMPL_H |