History log of /external/dbus/test/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
4299eb3c0907100fe95d2986984b48d40cc52841 08-Jul-2015 Daniel Erat <derat@google.com> Incorporate upstream changes to v1.6.8.

Squash upstream commits up to and including the v1.6.8
release (upstream commit 1cad15cc).

This repository's changes from upstream are now limited to:

- addition of Android.mk, CleanSpec.mk, config.h, and NOTICE
files
- addition of dbus/dbus-arch-deps.h and removal from
dbus/.gitignore (ebae2d21, f022f55d)
- WANT_PIDFILE #ifdefs added to bus/bus.c to disable writing
dbus-daemon's PID to a file (3100d06a)
- TRACE_LOCKS set to 0 in dbus/dbus-connection.c (88a0ffe5)
- DBUS_ANDROID_LOG added to dbus/dbus-internals.c to use
logcat (7de15def)
- ANDROID_MANAGED_SOCKET added to dbus/dbus-sysdeps-unix.c
to use an SELinux-managed socket rather than a
dbus-daemon-created Unix domain socket (3100d06a)

Bug: 22328216
Change-Id: I793ebdf963d9b0740f0da28f1de593d088f08406
gitignore
akefile.am
reak-loader.c
orrupt.c
ata/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoService.service.in
ata/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoUser.service.in
ata/valid-config-files-system/debug-allow-all-fail.conf.cmake
ata/valid-config-files-system/debug-allow-all-fail.conf.in
ata/valid-config-files-system/debug-allow-all-pass.conf.cmake
ata/valid-config-files-system/debug-allow-all-pass.conf.in
ata/valid-config-files/check-own-rules.conf
ata/valid-config-files/debug-allow-all-sha1.conf.cmake
ata/valid-config-files/debug-allow-all-sha1.conf.in
ata/valid-config-files/debug-allow-all.conf.cmake
ata/valid-config-files/debug-allow-all.conf.in
ata/valid-config-files/incoming-limit.conf
ata/valid-config-files/many-rules.conf
ata/valid-service-files-system/org.freedesktop.DBus.TestSuiteEchoService.service.in
ata/valid-service-files-system/org.freedesktop.DBus.TestSuiteSegfaultService.service.in
ata/valid-service-files-system/org.freedesktop.DBus.TestSuiteShellEchoServiceFail.service.in
ata/valid-service-files-system/org.freedesktop.DBus.TestSuiteShellEchoServiceSuccess.service.in
ata/valid-service-files/org.freedesktop.DBus.TestSuite.PrivServer.service.in
ata/valid-service-files/org.freedesktop.DBus.TestSuiteEchoService.service.in
ata/valid-service-files/org.freedesktop.DBus.TestSuiteForkingEchoService.service.in
ata/valid-service-files/org.freedesktop.DBus.TestSuiteSegfaultService.service.in
ata/valid-service-files/org.freedesktop.DBus.TestSuiteShellEchoServiceFail.service.in
ata/valid-service-files/org.freedesktop.DBus.TestSuiteShellEchoServiceSuccess.service.in
bus-daemon-eavesdrop.c
bus-daemon.c
bus-test-runner
ecode-gcov.c
nternals/refs.c
nternals/syslog.c
oopback.c
arshal.c
ame-test/.gitignore
ame-test/Makefile.am
ame-test/run-test-systemserver.sh
ame-test/run-test.sh
ame-test/test-autolaunch.c
ame-test/test-pending-call-dispatch.c
ame-test/test-pending-call-timeout.c
ame-test/test-privserver-client.c
elay.c
yntax.c
est-service.c
est-shell-service.c
est-utils.c
3100d06aa6965f2eaa3f8f393817d0a4858c5329 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution

Change-Id: I0ab320d198c700993f361d7d3d5b46a33a708fc9
ame-test/run-test.sh
45d53565bc13678d6aa5edec1d4efb5bf8a64e0b 03-Sep-2010 Colin Walters <walters@verbum.org> Make dbus-uuidgen atomic

A Red Hat QA engineer hit in practice a race condition in dbus-uuidgen
where it could leave an empty file.

dbus-uuidgen (_dbus_create_uuid_file_exclusively) formerly created an
empty file in the path to the uuid, then filled it in. At some point,
the internal libdbus _dbus_string_save_to_file became atomic on Unix
at least (doing the save to temp file, fsync(), rename() dance).

So _dbus_create_uuid_file_exclusively doesn't need to create the file
beforehand anymore. However, it *does* need the file to be
world-readable, unlike all other consumers of
_dbus_string_save_to_file. So add a "world_readable" argument.
reak-loader.c
aec82e2edd6344310958e9b038a4bb17bcbba5b7 09-Aug-2010 Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Applied patches from cygwin port.
akefile.am
ec18f1fc89f28ef3be945c567916d04856f631b8 11-Apr-2010 Ralf Habacker <ralf.habacker@freenet.de> Port test-privserver to windows by using the TEST_LISTEN bus address.
ame-test/test-privserver.c
0ed7d779b784f30ff9781c0ad47a03af199531a6 09-Apr-2010 Ralf Habacker <ralf.habacker@freenet.de> Cmake support for cross plattform usable test files.

Recent test configuration files contains 'unix:...'
bus adresses which do not work on windows.
For cross plattform usable test files the whole
listen tag entry has to be set by the build system,
which is available with a new build system variable
named TEST_LISTEN.
To have the client client side definition in sync,
TEST_CONNECTION has been moved from c file into cmake
build system.
ata/valid-config-files-system/debug-allow-all-fail.conf.cmake
ata/valid-config-files-system/debug-allow-all-pass.conf.cmake
ca7b8112c91f55f0a4b908e55854320b434d8f1f 23-Mar-2010 Ralf Habacker <ralf.habacker@freenet.de> Renamed libdbus-convenience to libdbus-internal for automake (to stay in sync with cmake).
akefile.am
ame-test/Makefile.am
1de6b09fbdb314bac445f3a97aef83956c128c4a 23-Mar-2010 Marcus Brinkmann <marcus.brinkmann@ruhr-uni-bochum.de> Update dll export for autoconf (to stay in sync with cmake).
akefile.am
ame-test/Makefile.am
df89cfeb3808acc213c9620db6988611a34207c5 22-Mar-2010 Colin Walters <walters@verbum.org> Merge branch 'dbus-1.2'

Conflicts:
bus/dispatch.c
configure.in
test/name-test/test-names.c
01d9d169f36fcbe4888a9c57173538cba57b2f68 16-Mar-2010 Marcus Brinkmann <marcus.brinkmann@ruhr-uni-bochum.de> Make more signal and locale interface use conditional.
est-segfault.c
dbecdeabb20e0ce11121819c63373f0afba57c58 19-Mar-2010 Marcus Brinkmann <marcus.brinkmann@ruhr-uni-bochum.de> Consistently include <config.h> in all C source files and never in header files.
reak-loader.c
ecode-gcov.c
ame-test/test-ids.c
ame-test/test-names.c
ame-test/test-pending-call-dispatch.c
ame-test/test-pending-call-timeout.c
ame-test/test-privserver-client.c
ame-test/test-privserver.c
ame-test/test-shutdown.c
ame-test/test-threads-init.c
hell-test.c
pawn-test.c
est-exit.c
est-names.c
est-service.c
est-shell-service.c
est-utils.c
est-utils.h
d47154c28b68b32177773bd489fdae62b440f38c 17-Mar-2010 Colin Walters <walters@verbum.org> Delete name-test/test-names

This test, while extensive, has the serious flaw of effectively
spinning on _dbus_connection_do_iteration_unlocked. Any tests
like this should be using the internal DBus mainloop, which
I don't have time to port it to before doing a release.
ame-test/Makefile.am
ame-test/run-test.sh
ame-test/test-names.c
7a4cd46284dd634c165b5c4eb23606b7c0ff4ade 28-Jan-2010 Colin Walters <walters@verbum.org> Merge branch 'my-dbus-1.2'

Conflicts:
bus/Makefile.am
dbus/dbus-sysdeps-util-unix.c
dbus/dbus-transport.c
test/test-service.c
b7e77c6b035f634f372c1749e61c14bde18b5d95 15-Dec-2009 Colin Walters <walters@verbum.org> Ignore exit code zero from activated services

A variety of system components have migrated from legacy init into DBus
service activation. Many of these system components "daemonize", which
involves forking. The DBus activation system treated an exit as an
activation failure, assuming that the child process which grabbed the
DBus name didn't run first.

While we're in here, also differentiate in this code path between the
servicehelper (system) versus direct activation (session) paths. In
the session activation path our error message mentioned a helper
process which was confusing, since none was involved.

Based on a patch and debugging research from Ray Strode <rstrode@redhat.com>
ata/valid-service-files/org.freedesktop.DBus.TestSuiteForkingEchoService.service.in
ame-test/Makefile.am
ame-test/run-test.sh
ame-test/test-activation-forking.py
est-service.c
be51ff7e5ef2e9370fd2417614781f688576d37a 18-Dec-2009 Ralf Habacker <ralf.habacker@freenet.de> windows does not support fork, skip it
est-service.c
949a64b127a32a3e5a4ce4278773f18e290c44c2 15-Dec-2009 Colin Walters <walters@verbum.org> Ignore exit code zero from activated services

A variety of system components have migrated from legacy init into DBus
service activation. Many of these system components "daemonize", which
involves forking. The DBus activation system treated an exit as an
activation failure, assuming that the child process which grabbed the
DBus name didn't run first.

While we're in here, also differentiate in this code path between the
servicehelper (system) versus direct activation (session) paths. In
the session activation path our error message mentioned a helper
process which was confusing, since none was involved.

Based on a patch and debugging research from Ray Strode <rstrode@redhat.com>
ata/valid-service-files/org.freedesktop.DBus.TestSuiteForkingEchoService.service.in
ame-test/Makefile.am
ame-test/run-test.sh
ame-test/test-activation-forking.py
est-service.c
f27dd9b8f2372d1fbdd1f02ba378fae6d8b5974d 07-Dec-2009 Ralf Habacker <ralf.habacker@freenet.de> fixed memory leak
pawn-test.c
4a24e84aa72fb1a0fe73a86a9365ae686e8878f7 01-Dec-2009 Ralf Habacker <ralf.habacker@freenet.de> readded test files required for windows
ata/valid-config-files/debug-allow-all-sha1.conf.cmake
ata/valid-config-files/debug-allow-all.conf.cmake
a871d0f42e472d83f30faecb8f1840c3bac26ae6 21-Apr-2009 Marc Mutz <marc@kdab.net> Makefile.am's: reorder libraries so static libs come first (fixes linking on W32) (cherry picked from commit f88bd88d6b4b318f9401fae595343c8b1bacf654)
akefile.am
fd049c345564b36a2b5b83d00e6e3c675d04309f 30-Nov-2009 Ralf Habacker <ralf.habacker@freenet.de> use dbus provided wait function
est-service.c
fa2a53309d25add04b217363a46888c9f31bc687 03-May-2009 Frank Osterfeld <frank@kdab.net> fix warning, use Sleep, not _sleep on windows (cherry picked from commit ea36c743ad60a2dd5c6286571d1a475903519809)
est-sleep-forever.c
be89ffacc9051238d9b99b1b3e4fa5f67a9c7f5f 18-Sep-2009 Colin Watson <cjwatson@ubuntu.com> Fix link order: system libraries should come after libdbus-convenience

libdbus-convenience may use system libraries, but not the other way
round. Most platforms don't care, but on some platforms this means that
system libraries need to be listed after libdbus-convenience.la on the
link line.
akefile.am
4a342d711f74e545e975fcfc9edcf2c7c63f0724 16-Jul-2009 Thiago Macieira <thiago@kde.org> Fix running tests when builddir != srcdir.

This script is not deployed to the builddir, so it cannot be
run with relative paths.
ame-test/run-test-systemserver.sh
dc33f4f7749ed303374ebdf00e48ea8a471afd25 11-Jul-2009 Tobias Mueller <fdo-bugs@cryptobitch.de> Bug 21161 - Update the FSF address

No comment.

Signed-off-by: Colin Walters <walters@verbum.org>
(cherry picked from commit 5baf2f856a9c6625993234855b07680da1c8916f)
reak-loader.c
ecode-gcov.c
576a87dc5aa146fbdaa9944c98f50f23268c804f 11-Jul-2009 Colin Walters <walters@verbum.org> Add missing include for unistd.h in test-service.c

We use usleep here.
(cherry picked from commit e5310abd6cbc4c2e1a9df54f097d6642ad0833c6)
est-service.c
0539a23c661f028da63526996b6463ef342bb4f3 12-May-2009 Scott James Remnant <scott@ubuntu.com> Add tests for pending call timeouts

* test/test-service.c (handle_delay_echo, path_message_func): Add a
variant of the Echo method which sleeps for a short time.
* test/name-test/test-pending-call-timeout.c: Run tests with default,
specified and infinite timeout to make sure we get the reply.
* test/name-test/run-test.sh: Run the new test
* test/name-test/Makefile.am: Build the new test

Signed-off-by: Scott James Remnant <scott@ubuntu.com>
(cherry picked from commit c1f165261afcc3bafa9b24ff916bb231628e3782)
ame-test/.gitignore
ame-test/Makefile.am
ame-test/run-test.sh
ame-test/test-pending-call-timeout.c
est-service.c
5baf2f856a9c6625993234855b07680da1c8916f 11-Jul-2009 Tobias Mueller <fdo-bugs@cryptobitch.de> Bug 21161 - Update the FSF address

No comment.

Signed-off-by: Colin Walters <walters@verbum.org>
reak-loader.c
ecode-gcov.c
e5310abd6cbc4c2e1a9df54f097d6642ad0833c6 11-Jul-2009 Colin Walters <walters@verbum.org> Add missing include for unistd.h in test-service.c

We use usleep here.
est-service.c
c1f165261afcc3bafa9b24ff916bb231628e3782 12-May-2009 Scott James Remnant <scott@ubuntu.com> Add tests for pending call timeouts

* test/test-service.c (handle_delay_echo, path_message_func): Add a
variant of the Echo method which sleeps for a short time.
* test/name-test/test-pending-call-timeout.c: Run tests with default,
specified and infinite timeout to make sure we get the reply.
* test/name-test/run-test.sh: Run the new test
* test/name-test/Makefile.am: Build the new test

Signed-off-by: Scott James Remnant <scott@ubuntu.com>
ame-test/.gitignore
ame-test/Makefile.am
ame-test/run-test.sh
ame-test/test-pending-call-timeout.c
est-service.c
eb3b99e7c610988823804f5e6c92aa13459605c7 21-Apr-2009 Kjartan Maraas <kmaraas@gnome.org> Bug 19502 - Sparse warning cleanups

This patch makes various things that should be static static,
corrects some "return FALSE" where it should be NULL, etc.

Signed-off-by: Colin Walters <walters@verbum.org>
ame-test/test-names.c
ame-test/test-shutdown.c
3c89788fa483ebda858ab66797e2834af94b798f 21-Apr-2009 Kjartan Maraas <kmaraas@gnome.org> Bug 19502 - Sparse warning cleanups

This patch makes various things that should be static static,
corrects some "return FALSE" where it should be NULL, etc.

Signed-off-by: Colin Walters <walters@verbum.org>
ame-test/test-names.c
ame-test/test-shutdown.c
dc77c213742d2a373e3ed134168e4377e7c99a61 12-Dec-2008 Colin Walters <walters@verbum.org> Clean up and clarify default system policy

The former was too reliant on old bugs and was generally unclear.
This one makes explicit exactly what is allowed and not.
ame-test/tmp-session-like-system.conf
c224ba1861b1492db7e1f7f8c9f183acd2076c79 16-Dec-2008 Colin Walters <walters@verbum.org> Merge commit '3d6abf64d0abb2718e082e120f14f8f923a4af59' into dbus-1.2
69ed32cbccbec9d613447cb64e9d7b1ffa11ce3c 10-Dec-2008 Colin Walters <walters@verbum.org> Add syslog of security denials and configuration file reloads

We need to start logging denials so that they become more easily trackable
and debuggable.
ame-test/tmp-session-like-system.conf
3d6abf64d0abb2718e082e120f14f8f923a4af59 12-Dec-2008 Colin Walters <walters@verbum.org> Clean up and clarify default system policy

The former was too reliant on old bugs and was generally unclear.
This one makes explicit exactly what is allowed and not.
ame-test/tmp-session-like-system.conf
bb2a464067c6843320f367b590b0e4cb00225e50 10-Dec-2008 Colin Walters <walters@verbum.org> Add syslog of security denials and configuration file reloads

We need to start logging denials so that they become more easily trackable
and debuggable.
ame-test/tmp-session-like-system.conf
d899734475f09068dfa410c91e126e1442b0325e 09-Dec-2008 Colin Walters <walters@verbum.org> Bug 18229: Allow signals

Our previous fix went too far towards lockdown; many things rely
on signals to work, and there's no really good reason to restrict
which signals can be emitted on the bus because we can't tie
them to a particular sender.
ame-test/Makefile.am
ame-test/run-test-systemserver.sh
ame-test/test-wait-for-echo.py
ame-test/tmp-session-like-system.conf
920c3c0292b57b30718dde9f4900790a3b60db1f 09-Dec-2008 Colin Walters <walters@verbum.org> Bug 18229: Allow signals

Our previous fix went too far towards lockdown; many things rely
on signals to work, and there's no really good reason to restrict
which signals can be emitted on the bus because we can't tie
them to a particular sender.
ame-test/Makefile.am
ame-test/run-test-systemserver.sh
ame-test/test-wait-for-echo.py
ame-test/tmp-session-like-system.conf
c5526c18ad4dbf706e12ae46c5b8b26efa17e52c 04-Dec-2008 Colin Walters <walters@verbum.org> Infrastructure for testing a "system like" bus in test suite

The tmp-session-like-system.conf bus configuration has a security
policy intended to mirror that of the system bus. This allows
testing policy rules.
ame-test/Makefile.am
ame-test/run-test-systemserver.sh
ame-test/tmp-session-like-system.conf
4a436c35546be59d41c27b156815313e7f90f996 04-Dec-2008 Colin Walters <walters@verbum.org> Infrastructure for testing a "system like" bus in test suite

The tmp-session-like-system.conf bus configuration has a security
policy intended to mirror that of the system bus. This allows
testing policy rules.
ame-test/Makefile.am
ame-test/run-test-systemserver.sh
ame-test/tmp-session-like-system.conf
4cbc30465e4fba8026240945cac7a651fda5dca3 24-Jul-2008 Scott James Remnant <scott@netsplit.com> Bug 16839: Fix bus names in test case so it actually works.

* test/name-test/test-privserver.c (filter_session_message, main),
* test/name-test/test-privserver-client.c (open_shutdown_private_connection):
Replace TestServer with PrivServer to match the service definition files.
ame-test/test-privserver-client.c
ame-test/test-privserver.c
0e2a099b55a50b9b5a0f948e134b5a88e2924262 31-May-2008 Colin Walters <walters@verbum.org> Bug 15571: Clean up GUID-less connections correctly (Scott James Remnant)

* dbus/dbus-connection.c (connection_forget_shared_unlocked):
Remove shared connections which lack a GUID from the list that
caches those, otherwise references to them will remain after
they have been freed.
* test/name-test/test-privserver-client.c: Update test to
try GUID-less connections too.
ame-test/test-privserver-client.c
fd32a72b2f3855ef551d0063ea1e6bea4554be08 31-May-2008 Colin Walters <walters@verbum.org> Bug 15570: Reset initialized state on dbus_shutdown (Scott James Remnant)

* dbus/dbus-bus.c (addresses_shutdown_func): Reset initialized back
to FALSE after cleaning up the address list so that it will be
reinitialized again if D-Bus is used after dbus_shutdown()
* test/name-test/test-privserver-client.c: Uncomment part of
test which should now pass.
ame-test/test-privserver-client.c
5e359834f28b0580e7b79a057614d4e3592709ac 30-May-2008 Colin Walters <walters@verbum.org> Add "PrivServer" test which exercises DBusServer and dbus_shutdown

* test/data/valid-service-files/org.freedesktop.DBus.TestSuite.PrivServer.service.in:
New service file for PrivServer.
* configure.in: Generate it.
* test/name-test/Makefile.am: Build test-privserver and
test-privserver-client.
* test/name-test/test-privserver.c: Use DBusServer to
serve a private connection.
* test/name-test/test-privserver-client.c: Connect
via session bus and get address of private server,
exercise dbus_shutdown().
* test/name-test/run-test.sh: Run it.
ata/valid-service-files/org.freedesktop.DBus.TestSuite.PrivServer.service.in
ame-test/Makefile.am
ame-test/run-test.sh
ame-test/test-privserver-client.c
ame-test/test-privserver.c
a73a79a155e97a3bd0d3ce5001ca6b9db803eeeb 30-May-2008 Colin Walters <walters@verbum.org> Add noinst convenience test library, add a test-shutdown

* test/Makefile.am: New convenience library
libdbus_testutils_la. Reorder build so that
test/ gets built before test/name-test so
name-test files can depend on it.
* test/name-test/test-shutdown.c: New file,
exercises dbus_shutdown () a bit.
* test/name-test/run-test.sh Run test-shutdown.
* test/test-utils.h: In some cases we already have
DBUS_COMPILATION defined, avoid double definition
warning.
akefile.am
ame-test/Makefile.am
ame-test/run-test.sh
ame-test/test-shutdown.c
est-utils.h
9d8989cfec02e6ca41f8ffa0ccda16c93ddcb23c 30-May-2008 Colin Walters <walters@verbum.org> Add test library functions for using DBusServer

