chiark / gitweb /
Prep 229.9: Make all supportable API functions visible.
authorSven Eden <yamakuzure@gmx.net>
Fri, 22 Sep 2017 07:04:02 +0000 (09:04 +0200)
committerSven Eden <yamakuzure@gmx.net>
Mon, 25 Sep 2017 10:58:39 +0000 (12:58 +0200)
The process of cleaning up elogind, meaning to mask all bits that are
unneeded by elogind, has been finished a while ago.

It is therefore time to re-enable all previously masked API functions
that elogind can support. This will make it easier for future
developers to integrate elogind into their software where they
already support systemd-login.

50 files changed:
Makefile-man.am
Makefile.am
man/glib-event-glue.c [new file with mode: 0644]
man/sd_booted.xml
man/sd_bus_creds_get_pid.xml
man/sd_bus_creds_new_from_pid.xml
man/sd_bus_default.xml
man/sd_bus_error_add_map.xml
man/sd_bus_message_append.xml
man/sd_bus_message_append_array.xml
man/sd_bus_message_append_basic.xml
man/sd_bus_message_append_string_memfd.xml [new file with mode: 0644]
man/sd_bus_message_append_strv.xml
man/sd_bus_message_get_cookie.xml [new file with mode: 0644]
man/sd_bus_message_get_monotonic_usec.xml [new file with mode: 0644]
man/sd_bus_negotiate_fds.xml
man/sd_bus_new.xml
man/sd_bus_path_encode.xml [new file with mode: 0644]
man/sd_bus_request_name.xml
man/sd_event_add_child.xml
man/sd_event_add_defer.xml
man/sd_event_add_signal.xml
man/sd_event_add_time.xml
man/sd_event_get_fd.xml [new file with mode: 0644]
man/sd_event_new.xml
man/sd_event_run.xml
man/sd_event_wait.xml
man/sd_is_fifo.xml
man/sd_login_monitor_new.xml
man/sd_pid_get_session.xml
man/sd_uid_get_state.xml
src/basic/memfd-util.c
src/basic/memfd-util.h
src/basic/siphash24.c
src/basic/socket-util.h
src/libelogind/libelogind.sym
src/libelogind/sd-bus/bus-control.c
src/libelogind/sd-bus/bus-convenience.c
src/libelogind/sd-bus/bus-creds.c
src/libelogind/sd-bus/bus-message.c
src/libelogind/sd-bus/bus-objects.c
src/libelogind/sd-bus/bus-slot.c
src/libelogind/sd-bus/bus-track.c
src/libelogind/sd-bus/sd-bus.c
src/libelogind/sd-daemon/sd-daemon.c
src/libelogind/sd-event/sd-event.c
src/login/.gitignore
src/systemd/sd-bus.h
src/systemd/sd-daemon.h
src/systemd/sd-event.h

index 2355ff8a6d0210458fcf4e267cd5c52f77f2cb7f..c4e00d7cb4c6b67c358c9f5d3826baa3e5469b2a 100644 (file)
@@ -24,10 +24,14 @@ MANPAGES += \
        man/sd_bus_message_append.3 \
        man/sd_bus_message_append_array.3 \
        man/sd_bus_message_append_basic.3 \
+       man/sd_bus_message_append_string_memfd.3 \
        man/sd_bus_message_append_strv.3 \
+       man/sd_bus_message_get_cookie.3 \
+       man/sd_bus_message_get_monotonic_usec.3 \
        man/sd_bus_message_read_basic.3 \
        man/sd_bus_negotiate_fds.3 \
        man/sd_bus_new.3 \
+       man/sd_bus_path_encode.3 \
        man/sd_bus_process.3 \
        man/sd_bus_request_name.3 \
        man/sd_bus_track_add_name.3 \
@@ -38,6 +42,7 @@ MANPAGES += \
        man/sd_event_add_signal.3 \
        man/sd_event_add_time.3 \
        man/sd_event_exit.3 \
+       man/sd_event_get_fd.3 \
        man/sd_event_new.3 \
        man/sd_event_now.3 \
        man/sd_event_run.3 \
@@ -97,7 +102,6 @@ MANPAGES_ALIAS += \
        man/sd_bus_creds_get_selinux_context.3 \
        man/sd_bus_creds_get_session.3 \
        man/sd_bus_creds_get_sgid.3 \
-       man/sd_bus_creds_get_slice.3 \
        man/sd_bus_creds_get_suid.3 \
        man/sd_bus_creds_get_supplementary_gids.3 \
        man/sd_bus_creds_get_tid.3 \
@@ -105,9 +109,6 @@ MANPAGES_ALIAS += \
        man/sd_bus_creds_get_tty.3 \
        man/sd_bus_creds_get_uid.3 \
        man/sd_bus_creds_get_unique_name.3 \
-       man/sd_bus_creds_get_unit.3 \
-       man/sd_bus_creds_get_user_slice.3 \
-       man/sd_bus_creds_get_user_unit.3 \
        man/sd_bus_creds_get_well_known_names.3 \
        man/sd_bus_creds_has_bounding_cap.3 \
        man/sd_bus_creds_has_effective_cap.3 \
@@ -133,7 +134,11 @@ MANPAGES_ALIAS += \
        man/sd_bus_message_append_array_iovec.3 \
        man/sd_bus_message_append_array_memfd.3 \
        man/sd_bus_message_append_array_space.3 \
-       man/sd_bus_message_appendv.3 \
+       man/sd_bus_message_append_string_iovec.3 \
+       man/sd_bus_message_append_string_space.3 \
+       man/sd_bus_message_get_realtime_usec.3 \
+       man/sd_bus_message_get_reply_cookie.3 \
+       man/sd_bus_message_get_seqnum.3 \
        man/sd_bus_negotiate_creds.3 \
        man/sd_bus_negotiate_timestamp.3 \
        man/sd_bus_open.3 \
@@ -141,6 +146,9 @@ MANPAGES_ALIAS += \
        man/sd_bus_open_system_machine.3 \
        man/sd_bus_open_system_remote.3 \
        man/sd_bus_open_user.3 \
+       man/sd_bus_path_decode.3 \
+       man/sd_bus_path_decode_many.3 \
+       man/sd_bus_path_encode_many.3 \
        man/sd_bus_ref.3 \
        man/sd_bus_release_name.3 \
        man/sd_bus_track_add_sender.3 \
@@ -169,7 +177,6 @@ MANPAGES_ALIAS += \
        man/sd_event_default.3 \
        man/sd_event_dispatch.3 \
        man/sd_event_get_exit_code.3 \
-       man/sd_event_get_iteration.3 \
        man/sd_event_get_state.3 \
        man/sd_event_get_tid.3 \
        man/sd_event_get_watchdog.3 \
@@ -205,10 +212,8 @@ MANPAGES_ALIAS += \
        man/sd_id128_get_boot.3 \
        man/sd_id128_get_invocation.3 \
        man/sd_id128_get_machine_app_specific.3 \
-       man/sd_is_mq.3 \
        man/sd_is_socket.3 \
        man/sd_is_socket_inet.3 \
-       man/sd_is_socket_sockaddr.3 \
        man/sd_is_socket_unix.3 \
        man/sd_is_special.3 \
        man/sd_listen_fds_with_names.3 \
@@ -254,7 +259,6 @@ man/sd_bus_creds_get_ppid.3: man/sd_bus_creds_get_pid.3
 man/sd_bus_creds_get_selinux_context.3: man/sd_bus_creds_get_pid.3
 man/sd_bus_creds_get_session.3: man/sd_bus_creds_get_pid.3
 man/sd_bus_creds_get_sgid.3: man/sd_bus_creds_get_pid.3
-man/sd_bus_creds_get_slice.3: man/sd_bus_creds_get_pid.3
 man/sd_bus_creds_get_suid.3: man/sd_bus_creds_get_pid.3
 man/sd_bus_creds_get_supplementary_gids.3: man/sd_bus_creds_get_pid.3
 man/sd_bus_creds_get_tid.3: man/sd_bus_creds_get_pid.3
@@ -262,9 +266,6 @@ man/sd_bus_creds_get_tid_comm.3: man/sd_bus_creds_get_pid.3
 man/sd_bus_creds_get_tty.3: man/sd_bus_creds_get_pid.3
 man/sd_bus_creds_get_uid.3: man/sd_bus_creds_get_pid.3
 man/sd_bus_creds_get_unique_name.3: man/sd_bus_creds_get_pid.3
-man/sd_bus_creds_get_unit.3: man/sd_bus_creds_get_pid.3
-man/sd_bus_creds_get_user_slice.3: man/sd_bus_creds_get_pid.3
-man/sd_bus_creds_get_user_unit.3: man/sd_bus_creds_get_pid.3
 man/sd_bus_creds_get_well_known_names.3: man/sd_bus_creds_get_pid.3
 man/sd_bus_creds_has_bounding_cap.3: man/sd_bus_creds_get_pid.3
 man/sd_bus_creds_has_effective_cap.3: man/sd_bus_creds_get_pid.3
@@ -290,7 +291,11 @@ man/sd_bus_error_setf.3: man/sd_bus_error.3
 man/sd_bus_message_append_array_iovec.3: man/sd_bus_message_append_array.3
 man/sd_bus_message_append_array_memfd.3: man/sd_bus_message_append_array.3
 man/sd_bus_message_append_array_space.3: man/sd_bus_message_append_array.3
-man/sd_bus_message_appendv.3: man/sd_bus_message_append.3
+man/sd_bus_message_append_string_iovec.3: man/sd_bus_message_append_string_memfd.3
+man/sd_bus_message_append_string_space.3: man/sd_bus_message_append_string_memfd.3
+man/sd_bus_message_get_realtime_usec.3: man/sd_bus_message_get_monotonic_usec.3
+man/sd_bus_message_get_reply_cookie.3: man/sd_bus_message_get_cookie.3
+man/sd_bus_message_get_seqnum.3: man/sd_bus_message_get_monotonic_usec.3
 man/sd_bus_negotiate_creds.3: man/sd_bus_negotiate_fds.3
 man/sd_bus_negotiate_timestamp.3: man/sd_bus_negotiate_fds.3
 man/sd_bus_open.3: man/sd_bus_default.3
@@ -298,6 +303,9 @@ man/sd_bus_open_system.3: man/sd_bus_default.3
 man/sd_bus_open_system_machine.3: man/sd_bus_default.3
 man/sd_bus_open_system_remote.3: man/sd_bus_default.3
 man/sd_bus_open_user.3: man/sd_bus_default.3
+man/sd_bus_path_decode.3: man/sd_bus_path_encode.3
+man/sd_bus_path_decode_many.3: man/sd_bus_path_encode.3
+man/sd_bus_path_encode_many.3: man/sd_bus_path_encode.3
 man/sd_bus_ref.3: man/sd_bus_new.3
 man/sd_bus_release_name.3: man/sd_bus_request_name.3
 man/sd_bus_track_add_sender.3: man/sd_bus_track_add_name.3
@@ -326,7 +334,6 @@ man/sd_event_child_handler_t.3: man/sd_event_add_child.3
 man/sd_event_default.3: man/sd_event_new.3
 man/sd_event_dispatch.3: man/sd_event_wait.3
 man/sd_event_get_exit_code.3: man/sd_event_exit.3
-man/sd_event_get_iteration.3: man/sd_event_wait.3
 man/sd_event_get_state.3: man/sd_event_wait.3
 man/sd_event_get_tid.3: man/sd_event_new.3
 man/sd_event_get_watchdog.3: man/sd_event_set_watchdog.3
@@ -362,10 +369,8 @@ man/sd_id128_from_string.3: man/sd_id128_to_string.3
 man/sd_id128_get_boot.3: man/sd_id128_get_machine.3
 man/sd_id128_get_invocation.3: man/sd_id128_get_machine.3
 man/sd_id128_get_machine_app_specific.3: man/sd_id128_get_machine.3
-man/sd_is_mq.3: man/sd_is_fifo.3
 man/sd_is_socket.3: man/sd_is_fifo.3
 man/sd_is_socket_inet.3: man/sd_is_fifo.3
-man/sd_is_socket_sockaddr.3: man/sd_is_fifo.3
 man/sd_is_socket_unix.3: man/sd_is_fifo.3
 man/sd_is_special.3: man/sd_is_fifo.3
 man/sd_listen_fds_with_names.3: man/sd_listen_fds.3
@@ -485,9 +490,6 @@ man/sd_bus_creds_get_session.html: man/sd_bus_creds_get_pid.html
 man/sd_bus_creds_get_sgid.html: man/sd_bus_creds_get_pid.html
        $(html-alias)
 
-man/sd_bus_creds_get_slice.html: man/sd_bus_creds_get_pid.html
-       $(html-alias)
-
 man/sd_bus_creds_get_suid.html: man/sd_bus_creds_get_pid.html
        $(html-alias)
 
@@ -509,15 +511,6 @@ man/sd_bus_creds_get_uid.html: man/sd_bus_creds_get_pid.html
 man/sd_bus_creds_get_unique_name.html: man/sd_bus_creds_get_pid.html
        $(html-alias)
 
-man/sd_bus_creds_get_unit.html: man/sd_bus_creds_get_pid.html
-       $(html-alias)
-
-man/sd_bus_creds_get_user_slice.html: man/sd_bus_creds_get_pid.html
-       $(html-alias)
-
-man/sd_bus_creds_get_user_unit.html: man/sd_bus_creds_get_pid.html
-       $(html-alias)
-
 man/sd_bus_creds_get_well_known_names.html: man/sd_bus_creds_get_pid.html
        $(html-alias)
 
@@ -593,7 +586,19 @@ man/sd_bus_message_append_array_memfd.html: man/sd_bus_message_append_array.html
 man/sd_bus_message_append_array_space.html: man/sd_bus_message_append_array.html
        $(html-alias)
 
-man/sd_bus_message_appendv.html: man/sd_bus_message_append.html
+man/sd_bus_message_append_string_iovec.html: man/sd_bus_message_append_string_memfd.html
+       $(html-alias)
+
+man/sd_bus_message_append_string_space.html: man/sd_bus_message_append_string_memfd.html
+       $(html-alias)
+
+man/sd_bus_message_get_realtime_usec.html: man/sd_bus_message_get_monotonic_usec.html
+       $(html-alias)
+
+man/sd_bus_message_get_reply_cookie.html: man/sd_bus_message_get_cookie.html
+       $(html-alias)
+
+man/sd_bus_message_get_seqnum.html: man/sd_bus_message_get_monotonic_usec.html
        $(html-alias)
 
 man/sd_bus_negotiate_creds.html: man/sd_bus_negotiate_fds.html
@@ -617,6 +622,15 @@ man/sd_bus_open_system_remote.html: man/sd_bus_default.html
 man/sd_bus_open_user.html: man/sd_bus_default.html
        $(html-alias)
 
+man/sd_bus_path_decode.html: man/sd_bus_path_encode.html
+       $(html-alias)
+
+man/sd_bus_path_decode_many.html: man/sd_bus_path_encode.html
+       $(html-alias)
+
+man/sd_bus_path_encode_many.html: man/sd_bus_path_encode.html
+       $(html-alias)
+
 man/sd_bus_ref.html: man/sd_bus_new.html
        $(html-alias)
 
@@ -701,9 +715,6 @@ man/sd_event_dispatch.html: man/sd_event_wait.html
 man/sd_event_get_exit_code.html: man/sd_event_exit.html
        $(html-alias)
 
-man/sd_event_get_iteration.html: man/sd_event_wait.html
-       $(html-alias)
-
 man/sd_event_get_state.html: man/sd_event_wait.html
        $(html-alias)
 
@@ -809,18 +820,12 @@ man/sd_id128_get_invocation.html: man/sd_id128_get_machine.html
 man/sd_id128_get_machine_app_specific.html: man/sd_id128_get_machine.html
        $(html-alias)
 
-man/sd_is_mq.html: man/sd_is_fifo.html
-       $(html-alias)
-
 man/sd_is_socket.html: man/sd_is_fifo.html
        $(html-alias)
 
 man/sd_is_socket_inet.html: man/sd_is_fifo.html
        $(html-alias)
 
-man/sd_is_socket_sockaddr.html: man/sd_is_fifo.html
-       $(html-alias)
-
 man/sd_is_socket_unix.html: man/sd_is_fifo.html
        $(html-alias)
 
@@ -870,17 +875,9 @@ MANPAGES_ALIAS += \
        man/sd_peer_get_machine_name.3 \
        man/sd_peer_get_owner_uid.3 \
        man/sd_peer_get_session.3 \
-       man/sd_peer_get_slice.3 \
-       man/sd_peer_get_unit.3 \
-       man/sd_peer_get_user_slice.3 \
-       man/sd_peer_get_user_unit.3 \
        man/sd_pid_get_cgroup.3 \
        man/sd_pid_get_machine_name.3 \
        man/sd_pid_get_owner_uid.3 \
-       man/sd_pid_get_slice.3 \
-       man/sd_pid_get_unit.3 \
-       man/sd_pid_get_user_slice.3 \
-       man/sd_pid_get_user_unit.3 \
        man/sd_seat_can_graphical.3 \
        man/sd_seat_can_multi_session.3 \
        man/sd_seat_can_tty.3 \
@@ -916,17 +913,9 @@ man/sd_peer_get_cgroup.3: man/sd_pid_get_session.3
 man/sd_peer_get_machine_name.3: man/sd_pid_get_session.3
 man/sd_peer_get_owner_uid.3: man/sd_pid_get_session.3
 man/sd_peer_get_session.3: man/sd_pid_get_session.3
-man/sd_peer_get_slice.3: man/sd_pid_get_session.3
-man/sd_peer_get_unit.3: man/sd_pid_get_session.3
-man/sd_peer_get_user_slice.3: man/sd_pid_get_session.3
-man/sd_peer_get_user_unit.3: man/sd_pid_get_session.3
 man/sd_pid_get_cgroup.3: man/sd_pid_get_session.3
 man/sd_pid_get_machine_name.3: man/sd_pid_get_session.3
 man/sd_pid_get_owner_uid.3: man/sd_pid_get_session.3
-man/sd_pid_get_slice.3: man/sd_pid_get_session.3
-man/sd_pid_get_unit.3: man/sd_pid_get_session.3
-man/sd_pid_get_user_slice.3: man/sd_pid_get_session.3
-man/sd_pid_get_user_unit.3: man/sd_pid_get_session.3
 man/sd_seat_can_graphical.3: man/sd_seat_get_active.3
 man/sd_seat_can_multi_session.3: man/sd_seat_get_active.3
 man/sd_seat_can_tty.3: man/sd_seat_get_active.3
@@ -990,18 +979,6 @@ man/sd_peer_get_owner_uid.html: man/sd_pid_get_session.html
 man/sd_peer_get_session.html: man/sd_pid_get_session.html
        $(html-alias)
 
-man/sd_peer_get_slice.html: man/sd_pid_get_session.html
-       $(html-alias)
-
-man/sd_peer_get_unit.html: man/sd_pid_get_session.html
-       $(html-alias)
-
-man/sd_peer_get_user_slice.html: man/sd_pid_get_session.html
-       $(html-alias)
-
-man/sd_peer_get_user_unit.html: man/sd_pid_get_session.html
-       $(html-alias)
-
 man/sd_pid_get_cgroup.html: man/sd_pid_get_session.html
        $(html-alias)
 
@@ -1011,18 +988,6 @@ man/sd_pid_get_machine_name.html: man/sd_pid_get_session.html
 man/sd_pid_get_owner_uid.html: man/sd_pid_get_session.html
        $(html-alias)
 
-man/sd_pid_get_slice.html: man/sd_pid_get_session.html
-       $(html-alias)
-
-man/sd_pid_get_unit.html: man/sd_pid_get_session.html
-       $(html-alias)
-
-man/sd_pid_get_user_slice.html: man/sd_pid_get_session.html
-       $(html-alias)
-
-man/sd_pid_get_user_unit.html: man/sd_pid_get_session.html
-       $(html-alias)
-
 man/sd_seat_can_graphical.html: man/sd_seat_get_active.html
        $(html-alias)
 
@@ -1120,10 +1085,14 @@ EXTRA_DIST += \
        man/sd_bus_message_append.xml \
        man/sd_bus_message_append_array.xml \
        man/sd_bus_message_append_basic.xml \
+       man/sd_bus_message_append_string_memfd.xml \
        man/sd_bus_message_append_strv.xml \
+       man/sd_bus_message_get_cookie.xml \
+       man/sd_bus_message_get_monotonic_usec.xml \
        man/sd_bus_message_read_basic.xml \
        man/sd_bus_negotiate_fds.xml \
        man/sd_bus_new.xml \
+       man/sd_bus_path_encode.xml \
        man/sd_bus_process.xml \
        man/sd_bus_request_name.xml \
        man/sd_bus_track_add_name.xml \
@@ -1134,6 +1103,7 @@ EXTRA_DIST += \
        man/sd_event_add_signal.xml \
        man/sd_event_add_time.xml \
        man/sd_event_exit.xml \
+       man/sd_event_get_fd.xml \
        man/sd_event_new.xml \
        man/sd_event_now.xml \
        man/sd_event_run.xml \
index 5e0fa684352a0f0da42713c96d887d8ee6555d53..c31bda5445b809dfa8ff521317c2a6161e8b4505 100644 (file)
@@ -991,10 +991,15 @@ pkgconfiglib_DATA += \
        src/libelogind/libelogind.pc
 
 pkginclude_HEADERS += \
-       src/systemd/sd-login.h \
-       src/systemd/sd-messages.h \
-       src/systemd/sd-id128.h \
-       src/systemd/_sd-common.h
+       src/systemd/sd-bus.h          \
+       src/systemd/sd-bus-protocol.h \
+       src/systemd/sd-bus-vtable.h   \
+       src/systemd/_sd-common.h      \
+       src/systemd/sd-daemon.h       \
+       src/systemd/sd-event.h        \
+       src/systemd/sd-id128.h        \
+       src/systemd/sd-login.h        \
+       src/systemd/sd-messages.h
 
 header-install-hook:
        $(MKDIR_P) $(DESTDIR)/$(pkgincludedir)
diff --git a/man/glib-event-glue.c b/man/glib-event-glue.c
new file mode 100644 (file)
index 0000000..8f3168d
--- /dev/null
@@ -0,0 +1,68 @@
+/***
+  Copyright 2014 Tom Gundersen
+
+  Permission is hereby granted, free of charge, to any person
+  obtaining a copy of this software and associated documentation files
+  (the "Software"), to deal in the Software without restriction,
+  including without limitation the rights to use, copy, modify, merge,
+  publish, distribute, sublicense, and/or sell copies of the Software,
+  and to permit persons to whom the Software is furnished to do so,
+  subject to the following conditions:
+
+  The above copyright notice and this permission notice shall be
+  included in all copies or substantial portions of the Software.
+
+  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  SOFTWARE.
+***/
+
+#include <stdlib.h>
+
+typedef struct SDEventSource {
+        GSource source;
+        GPollFD pollfd;
+        sd_event *event;
+} SDEventSource;
+
+static gboolean event_prepare(GSource *source, gint *timeout_) {
+        return sd_event_prepare(((SDEventSource *)source)->event) > 0;
+}
+
+static gboolean event_check(GSource *source) {
+        return sd_event_wait(((SDEventSource *)source)->event, 0) > 0;
+}
+
+static gboolean event_dispatch(GSource *source, GSourceFunc callback, gpointer user_data) {
+        return sd_event_dispatch(((SDEventSource *)source)->event) > 0;
+}
+
+static void event_finalize(GSource *source) {
+        sd_event_unref(((SDEventSource *)source)->event);
+}
+
+static GSourceFuncs event_funcs = {
+        .prepare = event_prepare,
+        .check = event_check,
+        .dispatch = event_dispatch,
+        .finalize = event_finalize,
+};
+
+GSource *g_sd_event_create_source(sd_event *event) {
+        SDEventSource *source;
+
+        source = (SDEventSource *)g_source_new(&event_funcs, sizeof(SDEventSource));
+
+        source->event = sd_event_ref(event);
+        source->pollfd.fd = sd_event_get_fd(event);
+        source->pollfd.events = G_IO_IN | G_IO_HUP | G_IO_ERR;
+
+        g_source_add_poll((GSource *)source, &source->pollfd);
+
+        return (GSource *)source;
+}
index d9c4013c04365a284103d7514b73c07427995a71..d6e9be16e096102b139fc16f47f00281950f9a8d 100644 (file)
@@ -3,22 +3,22 @@
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 
 <!--
-  This file is part of systemd.
+  This file is part of elogind.
 
-  Copyright 2010 Lennart Poettering
+  Copyright 2017 Sven Eden
 
-  systemd is free software; you can redistribute it and/or modify it
+  elogind is free software; you can redistribute it and/or modify it
   under the terms of the GNU Lesser General Public License as published by
   the Free Software Foundation; either version 2.1 of the License, or
   (at your option) any later version.
 
-  systemd is distributed in the hope that it will be useful, but
+  elogind is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   Lesser General Public License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+  along with elogind; If not, see <http://www.gnu.org/licenses/>.
 -->
 
 <refentry id="sd_booted"
 
   <refentryinfo>
     <title>sd_booted</title>
-    <productname>systemd</productname>
+    <productname>elogind</productname>
 
     <authorgroup>
       <author>
         <contrib>Developer</contrib>
