summaryrefslogtreecommitdiff
path: root/src/location/places/provider/qplacemediareplyimpl.h
blob: ec63cae8845c028bf0836afd4b9394cf53fe618b (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 QPLACEMEDIAREPLYIMPL_H
#define QPLACEMEDIAREPLYIMPL_H

#include <QObject>
#include <QHash>

#include "../qplacemediareply.h"
#include "qplacerestreply.h"
#include "qplacejsonmediaparser.h"

namespace QT_PLACES_NAMESPACE {

class QPlaceMediaReplyImpl : public QPlaceMediaReply
{
    Q_OBJECT
public:
    explicit QPlaceMediaReplyImpl(QPlaceRestReply *reply, QObject *parent = 0);
    ~QPlaceMediaReplyImpl();
    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 QPlaceJSonMediaParser::Error &error,
                          const QString &errorMessage);

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

} // QT_PLACES_NAMESPACE

#endif // QPLACEMEDIAREPLYIMPL_H