[Notifications] Add ServerInfo class
ClosedPublic

Authored by broulik on Dec 5 2019, 7:40 PM.

Details

Summary

It can be used to query information about the current notification server (vendor, name, version, notification spec version).
This will be used by the plasmoid and KCM to indicate when notifications are currently unavailable or provided by a different notification service from Plasma.
Also notify valid changing at runtime when ownership is lost and allow calling init() again to try reclaiming it.

Diff Detail

Repository
R120 Plasma Workspace
Lint
Lint Skipped
Unit
Unit Tests Skipped
broulik created this revision.Dec 5 2019, 7:40 PM
Restricted Application added a project: Plasma. · View Herald TranscriptDec 5 2019, 7:40 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Dec 5 2019, 7:40 PM
broulik added inline comments.Dec 5 2019, 9:26 PM
libnotificationmanager/server_p.cpp
93–95

Just noticed I can probably reuse the inhibition service watcher rather than do a wildcard watch here?

broulik added inline comments.Dec 9 2019, 5:26 PM
libnotificationmanager/server_p.cpp
93–95

Actually not, I misread the code and documentation:

This signal is emitted by the D-Bus server when *this application loses ownership* of the bus service name given by service.

So all is good \o/

I would like to have something like this in KNotifications to be able to check which features/hints the server supports without doing the DBus stuff myself

I would like to have something like this in KNotifications to be able to check which features/hints the server supports without doing the DBus stuff myself

This is unrelated to this but yeah I'd like a KNotificationCapabilities class which is actually in the KNotificationV2 todo, see "new APIs section"

broulik updated this revision to Diff 71345.Dec 12 2019, 10:43 AM
  • Drop Q_INVOKABLE
  • Rename slot
  • Add missing ServerInfo file
davidedmundson accepted this revision.Dec 12 2019, 11:14 AM
This revision is now accepted and ready to land.Dec 12 2019, 11:14 AM
This revision was automatically updated to reflect the committed changes.