summaryrefslogtreecommitdiffstats
path: root/gdbus/gdbus.h
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@profusion.mobi>2012-10-04 04:26:30 -0300
committerMarcel Holtmann <marcel@holtmann.org>2012-11-26 12:53:40 +0100
commitd87dcb6c5bce4fd786fa2ad7a32df3bfd2052300 (patch)
tree4a3e73ada6eccf35a830decb5ba5a4bbbd557a1f /gdbus/gdbus.h
parent1b7afd7b1eb59164b0687ce65bbf413e19e6faf1 (diff)
downloadofono-d87dcb6c5bce4fd786fa2ad7a32df3bfd2052300.tar.bz2
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.
Diffstat (limited to 'gdbus/gdbus.h')
-rw-r--r--gdbus/gdbus.h16
1 files changed, 16 insertions, 0 deletions
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