diff options
Diffstat (limited to 'src/login/logind-dbus.c')
-rw-r--r-- | src/login/logind-dbus.c | 740 |
1 files changed, 325 insertions, 415 deletions
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c index cc5214c2eb..a97d826234 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -3394,123 +3394,101 @@ static const sd_bus_vtable manager_vtable[] = { SD_BUS_PROPERTY("NCurrentSessions", "t", property_get_hashmap_size, offsetof(Manager, sessions), 0), SD_BUS_PROPERTY("UserTasksMax", "t", property_get_compat_user_tasks_max, 0, SD_BUS_VTABLE_PROPERTY_CONST|SD_BUS_VTABLE_HIDDEN), - SD_BUS_METHOD_WITH_NAMES("GetSession", - "s", - SD_BUS_PARAM(session_id), - "o", - SD_BUS_PARAM(object_path), - method_get_session, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("GetSessionByPID", - "u", - SD_BUS_PARAM(pid), - "o", - SD_BUS_PARAM(object_path), - method_get_session_by_pid, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("GetUser", - "u", - SD_BUS_PARAM(uid), - "o", - SD_BUS_PARAM(object_path), - method_get_user, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("GetUserByPID", - "u", - SD_BUS_PARAM(pid), - "o", - SD_BUS_PARAM(object_path), - method_get_user_by_pid, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("GetSeat", - "s", - SD_BUS_PARAM(seat_id), - "o", - SD_BUS_PARAM(object_path), - method_get_seat, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("ListSessions", - NULL,, - "a(susso)", - SD_BUS_PARAM(sessions), - method_list_sessions, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("ListUsers", - NULL,, - "a(uso)", - SD_BUS_PARAM(users), - method_list_users, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("ListSeats", - NULL,, - "a(so)", - SD_BUS_PARAM(seats), - method_list_seats, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("ListInhibitors", - NULL,, - "a(ssssuu)", - SD_BUS_PARAM(inhibitors), - method_list_inhibitors, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("CreateSession", - "uusssssussbssa(sv)", - SD_BUS_PARAM(uid) - SD_BUS_PARAM(pid) - SD_BUS_PARAM(service) - SD_BUS_PARAM(type) - SD_BUS_PARAM(class) - SD_BUS_PARAM(desktop) - SD_BUS_PARAM(seat_id) - SD_BUS_PARAM(vtnr) - SD_BUS_PARAM(tty) - SD_BUS_PARAM(display) - SD_BUS_PARAM(remote) - SD_BUS_PARAM(remote_user) - SD_BUS_PARAM(remote_host) - SD_BUS_PARAM(properties), - "soshusub", - SD_BUS_PARAM(session_id) - SD_BUS_PARAM(object_path) - SD_BUS_PARAM(runtime_path) - SD_BUS_PARAM(fifo_fd) - SD_BUS_PARAM(uid) - SD_BUS_PARAM(seat_id) - SD_BUS_PARAM(vtnr) - SD_BUS_PARAM(existing), - method_create_session, - 0), - SD_BUS_METHOD_WITH_NAMES("ReleaseSession", - "s", - SD_BUS_PARAM(session_id), - NULL,, - method_release_session, - 0), - SD_BUS_METHOD_WITH_NAMES("ActivateSession", - "s", - SD_BUS_PARAM(session_id), - NULL,, - method_activate_session, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("ActivateSessionOnSeat", - "ss", - SD_BUS_PARAM(session_id) - SD_BUS_PARAM(seat_id), - NULL,, - method_activate_session_on_seat, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("LockSession", - "s", - SD_BUS_PARAM(session_id), - NULL,, - method_lock_session, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("UnlockSession", - "s", - SD_BUS_PARAM(session_id), - NULL,, - method_lock_session, - SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("GetSession", + SD_BUS_ARGS("s", session_id), + SD_BUS_RESULT("o", object_path), + method_get_session, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("GetSessionByPID", + SD_BUS_ARGS("u", pid), + SD_BUS_RESULT("o", object_path), + method_get_session_by_pid, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("GetUser", + SD_BUS_ARGS("u", uid), + SD_BUS_RESULT("o", object_path), + method_get_user, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("GetUserByPID", + SD_BUS_ARGS("u", pid), + SD_BUS_RESULT("o", object_path), + method_get_user_by_pid, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("GetSeat", + SD_BUS_ARGS("s", seat_id), + SD_BUS_RESULT("o", object_path), + method_get_seat, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("ListSessions", + SD_BUS_NO_ARGS, + SD_BUS_RESULT("a(susso)", sessions), + method_list_sessions, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("ListUsers", + SD_BUS_NO_ARGS, + SD_BUS_RESULT("a(uso)", users), + method_list_users, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("ListSeats", + SD_BUS_NO_ARGS, + SD_BUS_RESULT("a(so)", seats), + method_list_seats, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("ListInhibitors", + SD_BUS_NO_ARGS, + SD_BUS_RESULT("a(ssssuu)", inhibitors), + method_list_inhibitors, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("CreateSession", + SD_BUS_ARGS("u", uid, + "u", pid, + "s", service, + "s", type, + "s", class, + "s", desktop, + "s", seat_id, + "u", vtnr, + "s", tty, + "s", display, + "b", remote, + "s", remote_user, + "s", remote_host, + "a(sv)", properties), + SD_BUS_RESULT("s", session_id, + "o", object_path, + "s", runtime_path, + "h", fifo_fd, + "u", uid, + "s", seat_id, + "u", vtnr, + "b", existing), + method_create_session, + 0), + SD_BUS_METHOD_WITH_ARGS("ReleaseSession", + SD_BUS_ARGS("s", session_id), + SD_BUS_NO_RESULT, + method_release_session, + 0), + SD_BUS_METHOD_WITH_ARGS("ActivateSession", + SD_BUS_ARGS("s", session_id), + SD_BUS_NO_RESULT, + method_activate_session, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("ActivateSessionOnSeat", + SD_BUS_ARGS("s", session_id, "s", seat_id), + SD_BUS_NO_RESULT, + method_activate_session_on_seat, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("LockSession", + SD_BUS_ARGS("s", session_id), + SD_BUS_NO_RESULT, + method_lock_session, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("UnlockSession", + SD_BUS_ARGS("s", session_id), + SD_BUS_NO_RESULT, + method_lock_session, + SD_BUS_VTABLE_UNPRIVILEGED), SD_BUS_METHOD("LockSessions", NULL, NULL, @@ -3521,304 +3499,236 @@ static const sd_bus_vtable manager_vtable[] = { NULL, method_lock_sessions, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("KillSession", - "ssi", - SD_BUS_PARAM(session_id) - SD_BUS_PARAM(who) - SD_BUS_PARAM(signal_number), - NULL,, - method_kill_session, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("KillUser", - "ui", - SD_BUS_PARAM(uid) - SD_BUS_PARAM(signal_number), - NULL,, - method_kill_user, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("TerminateSession", - "s", - SD_BUS_PARAM(session_id), - NULL,, - method_terminate_session, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("TerminateUser", - "u", - SD_BUS_PARAM(uid), - NULL,, - method_terminate_user, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("TerminateSeat", - "s", - SD_BUS_PARAM(seat_id), - NULL,, - method_terminate_seat, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("SetUserLinger", - "ubb", - SD_BUS_PARAM(uid) - SD_BUS_PARAM(enable) - SD_BUS_PARAM(interactive), - NULL,, - method_set_user_linger, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("AttachDevice", - "ssb", - SD_BUS_PARAM(seat_id) - SD_BUS_PARAM(sysfs_path) - SD_BUS_PARAM(interactive), - NULL,, - method_attach_device, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("FlushDevices", - "b", - SD_BUS_PARAM(interactive), - NULL,, - method_flush_devices, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("PowerOff", - "b", - SD_BUS_PARAM(interactive), - NULL,, - method_poweroff, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("PowerOffWithFlags", - "t", - SD_BUS_PARAM(flags), - NULL,, - method_poweroff, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("Reboot", - "b", - SD_BUS_PARAM(interactive), - NULL,, - method_reboot, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("RebootWithFlags", - "t", - SD_BUS_PARAM(flags), - NULL,, - method_reboot, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("Halt", - "b", - SD_BUS_PARAM(interactive), - NULL,, - method_halt, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("HaltWithFlags", - "t", - SD_BUS_PARAM(flags), - NULL,, - method_halt, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("Suspend", - "b", - SD_BUS_PARAM(interactive), - NULL,, - method_suspend, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("SuspendWithFlags", - "t", - SD_BUS_PARAM(flags), - NULL,, - method_suspend, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("Hibernate", - "b", - SD_BUS_PARAM(interactive), - NULL,, - method_hibernate, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("HibernateWithFlags", - "t", - SD_BUS_PARAM(flags), - NULL,, - method_hibernate, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("HybridSleep", - "b", - SD_BUS_PARAM(interactive), - NULL,, - method_hybrid_sleep, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("HybridSleepWithFlags", - "t", - SD_BUS_PARAM(flags), - NULL,, - method_hybrid_sleep, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("SuspendThenHibernate", - "b", - SD_BUS_PARAM(interactive), - NULL,, - method_suspend_then_hibernate, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("SuspendThenHibernateWithFlags", - "t", - SD_BUS_PARAM(flags), - NULL,, - method_suspend_then_hibernate, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("CanPowerOff", - NULL,, - "s", - SD_BUS_PARAM(result), - method_can_poweroff, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("CanReboot", - NULL,, - "s", - SD_BUS_PARAM(result), - method_can_reboot, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("CanHalt", - NULL,, - "s", - SD_BUS_PARAM(result), - method_can_halt, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("CanSuspend", - NULL,, - "s", - SD_BUS_PARAM(result), - method_can_suspend, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("CanHibernate", - NULL,, - "s", - SD_BUS_PARAM(result), - method_can_hibernate, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("CanHybridSleep", - NULL,, - "s", - SD_BUS_PARAM(result), - method_can_hybrid_sleep, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("CanSuspendThenHibernate", - NULL,, - "s", - SD_BUS_PARAM(result), - method_can_suspend_then_hibernate, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("ScheduleShutdown", - "st", - SD_BUS_PARAM(type) - SD_BUS_PARAM(usec), - NULL,, - method_schedule_shutdown, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("CancelScheduledShutdown", - NULL,, - "b", - SD_BUS_PARAM(cancelled), - method_cancel_scheduled_shutdown, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("Inhibit", - "ssss", - SD_BUS_PARAM(what) - SD_BUS_PARAM(who) - SD_BUS_PARAM(why) - SD_BUS_PARAM(mode), - "h", - SD_BUS_PARAM(pipe_fd), - method_inhibit, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("CanRebootParameter", - NULL,, - "s", - SD_BUS_PARAM(result), - method_can_reboot_parameter, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("SetRebootParameter", - "s", - SD_BUS_PARAM(parameter), - NULL,, - method_set_reboot_parameter, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("CanRebootToFirmwareSetup", - NULL,, - "s", - SD_BUS_PARAM(result), - method_can_reboot_to_firmware_setup, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("SetRebootToFirmwareSetup", - "b", - SD_BUS_PARAM(enable), - NULL,, - method_set_reboot_to_firmware_setup, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("CanRebootToBootLoaderMenu", - NULL,, - "s", - SD_BUS_PARAM(result), - method_can_reboot_to_boot_loader_menu, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("SetRebootToBootLoaderMenu", - "t", - SD_BUS_PARAM(timeout), - NULL,, - method_set_reboot_to_boot_loader_menu, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("CanRebootToBootLoaderEntry", - NULL,, - "s", - SD_BUS_PARAM(result), - method_can_reboot_to_boot_loader_entry, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("SetRebootToBootLoaderEntry", - "s", - SD_BUS_PARAM(boot_loader_entry), - NULL,, - method_set_reboot_to_boot_loader_entry, - SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("SetWallMessage", - "sb", - SD_BUS_PARAM(wall_message) - SD_BUS_PARAM(enable), - NULL,, - method_set_wall_message, - SD_BUS_VTABLE_UNPRIVILEGED), - - SD_BUS_SIGNAL_WITH_NAMES("SessionNew", - "so", - SD_BUS_PARAM(session_id) - SD_BUS_PARAM(object_path), - 0), - SD_BUS_SIGNAL_WITH_NAMES("SessionRemoved", - "so", - SD_BUS_PARAM(session_id) - SD_BUS_PARAM(object_path), - 0), - SD_BUS_SIGNAL_WITH_NAMES("UserNew", - "uo", - SD_BUS_PARAM(uid) - SD_BUS_PARAM(object_path), - 0), - SD_BUS_SIGNAL_WITH_NAMES("UserRemoved", - "uo", - SD_BUS_PARAM(uid) - SD_BUS_PARAM(object_path), - 0), - SD_BUS_SIGNAL_WITH_NAMES("SeatNew", - "so", - SD_BUS_PARAM(seat_id) - SD_BUS_PARAM(object_path), - 0), - SD_BUS_SIGNAL_WITH_NAMES("SeatRemoved", - "so", - SD_BUS_PARAM(seat_id) - SD_BUS_PARAM(object_path), - 0), - SD_BUS_SIGNAL_WITH_NAMES("PrepareForShutdown", - "b", - SD_BUS_PARAM(start), - 0), - SD_BUS_SIGNAL_WITH_NAMES("PrepareForSleep", - "b", - SD_BUS_PARAM(start), - 0), + SD_BUS_METHOD_WITH_ARGS("KillSession", + SD_BUS_ARGS("s", session_id, "s", who, "i", signal_number), + SD_BUS_NO_RESULT, + method_kill_session, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("KillUser", + SD_BUS_ARGS("u", uid, "i", signal_number), + SD_BUS_NO_RESULT, + method_kill_user, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("TerminateSession", + SD_BUS_ARGS("s", session_id), + SD_BUS_NO_RESULT, + method_terminate_session, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("TerminateUser", + SD_BUS_ARGS("u", uid), + SD_BUS_NO_RESULT, + method_terminate_user, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("TerminateSeat", + SD_BUS_ARGS("s", seat_id), + SD_BUS_NO_RESULT, + method_terminate_seat, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("SetUserLinger", + SD_BUS_ARGS("u", uid, "b", enable, "b", interactive), + SD_BUS_NO_RESULT, + method_set_user_linger, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("AttachDevice", + SD_BUS_ARGS("s", seat_id, "s", sysfs_path, "b", interactive), + SD_BUS_NO_RESULT, + method_attach_device, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("FlushDevices", + SD_BUS_ARGS("b", interactive), + SD_BUS_NO_RESULT, + method_flush_devices, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("PowerOff", + SD_BUS_ARGS("b", interactive), + SD_BUS_NO_RESULT, + method_poweroff, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("PowerOffWithFlags", + SD_BUS_ARGS("t", flags), + SD_BUS_NO_RESULT, + method_poweroff, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("Reboot", + SD_BUS_ARGS("b", interactive), + SD_BUS_NO_RESULT, + method_reboot, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("RebootWithFlags", + SD_BUS_ARGS("t", flags), + SD_BUS_NO_RESULT, + method_reboot, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("Halt", + SD_BUS_ARGS("b", interactive), + SD_BUS_NO_RESULT, + method_halt, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("HaltWithFlags", + SD_BUS_ARGS("t", flags), + SD_BUS_NO_RESULT, + method_halt, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("Suspend", + SD_BUS_ARGS("b", interactive), + SD_BUS_NO_RESULT, + method_suspend, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("SuspendWithFlags", + SD_BUS_ARGS("t", flags), + SD_BUS_NO_RESULT, + method_suspend, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("Hibernate", + SD_BUS_ARGS("b", interactive), + SD_BUS_NO_RESULT, + method_hibernate, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("HibernateWithFlags", + SD_BUS_ARGS("t", flags), + SD_BUS_NO_RESULT, + method_hibernate, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("HybridSleep", + SD_BUS_ARGS("b", interactive), + SD_BUS_NO_RESULT, + method_hybrid_sleep, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("HybridSleepWithFlags", + SD_BUS_ARGS("t", flags), + SD_BUS_NO_RESULT, + method_hybrid_sleep, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("SuspendThenHibernate", + SD_BUS_ARGS("b", interactive), + SD_BUS_NO_RESULT, + method_suspend_then_hibernate, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("SuspendThenHibernateWithFlags", + SD_BUS_ARGS("t", flags), + SD_BUS_NO_RESULT, + method_suspend_then_hibernate, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("CanPowerOff", + SD_BUS_NO_ARGS, + SD_BUS_RESULT("s", result), + method_can_poweroff, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("CanReboot", + SD_BUS_NO_ARGS, + SD_BUS_RESULT("s", result), + method_can_reboot, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("CanHalt", + SD_BUS_NO_ARGS, + SD_BUS_RESULT("s", result), + method_can_halt, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("CanSuspend", + SD_BUS_NO_ARGS, + SD_BUS_RESULT("s", result), + method_can_suspend, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("CanHibernate", + SD_BUS_NO_ARGS, + SD_BUS_RESULT("s", result), + method_can_hibernate, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("CanHybridSleep", + SD_BUS_NO_ARGS, + SD_BUS_RESULT("s", result), + method_can_hybrid_sleep, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("CanSuspendThenHibernate", + SD_BUS_NO_ARGS, + SD_BUS_RESULT("s", result), + method_can_suspend_then_hibernate, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("ScheduleShutdown", + SD_BUS_ARGS("s", type, "t", usec), + SD_BUS_NO_RESULT, + method_schedule_shutdown, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("CancelScheduledShutdown", + SD_BUS_NO_ARGS, + SD_BUS_RESULT("b", cancelled), + method_cancel_scheduled_shutdown, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("Inhibit", + SD_BUS_ARGS("s", what, "s", who, "s", why, "s", mode), + SD_BUS_RESULT("h", pipe_fd), + method_inhibit, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("CanRebootParameter", + SD_BUS_NO_ARGS, + SD_BUS_RESULT("s", result), + method_can_reboot_parameter, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("SetRebootParameter", + SD_BUS_ARGS("s", parameter), + SD_BUS_NO_RESULT, + method_set_reboot_parameter, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("CanRebootToFirmwareSetup", + SD_BUS_NO_ARGS, + SD_BUS_RESULT("s", result), + method_can_reboot_to_firmware_setup, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("SetRebootToFirmwareSetup", + SD_BUS_ARGS("b", enable), + SD_BUS_NO_RESULT, + method_set_reboot_to_firmware_setup, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("CanRebootToBootLoaderMenu", + SD_BUS_NO_ARGS, + SD_BUS_RESULT("s", result), + method_can_reboot_to_boot_loader_menu, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("SetRebootToBootLoaderMenu", + SD_BUS_ARGS("t", timeout), + SD_BUS_NO_RESULT, + method_set_reboot_to_boot_loader_menu, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("CanRebootToBootLoaderEntry", + SD_BUS_NO_ARGS, + SD_BUS_RESULT("s", result), + method_can_reboot_to_boot_loader_entry, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("SetRebootToBootLoaderEntry", + SD_BUS_ARGS("s", boot_loader_entry), + SD_BUS_NO_RESULT, + method_set_reboot_to_boot_loader_entry, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_ARGS("SetWallMessage", + SD_BUS_ARGS("s", wall_message, "b", enable), + SD_BUS_NO_RESULT, + method_set_wall_message, + SD_BUS_VTABLE_UNPRIVILEGED), + + SD_BUS_SIGNAL_WITH_ARGS("SessionNew", + SD_BUS_ARGS("s", session_id, "o", object_path), + 0), + SD_BUS_SIGNAL_WITH_ARGS("SessionRemoved", + SD_BUS_ARGS("s", session_id, "o", object_path), + 0), + SD_BUS_SIGNAL_WITH_ARGS("UserNew", + SD_BUS_ARGS("u", uid, "o", object_path), + 0), + SD_BUS_SIGNAL_WITH_ARGS("UserRemoved", + SD_BUS_ARGS("u", uid, "o", object_path), + 0), + SD_BUS_SIGNAL_WITH_ARGS("SeatNew", + SD_BUS_ARGS("s", seat_id, "o", object_path), + 0), + SD_BUS_SIGNAL_WITH_ARGS("SeatRemoved", + SD_BUS_ARGS("s", seat_id, "o", object_path), + 0), + SD_BUS_SIGNAL_WITH_ARGS("PrepareForShutdown", + SD_BUS_ARGS("b", start), + 0), + SD_BUS_SIGNAL_WITH_ARGS("PrepareForSleep", + SD_BUS_ARGS("b", start), + 0), SD_BUS_VTABLE_END }; |