-        <firstname>Lennart</firstname>
-        <surname>Poettering</surname>
-        <email>lennart@poettering.net</email>
+        <firstname>Sven</firstname>
+        <surname>Eden</surname>
+        <email>sven.eden@gmx.de.net</email>
       </author>
     </authorgroup>
   </refentryinfo>
@@ -50,7 +50,7 @@
 
   <refsynopsisdiv>
     <funcsynopsis>
-      <funcsynopsisinfo>#include &lt;systemd/sd-daemon.h&gt;</funcsynopsisinfo>
+      <funcsynopsisinfo>#include &lt;elogind/sd-daemon.h&gt;</funcsynopsisinfo>
 
       <funcprototype>
         <funcdef>int <function>sd_booted</function></funcdef>
 
   <refsect1>
     <title>Description</title>
-    <para><function>sd_booted()</function> checks whether the system
-    was booted up using the systemd init system.</para>
+    <para><function>sd_booted()</function> is a compatibility function
+    that will always return 0. elogind is not meant to be used on systems
+    that are booted with systemd. Use systemd-login on such systems.</para>
   </refsect1>
 
   <refsect1>
     <title>Return Value</title>
 
-    <para>On failure, this call returns a negative errno-style error
-    code. If the system was booted up with systemd as init system,
-    this call returns a positive return value, zero otherwise.</para>
-  </refsect1>
-
-  <refsect1>
-    <title>Notes</title>
-
-    <xi:include href="libelogind-pkgconfig.xml" xpointer="pkgconfig-text"/>
-
-    <para>Internally, this function checks whether the directory
-    <filename>/run/systemd/system/</filename> exists. A simple check
-    like this can also be implemented trivially in shell or any other
-    language.</para>
+    <para>This function always returns zero.</para>
   </refsect1>
 
   <refsect1>
     <title>See Also</title>
     <para>
-      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-      <citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+      <citerefentry><refentrytitle>elogind</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
     </para>
   </refsect1>
 
index 29cb9bd32fed76b7ecbae14c0c8b24b433572357..ffc526ea6effc12dfe37e93d45d4cf776ba7dde7 100644 (file)
@@ -3,29 +3,29 @@
 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 
 <!--
-  This file is part of systemd.
+  This file is part of elogind.
 
   Copyright 2014 Zbigniew JÄ™drzejewski-Szmek
 
-  systemd is free software; you can redistribute it and/or modify it
+  elogind is free software; you can redistribute it and/or modify it
   under the terms of the GNU Lesser General Public License as published by
   the Free Software Foundation; either version 2.1 of the License, or
   (at your option) any later version.
 
-  systemd is distributed in the hope that it will be useful, but
+  elogind is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   Lesser General Public License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+  along with elogind; If not, see <http://www.gnu.org/licenses/>.
 -->
 
 <refentry id="sd_bus_creds_get_pid">
 
   <refentryinfo>
     <title>sd_bus_creds_get_pid</title>
-    <productname>systemd</productname>
+    <productname>elogind</productname>
 
     <authorgroup>
       <author>
     <refname>sd_bus_creds_get_exe</refname>
     <refname>sd_bus_creds_get_cmdline</refname>
     <refname>sd_bus_creds_get_cgroup</refname>
-    <refname>sd_bus_creds_get_unit</refname>
-    <refname>sd_bus_creds_get_slice</refname>
-    <refname>sd_bus_creds_get_user_unit</refname>
-    <refname>sd_bus_creds_get_user_slice</refname>
     <refname>sd_bus_creds_get_session</refname>
     <refname>sd_bus_creds_get_owner_uid</refname>
     <refname>sd_bus_creds_has_effective_cap</refname>
@@ -83,7 +79,7 @@
 
   <refsynopsisdiv>
     <funcsynopsis>
-      <funcsynopsisinfo>#include &lt;systemd/sd-bus.h&gt;</funcsynopsisinfo>
+      <funcsynopsisinfo>#include &lt;elogind/sd-bus.h&gt;</funcsynopsisinfo>
 
       <funcprototype>
         <funcdef>int <function>sd_bus_creds_get_pid</function></funcdef>
         <paramdef>const char **<parameter>cgroup</parameter></paramdef>
       </funcprototype>
 
-      <funcprototype>
-        <funcdef>int <function>sd_bus_creds_get_unit</function></funcdef>
-        <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
-        <paramdef>const char **<parameter>unit</parameter></paramdef>
-      </funcprototype>
-
-      <funcprototype>
-        <funcdef>int <function>sd_bus_creds_get_slice</function></funcdef>
-        <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
-        <paramdef>const char **<parameter>slice</parameter></paramdef>
-      </funcprototype>
-
-      <funcprototype>
-        <funcdef>int <function>sd_bus_creds_get_user_unit</function></funcdef>
-        <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
-        <paramdef>const char **<parameter>unit</parameter></paramdef>
-      </funcprototype>
-
-      <funcprototype>
-        <funcdef>int <function>sd_bus_creds_get_user_slice</function></funcdef>
-        <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
-        <paramdef>const char **<parameter>slice</parameter></paramdef>
-      </funcprototype>
-
       <funcprototype>
         <funcdef>int <function>sd_bus_creds_get_session</function></funcdef>
         <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
     -ENXIO is returned.</para>
 
     <para><function>sd_bus_creds_get_cgroup()</function> will retrieve
-    the control group path. See <ulink
+    the cgroup path. See <ulink
     url="https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt">cgroups.txt</ulink>.
     </para>
 
-    <para><function>sd_bus_creds_get_unit()</function> will retrieve
-    the systemd unit name (in the system instance of systemd) that the
-    process is a part of. See
-    <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>. For
-    processes that are not part of a unit, returns -ENXIO.
-    </para>
-
-    <para><function>sd_bus_creds_get_user_unit()</function> will
-    retrieve the systemd unit name (in the user instance of systemd)
-    that the process is a part of. See
-    <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>. For
-    processes that are not part of a user unit, returns -ENXIO.
-    </para>
-
-    <para><function>sd_bus_creds_get_slice()</function> will retrieve
-    the systemd slice (a unit in the system instance of systemd) that
-    the process is a part of. See
-    <citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry>. Similarly,
-    <function>sd_bus_creds_get_user_slice()</function> retrieves the
-    systemd slice of the process, in the user instance of systemd.
-    </para>
-
     <para><function>sd_bus_creds_get_session()</function> will
     retrieve the identifier of the login session that the process is
     a part of. See
-    <citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. For
+    <citerefentry><refentrytitle>elogind-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. For
     processes that are not part of a session, returns -ENXIO.
     </para>
 
     <para><function>sd_bus_creds_get_owner_uid()</function> will
     retrieve the numeric UID (user identifier) of the user who owns
     the login session that the process is a part of. See
-    <citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
+    <citerefentry><refentrytitle>elogind-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
     For processes that are not part of a session, returns -ENXIO.
     </para>
 
-    <para><function>sd_bus_creds_has_effective_cap()</function> will check whether the capability specified by
-    <parameter>capability</parameter> was set in the effective capabilities mask. A positive return value means that it
-    was set, zero means that it was not set, and a negative return value indicates an error. See <citerefentry
-    project='man-pages'><refentrytitle>capabilities</refentrytitle><manvolnum>7</manvolnum></citerefentry> and the
-    <varname>AmbientCapabilities=</varname> and <varname>CapabilityBoundingSet=</varname> settings in
-    <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
+    <para><function>sd_bus_creds_has_effective_cap()</function> will
+    check whether the capability specified by
+    <parameter>capability</parameter> was set in the effective
+    capabilities mask. A positive return value means that is was
+    set, zero means that it was not set, and a negative return
+    value indicates an error. See
+    <citerefentry project='man-pages'><refentrytitle>capabilities</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+    and <varname>Capabilities=</varname> and
+    <varname>CapabilityBoundingSet=</varname> settings in
+    <citerefentry><refentrytitle>elogind.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
     </para>
 
     <para><function>sd_bus_creds_has_permitted_cap()</function> is
 
         <listitem><para>The given field is not specified for the described
         process or peer. This will be returned by
-        <function>sd_bus_get_unit()</function>,
-        <function>sd_bus_get_slice()</function>,
-        <function>sd_bus_get_user_unit()</function>,
-        <function>sd_bus_get_user_slice()</function>,
         <function>sd_bus_get_session()</function>, and
         <function>sd_bus_get_owner_uid()</function> if the process is
-        not part of a systemd system unit, systemd user unit, systemd
+        not part of a elogind system unit, systemd user unit, systemd
         slice, or logind session. It will also be returned by
         <function>sd_bus_creds_get_exe()</function> and
         <function>sd_bus_creds_get_cmdline()</function> for kernel
     <title>See Also</title>
 
     <para>
-      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>elogind</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_bus_creds_new_from_pid</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
       <citerefentry project='man-pages'><refentrytitle>fork</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
       <citerefentry project='man-pages'><refentrytitle>credentials</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
       <citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry project='man-pages'><refentrytitle>proc</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
-      <citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+      <citerefentry><refentrytitle>elogind.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>
     </para>
   </refsect1>
 
index fe4911c4af06e7366ddb5cb8be724e34a0efeec6..1a507cf91cf15123d0a7a67c18bdf1a88161e045 100644 (file)
@@ -3,29 +3,29 @@
 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 
 <!--
-  This file is part of systemd.
+  This file is part of elogind.
 
   Copyright 2014 Zbigniew JÄ™drzejewski-Szmek
 
-  systemd is free software; you can redistribute it and/or modify it
+  elogind is free software; you can redistribute it and/or modify it
   under the terms of the GNU Lesser General Public License as published by
   the Free Software Foundation; either version 2.1 of the License, or
   (at your option) any later version.
 
-  systemd is distributed in the hope that it will be useful, but
+  elogind is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   Lesser General Public License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+  along with elogind; If not, see <http://www.gnu.org/licenses/>.
 -->
 
 <refentry id="sd_bus_creds_new_from_pid">
 
   <refentryinfo>
     <title>sd_bus_creds_new_from_pid</title>
-    <productname>systemd</productname>
+    <productname>elogind</productname>
 
     <authorgroup>
       <author>
@@ -55,7 +55,7 @@
 
   <refsynopsisdiv>
     <funcsynopsis>
-      <funcsynopsisinfo>#include &lt;systemd/sd-bus.h&gt;</funcsynopsisinfo>
+      <funcsynopsisinfo>#include &lt;elogind/sd-bus.h&gt;</funcsynopsisinfo>
 
       <funcprototype>
         <funcdef>int <function>sd_bus_creds_new_from_pid</function></funcdef>
 
       <funcprototype>
         <funcdef>uint64_t <function>sd_bus_creds_get_mask</function></funcdef>
-        <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
+        <paramdef>const sd_bus_creds *<parameter>c</parameter></paramdef>
       </funcprototype>
 
       <funcprototype>
         <funcdef>uint64_t <function>sd_bus_creds_get_augmented_mask</function></funcdef>
-        <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
+        <paramdef>const sd_bus_creds *<parameter>c</parameter></paramdef>
       </funcprototype>
 
       <funcprototype>
       <constant>SD_BUS_CREDS_EXE</constant>,
       <constant>SD_BUS_CREDS_CMDLINE</constant>,
       <constant>SD_BUS_CREDS_CGROUP</constant>,
-      <constant>SD_BUS_CREDS_UNIT</constant>,
-      <constant>SD_BUS_CREDS_SLICE</constant>,
-      <constant>SD_BUS_CREDS_USER_UNIT</constant>,
-      <constant>SD_BUS_CREDS_USER_SLICE</constant>,
       <constant>SD_BUS_CREDS_SESSION</constant>,
       <constant>SD_BUS_CREDS_OWNER_UID</constant>,
       <constant>SD_BUS_CREDS_EFFECTIVE_CAPS</constant>,
     <constant>SD_BUS_CREDS_EXE</constant>,
     <constant>SD_BUS_CREDS_CMDLINE</constant>,
     <constant>SD_BUS_CREDS_CGROUP</constant>,
-    <constant>SD_BUS_CREDS_UNIT</constant>,
-    <constant>SD_BUS_CREDS_SLICE</constant>,
-    <constant>SD_BUS_CREDS_USER_UNIT</constant>,
-    <constant>SD_BUS_CREDS_USER_SLICE</constant>,
     <constant>SD_BUS_CREDS_SESSION</constant>,
     <constant>SD_BUS_CREDS_OWNER_UID</constant>,
     <constant>SD_BUS_CREDS_EFFECTIVE_CAPS</constant>,
     <title>See Also</title>
 
     <para>
-      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>elogind</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_bus_creds_get_pid</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_bus_get_name_creds</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
index 7e853d6fe662e610dfedfc7e753107909731b424..13033a52ee4f3e8288d7aee05e7391d62412cc2f 100644 (file)
@@ -3,29 +3,29 @@
 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 
 <!--
-  This file is part of systemd.
+  This file is part of elogind.
 
   Copyright 2014 Zbigniew JÄ™drzejewski-Szmek
 
-  systemd is free software; you can redistribute it and/or modify it
+  elogind is free software; you can redistribute it and/or modify it
   under the terms of the GNU Lesser General Public License as published by
   the Free Software Foundation; either version 2.1 of the License, or
   (at your option) any later version.
 
-  systemd is distributed in the hope that it will be useful, but
+  elogind is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   Lesser General Public License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+  along with elogind; If not, see <http://www.gnu.org/licenses/>.
 -->
 
 <refentry id="sd_bus_default">
 
   <refentryinfo>
     <title>sd_bus_default</title>
-    <productname>systemd</productname>
+    <productname>elogind</productname>
 
     <authorgroup>
       <author>
@@ -58,7 +58,7 @@
 
   <refsynopsisdiv>
     <funcsynopsis>
-      <funcsynopsisinfo>#include &lt;systemd/sd-bus.h&gt;</funcsynopsisinfo>
+      <funcsynopsisinfo>#include &lt;elogind/sd-bus.h&gt;</funcsynopsisinfo>
 
       <funcprototype>
         <funcdef>int <function>sd_bus_default</function></funcdef>
     <title>See Also</title>
 
     <para>
-      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>elogind</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_bus_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_bus_ref</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_bus_unref</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry project='die-net'><refentrytitle>ssh</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-      <citerefentry><refentrytitle>systemd-machined.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>elogind-machined.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>machinectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
     </para>
   </refsect1>
index f38fae7ebb2a55c15a14de7133cf9a7cf8af1d3f..93c8d7f4898e28fc827182273bb0af909c8bb5db 100644 (file)
@@ -3,29 +3,29 @@
 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 
 <!--
-  This file is part of systemd.
+  This file is part of elogind.
 
   Copyright 2015 Lennart Poettering
 
-  systemd is free software; you can redistribute it and/or modify it
+  elogind is free software; you can redistribute it and/or modify it
   under the terms of the GNU Lesser General Public License as published by
   the Free Software Foundation; either version 2.1 of the License, or
   (at your option) any later version.
 
-  systemd is distributed in the hope that it will be useful, but
+  elogind is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   Lesser General Public License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+  along with elogind; If not, see <http://www.gnu.org/licenses/>.
 -->
 
 <refentry id="sd_bus_error_add_map">
 
   <refentryinfo>
     <title>sd_bus_error_add_map</title>
-    <productname>systemd</productname>
+    <productname>elogind</productname>
 
     <authorgroup>
       <author>
 
   <refsynopsisdiv>
     <funcsynopsis>
-      <funcsynopsisinfo>#include &lt;systemd/sd-bus.h&gt;</funcsynopsisinfo>
+      <funcsynopsisinfo>#include &lt;elogind/sd-bus.h&gt;</funcsynopsisinfo>
 
       <funcsynopsisinfo>typedef struct {
         const char *name;
         int code;
-        â€¦
+        ...
 } sd_bus_error_map;</funcsynopsisinfo>
 
     </funcsynopsis>
     <title>See Also</title>
 
     <para>
-      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>elogind</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_bus_error</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd-bus-errors</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
index 26af67cd3890e17ef4513816fd56a309b8a42a11..ba86f7afb19cfd293e372fcefbf6ed4ccadc616e 100644 (file)
@@ -3,22 +3,22 @@
 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 
 <!--
-  This file is part of systemd.
+  This file is part of elogind.
 
   Copyright 2014 Zbigniew JÄ™drzejewski-Szmek
 
-  systemd is free software; you can redistribute it and/or modify it
+  elogind is free software; you can redistribute it and/or modify it
   under the terms of the GNU Lesser General Public License as published by
   the Free Software Foundation; either version 2.1 of the License, or
   (at your option) any later version.
 
-  systemd is distributed in the hope that it will be useful, but
+  elogind is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   Lesser General Public License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+  along with elogind; If not, see <http://www.gnu.org/licenses/>.
 -->
 
 <refentry id="sd_bus_message_append"
@@ -26,7 +26,7 @@
 
   <refentryinfo>
     <title>sd_bus_message_append</title>
-    <productname>systemd</productname>
+    <productname>elogind</productname>
 
     <authorgroup>
       <author>
@@ -45,7 +45,6 @@
 
   <refnamediv>
     <refname>sd_bus_message_append</refname>
-    <refname>sd_bus_message_appendv</refname>
 
     <refpurpose>Attach fields to a D-Bus message based on a type
     string</refpurpose>
 
   <refsynopsisdiv>
     <funcsynopsis>
-      <funcsynopsisinfo>#include &lt;systemd/sd-bus.h&gt;</funcsynopsisinfo>
+      <funcsynopsisinfo>#include &lt;elogind/sd-bus.h&gt;</funcsynopsisinfo>
 
       <funcprototype>
         <funcdef>int sd_bus_message_append</funcdef>
         <paramdef>sd_bus_message *<parameter>m</parameter></paramdef>
         <paramdef>const char *<parameter>types</parameter></paramdef>
-        <paramdef>…</paramdef>
+        <paramdef>...</paramdef>
       </funcprototype>
-
-      <funcprototype>
-          <funcdef>int sd_bus_message_appendv</funcdef>
-          <paramdef>sd_bus_message *<parameter>m</parameter></paramdef>
-          <paramdef>const char *<parameter>types</parameter></paramdef>
-          <paramdef>va_list <parameter>ap</parameter></paramdef>
-      </funcprototype>
-
     </funcsynopsis>
   </refsynopsisdiv>
 
     values for each entry matching the element type of
     the dictionary entries.</para>
 
-    <para>The <function>sd_bus_message_appendv()</function> is equivalent to
-    the function <function>sd_bus_message_append()</function>,
-    except that it is called with a <literal>va_list</literal> instead of
-    a variable number of arguments. This function does not call the
-    <function>va_end()</function> macro. Because it invokes the
-    <function>va_arg()</function> macro, the value of ap
-    is undefined after the call.</para>
-
     <para>For further details on the D-Bus type system, please consult
     the <ulink
     url="http://dbus.freedesktop.org/doc/dbus-specification.html#type-system">D-Bus
       </tgroup>
     </table>
 
-    <para>For types "s" and "g" (unicode string or signature), the pointer may be
-    <constant>NULL</constant>, which is equivalent to an empty string. See
-    <citerefentry><refentrytitle>sd_bus_message_append_basic</refentrytitle><manvolnum>3</manvolnum></citerefentry>
-    for the precise interpretation of those and other types.</para>
-
   </refsect1>
 
   <refsect1>
@@ -215,7 +193,7 @@ dictionary ::= "a" "{" basic_type complete_type "}"
     </para>
 
     <programlisting>sd_bus_message *m;
-…
+...
 sd_bus_message_append(m, "s", "a string");</programlisting>
 
     <para>Append all types of integers:</para>
@@ -255,8 +233,8 @@ sd_bus_message_append(m, "ynqiuxtd", y, n, q, i, u, x, t, d);</programlisting>
   <refsect1>
     <title>Return Value</title>
 
-    <para>On success, these functions return 0 or a positive
-    integer. On failure, these functions return a negative
+    <para>On success, this call returns 0 or a positive
+    integer. On failure, this call returns a negative
     errno-style error code.</para>
   </refsect1>
 
@@ -276,7 +254,7 @@ sd_bus_message_append(m, "ynqiuxtd", y, n, q, i, u, x, t, d);</programlisting>
     <title>See Also</title>
 
     <para>
-      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>elogind</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_bus_message_append_basic</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_bus_message_append_array</refentrytitle><manvolnum>3</manvolnum></citerefentry>
index 70f1f78896d445ded977622c06723a2243713254..9a893035e72ee6434a42ab1f4eb6445adc25de2f 100644 (file)
@@ -3,22 +3,22 @@
 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 
 <!--
-  This file is part of systemd.
+  This file is part of elogind.
 
   Copyright 2014 Zbigniew JÄ™drzejewski-Szmek
 
-  systemd is free software; you can redistribute it and/or modify it
+  elogind is free software; you can redistribute it and/or modify it
   under the terms of the GNU Lesser General Public License as published by
   the Free Software Foundation; either version 2.1 of the License, or
   (at your option) any later version.
 
-  systemd is distributed in the hope that it will be useful, but
+  elogind is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   Lesser General Public License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+  along with elogind; If not, see <http://www.gnu.org/licenses/>.
 -->
 
 <refentry id="sd_bus_message_append_array"
@@ -26,7 +26,7 @@
 
   <refentryinfo>
     <title>sd_bus_message_append_array</title>
-    <productname>systemd</productname>
+    <productname>elogind</productname>
 
     <authorgroup>
       <author>
@@ -55,7 +55,7 @@
 
   <refsynopsisdiv>
     <funcsynopsis>
-      <funcsynopsisinfo>#include &lt;systemd/sd-bus.h&gt;</funcsynopsisinfo>
+      <funcsynopsisinfo>#include &lt;elogind/sd-bus.h&gt;</funcsynopsisinfo>
 
       <funcprototype>
         <funcdef>int sd_bus_message_append_array</funcdef>
     <title>See Also</title>
 
     <para>
-      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>elogind</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_bus_message_append</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_bus_message_append_basic</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
index 90abca8092f463d7e96f4ff534385cf1767de3e0..a49a18bba08fb3612e5ff10b46dbf3e0bcd1d5e3 100644 (file)
@@ -3,29 +3,29 @@
 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 
 <!--
-  This file is part of systemd.
+  This file is part of elogind.
 
   Copyright 2014 Zbigniew JÄ™drzejewski-Szmek
 
-  systemd is free software; you can redistribute it and/or modify it
+  elogind is free software; you can redistribute it and/or modify it
   under the terms of the GNU Lesser General Public License as published by
   the Free Software Foundation; either version 2.1 of the License, or
   (at your option) any later version.
 
-  systemd is distributed in the hope that it will be useful, but
+  elogind is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   Lesser General Public License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+  along with elogind; If not, see <http://www.gnu.org/licenses/>.
 -->
 
 <refentry id="sd_bus_message_append_basic">
 
   <refentryinfo>
     <title>sd_bus_message_append_basic</title>
-    <productname>systemd</productname>
+    <productname>elogind</productname>
 
     <authorgroup>
       <author>
@@ -50,7 +50,7 @@
 
   <refsynopsisdiv>
     <funcsynopsis>
-      <funcsynopsisinfo>#include &lt;systemd/sd-bus.h&gt;</funcsynopsisinfo>
+      <funcsynopsisinfo>#include &lt;elogind/sd-bus.h&gt;</funcsynopsisinfo>
 
       <funcprototype>
         <funcdef>int sd_bus_message_append_basic</funcdef>
     <title>See Also</title>
 
     <para>
