c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek/* The following definitions are auto-generated from responder_iface.xml */
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek
054900ab42a8b865a2257f94c66484e0a022a90cLukas Slebodnik#include <stddef.h>
054900ab42a8b865a2257f94c66484e0a022a90cLukas Slebodnik
054900ab42a8b865a2257f94c66484e0a022a90cLukas Slebodnik#include "dbus/dbus-protocol.h"
054900ab42a8b865a2257f94c66484e0a022a90cLukas Slebodnik#include "util/util_errors.h"
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek#include "sbus/sssd_dbus.h"
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek#include "sbus/sssd_dbus_meta.h"
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek#include "sbus/sssd_dbus_invokers.h"
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek#include "responder_iface_generated.h"
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek/* invokes a handler with a 's' DBus signature */
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozekstatic int invoke_s_method(struct sbus_request *dbus_req, void *function_ptr);
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek/* arguments for org.freedesktop.sssd.Responder.Domain.SetActive */
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozekconst struct sbus_arg_meta iface_responder_domain_SetActive__in[] = {
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek { "name", "s" },
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek { NULL, }
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek};
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozekint iface_responder_domain_SetActive_finish(struct sbus_request *req)
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek{
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek return sbus_request_return_and_finish(req,
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek DBUS_TYPE_INVALID);
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek}
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek/* arguments for org.freedesktop.sssd.Responder.Domain.SetInconsistent */
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozekconst struct sbus_arg_meta iface_responder_domain_SetInconsistent__in[] = {
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek { "name", "s" },
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek { NULL, }
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek};
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozekint iface_responder_domain_SetInconsistent_finish(struct sbus_request *req)
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek{
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek return sbus_request_return_and_finish(req,
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek DBUS_TYPE_INVALID);
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek}
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek/* methods for org.freedesktop.sssd.Responder.Domain */
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozekconst struct sbus_method_meta iface_responder_domain__methods[] = {
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek {
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek "SetActive", /* name */
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek iface_responder_domain_SetActive__in,
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek NULL, /* no out_args */
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek offsetof(struct iface_responder_domain, SetActive),
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek invoke_s_method,
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek },
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek {
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek "SetInconsistent", /* name */
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek iface_responder_domain_SetInconsistent__in,
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek NULL, /* no out_args */
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek offsetof(struct iface_responder_domain, SetInconsistent),
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek invoke_s_method,
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek },
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek { NULL, }
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek};
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek/* interface info for org.freedesktop.sssd.Responder.Domain */
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozekconst struct sbus_interface_meta iface_responder_domain_meta = {
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek "org.freedesktop.sssd.Responder.Domain", /* name */
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek iface_responder_domain__methods,
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek NULL, /* no signals */
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek NULL, /* no properties */
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek sbus_invoke_get_all, /* GetAll invoker */
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek};
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozekint iface_responder_ncache_ResetUsers_finish(struct sbus_request *req)
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek{
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek return sbus_request_return_and_finish(req,
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek DBUS_TYPE_INVALID);
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek}
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozekint iface_responder_ncache_ResetGroups_finish(struct sbus_request *req)
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek{
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek return sbus_request_return_and_finish(req,
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek DBUS_TYPE_INVALID);
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek}
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek/* methods for org.freedesktop.sssd.Responder.NegativeCache */
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozekconst struct sbus_method_meta iface_responder_ncache__methods[] = {
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek {
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek "ResetUsers", /* name */
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek NULL, /* no in_args */
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek NULL, /* no out_args */
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek offsetof(struct iface_responder_ncache, ResetUsers),
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek NULL, /* no invoker */
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek },
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek {
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek "ResetGroups", /* name */
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek NULL, /* no in_args */
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek NULL, /* no out_args */
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek offsetof(struct iface_responder_ncache, ResetGroups),
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek NULL, /* no invoker */
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek },
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek { NULL, }
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek};
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek/* interface info for org.freedesktop.sssd.Responder.NegativeCache */
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozekconst struct sbus_interface_meta iface_responder_ncache_meta = {
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek "org.freedesktop.sssd.Responder.NegativeCache", /* name */
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek iface_responder_ncache__methods,
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek NULL, /* no signals */
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek NULL, /* no properties */
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek sbus_invoke_get_all, /* GetAll invoker */
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek};
205a0b9e9234327730fa808be95b2e1db7ffee95Jakub Hrozek
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek/* invokes a handler with a 's' DBus signature */
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozekstatic int invoke_s_method(struct sbus_request *dbus_req, void *function_ptr)
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek{
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek const char * arg_0;
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek int (*handler)(struct sbus_request *, void *, const char *) = function_ptr;
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek if (!sbus_request_parse_or_finish(dbus_req,
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek DBUS_TYPE_STRING, &arg_0,
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek DBUS_TYPE_INVALID)) {
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek return EOK; /* request handled */
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek }
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek return (handler)(dbus_req, dbus_req->intf->handler_data,
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek arg_0);
c109f063b4469818fd335b8b509f0458e7b33b0aJakub Hrozek}