KUnifiedPush
ntfypushprovider.cpp
24 connect(&m_sseStream, &ServerSentEventsStream::messageReceived, this, [this](const SSEMessage &sse) {
105 const QString topic = "up"_L1 + QLatin1StringView(QUuid::createUuid().toByteArray().toBase64(QByteArray::Base64UrlEncoding | QByteArray::OmitTrailingEquals)).left(12);
158 query.addQueryItem(QStringLiteral("since"), m_lastMessageId.isEmpty() ? QStringLiteral("all") : m_lastMessageId);
160 // ntfy's "priority" comes close to this, but first would need RFC 8030 compliant urgency support for incoming messages
161 // before we can add a corresponding filter here, otherwise Web Push message will not get correct urgency levels assigned
Base class for push provider protocol implementations.
Definition abstractpushprovider.h:26
virtual void doChangeUrgency(Urgency urgency)
Re-implement if urgency leve changes are done as a separate command.
Definition abstractpushprovider.cpp:40
void connected()
Emitted after the connection to the push provider has been established successfully.
Urgency urgency() const
The urgency level currently used by this provider.
Definition abstractpushprovider.cpp:51
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 urgencyChanged()
Emitted when the urgency level change request has been executed.
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:33
void connectToProvider(Urgency urgency) override
Attempt to establish a connection to the push provider.
Definition ntfypushprovider.cpp:87
void registerClient(const Client &client) override
Register a new client with the provider.
Definition ntfypushprovider.cpp:100
void resetSettings(QSettings &settings) override
Reset any internal state for a fresh setup connecting to a different push server instance.
Definition ntfypushprovider.cpp:81
bool loadSettings(const QSettings &settings) override
Load connection settings.
Definition ntfypushprovider.cpp:69
void unregisterClient(const Client &client) override
Unregister a client from the provider.
Definition ntfypushprovider.cpp:124
void disconnectFromProvider() override
Disconnect and existing connection to the push provider.
Definition ntfypushprovider.cpp:92
KSERVICE_EXPORT KService::List query(FilterFunc filterFunc)
QString path(const QString &relativePath)
int64_t Id
Base64UrlEncoding
QByteArray fromBase64(const QByteArray &base64, Base64Options options)
bool isEmpty() const const
QJsonDocument fromJson(const QByteArray &json, QJsonParseError *error)
QJsonObject object() const const
bool isEmpty() const const
QJsonValue value(QLatin1StringView key) const const
QJsonObject toObject() const const
QString toString() const const
QLatin1StringView left(qsizetype length) const const
NoError
void finished()
Q_EMITQ_EMIT
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
void beginGroup(QAnyStringView prefix)
void remove(QAnyStringView key)
void setValue(QAnyStringView key, const QVariant &value)
QVariant value(QAnyStringView key) const const
bool endsWith(QChar c, Qt::CaseSensitivity cs) const const
void push_back(QChar ch)
QByteArray toUtf8() const const
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
QString path(ComponentFormattingOptions options) const const
void setPath(const QString &path, ParsingMode mode)
void setQuery(const QString &query, ParsingMode mode)
QString toString(FormattingOptions options) const const
QUuid createUuid()
QString toString() const const
QStringList toStringList() const const
QUrl toUrl() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Apr 25 2025 12:05:39 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Apr 25 2025 12:05:39 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.