diff options
Diffstat (limited to 'src/location/places/qplacereply.h')
-rw-r--r-- | src/location/places/qplacereply.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/src/location/places/qplacereply.h b/src/location/places/qplacereply.h new file mode 100644 index 00000000..bba2fdbd --- /dev/null +++ b/src/location/places/qplacereply.h @@ -0,0 +1,63 @@ +#ifndef QPLACEREPLY_H +#define QPLACEREPLY_H + +#include "qplaceglobal.h" +#include <QObject> + +namespace QT_PLACES_NAMESPACE { + +class QPlaceReplyPrivate; +class Q_PLACES_EXPORT QPlaceReply : public QObject +{ + Q_OBJECT +public: + enum Error { + NoError, + DoesNotExistError, + PlaceDoesNotExistError, + CategoryDoesNotExistError, + CommunicationError, + ParseError, + PermissionsError, + UnsupportedError, + CancelError, + UnknownError + }; + + enum Type { + Reply, + PlaceDetailsReply, + PlaceSearchReply, + TextPredictionReply, + ReviewReply, + MediaReply + }; + + virtual ~QPlaceReply(); + + bool isFinished() const; + + virtual Type type() const; + + QString errorString() const; + QPlaceReply::Error error() const; + +public Q_SLOTS: + virtual void abort(); + +Q_SIGNALS: + void finished(); + void error(QPlaceReply::Error error, const QString &errorString = QString()); + +protected: + QPlaceReply(QObject *parent = 0); + void setFinished(bool finished); + void setError(QPlaceReply::Error error, const QString &errorString); + +private: + QPlaceReplyPrivate *d; +}; + +} // QT_PLACES_NAMESPACE + +#endif // QPLACEREPLY_H |