dbus/dbus
Simon McVittie aa5fdac600 message: Add DBusVariant, a way to copy a single message item
For #100344, we will need a way to store the metadata from the
original method call, and copy them back into arbitrarily many
messages later. This would be easy in GDBus, which has GVariant
as a first-class object. However, libdbus doesn't have an object for
message items, only messages.

We could copy the message's content, but it will carry file descriptors,
which we don't want to copy. Instead, introduce an internal object
representing a message item in a small buffer. It is stored as a variant
(D-Bus type 'v') so that it naturally carries its own type.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101568
2017-07-05 16:22:54 +01:00
..
.gitignore Rename dbus-test to test-dbus to match common test application naming scheme. 2014-01-17 16:17:02 +00:00
dbus-address.c Fix warnings from compiler option '-Wshadow' 2016-10-10 18:04:09 +01:00
dbus-address.h Fix warnings from compiler option '-Wshadow' 2016-10-10 18:04:09 +01:00
dbus-arch-deps.h.in Remove support for platforms with no 64-bit integer type 2013-09-16 15:31:02 +01:00
dbus-asv-util.c asv-util: Expose functions to open an arbitrary entry 2017-06-08 16:59:46 +01:00
dbus-asv-util.h asv-util: Expose functions to open an arbitrary entry 2017-06-08 16:59:46 +01:00
dbus-auth-script.c Stringify DBUS_AUTH_STATE_INVALID 2017-01-17 17:20:53 +00:00
dbus-auth-script.h Consistently include <config.h> in all C source files and never in header files. 2010-03-19 20:11:48 +01:00
dbus-auth-util.c Remove trailing newlines from _dbus_warn, _dbus_warn_check_failed 2016-09-30 19:36:51 +01:00
dbus-auth.c Do not mention disallowed auth mechanisms in REJECTED message 2017-02-02 12:29:11 +01:00
dbus-auth.h On bus startup check given auth in config file against supported mechanisms. 2017-02-02 11:28:35 +01:00
dbus-bus.c Refer to dbus_try_get_local_machine_id() in doc-comments 2017-06-08 18:34:40 +01:00
dbus-bus.h Decorated public exported functions with DBUS_EXPORT macro, reviewed by Colin Walters. 2010-03-16 09:33:39 +01:00
dbus-connection-internal.h Add DBUS_PRIVATE_EXPORT decoration to symbols used by dbus-daemon or tests 2015-02-20 20:49:36 +00:00
dbus-connection.c Fix missing dbus_message_unref() in error reply path 2017-06-27 18:11:24 +01:00
dbus-connection.h Revert "Use typedef DBusSocket for sockets fd's to avoid conversion warnings." 2015-03-11 15:42:51 +01:00
dbus-credentials-util.c Remove some redundant inclusions 2015-02-20 20:49:01 +00:00
dbus-credentials.c Move defaults for some switches into a default case 2017-01-17 17:20:53 +00:00
dbus-credentials.h Add DBUS_PRIVATE_EXPORT decoration to symbols used by dbus-daemon or tests 2015-02-20 20:49:36 +00:00
dbus-dataslot.c Remove trailing newlines from _dbus_assert_not_reached 2016-08-12 17:11:48 +01:00
dbus-dataslot.h Replace individual global-lock variables with an array of DBusRMutex * 2013-06-17 16:53:51 +01:00
dbus-errors.c _dbus_set_error_valist: add 2015-02-03 16:19:20 +00:00
dbus-errors.h Add missing format attributes suggested by -Wsuggest-attribute=format 2016-10-13 22:44:13 +01:00
dbus-file-unix.c Fail to generate random bytes instead of falling back to rand() 2015-05-14 14:30:30 +01:00
dbus-file-win.c dbus-file-win: print a HANDLE correctly 2016-10-13 22:44:12 +01:00
dbus-file.c moved out dbus file related functions from sysdeps into separate files - tested on windows 2009-12-20 11:24:32 +01:00
dbus-file.h Add DBUS_PRIVATE_EXPORT decoration to symbols used by dbus-daemon or tests 2015-02-20 20:49:36 +00:00
dbus-hash.c dbus-hash: Fix memory leaks in internal hash table tests 2017-02-16 14:17:04 +00:00
dbus-hash.h Add new functions _dbus_hash_table_to_array() and _dbus_hash_table_from_array() from related activation code. 2016-02-12 15:26:39 +00:00
dbus-init-win.cpp dbus_threads_init_default, dbus_threads_init: be safe to call at any time 2013-05-10 11:35:08 +01:00
dbus-internals.c internals: Decouple logging an error from exiting unsuccessfully 2017-07-05 13:12:37 +01:00
dbus-internals.h internals: Make a minimal _dbus_test_oom_handling() universally available 2017-07-05 13:13:40 +01:00
dbus-keyring.c Merge branch 'dbus-1.10' 2017-02-16 15:59:37 +00:00
dbus-keyring.h Bug 21161 - Update the FSF address 2009-07-14 15:39:47 -04:00
dbus-list.c dbus-list: Add some missing OOM paths to an internal test 2017-02-13 16:05:57 +00:00
dbus-list.h Add DBUS_PRIVATE_EXPORT decoration to symbols used by dbus-daemon or tests 2015-02-20 20:49:36 +00:00
dbus-macros.h Enable format, noreturn, unused attributes for clang 2016-10-13 22:44:13 +01:00
dbus-mainloop.c bus: Fix timeout restarts 2017-02-01 10:42:50 +00:00
dbus-mainloop.h Revert all changes since a36d4918a6 2012-01-04 17:44:23 +00:00
dbus-marshal-basic.c Remove trailing newlines from _dbus_warn, _dbus_warn_check_failed 2016-09-30 19:36:51 +01:00
dbus-marshal-basic.h Partially fix warnings from compiler option '-Wredundant-decls' 2016-10-10 15:11:03 +01:00
dbus-marshal-byteswap-util.c Remove trailing newlines from _dbus_warn, _dbus_warn_check_failed 2016-09-30 19:36:51 +01:00
dbus-marshal-byteswap.c Fix warning: "pointer targets in assignment differ in signedness [-Wpointer-sign]". 2015-11-24 12:26:00 +01:00
dbus-marshal-byteswap.h Add DBUS_PRIVATE_EXPORT decoration to symbols used by dbus-daemon or tests 2015-02-20 20:49:36 +00:00
dbus-marshal-header.c Fix warning: "pointer targets in assignment differ in signedness [-Wpointer-sign]". 2015-11-24 12:26:00 +01:00
dbus-marshal-header.h Add DBUS_PRIVATE_EXPORT decoration to symbols used by dbus-daemon or tests 2015-02-20 20:49:36 +00:00
dbus-marshal-recursive-util.c test, tools: assert impossible values of local enums are not reached 2017-04-07 12:07:01 +01:00
dbus-marshal-recursive.c Remove trailing newlines from _dbus_warn, _dbus_warn_check_failed 2016-09-30 19:36:51 +01:00
dbus-marshal-recursive.h Add DBUS_PRIVATE_EXPORT decoration to symbols used by dbus-daemon or tests 2015-02-20 20:49:36 +00:00
dbus-marshal-validate-util.c _dbus_marshal_validate_test: Uncomment commented-out test coverage 2017-07-05 13:13:01 +01:00
dbus-marshal-validate.c Remove now-unused _dbus_validate_signature() 2017-07-04 17:07:32 +01:00
dbus-marshal-validate.h Remove now-unused _dbus_validate_signature() 2017-07-04 17:07:32 +01:00
dbus-memory.c Move defaults for some switches into a default case 2017-01-17 17:20:53 +00:00
dbus-memory.h Annotate dbus_malloc*() functions with __attribute__ malloc and __attribute__ alloc_size 2011-01-05 13:13:48 +00:00
dbus-mempool.c Fix incorrect sizeof in a Valgrind hint macro call. 2013-09-16 13:07:41 +01:00
dbus-mempool.h Add DBUS_PRIVATE_EXPORT decoration to symbols used by dbus-daemon or tests 2015-02-20 20:49:36 +00:00
dbus-message-factory.c dbus-message-factory: Add some missing OOM paths to an internal test 2017-02-13 16:06:33 +00:00
dbus-message-factory.h tests to embedded tests: replaced in libdbus 2013-06-28 12:15:53 +01:00
dbus-message-internal.h message: Add DBusVariant, a way to copy a single message item 2017-07-05 16:22:54 +01:00
dbus-message-private.h Add DBUS_PRIVATE_EXPORT decoration to symbols used by dbus-daemon or tests 2015-02-20 20:49:36 +00:00
dbus-message-util.c dbus: Fix writing off the end of an fd_set when testing with Valgrind 2017-04-07 12:52:34 +01:00
dbus-message.c message: Add DBusVariant, a way to copy a single message item 2017-07-05 16:22:54 +01:00
dbus-message.h DBusMessageIter: Add a function to abandon possibly-zero-filled iterators 2017-07-05 16:22:50 +01:00
dbus-misc.c Add dbus_try_get_local_machine_id() 2017-06-08 18:31:10 +01:00
dbus-misc.h Add dbus_try_get_local_machine_id() 2017-06-08 18:31:10 +01:00
dbus-nonce.c dbus-nonce: print sockets correctly 2016-10-13 22:44:12 +01:00
dbus-nonce.h Convert miscellaneous socket APIs to DBusSocket 2015-05-12 18:35:38 +01:00
dbus-object-tree.c dbus-object-tree test: tolerate OOM in run_decompose_tests() 2017-02-14 08:53:12 +00:00
dbus-object-tree.h Revert all changes since a36d4918a6 2012-01-04 17:44:23 +00:00
dbus-pending-call-internal.h Partially fix warnings from compiler option '-Wredundant-decls' 2016-10-10 15:11:03 +01:00
dbus-pending-call.c Cleanup: polish verbose mode checking 2013-08-23 11:51:18 +01:00
dbus-pending-call.h Add and use DBUS_TIMEOUT_INFINITE and DBUS_TIMEOUT_USE_DEFAULT 2011-06-10 18:33:04 +01:00
dbus-pipe-unix.c Make dbus-daemon.exe --print-address work under Windows 2012-02-28 12:37:41 +00:00
dbus-pipe-win.c Make dbus-daemon.exe --print-address work under Windows 2012-02-28 12:37:41 +00:00
dbus-pipe.c Make dbus-daemon.exe --print-address work under Windows 2012-02-28 12:37:41 +00:00
dbus-pipe.h Add DBUS_PRIVATE_EXPORT decoration to symbols used by dbus-daemon or tests 2015-02-20 20:49:36 +00:00
dbus-protocol.h Revert "Add DBus method to return the AA context of a connection" 2015-02-18 20:57:08 +00:00
dbus-resources.c DBusCounter: add a mutex to protect the refcount and notify function 2015-05-05 12:30:30 +01:00
dbus-resources.h Revert all changes since a36d4918a6 2012-01-04 17:44:23 +00:00
dbus-server-debug-pipe.c _dbus_server_init_base: raise a DBusError 2015-05-14 14:30:30 +01:00
dbus-server-debug-pipe.h Bug 21161 - Update the FSF address 2009-07-14 15:39:47 -04:00
dbus-server-launchd.c _dbus_server_new_for_socket: raise a DBusError 2015-05-14 14:30:30 +01:00
dbus-server-launchd.h Add launchd implementation. 2010-12-06 21:33:06 +01:00
dbus-server-protected.h _dbus_server_init_base: raise a DBusError 2015-05-14 14:30:30 +01:00
dbus-server-socket.c _dbus_server_init_base: raise a DBusError 2015-05-14 14:30:30 +01:00
dbus-server-socket.h _dbus_server_new_for_socket: raise a DBusError 2015-05-14 14:30:30 +01:00
dbus-server-unix.c Add unix:dir=/something addresses 2017-06-29 14:03:03 +01:00
dbus-server-unix.h Bug 21161 - Update the FSF address 2009-07-14 15:39:47 -04:00
dbus-server-win.c Remove duplicate nonce-tcp (service-side) transport on Windows 2012-06-05 12:18:23 +01:00
dbus-server-win.h Bug 21161 - Update the FSF address 2009-07-14 15:39:47 -04:00
dbus-server.c Reimplement _dbus_warn_return_if_fail without -Wformat-nonliteral 2016-10-13 17:20:32 +01:00
dbus-server.h Decorated public exported functions with DBUS_EXPORT macro, reviewed by Colin Walters. 2010-03-16 09:33:39 +01:00
dbus-sha.c test, tools: assert impossible values of local enums are not reached 2017-04-07 12:07:01 +01:00
dbus-sha.h Bug 21161 - Update the FSF address 2009-07-14 15:39:47 -04:00
dbus-shared.h Add org.freedesktop.DBus.Verbose interface to dbus-daemon when compiled with DBUS_ENABLE_VERBOSE_MODE. 2015-02-13 11:20:21 +01:00
dbus-shell.c Fix misleading indentation to avoid respective compiler warning 2016-08-11 16:41:14 +01:00
dbus-shell.h Bug 21161 - Update the FSF address 2009-07-14 15:39:47 -04:00
dbus-signature.c dbus_signature_validate: be sure to use a literal format string 2016-10-13 22:44:12 +01:00
dbus-signature.h Revert all changes since a36d4918a6 2012-01-04 17:44:23 +00:00
dbus-socket-set-epoll.c dbus-socket-set-epoll: initialize all bytes of struct epoll_event 2017-02-22 11:06:22 +00:00
dbus-socket-set-poll.c Convert mostly DBUS_SOCKET_... and DBUS_POLLABLE_.. macros for more type safety. 2015-05-12 18:36:24 +01:00
dbus-socket-set.c Add an implementation of DBusSocketSet using epoll 2011-06-13 17:30:40 +01:00
dbus-socket-set.h DBusMainLoop, DBusSocketSet: work in terms of DBusPollable 2015-05-12 18:34:32 +01:00
dbus-sockets-win.h Mostly remove the remnants of an older socket abstraction layer 2015-05-12 18:34:24 +01:00
dbus-spawn-test.c Pass in DBUS_TEST_EXEC via environment, not hard-coded into binaries 2017-04-18 17:20:30 +01:00
dbus-spawn-win.c Be more const-correct 2016-10-13 17:20:28 +01:00
dbus-spawn.c dbus-spawn: assert impossible returns from read functions don't happen 2017-04-07 12:06:50 +01:00
dbus-spawn.h Be more const-correct 2016-10-13 17:20:28 +01:00
dbus-string-private.h Revert all changes since a36d4918a6 2012-01-04 17:44:23 +00:00
dbus-string-util.c Remove trailing newlines from _dbus_assert_not_reached 2016-08-12 17:11:48 +01:00
dbus-string.c _dbus_string_append_printf_valist: avoid leaking copy of varargs 2015-01-29 12:09:40 +00:00
dbus-string.h Add missing format attributes suggested by -Wsuggest-attribute=format 2016-10-13 22:44:13 +01:00
dbus-syntax.c Doc: fix incorrect param names, missing params, non-exist params 2013-08-22 20:01:08 +01:00
dbus-syntax.h Add dbus-syntax.[ch] 2012-02-24 12:43:55 +00:00
dbus-sysdeps-pthread.c Remove trailing newlines from _dbus_warn, _dbus_warn_check_failed 2016-09-30 19:36:51 +01:00
dbus-sysdeps-thread-win.c Fix compiling on windows/mingw with automake build system. 2016-05-16 14:11:24 +02:00
dbus-sysdeps-unix.c internals: Decouple logging an error from exiting unsuccessfully 2017-07-05 13:12:37 +01:00
dbus-sysdeps-unix.h _dbus_ensure_standard_fds: new function to ensure std* fds are open 2016-08-12 10:58:38 +01:00
dbus-sysdeps-util-unix.c sysdeps: Add accessor for a list of transient service directories 2017-02-21 13:23:37 +00:00
dbus-sysdeps-util-win.c _dbus_lm_strerror: move default behaviour inside switch 2017-04-07 12:06:37 +01:00
dbus-sysdeps-util.c Clean up how we arrange for environ to be declared 2016-10-13 17:20:34 +01:00
dbus-sysdeps-win.c internals: Decouple logging an error from exiting unsuccessfully 2017-07-05 13:12:37 +01:00
dbus-sysdeps-win.h Partially fix warnings from compiler option '-Wredundant-decls' 2016-10-10 15:11:03 +01:00
dbus-sysdeps-wince-glue.c Doc: fix incorrect param names, missing params, non-exist params 2013-08-22 20:01:08 +01:00
dbus-sysdeps-wince-glue.h Wrap OutputDebugString for Windows CE builds, and add cast for MSVC. 2010-07-19 10:32:08 +02:00
dbus-sysdeps.c Move defaults for some switches into a default case 2017-01-17 17:20:53 +00:00
dbus-sysdeps.h internals: Decouple logging an error from exiting unsuccessfully 2017-07-05 13:12:37 +01:00
dbus-test-main.c Include string.h for strcmp() 2016-10-10 15:09:36 +01:00
dbus-test.c Add missing function attributes suggested by clang (but not by gcc) 2016-10-13 22:44:13 +01:00
dbus-test.h Add DBUS_PRIVATE_EXPORT decoration to symbols used by dbus-daemon or tests 2015-02-20 20:49:36 +00:00
dbus-threads-internal.h Add DBUS_PRIVATE_EXPORT decoration to symbols used by dbus-daemon or tests 2015-02-20 20:49:36 +00:00
dbus-threads.c Revert "Add a statically-initialized implementation of _dbus_lock() on glibc systems" 2013-08-30 17:31:16 +01:00
dbus-threads.h Allow both recursive and non-recursive mutexes to be supplied 2012-02-21 14:41:28 +00:00
dbus-timeout.c bus: Fix timeout restarts 2017-02-01 10:42:50 +00:00
dbus-timeout.h bus: Fix timeout restarts 2017-02-01 10:42:50 +00:00
dbus-transport-protected.h generic socket transport code: work in terms of DBusSocket 2015-05-12 18:35:24 +01:00
dbus-transport-socket.c DBusTransport: assert that invalid results don't happen 2017-04-07 12:07:51 +01:00
dbus-transport-socket.h generic socket transport code: work in terms of DBusSocket 2015-05-12 18:35:24 +01:00
dbus-transport-unix.c Turn DBusSocket into a type-safe struct, preventing inappropriate conversion 2015-05-12 18:35:56 +01:00
dbus-transport-unix.h Bug 21161 - Update the FSF address 2009-07-14 15:39:47 -04:00
dbus-transport-win.c Remove duplicate nonce-tcp (client side) transport on Windows 2012-06-05 12:17:58 +01:00
dbus-transport-win.h Bug 21161 - Update the FSF address 2009-07-14 15:39:47 -04:00
dbus-transport.c transport: Don't pile up errors for semicolon-separated components 2017-06-08 16:59:13 +01:00
dbus-transport.h generic socket transport code: work in terms of DBusSocket 2015-05-12 18:35:24 +01:00
dbus-types.h Remove support for platforms with no 64-bit integer type 2013-09-16 15:31:02 +01:00
dbus-userdb-util.c Fix remaining -Wundef warnings 2016-10-13 17:20:38 +01:00
dbus-userdb.c Remove trailing newlines from _dbus_warn, _dbus_warn_check_failed 2016-09-30 19:36:51 +01:00
dbus-userdb.h Add DBUS_PRIVATE_EXPORT decoration to symbols used by dbus-daemon or tests 2015-02-20 20:49:36 +00:00
dbus-uuidgen.c Make UUID generation failable 2015-05-14 14:30:30 +01:00
dbus-uuidgen.h uuidgen: Remove unimplemented declaration 2017-06-08 17:32:59 +01:00
dbus-valgrind-internal.h Fix building with newer Valgrind 2012-11-09 14:04:27 +00:00
dbus-watch.c Fix warnings from compiler option '-Wshadow' 2016-10-10 18:04:09 +01:00
dbus-watch.h DBusMainLoop, DBusSocketSet: work in terms of DBusPollable 2015-05-12 18:34:32 +01:00
dbus.h Add dbus-syntax.[ch] 2012-02-24 12:43:55 +00:00
Makefile.am build: Introduce ${runstatedir} and use it for the pid file 2017-06-30 10:51:14 +01:00
Version.in Link dbus-daemon and dbus-daemon-lauch-helper against libdbus 2015-02-20 20:49:45 +00:00
versioninfo.rc.in dbus: do not include unused afxres.h on windows. 2016-07-23 17:16:53 +02:00