mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
dbus: follow standardized fdo PropertiesChanged signal spec
This commit is contained in:
6
fixme
6
fixme
@@ -40,8 +40,6 @@
|
||||
|
||||
* write utmp record a la upstart for processes
|
||||
|
||||
* follow property change dbus spec
|
||||
|
||||
* selinux policy loading
|
||||
|
||||
* place /etc/inittab with explaining blurb.
|
||||
@@ -62,6 +60,10 @@
|
||||
|
||||
* bash completion a la gdbus
|
||||
|
||||
* fstab mit tüdelchen
|
||||
|
||||
* api mounts gegen fstab mergen und remounten
|
||||
|
||||
External:
|
||||
|
||||
* procps, psmisc, sysvinit-tools, hostname → util-linux-ng
|
||||
|
||||
@@ -843,6 +843,7 @@ const UnitVTable automount_vtable = {
|
||||
|
||||
.reset_maintenance = automount_reset_maintenance,
|
||||
|
||||
.bus_interface = "org.freedesktop.systemd1.Automount",
|
||||
.bus_message_handler = bus_automount_message_handler,
|
||||
|
||||
.shutdown = automount_shutdown
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
BUS_UNIT_INTERFACE \
|
||||
BUS_AUTOMOUNT_INTERFACE \
|
||||
BUS_PROPERTIES_INTERFACE \
|
||||
BUS_PEER_INTERFACE \
|
||||
BUS_INTROSPECTABLE_INTERFACE \
|
||||
"</node>\n"
|
||||
|
||||
|
||||
@@ -33,11 +33,16 @@
|
||||
BUS_UNIT_INTERFACE \
|
||||
BUS_DEVICE_INTERFACE \
|
||||
BUS_PROPERTIES_INTERFACE \
|
||||
BUS_PEER_INTERFACE \
|
||||
BUS_INTROSPECTABLE_INTERFACE \
|
||||
"</node>\n"
|
||||
|
||||
const char bus_device_interface[] = BUS_DEVICE_INTERFACE;
|
||||
|
||||
const char bus_device_invalidating_properties[] =
|
||||
"SysFSPath\0"
|
||||
"\0";
|
||||
|
||||
DBusHandlerResult bus_device_message_handler(Unit *u, DBusConnection *c, DBusMessage *message) {
|
||||
const BusProperty properties[] = {
|
||||
BUS_UNIT_PROPERTIES,
|
||||
|
||||
@@ -29,5 +29,6 @@
|
||||
DBusHandlerResult bus_device_message_handler(Unit *u, DBusConnection *c, DBusMessage *message);
|
||||
|
||||
extern const char bus_device_interface[];
|
||||
extern const char bus_device_invalidating_properties[];
|
||||
|
||||
#endif
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
#define BUS_JOB_INTERFACE \
|
||||
" <interface name=\"org.freedesktop.systemd1.Job\">\n" \
|
||||
" <method name=\"Cancel\"/>\n" \
|
||||
" <signal name=\"Changed\"/>\n" \
|
||||
" <property name=\"Id\" type=\"u\" access=\"read\"/>\n" \
|
||||
" <property name=\"Unit\" type=\"(so)\" access=\"read\"/>\n" \
|
||||
" <property name=\"JobType\" type=\"s\" access=\"read\"/>\n" \
|
||||
@@ -40,11 +39,16 @@
|
||||
"<node>\n" \
|
||||
BUS_JOB_INTERFACE \
|
||||
BUS_PROPERTIES_INTERFACE \
|
||||
BUS_PEER_INTERFACE \
|
||||
BUS_INTROSPECTABLE_INTERFACE \
|
||||
"</node>\n"
|
||||
|
||||
const char bus_job_interface[] = BUS_JOB_INTERFACE;
|
||||
|
||||
#define INVALIDATING_PROPERTIES \
|
||||
"State\0" \
|
||||
"\0" \
|
||||
|
||||
static DEFINE_BUS_PROPERTY_APPEND_ENUM(bus_job_append_state, job_state, JobState);
|
||||
static DEFINE_BUS_PROPERTY_APPEND_ENUM(bus_job_append_type, job_type, JobType);
|
||||
|
||||
@@ -187,10 +191,11 @@ void bus_job_send_change_signal(Job *j) {
|
||||
goto oom;
|
||||
|
||||
if (j->sent_dbus_new_signal) {
|
||||
/* Send a change signal */
|
||||
/* Send a properties changed signal */
|
||||
|
||||
if (!(m = dbus_message_new_signal(p, "org.freedesktop.systemd1.Job", "Changed")))
|
||||
if (!(m = bus_properties_changed_new(p, "org.freedesktop.systemd1.Job", INVALIDATING_PROPERTIES)))
|
||||
goto oom;
|
||||
|
||||
} else {
|
||||
/* Send a new signal */
|
||||
|
||||
|
||||
@@ -148,6 +148,7 @@
|
||||
"<node>\n" \
|
||||
BUS_MANAGER_INTERFACE \
|
||||
BUS_PROPERTIES_INTERFACE \
|
||||
BUS_PEER_INTERFACE \
|
||||
BUS_INTROSPECTABLE_INTERFACE
|
||||
|
||||
#define INTROSPECTION_END \
|
||||
|
||||
@@ -46,11 +46,22 @@
|
||||
BUS_UNIT_INTERFACE \
|
||||
BUS_MOUNT_INTERFACE \
|
||||
BUS_PROPERTIES_INTERFACE \
|
||||
BUS_PEER_INTERFACE \
|
||||
BUS_INTROSPECTABLE_INTERFACE \
|
||||
"</node>\n"
|
||||
|
||||
const char bus_mount_interface[] = BUS_MOUNT_INTERFACE;
|
||||
|
||||
const char bus_mount_invalidating_properties[] =
|
||||
"What\0"
|
||||
"Options\0"
|
||||
"Type\0"
|
||||
"ExecMount\0"
|
||||
"ExecUnmount\0"
|
||||
"ExecRemount\0"
|
||||
"ControlPID\0"
|
||||
"\0";
|
||||
|
||||
static int bus_mount_append_what(Manager *n, DBusMessageIter *i, const char *property, void *data) {
|
||||
Mount *m = data;
|
||||
const char *d;
|
||||
|
||||
@@ -29,5 +29,6 @@
|
||||
DBusHandlerResult bus_mount_message_handler(Unit *u, DBusConnection *c, DBusMessage *message);
|
||||
|
||||
extern const char bus_mount_interface[];
|
||||
extern const char bus_mount_invalidating_properties[];
|
||||
|
||||
#endif
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
BUS_UNIT_INTERFACE \
|
||||
BUS_PATH_INTERFACE \
|
||||
BUS_PROPERTIES_INTERFACE \
|
||||
BUS_PEER_INTERFACE \
|
||||
BUS_INTROSPECTABLE_INTERFACE \
|
||||
"</node>\n"
|
||||
|
||||
|
||||
@@ -59,11 +59,25 @@
|
||||
BUS_UNIT_INTERFACE \
|
||||
BUS_SERVICE_INTERFACE \
|
||||
BUS_PROPERTIES_INTERFACE \
|
||||
BUS_PEER_INTERFACE \
|
||||
BUS_INTROSPECTABLE_INTERFACE \
|
||||
"</node>\n"
|
||||
|
||||
const char bus_service_interface[] = BUS_SERVICE_INTERFACE;
|
||||
|
||||
const char bus_service_invalidating_properties[] =
|
||||
"ExecStartPre\0"
|
||||
"ExecStart\0"
|
||||
"ExecStartPost\0"
|
||||
"ExecReload\0"
|
||||
"ExecStop\0"
|
||||
"ExecStopPost\0"
|
||||
"ExecMain\0"
|
||||
"MainPID\0"
|
||||
"ControlPID\0"
|
||||
"StatusText\0"
|
||||
"\0";
|
||||
|
||||
static DEFINE_BUS_PROPERTY_APPEND_ENUM(bus_service_append_type, service_type, ServiceType);
|
||||
static DEFINE_BUS_PROPERTY_APPEND_ENUM(bus_service_append_restart, service_restart, ServiceRestart);
|
||||
static DEFINE_BUS_PROPERTY_APPEND_ENUM(bus_service_append_notify_access, notify_access, NotifyAccess);
|
||||
|
||||
@@ -29,5 +29,6 @@
|
||||
DBusHandlerResult bus_service_message_handler(Unit *u, DBusConnection *c, DBusMessage *message);
|
||||
|
||||
extern const char bus_service_interface[];
|
||||
extern const char bus_service_invalidating_properties[];
|
||||
|
||||
#endif
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
BUS_UNIT_INTERFACE \
|
||||
BUS_SNAPSHOT_INTERFACE \
|
||||
BUS_PROPERTIES_INTERFACE \
|
||||
BUS_PEER_INTERFACE \
|
||||
BUS_INTROSPECTABLE_INTERFACE \
|
||||
"</node>\n"
|
||||
|
||||
|
||||
@@ -60,11 +60,22 @@
|
||||
BUS_UNIT_INTERFACE \
|
||||
BUS_SOCKET_INTERFACE \
|
||||
BUS_PROPERTIES_INTERFACE \
|
||||
BUS_PEER_INTERFACE \
|
||||
BUS_INTROSPECTABLE_INTERFACE \
|
||||
"</node>\n"
|
||||
|
||||
const char bus_socket_interface[] = BUS_SOCKET_INTERFACE;
|
||||
|
||||
const char bus_socket_invalidating_properties[] =
|
||||
"ExecStartPre\0"
|
||||
"ExecStartPost\0"
|
||||
"ExecStopPre\0"
|
||||
"ExecStopPost\0"
|
||||
"ControlPID\0"
|
||||
"NAccepted\0"
|
||||
"NConnections\0"
|
||||
"\0";
|
||||
|
||||
static DEFINE_BUS_PROPERTY_APPEND_ENUM(bus_socket_append_bind_ipv6_only, socket_address_bind_ipv6_only, SocketAddressBindIPv6Only);
|
||||
|
||||
DBusHandlerResult bus_socket_message_handler(Unit *u, DBusConnection *c, DBusMessage *message) {
|
||||
|
||||
@@ -29,5 +29,6 @@
|
||||
DBusHandlerResult bus_socket_message_handler(Unit *u, DBusConnection *c, DBusMessage *message);
|
||||
|
||||
extern const char bus_socket_interface[];
|
||||
extern const char bus_socket_invalidating_properties[];
|
||||
|
||||
#endif
|
||||
|
||||
@@ -37,11 +37,17 @@
|
||||
BUS_UNIT_INTERFACE \
|
||||
BUS_SWAP_INTERFACE \
|
||||
BUS_PROPERTIES_INTERFACE \
|
||||
BUS_PEER_INTERFACE \
|
||||
BUS_INTROSPECTABLE_INTERFACE \
|
||||
"</node>\n"
|
||||
|
||||
const char bus_swap_interface[] = BUS_SWAP_INTERFACE;
|
||||
|
||||
const char bus_swap_invalidating_properties[] =
|
||||
"What\0"
|
||||
"Priority\0"
|
||||
"\0";
|
||||
|
||||
static int bus_swap_append_priority(Manager *m, DBusMessageIter *i, const char *property, void *data) {
|
||||
Swap *s = data;
|
||||
dbus_int32_t j;
|
||||
|
||||
@@ -30,5 +30,6 @@
|
||||
DBusHandlerResult bus_swap_message_handler(Unit *u, DBusConnection *c, DBusMessage *message);
|
||||
|
||||
extern const char bus_swap_interface[];
|
||||
extern const char bus_swap_invalidating_properties[];
|
||||
|
||||
#endif
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
BUS_UNIT_INTERFACE \
|
||||
BUS_TARGET_INTERFACE \
|
||||
BUS_PROPERTIES_INTERFACE \
|
||||
BUS_PEER_INTERFACE \
|
||||
BUS_INTROSPECTABLE_INTERFACE \
|
||||
"</node>\n"
|
||||
|
||||
|
||||
@@ -38,11 +38,17 @@
|
||||
BUS_UNIT_INTERFACE \
|
||||
BUS_TIMER_INTERFACE \
|
||||
BUS_PROPERTIES_INTERFACE \
|
||||
BUS_PEER_INTERFACE \
|
||||
BUS_INTROSPECTABLE_INTERFACE \
|
||||
"</node>\n"
|
||||
|
||||
const char bus_timer_interface[] = BUS_TIMER_INTERFACE;
|
||||
|
||||
const char bus_timer_invalidating_properties[] =
|
||||
"Timers\0"
|
||||
"NextElapseUSec\0"
|
||||
"\0";
|
||||
|
||||
static int bus_timer_append_timers(Manager *m, DBusMessageIter *i, const char *property, void *data) {
|
||||
Timer *p = data;
|
||||
DBusMessageIter sub, sub2;
|
||||
|
||||
@@ -29,5 +29,6 @@
|
||||
DBusHandlerResult bus_timer_message_handler(Unit *u, DBusConnection *c, DBusMessage *message);
|
||||
|
||||
extern const char bus_timer_interface[];
|
||||
extern const char bus_timer_invalidating_properties[];
|
||||
|
||||
#endif
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user