* test/test-utils.h, test/test-utils.c: Add functions
which hook up a DBusServer to a DBusLoop, useful
for test cases.
est-utils.c
est-utils.h
94bc113117ea967c3c77d6a19ab3971ac6455765 15-Jan-2008 John (J5) Palmieri <johnp@redhat.com> make shell script more portable (FDO Bug #11667)

2008-01-15 John (J5) Palmieri <johnp@redhat.com>

* tests/name-test/run-test.sh: make more portable (FDO Bug #11667)
ame-test/run-test.sh
9f22c3e1e86e68500ead0cc664869da2b4af7c12 10-Oct-2007 Simon McVittie <simon.mcvittie@collabora.co.uk> Bring .gitignore files up to date; add *.o, *~ etc. to top-level .gitignore
CVS ignores these automatically, so they weren't in the .cvsignore when Ryan
converted the repository.
ata/invalid-service-files-system/.gitignore
ata/valid-config-files-system/.gitignore
ata/valid-service-files-system/.gitignore
ata/valid-service-files/.gitignore
ame-test/.gitignore
d34905d8115a187a8846da0d2c67eb3826a71a8e 13-Sep-2007 Ryan Lortie <desrt@desrt.ca> migrate from cvs to git (cvs2svn -> git-svnimport).

2007-09-13 Ryan Lortie <desrt@desrt.ca>

migrate from cvs to git (cvs2svn -> git-svnimport).

* HACKING: update release/branch/tag instructions
* */.cvsignore: rename to .gitignore

also, clean up tags and branch names to conform to HACKING
cvsignore
gitignore
ata/valid-config-files/.cvsignore
ata/valid-config-files/.gitignore
ata/valid-service-files/.cvsignore
ata/valid-service-files/.gitignore
lib/.cvsignore
ame-test/.cvsignore
ame-test/.gitignore
bdbab1212390d85a82d4195fa67a5c63ac0678cb 27-Jul-2007 Havoc Pennington <hp@redhat.com> 2007-07-26 Havoc Pennington <hp@redhat.com>

* bus/config-parser-trivial.c (check_return_values): disable a
test that hardcoded the bus user's name

* bus/dispatch.c (bus_dispatch_test_conf): remove the "if
(!use_launcher)" around the tests, they were only failing because
we didn't pass through all the expected errors from the helper.

* bus/activation-exit-codes.h
(BUS_SPAWN_EXIT_CODE_CHILD_SIGNALED): add a code for child segfaulting
(BUS_SPAWN_EXIT_CODE_GENERIC_FAILURE): make "1" be a generic
failure code, so if a third party launch helper were written it
could just always return 1 on failure.
ame-test/test-names.c
ba38a9b12ffee5d07f1e4a2a9585805695795219 27-Jul-2007 Havoc Pennington <hp@redhat.com> fix whitespace
ame-test/test-names.c
5cfa0506c250b018c4aefd35bc49221ce7b4ad26 24-Jul-2007 Richard Hughes <richard@hughsie.com> 2007-07-24 Richard Hughes <richard@hughsie.com>

* configure.in:
* test/Makefile.am:
* test/data/invalid-service-files-system/org.freedesktop.DBus.TestS
uiteNoExec.service.in:
* test/data/invalid-service-files-system/org.freedesktop.DBus.TestS
uiteNoService.service.in:
* test/data/invalid-service-files-system/org.freedesktop.DBus.TestS
uiteNoUser.service.in:
* test/data/valid-config-files-system/debug-allow-all-fail.conf.in:
* test/data/valid-config-files-system/debug-allow-all-pass.conf.in:
* test/data/valid-config-files/debug-allow-all-sha1.conf.in:
* test/data/valid-config-files/debug-allow-all.conf.in:
* test/data/valid-service-files-system/org.freedesktop.DBus.TestSui
teEchoService.service.in:
* test/data/valid-service-files-system/org.freedesktop.DBus.TestSui
teSegfaultService.service.in:
* test/data/valid-service-files-system/org.freedesktop.DBus.TestSui
teShellEchoServiceFail.service.in:
* test/data/valid-service-files-system/org.freedesktop.DBus.TestSui
teShellEchoServiceSuccess.service.in:
* test/data/valid-service-files/debug-echo.service.in:
* test/data/valid-service-files/debug-segfault.service.in:
* test/data/valid-service-files/debug-shell-echo-fail.service.in:
* test/data/valid-service-files/debug-shell-echo-success.service.in:
* test/data/valid-service-files/org.freedesktop.DBus.TestSuiteEchoS
ervice.service.in:
* test/data/valid-service-files/org.freedesktop.DBus.TestSuiteSegfa
ultService.service.in:
* test/data/valid-service-files/org.freedesktop.DBus.TestSuiteShell
EchoServiceFail.service.in:
* test/data/valid-service-files/org.freedesktop.DBus.TestSuiteShell
EchoServiceSuccess.service.in:
Add the data files needed by the system activation unit checks.
akefile.am
ata/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoExec.service.in
ata/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoService.service.in
ata/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoUser.service.in
ata/valid-config-files-system/debug-allow-all-fail.conf.in
ata/valid-config-files-system/debug-allow-all-pass.conf.in
ata/valid-config-files/debug-allow-all-sha1.conf.in
ata/valid-config-files/debug-allow-all.conf.in
ata/valid-service-files-system/org.freedesktop.DBus.TestSuiteEchoService.service.in
ata/valid-service-files-system/org.freedesktop.DBus.TestSuiteSegfaultService.service.in
ata/valid-service-files-system/org.freedesktop.DBus.TestSuiteShellEchoServiceFail.service.in
ata/valid-service-files-system/org.freedesktop.DBus.TestSuiteShellEchoServiceSuccess.service.in
ata/valid-service-files/debug-echo.service.in
ata/valid-service-files/debug-segfault.service.in
ata/valid-service-files/debug-shell-echo-fail.service.in
ata/valid-service-files/debug-shell-echo-success.service.in
ata/valid-service-files/org.freedesktop.DBus.TestSuiteEchoService.service.in
ata/valid-service-files/org.freedesktop.DBus.TestSuiteSegfaultService.service.in
ata/valid-service-files/org.freedesktop.DBus.TestSuiteShellEchoServiceFail.service.in
ata/valid-service-files/org.freedesktop.DBus.TestSuiteShellEchoServiceSuccess.service.in
d012387afef0ba02185ebe27bc6bb15551912e92 14-Jul-2007 Havoc Pennington <hp@redhat.com> 2007-07-13 Havoc Pennington <hp@redhat.com>

* Add indent-tabs-mode: nil to all file headers.
reak-loader.c
ecode-gcov.c
f1cb3ee0e7b7b244780379c71b6444974c016809 23-Jun-2007 Ralf Habacker <ralf.habacker@freenet.de> * dbus/dbus-auth-script.c (_dbus_auth_script_run): added UNIX_ONLY and WIN_ONLY commands for auth scripts
* test/data/auth/external-root.auth-script: limit execution to unix
ata/auth/external-root.auth-script
54b943432c7c947db88066751dd36a372cc9a618 18-Jun-2007 Havoc Pennington <hp@redhat.com> 2007-06-18 Havoc Pennington <hp@redhat.com>

* doc/dbus-specification.xml: document org.freedesktop.DBus.GetId()

* bus/driver.c (bus_driver_handle_get_id): implement org.freedesktop.DBus.GetId()

* bus/bus.c (bus_context_new): generate a unique ID for each bus context

* dbus/dbus-connection.c (dbus_connection_get_server_id): new function

* dbus/dbus-bus.c (dbus_bus_get_id): new function

* dbus/dbus-server.c (dbus_server_get_id): new function
akefile.am
ame-test/Makefile.am
ame-test/run-test.sh
ame-test/test-ids.c
a789b7b38cb4f4540a41444cbd64bf7ada2d60d2 10-Jun-2007 Havoc Pennington <hp@redhat.com> 2007-06-09 Havoc Pennington <hp@redhat.com>

* dbus/dbus-string.c (_dbus_string_pop_line): fix this not to
think an empty line is the end of the file.
Also, fix some whitespace.

* dbus/dbus-string-util.c: add more tests for
_dbus_string_pop_line() revealing that it thinks an empty line is
the end of the file, which broke dbus-auth-script.c so
it didn't really run the scripts

* dbus/dbus-auth.c: add ANONYMOUS mechanism

* dbus/dbus-auth-script.c (_dbus_auth_script_run): fix to detect
an empty/no-op auth script; add commands to check that we have or
don't have the expected credentials
ata/auth/anonymous-client-successful.auth-script
ata/auth/anonymous-server-successful.auth-script
ata/auth/external-failed.auth-script
ata/auth/external-root.auth-script
ata/auth/external-silly.auth-script
ata/auth/external-successful.auth-script
23832672266bb4ff23b66247c0cfa1a2ed0cc97b 09-Jun-2007 Havoc Pennington <hp@redhat.com> 2007-06-09 Havoc Pennington <hp@redhat.com>

* bus/dispatch.c (check_get_connection_unix_process_id): adapt
since sysdeps-unix.h stuff isn't included anymore

* bus/bus.c (bus_context_new): use more abstract functions to
change user, so they can be no-ops on Windows

* dbus/dbus-credentials.c, dbus/dbus-credentials.h,
dbus/dbus-credentials-util.c: new files containing a fully opaque
DBusCredentials data type to replace the old not opaque one.

* configure.in (DBUS_UNIX): define DBUS_UNIX to match DBUS_WIN on
windows

* dbus/dbus-userdb.h: prohibit on Windows, next step is to clean
up the uses of it in bus/*.c and factor out the parts of
cookie auth that depend on it
akefile.am
6b4bd7d2e930b1d57ee1e863ddc81a2b0b752a65 21-May-2007 Simon McVittie <simon.mcvittie@collabora.co.uk> tools/.cvsignore: Ignore all currently built files.
test/name-test/.cvsignore: New file, ditto.
ame-test/.cvsignore
892780c35e6edc4103858c2df55547c4f07d5c4f 08-Mar-2007 Ralf Habacker <ralf.habacker@freenet.de> * configure.in, cmake/ConfigureChecks.cmake: added check for setrlimit.
* test/test-segfault.c: only include setrlimit stuff only when available.
est-segfault.c
42fe5c9341e9493ed94b319bb00063f432dd0673 07-Mar-2007 Ralf Habacker <ralf.habacker@freenet.de> * test/test-segfault.c: unix compile fix.
* dbus-win.patch: removed obsolate patch.
est-segfault.c
de9038c98494c7a330d0daf04ccacef4e14e7b98 07-Mar-2007 Ralf Habacker <ralf.habacker@freenet.de> * bus/activation.c: win32 compile fix.
* test/test-segfault.c: win32 compile fix, rlimit isn't available on win32.
* dbus-win.patch: removed some more patches, they are applied or obsolate
est-segfault.c
329f99a197819ac3978c409b1b9f4ef68297a825 04-Mar-2007 Ralf Habacker <ralf.habacker@freenet.de> * dbus/dbus-spawn.c,dbus/dbus-spawn.h (_dbus_spawn_async_with_babysitter):
added environment pointer as function parameter,used on win32.

* test/spawn-test.c: fixed call to above mentioned function.
pawn-test.c
7f3af4748f8deff75fce6dd50d0005aadfd4985c 04-Mar-2007 Ralf Habacker <ralf.habacker@freenet.de> * configure.in,test/test-sleep-forever.c,test/test-names.c:
added configure check for unistd.h.
ame-test/test-names.c
est-sleep-forever.c
4d568118513d1475fa2e780e0c0ed8d48cace9f6 04-Mar-2007 Ralf Habacker <ralf.habacker@freenet.de> * test/Makefile.am: fixed test data copy problem in
out of source build, when sources came from svn or cvs.
akefile.am
2d760baacebcabf276261eb8999a7d29cefc3ac5 14-Nov-2006 John (J5) Palmieri <johnp@redhat.com> * dbus/dbus-threads.h: fix DBUS_THREAD_FUNCTIONS_ALL_MASK to have
the correct value so we don't assert when initalizing recursive threads

* test/name-test/test-thread-init.c: call dbus_threads_init_default
instead of _dbus_threads_init_debug since it is more of a real world
test
ame-test/test-threads-init.c
5640f7a57b6c8b2e1847e99db412db3c41c9eb98 02-Nov-2006 John (J5) Palmieri <johnp@redhat.com> * configure.in: expose DBUS_DATADIR

* bus/config-parser.c: add the standard_session_servicedirs element
to the parser
(bus_config_parser_content): process the standard_session_servicedirs
element by getting the standard directories from sysdeps and merging
them into the service directory list
(test_default_session_servicedirs): make sure we get what we expect

* bus/session.conf.in: replace the servicedir tag with the
standard_session_servicedirs tag

* dbus/dbus-list.h: remove the typedef of DBusList and place it in
dbus-sysdeps.h to avoid circular header dependencies

* dbus/dbus-sysdeps.h: add the typedef of DBusList

* dbus/dbus-sysdeps-unix.c (split_paths_and_append): utility function
which takes a string of directories delimited by colons, parses them
out, appends a suffix and puts them in a list ignoring empty elements
(_dbus_get_standard_session_servicedirs): returns the standard
directories for a session bus to look for service activation files
on Unix which includes the XDG_DATA_HOME, XDG_DATA_DIRS and
DBUS_DATADIR directories

* test/data/valid-config-files/many-rules.conf: add the
standard_session_servicedirs tag to the valid config file tests
ata/valid-config-files/many-rules.conf
82c9cd05cd19a397043db94025c7a80e75386e8a 26-Oct-2006 John (J5) Palmieri <johnp@redhat.com> * configure.in, dbus-1.pc.in: Check to see if thread methods
are in glibc or libpthread and add -lpthread to the link stage
if it is the latter
ame-test/Makefile.am
2db06dbf189cfd4e852b93db120cafaf717b0784 11-Oct-2006 John (J5) Palmieri <johnp@redhat.com> * test/name-test/Makefile.am: don't link against both libdbus and
libdbus-convenience
ame-test/Makefile.am
7020b573764bb86551d329e867c2e87172424c9b 01-Oct-2006 Havoc Pennington <hp@redhat.com> 2006-10-01 Havoc Pennington <hp@redhat.com>

* test/test-service.c (path_message_func): remove broken extra
unref that was hidden by the bugs in dbus-connection.c/dbus-bus.c

* test/test-shell-service.c (path_message_func): same fix

* dbus/dbus-connection.c
(_dbus_connection_get_dispatch_status_unlocked): break up the
function a little for clarity and fix the notification of
dbus-bus.c to not require dispatch to be complete

* dbus/dbus-connection.c (dbus_connection_unref): improve the
warning when you try to finalize an open connection.
est-service.c
est-shell-service.c
a2129f7cccaf0265fffe0da79ca0510b6e01131b 01-Oct-2006 Havoc Pennington <hp@redhat.com> 2006-10-01 Havoc Pennington <hp@redhat.com>

* dbus/dbus-connection.c (_dbus_connection_close_if_only_one_ref):
Add a hack to make DBusNewConnectionFunction work right.

* dbus/dbus-server-socket.c (handle_new_client_fd_and_unlock): use
the hack here. Also, fix the todo about refcount leak.

* dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
and use the hack here

* dbus/dbus-connection.c: Kill the "shared" flag vs. the
"shareable" flag; this was completely broken, since it meant
dbus_connection_open() returned a connection of unknown
shared-ness. Now, we always hold a ref on anything opened
as shareable.

Move the call to notify dbus-bus.c into
connection_forget_shared_unlocked, so libdbus consistently forgets
all its knowledge of a connection at once. This exposed numerous
places where things were totally broken if we dropped a ref inside
get_dispatch_status_unlocked where
connection_forget_shared_unlocked was previously, so move
connection_forget_shared_unlocked into
_dbus_connection_update_dispatch_status_and_unlock. Also move the
exit_on_disconnect here.

(shared_connections_shutdown): this assumed weak refs to the
shared connections; since we have strong refs now, the assertion
was failing and stuff was left in the hash. Fix it to close
still-open shared connections.

* bus/dispatch.c: fixup to use dbus_connection_open_private on the
debug pipe connections

* dbus/dbus-connection.c (dbus_connection_dispatch): only notify
dbus-bus.c if the closed connection is in fact shared
(_dbus_connection_close_possibly_shared): rename from
_dbus_connection_close_internal
(dbus_connection_close, dbus_connection_open,
dbus_connection_open_private): Improve docs to explain the deal
with when you should close or unref or both

* dbus/dbus-bus.c
(_dbus_bus_notify_shared_connection_disconnected_unlocked): rename
from _dbus_bus_check_connection_and_unref_unlocked and modify to
loop over all connections

* test/test-utils.c (test_connection_shutdown): don't try to close
shared connections.

* test/name-test/test-threads-init.c (main): fix warnings in here

* dbus/dbus-sysdeps.c (_dbus_abort): support DBUS_BLOCK_ON_ABORT
env variable to cause blocking waiting for gdb; drop
DBUS_PRINT_BACKTRACE and just call _dbus_print_backtrace()
unconditionally.

* configure.in: add -export-dynamic to libtool flags if assertions enabled
so _dbus_print_backtrace works.

* dbus/dbus-sysdeps-unix.c (_dbus_print_backtrace): use fprintf
instead of _dbus_verbose to print the backtrace, and diagnose lack
of -rdynamic/-export-dynamic
akefile.am
ame-test/Makefile.am
ame-test/test-threads-init.c
est-utils.c
1eae184450a585f10c8988613e0f7259e1d6066a 07-Sep-2006 John (J5) Palmieri <johnp@redhat.com> * doc/TODO:
- Remove pending call locking todo item
- dbus_connection_open now holds hard ref. Remove todo item
- do proper locking on _dbus_bus_check_connection_and_unref
and handle DBUS_BUS_STARTER. Remove todo item
- Warn on closing of a shared connection. Remove todo item

* bus/bus.c, bus/connection.c, bus/dispatch.c, dbus/dbus-bus.c,
dbus/dbus-connection.c: Use the dbus_connection_close_internal
so we don't get the warning when closing shared connections

* test/test-service.c, test/test-shell-service.c: Applications
don't close shared connections themselves so we unref instead of
close

* test/test-utils.c (test_connection_shutdown): Close the connection

* dbus/dbus-bus.c (_dbus_bus_check_connection_and_unref): Changed to
_dbus_bus_check_connection_and_unref_unlocked since we only call this
method on a locked connection.
Make sure we call _dbus_connection_unref_unlocked instead of
dbus_connection_unref also.
Handle DBUS_BUS_STARTER correctly

* dbus/dbus-connection.c (connection_record_shared_unlocked):
Mark as shared and hard ref the connection
(connection_forget_shared_unlocked): Remove the hard ref from the
connection
(_dbus_connection_close_internal_and_unlock): New internal function
which takes a locked connection and unlocks it after closing it
(_dbus_connection_close_internal): New internal function which acts
like the origonal dbus_connection_close method by grabbing a connection
lock and calling _dbus_connection_close_internal_and_unlock
(dbus_connection_close): Public close method, warns when the app
trys to close a shared connection
est-service.c
est-shell-service.c
est-utils.c
afc2a6e56a65ff9154d4eb1b346157a7d625945d 30-Aug-2006 Havoc Pennington <hp@redhat.com> 2006-08-29 Havoc Pennington <hp@redhat.com>

* test/test-service.c (path_message_func): fix lack of return value

* dbus/dbus-sysdeps.c (_dbus_printf_string_upper_bound): fix
formatting, remove #ifdef, and fix docs. #ifdef doesn't make
any more sense than on anything else in this file.
(_dbus_get_tmpdir): add const to return value, and keep the
results of the various getenv around in a static variable.
est-service.c
c904d4d5010aff2b33198069d7256c4cfdfff15e 25-Aug-2006 John (J5) Palmieri <johnp@redhat.com> * test/Makefile.am: change find to use syntax that works with non
gnu versions of find
akefile.am
163f42a8b14491ea6f70a20a8d93f580d43f6c40 25-Aug-2006 John (J5) Palmieri <johnp@redhat.com> * configure.in, dbus/Makefile.am, test/name-test/run-test.sh,
test/name-test/Makefile.am: Fixed some issues with getting get dbus
to build with builddir != srcdir (Taken from a patch by Bernard Leak
<bernard at brenda-arkle dot demon dot co dot uk>)
ame-test/Makefile.am
ame-test/run-test.sh
14cc7d28a8308060428bbc9b3dd357eaea3a4749 17-Aug-2006 John (J5) Palmieri <johnp@redhat.com> * dbus/dbus-threads.c: Add static DBusList *uninitialized_mutex_list and
static DBusList *uninitialized_condvar_list to support new late
initialization threading model. In this model threads can be initialized
even after the D-Bus API has been used but still needs to be initialized
before the second thread has been started. Mutexes and condvar addresses
are stored in the two static lists and are replaced with actuall locks
when threads are initalized.
(_dbus_mutex_new_at_location): New method for creating a mutex and placing
the location into the static list
(_dbus_mutex_free_at_location): New method for removing a mutex location
from the static list and freeing the mutex
(_dbus_condvar_new_at_location): New method for creating a conditional
variable and placing the location into the static list
(_dbus_condvar_free_at_location): New method for removing a conditional
variable location from the static list and freeing the conditional variable
(init_uninitialized_locks): Atomic method which goes through the static
lists of mutex and condvar location and updates them with actuall locks
(init_global_locks): changed to init_locks

* dbus/dbus-connection.c:
(_dbus_connection_test_get_locks): New method for tests to check connections
(_dbus_connection_new_for_transport): Use the new at_location mutex and
condvar API
(dbus_connection_allocate_data_slot): Pass in the global lock address
to _dbus_data_slot_allocator_alloc

* dbus/dbus-dataslot.c:
(_dbus_data_slot_allocator_alloc): Use the address of the mutex
instead of the mutex itself

* dbus/dbus-message.c:
(dbus_message_allocate_data_slot): Pass in the global lock address
to _dbus_data_slot_allocator_alloc

* dbus/dbus-pending-call.c:
(dbus_pending_call_allocate_data_slot): Pass in the global lock address
to _dbus_data_slot_allocator_alloc

* dbus/dbus-server.c:
(_dbus_server_init_base): Use the new at_location mutex API
(dbus_server_allocate_data_slot): Pass in the global lock address
to _dbus_data_slot_allocator_alloc

* test/name-test/test-threads-init.c: New test case for late thread
initialization
ame-test/Makefile.am
ame-test/run-test.sh
ame-test/test-threads-init.c
c1091cbbd2477699dc16f8c8e3d15fea2f68d603 14-Aug-2006 John (J5) Palmieri <johnp@redhat.com> Patches by Kjartan Maraas <kmaraas at gnome dot org>

* bus/services.c (bus_service_list_queued_owners):
Add a pointer cast to fix compiler warning

* dbus/dbus-dataslot.c (_dbus_data_slot_list_get):
return a NULL instead of FALSE since the return type
is not expecting a boolean

* dbus/dbus-marshal-basic.c (_dbus_marshal_test):
Remove unused variable

* dbus/dbus-marshal-recursive-util.c (node_new):
return a NULL instead of FALSE since the return type
is not expecting a boolean

* dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
Send a NULL into _dbus_transport_new_for_fd instead of a FALSE
because we are expecting a pointer not a boolean

* dbus/dbus-sysdeps-util.c (_dbus_get_tmpdir):
add void as the parameter so some compilers
don't complain

* dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket,
_dbus_transport_new_for_tcp_socket):
Send a NULL into _dbus_transport_new_for_fd instead of a FALSE
because we are expecting a pointer not a boolean

* test/shell-test.c (test_command_line):
cast the second argument to _dbus_list_append to avoid compiler
warnings

* test/test-names.c (main): remove unused variable

* test/test-service.c (check_hello_from_self_reply):
Initialize echo_message and echo_reply to NULL

* test/test-shell-service.c (handle_echo):
Remove unused variable and cast the third parameter passed to
dbus_connection_get_object_path_data to avoid compiler warrnings

* test/name-test/test-names.c (clear_message_queue):
Remove unused function

* test/name-test/test-pending-call-dispatch.c:
Fix format string in printf
ame-test/test-names.c
ame-test/test-pending-call-dispatch.c
hell-test.c
est-names.c
est-service.c
est-shell-service.c
2592a2abb26683bf0a2ec23b6aa19dc7bafa5878 14-Aug-2006 John (J5) Palmieri <johnp@redhat.com> * dbus/dbus-bus.c:
* test/name-test/test-names.c:
Remove test method dbus_bus_connection_get_unique_name because
we already have public method dbus_bus_get_unique_name that
does the exact same thing
ame-test/test-names.c
47ec532cf258ad5bc53aaa1e433aa302d75a18ac 10-Aug-2006 John (J5) Palmieri <johnp@redhat.com> * tools/run-with-tmp-session-bus.sh:
* test/name-test/run-test.sh:
Remove bashisms (patch from Julio M. Merino Vidal
<jmmv at NetBSD dot org>)
ame-test/run-test.sh
2974c82428b5d9d3e1f504ba4052aec47fc2b415 10-Aug-2006 John (J5) Palmieri <johnp@redhat.com> * dbus/dbus-sysdeps.c:
* dbus/dbus-address.c:
* bus/activation.c:
* test/shell-test.c:
don't hardcode tmp directory (patch from Dave Meikle
<dmk at davemeikle dot co dot uk>)
hell-test.c
a929c9a3b465db8b7e17b9b39936c612c2621a7c 14-Jul-2006 John (J5) Palmieri <johnp@redhat.com> * Remove all bindings
akefile.am
ata/valid-service-files/debug-glib.service.in
ata/valid-service-files/debug-python.service.in
lib/Makefile.am
lib/my-object-marshal.list
lib/run-test.sh
lib/test-dbus-glib.c
lib/test-profile.c
lib/test-service-glib.c
lib/test-service-glib.xml
lib/test-thread-client.c
lib/test-thread-server.c
lib/test-thread.h
ython/.cvsignore
ython/Makefile.am
ython/run-test.sh
ython/test-client.py
ython/test-service.py
t/.cvsignore
t/Makefile.am
t/common.h
t/qpong.cpp
t/tst_hal.cpp
t/tst_headertest.cpp
t/tst_qdbusabstractadaptor.cpp
t/tst_qdbusconnection.cpp
t/tst_qdbusinterface.cpp
t/tst_qdbusmarshall.cpp
t/tst_qdbusxmlparser.cpp
fd5ac15ebc643635e436b64cf1e656284380b1a5 11-Jun-2006 Thiago Macieira <thiago@kde.org> * test/qt/*: Update the testcases, including testing the new
functionality of sending null QByteArray and QString over the
bus. Add new headertest test and restore the old
qdbusxmlparser test.
t/Makefile.am
t/common.h
t/ping.cpp
t/qpong.cpp
t/tst_hal.cpp
t/tst_headertest.cpp
t/tst_qdbusabstractadaptor.cpp
t/tst_qdbusconnection.cpp
t/tst_qdbusinterface.cpp
t/tst_qdbusmarshall.cpp
t/tst_qdbusxmlparser.cpp
3ed273a6ed5ba4803e87d2dbb50eafae5a51aeac 10-Apr-2006 Thiago Macieira <thiago@kde.org> * test/qt/tst_hal.cpp: Remove the waiting, since it's not
needed anymore. Requires Qt 4.1.3 to work properly. (r528148)
t/tst_hal.cpp
d54ababd5f67bb621c1b3a911d0853c23df817a1 28-Mar-2006 Thiago Macieira <thiago@kde.org> * test/qt/*: Sync with KDE Subversion revision 523647.
Update the testcases to the new API. Remove testcases for
classes that are no longer public or have been removed.
t/Makefile.am
t/common.h
t/ping.cpp
t/qpong.cpp
t/tst_qdbusabstractadaptor.cpp
t/tst_qdbusconnection.cpp
t/tst_qdbusinterface.cpp
t/tst_qdbusobject.cpp
t/tst_qdbustype.cpp
t/tst_qdbusxmlparser.cpp
12dc0934ae2a1fb92223f84804ad31a57689813c 06-Mar-2006 Thiago Macieira <thiago@kde.org> 2006-03-06 Thiago Macieira <thiago.macieira@trolltech.com>

* test/qt/*: Update the self-tests.
t/Makefile.am
t/common.h
t/ping.cpp
t/qpong.cpp
t/tst_hal.cpp
t/tst_qdbusabstractadaptor.cpp
t/tst_qdbusconnection.cpp
t/tst_qdbusinterface.cpp
t/tst_qdbusobject.cpp
t/tst_qdbustype.cpp
t/tst_qdbusxmlparser.cpp
da4182fb2976608bea64d676677681fdf2cd910b 02-Mar-2006 John (J5) Palmieri <johnp@redhat.com> 2006-03-02 John (J5) Palmieri <johnp@redhat.com>

* dbus/dbus-connection.c:
(_dbus_connection_block_pending_call):
Check to see if our data has already been read off the connection
by another blocking pending call before we block in poll.
(check_for_reply_and_update_dispatch_unlocked):
Code taken from _dbus_connection_block_pending_call - checks for
an already read reply and updates the dispatch if there is one.

* test/name-test/test-pending-call-dispatch.c:
New test for making sure we don't get stuck polling a
dbus connection which has no data on the socket when
blocking out of order on two or more pending calls.
ame-test/Makefile.am
ame-test/run-test.sh
ame-test/test-pending-call-dispatch.c
0d0642b31b9bac2546f9fa2c6bdc55b5ced0b7ad 16-Feb-2006 Robert McQueen <robot101@debian.org> 2006-02-16 Robert McQueen <robot101@debian.org>

* dbus/dbus-message.c (dbus_message_iter_get_fixed_array):
Patch from Rob Taylor <rob.taylor@collabora.co.uk> to correct a bogus
assertion that the next element to read from the iter is fixed in
size. This is not the case when you are at the end of the iter,
because the next element type is INVALID.

* dbus/dbus-string.c (_dbus_string_init_const_len): Correct a
a bogus assert which means that you may not initialise a 0-length
string unless you provide a non-NULL pointer. This prevented
you from marshalling messages containing zero-length arrays in
some cases.

* glib/dbus-gvalue.c (demarshal_collection_array): Another patch
from Rob to correct bogus asserts when trying to demarshal an
array and get_fixed_array got you 0 elements. Append nothing to
the GArray in this case.

* test/glib/test-dbus-glib.c: Add a test case for round-tripping
an empty array via the glib bindings. Without all of the above
patches, this new test fails.
lib/test-dbus-glib.c
9076938fc05fe7f95abb4dc573d29efe54fcef51 15-Feb-2006 Thiago Macieira <thiago@kde.org> Add new tests and update the existing one.
t/Makefile.am
t/tst_hal.cpp
t/tst_qdbusconnection.cpp
t/tst_qdbusinterface.cpp
t/tst_qdbusobject.cpp
t/tst_qdbustype.cpp
t/tst_qdbusxmlparser.cpp
8e00b10d134e4fb844cdc961e5c3230edf194b57 27-Jan-2006 Robert McQueen <robot101@debian.org> 2006-01-27 Robert McQueen <robot101@debian.org>

* glib/dbus-gtype-specialized.[ch], glib/dbus-gvalue-utils.c: Patch
by me and Rob Taylor to add a simple_free function to D-Bus map
and collection types, which allows those types which can be freed
with a GDestroyNotify (such as GHashTables and GArrays, but not
GPtrArrays) to be stored as the values in hashtables.

* test/glib/test-dbus-glib.c, test/glib/test-service-glib.{c,xml}:
Patch by Rob Taylor to add nested dicts to the glib tests to check
the above code works, and appears not to leak when called repeatedly.
lib/test-dbus-glib.c
lib/test-service-glib.c
lib/test-service-glib.xml
e447b1f2becd6feea04ad3e60c1494bb5a1bbdd2 22-Jan-2006 Harald Fernengel <harry@kdevelop.org> convert to QTestLib 4.1
t/tst_qdbusconnection.cpp
b99a1f364535194536eeff70751a9102b7e6ba33 01-Dec-2005 John (J5) Palmieri <johnp@redhat.com> * test/qt/Makefile.am: build from srcdir

* qt/qtconnection.cpp (requestName): Changed PROHIBIT_REPLACE to ALLOW_REPLACE
Note - this code is wrong and needs to be fixed by the Qt binding
developers. The flags should be treated as bitfields and not enums.

* qt/qtconnection.h: Change ProhibitReplace to AllowReplace

* dbus/dbus-list.c (link_after): remove #ifdef DBUS_BUILD_TESTS
t/Makefile.am
0ca96ec548a6e4a1e39429f3c0480adfe7e2eab8 30-Nov-2005 John (J5) Palmieri <johnp@redhat.com> * dbus/dbus-auth.c, dbus/dbus-connection.c, dbus/dbus-keyring.c,
dbus/dbus-server-debug-pipe.c, glib/dbus-binding-tool-glib.c
glib/dbus-glib-tool.c, glib/dbus-gparser.c, glib/dbus-gproxy.c
test/test-segfault.c, test/test-utils.c,
test/glib/test-dbus-glib.c, tools/dbus-cleanup-sockets.c
tools/dbus-launch.c, tools/dbus-tree-view.c, tools/dbus-viewer.c:
Various cleanup of dead code and compiler warnings (patch from
Kjartan Maraas <kmaraas at gnome.org>)
lib/test-dbus-glib.c
est-segfault.c
est-utils.c
3bcfd003b64d8eba41375f98fc1c12c6d153aa14 27-Nov-2005 Robert McQueen <robot101@debian.org> 2005-11-27 Robert McQueen <robot101@debian.org>

* python/dbus_bindings.pyx: Repair my previous commit which reverted
part of the preceding one. Oops. Merge patch by Johan Hedberg
<johan.hedberg@nokia.com> to fix marshalling of 16-bit integer values
on big-endian platforms.

* test/python/test-client.py: Add some 16-bit integers to the test
values.
ython/test-client.py
c77c7e343b73bb9c14319679063a55e5cf1ee1d6 27-Nov-2005 Robert McQueen <robot101@debian.org> 2005-11-27 Robert McQueen <robot101@debian.org>

* python/dbus_bindings.pyx: Fix a bug where doing a strict append
with type v of an instance of dbus.Variant(foo, type='x') caused
it to be boxed twice before sending over the bus.

* python/dbus_bindings.pyx, python/service.py,
test/python/test-client.py: Update the constants for the new
request_name flags, and update comments/test cases now that queueing
is the default action.
ython/test-client.py
1a163e765c0d6a86d2aa2ffb18a1d7e29a052e7a 22-Nov-2005 John (J5) Palmieri <johnp@redhat.com> * configure.in: Add test/name-test/Makefile to the generated
Makefile list

* dbus/dbus-shared.h (#define DBUS_NAME_FLAG_ALLOW_REPLACEMENT):
New flag which replaces DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT
(#define DBUS_NAME_FLAG_DO_NOT_QUEUE): New flag for specifying
not to queue an ower if it can't be the primary owner

* bus/bus.h: Add new internal BusOwner struct

* bus/driver.c (bus_driver_handle_hello): Send flags (0 for default)
to bus_registry_ensure and don't set the prohibit_replacement flag
since they are now set per BusOwner and not per name.
(bus_driver_handle_list_queued_owners): bus method (ListQueuedOwners)
that returns the list of connections in a name's connection queue

* bus/services.c (struct BusService): remove prohibit_replacement field
(struct BusOwner): new struct for keeping track of queued connections
and their associated flags for the queue
(struct BusRegistry): add a BusOwner memory pool
(bus_registry_new): initialize the BusOwner memory pool
(bus_registry_unref): free the BusOwner memory pool
(_bus_service_find_owner_link): new internal method for
searching the queue for a specific connection
(bus_owner_set_flags): new method for adding setting the flags on a
bus owner
(bus_owner_new): new method that creates a BusOwner object from the
pool and sets its flags
(bus_owner_ref, bus_owner_unref): ref counting for BusOwner objects
(bus_registry_ensure): Add the flags parameter
(bus_registry_acquire_service): Switch from using raw connections to
using the BusOwner struct
Add new state machine for dealing with the new set of flags
(bus_registry_set_service_context_table, struct OwnershipCancelData,
cancel_ownership, free_ownership_cancel_data,
add_cancel_ownership_to_transaction, struct OwnershipRestoreData,
restore_ownership, free_ownership_restore_data,
add_restore_ownership_to_transaction): Switch to using BusOwner
instead of raw connections
(bus_service_add_owner): Add flags parameter
Switch to using BusOwner instead of raw connections
Add state machine for dealing with the new set of flags
(bus_service_swap_owner): Swaps the first and second owners in the
queue. Used to make sure proper signals are sent when a service looses
or gains primary ownership. We never insert an owner at the top of the
queue. Instead we insert it in the second position and then swap.
(bus_service_remove_owner): Remove the owner from the queue sending
out the NameLost and NameOwnerChanged signals if the we were the
primary owner
(bus_service_get_primary_owners_connection): New method that extracts
the connection from the primary owner
(bus_service_get_primary_owner): Returns the BusOwner instead of the
connection
(bus_service_get_allow_replacement): Changed from the old
bus_service_get_prohibit_replacement method. Checks the flags of the
primary owner and returns if it can be replaced or not
(bus_service_set_prohibit_replacement): removed
(bus_service_has_owner): returns TRUE if and owner with
the specified connection exists in the queue

* dbus/dbus-bus.c (dbus_bus_connection_get_unique_name): New helper
method that only compiles if tests are enabled. Allows us to get the
unique name of a connection so we can check it against the queue when
doing regression tests

* bus/activation.c (bus_activation_send_pending_auto_activate),
bus/dispatch.c (bus_dispatch),
bus/driver.c (bus_driver_handle_get_service_owner,
bus_driver_handle_get_connection_unix_user,
bus_driver_handle_get_connection_unix_process_id,
bus_driver_handle_get_connection_selinux_security_context),
bus/signals.c (connection_is_primary_owner):
use bus_service_get_primary_owners_connection instead of
bus_service_get_primary_owner

* dbus/dbus-sysdeps.c (_dbus_connect_unix_socket,
_dbus_listen_unix_socket): Calculate the length of the socket
path and use that instead of using a fixed length which was
causing socket names to contain many trailing Nul bytes.

* dbus/dbus-glib-lowlevel.h, glib/dbus-gobject.c
(dbus_g_method_get_sender): New method for extracting the sender
from a DBusGMethodInvocation
(dbus_g_method_return_get_reply): changed name to
dbus_g_method_get_reply
(dbus_g_method_return_send_reply): changed name to
dbus_g_method_send reply

* doc/dbus-specification.xml: New docs that describe how the new
queueing system works and talks about the changes to the how
we specify socket names

* glib/examples/example-service.c,
glib/examples/example-signal-emitter.c,
glib/examples/statemachine/statemachine-server.c:
Changed the RequestName flags to the new system

* test/name-test/ (test-names.c, run-test.sh, Makefile.am): New
regression test suite for testing various states of the new
queueing system
akefile.am
ame-test/Makefile.am
ame-test/run-test.sh
ame-test/test-names.c
b5e4d26adec0a9ec37a1bae7aeb5a68344b78ebf 15-Nov-2005 Robert McQueen <robot101@debian.org> 2005-11-15 Robert McQueen <robot101@debian.org>

* bus/driver.c, bus/services.c, bus/services.h: Add a ReleaseName
method to org.freedesktop.DBus to release a bus name or give up
waiting in the queue for it.

* dbus/dbus-bus.c, dbus/dbus-bus.h, dbus/dbus-shared.h: Add a
dbus_bus_release_name method to send the ReleaseName method calls.
Add constants for the return values to dbus/dbus-shared.h.

* doc/dbus-specification.xml: Document the new ReleaseName method
in the specification.

* python/dbus_bindings.pyx: Add a low-level python binding for the
release name method.

* python/exceptions.py, python/service.py: Make freeing BusName
objects release the name. Add a NameExistsException, and fix a
bug with creating UnknownMethodException.

* test/python/test-client.py: Add tests for freeing BusName
objects causing names to be released.
ython/test-client.py
7b9236f2aef06b203acc019592cd102672427633 14-Nov-2005 Robert McQueen <robot101@debian.org> 2005-11-14 Robert McQueen <robot101@debian.org>

* python/decorators.py, python/service.py: Add a new argument to the
dbus.service.method decorator called sender_keyword, which if set,
specifies the name of an argument which will be provided the bus
name of the method caller.

* test/python/test-client.py, test/python/test-service.py: Add a
method and test to check the sender_keyword functionality.
ython/test-client.py
ython/test-service.py
e598c5edc5b4d3fa7eb474ab3cd93ec6747e4bc0 07-Nov-2005 Robert McQueen <robot101@debian.org> 2005-11-07 Robert McQueen <robot101@debian.org>

* python/decorators.py: Change emit_signal function to use the
signature annotation of the signal when marhsalling the arguments from
the service. Fix a bug where the code checking signature length
against argument length referenced the wrong variable.

* python/introspect_parser.py: Avoid adding the type signature of
signal arguments to any methods which occur after them in the
introspection data (!) by making the parser a little more careful
about its current state.

* python/service.py: Remove debug prints from last commit (again :D).

* test/python/test-client.py, test/python/test-service.py: Add test
signals with signature decorators to test the strict marshalling code
gives errors at the right time. Could do with checking the signals
actually get emitted too, given that the test does nothing with
signals at the moment...
ython/test-client.py
ython/test-service.py
95f9771d6be677d3393aab60f0f56126fbb252a6 07-Nov-2005 Robert McQueen <robot101@debian.org> 2005-11-07 Robert McQueen <robot101@debian.org>

* python/_dbus.py: Add WeakReferenceDictionary cache of dbus.Bus
instances to stop madness of creating new instances representing
the same bus connection all the time, rendering any tracking of
match rules and bus names quite meaningless. Caught a bug where
the private argument to SessionBus() and friends was being passed
in as use_default_mainloop by mistake. Still some problems with
multiple dbus_binding.Connection instances representing the same
low-level connection (eg when you use both SessionBus() and
StarterBus() in same process), but it's a lot better now than it
was.

* python/dbus_bindings.pyx: Add constants with the return values
for bus_request_name().

* python/service.py: Store bus name instances in a per-dbus.Bus cache
and retrieve the same instances for the same name, so deletion can be
done with refcounting. Also now throws some kind of error if you
don't actually get the name you requested, unlike previously...

* test/python/test-client.py: Add tests for instance caching of buses
and bus name objects.
ython/test-client.py
ac36149533cdf3131dec3f43a7e9ea1ee11937f5 04-Nov-2005 Robert McQueen <robot101@debian.org> 2005-11-04 Robert McQueen <robot101@debian.org>

* python/dbus_bindings.pyx, test/python/test-client.py: Fix
marshalling of boolean values. Add some booleans to the values in
the test client.

* python/decorators.py, python/service.py: Add an 'async_callbacks'
argument to the dbus.service.method decorator, which allows you to
name arguments to take two callback functions for replying with
return values or an exception.

* test/python/test-client.py, test/python/test-service.py: Add test
case using asynchronous method reply functions, both return values and
errors, and from within both the function itself and from a mainloop
callback.

* python/decorators.py, python/service.py: Perform checking that the
number of method/signal arguments matches the number of types in the
signature at class loading time, not when you first introspect the
class.

* python/service.py: Remove debug print left by the last commit.
ython/test-client.py
ython/test-service.py
e20c311b131246019ade0c964596a7fda758de68 03-Nov-2005 Robert McQueen <robot101@debian.org> 2005-11-03 Robert McQueen <robot101@debian.org>

* python/service.py: Heavy refactoring of method invocation, with
hopefully no effect on functionality. Nuked _dispatch_dbus_method_call
in favour of a new _message_cb that uses seperate functions for
looking up the method to call, marshalling the return values, and
sending exceptions as errors, and is easier to follow as a
consequence. Fixes some corner cases about returning things that
don't match your declared out_signature, allows exceptions to define
_dbus_error_name and have it be sent over the bus as the error name,
and paves the way for cool stuff like heeding the message no reply
flag, asynchronous method implementations, informing the method of the
sender, and including backtraces in the error messages.

* test/python/test-client.py: Catch and print exceptions thrown in the
async callback tests, rather than passing them to the low-level
bindings to be ignored in a noisy and frustrating manner.
ython/test-client.py
9d0ab378067cd59e12a1ba2671c353e4a8bce356 03-Nov-2005 Robert McQueen <robot101@debian.org> 2005-11-03 Robert McQueen <robot101@debian.org>

* python/_dbus.py, python/proxies.py, python/service.py: Add __repr__
functions to dbus.Bus, dbus.service.BusName and dbus.service.Object,
tweak others to be consistent.

* test/python/test-client.py: Tweak output of testInheritance.
ython/test-client.py
a4b1aa364258be053d195650de9062b090f125c6 30-Oct-2005 Robert McQueen <robot101@debian.org> 2005-10-29 Robert McQueen <robot101@debian.org>

* python/service.py: Major changes to allow multiple inheritance
from classes that define D-Bus interfaces:

1. Create a new Interface class which is the parent class of
Object, and make the ObjectType metaclass into InterfaceType.

2. Patch written with Rob Taylor to replace use of method_vtable
with code that walks the class's __MRO__ (method resolution order)
to behave like Python does when invoking methods and allow
overriding as you'd expect. Code is quite tricky because
we have to find two methods, the one to invoke which has the
right name and isn't decorated with the /wrong/ interface,
and the one to pick up the signatures from which is decorated
with the right interface.

The same caveats apply as to normal multiple inheritance -
this has undefined behaviour if you try and inherit from two
classes that define a method with the same name but are
decorated with different interfaces. You should decorate
your overriding method with the interface you want.

3. Replace grungy introspection XML generation code in the metaclass
with dictionaries that cope correctly with multiple inheritance
and the overriding of methods. This also uses the signature
decorations to provide correct introspection data, including
the debut appearance of the types of your return values. :D

* test/python/test-client.py, test/python/test-service.py: Add a test
case to try invoking an method that overrides one inherited from a
D-Bus interface class.
ython/test-client.py
ython/test-service.py
20bcbaf21f4e94c48d6348a4ba8013d20f9e4d36 29-Oct-2005 Robert McQueen <robot101@debian.org> 2005-10-29 Robert McQueen <robot101@debian.org>

* python/decorators.py: Add optional arguments to the method and
signal decorators to allow you to specify the signature of arguments
and return values. Preserve the doc strings of signal functions in the
decorated version, for pydoc and friends.

* python/dbus_bindings.pyx, python/proxies.py: Replace the
parse_signature_block function with an iterable dbus.Signature()
type. Fix a bug in MessageIter.append_strict where you could append
anything by claiming it was a string.

* python/service.py: Use the out_signature decoration on methods to
marshal return values, meaning you no longer require dbus.Array()
or dbus.Dictionary() to indicate the type when returning empty
arrays or dictionaries. Fix a bug where exceptions which are defined
in __main__ are not turned into error replies.

* test/python/test-client.py, test/python/test-service.py: Add test
for correct marshalling of return values according to out_signature.
Fix a bug in the async call test where the error_handler is missing a
self argument.
ython/test-client.py
ython/test-service.py
2d74492ba2c61a41d9d22a8872806a8184acef16 29-Oct-2005 Robert McQueen <robot101@debian.org> 2005-10-29 Robert McQueen <robot101@debian.org>

* glib/Makefile.am, glib/examples/Makefile.am,
glib/examples/statemachine/Makefile.am: Merge patch from Ubuntu by
Daniel Stone to replace explicit calls to libtool with $(LIBTOOL).

* test/python/.cvsignore: Add run-with-tmp-session-bus.conf.

* tools/dbus-monitor.1, tools/dbus-monitor.c: Merge dbus-monitor patch
from Ubuntu by Daniel Silverstone to allow specifying match rules on
the command line.
ython/.cvsignore
ef47e01f7593c4844f927752c0462dae7722ff9e 24-Oct-2005 Robert McQueen <robot101@debian.org> 2005-10-24 Robert McQueen <robot101@debian.org>

* python/dbus_bindings.pyx (String, MessageIter): make D-Bus strings
derive from unicode instead of str, and encode/decode UTF-8 when
marshalling/unmarshalling bus messages

* python/introspect_parser.py: encode introspection data as UTF-8
before passing the buffer into libxml2

* test/python/test-client.py: add unicode test strings

* test/data/valid-service-files/.cvsignore, test/python/.cvsignore:
ignore generated python test files
ata/valid-service-files/.cvsignore
ython/.cvsignore
ython/test-client.py
2b9417707a6cac377e2caca047fde8169236d93e 18-Oct-2005 John (J5) Palmieri <johnp@redhat.com> * glib/dbus-gvalue-utils.c (hash_free_from_gtype): handle gdouble
and G_TYPE_VALUE_ARRAY (DBUS_TYPE_STRUCT)
(gvalue_from_hash_value, hash_value_from_gvalue): handle gdouble

* glib/dbus-gvalue.c (dbus_gvalue_to_signature): add missing
DBUS_STRUCT_BEGIN_CHAR and DBUS_STRUCT_END_CHAR charaters
when constructing struct signatures

* python/_dbus.py (Bus): handle private connections using the
private keyword in the constructor. defaults to private=False
(Bus::close): new method to close a connection to the bus

* python/dbus_bindings.pyx (Connection::close): renamed method
was previously called disconnect
(bus_get): now supports getting a private connection

* python/proxies.py (ProxyMethod::__call__): check if ignore_reply
keyword is set to True. if it is, execute the method without waiting
for a reply
(ProxyObject::_introspect_execute_queue): new method for executing
all the pending methods that were waiting for the introspect to
finish. this is called when introspect either succeeds or fails
(ProxyObject::_introspect_error_handler): call queued methods
lib/test-service-glib.c
ython/run-test.sh
ython/test-client.py
0ae9f138ad4dfacbbd28abd39ce3dee66333539a 14-Oct-2005 John (J5) Palmieri <johnp@redhat.com> * python/dbus_bindings.pyx (MessageIter::append_strict): check for
STRUCT_BEGIN not TYPE_STRUCT in indicate we are marshalling a struct

* python/service.py (Object::_message_cb): handle exceptions correctly
by sending them over the wire to the calling app. This makes sure
the client returns immediately instead of waiting the 15 seconds to
timeout.

* test/python/test-client.py (TestDBusBindings::testBenchmarkIntrospect):
Add a test to benchmark how long it takes to introspect a service and
call a method which returns a large element (pretty fast)

* test/python/test-service.py (TestObject::GetComplexArray): new test
method which pushes a lot of data
ython/run-test.sh
ython/test-client.py
ython/test-service.py
86b9f6ad4a6f466e24b5e4c1c320029041c50e3b 05-Oct-2005 John (J5) Palmieri <johnp@redhat.com> * glib/dbus-gvalue.c (marshal_variant): call _dbus_gvalue_marshal
instead of marshal basic so we can handle recursive types in a variant

* test/glib/test-dbus-glib.c: Add test for marshaling recurive types
in variants

* test/glib/test-service-glib.c, test-service-glib.xml
(my_object_echo_variant [EchoVariant],
my_object_process_variant_of_array_of_ints123
[ProcessVariantOfArrayOfInts123]):
Add two test methods

* python/introspect_parser.py: New module for parsing introspect
data.

* python/dbus_bindings.pyx:
(various places): when throwing errors fix to use errormsg instead
of message local variable because Pyrex can get confused with other
message variables (initial patch by Robert McQueen
<robert.mcqueen at collabora.co.uk>)
(MessageIter::parse_signature_block): new method for getting the next
block in a signiture.
(MessageIter::append_strict): new method for appending values strictly
using the passed in signature instead of guessing at the type
(MessageItter:: append_dict, append_struct, append_array): use
signatures to marshal children if the signature is available

* python/exceptions.py (IntrospectionParserException): new exception

* python/proxies.py (ProxyMethod::__call__): Marshal args with
introspected signatures if available, else we fall back to the
old way of doing things.
(ProxyObject::_introspect_reply_handler ): parse introspection data

* python/service.py (ObjectType::_reflect_on_method): Properly
terminate <method> if there are no args in the reflection data

* test/python/test-client.py: add tests for talking with the GLib
test server. This gives us better coverage for introspection since
python to python will always generate arguments as variants. It also
allows us to test the robustness of the GLib bindings and interlanguage
communications.
lib/test-dbus-glib.c
lib/test-service-glib.c
lib/test-service-glib.xml
ython/test-client.py
9a821f4c135b3c7b52440550660a7c1e7e4f0731 30-Sep-2005 Harald Fernengel <harry@kdevelop.org> ignore me
t/.cvsignore
fe9f471950c7a061289efe734c20074d5c357f20 30-Sep-2005 Harald Fernengel <harry@kdevelop.org> compile out of the box
t/Makefile.am
t/tst_qdbusconnection.cpp
cd883ae0436e0be1234cd0cde3c2e9a8b994d0e8 23-Sep-2005 Harald Fernengel <harry@kdevelop.org> adding an autotest and "dbus-ify" the build process and include scheme
akefile.am
t/Makefile.am
t/tst_qdbusconnection.cpp
8b34c2c538f182fe29af58f5153b9dd7cdbaf7fa 12-Sep-2005 Waldo Bastian <bastian@kde.org> * dbus/dbus-marshal-validate.c, doc/dbus-specification.xml,
test/Makefile.am, test/test-names.c: allow hyphens in bus names.
cvsignore
akefile.am
est-names.c
5e8110d79aa8c11ad76b3e77791e3e6daca0fa32 11-Sep-2005 Mark McLoughlin <mark@skynet.ie> 2005-09-11 Mark McLoughlin <mark@skynet.ie>

* test/data/auth/fallback.auth-script: we don't
retry the EXTERNAL method when we know its going
to fail anymore.

2005-09-11 Mark McLoughlin <mark@skynet.ie>

* dbus/dbus-connection-internal.h: rename
(add|remove|toggle)_(watch|timeout) to unlocked()

* dbus/dbus-connection.c: ditto.

* dbus/dbus-timeout.c, dbus/dbus-transport-unix.c:
Update some callers for the renaming.

2005-09-10 Mark McLoughlin <mark@skynet.ie>

* dbus/dbus-auth.c: (record_mechanisms): don't
retry the first auth mechanism because we know
we're just going to get rejected again.

* dbus/dbus-keyring.c: (_dbus_keyring_reload):
Fix thinko ... and what a nasty little bugger to
track down you were ...

* dbus/dbus-connection.c:
(_dbus_connection_add_watch),
(_dbus_connection_remove_watch): add note about
these needing the connection to be locked.
(_dbus_connection_get_dispatch_status_unlocked):
set status to DATA_REMAINS when we queue the
disconnected message.

* bus/dispatch.c:
(bus_dispatch): fix warning.
(check_existent_service_no_auto_start):
Expect ChildSignaled error too.
(check_existent_hello_from_self): fix another
couple of warnings.
ata/auth/fallback.auth-script
236c7b738488b5be33d5ab669479bb22a5f50ec3 01-Sep-2005 John (J5) Palmieri <johnp@redhat.com> * python/Makefile.am: Break on pyrexc errors instead of ignoring them

* python/dbus_bindings.pyx: Memory management foo
(global): remove hacky _user_data_references global list
(GIL_safe_cunregister_function_handler): userdata now stuffed into
tuples. Unref user_data
(GIL_safe_cmessage_function_handler): userdata now stuffed into tuples
(Connection::__del__): Remove and replace with __dealloc__ method
(Connection::add_filter): Stuff user_data into a tuple. Use Py_INCREF
to keep tuple from being deallocated instead of the global var hack
(Connection::register_object_path): Stuff user_data into a tuple.
Use Py_INCREF to keep tuple from being deallocated instead of the
global var hack
(Connection::register_fallback): Stuff user_data into a tuple.
Use Py_INCREF to keep tuple from being deallocated instead of the
global var hack
(GIL_safe_pending_call_notification): Don't unref the message
because it gets unreffed when going out of scope. Py_XDECREF
the user_data
(PendingCall::__del__): Remove and replace with __dealloc__ method
(PendingCall::set_notify): ref the pending call because we will
need it to stick around for when the notify callback gets called
(Message::__del__): Remove and replace with __dealloc__ method

* python/dbus_glib_bindings.pyx (init_gthreads): Changed to
gthreads_init to match up with the dbus call

* python/glib.py (init_threads): Changed to threads_init to match
up with gobject.threads_init(). init_threads is kept for backwards
compat but will most likely be deprecated in the future

* test/python/test-client.py:
- revamp to use Python's unittest functionality
- add async call tests
- setup threads in glib and dbus so we make sure locks are working
ython/test-client.py
18170dd986e4e4efe440c9dfa6f47ba87604b7ec 26-Aug-2005 John (J5) Palmieri <johnp@redhat.com> * s/Message(_create=0)/EmptyMessage everywhere else

* test/python/test-{server|client}.py: add the python/.libs directory
to the lookup path so dbus_bindings and dbus_glib_bindings don't
get picked up from the system
ython/run-test.sh
ython/test-client.py
ython/test-service.py
7aa60754455b2a1063b1f86973c8a0bc13352136 25-Aug-2005 John (J5) Palmieri <johnp@redhat.com> * forgot to add the service file
ata/valid-service-files/debug-python.service.in
781b0cdef9d2091a055aa2fc0a36e24bee25966d 25-Aug-2005 John (J5) Palmieri <johnp@redhat.com> * test/python: Add python regression test

* configure.in: Add test/python/Makefile

* test/Makefile.am: Add the python directory to SUBDIRS
akefile.am
ython/Makefile.am
ython/run-test.sh
ython/test-client.py
ython/test-service.py
f837e62f501444fbd2b61f46bdec398503c70ee2 23-Aug-2005 Colin Walters <walters@verbum.org> 2005-08-23 Colin Walters <walters@verbum.org>

* test/glib/Makefile.am (test_profile_LDADD): Don't multiply-define
EXTRA_DIST.
lib/Makefile.am
8c7bbdbaea747f465676380eae4104607ef99696 04-Aug-2005 Colin Walters <walters@verbum.org> 2005-08-04 Colin Walters <walters@verbum.org>

* glib/dbus-gvalue-utils.h (_dbus_g_type_specialized_builtins_init)
(dbus_g_type_is_fixed, dbus_g_type_fixed_get_size)
(dbus_gvalue_set_from_pointer, dbus_g_hash_table_value_foreach)
(dbus_g_hash_table_insert_values, dbus_g_hash_table_insert_steal_values)
(dbus_gtype_is_valid_hash_key, dbus_gtype_is_valid_hash_value)
(dbus_g_hash_func_from_gtype, dbus_g_hash_free_from_gtype)
(dbus_g_hash_equal_from_gtype, dbus_gvalue_stor, dbus_gvalue_take):
* glib/dbus-gvalue.h (dbus_g_value_types_init)
(dbus_gvalue_demarshal, dbus_gvalue_demarshal_variant)
(dbus_gvalue_demarshal_message, dbus_gvalue_marshal):

Prefix name with _ to ensure they're not exported. All callers
updated.

* glib/dbus-gvalue.c (typecode_to_gtype)
(dbus_typecode_maps_to_basic, basic_typecode_to_gtype)
(signature_iter_to_g_type_dict)
(signature_iter_to_g_type_array)
(dbus_gtype_from_signature_iter, dbus_gtype_from_signature)
(dbus_gtypes_from_arg_signature):
Move to dbus-gsignature.c.

* glib/dbus-binding-tool-glib.c (dbus_binding_tool_output_glib_server): Call
dbus_g_type_specialized_builtins_init instead of dbus_g_value_types_init.
(dbus_binding_tool_output_glib_client): Ditto.

* glib/Makefile.am (DBUS_GLIB_INTERNALS): Add dbus-gsignature.c
and dbus-gsignature.h

* test/glib/test-service-glib.c (my_object_rec_arrays): Delete
unused variable.
lib/test-service-glib.c
e3fa86b54a0bdc6a8eaf5def43b1947ddef59c85 03-Aug-2005 Havoc Pennington <hp@redhat.com> 2005-08-03 Havoc Pennington <hp@redhat.com>

* dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): fix
typo, from Julien Puydt

* bus/connection.c (bus_connection_disconnected): we were always
doing a wait_for_memory due to a buggy loop, found by Timo Hoenig
lib/test-profile.c
ba04a545aa4c2cf475a9fb52653a46a88d01c9d9 30-Jul-2005 Havoc Pennington <hp@redhat.com> 2005-07-29 Havoc Pennington <hp@redhat.com>

* test/glib/test-profile.c (write_junk): initialize the junk
buffer so valgrind doesn't have a breakdown
lib/test-profile.c
9ca6f45e86f1e1839967821261c55083becfa40a 24-Jul-2005 Colin Walters <walters@verbum.org> 2005-07-24 Colin Walters <walters@verbum.org>

* glib/dbus-gvalue.c (signature_iter_to_g_type_array): Don't require
typedata; recursive arrays won't have it.

* test/glib/test-dbus-glib.c:
* test/glib/test-service-glib.c:
* test/glib/test-service-glib.xml: Add recursive arrays tests.
lib/test-dbus-glib.c
lib/test-service-glib.c
lib/test-service-glib.xml
afc504f848ebf3840dc80e0a2d529be7dcba8b26 17-Jul-2005 John (J5) Palmieri <johnp@redhat.com> * Merge DBUS_0_35_2 branch into HEAD

2005-07-17 John (J5) Palmieri <johnp@redhat.com>

* NEWS: Update to 0.35.2

2005-07-17 John (J5) Palmieri <johnp@redhat.com>

* python/_dbus.py: Remove import of the dbus.services
module as it no longer exists (patch from Dimitur Kirov)

* python/service.py (Object::__init__): Fixed typo
s/name/bus_name (patch from Dimitur Kirov)

* python/examples/example-signal-emitter.py: import dbus.glib
to get the main loop and use glib mainloop instead of gtk so
X doesn't have to be running.

* python/examples/example-signal-recipient.py: import dbus.glib
to get the main loop and use glib mainloop instead of gtk so
X doesn't have to be running. Import the decorators module
directly.

* test/glib/Makefile.am: Added DIST_EXTRA files that distcheck
didn't pick up on but are needed to build

* configure.in: upped version to 0.35.2

* bus/driver.c, bus/selinux.c, bus/selinux.h, dbus/dbus-protocol.h:
added Colin Walters' SELinux API rename patch from head
s/unix sercurity context/selinux security context/

2005-07-16 John (J5) Palmieri <johnp@redhat.com>

* python/Makefile.am: dbus_binding.pxd.in should be included
in EXTRA_DIST not dbus_binding.pxd
fix up $(srcdir) hopefully for the last time

* NEWS: Update to 0.35.1
lib/Makefile.am
a7595655fb892b4ecab852aeb971cf53bdff09cc 15-Jul-2005 John (J5) Palmieri <johnp@redhat.com> * bus/dispatch.c, test/test-service.c: Add testcase
for sending messages to oneself (TODO item).

* python/service.py (class Object): Swap ordering of bus_name
and object_path parameters to better support inheritance.

* doc/dbus-tutorial.xml: change Python docs to reflect change
in parameter ordering and fix the inheritance section.

* doc/TODO: remove sending message to oneself TODO item
est-service.c
075945f611290f2b9db9a4ed6cf5433f2fd85785 14-Jul-2005 John (J5) Palmieri <johnp@redhat.com> Checking in Rodrigo's patch along with my fixes to the patch

2005-07-14 John (J5) Palmieri <johnp@redhat.com>

* bus/activation.c: clean up all tabs to be 8 spaces
(bus_activation_activate_service): make sure we clean up
if activation fails

* bus/dispatch.c: clean up all tabs to be 8 spaces
(check_shell_fail_service_auto_start): New function
tests to make sure we get fail properly when trying to auto start a service
with a faulty command line
(check_shell_service_success_auto_start): New function tests to make sure
auto started services get the arguments on the command line

* test/test-shell-service.c: Added service for testing auto-starting with
command line arguments

* test/data/valid-service-files/debug-shell-echo-fail.service.in,
test/data/valid-service-files/debug-shell-echo-success.service.in:
Added service files for testing auto-starting with command line arguments

* */.cvsignore: added a bunch of generated files to various .cvsignore files

2005-07-14 Rodrigo Moya <rodrigo@novell.com>

* dbus/dbus-shell.[ch]: copy/pasted code from GLib.

* dbus/Makefile.am: added new files to build.

* bus/activation.c (bus_activation_activate_service): support
activation commands with parameters.

* test/shell-test.c: added test program for the shell parsing
code.
cvsignore
akefile.am
ata/valid-service-files/.cvsignore
ata/valid-service-files/debug-shell-echo-fail.service.in
ata/valid-service-files/debug-shell-echo-success.service.in
hell-test.c
est-shell-service.c
622cc8af6181d7e3d839ec0bdfad376648863844 11-Jul-2005 Colin Walters <walters@verbum.org> 2005-07-11 Colin Walters <walters@verbum.org>

* glib/dbus-gvalue.c (struct _DBusGValue): Delete.
(dbus_g_value_types_init): Remove assertion.
(dbus_g_value_get_g_type, dbus_g_value_open)
(dbus_g_value_iterator_get_values, dbus_g_value_get_signature)
(dbus_g_value_copy, dbus_g_value_free): Delete unimplemented
functions related to DBusGValue. Now we marshal/demarshal
structures as GValueArray.
(dbus_gtype_from_signature_iter): Return G_TYPE_VALUE_ARRAY for
structures.
(signature_iter_to_g_type_array): Don't call
signature_iter_to_g_type_struct.
(signature_iter_to_g_type_struct): Delete.
(dbus_gvalue_to_signature): Delete.
(dbus_gvalue_to_signature): New function with same name as other
one; we can convert structures to signatures.
(demarshal_valuearray): New function.
(get_type_demarshaller): Use it.
(demarshal_recurse): Delete.
(marshal_proxy): New function.
(marshal_map): Warn if we can't determine signature from type.
(marshal_collection_ptrarray): Ditto.
(marshal_collection_array): Ditto.
(get_type_marshaller): Use marshal_valuearray.
(marshal_recurse): Delete.
(_dbus_gvalue_test): Add some tests.

* dbus/dbus-glib.h (struct _DBusGValueIterator):
(dbus_g_value_get_g_type, DBUS_TYPE_G_VALUE)
(dbus_g_value_open, dbus_g_value_iterator_get_value)
(dbus_g_value_iterator_get_values, dbus_g_value_iterator_recurse)
(dbus_g_value_free): Remove prototypes.

* glib/dbus-binding-tool-glib.c (dbus_g_type_get_lookup_function): Handle
G_TYPE_VALUE_ARRAY.

* glib/examples/example-service.c:
* glib/examples/example-client.c: Implement GetTuple.

* test/glib/test-dbus-glib.c:
* test/glib/test-service-glib.c:
* test/glib/test-service-glib.xml: Add structure tests.
lib/test-dbus-glib.c
lib/test-service-glib.c
lib/test-service-glib.xml
8c095eea8fbe2f8c219bdb2aebcf61e4e3993f53 11-Jul-2005 Colin Walters <walters@verbum.org> 2005-07-10 Colin Walters <walters@verbum.org>

* doc/TODO: Knock off some GLib items with this patch.

* glib/dbus-gvalue-utils.c (_dbus_gtype_can_signal_error)
(_dbus_gvalue_signals_error): New functions.

* glib/dbus-gvalue-utils.h: Prototype them.

* glib/dbus-gobject.c (arg_iterate): Update to handle return vals
and change to not output const/retval flags for input args. All
callers updated.
(invoke_object_method): Refactor to handle return values. Add
some more comments in various places. Remove debug g_print.

* glib/dbus-binding-tool-glib.h (DBUS_GLIB_ANNOTATION_RETURNVAL): New.

* glib/dbus-binding-tool-glib.c (dbus_g_type_get_marshal_name):
Handle G_TYPE_NONE.
(compute_gsignature): New function; refactored from code from
compute_marshaller and compute_marshaller_name. Enhance to
handle return values and async ops more cleanly. Update for
async ops returning NONE instead of BOOLEAN.
(compute_marshaller, compute_marshaller_name): Call compute_gsignature
and output appropriate string.
(generate_glue): Handle return value annotation. Also don't dump
constness flag for input arguments.

* glib/Makefile.am (DBUS_GLIB_INTERNALS): New variable; contains
files shared between installed library and utilities.
(libdbus_glib_1_la_SOURCES): Move some stuf into DBUS_GLIB_INTERNALS.
(libdbus_gtool_la_SOURCES): Suck in DBUS_GLIB_INTERNALS so the
binding tool can access gtype utility functions.

* test/glib/test-service-glib.c:
* test/glib/test-service-glib.xml:
* test/glib/test-dbus-glib.c: Add some tests for return values.
lib/test-dbus-glib.c
lib/test-service-glib.c
lib/test-service-glib.xml
b1ae5399f82a88ba397d55f224d00f437564bac5 09-Jul-2005 Colin Walters <walters@verbum.org> 2005-07-09 Colin Walters <walters@verbum.org>

* glib/dbus-binding-tool-glib.h (DBUS_GLIB_ANNOTATION_CONST):
Define.

* glib/dbus-binding-tool-glib.c (generate_glue): Handle Const
annotation.

* glib/dbus-gobject.c (arg_iterate): Update to parse constval too.
(method_dir_signature_from_object_info): Handle arg_iterate change.
(write_interface): Ditto.
(lookup_object_info): Don't barf if format_version is > 0.
(invoke_object_method): Handle arg constness.

* glib/dbus-gidl.c (struct ArgInfo): Add annotations.
(arg_info_new): Create.
(arg_info_unref): Destroy.
(arg_info_get_annotations, arg_info_get_annotation)
(arg_info_add_annotation): New functions.

* glib/dbus-gidl.h: Prototype them.

* glib/dbus-gparser.c (parse_annotation): Allow annotations in
args, disallow them in properties.
(parse_annotation): Handle arg annotations.

* test/glib/test-service-glib.xml:
* test/glib/test-service-glib.c: Update to make some methods
const.
lib/test-service-glib.c
lib/test-service-glib.xml
0ccef79d7e9d1b19cdb10b3a147b64b41686905d 09-Jul-2005 Colin Walters <walters@verbum.org> 2005-07-08 Colin Walters <walters@verbum.org>

* test/glib/test-service-glib.xml:
* test/glib/test-service-glib.c:
* test/glib/test-dbus-glib.c: Test a{sv}.

* glib/examples/statemachine/statemachine.c:
* glib/examples/statemachine/statemachine-server.c:
* glib/examples/statemachine/statemachine-client.c: Fix some bugs,
add progress bar, etc.

* glib/dbus-gvalue.c (register_array, register_dict): Delete; not
needed anymore due to generic array/map marshalling.
(dbus_g_value_types_init): Don't register basic arrays or the
string/string hash.
(dbus_gtype_from_signature_iter): Don't try to recurse into
variants.
(dbus_gtype_to_signature): Check collection/map before type
metadata.
(demarshal_garray_basic): Renamed to demarshal_collection_array.
(demarshal_ghashtable): Renamed to demarshal_map; fix to use new
generic map creation/append functions instead of hash table
specifically.
(get_type_demarshaller): Handle maps.
(demarshal_collection): Dispatch on collection type to either
demarshal_collection_ptrarray or demarshal_collection_array.
(get_type_marshaller): Handle maps.
(marshal_collection): Dispatch collection type to either
marshal_collection_ptrarray or marshal_collection_array.
(_dbus_gvalue_test): New test.

* glib/dbus-gvalue-utils.c (unset_and_free_g_value): New function.
(hash_free_from_gtype): Use it to free GValues.
(hashtable_append): New function.
(ptrarray_append): Fix prototype.
(slist_append): Ditto.
(_dbus_gvalue_utils_test): Extend tests.

* glib/dbus-gtype-specialized.c
(dbus_g_type_specialized_init_append): Renamed from
dbus_g_type_specialized_collection_init_append. Remove const from
value, since we steal it.
(dbus_g_type_specialized_map_append): New function.

* glib/dbus-gtype-specialized.h: Update prototypes.
Add DBusGTypeSpecializedMapAppendFunc.

* glib/dbus-gtest.c (dbus_glib_internal_do_not_use_run_tests): Run
_dbus_gvalue_test.

* glib/dbus-gtest.h: Prototype it.
lib/test-dbus-glib.c
lib/test-service-glib.c
lib/test-service-glib.xml
d8e7405eb35974518b0b579e2e2789fd065cb477 08-Jul-2005 Ross Burton <ross@openedhand.com> Make async bindings work again
lib/test-dbus-glib.c
e888647a70094d5761f931e1a812764330ee5a2b 08-Jul-2005 Colin Walters <walters@verbum.org> 2005-07-08 Colin Walters <walters@verbum.org>

* tools/Makefile.am: Kill of print-introspect in favor of using
dbus-send --print-reply=literal.
* tools/print-introspect.c: Deleted.

* test/glib/test-service-glib.xml:
* test/glib/test-service-glib.c (my_object_get_objs): New test
for "ao".

* test/glib/test-dbus-glib.c (echo_received_cb): Free echo data.
(main): Test GetObjs.

* glib/examples/statemachine/Makefile.am:
* glib/examples/statemachine/sm-marshal.list:
* glib/examples/statemachine/statemachine-client.c:
* glib/examples/statemachine/statemachine-server.c:
* glib/examples/statemachine/statemachine-server.xml:
* glib/examples/statemachine/statemachine.c:
* glib/examples/statemachine/statemachine.h:
* glib/examples/statemachine/statemachine.xml:

New example.

* glib/examples/example-service.c (main): Move invocation
of dbus_g_object_type_install_info earlier, to emphasize it
should only be done once.

* glib/examples/example-signal-emitter.c (main): Ditto.

* glib/examples/Makefile.am (SUBDIRS): Include statemachine.

* glib/dbus-gvalue.h (dbus_gtype_to_signature)
(dbus_gvalue_marshal): Update prototypes.

* glib/dbus-gvalue.c: Update all marshalling functions to take
const GValue instead of GValue.
(signature_iter_to_g_type_array): Return a GPtrArray for nonfixed
types.
(dbus_gvalue_to_signature): Update for dbus_gtype_to_signature
change.
(dbus_gtype_to_signature): Handle generic collecitons and maps.
Return a newly-allocated string.
(demarshal_proxy, demarshal_object_path, demarshal_object)
(demarshal_strv, demarshal_ghashtable): Set error, don't assert if
we get the wrong types from message.
(get_type_demarshaller): New function, extracted from
dbus_gvalue_demarshal.
(demarshal_collection): New function, demarshals generic
collection.
(dbus_gvalue_demarshal): Just invoke result of
get_type_demarshaller. Throw error if we don't have one.
(marshal_garray_basic): Abort on OOM.
(get_type_marshaller): New function, extracted from
dbus_gvalue_marshal.
(collection_marshal_iterator, marshal_collection): New functions;
implements generic marshalling for an iteratable specialized
collection.
(dbus_gvalue_marshal): Just invoke result of get_type_marshaller.

* glib/dbus-gvalue-utils.c (gvalue_from_ptrarray_value): Handle
G_TYPE_STRING.
(ptrarray_value_from_gvalue): Ditto.
(ptrarray_append, ptrarray_free): New functions.
(slist_constructor, slist_iterator, slist_copy_elt, slist_copy)
(slist_append, slist_end_append, slist_free): New functions.
(dbus_g_type_specialized_builtins_init): Add append fuctions
for GPtrArray and GSList. Register GSList.
(test_specialized_hash, _dbus_gvalue_utils_test): New functions.

* glib/dbus-gtype-specialized.h (DBusGTypeSpecializedAppendContext):
New.
(dbus_g_type_specialized_collection_init_append)
(dbus_g_type_specialized_collection_append)
(dbus_g_type_specialized_collection_end_append): Prototype.
(DBusGTypeSpecializedCollectionVtable): Add append_func and
end_append_func.

* glib/dbus-gtype-specialized.c (dbus_g_type_specialized_collection_init_append)
(dbus_g_type_specialized_collection_append)
(dbus_g_type_specialized_collection_end_append): New functions.
(dbus_g_type_map_value_iterate): Take const GValue.
(dbus_g_type_collection_value_iterate): Ditto.

* glib/dbus-gtest.c (dbus_glib_internal_do_not_use_run_tests): Run
_dbus_gvalue_utils_test.

* glib/dbus-gtest.h: Prototype it.

* glib/dbus-gproxy.c (dbus_g_proxy_manager_filter): Avoid
using uninitialized owner_list.
(dbus_g_proxy_begin_call_internal): Move return_if_fail to
public API.
(dbus_g_proxy_end_call_internal): Update to use error set
from dbus_gvalue_demarshal instead of setting it here.
(dbus_g_proxy_begin_call): Move return_if_fail here.

* glib/dbus-gobject.c (write_interface): Update for
dbus_gtype_to_signature returning new string.

* configure.in: Add glib/examples/statemachine.
lib/test-dbus-glib.c
lib/test-service-glib.c
lib/test-service-glib.xml
2ca6e95764dc3491458dcf077ce77cbbabf00ddf 06-Jul-2005 Colin Walters <walters@verbum.org> 2005-07-06 Colin Walters <walters@verbum.org>

* dbus/dbus-glib.h (DBusGPendingCall, DBusGPendingCallNotify)
(DBUS_TYPE_G_PENDING_CALL, dbus_g_pending_call_get_g_type)
(dbus_g_pending_call_ref, dbus_g_pending_call_unref): Delete.
(dbus_g_pending_call_set_notify, dbus_g_pending_call_cancel):
Delete in favor of dbus_g_proxy_begin_call and
dbus_g_proxy_cancel_call.
(DBusGProxyCall, DBusGProxyCallNotify): New.
(dbus_g_proxy_begin_call): Change prototype to take callback, user
data, and destroy function. This replaces
dbus_g_pending_call_set_notify.
(dbus_g_proxy_cancel_call): Prototype.
(DBusGAsyncData): Delete, shouldn't be needed anymore.

* glib/dbus-gproxy.c (struct _DBusGProxy): Add call_id_counter and
pending_calls map.
(struct _DBusGProxyManager): Add bus_proxy member, which is an
internal proxy for calls to the bus. Remove
pending_nameowner_calls, now the internal proxy keeps track.
(dbus_g_proxy_manager_unref): Unref bus proxy, remove reference to
pending_nameowner_calls.
(got_name_owner_cb): Update prototype, and use
dbus_g_proxy_end_call.
(got_name_owner_cb): Remove reference to pending_nameowner_calls.
(dbus_g_proxy_manager_register): Delete directly libdbus code in
favor of using internal proxy.
(dbus_g_proxy_manager_unregister): Update to use
dbus_g_proxy_cancel_call for any pending GetNameOwner call.
(dbus_g_proxy_init): Initialize pending calls map.
(dbus_g_proxy_constructor): New.
(dbus_g_proxy_class_init): Add get/set property functions,
constructor, and add NAME, PATH, and INTERFACE properties.
(cancel_pending_call): New function.
(dbus_g_proxy_dispose): Iterate over any outstanding calls and
cancel them.
(dbus_g_proxy_set_property, dbus_g_proxy_get_property): New.
(GPendingNotifyClosure): New structure.
(d_pending_call_notify, d_pending_call_free): Moved here from
dbus-glib.c.
(DBUS_G_VALUE_ARRAY_COLLECT_ALL): Moved around to satisfy function
ordering.
(manager_begin_bus_call): New internal function for talking to
internal bus proxy.
(dbus_g_proxy_new): Construct object using GObjet properties.
(dbus_g_proxy_begin_call_internal): Update to take user data, etc.
Create closure of same, and insert call into map of pending calls.
(dbus_g_proxy_end_call_internal): Take call id instead of pending
call. Look up pending call in current set. Remove it when we've
completed.
(dbus_g_pending_call_end, dbus_g_proxy_end_call_internal): Delete.
(dbus_g_proxy_begin_call): Change API to take callback, user data,
and destroy function directly.
(dbus_g_proxy_end_call): Update to take DBusGProxyCall.
(dbus_g_proxy_call): Invoke with NULL callback.
(dbus_g_proxy_cancel_call): New function, replaces
dbus_g_pending_call_cancel.

* glib/dbus-gparser.c (validate_signature): Fix call to
dbus_set_g_error.

* glib/dbus-gobject.c (dbus_g_object_type_dbus_metadata_quark):
New quark for attaching metadata to GType.
(info_hash): Delete.
(lookup_object_info): Look up using quark.
(dbus_g_object_type_install_info): Check that a type is classed,
not that it's an object. Also just install type data using quark
instead of using global hash.

* glib/dbus-glib.c (dbus_g_pending_call_ref)
(dbus_g_pending_call_unref, dbus_pending_call_get_g_type)
(GPendingNotifyClosure): Delete.
(d_pending_call_notify, d_pending_call_free): Move to dbus-gproxy.c.
(dbus_g_pending_call_set_notify, dbus_g_pending_call_cancel): Delete.

* glib/dbus-binding-tool-glib.c (generate_client_glue): Disable async
client method generation until we can fix it...

* tools/dbus-viewer.c (load_child_nodes): Use dbus_g_proxy_call.
(load_from_service_thread_func): Ditto.

* tools/dbus-names-model.c (struct NamesModel): Hold
DBusGProxyCall.
(have_names_notify): Update prototype, use
dbus_g_proxy_cancel_call.
(names_model_reload): Update for new dbus_g_proxy_begin_call API.

* tools/dbus-monitor.c (filter_func): Update for print_message
API change.

* test/glib/test-dbus-glib.c: Add more tests for async
invocations. Update many begin_call/end_call pairs to just use
dbus_g_proxy_call.

* tools/dbus-send.c (main): Add --print-reply=literal mode. This
allows us to dump print-introspect.c.

* tools/dbus-print-message.h (print_message): Add literal argument
to print_message which is intended to allow printing arguments without
metadata like "string=".

* tools/dbus-print-message.c (print_iter): Add literal argument.
(print_message): Allow printing string messages literally.
lib/test-dbus-glib.c
03d040311afd4b988b9a277a8aa360fa20243c92 30-Jun-2005 Colin Walters <walters@verbum.org> 2005-06-30 Colin Walters <walters@verbum.org>

* test/glib/test-dbus-glib.c:
* test/glib/test-service-glib.c:
* test/glib/test-service-glib.xml: Update tests for new error
setting bits, also add async tests (patch from Ross Burton).

* test/glib/Makefile.am (test_service_glib_LDADD): Add
DBUS_GLIB_THREADS_LIBS.

* glib/dbus-gproxy.c (get_name_owner)
(dbus_g_pending_call_end_valist): Ditto.

* glib/dbus-gobject.c (error_metadata): New mapping from GError
domain (GQuark) to DBusGErrorInfo.
(gerror_domaincode_to_dbus_error_name): Attempt to look up error
quark in error_metadata. Take message interface as default
error message interface.
(gerror_to_dbus_error_message): Pass message interface.
(dbus_set_g_error): Resurrected.
(dbus_g_error_info_free): New function.
(dbus_g_object_type_install_info): Use g_type_class_ref instead
of _peek to actually create the object class if it hasn't been
created yet.
(dbus_g_error_domain_register): New function.

* glib/dbus-gmain.c (dbus_g_bus_get): Switch to dbus_set_g_error.

* glib/dbus-gparser.c (validate_signature): Ditto.

* dbus/dbus-glib.h (dbus_g_error_set): Delete.
(dbus_g_error_domain_register): Prototype.

* glib/dbus-glib.c (dbus_g_error_set): Delete.
Update tests.
lib/Makefile.am
lib/test-dbus-glib.c
lib/test-service-glib.c
lib/test-service-glib.xml
b3c42d226438fd0fda2db19b92944dec5e226d3f 30-Jun-2005 Colin Walters <walters@verbum.org> 2005-06-29 Colin Walters <walters@verbum.org>

* dbus/dbus-glib.h: Delete DBUS_TYPE_G_PROXY_ARRAY. Add
DBUS_TYPE_G_OBJECT_PATH.

* glib/dbus-gvalue.c (dbus_g_value_types_init): Remove marshallers
for G_TYPE_OBJECT and DBUS_TYPE_G_PROXY_ARRAY (the latter should
be handled more generically). Add DBUS_TYPE_G_OBJECT_PATH.
(dbus_g_object_path_get_g_type): New function.
(dbus_gtype_from_signature_iter): Map DBUS_TYPE_OBJECT_PATH
to DBUS_TYPE_G_OBJECT_PATH by default.
(demarshal_proxy): Remove unused name variable.
(demarshal_object_path, marshal_object_path): New functions.
(demarshal_proxy_array, marshal_proxy_array): Delete.

* glib/dbus-binding-tool-glib.c (dbus_g_type_get_c_name): Map
DBUS_TYPE_G_OBJECT_PATH to char *.
(dbus_g_type_get_lookup_function): Map builtin
DBUS_TYPE_G_OBJECT_PATH.

* test/glib/test-dbus-glib.c
* test/glib/test-service-glib.c (my_object_objpath):
Adapt tests to new object path marshalling.
lib/test-dbus-glib.c
lib/test-service-glib.c
ab1ae1f4e204e0ee36690c828ea4a66fb9427633 29-Jun-2005 Colin Walters <walters@verbum.org> 2005-06-29 Colin Walters <walters@verbum.org>

* glib/dbus-gproxy.c (struct _DBusGProxy): Add new member
name_call for keeping track of any outgoing GetNameOwner call.
Also add for_owner and associated.
(struct _DBusGProxyManager): Add owner_names, which is hash table
that maps a base name to a list of names it owns (that we're
interested in). Add pending_nameowner_calls which is a list of
all outstanding GetNameOwner; avoids us having to iterate over
every proxy. Add unassociated_proxies which keeps track of name
proxies with no associated name owner.
(dbus_g_proxy_manager_unref): Destroy owner_names.
(struct DBusGProxyNameOwnerInfo): New struct for keeping track of
name refcounts.
(find_name_in_info, name_owner_foreach)
(dbus_g_proxy_manager_lookup_name_owner, insert_nameinfo)
(dbus_g_proxy_manager_monitor_name_owner)
(dbus_g_proxy_manager_unmonitor_name_owner)
(unassociate_proxies, dbus_g_proxy_manager_replace_name_owner):
New functions; they manipulate the owner_names mapping.
(got_name_owner_cb): New function.
(get_name_owner): New function, extracted from
dbus_g_proxy_new_for_name_owner.
(dbus_g_proxy_manager_register): For now we need to keep track of
all NameOwnerChanged. Also if the proxy is for a name, if we
don't already know the name owner, queue a new GetNameOwner
request and add it to our list of unassociated proxies. Otherwise
inc the refcount.
(dbus_g_proxy_manager_unregister): If this proxy is for a name,
cancel any pending GetNameOwner call, etc.
(dbus_g_proxy_manager_filter): Handle NameOwnerChanged. Also use
the owner_names mapping to look up the current names for the
signal source, and dispatch to any proxies for that name.
(dbus_g_proxy_new): Initialize new members.
(dbus_g_proxy_new_for_name): Delete unused proxy variable.
(dbus_g_proxy_new_for_name_owner): Use get_name_owner.
(dbus_g_pending_call_end_valist): New function, extracted from
dbus_g_proxy_end_call_internal. Useful when we don't have a proxy
but want to use the GLib infrastructure. Also note how many
arguments in reply were over.
(dbus_g_pending_call_end): New function, just call
dbus_g_pending_call_end_valist.
(dbus_g_proxy_end_call_internal): Just call
dbus_g_pending_call_end_valist.

* glib/dbus-gobject.c (_dbus_gobject_lookup_marshaller): Fix lookup
of builtin marshaller for STRING_STRING_STRING.

* test/glib/test-dbus-glib.c:
* test/glib/test-service-glib.c:
* test/glib/test-service-glib.xml:
Extend tests to cover name proxies, destruction of owner proxies,
etc.

* glib/examples/example-signal-recipient.c
(dbus_g_proxy_new_for_name_owner): Create a name proxy.

* tools/dbus-send.c (main): Print D-BUS error name in addition
to message.
lib/test-dbus-glib.c
lib/test-service-glib.c
lib/test-service-glib.xml
0c6f2bbff503c10212589c1540d06b29395587aa 27-Jun-2005 Colin Walters <walters@verbum.org> 2005-06-27 Colin Walters <walters@verbum.org>

* test/glib/test-dbus-glib.c:
* test/glib/test-service-glib.c:
* test/glib/test-service-glib.xml:
Test hash table signal emitting.

* glib/dbus-gobject.c (_dbus_gobject_lookup_marshaller): Convert
types to their fundamental basis types, since this is what
marshallers operate on. Also add an entry for VOID__BOXED.
(dbus_g_object_register_marshaller_array): Convert to fundamental.
lib/test-dbus-glib.c
lib/test-service-glib.c
lib/test-service-glib.xml
df901b528bc1e1edd96e9e91b94c9c9b795b8ffd 26-Jun-2005 Colin Walters <walters@verbum.org> 2005-06-26 Colin Walters <walters@verbum.org>

* glib/dbus-glib.c (dbus_set_g_error): Delete.
(dbus_g_error_set): New public function from its ashes; used by
both service-side method implementation and GLib bindings
internals.
(dbus_g_error_has_name, dbus_g_error_get_name): New function.
(_dbus_glib_test): Add some tests.

* test/glib/test-dbus-glib.c (main): Test dbus_g_error_has_name.

* test/glib/test-service-glib.c (my_object_throw_error): Use
dbus_g_error_set.

* glib/dbus-gobject.c (gerror_to_dbus_error_message): Handle
errors thrown by dbus_g_error_set.

* glib/dbus-gmain.c (dbus_g_bus_get): Change to dbus_g_error_set.

* glib/dbus-gparser.c (validate_signature): Ditto.

* glib/dbus-gproxy.c (dbus_g_proxy_new_for_name_owner)
(dbus_g_proxy_end_call_internal): Ditto.

* glib/Makefile.am: Generate dbus-glib-error-switch.h, which
converts DBUS_ERROR_x to DBUS_GERROR_x.
(libdbus_glib_1_la_SOURCES, BUILT_SOURCES, CLEANFILES): Add it.

* doc/TODO: Remove error TODO.

* doc/dbus-tutorial.xml: Update with documentation about error
handling.

* dbus/make-dbus-glib-error-enum.sh: Tighten up regexp to make
sure we only change DBUS_ERROR to DBUS_GERROR, not all ERROR to
GERROR. Also add DBUS_GERROR_REMOTE_EXCEPTION.
lib/test-dbus-glib.c
lib/test-service-glib.c
778579ec214548f4e0daeb7aff7894948bdbf990 21-Jun-2005 Colin Walters <walters@verbum.org> 2005-06-20 Colin Walters <walters@verbum.org>

* dbus/dbus-glib.h:
* glib/dbus-gproxy.c: Rename dbus_g_proxy_invoke to
dbus_g_proxy_call.

* glib/dbus-binding-tool-glib.c:
* doc/dbus-tutorial.xml:
* test/glib/test-dbus-glib.c: Update for rename.
lib/test-dbus-glib.c
949436ffac9e46649398e1bc9f0ddf567c88dd1c 17-Jun-2005 Colin Walters <walters@verbum.org> 2005-06-17 Colin Walters <walters@verbum.org>

* glib/dbus-gproxy.c (dbus_g_proxy_emit_remote_signal): Don't
spew warnings if we get malformed remote signals.

* glib/dbus-gobject.c (propsig_iterate): New function.
(lookup_object_info): New function, extracted from
lookup_object_and_method.
(introspect_properties, introspect_signals): Delete; these
are merged into write_interface.
(write_interface): Write out signals and properties here;
dump the org.gtk.object stuff and use the interface given
in the introspection data blob. Also fix up property XML.
(lookup_values): New function.
(introspect_interfaces): Gather a mapping from interface to a
list of its methods, signals, and properties, then write out
each interface.
(lookup_object_and_method): Use lookup_object_info.
(struct DBusGSignalClosure): Add interface.
(dbus_g_signal_closure_new): Add interface. Don't dup signame;
we can just use the constant data.
(dbus_g_signal_closure_finalize): Don't free signal name.
(signal_emitter_marshaller): Use interface from signal closure.
(export_signals): Only export signals mentioned in introspection
blob.
(dbus_g_connection_register_g_object): Warn if we have no
introspection data for an object.
(funcsig_equal): Remove unused variable.
(dbus_g_object_register_marshaller): Take varargs instead of
list.
(dbus_g_object_register_marshaller_array): New function,
extracted from old dbus_g_object_register_marshaller.

* glib/dbus-binding-tool-glib.c (struct DBusBindingToolCData): Add
signals and property data.
(write_quoted_string): New function, extracted from generate_glue.
(generate_glue): Write signals and properties to introspection
blob.

* dbus/dbus-glib.h (struct DBusGObjectInfo): Include
exported_signals and exported_properties.
(dbus_g_object_register_marshaller): Update prototype.
(dbus_g_object_register_marshaller_array): Prototype.

* test/glib/test-dbus-glib.c: Extend testing to cover new signals.

* test/glib/test-service-glib.c: Add new test signals and method
to emit them.

* test/glib/test-service-glib.xml: Add some test signals.

* test/glib/Makefile.am (BUILT_SOURCES): Add my-object-marshal.c
and my-object-marshal.h
(test_service_glib_SOURCES, test_dbus_glib_SOURCES): Add
my-object-marshal.c.
(my-object-marshal.c, my-object-marshal.h): Implement.

* test/glib/.cvsignore: Update.

* doc/TODO: Remove two GLib TODO items fixed by this
patch.
lib/.cvsignore
lib/Makefile.am
lib/my-object-marshal.list
lib/test-dbus-glib.c
lib/test-service-glib.c
lib/test-service-glib.xml
6fe36d8791a66ce9415b845c5152ca2b5ec87195 16-Jun-2005 Colin Walters <walters@verbum.org> 2005-06-16 Colin Walters <walters@verbum.org>

* dbus/Makefile.am:
* mono/doc/Makefile.am:
* test/glib/Makefile.am:

Fix srcdir != builddir issues (Patch from Chris Wilson, #3477)
lib/Makefile.am
beb9cd2eb219e04f9872c6a4dd743d5d1c36b4b1 13-Jun-2005 Colin Walters <walters@verbum.org> 2005-06-12 Colin Walters <walters@verbum.org>

Async signals and various bugfixes and testing by
Ross Burton <ross@burtonini.com>.

* glib/dbus-gvalue.h: (struct DBusBasicGValue): Delete.
(dbus_gvalue_genmarshal_name_from_type)
(dbus_gvalue_ctype_from_type): Moved to dbus-binding-tool-glib.c.
(dbus_gtype_to_dbus_type): Renamed to dbus_gtype_from_signature.
(dbus_g_value_types_init, dbus_gtype_from_signature)
(dbus_gtype_from_signature_iter, dbus_gtype_to_signature)
(dbus_gtypes_from_arg_signature): New function prototypes.
(dbus_gvalue_demarshal): Take context and error arguments.
(dbus_gvalue_demarshal_variant): New function.
(dbus_gvalue_demarshal_message): New function.
(dbus_gvalue_store): Delete.

* glib/dbus-gvalue.c:

File has been almost entirely rewritten; now we special-case
more types such as DBUS_TYPE_SIGNATURE, handle arrays and
hash tables correctly, etc. Full support for recursive values
is not yet complete.

* glib/dbus-gproxy.c (dbus_g_proxy_class_init): Change last
argument of signal to G_TYPE_POINTER since we now pass a
structure.
(lookup_g_marshaller): Delete in favor of
_dbus_gobject_lookup_marshaller.
(marshal_dbus_message_to_g_marshaller): Use
_dbus_gobject_lookup_marshaller and dbus_gvalue_demarshal_message
to handle remote signal callbacks.
(dbus_g_proxy_new_from_proxy): New function; creates a new
DBusGProxy by copying an existing one.
(dbus_g_proxy_get_interface, dbus_g_proxy_set_interface)
(dbus_g_proxy_get_path): New functions.
(dbus_g_proxy_marshal_args_to_message): New function;
factored out of existing code.
(DBUS_G_VALUE_ARRAY_COLLECT_ALL): Collect all arguments
from a varargs array.
(dbus_g_proxy_begin_call_internal): New function.
(dbus_g_proxy_end_call_internal): New function.
(dbus_g_proxy_begin_call): Take GTypes instead of DBus types
as arguments; simply invoke dbus_g_proxy_begin_call_internal
after collecting args into value array.
(dbus_g_proxy_end_call): Take GTypes instead of DBus types;
invoke dbus_g_proxy_end_call_internal.
(dbus_g_proxy_invoke): Simply invoke begin_call_interanl and
end_call_internal.
(dbus_g_proxy_call_no_reply): Take GTypes instead of DBus
types.
(array_free_all): New function.
(dbus_g_proxy_add_signal): Take GTypes.

* glib/dbus-gobject.h:
(_dbus_glib_marshal_dbus_message_to_gvalue_array): Delete.
(_dbus_gobject_get_path, _dbus_gobject_lookup_marshaller):
Prototype.

* glib/dbus-gobject.c: Add a global marshal_table hash which
stores mappings from type signatures to marshallers. Change lots
of invocations of dbus_gtype_to_dbus_type to
dbus_gtype_to_signature.
(_dbus_glib_marshal_dbus_message_to_gvalue_array): Delete.
(introspect_signals): Fix test for query.return_type.
(set_object_property): Update invocation of dbus_gvalue_demarshal.
(invoke_object_method): Many changes. Handle asynchronous
invocations. Convert arguments with
dbus_gvalue_demarshal_message. Handle errors. Use
DBusSignatureIter instead of strlen on args. Handle all arguments
generically. Special-case variants.
(dbus_g_method_return, dbus_g_method_return_error): New function.
(DBusGSignalClosure): New structure, closes over signal
information.
(dbus_g_signal_closure_new): New function.
(dbus_g_signal_closure_finalize): New function.
(signal_emitter_marshaller): New function; is special marshaller
which emits signals on bus.
(export_signals): New function; introspects object signals and
connects to them.
(dbus_g_object_type_install_info): Take GType instead of
GObjectClass.
(dbus_g_connection_register_g_object): Invoke export_signals.
(dbus_g_connection_lookup_g_object): New function.
(DBusGFuncSignature) New structure; used for mapping type
signatures to marshallers.
(funcsig_hash): New function; hashes DBusGFuncSignature.
(funcsig_equal): New function; compares DBusGFuncSignature.
(_dbus_gobject_lookup_marshaller): New function.
(dbus_g_object_register_marshaller): New function; used to
register a marshaller at runtime for a particular signature.

* glib/dbus-gmain.c (_dbus_gmain_test): Add various tests.

* glib/dbus-binding-tool-glib.h: Add DBUS_GLIB_ANNOTATION_ASYNC
which notes a server method implementation should be
asynchronous.

* glib/dbus-binding-tool-glib.c
(dbus_binding_tool_output_glib_server): Call
dbus_g_value_types_init.
(write_formal_parameters): Use dbus_gtype_from_signature. Handle
variants specially.
(dbus_g_type_get_lookup_function): Turn GType into an invocation
of a lookup function.
(write_args_for_direction): Use dbus_g_type_get_lookup_function.
(write_untyped_out_args): New method; write output arguments.
(write_formal_declarations_for_direction): Function for
writing prototypes.
(write_formal_parameters_for_direction): Function for
writing implementations.
(write_typed_args_for_direction): Function for writing
arguments prefixed with GTypes.
(write_async_method_client): Write out async version
of method.

* glib/dbus-binding-tool-glib.c: Include dbus-gvalue-utils.h.
(dbus_g_type_get_marshal_name): Move mapping from GType
to marshal name into here.
(dbus_g_type_get_c_name): Move into here.
(compute_marshaller): Convert signature to type with
dbus_gtype_from_signature, use dbus_g_type_get_marshal_name.
(compute_marshaller_name): Ditto.
(compute_marshaller): Handle async signal annotations.
(gather_marshallers): Return if we don't have a known
prefix.
(generate_glue): Collect introspection blob here, and
write all of the blob at the end. This allows an object
with multiple interfaces to work.
Mark async methods in introspection blob.

* glib/Makefile.am (libdbus_glib_1_la_SOURCES): Add
dbus-gtype-specialized.c, dbus-gtype-specialized.h,
dbus-gvalue-utils.h, dbus-gvalue-utils.c.

* dbus/dbus-glib.h: Don't include dbus-protocol.h; this
avoids people accidentally using DBUS_TYPE_* which should
not be necessary anymore.
Do include dbus-gtype-specialized.h, which are utilities
for GLib container types.
Add various #defines for types such as
DBUS_TYPE_G_BOOLEAN_ARRAY.
(DBusGValueIterator, DBusGValue): Define, not fully used
yet.
(dbus_g_value_get_g_type): Type for recursive value.
(dbus_g_value_open, dbus_g_value_iterator_get_value)
(dbus_g_value_iterator_get_values, dbus_g_value_iterator_recurse)
(dbus_g_value_free): Prototypes.
(dbus_g_object_register_marshaller, dbus_g_proxy_new_from_proxy): Prototype.
(dbus_g_proxy_set_interface): Prototype.
(dbus_g_proxy_begin_call, dbus_g_proxy_end_call)
(dbus_g_proxy_call_no_reply): Take GLib types instead of DBus
types.
(dbus_g_proxy_get_path, dbus_g_proxy_get_interface):
Accessors.
(DBusGAsyncData, DBusGMethodInvocation): Structures for
doing async invocations.
(dbus_g_method_return, dbus_g_method_return_error):
Prototypes.
* doc/dbus-tutorial.xml: Update GLib section.

* tools/dbus-viewer.c (load_child_nodes): Update
for new invocation type of dbus_g_proxy_end_call.
(load_from_service_thread_func): Ditto.

* tools/print-introspect.c (main): Ditto.

* tools/dbus-names-model.c (have_names_notify)
(names_model_reload, names_model_set_connection)
Use GTypes.

* python/Makefile.am (INCLUDES): Define DBUS_COMPILATION,
needed since Python bindings use GLib bindings.

* test/glib/Makefile.am (INCLUDES): Define DBUS_COMPILATION.
Add --prefix argument.

* tools/Makefile.am: Define DBUS_COMPILATION. Remove
unneeded --ignore-unsupported arg.

* test/glib/test-service-glib.c:
* test/glib/test-service-glib.xml:
* test/glib/test-dbus-glib.c: Add many more tests.
lib/Makefile.am
lib/test-dbus-glib.c
lib/test-service-glib.c
lib/test-service-glib.xml
f03c0af1c7cf075111748b60e5dc22bcafe15ac8 02-Jun-2005 John (J5) Palmieri <johnp@redhat.com> * tools/dbus-send.c (main):
s/dbus_connection_disconnect/dbus_connection_close

* test/glib/test-profile.c (no_bus_thread_func, with_bus_thread_func):
s/dbus_connection_disconnect/dbus_connection_close

* test/test-service.c (path_message_func, filter_func):
s/dbus_connection_disconnect/dbus_connection_close
lib/test-profile.c
est-service.c
4db285c800a68245ad7593e606ca8cb2c21a1329 06-May-2005 Havoc Pennington <hp@redhat.com> 2005-05-05 Havoc Pennington <hp@redhat.com>

* configure.in (LT_*): add notes on how the libtool versioning
works to save thinking. Increment soname to indicate protocol
breakage (though really the library interface hasn't changed I
guess)

* dbus/dbus-transport.c (_dbus_transport_get_is_authenticated):
verify the GUID received from server matches what we were
expecting, if we had an expectation

* dbus/dbus-auth.c (send_ok): send GUID along with the OK command
(_dbus_auth_get_guid_from_server): new function
(send_begin): parse the OK args

* doc/dbus-specification.xml: add GUID to the auth protocol
ata/auth/fallback.auth-script
64f3d8f67db09e0c84ed3ff009b86d0127fe82b4 24-Apr-2005 Havoc Pennington <hp@redhat.com> 2005-04-23 Havoc Pennington <hp@redhat.com>

* dbus/dbus-message.c (dbus_message_append_args): fix doc comment,
reported by Tony Houghton

* test/test-service.c (main): test
dbus_connection_get_object_path_data()

* dbus/dbus-object-tree.c (find_handler): be sure we always init
the exact_match
(_dbus_object_tree_get_user_data_unlocked): new function used by
dbus_connection_get_object_path_data()
(do_register): add assertion test for get_user_data_unlocked
(object_tree_test_iteration): more tests

* dbus/dbus-connection.c (dbus_connection_get_object_path_data):
new function from Dan Reed to let you get the user data from
dbus_connection_register_object_path()
est-service.c
a65587676f6791ff6a7c9ed98bbc53d740f51fa8 17-Mar-2005 Colin Walters <walters@verbum.org> 2005-03-17 Colin Walters <walters@verbum.org>

* bus/print-introspect.c: Move to tools/.
* bus/run-with-tmp-session-bus.sh: Ditto.

* glib/Makefile.am (dbus-glib-bindings.h): Move
generation to tools/Makefile.am.

* test/glib/run-test.sh: Update to handle move
of run-with-tmp-session-bus.sh.

* test/glib/test-service-glib.c: Update to handle
move of dbus-glib-bindings.h.

* tools/print-introspect.c: Moved here
from bus/, and ported to GLib bindings.

* tools/run-with-tmp-session-bus.sh: Moved here
from bus/.

* tools/Makefile.am: Generate dbus-glib-bindings.h
and dbus-bus-introspect.xml here.

* tools/.cvsignore, glib/.cvsignore, bus/.cvsignore:
Update.
lib/run-test.sh
lib/test-service-glib.c
6180ae6941aea083f5b8f3c4d3f16c928935bcaf 17-Mar-2005 Colin Walters <walters@verbum.org> 2005-03-14 Colin Walters <walters@verbum.org>

* bus/driver.c (write_args_for_direction): Use
_dbus_string_get_const_data to retrieve string;
_dbus_string_get_const_data_len doesn't actually return
a NULL-terminated substring.

* test/glib/test-service-glib.c: Include dbus-glib-bindings.h.
(main): Change to use org_freedesktop_DBus_request_name
instead of using g_proxy_begin_call/end_call.
lib/test-service-glib.c
3dea5c183f65c3f924fb442bf606dfeb50f028a4 12-Mar-2005 Colin Walters <walters@verbum.org> 2005-03-11 Colin Walters <walters@verbum.org>

* glib/Makefile.am: Generate dbus-glib-bindings.h and
install it.

* bus/print-introspect.c: New file; prints introspection
data for a given name and object path.

* bus/run-with-tmp-session-bus.sh: New file, refactored
from test/glib/run-test.sh. Creates a temporary session
bus and runs another program.

* test/glib/run-test.sh: Refactor to invoke
run-with-tmp-session-bus.sh.

* bus/driver.c (bus_driver_handle_introspect): Fix to print new
introspection format. Also change to use DBUS_TYPE_x_AS_STRING
macros instead of hardcoding.

* glib/.cvsignore, bus/.cvsignore, test/glib/.cvsignore: Update.
ata/valid-config-files/.cvsignore
lib/.cvsignore
lib/run-test.sh
74b1b35402f6b9bbc09999a6224dfc04bc48b2a9 09-Mar-2005 Colin Walters <walters@verbum.org> 2005-03-09 Colin Walters <walters@verbum.org>

* glib/dbus-gproxy.c (dbus_g_proxy_invoke): New method; calls
to this are generated for client-side wrappers. Invokes a
D-BUS method and returns reply values.

* glib/dbus-binding-tool-glib.c (write_args_sig_for_direction): New
function; writes signature string for argument direction.
(write_args_for_direction): Change to pass input values directly
instead of via address, and fix indentation.
(generate_client_glue): Change to invoke dbus_g_proxy_invoke. Also
make generated wrappers inlineable.

* dbus/dbus-message.c (dbus_message_iter_get_fixed_array): Add
note about using dbus_type_is_fixed.

* dbus/dbus-marshal-basic.c (_dbus_type_is_fixed): Moved to
dbus/dbus-signature.c as dbus_type_is_fixed.

All callers updated.

* dbus/dbus-signature.c (dbus_type_is_fixed): Moved here
from dbus/dbus-marshal-basic.c:_dbus_type_is_fixed.

* dbus/dbus-signature.h: Prototype.

* glib/dbus-binding-tool-glib.c (compute_marshaller_name): Fix
error printf code.

* test/glib/test-dbus-glib.c (main): Be sure to clear error as
appropriate instead of just freeing it.
(main): Free returned strings using g_free.

* test/glib/Makefile.am (test-service-glib-glue.h)
(test-service-glib-bindings.h): Add dependency on dbus-binding-tool.

* glib/dbus-gvalue.c (MAP_BASIC): Refactored from MAP_BASIC_INIT;
simply maps a simple D-BUS type to GType.
(dbus_dbus_type_to_gtype): Function which maps D-BUS type to
GType.
(dbus_gvalue_init): Just invoke dbus_dbus_type_to_gtype and
initialize the value with it.
(dbus_gvalue_binding_type_from_type): Unused, delete.
(dbus_gvalue_demarshal): Switch to hardcoding demarshalling for
various types instead of unmarshalling to value data directly.
Remove can_convert boolean.
(dbus_gvalue_marshal): Remove duplicate initialization; switch to
returning directly instead of using can_convert boolean.
(dbus_gvalue_store): New function; not related to D-BUS per-se.
Stores a GValue in a pointer to a value of its corresponding C
type.

* glib/dbus-gvalue.h: Remove dbus_gvalue_binding_type_from_type,
add dbus_gvalue_store.
lib/Makefile.am
lib/test-dbus-glib.c
8a66b12a848133edd6b769d0a7f618b564913c26 02-Mar-2005 Colin Walters <walters@verbum.org> 2005-03-01 Colin Walters <walters@verbum.org>

* test/glib/test-dbus-glib.c (lose, lose_gerror): Utility
functions copied from dbus-glib-tool.c.
(main): Convert lots of error code to use them.
Also add some testing for introspection bits.
lib/Makefile.am
lib/test-dbus-glib.c
2b97fb81a508a047b14f4c4426c28abfd18bb2e0 27-Feb-2005 Colin Walters <walters@verbum.org> 2005-02-27 Colin Walters <walters@verbum.org>

* glib/dbus-gidl.c (property_info_get_type, arg_info_get_type):
Change return value to const char * instead of int so we can do
full signatures.
(struct PropertyInfo, struct ArgInfo): Store char *.
(property_info_new, arg_info_new): Update parameters, strdup.
(property_info_unref, arg_info_unref): Free.

* glib/dbus-gidl.h: Update prototypes.

* glib/dbus-gparser.c (basic_type_from_string): Delete.
(validate_signature): New function, just validates signature and
sets GError.
(parse_property, parse_arg): Invoke validate_signature. Store
signature instead of just type code.

* glib/dbus-gvalue.c (base_type_from_signature): New utility
function to return a primary type for a signature, dropping
information about types in container types.
(dbus_gvalue_genmarshal_name_from_type)
(dbus_gvalue_binding_type_from_type)
(dbus_gvalue_ctype_from_type): Update to take full signature
instead of type code.
(dbus_gtype_to_dbus_type): Moved here from glib/dbus-gobject.c.

* glib/dbus-gvalue.h: Update prototypes for above.

* glib/dbus-gobject.c (gtype_to_dbus_type): Moved to
glib/dbus-gvalue.c as dbus_gtype_to_dbus_type.
(introspect_properties, introspect_signals, write_interface):
Update to handle signatures, and remove usage of
_dbus_gutils_type_to_string.
(handle_introspect): Print out type codes instead of e.g. "string"
in hardcoded introspection XML; also use x_AS_STRING constants
instead of hardcoding in string.

* glib/dbus-glib-tool.c (pretty_print): Handle signature change
to string. Remove usage of _dbus_gutils_type_to_string.

* glib/dbus-gutils.c (_dbus_gutils_type_to_string): Delete.

* glib/dbus-gutils.h (_dbus_gutils_type_to_string): Update for
deletion.

* glib/dbus-binding-tool-glib.c (compute_marshaller)
(compute_marshaller_name, generate_glue): Handle signature change
to string.
(write_formal_parameters, write_args_for_direction): Ditto, and
remove FIXME.

* tools/dbus-tree-view.c (type_to_string): Delete.
(info_set_func_text): Update to print full signatures.

* test/glib/test-service-glib.xml: Change types to new
introspection format.
lib/test-service-glib.xml
ee27481d7b7d6d9a4f41b7d641a2618dedf676dd 26-Feb-2005 Havoc Pennington <hp@redhat.com> 2005-02-26 Havoc Pennington <hp@redhat.com>

* doc/TODO: remove the "guid" item

* test/glib/test-profile.c (no_bus_thread_func): use open_private
(with_bus_thread_func): use open_private

* dbus/dbus-connection.c (dbus_connection_open_private): new
function that works like the old dbus_connection_open()
(dbus_connection_open): now returns an existing connection if
possible

* dbus/dbus-server-unix.c (handle_new_client_fd_and_unlock): pass
through the GUID to the transport

* dbus/dbus-server.c (_dbus_server_init_base): keep around the
GUID in hex-encoded form.

* dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
pass GUID argument in to the transport

* dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): add
guid argument

* dbus/dbus-transport.c (_dbus_transport_init_base): add guid argument

* dbus/dbus-auth.c (_dbus_auth_server_new): add guid argument
lib/test-profile.c
1b5dace8e6986965af7b573b3b2c5991af11cf6e 24-Feb-2005 Colin Walters <walters@verbum.org> 2005-02-24 Colin Walters <walters@verbum.org>

* test/glib/Makefile.am (EXTRA_DIST): Add test-service-glib.xml
lib/Makefile.am
cc73b3da32ff6d4bebe9013b812f2845ad282cf7 24-Feb-2005 Havoc Pennington <hp@redhat.com> 2005-02-24 Havoc Pennington <hp@redhat.com>

* dbus/dbus-server.c, dbus/dbus-server-unix.c: change semantics so
you must disconnect before unref, since locking and other things
are screwed up otherwise. Fix assorted other locking stuff.

* dbus/dbus-signature.c (dbus_signature_iter_get_element_type):
fix compilation

* dbus/dbus-threads-internal.h: move the mutex/condvar wrappers
into a private header and don't export from the library

* throughout - call _dbus_thread_stuff vs. dbus_thread_stuff
lib/test-profile.c
4c3d2abe274dc970d65688137fbd3151d53d3f7c 20-Feb-2005 Colin Walters <walters@verbum.org> 2005-02-19 Colin Walters <walters@verbum.org>

* glib/dbus-binding-tool-glib.c
(dbus_binding_tool_output_glib_server): Fix iochannel refcounting.

* glib/dbus-glib-tool.c: Include dbus-glib-tool.h, as well
as errno.h and sys/stat.h.
(lose): New function, prints error with
newline and exits.
(lose_gerror): Similar, but takes GError for message.
(main): Add --output argument to specify output file to write to,
instead of always printing to stdout. In this mode, determine
timestamps on source files to see whether any are newer than the
target file. If not, exit. Also convert a number of error
messages to use lose (since it's shorter), and switch to using
g_io_channel_shutdown.
lib/Makefile.am
a9a4cc5f937dd0b987ae9572b5febab7d66c043d 17-Feb-2005 Colin Walters <walters@verbum.org> 2005-02-17 Colin Walters <walters@verbum.org>

* bus/.cvsignore, doc/.cvsignore
* test/data/valid-service-files/.cvsignore, test/glib/.cvsignore:
Update.
ata/valid-service-files/.cvsignore
lib/.cvsignore
248895207dc15914ac7970a6d1431308075dca1d 17-Feb-2005 Colin Walters <walters@verbum.org> 2005-02-17 Colin Walters <walters@verbum.org>

* dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_DBUS):
Rename to DBUS_SERVICE_DBUS.
(DBUS_PATH_ORG_FREEDESKTOP_DBUS): Rename to DBUS_PATH_DBUS.
(DBUS_PATH_ORG_FREEDESKTOP_LOCAL): Rename to DBUS_PATH_LOCAL.
(DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS): Rename to DBUS_INTERFACE_DBUS.
(DBUS_INTERFACE_ORG_FREEDESKTOP_INTROSPECTABLE): Rename to
DBUS_INTERFACE_INTROSPECTABLE.
(DBUS_INTERFACE_ORG_FREEDESKTOP_PROPERTIES): Rename to
DBUS_INTERFACE_PROPERTIES.
(DBUS_INTERFACE_ORG_FREEDESKTOP_PEER): Rename to
DBUS_INTERFACE_PEER.
(DBUS_INTERFACE_ORG_FREEDESKTOP_LOCAL):
DBUS_INTERFACE_LOCAL.

All other users of those constants have been changed.

* bus/driver.c (bus_driver_handle_introspect): Use constants.

* glib/dbus-gobject.c (handle_introspect): Use constants.

* doc/dbus-faq.xml, doc/dbus-specification.xml: Update for rename.
ata/invalid-messages/local-namespace.message
lib/test-dbus-glib.c
lib/test-profile.c
lib/test-service-glib.c
lib/test-thread-server.c
est-service.c
dc12fac5f8a36d0276719bc5a98aa63bffe86399 17-Feb-2005 Colin Walters <walters@verbum.org> 2005-02-17 Colin Walters <walters@verbum.org>

* glib/dbus-gparser.c (struct Parser): Add in_annotation boolean.
(parse_node, parse_interface, parse_method, parse_signal)
(parse_property, parse_annotation): Lose if we're currently in an
annotation.
(parse_annotation): New function.
(parser_start_element, parser_end_element): Handle annotation.
(parse_method, parse_interface): Remove support for c_name attribute,
switch to annotations.

* glib/dbus-gidl.h (interface_info_get_binding_names)
(method_info_get_binding_names)
(interface_info_get_binding_name, method_info_get_binding_name)
(interface_info_set_binding_name, method_info_set_binding_name):
Remove.
(interface_info_get_annotations, method_info_get_annotations)
(interface_info_get_annotation, method_info_get_annotation)
(interface_info_add_annotation, method_info_add_annotation):
Prototype.

* glib/dbus-gidl.c (struct InterfaceInfo): Substitute "annotations"
for "bindings".
(struct MethodInfo): Ditto.
Straightfoward conversion of binding methods into annotation methods
as prototyped.

* glib/dbus-glib-tool.c (pretty_print): Print annotations.

* glib/dbus-binding-tool-glib.h (DBUS_GLIB_ANNOTATION_C_SYMBOL): Define.

* glib/dbus-binding-tool-glib.c (gather_marshallers, generate_glue):
Use new annotation API.

* doc/introspect.dtd: Fix a number of DTD syntax errors. Add
annotation element.

* doc/dbus-specification.xml: Discuss introspection annotations,
include list of well-known annotations.

* test/glib/test-service-glib.xml: Make validate against new DTD.
lib/test-service-glib.xml
03f6615eaccc2c1f84d4252e5a627a2ac86d41d9 17-Feb-2005 Colin Walters <walters@verbum.org> 2005-02-17 Colin Walters <walters@verbum.org>

This patch is based on initial work from
Paul Kuliniewicz <kuliniew@purdue.edu>.

* glib/dbus-gvalue.c (dbus_gvalue_init): New function; move
initialization of GValue from dbus type to here.
(dbus_gvalue_genmarshal_name_from_type): New function; generates a string
for the "glib-genmarshal" program from a DBus type.
(dbus_gvalue_binding_type_from_type): New function; turns a DBus type
into the C name for it we use in the glib bindings.
(dbus_gvalue_ctype_from_type): New function; maps a DBus type into a
glib C type (not GValue).
(dbus_gvalue_demarshal): invoke dbus_gvalue_init.

* glib/dbus-gutils.c (_dbus_gutils_wincaps_to_uscore): Moved here
from dbus-gobject.c.

* glib/dbus-gutils.h: Prototype it.

* glib/dbus-gproxy.c: Include new dbus-gobject.h.
(marshal_dbus_message_to_g_marshaller): Use new shared function
dbus_glib_marshal_dbus_message_to_gvalue_array.

* glib/dbus-gparser.c (parse_interface, parse_method): Handle c_name attribute.
Will be changed once we have annotations.

* glib/dbus-gobject.c: Change info_hash_mutex from GStaticMutex to
GStaticRWLock. Callers updated.
(wincaps_to_uscore): Move to dbus-gutils.c. Callers updated.
(string_table_next): New function for iterating over zero-terminated
string value array.
(string_table_lookup): New function; retrieves specific entry in
array.
(get_method_data): New function; look up method data in object data chunk.
(object_error_domain_prefix_from_object_info)
(object_error_code_from_object_info): New functions, but not implemented yet.
(method_interface_from_object_info): New function; retrieve interface name.
(method_name_from_object_info): New function; retrieve method name.
(method_arg_info_from_object_info): New function; retrieve argument data.
(arg_iterate): New function; iterates over serialized argument data.
(method_dir_signature_from_object_info): New function; returns a
GString holding type signature for arguments for just one
direction (input or output).
(method_input_signature_from_object_info)
(method_output_signature_from_object_info): New functions.
(dbus_glib_marshal_dbus_message_to_gvalue_array): New shared function;
converts dbus message arguments into a GValue array. Used for both
signal handling and method invocation.
(struct DBusGlibWriteIterfaceData): New utility structure.
(write_interface): New function; generate introspection XML for
an interface.
(introspect_interfaces): New function; gathers all interface->methods,
generates introspection XML for them.
(handle_introspect): Invoke introspect_interfaces.
(get_object_property): Be sure to zero-initalize stack-allocated GValue.
(lookup_object_and_method): New function; examines an incoming message
and attempts to match it up (via interface, method name, and argument
signature) with a known object and method.
(gerror_domaincode_to_dbus_error_name): New function; converts a
GError domain and code into a DBus error name. Needs GError data
added to object introspection to work well.
(gerror_to_dbus_error_message): Creates a DBusMessage error return from
GError.
(invoke_object_method): New function to invoke an object method
looked up via lookup_object_and_method. Parses the incoming
message, turns it into a GValue array, then invokes the marshaller
specified in the DBusGMethodInfo. Creates a new message with
either return values or error message as appropriate.
(gobject_message_function): Invoke lookup_object_and_method and
invoke_object_method.

* glib/dbus-glib-tool.c: Include dbus-binding-tool-glib.h.
(enum DBusBindingOutputMode): New enum for binding output modes.
(pretty_print): Print binding names.
(dbus_binding_tool_error_quark): GError bits.
(version): Fix typo.
(main): Create GIOChannel for output. Parse new --mode argument,
possible values are "pretty-print", "glib-server", "glib-client".
Use mode to invoke appropriate function.

* glib/dbus-gobject.h: Prototype dbus_glib_marshal_dbus_message_to_gvalue_array.

* glib/dbus-glib-tool.h: New header, just includes GError bits
for now.

* glib/dbus-gidl.c (struct InterfaceInfo): Add bindings hashtable;
maps binding style to name.
(struct MethodInfo): Ditto.
(get_hash_keys, get_hash_key): Utility function, returns keys for
a GHashTable.
(interface_info_new, method_info_new): Initialize bindings.
(interface_info_unref, method_info_unref): Destroy bindings.
(method_info_get_binding_names, method_info_get_binding_name)
(interface_info_get_binding_names, interface_info_get_binding_name):
Functions for retrieving binding names.
(method_info_set_binding_name, interface_info_set_binding_name):
Functions for setting binding names.

* glib/dbus-binding-tool-glib.h: New file, has prototypes
for glib binding generation.

* glib/dbus-binding-tool-glib.c: New file, implements server-side
and client-side glib glue generation.

* glib/Makefile.am (dbus_binding_tool_SOURCES): Add
dbus-binding-tool-glib.c, dbus-binding-tool-glib.h,
dbus-glib-tool.h.

* dbus/dbus-glib.h (struct DBusGMethodMarshaller): Remove in favor
of using GClosureMarshal directly.
(struct DBusGObjectInfo): Add n_infos member.

* test/glib/test-service-glib.xml: New file; contains introspection data
for MyTestObject used in test-service-glib.c.

* test/glib/test-service-glib.c (enum MyObjectError): New GError enum.
(my_object_do_nothing, my_object_increment, my_object_throw_error)
(my_object_uppercase, my_object_many_args): New test methods.
(main): Use dbus_g_object_class_install_info to include generated object
info.

* test/glib/Makefile.am: Generate server-side glue for test-service-glib.c,
as well as client-side bindings.

* test/glib/test-dbus-glib.c: Include test-service-glib-bindings.h.
(main): Activate TestSuiteGLibService; test invoke a bunch of its methods
using both the dbus_gproxy stuff directly as well as the generated bindings.
lib/Makefile.am
lib/test-dbus-glib.c
lib/test-service-glib.c
lib/test-service-glib.xml
aa4f823781185fb18187714798795d7e4b0c9b65 11-Feb-2005 Havoc Pennington <hp@redhat.com> 2005-02-10 Havoc Pennington <hp@redhat.com>

* test/glib/test-dbus-glib.c (main): fix so this test doesn't fail
(call dbus_g_proxy_add_signal)

* dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
escape the hostname
(_dbus_server_new_for_domain_socket): escape the path

* dbus/dbus-address.c (dbus_address_escape_value): new
(dbus_address_unescape_value): new
(dbus_parse_address): unescape values

* dbus/dbus-string.c (_dbus_string_append_byte_as_hex): new function

* doc/dbus-specification.xml: explain how to escape values in
addresses
lib/test-dbus-glib.c
71f3b461b371d6bf7c7bc4e92578420b78d5c0d8 11-Feb-2005 Havoc Pennington <hp@redhat.com> 2005-02-10 Havoc Pennington <hp@redhat.com>

* dbus/dbus-message-factory.c (generate_special): modify test to
avoid using a non-basic dict key

* dbus/dbus-marshal-validate-util.c: add test for the below

* doc/dbus-specification.xml: require that dict keys are a basic
type

* dbus/dbus-marshal-validate.c
(_dbus_validate_signature_with_reason): require that dict key is a
basic type
lib/test-profile.c
1dcacffc325e50754d4cc3338822d1f03c8b6e45 31-Jan-2005 Havoc Pennington <hp@redhat.com> 2005-01-30 Havoc Pennington <hp@redhat.com>

* glib/dbus-glib.c (dbus_g_pending_call_set_notify): new function
(dbus_g_pending_call_cancel): new function

* dbus/dbus-glib.h: move GType decls for connection/message here;
* dbus/dbus-glib.c: move all the g_type and ref/unref stuff in
here, just kind of rationalizing how we handle all that

* tools/dbus-names-model.c: new file for a tree model listing the
services on a bus

* tools/dbus-tree-view.c (model_new): use proper typing on the
model rows
lib/test-dbus-glib.c
4d985d98906577e3344fc1107d341b8ac969db1e 30-Jan-2005 Havoc Pennington <hp@redhat.com> 2005-01-30 Havoc Pennington <hp@redhat.com>

* glib/dbus-gmain.c: add a custom GSource back that just checks
whether the message queue has anything in it; otherwise, there are
cases where we won't see messages in the queue since there was no
IO visible to the glib main loop

* dbus/dbus-connection-internal.h (_DBUS_DEFAULT_TIMEOUT_VALUE):
increase default message timeout to 25 seconds
lib/test-service-glib.c
191adf353049ca89962a871e8dac7f1621b2dd87 30-Jan-2005 Havoc Pennington <hp@redhat.com> 2005-01-30 Havoc Pennington <hp@redhat.com>

* test/glib/test-profile.c (no_bus_stop_server): remove the
warning about the g_warning that I just fixed
lib/test-profile.c
98ad8a8ec6626f7f5c78915b6bdf2be688b4839f 30-Jan-2005 Havoc Pennington <hp@redhat.com> 2005-01-30 Havoc Pennington <hp@redhat.com>

* glib/dbus-gobject.c (introspect_properties): fix the XML
generated

* dbus/dbus-message.c (dbus_message_unref): add an in_cache flag
which effectively detects the use of freed messages

* glib/dbus-gobject.c (handle_introspect): modify and return the
reply message instead of the incoming message

* dbus/dbus-object-tree.c (handle_default_introspect_unlocked):
gee, maybe it should SEND THE XML instead of just making a string
and freeing it again ;-)

* tools/dbus-print-message.c (print_message): improve printing of
messages

* configure.in: add debug-glib.service to the output
lib/run-test.sh
lib/test-service-glib.c
41f52c96d651003b3d0a266a582d401228a8368e 30-Jan-2005 Havoc Pennington <hp@redhat.com> 2005-01-30 Havoc Pennington <hp@redhat.com>

dbus-viewer introspected and displayed the bus driver

* dbus/dbus-object-tree.c
(object_tree_test_iteration): add tests for a handler registered on "/"

* dbus/dbus-object-tree.c
(_dbus_decompose_path): fix to handle path "/" properly
(run_decompose_tests): add tests for path decomposition

* glib/dbus-gutils.c (_dbus_gutils_split_path): fix to handle "/"
properly

* glib/dbus-gobject.c (handle_introspect): fix quotes

* test/glib/run-test.sh: support launching the bus, then running
dbus-viewer

* test/glib/test-service-glib.c (main): put in a trivial gobject
subclass and register it on the connection

* bus/driver.c (bus_driver_handle_introspect): implement
introspection of the bus driver service

* dbus/dbus-protocol.h: add #defines for the XML namespace,
identifiers, doctype decl

* bus/driver.c (bus_driver_handle_get_service_owner): handle
attempts to get owner of DBUS_SERVICE_ORG_FREEDESKTOP_DBUS by
returning the service unchanged.
(bus_driver_handle_message): remove old check for reply_serial in
method calls, now the message type deals with that
(bus_driver_handle_message): handle NULL interface

* glib/dbus-gproxy.c (dbus_g_proxy_get_bus_name): new function

* glib/dbus-gloader-expat.c (description_load_from_string): allow
-1 for len

* tools/dbus-viewer.c: add support for introspecting a service on
a bus

* glib/dbus-gproxy.c (dbus_g_pending_call_ref): add
(dbus_g_pending_call_unref): add
lib/run-test.sh
lib/test-service-glib.c
9d21554dd3b560952cd5aa607c4ec07898c0b260 23-Jan-2005 Havoc Pennington <hp@redhat.com> 2005-01-23 Havoc Pennington <hp@redhat.com>

* dbus/dbus-message-factory.c, dbus/dbus-message-util.c:
get this all working, not many tests in the framework yet though
ata/invalid-messages/boolean-array-length-too-long.message-raw
2abdb13ebe737e39653b79fecd93477e156b9db1 18-Jan-2005 Havoc Pennington <hp@redhat.com> 2005-01-18 Havoc Pennington <hp@redhat.com>

* rename dbus-daemon-1 to dbus-daemon throughout
lib/run-test.sh
8873c90f99303f9cc308f15f8d03e637911f5b9e 18-Jan-2005 Havoc Pennington <hp@redhat.com> 2005-01-18 Havoc Pennington <hp@redhat.com>

* Throughout, grand renaming to strip out the use of "service",
just say "name" instead (or "bus name" when ambiguous). Did not
change the internal code of the message bus itself, only the
programmer-facing API and messages.

* doc/dbus-specification.xml: further update the message bus section

* bus/config-parser.c (all_are_equiv): fix bug using freed string
in error case
ata/equiv-config-files/basic/basic-1.conf
ata/valid-config-files/basic.conf
ata/valid-config-files/many-rules.conf
lib/test-dbus-glib.c
lib/test-profile.c
lib/test-service-glib.c
est-service.c
7bf62e31a3c820852271768fafc04ba95c31a19f 17-Jan-2005 Havoc Pennington <hp@redhat.com> 2005-01-16 Havoc Pennington <hp@redhat.com>

This is about it on what can be disabled/deleted from libdbus
easily, back below 150K anyhow. Deeper cuts are more work than
just turning the code off as I've done here.

* dbus/dbus-marshal-basic.c (_dbus_pack_int32): we don't need the
signed int convenience funcs

* dbus/dbus-internals.c (_dbus_verbose_real): omit when not in
verbose mode

* dbus/dbus-string-util.c, dbus/dbus-string.c: more breaking
things out of libdbus

* dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-util.c: same

* dbus/dbus-hash.c: purge the TWO_STRINGS crap (well, make it
tests-enabled-only, though it should probably be deleted)

* dbus/dbus-message-util.c: same stuff

* dbus/dbus-auth-util.c: same stuff
nused-code-gc.py
7f9721a6d36697a57170c604aa845af3531bd157 16-Jan-2005 Havoc Pennington <hp@redhat.com> 2005-01-16 Havoc Pennington <hp@redhat.com>

* test/unused-code-gc.py: hacky script to find code that's used
only by the bus (not libdbus) or used only by tests or not used at
all. It has some false alarms, but looks like we can clean up a
lot of size from libdbus.

* dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-utils.c,
dbus/Makefile.am: initially move 10K of binary size out of libdbus
nused-code-gc.py
31988af4089f3793940417535f8eabaae1ac26c8 16-Jan-2005 Havoc Pennington <hp@redhat.com> 2005-01-16 Havoc Pennington <hp@redhat.com>

* Add and fix docs according to Doxygen warnings throughout
source.

* dbus/dbus-marshal-recursive.c
(_dbus_type_reader_array_is_empty): change this to just call
array_reader_get_array_len() and make it static

* dbus/dbus-message.c (dbus_message_iter_get_element_type): rename
from get_array_type
(dbus_message_iter_init_append): rename from append_iter_init

* dbus/dbus-marshal-recursive.c
(_dbus_type_reader_get_element_type): rename from
_dbus_type_reader_get_array_type
lib/test-thread-client.c
b3416423b1e3c17357833d896c1b7cd684660771 16-Jan-2005 Havoc Pennington <hp@redhat.com> 2005-01-15 Havoc Pennington <hp@redhat.com>

* test/glib/test-profile.c (with_bus_server_filter): fix crash

* dbus/dbus-marshal-basic.c (_dbus_unpack_uint32): inline as macro
when DBUS_DISABLE_ASSERT
(_dbus_marshal_set_basic): be sure we align for the string length

* dbus/dbus-marshal-recursive.c (skip_one_complete_type): make
this look faster

* dbus/dbus-string.c (_dbus_string_get_const_data_len): add an
inline macro version
(_dbus_string_set_byte): provide inline macro version
lib/test-profile.c
9c3d566e95c9080f6040c64531b0ccae22bd5d74 15-Jan-2005 Havoc Pennington <hp@redhat.com> 2005-01-15 Havoc Pennington <hp@redhat.com>

* Land the new message args API and type system.

This patch is huge, but the public API change is not
really large. The set of D-BUS types has changed somewhat,
and the arg "getters" are more geared toward language bindings;
they don't make a copy, etc.

There are also some known issues. See these emails for details
on this huge patch:
http://lists.freedesktop.org/archives/dbus/2004-December/001836.html
http://lists.freedesktop.org/archives/dbus/2005-January/001922.html

* dbus/dbus-marshal-*: all the new stuff

* dbus/dbus-message.c: basically rewritten

* dbus/dbus-memory.c (check_guards): with "guards" enabled, init
freed blocks to be all non-nul bytes so using freed memory is less
likely to work right

* dbus/dbus-internals.c (_dbus_test_oom_handling): add
DBUS_FAIL_MALLOC=N environment variable, so you can do
DBUS_FAIL_MALLOC=0 to skip the out-of-memory checking, or
DBUS_FAIL_MALLOC=10 to make it really, really, really slow and
thorough.

* qt/message.cpp: port to the new message args API
(operator<<): use str.utf8() rather than str.unicode()
(pretty sure this is right from the Qt docs?)

* glib/dbus-gvalue.c: port to the new message args API

* bus/dispatch.c, bus/driver.c: port to the new message args API

* dbus/dbus-string.c (_dbus_string_init_const_len): initialize the
"locked" flag to TRUE and align_offset to 0; I guess we never
looked at these anyhow, but seems cleaner.

* dbus/dbus-string.h (_DBUS_STRING_ALLOCATION_PADDING):
move allocation padding macro to this header; use it to implement
(_DBUS_STRING_STATIC): ability to declare a static string.

* dbus/dbus-message.c (_dbus_message_has_type_interface_member):
change to return TRUE if the interface is not set.

* dbus/dbus-string.[hc]: move the D-BUS specific validation stuff
to dbus-marshal-validate.[hc]

* dbus/dbus-marshal-basic.c (_dbus_type_to_string): move here from
dbus-internals.c

* dbus/Makefile.am: cut over from dbus-marshal.[hc]
to dbus-marshal-*.[hc]

* dbus/dbus-object-tree.c (_dbus_decompose_path): move this
function here from dbus-marshal.c
akefile.am
reak-loader.c
lib/run-test.sh
lib/test-dbus-glib.c
lib/test-profile.c
lib/test-thread-client.c
lib/test-thread-server.c
est-service.c
b8a309ac940374ead27618508ab8f81665ff7d9d 24-Dec-2004 Havoc Pennington <hp@redhat.com> 2004-12-24 Havoc Pennington <hp@redhat.com>

* test/decode-gcov.c: change to use .gcno and .gcda files, but the
file format has also changed and I haven't adapted to that yet

* Makefile.am: load .gcno files from latest gcc
ecode-gcov.c
b60c835d346b7e214e627abd8e0cdf06932313a7 27-Nov-2004 Havoc Pennington <hp@redhat.com> 2004-11-27 Havoc Pennington <hp@redhat.com>

* dbus/dbus-string.h (_dbus_string_get_byte): inline when asserts
are disabled
(_dbus_string_get_const_data): inline when asserts are disabled

* dbus/dbus-message.c: record the _dbus_current_generation of
creation so we can complain if dbus_shutdown() is used improperly.
Do this only if checks are enabled.

* dbus/dbus-connection.c: ditto
lib/test-profile.c
65090abbb9582d25a795f1dd835ea03973be75e7 27-Nov-2004 Havoc Pennington <hp@redhat.com> 2004-11-26 Havoc Pennington <hp@redhat.com>

* test/glib/test-profile.c: add with_bus mode to profile echoes
that go through the bus.

* test/glib/run-test.sh: add ability to run test-profile

* bus/dbus-daemon-1.1.in: fix to say that SIGHUP causes partial
config file reload.
lib/run-test.sh
lib/test-profile.c
9e289c6488545810dccfd4a23c5eb51d703722bd 27-Nov-2004 Havoc Pennington <hp@redhat.com> 2004-11-26 Havoc Pennington <hp@redhat.com>

* test/glib/test-profile.c: clean up how the fake_malloc_overhead
thing was implemented
lib/test-profile.c
f4a3751eefbf189aa948bc473d65b6cd25024e1c 26-Nov-2004 Havoc Pennington <hp@redhat.com> 2004-11-26 Havoc Pennington <hp@redhat.com>

* test/glib/test-profile.c: tweak a bit, add support for some
made-up minimal malloc overhead with plain sockets, since in
real life some sort of buffers are unavoidable thus we could
count them in the theoretical best case
lib/test-profile.c
a58180de0e720f7fca46a5af69a7b27b5e102a1d 26-Nov-2004 Havoc Pennington <hp@redhat.com> 2004-11-26 Havoc Pennington <hp@redhat.com>

* dbus/dbus-message.c (struct DBusMessage): put the locked bit and
the "char byte_order" next to each other to save 4 bytes
(dbus_message_new_empty_header): reduce preallocation, since the
message cache should achieve a similar effect
(dbus_message_cache_or_finalize, dbus_message_get_cached): add a
message cache that keeps a few DBusMessage around in a pool,
another 8% speedup or so.

* dbus/dbus-dataslot.c (_dbus_data_slot_list_clear): new function
lib/test-profile.c
dbdea921b5967ed25b24a9e5af5d6a3db54c5ec7 26-Nov-2004 Havoc Pennington <hp@redhat.com> 2004-11-25 Havoc Pennington <hp@redhat.com>

The primary change here is to always write() once before adding
the write watch, which gives us about a 10% performance increase.

* dbus/dbus-transport-unix.c: a number of modifications to cope
with removing messages_pending
(check_write_watch): properly handle
DBUS_AUTH_STATE_WAITING_FOR_MEMORY; adapt to removal of
messages_pending stuff
(check_read_watch): properly handle WAITING_FOR_MEMORY and
AUTHENTICATED cases
(unix_handle_watch): after writing, see if the write watch can be
removed
(unix_do_iteration): assert that write_watch/read_watch are
non-NULL rather than testing that they aren't, since they
aren't allowed to be NULL. check_write_watch() at the end so
we add the watch if we did not finish writing (e.g. got EAGAIN)

* dbus/dbus-transport-protected.h: remove messages_pending call,
since it resulted in too much inefficient watch adding/removing;
instead we now require that the transport user does an iteration
after queueing outgoing messages, and after trying the first
write() we add a write watch if we got EAGAIN or exceeded our
max bytes to write per iteration setting

* dbus/dbus-string.c (_dbus_string_validate_signature): add this
function

* dbus/dbus-server-unix.c (unix_finalize): the socket name was
freed and then accessed, valgrind flagged this bug, fix it

* dbus/dbus-message.c: fix several bugs where HEADER_FIELD_LAST was taken
as the last valid field plus 1, where really it is equal to the
last valid field. Corrects some message corruption issues.

* dbus/dbus-mainloop.c: verbosity changes

* dbus/dbus-keyring.c (_dbus_keyring_new_homedir): handle OOM
instead of aborting in one of the test codepaths

* dbus/dbus-internals.c (_dbus_verbose_real): fix a bug that
caused not printing the pid ever again if a verbose was missing
the newline at the end
(_dbus_header_field_to_string): add HEADER_FIELD_SIGNATURE

* dbus/dbus-connection.c: verbosity changes;
(dbus_connection_has_messages_to_send): new function
(_dbus_connection_message_sent): no longer call transport->messages_pending
(_dbus_connection_send_preallocated_unlocked): do one iteration to
try to write() immediately, so we can avoid the write watch. This
is the core purpose of this patchset
(_dbus_connection_get_dispatch_status_unlocked): if disconnected,
dump the outgoing message queue, so nobody will get confused
trying to send them or thinking stuff is pending to be sent

* bus/test.c: verbosity changes

* bus/driver.c: verbosity/assertion changes

* bus/dispatch.c: a bunch of little tweaks to get it working again
because this patchset changes when/where you need to block.
lib/test-profile.c
2ce2ab4368d9b037c51cd3cb4ef39e3f7ade8b00 23-Nov-2004 Havoc Pennington <hp@redhat.com> 2004-11-23 Havoc Pennington <hp@redhat.com>

* test/glib/test-profile.c: modify to accept a plain_sockets
argument in which case it will bench plain sockets instead of
libdbus, for comparison purposes.
lib/test-profile.c
25c1f310aafc8b3d89ee19656a64244e6f108dbb 22-Nov-2004 Havoc Pennington <hp@redhat.com> 2004-11-22 Havoc Pennington <hp@redhat.com>

* test/glib/test-profile.c (N_CLIENT_THREADS): run multiple
threads for more time, so sysprof can get a grip on it.

* dbus/dbus-string.c (_dbus_string_validate_utf8): remove
pointless variable
lib/test-profile.c
1b1dfafc344ad7b60b8156a1bbdbfc1b364bfa98 13-Nov-2004 Havoc Pennington <hp@redhat.com> 2004-11-13 Havoc Pennington <hp@redhat.com>

* test/glib/test-profile.c: fix this thing up a bit

* dbus/dbus-message.c (dbus_message_new_empty_header): increase
preallocation sizes by a fair bit; not sure if this will be an
overall performance win or not, but it does reduce reallocs.

* dbus/dbus-string.c (set_length, reallocate_for_length): ignore
the test hack that forced constant realloc if asserts are
disabled, so we can profile sanely. Sprinkle in some
_DBUS_UNLIKELY() which are probably pointless, but before I
noticed the real performance problem I put them in.
(_dbus_string_validate_utf8): micro-optimize this thing a little
bit, though callgrind says it didn't help; then special-case
ascii, which did help a lot; then be sure we detect nul bytes as
invalid, which is a bugfix.
(align_length_then_lengthen): add some more _DBUS_UNLIKELY
superstition; use memset to nul the padding instead of a manual
loop.
(_dbus_string_get_length): inline this as a
macro; it showed up in the profile because it's used for loop
tests and so forth
lib/test-profile.c
736fa825e15c8d72eac85080e6cdf028c2f8df43 18-Oct-2004 Colin Walters <walters@verbum.org> 2004-10-18 Colin Walters <walters@verbum.org>

* bus/selinux.h: Add bus_selinux_enabled.

* bus/selinux.c (bus_selinux_enabled): Implement it.

* bus/config-parser.c (struct include): Add
if_selinux_enabled member.
(start_busconfig_child): Parse if_selinux_enabled
attribute for include.
(bus_config_parser_content): Handle it.

* bus/session.conf.in, bus/system.conf.in: Add
inclusion of context mapping to default config files;
conditional on SELinux being enabled.

* doc/busconfig.dtd: Add to if_selinux_enabled to default DTD.

* test/data/invalid-config-files/badselinux-1.conf,
test/data/invalid-config-files/badselinux-2.conf:
Test files for bad syntax.
ata/invalid-config-files/badselinux-1.conf
ata/invalid-config-files/badselinux-2.conf
64b63e84b7f08695bf194a05aadd074600c8e622 20-Sep-2004 Jon Trowbridge <trow@ximian.com> 2004-09-20 Jon Trowbridge <trow@ximian.com>

Patch from Nat Friedman <nat@novell.com>

* mono/Makefile.am: A number of small build fixes to allow "make
distcheck" to succeed.

* mono/example/Makefile.am: "make distcheck" fixes.

* mono/AssemblyInfo.cs.in: When signing the assembly, look for the
key in @srcdir@.

* test/Makefile.am: "make distcheck" fixes.
akefile.am
8a2c91b8a549402040c94b45b063311975583efd 25-Aug-2004 Olivier Andrieu <oliv__a@users.sourceforge.net> * bus/config-parser.c (set_limit):
* bus/dbus-daemon-1.1.in:
* test/data/valid-config-files/many-rules.conf: set the
max_match_rules_per_connection limt from the config file.

* doc/busconfig.dtd: update the DTD.

* bus/driver.c: remove some unused variables.
ata/valid-config-files/many-rules.conf
43605a6f4e78a8c28afb4b1e924dff0301e0e95c 10-Aug-2004 Havoc Pennington <hp@redhat.com> 2004-08-09 Havoc Pennington <hp@redhat.com>

* COPYING: switch to Academic Free License version 2.1 instead of
2.0, to resolve complaints about patent termination clause.
reak-loader.c
lib/test-profile.c
1e9b185b0c274ef0d684b1e43418388225321e72 30-Jul-2004 Havoc Pennington <hp@redhat.com> 2004-07-24 Havoc Pennington <hp@redhat.com>

SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>

* bus/selinux.c, bus/selinux.h: new file encapsulating selinux
functionality

* configure.in: add --enable-selinux

* bus/policy.c (bus_policy_merge): add FIXME to a comment

* bus/main.c (main): initialize and shut down selinux

* bus/connection.c: store SELinux ID on each connection, to avoid
repeated getting of the string context and converting it into
an ID

* bus/bus.c (bus_context_get_policy): new accessor, though it
isn't used
(bus_context_check_security_policy): check whether the security
context of sender connection can send to the security context of
recipient connection

* bus/config-parser.c: add parsing for <selinux> and <associate>

* dbus/dbus-transport.c (_dbus_transport_get_unix_fd): to
implement dbus_connection_get_unix_fd()

* dbus/dbus-connection.c (dbus_connection_get_unix_fd): new
function, used by the selinux stuff
ata/valid-config-files/basic.conf
4076d31c71bee332c4a697597a93345b45850b33 29-Jul-2004 Olivier Andrieu <oliv__a@users.sourceforge.net> * bus/config-loader-libxml.c: complete the implementation of libxml
backend for config file loader. Doesn't work with full OOM test yet.

* configure.in: change error when selecting libxml into a warning.

* test/data/invalid-config-files: add two non-well-formed XML files.

* glib/Makefile.am: libdbus_gtool always uses expat, not libxml.

* dbus/dbus-transport-unix.c (unix_handle_watch): do not disconnect in
case of DBUS_WATCH_HANGUP, several do_reading() may be necessary to
read all the buffer. (bug #894)

* bus/activation.c (bus_activation_activate_service): fix a potential
assertion failure (bug #896). Small optimization in the case of
auto-activation messages.

* dbus/dbus-message.c (verify_test_message, _dbus_message_test): add
test case for byte-through-vararg bug (#901). patch by Kimmo
Hämäläinen.
ata/invalid-config-files/not-well-formed.conf
ata/invalid-config-files/truncated-file.conf
8d413c6e71390de68e94d7a21790de4ecf49e396 25-Jul-2004 Havoc Pennington <hp@redhat.com> 2004-07-24 Havoc Pennington <hp@redhat.com>

* Makefile.am (DIST_SUBDIRS): add DIST_SUBDIRS, problem solved by
Owen

* test/Makefile.am (DIST_SUBDIRS): here also
akefile.am
961e6ca41c1e9433055130569ce3492866e2126b 20-Jun-2004 Havoc Pennington <hp@redhat.com> 2004-06-20 Havoc Pennington <hp@redhat.com>

* dbus/dbus-glib-error-enum.h: autogenerate the GError enum
codes from the dbus error names

* glib/dbus-glib.h: move to subdir dbus/ since it's included
as dbus/dbus-glib.h and that breakage is now visible due to
including dbus/dbus-glib.h in dbus-glib-lowlevel.h

* glib/dbus-glib.h: s/gproxy/g_proxy/

* dbus/dbus-shared.h: new header to hold stuff shared with
binding APIs

* dbus/dbus-protocol.h (DBUS_ERROR_*): move errors here rather
than dbus-errors.h

* glib/dbus-glib.h (dbus_set_g_error): move to
dbus-glib-lowlevel.h

* glib/dbus-glib.h: remove dbus/dbus.h from here; change a bunch
of stuff to enable this

* dbus/dbus-glib-lowlevel.h: put dbus/dbus.h here

* a bunch of other changes with the same basic "separate glib
bindings from dbus.h" theme
lib/Makefile.am
lib/test-dbus-glib.c
lib/test-profile.c
lib/test-service-glib.c
lib/test-thread-client.c
lib/test-thread-server.c
f7beca572b341c4cabf2f97a9f0d6d763e6acb40 07-Jun-2004 Havoc Pennington <hp@redhat.com> 2004-06-07 Havoc Pennington <hp@redhat.com>

* dbus/dbus-message-builder.c (_dbus_message_data_load): append
random signature when using REQUIRED_FIELDS (this hack won't work
in the long term)

* dbus/dbus-message.c: change the signature to be a header field,
instead of message->signature special-case string. Incremental
step forward. Then we can fix up code to send the signature in the
message, then fix up code to validate said signature, then fix up
code to not put the typecodes inline, etc.
(load_one_message): don't make up the signature after the fact
(decode_header_data): require signature field for the known
message types

* dbus/dbus-marshal.c (_dbus_marshal_string_len): new

* dbus/dbus-protocol.h: add DBUS_HEADER_FIELD_SIGNATURE
ata/valid-messages/simplest-manual.message
ata/valid-messages/standard-acquire-service.message
ata/valid-messages/standard-hello.message
ata/valid-messages/standard-list-services.message
ata/valid-messages/standard-service-exists.message
est-service.c
96f6740f2fbc16c7ee220d3d5abdc94e22da78f3 05-Jun-2004 Olivier Andrieu <oliv__a@users.sourceforge.net> 2004-06-05 Olivier Andrieu <oliv__a@users.sourceforge.net>

* dbus/dbus-connection.h, dbus/dbus-connection.c: have object path
registration functions take the path argument as char* instead of
char**.

* dbus/dbus-marshal.h, dbus/dbus-marshal.c (_dbus_decompose_path):
split off the path decompostion part of
_dbus_demarshal_object_path. Some misc. fixes to silence compiler
warnings.

* glib/dbus-gobject.c, test/test-service.c: update accordingly.
est-service.c
63de4681299428db8be68bab64b969e0c1229273 02-Jun-2004 Kristian Høgsberg <krh@redhat.com> 2004-06-02 Kristian Høgsberg <krh@redhat.com>

* dbus/dbus-auth.c: Rewrite auth protocol handling to use a state
machine approach. A state is implemented as a function that
handles incoming events as specified for that state.

* doc/dbus-specification.xml: Update auth protocol state machine
specification to match implementation. Remove some leftover
base64 examples.
ata/auth/fail-after-n-attempts.auth-script
e12863aae85dc131fcdd552edd6b32bd15702e12 01-Jun-2004 Havoc Pennington <hp@redhat.com> 2004-05-31 Havoc Pennington <hp@redhat.com>

* glib/dbus-gidl.c (method_info_add_arg): keep args sorted with
"in" before "out"

* glib/dbus-gobject.c (dbus_type_to_string): move to dbus-gutils.c

* glib/dbus-glib-tool.c (main): set up to have a --self-test
option that runs the tests, and start filling in some code
including for starters just dumping the interfaces to stdout

* glib/Makefile.am (INCLUDES): define DBUS_LOCALEDIR

* test/data/valid-introspection-files/lots-of-types.xml: test of
an example introspection file

* glib/dbus-gparser.c (parser_check_doctype): doctype should be
"node" (I think...)
ata/valid-introspection-files/lots-of-types.xml
fbae5baa06819fed71f62ddbba64a64675c2d333 29-May-2004 Havoc Pennington <hp@redhat.com> 2004-05-28 Havoc Pennington <hp@redhat.com>

* test/glib/test-service-glib.c (main): remove unused variable

* glib/dbus-gidl.c (base_info_ref): fix a silly compiler warning

* dbus/dbus-auth.h (enum): remove AUTHENTICATED_WITH_UNUSED_BYTES
from the enum, no longer in use.

* dbus/dbus-sysdeps.h: include config.h so DBUS_VA_COPY actually
works right.

* dbus/dbus-message.c: add various _dbus_return_val_if_fail for
whether error_name passed in is a valid error name.
lib/test-service-glib.c
c614e5b4b12c771422da809014904fccccd442c8 18-May-2004 Kristian Høgsberg <krh@redhat.com> * dbus/dbus-auth.c (client_try_next_mechanism): Remove logic to
filter against auth->allowed_mechs; we only add allowed mechs in
record_mechanisms().

* dbus/dbus-auth-script.c (_dbus_auth_script_run): Add an
ALLOWED_MECHS to auth-script format so we can set the list of
allowed mechanisms.

* data/auth/client-out-of-mechanisms.auth-script: New test to
check client disconnects when it is out of mechanisms to try.

* dbus/dbus-auth.c (process_command): Remove check for lines
longer that 1 MB; we only buffer up maximum 16 kB.

* dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
dbus/dbus-auth-script.c, dbus/dbus-auth.c, dbus/dbus-auth.h:
Remove auth state AUTHENTICATED_WITH_UNUSED_BYTES, instead always
assume there might be unused bytes.

* dbus/dbus-auth.c (_dbus_auth_do_work): Remove check for
client-out-of-mechs, it is handled in process_reject(). Move check
for max failures to send_rejected(), as it's a server-only thing.
ata/auth/client-out-of-mechanisms.auth-script
d86fc4071ccb8590d922e3456c5c80c0f7bb9d6f 18-May-2004 Kristian Høgsberg <krh@redhat.com> 2004-05-17 Kristian Høgsberg <krh@redhat.com>

Remove base64 encoding, replace with hex encoding. Original patch
from trow@ximian.com, added error handling.

* dbus/dbus-string.c (_dbus_string_base64_encode)
(_dbus_string_base64_decode): Remove.
(_dbus_string_hex_decode): Add end_return argument so we can
distinguish between OOM and invalid hex encoding.
(_dbus_string_test): Remove base64 tests and add test case for
invalid hex.

* dbus/dbus-keyring.c, dbus/dbus-auth-script.c, dbus/dbus-auth.c:
Replace base64 with hex.

* test/data/auth/invalid-hex-encoding.auth-script: New test case
for invalid hex encoded data in auth protocol.
akefile.am
ata/auth/cancel.auth-script
ata/auth/external-failed.auth-script
ata/auth/external-root.auth-script
ata/auth/external-silly.auth-script
ata/auth/external-successful.auth-script
ata/auth/extra-bytes.auth-script
ata/auth/fail-after-n-attempts.auth-script
ata/auth/invalid-hex-encoding.auth-script
nbase64.c
11b491316fb83b0def0ec53b69e2d53ec2722403 11-May-2004 John (J5) Palmieri <johnp@redhat.com> * updated the invalid test cases to include the
missing PATH header field which is required
* updated the spec documentation to indicate that
INTERFACE, MEMBER, and PATH are all required fields
ata/invalid-messages/array-of-nil.message
ata/invalid-messages/array-with-mixed-types.message
ata/invalid-messages/bad-boolean-array.message
ata/invalid-messages/bad-boolean.message
ata/invalid-messages/bad-endian.message
ata/invalid-messages/bad-header-field-alignment.message
ata/invalid-messages/local-namespace.message
ata/invalid-messages/no-dot-in-name.message
ata/invalid-messages/not-nul-header-padding.message
ata/invalid-messages/overlong-name.message
ata/invalid-messages/too-little-header-padding.message
ata/invalid-messages/too-much-header-padding-by-far.message
ata/invalid-messages/too-much-header-padding.message
ata/invalid-messages/too-short-dict.message
4e243ba4b4697bdc9a4dfa312d6a092d80839941 25-Apr-2004 Kristian Høgsberg <krh@redhat.com> 2004-04-25 Kristian Høgsberg <krh@redhat.com>

* test/data/valid-messages/standard-*.message: Update message
test scripts to new header field names.
ata/valid-messages/standard-acquire-service.message
ata/valid-messages/standard-hello.message
ata/valid-messages/standard-list-services.message
ata/valid-messages/standard-service-exists.message
d839b3d0b42f40f874392f88197e596e9b7d3387 23-Apr-2004 John (J5) Palmieri <johnp@redhat.com> * Fixed buffer overflow cause by not incrementing
the times_we_did_each_thing counter array to reflect
the number of random mutation functions we have.
reak-loader.c
a470eaa0789662d3d3e1f0a23e75c7be2ab574cc 16-Apr-2004 Olivier Andrieu <oliv__a@users.sourceforge.net> 2004-04-15 Olivier Andrieu <oliv__a@users.sourceforge.net>

* bus/driver.c (bus_driver_handle_get_service_owner):
implement a GetServiceOwner method.
* doc/dbus-specification.xml: document it.
* dbus/dbus-errors.h: add a 'ServiceHasNoOwner' error.

* glib/dbus-gproxy.c (dbus_gproxy_new_for_service_owner):
implement, using the bus GetServiceOwner method.

* test/glib/test-dbus-glib.c:
use dbus_gproxy_new_for_service_owner so that we can receive the
signal.
lib/test-dbus-glib.c
61b294f1a9e41c68486bc9340cd42d94224a4080 14-Apr-2004 Olivier Andrieu <oliv__a@users.sourceforge.net> 2004-04-14 Olivier Andrieu <oliv__a@users.sourceforge.net>

* test/glib/test-dbus-glib.c (timed_exit): fail the test after
a few seconds.
lib/test-dbus-glib.c
83d3819577efa227419946b611b62455eaaa2e5b 13-Apr-2004 Michael Meeks <michael@ximian.com> 2004-04-13 Michael Meeks <michael@ximian.com>

* test/glib/Makefile.am: use the absolute path so the bus
daemon's chdir ("/") doesn't kill us dead.

* configure.in: subst ABSOLUTE_TOP_BUILDDIR
lib/Makefile.am
0da46fa5a48dee0ac2be00886a6ed5fe429f20be 13-Apr-2004 Jon Trowbridge <trow@ximian.com> 2004-04-12 Jon Trowbridge <trow@ximian.com>

* bus/config-parser.c (struct BusConfigParser): Added
included_files field.
(seen_include): Added. Checks whether or not a file has already
been included by any parent BusConfigParser.
(bus_config_parser_new): Copy the parent's included_files.
(include_file): Track which files have been included, and fail on
circular inclusions.
(process_test_valid_subdir): Changed printf to report if we are
testing valid or invalid conf files.
(all_are_equiv): Changed printf to be a bit clearer about
what we are actually doing.
(bus_config_parser_test): Test invalid configuration files.
akefile.am
ata/invalid-config-files/circular-1.conf
ata/invalid-config-files/circular-2.conf
ata/invalid-config-files/circular-3.conf
e039be5838a6befdb4a378fcdc1fc2e7606d4222 09-Apr-2004 Jon Trowbridge <trow@ximian.com> 2004-04-09 Jon Trowbridge <trow@ximian.com>

* bus/config-parser.c (bus_config_parser_new): Added a 'parent'
argument. If non-null, the newly-constructed BusConfigParser will
be initialized with the parent's BusLimits instead of the default
values.
(include_file): When including a config file, pass in
the current parser as the parent and then copy the BusLimits
from the included BusConfigParser pack to the current parser.
(process_test_valid_subdir): Renamed from process_test_subdir.
(process_test_equiv_subdir): Added. Walks through a directory,
descending into each subdirectory and loading the config files
it finds there. If any subdirectory contains two config files
that don't produce identical BusConfigParser structs, fail.
For now, the BusConfigParser's BusPolicies are not compared.
(bus_config_parser_test): Call both process_test_valid_subdir and
process_test_equiv_subdir.

* bus/config-loader-libxml.c (bus_config_load): Take a parent
argument and pass it along to the call to bus_config_parser_new.
Also made a few small changes to allow this code to compile.

* bus/config-loader-expat.c (bus_config_load): Take a parent
argument and pass it along to the call to bus_config_parser_new.

* bus/bus.c (bus_context_new): Load the config file
with a NULL parent argument.
ata/equiv-config-files/basic/basic-1.conf
ata/equiv-config-files/basic/basic-2.conf
ata/equiv-config-files/basic/basic.d/basic.conf
ata/equiv-config-files/entities/basic.d/basic.conf
ata/equiv-config-files/entities/entities-1.conf
ata/equiv-config-files/entities/entities-2.conf
25f384cad92250b744489dd642f39776097da3f3 29-Mar-2004 Michael Meeks <michael@ximian.com> hush
lib/.cvsignore
d7a044a1382782cae8f1311355b78b4b5ff587dd 29-Mar-2004 Michael Meeks <michael@ximian.com> hush.
lib/.cvsignore
2195cf0dbde2ae26b5a684c6d914c1711f44c28d 21-Mar-2004 Havoc Pennington <hp@redhat.com> 2004-03-21 Havoc Pennington <hp@redhat.com>

* test/test-service.c (main): remove debug spew
est-service.c
a1df3040f29223eddaa3ace0fe018fcb28cddcd9 02-Dec-2003 Richard Hult <richard@imendio.com> 2003-12-02 Richard Hult <richard@imendio.com>

* Update AFL version to 2.0 throughout the source files to reflect
the update that was done a while ago.
reak-loader.c
lib/test-profile.c
10faede1eec77b0687ad007fa59608e96d80317d 21-Oct-2003 Havoc Pennington <hp@redhat.com> add missing file
lib/test-service-glib.c
75742242000e782719bc1656f0a7da72b059e88e 21-Oct-2003 Havoc Pennington <hp@redhat.com> 2003-10-20 Havoc Pennington <hp@redhat.com>

hmm, make check is currently not passing.

* doc/dbus-specification.xml: add requirement that custom type
names follow the same rules as interface names.

* dbus/dbus-protocol.h: change some of the byte codes, to avoid
duplication and allow 'c' to be 'custom'; dict is now 'm' for
'map'

* doc/dbus-specification.xml: update type codes to match
dbus-protocol.h, using the ASCII byte values. Rename type NAMED to
CUSTOM. Add type OBJECT_PATH to the spec.

2003-10-17 Havoc Pennington <hp@redhat.com>

* bus/driver.c (create_unique_client_name): use "." as separator
in base service names instead of '-'

* dbus/dbus-string.c (_dbus_string_get_byte): allow getting nul
byte at the end of the string

* dbus/dbus-internals.h (_DBUS_LIKELY, _DBUS_UNLIKELY): add
optimization macros since string validation seems to be a slow
point.

* doc/dbus-specification.xml: restrict valid
service/interface/member/error names. Add test suite code for the
name validation.

* dbus/dbus-string.c: limit service/interface/member/error names
to [0-9][A-Z][a-z]_

* dbus/dbus-connection.c (dbus_connection_dispatch): add missing
format arg to verbose spew

* glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): if not out of
memory, return instead of g_error

* test/test-service.c (path_message_func): support emitting a
signal on request

* dbus/dbus-bus.c (init_connections_unlocked): only fill in
activation bus type if DBUS_BUS_ACTIVATION was set; default to
assuming the activation bus was the session bus so that services
started manually will still register.
(init_connections_unlocked): fix so that in OOM situation we get
the same semantics when retrying the function

* test/test-service.c (main): change to use path registration, to
test those codepaths; register with DBUS_BUS_ACTIVATION rather
than DBUS_BUS_SESSION
reak-loader.c
ata/valid-messages/lots-of-arguments.message
ata/valid-service-files/debug-glib.service.in
lib/Makefile.am
lib/run-test.sh
lib/test-dbus-glib.c
est-service.c
d6e1b2adb3d8e51ce1bb47295cef12d9fe1a15a8 16-Oct-2003 Havoc Pennington <hp@redhat.com> 2003-10-16 Havoc Pennington <hp@redhat.com>

* bus/connection.c (bus_pending_reply_expired): either cancel or
execute, not both
(bus_connections_check_reply): use unlink, not remove_link, as we
don't want to free the link; fixes double free mess

* dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case
where no reply was received

* dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock):
fix a refcount leak

* bus/signals.c (match_rule_matches): add special cases for the
bus driver, so you can match on sender/destination for it.

* dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if
DBUS_PRINT_BACKTRACE is set

* dbus/dbus-internals.c: add pid to assertion failure messages

* dbus/dbus-connection.c: add message type code to the debug spew

* glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want
sender=foo not service=foo

* dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the
session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use
DBUS_ACTIVATION_ADDRESS instead

* bus/activation.c: set DBUS_SESSION_BUS_ADDRESS,
DBUS_SYSTEM_BUS_ADDRESS if appropriate

* bus/bus.c (bus_context_new): handle OOM copying bus type into
context struct

* dbus/dbus-message.c (dbus_message_iter_get_object_path): new function
(dbus_message_iter_get_object_path_array): new function (half
finished, disabled for the moment)

* glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle
DBUS_MESSAGE_TYPE_ERROR

* tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to
avoid redirecting stderr to /dev/null
(babysit): close stdin if not doing the "exit_with_session" thing

* dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover
debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not
stdout/stdin, so things don't get confused

* bus/system.conf.in: fix to allow replies, I modified .conf
instead of .conf.in again.
lib/run-test.sh
lib/test-dbus-glib.c
est-service.c
cd077dc8f2a8876f7ce50229e855d138b8310a0e 15-Oct-2003 Havoc Pennington <hp@redhat.com> 2003-10-14 Havoc Pennington <hp@redhat.com>

* test/decode-gcov.c: support gcc 3.3 also, though gcc 3.3 seems
to have a bug keeping it from outputting the .da files sometimes
(string_get_string): don't append garbage nul bytes to the string.
ecode-gcov.c
4803523d2697e7eceef4cde7a2ea398e70fe28fe 12-Oct-2003 Havoc Pennington <hp@redhat.com> my cvs add fu is really bad lately...
lib/run-test.sh
4097e94af3d2fb1eb865343e3f76ca3949e7c69b 12-Oct-2003 Havoc Pennington <hp@redhat.com> 2003-10-12 Havoc Pennington <hp@pobox.com>

Added test code that 1) starts an actual bus daemon and 2) uses
DBusGProxy; fixed bugs that were revealed by the test. Lots
more testing possible, but this is the basic framework.