-      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>elogind</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_bus_message_append</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <ulink url="http://dbus.freedesktop.org/doc/dbus-specification.html">The D-Bus specification</ulink>
diff --git a/man/sd_bus_message_append_string_memfd.xml b/man/sd_bus_message_append_string_memfd.xml
new file mode 100644 (file)
index 0000000..08f1fd0
--- /dev/null
@@ -0,0 +1,153 @@
+<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+
+<!--
+  This file is part of elogind.
+
+  Copyright 2014 Zbigniew JÄ™drzejewski-Szmek
+
+  elogind is free software; you can redistribute it and/or modify it
+  under the terms of the GNU Lesser General Public License as published by
+  the Free Software Foundation; either version 2.1 of the License, or
+  (at your option) any later version.
+
+  elogind is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with elogind; If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<refentry id="sd_bus_message_append_string_memfd"
+          xmlns:xi="http://www.w3.org/2001/XInclude">
+
+  <refentryinfo>
+    <title>sd_bus_message_append_string_memfd</title>
+    <productname>elogind</productname>
+
+    <authorgroup>
+      <author>
+        <contrib>A monkey with a typewriter</contrib>
+        <firstname>Zbigniew</firstname>
+        <surname>JÄ™drzejewski-Szmek</surname>
+        <email>zbyszek@in.waw.pl</email>
+      </author>
+    </authorgroup>
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>sd_bus_message_append_string_memfd</refentrytitle>
+    <manvolnum>3</manvolnum>
+  </refmeta>
+
+  <refnamediv>
+    <refname>sd_bus_message_append_string_memfd</refname>
+    <refname>sd_bus_message_append_string_iovec</refname>
+    <refname>sd_bus_message_append_string_space</refname>
+
+    <refpurpose>Attach a string to a message</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <funcsynopsis>
+      <funcsynopsisinfo>#include &lt;elogind/sd-bus.h&gt;</funcsynopsisinfo>
+
+      <funcprototype>
+        <funcdef>int sd_bus_message_append_string_memfd</funcdef>
+        <paramdef>sd_bus_message *<parameter>m</parameter></paramdef>
+        <paramdef>int <parameter>memfd</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>int sd_bus_message_append_string_iovec</funcdef>
+        <paramdef>sd_bus_message *<parameter>m</parameter></paramdef>
+        <paramdef>const struct iovec *<parameter>iov</parameter></paramdef>
+        <paramdef>unsigned <parameter>n</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>int sd_bus_message_append_string_space</funcdef>
+        <paramdef>sd_bus_message *<parameter>m</parameter></paramdef>
+        <paramdef>size_t <parameter>size</parameter></paramdef>
+        <paramdef>char **<parameter>s</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
+  </refsynopsisdiv>
+
+  <refsect1>
+    <title>Description</title>
+
+    <para>The functions
+    <function>sd_bus_message_append_string_memfd</function> and
+    <function>sd_bus_message_append_string_iovec</function> can be
+    used to append a single string (item of type <literal>s</literal>)
+    to message <parameter>m</parameter>.</para>
+
+    <para>In case of
+    <function>sd_bus_message_append_string_memfd</function>, the
+    contents of <parameter>memfd</parameter> are the string. They must
+    satisfy the same constraints as described for the
+    <literal>s</literal> type in
+    <citerefentry><refentrytitle>sd_bus_message_append_basic</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
+
+    <para>In case of
+    <function>sd_bus_message_append_string_iovec</function>, the
+    payload of <parameter>iov</parameter> is the string. It must
+    satisfy the same constraints as described for the
+    <literal>s</literal> type in
+    <citerefentry><refentrytitle>sd_bus_message_append_basic</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
+
+    <para>The <parameter>iov</parameter> argument must point to
+    <parameter>n</parameter> <structname>struct iovec</structname>
+    structures. Each structure may have the
+    <structname>iov_base</structname> field set, in which case the
+    memory pointed to will be copied into the message, or unset, in
+    which case a block of spaces (ASCII 32) of length
+    <structname>iov_len</structname> will be inserted. The
+    memory pointed at by <parameter>iov</parameter> may be changed
+    after this call.</para>
+
+    <para>The
+    <function>sd_bus_message_append_string_space</function> function appends
+    space for a string to message <parameter>m</parameter>. It behaves
+    similar to <function>sd_bus_message_append_basic</function> with
+    type <literal>s</literal>, but instead of copying a string into
+    the message, it returns a pointer to the destination area to
+    the caller in pointer <parameter>p</parameter>. Space for the string
+    of length <parameter>size</parameter> plus the terminating
+    <constant>NUL</constant> is allocated.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>Return Value</title>
+
+    <para>On success, those calls return 0 or a positive integer. On
+    failure, they returns a negative errno-style error code.</para>
+  </refsect1>
+
+  <xi:include href="sd_bus_message_append_basic.xml" xpointer="errors" />
+
+  <refsect1>
+    <title>Notes</title>
+
+    <para>The functions described here are available as a shared library,
+    which can be compiled and linked to with the
+    <constant>libelogind</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+    file.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>See Also</title>
+
+    <para>
+      <citerefentry><refentrytitle>elogind</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_bus_message_append_basic</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <ulink url="http://dbus.freedesktop.org/doc/dbus-specification.html">The D-Bus specification</ulink>
+    </para>
+  </refsect1>
+
+</refentry>
index 8b71786377784d6e71a76e82022cf940cce9feea..458e21dcb989df1aa6a68984ecb0bd9255d41607 100644 (file)
@@ -3,22 +3,22 @@
 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 
 <!--
-  This file is part of systemd.
+  This file is part of elogind.
 
   Copyright 2014 Zbigniew JÄ™drzejewski-Szmek
 
-  systemd is free software; you can redistribute it and/or modify it
+  elogind is free software; you can redistribute it and/or modify it
   under the terms of the GNU Lesser General Public License as published by
   the Free Software Foundation; either version 2.1 of the License, or
   (at your option) any later version.
 
-  systemd is distributed in the hope that it will be useful, but
+  elogind is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   Lesser General Public License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+  along with elogind; If not, see <http://www.gnu.org/licenses/>.
 -->
 
 <refentry id="sd_bus_message_append_strv"
@@ -26,7 +26,7 @@
 
   <refentryinfo>
     <title>sd_bus_message_append_strv</title>
-    <productname>systemd</productname>
+    <productname>elogind</productname>
 
     <authorgroup>
       <author>
@@ -51,7 +51,7 @@
 
   <refsynopsisdiv>
     <funcsynopsis>
-      <funcsynopsisinfo>#include &lt;systemd/sd-bus.h&gt;</funcsynopsisinfo>
+      <funcsynopsisinfo>#include &lt;elogind/sd-bus.h&gt;</funcsynopsisinfo>
 
       <funcprototype>
         <funcdef>int sd_bus_message_append_strv</funcdef>
     <title>See Also</title>
 
     <para>
-      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>elogind</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_bus_message_append</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_bus_message_append_array</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
diff --git a/man/sd_bus_message_get_cookie.xml b/man/sd_bus_message_get_cookie.xml
new file mode 100644 (file)
index 0000000..7994d72
--- /dev/null
@@ -0,0 +1,146 @@
+<?xml version='1.0'?> <!--*-nxml-*-->
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+
+<!--
+  This file is part of elogind.
+
+  Copyright 2013 Lennart Poettering
+
+  elogind is free software; you can redistribute it and/or modify it
+  under the terms of the GNU Lesser General Public License as published by
+  the Free Software Foundation; either version 2.1 of the License, or
+  (at your option) any later version.
+
+  elogind is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with elogind; If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<refentry id="sd_bus_message_get_cookie">
+
+  <refentryinfo>
+    <title>sd_bus_message_get_cookie</title>
+    <productname>elogind</productname>
+
+    <authorgroup>
+      <author>
+        <contrib>Developer</contrib>
+        <firstname>Lennart</firstname>
+        <surname>Poettering</surname>
+        <email>lennart@poettering.net</email>
+      </author>
+    </authorgroup>
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>sd_bus_message_get_cookie</refentrytitle>
+    <manvolnum>3</manvolnum>
+  </refmeta>
+
+  <refnamediv>
+    <refname>sd_bus_message_get_cookie</refname>
+    <refname>sd_bus_message_get_reply_cookie</refname>
+    <refpurpose>Returns the transaction cookie of a message</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <funcsynopsis>
+      <funcsynopsisinfo>#include &lt;elogind/sd-bus.h&gt;</funcsynopsisinfo>
+
+      <funcprototype>
+        <funcdef>int <function>sd_bus_message_get_cookie</function></funcdef>
+        <paramdef>sd_bus_message *<parameter>message</parameter></paramdef>
+        <paramdef>uint64_t *<parameter>cookie</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>int <function>sd_bus_message_get_reply_cookie</function></funcdef>
+        <paramdef>sd_bus_message *<parameter>message</parameter></paramdef>
+        <paramdef>uint64_t *<parameter>cookie</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
+  </refsynopsisdiv>
+
+  <refsect1>
+    <title>Description</title>
+
+    <para><function>sd_bus_message_get_cookie()</function> returns the
+    transaction cookie of a message. The cookie uniquely identifies a
+    message within each bus peer, but is not globally unique. It is
+    assigned when a message is sent.</para>
+
+    <para><function>sd_bus_message_get_reply_cookie()</function>
+    returns the transaction cookie of the message the specified
+    message is a response to. When a reply message is generated for a
+    method call message, its cookie is copied over into this field.
+    Note that while every message that is transferred is identified by
+    a cookie, only response messages carry a reply cookie
+    field.</para>
+
+    <para>Both functions take a message object as first parameter and
+    a place to store the 64-bit cookie in.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>Return Value</title>
+
+    <para>On success, these calls return 0 or a positive integer. On
+    failure, these calls return a negative errno-style error
+    code.</para>
+
+    <para>On success, the cookie/reply cookie is returned in the
+    specified 64-bit unsigned integer variable.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>Errors</title>
+
+    <para>Returned errors may indicate the following problems:</para>
+
+    <variablelist>
+      <varlistentry>
+        <term><constant>-EINVAL</constant></term>
+
+        <listitem><para>A specified parameter
+        is invalid.</para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><constant>-ENODATA</constant></term>
+
+        <listitem><para>No cookie has been assigned to this message.
+        This either indicates that the message has not been sent yet
+        and hence has no cookie assigned, or that the message is not a
+        method response message and hence carries a reply cookie
+        field.</para></listitem>
+      </varlistentry>
+    </variablelist>
+  </refsect1>
+
+  <refsect1>
+    <title>Notes</title>
+
+    <para>The <function>sd_bus_message_get_cookie()</function> and
+    <function>sd_bus_message_get_reply_cookie()</function> interfaces
+    are available as a shared library, which can be compiled and
+    linked to with the
+    <constant>libelogind</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+    file.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>See Also</title>
+
+    <para>
+      <citerefentry><refentrytitle>elogind</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_bus_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+    </para>
+  </refsect1>
+
+</refentry>
diff --git a/man/sd_bus_message_get_monotonic_usec.xml b/man/sd_bus_message_get_monotonic_usec.xml
new file mode 100644 (file)
index 0000000..4fb5025
--- /dev/null
@@ -0,0 +1,181 @@
+<?xml version='1.0'?> <!--*-nxml-*-->
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+
+<!--
+  This file is part of elogind.
+
+  Copyright 2013 Lennart Poettering
+
+  elogind is free software; you can redistribute it and/or modify it
+  under the terms of the GNU Lesser General Public License as published by
+  the Free Software Foundation; either version 2.1 of the License, or
+  (at your option) any later version.
+
+  elogind is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with elogind; If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<refentry id="sd_bus_message_get_monotonic_usec">
+
+  <refentryinfo>
+    <title>sd_bus_message_get_monotonic_usec</title>
+    <productname>elogind</productname>
+
+    <authorgroup>
+      <author>
+        <contrib>Developer</contrib>
+        <firstname>Lennart</firstname>
+        <surname>Poettering</surname>
+        <email>lennart@poettering.net</email>
+      </author>
+    </authorgroup>
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>sd_bus_message_get_monotonic_usec</refentrytitle>
+    <manvolnum>3</manvolnum>
+  </refmeta>
+
+  <refnamediv>
+    <refname>sd_bus_message_get_monotonic_usec</refname>
+    <refname>sd_bus_message_get_realtime_usec</refname>
+    <refname>sd_bus_message_get_seqnum</refname>
+    <refpurpose>Retrieve the sender timestamps and sequence number of a message</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <funcsynopsis>
+      <funcsynopsisinfo>#include &lt;elogind/sd-bus.h&gt;</funcsynopsisinfo>
+
+      <funcprototype>
+        <funcdef>int <function>sd_bus_message_get_monotonic_usec</function></funcdef>
+        <paramdef>sd_bus_message *<parameter>message</parameter></paramdef>
+        <paramdef>uint64_t *<parameter>usec</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>int <function>sd_bus_message_get_realtime_usec</function></funcdef>
+        <paramdef>sd_bus_message *<parameter>message</parameter></paramdef>
+        <paramdef>uint64_t *<parameter>usec</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>int <function>sd_bus_message_get_seqnum</function></funcdef>
+        <paramdef>sd_bus_message *<parameter>message</parameter></paramdef>
+        <paramdef>uint64_t *<parameter>seqnum</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
+  </refsynopsisdiv>
+
+  <refsect1>
+    <title>Description</title>
+
+    <para><function>sd_bus_message_get_monotonic_usec()</function>
+    returns the monotonic timestamp of the time the message was sent.
+    This value is in microseconds since the
+    <constant>CLOCK_MONOTONIC</constant> epoch, see
+    <citerefentry><refentrytitle>clock_gettime</refentrytitle><manvolnum>2</manvolnum></citerefentry>
+    for details.</para>
+
+    <para>Similarly,
+    <function>sd_bus_message_get_realtime_usec()</function> returns
+    the realtime (wallclock) timestamp of the time the message was
+    sent. This value is in microseconds since Jan 1st, 1970, i.e. in
+    the <constant>CLOCK_REALTIME</constant> clock.</para>
+
+    <para><function>sd_bus_message_get_seqnum()</function> returns the
+    kernel-assigned sequence number of the message. The kernel assigns
+    a global, monotonically increasing sequence number to all messages
+    transmitted on the local system, at the time the message was sent.
+    This sequence number is useful for determining message send order,
+    even across different buses of the local system. The sequence
+    number combined with the boot ID of the system (as returned by
+    <citerefentry><refentrytitle>sd_id128_get_boot</refentrytitle><manvolnum>3</manvolnum></citerefentry>)
+    is a suitable globally unique identifier for bus messages.</para>
+
+    <para>Note that the sending order and receiving order of messages
+    might differ, in particular for broadcast messages. This means
+    that the sequence number and the timestamps of messages a client
+    reads are not necessarily monotonically increasing.</para>
+
+    <para>These timestamps and the sequence number are attached to
+    each message by the kernel and cannot be manipulated by the
+    sender.</para>
+
+    <para>Note that these timestamps are only available on some bus
+    transports, and only after support for them has been negotiated
+    with the
+    <citerefentry><refentrytitle>sd_bus_negotiate_timestamp</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+    call.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>Return Value</title>
+
+    <para>On success, these calls return 0 or a positive integer. On
+    failure, these calls return a negative errno-style error
+    code.</para>
+
+    <para>On success, the timestamp or sequence number is returned in
+    the specified 64-bit unsigned integer variable.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>Errors</title>
+
+    <para>Returned errors may indicate the following problems:</para>
+
+    <variablelist>
+      <varlistentry>
+        <term><constant>-EINVAL</constant></term>
+
+        <listitem><para>A specified parameter is
+        invalid.</para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><constant>-ENODATA</constant></term>
+
+        <listitem><para>No timestamp or sequence number information is
+        attached to the passed message. This error is returned if the
+        underlying transport does not support timestamping or
+        assigning of sequence numbers, or if this feature has not been
+        negotiated with
+        <citerefentry><refentrytitle>sd_bus_negotiate_timestamp</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para></listitem>
+      </varlistentry>
+    </variablelist>
+  </refsect1>
+
+  <refsect1>
+    <title>Notes</title>
+
+    <para>The
+    <function>sd_bus_message_get_monotonic_usec()</function>,
+    <function>sd_bus_message_get_realtime_usec()</function>, and
+    <function>sd_bus_message_get_seqnum()</function> interfaces are
+    available as a shared library, which can be compiled and linked to
+    with the
+    <constant>libelogind</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+    file.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>See Also</title>
+
+    <para>
+      <citerefentry><refentrytitle>elogind</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_bus_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_bus_negotiate_timestamp</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>clock_gettime</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_id128_get_boot</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+    </para>
+  </refsect1>
+
+</refentry>
index 61c972008bebaa872790cab9bf1707e34c47e079..90404d2f21190c7cfbd67f2fb852adaaa2ebd64c 100644 (file)
@@ -3,29 +3,29 @@
 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 
 <!--
-  This file is part of systemd.
+  This file is part of elogind.
 
   Copyright 2014 Lennart Poettering
 
-  systemd is free software; you can redistribute it and/or modify it
+  elogind is free software; you can redistribute it and/or modify it
   under the terms of the GNU Lesser General Public License as published by
   the Free Software Foundation; either version 2.1 of the License, or
   (at your option) any later version.
 
-  systemd is distributed in the hope that it will be useful, but
+  elogind is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   Lesser General Public License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+  along with elogind; If not, see <http://www.gnu.org/licenses/>.
 -->
 
 <refentry id="sd_bus_negotiate_fds">
 
   <refentryinfo>
     <title>sd_bus_negotiate_fds</title>
-    <productname>systemd</productname>
+    <productname>elogind</productname>
 
     <authorgroup>
       <author>
@@ -52,7 +52,7 @@
 
   <refsynopsisdiv>
     <funcsynopsis>
-      <funcsynopsisinfo>#include &lt;systemd/sd-bus.h&gt;</funcsynopsisinfo>
+      <funcsynopsisinfo>#include &lt;elogind/sd-bus.h&gt;</funcsynopsisinfo>
 
       <funcprototype>
         <funcdef>int <function>sd_bus_negotiate_fds</function></funcdef>
     setting as negotiated by the program ultimately activated. By
     default, file descriptor passing is enabled for both.</para>
 
-    <para><function>sd_bus_negotiate_timestamp()</function> controls whether implicit sender
-    timestamps shall be attached automatically to all incoming messages. Takes a bus object and a
-    boolean, which, when true, enables timestamping, and, when false, disables it.  Use
+    <para><function>sd_bus_negotiate_timestamps()</function> controls
+    whether implicit sender timestamps shall be attached automatically
+    to all incoming messages. Takes a bus object and a boolean, which,
+    when true, enables timestamping, and, when false, disables it.
+    Use
     <citerefentry><refentrytitle>sd_bus_message_get_monotonic_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
     <citerefentry><refentrytitle>sd_bus_message_get_realtime_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
     <citerefentry><refentrytitle>sd_bus_message_get_seqnum</refentrytitle><manvolnum>3</manvolnum></citerefentry>
-    to query the timestamps of incoming messages. If negotiation is disabled or not supported, these
-    calls will fail with <constant>-ENODATA</constant>. Note that currently no transports support
-    timestamping of messages. By default, message timestamping is not negotiated for
+    to query the timestamps of incoming messages. If negotiation is
+    disabled or not supported, these calls will fail with
+    <constant>-ENODATA</constant>. Note that not all transports
+    support timestamping of messages. Specifically, timestamping is
+    only available on the kdbus transport, but not on dbus1. The
+    timestamping is applied by the kernel and cannot be manipulated by
+    userspace. By default, message timestamping is not negotiated for
     connections.</para>
 
-    <para><function>sd_bus_negotiate_creds()</function> controls whether and which implicit sender
-    credentials shall be attached automatically to all incoming messages. Takes a bus object and a
-    boolean indicating whether to enable or disable the credential parts encoded in the bit mask
-    value argument. Note that not all transports support attaching sender credentials to messages,
-    or do not support all types of sender credential parameters, or might suppress them under
-    certain circumstances for individual messages. Specifically, dbus1 only supports
-    <constant>SD_BUS_CREDS_UNIQUE_NAME</constant>. The sender credentials are suitable for
-    authorization decisions. By default, only <constant>SD_BUS_CREDS_WELL_KNOWN_NAMES</constant> and
-    <constant>SD_BUS_CREDS_UNIQUE_NAME</constant> are enabled. In fact, these two credential fields
-    are always sent along and cannot be turned off.</para>
+    <para><function>sd_bus_negotiate_creds()</function> controls
+    whether and which implicit sender credentials shall be attached
+    automatically to all incoming messages. Takes a bus object and a
+    boolean indicating whether to enable or disable the credential
+    parts encoded in the bit mask value argument. Note that not all
+    transports support attaching sender credentials to messages, or do
+    not support all types of sender credential parameters, or might
+    suppress them under certain circumstances for individual
+    messages. Specifically, implicit sender credentials on messages
+    are only fully supported on kdbus transports, and dbus1 only
+    supports <constant>SD_BUS_CREDS_UNIQUE_NAME</constant>. The sender
+    credentials are attached by the kernel and cannot be manipulated
+    by userspace, and are thus suitable for authorization
+    decisions. By default, only
+    <constant>SD_BUS_CREDS_WELL_KNOWN_NAMES</constant> and
+    <constant>SD_BUS_CREDS_UNIQUE_NAME</constant> are enabled. In
+    fact, these two credential fields are always sent along and cannot
+    be turned off.</para>
 
     <para>The <function>sd_bus_negotiate_fds()</function> function may
     be called only before the connection has been started with
     <title>See Also</title>
 
     <para>
-      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>elogind</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_bus_start</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_bus_message_can_send</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_bus_message_get_realtime_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_bus_message_get_seqnum</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_bus_message_get_creds</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
-      <citerefentry><refentrytitle>systemd.busname</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+      <citerefentry><refentrytitle>elogind.busname</refentrytitle><manvolnum>5</manvolnum></citerefentry>
     </para>
   </refsect1>
 
index 2eeba78e8764d619244b28b054bb538fd8f9ac13..6be915ac910d82d2d3ca418c5145f301fcf825dc 100644 (file)
@@ -3,29 +3,29 @@
 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 
 <!--
-  This file is part of systemd.
+  This file is part of elogind.
 
   Copyright 2014 Zbigniew JÄ™drzejewski-Szmek
 
-  systemd is free software; you can redistribute it and/or modify it
+  elogind is free software; you can redistribute it and/or modify it
   under the terms of the GNU Lesser General Public License as published by
   the Free Software Foundation; either version 2.1 of the License, or
   (at your option) any later version.
 
-  systemd is distributed in the hope that it will be useful, but
+  elogind is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   Lesser General Public License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+  along with elogind; If not, see <http://www.gnu.org/licenses/>.
 -->
 
 <refentry id="sd_bus_new">
 
   <refentryinfo>
     <title>sd_bus_new</title>
-    <productname>systemd</productname>
+    <productname>elogind</productname>
 
     <authorgroup>
       <author>
@@ -53,7 +53,7 @@
 
   <refsynopsisdiv>
     <funcsynopsis>
-      <funcsynopsisinfo>#include &lt;systemd/sd-bus.h&gt;</funcsynopsisinfo>
+      <funcsynopsisinfo>#include &lt;elogind/sd-bus.h&gt;</funcsynopsisinfo>
 
       <funcprototype>
         <funcdef>int <function>sd_bus_new</function></funcdef>
     <title>See Also</title>
 
     <para>
-      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>elogind</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_bus_default_user</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_bus_default_system</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
diff --git a/man/sd_bus_path_encode.xml b/man/sd_bus_path_encode.xml
new file mode 100644 (file)
index 0000000..3fbb37c
--- /dev/null
@@ -0,0 +1,188 @@
+<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+
+<!--
+  This file is part of elogind.
+
+  Copyright 2014 Zbigniew JÄ™drzejewski-Szmek
+
+  elogind is free software; you can redistribute it and/or modify it
+  under the terms of the GNU Lesser General Public License as published by
+  the Free Software Foundation; either version 2.1 of the License, or
+  (at your option) any later version.
+
+  elogind is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with elogind; If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<refentry id="sd_bus_path_encode">
+
+  <refentryinfo>
+    <title>sd_bus_path_encode</title>
+    <productname>elogind</productname>
+
+    <authorgroup>
+      <author>
+        <contrib>A monkey with a typewriter</contrib>
+        <firstname>Zbigniew</firstname>
+        <surname>JÄ™drzejewski-Szmek</surname>
+        <email>zbyszek@in.waw.pl</email>
+      </author>
+    </authorgroup>
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>sd_bus_path_encode</refentrytitle>
+    <manvolnum>3</manvolnum>
+  </refmeta>
+
+  <refnamediv>
+    <refname>sd_bus_path_encode</refname>
+    <refname>sd_bus_path_encode_many</refname>
+    <refname>sd_bus_path_decode</refname>
+    <refname>sd_bus_path_decode_many</refname>
+
+    <refpurpose>Convert an external identifier into an object path and back</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <funcsynopsis>
+      <funcsynopsisinfo>#include &lt;elogind/sd-bus.h&gt;</funcsynopsisinfo>
+
+      <funcprototype>
+        <funcdef>int <function>sd_bus_path_encode</function></funcdef>
+        <paramdef>const char *<parameter>prefix</parameter></paramdef>
+        <paramdef>const char *<parameter>external_id</parameter></paramdef>
+        <paramdef>char **<parameter>ret_path</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>int <function>sd_bus_path_encode_many</function></funcdef>
+        <paramdef>char **<parameter>out</parameter></paramdef>
+        <paramdef>const char *<parameter>path_template</parameter></paramdef>
+        <paramdef>...</paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>int <function>sd_bus_path_decode</function></funcdef>
+        <paramdef>const char *<parameter>path</parameter></paramdef>
+        <paramdef>const char *<parameter>prefix</parameter></paramdef>
+        <paramdef>char **<parameter>ret_external_id</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>int <function>sd_bus_path_decode_many</function></funcdef>
+        <paramdef>const char *<parameter>path</parameter></paramdef>
+        <paramdef>const char *<parameter>path_template</parameter></paramdef>
+        <paramdef>...</paramdef>
+      </funcprototype>
+    </funcsynopsis>
+  </refsynopsisdiv>
+
+  <refsect1>
+    <title>Description</title>
+
+    <para><function>sd_bus_path_encode()</function> and
+    <function>sd_bus_path_decode()</function> convert external
+    identifier strings into object paths and back. These functions are
+    useful to map application-specific string identifiers of any kind
+    into bus object paths in a simple, reversible and safe way.</para>
+
+    <para><function>sd_bus_path_encode()</function> takes a bus path
+    prefix and an external identifier string as arguments, plus a
+    place to store the returned bus path string. The bus path prefix
+    must be a valid bus path, starting with a slash
+    <literal>/</literal>, and not ending in one. The external
+    identifier string may be in any format, may be the empty string,
+    and has no restrictions on the charset — however, it must
+    always be <constant>NUL</constant>-terminated. The returned string
+    will be the concatenation of the bus path prefix plus an escaped
+    version of the external identifier string. This operation may be
+    reversed with <function>sd_bus_decode()</function>. It is
+    recommended to only use external identifiers that generally
+    require little escaping to be turned into valid bus path
+    identifiers (for example, by sticking to a 7-bit ASCII character
+    set), in order to ensure the resulting bus path is still short and
+    easily processed.</para>
+
+    <para><function>sd_bus_path_decode()</function> reverses the
+    operation of <function>sd_bus_path_encode()</function> and thus
+    regenerates an external identifier string from a bus path. It
+    takes a bus path and a prefix string, plus a place to store the
+    returned external identifier string. If the bus path does not
+    start with the specified prefix, 0 is returned and the returned
+    string is set to <constant>NULL</constant>. Otherwise, the
+    string following the prefix is unescaped and returned in the
+    external identifier string.</para>
+
+    <para>The escaping used will replace all characters which are
+    invalid in a bus object path by <literal>_</literal>, followed by a
+    hexadecimal value. As a special case, the empty string will be
+    replaced by a lone <literal>_</literal>.</para>
+
+    <para><function>sd_bus_path_encode_many()</function> works like
+    its counterpart <function>sd_bus_path_encode()</function>, but
+    takes a path template as argument and encodes multiple labels
+    according to its embedded directives. For each
+    <literal>%</literal> character found in the template, the caller
+    must provide a string via varargs, which will be encoded and
+    embedded at the position of the <literal>%</literal> character.
+    Any other character in the template is copied verbatim into the
+    encoded path.</para>
+
+    <para><function>sd_bus_path_decode_many()</function> does the
+    reverse of <function>sd_bus_path_encode_many()</function>. It
+    decodes the passed object path according to the given
+    path template. For each <literal>%</literal> character in the
+    template, the caller must provide an output storage
+    (<literal>char **</literal>) via varargs. The decoded label
+    will be stored there. Each <literal>%</literal> character will
+    only match the current label. It will never match across labels.
+    Furthermore, only a single directive is allowed per label.
+    If <literal>NULL</literal> is passed as output storage, the
+    label is verified but not returned to the caller.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>Return Value</title>
+
+    <para>On success, <function>sd_bus_path_encode()</function>
+    returns positive or 0, and a valid bus path in the return
+    argument. On success, <function>sd_bus_path_decode()</function>
+    returns a positive value if the prefixed matched, or 0 if it
+    did not. If the prefix matched, the external identifier is returned
+    in the return parameter. If it did not match, NULL is returned in
+    the return parameter. On failure, a negative errno-style error
+    number is returned by either function. The returned strings must
+    be
+    <citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>'d
+    by the caller.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>Notes</title>
+
+    <para><function>sd_bus_path_encode()</function> and
+    <function>sd_bus_path_decode()</function> are available as a
+    shared library, which can be compiled and linked to with the
+    <constant>libelogind</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+    file.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>See Also</title>
+
+    <para>
+      <citerefentry><refentrytitle>elogind</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+    </para>
+  </refsect1>
+
+</refentry>
index 520e6fb84039ff4320eb5fe4e9a40e6a9dc55126..d627eded160692108907a39c88aa124d835e0b69 100644 (file)
@@ -3,29 +3,29 @@
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 
 <!--
