diff options
author | Lennart Poettering <lennart@poettering.net> | 2020-04-17 23:40:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-17 23:40:50 +0200 |
commit | 09f87228011cb763c3c0a94193d3f4eb0c6cc23b (patch) | |
tree | cbc7bd657853e8f5f700a93f9a159de3dc683412 /src/login/logind-dbus.c | |
parent | 1cabd2d0c56b7de73e4a4fb645f3bbed4a528d2c (diff) | |
parent | ca264f7d96df3c33ad808b5ca4c4fc8acadc0067 (diff) | |
download | systemd-09f87228011cb763c3c0a94193d3f4eb0c6cc23b.tar.gz |
Merge pull request #15396 from keszybz/dbus-api-docs
D-bus API docs
Diffstat (limited to 'src/login/logind-dbus.c')
-rw-r--r-- | src/login/logind-dbus.c | 443 |
1 files changed, 383 insertions, 60 deletions
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c index 047f835327..985c58cc63 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -3367,66 +3367,389 @@ 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("GetSession", "s", "o", method_get_session, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("GetSessionByPID", "u", "o", method_get_session_by_pid, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("GetUser", "u", "o", method_get_user, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("GetUserByPID", "u", "o", method_get_user_by_pid, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("GetSeat", "s", "o", method_get_seat, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("ListSessions", NULL, "a(susso)", method_list_sessions, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("ListUsers", NULL, "a(uso)", method_list_users, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("ListSeats", NULL, "a(so)", method_list_seats, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("ListInhibitors", NULL, "a(ssssuu)", method_list_inhibitors, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("CreateSession", "uusssssussbssa(sv)", "soshusub", method_create_session, 0), - SD_BUS_METHOD("ReleaseSession", "s", NULL, method_release_session, 0), - SD_BUS_METHOD("ActivateSession", "s", NULL, method_activate_session, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("ActivateSessionOnSeat", "ss", NULL, method_activate_session_on_seat, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("LockSession", "s", NULL, method_lock_session, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("UnlockSession", "s", NULL, method_lock_session, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("LockSessions", NULL, NULL, method_lock_sessions, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("UnlockSessions", NULL, NULL, method_lock_sessions, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("KillSession", "ssi", NULL, method_kill_session, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("KillUser", "ui", NULL, method_kill_user, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("TerminateSession", "s", NULL, method_terminate_session, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("TerminateUser", "u", NULL, method_terminate_user, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("TerminateSeat", "s", NULL, method_terminate_seat, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("SetUserLinger", "ubb", NULL, method_set_user_linger, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("AttachDevice", "ssb", NULL, method_attach_device, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("FlushDevices", "b", NULL, method_flush_devices, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("PowerOff", "b", NULL, method_poweroff, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("Reboot", "b", NULL, method_reboot, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("Halt", "b", NULL, method_halt, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("Suspend", "b", NULL, method_suspend, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("Hibernate", "b", NULL, method_hibernate, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("HybridSleep", "b", NULL, method_hybrid_sleep, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("SuspendThenHibernate", "b", NULL, method_suspend_then_hibernate, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("CanPowerOff", NULL, "s", method_can_poweroff, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("CanReboot", NULL, "s", method_can_reboot, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("CanHalt", NULL, "s", method_can_halt, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("CanSuspend", NULL, "s", method_can_suspend, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("CanHibernate", NULL, "s", method_can_hibernate, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("CanHybridSleep", NULL, "s", method_can_hybrid_sleep, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("CanSuspendThenHibernate", NULL, "s", method_can_suspend_then_hibernate, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("ScheduleShutdown", "st", NULL, method_schedule_shutdown, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("CancelScheduledShutdown", NULL, "b", method_cancel_scheduled_shutdown, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("Inhibit", "ssss", "h", method_inhibit, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("CanRebootParameter", NULL, "s", method_can_reboot_parameter, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("SetRebootParameter", "s", NULL, method_set_reboot_parameter, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("CanRebootToFirmwareSetup", NULL, "s", method_can_reboot_to_firmware_setup, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("SetRebootToFirmwareSetup", "b", NULL, method_set_reboot_to_firmware_setup, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("CanRebootToBootLoaderMenu", NULL, "s", method_can_reboot_to_boot_loader_menu, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("SetRebootToBootLoaderMenu", "t", NULL, method_set_reboot_to_boot_loader_menu, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("CanRebootToBootLoaderEntry", NULL, "s", method_can_reboot_to_boot_loader_entry, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("SetRebootToBootLoaderEntry", "s", NULL, method_set_reboot_to_boot_loader_entry, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("SetWallMessage", "sb", NULL, method_set_wall_message, SD_BUS_VTABLE_UNPRIVILEGED), - - SD_BUS_SIGNAL("SessionNew", "so", 0), - SD_BUS_SIGNAL("SessionRemoved", "so", 0), - SD_BUS_SIGNAL("UserNew", "uo", 0), - SD_BUS_SIGNAL("UserRemoved", "uo", 0), - SD_BUS_SIGNAL("SeatNew", "so", 0), - SD_BUS_SIGNAL("SeatRemoved", "so", 0), - SD_BUS_SIGNAL("PrepareForShutdown", "b", 0), - SD_BUS_SIGNAL("PrepareForSleep", "b", 0), + 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("LockSessions", + NULL, + NULL, + method_lock_sessions, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD("UnlockSessions", + NULL, + 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("Reboot", + "b", + SD_BUS_PARAM(interactive), + 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("Suspend", + "b", + SD_BUS_PARAM(interactive), + 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("HybridSleep", + "b", + SD_BUS_PARAM(interactive), + 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("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_VTABLE_END }; |