769347ad4d35d43488eb98f980143495b0db415dStef Walter/* The following declarations are auto-generated from monitor_iface.xml */
769347ad4d35d43488eb98f980143495b0db415dStef Walter
769347ad4d35d43488eb98f980143495b0db415dStef Walter#ifndef __MONITOR_IFACE_XML__
769347ad4d35d43488eb98f980143495b0db415dStef Walter#define __MONITOR_IFACE_XML__
769347ad4d35d43488eb98f980143495b0db415dStef Walter
769347ad4d35d43488eb98f980143495b0db415dStef Walter#include "sbus/sssd_dbus.h"
769347ad4d35d43488eb98f980143495b0db415dStef Walter
c2cc119de8eac712c040b3993f41c967ff2278deStef Walter/* ------------------------------------------------------------------------
c2cc119de8eac712c040b3993f41c967ff2278deStef Walter * DBus Constants
c2cc119de8eac712c040b3993f41c967ff2278deStef Walter *
c2cc119de8eac712c040b3993f41c967ff2278deStef Walter * Various constants of interface and method names mostly for use by clients
c2cc119de8eac712c040b3993f41c967ff2278deStef Walter */
c2cc119de8eac712c040b3993f41c967ff2278deStef Walter
c2cc119de8eac712c040b3993f41c967ff2278deStef Walter/* constants for org.freedesktop.sssd.monitor */
c2cc119de8eac712c040b3993f41c967ff2278deStef Walter#define MON_SRV_IFACE "org.freedesktop.sssd.monitor"
c2cc119de8eac712c040b3993f41c967ff2278deStef Walter#define MON_SRV_IFACE_GETVERSION "getVersion"
c2cc119de8eac712c040b3993f41c967ff2278deStef Walter#define MON_SRV_IFACE_REGISTERSERVICE "RegisterService"
c2cc119de8eac712c040b3993f41c967ff2278deStef Walter
c2cc119de8eac712c040b3993f41c967ff2278deStef Walter/* constants for org.freedesktop.sssd.service */
c2cc119de8eac712c040b3993f41c967ff2278deStef Walter#define MON_CLI_IFACE "org.freedesktop.sssd.service"
c2cc119de8eac712c040b3993f41c967ff2278deStef Walter#define MON_CLI_IFACE_RESINIT "resInit"
c2cc119de8eac712c040b3993f41c967ff2278deStef Walter#define MON_CLI_IFACE_GOOFFLINE "goOffline"
c2cc119de8eac712c040b3993f41c967ff2278deStef Walter#define MON_CLI_IFACE_RESETOFFLINE "resetOffline"
c2cc119de8eac712c040b3993f41c967ff2278deStef Walter#define MON_CLI_IFACE_ROTATELOGS "rotateLogs"
c2cc119de8eac712c040b3993f41c967ff2278deStef Walter#define MON_CLI_IFACE_CLEARMEMCACHE "clearMemcache"
c2cc119de8eac712c040b3993f41c967ff2278deStef Walter#define MON_CLI_IFACE_CLEARENUMCACHE "clearEnumCache"
b76419cf8830440b46c20a15585562343c7b1924Jakub Hrozek#define MON_CLI_IFACE_SYSBUSRECONNECT "sysbusReconnect"
c2cc119de8eac712c040b3993f41c967ff2278deStef Walter
769347ad4d35d43488eb98f980143495b0db415dStef Walter/* ------------------------------------------------------------------------
dff909d473f43a6bd0f0286fa2d279c0ebe945c6Stef Walter * DBus handlers
769347ad4d35d43488eb98f980143495b0db415dStef Walter *
769347ad4d35d43488eb98f980143495b0db415dStef Walter * These structures are filled in by implementors of the different
769347ad4d35d43488eb98f980143495b0db415dStef Walter * dbus interfaces to handle method calls.
769347ad4d35d43488eb98f980143495b0db415dStef Walter *
769347ad4d35d43488eb98f980143495b0db415dStef Walter * Handler functions of type sbus_msg_handler_fn accept raw messages,
dff909d473f43a6bd0f0286fa2d279c0ebe945c6Stef Walter * other handlers are typed appropriately. If a handler that is
769347ad4d35d43488eb98f980143495b0db415dStef Walter * set to NULL is invoked it will result in a
769347ad4d35d43488eb98f980143495b0db415dStef Walter * org.freedesktop.DBus.Error.NotSupported error for the caller.
dff909d473f43a6bd0f0286fa2d279c0ebe945c6Stef Walter *
dff909d473f43a6bd0f0286fa2d279c0ebe945c6Stef Walter * Handlers have a matching xxx_finish() function (unless the method has
dff909d473f43a6bd0f0286fa2d279c0ebe945c6Stef Walter * accepts raw messages). These finish functions the
dff909d473f43a6bd0f0286fa2d279c0ebe945c6Stef Walter * sbus_request_return_and_finish() with the appropriate arguments to
dff909d473f43a6bd0f0286fa2d279c0ebe945c6Stef Walter * construct a valid reply. Once a finish function has been called, the
dff909d473f43a6bd0f0286fa2d279c0ebe945c6Stef Walter * @dbus_req it was called with is freed and no longer valid.
769347ad4d35d43488eb98f980143495b0db415dStef Walter */
769347ad4d35d43488eb98f980143495b0db415dStef Walter
769347ad4d35d43488eb98f980143495b0db415dStef Walter/* vtable for org.freedesktop.sssd.monitor */
769347ad4d35d43488eb98f980143495b0db415dStef Walterstruct mon_srv_iface {
769347ad4d35d43488eb98f980143495b0db415dStef Walter struct sbus_vtable vtable; /* derive from sbus_vtable */
769347ad4d35d43488eb98f980143495b0db415dStef Walter sbus_msg_handler_fn getVersion;
769347ad4d35d43488eb98f980143495b0db415dStef Walter sbus_msg_handler_fn RegisterService;
769347ad4d35d43488eb98f980143495b0db415dStef Walter};
769347ad4d35d43488eb98f980143495b0db415dStef Walter
769347ad4d35d43488eb98f980143495b0db415dStef Walter/* vtable for org.freedesktop.sssd.service */
769347ad4d35d43488eb98f980143495b0db415dStef Walterstruct mon_cli_iface {
769347ad4d35d43488eb98f980143495b0db415dStef Walter struct sbus_vtable vtable; /* derive from sbus_vtable */
769347ad4d35d43488eb98f980143495b0db415dStef Walter sbus_msg_handler_fn resInit;
769347ad4d35d43488eb98f980143495b0db415dStef Walter sbus_msg_handler_fn goOffline;
769347ad4d35d43488eb98f980143495b0db415dStef Walter sbus_msg_handler_fn resetOffline;
769347ad4d35d43488eb98f980143495b0db415dStef Walter sbus_msg_handler_fn rotateLogs;
769347ad4d35d43488eb98f980143495b0db415dStef Walter sbus_msg_handler_fn clearMemcache;
769347ad4d35d43488eb98f980143495b0db415dStef Walter sbus_msg_handler_fn clearEnumCache;
b76419cf8830440b46c20a15585562343c7b1924Jakub Hrozek sbus_msg_handler_fn sysbusReconnect;
769347ad4d35d43488eb98f980143495b0db415dStef Walter};
769347ad4d35d43488eb98f980143495b0db415dStef Walter
769347ad4d35d43488eb98f980143495b0db415dStef Walter/* ------------------------------------------------------------------------
769347ad4d35d43488eb98f980143495b0db415dStef Walter * DBus Interface Metadata
769347ad4d35d43488eb98f980143495b0db415dStef Walter *
769347ad4d35d43488eb98f980143495b0db415dStef Walter * These structure definitions are filled in with the information about
769347ad4d35d43488eb98f980143495b0db415dStef Walter * the interfaces, methods, properties and so on.
769347ad4d35d43488eb98f980143495b0db415dStef Walter *
769347ad4d35d43488eb98f980143495b0db415dStef Walter * The actual definitions are found in the accompanying C file next
769347ad4d35d43488eb98f980143495b0db415dStef Walter * to this header.
769347ad4d35d43488eb98f980143495b0db415dStef Walter */
769347ad4d35d43488eb98f980143495b0db415dStef Walter
769347ad4d35d43488eb98f980143495b0db415dStef Walter/* interface info for org.freedesktop.sssd.monitor */
769347ad4d35d43488eb98f980143495b0db415dStef Walterextern const struct sbus_interface_meta mon_srv_iface_meta;
769347ad4d35d43488eb98f980143495b0db415dStef Walter
769347ad4d35d43488eb98f980143495b0db415dStef Walter/* interface info for org.freedesktop.sssd.service */
769347ad4d35d43488eb98f980143495b0db415dStef Walterextern const struct sbus_interface_meta mon_cli_iface_meta;
769347ad4d35d43488eb98f980143495b0db415dStef Walter
769347ad4d35d43488eb98f980143495b0db415dStef Walter#endif /* __MONITOR_IFACE_XML__ */