chiark / gitweb /
tree-wide: drop 'This file is part of systemd' blurb
[elogind.git] / src / libelogind / sd-bus / bus-message.h
index 8aca18381b53b59472058dd907c7746d0fb8337a..9740f1d61279d8e4064eca37890ca296705d171c 100644 (file)
@@ -1,24 +1,8 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
+/* SPDX-License-Identifier: LGPL-2.1+ */
 #pragma once
 
 /***
-  This file is part of systemd.
-
   Copyright 2013 Lennart Poettering
-
-  systemd 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
-  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/>.
 ***/
 
 #include <byteswap.h>
@@ -94,9 +78,7 @@ struct sd_bus_message {
         bool dont_send:1;
         bool allow_fds:1;
         bool free_header:1;
-        bool free_kdbus:1;
         bool free_fds:1;
-        bool release_kdbus:1;
         bool poisoned:1;
 
         /* The first and last bytes of the message */
@@ -130,8 +112,6 @@ struct sd_bus_message {
         struct iovec iovec_fixed[2];
         unsigned n_iovec;
 
-        struct kdbus_msg *kdbus;
-
         char *peeked_signature;
 
         /* If set replies to this message must carry the signature
@@ -141,10 +121,6 @@ struct sd_bus_message {
 
         usec_t timeout;
 
-        char sender_buffer[3 + DECIMAL_STR_MAX(uint64_t) + 1];
-        char destination_buffer[3 + DECIMAL_STR_MAX(uint64_t) + 1];
-        char *destination_ptr;
-
         size_t header_offsets[_BUS_MESSAGE_HEADER_MAX];
         unsigned n_header_offsets;
 };
@@ -193,8 +169,9 @@ static inline bool BUS_MESSAGE_IS_GVARIANT(sd_bus_message *m) {
         return m->header->version == 2;
 }
 
-int bus_message_seal(sd_bus_message *m, uint64_t serial, usec_t timeout);
-// UNNEEDED int bus_message_get_blob(sd_bus_message *m, void **buffer, size_t *sz);
+#if 0 /// UNNEEDED by elogind
+int bus_message_get_blob(sd_bus_message *m, void **buffer, size_t *sz);
+#endif // 0
 int bus_message_read_strv_extend(sd_bus_message *m, char ***l);
 
 int bus_message_from_header(
@@ -205,7 +182,7 @@ int bus_message_from_header(
                 size_t footer_accessible,
                 size_t message_size,
                 int *fds,
-                unsigned n_fds,
+                size_t n_fds,
                 const char *label,
                 size_t extra,
                 sd_bus_message **ret);
@@ -215,15 +192,13 @@ int bus_message_from_malloc(
                 void *buffer,
                 size_t length,
                 int *fds,
-                unsigned n_fds,
+                size_t n_fds,
                 const char *label,
                 sd_bus_message **ret);
 
 int bus_message_get_arg(sd_bus_message *m, unsigned i, const char **str);
 int bus_message_get_arg_strv(sd_bus_message *m, unsigned i, char ***strv);
 
-int bus_message_append_ap(sd_bus_message *m, const char *types, va_list ap);
-
 int bus_message_parse_fields(sd_bus_message *m);
 
 struct bus_body_part *message_append_part(sd_bus_message *m);
@@ -240,7 +215,9 @@ int bus_message_new_synthetic_error(sd_bus *bus, uint64_t serial, const sd_bus_e
 
 int bus_message_remarshal(sd_bus *bus, sd_bus_message **m);
 
-// UNNEEDED int bus_message_append_sender(sd_bus_message *m, const char *sender);
+#if 0 /// UNNEEDED by elogind
+int bus_message_append_sender(sd_bus_message *m, const char *sender);
+#endif // 0
 
 void bus_message_set_sender_driver(sd_bus *bus, sd_bus_message *m);
 void bus_message_set_sender_local(sd_bus *bus, sd_bus_message *m);