2#include <ossia/network/context.hpp>
6#if QT_VERSION > QT_VERSION_CHECK(6, 10, 0)
14#include <nano_observer.hpp>
16class QNetworkAccessManager;
17class QOAuthHttpServerReplyHandler;
18class QOAuth2AuthorizationCodeFlow;
21class OSSIA_EXPORT qml_oauth
23 ,
public Nano::Observer
33 void granted() E_SIGNAL(OSSIA_EXPORT, granted);
35 QString token() const noexcept;
36 void setToken(const QString& tk) noexcept;
37 void tokenChanged(QString token) E_SIGNAL(OSSIA_EXPORT, tokenChanged, token);
39 QString clientIdentifier() const noexcept;
40 void setClientIdentifier(const QString& tk) noexcept;
41 void clientIdentifierChanged(QString token)
42 E_SIGNAL(OSSIA_EXPORT, clientIdentifierChanged, token);
44 QString clientIdentifierSharedKey() const noexcept;
45 void setClientIdentifierSharedKey(const QString& tk) noexcept;
46 void clientIdentifierSharedKeyChanged(QString token)
47 E_SIGNAL(OSSIA_EXPORT, clientIdentifierSharedKeyChanged, token);
49 QUrl authorizationUrl() const noexcept;
50 void setAuthorizationUrl(const QUrl& tk) noexcept;
51 void authorizationUrlChanged(QUrl token)
52 E_SIGNAL(OSSIA_EXPORT, authorizationUrlChanged, token);
54 QUrl accessTokenUrl() const noexcept;
55 void setAccessTokenUrl(const QUrl& tk) noexcept;
56 void accessTokenUrlChanged(QUrl token)
57 E_SIGNAL(OSSIA_EXPORT, accessTokenUrlChanged, token);
59 QStringList requestedScopeTokens() const noexcept;
60 void setRequestedScopeTokens(const QStringList& tk) noexcept;
61 void requestedScopeTokensChanged(QStringList token)
62 E_SIGNAL(OSSIA_EXPORT, requestedScopeTokensChanged, token);
64 void requestFailed(QString error) E_SIGNAL(OSSIA_EXPORT, requestFailed, error);
65 void send(QString verb, QUrl url, QJSValue config, QJSValue callback);
68 W_PROPERTY(QString, accessToken READ token WRITE setToken NOTIFY tokenChanged)
69 W_PROPERTY(QUrl, accessTokenUrl READ accessTokenUrl WRITE setAccessTokenUrl NOTIFY accessTokenUrlChanged)
70 W_PROPERTY(QUrl, authorizationUrl READ authorizationUrl WRITE setAuthorizationUrl NOTIFY authorizationUrlChanged)
71 W_PROPERTY(QString, clientIdentifierSharedKey READ clientIdentifierSharedKey WRITE setClientIdentifierSharedKey NOTIFY clientIdentifierSharedKeyChanged)
72 W_PROPERTY(QString, clientIdentifier READ clientIdentifier WRITE setClientIdentifier NOTIFY clientIdentifierChanged)
73 W_PROPERTY(QStringList, requestedScopeTokens READ requestedScopeTokens WRITE setRequestedScopeTokens NOTIFY requestedScopeTokensChanged)
82 QNetworkAccessManager* m_networkManager{};
83 QOAuth2AuthorizationCodeFlow* m_oauth{};
84 QOAuthHttpServerReplyHandler* m_replyHandler{};
89Q_DECLARE_METATYPE(ossia::qt::qml_oauth*)
90W_REGISTER_ARGTYPE(ossia::qt::qml_oauth*)
Definition qml_device.cpp:43