* glib/dbus-gproxy.c (dbus_gproxy_manager_unregister): remove
empty proxy lists from the proxy list hash

* dbus/dbus-message.c (dbus_message_iter_get_args_valist): add a
couple of return_if_fail checks

* dbus/dbus-pending-call.c (_dbus_pending_call_new): use dbus_new0
to allocate, so everything is cleared to NULL as it should be.

* glib/dbus-gmain.c (dbus_connection_setup_with_g_main): pass
source as data to dbus_connection_set_timeout_functions() as the
timeout functions expected

* test/glib/run-test.sh: add a little script to start up a message
bus and run tests using it

* tools/dbus-launch.1: updates

* tools/dbus-launch.c (main): add --config-file option

* tools/dbus-launch.c (main): remove confusing else if (runprog)
that could never be reached.

* dbus/dbus-message.c (dbus_message_new_method_return)
(dbus_message_new_error, dbus_message_new_signal): set the
no-reply-expected flag on all these. Redundant, but may
as well be consistent.
lib/Makefile.am
lib/test-dbus-glib.c
56cc4ae1a241d36b64dbe26de89714f7771f6e78 12-Oct-2003 Havoc Pennington <hp@redhat.com> 2003-10-11 Havoc Pennington <hp@pobox.com>

* test/decode-gcov.c (function_solve_graph): make broken block
graph a nonfatal error since it seems to be broken. Need to debug
this.