-  This file is part of systemd.
+  This file is part of elogind.
 
   Copyright 2013 Lennart Poettering
 
-  systemd is free software; you can redistribute it and/or modify it
+  elogind is free software; you can redistribute it and/or modify it
   under the terms of the GNU Lesser General Public License as published by
   the Free Software Foundation; either version 2.1 of the License, or
   (at your option) any later version.
 
-  systemd is distributed in the hope that it will be useful, but
+  elogind is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   Lesser General Public License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+  along with elogind; If not, see <http://www.gnu.org/licenses/>.
 -->
 
 <refentry id="sd_bus_request_name">
 
   <refentryinfo>
     <title>sd_bus_request_name</title>
-    <productname>systemd</productname>
+    <productname>elogind</productname>
 
     <authorgroup>
       <author>
@@ -50,7 +50,7 @@
 
   <refsynopsisdiv>
     <funcsynopsis>
-      <funcsynopsisinfo>#include &lt;systemd/sd-bus.h&gt;</funcsynopsisinfo>
+      <funcsynopsisinfo>#include &lt;elogind/sd-bus.h&gt;</funcsynopsisinfo>
 
       <funcprototype>
         <funcdef>int <function>sd_bus_request_name</function></funcdef>
     <title>See Also</title>
 
     <para>
-      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>elogind</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_bus_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>
     </para>
index 1e7cbf56eb1264f66930594ca019c29df162c73b..9925cec3383fb80157a65791ee6200bb65de1589 100644 (file)
@@ -3,29 +3,29 @@
 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 
 <!--
-  This file is part of systemd.
+  This file is part of elogind.
 
   Copyright 2014 Zbigniew JÄ™drzejewski-Szmek
 
-  systemd is free software; you can redistribute it and/or modify it
+  elogind is free software; you can redistribute it and/or modify it
   under the terms of the GNU Lesser General Public License as published by
   the Free Software Foundation; either version 2.1 of the License, or
   (at your option) any later version.
 
-  systemd is distributed in the hope that it will be useful, but
+  elogind is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   Lesser General Public License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+  along with elogind; If not, see <http://www.gnu.org/licenses/>.
 -->
 
 <refentry id="sd_event_add_child" xmlns:xi="http://www.w3.org/2001/XInclude">
 
   <refentryinfo>
     <title>sd_event_add_child</title>
-    <productname>systemd</productname>
+    <productname>elogind</productname>
 
     <authorgroup>
       <author>
@@ -52,7 +52,7 @@
 
   <refsynopsisdiv>
     <funcsynopsis>
-      <funcsynopsisinfo>#include &lt;systemd/sd-event.h&gt;</funcsynopsisinfo>
+      <funcsynopsisinfo>#include &lt;elogind/sd-event.h&gt;</funcsynopsisinfo>
 
       <funcsynopsisinfo><token>typedef</token> struct sd_event_source sd_event_source;</funcsynopsisinfo>
 
     <title>See Also</title>
 
     <para>
-      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>elogind</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd-event</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_event_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_event_now</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
index f8ac3e40a1a54ce10fdf19d8f3f60bfc0f9b7e09..dd88b09824e0af2a705e50a5cd6d97081e0c4095 100644 (file)
@@ -3,29 +3,29 @@
 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 
 <!--
-  This file is part of systemd.
+  This file is part of elogind.
 
   Copyright 2014 Zbigniew JÄ™drzejewski-Szmek
 
-  systemd is free software; you can redistribute it and/or modify it
+  elogind is free software; you can redistribute it and/or modify it
   under the terms of the GNU Lesser General Public License as published by
   the Free Software Foundation; either version 2.1 of the License, or
   (at your option) any later version.
 
-  systemd is distributed in the hope that it will be useful, but
+  elogind is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   Lesser General Public License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+  along with elogind; If not, see <http://www.gnu.org/licenses/>.
 -->
 
 <refentry id="sd_event_add_defer" xmlns:xi="http://www.w3.org/2001/XInclude">
 
   <refentryinfo>
     <title>sd_event_add_defer</title>
-    <productname>systemd</productname>
+    <productname>elogind</productname>
 
     <authorgroup>
       <author>
@@ -53,7 +53,7 @@
 
   <refsynopsisdiv>
     <funcsynopsis>
-      <funcsynopsisinfo>#include &lt;systemd/sd-event.h&gt;</funcsynopsisinfo>
+      <funcsynopsisinfo>#include &lt;elogind/sd-event.h&gt;</funcsynopsisinfo>
 
       <funcsynopsisinfo><token>typedef</token> struct sd_event_source sd_event_source;</funcsynopsisinfo>
 
   <refsect1>
     <title>Return Value</title>
 
-    <para>On success, these functions return 0 or a positive
+    <para>On success, this functions return 0 or a positive
     integer. On failure, they return a negative errno-style error
     code.</para>
   </refsect1>
     <title>See Also</title>
 
     <para>
-      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>elogind</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd-event</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_event_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_event_now</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
index 4c19ada016330238776ddc62741a58823af3babd..dec185a9761d78dd29b79b8d8cd43a8932ace071 100644 (file)
@@ -3,29 +3,29 @@
 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 
 <!--
-  This file is part of systemd.
+  This file is part of elogind.
 
   Copyright 2014 Zbigniew JÄ™drzejewski-Szmek
 
-  systemd is free software; you can redistribute it and/or modify it
+  elogind is free software; you can redistribute it and/or modify it
   under the terms of the GNU Lesser General Public License as published by
   the Free Software Foundation; either version 2.1 of the License, or
   (at your option) any later version.
 
-  systemd is distributed in the hope that it will be useful, but
+  elogind is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   Lesser General Public License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+  along with elogind; If not, see <http://www.gnu.org/licenses/>.
 -->
 
 <refentry id="sd_event_add_signal" xmlns:xi="http://www.w3.org/2001/XInclude">
 
   <refentryinfo>
     <title>sd_event_add_signal</title>
-    <productname>systemd</productname>
+    <productname>elogind</productname>
 
     <authorgroup>
       <author>
@@ -53,7 +53,7 @@
 
   <refsynopsisdiv>
     <funcsynopsis>
-      <funcsynopsisinfo>#include &lt;systemd/sd-event.h&gt;</funcsynopsisinfo>
+      <funcsynopsisinfo>#include &lt;elogind/sd-event.h&gt;</funcsynopsisinfo>
 
       <funcsynopsisinfo><token>typedef</token> struct sd_event_source sd_event_source;</funcsynopsisinfo>
 
     <title>See Also</title>
 
     <para>
-      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>elogind</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd-event</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_event_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_event_now</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
index d5e2e91375df8152b0cbb36fdced815fc2a3e029..426dff1c5563ec6a599e554cc324e29b1ba94f92 100644 (file)
@@ -3,29 +3,29 @@
 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 
 <!--
-  This file is part of systemd.
+  This file is part of elogind.
 
   Copyright 2014 Lennart Poettering
 
-  systemd is free software; you can redistribute it and/or modify it
+  elogind is free software; you can redistribute it and/or modify it
   under the terms of the GNU Lesser General Public License as published by
   the Free Software Foundation; either version 2.1 of the License, or
   (at your option) any later version.
 
-  systemd is distributed in the hope that it will be useful, but
+  elogind is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   Lesser General Public License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+  along with elogind; If not, see <http://www.gnu.org/licenses/>.
 -->
 
 <refentry id="sd_event_add_time" xmlns:xi="http://www.w3.org/2001/XInclude">
 
   <refentryinfo>
     <title>sd_event_add_time</title>
-    <productname>systemd</productname>
+    <productname>elogind</productname>
 
     <authorgroup>
       <author>
@@ -56,7 +56,7 @@
 
   <refsynopsisdiv>
     <funcsynopsis>
-      <funcsynopsisinfo>#include &lt;systemd/sd-event.h&gt;</funcsynopsisinfo>
+      <funcsynopsisinfo>#include &lt;elogind/sd-event.h&gt;</funcsynopsisinfo>
 
       <funcsynopsisinfo><token>typedef</token> struct sd_event_source sd_event_source;</funcsynopsisinfo>
 
     regarding the various types of clocks. The <parameter>usec</parameter> parameter specifies the earliest time, in
     microseconds (µs), relative to the clock's epoch, when the timer shall be triggered. If a time already in the past
     is specified (including <constant>0</constant>), this timer source "fires" immediately and is ready to be
-    dispatched. If the parameter is specified as <constant>UINT64_MAX</constant> the timer event will never elapse,
+    dispatched. If the paramater is specified as <constant>UINT64_MAX</constant> the timer event will never elapse,
     which may be used as an alternative to explicitly disabling a timer event source with
     <citerefentry><refentrytitle>sd_event_source_set_enabled</refentrytitle><manvolnum>3</manvolnum></citerefentry>. The
     <parameter>accuracy</parameter> parameter specifies an additional accuracy value in Âµs specifying how much the
     in Âµs.</para>
 
     <para><function>sd_event_source_get_time_accuracy()</function>
-    retrieves the configured accuracy value of an event source
+    retrieves the configured accuracy value of a event source
     created previously with <function>sd_event_add_time()</function>. It
     takes the event source object and a pointer to a variable to store
     the accuracy in. The accuracy is specified in Âµs.</para>
     the event source object and accuracy, in Âµs.</para>
 
     <para><function>sd_event_source_get_time_clock()</function>
-    retrieves the configured clock of an event source created
+    retrieves the configured clock of a event source created
     previously with <function>sd_event_add_time()</function>. It takes
     the event source object and a pointer to a variable to store the
     clock identifier in.</para>
     <title>See Also</title>
 
     <para>
-      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>elogind</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd-event</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_event_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_event_now</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
diff --git a/man/sd_event_get_fd.xml b/man/sd_event_get_fd.xml
new file mode 100644 (file)
index 0000000..88671a2
--- /dev/null
@@ -0,0 +1,140 @@
+<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+
+<!--
+  This file is part of elogind.
+
+  Copyright 2014 Zbigniew JÄ™drzejewski-Szmek
+
+  elogind is free software; you can redistribute it and/or modify it
+  under the terms of the GNU Lesser General Public License as published by
+  the Free Software Foundation; either version 2.1 of the License, or
+  (at your option) any later version.
+
+  elogind is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with elogind; If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<refentry id="sd_event_get_fd" xmlns:xi="http://www.w3.org/2001/XInclude">
+
+  <refentryinfo>
+    <title>sd_event_get_fd</title>
+    <productname>elogind</productname>
+
+    <authorgroup>
+      <author>
+        <contrib>More text</contrib>
+        <firstname>Zbigniew</firstname>
+        <surname>JÄ™drzejewski-Szmek</surname>
+        <email>zbyszek@in.waw.pl</email>
+      </author>
+    </authorgroup>
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>sd_event_get_fd</refentrytitle>
+    <manvolnum>3</manvolnum>
+  </refmeta>
+
+  <refnamediv>
+    <refname>sd_event_get_fd</refname>
+
+    <refpurpose>Obtain a file descriptor to poll for event loop events</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <funcsynopsis>
+      <funcsynopsisinfo>#include &lt;elogind/sd-event.h&gt;</funcsynopsisinfo>
+
+      <funcprototype>
+        <funcdef>int <function>sd_event_get_fd</function></funcdef>
+        <paramdef>sd_event *<parameter>event</parameter></paramdef>
+      </funcprototype>
+
+    </funcsynopsis>
+  </refsynopsisdiv>
+
+  <refsect1>
+    <title>Description</title>
+
+    <para><function>sd_event_get_fd()</function> returns the file
+    descriptor that an event loop object returned by the
+    <citerefentry><refentrytitle>sd_event_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+    function uses to wait for events. This file descriptor may itself
+    be polled for
+    <constant>POLLIN</constant>/<constant>EPOLLIN</constant>
+    events. This makes it possible to embed an
+    <citerefentry><refentrytitle>sd-event</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+    event loop into another, possibly foreign, event loop.</para>
+
+    <para>The returned file descriptor refers to an <citerefentry
+    project='man-pages'><refentrytitle>epoll</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+    object. It is recommended not to alter it by invoking
+    <citerefentry
+    project='man-pages'><refentrytitle>epoll_ctl</refentrytitle><manvolnum>2</manvolnum></citerefentry>
+    on it, in order to avoid interference with the event loop's inner
+    logic and assumptions.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>Return Value</title>
+
+    <para>On success, <function>sd_event_get_fd()</function> returns a
+    non-negative file descriptor. On failure, it returns a negative
+    errno-style error code.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>Errors</title>
+
+    <para>Returned errors may indicate the following problems:</para>
+
+    <variablelist>
+      <varlistentry>
+        <term><constant>-EINVAL</constant></term>
+
+        <listitem><para><parameter>event</parameter> is not a valid
+        pointer to an <structname>sd_event</structname> structure.
+        </para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><constant>-ECHILD</constant></term>
+
+        <listitem><para>The event loop has been created in a different process.</para></listitem>
+
+      </varlistentry>
+    </variablelist>
+  </refsect1>
+
+  <refsect1>
+    <title>Examples</title>
+
+    <example>
+      <title>Integration in the GLib event loop</title>
+
+      <programlisting><xi:include href="glib-event-glue.c" parse="text" /></programlisting>
+    </example>
+  </refsect1>
+
+  <xi:include href="libelogind-pkgconfig.xml" />
+
+  <refsect1>
+    <title>See Also</title>
+
+    <para>
+      <citerefentry><refentrytitle>sd-event</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_event_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_event_wait</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry project='man-pages'><refentrytitle>epoll_ctl</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry project='man-pages'><refentrytitle>epoll</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+    </para>
+  </refsect1>
+
+</refentry>
index 12716d7deb600c647aa5a328d11f3dec4ccf2780..40a686b14246a9e9b0b84e286f0cb3e4c34d9e41 100644 (file)
@@ -3,29 +3,29 @@
 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 
 <!--
-  This file is part of systemd.
+  This file is part of elogind.
 
   Copyright 2014 Lennart Poettering
 
-  systemd is free software; you can redistribute it and/or modify it
+  elogind is free software; you can redistribute it and/or modify it
   under the terms of the GNU Lesser General Public License as published by
   the Free Software Foundation; either version 2.1 of the License, or
   (at your option) any later version.
 
-  systemd is distributed in the hope that it will be useful, but
+  elogind is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   Lesser General Public License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+  along with elogind; If not, see <http://www.gnu.org/licenses/>.
 -->
 
 <refentry id="sd_event_new" xmlns:xi="http://www.w3.org/2001/XInclude">
 
   <refentryinfo>
     <title>sd_event_new</title>
-    <productname>systemd</productname>
+    <productname>elogind</productname>
 
     <authorgroup>
       <author>
@@ -56,7 +56,7 @@
 
   <refsynopsisdiv>
     <funcsynopsis>
-      <funcsynopsisinfo>#include &lt;systemd/sd-event.h&gt;</funcsynopsisinfo>
+      <funcsynopsisinfo>#include &lt;elogind/sd-event.h&gt;</funcsynopsisinfo>
 
       <funcsynopsisinfo><token>typedef</token> struct sd_event sd_event;</funcsynopsisinfo>
 
   <refsect1>
     <title>Return Value</title>
 
-    <para>On success, <function>sd_event_new()</function>,
-    <function>sd_event_default()</function> and
-    <function>sd_event_get_tid()</function> return 0 or a positive
+    <para>On success, <function>sd_event_new()</function> and
+    <function>sd_event_default()</function> return 0 or a positive
     integer. On failure, they return a negative errno-style error
     code. <function>sd_event_ref()</function> always returns a pointer
     to the event loop object passed
     <title>See Also</title>
 
     <para>
-      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>elogind</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd-event</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_event_add_io</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_event_add_time</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
index 0f5bac584e9d85ef4fbe9852dd40f4135389ceae..d37febef43e9cce55adff0b977ea593ec652271c 100644 (file)
@@ -3,29 +3,29 @@
 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 
 <!--
-  This file is part of systemd.
+  This file is part of elogind.
 
   Copyright 2015 Zbigniew JÄ™drzejewski-Szmek
 
-  systemd is free software; you can redistribute it and/or modify it
+  elogind is free software; you can redistribute it and/or modify it
   under the terms of the GNU Lesser General Public License as published by
   the Free Software Foundation; either version 2.1 of the License, or
   (at your option) any later version.
 
-  systemd is distributed in the hope that it will be useful, but
+  elogind is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   Lesser General Public License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+  along with elogind; If not, see <http://www.gnu.org/licenses/>.
 -->
 
 <refentry id="sd_event_run" xmlns:xi="http://www.w3.org/2001/XInclude">
 
   <refentryinfo>
     <title>sd_event_run</title>
-    <productname>systemd</productname>
+    <productname>elogind</productname>
 
     <authorgroup>
       <author>
@@ -51,7 +51,7 @@
 
   <refsynopsisdiv>
     <funcsynopsis>
-      <funcsynopsisinfo>#include &lt;systemd/sd-event.h&gt;</funcsynopsisinfo>
+      <funcsynopsisinfo>#include &lt;elogind/sd-event.h&gt;</funcsynopsisinfo>
 
       <funcprototype>
         <funcdef>int <function>sd_event_run</function></funcdef>
     <title>See Also</title>
 
     <para>
-      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>elogind</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_event_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_event_add_io</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_event_add_time</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
index d53090cacf001fa1f69a2fa1369a5315c3cd6041..5d675ecea2c0db421b3f08b1a84270ae53a71a97 100644 (file)
@@ -3,29 +3,29 @@
 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 
 <!--
-  This file is part of systemd.
+  This file is part of elogind.
 
   Copyright 2015 Zbigniew JÄ™drzejewski-Szmek
 
-  systemd is free software; you can redistribute it and/or modify it
+  elogind is free software; you can redistribute it and/or modify it
   under the terms of the GNU Lesser General Public License as published by
   the Free Software Foundation; either version 2.1 of the License, or
   (at your option) any later version.
 
-  systemd is distributed in the hope that it will be useful, but
+  elogind is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   Lesser General Public License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+  along with elogind; If not, see <http://www.gnu.org/licenses/>.
 -->
 
 <refentry id="sd_event_wait" xmlns:xi="http://www.w3.org/2001/XInclude">
 
   <refentryinfo>
     <title>sd_event_wait</title>
-    <productname>systemd</productname>
+    <productname>elogind</productname>
 
     <authorgroup>
       <author>
@@ -47,7 +47,6 @@
     <refname>sd_event_prepare</refname>
     <refname>sd_event_dispatch</refname>
     <refname>sd_event_get_state</refname>
-    <refname>sd_event_get_iteration</refname>
     <refname>SD_EVENT_INITIAL</refname>
     <refname>SD_EVENT_PREPARING</refname>
     <refname>SD_EVENT_ARMED</refname>
@@ -61,7 +60,7 @@
 
   <refsynopsisdiv>
     <funcsynopsis>
