QtRestClient
3.0.0
A library for generic JSON-based REST-APIs, with a mechanism to map JSON to Qt objects
|
1 #ifndef QTRESTCLIENT_GLOBAL_H
2 #define QTRESTCLIENT_GLOBAL_H
4 #include <QtCore/qglobal.h>
5 #include <QtCore/qhash.h>
6 #include <QtCore/qstring.h>
7 #include <QtCore/qobject.h>
8 #include <QtCore/qbytearray.h>
9 #include <QtCore/qloggingcategory.h>
12 # if defined(QT_BUILD_RESTCLIENT_LIB)
13 # define Q_RESTCLIENT_EXPORT Q_DECL_EXPORT
15 # define Q_RESTCLIENT_EXPORT Q_DECL_IMPORT
18 # define Q_RESTCLIENT_EXPORT
21 #if QT_CONFIG(thread) && QT_CONFIG(future)
22 #define QT_RESTCLIENT_USE_ASYNC
45 Q_RESTCLIENT_EXPORT Q_DECLARE_LOGGING_CATEGORY(logGlobal)
49 #endif // QTRESTCLIENT_GLOBAL_H
Q_RESTCLIENT_EXPORT RestClient * apiClient(const QString &name)
Returns the client for given API name.
The Namespace containing all classes of the QtRestClient module.
A class to perform requests to an API.
Q_RESTCLIENT_EXPORT bool addGlobalApi(const QString &name, RestClient *client)
Makes the given API available under the given name.
Q_RESTCLIENT_EXPORT void removeGlobalApi(const QString &name, bool deleteClient=true)
Removes a previously added API from the global list.
Q_RESTCLIENT_EXPORT RestClass * createApiClass(const QString &name, const QString &path, QObject *parent=nullptr)
Creates a new API class based on the client for the given API name.
Q_RESTCLIENT_EXPORT RestClass * apiRootClass(const QString &name)
Returns the clients root class for the given API name.
A class to define access to an API, with general settings.