diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-04-09 15:39:58 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-04-12 19:48:01 +0200 |
commit | 106d79be06299cb62a947c9c3ca7f5076db9ae66 (patch) | |
tree | 76bd50e4492c6a9f87c2e61483cfbd2085d08f29 /src/hostname | |
parent | man: import org.freedesktop.hostname1(3) from the wiki (diff) | |
download | systemd-106d79be06299cb62a947c9c3ca7f5076db9ae66.tar.xz systemd-106d79be06299cb62a947c9c3ca7f5076db9ae66.zip |
hostnamed: add dbus parameter names
Diffstat (limited to 'src/hostname')
-rw-r--r-- | src/hostname/hostnamed.c | 66 |
1 files changed, 58 insertions, 8 deletions
diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c index 21f6471495..66af1c0b5c 100644 --- a/src/hostname/hostnamed.c +++ b/src/hostname/hostnamed.c @@ -677,14 +677,64 @@ static const sd_bus_vtable hostname_vtable[] = { SD_BUS_PROPERTY("OperatingSystemPrettyName", "s", NULL, offsetof(Context, data) + sizeof(char*) * PROP_OS_PRETTY_NAME, SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("OperatingSystemCPEName", "s", NULL, offsetof(Context, data) + sizeof(char*) * PROP_OS_CPE_NAME, SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("HomeURL", "s", NULL, offsetof(Context, data) + sizeof(char*) * PROP_HOME_URL, SD_BUS_VTABLE_PROPERTY_CONST), - SD_BUS_METHOD("SetHostname", "sb", NULL, method_set_hostname, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("SetStaticHostname", "sb", NULL, method_set_static_hostname, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("SetPrettyHostname", "sb", NULL, method_set_pretty_hostname, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("SetIconName", "sb", NULL, method_set_icon_name, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("SetChassis", "sb", NULL, method_set_chassis, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("SetDeployment", "sb", NULL, method_set_deployment, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("SetLocation", "sb", NULL, method_set_location, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("GetProductUUID", "b", "ay", method_get_product_uuid, SD_BUS_VTABLE_UNPRIVILEGED), + + SD_BUS_METHOD_WITH_NAMES("SetHostname", + "sb", + SD_BUS_PARAM(hostname) + SD_BUS_PARAM(interactive), + NULL,, + method_set_hostname, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_NAMES("SetStaticHostname", + "sb", + SD_BUS_PARAM(hostname) + SD_BUS_PARAM(interactive), + NULL,, + method_set_static_hostname, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_NAMES("SetPrettyHostname", + "sb", + SD_BUS_PARAM(hostname) + SD_BUS_PARAM(interactive), + NULL,, + method_set_pretty_hostname, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_NAMES("SetIconName", + "sb", + SD_BUS_PARAM(icon) + SD_BUS_PARAM(interactive), + NULL,, + method_set_icon_name, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_NAMES("SetChassis", + "sb", + SD_BUS_PARAM(chassis) + SD_BUS_PARAM(interactive), + NULL,, + method_set_chassis, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_NAMES("SetDeployment", + "sb", + SD_BUS_PARAM(deployment) + SD_BUS_PARAM(interactive), + NULL,, + method_set_deployment, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_NAMES("SetLocation", + "sb", + SD_BUS_PARAM(location) + SD_BUS_PARAM(interactive), + NULL,, + method_set_location, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_METHOD_WITH_NAMES("GetProductUUID", + "b", + SD_BUS_PARAM(interactive), + "ay", + SD_BUS_PARAM(uuid), + method_get_product_uuid, + SD_BUS_VTABLE_UNPRIVILEGED), + SD_BUS_VTABLE_END, }; |