Commit Graph

30 Commits

Author SHA1 Message Date
Lennart Poettering de33fc6257 sd-bus: rename sd_bus_open_system_container() to sd_bus_open_system_machine()
Pretty much everywhere else we use the generic term "machine" when
referring to containers in API, so let's do though in sd-bus too. In
particular, since the concept of a "container" exists in sd-bus too, but
as part of the marshalling system.
2014-12-24 16:53:04 +01:00
Lennart Poettering 3280236156 sd-bus: get rid of PID starttime concept
As kdbus no longer exports this, remove all traces from sd-bus too
2014-12-09 18:16:54 +01:00
Lennart Poettering 5c3026927d sd-bus: rename sd_bus_get_owner_id() → sd_bus_get_bus_id()
The ID returned really doesn't identify the owner, but the bus instance,
hence fix this misnaming.

Also, update "busctl status" to show the ID in its output.
2014-11-28 20:29:43 +01:00
Lennart Poettering 8022212b3b sd-bus: add sd_bus_message_is_empty() for checking whether a message carries any body 2014-11-14 13:18:51 +01:00
Lennart Poettering f7fce3454c sd-bus: rename sd_bus_get_server_id() to sd_bus_get_owner_id()
In kdbus a "server id" is mostly a misnomer, as there isn't any "server"
involved anymore. Let's rename this to "owner" id hence, since it is an
ID that is picked by the owner of a bus or direct connection. This
matches nicely the sd_bus_get_owner_creds() call we already have.
2014-11-04 18:09:19 +01:00
Lennart Poettering 9cbfc66c62 sd-bus: also allow setting descriptions on bus slots 2014-11-04 18:09:19 +01:00
Lennart Poettering 356779df90 sd-event: rename sd_event_source_set_name() to sd_event_source_get_name()
To mirror the recent name change of the concept for sd_bus objects,
follow the same logic for sd_event_source objects, too.
2014-11-04 18:09:19 +01:00
Lennart Poettering 455971c149 sd-bus: rename "connection name" to "description" for the sd-bus API too
kdbus recently renamed this concept, and so should we in what we expose
in userspace.
2014-11-04 16:13:49 +01:00
Daniel Mack 056f95d0a7 sd-bus: rename sd_bus_get_owner_uid(), sd_bus_get_owner_machine_id() and sd_bus_get_peer_creds()
Clean up the function namespace by renaming the following:

  sd_bus_get_owner_uid()        → sd_bus_get_name_creds_uid()
  sd_bus_get_owner_machine_id() → sd_bus_get_name_machine_id()
  sd_bus_get_peer_creds()       → sd_bus_get_owner_creds()
2014-10-22 19:45:07 +02:00
David Herrmann c72d5456e2 login: add public sd_session_get_desktop() API
The desktop brand is stored as DESKTOP variable for sessions. It can be
set arbitrarily by the session owner and identifies the desktop
environment that is running on that session.
2014-09-22 14:27:02 +02:00
Tom Gundersen f7f53e9e6e sd-event: allow naming event sources 2014-08-28 21:19:17 +02:00
Tom Gundersen 9b36454543 sd-event: add API to access epoll_fd
This is a prerequisite for integrating sd-event into an external
event loop.
2014-08-20 17:24:11 +02:00
Daniel Mack 43bde981cc memfd: move code from public library to src/shared
Don't expose generic kernel API via libsystemd, but keep the code internal
for our own usage.
2014-08-18 12:37:20 +02:00
Lennart Poettering 634af5665f sd-login: always use "indices" as plural of "index"
So far both "indexes" and "indices" was used. Let's clean this up, and
stick to indices, since it appears to be used more frequently.
2014-07-17 01:48:40 +02:00
Lennart Poettering cabb0bc6b1 nss-mymachines: add new NSS module for automatically resolving addresses of all local containers 2014-07-11 03:15:21 +02:00
Lennart Poettering 2de30868ed build-sys: export sd_path APIs 2014-07-11 03:13:24 +02:00
Lennart Poettering 42a04ee69c build-sys: update library versions 2014-06-11 15:30:28 +02:00
Lennart Poettering a077b666cb sd-login: add C API to query primary session of a user 2014-05-19 09:33:20 +09:00
Lennart Poettering 19befb2d5f sd-bus: introduce sd_bus_slot objects encapsulating callbacks or vtables attached to a bus connection
This makes callback behaviour more like sd-event or sd-resolve, and
creates proper object for unregistering callbacks.

Taking the refernce to the slot is optional. If not taken life time of
the slot will be bound to the underlying bus object (or in the case of
an async call until the reply has been recieved).
2014-05-15 01:15:30 +02:00
Lennart Poettering 04552566fa bus: add userdata API for bus name tracker objects 2014-05-14 22:58:43 +02:00
Lennart Poettering 93f1bcf400 sd-resolve: rework sd-resolve to be callback based, similar in style to sd-bus and sd-event 2014-04-29 15:45:16 +02:00
Lennart Poettering 6a0f1f6d5a sd-event: rework API to support CLOCK_REALTIME_ALARM and CLOCK_BOOTTIME_ALARM, too 2014-03-24 02:58:41 +01:00
Lennart Poettering 0936559234 sd-bus: add proper monitoring API 2014-03-19 04:17:00 +01:00
Lennart Poettering bf34ab149f sd-login: add calls that retrieve credentials of peers connected to AF_UNIX peers
This is supposed to be an extension of SO_PEERCRED and SO_PEERSEC,
except for cgroup information.
2014-03-17 18:15:57 +01:00
Lennart Poettering 0325941fff sd-login: add sd_machine_get_class() call 2014-03-12 20:54:29 +01:00
Lennart Poettering a6278b8830 bus: replace sd_bus_label_{escape,unescape}() by new sd_bus_path_{encode,decode}()
The new calls work similarly, but enforce a that a common, fixed bus
path prefix is used.

This follows discussions with Simon McVittie on IRC that it should be a
good idea to make sure that people don't use the escaping applied here
too wildly as anything other than the last label of a bus path.
2014-03-11 19:03:50 +01:00
Lennart Poettering 8f8f05a919 bus: add sd_bus_track object for tracking peers, and port core over to it
This is primarily useful for services that need to track clients which
reference certain objects they maintain, or which explicitly want to
subscribe to certain events. Something like this is done in a large
number of services, and not trivial to do. Hence, let's unify this at
one place.

This also ports over PID 1 to use this to ensure that subscriptions to
job and manager events are correctly tracked. As a side-effect this
makes sure we properly serialize and restore the track list across
daemon reexec/reload, which didn't work correctly before.

This also simplifies how we distribute messages to broadcast to the
direct busses: we only track subscriptions for the API bus and
implicitly assume that all direct busses are subscribed. This should be
a pretty OK simplification since clients connected via direct bus
connections are shortlived anyway.
2014-03-03 02:34:13 +01:00
David Herrmann d8148cc59d build-sys: remove libsystemd.sym duplicate
sd_memfd_new is available twice. Remove the second one.
2014-02-23 00:26:29 +01:00
Kay Sievers 2cfcd95a4a build-sys: fix libsystemd --enable-kdbus symbol export 2014-02-22 23:54:38 +01:00
Kay Sievers 2b0a23e864 build-sys: export experimental symbols only with --enable-kdbus 2014-02-19 20:53:18 +01:00
Renamed from src/libsystemd/libsystemd.sym (Browse further)