-static const BusProperty bus_login_user_properties[] = {
- { "UID", bus_property_append_uid, "u", offsetof(User, uid) },
- { "GID", bus_property_append_gid, "u", offsetof(User, gid) },
- { "Name", bus_property_append_string, "s", offsetof(User, name), true },
- { "Timestamp", bus_property_append_usec, "t", offsetof(User, timestamp.realtime) },
- { "TimestampMonotonic", bus_property_append_usec, "t", offsetof(User, timestamp.monotonic) },
- { "RuntimePath", bus_property_append_string, "s", offsetof(User, runtime_path), true },
- { "DefaultControlGroup", bus_user_append_default_cgroup, "s", 0 },
- { "Service", bus_property_append_string, "s", offsetof(User, service), true },
- { "Display", bus_user_append_display, "(so)", 0 },
- { "State", bus_user_append_state, "s", 0 },
- { "Sessions", bus_user_append_sessions, "a(so)", 0 },
- { "IdleHint", bus_user_append_idle_hint, "b", 0 },
- { "IdleSinceHint", bus_user_append_idle_hint_since, "t", 0 },
- { "IdleSinceHintMonotonic", bus_user_append_idle_hint_since, "t", 0 },
- { NULL, }
+const sd_bus_vtable user_vtable[] = {
+ SD_BUS_VTABLE_START(0),
+
+ SD_BUS_PROPERTY("UID", "u", bus_property_get_uid, offsetof(User, uid), 0),
+ SD_BUS_PROPERTY("GID", "u", bus_property_get_gid, offsetof(User, gid), 0),
+ SD_BUS_PROPERTY("Name", "s", NULL, offsetof(User, name), 0),
+ SD_BUS_PROPERTY("Timestamp", "t", NULL, offsetof(User, timestamp.realtime), 0),
+ SD_BUS_PROPERTY("TimestampMonotonic", "t", NULL, offsetof(User, timestamp.monotonic), 0),
+ SD_BUS_PROPERTY("RuntimePath", "s", NULL, offsetof(User, runtime_path), 0),
+ SD_BUS_PROPERTY("Service", "s", NULL, offsetof(User, service), 0),
+ SD_BUS_PROPERTY("Slice", "s", NULL, offsetof(User, slice), 0),
+ SD_BUS_PROPERTY("Display", "(so)", property_get_display, 0, 0),
+ SD_BUS_PROPERTY("State", "s", property_get_state, 0, 0),
+ SD_BUS_PROPERTY("Sessions", "a(so)", property_get_sessions, 0, SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
+ SD_BUS_PROPERTY("IdleHint", "b", property_get_idle_hint, 0, SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
+ SD_BUS_PROPERTY("IdleSinceHint", "t", property_get_idle_since_hint, 0, SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
+ SD_BUS_PROPERTY("IdleSinceHintMonotonic", "t", property_get_idle_since_hint, 0, SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
+ SD_BUS_PROPERTY("Linger", "b", property_get_linger, 0, 0),
+
+ SD_BUS_METHOD("Terminate", NULL, NULL, method_terminate, 0),
+ SD_BUS_METHOD("Kill", "i", NULL, method_kill, 0),
+
+ SD_BUS_VTABLE_END