From cb2b967570c0c97f64bd92a95aad1d0fb367e53c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Roberto=20de=20Souza?= Date: Tue, 11 Dec 2012 19:52:20 +0000 Subject: [PATCH] edbus: Dont create proxy of FDO.Peer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch by: José Roberto de Souza SVN revision: 80711 --- legacy/edbus/src/lib/EDBus.h | 1 + legacy/edbus/src/lib/edbus_object.c | 17 +++++++---------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/legacy/edbus/src/lib/EDBus.h b/legacy/edbus/src/lib/EDBus.h index fac889008e..ef1eec1e3f 100644 --- a/legacy/edbus/src/lib/EDBus.h +++ b/legacy/edbus/src/lib/EDBus.h @@ -96,6 +96,7 @@ extern "C" { #define EDBUS_FDO_INTERFACE_PROPERTIES "org.freedesktop.DBus.Properties" #define EDBUS_FDO_INTERFACE_OBJECT_MANAGER "org.freedesktop.DBus.ObjectManager" #define EDBUS_FDO_INTERFACE_INTROSPECTABLE "org.freedesktop.DBus.Introspectable" +#define EDBUS_FDO_INTEFACE_PEER "org.freedesktop.DBus.Peer" typedef struct _EDBus_Version { diff --git a/legacy/edbus/src/lib/edbus_object.c b/legacy/edbus/src/lib/edbus_object.c index 004560ea51..1a4f9b5e3f 100644 --- a/legacy/edbus/src/lib/edbus_object.c +++ b/legacy/edbus/src/lib/edbus_object.c @@ -639,26 +639,23 @@ edbus_object_proxy_del(EDBus_Object *obj, EDBus_Proxy *proxy, const char *interf return eina_hash_del(obj->proxies, interface, proxy); } -static EDBus_Proxy * -get_peer_proxy(EDBus_Object *obj) -{ - return edbus_proxy_get(obj, "org.freedesktop.DBus.Peer"); -} - EAPI EDBus_Pending * edbus_object_peer_ping(EDBus_Object *obj, EDBus_Message_Cb cb, const void *data) { + EDBus_Message *msg; EDBUS_OBJECT_CHECK_RETVAL(obj, NULL); - return edbus_proxy_call(get_peer_proxy(obj), "Ping", cb, - data, -1, ""); + msg = edbus_object_method_call_new(obj, EDBUS_FDO_INTEFACE_PEER, "Ping"); + return edbus_object_send(obj, msg, cb, data, -1); } EAPI EDBus_Pending * edbus_object_peer_machine_id_get(EDBus_Object *obj, EDBus_Message_Cb cb, const void *data) { + EDBus_Message *msg; EDBUS_OBJECT_CHECK_RETVAL(obj, NULL); - return edbus_proxy_call(get_peer_proxy(obj), "GetMachineId", cb, - data, -1, ""); + msg = edbus_object_method_call_new(obj, EDBUS_FDO_INTEFACE_PEER, + "GetMachineId"); + return edbus_object_send(obj, msg, cb, data, -1); } EAPI EDBus_Pending *