dbus/python dbus.py,1.4,1.5

Seth Nickell seth at pdx.freedesktop.org
Sat May 29 15:37:15 PDT 2004


Update of /cvs/dbus/dbus/python
In directory pdx:/tmp/cvs-serv22104/python

Modified Files:
	dbus.py 
Log Message:
2004-05-29  Seth Nickell  <seth at gnome.org>

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


Index: dbus.py
===================================================================
RCS file: /cvs/dbus/dbus/python/dbus.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- a/dbus.py	28 May 2004 02:16:11 -0000	1.4
+++ b/dbus.py	29 May 2004 22:37:13 -0000	1.5
@@ -117,6 +117,25 @@
             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.




More information about the dbus-commit mailing list