* dbus/dbus-marshal.c (_dbus_type_is_valid): new function since we
can't just check type > INVALID < LAST anymore

* dbus/dbus-message.c (dbus_message_get_signature): new function
(dbus_message_has_signature): new function
(struct DBusMessage): add signature field (right now it isn't sent
over the wire, just generated on the fly)
(dbus_message_copy): copy the signature, and init strings to
proper length to avoid some reallocs
(dbus_message_iter_init_array_iterator): return void, since it
can't fail
(dbus_message_iter_init_dict_iterator): return void since it can't fail
(_dbus_message_loader_queue_messages): add silly temporary hack to
fill in message->signature on load

* dbus/dbus-protocol.h: change DBUS_TYPE_* values to be ASCII
characters, so they are relatively human-readable.
reak-loader.c
ecode-gcov.c
c1f0e189030ceb2bafea0bc30d6b72a0fa381ddc 10-Oct-2003 Havoc Pennington <hp@redhat.com> 2003-10-09 Havoc Pennington <hp@redhat.com>

* configure.in: define DBUS_HAVE_GCC33_GCOV if we have
gcc 3.3. Not that we do anything about it yet.

* bus/signals.c (bus_match_rule_parse): impose max length on the
match rule text

* dbus/dbus-protocol.h: add DBUS_MAXIMUM_MATCH_RULE_LENGTH
ecode-gcov.c
9a4bd6bf72a8c06227eaf94a59ebf1645faa1e6d 30-Sep-2003 Havoc Pennington <hp@redhat.com> add files
lib/Makefile.am
lib/test-dbus-glib.c
lib/test-profile.c
lib/test-thread-client.c
lib/test-thread-server.c
lib/test-thread.h
dfd1292d525d01914141cc86013589c6e0ea9d5c 30-Sep-2003 Havoc Pennington <hp@redhat.com> 2003-09-29 Havoc Pennington <hp@pobox.com>