-      <funcsynopsisinfo>#include &lt;systemd/sd-event.h&gt;</funcsynopsisinfo>
+      <funcsynopsisinfo>#include &lt;elogind/sd-event.h&gt;</funcsynopsisinfo>
 
       <funcsynopsisinfo><token>enum</token> {
         <constant>SD_EVENT_INITIAL</constant>,
         <paramdef>sd_event *<parameter>event</parameter></paramdef>
       </funcprototype>
 
-      <funcprototype>
-        <funcdef>int <function>sd_event_get_iteration</function></funcdef>
-        <paramdef>sd_event *<parameter>event</parameter></paramdef>
-        <paramdef>uint64_t *<parameter>ret</parameter></paramdef>
-      </funcprototype>
-
     </funcsynopsis>
   </refsynopsisdiv>
 
     determine the state the event loop is currently in. It returns one
     of the states described below.</para>
 
-    <para><function>sd_event_get_iteration()</function> may be used to determine the current iteration of the event
-    loop. It returns an unsigned 64bit integer containing a counter that increases monotonically with each iteration of
-    the event loop, starting with 0. The counter is increased at the time of the
-    <function>sd_event_prepare()</function> invocation.</para>
-
-    <para>All five functions take, as the first argument, the event loop object <parameter>event</parameter> that has
-    been created with <function>sd_event_new()</function>. The timeout for <function>sd_event_wait()</function> is
-    specified in <parameter>usec</parameter> in microseconds.  <constant>(uint64_t) -1</constant> may be used to
-    specify an infinite timeout.</para>
+    <para>All four functions take, as the first argument, the event
+    loop object <parameter>event</parameter> that has been created
+    with <function>sd_event_new()</function>. The timeout for
+    <function>sd_event_wait()</function> is specified in
+    <parameter>usec</parameter> in milliseconds.  <constant>(uint64_t)
+    -1</constant> may be used to specify an infinite timeout.</para>
 </refsect1>
 
   <refsect1>
     <title>See Also</title>
 
     <para>
-      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>elogind</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_event_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_event_add_io</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_event_add_time</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
index 0f4f274f6fb22a3519080de9175db85e03476215..3dac5a9001da24b1061e4121ce82ebf8bcafa2f3 100644 (file)
@@ -3,22 +3,22 @@
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 
 <!--
-  This file is part of systemd.
+  This file is part of elogind.
 
   Copyright 2010 Lennart Poettering
 
-  systemd is free software; you can redistribute it and/or modify it
+  elogind is free software; you can redistribute it and/or modify it
   under the terms of the GNU Lesser General Public License as published by
   the Free Software Foundation; either version 2.1 of the License, or
   (at your option) any later version.
 
-  systemd is distributed in the hope that it will be useful, but
+  elogind is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   Lesser General Public License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+  along with elogind; If not, see <http://www.gnu.org/licenses/>.
 -->
 
 <refentry id="sd_is_fifo"
@@ -26,7 +26,7 @@
 
   <refentryinfo>
     <title>sd_is_fifo</title>
-    <productname>systemd</productname>
+    <productname>elogind</productname>
 
     <authorgroup>
       <author>
     <refname>sd_is_socket</refname>
     <refname>sd_is_socket_inet</refname>
     <refname>sd_is_socket_unix</refname>
-    <refname>sd_is_socket_sockaddr</refname>
-    <refname>sd_is_mq</refname>
     <refname>sd_is_special</refname>
     <refpurpose>Check the type of a file descriptor</refpurpose>
   </refnamediv>
 
   <refsynopsisdiv>
     <funcsynopsis>
-      <funcsynopsisinfo>#include &lt;systemd/sd-daemon.h&gt;</funcsynopsisinfo>
+      <funcsynopsisinfo>#include &lt;elogind/sd-daemon.h&gt;</funcsynopsisinfo>
 
       <funcprototype>
         <funcdef>int <function>sd_is_fifo</function></funcdef>
         <paramdef>uint16_t <parameter>port</parameter></paramdef>
       </funcprototype>
 
-      <funcprototype>
-        <funcdef>int <function>sd_is_socket_sockaddr</function></funcdef>
-        <paramdef>int <parameter>fd</parameter></paramdef>
-        <paramdef>int <parameter>type</parameter></paramdef>
-        <paramdef>const struct sockaddr *<parameter>addr</parameter></paramdef>
-        <paramdef>unsigned <parameter>addr_len</parameter></paramdef>
-        <paramdef>int <parameter>listening</parameter></paramdef>
-      </funcprototype>
-
       <funcprototype>
         <funcdef>int <function>sd_is_socket_unix</function></funcdef>
         <paramdef>int <parameter>fd</parameter></paramdef>
         <paramdef>size_t <parameter>length</parameter></paramdef>
       </funcprototype>
 
-      <funcprototype>
-        <funcdef>int <function>sd_is_mq</function></funcdef>
-        <paramdef>int <parameter>fd</parameter></paramdef>
-        <paramdef>const char *<parameter>path</parameter></paramdef>
-      </funcprototype>
-
       <funcprototype>
         <funcdef>int <function>sd_is_special</function></funcdef>
         <paramdef>int <parameter>fd</parameter></paramdef>
     whether the specified file descriptor refers to a socket. If the
     <parameter>family</parameter> parameter is not
     <constant>AF_UNSPEC</constant>, it is checked whether the socket
-    is of the specified family (<constant>AF_UNIX</constant>,
-    <constant>AF_INET</constant>, â€¦). If the <parameter>type</parameter>
-    parameter is not 0, it is checked whether the socket is of the
-    specified type (<constant>SOCK_STREAM</constant>,
-    <constant>SOCK_DGRAM</constant>, â€¦). If the
+    is of the specified family (AF_UNIX, <constant>AF_INET</constant>,
+    ...). If the <parameter>type</parameter> parameter is not 0, it is
+    checked whether the socket is of the specified type
+    (<constant>SOCK_STREAM</constant>,
+    <constant>SOCK_DGRAM</constant>, ...). If the
     <parameter>listening</parameter> parameter is positive, it is
     checked whether the socket is in accepting mode, i.e.
     <function>listen()</function> has been called for it. If
     <constant>AF_UNSPEC</constant>, <constant>AF_INET</constant>, or
     <constant>AF_INET6</constant>.</para>
 
-    <para><function>sd_is_socket_sockaddr()</function> is similar to
-    <function>sd_is_socket_inet()</function>, but checks if the socket is bound to the
-    address specified by <parameter>addr</parameter>. The
-    <structfield>family</structfield> specified by <parameter>addr</parameter> must be
-    either <constant>AF_INET</constant> or <constant>AF_INET6</constant> and
-    <parameter>addr_len</parameter> must be large enough for that family. If
-    <parameter>addr</parameter> specifies a non-zero port, it is also checked if the
-    socket is bound to this port. In addition, for IPv6, if <parameter>addr</parameter>
-    specifies non-zero <structfield>sin6_flowinfo</structfield> or
-    <structfield>sin6_scope_id</structfield>, it is checked if the socket has the same
-    values.</para>
-
     <para><function>sd_is_socket_unix()</function> is similar to
     <function>sd_is_socket()</function> but optionally checks the
     <constant>AF_UNIX</constant> path the socket is bound to, unless
     <parameter>path</parameter> to the initial 0 byte of the socket
     address.</para>
 
-    <para><function>sd_is_mq()</function> may be called to check
-    whether the specified file descriptor refers to a POSIX message
-    queue. If the <parameter>path</parameter> parameter is not
-    <constant>NULL</constant>, it is checked whether the message queue
-    is bound to the specified name.</para>
-
     <para><function>sd_is_special()</function> may be called to check
     whether the specified file descriptor refers to a special file. If
     the <parameter>path</parameter> parameter is not
   <refsect1>
     <title>See Also</title>
     <para>
-      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-      <citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
-      <citerefentry><refentrytitle>sd_listen_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
-      <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
-      <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
-      <citerefentry project='man-pages'><refentrytitle>ip</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
-      <citerefentry project='man-pages'><refentrytitle>ipv6</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
-      <citerefentry project='man-pages'><refentrytitle>unix</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
-      <citerefentry project='man-pages'><refentrytitle>fifo</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
-      <citerefentry project='man-pages'><refentrytitle>mq_overview</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
-      <citerefentry project='man-pages'><refentrytitle>socket</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
+      <citerefentry><refentrytitle>elogind</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
     </para>
   </refsect1>
 
index c6c58390a2b863705bd9973fc9e1ce794b2dfb19..0b5b474a50d7bd44bf7bad8095e6d4a913264a1c 100644 (file)
@@ -3,29 +3,29 @@
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 
 <!--
-  This file is part of systemd.
+  This file is part of elogind.
 
   Copyright 2010 Lennart Poettering
 
-  systemd is free software; you can redistribute it and/or modify it
+  elogind is free software; you can redistribute it and/or modify it
   under the terms of the GNU Lesser General Public License as published by
   the Free Software Foundation; either version 2.1 of the License, or
   (at your option) any later version.
 
-  systemd is distributed in the hope that it will be useful, but
+  elogind is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   Lesser General Public License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+  along with elogind; If not, see <http://www.gnu.org/licenses/>.
 -->
 
 <refentry id="sd_login_monitor_new" conditional='HAVE_PAM'>
 
   <refentryinfo>
     <title>sd_login_monitor_new</title>
-    <productname>systemd</productname>
+    <productname>elogind</productname>
 
     <authorgroup>
       <author>
@@ -56,7 +56,7 @@
 
   <refsynopsisdiv>
     <funcsynopsis>
-      <funcsynopsisinfo>#include &lt;systemd/sd-login.h&gt;</funcsynopsisinfo>
+      <funcsynopsisinfo>#include &lt;elogind/sd-login.h&gt;</funcsynopsisinfo>
 
       <funcprototype>
         <funcdef>int <function>sd_login_monitor_new</function></funcdef>
@@ -203,7 +203,7 @@ if (t == (uint64_t) -1)
 else {
          struct timespec ts;
          uint64_t n;
-         clock_gettime(CLOCK_MONOTONIC, &amp;ts);
+         clock_getttime(CLOCK_MONOTONIC, &amp;ts);
          n = (uint64_t) ts.tv_sec * 1000000 + ts.tv_nsec / 1000;
          msec = t > n ? (int) ((t - n + 999) / 1000) : 0;
 }</programlisting>
@@ -276,7 +276,7 @@ else {
     <title>See Also</title>
 
     <para>
-      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>elogind</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd-login</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_get_seats</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>poll</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
index a4be941de84aac4c6f69718da5226c36cfd5228c..f85b413f0824d9d64b3611733ea203f093b4aa9d 100644 (file)
@@ -3,29 +3,29 @@
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 
 <!--
-  This file is part of systemd.
+  This file is part of elogind.
 
   Copyright 2010 Lennart Poettering
 
-  systemd is free software; you can redistribute it and/or modify it
+  elogind is free software; you can redistribute it and/or modify it
   under the terms of the GNU Lesser General Public License as published by
   the Free Software Foundation; either version 2.1 of the License, or
   (at your option) any later version.
 
-  systemd is distributed in the hope that it will be useful, but
+  elogind is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   Lesser General Public License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+  along with elogind; If not, see <http://www.gnu.org/licenses/>.
 -->
 
 <refentry id="sd_pid_get_session" conditional='HAVE_PAM'>
 
   <refentryinfo>
     <title>sd_pid_get_session</title>
-    <productname>systemd</productname>
+    <productname>elogind</productname>
 
     <authorgroup>
       <author>
 
   <refnamediv>
     <refname>sd_pid_get_session</refname>
-    <refname>sd_pid_get_unit</refname>
-    <refname>sd_pid_get_user_unit</refname>
     <refname>sd_pid_get_owner_uid</refname>
     <refname>sd_pid_get_machine_name</refname>
-    <refname>sd_pid_get_slice</refname>
-    <refname>sd_pid_get_user_slice</refname>
     <refname>sd_pid_get_cgroup</refname>
     <refname>sd_peer_get_session</refname>
-    <refname>sd_peer_get_unit</refname>
-    <refname>sd_peer_get_user_unit</refname>
     <refname>sd_peer_get_owner_uid</refname>
     <refname>sd_peer_get_machine_name</refname>
-    <refname>sd_peer_get_slice</refname>
-    <refname>sd_peer_get_user_slice</refname>
     <refname>sd_peer_get_cgroup</refname>
     <refpurpose>Determine session, unit, owner of a session,
     container/VM or slice of a specific PID or socket
@@ -66,7 +58,7 @@
 
   <refsynopsisdiv>
     <funcsynopsis>
-      <funcsynopsisinfo>#include &lt;systemd/sd-login.h&gt;</funcsynopsisinfo>
+      <funcsynopsisinfo>#include &lt;elogind/sd-login.h&gt;</funcsynopsisinfo>
 
       <funcprototype>
         <funcdef>int <function>sd_pid_get_session</function></funcdef>
         <paramdef>char **<parameter>session</parameter></paramdef>
       </funcprototype>
 
-      <funcprototype>
-        <funcdef>int <function>sd_pid_get_unit</function></funcdef>
-        <paramdef>pid_t <parameter>pid</parameter></paramdef>
-        <paramdef>char **<parameter>unit</parameter></paramdef>
-      </funcprototype>
-
-      <funcprototype>
-        <funcdef>int <function>sd_pid_get_user_unit</function></funcdef>
-        <paramdef>pid_t <parameter>pid</parameter></paramdef>
-        <paramdef>char **<parameter>unit</parameter></paramdef>
-      </funcprototype>
-
       <funcprototype>
         <funcdef>int <function>sd_pid_get_owner_uid</function></funcdef>
         <paramdef>pid_t <parameter>pid</parameter></paramdef>
         <paramdef>char **<parameter>name</parameter></paramdef>
       </funcprototype>
 
-      <funcprototype>
-        <funcdef>int <function>sd_pid_get_slice</function></funcdef>
-        <paramdef>pid_t <parameter>pid</parameter></paramdef>
-        <paramdef>char **<parameter>slice</parameter></paramdef>
-      </funcprototype>
-
-      <funcprototype>
-        <funcdef>int <function>sd_pid_get_user_slice</function></funcdef>
-        <paramdef>pid_t <parameter>pid</parameter></paramdef>
-        <paramdef>char **<parameter>slice</parameter></paramdef>
-      </funcprototype>
-
       <funcprototype>
         <funcdef>int <function>sd_pid_get_cgroup</function></funcdef>
         <paramdef>pid_t <parameter>pid</parameter></paramdef>
         <paramdef>char **<parameter>session</parameter></paramdef>
       </funcprototype>
 
-      <funcprototype>
-        <funcdef>int <function>sd_peer_get_unit</function></funcdef>
-        <paramdef>int <parameter>fd</parameter></paramdef>
-        <paramdef>char **<parameter>unit</parameter></paramdef>
-      </funcprototype>
-
-      <funcprototype>
-        <funcdef>int <function>sd_peer_get_user_unit</function></funcdef>
-        <paramdef>int <parameter>fd</parameter></paramdef>
-        <paramdef>char **<parameter>unit</parameter></paramdef>
-      </funcprototype>
-
       <funcprototype>
         <funcdef>int <function>sd_peer_get_owner_uid</function></funcdef>
         <paramdef>int <parameter>fd</parameter></paramdef>
         <paramdef>char **<parameter>name</parameter></paramdef>
       </funcprototype>
 
-      <funcprototype>
-        <funcdef>int <function>sd_peer_get_slice</function></funcdef>
-        <paramdef>int <parameter>fd</parameter></paramdef>
-        <paramdef>char **<parameter>slice</parameter></paramdef>
-      </funcprototype>
-
-      <funcprototype>
-        <funcdef>int <function>sd_peer_get_user_slice</function></funcdef>
-        <paramdef>int <parameter>fd</parameter></paramdef>
-        <paramdef>char **<parameter>slice</parameter></paramdef>
-      </funcprototype>
-
       <funcprototype>
         <funcdef>int <function>sd_peer_get_cgroup</function></funcdef>
         <paramdef>int <parameter>fd</parameter></paramdef>
     processes, user processes that are shared between multiple
     sessions of the same user, or kernel threads). For processes not
     being part of a login session, this function will fail with
-    <constant>-ENODATA</constant>. The returned string needs to be freed with the libc
+    -ENODATA. The returned string needs to be freed with the libc
     <citerefentry
     project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
     call after use.</para>
 
-    <para><function>sd_pid_get_unit()</function> may be used to
-    determine the systemd system unit (i.e. system service or scope
-    unit) identifier of a process identified by the specified PID. The
-    unit name is a short string, suitable for usage in file system
-    paths. Note that not all processes are part of a system
-    unit/service (e.g. user processes, or kernel threads). For
-    processes not being part of a systemd system unit, this function
-    will fail with <constant>-ENODATA</constant>. (More specifically, this call will not
-    work for kernel threads.) The returned string needs to be freed
-    with the libc <citerefentry
-    project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
-    call after use.</para>
-
-    <para><function>sd_pid_get_user_unit()</function> may be used to
-    determine the systemd user unit (i.e. user service or scope unit)
-    identifier of a process identified by the specified PID. This is
-    similar to <function>sd_pid_get_unit()</function>, but applies to
-    user units instead of system units.</para>
-
     <para><function>sd_pid_get_owner_uid()</function> may be used to
     determine the Unix UID (user identifier) of the owner of the
     session of a process identified the specified PID. Note that this
     multiple login sessions of the same user, whereas
     <function>sd_pid_get_session()</function> will fail. For processes
     not being part of a login session and not being a shared process
-    of a user, this function will fail with <constant>-ENODATA</constant>.</para>
+    of a user, this function will fail with -ENODATA.</para>
 
     <para><function>sd_pid_get_machine_name()</function> may be used
     to determine the name of the VM or container is a member of. The
     <citerefentry
     project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
     call after use. For processes not part of a VM or containers, this
-    function fails with <constant>-ENODATA</constant>.</para>
-
-    <para><function>sd_pid_get_slice()</function> may be used to
-    determine the slice unit the process is a member of. See
-    <citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry>
-    for details about slices. The returned string needs to be freed
-    with the libc
-    <citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
-    call after use.</para>
-
-    <para>Similarly, <function>sd_pid_get_user_slice()</function>
-    returns the user slice (as managed by the user's systemd instance)
-    of a process.</para>
+    function fails with -ENODATA.</para>
 
     <para><function>sd_pid_get_cgroup()</function> returns the control
     group path of the specified process, relative to the root of the
     calling process.</para>
 
     <para>The <function>sd_peer_get_session()</function>,
-    <function>sd_peer_get_unit()</function>,
-    <function>sd_peer_get_user_unit()</function>,
     <function>sd_peer_get_owner_uid()</function>,
-    <function>sd_peer_get_machine_name()</function>,
-    <function>sd_peer_get_slice()</function>,
-    <function>sd_peer_get_user_slice()</function> and
+    <function>sd_peer_get_machine_name()</function> and
     <function>sd_peer_get_cgroup()</function> calls operate similar to
     their PID counterparts, but operate on a connected AF_UNIX socket
     and retrieve information about the connected peer process. Note
       </varlistentry>
 
       <varlistentry>
-        <term><constant>-EBADF</constant></term>
+        <term><constant>-BADF</constant></term>
 
         <listitem><para>The specified socket file descriptor was
         invalid.</para></listitem>
     <title>Notes</title>
 
     <para>The <function>sd_pid_get_session()</function>,
-    <function>sd_pid_get_unit()</function>,
-    <function>sd_pid_get_user_unit()</function>,
     <function>sd_pid_get_owner_uid()</function>,
     <function>sd_pid_get_machine_name()</function>,
-    <function>sd_pid_get_slice()</function>,
-    <function>sd_pid_get_user_slice()</function>,
     <function>sd_peer_get_session()</function>,
-    <function>sd_peer_get_unit()</function>,
-    <function>sd_peer_get_user_unit()</function>,
     <function>sd_peer_get_owner_uid()</function>,
     <function>sd_peer_get_machine_name()</function>,
-    <function>sd_peer_get_slice()</function> and
-    <function>sd_peer_get_user_slice()</function> interfaces are
     available as a shared library, which can be compiled and linked to
     with the <constant>libelogind</constant> <citerefentry
     project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
     <title>See Also</title>
 
     <para>
-      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>elogind</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd-login</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_session_is_active</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>getsid</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
-      <citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
-      <citerefentry><refentrytitle>systemd-machined.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+      <citerefentry><refentrytitle>elogind.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>elogind-machined.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
     </para>
   </refsect1>
 
index eb20c4494f860ef6c517d834c918f70ffc37572e..20aa92b9646fdc476d76e5abed2a8e514fcf810f 100644 (file)
@@ -3,29 +3,29 @@
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 
 <!--
-  This file is part of systemd.
+  This file is part of elogind.
 
   Copyright 2010 Lennart Poettering
 
-  systemd is free software; you can redistribute it and/or modify it
+  elogind is free software; you can redistribute it and/or modify it
   under the terms of the GNU Lesser General Public License as published by
   the Free Software Foundation; either version 2.1 of the License, or
   (at your option) any later version.
 
-  systemd is distributed in the hope that it will be useful, but
+  elogind is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   Lesser General Public License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+  along with elogind; If not, see <http://www.gnu.org/licenses/>.
 -->
 
 <refentry id="sd_uid_get_state" conditional='HAVE_PAM'>
 
   <refentryinfo>
     <title>sd_uid_get_state</title>
-    <productname>systemd</productname>
+    <productname>elogind</productname>
 
     <authorgroup>
       <author>
@@ -53,7 +53,7 @@
 
   <refsynopsisdiv>
     <funcsynopsis>
-      <funcsynopsisinfo>#include &lt;systemd/sd-login.h&gt;</funcsynopsisinfo>
+      <funcsynopsisinfo>#include &lt;elogind/sd-login.h&gt;</funcsynopsisinfo>
 
       <funcprototype>
         <funcdef>int <function>sd_uid_get_state</function></funcdef>
     entry.</para>
   </refsect1>
 
+  <refsect1>
+    <title>History</title>
+
+    <para><function>sd_uid_get_state()</function>,
+    <function>sd_uid_is_on_seat()</function>,
+    <function>sd_uid_get_sessions()</function>, and
+    <function>sd_uid_get_seats()</function> functions were added in
+    elogind-31.</para>
+
+    <para><function>sd_uid_get_display()</function> was added in
+    elogind-213.</para>
+  </refsect1>
+
   <refsect1>
     <title>See Also</title>
 
     <para>
-      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>elogind</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd-login</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_pid_get_owner_uid</refentrytitle><manvolnum>3</manvolnum></citerefentry>
     </para>
index e857c040d8657db9fa8ed831e16e5f53b512a7f7..2ecec8c904b413db83845d0eec588a9ee3134a87 100644 (file)
@@ -123,6 +123,7 @@ int memfd_get_sealed(int fd) {
 
         return r == (F_SEAL_SHRINK | F_SEAL_GROW | F_SEAL_WRITE | F_SEAL_SEAL);
 }
+#endif // 0
 
 int memfd_get_size(int fd, uint64_t *sz) {
         struct stat stat;
@@ -138,7 +139,6 @@ int memfd_get_size(int fd, uint64_t *sz) {
         *sz = stat.st_size;
         return 0;
 }
-#endif // 0
 
 int memfd_set_size(int fd, uint64_t sz) {
         int r;
index 6b828520e8258a0d771e875cf16e3ca3731dd811..781d1a431bdc1576a8c10c4a8880836a02ebf5bc 100644 (file)
@@ -34,7 +34,7 @@ int memfd_map(int fd, uint64_t offset, size_t size, void **p);
 int memfd_set_sealed(int fd);
 #if 0 /// UNNEEDED by elogind
 int memfd_get_sealed(int fd);
+#endif // 0
 
 int memfd_get_size(int fd, uint64_t *sz);
-#endif // 0
 int memfd_set_size(int fd, uint64_t sz);
index 4bb41786c8b2a27b224ca9b9a0a682bde50e6fb8..e8b18dd16cd620a927e86b60c65ad832f40278aa 100644 (file)
@@ -68,6 +68,12 @@ void siphash24_init(struct siphash *state, const uint8_t k[16]) {
         };
 }
 
+#if 1 /// let's add a diagnostic push to silence -Wimplicit-fallthrough to elogind
+#  ifdef __GNUC__
+#    pragma GCC diagnostic push
+#    pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
+#  endif // __GNUC__
+#endif // 1
 void siphash24_compress(const void *_in, size_t inlen, struct siphash *state) {
 
         const uint8_t *in = _in;
@@ -150,6 +156,11 @@ void siphash24_compress(const void *_in, size_t inlen, struct siphash *state) {
                         break;
         }
 }
+#if 1 /// end diagnostic push in elogind
+#  ifdef __GNUC__
+#    pragma GCC diagnostic pop
+#  endif // __GNUC__
+#endif // 1
 
 uint64_t siphash24_finalize(struct siphash *state) {
         uint64_t b;
index db3a731972bf944b75c526cb96beaf6f4d7114a1..ad192447416f62ad64ae828eb739502796390558 100644 (file)
 
 union sockaddr_union {
         struct sockaddr sa;
-#if 0 /// UNNEEDED by elogind, only 'sa' and 'un' are used in all of elogind.
         struct sockaddr_in in;
         struct sockaddr_in6 in6;
-#endif // 0
         struct sockaddr_un un;
-#if 0 /// UNNEEDED by elogind, only 'sa' and 'un' are used in all of elogind.
+#if 0 /// UNNEEDED by elogind, only 'sa', 'in', 'in6' and 'un' are used in all of elogind.
         struct sockaddr_nl nl;
         struct sockaddr_storage storage;
         struct sockaddr_ll ll;
index 55f6a80bd4c9613f5366f19c81db101fc6db6365..dbd8a320b5044bb653b455ea6ffe876b21b4ee23 100644 (file)
@@ -65,15 +65,15 @@ global:
 
         /* sd-daemon */
         sd_booted;
-        /* sd_is_fifo; */
+        sd_is_fifo;
         /* sd_is_mq; */
         sd_is_socket;
-        /* sd_is_socket_inet; */
-        /* sd_is_socket_unix; */
-        /* sd_is_special; */
+        sd_is_socket_inet;
+        sd_is_socket_unix;
+        sd_is_special;
         /* sd_listen_fds; */
         sd_notify;
-        /* sd_notifyf; */
+        sd_notifyf;
         sd_watchdog_enabled;
 
         /* sd-id128 */
@@ -142,19 +142,16 @@ global:
         sd_uid_get_display;
 } LIBSYSTEMD_211;
 
-/*
- * These methods are not needed by elogind.
- * LIBSYSTEMD_214 {
- * global:
- *         sd_pid_notify;
- *         sd_pid_notifyf;
- * } LIBSYSTEMD_213;
- */
+LIBSYSTEMD_214 {
+global:
+        sd_pid_notify;
+        sd_pid_notifyf;
+} LIBSYSTEMD_213;
 
 LIBSYSTEMD_216 {
 global:
         sd_machine_get_ifindices;
-} LIBSYSTEMD_213;
+} LIBSYSTEMD_214;
 
 LIBSYSTEMD_217 {
 global:
@@ -186,88 +183,88 @@ global:
         sd_bus_new;
         sd_bus_set_address;
         sd_bus_set_fd;
-        /* sd_bus_set_exec; */
-        /* sd_bus_get_address; */
+        sd_bus_set_exec;
+        sd_bus_get_address;
         sd_bus_set_bus_client;
-        /* sd_bus_is_bus_client; */
+        sd_bus_is_bus_client;
         sd_bus_set_server;
-        /* sd_bus_is_server; */
+        sd_bus_is_server;
         sd_bus_set_anonymous;
-        /* sd_bus_is_anonymous; */
-        /* sd_bus_set_trusted; */
-        /* sd_bus_is_trusted; */
-        /* sd_bus_set_monitor; */
-        /* sd_bus_is_monitor; */
-        /* sd_bus_set_description; */
-        /* sd_bus_get_description; */
-        /* sd_bus_negotiate_creds; */
-        /* sd_bus_negotiate_timestamp; */
+        sd_bus_is_anonymous;
+        sd_bus_set_trusted;
+        sd_bus_is_trusted;
+        sd_bus_set_monitor;
+        sd_bus_is_monitor;
+        sd_bus_set_description;
+        sd_bus_get_description;
+        sd_bus_negotiate_creds;
+        sd_bus_negotiate_timestamp;
         sd_bus_negotiate_fds;
         sd_bus_can_send;
-        /* sd_bus_get_creds_mask; */
+        sd_bus_get_creds_mask;
         sd_bus_set_allow_interactive_authorization;
-        /* sd_bus_get_allow_interactive_authorization; */
+        sd_bus_get_allow_interactive_authorization;
         sd_bus_start;
         sd_bus_close;
-        /* sd_bus_try_close; */
+        sd_bus_try_close;
         sd_bus_ref;
         sd_bus_unref;
-        /* sd_bus_is_open; */
-        /* sd_bus_get_bus_id; */
-        /* sd_bus_get_scope; */
-        /* sd_bus_get_tid; */
+        sd_bus_is_open;
+        sd_bus_get_bus_id;
+        sd_bus_get_scope;
+        sd_bus_get_tid;
         sd_bus_get_owner_creds;
         sd_bus_send;
-        /* sd_bus_send_to; */
+        sd_bus_send_to;
         sd_bus_call;
         sd_bus_call_async;
-        /* sd_bus_get_fd; */
+        sd_bus_get_fd;
         sd_bus_get_events;
         sd_bus_get_timeout;
         sd_bus_process;
-        /* sd_bus_process_priority; */
+        sd_bus_process_priority;
         sd_bus_wait;
         sd_bus_flush;
-        /* sd_bus_get_current_slot; */
+        sd_bus_get_current_slot;
         sd_bus_get_current_message;
         sd_bus_get_current_handler;
         sd_bus_get_current_userdata;
         sd_bus_attach_event;
         sd_bus_detach_event;
         sd_bus_get_event;
-        /* sd_bus_add_filter; */
+        sd_bus_add_filter;
         sd_bus_add_match;
         sd_bus_add_object;
         sd_bus_add_fallback;
         sd_bus_add_object_vtable;
         sd_bus_add_fallback_vtable;
         sd_bus_add_node_enumerator;
-        /* sd_bus_add_object_manager; */
+        sd_bus_add_object_manager;
         sd_bus_slot_ref;
         sd_bus_slot_unref;
-        /* sd_bus_slot_get_bus; */
-        /* sd_bus_slot_get_userdata; */
-        /* sd_bus_slot_set_userdata; */
-        /* sd_bus_slot_get_description; */
-        /* sd_bus_slot_set_description; */
-        /* sd_bus_slot_get_current_message; */
-        /* sd_bus_slot_get_current_handler; */
-        /* sd_bus_slot_get_current_userdata; */
+        sd_bus_slot_get_bus;
+        sd_bus_slot_get_userdata;
+        sd_bus_slot_set_userdata;
+        sd_bus_slot_get_description;
+        sd_bus_slot_set_description;
+        sd_bus_slot_get_current_message;
+        sd_bus_slot_get_current_handler;
+        sd_bus_slot_get_current_userdata;
         sd_bus_message_new_signal;
         sd_bus_message_new_method_call;
         sd_bus_message_new_method_return;
         sd_bus_message_new_method_error;
         sd_bus_message_new_method_errorf;
         sd_bus_message_new_method_errno;
-        /* sd_bus_message_new_method_errnof; */
+        sd_bus_message_new_method_errnof;
         sd_bus_message_ref;
         sd_bus_message_unref;
-        /* sd_bus_message_get_type; */
-        /* sd_bus_message_get_cookie; */
-        /* sd_bus_message_get_reply_cookie; */
-        /* sd_bus_message_get_priority; */
-        /* sd_bus_message_get_expect_reply; */
-        /* sd_bus_message_get_auto_start; */
+        sd_bus_message_get_type;
+        sd_bus_message_get_cookie;
+        sd_bus_message_get_reply_cookie;
+        sd_bus_message_get_priority;
+        sd_bus_message_get_expect_reply;
+        sd_bus_message_get_auto_start;
         sd_bus_message_get_allow_interactive_authorization;
         sd_bus_message_get_signature;
         sd_bus_message_get_path;
@@ -277,30 +274,30 @@ global:
         sd_bus_message_get_sender;
         sd_bus_message_get_error;
         sd_bus_message_get_errno;
-        /* sd_bus_message_get_monotonic_usec; */
-        /* sd_bus_message_get_realtime_usec; */
-        /* sd_bus_message_get_seqnum; */
+        sd_bus_message_get_monotonic_usec;
+        sd_bus_message_get_realtime_usec;
+        sd_bus_message_get_seqnum;
         sd_bus_message_get_bus;
         sd_bus_message_get_creds;
         sd_bus_message_is_signal;
         sd_bus_message_is_method_call;
         sd_bus_message_is_method_error;
-        /* sd_bus_message_is_empty; */
-        /* sd_bus_message_has_signature; */
-        /* sd_bus_message_set_expect_reply; */
-        /* sd_bus_message_set_auto_start; */
-        /* sd_bus_message_set_allow_interactive_authorization; */
+        sd_bus_message_is_empty;
+        sd_bus_message_has_signature;
+        sd_bus_message_set_expect_reply;
+        sd_bus_message_set_auto_start;
+        sd_bus_message_set_allow_interactive_authorization;
         sd_bus_message_set_destination;
-        /* sd_bus_message_set_priority; */
+        sd_bus_message_set_priority;
         sd_bus_message_append;
         sd_bus_message_append_basic;
-        /* sd_bus_message_append_array; */
+        sd_bus_message_append_array;
         sd_bus_message_append_array_space;
-        /* sd_bus_message_append_array_iovec; */
-        /* sd_bus_message_append_array_memfd; */
-        /* sd_bus_message_append_string_space; */
-        /* sd_bus_message_append_string_iovec; */
-        /* sd_bus_message_append_string_memfd; */
+        sd_bus_message_append_array_iovec;
+        sd_bus_message_append_array_memfd;
+        sd_bus_message_append_string_space;
+        sd_bus_message_append_string_iovec;
+        sd_bus_message_append_string_memfd;
         sd_bus_message_append_strv;
         sd_bus_message_open_container;
         sd_bus_message_close_container;
@@ -313,27 +310,27 @@ global:
         sd_bus_message_enter_container;
         sd_bus_message_exit_container;
         sd_bus_message_peek_type;
-        /* sd_bus_message_verify_type; */
-        /* sd_bus_message_at_end; */
+        sd_bus_message_verify_type;
+        sd_bus_message_at_end;
         sd_bus_message_rewind;
         sd_bus_get_unique_name;
         sd_bus_request_name;
         sd_bus_release_name;
         sd_bus_list_names;
         sd_bus_get_name_creds;
-        /* sd_bus_get_name_machine_id; */
+        sd_bus_get_name_machine_id;
         sd_bus_call_method;
-        /* sd_bus_call_method_async; */
+        sd_bus_call_method_async;
         sd_bus_get_property;
         sd_bus_get_property_trivial;
         sd_bus_get_property_string;
-        /* sd_bus_get_property_strv; */
-        /* sd_bus_set_property; */
+        sd_bus_get_property_strv;
+        sd_bus_set_property;
         sd_bus_reply_method_return;
         sd_bus_reply_method_error;
         sd_bus_reply_method_errorf;
         sd_bus_reply_method_errno;
-        /* sd_bus_reply_method_errnof; */
+        sd_bus_reply_method_errnof;
         sd_bus_emit_signal;
         sd_bus_emit_properties_changed_strv;
         sd_bus_emit_properties_changed;
@@ -343,28 +340,28 @@ global:
         sd_bus_emit_interfaces_removed;
         sd_bus_query_sender_creds;
         sd_bus_query_sender_privilege;
-        /* sd_bus_creds_new_from_pid; */
+        sd_bus_creds_new_from_pid;
         sd_bus_creds_ref;
         sd_bus_creds_unref;
-        /* sd_bus_creds_get_mask; */
+        sd_bus_creds_get_mask;
         sd_bus_creds_get_augmented_mask;
         sd_bus_creds_get_pid;
-        /* sd_bus_creds_get_ppid; */
+        sd_bus_creds_get_ppid;
         sd_bus_creds_get_tid;
         sd_bus_creds_get_uid;
         sd_bus_creds_get_euid;
-        /* sd_bus_creds_get_suid; */
-        /* sd_bus_creds_get_fsuid; */
-        /* sd_bus_creds_get_gid; */
+        sd_bus_creds_get_suid;
+        sd_bus_creds_get_fsuid;
+        sd_bus_creds_get_gid;
         sd_bus_creds_get_egid;
-        /* sd_bus_creds_get_sgid; */
-        /* sd_bus_creds_get_fsgid; */
-        /* sd_bus_creds_get_supplementary_gids; */
-        /* sd_bus_creds_get_comm; */
-        /* sd_bus_creds_get_tid_comm; */
-        /* sd_bus_creds_get_exe; */
+        sd_bus_creds_get_sgid;
+        sd_bus_creds_get_fsgid;
+        sd_bus_creds_get_supplementary_gids;
+        sd_bus_creds_get_comm;
+        sd_bus_creds_get_tid_comm;
+        sd_bus_creds_get_exe;
         sd_bus_creds_get_cmdline;
-        /* sd_bus_creds_get_cgroup; */
+        sd_bus_creds_get_cgroup;
         /* sd_bus_creds_get_unit; */
         /* sd_bus_creds_get_slice; */
         /* sd_bus_creds_get_user_unit; */
@@ -372,16 +369,16 @@ global:
         sd_bus_creds_get_session;
         sd_bus_creds_get_owner_uid;
         sd_bus_creds_has_effective_cap;
-        /* sd_bus_creds_has_permitted_cap; */
-        /* sd_bus_creds_has_inheritable_cap; */
-        /* sd_bus_creds_has_bounding_cap; */
+        sd_bus_creds_has_permitted_cap;
+        sd_bus_creds_has_inheritable_cap;
+        sd_bus_creds_has_bounding_cap;
         sd_bus_creds_get_selinux_context;
-        /* sd_bus_creds_get_audit_session_id; */
+        sd_bus_creds_get_audit_session_id;
         sd_bus_creds_get_audit_login_uid;
         sd_bus_creds_get_tty;
-        /* sd_bus_creds_get_unique_name; */
-        /* sd_bus_creds_get_well_known_names; */
-        /* sd_bus_creds_get_description; */
+        sd_bus_creds_get_unique_name;
+        sd_bus_creds_get_well_known_names;
+        sd_bus_creds_get_description;
         sd_bus_error_free;
         sd_bus_error_set;
         sd_bus_error_setf;
@@ -394,14 +391,14 @@ global:
         sd_bus_error_is_set;
         sd_bus_error_has_name;
         sd_bus_error_add_map;
-        /* sd_bus_path_encode; */
-        /* sd_bus_path_decode; */
+        sd_bus_path_encode;
+        sd_bus_path_decode;
         sd_bus_track_new;
         sd_bus_track_ref;
         sd_bus_track_unref;
         sd_bus_track_get_bus;
-        /* sd_bus_track_get_userdata; */
-        /* sd_bus_track_set_userdata; */
+        sd_bus_track_get_userdata;
+        sd_bus_track_set_userdata;
         sd_bus_track_add_sender;
         sd_bus_track_remove_sender;
         sd_bus_track_add_name;
@@ -430,44 +427,44 @@ global:
         sd_event_loop;
         sd_event_exit;
         sd_event_now;
-        /* sd_event_get_fd; */
+        sd_event_get_fd;
         sd_event_get_state;
-        /* sd_event_get_tid; */
-        /* sd_event_get_exit_code; */
+        sd_event_get_tid;
+        sd_event_get_exit_code;
         sd_event_set_watchdog;
-        /* sd_event_get_watchdog; */
-        /* sd_event_source_ref; */
+        sd_event_get_watchdog;
+        sd_event_source_ref;
         sd_event_source_unref;
         sd_event_source_get_event;
-        /* sd_event_source_get_userdata; */
-        /* sd_event_source_set_userdata; */
+        sd_event_source_get_userdata;
+        sd_event_source_set_userdata;
         sd_event_source_set_description;
-        /* sd_event_source_get_description; */
+        sd_event_source_get_description;
         sd_event_source_set_prepare;
-        /* sd_event_source_get_pending; */
+        sd_event_source_get_pending;
         sd_event_source_get_priority;
         sd_event_source_set_priority;
-        /* sd_event_source_get_enabled; */
+        sd_event_source_get_enabled;
         sd_event_source_set_enabled;
-        /* sd_event_source_get_io_fd; */
+        sd_event_source_get_io_fd;
         sd_event_source_set_io_fd;
-        /* sd_event_source_get_io_events; */
+        sd_event_source_get_io_events;
         sd_event_source_set_io_events;
-        /* sd_event_source_get_io_revents; */
+        sd_event_source_get_io_revents;
         sd_event_source_get_time;
         sd_event_source_set_time;
-        /* sd_event_source_set_time_accuracy; */
-        /* sd_event_source_get_time_accuracy; */
-        /* sd_event_source_get_time_clock; */
-        /* sd_event_source_get_signal; */
-        /* sd_event_source_get_child_pid; */
+        sd_event_source_set_time_accuracy;
+        sd_event_source_get_time_accuracy;
+        sd_event_source_get_time_clock;
+        sd_event_source_get_signal;
+        sd_event_source_get_child_pid;
 } LIBSYSTEMD_220;
 
 LIBSYSTEMD_222 {
 global:
         /* sd-bus */
         sd_bus_emit_object_added;
-        /* sd_bus_emit_object_removed; */
+        sd_bus_emit_object_removed;
         sd_bus_flush_close_unref;
 } LIBSYSTEMD_221;
 
@@ -479,10 +476,10 @@ global:
 
 LIBSYSTEMD_227 {
 global:
-        /* sd_bus_default_flush_close; */
-        /* sd_bus_path_decode_many; */
-        /* sd_bus_path_encode_many; */
-        sd_listen_fds_with_names;
+        sd_bus_default_flush_close;
+        sd_bus_path_decode_many;
+        sd_bus_path_encode_many;
+        /* sd_listen_fds_with_names; */
 } LIBSYSTEMD_226;
 
 /*
@@ -512,12 +509,12 @@ global:
 
 LIBSYSTEMD_232 {
 global:
-        /* sd_bus_track_set_recursive; */
-        /* sd_bus_track_get_recursive; */
-        /* sd_bus_track_count_name; */
-        /* sd_bus_track_count_sender; */
+        sd_bus_track_set_recursive;
+        sd_bus_track_get_recursive;
+        sd_bus_track_count_name;
+        sd_bus_track_count_sender;
         sd_bus_set_exit_on_disconnect;
-        /* sd_bus_get_exit_on_disconnect; */
+        sd_bus_get_exit_on_disconnect;
         sd_id128_get_invocation;
 } LIBSYSTEMD_231;
 
index 313a44b536709b465522172021ab5426bf035cd9..b56bb07713ccb990301fdcfd6aade7ef6e58efcd 100644 (file)
@@ -1678,7 +1678,6 @@ int bus_remove_match_internal(
                 return bus_remove_match_internal_dbus1(bus, match);
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_get_name_machine_id(sd_bus *bus, const char *name, sd_id128_t *machine) {
         _cleanup_(sd_bus_message_unrefp) sd_bus_message *reply = NULL, *m = NULL;
         const char *mid;
@@ -1723,4 +1722,3 @@ _public_ int sd_bus_get_name_machine_id(sd_bus *bus, const char *name, sd_id128_
 
         return sd_id128_from_string(mid, machine);
 }
-#endif // 0
index 1eb7264621ac2db84f22c55b116f817299a0c494..04158cae4d3ccfc718a00b403f926e5140e0f1db 100644 (file)
@@ -57,7 +57,6 @@ _public_ int sd_bus_emit_signal(
         return sd_bus_send(bus, m, NULL);
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_call_method_async(
                 sd_bus *bus,
                 sd_bus_slot **slot,
@@ -94,7 +93,6 @@ _public_ int sd_bus_call_method_async(
 
         return sd_bus_call_async(bus, slot, m, callback, userdata, 0);
 }
-#endif // 0
 
 _public_ int sd_bus_call_method(
                 sd_bus *bus,
@@ -255,7 +253,6 @@ _public_ int sd_bus_reply_method_errno(
         return sd_bus_reply_method_error(call, &berror);
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_reply_method_errnof(
                 sd_bus_message *call,
                 int error,
@@ -283,7 +280,6 @@ _public_ int sd_bus_reply_method_errnof(
 
         return sd_bus_reply_method_error(call, &berror);
 }
-#endif // 0
 
 _public_ int sd_bus_get_property(
                 sd_bus *bus,
@@ -419,7 +415,6 @@ fail:
         return sd_bus_error_set_errno(error, r);
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_get_property_strv(
                 sd_bus *bus,
                 const char *destination,
@@ -512,7 +507,6 @@ _public_ int sd_bus_set_property(
 fail:
         return sd_bus_error_set_errno(error, r);
 }
-#endif // 0
 
 _public_ int sd_bus_query_sender_creds(sd_bus_message *call, uint64_t mask, sd_bus_creds **creds) {
         sd_bus_creds *c;
index 3cb996171ec78d529a286e44edcd57a565fb69cc..d52bbff840c1dca09b4be20e1ddea55b1107a61f 100644 (file)
@@ -132,13 +132,11 @@ _public_ sd_bus_creds *sd_bus_creds_unref(sd_bus_creds *c) {
         return NULL;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ uint64_t sd_bus_creds_get_mask(const sd_bus_creds *c) {
         assert_return(c, 0);
 
         return c->mask;
 }
-#endif // 0
 
 _public_ uint64_t sd_bus_creds_get_augmented_mask(const sd_bus_creds *c) {
         assert_return(c, 0);
@@ -158,7 +156,6 @@ sd_bus_creds* bus_creds_new(void) {
         return c;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_creds_new_from_pid(sd_bus_creds **ret, pid_t pid, uint64_t mask) {
         sd_bus_creds *c;
         int r;
@@ -190,7 +187,6 @@ _public_ int sd_bus_creds_new_from_pid(sd_bus_creds **ret, pid_t pid, uint64_t m
         *ret = c;
         return 0;
 }
-#endif // 0
 
 _public_ int sd_bus_creds_get_uid(sd_bus_creds *c, uid_t *uid) {
         assert_return(c, -EINVAL);
@@ -214,7 +210,6 @@ _public_ int sd_bus_creds_get_euid(sd_bus_creds *c, uid_t *euid) {
         return 0;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_creds_get_suid(sd_bus_creds *c, uid_t *suid) {
         assert_return(c, -EINVAL);
         assert_return(suid, -EINVAL);
@@ -248,7 +243,6 @@ _public_ int sd_bus_creds_get_gid(sd_bus_creds *c, gid_t *gid) {
         *gid = c->gid;
         return 0;
 }
-#endif // 0
 
 _public_ int sd_bus_creds_get_egid(sd_bus_creds *c, gid_t *egid) {
         assert_return(c, -EINVAL);
@@ -261,7 +255,6 @@ _public_ int sd_bus_creds_get_egid(sd_bus_creds *c, gid_t *egid) {
         return 0;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_creds_get_sgid(sd_bus_creds *c, gid_t *sgid) {
         assert_return(c, -EINVAL);
         assert_return(sgid, -EINVAL);
@@ -294,7 +287,6 @@ _public_ int sd_bus_creds_get_supplementary_gids(sd_bus_creds *c, const gid_t **
         *gids = c->supplementary_gids;
         return (int) c->n_supplementary_gids;
 }
-#endif // 0
 
 _public_ int sd_bus_creds_get_pid(sd_bus_creds *c, pid_t *pid) {
         assert_return(c, -EINVAL);
@@ -308,7 +300,6 @@ _public_ int sd_bus_creds_get_pid(sd_bus_creds *c, pid_t *pid) {
         return 0;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_creds_get_ppid(sd_bus_creds *c, pid_t *ppid) {
         assert_return(c, -EINVAL);
         assert_return(ppid, -EINVAL);
@@ -325,7 +316,6 @@ _public_ int sd_bus_creds_get_ppid(sd_bus_creds *c, pid_t *ppid) {
         *ppid = c->ppid;
         return 0;
 }
-#endif // 0
 
 _public_ int sd_bus_creds_get_tid(sd_bus_creds *c, pid_t *tid) {
         assert_return(c, -EINVAL);
@@ -350,7 +340,6 @@ _public_ int sd_bus_creds_get_selinux_context(sd_bus_creds *c, const char **ret)
         return 0;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_creds_get_comm(sd_bus_creds *c, const char **ret) {
         assert_return(c, -EINVAL);
         assert_return(ret, -EINVAL);
@@ -401,6 +390,7 @@ _public_ int sd_bus_creds_get_cgroup(sd_bus_creds *c, const char **ret) {
         return 0;
 }
 
+#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_creds_get_unit(sd_bus_creds *c, const char **ret) {
         int r;
 
@@ -625,7 +615,6 @@ _public_ int sd_bus_creds_get_tty(sd_bus_creds *c, const char **ret) {
         return 0;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_creds_get_unique_name(sd_bus_creds *c, const char **unique_name) {
         assert_return(c, -EINVAL);
         assert_return(unique_name, -EINVAL);
@@ -688,7 +677,6 @@ _public_ int sd_bus_creds_get_description(sd_bus_creds *c, const char **ret) {
         *ret = c->unescaped_description;
         return 0;
 }
-#endif // 0
 
 static int has_cap(sd_bus_creds *c, unsigned offset, int capability) {
         size_t sz;
@@ -715,7 +703,6 @@ _public_ int sd_bus_creds_has_effective_cap(sd_bus_creds *c, int capability) {
         return has_cap(c, CAP_OFFSET_EFFECTIVE, capability);
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_creds_has_permitted_cap(sd_bus_creds *c, int capability) {
         assert_return(c, -EINVAL);
         assert_return(capability >= 0, -EINVAL);
@@ -745,7 +732,6 @@ _public_ int sd_bus_creds_has_bounding_cap(sd_bus_creds *c, int capability) {
 
         return has_cap(c, CAP_OFFSET_BOUNDING, capability);
 }
-#endif // 0
 
 static int parse_caps(sd_bus_creds *c, unsigned offset, const char *p) {
         size_t sz, max;
index cbe9c6259cc21236cdf0dc0cbe5b2c1b13bb2c8d..a9853e326558f8b50af6c99175255ca8d4cb4f6f 100644 (file)
@@ -829,7 +829,6 @@ _public_ int sd_bus_message_new_method_errno(
         return sd_bus_message_new_method_error(call, m, &berror);
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_message_new_method_errnof(
                 sd_bus_message *call,
                 sd_bus_message **m,
@@ -846,7 +845,6 @@ _public_ int sd_bus_message_new_method_errnof(
 
         return sd_bus_message_new_method_error(call, m, &berror);
 }
-#endif // 0
 
 void bus_message_set_sender_local(sd_bus *bus, sd_bus_message *m) {
         assert(bus);
@@ -944,7 +942,6 @@ _public_ sd_bus_message* sd_bus_message_unref(sd_bus_message *m) {
         return NULL;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_message_get_type(sd_bus_message *m, uint8_t *type) {
         assert_return(m, -EINVAL);
         assert_return(type, -EINVAL);
@@ -990,7 +987,6 @@ _public_ int sd_bus_message_get_auto_start(sd_bus_message *m) {
 
         return !(m->header->flags & BUS_MESSAGE_NO_AUTO_START);
 }
-#endif // 0
 
 _public_ int sd_bus_message_get_allow_interactive_authorization(sd_bus_message *m) {
         assert_return(m, -EINVAL);
@@ -1038,7 +1034,6 @@ _public_ const sd_bus_error *sd_bus_message_get_error(sd_bus_message *m) {
         return &m->error;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_message_get_monotonic_usec(sd_bus_message *m, uint64_t *usec) {
         assert_return(m, -EINVAL);
         assert_return(usec, -EINVAL);
@@ -1071,7 +1066,6 @@ _public_ int sd_bus_message_get_seqnum(sd_bus_message *m, uint64_t *seqnum) {
         *seqnum = m->seqnum;
         return 0;
 }
-#endif // 0
 
 _public_ sd_bus_creds *sd_bus_message_get_creds(sd_bus_message *m) {
         assert_return(m, NULL);
@@ -1132,7 +1126,6 @@ _public_ int sd_bus_message_is_method_error(sd_bus_message *m, const char *name)
         return 1;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_message_set_expect_reply(sd_bus_message *m, int b) {
         assert_return(m, -EINVAL);
         assert_return(!m->sealed, -EPERM);
@@ -1160,7 +1153,6 @@ _public_ int sd_bus_message_set_allow_interactive_authorization(sd_bus_message *
 
         return 0;
 }
-#endif // 0
 
 static struct bus_container *message_get_container(sd_bus_message *m) {
         assert(m);
@@ -1655,7 +1647,6 @@ _public_ int sd_bus_message_append_basic(sd_bus_message *m, char type, const voi
         return message_append_basic(m, type, p, NULL);
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_message_append_string_space(
                 sd_bus_message *m,
                 size_t size,
@@ -1746,7 +1737,6 @@ _public_ int sd_bus_message_append_string_iovec(
 
         return 0;
 }
-#endif // 0
 
 static int bus_message_open_array(
                 sd_bus_message *m,
@@ -2614,7 +2604,6 @@ _public_ int sd_bus_message_append_array_space(
         return 0;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_message_append_array(
                 sd_bus_message *m,
                 char type,
@@ -2848,7 +2837,6 @@ _public_ int sd_bus_message_append_string_memfd(
 
         return 0;
 }
-#endif // 0
 
 _public_ int sd_bus_message_append_strv(sd_bus_message *m, char **l) {
         char **i;
@@ -3149,7 +3137,6 @@ static bool message_end_of_array(sd_bus_message *m, size_t index) {
         }
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_message_at_end(sd_bus_message *m, int complete) {
         assert_return(m, -EINVAL);
         assert_return(m->sealed, -EPERM);
@@ -3165,7 +3152,6 @@ _public_ int sd_bus_message_at_end(sd_bus_message *m, int complete) {
 
         return false;
 }
-#endif // 0
 
 static struct bus_body_part* find_part(sd_bus_message *m, size_t index, size_t sz, void **p) {
         struct bus_body_part *part;
@@ -5721,7 +5707,6 @@ _public_ const char* sd_bus_message_get_signature(sd_bus_message *m, int complet
         return strempty(c->signature);
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_message_is_empty(sd_bus_message *m) {
         assert_return(m, -EINVAL);
 
@@ -5733,7 +5718,6 @@ _public_ int sd_bus_message_has_signature(sd_bus_message *m, const char *signatu
 
         return streq(strempty(m->root_container.signature), strempty(signature));
 }
-#endif // 0
 
 _public_ int sd_bus_message_copy(sd_bus_message *m, sd_bus_message *source, int all) {
         bool done_something = false;
@@ -5814,7 +5798,6 @@ _public_ int sd_bus_message_copy(sd_bus_message *m, sd_bus_message *source, int
         return done_something;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_message_verify_type(sd_bus_message *m, char type, const char *contents) {
         const char *c;
         char t;
@@ -5839,7 +5822,6 @@ _public_ int sd_bus_message_verify_type(sd_bus_message *m, char type, const char
 
         return 1;
 }
-#endif // 0
 
 _public_ sd_bus *sd_bus_message_get_bus(sd_bus_message *m) {
         assert_return(m, NULL);
@@ -5942,6 +5924,7 @@ int bus_message_append_sender(sd_bus_message *m, const char *sender) {
 
         return message_append_field_string(m, BUS_MESSAGE_HEADER_SENDER, SD_BUS_TYPE_STRING, sender, &m->sender);
 }
+#endif // 0
 
 _public_ int sd_bus_message_get_priority(sd_bus_message *m, int64_t *priority) {
         assert_return(m, -EINVAL);
@@ -5958,4 +5941,3 @@ _public_ int sd_bus_message_set_priority(sd_bus_message *m, int64_t priority) {
         m->priority = priority;
         return 0;
 }
-#endif // 0
index f2fb43e4bc99da75a5e2c311cfde0420f3dfb08d..98911d520366004e04bedeffec522e65d1199363 100644 (file)
@@ -2381,7 +2381,6 @@ _public_ int sd_bus_emit_object_added(sd_bus *bus, const char *path) {
         return sd_bus_send(bus, m, NULL);
 }
 
-#if 0 /// UNNEEDED by elogind
 static int object_removed_append_all_prefix(
                 sd_bus *bus,
                 sd_bus_message *m,
@@ -2551,7 +2550,6 @@ _public_ int sd_bus_emit_object_removed(sd_bus *bus, const char *path) {
 
         return sd_bus_send(bus, m, NULL);
 }
-#endif // 0
 
 static int interfaces_added_append_one_prefix(
                 sd_bus *bus,
@@ -2790,7 +2788,6 @@ _public_ int sd_bus_emit_interfaces_removed(sd_bus *bus, const char *path, const
         return sd_bus_emit_interfaces_removed_strv(bus, path, interfaces);
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_add_object_manager(sd_bus *bus, sd_bus_slot **slot, const char *path) {
         sd_bus_slot *s;
         struct node *n;
@@ -2825,4 +2822,3 @@ fail:
 
         return r;
 }
-#endif // 0
index cd5e9767470906d25ee7f37e93f344e508616f53..33590c31ac78764e23fc6da859ba97c92d77c194 100644 (file)
@@ -215,7 +215,6 @@ _public_ sd_bus_slot* sd_bus_slot_unref(sd_bus_slot *slot) {
         return mfree(slot);
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ sd_bus* sd_bus_slot_get_bus(sd_bus_slot *slot) {
         assert_return(slot, NULL);
 
@@ -283,4 +282,3 @@ _public_ int sd_bus_slot_get_description(sd_bus_slot *slot, const char **descrip
         *description = slot->description;
         return 0;
 }
-#endif // 0
index 9714da690f6ee88fb5345b476651b4c11448929b..4acaf247938167419c96a9d361c20a0f5a10f566 100644 (file)
@@ -455,7 +455,6 @@ void bus_track_close(sd_bus_track *track) {
                 bus_track_dispatch(track);
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ void *sd_bus_track_get_userdata(sd_bus_track *track) {
         assert_return(track, NULL);
 
@@ -524,4 +523,3 @@ _public_ int sd_bus_track_count_name(sd_bus_track *track, const char *name) {
 
         return i->n_ref;
 }
-#endif // 0
index 5df358f5a069356969f1a2945cd3d0d97edac41a..fda12a38486e53b58442f630604d449068e4898d 100644 (file)
@@ -234,7 +234,6 @@ _public_ int sd_bus_set_fd(sd_bus *bus, int input_fd, int output_fd) {
         return 0;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_set_exec(sd_bus *bus, const char *path, char *const argv[]) {
         char *p, **a;
 
@@ -262,7 +261,6 @@ _public_ int sd_bus_set_exec(sd_bus *bus, const char *path, char *const argv[])
 
         return 0;
 }
-#endif // 0
 
 _public_ int sd_bus_set_bus_client(sd_bus *bus, int b) {
         assert_return(bus, -EINVAL);
@@ -273,7 +271,6 @@ _public_ int sd_bus_set_bus_client(sd_bus *bus, int b) {
         return 0;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_set_monitor(sd_bus *bus, int b) {
         assert_return(bus, -EINVAL);
         assert_return(bus->state == BUS_UNSET, -EPERM);
@@ -282,7 +279,6 @@ _public_ int sd_bus_set_monitor(sd_bus *bus, int b) {
         SET_FLAG(bus->hello_flags, KDBUS_HELLO_MONITOR, b);
         return 0;
 }
-#endif // 0
 
 _public_ int sd_bus_negotiate_fds(sd_bus *bus, int b) {
         assert_return(bus, -EINVAL);
@@ -293,7 +289,6 @@ _public_ int sd_bus_negotiate_fds(sd_bus *bus, int b) {
         return 0;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_negotiate_timestamp(sd_bus *bus, int b) {
         uint64_t new_flags;
         assert_return(bus, -EINVAL);
@@ -337,7 +332,6 @@ _public_ int sd_bus_negotiate_creds(sd_bus *bus, int b, uint64_t mask) {
 
         return 0;
 }
-#endif // 0
 
 _public_ int sd_bus_set_server(sd_bus *bus, int b, sd_id128_t server_id) {
         assert_return(bus, -EINVAL);
@@ -359,7 +353,6 @@ _public_ int sd_bus_set_anonymous(sd_bus *bus, int b) {
         return 0;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_set_trusted(sd_bus *bus, int b) {
         assert_return(bus, -EINVAL);
         assert_return(bus->state == BUS_UNSET, -EPERM);
@@ -376,7 +369,6 @@ _public_ int sd_bus_set_description(sd_bus *bus, const char *description) {
 
         return free_and_strdup(&bus->description, description);
 }
-#endif // 0
 
 _public_ int sd_bus_set_allow_interactive_authorization(sd_bus *bus, int b) {
         assert_return(bus, -EINVAL);
@@ -386,14 +378,12 @@ _public_ int sd_bus_set_allow_interactive_authorization(sd_bus *bus, int b) {
         return 0;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_get_allow_interactive_authorization(sd_bus *bus) {
         assert_return(bus, -EINVAL);
         assert_return(!bus_pid_changed(bus), -ECHILD);
 
         return bus->allow_interactive_authorization;
 }
-#endif // 0
 
 static int hello_callback(sd_bus_message *reply, void *userdata, sd_bus_error *error) {
         const char *s;
@@ -1538,7 +1528,6 @@ _public_ sd_bus *sd_bus_unref(sd_bus *bus) {
         return NULL;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_is_open(sd_bus *bus) {
 
         assert_return(bus, -EINVAL);
@@ -1546,7 +1535,6 @@ _public_ int sd_bus_is_open(sd_bus *bus) {
 
         return BUS_IS_OPEN(bus->state);
 }
-#endif // 0
 
 _public_ int sd_bus_can_send(sd_bus *bus, char type) {
         int r;
@@ -1572,7 +1560,6 @@ _public_ int sd_bus_can_send(sd_bus *bus, char type) {
         return bus_type_is_valid(type);
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_get_bus_id(sd_bus *bus, sd_id128_t *id) {
         int r;
 
@@ -1587,7 +1574,6 @@ _public_ int sd_bus_get_bus_id(sd_bus *bus, sd_id128_t *id) {
         *id = bus->server_id;
         return 0;
 }
-#endif // 0
 
 static int bus_seal_message(sd_bus *b, sd_bus_message *m, usec_t timeout) {
         assert(b);
@@ -1864,7 +1850,6 @@ _public_ int sd_bus_send(sd_bus *bus, sd_bus_message *m, uint64_t *cookie) {
         return bus_send_internal(bus, m, cookie, false);
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_send_to(sd_bus *bus, sd_bus_message *m, const char *destination, uint64_t *cookie) {
         int r;
 
@@ -1890,7 +1875,6 @@ _public_ int sd_bus_send_to(sd_bus *bus, sd_bus_message *m, const char *destinat
 
         return sd_bus_send(bus, m, cookie);
 }
-#endif // 0
 
 static usec_t calc_elapse(uint64_t usec) {
         if (usec == (uint64_t) -1)
@@ -2175,7 +2159,6 @@ fail:
         return sd_bus_error_set_errno(error, r);
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_get_fd(sd_bus *bus) {
 
         assert_return(bus, -EINVAL);
@@ -2184,7 +2167,6 @@ _public_ int sd_bus_get_fd(sd_bus *bus) {
 
         return bus->input_fd;
 }
-#endif // 0
 
 _public_ int sd_bus_get_events(sd_bus *bus) {
         int flags = 0;
@@ -2903,11 +2885,9 @@ _public_ int sd_bus_process(sd_bus *bus, sd_bus_message **ret) {
         return bus_process_internal(bus, false, 0, ret);
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_process_priority(sd_bus *bus, int64_t priority, sd_bus_message **ret) {
         return bus_process_internal(bus, true, priority, ret);
 }
-#endif // 0
 
 static int bus_poll(sd_bus *bus, bool need_more, uint64_t timeout_usec) {
         struct pollfd p[2] = {};
@@ -3024,7 +3004,6 @@ _public_ int sd_bus_flush(sd_bus *bus) {
         }
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_add_filter(
                 sd_bus *bus,
                 sd_bus_slot **slot,
@@ -3051,7 +3030,6 @@ _public_ int sd_bus_add_filter(
 
         return 0;
 }
-#endif // 0
 
 _public_ int sd_bus_add_match(
                 sd_bus *bus,
@@ -3405,13 +3383,11 @@ _public_ sd_bus_message* sd_bus_get_current_message(sd_bus *bus) {
         return bus->current_message;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ sd_bus_slot* sd_bus_get_current_slot(sd_bus *bus) {
         assert_return(bus, NULL);
 
         return bus->current_slot;
 }
-#endif // 0
 
 _public_ sd_bus_message_handler_t sd_bus_get_current_handler(sd_bus *bus) {
         assert_return(bus, NULL);
@@ -3505,7 +3481,6 @@ _public_ int sd_bus_default(sd_bus **ret) {
                 return sd_bus_default_system(ret);
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_get_tid(sd_bus *b, pid_t *tid) {
         assert_return(b, -EINVAL);
         assert_return(tid, -EINVAL);
@@ -3764,7 +3739,6 @@ _public_ int sd_bus_get_description(sd_bus *bus, const char **description) {
         *description = bus->description;
         return 0;
 }
-#endif // 0
 
 int bus_get_root_path(sd_bus *bus) {
         int r;
@@ -3784,7 +3758,6 @@ int bus_get_root_path(sd_bus *bus) {
         return r;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_get_scope(sd_bus *bus, const char **scope) {
         int r;
 
@@ -3896,10 +3869,11 @@ static void flush_close(sd_bus *bus) {
 
 _public_ void sd_bus_default_flush_close(void) {
         flush_close(default_starter_bus);
+#if 0 /// There is no user bus with elogind
         flush_close(default_user_bus);
+#endif // 0
         flush_close(default_system_bus);
 }
-#endif // 0
 
 _public_ int sd_bus_set_exit_on_disconnect(sd_bus *bus, int b) {
         assert_return(bus, -EINVAL);
@@ -3913,10 +3887,8 @@ _public_ int sd_bus_set_exit_on_disconnect(sd_bus *bus, int b) {
         return bus_exit_now(bus);
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_bus_get_exit_on_disconnect(sd_bus *bus) {
         assert_return(bus, -EINVAL);
 
         return bus->exit_on_disconnect;
 }
-#endif // 0
index e5830245814005e05b235360454183d02b5178e5..160bfa7c5d47c19811001e1165e3f2cf56d60a2d 100644 (file)
@@ -44,6 +44,7 @@
 
 #define SNDBUF_SIZE (8*1024*1024)
 
+#if 0 /// UNNEEDED by elogind
 static void unsetenv_all(bool unset_environment) {
 
         if (!unset_environment)
@@ -144,8 +145,8 @@ _public_ int sd_listen_fds_with_names(int unset_environment, char ***names) {
 
         return n_fds;
 }
+#endif // 0
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_is_fifo(int fd, const char *path) {
         struct stat st_fd;
 
@@ -210,7 +211,6 @@ _public_ int sd_is_special(int fd, const char *path) {
 
         return 1;
 }
-#endif // 0
 
 static int sd_is_socket_internal(int fd, int type, int listening) {
         struct stat st_fd;
@@ -281,7 +281,6 @@ _public_ int sd_is_socket(int fd, int family, int type, int listening) {
         return 1;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_is_socket_inet(int fd, int family, int type, int listening, uint16_t port) {
         union sockaddr_union sockaddr = {};
         socklen_t l = sizeof(sockaddr);
@@ -325,6 +324,7 @@ _public_ int sd_is_socket_inet(int fd, int family, int type, int listening, uint
         return 1;
 }
 
+#if 0 /// UNNEEDED by elogind
 _public_ int sd_is_socket_sockaddr(int fd, int type, const struct sockaddr* addr, unsigned addr_len, int listening) {
         union sockaddr_union sockaddr = {};
         socklen_t l = sizeof(sockaddr);
@@ -382,6 +382,7 @@ _public_ int sd_is_socket_sockaddr(int fd, int type, const struct sockaddr* addr
                               sizeof(in->sin6_addr.s6_addr)) == 0;
         }
 }
+#endif // 0
 
 _public_ int sd_is_socket_unix(int fd, int type, int listening, const char *path, size_t length) {
         union sockaddr_union sockaddr = {};
@@ -426,6 +427,7 @@ _public_ int sd_is_socket_unix(int fd, int type, int listening, const char *path
         return 1;
 }
 
+#if 0 /// UNNEEDED by elogind
 _public_ int sd_is_mq(int fd, const char *path) {
         struct mq_attr attr;
 
@@ -585,17 +587,14 @@ finish:
         return r;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_pid_notify(pid_t pid, int unset_environment, const char *state) {
         return sd_pid_notify_with_fds(pid, unset_environment, state, NULL, 0);
 }
-#endif // 0
 
 _public_ int sd_notify(int unset_environment, const char *state) {
         return sd_pid_notify_with_fds(0, unset_environment, state, NULL, 0);
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_pid_notifyf(pid_t pid, int unset_environment, const char *format, ...) {
         _cleanup_free_ char *p = NULL;
         int r;
@@ -631,14 +630,17 @@ _public_ int sd_notifyf(int unset_environment, const char *format, ...) {
 
         return sd_pid_notify(0, unset_environment, p);
 }
-#endif // 0
 
 _public_ int sd_booted(void) {
+#if 0 /// With elogind, the system is (should never be) booted by systemd
         /* We test whether the runtime unit file directory has been
          * created. This takes place in mount-setup.c, so is
          * guaranteed to happen very early during boot. */
 
         return laccess("/run/systemd/system/", F_OK) >= 0;
+#else
+        return 0;
+#endif // 0
 }
 
 _public_ int sd_watchdog_enabled(int unset_environment, uint64_t *usec) {
index 0f7a0ca7be2bde153730fba22772fb88b6e4216c..b4686d0065b1a943312735bf11f15b4d6b0ebac0 100644 (file)
@@ -546,7 +546,6 @@ static int source_io_register(
         return 0;
 }
 
-#if 0 /// UNNEEDED by elogind
 static clockid_t event_source_type_to_clock(EventSourceType t) {
 
         switch (t) {
@@ -570,7 +569,6 @@ static clockid_t event_source_type_to_clock(EventSourceType t) {
                 return (clockid_t) -1;
         }
 }
-#endif // 0
 
 static EventSourceType clock_to_event_source_type(clockid_t clock) {
 
@@ -1366,7 +1364,6 @@ _public_ int sd_event_add_exit(
         return 0;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ sd_event_source* sd_event_source_ref(sd_event_source *s) {
 
         if (!s)
@@ -1377,7 +1374,6 @@ _public_ sd_event_source* sd_event_source_ref(sd_event_source *s) {
 
         return s;
 }
-#endif // 0
 
 _public_ sd_event_source* sd_event_source_unref(sd_event_source *s) {
 
@@ -1415,7 +1411,6 @@ _public_ int sd_event_source_set_description(sd_event_source *s, const char *des
         return free_and_strdup(&s->description, description);
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_event_source_get_description(sd_event_source *s, const char **description) {
         assert_return(s, -EINVAL);
         assert_return(description, -EINVAL);
@@ -1425,7 +1420,6 @@ _public_ int sd_event_source_get_description(sd_event_source *s, const char **de
         *description = s->description;
         return 0;
 }
-#endif // 0
 
 _public_ sd_event *sd_event_source_get_event(sd_event_source *s) {
         assert_return(s, NULL);
@@ -1433,7 +1427,6 @@ _public_ sd_event *sd_event_source_get_event(sd_event_source *s) {
         return s->event;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_event_source_get_pending(sd_event_source *s) {
         assert_return(s, -EINVAL);
         assert_return(s->type != SOURCE_EXIT, -EDOM);
@@ -1450,7 +1443,6 @@ _public_ int sd_event_source_get_io_fd(sd_event_source *s) {
 
         return s->io.fd;
 }
-#endif // 0
 
 _public_ int sd_event_source_set_io_fd(sd_event_source *s, int fd) {
         int r;
@@ -1488,7 +1480,6 @@ _public_ int sd_event_source_set_io_fd(sd_event_source *s, int fd) {
         return 0;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_event_source_get_io_events(sd_event_source *s, uint32_t* events) {
         assert_return(s, -EINVAL);
         assert_return(events, -EINVAL);
@@ -1498,7 +1489,6 @@ _public_ int sd_event_source_get_io_events(sd_event_source *s, uint32_t* events)
         *events = s->io.events;
         return 0;
 }
-#endif // 0
 
 _public_ int sd_event_source_set_io_events(sd_event_source *s, uint32_t events) {
         int r;
@@ -1525,7 +1515,6 @@ _public_ int sd_event_source_set_io_events(sd_event_source *s, uint32_t events)
         return 0;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_event_source_get_io_revents(sd_event_source *s, uint32_t* revents) {
         assert_return(s, -EINVAL);
         assert_return(revents, -EINVAL);
@@ -1544,7 +1533,6 @@ _public_ int sd_event_source_get_signal(sd_event_source *s) {
 
         return s->signal.sig;
 }
-#endif // 0
 
 _public_ int sd_event_source_get_priority(sd_event_source *s, int64_t *priority) {
         assert_return(s, -EINVAL);
@@ -1596,7 +1584,6 @@ _public_ int sd_event_source_set_priority(sd_event_source *s, int64_t priority)
         return 0;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_event_source_get_enabled(sd_event_source *s, int *m) {
         assert_return(s, -EINVAL);
         assert_return(m, -EINVAL);
@@ -1605,7 +1592,6 @@ _public_ int sd_event_source_get_enabled(sd_event_source *s, int *m) {
         *m = s->enabled;
         return 0;
 }
-#endif // 0
 
 _public_ int sd_event_source_set_enabled(sd_event_source *s, int m) {
         int r;
@@ -1791,7 +1777,6 @@ _public_ int sd_event_source_set_time(sd_event_source *s, uint64_t usec) {
         return 0;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_event_source_get_time_accuracy(sd_event_source *s, uint64_t *usec) {
         assert_return(s, -EINVAL);
         assert_return(usec, -EINVAL);
@@ -1846,7 +1831,6 @@ _public_ int sd_event_source_get_child_pid(sd_event_source *s, pid_t *pid) {
         *pid = s->child.pid;
         return 0;
 }
-#endif // 0
 
 _public_ int sd_event_source_set_prepare(sd_event_source *s, sd_event_handler_t callback) {
         int r;
@@ -1880,7 +1864,6 @@ _public_ int sd_event_source_set_prepare(sd_event_source *s, sd_event_handler_t
         return 0;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ void* sd_event_source_get_userdata(sd_event_source *s) {
         assert_return(s, NULL);
 
@@ -1897,7 +1880,6 @@ _public_ void *sd_event_source_set_userdata(sd_event_source *s, void *userdata)
 
         return ret;
 }
-#endif // 0
 
 static usec_t sleep_between(sd_event *e, usec_t a, usec_t b) {
         usec_t c;
@@ -2737,7 +2719,6 @@ finish:
         return r;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_event_get_fd(sd_event *e) {
 
         assert_return(e, -EINVAL);
@@ -2745,7 +2726,6 @@ _public_ int sd_event_get_fd(sd_event *e) {
 
         return e->epoll_fd;
 }
-#endif // 0
 
 _public_ int sd_event_get_state(sd_event *e) {
         assert_return(e, -EINVAL);
@@ -2754,7 +2734,6 @@ _public_ int sd_event_get_state(sd_event *e) {
         return e->state;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_event_get_exit_code(sd_event *e, int *code) {
         assert_return(e, -EINVAL);
         assert_return(code, -EINVAL);
@@ -2766,7 +2745,6 @@ _public_ int sd_event_get_exit_code(sd_event *e, int *code) {
         *code = e->exit_code;
         return 0;
 }
-#endif // 0
 
 _public_ int sd_event_exit(sd_event *e, int code) {
         assert_return(e, -EINVAL);
@@ -2830,7 +2808,6 @@ _public_ int sd_event_default(sd_event **ret) {
         return 1;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_event_get_tid(sd_event *e, pid_t *tid) {
         assert_return(e, -EINVAL);
         assert_return(tid, -EINVAL);
@@ -2843,7 +2820,6 @@ _public_ int sd_event_get_tid(sd_event *e, pid_t *tid) {
 
         return -ENXIO;
 }
-#endif // 0
 
 _public_ int sd_event_set_watchdog(sd_event *e, int b) {
         int r;
@@ -2897,14 +2873,12 @@ fail:
         return r;
 }
 
-#if 0 /// UNNEEDED by elogind
 _public_ int sd_event_get_watchdog(sd_event *e) {
         assert_return(e, -EINVAL);
         assert_return(!event_pid_changed(e), -ECHILD);
 
         return e->watchdog;
 }
-#endif // 0
 
 _public_ int sd_event_get_iteration(sd_event *e, uint64_t *ret) {
         assert_return(e, -EINVAL);
index 42dc3d01d6df6a6ef114dc42d7c390ccea265f43..247883ce06320a33a3a795282f557da54bdfe7a3 100644 (file)
@@ -4,3 +4,4 @@
 /71-seat.rules
 /73-seat-late.rules
 /elogind-user
+/org.freedesktop.login1.service
index ca44a441223a13cbf74fc49da9509361f06ae3ad..a452cd3af63200c562c0226fce79fb6536b35ba3 100644 (file)
@@ -126,20 +126,13 @@ int sd_bus_new(sd_bus **ret);
 
 int sd_bus_set_address(sd_bus *bus, const char *address);
 int sd_bus_set_fd(sd_bus *bus, int input_fd, int output_fd);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_set_exec(sd_bus *bus, const char *path, char *const argv[]);
 int sd_bus_get_address(sd_bus *bus, const char **address);
-#endif // 0
 int sd_bus_set_bus_client(sd_bus *bus, int b);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_is_bus_client(sd_bus *bus);
-#endif // 0
 int sd_bus_set_server(sd_bus *bus, int b, sd_id128_t bus_id);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_is_server(sd_bus *bus);
-#endif // 0
 int sd_bus_set_anonymous(sd_bus *bus, int b);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_is_anonymous(sd_bus *bus);
 int sd_bus_set_trusted(sd_bus *bus, int b);
 int sd_bus_is_trusted(sd_bus *bus);
@@ -149,20 +142,13 @@ int sd_bus_set_description(sd_bus *bus, const char *description);
 int sd_bus_get_description(sd_bus *bus, const char **description);
 int sd_bus_negotiate_creds(sd_bus *bus, int b, uint64_t creds_mask);
 int sd_bus_negotiate_timestamp(sd_bus *bus, int b);
-#endif // 0
 int sd_bus_negotiate_fds(sd_bus *bus, int b);
 int sd_bus_can_send(sd_bus *bus, char type);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_get_creds_mask(sd_bus *bus, uint64_t *creds_mask);
-#endif // 0
 int sd_bus_set_allow_interactive_authorization(sd_bus *bus, int b);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_get_allow_interactive_authorization(sd_bus *bus);
-#endif // 0
 int sd_bus_set_exit_on_disconnect(sd_bus *bus, int b);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_get_exit_on_disconnect(sd_bus *bus);
-#endif // 0
 
 int sd_bus_start(sd_bus *ret);
 
@@ -173,7 +159,6 @@ sd_bus *sd_bus_ref(sd_bus *bus);
 sd_bus *sd_bus_unref(sd_bus *bus);
 sd_bus *sd_bus_flush_close_unref(sd_bus *bus);
 
-#if 0 /// UNNEEDED by elogind
 void sd_bus_default_flush_close(void);
 
 int sd_bus_is_open(sd_bus *bus);
@@ -181,31 +166,22 @@ int sd_bus_is_open(sd_bus *bus);
 int sd_bus_get_bus_id(sd_bus *bus, sd_id128_t *id);
 int sd_bus_get_scope(sd_bus *bus, const char **scope);
 int sd_bus_get_tid(sd_bus *bus, pid_t *tid);
-#endif // 0
 int sd_bus_get_owner_creds(sd_bus *bus, uint64_t creds_mask, sd_bus_creds **ret);
 
 int sd_bus_send(sd_bus *bus, sd_bus_message *m, uint64_t *cookie);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_send_to(sd_bus *bus, sd_bus_message *m, const char *destination, uint64_t *cookie);
-#endif // 0
 int sd_bus_call(sd_bus *bus, sd_bus_message *m, uint64_t usec, sd_bus_error *ret_error, sd_bus_message **reply);
 int sd_bus_call_async(sd_bus *bus, sd_bus_slot **slot, sd_bus_message *m, sd_bus_message_handler_t callback, void *userdata, uint64_t usec);
 
-#if 0 /// UNNEEDED by elogind
 int sd_bus_get_fd(sd_bus *bus);
-#endif // 0
 int sd_bus_get_events(sd_bus *bus);
 int sd_bus_get_timeout(sd_bus *bus, uint64_t *timeout_usec);
 int sd_bus_process(sd_bus *bus, sd_bus_message **r);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_process_priority(sd_bus *bus, int64_t max_priority, sd_bus_message **r);
-#endif // 0
 int sd_bus_wait(sd_bus *bus, uint64_t timeout_usec);
 int sd_bus_flush(sd_bus *bus);
 
-#if 0 /// UNNEEDED by elogind
 sd_bus_slot* sd_bus_get_current_slot(sd_bus *bus);
-#endif // 0
 sd_bus_message* sd_bus_get_current_message(sd_bus *bus);
 sd_bus_message_handler_t sd_bus_get_current_handler(sd_bus *bus);
 void* sd_bus_get_current_userdata(sd_bus *bus);
@@ -214,25 +190,20 @@ 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);
 
-#if 0 /// UNNEEDED by elogind
 int sd_bus_add_filter(sd_bus *bus, sd_bus_slot **slot, sd_bus_message_handler_t callback, void *userdata);
-#endif // 0
 int sd_bus_add_match(sd_bus *bus, sd_bus_slot **slot, const char *match, sd_bus_message_handler_t callback, void *userdata);
 int sd_bus_add_object(sd_bus *bus, sd_bus_slot **slot, const char *path, sd_bus_message_handler_t callback, void *userdata);
 int sd_bus_add_fallback(sd_bus *bus, sd_bus_slot **slot, const char *prefix, sd_bus_message_handler_t callback, void *userdata);
 int sd_bus_add_object_vtable(sd_bus *bus, sd_bus_slot **slot, const char *path, const char *interface, const sd_bus_vtable *vtable, void *userdata);
 int sd_bus_add_fallback_vtable(sd_bus *bus, sd_bus_slot **slot, const char *prefix, const char *interface, const sd_bus_vtable *vtable, sd_bus_object_find_t find, void *userdata);
 int sd_bus_add_node_enumerator(sd_bus *bus, sd_bus_slot **slot, const char *path, sd_bus_node_enumerator_t callback, void *userdata);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_add_object_manager(sd_bus *bus, sd_bus_slot **slot, const char *path);
-#endif // 0
 
 /* Slot object */
 
 sd_bus_slot* sd_bus_slot_ref(sd_bus_slot *slot);
 sd_bus_slot* sd_bus_slot_unref(sd_bus_slot *slot);
 
-#if 0 /// UNNEEDED by elogind
 sd_bus* sd_bus_slot_get_bus(sd_bus_slot *slot);
 void *sd_bus_slot_get_userdata(sd_bus_slot *slot);
 void *sd_bus_slot_set_userdata(sd_bus_slot *slot, void *userdata);
@@ -242,7 +213,6 @@ int sd_bus_slot_get_description(sd_bus_slot *slot, const char **description);
 sd_bus_message* sd_bus_slot_get_current_message(sd_bus_slot *slot);
 sd_bus_message_handler_t sd_bus_slot_get_current_handler(sd_bus_slot *bus);
 void *sd_bus_slot_get_current_userdata(sd_bus_slot *slot);
-#endif // 0
 
 /* Message object */
 
@@ -252,14 +222,11 @@ int sd_bus_message_new_method_return(sd_bus_message *call, sd_bus_message **m);
 int sd_bus_message_new_method_error(sd_bus_message *call, sd_bus_message **m, const sd_bus_error *e);
 int sd_bus_message_new_method_errorf(sd_bus_message *call, sd_bus_message **m, const char *name, const char *format, ...) _sd_printf_(4, 5);
 int sd_bus_message_new_method_errno(sd_bus_message *call, sd_bus_message **m, int error, const sd_bus_error *e);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_message_new_method_errnof(sd_bus_message *call, sd_bus_message **m, int error, const char *format, ...) _sd_printf_(4, 5);
-#endif // 0
 
 sd_bus_message* sd_bus_message_ref(sd_bus_message *m);
 sd_bus_message* sd_bus_message_unref(sd_bus_message *m);
 
-#if 0 /// UNNEEDED by elogind
 int sd_bus_message_get_type(sd_bus_message *m, uint8_t *type);
 int sd_bus_message_get_cookie(sd_bus_message *m, uint64_t *cookie);
 int sd_bus_message_get_reply_cookie(sd_bus_message *m, uint64_t *cookie);
@@ -267,7 +234,6 @@ int sd_bus_message_get_priority(sd_bus_message *m, int64_t *priority);
 
 int sd_bus_message_get_expect_reply(sd_bus_message *m);
 int sd_bus_message_get_auto_start(sd_bus_message *m);
-#endif // 0
 int sd_bus_message_get_allow_interactive_authorization(sd_bus_message *m);
 
 const char *sd_bus_message_get_signature(sd_bus_message *m, int complete);
@@ -279,11 +245,9 @@ 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);
 
-#if 0 /// UNNEEDED by elogind
 int sd_bus_message_get_monotonic_usec(sd_bus_message *m, uint64_t *usec);
 int sd_bus_message_get_realtime_usec(sd_bus_message *m, uint64_t *usec);
 int sd_bus_message_get_seqnum(sd_bus_message *m, uint64_t* seqnum);
-#endif // 0
 
 sd_bus* sd_bus_message_get_bus(sd_bus_message *m);
 sd_bus_creds *sd_bus_message_get_creds(sd_bus_message *m); /* do not unref the result */
@@ -291,34 +255,26 @@ sd_bus_creds *sd_bus_message_get_creds(sd_bus_message *m); /* do not unref the r
 int sd_bus_message_is_signal(sd_bus_message *m, const char *interface, const char *member);
 int sd_bus_message_is_method_call(sd_bus_message *m, const char *interface, const char *member);
 int sd_bus_message_is_method_error(sd_bus_message *m, const char *name);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_message_is_empty(sd_bus_message *m);
 int sd_bus_message_has_signature(sd_bus_message *m, const char *signature);
 
 int sd_bus_message_set_expect_reply(sd_bus_message *m, int b);
 int sd_bus_message_set_auto_start(sd_bus_message *m, int b);
 int sd_bus_message_set_allow_interactive_authorization(sd_bus_message *m, int b);
-#endif // 0
 
 int sd_bus_message_set_destination(sd_bus_message *m, const char *destination);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_message_set_priority(sd_bus_message *m, int64_t priority);
-#endif // 0
 
 int sd_bus_message_append(sd_bus_message *m, const char *types, ...);
 int sd_bus_message_appendv(sd_bus_message *m, const char *types, va_list ap);
 int sd_bus_message_append_basic(sd_bus_message *m, char type, const void *p);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_message_append_array(sd_bus_message *m, char type, const void *ptr, size_t size);
-#endif // 0
 int sd_bus_message_append_array_space(sd_bus_message *m, char type, size_t size, void **ptr);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_message_append_array_iovec(sd_bus_message *m, char type, const struct iovec *iov, unsigned n);
 int sd_bus_message_append_array_memfd(sd_bus_message *m, char type, int memfd, uint64_t offset, uint64_t size);
 int sd_bus_message_append_string_space(sd_bus_message *m, size_t size, char **s);
 int sd_bus_message_append_string_iovec(sd_bus_message *m, const struct iovec *iov, unsigned n);
 int sd_bus_message_append_string_memfd(sd_bus_message *m, int memfd, uint64_t offset, uint64_t size);
-#endif // 0
 int sd_bus_message_append_strv(sd_bus_message *m, char **l);
 int sd_bus_message_open_container(sd_bus_message *m, char type, const char *contents);
 int sd_bus_message_close_container(sd_bus_message *m);
@@ -332,10 +288,8 @@ int sd_bus_message_skip(sd_bus_message *m, const char *types);
 int sd_bus_message_enter_container(sd_bus_message *m, char type, const char *contents);
 int sd_bus_message_exit_container(sd_bus_message *m);
 int sd_bus_message_peek_type(sd_bus_message *m, char *type, const char **contents);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_message_verify_type(sd_bus_message *m, char type, const char *contents);
 int sd_bus_message_at_end(sd_bus_message *m, int complete);
-#endif // 0
 int sd_bus_message_rewind(sd_bus_message *m, int complete);
 
 /* Bus management */
@@ -345,31 +299,23 @@ int sd_bus_request_name(sd_bus *bus, const char *name, uint64_t flags);
 int sd_bus_release_name(sd_bus *bus, const char *name);
 int sd_bus_list_names(sd_bus *bus, char ***acquired, char ***activatable); /* free the results */
 int sd_bus_get_name_creds(sd_bus *bus, const char *name, uint64_t mask, sd_bus_creds **creds); /* unref the result! */
-#if 0 /// UNNEEDED by elogind
 int sd_bus_get_name_machine_id(sd_bus *bus, const char *name, sd_id128_t *machine);
-#endif // 0
 
 /* Convenience calls */
 
 int sd_bus_call_method(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *ret_error, sd_bus_message **reply, const char *types, ...);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_call_method_async(sd_bus *bus, sd_bus_slot **slot, const char *destination, const char *path, const char *interface, const char *member, sd_bus_message_handler_t callback, void *userdata, const char *types, ...);
-#endif // 0
 int sd_bus_get_property(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *ret_error, sd_bus_message **reply, const char *type);
 int sd_bus_get_property_trivial(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *ret_error, char type, void *ret_ptr);
 int sd_bus_get_property_string(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *ret_error, char **ret); /* free the result! */
-#if 0 /// UNNEEDED by elogind
 int sd_bus_get_property_strv(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *ret_error, char ***ret); /* free the result! */
 int sd_bus_set_property(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *ret_error, const char *type, ...);
-#endif // 0
 
 int sd_bus_reply_method_return(sd_bus_message *call, const char *types, ...);
 int sd_bus_reply_method_error(sd_bus_message *call, const sd_bus_error *e);
 int sd_bus_reply_method_errorf(sd_bus_message *call, const char *name, const char *format, ...) _sd_printf_(3, 4);
 int sd_bus_reply_method_errno(sd_bus_message *call, int error, const sd_bus_error *e);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_reply_method_errnof(sd_bus_message *call, int error, const char *format, ...) _sd_printf_(3, 4);
-#endif // 0
 
 int sd_bus_emit_signal(sd_bus *bus, const char *path, const char *interface, const char *member, const char *types, ...);
 
@@ -377,9 +323,7 @@ int sd_bus_emit_properties_changed_strv(sd_bus *bus, const char *path, const cha
 int sd_bus_emit_properties_changed(sd_bus *bus, const char *path, const char *interface, const char *name, ...) _sd_sentinel_;
 
 int sd_bus_emit_object_added(sd_bus *bus, const char *path);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_emit_object_removed(sd_bus *bus, const char *path);
-#endif // 0
 int sd_bus_emit_interfaces_added_strv(sd_bus *bus, const char *path, char **interfaces);
 int sd_bus_emit_interfaces_added(sd_bus *bus, const char *path, const char *interface, ...) _sd_sentinel_;
 int sd_bus_emit_interfaces_removed_strv(sd_bus *bus, const char *path, char **interfaces);
@@ -390,40 +334,30 @@ int sd_bus_query_sender_privilege(sd_bus_message *call, int capability);
 
 /* Credential handling */
 
-#if 0 /// UNNEEDED by elogind
 int sd_bus_creds_new_from_pid(sd_bus_creds **ret, pid_t pid, uint64_t creds_mask);
-#endif // 0
 sd_bus_creds *sd_bus_creds_ref(sd_bus_creds *c);
 sd_bus_creds *sd_bus_creds_unref(sd_bus_creds *c);
-#if 0 /// UNNEEDED by elogind
 uint64_t sd_bus_creds_get_mask(const sd_bus_creds *c);
-#endif // 0
 uint64_t sd_bus_creds_get_augmented_mask(const sd_bus_creds *c);
 
 int sd_bus_creds_get_pid(sd_bus_creds *c, pid_t *pid);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_creds_get_ppid(sd_bus_creds *c, pid_t *ppid);
-#endif // 0
 int sd_bus_creds_get_tid(sd_bus_creds *c, pid_t *tid);
 int sd_bus_creds_get_uid(sd_bus_creds *c, uid_t *uid);
 int sd_bus_creds_get_euid(sd_bus_creds *c, uid_t *euid);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_creds_get_suid(sd_bus_creds *c, uid_t *suid);
 int sd_bus_creds_get_fsuid(sd_bus_creds *c, uid_t *fsuid);
 int sd_bus_creds_get_gid(sd_bus_creds *c, gid_t *gid);
-#endif // 0
 int sd_bus_creds_get_egid(sd_bus_creds *c, gid_t *egid);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_creds_get_sgid(sd_bus_creds *c, gid_t *sgid);
 int sd_bus_creds_get_fsgid(sd_bus_creds *c, gid_t *fsgid);
 int sd_bus_creds_get_supplementary_gids(sd_bus_creds *c, const gid_t **gids);
 int sd_bus_creds_get_comm(sd_bus_creds *c, const char **comm);
 int sd_bus_creds_get_tid_comm(sd_bus_creds *c, const char **comm);
 int sd_bus_creds_get_exe(sd_bus_creds *c, const char **exe);
-#endif // 0
 int sd_bus_creds_get_cmdline(sd_bus_creds *c, char ***cmdline);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_creds_get_cgroup(sd_bus_creds *c, const char **cgroup);
+#if 0 /// unsupported by elogind
 int sd_bus_creds_get_unit(sd_bus_creds *c, const char **unit);
 int sd_bus_creds_get_slice(sd_bus_creds *c, const char **slice);
 int sd_bus_creds_get_user_unit(sd_bus_creds *c, const char **unit);
@@ -432,20 +366,16 @@ int sd_bus_creds_get_user_slice(sd_bus_creds *c, const char **slice);
 int sd_bus_creds_get_session(sd_bus_creds *c, const char **session);
 int sd_bus_creds_get_owner_uid(sd_bus_creds *c, uid_t *uid);
 int sd_bus_creds_has_effective_cap(sd_bus_creds *c, int capability);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_creds_has_permitted_cap(sd_bus_creds *c, int capability);
 int sd_bus_creds_has_inheritable_cap(sd_bus_creds *c, int capability);
 int sd_bus_creds_has_bounding_cap(sd_bus_creds *c, int capability);
-#endif // 0
 int sd_bus_creds_get_selinux_context(sd_bus_creds *c, const char **context);
 int sd_bus_creds_get_audit_session_id(sd_bus_creds *c, uint32_t *sessionid);
 int sd_bus_creds_get_audit_login_uid(sd_bus_creds *c, uid_t *loginuid);
 int sd_bus_creds_get_tty(sd_bus_creds *c, const char **tty);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_creds_get_unique_name(sd_bus_creds *c, const char **name);
 int sd_bus_creds_get_well_known_names(sd_bus_creds *c, char ***names);
 int sd_bus_creds_get_description(sd_bus_creds *c, const char **name);
-#endif // 0
 
 /* Error structures */
 
@@ -493,12 +423,10 @@ int sd_bus_error_add_map(const sd_bus_error_map *map);
 
 /* Label escaping */
 
-#if 0 /// UNNEEDED by elogind
 int sd_bus_path_encode(const char *prefix, const char *external_id, char **ret_path);
 int sd_bus_path_encode_many(char **out, const char *path_template, ...);
 int sd_bus_path_decode(const char *path, const char *prefix, char **ret_external_id);
 int sd_bus_path_decode_many(const char *path, const char *path_template, ...);
-#endif // 0
 
 /* Tracking peers */
 
@@ -507,26 +435,20 @@ sd_bus_track* sd_bus_track_ref(sd_bus_track *track);
 sd_bus_track* sd_bus_track_unref(sd_bus_track *track);
 
 sd_bus* sd_bus_track_get_bus(sd_bus_track *track);
-#if 0 /// UNNEEDED by elogind
 void *sd_bus_track_get_userdata(sd_bus_track *track);
 void *sd_bus_track_set_userdata(sd_bus_track *track, void *userdata);
-#endif // 0
 
 int sd_bus_track_add_sender(sd_bus_track *track, sd_bus_message *m);
 int sd_bus_track_remove_sender(sd_bus_track *track, sd_bus_message *m);
 int sd_bus_track_add_name(sd_bus_track *track, const char *name);
 int sd_bus_track_remove_name(sd_bus_track *track, const char *name);
 
-#if 0 /// UNNEEDED by elogind
 int sd_bus_track_set_recursive(sd_bus_track *track, int b);
 int sd_bus_track_get_recursive(sd_bus_track *track);
-#endif // 0
 
 unsigned sd_bus_track_count(sd_bus_track *track);
-#if 0 /// UNNEEDED by elogind
 int sd_bus_track_count_sender(sd_bus_track *track, sd_bus_message *m);
 int sd_bus_track_count_name(sd_bus_track *track, const char *name);
-#endif // 0
 
 const char* sd_bus_track_contains(sd_bus_track *track, const char *name);
 const char* sd_bus_track_first(sd_bus_track *track);
index 83a8fe82fa4a281a17623e7d6f5d22b8da015a25..1780746c7285b47a1517b2ff3f3da768af0e727c 100644 (file)
@@ -57,6 +57,7 @@ _SD_BEGIN_DECLARATIONS;
 /* The first passed file descriptor is fd 3 */
 #define SD_LISTEN_FDS_START 3
 
+#if 0 /// unsupported by elogind
 /*
   Returns how many file descriptors have been passed, or a negative
   errno code on failure. Optionally, removes the $LISTEN_FDS and
@@ -75,8 +76,8 @@ _SD_BEGIN_DECLARATIONS;
 int sd_listen_fds(int unset_environment);
 
 int sd_listen_fds_with_names(int unset_environment, char ***names);
+#endif // 0
 
-#if 0 /// UNNEEDED by elogind
 /*
   Helper call for identifying a passed file descriptor. Returns 1 if
   the file descriptor is a FIFO in the file system stored under the
@@ -100,7 +101,6 @@ int sd_is_fifo(int fd, const char *path);
   See sd_is_special(3) for more information.
 */
 int sd_is_special(int fd, const char *path);
-#endif // 0
 
 /*
   Helper call for identifying a passed file descriptor. Returns 1 if
@@ -118,7 +118,6 @@ int sd_is_special(int fd, const char *path);
 */
 int sd_is_socket(int fd, int family, int type, int listening);
 
-#if 0 /// UNNEEDED by elogind
 /*
   Helper call for identifying a passed file descriptor. Returns 1 if
   the file descriptor is an Internet socket, of the specified family
@@ -133,6 +132,7 @@ int sd_is_socket(int fd, int family, int type, int listening);
 */
 int sd_is_socket_inet(int fd, int family, int type, int listening, uint16_t port);
 
+#if 0 /// unsupported by elogind
 /*
   Helper call for identifying a passed file descriptor. Returns 1 if the
   file descriptor is an Internet socket of the specified type
@@ -144,6 +144,7 @@ int sd_is_socket_inet(int fd, int family, int type, int listening, uint16_t port
   See sd_is_socket_sockaddr(3) for more information.
 */
 int sd_is_socket_sockaddr(int fd, int type, const struct sockaddr* addr, unsigned addr_len, int listening);
+#endif // 0
 
 /*
   Helper call for identifying a passed file descriptor. Returns 1 if
@@ -161,6 +162,7 @@ int sd_is_socket_sockaddr(int fd, int type, const struct sockaddr* addr, unsigne
 */
 int sd_is_socket_unix(int fd, int type, int listening, const char *path, size_t length);
 
+#if 0 /// UNNEEDED by elogind
 /*
   Helper call for identifying a passed file descriptor. Returns 1 if
   the file descriptor is a POSIX Message Queue of the specified name,
@@ -235,7 +237,6 @@ int sd_is_mq(int fd, const char *path);
 */
 int sd_notify(int unset_environment, const char *state);
 
-#if 0 /// UNNEEDED by elogind
 /*
   Similar to sd_notify() but takes a format string.
 
@@ -269,7 +270,6 @@ int sd_pid_notify(pid_t pid, int unset_environment, const char *state);
   process, if the appropriate permissions are available.
 */
 int sd_pid_notifyf(pid_t pid, int unset_environment, const char *format, ...) _sd_printf_(3,4);
-#endif // 0
 
 /*
   Similar to sd_pid_notify(), but also passes the specified fd array
index 95d9f37c26fe6c602b8babcbcca826674e1aa35d..f8cb895660516b839dd8bd39c6ab25a640429321 100644 (file)
@@ -98,65 +98,41 @@ int sd_event_exit(sd_event *e, int code);
 
 int sd_event_now(sd_event *e, clockid_t clock, uint64_t *usec);
 
-#if 0 /// UNNEEDED by elogind
 int sd_event_get_fd(sd_event *e);
-#endif // 0
 int sd_event_get_state(sd_event *e);
-#if 0 /// UNNEEDED by elogind
 int sd_event_get_tid(sd_event *e, pid_t *tid);
 int sd_event_get_exit_code(sd_event *e, int *code);
-#endif // 0
 int sd_event_set_watchdog(sd_event *e, int b);
-#if 0 /// UNNEEDED by elogind
 int sd_event_get_watchdog(sd_event *e);
-#endif // 0
 int sd_event_get_iteration(sd_event *e, uint64_t *ret);
 
-#if 0 /// UNNEEDED by elogind
 sd_event_source* sd_event_source_ref(sd_event_source *s);
-#endif // 0
 sd_event_source* sd_event_source_unref(sd_event_source *s);
 
 sd_event *sd_event_source_get_event(sd_event_source *s);
-#if 0 /// UNNEEDED by elogind
 void* sd_event_source_get_userdata(sd_event_source *s);
 void* sd_event_source_set_userdata(sd_event_source *s, void *userdata);
-#endif // 0
 
 int sd_event_source_set_description(sd_event_source *s, const char *description);
-#if 0 /// UNNEEDED by elogind
 int sd_event_source_get_description(sd_event_source *s, const char **description);
-#endif // 0
 int sd_event_source_set_prepare(sd_event_source *s, sd_event_handler_t callback);
-#if 0 /// UNNEEDED by elogind
 int sd_event_source_get_pending(sd_event_source *s);
-#endif // 0
 int sd_event_source_get_priority(sd_event_source *s, int64_t *priority);
 int sd_event_source_set_priority(sd_event_source *s, int64_t priority);
-#if 0 /// UNNEEDED by elogind
 int sd_event_source_get_enabled(sd_event_source *s, int *enabled);
-#endif // 0
 int sd_event_source_set_enabled(sd_event_source *s, int enabled);
-#if 0 /// UNNEEDED by elogind
 int sd_event_source_get_io_fd(sd_event_source *s);
-#endif // 0
 int sd_event_source_set_io_fd(sd_event_source *s, int fd);
-#if 0 /// UNNEEDED by elogind
 int sd_event_source_get_io_events(sd_event_source *s, uint32_t* events);
-#endif // 0
 int sd_event_source_set_io_events(sd_event_source *s, uint32_t events);
-#if 0 /// UNNEEDED by elogind
 int sd_event_source_get_io_revents(sd_event_source *s, uint32_t* revents);
-#endif // 0
 int sd_event_source_get_time(sd_event_source *s, uint64_t *usec);
 int sd_event_source_set_time(sd_event_source *s, uint64_t usec);
-#if 0 /// UNNEEDED by elogind
 int sd_event_source_get_time_accuracy(sd_event_source *s, uint64_t *usec);
 int sd_event_source_set_time_accuracy(sd_event_source *s, uint64_t usec);
 int sd_event_source_get_time_clock(sd_event_source *s, clockid_t *clock);
 int sd_event_source_get_signal(sd_event_source *s);
 int sd_event_source_get_child_pid(sd_event_source *s, pid_t *pid);
-#endif // 0
 
 /* Define helpers so that __attribute__((cleanup(sd_event_unrefp))) and similar may be used. */
 _SD_DEFINE_POINTER_CLEANUP_FUNC(sd_event, sd_event_unref);