summaryrefslogtreecommitdiffstats
path: root/src/monitor/monitor_iface_generated.h
diff options
context:
space:
mode:
authorStef Walter <stefw@redhat.com>2014-01-10 08:58:12 +0100
committerJakub Hrozek <jhrozek@redhat.com>2014-02-24 11:14:59 +0100
commit769347ad4d35d43488eb98f980143495b0db415d (patch)
tree1613fff70e57d363ceda4f5d2d3d48efd87073a0 /src/monitor/monitor_iface_generated.h
parent3e7d7af1953410f3f009bf3b2e481a46fb80de83 (diff)
downloadsssd-769347ad4d35d43488eb98f980143495b0db415d.tar.gz
sssd-769347ad4d35d43488eb98f980143495b0db415d.tar.xz
sssd-769347ad4d35d43488eb98f980143495b0db415d.zip
sbus: Rework sbus to use interface metadata and vtables
Previous commits added support for interface metadata and handler vtables. This commit ports sbus_dbus_connection to use them. Port the internal uses of dbus to use the new scheme in a very minimal way. Further cleanup is possible here. This commit provides basic definitions of the internal dbus interfaces. The interfaces aren't fully defined, as the handlers will continue to unpack manually, and often overload DBus methods with different arguments (which is rather unorthodox, but not the end of the world). Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Sumit Bose <sbose@redhat.com> Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'src/monitor/monitor_iface_generated.h')
-rw-r--r--src/monitor/monitor_iface_generated.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/src/monitor/monitor_iface_generated.h b/src/monitor/monitor_iface_generated.h
new file mode 100644
index 000000000..cde774985
--- /dev/null
+++ b/src/monitor/monitor_iface_generated.h
@@ -0,0 +1,56 @@
+/* The following declarations are auto-generated from monitor_iface.xml */
+
+#ifndef __MONITOR_IFACE_XML__
+#define __MONITOR_IFACE_XML__
+
+#include "sbus/sssd_dbus.h"
+
+/* ------------------------------------------------------------------------
+ * DBus Vtable handler structures
+ *
+ * These structures are filled in by implementors of the different
+ * dbus interfaces to handle method calls.
+ *
+ * Handler functions of type sbus_msg_handler_fn accept raw messages,
+ * other handlers will be typed appropriately. If a handler that is
+ * set to NULL is invoked it will result in a
+ * org.freedesktop.DBus.Error.NotSupported error for the caller.
+ */
+
+/* vtable for org.freedesktop.sssd.monitor */
+struct mon_srv_iface {
+ struct sbus_vtable vtable; /* derive from sbus_vtable */
+ sbus_msg_handler_fn getVersion;
+ sbus_msg_handler_fn RegisterService;
+};
+
+/* vtable for org.freedesktop.sssd.service */
+struct mon_cli_iface {
+ struct sbus_vtable vtable; /* derive from sbus_vtable */
+ sbus_msg_handler_fn ping;
+ sbus_msg_handler_fn resInit;
+ sbus_msg_handler_fn shutDown;
+ sbus_msg_handler_fn goOffline;
+ sbus_msg_handler_fn resetOffline;
+ sbus_msg_handler_fn rotateLogs;
+ sbus_msg_handler_fn clearMemcache;
+ sbus_msg_handler_fn clearEnumCache;
+};
+
+/* ------------------------------------------------------------------------
+ * DBus Interface Metadata
+ *
+ * These structure definitions are filled in with the information about
+ * the interfaces, methods, properties and so on.
+ *
+ * The actual definitions are found in the accompanying C file next
+ * to this header.
+ */
+
+/* interface info for org.freedesktop.sssd.monitor */
+extern const struct sbus_interface_meta mon_srv_iface_meta;
+
+/* interface info for org.freedesktop.sssd.service */
+extern const struct sbus_interface_meta mon_cli_iface_meta;
+
+#endif /* __MONITOR_IFACE_XML__ */