* Merge dbus-object-names branch. To see the entire patch
do cvs diff -r DBUS_OBJECT_NAMES_BRANCHPOINT -r dbus-object-names,
it's huuuuge though.
To revert, I tagged DBUS_BEFORE_OBJECT_NAMES_MERGE.

2003-09-28 Havoc Pennington <hp@pobox.com>

* HACKING: update to reflect new server

2003-09-26 Seth Nickell <seth@gnome.org>

* python/dbus.py:
* python/examples/example-signals.py:

Start implementing some notions of signals. The API
is really terrible, but they sort of work (with the
exception of being able to filter by service, and to
transmit signals *as* a particular service). Need to
figure out how to make messages come from the service
we registered :-(

* python/dbus_bindings.pyx.in:

Removed duplicate message_handler callbacks.

2003-09-25 Havoc Pennington <hp@redhat.com>

* bus/session.conf.in: fix my mess

2003-09-25 Havoc Pennington <hp@pobox.com>

* bus/session.conf.in: fix security policy, reported by Seth Nickell

2003-09-25 Seth Nickell <seth@gnome.org>

* python/examples/example-service.py:

Johan notices complete wrong code in example-service, but
completely wrong in a way that works exactly the same (!).
Johan is confused, how could this possibly work? Example
code fails to serve purpose of making things clear.
Seth fixes.

2003-09-25 Mark McLoughlin <mark@skynet.ie>

* doc/dbus-specification.sgml: don't require header fields
to be 4-byte aligned and specify that fields should be
distinguished from padding by the fact that zero is not
a valid field name.

* doc/TODO: remove re-alignment item and add item to doc
the OBJECT_PATH type.

* dbus/dbus-message.c:
(HeaderField): rename the original member to value_offset
and introduce a name_offset member to keep track of where
the field actually begins.
(adjust_field_offsets): remove.
(append_int_field), (append_uint_field),
(append_string_field): don't align the start of the header
field to a 4-byte boundary.
(get_next_field): impl finding the next marhsalled field
after a given field.
(re_align_field_recurse): impl re-aligning a number of
already marshalled fields.
(delete_field): impl deleting a field of any type and
re-aligning any following fields.
(delete_int_or_uint_field), (delete_string_field): remove.
(set_int_field), (set_uint_field): no need to re-check
that we have the correct type for the field.
(set_string_field): ditto and impl re-aligning any
following fields.
(decode_header_data): update to take into account that
the fields aren't 4-byte aligned any more and the new
way to distinguish padding from header fields. Also,
don't exit when there is too much header padding.
(process_test_subdir): print the directory.
(_dbus_message_test): add test to make sure a following
field is re-aligned correctly after field deletion.

* dbus/dbus-string.[ch]:
(_dbus_string_insert_bytes): rename from insert_byte and
allow the insert of multiple bytes.
(_dbus_string_test): test inserting multiple bytes.

* dbus/dbus-marshal.c: (_dbus_marshal_set_string): add
warning note to docs about having to re-align any
marshalled values following the string.

* dbus/dbus-message-builder.c:
(append_string_field), (_dbus_message_data_load):
don't align the header field.

* dbus/dbus-auth.c: (process_test_subdir): print the
directory.

* test/break-loader.c: (randomly_add_one_byte): upd. for
insert_byte change.

* test/data/invalid-messages/bad-header-field-alignment.message:
new test case.

* test/data/valid-messages/unknown-header-field.message: shove
a dict in the unknown field.

2003-09-25 Seth Nickell <seth@gnome.org>

* python/dbus.py:
* python/dbus_bindings.pyx.in:

Handle return values.

* python/examples/example-client.py:
* python/examples/example-service.py:

Pass back return values from the service to the client.

2003-09-24 Seth Nickell <seth@gnome.org>

* python/dbus.py:

Connect Object methods (when you are sharing an object) up... pass
in a list of methods to be shared. Sharing all the methods just
worked out too weird. You can now create nice Services over the
DBus in Python. :-)

