d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes/* The following definitions are auto-generated from nss_iface.xml */
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes#include <stddef.h>
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes#include "dbus/dbus-protocol.h"
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg#include "util/util_errors.h"
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes#include "sbus/sssd_dbus.h"
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes#include "sbus/sssd_dbus_meta.h"
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes#include "sbus/sssd_dbus_invokers.h"
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes#include "nss_iface_generated.h"
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes/* invokes a handler with a 'ssau' DBus signature */
0662ed52e814f8f08ef0e09956413a792584eddffuankgstatic int invoke_ssau_method(struct sbus_request *dbus_req, void *function_ptr);
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes/* invokes a handler with a 'u' DBus signature */
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesstatic int invoke_u_method(struct sbus_request *dbus_req, void *function_ptr);
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes/* arguments for org.freedesktop.sssd.nss.MemoryCache.UpdateInitgroups */
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesconst struct sbus_arg_meta iface_nss_memorycache_UpdateInitgroups__in[] = {
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes { "user", "s" },
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes { "domain", "s" },
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes { "groups", "au" },
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes { NULL, }
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes};
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesint iface_nss_memorycache_UpdateInitgroups_finish(struct sbus_request *req)
70953fb44a7140fe206c3a5f011e24209c8c5c6abnicholes{
70953fb44a7140fe206c3a5f011e24209c8c5c6abnicholes return sbus_request_return_and_finish(req,
16b55a35cff91315d261d1baa776138af465c4e4fuankg DBUS_TYPE_INVALID);
16b55a35cff91315d261d1baa776138af465c4e4fuankg}
16b55a35cff91315d261d1baa776138af465c4e4fuankg
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesint iface_nss_memorycache_InvalidateAllUsers_finish(struct sbus_request *req)
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes{
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes return sbus_request_return_and_finish(req,
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes DBUS_TYPE_INVALID);
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes}
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesint iface_nss_memorycache_InvalidateAllGroups_finish(struct sbus_request *req)
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes{
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes return sbus_request_return_and_finish(req,
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes DBUS_TYPE_INVALID);
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes}
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesint iface_nss_memorycache_InvalidateAllInitgroups_finish(struct sbus_request *req)
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes{
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes return sbus_request_return_and_finish(req,
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes DBUS_TYPE_INVALID);
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes}
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes/* arguments for org.freedesktop.sssd.nss.MemoryCache.InvalidateGroupById */
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesconst struct sbus_arg_meta iface_nss_memorycache_InvalidateGroupById__in[] = {
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes { "gid", "u" },
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes { NULL, }
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes};
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesint iface_nss_memorycache_InvalidateGroupById_finish(struct sbus_request *req)
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes{
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes return sbus_request_return_and_finish(req,
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes DBUS_TYPE_INVALID);
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes}
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes/* methods for org.freedesktop.sssd.nss.MemoryCache */
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesconst struct sbus_method_meta iface_nss_memorycache__methods[] = {
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes {
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes "UpdateInitgroups", /* name */
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes iface_nss_memorycache_UpdateInitgroups__in,
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg NULL, /* no out_args */
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes offsetof(struct iface_nss_memorycache, UpdateInitgroups),
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes invoke_ssau_method,
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes },
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes {
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes "InvalidateAllUsers", /* name */
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes NULL, /* no in_args */
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes NULL, /* no out_args */
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes offsetof(struct iface_nss_memorycache, InvalidateAllUsers),
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes NULL, /* no invoker */
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes },
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes {
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes "InvalidateAllGroups", /* name */
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes NULL, /* no in_args */
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg NULL, /* no out_args */
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes offsetof(struct iface_nss_memorycache, InvalidateAllGroups),
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes NULL, /* no invoker */
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes },
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes {
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes "InvalidateAllInitgroups", /* name */
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes NULL, /* no in_args */
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes NULL, /* no out_args */
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes offsetof(struct iface_nss_memorycache, InvalidateAllInitgroups),
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes NULL, /* no invoker */
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes },
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes {
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes "InvalidateGroupById", /* name */
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes iface_nss_memorycache_InvalidateGroupById__in,
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes NULL, /* no out_args */
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes offsetof(struct iface_nss_memorycache, InvalidateGroupById),
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes invoke_u_method,
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes },
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes { NULL, }
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes};
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes/* interface info for org.freedesktop.sssd.nss.MemoryCache */
ac7985784d08a3655291f24f711812b4d8b1cbcffuankgconst struct sbus_interface_meta iface_nss_memorycache_meta = {
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes "org.freedesktop.sssd.nss.MemoryCache", /* name */
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes iface_nss_memorycache__methods,
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg NULL, /* no signals */
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes NULL, /* no properties */
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes sbus_invoke_get_all, /* GetAll invoker */
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes};
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes/* invokes a handler with a 'u' DBus signature */
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesstatic int invoke_u_method(struct sbus_request *dbus_req, void *function_ptr)
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes{
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes uint32_t arg_0;
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes int (*handler)(struct sbus_request *, void *, uint32_t) = function_ptr;
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes if (!sbus_request_parse_or_finish(dbus_req,
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg DBUS_TYPE_UINT32, &arg_0,
0662ed52e814f8f08ef0e09956413a792584eddffuankg DBUS_TYPE_INVALID)) {
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes return EOK; /* request handled */
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg }
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes return (handler)(dbus_req, dbus_req->intf->handler_data,
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes arg_0);
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes}
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes/* invokes a handler with a 'ssau' DBus signature */
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesstatic int invoke_ssau_method(struct sbus_request *dbus_req, void *function_ptr)
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes{
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes const char * arg_0;
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes const char * arg_1;
0662ed52e814f8f08ef0e09956413a792584eddffuankg uint32_t *arg_2;
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes int len_2;
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes int (*handler)(struct sbus_request *, void *, const char *, const char *, uint32_t[], int) = function_ptr;
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes if (!sbus_request_parse_or_finish(dbus_req,
0662ed52e814f8f08ef0e09956413a792584eddffuankg DBUS_TYPE_STRING, &arg_0,
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes DBUS_TYPE_STRING, &arg_1,
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes DBUS_TYPE_ARRAY, DBUS_TYPE_UINT32, &arg_2, &len_2,
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes DBUS_TYPE_INVALID)) {
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes return EOK; /* request handled */
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes }
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes return (handler)(dbus_req, dbus_req->intf->handler_data,
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes arg_0,
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes arg_1,
0662ed52e814f8f08ef0e09956413a792584eddffuankg arg_2,
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes len_2);
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes}
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg