905N/A/*
905N/A Authors:
905N/A Pavel Březina <pbrezina@redhat.com>
905N/A
905N/A Copyright (C) 2016 Red Hat
905N/A
905N/A This program is free software; you can redistribute it and/or modify
905N/A it under the terms of the GNU General Public License as published by
905N/A the Free Software Foundation; either version 3 of the License, or
905N/A (at your option) any later version.
905N/A
905N/A This program is distributed in the hope that it will be useful,
905N/A but WITHOUT ANY WARRANTY; without even the implied warranty of
905N/A MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
905N/A GNU General Public License for more details.
905N/A
905N/A You should have received a copy of the GNU General Public License
905N/A along with this program. If not, see <http://www.gnu.org/licenses/>.
905N/A*/
905N/A
5680N/A#include <dbus/dbus.h>
905N/A
5680N/A#include "sbus/sssd_dbus.h"
5680N/A#include "providers/data_provider/dp_iface_generated.h"
5680N/A#include "providers/data_provider/dp_iface.h"
905N/A#include "providers/data_provider/dp_private.h"
905N/A#include "providers/data_provider/dp.h"
905N/A
4429N/Astruct iface_dp iface_dp = {
905N/A {&iface_dp_meta, 0},
4429N/A .pamHandler = dp_pam_handler,
905N/A .sudoHandler = dp_sudo_handler,
1326N/A .autofsHandler = dp_autofs_handler,
4429N/A .hostHandler = dp_host_handler,
2899N/A .getDomains = dp_subdomains_handler,
5680N/A .getAccountInfo = dp_get_account_info_handler
5680N/A};
5680N/A
905N/Astruct iface_dp_backend iface_dp_backend = {
905N/A {&iface_dp_backend_meta, 0},
905N/A .IsOnline = dp_backend_is_online
905N/A};
1938N/A
1938N/Astruct iface_dp_failover iface_dp_failover = {
3817N/A { &iface_dp_failover_meta, 0 },
4429N/A .ListServices = dp_failover_list_services,
.ActiveServer = dp_failover_active_server,
.ListServers = dp_failover_list_servers
};
static struct sbus_iface_map dp_map[] = {
{ DP_PATH, &iface_dp.vtable },
{ DP_PATH, &iface_dp_backend.vtable },
{ DP_PATH, &iface_dp_failover.vtable },
{ NULL, NULL }
};
errno_t
dp_register_sbus_interface(struct sbus_connection *conn,
struct dp_client *pvt)
{
return sbus_conn_register_iface_map(conn, dp_map, pvt);
}