bus-util: add bus_property_get_string_set() helper
This is a common implementation of a property getter for a Set of strings.
This commit is contained in:
@@ -697,3 +697,21 @@ int bus_message_append_string_set(sd_bus_message *m, Set *set) {
|
||||
|
||||
return sd_bus_message_close_container(m);
|
||||
}
|
||||
|
||||
int bus_property_get_string_set(
|
||||
sd_bus *bus,
|
||||
const char *path,
|
||||
const char *interface,
|
||||
const char *property,
|
||||
sd_bus_message *reply,
|
||||
void *userdata,
|
||||
sd_bus_error *error) {
|
||||
|
||||
Set **s = ASSERT_PTR(userdata);
|
||||
|
||||
assert(bus);
|
||||
assert(property);
|
||||
assert(reply);
|
||||
|
||||
return bus_message_append_string_set(reply, *s);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user