>From ac0400469c5c09e383e807d6db9906ac8f7661bd Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Thu, 17 Apr 2014 16:55:29 +0200 Subject: [PATCH 1/5] SBUS: Create an sbus_method_meta instance for Introspection Also fixes a warning about uninitialized 'method' as the 'method' variable was unused and not set previously when introspecting. --- src/sbus/sssd_dbus_connection.c | 1 + src/sbus/sssd_dbus_introspect.c | 8 ++++++++ src/sbus/sssd_dbus_private.h | 3 +++ 3 files changed, 12 insertions(+) diff --git a/src/sbus/sssd_dbus_connection.c b/src/sbus/sssd_dbus_connection.c index 64777fbe815c78d8c893ee1a3e8f5ab327c6701e..16ec72f9201dd478741c6c3223436c2c8f9d377f 100644 --- a/src/sbus/sssd_dbus_connection.c +++ b/src/sbus/sssd_dbus_connection.c @@ -441,6 +441,7 @@ DBusHandlerResult sbus_message_handler(DBusConnection *dbus_conn, handler_fn = sbus_introspect; ictx->iface = interface; handler_data = ictx; + method = &introspect_method; } } } diff --git a/src/sbus/sssd_dbus_introspect.c b/src/sbus/sssd_dbus_introspect.c index ffc1f4d38ba70f9074d6731280136e899374c866..ef0ff2fd5d457e59100c1bd906e7dee12638be3c 100644 --- a/src/sbus/sssd_dbus_introspect.c +++ b/src/sbus/sssd_dbus_introspect.c @@ -28,6 +28,14 @@ #include "sbus/sssd_dbus_private.h" #include "sbus/sssd_dbus_meta.h" +static const struct sbus_arg_meta introspect_method_arg_out[] = { + { "data", "s" }, + { NULL, } +}; + +const struct sbus_method_meta introspect_method = + { DBUS_INTROSPECT_METHOD, NULL, introspect_method_arg_out, 0 }; + #define SSS_INTROSPECT_DOCTYPE \ "\n" diff --git a/src/sbus/sssd_dbus_private.h b/src/sbus/sssd_dbus_private.h index 929caeccbcc0aca2e42fc44eacf3603826cbe329..6abe56c6642ac2370e4178add496331e7e9b38e4 100644 --- a/src/sbus/sssd_dbus_private.h +++ b/src/sbus/sssd_dbus_private.h @@ -98,6 +98,9 @@ struct sbus_request * sbus_new_request(struct sbus_connection *conn, struct sbus_interface *intf, DBusMessage *message); +/* =Interface=introspection=============================================== */ +extern const struct sbus_method_meta introspect_method; + struct sbus_introspect_ctx { const struct sbus_interface_meta *iface; }; -- 1.9.0