From 5d6113aaa0595a8eb7f3263c5679b2bd069f95ba Mon Sep 17 00:00:00 2001 From: Seth Nickell Date: Sat, 29 May 2004 22:37:13 +0000 Subject: 2004-05-29 Seth Nickell * python/dbus.py: * python/examples/example-client.py: * python/examples/example-service.py: * python/examples/list-system-services.py: Add SessionBus, SystemBus and ActivationBus classes so you don't need to know the special little BUS_TYPE flag. --- python/dbus.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'python/dbus.py') diff --git a/python/dbus.py b/python/dbus.py index 883d9e66..583c5548 100644 --- a/python/dbus.py +++ b/python/dbus.py @@ -117,6 +117,25 @@ class Bus: for receiver in receivers: receiver(*args) +class SystemBus(Bus): + """The system-wide message bus + """ + def __init__(self): + Bus.__init__(self, Bus.TYPE_SYSTEM) + +class SessionBus(Bus): + """The session (current login) message bus + """ + def __init__(self): + Bus.__init__(self, Bus.TYPE_SESSION) + +class ActivationBus(Bus): + """The bus that activated this process (if + this process was launched by DBus activation) + """ + def __init__(self): + Bus.__init__(self, Bus.TYPE_ACTIVATION) + class RemoteObject: """A remote Object. -- cgit