1 #ifndef QTRESTCLIENT_IPAGING_H
2 #define QTRESTCLIENT_IPAGING_H
4 #include "QtRestClient/qtrestclient_global.h"
6 #include <QtCore/qjsonarray.h>
7 #include <QtCore/qjsonvalue.h>
8 #include <QtCore/qcborvalue.h>
9 #include <QtCore/qcborarray.h>
10 #include <QtCore/qurl.h>
11 #include <QtCore/qvariant.h>
13 #ifndef Q_RESTCLIENT_NO_JSON_SERIALIZER
14 namespace QtJsonSerializer {
30 virtual std::variant<QCborArray, QJsonArray> items()
const = 0;
33 virtual qint64 total()
const;
35 virtual qint64 offset()
const;
37 virtual bool hasNext()
const = 0;
39 virtual QUrl next()
const = 0;
41 virtual bool hasPrevious()
const;
43 virtual QUrl previous()
const;
45 virtual QVariantMap properties()
const = 0;
47 virtual std::variant<QCborValue, QJsonValue> originalData()
const = 0;
59 std::variant<QCborArray, QJsonArray> items()
const final;
60 std::variant<QCborValue, QJsonValue> originalData()
const final;
72 std::variant<QCborArray, QJsonArray> items()
const final;
73 std::variant<QCborValue, QJsonValue> originalData()
const final;
86 #ifndef Q_RESTCLIENT_NO_JSON_SERIALIZER
89 virtual IPaging *createPaging(
const std::variant<QCborValue, QJsonValue> &data)
const = 0;
97 #endif // QTRESTCLIENT_IPAGING_H