diff options
author | John (J5) Palmieri <johnp@redhat.com> | 2005-10-18 04:38:05 +0000 |
---|---|---|
committer | John (J5) Palmieri <johnp@redhat.com> | 2005-10-18 04:38:05 +0000 |
commit | 2b9417707a6cac377e2caca047fde8169236d93e (patch) | |
tree | 9f7b49dd959a7502fc33a620f61a32f8c156c2dd /python/_dbus.py | |
parent | 0ae9f138ad4dfacbbd28abd39ce3dee66333539a (diff) |
* glib/dbus-gvalue-utils.c (hash_free_from_gtype): handle gdouble
and G_TYPE_VALUE_ARRAY (DBUS_TYPE_STRUCT)
(gvalue_from_hash_value, hash_value_from_gvalue): handle gdouble
* glib/dbus-gvalue.c (dbus_gvalue_to_signature): add missing
DBUS_STRUCT_BEGIN_CHAR and DBUS_STRUCT_END_CHAR charaters
when constructing struct signatures
* python/_dbus.py (Bus): handle private connections using the
private keyword in the constructor. defaults to private=False
(Bus::close): new method to close a connection to the bus
* python/dbus_bindings.pyx (Connection::close): renamed method
was previously called disconnect
(bus_get): now supports getting a private connection
* python/proxies.py (ProxyMethod::__call__): check if ignore_reply
keyword is set to True. if it is, execute the method without waiting
for a reply
(ProxyObject::_introspect_execute_queue): new method for executing
all the pending methods that were waiting for the introspect to
finish. this is called when introspect either succeeds or fails
(ProxyObject::_introspect_error_handler): call queued methods
Diffstat (limited to 'python/_dbus.py')
-rw-r--r-- | python/_dbus.py | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/python/_dbus.py b/python/_dbus.py index 890cdda8..2e7e671b 100644 --- a/python/_dbus.py +++ b/python/_dbus.py @@ -67,8 +67,8 @@ class Bus: START_REPLY_SUCCESS = dbus_bindings.DBUS_START_REPLY_SUCCESS START_REPLY_ALREADY_RUNNING = dbus_bindings.DBUS_START_REPLY_ALREADY_RUNNING - def __init__(self, bus_type=TYPE_SESSION, use_default_mainloop=True): - self._connection = dbus_bindings.bus_get(bus_type) + def __init__(self, bus_type=TYPE_SESSION, use_default_mainloop=True, private=False): + self._connection = dbus_bindings.bus_get(bus_type, private) self._connection.add_filter(self._signal_func) self._match_rule_tree = SignalMatchTree() @@ -78,25 +78,28 @@ class Bus: if func != None: func(self) + def close(self): + self._connection.close() + def get_connection(self): return self._connection - def get_session(): + def get_session(private=False): """Static method that returns the session bus""" - return SessionBus() + return SessionBus(private) get_session = staticmethod(get_session) - def get_system(): + def get_system(private=False): """Static method that returns the system bus""" - return SystemBus() + return SystemBus(private) get_system = staticmethod(get_system) - def get_starter(): + def get_starter(private=False): """Static method that returns the starter bus""" - return StarterBus() + return StarterBus(private) get_starter = staticmethod(get_starter) @@ -196,21 +199,21 @@ class Bus: class SystemBus(Bus): """The system-wide message bus """ - def __init__(self): - Bus.__init__(self, Bus.TYPE_SYSTEM) + def __init__(self, use_default_mainloop=True, private=False): + Bus.__init__(self, Bus.TYPE_SYSTEM, use_default_mainloop, private) class SessionBus(Bus): """The session (current login) message bus """ - def __init__(self): - Bus.__init__(self, Bus.TYPE_SESSION) + def __init__(self, use_default_mainloop=True, private=False): + Bus.__init__(self, Bus.TYPE_SESSION, use_default_mainloop, private) class StarterBus(Bus): """The bus that activated this process (if this process was launched by DBus activation) """ - def __init__(self): - Bus.__init__(self, Bus.TYPE_STARTER) + def __init__(self, use_default_mainloop=True, private=False): + Bus.__init__(self, Bus.TYPE_STARTER, use_default_mainloop, private) class Interface: """An inteface into a remote object |