[PATCH] NoReply annotation in GLib bindings

Ross Burton ross at burtonini.com
Wed Oct 19 09:40:24 PDT 2005


Hi,

Attached is a patch which adds a NoReply annotation to the GLib binding.
Example:

This XML:

<method name="notifyContactsAdded">
 <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_notifyContactsAdded"/>
 <arg name="vcards" type="as" direction="in"/>
</method>

Generates:

gboolean
org_gnome_evolution_dataserver_addressbook_DataBookViewListener_notify_contacts_added (DBusGProxy *proxy, const char ** IN_vcards, GError **error)
{
  return dbus_g_proxy_call (proxy, "notifyContactsAdded", error, G_TYPE_STRV, IN_vcards, G_TYPE_INVALID, G_TYPE_INVALID);
}

With the NoReply annotation:

<method name="notifyContactsAdded">
 <annotation name="org.freedesktop.DBus.GLib.NoReply" value="yes"/>
 <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_notifyContactsAdded"/>
 <arg name="vcards" type="as" direction="in"/>
</method>

This is generated:

gboolean
org_gnome_evolution_dataserver_addressbook_DataBookViewListener_notify_contacts_added (DBusGProxy *proxy, const char ** IN_vcards, GError **error)
{
  dbus_g_proxy_call_no_reply (proxy, "notifyContactsAdded", G_TYPE_STRV, IN_vcards, G_TYPE_INVALID, G_TYPE_INVALID);
  return TRUE;
}

I'm finding it very useful when the messages don't have return values
and I don't particularly care if the message was received.

Ross
-- 
Ross Burton                                 mail: ross at burtonini.com
                                          jabber: ross at burtonini.com
                                     www: http://www.burtonini.com./
 PGP Fingerprint: 1A21 F5B0 D8D0 CFE3 81D4 E25A 2D09 E447 D0B4 33DF

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gproxy-noreply.diff
Type: text/x-patch
Size: 3666 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20051019/907eea6b/gproxy-noreply-0001.bin


More information about the dbus mailing list