* python/dbus_bindings.pyx.in:

Keep references to user_data tuples passed into C functions so
Python doesn't garbage collect on us.

Implement MethodReturn and Error subclasses of Message for creating
DBusMessage's of those types.

* python/examples/example-client.py:
* python/examples/example-service.py:

Simple example code showing both how create DBus services and objects,
and how to use them.

2003-09-23 Havoc Pennington <hp@pobox.com>

* glib/dbus-gproxy.c (dbus_gproxy_manager_filter): implement

2003-09-23 Havoc Pennington <hp@redhat.com>

* glib/dbus-gproxy.c (dbus_gproxy_connect_signal): implement
(dbus_gproxy_disconnect_signal): implement
(dbus_gproxy_manager_remove_signal_match): implement
(dbus_gproxy_manager_add_signal_match): implement
(dbus_gproxy_oneway_call): implement

2003-09-23 Havoc Pennington <hp@pobox.com>

* glib/dbus-gproxy.c (struct DBusGProxy): convert to a GObject
subclass. This means dropping the transparent thread safety of the
proxy; you now need a separate proxy per-thread, or your own
locking on the proxy. Probably right anyway.
(dbus_gproxy_ref, dbus_gproxy_unref): nuke, just use g_object_ref

2003-09-22 Havoc Pennington <hp@redhat.com>

* glib/dbus-gproxy.c (dbus_gproxy_manager_get): implement

2003-09-21 Seth Nickell <seth@gnome.org>

First checkin of the Python bindings.

* python/.cvsignore:
* python/Makefile.am:
* python/dbus_bindings.pyx.in:
* python/dbus_h_wrapper.h:

Pieces for Pyrex to operate on, building a dbus_bindings.so
python module for low-level access to the DBus APIs.

* python/dbus.py:

High-level Python module for accessing DBus objects.

* configure.in:
* Makefile.am:

Build stuff for the python bindings.

* acinclude.m4:

Extra macro needed for finding the Python C header files.

2003-09-21 Havoc Pennington <hp@pobox.com>

* glib/dbus-gproxy.c (dbus_gproxy_manager_new): start
implementing the proxy manager, didn't get very far.

* dbus/dbus-bus.c (dbus_bus_add_match): new
(dbus_bus_remove_match): new

* glib/dbus-gproxy.c (dbus_gproxy_new_for_service): add a
path_name argument; adjust the other not-yet-implemented
gproxy constructors to be what I think they should be.

2003-09-21 Havoc Pennington <hp@pobox.com>

* dbus/dbus-bus.c (dbus_bus_get): set exit_on_disconnect to TRUE
by default for message bus connections.

* dbus/dbus-connection.c (dbus_connection_dispatch): exit if
exit_on_disconnect flag is set and we process the disconnected
signal.
(dbus_connection_set_exit_on_disconnect): new function

2003-09-21 Havoc Pennington <hp@pobox.com>

Get matching rules mostly working in the bus; only actually
parsing the rule text remains. However, the client side of
"signal connections" hasn't been started, this patch is only the
bus side.

* dbus/dispatch.c: fix for the matching rules changes

* bus/driver.c (bus_driver_handle_remove_match)
(bus_driver_handle_add_match): send an ack reply from these
method calls

* glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of
arguments, reported by Seth Nickell

* bus/config-parser.c (append_rule_from_element): support
eavesdrop=true|false attribute on policies so match rules
can be prevented from snooping on the system bus.

* bus/dbus-daemon-1.1.in: consistently use terminology "sender"
and "destination" in attribute names; fix some docs bugs;
add eavesdrop=true|false attribute

* bus/driver.c (bus_driver_handle_add_match)
(bus_driver_handle_remove_match): handle AddMatch, RemoveMatch
messages

* dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get
rid of broadcast service concept, signals are just always broadcast

* bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c:
mostly implement matching rules stuff (currently only exposed as signal
connections)

2003-09-21 Mark McLoughlin <mark@skynet.ie>

* doc/dbus-specification.sgml: Change the header field name
to be an enum and update the rest of the spec to reference
the fields using the conventinal name.

* dbus/dbus-protocol.h: update to reflect the spec.

* doc/TODO: add item to remove the 4 byte alignment requirement.

* dbus/dbus-message.c: Remove the code to generalise the
header/body length and serial number header fields as named
header fields so we can reference field names using the
protocol values.
(append_int_field), (append_uint_field), (append_string_field):
Append the field name as a byte rather than four chars.
(delete_int_or_uint_field), (delete_string_field): reflect the
fact that the field name and typecode now occupy 4 bytes instead
of 8.
(decode_string_field), (decode_header_data): update to reflect
protocol changes and move the field specific encoding from
decode_string_field() back into decode_header_data().

* dbus/dbus-internals.[ch]: (_dbus_header_field_to_string):
Add utility to aid debugging.

* dbus/dbus-message-builder.c:
(append_string_field), (_dbus_message_data_load): Update to
reflect protocol changes; Change the FIELD_NAME directive
to HEADER_FIELD and allow it to take the field's conventional
name rather than the actual value.

* test/data/*/*.message: Update to use HEADER_FIELD instead
of FIELD_NAME; Always align the header on an 8 byte boundary
*before* updating the header length.

2003-09-15 Havoc Pennington <hp@pobox.com>

* dbus/dbus-pending-call.c: add the get/set object data
boilerplate as for DBusConnection, etc. Use generic object data
for the notify callback.

* glib/dbus-gparser.c (parse_node): parse child nodes

* tools/dbus-viewer.c: more hacking on the dbus-viewer

* glib/dbus-gutils.c (_dbus_gutils_split_path): add a file to
contain functions shared between the convenience lib and the
installed lib

* glib/Makefile.am (libdbus_glib_1_la_LDFLAGS): add
-export-symbols-regex to the GLib library

* dbus/dbus-object-tree.c (_dbus_object_tree_dispatch_and_unlock):
fix the locking in here, and add a default handler for
Introspect() that just returns sub-nodes.

2003-09-14 Havoc Pennington <hp@pobox.com>

* glib/dbus-gthread.c (dbus_g_thread_init): rename to make g_foo
rather than gfoo consistent

* glib/dbus-gproxy.h: delete for now, move contents to
dbus-glib.h, because the include files don't work right since we
aren't in the dbus/ subdir.

* glib/dbus-gproxy.c (dbus_gproxy_send): finish implementing
(dbus_gproxy_end_call): finish
(dbus_gproxy_begin_call): finish

* glib/dbus-gmain.c (dbus_set_g_error): new

* glib/dbus-gobject.c (handle_introspect): include information
about child nodes in the introspection

* dbus/dbus-connection.c (dbus_connection_list_registered): new
function to help in implementation of introspection

* dbus/dbus-object-tree.c
(_dbus_object_tree_list_registered_and_unlock): new function

2003-09-12 Havoc Pennington <hp@pobox.com>

* glib/dbus-gidl.h: add common base class for all the foo_info
types

* tools/dbus-viewer.c: add GTK-based introspection UI thingy
similar to kdcop

* test/Makefile.am: try test srcdir -ef . in addition to test
srcdir = ., one of them should work (yeah lame)

* glib/Makefile.am: build the "idl" parser stuff as a convenience
library

* glib/dbus-gparser.h: make description_load routines return
NodeInfo* not Parser*

* Makefile.am (SUBDIRS): build test dir after all library dirs

* configure.in: add GTK+ detection

2003-09-07 Havoc Pennington <hp@pobox.com>

* Make Doxygen contented.

2003-09-07 Havoc Pennington <hp@pobox.com>

* doc/dbus-specification.sgml: more updates

2003-09-06 Havoc Pennington <hp@pobox.com>

* doc/dbus-specification.sgml: partial updates

* bus/dbus-daemon-1.1.in: fix the config file docs for the
zillionth time; hopefully I edited the right file this time.

* bus/config-parser.c (append_rule_from_element): support
send_type, send_path, receive_type, receive_path

* bus/policy.c: add message type and path to the list of things
that can be "firewalled"

2003-09-06 Havoc Pennington <hp@pobox.com>

* dbus/dbus-connection.c (dbus_connection_register_fallback): add this
(dbus_connection_register_object_path): make this not handle
messages to paths below the given path

2003-09-03 Havoc Pennington <hp@pobox.com>

* test/glib/Makefile.am: add this with random glib-linked test
programs

* glib/Makefile.am: remove the random test programs from here,
leave only the unit tests

* glib/dbus-gobject.c (_dbus_gobject_test): add test for
uscore/javacaps conversion, and fix
(get_object_property, set_object_property): change to .NET
convention for mapping props to methods, set_FooBar/get_FooBar,
since one language has such a convention we may as well copy it.
Plus real methods in either getFooBar or get_foo_bar style won't
collide with this convention.

2003-09-01 Havoc Pennington <hp@pobox.com>

* glib/dbus-gparser.c: implement

* glib/dbus-gobject.c: start implementing skeletons support

* configure.in: when disabling checks/assert, also define
G_DISABLE_ASSERT and G_DISABLE_CHECKS

2003-09-01 Havoc Pennington <hp@pobox.com>

* glib/Makefile.am: rearrange a bunch of files and get "make
check" framework set up

2003-08-31 Havoc Pennington <hp@pobox.com>

* fix build with --disable-tests

2003-08-30 Havoc Pennington <hp@pobox.com>

* dbus/dbus-connection.c: purge DBusMessageHandler

* dbus/dbus-message-handler.c: remove DBusMessageHandler, just
use callbacks everywhere

2003-08-30 Havoc Pennington <hp@pobox.com>

* test/data/valid-config-files/system.d/test.conf: change to
root for the user so warnings don't get printed

* dbus/dbus-message.c: add dbus_message_get_path,
dbus_message_set_path

* dbus/dbus-object-tree.c (do_test_dispatch): add test of
dispatching to a path

* dbus/dbus-string.c (_dbus_string_validate_path): add

* dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement
(_dbus_marshal_object_path): implement

* dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field
to contain the path to the target object
(DBUS_HEADER_FIELD_SENDER_SERVICE): rename
DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service

2003-08-30 Havoc Pennington <hp@pobox.com>

* dbus/dbus-object-tree.c: write tests and fix the discovered bugs

2003-08-29 Havoc Pennington <hp@pobox.com>

* dbus/dbus-object-tree.c: modify to allow overlapping paths to be
registered
(struct DBusObjectSubtree): shrink this
a lot, since we may have a lot of them
(_dbus_object_tree_free_all_unlocked): implement
(_dbus_object_tree_dispatch_and_unlock): implement

2003-08-29 Havoc Pennington <hp@pobox.com>

* dbus/dbus-internals.h: fix _DBUS_N_GLOBAL_LOCKS

2003-08-28 Havoc Pennington <hp@pobox.com>

purge DBusObjectID

* dbus/dbus-connection.c: port to no ObjectID, create a
DBusObjectTree, rename ObjectTree to ObjectPath in public API

* dbus/dbus-connection.h (struct DBusObjectTreeVTable): delete
everything except UnregisterFunction and MessageFunction

* dbus/dbus-marshal.c: port away from DBusObjectID,
add DBUS_TYPE_OBJECT_PATH

* dbus/dbus-object-registry.[hc], dbus/dbus-object.[hc],
dbus/dbus-objectid.[hc]: remove these, we are moving to
path-based object IDs

2003-08-25 Havoc Pennington <hp@pobox.com>

Just noticed that dbus_message_test is hosed, I wonder when I
broke that. I thought make check was passing earlier...

* dbus/dbus-object-tree.c: add new "object tree" to match DCOP
container tree, will replace most of dbus-object-registry

* dbus/dbus-string.c (_dbus_string_append_printf_valist): fix C99
screwup

2003-08-19 Havoc Pennington <hp@pobox.com>

* dbus/dbus-message.c (decode_string_field): support FIELD_SENDER
(dbus_message_is_error): fix this function

* bus/dbus-daemon-1.1: clarify logic on when <deny>/<allow> rules
match

* bus/policy.c (bus_client_policy_check_can_receive): fix code to
reflect clarified man page
(bus_client_policy_check_can_send): ditto

* bus/session.conf.in: fixup

* bus/system.conf.in: fixup

2003-08-18 Havoc Pennington <hp@redhat.com>

* dbus/dbus-hash.c (_dbus_hash_table_insert_two_strings): fix

* dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
dumb bug created earlier (wrong order of args to
decode_header_data())

* tools/dbus-send.c: port

* tools/dbus-print-message.c (print_message): port

* test/data/*messages: port all messages over

* dbus/dbus-message-builder.c: support including
message type

* bus/driver.c: port over

* bus/dispatch.c: port over to new stuff

* dbus/dbus-connection.c (_dbus_connection_new_for_transport):
rename disconnect signal to "Disconnected"

2003-08-17 Havoc Pennington <hp@pobox.com>

This doesn't compile yet, but syncing up so I can hack on it from
work. What are branches for if not broken code? ;-)

* dbus/dbus-protocol.h: remove DBUS_HEADER_FIELD_NAME, add
DBUS_HEADER_FIELD_INTERFACE, DBUS_HEADER_FIELD_MEMBER,
DBUS_HEADER_FIELD_ERROR_NAME

* dbus/dbus-hash.c: Introduce DBUS_HASH_TWO_STRINGS as hack to use
for the interface+member pairs
(string_hash): change to use g_str_hash algorithm
(find_direct_function, find_string_function): refactor these to
share most code.

* dbus/dbus-message.c: port all of this over to support
interface/member fields instead of name field

* dbus/dbus-object-registry.c: port over

* dbus/dbus-string.c (_dbus_string_validate_interface): rename
from _dbus_string_validate_name

* bus/dbus-daemon-1.1: change file format for the
<deny>/<allow> stuff to match new message naming scheme

* bus/policy.c: port over

* bus/config-parser.c: parse new format

2003-08-16 Havoc Pennington <hp@pobox.com>

* dbus/dbus-object-registry.c (add_and_remove_objects): remove
broken assertion

* glib/dbus-gproxy.c: some hacking

2003-08-15 Havoc Pennington <hp@redhat.com>

* dbus/dbus-pending-call.c (dbus_pending_call_block): implement

* dbus/dbus-connection.c
(dbus_connection_send_with_reply_and_block): factor out internals;
change to convert any error replies to DBusError instead of
returning them as a message

2003-08-15 Havoc Pennington <hp@pobox.com>

* dbus/dbus-connection.c,
dbus/dbus-pending-call.c: Finish the pending call stuff

2003-08-14 Havoc Pennington <hp@redhat.com>

* dbus/dbus-pending-call.c: start on new object that will replace
DBusMessageHandler and ReplyHandlerData for tracking outstanding
replies

* dbus/dbus-gproxy.c: start on proxy object used to communicate
with remote interfaces

* dbus/dbus-gidl.c: do the boring boilerplate in here

2003-08-12 Havoc Pennington <hp@pobox.com>

* bus/dispatch.c (bus_dispatch): make this return proper
DBusHandlerResult to avoid DBUS_ERROR_UNKNOWN_METHOD

* dbus/dbus-errors.c (dbus_set_error): use
_dbus_string_append_printf_valist

* dbus/dbus-string.c (_dbus_string_append_printf_valist)
(_dbus_string_append_printf): new

* dbus/dbus-errors.h (DBUS_ERROR_UNKNOWN_MESSAGE): change to
UNKNOWN_METHOD

* dbus/dbus-connection.c (dbus_connection_dispatch): handle
DBUS_HANDLER_RESULT_NEED_MEMORY; send default error reply if a
message is unhandled.

2003-08-11 Havoc Pennington <hp@pobox.com>

* bus/test.c (client_disconnect_handler): change to return
HANDLED (would have been REMOVE_MESSAGE)

* dbus/dbus-object.h (enum DBusHandlerResult): rename to
HANDLED/NOT_YET_HANDLED instead of
REMOVE_MESSAGE/ALLOW_MORE_HANDLERS to make it clearer how it
should be used.

2003-08-10 Havoc Pennington <hp@pobox.com>

* tools/dbus-send.c (main): add --type argument, for now
supporting only method_call and signal types.

* tools/dbus-print-message.c: print message type

* dbus/dbus-connection.c (_dbus_connection_new_for_transport):
init connection->objects

* doc/dbus-specification.sgml: fix sgml

* bus/*.c: port over to object-instance API changes

* test/test-service.c: ditto

* dbus/dbus-message.c (dbus_message_create_header): allow #NULL
name, we will have to fix up the rest of the code to also handle
this
(dbus_message_new): generic message-creation call
(set_string_field): allow appending name field

2003-08-06 Havoc Pennington <hp@pobox.com>

* dbus/dbus-object-registry.c: implement signal connection
and dispatch

* dbus/dbus-connection.c (_dbus_connection_unref_unlocked): new

* dbus/dbus-internals.c (_dbus_memdup): new function

2003-08-02 Havoc Pennington <hp@pobox.com>

* dbus/dbus-message.c (dbus_message_get_no_reply)
(dbus_message_set_no_reply): add these and remove
set_is_error/get_is_error

* dbus/dbus-protocol.h, doc/dbus-specification.sgml:
remove the ERROR flag, since there's now an ERROR type

2003-08-01 Havoc Pennington <hp@pobox.com>

* dbus/dbus-object-registry.c (_dbus_object_registry_handle_and_unlock):
implement

* dbus/dbus-message.c (dbus_message_get_type): new function

* doc/dbus-specification.sgml: add "type" byte to messages

2003-08-01 Havoc Pennington <hp@pobox.com>

* dbus/dbus-protocol.h (DBUS_MESSAGE_TYPE_*): introduce
a message type enum to distinguish kinds of message
(DBUS_HEADER_FLAG_NO_REPLY_EXPECTED): flag for a message
that need not be replied to

2003-08-01 Havoc Pennington <hp@pobox.com>

* dbus/dbus-marshal.c: adapt to DBusObjectID changes
(unpack_8_octets): fix no-64-bit-int bug

* dbus/dbus-object-registry.c (validate_id): validate the
connection ID bits, not just the instance ID.

* dbus/dbus-connection.c (_dbus_connection_init_id): initialize
the connection-global 33 bits of the object ID

* dbus/dbus-object-registry.c (info_from_entry): fill in
object ID in the new way

* dbus/dbus-objectid.h: rather than high/low bits, specifically
define server/client/instance bits.

2003-07-30 Havoc Pennington <hp@pobox.com>

* dbus/dbus-connection.c (dbus_connection_register_object): fix
build

2003-07-13 Havoc Pennington <hp@pobox.com>

* dbus/dbus-object.h (struct DBusObjectVTable): add padding
fields to DBusObjectVTable and DBusObjectInfo

2003-07-12 Havoc Pennington <hp@pobox.com>

* dbus/dbus-object-registry.c: implement unit test,
fix bugs discovered in process

* dbus/dbus-connection.c: remove handler_table and
register_handler(), add DBusObjectRegistry usage

* dbus/dbus-objectid.c (dbus_object_id_is_null)
(dbus_object_id_set_null): new functions

2003-07-08 Havoc Pennington <hp@pobox.com>

* dbus/dbus-object.c: implement some of this

* dbus/dbus-object-registry.c
(_dbus_object_registry_add_and_unlock): fill in the object_id out
param
(_dbus_object_registry_new): handle OOM

2003-07-08 Havoc Pennington <hp@pobox.com>

* dbus/dbus-object.h: sketch out an API for registering objects
with a connection, that allows us to use as little as 24 bytes
per object and lets application code represent an object in
any conceivable way.

* dbus/dbus-object-registry.c: implement the hard bits of the
DBusConnection aspect of object API. Not yet wired up.

2003-07-06 Havoc Pennington <hp@pobox.com>

* dbus/dbus-marshal.c (_dbus_marshal_set_object_id): new function
(_dbus_marshal_object_id): new
(_dbus_demarshal_object_id): new
(_dbus_marshal_get_arg_end_pos): support object ID type, and
consolidate identical switch cases. Don't conditionalize handling
of DBUS_TYPE_UINT64, need to handle the type always.
(_dbus_marshal_validate_arg): consolidate identical cases, and
handle DBUS_TYPE_OBJECT_ID

* dbus/dbus-objectid.c: new file with DBusObjectID data type.

* dbus/dbus-protocol.h: add DBUS_TYPE_OBJECT_ID

2003-09-28 Havoc Pennington <hp@pobox.com>

* real 0.13 release

2003-09-28 Havoc Pennington <hp@pobox.com>

* doc/Makefile.am (dbus-specification.html): testing a funky hack
to work with Debian db2html

2003-09-28 Havoc Pennington <hp@pobox.com>

* configure.in: 0.13

* doc/Makefile.am (dbus-test-plan.html): accept nonexistence of
stylesheet-images for benefit of Debian

Change back to using filesystem-linked sockets for the system
bus, so only root can create the default system bus address.

* bus/system.conf.in: change to use
DBUS_SYSTEM_BUS_DEFAULT_ADDRESS

* dbus/Makefile.am (INCLUDES): remove DBUS_SYSTEM_BUS_PATH define
from here.

* configure.in: define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
here, and AC_DEFINE DBUS_SYSTEM_PATH

2003-08-09 Anders Carlsson <andersca@codefactory.se>

* doc/TODO:
* doc/busconfig.dtd:
Add busconfig DTD.

2003-08-09 Anders Carlsson <andersca@codefactory.se>

* doc/dbus-specification.sgml:
Add activation reply values.

2003-08-05 Havoc Pennington <hp@redhat.com>

* configure.in: 0.12

2003-08-05 Anders Carlsson <andersca@codefactory.se>

* glib/dbus-gmain.c: (watch_fd_new), (watch_fd_ref),
(watch_fd_unref), (dbus_gsource_check), (dbus_gsource_dispatch),
(add_watch), (remove_watch), (create_source):
Refcount fds, fixes some reentrancy issues.

2003-07-30 Havoc Pennington <hp@redhat.com>

* dbus/dbus-bus.c (init_connections_unlocked): fix default system
bus address to be abstract if we have abstract sockets

* NEWS: update

2003-07-28 Havoc Pennington <hp@redhat.com>

* bus/messagebus.in: fix to avoid processname/servicename
confusion, from Michael Kearey
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100965

2003-07-23 Havoc Pennington <hp@pobox.com>

* dbus/dbus-message.c (dbus_message_iter_get_named):
fix from Andy Hanton to remove broken "+1"

2003-07-16 Havoc Pennington <hp@pobox.com>

* tools/dbus-launch.c (babysit): close stdout/stderr in the
babysitter process, as suggested by Thomas Leonard, so
an "eval `dbus-launch --exit-with-session`" will actually
return

2003-07-16 Havoc Pennington <hp@pobox.com>

* configure.in: print out EXPANDED_* variables in the summary at
the end; clean up the code that computes EXPANDED_ variables and
get the ones using exec_prefix right. Should make things work
when you build without --prefix
46c072e1136ca101aefd5fdae35c457899d55bbb 25-Sep-2003 Mark McLoughlin <mark@skynet.ie> 2003-09-25 Mark McLoughlin <mark@skynet.ie>

* doc/dbus-specification.sgml: don't require header fields
to be 4-byte aligned and specify that fields should be
distinguished from padding by the fact that zero is not
a valid field name.

* doc/TODO: remove re-alignment item and add item to doc
the OBJECT_PATH type.

* dbus/dbus-message.c:
(HeaderField): rename the original member to value_offset
and introduce a name_offset member to keep track of where
the field actually begins.
(adjust_field_offsets): remove.
(append_int_field), (append_uint_field),
(append_string_field): don't align the start of the header
field to a 4-byte boundary.
(get_next_field): impl finding the next marhsalled field
after a given field.
(re_align_field_recurse): impl re-aligning a number of
already marshalled fields.
(delete_field): impl deleting a field of any type and
re-aligning any following fields.
(delete_int_or_uint_field), (delete_string_field): remove.
(set_int_field), (set_uint_field): no need to re-check
that we have the correct type for the field.
(set_string_field): ditto and impl re-aligning any
following fields.
(decode_header_data): update to take into account that
the fields aren't 4-byte aligned any more and the new
way to distinguish padding from header fields. Also,
don't exit when there is too much header padding.
(process_test_subdir): print the directory.
(_dbus_message_test): add test to make sure a following
field is re-aligned correctly after field deletion.

* dbus/dbus-string.[ch]:
(_dbus_string_insert_bytes): rename from insert_byte and
allow the insert of multiple bytes.
(_dbus_string_test): test inserting multiple bytes.

* dbus/dbus-marshal.c: (_dbus_marshal_set_string): add
warning note to docs about having to re-align any
marshalled values following the string.

* dbus/dbus-message-builder.c:
(append_string_field), (_dbus_message_data_load):
don't align the header field.

* dbus/dbus-auth.c: (process_test_subdir): print the
directory.

* test/break-loader.c: (randomly_add_one_byte): upd. for
insert_byte change.

* test/data/invalid-messages/bad-header-field-alignment.message:
new test case.

* test/data/valid-messages/unknown-header-field.message: shove
a dict in the unknown field.
reak-loader.c
ata/invalid-messages/bad-header-field-alignment.message
ata/valid-messages/unknown-header-field.message
f4cffc0e49d48a8dbf158230d7e816d8713566da 22-Sep-2003 Seth Nickell <seth@gnome.org> 2003-09-21 Seth Nickell <seth@gnome.org>

First checkin of the Python bindings.

* python/.cvsignore:
* python/Makefile.am:
* python/dbus_bindings.pyx.in:
* python/dbus_h_wrapper.h:

Pieces for Pyrex to operate on, building a dbus_bindings.so
python module for low-level access to the DBus APIs.

* python/dbus.py:

High-level Python module for accessing DBus objects.

* configure.in:
* Makefile.am:

Build stuff for the python bindings.

* acinclude.m4:

Extra macro needed for finding the Python C header files.
est-service.c
a683a80c409cc4f2e57ba6a3e60d52f91b8657d0 21-Sep-2003 Havoc Pennington <hp@redhat.com> 2003-09-21 Havoc Pennington <hp@pobox.com>

Get matching rules mostly working in the bus; only actually
parsing the rule text remains. However, the client side of
"signal connections" hasn't been started, this patch is only the
bus side.

* dbus/dispatch.c: fix for the matching rules changes

* bus/driver.c (bus_driver_handle_remove_match)
(bus_driver_handle_add_match): send an ack reply from these
method calls

* glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of
arguments, reported by Seth Nickell

* bus/config-parser.c (append_rule_from_element): support
eavesdrop=true|false attribute on policies so match rules
can be prevented from snooping on the system bus.

* bus/dbus-daemon-1.1.in: consistently use terminology "sender"
and "destination" in attribute names; fix some docs bugs;
add eavesdrop=true|false attribute

* bus/driver.c (bus_driver_handle_add_match)
(bus_driver_handle_remove_match): handle AddMatch, RemoveMatch
messages

* dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get
rid of broadcast service concept, signals are just always broadcast

* bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c:
mostly implement matching rules stuff (currently only exposed as signal
connections)
ata/valid-config-files/many-rules.conf
ata/valid-config-files/system.d/test.conf
daf8d6579e1ae0ea748810b63180bd5eea2ab9c4 21-Sep-2003 Mark McLoughlin <mark@skynet.ie> 2003-09-21 Mark McLoughlin <mark@skynet.ie>

* doc/dbus-specification.sgml: Change the header field name
to be an enum and update the rest of the spec to reference
the fields using the conventinal name.

* dbus/dbus-protocol.h: update to reflect the spec.

* doc/TODO: add item to remove the 4 byte alignment requirement.

* dbus/dbus-message.c: Remove the code to generalise the
header/body length and serial number header fields as named
header fields so we can reference field names using the
protocol values.
(append_int_field), (append_uint_field), (append_string_field):
Append the field name as a byte rather than four chars.
(delete_int_or_uint_field), (delete_string_field): reflect the
fact that the field name and typecode now occupy 4 bytes instead
of 8.
(decode_string_field), (decode_header_data): update to reflect
protocol changes and move the field specific encoding from
decode_string_field() back into decode_header_data().

* dbus/dbus-internals.[ch]: (_dbus_header_field_to_string):
Add utility to aid debugging.

* dbus/dbus-message-builder.c:
(append_string_field), (_dbus_message_data_load): Update to
reflect protocol changes; Change the FIELD_NAME directive
to HEADER_FIELD and allow it to take the field's conventional
name rather than the actual value.

* test/data/*/*.message: Update to use HEADER_FIELD instead
of FIELD_NAME; Always align the header on an 8 byte boundary
*before* updating the header length.
ata/incomplete-messages/missing-body.message
ata/invalid-messages/array-of-nil.message
ata/invalid-messages/array-with-mixed-types.message
ata/invalid-messages/bad-boolean-array.message
ata/invalid-messages/bad-boolean.message
ata/invalid-messages/bad-endian.message
ata/invalid-messages/local-namespace.message
ata/invalid-messages/no-dot-in-name.message
ata/invalid-messages/not-nul-header-padding.message
ata/invalid-messages/overlong-name.message
ata/invalid-messages/too-little-header-padding.message
ata/invalid-messages/too-much-header-padding-by-far.message
ata/invalid-messages/too-much-header-padding.message
ata/invalid-messages/too-short-dict.message
ata/valid-messages/array-of-array-of-uint32.message
ata/valid-messages/dict-simple.message
ata/valid-messages/emptiness.message
ata/valid-messages/lots-of-arguments.message
ata/valid-messages/no-padding.message
ata/valid-messages/opposite-endian.message
ata/valid-messages/recursive-types.message
ata/valid-messages/simplest-manual.message
ata/valid-messages/standard-acquire-service.message
ata/valid-messages/standard-hello.message
ata/valid-messages/standard-list-services.message
ata/valid-messages/standard-service-exists.message
ata/valid-messages/unknown-header-field.message
583994cb3b7f5562fb7b8c37b4cb0d5af78e4ce2 17-Sep-2003 Havoc Pennington <hp@redhat.com> 2003-09-15 Havoc Pennington <hp@pobox.com>

* dbus/dbus-pending-call.c: add the get/set object data
boilerplate as for DBusConnection, etc. Use generic object data
for the notify callback.

* glib/dbus-gparser.c (parse_node): parse child nodes

* tools/dbus-viewer.c: more hacking on the dbus-viewer

* glib/dbus-gutils.c (_dbus_gutils_split_path): add a file to
contain functions shared between the convenience lib and the
installed lib

* glib/Makefile.am (libdbus_glib_1_la_LDFLAGS): add
-export-symbols-regex to the GLib library

* dbus/dbus-object-tree.c (_dbus_object_tree_dispatch_and_unlock):
fix the locking in here, and add a default handler for
Introspect() that just returns sub-nodes.

2003-09-14 Havoc Pennington <hp@pobox.com>

* glib/dbus-gthread.c (dbus_g_thread_init): rename to make g_foo
rather than gfoo consistent

* glib/dbus-gproxy.h: delete for now, move contents to
dbus-glib.h, because the include files don't work right since we
aren't in the dbus/ subdir.

* glib/dbus-gproxy.c (dbus_gproxy_send): finish implementing
(dbus_gproxy_end_call): finish
(dbus_gproxy_begin_call): finish

* glib/dbus-gmain.c (dbus_set_g_error): new

* glib/dbus-gobject.c (handle_introspect): include information
about child nodes in the introspection

* dbus/dbus-connection.c (dbus_connection_list_registered): new
function to help in implementation of introspection

* dbus/dbus-object-tree.c
(_dbus_object_tree_list_registered_and_unlock): new function

2003-09-12 Havoc Pennington <hp@pobox.com>

* glib/dbus-gidl.h: add common base class for all the foo_info
types

* tools/dbus-viewer.c: add GTK-based introspection UI thingy
similar to kdcop

* test/Makefile.am: try test srcdir -ef . in addition to test
srcdir = ., one of them should work (yeah lame)

* glib/Makefile.am: build the "idl" parser stuff as a convenience
library

* glib/dbus-gparser.h: make description_load routines return
NodeInfo* not Parser*

* Makefile.am (SUBDIRS): build test dir after all library dirs

* configure.in: add GTK+ detection
akefile.am
lib/test-profile.c
lib/test-thread-client.c
lib/test-thread-server.c
42c7c17953840ee12e482f6716c4ff03c136f6b5 07-Sep-2003 Anders Carlsson <andersca@codefactory.se> Add this
lib/.cvsignore
83e41dff82abe99e1a35e70ca0bb60672204ffcd 06-Sep-2003 Havoc Pennington <hp@redhat.com> 2003-09-06 Havoc Pennington <hp@pobox.com>

* doc/dbus-specification.sgml: partial updates

* bus/dbus-daemon-1.1.in: fix the config file docs for the
zillionth time; hopefully I edited the right file this time.

* bus/config-parser.c (append_rule_from_element): support
send_type, send_path, receive_type, receive_path

* bus/policy.c: add message type and path to the list of things
that can be "firewalled"
ata/valid-config-files/many-rules.conf
636be6f92d4d8effd392ad1f894738849ec7af76 04-Sep-2003 Havoc Pennington <hp@redhat.com> 2003-09-03 Havoc Pennington <hp@pobox.com>

