summaryrefslogtreecommitdiff
path: root/dbus/_dbus.py
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2007-04-30 11:23:58 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2007-04-30 11:23:58 +0100
commite40ec8e4f29d104b66d78b183300e6bf134c2714 (patch)
tree306fd5f646fb3f62419f7fe72503d397857633ab /dbus/_dbus.py
parent6963fa9cfa5be7af19b93c71d8a26c149cf2c88c (diff)
downloaddbus-python-e40ec8e4f29d104b66d78b183300e6bf134c2714.tar.gz
Remove BusImplementation, removing its remaining functionality to Connection.
* Move get_unique_name to Connection (it can be useful for connections which aren't to a real bus daemon but partially emulate one, like Telepathy's Tubes) * Add set_unique_name to Connection (same reason) * Convert BusImplementation.__new__ into Connection._new_for_bus * Have dbus.Bus subclass _dbus_bindings.Connection directly
Diffstat (limited to 'dbus/_dbus.py')
-rw-r--r--dbus/_dbus.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/dbus/_dbus.py b/dbus/_dbus.py
index 838b223..6812127 100644
--- a/dbus/_dbus.py
+++ b/dbus/_dbus.py
@@ -29,7 +29,6 @@ __docformat__ = 'reStructuredText'
import _dbus_bindings
UTF8String = _dbus_bindings.UTF8String
DBusException = _dbus_bindings.DBusException
-BusImplementation = _dbus_bindings.BusImplementation
import os
import logging
@@ -222,7 +221,7 @@ class SignalMatch(object):
**self._args_match)
-class Bus(BusImplementation, _BusDaemonMixin):
+class Bus(_dbus_bindings.Connection, _BusDaemonMixin):
"""A connection to a DBus daemon.
One of three possible standard buses, the SESSION, SYSTEM,
@@ -288,8 +287,7 @@ class Bus(BusImplementation, _BusDaemonMixin):
else:
raise ValueError('invalid bus_type %s' % bus_type)
- bus = _dbus_bindings.BusImplementation.__new__(subclass, bus_type,
- mainloop=mainloop)
+ bus = subclass._new_for_bus(bus_type, mainloop=mainloop)
bus._bus_type = bus_type
# _bus_names is used by dbus.service.BusName!
@@ -319,7 +317,7 @@ class Bus(BusImplementation, _BusDaemonMixin):
t = self._bus_type
if self.__class__._shared_instances[t] is self:
del self.__class__._shared_instances[t]
- BusImplementation.close(self)
+ _dbus_bindings.Connection.close(self)
def get_connection(self):
"""(Deprecated - in new code, just use self)