chiark / gitweb /
bus: add calls to query attached objects
authorLennart Poettering <lennart@poettering.net>
Fri, 22 Nov 2013 00:21:59 +0000 (01:21 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 22 Nov 2013 00:42:15 +0000 (01:42 +0100)
src/libsystemd-bus/bus-message.c
src/libsystemd-bus/libsystemd-bus.sym
src/libsystemd-bus/sd-bus.c
src/systemd/sd-bus.h

index a0e4e2c..538a28a 100644 (file)
@@ -4468,3 +4468,9 @@ _public_ int sd_bus_message_verify_type(sd_bus_message *m, char type, const char
 
         return 1;
 }
+
+_public_ sd_bus *sd_bus_message_get_bus(sd_bus_message *m) {
+        assert_return(m, NULL);
+
+        return m->bus;
+}
index a8df513..f8c60b4 100644 (file)
@@ -54,6 +54,7 @@ global:
         sd_bus_get_tid;
         sd_bus_attach_event;
         sd_bus_detach_event;
+        sd_bus_get_event;
         sd_bus_add_filter;
         sd_bus_remove_filter;
         sd_bus_add_match;
@@ -94,6 +95,7 @@ global:
         sd_bus_message_get_sender;
         sd_bus_message_get_error;
         sd_bus_message_get_errno;
+        sd_bus_message_get_bus;
         sd_bus_message_get_monotonic_timestamp;
         sd_bus_message_get_realtime_timestamp;
         sd_bus_message_get_uid;
index 4df649c..85d1154 100644 (file)
@@ -2658,6 +2658,12 @@ _public_ int sd_bus_detach_event(sd_bus *bus) {
         return 0;
 }
 
+_public_ sd_event* sd_bus_get_event(sd_bus *bus) {
+        assert_return(bus, NULL);
+
+        return bus->event;
+}
+
 _public_ sd_bus_message* sd_bus_get_current(sd_bus *bus) {
         assert_return(bus, NULL);
 
index 8954e38..9c001b1 100644 (file)
@@ -111,6 +111,7 @@ int sd_bus_get_tid(sd_bus *bus, pid_t *tid);
 
 int sd_bus_attach_event(sd_bus *bus, sd_event *e, int priority);
 int sd_bus_detach_event(sd_bus *bus);
+sd_event *sd_bus_get_event(sd_bus *bus);
 
 int sd_bus_add_filter(sd_bus *bus, sd_bus_message_handler_t callback, void *userdata);
 int sd_bus_remove_filter(sd_bus *bus, sd_bus_message_handler_t callback, void *userdata);
@@ -163,6 +164,8 @@ const char *sd_bus_message_get_sender(sd_bus_message *m);
 const sd_bus_error *sd_bus_message_get_error(sd_bus_message *m);
 int sd_bus_message_get_errno(sd_bus_message *m);
 
+sd_bus* sd_bus_message_get_bus(sd_bus_message *m);
+
 int sd_bus_message_get_monotonic_timestamp(sd_bus_message *m, uint64_t *usec);
 int sd_bus_message_get_realtime_timestamp(sd_bus_message *m, uint64_t *usec);
 int sd_bus_message_get_uid(sd_bus_message *m, uid_t *uid);