KUnifiedPush
nextpushprovider.cpp
22 connect(&m_sseStream, &ServerSentEventsStream::messageReceived, this, [this](const SSEMessage &sse) {
28 msg.content = QByteArray::fromBase64(msgObj.value(QLatin1String("message")).toString().toUtf8());
108 Q_EMIT clientRegistered(client, ProviderRejected, QString()); // TODO do we get an error message in this case?
161QNetworkRequest NextPushProvider::prepareRequest(const char *restCmd, const QString &restArg) const
165 path += QLatin1String("/index.php/apps/uppush/") + QLatin1String(restCmd) + QLatin1Char('/') + restArg;
169 req.setRawHeader("Authorization", "Basic " + QByteArray(m_userName.toUtf8() + ':' + m_appPassword.toUtf8()).toBase64());
Base class for push provider protocol implementations.
Definition abstractpushprovider.h:24
void connected()
Emitted after the connection to the push provider has been established successfully.
void clientUnregistered(const KUnifiedPush::Client &client, KUnifiedPush::AbstractPushProvider::Error error=NoError)
Emitted after successful client unregistration.
void disconnected(KUnifiedPush::AbstractPushProvider::Error error, const QString &errorMsg={})
Emitted after the connection to the push provider disconnected or failed to be established.
void clientRegistered(const KUnifiedPush::Client &client, KUnifiedPush::AbstractPushProvider::Error error=NoError, const QString &errorMsg={})
Emitted after successful client registration.
@ ProviderRejected
communication worked, but the provider refused to complete the operation
Definition abstractpushprovider.h:31
void registerClient(const Client &client) override
Register a new client with the provider.
Definition nextpushprovider.cpp:88
void disconnectFromProvider() override
Disconnect and existing connection to the push provider.
Definition nextpushprovider.cpp:79
void unregisterClient(const Client &client) override
Unregister a client from the provider.
Definition nextpushprovider.cpp:124
void connectToProvider() override
Attempt to establish a connection to the push provider.
Definition nextpushprovider.cpp:46
bool loadSettings(const QSettings &settings) override
Load connection settings.
Definition nextpushprovider.cpp:36
char * toString(const EngineQuery &query)
QString path(const QString &relativePath)
int64_t Id
QByteArray fromBase64(const QByteArray &base64, Base64Options options)
QByteArray toBase64(Base64Options options) const const
QString localHostName()
Compact
QJsonDocument fromJson(const QByteArray &json, QJsonParseError *error)
QJsonObject object() const const
QByteArray toJson(JsonFormat format) const const
iterator insert(QLatin1StringView key, const QJsonValue &value)
QJsonValue value(QLatin1StringView key) const const
QString toString() const const
QNetworkReply * deleteResource(const QNetworkRequest &request)
QNetworkReply * get(const QNetworkRequest &request)
QNetworkReply * put(const QNetworkRequest &request, QHttpMultiPart *multiPart)
NoError
void finished()
ContentTypeHeader
Q_EMITQ_EMIT
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
void setValue(QAnyStringView key, const QVariant &value)
QVariant value(QAnyStringView key) const const
bool isEmpty() const const
QByteArray toUtf8() const const
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
bool isValid() const const
QString path(ComponentFormattingOptions options) const const
void setPath(const QString &path, ParsingMode mode)
QString toString(FormattingOptions options) const const
QString toString() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:46:50 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:46:50 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.