* test/glib/Makefile.am: add this with random glib-linked test
programs

* glib/Makefile.am: remove the random test programs from here,
leave only the unit tests

* glib/dbus-gobject.c (_dbus_gobject_test): add test for
uscore/javacaps conversion, and fix
(get_object_property, set_object_property): change to .NET
convention for mapping props to methods, set_FooBar/get_FooBar,
since one language has such a convention we may as well copy it.
Plus real methods in either getFooBar or get_foo_bar style won't
collide with this convention.
akefile.am
lib/Makefile.am
lib/test-dbus-glib.c
lib/test-profile.c
lib/test-thread-client.c
lib/test-thread-server.c
lib/test-thread.h
1dd3f1788f1b4c9af2f4fa744abdb7892d0a14b9 31-Aug-2003 Havoc Pennington <hp@redhat.com> 2003-08-30 Havoc Pennington <hp@pobox.com>

* dbus/dbus-connection.c: purge DBusMessageHandler

* dbus/dbus-message-handler.c: remove DBusMessageHandler, just
use callbacks everywhere
est-service.c
5fd1e389e1c1c12ad4a55c2af6abdc8e7a2f6d41 31-Aug-2003 Havoc Pennington <hp@redhat.com> 2003-08-30 Havoc Pennington <hp@pobox.com>

* test/data/valid-config-files/system.d/test.conf: change to
root for the user so warnings don't get printed

* dbus/dbus-message.c: add dbus_message_get_path,
dbus_message_set_path

* dbus/dbus-object-tree.c (do_test_dispatch): add test of
dispatching to a path

* dbus/dbus-string.c (_dbus_string_validate_path): add

* dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement
(_dbus_marshal_object_path): implement

* dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field
to contain the path to the target object
(DBUS_HEADER_FIELD_SENDER_SERVICE): rename
DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service
ata/valid-config-files/system.d/test.conf
ata/valid-messages/array-of-array-of-uint32.message
ata/valid-messages/dict-simple.message
ata/valid-messages/dict.message
ata/valid-messages/emptiness.message
ata/valid-messages/lots-of-arguments.message
ata/valid-messages/no-padding.message
ata/valid-messages/opposite-endian.message
ata/valid-messages/recursive-types.message
ata/valid-messages/simplest-manual.message
ata/valid-messages/simplest.message
ata/valid-messages/standard-acquire-service.message
ata/valid-messages/standard-hello.message
ata/valid-messages/standard-list-services.message
ata/valid-messages/standard-service-exists.message
ata/valid-messages/unknown-header-field.message
d0c588575e3e2911eacb098fac26f02d1010cbfd 20-Aug-2003 Havoc Pennington <hp@redhat.com> 2003-08-19 Havoc Pennington <hp@pobox.com>

* dbus/dbus-message.c (decode_string_field): support FIELD_SENDER
(dbus_message_is_error): fix this function

* bus/dbus-daemon-1.1: clarify logic on when <deny>/<allow> rules
match

* bus/policy.c (bus_client_policy_check_can_receive): fix code to
reflect clarified man page
(bus_client_policy_check_can_send): ditto

* bus/session.conf.in: fixup

* bus/system.conf.in: fixup
ata/valid-config-files/debug-allow-all-sha1.conf.in
ata/valid-config-files/debug-allow-all.conf.in
ata/valid-config-files/system.d/test.conf
68a3c593b9e77b33614726363c7b6fd85d113021 19-Aug-2003 Havoc Pennington <hp@redhat.com> 2003-08-18 Havoc Pennington <hp@redhat.com>

* dbus/dbus-hash.c (_dbus_hash_table_insert_two_strings): fix

* dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
dumb bug created earlier (wrong order of args to
decode_header_data())

* tools/dbus-send.c: port

* tools/dbus-print-message.c (print_message): port

