You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The DBus class does not really have any usable instance data, so from an
API perspective, it doesn't make much sense to create an instance of
DBus just so that we can create an instance of Bus or Service.
So instead, make `getBus` and `registerService` static methods that can
be called directly, without instantiating a DBus instance first. This
simplifies the calling code a little bit.
That means that
var dbus = new DBus();
var bus = dbus.getBus('session');
turns into
var bus = DBus.getBus('session');
and
var dbus = new DBus();
var service = dbus.registerService('session', 'service.name');
turns into
var service = DBus.registerService('session', 'service.name');
Note that for backwards compatibility reasons, it's still possible to
instantiate a new instance and call the methods on the instance.
0 commit comments