summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn (J5) Palmieri <johnp@redhat.com>2006-02-24 18:18:41 +0000
committerJohn (J5) Palmieri <johnp@redhat.com>2006-02-24 18:18:41 +0000
commit0154580c521536e50ea98ea60c6c6d51c32b5769 (patch)
tree4856a9350c9c92e1fe7681637b7967b61c9945db
parenta2866f736612afc3308a1df33e7902283354e0f9 (diff)
2006-02-24 John (J5) Palmieri <johnp@redhat.com>dbus-0.61
* Released 0.61 2006-02-24 John (J5) Palmieri <johnp@redhat.com> * proxies.py: Fix the callchain
-rw-r--r--ChangeLog8
-rw-r--r--NEWS22
-rw-r--r--configure.in2
-rw-r--r--python/proxies.py96
4 files changed, 76 insertions, 52 deletions
diff --git a/ChangeLog b/ChangeLog
index de8641ca..18c81540 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-02-24 John (J5) Palmieri <johnp@redhat.com>
+
+ * Released 0.61
+
+2006-02-24 John (J5) Palmieri <johnp@redhat.com>
+
+ * proxies.py: Fix the callchain
+
2006-02-24 John (J5) Palmieri <johnp@redhat.com>
* patch from Sjoerd Simons <sjoerd at debian.org>:
diff --git a/NEWS b/NEWS
index e7c13591..2cda9b8d 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,25 @@
+D-BUS 0.61 (24 Febuary 2006)
+==
+- Documentation all around
+- dbus-launch now produces correct sh and csh syntax
+- Nested arrays now work correctly
+- GLib bindings:
+ - Inheriting from DBusGProxy is now possible
+ - GPtrArrays can now be marshalled
+ - org.freedesktop.DBus.GLib.ClientCSymbol annotation added
+ - Openning connections to arbitrary addresses now supported
+- Python bindings:
+ - sender_keyword and path_keyword keywords added to signal listener API
+ - Byte types now demarshal to unsigned char
+ - calling methods now do the correct thing
+- Qt bindings:
+ - both Qt3 and Qt4 bindings can be built at the same time
+ - Use the standard org.freedesktop.DBus.Method.NoReply annotation
+ for the "async" calls instead of creating one for us.
+- Mono bindings:
+ - 64bit arch fixes
+- Massive bug fixing all around
+
D-BUS 0.60 (30 November 2005)
==
diff --git a/configure.in b/configure.in
index 6c85ed02..ba99bf98 100644
--- a/configure.in
+++ b/configure.in
@@ -5,7 +5,7 @@ AC_INIT(dbus/dbus.h)
AC_CANONICAL_TARGET
-AM_INIT_AUTOMAKE(dbus, 0.60)
+AM_INIT_AUTOMAKE(dbus, 0.61)
AM_CONFIG_HEADER(config.h)
diff --git a/python/proxies.py b/python/proxies.py
index d13b72b1..80e9ac27 100644
--- a/python/proxies.py
+++ b/python/proxies.py
@@ -8,11 +8,23 @@ class DeferedMethod:
This is returned instead of ProxyMethod when we are defering DBus calls
while waiting for introspection data to be returned
-
- This class can be used for debugging purposes
"""
+ def __init__(self, proxy_method):
+ self._proxy_method = proxy_method
+ self._method_name = proxy_method._method_name
+
def __call__(self, *args, **keywords):
- return None
+ reply_handler = None
+ if keywords.has_key('reply_handler'):
+ reply_handler = keywords['reply_handler']
+
+ #block for now even on async
+ # FIXME: put ret in async queue in future if we have a reply handler
+
+ self._proxy_method._proxy._pending_introspect.block()
+ ret = self._proxy_method (*args, **keywords)
+
+ return ret
class ProxyMethod:
"""A proxy Method.
@@ -21,19 +33,15 @@ class ProxyMethod:
method produce messages that travel over the Bus and are routed
to a specific named Service.
"""
- def __init__(self, connection, named_service, object_path, dbus_interface, method_name, introspect_sig):
- self._connection = connection
- self._named_service = named_service
- self._object_path = object_path
- self._method_name = method_name
- self._dbus_interface = dbus_interface
- self._introspect_sig = introspect_sig
+ def __init__(self, proxy, connection, named_service, object_path, method_name, iface):
+ self._proxy = proxy
+ self._connection = connection
+ self._named_service = named_service
+ self._object_path = object_path
+ self._method_name = method_name
+ self._dbus_interface = iface
def __call__(self, *args, **keywords):
- dbus_interface = self._dbus_interface
- if keywords.has_key('dbus_interface'):
- dbus_interface = keywords['dbus_interface']
-
timeout = -1
if keywords.has_key('timeout'):
timeout = keywords['timeout']
@@ -50,20 +58,35 @@ class ProxyMethod:
if keywords.has_key('ignore_reply'):
ignore_reply = keywords['ignore_reply']
+
if not(reply_handler and error_handler):
if reply_handler:
raise MissingErrorHandlerException()
elif error_handler:
raise MissingReplyHandlerException()
+ dbus_interface = self._dbus_interface
+ if keywords.has_key('dbus_interface'):
+ dbus_interface = keywords['dbus_interface']
+
+ tmp_iface = ''
+ if dbus_interface:
+ tmp_iface = dbus_interface + '.'
+
+ key = tmp_iface + self._method_name
+
+ introspect_sig = None
+ if self._proxy._introspect_method_map.has_key (key):
+ introspect_sig = self._proxy._introspect_method_map[key]
+
message = dbus_bindings.MethodCall(self._object_path, dbus_interface, self._method_name)
message.set_destination(self._named_service)
# Add the arguments to the function
iter = message.get_iter(True)
- if self._introspect_sig:
- for (arg, sig) in zip(args, dbus_bindings.Signature(self._introspect_sig)):
+ if introspect_sig:
+ for (arg, sig) in zip(args, dbus_bindings.Signature(introspect_sig)):
iter.append_strict(arg, sig)
else:
for arg in args:
@@ -176,49 +199,20 @@ class ProxyObject:
self._introspect_execute_queue()
sys.stderr.write("Introspect error: " + str(error) + "\n")
- def __getattr__(self, member, **keywords):
+ def __getattr__(self, member, dbus_interface=None):
if member == '__call__':
return object.__call__
elif member.startswith('__') and member.endswith('__'):
raise AttributeError(member)
else:
- introspect_sig = None
+ ret = self.ProxyMethodClass(self, self._bus.get_connection(),
+ self._named_service,
+ self._object_path, member,
+ dbus_interface)
- iface = None
- if keywords.has_key('dbus_interface'):
- iface = keywords['dbus_interface']
-
if self._introspect_state == self.INTROSPECT_STATE_INTROSPECT_IN_PROGRESS:
- reply_handler = None
- if keywords.has_key('reply_handler'):
- reply_handler = keywords['reply_handler']
-
- error_handler = None
- if keywords.has_key('error_handler'):
- error_handler = keywords['error_handler']
-
- if not reply_handler:
- self._pending_introspect.block()
- else:
- call = (memeber, iface, args, keywords)
- self._pending_introspect_queue.append(call)
+ ret = self.DeferedMethodClass(ret)
- ret = self.DeferedMethodClass()
- return ret
-
- if self._introspect_state == self.INTROSPECT_STATE_INTROSPECT_DONE:
- tmp_iface = ''
- if iface:
- tmp_iface = iface + '.'
-
- key = tmp_iface + member
- if self._introspect_method_map.has_key (key):
- introspect_sig = self._introspect_method_map[key]
-
- ret = self.ProxyMethodClass(self._bus.get_connection(),
- self._named_service,
- self._object_path, iface, member,
- introspect_sig)
return ret
def __repr__(self):