summaryrefslogtreecommitdiff
path: root/src/core/dbus-unit.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-06-27 21:14:56 +0200
committerLennart Poettering <lennart@poettering.net>2013-06-27 21:14:56 +0200
commit8e2af478402414f060bbc16e1b4bbe7de1779c13 (patch)
tree2548caac0cda5efadd459e3a4e3744449d57a181 /src/core/dbus-unit.h
parentaae72d6fa0910891aa446ec43c548512987d453a (diff)
dbus: add infrastructure for changing multiple properties at once on units and hook some cgroup attributes up to it
This introduces two bus calls to make runtime changes to selected bus properties, optionally with persistence. This currently hooks this up only for three cgroup atributes, but this brings the infrastructure to add more changable attributes. This allows setting multiple attributes at once, and takes an array rather than a dictionary of properties, in order to implement simple resetting of lists using the same approach as when they are sourced from unit files. This means, that list properties are appended to by this call, unless they are first reset via assigning the empty list.
Diffstat (limited to 'src/core/dbus-unit.h')
-rw-r--r--src/core/dbus-unit.h20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/core/dbus-unit.h b/src/core/dbus-unit.h
index 1e226ef451..2fd56f25c3 100644
--- a/src/core/dbus-unit.h
+++ b/src/core/dbus-unit.h
@@ -61,6 +61,10 @@
" <arg name=\"signal\" type=\"i\" direction=\"in\"/>\n" \
" </method>\n" \
" <method name=\"ResetFailed\"/>\n" \
+ " <method name=\"SetProperties\">\n" \
+ " <arg name=\"runtime\" type=\"b\" direction=\"in\"/>\n" \
+ " <arg name=\"properties\" type=\"a(sv)\" direction=\"in\"/>\n" \
+ " </method>\n" \
" <property name=\"Id\" type=\"s\" access=\"read\"/>\n" \
" <property name=\"Names\" type=\"as\" access=\"read\"/>\n" \
" <property name=\"Following\" type=\"s\" access=\"read\"/>\n" \
@@ -135,19 +139,9 @@ extern const BusProperty bus_unit_properties[];
void bus_unit_send_change_signal(Unit *u);
void bus_unit_send_removed_signal(Unit *u);
-DBusHandlerResult bus_unit_queue_job(
- DBusConnection *connection,
- DBusMessage *message,
- Unit *u,
- JobType type,
- JobMode mode,
- bool reload_if_possible);
-
-int bus_unit_cgroup_set(Unit *u, DBusMessageIter *iter);
-int bus_unit_cgroup_unset(Unit *u, DBusMessageIter *iter);
-int bus_unit_cgroup_attribute_get(Unit *u, DBusMessageIter *iter, char ***_result);
-int bus_unit_cgroup_attribute_set(Unit *u, DBusMessageIter *iter);
-int bus_unit_cgroup_attribute_unset(Unit *u, DBusMessageIter *iter);
+DBusHandlerResult bus_unit_queue_job(DBusConnection *connection, DBusMessage *message, Unit *u, JobType type, JobMode mode, bool reload_if_possible);
+
+int bus_unit_set_properties(Unit *u, DBusMessageIter *i, UnitSetPropertiesMode mode, DBusError *error);
extern const DBusObjectPathVTable bus_unit_vtable;