6#include <PhosphorServiceNotifications/phosphorservicenotifications_export.h>
8#include <QDBusConnection>
95 Q_INVOKABLE
void invokeAction(uint
id,
const QString& actionKey,
const QString& activationToken = QString());
97 Q_INVOKABLE
bool reply(uint
id,
const QString& text);
106 uint
Notify(
const QString& appName, uint replacesId,
const QString& appIcon,
const QString& summary,
107 const QString& body,
const QStringList& actions,
const QVariantMap& hints,
int expireTimeout,
108 const QString& sender = QString());
141 void closeInternal(uint
id, uint reason);
147 std::unique_ptr<Private> d;
QString GetServerInformation(QString &vendor, QString &version, QString &specVersion)
void setExpiryPaused(uint id, bool paused)
Preserve the remaining lifetime while a surface is being read/edited.
void replySent(uint id, const QString &text)
Local confirmation only. Reply text is sent as a targeted D-Bus signal.
QList< Notification * > notifications() const
The live notifications, in ascending id order.
bool nameAcquired() const
True once this process owns the well-known name and is the active notification server.
NotificationServer(QObject *parent=nullptr)
Construct on the session bus under the spec's well-known name.
void ActivationToken(uint id, const QString &activationToken)
Carries the XDG activation token for id ahead of an ActionInvoked, so the activated app can raise its...
void defaultExpireTimeoutChanged()
NotificationServer(QDBusConnection connection, QString service, QObject *parent=nullptr)
Dependency-injected ctor (tests drive a private peer-to-peer bus, so the whole ingest path runs with ...
void ActionInvoked(uint id, const QString &actionKey)
The user invoked action actionKey on notification id.
void setDefaultExpireTimeout(int ms)
bool acquireName(bool replaceExisting=false)
(Re)acquire the well-known name.
void notificationAdded(Notification *notification)
A fresh notification (new id) was ingested and decoded.
~NotificationServer() override
void dismissNotification(uint id)
The user dismissed id (close reason 2): for a shell/toast to call when the user swipes or clicks the ...
void nameAcquiredChanged()
static QString objectPath()
void invokeAction(uint id, const QString &actionKey, const QString &activationToken=QString())
Invoke actionKey on id.
void NotificationClosed(uint id, uint reason)
A notification was closed; reason is the spec close-reason code (1 expired, 2 dismissed,...
static QString serviceName()
The well-known name + object path defined by the spec.
void CloseNotification(uint id)
QStringList GetCapabilities()
int defaultExpireTimeout() const
Timeout (ms) applied to a Notify whose expire_timeout is -1 (the spec's "server decides").
bool reply(uint id, const QString &text)
KDE inline-reply extension; only advertised actions accept replies.
uint Notify(const QString &appName, uint replacesId, const QString &appIcon, const QString &summary, const QString &body, const QStringList &actions, const QVariantMap &hints, int expireTimeout, const QString &sender=QString())
One live notification, decoded from an org.freedesktop.Notifications Notify call.
Definition Notification.h:36
Definition Notification.h:15