diff options
author | Nishal Kulkarni <nishalkulkarni@gmail.com> | 2021-12-17 14:01:55 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-12-18 03:57:57 +0100 |
commit | 9a8141662eb62b2006dcfa71ad30bd308f1cc442 (patch) | |
tree | 6e4b01788b98f3d7a1e21f1bcadcfdbd3984c4d0 /src/home/homed-home-bus.c | |
parent | network: a couple of tweaks suggested by Coccinelle (diff) | |
download | systemd-9a8141662eb62b2006dcfa71ad30bd308f1cc442.tar.xz systemd-9a8141662eb62b2006dcfa71ad30bd308f1cc442.zip |
homed: Use new SD_BUS_METHOD_WITH_ARGS macro
Migrate homed to use the new macros to declare a D-Bus method.
Replaced `SD_BUS_METHOD_WITH_NAMES` with `SD_BUS_METHOD_WITH_ARGS`
Diffstat (limited to 'src/home/homed-home-bus.c')
-rw-r--r-- | src/home/homed-home-bus.c | 115 |
1 files changed, 50 insertions, 65 deletions
diff --git a/src/home/homed-home-bus.c b/src/home/homed-home-bus.c index 61d4690780..b39ca3262c 100644 --- a/src/home/homed-home-bus.c +++ b/src/home/homed-home-bus.c @@ -796,76 +796,61 @@ const sd_bus_vtable home_vtable[] = { property_get_user_record, 0, SD_BUS_VTABLE_PROPERTY_EMITS_INVALIDATION|SD_BUS_VTABLE_SENSITIVE), - SD_BUS_METHOD_WITH_NAMES("Activate", - "s", - SD_BUS_PARAM(secret), - NULL,, - bus_home_method_activate, - SD_BUS_VTABLE_SENSITIVE), + SD_BUS_METHOD_WITH_ARGS("Activate", + SD_BUS_ARGS("s", secret), + SD_BUS_NO_RESULT, + bus_home_method_activate, + SD_BUS_VTABLE_SENSITIVE), SD_BUS_METHOD("Deactivate", NULL, NULL, bus_home_method_deactivate, 0), SD_BUS_METHOD("Unregister", NULL, NULL, bus_home_method_unregister, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("Realize", - "s", - SD_BUS_PARAM(secret), - NULL,, - bus_home_method_realize, - SD_BUS_VTABLE_UNPRIVILEGED|SD_BUS_VTABLE_SENSITIVE), + SD_BUS_METHOD_WITH_ARGS("Realize", + SD_BUS_ARGS("s", secret), + SD_BUS_NO_RESULT, + bus_home_method_realize, + SD_BUS_VTABLE_UNPRIVILEGED|SD_BUS_VTABLE_SENSITIVE), SD_BUS_METHOD("Remove", NULL, NULL, bus_home_method_remove, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_NAMES("Fixate", - "s", - SD_BUS_PARAM(secret), - NULL,, - bus_home_method_fixate, - SD_BUS_VTABLE_SENSITIVE), - SD_BUS_METHOD_WITH_NAMES("Authenticate", - "s", - SD_BUS_PARAM(secret), - NULL,, - bus_home_method_authenticate, - SD_BUS_VTABLE_UNPRIVILEGED|SD_BUS_VTABLE_SENSITIVE), - SD_BUS_METHOD_WITH_NAMES("Update", - "s", - SD_BUS_PARAM(user_record), - NULL,, - bus_home_method_update, - SD_BUS_VTABLE_UNPRIVILEGED|SD_BUS_VTABLE_SENSITIVE), - SD_BUS_METHOD_WITH_NAMES("Resize", - "ts", - SD_BUS_PARAM(size) - SD_BUS_PARAM(secret), - NULL,, - bus_home_method_resize, - SD_BUS_VTABLE_UNPRIVILEGED|SD_BUS_VTABLE_SENSITIVE), - SD_BUS_METHOD_WITH_NAMES("ChangePassword", - "ss", - SD_BUS_PARAM(new_secret) - SD_BUS_PARAM(old_secret), - NULL,, - bus_home_method_change_password, - SD_BUS_VTABLE_UNPRIVILEGED|SD_BUS_VTABLE_SENSITIVE), + SD_BUS_METHOD_WITH_ARGS("Fixate", + SD_BUS_ARGS("s", secret), + SD_BUS_NO_RESULT, + bus_home_method_fixate, + SD_BUS_VTABLE_SENSITIVE), + SD_BUS_METHOD_WITH_ARGS("Authenticate", + SD_BUS_ARGS("s", secret), + SD_BUS_NO_RESULT, + bus_home_method_authenticate, + SD_BUS_VTABLE_UNPRIVILEGED|SD_BUS_VTABLE_SENSITIVE), + SD_BUS_METHOD_WITH_ARGS("Update", + SD_BUS_ARGS("s", user_record), + SD_BUS_NO_RESULT, + bus_home_method_update, + SD_BUS_VTABLE_UNPRIVILEGED|SD_BUS_VTABLE_SENSITIVE), + SD_BUS_METHOD_WITH_ARGS("Resize", + SD_BUS_ARGS("t", size, "s", secret), + SD_BUS_NO_RESULT, + bus_home_method_resize, + SD_BUS_VTABLE_UNPRIVILEGED|SD_BUS_VTABLE_SENSITIVE), + SD_BUS_METHOD_WITH_ARGS("ChangePassword", + SD_BUS_ARGS("s", new_secret, "s", old_secret), + SD_BUS_NO_RESULT, + bus_home_method_change_password, + SD_BUS_VTABLE_UNPRIVILEGED|SD_BUS_VTABLE_SENSITIVE), SD_BUS_METHOD("Lock", NULL, NULL, bus_home_method_lock, 0), - SD_BUS_METHOD_WITH_NAMES("Unlock", - "s", - SD_BUS_PARAM(secret), - NULL,, - bus_home_method_unlock, - SD_BUS_VTABLE_SENSITIVE), - SD_BUS_METHOD_WITH_NAMES("Acquire", - "sb", - SD_BUS_PARAM(secret) - SD_BUS_PARAM(please_suspend), - "h", - SD_BUS_PARAM(send_fd), - bus_home_method_acquire, - SD_BUS_VTABLE_SENSITIVE), - SD_BUS_METHOD_WITH_NAMES("Ref", - "b", - SD_BUS_PARAM(please_suspend), - "h", - SD_BUS_PARAM(send_fd), - bus_home_method_ref, - 0), + SD_BUS_METHOD_WITH_ARGS("Unlock", + SD_BUS_ARGS("s", secret), + SD_BUS_NO_RESULT, + bus_home_method_unlock, + SD_BUS_VTABLE_SENSITIVE), + SD_BUS_METHOD_WITH_ARGS("Acquire", + SD_BUS_ARGS("s", secret, "b", please_suspend), + SD_BUS_RESULT("h", send_fd), + bus_home_method_acquire, + SD_BUS_VTABLE_SENSITIVE), + SD_BUS_METHOD_WITH_ARGS("Ref", + SD_BUS_ARGS("b", please_suspend), + SD_BUS_RESULT("h", send_fd), + bus_home_method_ref, + 0), SD_BUS_METHOD("Release", NULL, NULL, bus_home_method_release, 0), SD_BUS_VTABLE_END }; |