1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-11 05:17:44 +03:00

logind: add dbus parameter names

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2020-04-08 23:34:17 +02:00
parent 44fd44f1cf
commit 4cb5fd0da8
4 changed files with 495 additions and 77 deletions

View File

@ -3360,66 +3360,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_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("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_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
};

View File

@ -305,8 +305,20 @@ const sd_bus_vtable seat_vtable[] = {
SD_BUS_PROPERTY("IdleSinceHintMonotonic", "t", property_get_idle_since_hint, 0, SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
SD_BUS_METHOD("Terminate", NULL, NULL, bus_seat_method_terminate, SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD("ActivateSession", "s", NULL, method_activate_session, SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD("SwitchTo", "u", NULL, method_switch_to, SD_BUS_VTABLE_UNPRIVILEGED),
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("SwitchTo",
"u",
SD_BUS_PARAM(vtnr),
NULL,,
method_switch_to,
SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD("SwitchToNext", NULL, NULL, method_switch_to_next, SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD("SwitchToPrevious", NULL, NULL, method_switch_to_previous, SD_BUS_VTABLE_UNPRIVILEGED),

View File

@ -583,22 +583,100 @@ const sd_bus_vtable session_vtable[] = {
SD_BUS_PROPERTY("IdleSinceHintMonotonic", "t", property_get_idle_since_hint, 0, SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
SD_BUS_PROPERTY("LockedHint", "b", property_get_locked_hint, 0, SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
SD_BUS_METHOD("Terminate", NULL, NULL, bus_session_method_terminate, SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD("Activate", NULL, NULL, bus_session_method_activate, SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD("Lock", NULL, NULL, bus_session_method_lock, SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD("Unlock", NULL, NULL, bus_session_method_lock, SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD("SetIdleHint", "b", NULL, method_set_idle_hint, SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD("SetLockedHint", "b", NULL, method_set_locked_hint, SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD("Kill", "si", NULL, bus_session_method_kill, SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD("TakeControl", "b", NULL, method_take_control, SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD("ReleaseControl", NULL, NULL, method_release_control, SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD("TakeDevice", "uu", "hb", method_take_device, SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD("ReleaseDevice", "uu", NULL, method_release_device, SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD("PauseDeviceComplete", "uu", NULL, method_pause_device_complete, SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD("SetBrightness", "ssu", NULL, method_set_brightness, SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD("Terminate",
NULL,
NULL,
bus_session_method_terminate,
SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD("Activate",
NULL,
NULL,
bus_session_method_activate,
SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD("Lock",
NULL,
NULL,
bus_session_method_lock,
SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD("Unlock",
NULL,
NULL,
bus_session_method_lock,
SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD_WITH_NAMES("SetIdleHint",
"b",
SD_BUS_PARAM(idle),
NULL,,
method_set_idle_hint,
SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD_WITH_NAMES("SetLockedHint",
"b",
SD_BUS_PARAM(locked),
NULL,,
method_set_locked_hint,
SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD_WITH_NAMES("Kill",
"si",
SD_BUS_PARAM(who)
SD_BUS_PARAM(signal_number),
NULL,,
bus_session_method_kill,
SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD_WITH_NAMES("TakeControl",
"b",
SD_BUS_PARAM(force),
NULL,,
method_take_control,
SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD("ReleaseControl",
NULL,
NULL,
method_release_control,
SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD_WITH_NAMES("TakeDevice",
"uu",
SD_BUS_PARAM(major)
SD_BUS_PARAM(minor),
"hb",
SD_BUS_PARAM(fd)
SD_BUS_PARAM(inactive),
method_take_device,
SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD_WITH_NAMES("ReleaseDevice",
"uu",
SD_BUS_PARAM(major)
SD_BUS_PARAM(minor),
NULL,,
method_release_device,
SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD_WITH_NAMES("PauseDeviceComplete",
"uu",
SD_BUS_PARAM(major)
SD_BUS_PARAM(minor),
NULL,,
method_pause_device_complete,
SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD_WITH_NAMES("SetBrightness",
"ssu",
SD_BUS_PARAM(subsystem)
SD_BUS_PARAM(name)
SD_BUS_PARAM(brightness),
NULL,,
method_set_brightness,
SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_SIGNAL("PauseDevice", "uus", 0),
SD_BUS_SIGNAL("ResumeDevice", "uuh", 0),
SD_BUS_SIGNAL_WITH_NAMES("PauseDevice",
"uus",
SD_BUS_PARAM(major)
SD_BUS_PARAM(minor)
SD_BUS_PARAM(type),
0),
SD_BUS_SIGNAL_WITH_NAMES("ResumeDevice",
"uuh",
SD_BUS_PARAM(major)
SD_BUS_PARAM(minor)
SD_BUS_PARAM(fd),
0),
SD_BUS_SIGNAL("Lock", NULL, 0),
SD_BUS_SIGNAL("Unlock", NULL, 0),

View File

@ -277,7 +277,12 @@ const sd_bus_vtable user_vtable[] = {
SD_BUS_PROPERTY("Linger", "b", property_get_linger, 0, 0),
SD_BUS_METHOD("Terminate", NULL, NULL, bus_user_method_terminate, SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD("Kill", "i", NULL, bus_user_method_kill, SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD_WITH_NAMES("Kill",
"i",
SD_BUS_PARAM(signal_number),
NULL,,
bus_user_method_kill,
SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_VTABLE_END
};