Re: [PATCH BlueZ v2 2/5] gdbus: Implement DBus.Properties.Get method
From: Marcel Holtmann <marcel@holtmann.org>
Date: 2012-07-24 13:36:18
Hi Lucas,
quoted hunk ↗ jump to hunk
gdbus/gdbus.h | 13 ++++++++++-- gdbus/object.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 72 insertions(+), 3 deletions(-)diff --git a/gdbus/gdbus.h b/gdbus/gdbus.h index 0a8a27c..e2a8460 100644 --- a/gdbus/gdbus.h +++ b/gdbus/gdbus.h@@ -55,6 +55,13 @@ typedef void (* GDBusDestroyFunction) (void *user_data); typedef DBusMessage * (* GDBusMethodFunction) (DBusConnection *connection, DBusMessage *message, void *user_data); +typedef struct GDBusPropertyTable GDBusPropertyTable; +typedef gboolean (*GDBusPropertyGetter)(const GDBusPropertyTable *property, + DBusMessageIter *iter, void *data); + +typedef gboolean (*GDBusPropertyExists)(const GDBusPropertyTable *property, + void *data); + typedef guint32 GDBusPendingReply; typedef void (* GDBusSecurityFunction) (DBusConnection *connection,@@ -102,11 +109,13 @@ typedef struct { const GDBusArgInfo *args; } GDBusSignalTable; -typedef struct { +struct GDBusPropertyTable { const char *name; const char *type; + GDBusPropertyGetter get; + GDBusPropertyExists exists; GDBusPropertyFlags flags; -} GDBusPropertyTable; +};
can we make this a bit cleaner and do it similar for all structs + typedefs and not just make GDBusPropertyTable special. Regards Marcel