D25772: [Notifications] Add ServerInfo class

2019-12-12 Thread Kai Uwe Broulik
This revision was automatically updated to reflect the committed changes.
Closed by commit R120:147debe3758f: [Notifications] Add ServerInfo class 
(authored by broulik).

REPOSITORY
  R120 Plasma Workspace

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D25772?vs=71345&id=71348

REVISION DETAIL
  https://phabricator.kde.org/D25772

AFFECTED FILES
  libnotificationmanager/CMakeLists.txt
  libnotificationmanager/declarative/notificationmanagerplugin.cpp
  libnotificationmanager/server.cpp
  libnotificationmanager/server.h
  libnotificationmanager/server_p.cpp
  libnotificationmanager/server_p.h
  libnotificationmanager/serverinfo.cpp
  libnotificationmanager/serverinfo.h

To: broulik, #plasma, davidedmundson
Cc: nicolasfella, plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, 
fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D25772: [Notifications] Add ServerInfo class

2019-12-12 Thread Kai Uwe Broulik
broulik updated this revision to Diff 71345.
broulik added a comment.


  - Drop `Q_INVOKABLE`
  - Rename slot
  - Add missing `ServerInfo` file

REPOSITORY
  R120 Plasma Workspace

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D25772?vs=70976&id=71345

REVISION DETAIL
  https://phabricator.kde.org/D25772

AFFECTED FILES
  libnotificationmanager/CMakeLists.txt
  libnotificationmanager/declarative/notificationmanagerplugin.cpp
  libnotificationmanager/server.cpp
  libnotificationmanager/server.h
  libnotificationmanager/server_p.cpp
  libnotificationmanager/server_p.h
  libnotificationmanager/serverinfo.cpp
  libnotificationmanager/serverinfo.h

To: broulik, #plasma
Cc: nicolasfella, plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, 
fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D25772: [Notifications] Add ServerInfo class

2019-12-09 Thread Kai Uwe Broulik
broulik added a comment.


  In D25772#574317 , @nicolasfella 
wrote:
  
  > 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"

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D25772

To: broulik, #plasma
Cc: nicolasfella, plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, 
fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D25772: [Notifications] Add ServerInfo class

2019-12-09 Thread Nicolas Fella
nicolasfella added a comment.


  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

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D25772

To: broulik, #plasma
Cc: nicolasfella, plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, 
fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D25772: [Notifications] Add ServerInfo class

2019-12-09 Thread Kai Uwe Broulik
broulik added inline comments.

INLINE COMMENTS

> broulik wrote in server_p.cpp:93
> Just noticed I can probably reuse the inhibition service watcher rather than 
> do a wildcard watch here?

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/

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D25772

To: broulik, #plasma
Cc: plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, fbampaloukas, GB_2, 
ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D25772: [Notifications] Add ServerInfo class

2019-12-05 Thread Kai Uwe Broulik
broulik added inline comments.

INLINE COMMENTS

> server_p.cpp:93
>  if (!master) {
> -connect(dbusIface, &QDBusConnectionInterface::serviceUnregistered, 
> this, [=](const QString &serviceName) {
> -if (serviceName == notificationService) {
> -qCDebug(NOTIFICATIONMANAGER) << "Lost ownership of" << 
> serviceName << "service";
> -emit serviceOwnershipLost();
> -}
> -});
> +connect(dbusIface, &QDBusConnectionInterface::serviceUnregistered, 
> this, &ServerPrivate::onInterfaceServiceUnregistered, Qt::UniqueConnection);
>  }

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

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D25772

To: broulik, #plasma
Cc: plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, fbampaloukas, GB_2, 
ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D25772: [Notifications] Add ServerInfo class

2019-12-05 Thread Kai Uwe Broulik
broulik created this revision.
broulik added a reviewer: Plasma.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
broulik requested review of this revision.

REVISION 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.

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D25772

AFFECTED FILES
  libnotificationmanager/CMakeLists.txt
  libnotificationmanager/declarative/notificationmanagerplugin.cpp
  libnotificationmanager/server.cpp
  libnotificationmanager/server.h
  libnotificationmanager/server_p.cpp
  libnotificationmanager/server_p.h

To: broulik, #plasma
Cc: plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, fbampaloukas, GB_2, 
ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, ahiemstra, mart