From d87dcb6c5bce4fd786fa2ad7a32df3bfd2052300 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Thu, 4 Oct 2012 04:26:30 -0300 Subject: gdbus: Implement DBus.Properties.Set method Contrary to Get() and GetAll(), Set() is asynchronous so we pass an id to the setter so later it can declare the Set() as successful or otherwise. --- gdbus/gdbus.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'gdbus/gdbus.h') diff --git a/gdbus/gdbus.h b/gdbus/gdbus.h index b2e78c4a..ec7b1efb 100644 --- a/gdbus/gdbus.h +++ b/gdbus/gdbus.h @@ -69,6 +69,12 @@ typedef DBusMessage * (* GDBusMethodFunction) (DBusConnection *connection, typedef gboolean (*GDBusPropertyGetter)(const GDBusPropertyTable *property, DBusMessageIter *iter, void *data); +typedef guint32 GDBusPendingPropertySet; + +typedef void (*GDBusPropertySetter)(const GDBusPropertyTable *property, + DBusMessageIter *value, GDBusPendingPropertySet id, + void *data); + typedef gboolean (*GDBusPropertyExists)(const GDBusPropertyTable *property, void *data); @@ -123,6 +129,7 @@ struct GDBusPropertyTable { const char *name; const char *type; GDBusPropertyGetter get; + GDBusPropertySetter set; GDBusPropertyExists exists; GDBusPropertyFlags flags; }; @@ -239,6 +246,15 @@ guint g_dbus_add_signal_watch(DBusConnection *connection, gboolean g_dbus_remove_watch(DBusConnection *connection, guint tag); void g_dbus_remove_all_watches(DBusConnection *connection); +void g_dbus_pending_property_success(DBusConnection *connection, + GDBusPendingPropertySet id); +void g_dbus_pending_property_error_valist(DBusConnection *connection, + GDBusPendingReply id, const char *name, + const char *format, va_list args); +void g_dbus_pending_property_error(DBusConnection *connection, + GDBusPendingReply id, const char *name, + const char *format, ...); + #ifdef __cplusplus } #endif -- cgit v1.2.3