* test/data/*messages: port all messages over

* dbus/dbus-message-builder.c: support including
message type

* bus/driver.c: port over

* bus/dispatch.c: port over to new stuff

* dbus/dbus-connection.c (_dbus_connection_new_for_transport):
rename disconnect signal to "Disconnected"
ata/incomplete-messages/missing-body.message
ata/invalid-messages/array-of-nil.message
ata/invalid-messages/array-with-mixed-types.message
ata/invalid-messages/bad-boolean-array.message
ata/invalid-messages/bad-boolean.message
ata/invalid-messages/bad-endian.message
ata/invalid-messages/local-namespace.message
ata/invalid-messages/no-dot-in-name.message
ata/invalid-messages/not-nul-header-padding.message
ata/invalid-messages/overlong-name.message
ata/invalid-messages/too-little-header-padding.message
ata/invalid-messages/too-much-header-padding-by-far.message
ata/invalid-messages/too-much-header-padding.message
ata/invalid-messages/too-short-dict.message
ata/valid-messages/array-of-array-of-uint32.message
ata/valid-messages/dict-simple.message
ata/valid-messages/dict.message
ata/valid-messages/emptiness.message
ata/valid-messages/lots-of-arguments.message
ata/valid-messages/no-padding.message
ata/valid-messages/opposite-endian.message
ata/valid-messages/recursive-types.message
ata/valid-messages/simplest-manual.message
ata/valid-messages/simplest.message
ata/valid-messages/standard-acquire-service.message
ata/valid-messages/standard-hello.message
ata/valid-messages/standard-list-services.message
ata/valid-messages/standard-service-exists.message
ata/valid-messages/unknown-header-field.message
est-service.c
5c1a8e44903bd1dedc8cbefad78b0c8b61daada5 12-Aug-2003 Havoc Pennington <hp@redhat.com> 2003-08-11 Havoc Pennington <hp@pobox.com>

* bus/test.c (client_disconnect_handler): change to return
HANDLED (would have been REMOVE_MESSAGE)

* dbus/dbus-object.h (enum DBusHandlerResult): rename to
HANDLED/NOT_YET_HANDLED instead of
REMOVE_MESSAGE/ALLOW_MORE_HANDLERS to make it clearer how it
should be used.
est-service.c
b29ea9115ea3277354b7ccbe442026279220f4ac 11-Aug-2003 Havoc Pennington <hp@redhat.com> 2003-08-10 Havoc Pennington <hp@pobox.com>

* tools/dbus-send.c (main): add --type argument, for now
supporting only method_call and signal types.

* tools/dbus-print-message.c: print message type

* dbus/dbus-connection.c (_dbus_connection_new_for_transport):
init connection->objects

* doc/dbus-specification.sgml: fix sgml

* bus/*.c: port over to object-instance API changes

* test/test-service.c: ditto

* dbus/dbus-message.c (dbus_message_create_header): allow #NULL
name, we will have to fix up the rest of the code to also handle
this
(dbus_message_new): generic message-creation call
(set_string_field): allow appending name field
ecode-gcov.c
est-service.c
9c5d01f0fe1ba855c0f7518c4f27d75a609b8faa 02-Aug-2003 Havoc Pennington <hp@redhat.com> 2003-08-01 Havoc Pennington <hp@pobox.com>

* dbus/dbus-object-registry.c (_dbus_object_registry_handle_and_unlock):
implement

* dbus/dbus-message.c (dbus_message_get_type): new function

* doc/dbus-specification.sgml: add "type" byte to messages
ata/invalid-messages/bad-endian.message
ata/valid-messages/simplest-manual.message
fc2743e206a9b056f6f306e8e1365f8a03afa2bf 29-Jun-2003 Miloslav Trmac <mitr@volny.cz> 2003-06-29 Miloslav Trmac <mitr@volny.cz>

* doc/Makefile.am:
* tools/Makefile.am: Don't assume srcdir == builddir.
akefile.am
f27c7150a9f020b83e65701e7796dd62a49dfdb3 18-Jun-2003 Anders Carlsson <andersca@codefactory.se> Add .cvsignore files
ata/valid-config-files/.cvsignore
ata/valid-service-files/.cvsignore
496f1e18a95604ee9008d4a01d50248d0c5532fb 15-Jun-2003 Joe Shaw <joeshaw@novell.com> 2003-06-15 Joe Shaw <joe@assbarn.com>

* configure.in: Check for socklen_t.

* dbus/dbus-sysdeps.c: Define socklen_t if it's not defined.

* test/test-segfault.c: Add #include <sys/time.h>

* tools/Makefile.am: Add DBUS_X_CFLAGS to the INCLUDES since
dbus-launch needs it.
est-segfault.c
27b694f6e109c78c633ddb8d96f524e46e536f4e 09-May-2003 Havoc Pennington <hp@redhat.com> 2003-05-08 Havoc Pennington <hp@pobox.com>

* dbus/dbus-spawn.c: s/_exit/exit/ because it was keeping gcov
data from getting written, and there wasn't a good reason to
use _exit really.

* test/decode-gcov.c (mark_inside_dbus_build_tests): don't count
dbus_verbose lines in test coverage
(main): add list of functions sorted by # of untested blocks
to the coverage report

* dbus/dbus-mempool.c: put some test-only code in DBUS_BUILD_TESTS

* dbus/dbus-marshal.c (_dbus_marshal_test): extend test coverage

* dbus/dbus-message-handler.c (_dbus_message_handler_test):
extend test coverage

* test/data/auth/cancel.auth-script: test canceling an
authentication

* dbus/Makefile.am: remove dbus-server-debug.[hc] for now, as they
aren't used. in CVS history if we end up needing them.
ata/auth/cancel.auth-script
ecode-gcov.c
893d859ed4ab785f46485fad28779f026fa166a1 28-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-28 Havoc Pennington <hp@redhat.com>

* configure.in: 0.10

* NEWS: update

* bus/system.conf.in: add <includedir>system.d</includedir>

* dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
username was provided but not uid

* bus/config-parser.c (struct BusConfigParser): keep track of
whether the parser is toplevel or was included; change some
of the error handling if it's included.
akefile.am
ata/valid-config-files/system.d/test.conf
b3bd48edfc1aab0a9dc64bfa4c380d845d218e73 26-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-25 Havoc Pennington <hp@redhat.com>

test suite is slightly hosed at the moment, will fix soon

* bus/connection.c (bus_connections_expire_incomplete): fix to
properly disable the timeout when required
(bus_connection_set_name): check whether we can remove incomplete
connections timeout after we complete each connection.

* dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
probably still broken.

* bus/services.c (bus_registry_acquire_service): implement max
number of services owned, and honor allow/deny rules on which
services a connection can own.

* bus/connection.c (bus_connection_get_policy): report errors here

* bus/activation.c: implement limit on number of pending
activations
ata/valid-config-files/basic.conf
3185d7edde8ffc7672aa7d771966b0f1e0158aea 25-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-24 Havoc Pennington <hp@redhat.com>

* test/data/valid-config-files/basic.conf: add <limit> tags to
this test

* bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
<limit> tag in configuration file.
ata/valid-config-files/basic.conf
1820f3bd0a5a4b0ab14dbcc80ba1b68d2c48e01d 24-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-24 Havoc Pennington <hp@redhat.com>

* bus/dispatch.c: somehow missed some name_is

* dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
(_dbus_timeout_set_interval): new

* bus/connection.c (bus_connections_setup_connection): record time
when each connection is first set up, and expire them after the
auth timeout passes.
est-service.c
b29d0c534a631b211f1f94168e7672c604c8f815 23-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-22 Havoc Pennington <hp@redhat.com>

* dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
support, and do some code cleanups to share more code and
speed up array marshal/demarshal.

* dbus-1.0.pc.in (Cflags): put libdir include file in cflags

* configure.in: generate dbus-arch-deps.h

* dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
64-bit typecodes
ecode-gcov.c
b3a3969897930eeda308113acbbb3f98069ee1ab 22-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-22 Havoc Pennington <hp@redhat.com>

* test/data/valid-messages/opposite-endian.message: fix test
to use proper type for rply field

* test/data/invalid-messages: add tests for below validation

* dbus/dbus-message.c (decode_header_data): validate field types,
and validate that named fields are valid names
(decode_name_field): consider messages in the
org.freedesktop.Local. namespace to be invalid.

* dbus/dbus-string.c (_dbus_string_validate_name): new
reak-loader.c
ata/invalid-messages/local-namespace.message
ata/invalid-messages/no-dot-in-name.message
ata/invalid-messages/overlong-name.message
ata/valid-messages/opposite-endian.message
3df260c07102745c5606c313af862558f105f83e 18-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-18 Havoc Pennington <hp@pobox.com>

* glib/dbus-gmain.c: adapt to watch changes

* bus/bus.c, bus/activation.c, etc.: adjust to watch changes

* dbus/dbus-server.h: remove dbus_server_handle_watch

* dbus/dbus-connection.h: remove dbus_connection_handle_watch

* dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
like DBusTimeout, so we don't need dbus_connection_handle_watch
etc.
est-utils.c
fe1cb3a9a1fc6bcbfa1b3be74ac9d5867005210f 15-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-14 Havoc Pennington <hp@redhat.com>

* dbus/dbus-userdb.c: user database abstraction, mostly to get
caching, but at some point we might want to be able to use a
different database.

* bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
SHA1 conf file to test the sha1 auth mechanism, since the regular
test always uses EXTERNAL when available.

* configure.in,
test/data/valid-config-files/debug-allow-all-sha1.conf.in:
add conf file that requires use of sha1 auth
ata/valid-config-files/debug-allow-all-sha1.conf.in
777707ed8dff6958972a93894a87ec1945c65c14 14-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-13 Havoc Pennington <hp@pobox.com>

* dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
callbacks

* test/data/valid-config-files/debug-allow-all.conf.in: allow all
users

* dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
fix to only recover unused bytes if we're already authenticated
(_dbus_transport_get_is_authenticated): fix to still mark us
authenticated if there are unused bytes.

* bus/dispatch.c: implement security policy checking

* bus/connection.c (bus_transaction_send_from_driver): new

* bus/bus.c (bus_context_check_security_policy): new

* bus/dispatch.c (send_service_nonexistent_error): delete this,
now we just set the DBusError and it gets converted to an error
reply.

* bus/connection.c (allow_user_function): enable code using actual
data from the config file

* bus/policy.c (list_allows_user): handle wildcard rules for
user/group connection perms
ata/valid-config-files/debug-allow-all.conf.in
b09b7ca33cbaa7eae4f56b9cd699c8d0283dd754 13-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-12 Havoc Pennington <hp@pobox.com>

* bus/config-parser.c (bus_config_parser_new): fix a memleak

* dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
the pid/gid/uid, just for paranoia.

* test/break-loader.c (randomly_do_n_things): find a byte
containing a type code, and randomly change it to a different
type code.
reak-loader.c
bc983ecf15455f49e7a92d038c93e181ae2cb438 12-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-12 Havoc Pennington <hp@pobox.com>

* bus/policy.h: change BusPolicy to be the thing from the config
file, and rename old BusPolicy to BusClientPolicy

* bus/bus.c, bus/connection.c, bus/config-parser.c: change to
match change in how policy works

* dbus/dbus-internals.h: mark assert_not_reached as
__attribute((noreturn))__
ata/valid-config-files/entities.conf
77eac31aee89346d1399193be6199b9b16fb77af 11-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-11 Havoc Pennington <hp@pobox.com>

* test/decode-gcov.c: add "below average functions" to the
coverage report, and change how some of the code works.

* bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
not in the coverage stats.

* test/test-service.c (main): use _dbus_verbose not fprintf in a
couple places so running the test suite doesn't result in megaspam.
ecode-gcov.c
est-service.c
78e79022316f45e86a6cac4da85d6b60f5a8f7f8 11-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-10 Havoc Pennington <hp@pobox.com>

* bus/dispatch.c (check_segfault_service_activation): add test
for launching an executable that just crashes.

* test/test-segfault.c (main): try setting coredumpsize to 0 so we
don't leave a million cores. We'll see how portable this is.
ata/valid-service-files/debug-echo.service.in
ata/valid-service-files/debug-segfault.service.in
est-segfault.c
6be547d32f018c23ba56426a0bccd08baa2cf440 11-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-10 Havoc Pennington <hp@redhat.com>

* dbus/dbus-connection.c (dbus_connection_flush): don't spin on
the connection if it's disconnected

* bus/activation.c (bus_activation_service_created): use new
transaction features to roll back removal of pending activation if
we don't successfully create the service after all. Don't remove
pending activation if the function fails.

* dbus/dbus-list.c (_dbus_list_insert_before_link)
(_dbus_list_insert_after_link): new code to facilitate
services.c fixes

* dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
new functionality, so we can preallocate the ability to insert
into a hash table.

* bus/connection.c (bus_transaction_add_cancel_hook): new function
allowing us to put custom hooks in a transaction to be used for
cancelling said transaction

* doc/dbus-specification.sgml: add some discussion of secondary
service owners, and disallow zero-length service names

* bus/services.c (bus_registry_acquire_service): new function,
splits out part of bus_driver_handle_acquire_service() and fixes
a bug where we didn't remove the service doing the acquiring
from the secondary queue if we failed to remove the current owner
from the front of the queue.
est-service.c
e11e4ca82b1e4efb71a18c9c8bf191f902082174 10-Apr-2003 Alexander Larsson <alexl@redhat.com> 2003-04-10 Alexander Larsson <alexl@redhat.com>

* bus/.cvsignore:
* glib/.cvsignore:
* test/.cvsignore:
Added files to cvsignore

* dbus/dbus-message.h:
* dbus/dbus-message.c: (dbus_message_iter_get_named):
Make get_named() take two out argument and return a boolean.
(dbus_message_iter_get_args_valist):
Update usage of get_named().
(dbus_message_iter_append_byte):
Fix typo
(dbus_message_iter_append_named)
Fix typo
(message_iter_test), (check_message_handling_type), (_dbus_message_test):
More tests.
cvsignore
e84c3a03b3be9cfc351ca8e0b9b935cca455e672 10-Apr-2003 Alexander Larsson <alexl@redhat.com> 2003-04-10 Alexander Larsson <alexl@redhat.com>

* dbus/dbus-marshal.[ch]:
Add array_type_pos argument to _dbus_marshal_validate_arg.
Let you pass a NULL end_pos to _dbus_marshal_validate_type.

* dbus/dbus-message.[ch]:
Multi-dimensional arrays have full type specification in the
outermost array. Iter code re-arranged to handle this.
Added some more iter tests.

* doc/dbus-specification.sgml:
Add me to authors.
Remove old FIXME.
Update new array encoding description.
Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.

* test/data/invalid-messages/array-with-mixed-types.message:
* test/data/valid-messages/array-of-array-of-uint32.message:
Change to the new array format.

* test/data/invalid-messages/too-short-dict.message:
Fix bug in test.

* test/data/valid-messages/recursive-types.message:
Fix up and extend test.
ata/invalid-messages/array-with-mixed-types.message
ata/invalid-messages/too-short-dict.message
ata/valid-messages/array-of-array-of-uint32.message
ata/valid-messages/recursive-types.message
51781f541094a4936d47119cd62682e0431c41e9 10-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-10 Havoc Pennington <hp@pobox.com>

* bus/dispatch.c: lots of fixes

* dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
(_dbus_loop_iterate): remove old "quit if no callbacks" code,
that was crack, broke the test service.

* dbus/dbus-transport.c (_dbus_transport_open): fix error
handling to avoid piling up errors if we get a failure on the
first address.

* dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
pid in assertion failures.

* dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
to some fixed size of file descriptor array. Don't return TRUE
anytime a timeout exists, that led to lots of busy loop silliness
in the tests.
est-service.c
7caf646fdf595946eb28202e2df3f847d28c7151 10-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-09 Havoc Pennington <hp@redhat.com>

* test/test-utils.c: use dispatch status function to fix this up

* bus/connection.c (connection_watch_callback): don't dispatch
from here
(connection_timeout_callback): don't dispatch from here
(bus_connections_setup_connection): set the dispatch status function
(bus_connection_disconnected): unset it

* dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
used to add a connection to be dispatched
(_dbus_loop_iterate): do the dispatching at the end of each
iteration

* dbus/dbus-connection.c
(dbus_connection_set_dispatch_status_function): new function
allowing us to fix up main loop usage
(_dbus_connection_last_unref): free all the various function
user data
(dbus_connection_dispatch): call the DispatchStatusFunction
whenever this function returns
(dbus_connection_handle_watch): call DispatchStatusFunction
(dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
(reply_handler_timeout): call DispatchStatusFunction
(dbus_connection_flush): call DispatchStatusFunction
est-utils.c
1708094c0e00ab433bb0a51981f8b77d24aee256 09-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-09 Havoc Pennington <hp@redhat.com>

* dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
a memory leak

* bus/dispatch.c (check_service_activated): fix bug in test

* dbus/dbus-mainloop.c (check_timeout): fix this up

* dbus/dbus-internals.c (_dbus_verbose_real): include PID in
verbose output so we can sort out output from different processes,
e.g. in the activation case.
est-service.c
est-utils.c
0366385618ccc26789fdf3a9cc35ee038de071f6 09-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-08 Havoc Pennington <hp@redhat.com>

* test/data/invalid-messages/array-with-mixed-types.message:
regression test that fails for the moment

* dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
tests for convenience

* dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
array of nil, it broke things.

* test/data/invalid-messages/array-of-nil.message: regression test

* test/data/valid-messages/array-of-array-of-uint32.message:
happened to write this so added it to suite
ata/invalid-messages/array-of-nil.message
ata/invalid-messages/array-with-mixed-types.message
ata/valid-messages/array-of-array-of-uint32.message
c5020ac870c5990a36c3576453cc23431213e8bf 08-Apr-2003 Alexander Larsson <alexl@redhat.com> 2003-04-08 Alexander Larsson <alexl@redhat.com>

Implemented recursive types, named types and new-style iters

* bus/driver.c:
* glib/test-thread-client.c: (thread_func):
* glib/test-thread-server.c: (handle_test_message):
* test/test-service.c: (handle_echo):
Update to new api

* dbus/Makefile.am:
* dbus/dbus-dict.c:
* dbus/dbus-dict.h:
* dbus/dbus.h
Remove DBusDict

* dbus/dbus-internals.c: (_dbus_type_to_string):
Update for new types.

* dbus/dbus-marshal.[ch]:
Implement recursive types and the new marshalling format.
Remove hardcoded dict marshalling.
Marshal named types.

* dbus/dbus-message-builder.c:
Add BYTE_ARRAY.
Remove references to old types

* dbus/dbus-message.[ch]:
New non-refcounted iter API that supports recursive iters.
Use iters for appending, including support for recursive
iters.
Add byte and named type support.
Update everything to new marshalling formats.
Add tests for new API.

* dbus/dbus-protocol.h:
Remove old array types.
Add types: BYTE, ARRAY, DICT, NAMED

* dbus/dbus-string.c:
* dbus/dbus-sysdeps.c:
Make parse_double locale safe.

* dbus/dbus-test-main.c:
Call setlocale.

* dbus/dbus-test.c:
Kill dict test

* doc/dbus-specification.sgml:
Update spec

* test/data/incomplete-messages/missing-body.message:
* test/data/invalid-messages/bad-boolean.message:
* test/data/invalid-messages/bad-boolean-array.message:
* test/data/invalid-messages/boolean-array-length-too-long.message-raw:
* test/data/invalid-messages/boolean-has-no-value.message-raw:
* test/data/invalid-messages/too-short-dict.message:
* test/data/valid-messages/dict-simple.message:
* test/data/valid-messages/dict.message:
* test/data/valid-messages/emptiness.message:
* test/data/valid-messages/lots-of-arguments.message:
* test/data/valid-messages/no-padding.message:
* test/data/valid-messages/recursive-types.message:
Add missing NAME fields
Fix up dicts & arrays

* test/data/invalid-messages/dict-with-nil-value.message:
Removed, this is not invalid anymore.

* test/data/valid-messages/recursive-types.message:
Add new test for deeply recursive types.
ata/incomplete-messages/missing-body.message
ata/invalid-messages/bad-boolean-array.message
ata/invalid-messages/bad-boolean.message
ata/invalid-messages/boolean-array-length-too-long.message-raw
ata/invalid-messages/boolean-has-no-value.message-raw
ata/invalid-messages/dict-with-nil-value.message
ata/invalid-messages/too-short-dict.message
ata/valid-messages/dict-simple.message
ata/valid-messages/dict.message
ata/valid-messages/emptiness.message
ata/valid-messages/lots-of-arguments.message
ata/valid-messages/no-padding.message
ata/valid-messages/recursive-types.message
est-service.c
fe22b2194d53061fefe64d48ff6a53e6a762279d 08-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-07 Havoc Pennington <hp@redhat.com>

* doc/dbus-specification.sgml: require that base service names
start with ':' and that the base service is created/deleted
as first and last things a connection does on the bus

* bus/dispatch.c (check_existent_service_activation): lots more
work on the activation test; it doesn't fully pass yet...

* test/test-service.c (main): fix so we don't memleak the
connection to the message bus
(filter_func): accept a message asking us to exit
est-service.c
est-utils.c
est-utils.h
1617fbe36c0bc2952093fc167b6edffdf32c445e 07-Apr-2003 Havoc Pennington <hp@redhat.com> having a bad cvs add day apparently
est-utils.c
est-utils.h
a7f69a41d5b82eb00da20b661181b490039bb70f 07-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-06 Havoc Pennington <hp@pobox.com>

* qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
from Colin Walters

* configure.in: fixes to Qt detection from Colin Walters

* doc/Makefile.am: Only remove generated docbook dirs if they
exist, from Colin Walters

* dbus/dbus-bus.c: change how we set well-known connections to
NULL, so that it works if a single connection is stored in
two well-known array slots.

* test/Makefile.am: remove a lot of stuff that isn't immediately
useful, it's in CVS history if we want it.

* test/test-service.c: use dbus-mainloop instead of that
watch.[hc] crack
est-service.c
98572905e60cac7ea971aa0830e2a629bfff208d 07-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-06 Havoc Pennington <hp@pobox.com>

* test/Makefile.am: remove a lot of stuff that isn't immediately
useful, it's in CVS history if we want it.

* test/test-service.c: use dbus-mainloop instead of that
watch.[hc] crack
akefile.am
us-test-loop.c
us-test-loop.h
us-test.c
ebug-thread.c
ebug-thread.h
cho-client.c
cho-server.c
est-service.c
atch.c
atch.h
c8991b0f95a3b53bc98de9e029780bbe0a0b3114 06-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-06 Havoc Pennington <hp@pobox.com>

* bus/bus.c (bus_context_new): print the address in here, rather
than in main(), because we need to do it before forking the daemon

* bus/dispatch.c (send_service_nonexistent_error): set the sender
on the service nonexistent error

* bus/driver.c (bus_driver_handle_acquire_service): set the
sender on the AcquireService reply

* test/data/valid-config-files/debug-allow-all.conf.in: Make test
server also listen on a UNIX socket so services can connect to it.
ata/valid-config-files/debug-allow-all.conf.in
6164a2e5f4ce528d902c8b55d4779204e91269ab 05-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-05 Havoc Pennington <hp@pobox.com>

* test/Makefile.am (dist-hook): also dist *.in files

* NEWS: update

* configure.in: 0.7
akefile.am
0cc7669fb899cfe5beb7e0069fe2a71a08b6abaa 05-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-05 Havoc Pennington <hp@pobox.com>

* test/decode-gcov.c (main): print per-directory stats in the report

* Makefile.am (coverage-report.txt): don't include test/* in gcov stats
ecode-gcov.c
3a96e4ffd99ec3f125e1891155ecb751b6e313a1 05-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-05 Havoc Pennington <hp@pobox.com>

* Makefile.am (coverage-report.txt): add target "coverage-report.txt"

* test/decode-gcov.c: hack up a little program to suck data
out of gcov files. Yes this is sort of silly.

* configure.in: define something in config.h and do an
AM_CONDITIONAL when gcov is enabled
akefile.am
ecode-gcov.c
03b9ca6d4ecf2577958530b8390d675c73a58825 05-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-04 Havoc Pennington <hp@redhat.com>

* dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
return a "babysitter" object that is used to monitor the status of
the spawned process and reap it when required.

* test/test-segfault.c, test/test-exit.c,
test/test-sleep-forever.c: binaries that do various lame things,
used in the test suite.

* dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
akefile.am
pawn-test.c
est-exit.c
est-segfault.c
est-sleep-forever.c
f216e81432ddf04889202c33a6e68113f94d7611 03-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-03 Havoc Pennington <hp@redhat.com>

* bus/activation.c (load_directory): fix up memleaks
(bus_activation_entry_free): free the entry

* dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
we get one from the message bus; fix memleaks.

* dbus/dbus-message.c (dbus_set_error_from_message): new function
akefile.am
est-service.c
fe9f3b45cc7e2e84d180c433f1ab5f8fd0a0c619 03-Apr-2003 Havoc Pennington <hp@redhat.com> commit adds/removes here before builddir contents confuse matters
ata/valid-config-files/debug-allow-all.conf
ata/valid-config-files/debug-allow-all.conf.in
ata/valid-service-files/debug-echo.service.in
eeb88949d8d2ca84d9cbe54c07e73b9907d3163e 03-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-03 Havoc Pennington <hp@pobox.com>

* bus/config-parser.c (bus_config_parser_unref): free
list of mechanisms, bug discovered by test suite enhancements
(putting system.conf and session.conf into suite)

* test/Makefile.am, test/test-service.c: add placeholder for a
test service that we'll activate as part of test suite. Doesn't
do anything yet.

* dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
setting NULL value, and use system malloc not dbus_malloc()
when we have unavoidable memleakage.

* dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
didn't work, and support DBUS_BUS_ACTIVATION.

* bus/activation.c (child_setup): pass our well-known bus type to
the child

* bus/config-parser.c: support <type> to specify well-known type

* doc/dbus-specification.sgml: document the env variables to
locate well-known buses and find service activator
akefile.am
est-service.c
5364beac6cbfa8793fd34c7a634528a2112787f8 03-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-02 Havoc Pennington <hp@redhat.com>

* test/Makefile.am (all-local): add a rule to copy tests to
builddir, so we can have generated tests. Use this to remove the
silly hack for testing system.conf and session.conf. Will use this
shortly to generate .service files pointing to test binaries.
akefile.am
ata/valid-config-files/session.conf
ata/valid-config-files/system.conf
ix-standard-tests.sh
94790fef4a846ef2bed9bf1825c4c2b0ca7b8566 02-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-02 Havoc Pennington <hp@redhat.com>

* dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
in error messages
(_dbus_string_get_dirname): new
(_dbus_sysdeps_test): new
(_dbus_directory_open): include dirnames in error messages

* bus/config-parser.c: interpret <include> and <includedir> and
<servicedir> relative to config file location if the given
filename is not absolute.

* dbus/dbus-string.c (_dbus_string_find_byte_backward): new
ata/valid-config-files/basic.d/basic.conf
cfa261b49dd9cafb172deae3db22dba0c2e54bf9 02-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-01 Havoc Pennington <hp@redhat.com>

* bus/config-parser.c, bus/bus.c: implement <servicedir> and
<includedir> (at least mostly)

* dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
first, then the user ID
ata/valid-config-files/basic.conf
fa05de9230d62e7c427b5313796fc6ccd4d0ff60 31-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-31 Havoc Pennington <hp@redhat.com>

Fix some annoying DBusString API and fix all affected code.

* dbus/dbus-string.c (_dbus_string_init): get rid of annoying
max_length argument
(_dbus_string_get_data): change to return string instead of using
an out param
(_dbus_string_get_const_data): ditto
(_dbus_string_get_data_len): ditto
(_dbus_string_get_const_data_len): ditto
reak-loader.c
nbase64.c
29c71168cd17b11eed65023c97aff401d5305b01 31-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-31 Havoc Pennington <hp@pobox.com>

* dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
(_dbus_transport_new_for_tcp_socket): these didn't need the "server"
argument since they are always client side

* dbus/dbus-server.c (dbus_server_get_address): new function

* bus/main.c (main): take the configuration file as an argument.

* test/data/valid-config-files/debug-allow-all.conf: new file to
use with dispatch.c tests for example

* bus/test-main.c (main): require test data dir

* bus/bus.c (bus_context_new): change this to take a
configuration file name as argument

* doc/config-file.txt (Elements): add <servicedir>

* bus/system.conf, bus/session.conf: new files

* dbus/dbus-bus.c (dbus_bus_get): look for system bus on
well-known socket if none set

* configure.in: create system.conf and session.conf
akefile.am
ata/valid-config-files/debug-allow-all.conf
ata/valid-config-files/session.conf
ata/valid-config-files/system.conf
ix-standard-tests.sh
bc86794f23fa538a405813fb61b531c2eacc9ae1 31-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-30 Havoc Pennington <hp@pobox.com>

* bus/config-parser.c: hacking

* dbus/dbus-memory.c: don't use DBusList for the list of stuff
to shut down, since it could cause weirdness with the DBusList
lock

* dbus/dbus-list.c (_dbus_list_test): add tests for the
link-oriented stack routines
(alloc_link): free the mempool if the first alloc from it fails

* dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue

* dbus/dbus-string.c (UNICODE_VALID): sync new version of this
from GLib
(_dbus_string_skip_white): new

* doc/config-file.txt (Elements): add <includedir>
ata/valid-config-files/basic.conf
269d74f214f87bed0f6fd58f1c848240d31e0b9f 26-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-26 Havoc Pennington <hp@pobox.com>

* bus/test-main.c, dbus/dbus-test.c (main): check memleaks
after every test so it's quick and easy to see which leaked, and
so we test multiple dbus_shutdown() calls

* configure.in: change configure.in XML stuff to also support
expat

* config-loader-libxml.c: some hacking

* config-loader-expat.c: some hacking

* config-parser.c: some hacking, plus tests
ata/valid-config-files/basic.conf
ce4fd314c6be9bfee16a172d5ca34e5097d309fc 25-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-24 Havoc Pennington <hp@redhat.com>

* dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
file

* dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
NULL argument for "message" if the error is a well-known one,
fill in a generic message in this case.

* dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
favor of DBusError

* bus/test.c (bus_test_flush_bus): add

* bus/policy.c (bus_policy_test): test code stub
reak-loader.c
cho-client.c
cho-server.c
e537e421ff4f092621fcd9f6b51526a017ad020c 16-Mar-2003 Anders Carlsson <andersca@codefactory.se> 2003-03-16 Anders Carlsson <andersca@codefactory.se>

* dbus/dbus-connection.c:
(dbus_connection_send_with_reply_and_block):
Decrease connection->n_incoming when removing an entry
from the list.
* dbus/dbus-dict.c: (dbus_dict_entry_free),
(dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
(dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
(dbus_dict_set_byte_array), (dbus_dict_set_string_array),
(dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
(dbus_dict_get_byte_array):
Handle NULL arrays and strings. Also add support for byte arrays.

* dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
(_dbus_marshal_dict), (_dbus_demarshal_byte_array),
(_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
(_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
(_dbus_demarshal_dict), (demarshal_and_validate_len),
(_dbus_marshal_validate_arg), (_dbus_marshal_test):
* dbus/dbus-marshal.h:
Add support for marshalling and demarshalling empty arrays and strings.

* dbus/dbus-message.c: (dbus_message_append_args_valist),
(dbus_message_append_string_array),
(dbus_message_iter_get_boolean),
(dbus_message_iter_get_boolean_array),
(dbus_message_iter_get_int32_array),
(dbus_message_iter_get_uint32_array),
(dbus_message_iter_get_double_array),
(dbus_message_iter_get_byte_array),
(dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
(check_message_handling):
Add support for getting empty arrays and dicts.

* dbus/dbus-string.c: (_dbus_string_validate_utf8):
Don't do any validation at all for now, that's better than just checking
for ASCII.

* test/data/valid-messages/emptiness.message:
New test message with lots of empty arrays.
ata/valid-messages/emptiness.message
ce173b29fc1e9432cb5956952afdbe775da12415 16-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-16 Havoc Pennington <hp@pobox.com>

Oops - test code was only testing failure of around 30 of the
mallocs in the test path, but it turns out there are 500+
mallocs. I believe this was due to misguided linking setup such
that there was one copy of dbus_malloc etc. in the daemon and one
in the shared lib, and only daemon mallocs were tested. In any
case, the test case now tests all 500+ mallocs, and doesn't pass
yet, though there are lots of fixes in this patch.

* dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
this so that it doesn't need to allocate memory, since it
has no way of indicating failure due to OOM (and would be
annoying if it did).

* dbus/dbus-list.c (_dbus_list_pop_first_link): new function

* bus/Makefile.am: rearrange to create two self-contained
libraries, to avoid having libraries with overlapping symbols.
that was resulting in weirdness, e.g. I'm pretty sure there
were two copies of global static variables.

* dbus/dbus-internals.c: move the malloc debug stuff to
dbus-memory.c

* dbus/dbus-list.c (free_link): free list mempool if it becomes
empty.

* dbus/dbus-memory.c (_dbus_disable_mem_pools): new function

* dbus/dbus-address.c (dbus_parse_address): free list nodes
on failure.

* bus/dispatch.c (bus_dispatch_add_connection): free
message_handler_slot when no longer using it, so
memory leak checkers are happy for the test suite.

* dbus/dbus-server-debug-pipe.c (debug_finalize): free server name

* bus/bus.c (new_connection_callback): disconnect in here if
bus_connections_setup_connection fails.

* bus/connection.c (bus_connections_unref): fix to free the
connections
(bus_connections_setup_connection): if this fails, don't
disconnect the connection, just be sure there are no side
effects.

* dbus/dbus-string.c (undo_alignment): unbreak this

* dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
leaking
(_dbus_auth_new): fix the order in which we free strings
on OOM failure

* bus/connection.c (bus_connection_disconnected): fix to
not send ServiceDeleted multiple times in case of memory
allocation failure

* dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
get the base service name
(dbus_bus_register_client): don't return base service name,
instead store it on the DBusConnection and have an accessor
function for it.
(dbus_bus_register_client): rename dbus_bus_register()

* bus/dispatch.c (check_hello_message): verify that other
connections on the bus also got the correct results, not
just the one sending hello
akefile.am
f587ce7845edb0eb01451368d01b5bc86b5904cd 15-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-15 Havoc Pennington <hp@pobox.com>

Make it pass the Hello handling test including all OOM codepaths.
Now to do other messages...

* bus/services.c (bus_service_remove_owner): fix crash when
removing owner from an empty list of owners
(bus_registry_ensure): don't leave service in the list of
a connection's owned services if we fail to put the service
in the hash table.

* bus/connection.c (bus_connection_preallocate_oom_error): set
error flag on the OOM error.

* dbus/dbus-connection.c (_dbus_connection_new_for_transport):
handle _dbus_transport_set_connection failure

* dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
to create watches up front and simply enable/disable them as
needed.
(unix_connection_set): this can now fail on OOM

* dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
of enabling/disabling a watch or timeout.

* bus/loop.c (bus_loop_iterate): don't touch disabled
watches/timeouts

* glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
atch.c
3bea935316ff048e68dea6a26c2e8e9fd314477f 14-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-13 Havoc Pennington <hp@redhat.com>

* dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
out of memory

* dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
of memory

* dbus/dbus-connection.h: Make AddWatchFunction and
AddTimeoutFunction return a bool so they can fail on out-of-memory

* bus/bus.c (bus_context_new): set up timeout handlers

* bus/connection.c (bus_connections_setup_connection): set up
timeout handlers

* glib/dbus-gmain.c: adapt to the fact that set_functions stuff
can fail

* bus/bus.c (bus_context_new): adapt to changes

* bus/connection.c: adapt to changes

* test/watch.c: adapt to DBusWatch changes

* bus/dispatch.c (bus_dispatch_test): started adding this but
didn't finish
atch.c
6ecc14ffabcffb69aa938a67940db48272e05046 13-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-12 Havoc Pennington <hp@pobox.com>

Throughout: purge global variables, introduce BusActivation,
BusConnections, BusRegistry, etc. objects instead.

* bus/bus.h, bus/bus.c: introduce BusContext as a global
message bus object

* test/Makefile.am (TEST_BINARIES): disable bus-test for now,
going to redo this a bit differently I think
akefile.am
29560adcc79a259a0be3511c056ee7453aa26c04 13-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-12 Havoc Pennington <hp@redhat.com>

Mega-patch that gets the message bus daemon initially handling
out-of-memory. Work still needed. Also lots of random
moving stuff to DBusError instead of ResultCode.

* dbus/dbus-list.c (_dbus_list_length_is_one): new function

* dbus/dbus-connection.c
(dbus_connection_send_with_reply_and_block): use DBusError

* dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
DBusResultCode

* dbus/dbus-connection.c (dbus_connection_send): drop the result
code here, as the only failure possible is OOM.

* bus/connection.c (bus_connection_disconnect):
rename bus_connection_disconnected as it's a notification only

* bus/driver.c (bus_driver_handle_acquire_service): don't free
"name" on get_args failure, should be done by get_args;
don't disconnect client for bad args, just return an error.
(bus_driver_handle_service_exists): ditto

* bus/services.c (bus_services_list): NULL-terminate returned array

* bus/driver.c (bus_driver_send_service_lost)
(bus_driver_send_service_acquired): send messages from driver to a
specific client to the client's unique name, not to the broadcast
service.

* dbus/dbus-message.c (decode_header_data): reject messages that
contain no name field
(_dbus_message_get_client_serial): rename to
dbus_message_get_serial and make public
(_dbus_message_set_serial): rename from set_client_serial
(_dbus_message_set_reply_serial): make public
(_dbus_message_get_reply_serial): make public

* bus/connection.c (bus_connection_foreach): allow stopping
iteration by returning FALSE from foreach function.

* dbus/dbus-connection.c (dbus_connection_send_preallocated)
(dbus_connection_free_preallocated_send)
(dbus_connection_preallocate_send): new API for sending a message
without possibility of malloc failure.
(dbus_connection_send_message): rename to just
dbus_connection_send (and same for whole function family)

* dbus/dbus-errors.c (dbus_error_free): make this reinit the error

* dbus/dbus-sysdeps.c (_dbus_exit): new function

* bus/activation.c: handle/return errors

* dbus/dbus-errors.h: add more DBUS_ERROR #define

* dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
(_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
(_dbus_result_from_errno): move to this file
us-test.c
ata/valid-messages/dict-simple.message
ata/valid-messages/dict.message
ata/valid-messages/lots-of-arguments.message
ata/valid-messages/no-padding.message
ata/valid-messages/simplest-manual.message
ata/valid-messages/simplest.message
cho-client.c
nbase64.c
atch.c
799a3ff443f5357ae7857ebe989a7f92f7bd84df 10-Mar-2003 Anders Carlsson <andersca@codefactory.se> 2003-03-10 Anders Carlsson <andersca@codefactory.se>

* dbus/dbus-marshal.c:
(_dbus_marshal_set_string):
Take a length argument so we can marshal the correct string
length.

(_dbus_marshal_dict), (_dbus_demarshal_dict),
(_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
(_dbus_marshal_test):
* dbus/dbus-marshal.h:
Add support for marshalling and demarshalling dicts.

* dbus/dbus-message-builder.c: (_dbus_message_data_load):
Add support for TYPE DICT.

* dbus/dbus-message.c: (set_string_field):
Adjust header padding.

(dbus_message_append_args_valist), (dbus_message_append_dict),
(dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
(dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
(check_message_handling), (check_have_valid_message):
* dbus/dbus-message.h:
Add functions for setting and getting dicts.

* dbus/dbus-protocol.h:
Add DBUS_TYPE_DICT.

* dbus/dbus.h:
Add dbus-dict.h

* doc/dbus-specification.sgml:
Add information about how dicts are marshalled.

* test/data/invalid-messages/dict-with-nil-value.message:
* test/data/invalid-messages/too-short-dict.message:
* test/data/valid-messages/dict-simple.message:
* test/data/valid-messages/dict.message:
Add sample messages containing dicts.
ata/invalid-messages/dict-with-nil-value.message
ata/invalid-messages/too-short-dict.message
ata/valid-messages/dict-simple.message
ata/valid-messages/dict.message
7e050c88719553d0c74e3dc68caf7bc50ae99590 05-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-04 Havoc Pennington <hp@pobox.com>

* test/data/auth/*: adapt to changes

* dbus/dbus-auth-script.c (_dbus_auth_script_run): add
USERID_BASE64 and change USERNAME_BASE64 to put in username not
userid

* dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
more stuff from being in a context name, to make the protocol
simpler to deal with

* dbus/dbus-errors.c (dbus_error_has_name): new function
(dbus_error_is_set): new function

* dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1

* dbus/dbus-connection.c (dbus_connection_flush): also read
messages during a flush operation

* dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
ata/auth/external-failed.auth-script
ata/auth/external-root.auth-script
ata/auth/external-silly.auth-script
ata/auth/external-successful.auth-script
ata/auth/extra-bytes.auth-script
ata/auth/fail-after-n-attempts.auth-script
ata/auth/fallback.auth-script
f7d96bdf80129d95cf33f26a778ce2c94a818bd0 02-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-02 Havoc Pennington <hp@pobox.com>

* test/break-loader.c (randomly_set_extreme_ints): add test that
sets really huge and small integers

* dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
that length of boolean array fits in the string, and that
string has room for boolean value in single-bool case.

* dbus/dbus-message-builder.c (_dbus_message_data_load): add
optional value to "ALIGN" command which is what to fill the
alignment with.

* test/data/valid-messages/no-padding.message: add regression
test for the message padding problem
reak-loader.c
ata/invalid-messages/boolean-array-length-too-long.message-raw
ata/invalid-messages/boolean-has-no-value.message-raw
ata/valid-messages/no-padding.message
3781f063a6dfbdeafea6d1c6c8ac10c8b22f8586 24-Feb-2003 Anders Carlsson <andersca@codefactory.se> 2003-02-24 Anders Carlsson <andersca@codefactory.se>

* dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
* dbus/dbus-message-builder.c: (_dbus_message_data_load):
* dbus/dbus-message.c: (dbus_message_append_boolean),
(dbus_message_append_boolean_array),
(dbus_message_get_args_valist), (_dbus_message_test):
* dbus/dbus-message.h:
* doc/dbus-specification.sgml:
Various fixes as pointed out by Havoc.

* test/data/invalid-messages/bad-boolean-array.message:
* test/data/invalid-messages/bad-boolean.message:
Add invalid boolean value test cases.
ata/invalid-messages/bad-boolean-array.message
ata/invalid-messages/bad-boolean.message
c8769e0b1dde3f1c4ad40cd10dd89c284ecc672b 24-Feb-2003 Anders Carlsson <andersca@codefactory.se> 2003-02-24 Anders Carlsson <andersca@codefactory.se>

* dbus/dbus-internals.c: (_dbus_type_to_string):
* dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
(_dbus_marshal_validate_arg):
* dbus/dbus-message-builder.c: (_dbus_message_data_load):
* dbus/dbus-message.c: (dbus_message_append_args_valist),
(dbus_message_append_boolean), (dbus_message_append_boolean_array),
(dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
(dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
(dbus_message_iter_get_double),
(dbus_message_iter_get_boolean_array), (message_iter_test):
* dbus/dbus-message.h:
* dbus/dbus-protocol.h:
* doc/dbus-specification.sgml:
* test/data/valid-messages/lots-of-arguments.message:
Add support for boolean and boolean array types.
ata/valid-messages/lots-of-arguments.message
983374a7583b89e63e1c2e337a9e0b3927ceae03 22-Feb-2003 Havoc Pennington <hp@redhat.com> 2003-02-22 Havoc Pennington <hp@pobox.com>

* test/Makefile.am (dist-hook): fix dist for test/data/sha-1
akefile.am
6c07098c5ec68e78320a6f07e4c9e141a95729ed 22-Feb-2003 Havoc Pennington <hp@redhat.com> 2003-02-22 Havoc Pennington <hp@pobox.com>

* dbus/dbus-message.c (dbus_message_iter_get_string_array):
(dbus_message_iter_get_byte_array): Fix up doxygen warnings

* dbus/dbus-sha.c: add implementation of SHA-1 algorithm

* dbus/test/data/sha-1: add US government test suite for SHA-1
ata/sha-1/Readme.txt
ata/sha-1/bit-hashes.sha1
ata/sha-1/bit-messages.sha1
ata/sha-1/byte-hashes.sha1
ata/sha-1/byte-messages.sha1
92f7d50b3b420670732a55bf15f7b343b2ce9fe6 21-Feb-2003 Anders Carlsson <andersca@codefactory.se> 2003-02-21 Anders Carlsson <andersca@codefactory.se>

* dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
Make string arrays NULL-terminated.

* dbus/dbus-memory.c: (dbus_free_string_array):
* dbus/dbus-memory.h:
New function for freeing NULL-terminated string arrays.

* dbus/dbus-message-builder.c: (append_quoted_string),
(_dbus_message_data_load):
Add support for array types.

* dbus/dbus-message.c: (check_message_handling):
Add more types as test cases.

* dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
(_dbus_string_parse_double):
Add the start offset to the end offset.

* test/data/valid-messages/lots-of-arguments.message:
New test message with lots of arguments.
ata/valid-messages/lots-of-arguments.message
89ee9e6abf40b594c681479dfc4d18d892c93838 19-Feb-2003 Anders Carlsson <andersca@codefactory.se> 2003-02-19 Anders Carlsson <andersca@codefactory.se>

* configure.in:
Add check for nonposix getpwnam_r

* dbus/dbus-mempool.c: (_dbus_mem_pool_new):
Align the pool element size to a sizeof (void *) boundary.

* dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
(_dbus_listen_unix_socket), (_dbus_credentials_from_username):
General Solaris fixes.

* test/data/valid-messages/simplest-manual.message:
Explicitly state that we want little-endian packing.
ata/valid-messages/simplest-manual.message
9ada6e2cad0d623fb578f349790a0c62297d2394 18-Feb-2003 Joe Shaw <joeshaw@novell.com> 2003-02-18 Joe Shaw <joe@assbarn.com>

* dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
credentials from our currently running process.
(get_word): Fix a buglet where we were copying the entire length
instead of relative to our position.

* dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
keys on the stack... it's 640k of data.

* dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
read the credentials byte off the socket, even if we don't have
SO_PEERCRED.
(_dbus_poll): Implement poll() using select() for systems which
don't have it.

* glib/test-dbus-glib.c (main): Print out an error if no
parameters are given.

* test/data/auth/fallback.auth-script: Added. Tests that a client
can fallback to a secondary auth mechanism if the first fails.
ata/auth/fallback.auth-script
3c8db267892bbce5c82d5060cef993dd54dc6ed4 17-Feb-2003 Anders Carlsson <andersca@codefactory.se> 2003-02-17 Anders Carlsson <andersca@codefactory.se>

* bus/activation.c: (bus_activation_init), (child_setup),
(bus_activation_activate_service):
* bus/activation.h:
* bus/main.c: (main):
Set DBUS_ADDRESS environment variable.

* dbus/dbus-errors.c: (dbus_set_error):
Don't use va_copy since that's a C99 feature.

* dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
(_dbus_spawn_async):
* dbus/dbus-sysdeps.h:
Add child_setup_func to _dbus_spawn_async.

* doc/dbus-specification.sgml:
Update specification.

* test/spawn-test.c: (setup_func), (main):
Fix test.
pawn-test.c
014e1be4826b5ea7b1558f23089cd90dcf2cb998 17-Feb-2003 Anders Carlsson <andersca@codefactory.se> 2003-02-17 Anders Carlsson <andersca@codefactory.se>

* doc/.cvsignore:
* doc/Makefile.am:
* doc/dbus-test-plan.sgml:
Add test plan document.

* test/Makefile.am:
Fix distcheck.
akefile.am
b293770841ec924401fc91d99a02ec73ff89dd0f 17-Feb-2003 Havoc Pennington <hp@redhat.com> add test for header padding not set to all bits 0
ata/invalid-messages/not-nul-header-padding.message
e3a4d07d3ba8b6912714f0af66ef229d70b53af4 17-Feb-2003 Havoc Pennington <hp@redhat.com> test cases with wrong header padding
ata/invalid-messages/too-little-header-padding.message
ata/invalid-messages/too-much-header-padding-by-far.message
ata/invalid-messages/too-much-header-padding.message
6cf6f82faae928a9142d4aa465b5add381960e29 16-Feb-2003 Anders Carlsson <andersca@codefactory.se> 2003-02-16 Anders Carlsson <andersca@codefactory.se>

* bus/dispatch.c: (send_one_message):
Only send broadcast messages to registered connections.

* dbus/dbus-message.c: (dbus_message_name_is):
* dbus/dbus-message.h:
New convenience function.

* dbus/dbus-transport-debug.c: (do_reading):
Only dispatch one message per run.

* test/Makefile.am:
* test/bus-test.c: (new_connection_callback), (die),
(test_hello_client1_handler), (test_hello_client2_handler),
(test_hello_replies), (main):

* test/bus-test-loop.[ch]:
Add these.
akefile.am
us-test-loop.c
us-test-loop.h
us-test.c
ac5183eafc6bd77bec094c3ba103701a4540f08d 16-Feb-2003 Havoc Pennington <hp@redhat.com> add another test
ata/auth/invalid-command-client.auth-script
4a8a03aeb7430a570618ffec08616c4c87c4ee73 16-Feb-2003 Havoc Pennington <hp@redhat.com> 2003-02-16 Havoc Pennington <hp@pobox.com>

* dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
allow people to avoid setting SIGPIPE to SIG_IGN
(_dbus_connection_new_for_transport): disable SIGPIPE unless
we've been asked not to
cvsignore
ata/auth/fail-after-n-attempts.auth-script
ata/valid-messages/unknown-header-field.message
2aa38be20b015777ec6570d1e2fd7e072f5f3be9 15-Feb-2003 Anders Carlsson <andersca@codefactory.se> 2003-02-15 Anders Carlsson <andersca@codefactory.se>

* dbus/dbus-errors.c: (dbus_set_error):
* dbus/dbus-errors.h:
Add a few errors and make dbus_set_error void.

* dbus/dbus-sysdeps.c:
(_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
(write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
* dbus/dbus-sysdeps.h:
Add _dbus_spawn_async.

* test/spawn-test.c: (main):
Test for _dbus_spawn_async.
akefile.am
pawn-test.c
fe4018941190f8bf020e4a8ed2999c212e0e113d 15-Feb-2003 Alexander Larsson <alexl@redhat.com> 2003-02-15 Alexander Larsson <alexl@redhat.com>

* dbus/dbus-threads.c:
* dbus/dbus-threads.h:
Add condvars. Remove static mutext from API.
Implement static mutexes by initializing them from threads_init.

* glib/dbus-gthread.c:
* qt/dbus-qthread.cpp:
Update with the thread api changes.


* dbus/dbus-list.c:
* dbus/dbus-list.h:
Turn StaticMutex into normal mutex + init function.
Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
_dbus_list_append_link, _dbus_list_prepend_link


* dbus/dbus-sysdeps.c:
* dbus/dbus-sysdeps.h:
New type dbus_atomic_t, and new functions _dbus_atomic_inc,
_dbus_atomic_dec. Only slow fallback implementation at the moment.

* dbus/dbus-protocol.h:
Add DBUS_MESSAGE_LOCAL_DISCONNECT define

* dbus/dbus-message.c:
Make ref/unref atomic.
Fix some docs.

* dbus/dbus-connection-internal.h:
* dbus/dbus-connection.c:
* dbus/dbus-connection.h:
Make threadsafe.
Change _peek to _borrow,_return & _steal_borrowed.
Change disconnect callback to event.
Make dbus_connection_dispatch_messages reentrant.

* dbus/dbus-transport.c:
Don't ref the connection on calls to the transport
implementation.

* dbus/dbus-message-handler.c:
Make threadsafe.

* glib/dbus-gmain.c:
Don't use peek_message anymore

* test/Makefile.am:
* test/debug-thread.c:
* test/debug-thread.h:
Simple thread implementation that asserts() on deadlocks in
single-threaded code.

* test/bus-test.c:
(main) Call debug_threads_init.

* test/watch.c:
Use disconnect message instead of disconnect callback.

* bus/connection.c:
* bus/connection.h:
Don't call dbus_connection_set_disconnect_function. Instead export
bus_connection_disconnect.

* bus/dispatch.c:
Call bus_connection_disconnect when we get a disconnected message.
akefile.am
us-test.c
ebug-thread.c
ebug-thread.h
atch.c
97ee8d189948c9f2c86464ca33f82e6daeaedc72 13-Feb-2003 Anders Carlsson <andersca@codefactory.se> 2003-02-13 Anders Carlsson <andersca@codefactory.se>

* bus/driver.c: (bus_driver_handle_hello):
* bus/driver.h:
* bus/services.c: (bus_service_lookup):
Reorder message sending so we get a more sane order.

* test/bus-test.c: (message_handler):
Fix tyop.
us-test.c
aa4b4ef5955606659557a40a2220090ee9c108d4 13-Feb-2003 Anders Carlsson <andersca@codefactory.se> 2003-02-13 Anders Carlsson <andersca@codefactory.se>

* bus/driver.c: (bus_driver_send_service_deleted),
(bus_driver_send_service_created), (bus_driver_send_service_lost),
(bus_driver_send_service_acquired), (bus_driver_handle_hello),
(bus_driver_send_welcome_message),
(bus_driver_handle_list_services),
(bus_driver_handle_acquire_service),
(bus_driver_handle_service_exists):
* dbus/dbus-bus.c: (dbus_bus_register_client),
(dbus_bus_acquire_service), (dbus_bus_service_exists):
* dbus/dbus-errors.c: (dbus_result_to_string):
* dbus/dbus-errors.h:
* dbus/dbus-message.c: (dbus_message_append_args),
(dbus_message_append_args_valist), (dbus_message_get_args),
(dbus_message_get_args_valist), (dbus_message_get_args_iter),
(dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
(dbus_message_iter_get_byte_array),
(dbus_message_iter_get_string_array), (message_iter_test),
(check_message_handling), (_dbus_message_test):
* dbus/dbus-message.h:
* test/bus-test.c: (main):
Change fields to arguments in messages, so that they won't be
confused with header fields.

* glib/test-dbus-glib.c: (main):
Remove append_fields from hello message.
us-test.c
1bfced6e45f733328f2509695974be86fbf2bef2 13-Feb-2003 Anders Carlsson <andersca@codefactory.se> 2003-02-13 Anders Carlsson <andersca@codefactory.se>

* dbus/dbus-message-builder.c: (_dbus_message_data_load):
* dbus/dbus-message.c: (process_test_subdir):
* test/break-loader.c: (find_breaks_based_on):
Plug some memory leaks.
reak-loader.c
f28c36435215a56364681667045adcafecc791e6 13-Feb-2003 Anders Carlsson <andersca@codefactory.se> 2003-02-13 Anders Carlsson <andersca@codefactory.se>

* test/data/valid-messages/standard-acquire-service.message:
* test/data/valid-messages/standard-hello.message:
* test/data/valid-messages/standard-list-services.message:
* test/data/valid-messages/standard-service-exists.message:
Add some standard messages.
ata/valid-messages/standard-acquire-service.message
ata/valid-messages/standard-hello.message
ata/valid-messages/standard-list-services.message
ata/valid-messages/standard-service-exists.message
5970d04af540af4825958272cba950c0b7dff15d 13-Feb-2003 Havoc Pennington <hp@redhat.com> 2003-02-13 Havoc Pennington <hp@pobox.com>

* dbus/dbus-auth.c (handle_server_data_external_mech): args to
dbus_credentials_match were backward

* dbus/dbus-auth-script.c (_dbus_auth_script_run): support
NO_CREDENTIALS and ROOT_CREDENTIALS

* dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
into here. Never process more commands after we've reached an
end state; store further data as unused bytes.

* test/data/auth/*: add more auth tests

* dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
command to match exact string and EXPECT_UNUSED to match unused
bytes

* test/Makefile.am (dist-hook): fix to dist all the test stuff
akefile.am
ata/auth/external-failed.auth-script
ata/auth/external-root.auth-script
ata/auth/external-silly.auth-script
ata/auth/external-successful.auth-script
ata/auth/extra-bytes.auth-script
c9ea8fac502c6109713aa372c4c8cfafd0b86858 13-Feb-2003 Havoc Pennington <hp@redhat.com> 2003-02-12 Havoc Pennington <hp@pobox.com>

* dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
\r off of popped lines

* dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
scripts

* dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
SEND, append \r\n
ata/auth/invalid-command.auth-script
ata/auth/mechanisms.auth-script
9ac27f95fecd56e6e1566681c87812a825130adc 10-Feb-2003 Zack Rusin <zack@kde.org> Minimal semantic fixes.
us-test.c
e5631cfe85f125c572f598a414c0659d6ce72684 06-Feb-2003 Anders Carlsson <andersca@codefactory.se> 2003-02-06 Anders Carlsson <andersca@codefactory.se>

* dbus/Makefile.am:
* dbus/dbus-break-loader.c:
* test/Makefile.am:
* test/break-loader.c:
Move dbus-break-loader to test/ and rename it to break-loader.
akefile.am
reak-loader.c
1024a9589f864ac47074c276c8d99541e43f6cf6 05-Feb-2003 Anders Carlsson <andersca@codefactory.se> Sssh
cvsignore
bb6a24ae1c9cf07ab733849c12752748638c02a3 02-Feb-2003 Anders Carlsson <andersca@codefactory.se> 2003-02-02 Anders Carlsson <andersca@codefactory.se>

* test/Makefile.am:
* test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
(message_handler), (new_connection_callback), (loop_quit),
(loop_run), (main):
Add bus test.
akefile.am
us-test.c
8ab042b9571dda44a5afcfe50e0d29dc9b58ecae 31-Jan-2003 Anders Carlsson <andersca@codefactory.se> 2003-01-31 Anders Carlsson <andersca@codefactory.se>

* dbus/dbus-address.c: (dbus_address_entry_free):
Free key and value lists.

* dbus/dbus-internals.c: (_dbus_type_to_string):
Add the types we didn't have.

* dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
(_dbus_marshal_validate_arg):
Add NIL types.

* dbus/dbus-message.c: (dbus_message_set_sender):
Remove todo about being able to set sender to NULL.

(dbus_message_set_is_error_reply),
(dbus_message_get_is_error_reply):
* dbus/dbus-message.h:
New functions.

* dbus/dbus-protocol.h:
Add error reply flag.

* test/data/valid-messages/opposite-endian.message:
Add NIL type to test.
ata/valid-messages/opposite-endian.message
7ba714ad7fe8256edfaad7d9a0f09aeb9611ca44 30-Jan-2003 Havoc Pennington <hp@redhat.com> 2003-01-30 Havoc Pennington <hp@pobox.com>

* dbus/dbus-message.c: use message->byte_order instead of
DBUS_COMPILER_BYTE_ORDER throughout.
(dbus_message_create_header): pad header to align the
start of the body of the message to 8-byte boundary

* dbus/dbus-marshal.h: make all the demarshalers take const
DBusString arguments.

* dbus/dbus-message.c (_dbus_message_loader_return_buffer):
validate message args here, so we don't have to do slow validation
later, and so we catch bad messages as they are incoming. Also add
better checks on header_len and body_len. Also fill in
message->byte_order

* dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
implemented properly)
(_dbus_string_validate_nul): new function to check all-nul

* dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
get_arg_end_pos and remove all validation
(_dbus_marshal_validate_arg): actually do validation here.
ata/valid-messages/opposite-endian.message
ata/valid-messages/simplest-manual.message
ata/valid-messages/simplest.message
def834b73b7e306790437b3d02613b14a94e6655 28-Jan-2003 Havoc Pennington <hp@redhat.com> 2003-01-28 Havoc Pennington <hp@redhat.com>

* dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
the reverse order from how I had it
(_dbus_string_base64_encode): reverse encoding order. I was
basically byteswapping everything during encoding.
akefile.am
nbase64.c
bec3c093cab742a953e39f1726c37345873990dc 28-Jan-2003 Havoc Pennington <hp@redhat.com> 2003-01-28 Havoc Pennington <hp@pobox.com>

* dbus/dbus-message.c (check_message_handling): function to check
on the loaded message, iterates over it etc.
ata/valid-messages/opposite-endian.message
4253591352ae5187824ca71d6fd034030c2f2146 28-Jan-2003 Havoc Pennington <hp@redhat.com> 2003-01-28 Havoc Pennington <hp@pobox.com>

* test/Makefile.am (dist-hook): fix make distdir

* dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
akefile.am
05a4ad6994919b352b5229d0b1b0a8ebebe2a42f 28-Jan-2003 Havoc Pennington <hp@redhat.com> 2003-01-27 Havoc Pennington <hp@pobox.com>

* dbus/dbus-mempool.c (time_for_size): replace printf with
_dbus_verbose

* dbus/dbus-message-builder.c (_dbus_message_data_load): allow
empty lines; fix the SAVE_LENGTH stuff to be
START_LENGTH/END_LENGTH so it actually works; couple other
bugfixes

* test/Makefile.am (dist-hook): add dist-hook for .message files

* dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
can be constant or locked.
(_dbus_string_free): allow freeing a const string as
documented/intended

* dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility

* dbus/dbus-test-main.c (main): take an argument which is the
directory containing test data

* dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
argument to this and load all the messages in test/data/
checking that they can be loaded or not loaded as appropriate.
akefile.am
ata/incomplete-messages/missing-body.message
ata/invalid-messages/bad-endian.message
ata/valid-messages/simplest-manual.message
ata/valid-messages/simplest.message
2f440457d5fe45afb732820da64a147157e2e82d 26-Jan-2003 Havoc Pennington <hp@redhat.com> 2003-01-26 Havoc Pennington <hp@pobox.com>

* dbus/dbus-message-builder.c: implement, completely untested.

* test/data/*: add data to be used in testing.
".message" files are our simple loadable text format.
".message-raw" will be binary dumps of messages.

* dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
ata/valid-messages/simplest.message
4a85d321b4516c6a663e8bdd530ba59018c974df 21-Jan-2003 Anders Carlsson <andersca@codefactory.se> 2003-01-21 Anders Carlsson <andersca@codefactory.se>

* dbus/dbus-connection.c: (dbus_connection_send_message):
Add a new client_serial parameter.

(dbus_connection_send_message_with_reply):
Remove a @todo since we've implemented the blocking function.

(dbus_connection_send_message_with_reply_and_block):
New function that sends a message and waits for a reply and
then returns the reply.

* dbus/dbus-connection.h:
Add new functions.

* dbus/dbus-errors.c: (dbus_result_to_string):
* dbus/dbus-errors.h:
Add new DBUS_RESULT.

* dbus/dbus-message-internal.h:
* dbus/dbus-message.c: (_dbus_message_get_reply_serial),
(_dbus_message_set_sender), (dbus_message_write_header),
(dbus_message_new_reply), (decode_header_data),
(_dbus_message_loader_return_buffer), (_dbus_message_test):
* dbus/dbus-message.h:
Add new functions that set the reply serial and sender.
Also marshal and demarshal them correctly and add test.

* dbus/dbus-protocol.h:
Add new DBUS_MESSAGE_TYPE_SENDER.

* glib/dbus-glib.h:
* glib/dbus-gmain.c: (watch_callback), (free_callback_data),
(add_watch), (remove_watch), (add_timeout), (remove_timeout),
(dbus_connection_hookup_with_g_main):
* glib/test-dbus-glib.c: (main):
Rewrite to use GIOChannel and remove the GSource crack.

* test/echo-client.c: (main):
* test/watch.c: (check_messages):
Update for changed APIs
cho-client.c
atch.c
502fbda2201a4e7e50d687f42af29c82e66299bb 19-Jan-2003 Havoc Pennington <hp@redhat.com> 2003-01-18 Havoc Pennington <hp@pobox.com>

* dbus/dbus-transport-unix.c (unix_do_iteration): only do the
reading/writing if read_watch != NULL or write_watch != NULL.

* dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
the message loader code to actually load message->header and
message->body into the newly-created message.

* dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
in OOM case

* dbus/dbus-connection.c (dbus_connection_set_max_message_size)
(dbus_connection_get_max_message_size)
(dbus_connection_set_max_live_messages_size)
(dbus_connection_get_max_live_messages_size): implement some
resource limitation functions

* dbus/dbus-resources.c: new file implementing some of the
resource limits stuff

* dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
missing docs, add @todo to handle OOM etc.

* dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
docs
cho-server.c
atch.c
0363701c341796278041fb9ea7de80eaaf41479a 18-Jan-2003 Havoc Pennington <hp@redhat.com> 2003-01-18 Havoc Pennington <hp@pobox.com>

* dbus/dbus-connection.c (dbus_connection_unref): disconnect the
connection if it hasn't been already.

* dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
replace with DisconnectFunction.
atch.c
368e150afc8c71fd94f90643f7079d20cdc7f913 18-Jan-2003 Havoc Pennington <hp@redhat.com> 2003-01-18 Havoc Pennington <hp@pobox.com>

* configure.in: default --enable-tests to $USE_MAINTAINER_MODE

* dbus/Makefile.am: fix it up so dubs-test-main.c is included in
the distribution

* test/Makefile.am: don't use special variable "TESTS" for echo-*
since we don't want to use those in make check
akefile.am
8c11bc06710d4981172ca570ba41cd923efffc7a 15-Jan-2003 Havoc Pennington <hp@redhat.com> 2003-01-15 Havoc Pennington <hp@redhat.com>

* test/Makefile.am: fix so that test source code ends up in the
distribution on make distcheck
akefile.am
1b53cbcce333381754b0568b740ece550a8f6ac9 07-Jan-2003 Anders Carlsson <andersca@codefactory.se> 2003-01-07 Anders Carlsson <andersca@codefactory.se>

* dbus/dbus-connection-internal.h:
* dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
(_dbus_connection_get_next_client_serial),
(dbus_connection_send_message):
* dbus/dbus-internals.h:
* dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
(dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
(_dbus_marshal_uint32), (_dbus_demarshal_double),
(_dbus_demarshal_int32), (_dbus_demarshal_uint32),
(_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
(_dbus_verbose_bytes), (_dbus_marshal_test):
* dbus/dbus-marshal.h:
* dbus/dbus-message-internal.h:
* dbus/dbus-message.c: (_dbus_message_set_client_serial),
(dbus_message_write_header), (_dbus_message_lock),
(dbus_message_new), (dbus_message_ref), (dbus_message_unref),
(dbus_message_get_name), (dbus_message_append_int32),
(dbus_message_append_uint32), (dbus_message_append_double),
(dbus_message_append_string), (dbus_message_append_byte_array),
(dbus_message_get_fields_iter), (dbus_message_iter_ref),
(dbus_message_iter_unref), (dbus_message_iter_has_next),
(dbus_message_iter_next), (dbus_message_iter_get_field_type),
(dbus_message_iter_get_string), (dbus_message_iter_get_int32),
(dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
(decode_header_data), (_dbus_message_loader_return_buffer),
(message_iter_test), (_dbus_message_test):
* dbus/dbus-message.h:
* dbus/dbus-protocol.h:
* dbus/dbus-test.c: (main):
* dbus/dbus-test.h:
* glib/test-dbus-glib.c: (message_handler), (main):
* test/echo-client.c: (main):
* test/watch.c: (check_messages):
Make messages sendable and receivable for real.
cho-client.c
atch.c
01af5ff4101e540a6456bca01d56272e701bea78 04-Jan-2003 Havoc Pennington <hp@redhat.com> 2003-01-04 Havoc Pennington <hp@pobox.com>

* test/watch.c (error_handler): make it safe if the error handler
is called multiple times (if we s/error handler/disconnect
handler/ we should just guarantee it's called only once)

* dbus/dbus-transport.c (_dbus_transport_disconnect): call the
error handler on disconnect (it's quite possible we should
just change the error handler to a "disconnect handler," I'm
not sure we have any other meaningful errors)

* configure.in: check for getpwnam_r

* dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
mechanism as in SASL spec, using socket credentials

* dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
(_dbus_send_credentials_unix_socket): new function

* dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
dbus_accept()
(_dbus_write): only check errno if <0 returned
(_dbus_write_two): ditto
atch.c
ff5283ab92c668453fd2f28c1715a1e0e9b949f5 27-Dec-2002 Havoc Pennington <hp@redhat.com> 2002-12-26 Havoc Pennington <hp@pobox.com>

* dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
doh

* dbus/dbus-marshal.c: Add macros to do int swapping in-place and
avoid swap_bytes() overhead (ignoring possible assembly stuff for
now). Main point is because I wanted unpack_uint32 to implement
_dbus_verbose_bytes
(_dbus_verbose_bytes): new function

* dbus/dbus-string.c (_dbus_string_validate_ascii): new function

* dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
mechanism to handle a corrupt message stream
(_dbus_message_loader_new): fix preallocation to only prealloc,
not prelengthen

* dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
(_dbus_string_test): enhance tests for copy/move and fix the
functions

* dbus/dbus-transport-unix.c: Hold references in more places to
avoid reentrancy problems

* dbus/dbus-transport.c: ditto

* dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
leak reference count in no-message case

* test/watch.c (do_mainloop): handle adding/removing watches
during iteration over the watches. Also, ref the connection/server
stored on a watch, so we don't try to mangle a destroyed one.

* dbus/dbus-transport-unix.c (do_authentication): perform
authentication

* dbus/dbus-auth.c (get_state): add a state
AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
(_dbus_auth_get_unused_bytes): append the unused bytes
to the passed in string, rather than prepend

* dbus/dbus-transport.c (_dbus_transport_init_base): create
the auth conversation DBusAuth

* dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
(_dbus_transport_new_for_domain_socket): when creating a
transport, pass in whether it's a client-side or server-side
transport so we know which DBusAuth to create
atch.c
3327ecfdcf6d3cd36b8b739282e9c0d2b768567a 15-Dec-2002 Harri Porten <porten@kde.org> make test compilable without prior make install. not sure how about
the preferred way to activate test compilation (DBUS_BUILD_TESTS)
akefile.am
271fa7fc335f332bb2be3beeef735334546c4957 13-Dec-2002 Havoc Pennington <hp@redhat.com> 2002-12-12 Havoc Pennington <hp@pobox.com>

* dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
below new interfaces and include fewer system headers.

* dbus/dbus-sysdeps.c (_dbus_read): new function
(_dbus_write): new function
(_dbus_write_two): new function
(_dbus_connect_unix_socket): new function
(_dbus_listen_unix_socket): new function

* dbus/dbus-message-internal.h: change interfaces to use
DBusString
atch.c
041b0767b284034aee09e9a0de2a3844b8cc546a 25-Nov-2002 Havoc Pennington <hp@redhat.com> 2002-11-24 Havoc Pennington <hp@pobox.com>

* test/echo-client.c, test/echo-server.c: cheesy test
clients.

* configure.in (AC_CHECK_FUNCS): check for writev

* dbus/dbus-message.c (_dbus_message_get_network_data): new
function

* dbus/dbus-list.c (_dbus_list_foreach): new function

* dbus/dbus-internals.c (_dbus_verbose): new function

* dbus/dbus-server.c, dbus/dbus-server.h: public object
representing a server that listens for connections.

* dbus/.cvsignore: create

* dbus/dbus-errors.h, dbus/dbus-errors.c:
public API for reporting errors

* dbus/dbus-connection.h, dbus/dbus-connection.c:
public object representing a connection that
sends/receives messages. (Same object used for
both client and server.)

* dbus/dbus-transport.h, dbus/dbus-transport.c:
Basic abstraction for different kinds of stream
that we might read/write messages from.
cvsignore
akefile.am
cho-client.c
cho-server.c
atch.c
atch.h
1428c65e7c46fd9f52e43b7424c56552ec2686e8 23-Nov-2002 Havoc Pennington <hp@redhat.com> 2002-11-23 Havoc Pennington <hp@pobox.com>

* configure.in: pile on more warning flags if using gcc

* Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
to document static functions

* configure.in: add summary to end of configure so it
looks nice and attractive

* dbus/dbus-hash.c: finish implementation and write unit
tests and docs

* configure.in: add --enable-tests to enable unit tests

* dbus/dbus-test.c: test program to run unit tests
for all files in dbus/*, initially runs a test for
dbus-hash.c

* dbus/dbus-internals.h: file to hold some internal utility stuff
akefile.am
93cff3d69fb705806d2af4fd6f29c497ea3192e0 21-Nov-2002 Havoc Pennington <hp@redhat.com> initial import of "dbus" skeleton
akefile.am