New Upstream Release - libdmapsharing

Ready changes

Summary

Merged new upstream version: 3.9.12 (was: 2.9.41).

Diff

diff --git a/ChangeLog b/ChangeLog
index c9a1ba7..58c4091 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,351 +1,2064 @@
-commit ecee3cc737d748d45ef4524b2c19a0fdf7c73804
+commit 2bcf6286fc81ff9c964e5b1bfe918c01a18e98c4
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Wed Jul 8 20:44:16 2020 -0400
+Date:   Fri Mar 24 16:24:52 2023 -0500
 
     Bump version number
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 2bcb47e5ae12f72c64fb02f2ada566bde3fe52b7
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Fri Mar 24 16:05:53 2023 -0500
+
+    Initialize a value that might not be initialized by g_object_get
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit a1ee9e6ad45513db545423fc3c72ba4fe7bf56b3
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Thu Mar 9 11:57:51 2023 -0600
+
+    configure.ac: add "AC_SEARCH_LIBS([floorf], [m])" for FreeBSD
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit f9802a2a622b74392b0db044f38c76795c8f1429
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Thu Mar 9 11:40:35 2023 -0600
+
+    libdmapsharing/Makefile.am: rename check target to check-local
+    
+    This avoids the warning from GNU make (or the failure from POSIX make)
+    related to redefining check. See:
+    
+    https://www.gnu.org/software/automake/manual/html_node/Extending.html
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 371d56c1025b93b10530f5843beee4ddd2a40b5d
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Thu Mar 9 11:36:15 2023 -0600
+
+    libdmapsharing/Makefile.am: remove dmap-enums.h from maintained_headers
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 452458baa27bf2dbbe5162b1f2b5e3c2ebd9d531
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Thu Mar 9 11:31:34 2023 -0600
+
+    libdmapsharing/Makefile.am: avoid cyclic dependencies when building enums
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit c2853f8421477fce67e4b6f278738e02ac6b1d25
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Thu Mar 9 11:18:30 2023 -0600
+
+    libdmapsharing/Makefile.am: simplify use of glib-mkenums after experimenting with FreeBSD
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 6d8447a1a22e01c0836b7596b1a2389660c807d9
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Thu Mar 9 09:58:33 2023 -0600
+
+    libdmapsharing/Makefile.am: drop use of patsubst, which is not POSIX
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit d354c84a4a3ff445e4a8dbe70af0a53ffd9cf828
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Tue Mar 7 15:34:32 2023 -0600
+
+    Update GTK-Doc markup to include summaries
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 289841575882df43ff55834b02a02bf273b5e779
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Thu Mar 2 20:44:42 2023 -0600
+
+    dmap-structure.c: replace g_memdup, which glib2 replaced with g_memdup2
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit d5e2480ab2d8ce774dd32e1cbd2ef2a3e329f5af
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Thu Mar 2 20:34:18 2023 -0600
+
+    Replace deprecated portions of autotools files
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit dcf24e182f9e1c1a28b284fec6cd1f3c5651d113
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Thu Mar 2 20:15:27 2023 -0600
+
+    .gitlab-ci.yml: revert check work
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 2481cad1921de5335b24659d20a533524010a4b2
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Thu Mar 2 20:08:29 2023 -0600
+
+    .gitlab-ci.yml: break up make targets into separate commands
+    
+    This seems to break both locally and on GitLab's CI:
+    
+            make all check clean all dist
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 91d96a2fd97acd2095087ce385956208a28997c2
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Thu Mar 2 19:32:48 2023 -0600
+
+    .gitlab-ci.yml: mkdir /run/dbus for dbus-daemon
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 921b6de3aa7c96566203fb9d8aa04d8362bac760
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Thu Mar 2 19:29:10 2023 -0600
+
+    .gitlab-ci.yml: mkdir /run for dbus-daemon
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit a8e9d9ace915e4233558beed66c3ad483f2969a4
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Thu Mar 2 19:25:17 2023 -0600
+
+    .gitlab-ci.yml: fix dbus-daemon install
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit a45dd03898d40f2a1da5a8d9e3c717a279ac2d15
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Thu Mar 2 19:19:32 2023 -0600
+
+    .gitlab-ci.yml: install dbus-daemon before running it
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 78ec17868a305f275ce5bb8da0f31476b8b477f3
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Thu Mar 2 19:14:48 2023 -0600
+
+    .gitlab-ci.yml: run dbus-daemon before avahi
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit eda7e534f810d558d12d611a4fdda3ba20ef1135
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Thu Mar 2 18:59:15 2023 -0600
+
+    .gitlab-ci.yml: do not assume systemd is installed
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 2cd49197d202f5f47ffb25ef8145b480fe3b53b0
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Thu Mar 2 18:29:52 2023 -0600
+
+    .gitlab-ci.yml: run avahi-daemon for unit tests
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit d0363fd18b7b87eb6d8512d8f3fc5223a4f4b9e6
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Thu Mar 2 18:22:25 2023 -0600
+
+    .gitlab-ci.yml: install avahi for Fedora unit tests
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 817577a4e429cd1c1316097149319acb78828d77
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Thu Mar 2 14:30:47 2023 -0600
+
+    .gitlab-ci.yml: test check target
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 9d45d71108444ecf1e0b53670d9929218692a502
+Merge: a176ed2 c7463c0
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Thu Mar 2 14:18:23 2023 -0600
+
+    Merge branch 'mdbk-ated'
+
+commit c7463c07a92e0698768cd11a9b442585ea57c716
+Merge: a4412f4 aeeb944
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Thu Mar 2 13:50:04 2023 +0000
+
+    Merge branch 'owntone' into 'mdbk-ated'
+    
+    Add more content codes
+    
+    See merge request GNOME/libdmapsharing!5
+
+commit aeeb944e8121b6cce09f223ab31e5d219f242c76
+Author: Sébastien Noel <sebastien@twolife.be>
+Date:   Thu Mar 2 09:23:58 2023 +0100
+
+    Add more content codes
+
+commit a176ed271a2fb8098e56b55ebd80d7cb1ab5a188
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Wed Mar 1 15:29:53 2023 -0600
+
+    doc/Makefile.am: simplify
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 4bc8864a418aef9d5c91a7dbfcba9ed2453a7d71
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Wed Mar 1 11:43:52 2023 -0600
+
+    doc/Makefile.am: replace regular expression with explicit header files in IGNORE_HFILES
+    
+    https://gitlab.gnome.org/GNOME/libdmapsharing/issues/49
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit a4412f4c3733834af8f653af4db4c54160980804
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Wed Mar 1 11:24:35 2023 -0600
+
+    Add MDBK and ATED content codes
+    
+    https://gitlab.gnome.org/GNOME/libdmapsharing/issues/54
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit bf871a7f69efbbe6a7fdb0da890aee9b7657071e
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Tue Feb 21 16:36:11 2023 -0600
+
+    .gitlab-ci.yml: use Debian unstable for libsoup3
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 68117e50d66282e9d9f2d79560e843af356ec381
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Tue Feb 21 16:33:25 2023 -0600
+
+    .gitlab-ci.yml: build using Debian, not Ubuntu for i386
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 0ebcf5a424b59fa93e5b487f6db29bcd53c263bc
+Merge: 27cac25 a748466
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Mon Feb 13 14:52:08 2023 +0000
+
+    Merge branch 'add-nullable-annotation' into 'master'
+    
+    Add (nullable) annotation for parameters which can be empty
+    
+    See merge request GNOME/libdmapsharing!4
+
+commit 27cac2550127ecf5e19dcc7190bd41eec3368ae8
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Fri Feb 10 13:34:51 2023 -0600
+
+    .gitlab-ci.yml: install make and git on Ubuntu to build
+    
+    The last change allowed me to identify the real problem. Thus revert the
+    configure flag and instead ensure git and make are present.
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 895ba7b5e97a9927b272a073b7bbbfd0f21f94b9
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Fri Feb 10 13:29:09 2023 -0600
+
+    .gitlab-ci.yml: disable dependency tracking on Ubuntu
+    
+    The GitLab CI system was saying:
+    
+    config.status: error: in `/builds/GNOME/libdmapsharing':
+    config.status: error: Something went wrong bootstrapping makefile fragments
+        for automatic dependency tracking.  If GNU make was not used, consider
+        re-running the configure script with MAKE="gmake" (or whatever is
+        necessary).  You can also try re-running configure with the
+        '--disable-dependency-tracking' option to at least be able to build
+        the package (albeit without support for automatic dependency tracking).
+    See `config.log' for more details
+    
+    This aims to fix that.
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 8ba46fbc26157b634c2a7d71b4307f81c16a53a4
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Fri Feb 10 12:41:12 2023 -0600
+
+    Bump version number
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 54765bcf37acb31d9bbff5240cf8b888b662513a
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Wed Dec 14 20:43:27 2022 -0600
+
+    .gitlab-ci.yml: fix Ubuntu libsoup-3.0-dev package name
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 3f9dc3afeb5e9892c73c253000300b388c688575
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Wed Dec 14 20:41:24 2022 -0600
+
+    .gitlab-ci.yml: use ubuntu:jammy
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 9d335e03cd3a6dc32b8c525744ab5faf7e00d8d3
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Wed Dec 14 20:39:32 2022 -0600
+
+    .gitlab-ci.yml: use riscv64/ubuntu:jammy
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 3c6cba7d7f709f0393ce8a7838e7385824891003
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Wed Dec 14 20:37:39 2022 -0600
+
+    .gitlab-ci.yml: use ubuntu:jammy
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit d1dfa07f16384ce940010e88d97b5eae5b72d2c5
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Wed Dec 14 20:37:01 2022 -0600
+
+    .gitlab-ci.yml: use i386/ubuntu:jammy
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit d2cf68760865da5fbab5b4a2b5811bdf01eb91ee
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Wed Dec 14 20:36:01 2022 -0600
+
+    .gitlab-ci.yml: use i386/ubuntu:latest
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 3a540fd97520effd2ee09bd8a940261ca70fee5e
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Wed Dec 14 20:33:36 2022 -0600
+
+    .gitlab-ci.yml: use i386/ubuntu:22.04.1 (drop .1)
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 99521e52ad98f3a1402c165d61a0aeb7f79305d7
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Wed Dec 14 20:28:33 2022 -0600
+
+    .gitlab-ci.yml: use i386/ubuntu:22.04.1 so that libsoup3 is available
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 17212ce0f644f78f77ca86055f77b8b7addcf250
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Wed Dec 14 20:21:35 2022 -0600
+
+    .gitlab-ci.yml: use i386/ubuntu:20.04
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit ecab1f8c2ce1035223c7745a06d46ac710cc097e
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Wed Dec 14 20:18:53 2022 -0600
+
+    vala-dmap-db.vala: fix object ownership issue
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 231370306844da834d2c6c92362ea4298888deaa
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Wed Dec 14 20:18:18 2022 -0600
+
+    Round of cleanup with pedansee
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 887d0a4631e66c39c00f9eca9bb91acf25fb11d0
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Wed Dec 14 20:00:07 2022 -0600
+
+    .gitlab-ci.yml: use Ubuntu Fossa
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit d407bc700bc751b3e4bfd7e5dc1f8f31f76e5b13
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Wed Dec 14 19:48:25 2022 -0600
+
+    libdmapsharing4.spec: depend on libsoup3
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 2e04754ea7c19a1f29c10c8adc29ae81b7e5ad94
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Wed Dec 14 19:37:45 2022 -0600
+
+    .gitlab-ci.yml: update to install libsoup3
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 38b7dc34b9a78629d02bf6e4e3a1b95c66b49120
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Wed Dec 14 10:28:16 2022 -0600
+
+    libdmapsharing/Makefile.am: replace Soup-2.4 with Soup-3.0
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 06bb563f9898fa9a5c03a6d7f0eb00d33701ea0d
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Wed Dec 14 10:21:28 2022 -0600
+
+    Migrate to libsoup3
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 99ececdef85d60c40d546a477673db8be4be9b9c
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Wed Dec 14 10:17:34 2022 -0600
+
+    Update TODO
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 43d27411f74c54948c78430d4da655abf1c85c3d
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sun Dec 11 16:07:06 2022 -0600
+
+    Update TODO
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 910447caf0efc3756977d976880e78ae4d6422fd
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sun Dec 11 16:06:59 2022 -0600
+
+    Remove extraneous #includes
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit a74846680549fa0b4a9839962251b0b5bc4171da
+Author: crvi <crvisqr@gmail.com>
+Date:   Sun Mar 21 01:20:43 2021 +0530
+
+    Add (nullable) annotation for parameters which can be empty
+
+commit a78d2951a4fa15696e1f4880050a4a9ae144348f
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Wed Jul 8 18:18:40 2020 -0400
+
+    libdmapsharing4.spec: edit to match bumped release number
+
+commit 2afa64da9304a0271419580268dd64b2b9420d92
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Wed Jul 8 08:01:40 2020 -0400
+
+    configure.ac: restore SO_VERSION
+
+commit db6a7d351ea66ae52aec40314b74166aee88f794
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Tue Jul 7 21:55:36 2020 -0400
+
+    dmap-transcode-stream.c: add missing ..._get_instance_private()
+
+commit cd73cfbdb624c43b3b6dcacc30bd5a174569d777
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Tue Jul 7 20:11:50 2020 -0400
+
+    Add mention of m4 directory to configure.ac and Makefile.am
+    
+    Closes #44.
+
+commit 6d933bd2faff96d5d4cdce21f7e2690139e4456b
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Mon Jul 6 00:37:48 2020 -0500
+
+    configure.ac: clean up checks for mDNS library
+    
+    Closes #35.
+
+commit bfac0ce6dff5967733c1ef71d55b20d8367009f2
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Mon Jul 6 00:16:45 2020 -0500
+
+    Favor avahi over dns_sd
+    
+    Closes #35.
+
+commit 584e98b98f618bd5c7117f68f6edff8e546178f9
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Mon Jul 6 00:06:31 2020 -0500
+
+    Drop support for ancient Avahi version
+
+commit a2dd977b4332d65109b5a705b181febc09184880
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sun Jul 5 20:35:37 2020 -0500
+
+    configure.ac: restore support for silent builds
+
+commit bec937254d1692920e2ce2a4cbcd1c15699a4b14
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sun Jul 5 20:05:18 2020 -0500
+
+    Clean up configure.ac
+
+commit c131e17ab12b08ed4aa1089669f8181d013b1925
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sun Jul 5 18:19:50 2020 -0500
+
+    configure.ac: fix use of AS_VERSION
+
+commit 6734a176df389487c093449594ccac526142b9ab
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sun Jul 5 16:05:59 2020 -0500
+
+    Fix build failure when GStreamer absent
+    
+    Closes #30.
+
+commit 8ab51da7ead31f78657f362b84ddab1442ed3640
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sun Jul 5 14:55:54 2020 -0500
+
+    Remove support for howl
+    
+    Use Avahi in most instances and dns_sd for environments with tight
+    resource constraints.
+    
+    Closes #36.
+
+commit 5f021a95443cb7467d1351f03dac6d756d0a30ec
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sun Jul 5 14:29:06 2020 -0500
+
+    Remove config.h.in from Git
+
+commit 6d7b4d16df4ec7881cd2b6efe303e791de198b7c
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sun Jul 5 14:26:50 2020 -0500
+
+    Update config.h.in following use of GLIB_VERSION_*_*
+
+commit ca1a87f30b3dc25c386a1cc356f35fb71433d0e6
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sun Jul 5 14:19:13 2020 -0500
+
+    .gitlab-ci.yml: fix syntax
+
+commit ea91d1405779321b596fe4eb8ccbc60a5d981df4
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sun Jul 5 14:14:06 2020 -0500
+
+    .gitlab-ci.yml: adjust how we specify RPM artifacts
+
+commit ef2f577376cb3f8576cacec1dbd52da9a5bdfb8a
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sun Jul 5 14:01:43 2020 -0500
+
+    .gitlab-ci.yml: update artifact globs
+
+commit 48c1b5c11485bb3ab917677eb581f6aa21301328
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sun Jul 5 13:31:47 2020 -0500
+
+    .gitlab-ci.yml: remove --disable-tests in build-fedora to satisfy "make dist"
+
+commit 480bb15b22af351ad9456a5366dee440fb2d1f3d
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sun Jul 5 13:23:06 2020 -0500
+
+    .gitlab-ci.yml: remove gee from build-ubuntu
+
+commit 3e96337857b26baec127afa5bf5e2c0f4b06371f
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sun Jul 5 13:21:57 2020 -0500
+
+    .gitlab-ci.yml: install Vala for building RPM
+
+commit f7eafab26debb6d603af207b704773e4ef6b3328
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sun Jul 5 13:12:57 2020 -0500
+
+    .gitlab-ci.yml: add make to build-fedora
+
+commit 642ecb380a629369bddf8048ec56a7e900090697
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sun Jul 5 13:10:09 2020 -0500
+
+    .gitlab-ci.yml: simplify build-fedora
+
+commit 1114ce187430f66ab35cb9c403d632eaa382b77b
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sun Jul 5 12:54:18 2020 -0500
+
+    .gitlab-ci.yml: add config.log to artifacts
+
+commit 380ca9a4a955fd4bcf88a8507f3ca6b13f3b1a3f
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sun Jul 5 12:35:11 2020 -0500
+
+    .gitlab-ci.yml: build Fedora RPM and preserve as artifact
+
+commit 396db93bbe5d83f286a24b0f42427f4048f20e86
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sun Jul 5 09:43:04 2020 -0500
+
+    Set required and maximum glib API versions
+    
+    Closes #25.
+
+commit e22fb2ac88e5d74d30ab691886bbc85a95d89ebe
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sat Jul 4 19:20:59 2020 -0500
+
+    Use g_cclosure_marshal_generic rather than generated marshaling routines
+    
+    Closes #37.
+
+commit 082aaacc3702ef267720ef3890200bc5a4194165
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Fri Jul 3 18:37:12 2020 -0500
+
+    .gitlab-ci.yml: revert Alpine attempt
+
+commit b9c100c08db140e2a0134a55a7e4e4f5cb08ff27
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Fri Jul 3 18:09:48 2020 -0500
+
+    .gitlab-ci.yml: go with x86_64 Alpine for now
+
+commit f295baadb9084baca79d48cfac7672aa8099ad77
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Fri Jul 3 18:07:41 2020 -0500
+
+    .gitlab-ci.yml: fix typo
+
+commit c4357e5c9f68db13986b450a60607434ea38c2cd
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Fri Jul 3 18:06:42 2020 -0500
+
+    .gitlab-ci.yml: adjust ARM values
+
+commit 2c3279b8c912cab55c0ad889cf288c13ee7deb0c
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Fri Jul 3 17:54:56 2020 -0500
+
+    .gitlab-ci.yml: fix syntax
+
+commit 88deb2348685a8bd9c6cb59df2e302dbad3572e2
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Fri Jul 3 17:49:16 2020 -0500
+
+    .gitlab-ci.yml: add build test using Alpine/musl
+
+commit 81a8ffc007a37575ec855c1557311dca78b1ea9b
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Fri Jul 3 17:12:09 2020 -0500
+
+    .gitlab-ci.yml: build with --enable-more-warnings
+
+commit a0fcba3e7a0e53abe94359308393e4965f44c0dc
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Fri Jul 3 14:40:37 2020 -0500
+
+    .gitignore: ignore compile
+    
+    Closes #14.
+
+commit 2403bf4e27cdcbbc5fc1b03dc86ec9dae896c027
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Fri Jul 3 14:37:16 2020 -0500
+
+    Fix more warnings after adding --enable-more-warnings configure option
+    
+    Closes #34.
+
+commit 2d8030a98282be1409a660ee2fa23761863dd4a6
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Fri Jul 3 11:22:01 2020 -0500
+
+    Do not try to build dpapview when GTK3 is not present
+    
+    Closes #33.
+
+commit 8abd00a63e77757e3611c4488f70ade6d46a1203
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Fri Jul 3 10:52:53 2020 -0500
+
+    libdmapsharing/Makefile.am: add dmap-transcode-stream-private.h
+
+commit b904be93a499874e79995f887b700f854545b34f
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Fri Jul 3 10:51:39 2020 -0500
+
+    Update docs to reflect changes to GStreamer-related symbols
+
+commit efd03791347814a545b2de2111a83ecbac0a8d9f
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Fri Jul 3 10:47:18 2020 -0500
+
+    Remove "make clean" from end of check target in libdmapsharing/Makefile.am
+    
+    This was causing the subsequent build of check in tests/ to fail,
+    because clean removes the generated dmap-enum.{c,h}.
+
+commit c4f5365d9891e3d5876a1a59a6f8b48143a6ddf3
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Fri Jul 3 10:35:10 2020 -0500
+
+    Modify visibility of symbols related to transcoding
+    
+    1. Rename "dmap-gst-input*stream*" to "dmap-transcode-stream*"
+    2. Move declaration of ...new_buffer_cb to private header
+    3. Remove GStreamer headers from dmap-transcode-stream.h
+    4. Make GStreamer a private requirement in .pc file
+
+commit 1f2208160640c06b01b5efc152ce2e7fc6a452bd
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Fri Jul 3 09:29:39 2020 -0500
+
+    .gitignore: add *.c.gcov
+    
+    Closes #14.
+
+commit 19ece8e065c24ba7ec57be05a0ea57bed4531a97
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Thu Jul 2 18:45:11 2020 -0500
+
+    .gitlab-ci.yml: build with --disable-tests, as tests fail -Werror
+
+commit 31c7eff7a183b05ddd56fbc41395dff490d42891
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Thu Jul 2 18:13:05 2020 -0500
+
+    Update .gitignore and \"make clean\" targets
+    
+    Closes #14.
+
+commit a9288d7ba6f758be03341f80ed413c7896d46372
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Thu Jul 2 17:50:42 2020 -0500
+
+    .gitlab-ci.yml: use -Werror and build for both Avahi and dns_sd
+
+commit 78cf4e0d552b9d7ffe9cfea11b2e40e1314cb5ce
+Merge: abe7ff4 3b197d4
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Thu Jul 2 16:19:47 2020 -0500
+
+    Merge branch 'master' of gitlab.gnome.org:GNOME/libdmapsharing
+
+commit abe7ff4ac4d1f5ca81c50c1845a84ff4db4d1e3c
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Thu Jul 2 16:19:10 2020 -0500
+
+    Address compiler warnings in dns_sd code
+    
+    Closes #28.
+
+commit 3b197d4728027dbcf799e77971186b96e90abd3d
+Merge: 0cfc3d7 ae626d5
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Thu Jul 2 20:54:25 2020 +0000
+
+    Merge branch 'wip/jtojnar/gstapp-dep' into 'master'
+    
+    Fix vala build with gstapp in non-standard location
+    
+    Closes #11.
+    
+    See merge request GNOME/libdmapsharing!2
+
+commit ae626d52883ff2fb004a8c5595bff8e222587b5d
+Author: Jan Tojnar <jtojnar@gmail.com>
+Date:   Thu Jul 2 05:07:19 2020 +0200
+
+    build: Fix vala build with gstapp in non-standard location
+    
+    Some of the headers include `<gst/app/gstappsink.h>`, which is part of gstreamer-app-1.0,
+    the pkg-config file only lists gstreamer-1.0 as a dependency, though. It is not guaranteed
+    that they share the installation paths and indeed it is not the case on NixOS, resulting
+    in build failure.
+    
+    Let's properly declare our dependencies so that vala-gen-introspect can find them.
+    
+    https://gitlab.gnome.org/GNOME/libdmapsharing/issues/11
+
+commit 0cfc3d79e6eb26d7e392abc5de57036e4aa0d06f
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Tue Jun 30 22:47:06 2020 -0500
+
+    Update libdmapsharing4.spec
+
+commit 8c8075cfafbcabe44aac84b52d31d9c4c93341a3
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Tue Jun 30 21:41:11 2020 -0500
+
+    .gitlab-ci.yml: add Avahi daemon for unit tests
+
+commit 7b8d2a2077458e6a7967c45a0f76ab29a1351e85
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Tue Jun 30 21:39:20 2020 -0500
+
+    dmap-connection.c: fix unit test to include '\0' in size
+
+commit e24d4d9d129c828f91091b7143a4ff3ea2372248
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Tue Jun 30 21:24:30 2020 -0500
+
+    tests/Makefile.am: add $(CHECK_LIBS) to unit_test_LDADD
+
+commit e4f575037331e34ccaf2b2db30ce459b784768f0
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Tue Jun 30 19:44:11 2020 -0500
+
+    Fix a warning about ignoring fgets' return value
+
+commit f8d6b53ad1195db4bf35d020303a1d6da0a55fa9
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Tue Jun 30 20:12:56 2020 -0500
+
+    .gitlab-ci.yml: fix at eoan to get i386
+
+commit 800c345de21da19b3710ff20b22543c7de01d518
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Tue Jun 30 20:16:13 2020 -0500
+
+    Avoid ck_assert_ptr_null(); CI hosts have old version of check
+
+commit 90ce9d39830edfeac9907fc90c3034221c579f45
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Tue Jun 30 20:28:59 2020 -0500
+
+    Ensure vala is optional
+
+commit 9a83e643f12dc2daad23efab0c96c2cca100a99a
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Tue Jun 30 19:16:17 2020 -0500
+
+    Fix declarations that were wrong for 32-bit builds
+
+commit 6e57659bd81e70e5c419276507a6618fb5c9047f
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Tue Jun 30 18:59:38 2020 -0500
+
+    .gitlab-ci.yml: install libavahi-client-dev
+
+commit edf5742664e3b4324fcfa052c6e651afe56dbc6e
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Tue Jun 30 18:50:29 2020 -0500
+
+    .gitlab-ci.yml: make use of autogen.sh and install required packages
+
+commit 79d689e9875ebab03ff2d9ad0566a0e8500e9c88
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Tue Jun 30 18:44:22 2020 -0500
+
+    .gitlab-ci.yml: select 32-bit image and set DEBIAN_FRONTEND=noninteractive
+
+commit 33c6c8bae253bcacc4279a6134352771b334bcbb
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Tue Jun 30 18:27:28 2020 -0500
+
+    Start to configure CI
+
+commit c4f3b677ffe7fb347429653999110f0e6ea61a1f
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Tue Jun 30 16:23:59 2020 -0500
+
+    Remove use of G_GNUC_FALLTHROUGH
+    
+    G_GNUC_FALLTHROUGH was not available until glib-2.60. Avoiding it allows
+    libdmapsharing to compile in more places.
+    
+    Closes 17.
+
+commit 782287c269b2a4075d3bba06d624296ef72a062e
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Tue Jun 30 16:12:27 2020 -0500
+
+    configure.ac: clean up some messaging in
+
+commit 9eb0b1610de28dce0e4743e2fff746065171a2f7
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Tue Jun 30 15:55:32 2020 -0500
+
+    Require glib-2.0 2.40+
+    
+    Closes #25.
+
+commit 2111cb95060feebaeaa3e4bf66da86b38da07fbf
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Tue Jun 30 08:01:04 2020 -0500
+
+    Fix some autotools warnings
+
+commit 856bf619ed33559473ef588024929cf116889e1e
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Tue Jun 30 07:35:13 2020 -0500
+
+    Adjust how building tests works
+    
+    Previously, the presence of the check library led to libdmapsharing
+    building its unit tests and supporting facilities, despite the separate
+    configure flag --disable-tests. This led to confusion as to whether some
+    test facilities should be present in the compiled libdmapsharing. Now,
+    --disable-tests disables all tests, whether unit tests or sample programs,
+    and it ensure not test facilities exist in libdmapsharing.
+
+commit a124a4cdaa196f0e65d6d2db994c4748385f7849
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Tue Jun 30 06:48:53 2020 -0500
+
+    Make use of G_GSIZE_FORMAT and G_GSSIZE_FORMAT
+
+commit ba935754a4f733ca62abf6dcb0478cb490e517c8
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Tue Jun 30 06:31:23 2020 -0500
+
+    Bump version number in anticipation of next release
+
+commit 05f4a59ce6a42e03a9da33c5bc8abdf94e50e433
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Mon Jun 29 19:54:56 2020 -0500
+
+    Move from IS_DMAP... to DMAP_IS...
+
+commit 4a3a768ebe99beecc65b326d02f9f5cef187a5db
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Mon Jun 29 15:15:09 2020 -0500
+
+    Fix a format string that was wrong on 32-bit x86
+    
+    Closes #12.
+
+commit b7da0e056b29d117f79ad3a3a6be6e42950dce12
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Mon Jun 29 15:14:15 2020 -0500
+
+    Unconditionally include test-*.c in libdmapsharing
+    
+    These files used to be guarded by HAVE_CHECK. However, test-dmap-client.c
+    and test-dmap-server.c require them. Thus we now build them into
+    libdmapsharing unconditionally. Perhaps the name should involve
+    "reference" rather than "test," and perhaps these could be made a little
+    more useful in the general case.
+    
+    Closes #10.
+    Closes #13.
+
+commit f6518afa79342ef86253a1a0c7ea9b2699abe0c9
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Tue May 26 00:24:06 2020 -0400
+
+    Bump version number
+
+commit 2f5bee99c8fcd62cbe82dfdcb2061339aa54427c
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Tue May 26 00:16:51 2020 -0400
+
+    _actual_http_response_handler: check error rather than structure for NULL
+
+commit 57c153767f8479f210b1514804b40bcb5b6c2108
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Tue May 26 00:16:00 2020 -0400
+
+    dmap_control_share_class_init: add missing dmap_control_share_get_instance_private
+
+commit eed8c7c18f1e22003730fa3f406671d09600ba81
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Thu May 7 23:22:26 2020 -0500
+
+    Adjust tests and recent changes to satisfy pedansee
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 816e0a1236306d8d33e3ec7cf44adce357cb744b
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Thu May 7 22:52:27 2020 -0500
+
+    Replace use of deprecated G_TYPE_INSTANCE_GET_PRIVATE
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit ce149c07716e96cd6cf26a5d7d4e3bd003b2c846
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Thu May 7 21:48:07 2020 -0500
+
+    Migrate dpapview from GTK-2.0 to GTK-3.0
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 9ae04e25cf792f2f7b4d3bd537bc778d7b05eabf
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Mon Dec 30 21:36:11 2019 -0500
+
+    Make more functions static
+
+commit 3d79874066e1a1c1bba646135cf5fc5811b0eb55
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sat Dec 7 20:51:29 2019 -0500
+
+    Replace use of deprecated G_CONST_RETURN
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 8a240946b14884f529b55a7f9b89987544b7f760
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Fri Dec 6 22:35:08 2019 -0500
+
+    Update Vala code
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 9d377f803d09cd3fb69f1d8db55e17f3575fa0b1
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Fri Dec 6 22:33:58 2019 -0500
+
+    Make some functions static
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 0d1b035a19c7e6bd8c75d2b1c0b47ed696bd0a40
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sun May 19 18:32:00 2019 -0400
+
+    Bump version number
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 6ba1f300ca47f7bd43c8c852075054c5ee7362ef
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sat May 18 02:22:48 2019 -0400
+
+    More work on Makefile's check target
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit cfae84b3532cf477449c50fbd1266c7c5f973a23
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sat May 18 01:45:22 2019 -0400
+
+    Update check target in Makefile
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit b2fba67b932fe69f2daafb9291f4b6defd8ba116
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Fri May 17 23:02:33 2019 -0400
+
+    Revert to using guint, rather than gpointer, for id where possible
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 59cac7e77ad6279bab5b09a156a561c50e1c3493
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Fri May 17 00:44:59 2019 -0400
+
+    Fix warnings from -Wextra
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit dfdc3adb23c40cf91e8094bfcc190333d52b65d3
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sat May 11 18:10:47 2019 -0400
+
+    Fix some memory management
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 6f49cb689dc72e45a74df649aa8b5627a11ec471
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sun Apr 28 01:02:56 2019 -0400
+
+    Bump version number
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 193042f6ced24ff6d5e3933feda4612e84206109
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sun Apr 28 01:01:06 2019 -0400
+
+    Regenerate C from Vala using 0.44.3
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 67281ed0c683d8321c99638b9aa1833dadb99d66
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sun Apr 28 00:59:40 2019 -0400
+
+    Update Vala code to build with Vala 0.44.3
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 22b71250a4f15784aedc001ccf25c96cfbe5f41d
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sat Apr 27 21:07:12 2019 -0400
+
+    Bump version number
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit c61af81f60e43c50558ddbab0a9a69122b19d671
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sun Mar 17 23:05:00 2019 -0400
+
+    Fix reference counting of thumbnails and hashes
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 2d24eafaf536884e72091e71ee220500639bd6c4
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sun Mar 17 22:07:26 2019 -0400
+
+    README-Porting: fix typo
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit cc6c2f87e23ea5b3857a1fce2e5e795c41b7998f
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Thu Jan 24 18:31:24 2019 -0500
+
+    Bump version number
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 5c4cdf8c0eb9f644c8ab6e3b907f3bbb018802c1
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Fri Dec 14 18:36:28 2018 -0500
+
+    Replace use of deprecated g_type_class_add_private()
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 351af0268ac4ddde451013ce9bc6ed60ffb41282
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Thu Dec 13 19:08:59 2018 -0500
+
+    Remove newlines from strings passed to g_warning and so on
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 8654daabf1f027d153d973df3d31e001378cc32a
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Mon Sep 3 15:27:00 2018 -0400
+
+    Bump version number
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 85fb4af93bbd6a83d55bacc033be6a698c08bf63
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Mon Sep 3 13:16:57 2018 -0400
+
+    Add DMAP_DB_ID_BAD value
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit f7e52a7f6951790aa3fef3c51cea615f929a1f2b
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Mon Sep 3 13:16:16 2018 -0400
+
+    Fix use of boxing in test-dmap-av-record.c and test-dmap-image-record.c
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 54cb9f4a3edfd12845149c0f5abe117cb6cdc0a2
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sun Sep 2 18:38:28 2018 -0400
+
+    Fix whitespace
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 38927bc4aa91a30af230d983f27ad7fe2290dd06
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sat Jul 21 23:18:01 2018 -0400
+
+    Bump version number
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit d15444a38e5de1658a667c6deaf7477a6a980d93
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sat Jul 21 23:13:35 2018 -0400
+
+    Properly set name from service-name if NULL
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit ecdd1d9faadfdf76e042e80d3b302e1287c0b6a9
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sat Jul 21 21:47:39 2018 -0400
+
+    More adjustments to error handling and related tests
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 5baf82d1108f3e24fcb65967198741ad494bf70d
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sat Jul 21 20:47:32 2018 -0400
+
+    Simplify writing DmapConnection tests with a template
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit a50bd508e7ee4d3daed41e36576c2f132d68f89c
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sat Jul 21 17:17:00 2018 -0400
+
+    Improve error handling surrounding dmap_structure_parse and write unit tests
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 38fc523265ff68f519ce6d8d49316d2a23b438eb
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sat Jul 21 12:59:55 2018 -0400
+
+    Wire coverage testing into make check
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 6da2b25e395f482cb456258ddff8dc6da5c1e854
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sat Jul 21 10:31:40 2018 -0400
+
+    Rename guard in dmap-config.h.in
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 60d2e9119a016cd6951ac978faa7ba7c570ead68
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Fri Jul 20 20:51:59 2018 -0400
+
+    Round of cleanup with pedansee
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit c70161682d88103f8e8095ae7fa61922e56185e1
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Fri Jul 20 19:13:09 2018 -0400
+
+    Declare _error_triggered as static
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 51b19a19329c9a5b936c41f4994aca09602f6797
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Thu Jul 19 20:22:05 2018 -0400
+
+    Add new dmap_share_emit_error function
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 721c95a1276196e7ac7fcdec0df056c21e73d122
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Wed Jul 18 23:07:17 2018 -0400
+
+    Adjust whitespace in test-dmap-server.c
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 7f6b321537574caa419d18002f97c25999a11e1c
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Wed Jul 18 22:49:49 2018 -0400
+
+    Migrate more error handling in dmap-av-share.c to error signal
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit a91a3914568062fb38a540025b4d0c2364fa18c4
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Wed Jul 18 22:19:03 2018 -0400
+
+    Fix code tested by dmap_av_share_serve_publish_collision_test
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 740e4ff72e9a67568646f4c8ddc6b166fe1162e7
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Wed Jul 18 21:50:17 2018 -0400
+
+    Another adjustment to assertions checking return and error
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 9b4af687cf96ea625cacad0495cfc15ae91559a7
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Wed Jul 18 21:49:31 2018 -0400
+
+    Emit error on bad transcode format
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit cdb3b84005e3fb28d8fcbbb706e61af01f4e6322
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Thu Jul 12 00:24:55 2018 -0400
+
+    Fix assertion in dmap_record_factory_create
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit e87d5e7092de919b4d0d274bb28c590b93f81708
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Thu Jul 12 00:24:11 2018 -0400
+
+    Preface, e.g., CONTROL_REPEAT_NONE with DMAP_
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit e6d49f6235cce88836104ea9bf09024f09ab435d
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Thu Jul 12 00:22:57 2018 -0400
+
+    Update README-Porting after beginning to port Rhythmbox's DAAP plugin
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit d87acec0e38511633196050382052116484065e8
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Wed Jul 11 20:16:01 2018 -0400
+
+    Fix typo
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 5fb9af6f969c5269bc8284b60cc577e916f6c631
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Thu Jul 5 15:24:31 2018 -0400
+
+    Add some assertions to ensure use of GError correct
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 18828c7a0e1b3f6953c965b8d0d7dad064bee4af
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sat Jun 30 14:11:43 2018 -0400
+
+    Clean up dmap_control_share_start_lookup() and dmap_control_share_stop_lookup()
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 9280988c27a7aee9e7e418322cc9462f5a4129b9
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sat Jun 30 13:50:33 2018 -0400
+
+    Update documentation of dmap_record_factory_create() and dmap_share_serve()
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 419db19757139cb76effec9189a61a5ca43b3fdd
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sat Jun 30 13:31:53 2018 -0400
+
+    Remove unused _strsplit_using_quotes()
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 828d325307a134cc7357f56bf8e55f1f545acb27
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sat Jun 30 13:31:12 2018 -0400
+
+    Tighten a string size
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 367aea07f762cef738666aa286ffd4d5289d9415
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sat Jun 30 13:25:55 2018 -0400
+
+    Fix build
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 88e7aa01250bd9f5d1b02da4eec1e7e92cf9479e
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sun Jun 24 17:14:04 2018 -0400
+
+    Adjust use of functions which might set GError *
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit fdffef6bb716fd42ae1d5bbe18967f858c07fedc
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sun Jun 24 16:34:05 2018 -0400
+
+    Add documentation of authenticate and error callbacks
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit cf9e8aa752c065c9df8f73da9126ac5cc9244a9a
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sat Jun 9 19:53:49 2018 -0400
+
+    Add error signal to share; emit on error in main loop
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 8981fab88347fcb74f17a7ee6eaf4daf103f5958
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sat Jun 9 19:52:27 2018 -0400
+
+    Fix use of g_signal_emit_by_name
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 3ede37dd83895de7341c1ac9174eec3ef07e6c4b
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sat Jun 9 15:43:02 2018 -0400
+
+    Add error signal to connection; emit on error in main loop
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 534cba21cc72cfe5bc3665d558dd1cd93bc38127
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Tue Apr 24 22:03:57 2018 -0400
+
+    Fix pedansee warnings in dmap-mdns-browser-avahi.c and dmap-mdns-publisher-avahi.c
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 8e940fcd4a41565bde27112b71adfbfdf583d8a4
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Mon Apr 23 00:42:57 2018 -0400
+
+    Fix pedansee warnings in dmap-mdns-avahi.c
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit e2bf0974b21989de262cc0d134299d6cb4d7b8d8
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sun Mar 25 19:36:41 2018 -0400
+
+    Adjust README-Porting for increased use of GError
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 8abdf2187f9278ca750f63228eed1e96228ea8e6
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sun Mar 25 19:18:48 2018 -0400
+
+    Adjust documentation for increased use of GError
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit d756418dd3e9d829352228e1bf411541b0627a35
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sun Mar 25 18:57:15 2018 -0400
+
+    Adjust a number of methods to take a GError **
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit b8f2f8eb10518ade4dcff0e873684baa351c6109
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sun Mar 25 15:43:57 2018 -0400
+
+    Make use of dmap_connection_authenticate_message from tests
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit af19bf974cfaf6dbf9b399cd9cb37f314c13a98c
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sun Mar 25 15:37:42 2018 -0400
+
+    Move dmap_connection_setup to private header and clean up dmap-connection.{c,h}
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 84aeadebd77d656f368e268bc657a92a75e6b0ac
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sun Mar 25 15:27:02 2018 -0400
+
+    More work on documentation
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 460e46da777041f31f97aa23d8599679e72d7e5e
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sun Mar 25 09:55:14 2018 -0400
+
+    Adjust whitespace
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 5bce13ba8cbdea762cdb7dfd762672d52b66693d
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sun Mar 25 00:12:14 2018 -0400
+
+    Add missing return type in documentation's connected_cb example
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit bf83aaf159c217f88fbca632938e480bd923144a
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sun Mar 25 00:07:41 2018 -0400
+
+    Make sample code in documentation wider for web display
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 3e10964205128643ebf7e26a01f0156496a0bba8
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sun Mar 25 00:05:16 2018 -0400
+
+    Return of object tree to documentation
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit bb7ff5b6f0391e2e003096a8a9524f74b66e56be
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sat Mar 24 23:13:23 2018 -0400
+
+    Play with struct/enum declaration whitespace to appease gtk-doc
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit a956e01d8bd9a34e26ef4d6fa2e2c15d938e23db
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sat Mar 24 22:32:23 2018 -0400
+
+    Document DmapConnectionState
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 6d67a78c36c0a9ed1d293ea6a1526992e36a2eb4
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Thu Mar 22 14:46:51 2018 -0400
+
+    Update documentation to new API
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit f0eeb29e79348d850119e2cb22342ded12c7f1ba
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Thu Mar 22 14:46:22 2018 -0400
+
+    Implement hash property in test-dmap-image-record.c
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 221542ebe88c4fd3d4421d912df81f6eb2a3b713
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Thu Mar 22 02:32:50 2018 -0400
+
+    Fixes for test code
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit c3dca7a55bd1cca15e88898827faa27aa7d71bbc
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Wed Mar 21 23:14:22 2018 -0400
+
+    Use dashes in properties: revision-number and auth-method
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 1c964bcbea32e0ceea49eaae2732dc44d50d0999
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Wed Mar 21 20:23:46 2018 -0400
+
+    Work through rest of pedansee warnings
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit e50c5976edf25d449da67d810d9411a8162f1e92
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Wed Mar 21 00:09:15 2018 -0400
+
+    Update doc/Makefile.am to remove some more files on distclean
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit fb1d9bae3bcb74489fa32fe14ba77829c8ff5043
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Wed Mar 21 00:00:35 2018 -0400
+
+    Fix signal definitions and other things breaking Vala bindings build
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 34ba55b62cb574b7a93a927adb2f6cebefd42262
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Tue Mar 20 23:20:28 2018 -0400
+
+    Update libdmapsharing-4.0.metadata
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 3a0fb49ce7b2151b81f1d4b36c2e0e6be8d15e80
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Tue Mar 20 22:58:28 2018 -0400
+
+    Work related to Vala binding
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 0b854bbacf47219225bd2d67514cbdccfe5874fc
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Tue Mar 20 22:52:25 2018 -0400
+
+    Another change to libdmapsharing4.spec
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit 8ae6a51e6dfc939961485a5d9b374d081edaeec0
+commit b61351c803ef0fd6b10ea3d6db166ef23630b256
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Wed Jul 8 08:01:40 2020 -0400
+Date:   Tue Mar 20 20:26:06 2018 -0400
 
-    configure.ac: restore SO_VERSION
+    Changes due to pedansee
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit 4cea856b597b2549d26ddb9ac418ec4f8647811c
+commit ded59f4d62d741ed547d3ab5e2e849ce49d77b54
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Tue Jul 7 20:11:50 2020 -0400
+Date:   Tue Mar 20 18:20:08 2018 -0400
 
-    Add mention of m4 directory to configure.ac and Makefile.am
+    Adjust libdmapsharing4.spec following package review
     
-    Closes #44.
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit 1f6530f6275366e94f447d903b79457126eec439
+commit a89bc9eb7733c0624cdb59f3904a5736b312fb53
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Mon Jul 6 00:37:48 2020 -0500
+Date:   Tue Mar 20 00:38:59 2018 -0400
 
-    configure.ac: clean up checks for mDNS library
+    dacplisten.vala: follow API change
     
-    Closes #35.
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit 71a69d232b2f396d024a38ddce8d2f7aef9e4d21
+commit 9f3e702d02b1033ac61ad9e033c7915e65bc7549
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Mon Jul 6 00:16:45 2020 -0500
+Date:   Tue Mar 20 00:37:46 2018 -0400
 
-    Favor avahi over dns_sd
+    Rename some static functions in dmap-image-connection.c
     
-    Closes #35.
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit a1550bd256f4b7e2d474c2202889eeed1df27573
+commit 6cf4986b1b38161c60f701ba16b7bcf1d4555c98
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Mon Jul 6 00:06:31 2020 -0500
+Date:   Mon Mar 19 14:52:44 2018 -0400
 
-    Drop support for ancient Avahi version
+    Changes to dmap-structure.{c,h} due to pedansee
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit 7314703f7315863e199237b9e9d2e1580140aa9c
+commit 002b9ebbaa31ed9a98f14299564a07285ac8df53
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Sun Jul 5 20:59:04 2020 -0500
+Date:   Mon Mar 19 14:27:39 2018 -0400
 
-    Update libdmapsharing.spec
+    Update README-Porting after working with grilo-plugins
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit c3b63a86f5d09c1136b83894bfb56c41a4c20ab7
+commit aeb00da19bbb13f21ffdcbe8772d2fe4a6249a7e
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Sun Jul 5 20:48:53 2020 -0500
+Date:   Sun Mar 18 20:01:21 2018 -0400
 
-    .gitlab-ci.yml: libdmapsharing.spec, not libdmapsharing4.spec for this branch
+    Adjust libdmapsharing4.spec
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit cb7d28326ec1191287a5c2a388111f1a9201f5a7
+commit 4004f6d329e5d8783a91489bf025f4de4d81a405
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Sun Jul 5 20:46:55 2020 -0500
+Date:   Sun Mar 18 19:05:55 2018 -0400
 
-    .gitlab-ci.yml: synchronize with master
+    Bump version number
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit 56531091f2ffe35b531386985651ce427548158d
+commit 1ea45f151926e071398c3c79283e5ecb31d023e6
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Sun Jul 5 20:35:37 2020 -0500
+Date:   Sun Mar 18 19:03:37 2018 -0400
 
-    configure.ac: restore support for silent builds
+    Allow dmap-mdns-browser-dnssd.c to compile; needs more work
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit 4d95e1274e04e3da7d405bdede28db23d042ee59
+commit 435702a6d942f7bb746a35d841da66d0a78a0254
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Sun Jul 5 20:05:18 2020 -0500
+Date:   Sun Mar 18 11:26:17 2018 -0400
 
-    Clean up configure.ac and remove support for howl
+    Update TODO
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit e856041aed50ce8c6662525e20f8f421b8679d1b
+commit c37524471c8ba249c408fe4eefe0a1660e00699f
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Sun Jul 5 16:14:48 2020 -0500
+Date:   Sun Mar 18 11:26:05 2018 -0400
 
-    Fix build failure when GStreamer absent
+    Modify now_playing_artwork() to return gchar *
     
-    Closes #30.
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit 8457fb24fd799ee2e885435d1c35677aecf140cd
+commit 31fee798eb9ba8e0dde6d7fa5e180c581b915d1e
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Sun Jul 5 14:29:06 2020 -0500
+Date:   Sun Mar 11 13:32:52 2018 -0400
 
-    Remove config.h.in from Git
+    Deal with name collisions when sharing given type of service
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit 4ea844eba493531c02696969ac8d840632236f33
+commit 4c1245a09e10f4d24ddbbc219f9779cad3137201
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Sun Jul 5 14:26:50 2020 -0500
+Date:   Tue Mar 6 23:50:32 2018 -0500
 
-    Update config.h.in following use of GLIB_VERSION_*_*
+    Many small changes after running pedansee
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit e75f1561b9dc3556d0ffd0fe8609797903e0e289
+commit fecabc23ddce6be16a707c1542875b962f5df596
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Sat Jul 4 19:20:59 2020 -0500
+Date:   Tue Mar 6 21:04:11 2018 -0500
 
-    Use g_cclosure_marshal_generic rather than generated marshaling routines
+    Many small changes after running pedansee
     
-    Closes #37.
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit 12eb2a246ed365d3dc997d416069a53493ad38ed
+commit 4779c311dbb9a40f4e245f1ad4bf7b2a24de5372
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Sun Jul 5 09:43:04 2020 -0500
+Date:   Fri Mar 2 17:24:30 2018 -0500
 
-    Set required and maximum glib API versions
+    Update TODO
     
-    Closes #25.
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit 96b9a5b8c722eb883a5beadd5306616d9af3bad2
+commit 234d65ac1b21375d9e11ffed5bc327618fc405d5
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Fri Jul 3 14:37:16 2020 -0500
+Date:   Sat Feb 3 21:00:57 2018 -0500
 
-    Fix more warnings after adding --enable-more-warnings configure option
+    Small changes to fix warnings from g-ir-scanner
     
-    Closes #34.
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit e99c2c9966faf3e65ed555b05e4f5385f7b6f73a
+commit 6b4779d006f2fe8c259ad16dac68442408b5a776
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Fri Jul 3 17:12:09 2020 -0500
+Date:   Sat Jan 20 21:09:30 2018 -0500
 
-    .gitlab-ci.yml: build with --enable-more-warnings
+    Fix some compiler warnings
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit 89c0f018a8268c4743b9f6677f894595885ffde0
+commit 9ce2d41ef3cab7eb87410119314ee62646197cf1
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Fri Jul 3 14:40:37 2020 -0500
+Date:   Sat Jan 20 15:27:20 2018 -0500
 
-    .gitignore: ignore compile
+    Adopt single DMAP/Dmap/dmap namespace
     
-    Closes #14.
+    Using DmapX rather than DMAPX is consistent with GTK (e.g.,
+    GtkButton). Getting rid of the DAAP, DACP, and DPAP namespaces eases
+    support for Vala and other languages which prefer one namespace per
+    library. Removed a buch of scripting just which was required to generate
+    introspection descriptions which previously combined several namespaces.
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit 4240943eaee30e8c69b77bcb707e937efce4cbd9
+commit 1cc93edcd80bc24ed9ab074fb53d66fc93b0f166
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Fri Jul 3 11:06:38 2020 -0500
+Date:   Sat Jan 20 10:49:56 2018 -0500
 
-    Fix building without Vala
+    Add unit tests to daap-share.c
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit 108b6fd8477bba73591008a9a432e17625087e13
+commit 3a94b915db8792445f79a833a9b16f9239786d97
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Fri Jul 3 09:46:55 2020 -0500
+Date:   Tue Dec 19 14:32:47 2017 -0500
 
-    .gitignore: better handle more generated files
+    Move definition of DMAP_SHARE_CHUNK_SIZE
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit 654ee271b26204ff71b1ebf48d3a2f36294b10ac
+commit 8dd1e8267221b6f726d8a80a4fed828bd2d9c5d9
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Fri Jul 3 09:43:12 2020 -0500
+Date:   Thu Dec 7 23:40:18 2017 -0500
 
-    .gitignore: more adjustments
+    More tests for daap-share.c
     
-    Closes 14.
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit 1ac3b82a1149f24305bbde2b7292d508b6527ce6
+commit 4723d7b369f295470ab55cca63272c2a23885ddc
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Fri Jul 3 09:19:20 2020 -0500
+Date:   Wed Dec 6 22:11:37 2017 -0500
 
-    Fix GCC warnings with Avahi backend enabled
+    Add notes about g_object_{get,set} to README-Porting
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit c79350d96410e75c83921c62fd4296aa5c0c35fd
+commit afc561fcff0df1d24aa86c15f709d1c62e2880eb
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Fri Jul 3 09:07:43 2020 -0500
+Date:   Tue Dec 5 23:16:57 2017 -0500
 
-    Fix a number of GCC warnings
+    Update Vala-generate source files
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit 67842a5f5ffa420aed045b70727ec09f08a3b4a7
+commit a6253e11f8406acb3f1a4410e24552f094aa7bb1
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Thu Jul 2 18:45:11 2020 -0500
+Date:   Tue Dec 5 23:15:55 2017 -0500
 
-    .gitlab-ci.yml: build with --disable-tests, as tests fail -Werror
+    Add first unit test to daap-share.c
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit 6722ba079b7a798bcf157cc732770ee24cd742dd
+commit a9940b7e50a51c252b76211f35da162cb915fd4d
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Thu Jul 2 18:13:05 2020 -0500
+Date:   Mon Dec 4 23:14:17 2017 -0500
 
-    Update .gitignore and \"make clean\" targets
+    Handle DMAP_TYPE_INVALID case statement which did not
     
-    Closes #14.
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit 93a926f484409bbe49dc020c6afa9099ffec7183
+commit 17cb26af8492b1d2faa4f24f70b461d8e4e6c263
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Thu Jul 2 17:50:42 2020 -0500
+Date:   Mon Dec 4 23:06:17 2017 -0500
 
-    .gitlab-ci.yml: use -Werror and build for both Avahi and dns_sd
+    Add unit tests for DAAPRecord
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit 0ffbb3447bd6ba9eff30379083f1a028337dfafb
+commit 7b97dbb4703639d1fc9d2eb9ea4576669508b013
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Thu Jul 2 16:19:10 2020 -0500
+Date:   Mon Dec 4 22:55:04 2017 -0500
 
-    Address compiler warnings in dns_sd code
+    Handle invalid content codes in dmap_content_code_dmap_type
     
-    Closes #28.
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit 8502d88f13032a589644fd9b2edebed5ca26379c
+commit c062a378fb62b80f471e7762d118ed87741e88d8
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Tue Jun 30 21:52:28 2020 -0500
+Date:   Sun Nov 26 20:31:26 2017 -0500
 
-    .gitlab-ci.yml: add Avahi daemon for unit tests
+    Add unit test for daap_record_cmp_by_album
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit c968b099315a82f387bcf36c2883a93a5c72b77a
+commit 86eaa5939a627cff57b5821b874b1acba3ad1c8b
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Tue Jun 30 21:24:30 2020 -0500
+Date:   Sun Nov 26 18:40:05 2017 -0500
 
-    tests/Makefile.am: add $(CHECK_LIBS) to unit_test_LDADD
+    Add some braces to daap-record.c
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit 07a807a7567ce62b0f8b3ab337d1056f847edbdf
+commit fe886217d6bd80061021179ca4c80cff3e61efde
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Tue Jun 30 20:45:31 2020 -0500
+Date:   Sun Nov 19 17:12:37 2017 -0500
 
-    .gitlab-ci.yml: really fix GTK2 package
+    Rename libdmapsharing-3.2.vapi to libdmapsharing-4.0.vapi
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit ba123c1b344f12fff7875e2ff6ff1398551e1671
+commit c75d89e769ecca957e3ec019c022e8c14ee30932
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Tue Jun 30 20:43:59 2020 -0500
+Date:   Sun Nov 19 12:58:32 2017 -0500
 
-    .gitlab-ci.yml: fix GTK2 package
+    Move version to 3.9/4.0
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit 1469d8fb115997bdf1748c83f17ca7fbb871dddc
+commit 41bf9abef62ee3b60922d1a4b999b9e33e6897da
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Tue Jun 30 20:39:29 2020 -0500
+Date:   Sat Nov 18 17:34:38 2017 -0500
 
-    .gitlab-ci.yml: install GTK2, not GTK3 for this branch
+    Fix some memory bugs
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit 9357d22bb6ea0a9833ff3990ce42cc0a9d374533
+commit bac157b8f503c086ec6eec9a644f457fdb9b64a9
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Tue Jun 30 20:16:13 2020 -0500
+Date:   Thu Nov 16 20:31:18 2017 -0500
 
-    Avoid ck_assert_ptr_null(); CI hosts have old version of check
+    Always call parent's dispose/finalize methods
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit a9f8483664498c619855a84b7f829254801f6300
+commit 0e2077b2f811b125f5dfacce8c70ebf2a99596b7
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Tue Jun 30 20:12:56 2020 -0500
+Date:   Thu Nov 16 17:25:06 2017 -0500
 
-    .gitlab-ci.yml: fix at eoan to get i386
+    Clean up code related to dynamically-allocated properties
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit edf0a322a64b6a62e3dbb97d8d374b47ad0d2d65
+commit 74b9c5f21254ea46fba3d98e9b43f371b779e1e2
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Tue Jun 30 20:06:20 2020 -0500
+Date:   Wed Nov 15 02:26:21 2017 -0500
 
-    .gitlab-ci.yml: use groovy to get newer check
+    Fix more thumbnail-related code
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit 379b09cba9723d6ec6314804f7696d3749a6d2da
+commit 38b4c1daa03d6190221a4a6b8bacd4801cb60c6a
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Tue Jun 30 19:44:11 2020 -0500
+Date:   Wed Nov 15 00:17:26 2017 -0500
 
-    Fix a warning about ignoring fgets' return value
+    More adjustments related to API change
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit d12dc31aacf52959627d7bfa4b2f1987e8910411
+commit acee558c79ea691d58a5a204b930e2ce81b65801
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Tue Jun 30 19:29:24 2020 -0500
+Date:   Mon Nov 13 13:45:13 2017 -0500
 
-    Make use of G_GSSIZE_FORMAT
+    Add Porting guide
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit 7c7998ad69e9b3b30a62d50aeaef6d5f3244575f
+commit 1973bfe8d1e0139e20488343552185a211f68381
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Tue Jun 30 18:59:38 2020 -0500
+Date:   Mon Nov 13 13:44:42 2017 -0500
 
-    .gitlab-ci.yml: install libavahi-client-dev
+    Change {DAAP,DPAP}Record's hash and thumbnail properties into a boxed type
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit 5ff47ad0c40d4fc4fad2804091279e2dcc87c6ac
+commit 081c2b29189ff3d78cb1cb3ff94715bd59a4f8c7
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Tue Jun 30 18:50:29 2020 -0500
+Date:   Mon Nov 13 09:32:23 2017 -0500
 
-    .gitlab-ci.yml: make use of autogen.sh and install required packages
+    Fix handling of mediakind property in testpython.py
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit 5ab8c128773d4cee06392ea9cdd89d40ce5dd6f6
+commit 1c44afe9928b1709a56564abbdda879a98fca613
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Tue Jun 30 18:44:22 2020 -0500
+Date:   Sun Nov 12 20:54:32 2017 -0500
 
-    .gitlab-ci.yml: select 32-bit image and set DEBIAN_FRONTEND=noninteractive
+    Add support for G_DEFINE_INTERFACE to check target in libdmapsharing/Makefile.am
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit b17a8247fa52d334e3f6e4c00e01c5853cef0807
+commit 5f7c58b4a1df26e7ff9bca0ad4b9964fea30ced9
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Tue Jun 30 18:27:28 2020 -0500
+Date:   Sun Nov 12 20:28:27 2017 -0500
 
-    Start to configure CI
+    Add missing properties to TestDAAPRecord
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit 01c83785e81d248110de6d476b8835b757f99ec9
+commit c53773ab3040b536d4cb30532f6f9d4c2e6f3714
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Tue Jun 30 16:32:24 2020 -0500
+Date:   Sun Nov 12 19:58:01 2017 -0500
 
-    Bump version number
+    Remove an unused variable
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit a98a90241e4aace55788027f56b6916f655311c1
+commit c00711a0115f8e9fe38bdc378d758fe0ab3c96c3
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Tue Jun 30 16:12:27 2020 -0500
+Date:   Sun Nov 12 19:56:49 2017 -0500
 
-    configure.ac: clean up some messaging
+    Fix Vala after moving from Iface to Interface due to use of G_DEFINE_INTERFACE
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit 29d3c18a1b3c68a7876e1982d7c6e684846e8961
+commit 3c53a0fc0d5ca8b8648dc9df5b9f995e9158f7f0
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Tue Jun 30 15:55:32 2020 -0500
+Date:   Sun Nov 12 18:31:08 2017 -0500
 
-    Require glib-2.0 2.40+
+    Use G_DEFINE_INTERFACE
     
-    Closes #25.
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit a68aa9cda17863589e58201a106b11712b3adfc7
+commit 49e3880dffe33b714c08c41f55e5702f45d2bc82
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Tue Jun 30 15:01:46 2020 -0400
+Date:   Sun Nov 12 18:29:57 2017 -0500
 
-    Update vala/*/libdmapsharing-3.0-uninstalled.excludes to suit --disable-tests
+    Fix two compiler warnings
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit 895205fecdb99b6b9f8065213b50e8f99a070852
+commit 7834aca976a0e16dc3ccf1208c65eb17163d3e24
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Tue Jun 30 14:46:49 2020 -0400
+Date:   Sun Nov 12 18:07:06 2017 -0500
 
-    Backport form 4.0 series: fix some autotools warnings
+    Remove commented-out lines from testpython.py
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit 332c8f0b88ee583c5bbb77778b7a597fe0f85854
+commit 9bc1688d872bf003b233b07895a03b80e289ae09
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Tue Jun 30 07:35:13 2020 -0500
+Date:   Sat Nov 11 20:03:55 2017 -0500
 
-    Backport from 4.0 series: adjust how building tests works
+    Modify API and create test-dmap-server-python
     
-    Previously, the presence of the check library led to libdmapsharing
-    building its unit tests and supporting facilities, despite the separate
-    configure flag --disable-tests. This led to confusion as to whether some
-    test facilities should be present in the compiled libdmapsharing. Now,
-    --disable-tests disables all tests, whether unit tests or sample programs,
-    and it ensure not test facilities exist in libdmapsharing.
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 04011c82d706a925cb22eab61b35448182f6574b
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sat Nov 11 14:16:42 2017 -0500
+
+    Update RPM specification to build 3.1 series
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit 9aaed0a037ee6a6f4f7536fd8dbdf1fa846cd450
+commit b8380431f827c3aedf0b7bbf4654508b06f0d314
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Tue Jun 30 14:19:15 2020 -0400
+Date:   Sat Nov 11 14:16:36 2017 -0500
 
-    Small changes to fix Vala build
+    libdmapsharing/Makefile.am: add dependency on DMAP-3.2.gir to DAAP-3.2.gir
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit 00cf08da2f973f1279393d0a5e21cc4418400878
+commit fa0e18b8e989e6c0086314bd7c3e4dfa89ef19fb
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Tue Jun 30 13:58:58 2020 -0400
+Date:   Sat Nov 11 13:51:42 2017 -0500
 
-    Fix size of array to match received string
+    Work on Python test client
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit 097f3dad98c11f7687eb798cd5987ec9be4afa60
+commit ff8539942410f427168227c86a651cbed7d3db99
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Tue Jun 30 13:55:41 2020 -0400
+Date:   Sat Nov 11 08:23:38 2017 -0500
 
-    Fix some compiler warnings
+    Port test-dmap-client-python to Python 3
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
-commit 5e9ac3a6f2e23059de79b4358ceb756e556dc073
+commit 5ff26427cd4f45685d630496db45193c13303355
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Tue Jun 30 13:38:39 2020 -0400
+Date:   Sat Nov 11 08:22:28 2017 -0500
 
-    Backport from 4.0 series: replace use of deprecated G_TYPE_INSTANCE_GET_PRIVATE
+    Apply standard whitespace rules to test-dmap-client-python
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit f3b1047f6d46bf43900dcedb0f947bf7dc50774b
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Fri Nov 10 22:13:13 2017 -0500
 
-commit a825146809f5acc8e444184fac8b1d31ffd7ad36
+    Update documentation to 3.2
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 7baf2b9afdd1acc4f12b6ce27c8ce43ce759b575
+Merge: 0fa30fa 9730159
 Author: W. Michael Petullo <mike@flyn.org>
-Date:   Tue Jun 30 11:52:49 2020 -0400
+Date:   Fri Nov 10 21:52:25 2017 -0500
 
-    Backport from 4.0 series: replace use of deprecated G_CONST_RETURN
+    Merge branch 'gobject-introspection'
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
 commit 0fa30fab6e06efbb826128f81fa1272ae6daa080
 Author: W. Michael Petullo <mike@flyn.org>
@@ -936,6 +2649,23 @@ Date:   Tue Aug 5 15:21:45 2014 -0400
     
     Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
+commit 97301599fde35f51d22bcf5169673d1dff30cadf
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Tue Aug 5 15:17:38 2014 -0400
+
+    Fix mismatched DMAPMetaDataMap struct typedef
+    
+    A mismatched struct typedef in dmap-share.h confuses GObject introspection
+    into producing an error when the original struct is defined. The typedef
+    of DMAPMetaDataMap asks for struct _DMAPMetaDataMap, but the actual
+    struct definition says struct DMAPMetaDataMap. gir will complain about
+    namespace conflicts and abort a jhbuild build as a result.
+    
+    Thanks to Pietro Gagliardi and gregier in irc.gimp.net/#gtk+ who helped
+    Pietro.
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
 commit dc2f29bb515334cdeb921ddf680163357816a15c
 Author: W. Michael Petullo <mike@flyn.org>
 Date:   Tue Aug 5 15:17:38 2014 -0400
@@ -953,6 +2683,94 @@ Date:   Tue Aug 5 15:17:38 2014 -0400
     
     Signed-off-by: W. Michael Petullo <mike@flyn.org>
 
+commit 7d75ba6f85e889eb65b1756fda6d47326b66f897
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Wed Jun 25 23:16:46 2014 -0400
+
+    Remove comment about DAAP_TYPE_SIMPLE_RECORD_FACTORY from test-dmap-client-python
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit d0b3fc060032e20793061131aeea9f4d95baced8
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Wed Jun 25 23:14:18 2014 -0400
+
+    Finished fixing test-dmap-client printing of DPAP records
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 76c95e6e724c928a6438c21f23d60c63a3a6941a
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Wed Jun 25 23:05:01 2014 -0400
+
+    Some work on test-dmap-client
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 439e794ab6bea8d0e691743528ee18c698bdbdea
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Wed Jun 25 22:15:09 2014 -0400
+
+    More cleaning introspectable code; tests all compile
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit ad995ac382f0a5ea224b37a67fdc9500a09f502a
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Wed Jun 25 18:00:23 2014 -0400
+
+    Get rid of "simple" implementations of DAAPRecord and DAAPRecordFactory
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit ed5c6b905e34f6dadcdf906a28964424e6a3e369
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Wed Jun 25 17:38:49 2014 -0400
+
+    Git add daap-*-simple.{c,h}; I hope to remove them again later
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 6af36d3152fad012df00fb6015133ed46bec5eff
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Wed Jun 25 17:25:58 2014 -0400
+
+    Work in progress: can now browse DAAP shares with GObject introspection and Python
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit fcdb5c803da6554fd3c560a8a7bc227f8f664341
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Tue Jun 24 00:30:55 2014 -0400
+
+    Move some code to new DMAPMdnsService class
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit f91f9c270addb3d991c119a2d1daa7e9a4b2ee75
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Mon Jun 23 21:07:27 2014 -0400
+
+    Fix another comment in dmap-mdns-browser.h
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit d296d1bb99eb00d0ec7b53212a995484d234853d
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Mon Jun 23 21:06:08 2014 -0400
+
+    Fix comment in dmap-mdns-browser.h
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+commit 28e77f2c06061647ddcf6dfc5f556b28754eb117
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Sun Jun 22 22:10:00 2014 -0400
+
+    Build both DMAP and DAAP .gir/.typelib
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
 commit c2bf5a60486cb5bc33f47ed5df708ad24d0d5c15
 Author: W. Michael Petullo <mike@flyn.org>
 Date:   Tue May 27 16:18:11 2014 -0400
diff --git a/Makefile.in b/Makefile.in
index 6eb75cd..d1c70a9 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -104,11 +104,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = config.h
 CONFIG_CLEAN_FILES = libdmapsharing-${API_VERSION}-uninstalled.pc \
-	libdmapsharing-${API_VERSION}.pc \
-	vala/libdmapsharing-${API_VERSION}-daap/libdmapsharing-${API_VERSION}-uninstalled.files \
-	vala/libdmapsharing-${API_VERSION}-dacp/libdmapsharing-${API_VERSION}-uninstalled.files \
-	vala/libdmapsharing-${API_VERSION}-dmap/libdmapsharing-${API_VERSION}-uninstalled.files \
-	vala/libdmapsharing-${API_VERSION}-dpap/libdmapsharing-${API_VERSION}-uninstalled.files
+	libdmapsharing-${API_VERSION}.pc
 CONFIG_CLEAN_VPATH_FILES =
 AM_V_P = $(am__v_P_@AM_V@)
 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
@@ -174,8 +170,8 @@ am__recursive_targets = \
   $(am__extra_recursive_targets)
 AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
 	cscope distdir distdir-am dist dist-all distcheck
-am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
-	$(LISP)config.h.in
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \
+	config.h.in
 # Read a list of newline-separated strings from the standard input,
 # and print each of them once, without duplicates.  Input order is
 # *not* preserved.
@@ -192,18 +188,11 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
-CSCOPE = cscope
 am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
 	$(srcdir)/libdmapsharing-${API_VERSION}-uninstalled.pc.in \
-	$(srcdir)/libdmapsharing-${API_VERSION}.pc.in \
-	$(top_srcdir)/vala/libdmapsharing-${API_VERSION}-daap/libdmapsharing-${API_VERSION}-uninstalled.files.in \
-	$(top_srcdir)/vala/libdmapsharing-${API_VERSION}-dacp/libdmapsharing-${API_VERSION}-uninstalled.files.in \
-	$(top_srcdir)/vala/libdmapsharing-${API_VERSION}-dmap/libdmapsharing-${API_VERSION}-uninstalled.files.in \
-	$(top_srcdir)/vala/libdmapsharing-${API_VERSION}-dpap/libdmapsharing-${API_VERSION}-uninstalled.files.in \
-	AUTHORS COPYING ChangeLog INSTALL NEWS README TODO compile \
-	config.guess config.sub install-sh ltmain.sh missing
+	$(srcdir)/libdmapsharing-${API_VERSION}.pc.in AUTHORS COPYING \
+	ChangeLog INSTALL NEWS README TODO compile config.guess \
+	config.sub install-sh ltmain.sh missing
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
@@ -242,6 +231,8 @@ am__relativize = \
 DIST_ARCHIVES = $(distdir).tar.gz
 GZIP_ENV = --best
 DIST_TARGETS = dist-gzip
+# Exists only to be overridden by the user if desired.
+AM_DISTCHECK_DVI_TARGET = dvi
 distuninstallcheck_listfiles = find . -type f -print
 am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
   | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
@@ -264,6 +255,8 @@ CHECK_CFLAGS = @CHECK_CFLAGS@
 CHECK_LIBS = @CHECK_LIBS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
@@ -275,8 +268,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@
 GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@
 GEE_CFLAGS = @GEE_CFLAGS@
@@ -403,6 +398,7 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -480,14 +476,6 @@ libdmapsharing-${API_VERSION}-uninstalled.pc: $(top_builddir)/config.status $(sr
 	cd $(top_builddir) && $(SHELL) ./config.status $@
 libdmapsharing-${API_VERSION}.pc: $(top_builddir)/config.status $(srcdir)/libdmapsharing-${API_VERSION}.pc.in
 	cd $(top_builddir) && $(SHELL) ./config.status $@
-vala/libdmapsharing-${API_VERSION}-daap/libdmapsharing-${API_VERSION}-uninstalled.files: $(top_builddir)/config.status $(top_srcdir)/vala/libdmapsharing-${API_VERSION}-daap/libdmapsharing-${API_VERSION}-uninstalled.files.in
-	cd $(top_builddir) && $(SHELL) ./config.status $@
-vala/libdmapsharing-${API_VERSION}-dacp/libdmapsharing-${API_VERSION}-uninstalled.files: $(top_builddir)/config.status $(top_srcdir)/vala/libdmapsharing-${API_VERSION}-dacp/libdmapsharing-${API_VERSION}-uninstalled.files.in
-	cd $(top_builddir) && $(SHELL) ./config.status $@
-vala/libdmapsharing-${API_VERSION}-dmap/libdmapsharing-${API_VERSION}-uninstalled.files: $(top_builddir)/config.status $(top_srcdir)/vala/libdmapsharing-${API_VERSION}-dmap/libdmapsharing-${API_VERSION}-uninstalled.files.in
-	cd $(top_builddir) && $(SHELL) ./config.status $@
-vala/libdmapsharing-${API_VERSION}-dpap/libdmapsharing-${API_VERSION}-uninstalled.files: $(top_builddir)/config.status $(top_srcdir)/vala/libdmapsharing-${API_VERSION}-dpap/libdmapsharing-${API_VERSION}-uninstalled.files.in
-	cd $(top_builddir) && $(SHELL) ./config.status $@
 
 mostlyclean-libtool:
 	-rm -f *.lo
@@ -624,7 +612,6 @@ cscopelist-am: $(am__tagged_files)
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 	-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
@@ -708,6 +695,10 @@ dist-xz: distdir
 	tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
 	$(am__post_remove_distdir)
 
+dist-zstd: distdir
+	tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst
+	$(am__post_remove_distdir)
+
 dist-tarZ: distdir
 	@echo WARNING: "Support for distribution archives compressed with" \
 		       "legacy program 'compress' is deprecated." >&2
@@ -750,6 +741,8 @@ distcheck: dist
 	  eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
 	*.zip*) \
 	  unzip $(distdir).zip ;;\
+	*.tar.zst*) \
+	  zstd -dc $(distdir).tar.zst | $(am__untar) ;;\
 	esac
 	chmod -R a-w $(distdir)
 	chmod u+w $(distdir)
@@ -765,7 +758,7 @@ distcheck: dist
 	    $(DISTCHECK_CONFIGURE_FLAGS) \
 	    --srcdir=../.. --prefix="$$dc_install_base" \
 	  && $(MAKE) $(AM_MAKEFLAGS) \
-	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
+	  && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \
 	  && $(MAKE) $(AM_MAKEFLAGS) check \
 	  && $(MAKE) $(AM_MAKEFLAGS) install \
 	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
@@ -930,18 +923,19 @@ uninstall-am: uninstall-pkgconfigDATA
 	am--refresh check check-am clean clean-cscope clean-generic \
 	clean-libtool cscope cscopelist-am ctags ctags-am dist \
 	dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \
-	dist-xz dist-zip distcheck distclean distclean-generic \
-	distclean-hdr distclean-libtool distclean-tags distcleancheck \
-	distdir distuninstallcheck dvi dvi-am html html-am info \
-	info-am install install-am install-data install-data-am \
-	install-dvi install-dvi-am install-exec install-exec-am \
-	install-html install-html-am install-info install-info-am \
-	install-man install-pdf install-pdf-am install-pkgconfigDATA \
-	install-ps install-ps-am install-strip installcheck \
-	installcheck-am installdirs installdirs-am maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-generic \
-	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
-	uninstall-am uninstall-pkgconfigDATA
+	dist-xz dist-zip dist-zstd distcheck distclean \
+	distclean-generic distclean-hdr distclean-libtool \
+	distclean-tags distcleancheck distdir distuninstallcheck dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-man install-pdf \
+	install-pdf-am install-pkgconfigDATA install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	installdirs-am maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+	ps ps-am tags tags-am uninstall uninstall-am \
+	uninstall-pkgconfigDATA
 
 .PRECIOUS: Makefile
 
diff --git a/TODO b/TODO
index 1b35a98..421262e 100644
--- a/TODO
+++ b/TODO
@@ -1,5 +1,12 @@
 = Short term ===================================================================
 
+Port to libsoup3.
+	See https://libsoup.org/libsoup-3.0/migrating-from-libsoup-2.html.
+
+	Clean up memory leak.
+
+See notes about test-* in libdmapsharing/Makefile.am.
+
 GNOME Bugs:
 	344616: support database updates
 	686220: play nicely with firewalld
@@ -31,11 +38,6 @@ daap_record_read, unless I change API (see also dmapd.c)
 
 = Long term ====================================================================
 
-API Changes:
-	now_playing_artwork seems to return a filename, so should return a gchar *, not guchar *?
-	Stuff related to Python introspection
-	Allow single client to more easily make use of both DAAP and DPAP (embed type in browser service?)
-
 Mike: Audit remaining GSoC patch:
 --- dmap-db.c
 --- dmap-share.c
diff --git a/aclocal.m4 b/aclocal.m4
index 92a867f..0a71e95 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.16.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.16.5 -*- Autoconf -*-
 
-# Copyright (C) 1996-2018 Free Software Foundation, Inc.
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,8 +14,8 @@
 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
-[m4_warning([this file was generated for autoconf 2.69.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
+[m4_warning([this file was generated for autoconf 2.71.
 You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
@@ -364,7 +364,7 @@ AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"],
         [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])])
 ])dnl PKG_HAVE_DEFINE_WITH_MODULES
 
-# Copyright (C) 2002-2018 Free Software Foundation, Inc.
+# Copyright (C) 2002-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -379,7 +379,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
 [am__api_version='1.16'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.16.1], [],
+m4_if([$1], [1.16.5], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -395,14 +395,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.16.1])dnl
+[AM_AUTOMAKE_VERSION([1.16.5])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
-# Copyright (C) 2001-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -454,7 +454,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
 
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997-2018 Free Software Foundation, Inc.
+# Copyright (C) 1997-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -485,7 +485,7 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# Copyright (C) 1999-2018 Free Software Foundation, Inc.
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -676,7 +676,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999-2018 Free Software Foundation, Inc.
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -715,7 +715,9 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
   done
   if test $am_rc -ne 0; then
     AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
-    for automatic dependency tracking.  Try re-running configure with the
+    for automatic dependency tracking.  If GNU make was not used, consider
+    re-running the configure script with MAKE="gmake" (or whatever is
+    necessary).  You can also try re-running configure with the
     '--disable-dependency-tracking' option to at least be able to build
     the package (albeit without support for automatic dependency tracking).])
   fi
@@ -742,7 +744,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
 # Do all the work for Automake.                             -*- Autoconf -*-
 
-# Copyright (C) 1996-2018 Free Software Foundation, Inc.
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -770,6 +772,10 @@ m4_defn([AC_PROG_CC])
 # release and drop the old call support.
 AC_DEFUN([AM_INIT_AUTOMAKE],
 [AC_PREREQ([2.65])dnl
+m4_ifdef([_$0_ALREADY_INIT],
+  [m4_fatal([$0 expanded multiple times
+]m4_defn([_$0_ALREADY_INIT]))],
+  [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl
 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
 dnl the ones we care about.
 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
@@ -806,7 +812,7 @@ m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
 [_AM_SET_OPTIONS([$1])dnl
 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
 m4_if(
-  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
+  m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]),
   [ok:ok],,
   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
@@ -858,6 +864,20 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
 		  [m4_define([AC_PROG_OBJCXX],
 			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
 ])
+# Variables for tags utilities; see am/tags.am
+if test -z "$CTAGS"; then
+  CTAGS=ctags
+fi
+AC_SUBST([CTAGS])
+if test -z "$ETAGS"; then
+  ETAGS=etags
+fi
+AC_SUBST([ETAGS])
+if test -z "$CSCOPE"; then
+  CSCOPE=cscope
+fi
+AC_SUBST([CSCOPE])
+
 AC_REQUIRE([AM_SILENT_RULES])dnl
 dnl The testsuite driver may need to know about EXEEXT, so add the
 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
@@ -939,7 +959,7 @@ for _am_header in $config_headers :; do
 done
 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -960,7 +980,7 @@ if test x"${install_sh+set}" != xset; then
 fi
 AC_SUBST([install_sh])])
 
-# Copyright (C) 2003-2018 Free Software Foundation, Inc.
+# Copyright (C) 2003-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -981,7 +1001,7 @@ AC_SUBST([am__leading_dot])])
 
 # Check to see how 'make' treats includes.	            -*- Autoconf -*-
 
-# Copyright (C) 2001-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1024,7 +1044,7 @@ AC_SUBST([am__quote])])
 
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1997-2018 Free Software Foundation, Inc.
+# Copyright (C) 1997-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1045,12 +1065,7 @@ AC_DEFUN([AM_MISSING_HAS_RUN],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 AC_REQUIRE_AUX_FILE([missing])dnl
 if test x"${MISSING+set}" != xset; then
-  case $am_aux_dir in
-  *\ * | *\	*)
-    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
-  *)
-    MISSING="\${SHELL} $am_aux_dir/missing" ;;
-  esac
+  MISSING="\${SHELL} '$am_aux_dir/missing'"
 fi
 # Use eval to expand $SHELL
 if eval "$MISSING --is-lightweight"; then
@@ -1061,38 +1076,9 @@ else
 fi
 ])
 
-#  -*- Autoconf -*-
-# Obsolete and "removed" macros, that must however still report explicit
-# error messages when used, to smooth transition.
-#
-# Copyright (C) 1996-2018 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([AM_CONFIG_HEADER],
-[AC_DIAGNOSE([obsolete],
-['$0': this macro is obsolete.
-You should use the 'AC][_CONFIG_HEADERS' macro instead.])dnl
-AC_CONFIG_HEADERS($@)])
-
-AC_DEFUN([AM_PROG_CC_STDC],
-[AC_PROG_CC
-am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
-AC_DIAGNOSE([obsolete],
-['$0': this macro is obsolete.
-You should simply use the 'AC][_PROG_CC' macro instead.
-Also, your code should no longer depend upon 'am_cv_prog_cc_stdc',
-but upon 'ac_cv_prog_cc_stdc'.])])
-
-AC_DEFUN([AM_C_PROTOTYPES],
-         [AC_FATAL([automatic de-ANSI-fication support has been removed])])
-AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])
-
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1121,7 +1107,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
 AC_DEFUN([_AM_IF_OPTION],
 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
-# Copyright (C) 1999-2018 Free Software Foundation, Inc.
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1168,7 +1154,7 @@ AC_LANG_POP([C])])
 # For backward compatibility.
 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
 
-# Copyright (C) 2001-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1187,7 +1173,7 @@ AC_DEFUN([AM_RUN_LOG],
 
 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# Copyright (C) 1996-2018 Free Software Foundation, Inc.
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1268,7 +1254,7 @@ AC_CONFIG_COMMANDS_PRE(
 rm -f conftest.file
 ])
 
-# Copyright (C) 2009-2018 Free Software Foundation, Inc.
+# Copyright (C) 2009-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1328,7 +1314,7 @@ AC_SUBST([AM_BACKSLASH])dnl
 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
 ])
 
-# Copyright (C) 2001-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1356,7 +1342,7 @@ fi
 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 2006-2018 Free Software Foundation, Inc.
+# Copyright (C) 2006-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1375,7 +1361,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
 # Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 2004-2018 Free Software Foundation, Inc.
+# Copyright (C) 2004-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1508,29 +1494,31 @@ AC_SUBST([am__untar])
 
 # Autoconf support for the Vala compiler
 
-# Copyright (C) 2008-2018 Free Software Foundation, Inc.
+# Copyright (C) 2008-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# Check whether the Vala compiler exists in $PATH.  If it is found, the
-# variable VALAC is set pointing to its absolute path.  Otherwise, it is
-# simply set to 'valac'.
-# Optionally a minimum release number of the compiler can be requested.
-# If the ACTION-IF-FOUND parameter is given, it will be run if a proper
-# Vala compiler is found.
-# Similarly, if the ACTION-IF-FOUND is given, it will be run if no proper
-# Vala compiler is found.  It defaults to simply print a warning about the
-# situation, but otherwise proceeding with the configuration.
+# Search for a Vala compiler in PATH.  If it is found, the variable VALAC is
+# set to point to it.  Otherwise, it is simply set to 'valac'.  This macro
+# takes three optional arguments.  The first argument, if present, is the
+# minimum version of the Vala API required to compile this package.  For Vala
+# releases, this is the same as the major and minor release number; e.g., when
+# `valac --version' reports 0.48.7, `valac --api-version' reports 0.48.  If a
+# compiler is found and satisfies MINIMUM-VERSION, then ACTION-IF-FOUND is run
+# (this defaults to do nothing).  Otherwise, ACTION-IF-NOT-FOUND is run.  If
+# ACTION-IF-NOT-FOUND is not specified, the default value is to print a
+# warning in case no compiler is found, or if a too-old version of the
+# compiler is found.
 #
 # AM_PROG_VALAC([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 # --------------------------------------------------------------------------
 AC_DEFUN([AM_PROG_VALAC],
   [AC_PATH_PROG([VALAC], [valac], [valac])
    AS_IF([test "$VALAC" != valac && test -n "$1"],
-      [AC_MSG_CHECKING([whether $VALAC is at least version $1])
-       am__vala_version=`$VALAC --version | sed 's/Vala  *//'`
+      [AC_MSG_CHECKING([whether $VALAC supports at least API version $1])
+       am__vala_version=`$VALAC --api-version`
        AS_VERSION_COMPARE([$1], ["$am__vala_version"],
          [AC_MSG_RESULT([yes])],
          [AC_MSG_RESULT([yes])],
@@ -1538,8 +1526,8 @@ AC_DEFUN([AM_PROG_VALAC],
           VALAC=valac])])
     if test "$VALAC" = valac; then
       m4_default([$3],
-        [AC_MSG_WARN([no proper vala compiler found])
-         AC_MSG_WARN([you will not be able to compile vala source files])])
+        [AC_MSG_WARN([Vala compiler not found or too old])
+         AC_MSG_WARN([you will not be able to compile Vala source files])])
     else
       m4_default([$2], [:])
     fi])
diff --git a/compile b/compile
index 99e5052..df363c8 100755
--- a/compile
+++ b/compile
@@ -3,7 +3,7 @@
 
 scriptversion=2018-03-07.03; # UTC
 
-# Copyright (C) 1999-2018 Free Software Foundation, Inc.
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
 # Written by Tom Tromey <tromey@cygnus.com>.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -53,7 +53,7 @@ func_file_conv ()
 	  MINGW*)
 	    file_conv=mingw
 	    ;;
-	  CYGWIN*)
+	  CYGWIN* | MSYS*)
 	    file_conv=cygwin
 	    ;;
 	  *)
@@ -67,7 +67,7 @@ func_file_conv ()
 	mingw/*)
 	  file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
 	  ;;
-	cygwin/*)
+	cygwin/* | msys/*)
 	  file=`cygpath -m "$file" || echo "$file"`
 	  ;;
 	wine/*)
diff --git a/config.guess b/config.guess
index b33c9e8..c7f17e8 100755
--- a/config.guess
+++ b/config.guess
@@ -1,12 +1,14 @@
-#! /bin/sh
+#!/usr/bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright 1992-2018 Free Software Foundation, Inc.
+#   Copyright 1992-2022 Free Software Foundation, Inc.
 
-timestamp='2018-08-29'
+# shellcheck disable=SC2006,SC2268 # see below for rationale
+
+timestamp='2022-05-25'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
+# the Free Software Foundation, either version 3 of the License, or
 # (at your option) any later version.
 #
 # This program is distributed in the hope that it will be useful, but
@@ -27,11 +29,19 @@ timestamp='2018-08-29'
 # Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
 #
 # You can get the latest version of this script from:
-# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
 #
 # Please send patches to <config-patches@gnu.org>.
 
 
+# The "shellcheck disable" line above the timestamp inhibits complaints
+# about features and limitations of the classic Bourne shell that were
+# superseded or lifted in POSIX.  However, this script identifies a wide
+# variety of pre-POSIX systems that do not have POSIX shells at all, and
+# even some reasonably current systems (Solaris 10 as case-in-point) still
+# have a pre-POSIX /bin/sh.
+
+
 me=`echo "$0" | sed -e 's,.*/,,'`
 
 usage="\
@@ -50,7 +60,7 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright 1992-2018 Free Software Foundation, Inc.
+Copyright 1992-2022 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -84,6 +94,9 @@ if test $# != 0; then
   exit 1
 fi
 
+# Just in case it came from the environment.
+GUESS=
+
 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
 # compiler to aid in system detection is discouraged as it requires
 # temporary files to be created and, as you can see below, it is a
@@ -96,12 +109,13 @@ fi
 
 tmp=
 # shellcheck disable=SC2172
-trap 'test -z "$tmp" || rm -fr "$tmp"' 1 2 13 15
-trap 'exitcode=$?; test -z "$tmp" || rm -fr "$tmp"; exit $exitcode' 0
+trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
 
 set_cc_for_build() {
+    # prevent multiple calls if $tmp is already set
+    test "$tmp" && return 0
     : "${TMPDIR=/tmp}"
-    # shellcheck disable=SC2039
+    # shellcheck disable=SC2039,SC3028
     { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
 	{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
 	{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
@@ -111,7 +125,7 @@ set_cc_for_build() {
 	,,)    echo "int x;" > "$dummy.c"
 	       for driver in cc gcc c89 c99 ; do
 		   if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
-		       CC_FOR_BUILD="$driver"
+		       CC_FOR_BUILD=$driver
 		       break
 		   fi
 	       done
@@ -132,14 +146,12 @@ fi
 
 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
 
-case "$UNAME_SYSTEM" in
+case $UNAME_SYSTEM in
 Linux|GNU|GNU/*)
-	# If the system lacks a compiler, then just pick glibc.
-	# We could probably try harder.
-	LIBC=gnu
+	LIBC=unknown
 
 	set_cc_for_build
 	cat <<-EOF > "$dummy.c"
@@ -148,24 +160,37 @@ Linux|GNU|GNU/*)
 	LIBC=uclibc
 	#elif defined(__dietlibc__)
 	LIBC=dietlibc
-	#else
+	#elif defined(__GLIBC__)
 	LIBC=gnu
+	#else
+	#include <stdarg.h>
+	/* First heuristic to detect musl libc.  */
+	#ifdef __DEFINED_va_list
+	LIBC=musl
+	#endif
 	#endif
 	EOF
-	eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
+	cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+	eval "$cc_set_libc"
 
-	# If ldd exists, use it to detect musl libc.
-	if command -v ldd >/dev/null && \
-		ldd --version 2>&1 | grep -q ^musl
-	then
-	    LIBC=musl
+	# Second heuristic to detect musl libc.
+	if [ "$LIBC" = unknown ] &&
+	   command -v ldd >/dev/null &&
+	   ldd --version 2>&1 | grep -q ^musl; then
+		LIBC=musl
+	fi
+
+	# If the system lacks a compiler, then just pick glibc.
+	# We could probably try harder.
+	if [ "$LIBC" = unknown ]; then
+		LIBC=gnu
 	fi
 	;;
 esac
 
 # Note: order is significant - the case branches are not exclusive.
 
-case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
+case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
     *:NetBSD:*:*)
 	# NetBSD (nbsd) targets should (where applicable) match one or
 	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
@@ -177,12 +202,12 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
 	#
 	# Note: NetBSD doesn't particularly care about the vendor
 	# portion of the name.  We always set it to "unknown".
-	sysctl="sysctl -n hw.machine_arch"
 	UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
-	    "/sbin/$sysctl" 2>/dev/null || \
-	    "/usr/sbin/$sysctl" 2>/dev/null || \
+	    /sbin/sysctl -n hw.machine_arch 2>/dev/null || \
+	    /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \
 	    echo unknown)`
-	case "$UNAME_MACHINE_ARCH" in
+	case $UNAME_MACHINE_ARCH in
+	    aarch64eb) machine=aarch64_be-unknown ;;
 	    armeb) machine=armeb-unknown ;;
 	    arm*) machine=arm-unknown ;;
 	    sh3el) machine=shl-unknown ;;
@@ -191,13 +216,13 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
 	    earmv*)
 		arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
 		endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
-		machine="${arch}${endian}"-unknown
+		machine=${arch}${endian}-unknown
 		;;
-	    *) machine="$UNAME_MACHINE_ARCH"-unknown ;;
+	    *) machine=$UNAME_MACHINE_ARCH-unknown ;;
 	esac
 	# The Operating System including object format, if it has switched
 	# to ELF recently (or will in the future) and ABI.
-	case "$UNAME_MACHINE_ARCH" in
+	case $UNAME_MACHINE_ARCH in
 	    earm*)
 		os=netbsdelf
 		;;
@@ -218,7 +243,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
 		;;
 	esac
 	# Determine ABI tags.
-	case "$UNAME_MACHINE_ARCH" in
+	case $UNAME_MACHINE_ARCH in
 	    earm*)
 		expr='s/^earmv[0-9]/-eabi/;s/eb$//'
 		abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
@@ -229,7 +254,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
 	# thus, need a distinct triplet. However, they do not need
 	# kernel version information, so it can be replaced with a
 	# suitable tag, in the style of linux-gnu.
-	case "$UNAME_VERSION" in
+	case $UNAME_VERSION in
 	    Debian*)
 		release='-gnu'
 		;;
@@ -240,45 +265,57 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
 	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
 	# contains redundant information, the shorter form:
 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
-	echo "$machine-${os}${release}${abi-}"
-	exit ;;
+	GUESS=$machine-${os}${release}${abi-}
+	;;
     *:Bitrig:*:*)
 	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
-	echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
-	exit ;;
+	GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE
+	;;
     *:OpenBSD:*:*)
 	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
-	echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
-	exit ;;
+	GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE
+	;;
+    *:SecBSD:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'`
+	GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE
+	;;
     *:LibertyBSD:*:*)
 	UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
-	echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
-	exit ;;
+	GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE
+	;;
     *:MidnightBSD:*:*)
-	echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE
+	;;
     *:ekkoBSD:*:*)
-	echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE
+	;;
     *:SolidBSD:*:*)
-	echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE
+	;;
+    *:OS108:*:*)
+	GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE
+	;;
     macppc:MirBSD:*:*)
-	echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
-	exit ;;
+	GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE
+	;;
     *:MirBSD:*:*)
-	echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE
+	;;
     *:Sortix:*:*)
-	echo "$UNAME_MACHINE"-unknown-sortix
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-sortix
+	;;
+    *:Twizzler:*:*)
+	GUESS=$UNAME_MACHINE-unknown-twizzler
+	;;
     *:Redox:*:*)
-	echo "$UNAME_MACHINE"-unknown-redox
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-redox
+	;;
     mips:OSF1:*.*)
-        echo mips-dec-osf1
-        exit ;;
+	GUESS=mips-dec-osf1
+	;;
     alpha:OSF1:*:*)
+	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+	trap '' 0
 	case $UNAME_RELEASE in
 	*4.0)
 		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
@@ -292,7 +329,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
 	# covers most systems running today.  This code pipes the CPU
 	# types through head -n 1, so we only detect the type of CPU 0.
 	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
-	case "$ALPHA_CPU_TYPE" in
+	case $ALPHA_CPU_TYPE in
 	    "EV4 (21064)")
 		UNAME_MACHINE=alpha ;;
 	    "EV4.5 (21064)")
@@ -329,112 +366,121 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
 	# A Tn.n version is a released field test version.
 	# A Xn.n version is an unreleased experimental baselevel.
 	# 1.2 uses "1.2" for uname -r.
-	echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
-	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
-	exitcode=$?
-	trap '' 0
-	exit $exitcode ;;
+	OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+	GUESS=$UNAME_MACHINE-dec-osf$OSF_REL
+	;;
     Amiga*:UNIX_System_V:4.0:*)
-	echo m68k-unknown-sysv4
-	exit ;;
+	GUESS=m68k-unknown-sysv4
+	;;
     *:[Aa]miga[Oo][Ss]:*:*)
-	echo "$UNAME_MACHINE"-unknown-amigaos
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-amigaos
+	;;
     *:[Mm]orph[Oo][Ss]:*:*)
-	echo "$UNAME_MACHINE"-unknown-morphos
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-morphos
+	;;
     *:OS/390:*:*)
-	echo i370-ibm-openedition
-	exit ;;
+	GUESS=i370-ibm-openedition
+	;;
     *:z/VM:*:*)
-	echo s390-ibm-zvmoe
-	exit ;;
+	GUESS=s390-ibm-zvmoe
+	;;
     *:OS400:*:*)
-	echo powerpc-ibm-os400
-	exit ;;
+	GUESS=powerpc-ibm-os400
+	;;
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
-	echo arm-acorn-riscix"$UNAME_RELEASE"
-	exit ;;
+	GUESS=arm-acorn-riscix$UNAME_RELEASE
+	;;
     arm*:riscos:*:*|arm*:RISCOS:*:*)
-	echo arm-unknown-riscos
-	exit ;;
+	GUESS=arm-unknown-riscos
+	;;
     SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
-	echo hppa1.1-hitachi-hiuxmpp
-	exit ;;
+	GUESS=hppa1.1-hitachi-hiuxmpp
+	;;
     Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
 	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
-	if test "`(/bin/universe) 2>/dev/null`" = att ; then
-		echo pyramid-pyramid-sysv3
-	else
-		echo pyramid-pyramid-bsd
-	fi
-	exit ;;
+	case `(/bin/universe) 2>/dev/null` in
+	    att) GUESS=pyramid-pyramid-sysv3 ;;
+	    *)   GUESS=pyramid-pyramid-bsd   ;;
+	esac
+	;;
     NILE*:*:*:dcosx)
-	echo pyramid-pyramid-svr4
-	exit ;;
+	GUESS=pyramid-pyramid-svr4
+	;;
     DRS?6000:unix:4.0:6*)
-	echo sparc-icl-nx6
-	exit ;;
+	GUESS=sparc-icl-nx6
+	;;
     DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
 	case `/usr/bin/uname -p` in
-	    sparc) echo sparc-icl-nx7; exit ;;
-	esac ;;
+	    sparc) GUESS=sparc-icl-nx7 ;;
+	esac
+	;;
     s390x:SunOS:*:*)
-	echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
-	exit ;;
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL
+	;;
     sun4H:SunOS:5.*:*)
-	echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
-	exit ;;
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=sparc-hal-solaris2$SUN_REL
+	;;
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
-	echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
-	exit ;;
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=sparc-sun-solaris2$SUN_REL
+	;;
     i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
-	echo i386-pc-auroraux"$UNAME_RELEASE"
-	exit ;;
+	GUESS=i386-pc-auroraux$UNAME_RELEASE
+	;;
     i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
-	UNAME_REL="`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
-	case `isainfo -b` in
-	    32)
-		echo i386-pc-solaris2"$UNAME_REL"
-		;;
-	    64)
-		echo x86_64-pc-solaris2"$UNAME_REL"
-		;;
-	esac
-	exit ;;
+	set_cc_for_build
+	SUN_ARCH=i386
+	# If there is a compiler, see if it is configured for 64-bit objects.
+	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+	# This test works for both compilers.
+	if test "$CC_FOR_BUILD" != no_compiler_found; then
+	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+		(CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \
+		grep IS_64BIT_ARCH >/dev/null
+	    then
+		SUN_ARCH=x86_64
+	    fi
+	fi
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=$SUN_ARCH-pc-solaris2$SUN_REL
+	;;
     sun4*:SunOS:6*:*)
 	# According to config.sub, this is the proper way to canonicalize
 	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
 	# it's likely to be more like Solaris than SunOS4.
-	echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
-	exit ;;
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=sparc-sun-solaris3$SUN_REL
+	;;
     sun4*:SunOS:*:*)
-	case "`/usr/bin/arch -k`" in
+	case `/usr/bin/arch -k` in
 	    Series*|S4*)
 		UNAME_RELEASE=`uname -v`
 		;;
 	esac
 	# Japanese Language versions have a version number like `4.1.3-JL'.
-	echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
-	exit ;;
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
+	GUESS=sparc-sun-sunos$SUN_REL
+	;;
     sun3*:SunOS:*:*)
-	echo m68k-sun-sunos"$UNAME_RELEASE"
-	exit ;;
+	GUESS=m68k-sun-sunos$UNAME_RELEASE
+	;;
     sun*:*:4.2BSD:*)
 	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
 	test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
-	case "`/bin/arch`" in
+	case `/bin/arch` in
 	    sun3)
-		echo m68k-sun-sunos"$UNAME_RELEASE"
+		GUESS=m68k-sun-sunos$UNAME_RELEASE
 		;;
 	    sun4)
-		echo sparc-sun-sunos"$UNAME_RELEASE"
+		GUESS=sparc-sun-sunos$UNAME_RELEASE
 		;;
 	esac
-	exit ;;
+	;;
     aushp:SunOS:*:*)
-	echo sparc-auspex-sunos"$UNAME_RELEASE"
-	exit ;;
+	GUESS=sparc-auspex-sunos$UNAME_RELEASE
+	;;
     # The situation for MiNT is a little confusing.  The machine name
     # can be virtually everything (everything which is not
     # "atarist" or "atariste" at least should have a processor
@@ -444,41 +490,41 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
     # MiNT.  But MiNT is downward compatible to TOS, so this should
     # be no problem.
     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
-	echo m68k-atari-mint"$UNAME_RELEASE"
-	exit ;;
+	GUESS=m68k-atari-mint$UNAME_RELEASE
+	;;
     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
-	echo m68k-atari-mint"$UNAME_RELEASE"
-	exit ;;
+	GUESS=m68k-atari-mint$UNAME_RELEASE
+	;;
     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-	echo m68k-atari-mint"$UNAME_RELEASE"
-	exit ;;
+	GUESS=m68k-atari-mint$UNAME_RELEASE
+	;;
     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-	echo m68k-milan-mint"$UNAME_RELEASE"
-	exit ;;
+	GUESS=m68k-milan-mint$UNAME_RELEASE
+	;;
     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-	echo m68k-hades-mint"$UNAME_RELEASE"
-	exit ;;
+	GUESS=m68k-hades-mint$UNAME_RELEASE
+	;;
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-	echo m68k-unknown-mint"$UNAME_RELEASE"
-	exit ;;
+	GUESS=m68k-unknown-mint$UNAME_RELEASE
+	;;
     m68k:machten:*:*)
-	echo m68k-apple-machten"$UNAME_RELEASE"
-	exit ;;
+	GUESS=m68k-apple-machten$UNAME_RELEASE
+	;;
     powerpc:machten:*:*)
-	echo powerpc-apple-machten"$UNAME_RELEASE"
-	exit ;;
+	GUESS=powerpc-apple-machten$UNAME_RELEASE
+	;;
     RISC*:Mach:*:*)
-	echo mips-dec-mach_bsd4.3
-	exit ;;
+	GUESS=mips-dec-mach_bsd4.3
+	;;
     RISC*:ULTRIX:*:*)
-	echo mips-dec-ultrix"$UNAME_RELEASE"
-	exit ;;
+	GUESS=mips-dec-ultrix$UNAME_RELEASE
+	;;
     VAX*:ULTRIX*:*:*)
-	echo vax-dec-ultrix"$UNAME_RELEASE"
-	exit ;;
+	GUESS=vax-dec-ultrix$UNAME_RELEASE
+	;;
     2020:CLIX:*:* | 2430:CLIX:*:*)
-	echo clipper-intergraph-clix"$UNAME_RELEASE"
-	exit ;;
+	GUESS=clipper-intergraph-clix$UNAME_RELEASE
+	;;
     mips:*:*:UMIPS | mips:*:*:RISCos)
 	set_cc_for_build
 	sed 's/^	//' << EOF > "$dummy.c"
@@ -506,75 +552,76 @@ EOF
 	  dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
 	  SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
 	    { echo "$SYSTEM_NAME"; exit; }
-	echo mips-mips-riscos"$UNAME_RELEASE"
-	exit ;;
+	GUESS=mips-mips-riscos$UNAME_RELEASE
+	;;
     Motorola:PowerMAX_OS:*:*)
-	echo powerpc-motorola-powermax
-	exit ;;
+	GUESS=powerpc-motorola-powermax
+	;;
     Motorola:*:4.3:PL8-*)
-	echo powerpc-harris-powermax
-	exit ;;
+	GUESS=powerpc-harris-powermax
+	;;
     Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
-	echo powerpc-harris-powermax
-	exit ;;
+	GUESS=powerpc-harris-powermax
+	;;
     Night_Hawk:Power_UNIX:*:*)
-	echo powerpc-harris-powerunix
-	exit ;;
+	GUESS=powerpc-harris-powerunix
+	;;
     m88k:CX/UX:7*:*)
-	echo m88k-harris-cxux7
-	exit ;;
+	GUESS=m88k-harris-cxux7
+	;;
     m88k:*:4*:R4*)
-	echo m88k-motorola-sysv4
-	exit ;;
+	GUESS=m88k-motorola-sysv4
+	;;
     m88k:*:3*:R3*)
-	echo m88k-motorola-sysv3
-	exit ;;
+	GUESS=m88k-motorola-sysv3
+	;;
     AViiON:dgux:*:*)
 	# DG/UX returns AViiON for all architectures
 	UNAME_PROCESSOR=`/usr/bin/uname -p`
-	if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
+	if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110
 	then
-	    if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
-	       [ "$TARGET_BINARY_INTERFACE"x = x ]
+	    if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \
+	       test "$TARGET_BINARY_INTERFACE"x = x
 	    then
-		echo m88k-dg-dgux"$UNAME_RELEASE"
+		GUESS=m88k-dg-dgux$UNAME_RELEASE
 	    else
-		echo m88k-dg-dguxbcs"$UNAME_RELEASE"
+		GUESS=m88k-dg-dguxbcs$UNAME_RELEASE
 	    fi
 	else
-	    echo i586-dg-dgux"$UNAME_RELEASE"
+	    GUESS=i586-dg-dgux$UNAME_RELEASE
 	fi
-	exit ;;
+	;;
     M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
-	echo m88k-dolphin-sysv3
-	exit ;;
+	GUESS=m88k-dolphin-sysv3
+	;;
     M88*:*:R3*:*)
 	# Delta 88k system running SVR3
-	echo m88k-motorola-sysv3
-	exit ;;
+	GUESS=m88k-motorola-sysv3
+	;;
     XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
-	echo m88k-tektronix-sysv3
-	exit ;;
+	GUESS=m88k-tektronix-sysv3
+	;;
     Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
-	echo m68k-tektronix-bsd
-	exit ;;
+	GUESS=m68k-tektronix-bsd
+	;;
     *:IRIX*:*:*)
-	echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`"
-	exit ;;
+	IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'`
+	GUESS=mips-sgi-irix$IRIX_REL
+	;;
     ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
-	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
-	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
+	GUESS=romp-ibm-aix    # uname -m gives an 8 hex-code CPU id
+	;;                    # Note that: echo "'`uname -s`'" gives 'AIX '
     i*86:AIX:*:*)
-	echo i386-ibm-aix
-	exit ;;
+	GUESS=i386-ibm-aix
+	;;
     ia64:AIX:*:*)
-	if [ -x /usr/bin/oslevel ] ; then
+	if test -x /usr/bin/oslevel ; then
 		IBM_REV=`/usr/bin/oslevel`
 	else
-		IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
+		IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
 	fi
-	echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
-	exit ;;
+	GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV
+	;;
     *:AIX:2:3)
 	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
 		set_cc_for_build
@@ -591,16 +638,16 @@ EOF
 EOF
 		if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
 		then
-			echo "$SYSTEM_NAME"
+			GUESS=$SYSTEM_NAME
 		else
-			echo rs6000-ibm-aix3.2.5
+			GUESS=rs6000-ibm-aix3.2.5
 		fi
 	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
-		echo rs6000-ibm-aix3.2.4
+		GUESS=rs6000-ibm-aix3.2.4
 	else
-		echo rs6000-ibm-aix3.2
+		GUESS=rs6000-ibm-aix3.2
 	fi
-	exit ;;
+	;;
     *:AIX:*:[4567])
 	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
 	if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
@@ -608,56 +655,56 @@ EOF
 	else
 		IBM_ARCH=powerpc
 	fi
-	if [ -x /usr/bin/lslpp ] ; then
-		IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
+	if test -x /usr/bin/lslpp ; then
+		IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \
 			   awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
 	else
-		IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
+		IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
 	fi
-	echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
-	exit ;;
+	GUESS=$IBM_ARCH-ibm-aix$IBM_REV
+	;;
     *:AIX:*:*)
-	echo rs6000-ibm-aix
-	exit ;;
+	GUESS=rs6000-ibm-aix
+	;;
     ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
-	echo romp-ibm-bsd4.4
-	exit ;;
+	GUESS=romp-ibm-bsd4.4
+	;;
     ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
-	echo romp-ibm-bsd"$UNAME_RELEASE"   # 4.3 with uname added to
-	exit ;;                             # report: romp-ibm BSD 4.3
+	GUESS=romp-ibm-bsd$UNAME_RELEASE    # 4.3 with uname added to
+	;;                                  # report: romp-ibm BSD 4.3
     *:BOSX:*:*)
-	echo rs6000-bull-bosx
-	exit ;;
+	GUESS=rs6000-bull-bosx
+	;;
     DPX/2?00:B.O.S.:*:*)
-	echo m68k-bull-sysv3
-	exit ;;
+	GUESS=m68k-bull-sysv3
+	;;
     9000/[34]??:4.3bsd:1.*:*)
-	echo m68k-hp-bsd
-	exit ;;
+	GUESS=m68k-hp-bsd
+	;;
     hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
-	echo m68k-hp-bsd4.4
-	exit ;;
+	GUESS=m68k-hp-bsd4.4
+	;;
     9000/[34678]??:HP-UX:*:*)
-	HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
-	case "$UNAME_MACHINE" in
+	HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
+	case $UNAME_MACHINE in
 	    9000/31?)            HP_ARCH=m68000 ;;
 	    9000/[34]??)         HP_ARCH=m68k ;;
 	    9000/[678][0-9][0-9])
-		if [ -x /usr/bin/getconf ]; then
+		if test -x /usr/bin/getconf; then
 		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
 		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-		    case "$sc_cpu_version" in
+		    case $sc_cpu_version in
 		      523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
 		      528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
 		      532)                      # CPU_PA_RISC2_0
-			case "$sc_kernel_bits" in
+			case $sc_kernel_bits in
 			  32) HP_ARCH=hppa2.0n ;;
 			  64) HP_ARCH=hppa2.0w ;;
 			  '') HP_ARCH=hppa2.0 ;;   # HP-UX 10.20
 			esac ;;
 		    esac
 		fi
-		if [ "$HP_ARCH" = "" ]; then
+		if test "$HP_ARCH" = ""; then
 		    set_cc_for_build
 		    sed 's/^		//' << EOF > "$dummy.c"
 
@@ -696,7 +743,7 @@ EOF
 		    test -z "$HP_ARCH" && HP_ARCH=hppa
 		fi ;;
 	esac
-	if [ "$HP_ARCH" = hppa2.0w ]
+	if test "$HP_ARCH" = hppa2.0w
 	then
 	    set_cc_for_build
 
@@ -717,12 +764,12 @@ EOF
 		HP_ARCH=hppa64
 	    fi
 	fi
-	echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
-	exit ;;
+	GUESS=$HP_ARCH-hp-hpux$HPUX_REV
+	;;
     ia64:HP-UX:*:*)
-	HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
-	echo ia64-hp-hpux"$HPUX_REV"
-	exit ;;
+	HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
+	GUESS=ia64-hp-hpux$HPUX_REV
+	;;
     3050*:HI-UX:*:*)
 	set_cc_for_build
 	sed 's/^	//' << EOF > "$dummy.c"
@@ -752,36 +799,36 @@ EOF
 EOF
 	$CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
 		{ echo "$SYSTEM_NAME"; exit; }
-	echo unknown-hitachi-hiuxwe2
-	exit ;;
+	GUESS=unknown-hitachi-hiuxwe2
+	;;
     9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
-	echo hppa1.1-hp-bsd
-	exit ;;
+	GUESS=hppa1.1-hp-bsd
+	;;
     9000/8??:4.3bsd:*:*)
-	echo hppa1.0-hp-bsd
-	exit ;;
+	GUESS=hppa1.0-hp-bsd
+	;;
     *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
-	echo hppa1.0-hp-mpeix
-	exit ;;
+	GUESS=hppa1.0-hp-mpeix
+	;;
     hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
-	echo hppa1.1-hp-osf
-	exit ;;
+	GUESS=hppa1.1-hp-osf
+	;;
     hp8??:OSF1:*:*)
-	echo hppa1.0-hp-osf
-	exit ;;
+	GUESS=hppa1.0-hp-osf
+	;;
     i*86:OSF1:*:*)
-	if [ -x /usr/sbin/sysversion ] ; then
-	    echo "$UNAME_MACHINE"-unknown-osf1mk
+	if test -x /usr/sbin/sysversion ; then
+	    GUESS=$UNAME_MACHINE-unknown-osf1mk
 	else
-	    echo "$UNAME_MACHINE"-unknown-osf1
+	    GUESS=$UNAME_MACHINE-unknown-osf1
 	fi
-	exit ;;
+	;;
     parisc*:Lites*:*:*)
-	echo hppa1.1-hp-lites
-	exit ;;
+	GUESS=hppa1.1-hp-lites
+	;;
     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
-	echo c1-convex-bsd
-	exit ;;
+	GUESS=c1-convex-bsd
+	;;
     C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
 	if getsysinfo -f scalar_acc
 	then echo c32-convex-bsd
@@ -789,17 +836,18 @@ EOF
 	fi
 	exit ;;
     C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
-	echo c34-convex-bsd
-	exit ;;
+	GUESS=c34-convex-bsd
+	;;
     C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
-	echo c38-convex-bsd
-	exit ;;
+	GUESS=c38-convex-bsd
+	;;
     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
-	echo c4-convex-bsd
-	exit ;;
+	GUESS=c4-convex-bsd
+	;;
     CRAY*Y-MP:*:*:*)
-	echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
+	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+	GUESS=ymp-cray-unicos$CRAY_REL
+	;;
     CRAY*[A-Z]90:*:*:*)
 	echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
 	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
@@ -807,114 +855,129 @@ EOF
 	      -e 's/\.[^.]*$/.X/'
 	exit ;;
     CRAY*TS:*:*:*)
-	echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
+	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+	GUESS=t90-cray-unicos$CRAY_REL
+	;;
     CRAY*T3E:*:*:*)
-	echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
+	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+	GUESS=alphaev5-cray-unicosmk$CRAY_REL
+	;;
     CRAY*SV1:*:*:*)
-	echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
+	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+	GUESS=sv1-cray-unicos$CRAY_REL
+	;;
     *:UNICOS/mp:*:*)
-	echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
+	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+	GUESS=craynv-cray-unicosmp$CRAY_REL
+	;;
     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
 	FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
 	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
 	FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
-	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-	exit ;;
+	GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
+	;;
     5000:UNIX_System_V:4.*:*)
 	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
 	FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
-	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-	exit ;;
+	GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
+	;;
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
-	echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
-	exit ;;
+	GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE
+	;;
     sparc*:BSD/OS:*:*)
-	echo sparc-unknown-bsdi"$UNAME_RELEASE"
-	exit ;;
+	GUESS=sparc-unknown-bsdi$UNAME_RELEASE
+	;;
     *:BSD/OS:*:*)
-	echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE
+	;;
     arm:FreeBSD:*:*)
 	UNAME_PROCESSOR=`uname -p`
 	set_cc_for_build
 	if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
 	    | grep -q __ARM_PCS_VFP
 	then
-	    echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi
+	    FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+	    GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi
 	else
-	    echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf
+	    FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+	    GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf
 	fi
-	exit ;;
+	;;
     *:FreeBSD:*:*)
 	UNAME_PROCESSOR=`/usr/bin/uname -p`
-	case "$UNAME_PROCESSOR" in
+	case $UNAME_PROCESSOR in
 	    amd64)
 		UNAME_PROCESSOR=x86_64 ;;
 	    i386)
 		UNAME_PROCESSOR=i586 ;;
 	esac
-	echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
-	exit ;;
+	FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+	GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL
+	;;
     i*:CYGWIN*:*)
-	echo "$UNAME_MACHINE"-pc-cygwin
-	exit ;;
+	GUESS=$UNAME_MACHINE-pc-cygwin
+	;;
     *:MINGW64*:*)
-	echo "$UNAME_MACHINE"-pc-mingw64
-	exit ;;
+	GUESS=$UNAME_MACHINE-pc-mingw64
+	;;
     *:MINGW*:*)
-	echo "$UNAME_MACHINE"-pc-mingw32
-	exit ;;
+	GUESS=$UNAME_MACHINE-pc-mingw32
+	;;
     *:MSYS*:*)
-	echo "$UNAME_MACHINE"-pc-msys
-	exit ;;
+	GUESS=$UNAME_MACHINE-pc-msys
+	;;
     i*:PW*:*)
-	echo "$UNAME_MACHINE"-pc-pw32
-	exit ;;
+	GUESS=$UNAME_MACHINE-pc-pw32
+	;;
+    *:SerenityOS:*:*)
+        GUESS=$UNAME_MACHINE-pc-serenity
+        ;;
     *:Interix*:*)
-	case "$UNAME_MACHINE" in
+	case $UNAME_MACHINE in
 	    x86)
-		echo i586-pc-interix"$UNAME_RELEASE"
-		exit ;;
+		GUESS=i586-pc-interix$UNAME_RELEASE
+		;;
 	    authenticamd | genuineintel | EM64T)
-		echo x86_64-unknown-interix"$UNAME_RELEASE"
-		exit ;;
+		GUESS=x86_64-unknown-interix$UNAME_RELEASE
+		;;
 	    IA64)
-		echo ia64-unknown-interix"$UNAME_RELEASE"
-		exit ;;
+		GUESS=ia64-unknown-interix$UNAME_RELEASE
+		;;
 	esac ;;
     i*:UWIN*:*)
-	echo "$UNAME_MACHINE"-pc-uwin
-	exit ;;
+	GUESS=$UNAME_MACHINE-pc-uwin
+	;;
     amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
-	echo x86_64-unknown-cygwin
-	exit ;;
+	GUESS=x86_64-pc-cygwin
+	;;
     prep*:SunOS:5.*:*)
-	echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
-	exit ;;
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=powerpcle-unknown-solaris2$SUN_REL
+	;;
     *:GNU:*:*)
 	# the GNU system
-	echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`"
-	exit ;;
+	GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'`
+	GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'`
+	GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL
+	;;
     *:GNU/*:*:*)
 	# other systems with GNU libc and userland
-	echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
-	exit ;;
+	GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"`
+	GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+	GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
+	;;
     *:Minix:*:*)
-	echo "$UNAME_MACHINE"-unknown-minix
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-minix
+	;;
     aarch64:Linux:*:*)
-	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
     aarch64_be:Linux:*:*)
 	UNAME_MACHINE=aarch64_be
-	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
     alpha:Linux:*:*)
-	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in
 	  EV5)   UNAME_MACHINE=alphaev5 ;;
 	  EV56)  UNAME_MACHINE=alphaev56 ;;
 	  PCA56) UNAME_MACHINE=alphapca56 ;;
@@ -925,183 +988,236 @@ EOF
 	esac
 	objdump --private-headers /bin/sh | grep -q ld.so.1
 	if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
-	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-	exit ;;
-    arc:Linux:*:* | arceb:Linux:*:*)
-	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
     arm*:Linux:*:*)
 	set_cc_for_build
 	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
 	    | grep -q __ARM_EABI__
 	then
-	    echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+	    GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
 	else
 	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
 		| grep -q __ARM_PCS_VFP
 	    then
-		echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
+		GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi
 	    else
-		echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
+		GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf
 	    fi
 	fi
-	exit ;;
+	;;
     avr32*:Linux:*:*)
-	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
     cris:Linux:*:*)
-	echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-axis-linux-$LIBC
+	;;
     crisv32:Linux:*:*)
-	echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-axis-linux-$LIBC
+	;;
     e2k:Linux:*:*)
-	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
     frv:Linux:*:*)
-	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
     hexagon:Linux:*:*)
-	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
     i*86:Linux:*:*)
-	echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-pc-linux-$LIBC
+	;;
     ia64:Linux:*:*)
-	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
     k1om:Linux:*:*)
-	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
     m32r*:Linux:*:*)
-	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
     m68*:Linux:*:*)
-	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
     mips:Linux:*:* | mips64:Linux:*:*)
 	set_cc_for_build
+	IS_GLIBC=0
+	test x"${LIBC}" = xgnu && IS_GLIBC=1
 	sed 's/^	//' << EOF > "$dummy.c"
 	#undef CPU
-	#undef ${UNAME_MACHINE}
-	#undef ${UNAME_MACHINE}el
+	#undef mips
+	#undef mipsel
+	#undef mips64
+	#undef mips64el
+	#if ${IS_GLIBC} && defined(_ABI64)
+	LIBCABI=gnuabi64
+	#else
+	#if ${IS_GLIBC} && defined(_ABIN32)
+	LIBCABI=gnuabin32
+	#else
+	LIBCABI=${LIBC}
+	#endif
+	#endif
+
+	#if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
+	CPU=mipsisa64r6
+	#else
+	#if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
+	CPU=mipsisa32r6
+	#else
+	#if defined(__mips64)
+	CPU=mips64
+	#else
+	CPU=mips
+	#endif
+	#endif
+	#endif
+
 	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-	CPU=${UNAME_MACHINE}el
+	MIPS_ENDIAN=el
 	#else
 	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-	CPU=${UNAME_MACHINE}
+	MIPS_ENDIAN=
 	#else
-	CPU=
+	MIPS_ENDIAN=
 	#endif
 	#endif
 EOF
-	eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`"
-	test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; }
+	cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`
+	eval "$cc_set_vars"
+	test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
 	;;
     mips64el:Linux:*:*)
-	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
     openrisc*:Linux:*:*)
-	echo or1k-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=or1k-unknown-linux-$LIBC
+	;;
     or32:Linux:*:* | or1k*:Linux:*:*)
-	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
     padre:Linux:*:*)
-	echo sparc-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=sparc-unknown-linux-$LIBC
+	;;
     parisc64:Linux:*:* | hppa64:Linux:*:*)
-	echo hppa64-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=hppa64-unknown-linux-$LIBC
+	;;
     parisc:Linux:*:* | hppa:Linux:*:*)
 	# Look for CPU level
 	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-	  PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
-	  PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
-	  *)    echo hppa-unknown-linux-"$LIBC" ;;
+	  PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;;
+	  PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;;
+	  *)    GUESS=hppa-unknown-linux-$LIBC ;;
 	esac
-	exit ;;
+	;;
     ppc64:Linux:*:*)
-	echo powerpc64-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=powerpc64-unknown-linux-$LIBC
+	;;
     ppc:Linux:*:*)
-	echo powerpc-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=powerpc-unknown-linux-$LIBC
+	;;
     ppc64le:Linux:*:*)
-	echo powerpc64le-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=powerpc64le-unknown-linux-$LIBC
+	;;
     ppcle:Linux:*:*)
-	echo powerpcle-unknown-linux-"$LIBC"
-	exit ;;
-    riscv32:Linux:*:* | riscv64:Linux:*:*)
-	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=powerpcle-unknown-linux-$LIBC
+	;;
+    riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
     s390:Linux:*:* | s390x:Linux:*:*)
-	echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-ibm-linux-$LIBC
+	;;
     sh64*:Linux:*:*)
-	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
     sh*:Linux:*:*)
-	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
     sparc:Linux:*:* | sparc64:Linux:*:*)
-	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
     tile*:Linux:*:*)
-	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
     vax:Linux:*:*)
-	echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-dec-linux-$LIBC
+	;;
     x86_64:Linux:*:*)
-	echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
-	exit ;;
+	set_cc_for_build
+	CPU=$UNAME_MACHINE
+	LIBCABI=$LIBC
+	if test "$CC_FOR_BUILD" != no_compiler_found; then
+	    ABI=64
+	    sed 's/^	    //' << EOF > "$dummy.c"
+	    #ifdef __i386__
+	    ABI=x86
+	    #else
+	    #ifdef __ILP32__
+	    ABI=x32
+	    #endif
+	    #endif
+EOF
+	    cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'`
+	    eval "$cc_set_abi"
+	    case $ABI in
+		x86) CPU=i686 ;;
+		x32) LIBCABI=${LIBC}x32 ;;
+	    esac
+	fi
+	GUESS=$CPU-pc-linux-$LIBCABI
+	;;
     xtensa*:Linux:*:*)
-	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
     i*86:DYNIX/ptx:4*:*)
 	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
 	# earlier versions are messed up and put the nodename in both
 	# sysname and nodename.
-	echo i386-sequent-sysv4
-	exit ;;
+	GUESS=i386-sequent-sysv4
+	;;
     i*86:UNIX_SV:4.2MP:2.*)
 	# Unixware is an offshoot of SVR4, but it has its own version
 	# number series starting with 2...
 	# I am not positive that other SVR4 systems won't match this,
 	# I just have to hope.  -- rms.
 	# Use sysv4.2uw... so that sysv4* matches it.
-	echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
-	exit ;;
+	GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
+	;;
     i*86:OS/2:*:*)
 	# If we were able to find `uname', then EMX Unix compatibility
 	# is probably installed.
-	echo "$UNAME_MACHINE"-pc-os2-emx
-	exit ;;
+	GUESS=$UNAME_MACHINE-pc-os2-emx
+	;;
     i*86:XTS-300:*:STOP)
-	echo "$UNAME_MACHINE"-unknown-stop
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-stop
+	;;
     i*86:atheos:*:*)
-	echo "$UNAME_MACHINE"-unknown-atheos
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-atheos
+	;;
     i*86:syllable:*:*)
-	echo "$UNAME_MACHINE"-pc-syllable
-	exit ;;
+	GUESS=$UNAME_MACHINE-pc-syllable
+	;;
     i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
-	echo i386-unknown-lynxos"$UNAME_RELEASE"
-	exit ;;
+	GUESS=i386-unknown-lynxos$UNAME_RELEASE
+	;;
     i*86:*DOS:*:*)
-	echo "$UNAME_MACHINE"-pc-msdosdjgpp
-	exit ;;
+	GUESS=$UNAME_MACHINE-pc-msdosdjgpp
+	;;
     i*86:*:4.*:*)
 	UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
 	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
-		echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
+		GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL
 	else
-		echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
+		GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL
 	fi
-	exit ;;
+	;;
     i*86:*:5:[678]*)
 	# UnixWare 7.x, OpenUNIX and OpenServer 6.
 	case `/bin/uname -X | grep "^Machine"` in
@@ -1109,12 +1225,12 @@ EOF
 	    *Pentium)	     UNAME_MACHINE=i586 ;;
 	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
 	esac
-	echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+	;;
     i*86:*:3.2:*)
 	if test -f /usr/options/cb.name; then
 		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
-		echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL"
+		GUESS=$UNAME_MACHINE-pc-isc$UNAME_REL
 	elif /bin/uname -X 2>/dev/null >/dev/null ; then
 		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
 		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
@@ -1124,11 +1240,11 @@ EOF
 			&& UNAME_MACHINE=i686
 		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
 			&& UNAME_MACHINE=i686
-		echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
+		GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL
 	else
-		echo "$UNAME_MACHINE"-pc-sysv32
+		GUESS=$UNAME_MACHINE-pc-sysv32
 	fi
-	exit ;;
+	;;
     pc:*:*:*)
 	# Left here for compatibility:
 	# uname -m prints for DJGPP always 'pc', but it prints nothing about
@@ -1136,31 +1252,31 @@ EOF
 	# Note: whatever this is, it MUST be the same as what config.sub
 	# prints for the "djgpp" host, or else GDB configure will decide that
 	# this is a cross-build.
-	echo i586-pc-msdosdjgpp
-	exit ;;
+	GUESS=i586-pc-msdosdjgpp
+	;;
     Intel:Mach:3*:*)
-	echo i386-pc-mach3
-	exit ;;
+	GUESS=i386-pc-mach3
+	;;
     paragon:*:*:*)
-	echo i860-intel-osf1
-	exit ;;
+	GUESS=i860-intel-osf1
+	;;
     i860:*:4.*:*) # i860-SVR4
 	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
-	  echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
+	  GUESS=i860-stardent-sysv$UNAME_RELEASE    # Stardent Vistra i860-SVR4
 	else # Add other i860-SVR4 vendors below as they are discovered.
-	  echo i860-unknown-sysv"$UNAME_RELEASE"  # Unknown i860-SVR4
+	  GUESS=i860-unknown-sysv$UNAME_RELEASE     # Unknown i860-SVR4
 	fi
-	exit ;;
+	;;
     mini*:CTIX:SYS*5:*)
 	# "miniframe"
-	echo m68010-convergent-sysv
-	exit ;;
+	GUESS=m68010-convergent-sysv
+	;;
     mc68k:UNIX:SYSTEM5:3.51m)
-	echo m68k-convergent-sysv
-	exit ;;
+	GUESS=m68k-convergent-sysv
+	;;
     M680?0:D-NIX:5.3:*)
-	echo m68k-diab-dnix
-	exit ;;
+	GUESS=m68k-diab-dnix
+	;;
     M68*:*:R3V[5678]*:*)
 	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
     3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
@@ -1185,250 +1301,407 @@ EOF
 	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
 	    && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
     m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
-	echo m68k-unknown-lynxos"$UNAME_RELEASE"
-	exit ;;
+	GUESS=m68k-unknown-lynxos$UNAME_RELEASE
+	;;
     mc68030:UNIX_System_V:4.*:*)
-	echo m68k-atari-sysv4
-	exit ;;
+	GUESS=m68k-atari-sysv4
+	;;
     TSUNAMI:LynxOS:2.*:*)
-	echo sparc-unknown-lynxos"$UNAME_RELEASE"
-	exit ;;
+	GUESS=sparc-unknown-lynxos$UNAME_RELEASE
+	;;
     rs6000:LynxOS:2.*:*)
-	echo rs6000-unknown-lynxos"$UNAME_RELEASE"
-	exit ;;
+	GUESS=rs6000-unknown-lynxos$UNAME_RELEASE
+	;;
     PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
-	echo powerpc-unknown-lynxos"$UNAME_RELEASE"
-	exit ;;
+	GUESS=powerpc-unknown-lynxos$UNAME_RELEASE
+	;;
     SM[BE]S:UNIX_SV:*:*)
-	echo mips-dde-sysv"$UNAME_RELEASE"
-	exit ;;
+	GUESS=mips-dde-sysv$UNAME_RELEASE
+	;;
     RM*:ReliantUNIX-*:*:*)
-	echo mips-sni-sysv4
-	exit ;;
+	GUESS=mips-sni-sysv4
+	;;
     RM*:SINIX-*:*:*)
-	echo mips-sni-sysv4
-	exit ;;
+	GUESS=mips-sni-sysv4
+	;;
     *:SINIX-*:*:*)
 	if uname -p 2>/dev/null >/dev/null ; then
 		UNAME_MACHINE=`(uname -p) 2>/dev/null`
-		echo "$UNAME_MACHINE"-sni-sysv4
+		GUESS=$UNAME_MACHINE-sni-sysv4
 	else
-		echo ns32k-sni-sysv
+		GUESS=ns32k-sni-sysv
 	fi
-	exit ;;
+	;;
     PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
 			# says <Richard.M.Bartel@ccMail.Census.GOV>
-	echo i586-unisys-sysv4
-	exit ;;
+	GUESS=i586-unisys-sysv4
+	;;
     *:UNIX_System_V:4*:FTX*)
 	# From Gerald Hewes <hewes@openmarket.com>.
 	# How about differentiating between stratus architectures? -djm
-	echo hppa1.1-stratus-sysv4
-	exit ;;
+	GUESS=hppa1.1-stratus-sysv4
+	;;
     *:*:*:FTX*)
 	# From seanf@swdc.stratus.com.
-	echo i860-stratus-sysv4
-	exit ;;
+	GUESS=i860-stratus-sysv4
+	;;
     i*86:VOS:*:*)
 	# From Paul.Green@stratus.com.
-	echo "$UNAME_MACHINE"-stratus-vos
-	exit ;;
+	GUESS=$UNAME_MACHINE-stratus-vos
+	;;
     *:VOS:*:*)
 	# From Paul.Green@stratus.com.
-	echo hppa1.1-stratus-vos
-	exit ;;
+	GUESS=hppa1.1-stratus-vos
+	;;
     mc68*:A/UX:*:*)
-	echo m68k-apple-aux"$UNAME_RELEASE"
-	exit ;;
+	GUESS=m68k-apple-aux$UNAME_RELEASE
+	;;
     news*:NEWS-OS:6*:*)
-	echo mips-sony-newsos6
-	exit ;;
+	GUESS=mips-sony-newsos6
+	;;
     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
-	if [ -d /usr/nec ]; then
-		echo mips-nec-sysv"$UNAME_RELEASE"
+	if test -d /usr/nec; then
+		GUESS=mips-nec-sysv$UNAME_RELEASE
 	else
-		echo mips-unknown-sysv"$UNAME_RELEASE"
+		GUESS=mips-unknown-sysv$UNAME_RELEASE
 	fi
-	exit ;;
+	;;
     BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
-	echo powerpc-be-beos
-	exit ;;
+	GUESS=powerpc-be-beos
+	;;
     BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
-	echo powerpc-apple-beos
-	exit ;;
+	GUESS=powerpc-apple-beos
+	;;
     BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
-	echo i586-pc-beos
-	exit ;;
+	GUESS=i586-pc-beos
+	;;
     BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
-	echo i586-pc-haiku
-	exit ;;
-    x86_64:Haiku:*:*)
-	echo x86_64-unknown-haiku
-	exit ;;
+	GUESS=i586-pc-haiku
+	;;
+    ppc:Haiku:*:*)	# Haiku running on Apple PowerPC
+	GUESS=powerpc-apple-haiku
+	;;
+    *:Haiku:*:*)	# Haiku modern gcc (not bound by BeOS compat)
+	GUESS=$UNAME_MACHINE-unknown-haiku
+	;;
     SX-4:SUPER-UX:*:*)
-	echo sx4-nec-superux"$UNAME_RELEASE"
-	exit ;;
+	GUESS=sx4-nec-superux$UNAME_RELEASE
+	;;
     SX-5:SUPER-UX:*:*)
-	echo sx5-nec-superux"$UNAME_RELEASE"
-	exit ;;
+	GUESS=sx5-nec-superux$UNAME_RELEASE
+	;;
     SX-6:SUPER-UX:*:*)
-	echo sx6-nec-superux"$UNAME_RELEASE"
-	exit ;;
+	GUESS=sx6-nec-superux$UNAME_RELEASE
+	;;
     SX-7:SUPER-UX:*:*)
-	echo sx7-nec-superux"$UNAME_RELEASE"
-	exit ;;
+	GUESS=sx7-nec-superux$UNAME_RELEASE
+	;;
     SX-8:SUPER-UX:*:*)
-	echo sx8-nec-superux"$UNAME_RELEASE"
-	exit ;;
+	GUESS=sx8-nec-superux$UNAME_RELEASE
+	;;
     SX-8R:SUPER-UX:*:*)
-	echo sx8r-nec-superux"$UNAME_RELEASE"
-	exit ;;
+	GUESS=sx8r-nec-superux$UNAME_RELEASE
+	;;
     SX-ACE:SUPER-UX:*:*)
-	echo sxace-nec-superux"$UNAME_RELEASE"
-	exit ;;
+	GUESS=sxace-nec-superux$UNAME_RELEASE
+	;;
     Power*:Rhapsody:*:*)
-	echo powerpc-apple-rhapsody"$UNAME_RELEASE"
-	exit ;;
+	GUESS=powerpc-apple-rhapsody$UNAME_RELEASE
+	;;
     *:Rhapsody:*:*)
-	echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
-	exit ;;
+	GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE
+	;;
+    arm64:Darwin:*:*)
+	GUESS=aarch64-apple-darwin$UNAME_RELEASE
+	;;
     *:Darwin:*:*)
-	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
-	set_cc_for_build
-	if test "$UNAME_PROCESSOR" = unknown ; then
-	    UNAME_PROCESSOR=powerpc
+	UNAME_PROCESSOR=`uname -p`
+	case $UNAME_PROCESSOR in
+	    unknown) UNAME_PROCESSOR=powerpc ;;
+	esac
+	if command -v xcode-select > /dev/null 2> /dev/null && \
+		! xcode-select --print-path > /dev/null 2> /dev/null ; then
+	    # Avoid executing cc if there is no toolchain installed as
+	    # cc will be a stub that puts up a graphical alert
+	    # prompting the user to install developer tools.
+	    CC_FOR_BUILD=no_compiler_found
+	else
+	    set_cc_for_build
 	fi
-	if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
-	    if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
-		if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
-		       (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
-		       grep IS_64BIT_ARCH >/dev/null
-		then
-		    case $UNAME_PROCESSOR in
-			i386) UNAME_PROCESSOR=x86_64 ;;
-			powerpc) UNAME_PROCESSOR=powerpc64 ;;
-		    esac
-		fi
-		# On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
-		if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
-		       (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
-		       grep IS_PPC >/dev/null
-		then
-		    UNAME_PROCESSOR=powerpc
-		fi
+	if test "$CC_FOR_BUILD" != no_compiler_found; then
+	    if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+		   (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+		   grep IS_64BIT_ARCH >/dev/null
+	    then
+		case $UNAME_PROCESSOR in
+		    i386) UNAME_PROCESSOR=x86_64 ;;
+		    powerpc) UNAME_PROCESSOR=powerpc64 ;;
+		esac
+	    fi
+	    # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
+	    if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
+		   (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+		   grep IS_PPC >/dev/null
+	    then
+		UNAME_PROCESSOR=powerpc
 	    fi
 	elif test "$UNAME_PROCESSOR" = i386 ; then
-	    # Avoid executing cc on OS X 10.9, as it ships with a stub
-	    # that puts up a graphical alert prompting to install
-	    # developer tools.  Any system running Mac OS X 10.7 or
-	    # later (Darwin 11 and later) is required to have a 64-bit
-	    # processor. This is not true of the ARM version of Darwin
-	    # that Apple uses in portable devices.
-	    UNAME_PROCESSOR=x86_64
+	    # uname -m returns i386 or x86_64
+	    UNAME_PROCESSOR=$UNAME_MACHINE
 	fi
-	echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
-	exit ;;
+	GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE
+	;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
 	UNAME_PROCESSOR=`uname -p`
 	if test "$UNAME_PROCESSOR" = x86; then
 		UNAME_PROCESSOR=i386
 		UNAME_MACHINE=pc
 	fi
-	echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
-	exit ;;
+	GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE
+	;;
     *:QNX:*:4*)
-	echo i386-pc-qnx
-	exit ;;
+	GUESS=i386-pc-qnx
+	;;
     NEO-*:NONSTOP_KERNEL:*:*)
-	echo neo-tandem-nsk"$UNAME_RELEASE"
-	exit ;;
+	GUESS=neo-tandem-nsk$UNAME_RELEASE
+	;;
     NSE-*:NONSTOP_KERNEL:*:*)
-	echo nse-tandem-nsk"$UNAME_RELEASE"
-	exit ;;
+	GUESS=nse-tandem-nsk$UNAME_RELEASE
+	;;
     NSR-*:NONSTOP_KERNEL:*:*)
-	echo nsr-tandem-nsk"$UNAME_RELEASE"
-	exit ;;
+	GUESS=nsr-tandem-nsk$UNAME_RELEASE
+	;;
     NSV-*:NONSTOP_KERNEL:*:*)
-	echo nsv-tandem-nsk"$UNAME_RELEASE"
-	exit ;;
+	GUESS=nsv-tandem-nsk$UNAME_RELEASE
+	;;
     NSX-*:NONSTOP_KERNEL:*:*)
-	echo nsx-tandem-nsk"$UNAME_RELEASE"
-	exit ;;
+	GUESS=nsx-tandem-nsk$UNAME_RELEASE
+	;;
     *:NonStop-UX:*:*)
-	echo mips-compaq-nonstopux
-	exit ;;
+	GUESS=mips-compaq-nonstopux
+	;;
     BS2000:POSIX*:*:*)
-	echo bs2000-siemens-sysv
-	exit ;;
+	GUESS=bs2000-siemens-sysv
+	;;
     DS/*:UNIX_System_V:*:*)
-	echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE"
-	exit ;;
+	GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE
+	;;
     *:Plan9:*:*)
 	# "uname -m" is not consistent, so use $cputype instead. 386
 	# is converted to i386 for consistency with other x86
 	# operating systems.
-	# shellcheck disable=SC2154
-	if test "$cputype" = 386; then
+	if test "${cputype-}" = 386; then
 	    UNAME_MACHINE=i386
-	else
-	    UNAME_MACHINE="$cputype"
+	elif test "x${cputype-}" != x; then
+	    UNAME_MACHINE=$cputype
 	fi
-	echo "$UNAME_MACHINE"-unknown-plan9
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-plan9
+	;;
     *:TOPS-10:*:*)
-	echo pdp10-unknown-tops10
-	exit ;;
+	GUESS=pdp10-unknown-tops10
+	;;
     *:TENEX:*:*)
-	echo pdp10-unknown-tenex
-	exit ;;
+	GUESS=pdp10-unknown-tenex
+	;;
     KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
-	echo pdp10-dec-tops20
-	exit ;;
+	GUESS=pdp10-dec-tops20
+	;;
     XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
-	echo pdp10-xkl-tops20
-	exit ;;
+	GUESS=pdp10-xkl-tops20
+	;;
     *:TOPS-20:*:*)
-	echo pdp10-unknown-tops20
-	exit ;;
+	GUESS=pdp10-unknown-tops20
+	;;
     *:ITS:*:*)
-	echo pdp10-unknown-its
-	exit ;;
+	GUESS=pdp10-unknown-its
+	;;
     SEI:*:*:SEIUX)
-	echo mips-sei-seiux"$UNAME_RELEASE"
-	exit ;;
+	GUESS=mips-sei-seiux$UNAME_RELEASE
+	;;
     *:DragonFly:*:*)
-	echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
-	exit ;;
+	DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+	GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL
+	;;
     *:*VMS:*:*)
 	UNAME_MACHINE=`(uname -p) 2>/dev/null`
-	case "$UNAME_MACHINE" in
-	    A*) echo alpha-dec-vms ; exit ;;
-	    I*) echo ia64-dec-vms ; exit ;;
-	    V*) echo vax-dec-vms ; exit ;;
+	case $UNAME_MACHINE in
+	    A*) GUESS=alpha-dec-vms ;;
+	    I*) GUESS=ia64-dec-vms ;;
+	    V*) GUESS=vax-dec-vms ;;
 	esac ;;
     *:XENIX:*:SysV)
-	echo i386-pc-xenix
-	exit ;;
+	GUESS=i386-pc-xenix
+	;;
     i*86:skyos:*:*)
-	echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`"
-	exit ;;
+	SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`
+	GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL
+	;;
     i*86:rdos:*:*)
-	echo "$UNAME_MACHINE"-pc-rdos
-	exit ;;
-    i*86:AROS:*:*)
-	echo "$UNAME_MACHINE"-pc-aros
-	exit ;;
+	GUESS=$UNAME_MACHINE-pc-rdos
+	;;
+    i*86:Fiwix:*:*)
+	GUESS=$UNAME_MACHINE-pc-fiwix
+	;;
+    *:AROS:*:*)
+	GUESS=$UNAME_MACHINE-unknown-aros
+	;;
     x86_64:VMkernel:*:*)
-	echo "$UNAME_MACHINE"-unknown-esx
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-esx
+	;;
     amd64:Isilon\ OneFS:*:*)
-	echo x86_64-unknown-onefs
-	exit ;;
+	GUESS=x86_64-unknown-onefs
+	;;
+    *:Unleashed:*:*)
+	GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
+	;;
 esac
 
+# Do we have a guess based on uname results?
+if test "x$GUESS" != x; then
+    echo "$GUESS"
+    exit
+fi
+
+# No uname command or uname output not recognized.
+set_cc_for_build
+cat > "$dummy.c" <<EOF
+#ifdef _SEQUENT_
+#include <sys/types.h>
+#include <sys/utsname.h>
+#endif
+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
+#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
+#include <signal.h>
+#if defined(_SIZE_T_) || defined(SIGLOST)
+#include <sys/utsname.h>
+#endif
+#endif
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+  "4"
+#else
+  ""
+#endif
+  ); exit (0);
+#endif
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+  struct utsname un;
+
+  uname(&un);
+  if (strncmp(un.version, "V2", 2) == 0) {
+    printf ("i386-sequent-ptx2\n"); exit (0);
+  }
+  if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+    printf ("i386-sequent-ptx1\n"); exit (0);
+  }
+  printf ("i386-sequent-ptx\n"); exit (0);
+#endif
+
+#if defined (vax)
+#if !defined (ultrix)
+#include <sys/param.h>
+#if defined (BSD)
+#if BSD == 43
+  printf ("vax-dec-bsd4.3\n"); exit (0);
+#else
+#if BSD == 199006
+  printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#else
+  printf ("vax-dec-bsd\n"); exit (0);
+#endif
+#endif
+#else
+  printf ("vax-dec-bsd\n"); exit (0);
+#endif
+#else
+#if defined(_SIZE_T_) || defined(SIGLOST)
+  struct utsname un;
+  uname (&un);
+  printf ("vax-dec-ultrix%s\n", un.release); exit (0);
+#else
+  printf ("vax-dec-ultrix\n"); exit (0);
+#endif
+#endif
+#endif
+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
+#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
+#if defined(_SIZE_T_) || defined(SIGLOST)
+  struct utsname *un;
+  uname (&un);
+  printf ("mips-dec-ultrix%s\n", un.release); exit (0);
+#else
+  printf ("mips-dec-ultrix\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` &&
+	{ echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; }
+
 echo "$0: unable to guess system type" >&2
 
-case "$UNAME_MACHINE:$UNAME_SYSTEM" in
+case $UNAME_MACHINE:$UNAME_SYSTEM in
     mips:Linux | mips64:Linux)
 	# If we got here on MIPS GNU/Linux, output extra information.
 	cat >&2 <<EOF
@@ -1445,9 +1718,17 @@ This script (version $timestamp), has failed to recognize the
 operating system you are using. If your script is old, overwrite *all*
 copies of config.guess and config.sub with the latest versions from:
 
-  https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+  https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
 and
-  https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+  https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
+EOF
+
+our_year=`echo $timestamp | sed 's,-.*,,'`
+thisyear=`date +%Y`
+# shellcheck disable=SC2003
+script_age=`expr "$thisyear" - "$our_year"`
+if test "$script_age" -lt 3 ; then
+   cat >&2 <<EOF
 
 If $0 has already been updated, send the following data and any
 information you think might be pertinent to config-patches@gnu.org to
@@ -1475,6 +1756,7 @@ UNAME_RELEASE = "$UNAME_RELEASE"
 UNAME_SYSTEM  = "$UNAME_SYSTEM"
 UNAME_VERSION = "$UNAME_VERSION"
 EOF
+fi
 
 exit 1
 
diff --git a/config.h.in b/config.h.in
index 38fa2d9..ee64d51 100644
--- a/config.h.in
+++ b/config.h.in
@@ -27,12 +27,12 @@
 /* Define to 1 if you have the `z' library (-lz). */
 #undef HAVE_LIBZ
 
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
 /* Define to 1 if you have the <stdint.h> header file. */
 #undef HAVE_STDINT_H
 
+/* Define to 1 if you have the <stdio.h> header file. */
+#undef HAVE_STDIO_H
+
 /* Define to 1 if you have the <stdlib.h> header file. */
 #undef HAVE_STDLIB_H
 
@@ -75,7 +75,9 @@
 /* Define to the version of this package. */
 #undef PACKAGE_VERSION
 
-/* Define to 1 if you have the ANSI C header files. */
+/* Define to 1 if all of the C90 standard headers exist (not just the ones
+   required in a freestanding environment). This macro is provided for
+   backward compatibility; new code need not use it. */
 #undef STDC_HEADERS
 
 /* Defined when tests are to be built */
diff --git a/config.sub b/config.sub
index b51fb8c..b41da55 100755
--- a/config.sub
+++ b/config.sub
@@ -1,12 +1,14 @@
-#! /bin/sh
+#!/usr/bin/sh
 # Configuration validation subroutine script.
-#   Copyright 1992-2018 Free Software Foundation, Inc.
+#   Copyright 1992-2022 Free Software Foundation, Inc.
 
-timestamp='2018-08-29'
+# shellcheck disable=SC2006,SC2268 # see below for rationale
+
+timestamp='2022-01-03'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
+# the Free Software Foundation, either version 3 of the License, or
 # (at your option) any later version.
 #
 # This program is distributed in the hope that it will be useful, but
@@ -33,7 +35,7 @@ timestamp='2018-08-29'
 # Otherwise, we print the canonical config type on stdout and succeed.
 
 # You can get the latest version of this script from:
-# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
 
 # This file is supposed to be the same for all GNU packages
 # and recognize all the CPU types, system types and aliases
@@ -50,6 +52,13 @@ timestamp='2018-08-29'
 #	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
 # It is wrong to echo any other type of specification.
 
+# The "shellcheck disable" line above the timestamp inhibits complaints
+# about features and limitations of the classic Bourne shell that were
+# superseded or lifted in POSIX.  However, this script identifies a wide
+# variety of pre-POSIX systems that do not have POSIX shells at all, and
+# even some reasonably current systems (Solaris 10 as case-in-point) still
+# have a pre-POSIX /bin/sh.
+
 me=`echo "$0" | sed -e 's,.*/,,'`
 
 usage="\
@@ -67,7 +76,7 @@ Report bugs and patches to <config-patches@gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright 1992-2018 Free Software Foundation, Inc.
+Copyright 1992-2022 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -89,7 +98,7 @@ while test $# -gt 0 ; do
     - )	# Use stdin as input.
        break ;;
     -* )
-       echo "$me: invalid option $1$help"
+       echo "$me: invalid option $1$help" >&2
        exit 1 ;;
 
     *local*)
@@ -111,9 +120,12 @@ case $# in
 esac
 
 # Split fields of configuration type
-IFS="-" read -r field1 field2 field3 field4 <<EOF
+# shellcheck disable=SC2162
+saved_IFS=$IFS
+IFS="-" read field1 field2 field3 field4 <<EOF
 $1
 EOF
+IFS=$saved_IFS
 
 # Separate into logical components for further validation
 case $1 in
@@ -123,37 +135,36 @@ case $1 in
 		;;
 	*-*-*-*)
 		basic_machine=$field1-$field2
-		os=$field3-$field4
+		basic_os=$field3-$field4
 		;;
 	*-*-*)
 		# Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
 		# parts
 		maybe_os=$field2-$field3
 		case $maybe_os in
-			nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \
-			| linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \
+			nto-qnx* | linux-* | uclinux-uclibc* \
 			| uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
 			| netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
 			| storm-chaos* | os2-emx* | rtmk-nova*)
 				basic_machine=$field1
-				os=$maybe_os
+				basic_os=$maybe_os
 				;;
 			android-linux)
 				basic_machine=$field1-unknown
-				os=linux-android
+				basic_os=linux-android
 				;;
 			*)
 				basic_machine=$field1-$field2
-				os=$field3
+				basic_os=$field3
 				;;
 		esac
 		;;
 	*-*)
-		# A lone config we happen to match not fitting any patern
+		# A lone config we happen to match not fitting any pattern
 		case $field1-$field2 in
 			decstation-3100)
 				basic_machine=mips-dec
-				os=
+				basic_os=
 				;;
 			*-*)
 				# Second component is usually, but not always the OS
@@ -161,7 +172,11 @@ case $1 in
 					# Prevent following clause from handling this valid os
 					sun*os*)
 						basic_machine=$field1
-						os=$field2
+						basic_os=$field2
+						;;
+					zephyr*)
+						basic_machine=$field1-unknown
+						basic_os=$field2
 						;;
 					# Manufacturers
 					dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
@@ -174,11 +189,11 @@ case $1 in
 					| microblaze* | sim | cisco \
 					| oki | wec | wrs | winbond)
 						basic_machine=$field1-$field2
-						os=
+						basic_os=
 						;;
 					*)
 						basic_machine=$field1
-						os=$field2
+						basic_os=$field2
 						;;
 				esac
 			;;
@@ -190,450 +205,451 @@ case $1 in
 		case $field1 in
 			386bsd)
 				basic_machine=i386-pc
-				os=bsd
+				basic_os=bsd
 				;;
 			a29khif)
 				basic_machine=a29k-amd
-				os=udi
+				basic_os=udi
 				;;
 			adobe68k)
 				basic_machine=m68010-adobe
-				os=scout
+				basic_os=scout
 				;;
 			alliant)
 				basic_machine=fx80-alliant
-				os=
+				basic_os=
 				;;
 			altos | altos3068)
 				basic_machine=m68k-altos
-				os=
+				basic_os=
 				;;
 			am29k)
 				basic_machine=a29k-none
-				os=bsd
+				basic_os=bsd
 				;;
 			amdahl)
 				basic_machine=580-amdahl
-				os=sysv
+				basic_os=sysv
 				;;
 			amiga)
 				basic_machine=m68k-unknown
-				os=
+				basic_os=
 				;;
 			amigaos | amigados)
 				basic_machine=m68k-unknown
-				os=amigaos
+				basic_os=amigaos
 				;;
 			amigaunix | amix)
 				basic_machine=m68k-unknown
-				os=sysv4
+				basic_os=sysv4
 				;;
 			apollo68)
 				basic_machine=m68k-apollo
-				os=sysv
+				basic_os=sysv
 				;;
 			apollo68bsd)
 				basic_machine=m68k-apollo
-				os=bsd
+				basic_os=bsd
 				;;
 			aros)
 				basic_machine=i386-pc
-				os=aros
+				basic_os=aros
 				;;
 			aux)
 				basic_machine=m68k-apple
-				os=aux
+				basic_os=aux
 				;;
 			balance)
 				basic_machine=ns32k-sequent
-				os=dynix
+				basic_os=dynix
 				;;
 			blackfin)
 				basic_machine=bfin-unknown
-				os=linux
+				basic_os=linux
 				;;
 			cegcc)
 				basic_machine=arm-unknown
-				os=cegcc
+				basic_os=cegcc
 				;;
 			convex-c1)
 				basic_machine=c1-convex
-				os=bsd
+				basic_os=bsd
 				;;
 			convex-c2)
 				basic_machine=c2-convex
-				os=bsd
+				basic_os=bsd
 				;;
 			convex-c32)
 				basic_machine=c32-convex
-				os=bsd
+				basic_os=bsd
 				;;
 			convex-c34)
 				basic_machine=c34-convex
-				os=bsd
+				basic_os=bsd
 				;;
 			convex-c38)
 				basic_machine=c38-convex
-				os=bsd
+				basic_os=bsd
 				;;
 			cray)
 				basic_machine=j90-cray
-				os=unicos
+				basic_os=unicos
 				;;
 			crds | unos)
 				basic_machine=m68k-crds
-				os=
+				basic_os=
 				;;
 			da30)
 				basic_machine=m68k-da30
-				os=
+				basic_os=
 				;;
 			decstation | pmax | pmin | dec3100 | decstatn)
 				basic_machine=mips-dec
-				os=
+				basic_os=
 				;;
 			delta88)
 				basic_machine=m88k-motorola
-				os=sysv3
+				basic_os=sysv3
 				;;
 			dicos)
 				basic_machine=i686-pc
-				os=dicos
+				basic_os=dicos
 				;;
 			djgpp)
 				basic_machine=i586-pc
-				os=msdosdjgpp
+				basic_os=msdosdjgpp
 				;;
 			ebmon29k)
 				basic_machine=a29k-amd
-				os=ebmon
+				basic_os=ebmon
 				;;
 			es1800 | OSE68k | ose68k | ose | OSE)
 				basic_machine=m68k-ericsson
-				os=ose
+				basic_os=ose
 				;;
 			gmicro)
 				basic_machine=tron-gmicro
-				os=sysv
+				basic_os=sysv
 				;;
 			go32)
 				basic_machine=i386-pc
-				os=go32
+				basic_os=go32
 				;;
 			h8300hms)
 				basic_machine=h8300-hitachi
-				os=hms
+				basic_os=hms
 				;;
 			h8300xray)
 				basic_machine=h8300-hitachi
-				os=xray
+				basic_os=xray
 				;;
 			h8500hms)
 				basic_machine=h8500-hitachi
-				os=hms
+				basic_os=hms
 				;;
 			harris)
 				basic_machine=m88k-harris
-				os=sysv3
+				basic_os=sysv3
 				;;
-			hp300)
+			hp300 | hp300hpux)
 				basic_machine=m68k-hp
+				basic_os=hpux
 				;;
 			hp300bsd)
 				basic_machine=m68k-hp
-				os=bsd
-				;;
-			hp300hpux)
-				basic_machine=m68k-hp
-				os=hpux
+				basic_os=bsd
 				;;
 			hppaosf)
 				basic_machine=hppa1.1-hp
-				os=osf
+				basic_os=osf
 				;;
 			hppro)
 				basic_machine=hppa1.1-hp
-				os=proelf
+				basic_os=proelf
 				;;
 			i386mach)
 				basic_machine=i386-mach
-				os=mach
-				;;
-			vsta)
-				basic_machine=i386-pc
-				os=vsta
+				basic_os=mach
 				;;
 			isi68 | isi)
 				basic_machine=m68k-isi
-				os=sysv
+				basic_os=sysv
 				;;
 			m68knommu)
 				basic_machine=m68k-unknown
-				os=linux
+				basic_os=linux
 				;;
 			magnum | m3230)
 				basic_machine=mips-mips
-				os=sysv
+				basic_os=sysv
 				;;
 			merlin)
 				basic_machine=ns32k-utek
-				os=sysv
+				basic_os=sysv
 				;;
 			mingw64)
 				basic_machine=x86_64-pc
-				os=mingw64
+				basic_os=mingw64
 				;;
 			mingw32)
 				basic_machine=i686-pc
-				os=mingw32
+				basic_os=mingw32
 				;;
 			mingw32ce)
 				basic_machine=arm-unknown
-				os=mingw32ce
+				basic_os=mingw32ce
 				;;
 			monitor)
 				basic_machine=m68k-rom68k
-				os=coff
+				basic_os=coff
 				;;
 			morphos)
 				basic_machine=powerpc-unknown
-				os=morphos
+				basic_os=morphos
 				;;
 			moxiebox)
 				basic_machine=moxie-unknown
-				os=moxiebox
+				basic_os=moxiebox
 				;;
 			msdos)
 				basic_machine=i386-pc
-				os=msdos
+				basic_os=msdos
 				;;
 			msys)
 				basic_machine=i686-pc
-				os=msys
+				basic_os=msys
 				;;
 			mvs)
 				basic_machine=i370-ibm
-				os=mvs
+				basic_os=mvs
 				;;
 			nacl)
 				basic_machine=le32-unknown
-				os=nacl
+				basic_os=nacl
 				;;
 			ncr3000)
 				basic_machine=i486-ncr
-				os=sysv4
+				basic_os=sysv4
 				;;
 			netbsd386)
 				basic_machine=i386-pc
-				os=netbsd
+				basic_os=netbsd
 				;;
 			netwinder)
 				basic_machine=armv4l-rebel
-				os=linux
+				basic_os=linux
 				;;
 			news | news700 | news800 | news900)
 				basic_machine=m68k-sony
-				os=newsos
+				basic_os=newsos
 				;;
 			news1000)
 				basic_machine=m68030-sony
-				os=newsos
+				basic_os=newsos
 				;;
 			necv70)
 				basic_machine=v70-nec
-				os=sysv
+				basic_os=sysv
 				;;
 			nh3000)
 				basic_machine=m68k-harris
-				os=cxux
+				basic_os=cxux
 				;;
 			nh[45]000)
 				basic_machine=m88k-harris
-				os=cxux
+				basic_os=cxux
 				;;
 			nindy960)
 				basic_machine=i960-intel
-				os=nindy
+				basic_os=nindy
 				;;
 			mon960)
 				basic_machine=i960-intel
-				os=mon960
+				basic_os=mon960
 				;;
 			nonstopux)
 				basic_machine=mips-compaq
-				os=nonstopux
+				basic_os=nonstopux
 				;;
 			os400)
 				basic_machine=powerpc-ibm
-				os=os400
+				basic_os=os400
 				;;
 			OSE68000 | ose68000)
 				basic_machine=m68000-ericsson
-				os=ose
+				basic_os=ose
 				;;
 			os68k)
 				basic_machine=m68k-none
-				os=os68k
+				basic_os=os68k
 				;;
 			paragon)
 				basic_machine=i860-intel
-				os=osf
+				basic_os=osf
 				;;
 			parisc)
 				basic_machine=hppa-unknown
-				os=linux
+				basic_os=linux
+				;;
+			psp)
+				basic_machine=mipsallegrexel-sony
+				basic_os=psp
 				;;
 			pw32)
 				basic_machine=i586-unknown
-				os=pw32
+				basic_os=pw32
 				;;
 			rdos | rdos64)
 				basic_machine=x86_64-pc
-				os=rdos
+				basic_os=rdos
 				;;
 			rdos32)
 				basic_machine=i386-pc
-				os=rdos
+				basic_os=rdos
 				;;
 			rom68k)
 				basic_machine=m68k-rom68k
-				os=coff
+				basic_os=coff
 				;;
 			sa29200)
 				basic_machine=a29k-amd
-				os=udi
+				basic_os=udi
 				;;
 			sei)
 				basic_machine=mips-sei
-				os=seiux
+				basic_os=seiux
 				;;
 			sequent)
 				basic_machine=i386-sequent
-				os=
+				basic_os=
 				;;
 			sps7)
 				basic_machine=m68k-bull
-				os=sysv2
+				basic_os=sysv2
 				;;
 			st2000)
 				basic_machine=m68k-tandem
-				os=
+				basic_os=
 				;;
 			stratus)
 				basic_machine=i860-stratus
-				os=sysv4
+				basic_os=sysv4
 				;;
 			sun2)
 				basic_machine=m68000-sun
-				os=
+				basic_os=
 				;;
 			sun2os3)
 				basic_machine=m68000-sun
-				os=sunos3
+				basic_os=sunos3
 				;;
 			sun2os4)
 				basic_machine=m68000-sun
-				os=sunos4
+				basic_os=sunos4
 				;;
 			sun3)
 				basic_machine=m68k-sun
-				os=
+				basic_os=
 				;;
 			sun3os3)
 				basic_machine=m68k-sun
-				os=sunos3
+				basic_os=sunos3
 				;;
 			sun3os4)
 				basic_machine=m68k-sun
-				os=sunos4
+				basic_os=sunos4
 				;;
 			sun4)
 				basic_machine=sparc-sun
-				os=
+				basic_os=
 				;;
 			sun4os3)
 				basic_machine=sparc-sun
-				os=sunos3
+				basic_os=sunos3
 				;;
 			sun4os4)
 				basic_machine=sparc-sun
-				os=sunos4
+				basic_os=sunos4
 				;;
 			sun4sol2)
 				basic_machine=sparc-sun
-				os=solaris2
+				basic_os=solaris2
 				;;
 			sun386 | sun386i | roadrunner)
 				basic_machine=i386-sun
-				os=
+				basic_os=
 				;;
 			sv1)
 				basic_machine=sv1-cray
-				os=unicos
+				basic_os=unicos
 				;;
 			symmetry)
 				basic_machine=i386-sequent
-				os=dynix
+				basic_os=dynix
 				;;
 			t3e)
 				basic_machine=alphaev5-cray
-				os=unicos
+				basic_os=unicos
 				;;
 			t90)
 				basic_machine=t90-cray
-				os=unicos
+				basic_os=unicos
 				;;
 			toad1)
 				basic_machine=pdp10-xkl
-				os=tops20
+				basic_os=tops20
 				;;
 			tpf)
 				basic_machine=s390x-ibm
-				os=tpf
+				basic_os=tpf
 				;;
 			udi29k)
 				basic_machine=a29k-amd
-				os=udi
+				basic_os=udi
 				;;
 			ultra3)
 				basic_machine=a29k-nyu
-				os=sym1
+				basic_os=sym1
 				;;
 			v810 | necv810)
 				basic_machine=v810-nec
-				os=none
+				basic_os=none
 				;;
 			vaxv)
 				basic_machine=vax-dec
-				os=sysv
+				basic_os=sysv
 				;;
 			vms)
 				basic_machine=vax-dec
-				os=vms
+				basic_os=vms
+				;;
+			vsta)
+				basic_machine=i386-pc
+				basic_os=vsta
 				;;
 			vxworks960)
 				basic_machine=i960-wrs
-				os=vxworks
+				basic_os=vxworks
 				;;
 			vxworks68)
 				basic_machine=m68k-wrs
-				os=vxworks
+				basic_os=vxworks
 				;;
 			vxworks29k)
 				basic_machine=a29k-wrs
-				os=vxworks
+				basic_os=vxworks
 				;;
 			xbox)
 				basic_machine=i686-pc
-				os=mingw32
+				basic_os=mingw32
 				;;
 			ymp)
 				basic_machine=ymp-cray
-				os=unicos
+				basic_os=unicos
 				;;
 			*)
 				basic_machine=$1
-				os=
+				basic_os=
 				;;
 		esac
 		;;
@@ -685,17 +701,17 @@ case $basic_machine in
 	bluegene*)
 		cpu=powerpc
 		vendor=ibm
-		os=cnk
+		basic_os=cnk
 		;;
 	decsystem10* | dec10*)
 		cpu=pdp10
 		vendor=dec
-		os=tops10
+		basic_os=tops10
 		;;
 	decsystem20* | dec20*)
 		cpu=pdp10
 		vendor=dec
-		os=tops20
+		basic_os=tops20
 		;;
 	delta | 3300 | motorola-3300 | motorola-delta \
 	      | 3300-motorola | delta-motorola)
@@ -705,7 +721,7 @@ case $basic_machine in
 	dpx2*)
 		cpu=m68k
 		vendor=bull
-		os=sysv3
+		basic_os=sysv3
 		;;
 	encore | umax | mmax)
 		cpu=ns32k
@@ -714,7 +730,7 @@ case $basic_machine in
 	elxsi)
 		cpu=elxsi
 		vendor=elxsi
-		os=${os:-bsd}
+		basic_os=${basic_os:-bsd}
 		;;
 	fx2800)
 		cpu=i860
@@ -727,7 +743,7 @@ case $basic_machine in
 	h3050r* | hiux*)
 		cpu=hppa1.1
 		vendor=hitachi
-		os=hiuxwe2
+		basic_os=hiuxwe2
 		;;
 	hp3k9[0-9][0-9] | hp9[0-9][0-9])
 		cpu=hppa1.0
@@ -770,36 +786,36 @@ case $basic_machine in
 	i*86v32)
 		cpu=`echo "$1" | sed -e 's/86.*/86/'`
 		vendor=pc
-		os=sysv32
+		basic_os=sysv32
 		;;
 	i*86v4*)
 		cpu=`echo "$1" | sed -e 's/86.*/86/'`
 		vendor=pc
-		os=sysv4
+		basic_os=sysv4
 		;;
 	i*86v)
 		cpu=`echo "$1" | sed -e 's/86.*/86/'`
 		vendor=pc
-		os=sysv
+		basic_os=sysv
 		;;
 	i*86sol2)
 		cpu=`echo "$1" | sed -e 's/86.*/86/'`
 		vendor=pc
-		os=solaris2
+		basic_os=solaris2
 		;;
 	j90 | j90-cray)
 		cpu=j90
 		vendor=cray
-		os=${os:-unicos}
+		basic_os=${basic_os:-unicos}
 		;;
 	iris | iris4d)
 		cpu=mips
 		vendor=sgi
-		case $os in
+		case $basic_os in
 		    irix*)
 			;;
 		    *)
-			os=irix4
+			basic_os=irix4
 			;;
 		esac
 		;;
@@ -810,24 +826,26 @@ case $basic_machine in
 	*mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
 		cpu=m68k
 		vendor=atari
-		os=mint
+		basic_os=mint
 		;;
 	news-3600 | risc-news)
 		cpu=mips
 		vendor=sony
-		os=newsos
+		basic_os=newsos
 		;;
 	next | m*-next)
 		cpu=m68k
 		vendor=next
-		case $os in
-		    nextstep* )
+		case $basic_os in
+		    openstep*)
+		        ;;
+		    nextstep*)
 			;;
 		    ns2*)
-		      os=nextstep2
+		      basic_os=nextstep2
 			;;
 		    *)
-		      os=nextstep3
+		      basic_os=nextstep3
 			;;
 		esac
 		;;
@@ -838,12 +856,12 @@ case $basic_machine in
 	op50n-* | op60c-*)
 		cpu=hppa1.1
 		vendor=oki
-		os=proelf
+		basic_os=proelf
 		;;
 	pa-hitachi)
 		cpu=hppa1.1
 		vendor=hitachi
-		os=hiuxwe2
+		basic_os=hiuxwe2
 		;;
 	pbd)
 		cpu=sparc
@@ -880,12 +898,12 @@ case $basic_machine in
 	sde)
 		cpu=mipsisa32
 		vendor=sde
-		os=${os:-elf}
+		basic_os=${basic_os:-elf}
 		;;
 	simso-wrs)
 		cpu=sparclite
 		vendor=wrs
-		os=vxworks
+		basic_os=vxworks
 		;;
 	tower | tower-32)
 		cpu=m68k
@@ -902,7 +920,7 @@ case $basic_machine in
 	w89k-*)
 		cpu=hppa1.1
 		vendor=winbond
-		os=proelf
+		basic_os=proelf
 		;;
 	none)
 		cpu=none
@@ -918,9 +936,12 @@ case $basic_machine in
 		;;
 
 	*-*)
-		IFS="-" read -r cpu vendor <<EOF
+		# shellcheck disable=SC2162
+		saved_IFS=$IFS
+		IFS="-" read cpu vendor <<EOF
 $basic_machine
 EOF
+		IFS=$saved_IFS
 		;;
 	# We use `pc' rather than `unknown'
 	# because (1) that's what they normally are, and
@@ -950,15 +971,15 @@ unset -v basic_machine
 
 # Decode basic machines in the full and proper CPU-Company form.
 case $cpu-$vendor in
-	# Here we handle the default manufacturer of certain CPU types in cannonical form. It is in
+	# Here we handle the default manufacturer of certain CPU types in canonical form. It is in
 	# some cases the only manufacturer, in others, it is the most popular.
 	craynv-unknown)
 		vendor=cray
-		os=${os:-unicosmp}
+		basic_os=${basic_os:-unicosmp}
 		;;
 	c90-unknown | c90-cray)
 		vendor=cray
-		os=${os:-unicos}
+		basic_os=${Basic_os:-unicos}
 		;;
 	fx80-unknown)
 		vendor=alliant
@@ -999,10 +1020,15 @@ case $cpu-$vendor in
 		;;
 
 	# Here we normalize CPU types with a missing or matching vendor
+	armh-unknown | armh-alt)
+		cpu=armv7l
+		vendor=alt
+		basic_os=${basic_os:-linux-gnueabihf}
+		;;
 	dpx20-unknown | dpx20-bull)
 		cpu=rs6000
 		vendor=bull
-		os=${os:-bosx}
+		basic_os=${basic_os:-bosx}
 		;;
 
 	# Here we normalize CPU types irrespective of the vendor
@@ -1011,7 +1037,7 @@ case $cpu-$vendor in
 		;;
 	blackfin-*)
 		cpu=bfin
-		os=linux
+		basic_os=linux
 		;;
 	c54x-*)
 		cpu=tic54x
@@ -1024,7 +1050,7 @@ case $cpu-$vendor in
 		;;
 	e500v[12]-*)
 		cpu=powerpc
-		os=$os"spe"
+		basic_os=${basic_os}"spe"
 		;;
 	mips3*-*)
 		cpu=mips64
@@ -1034,7 +1060,7 @@ case $cpu-$vendor in
 		;;
 	m68knommu-*)
 		cpu=m68k
-		os=linux
+		basic_os=linux
 		;;
 	m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
 		cpu=s12z
@@ -1044,7 +1070,7 @@ case $cpu-$vendor in
 		;;
 	parisc-*)
 		cpu=hppa
-		os=linux
+		basic_os=linux
 		;;
 	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
 		cpu=i586
@@ -1100,11 +1126,14 @@ case $cpu-$vendor in
 	xscale-* | xscalee[bl]-*)
 		cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
 		;;
+	arm64-* | aarch64le-*)
+		cpu=aarch64
+		;;
 
-	# Recognize the cannonical CPU Types that limit and/or modify the
+	# Recognize the canonical CPU Types that limit and/or modify the
 	# company names they are paired with.
 	cr16-*)
-		os=${os:-elf}
+		basic_os=${basic_os:-elf}
 		;;
 	crisv32-* | etraxfs*-*)
 		cpu=crisv32
@@ -1115,7 +1144,7 @@ case $cpu-$vendor in
 		vendor=axis
 		;;
 	crx-*)
-		os=${os:-elf}
+		basic_os=${basic_os:-elf}
 		;;
 	neo-tandem)
 		cpu=neo
@@ -1137,20 +1166,16 @@ case $cpu-$vendor in
 		cpu=nsx
 		vendor=tandem
 		;;
-	s390-*)
-		cpu=s390
-		vendor=ibm
-		;;
-	s390x-*)
-		cpu=s390x
-		vendor=ibm
+	mipsallegrexel-sony)
+		cpu=mipsallegrexel
+		vendor=sony
 		;;
 	tile*-*)
-		os=${os:-linux-gnu}
+		basic_os=${basic_os:-linux-gnu}
 		;;
 
 	*)
-		# Recognize the cannonical CPU types that are allowed with any
+		# Recognize the canonical CPU types that are allowed with any
 		# company name.
 		case $cpu in
 			1750a | 580 \
@@ -1161,13 +1186,14 @@ case $cpu-$vendor in
 			| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
 			| alphapca5[67] | alpha64pca5[67] \
 			| am33_2.0 \
-			| arc | arceb \
-			| arm  | arm[lb]e | arme[lb] | armv* \
+			| amdgcn \
+			| arc | arceb | arc32 | arc64 \
+			| arm | arm[lb]e | arme[lb] | armv* \
 			| avr | avr32 \
 			| asmjs \
 			| ba \
 			| be32 | be64 \
-			| bfin | bs2000 \
+			| bfin | bpf | bs2000 \
 			| c[123]* | c30 | [cjt]90 | c4x \
 			| c8051 | clipper | craynv | csky | cydra \
 			| d10v | d30v | dlx | dsp16xx \
@@ -1181,14 +1207,15 @@ case $cpu-$vendor in
 			| k1om \
 			| le32 | le64 \
 			| lm32 \
+			| loongarch32 | loongarch64 | loongarchx32 \
 			| m32c | m32r | m32rle \
-			| m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k | v70 | w65 \
-			| m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip \
+			| m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
+			| m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
 			| m88110 | m88k | maxq | mb | mcore | mep | metag \
 			| microblaze | microblazeel \
 			| mips | mipsbe | mipseb | mipsel | mipsle \
 			| mips16 \
-			| mips64 | mips64el \
+			| mips64 | mips64eb | mips64el \
 			| mips64octeon | mips64octeonel \
 			| mips64orion | mips64orionel \
 			| mips64r5900 | mips64r5900el \
@@ -1199,9 +1226,13 @@ case $cpu-$vendor in
 			| mips64vr5900 | mips64vr5900el \
 			| mipsisa32 | mipsisa32el \
 			| mipsisa32r2 | mipsisa32r2el \
+			| mipsisa32r3 | mipsisa32r3el \
+			| mipsisa32r5 | mipsisa32r5el \
 			| mipsisa32r6 | mipsisa32r6el \
 			| mipsisa64 | mipsisa64el \
 			| mipsisa64r2 | mipsisa64r2el \
+			| mipsisa64r3 | mipsisa64r3el \
+			| mipsisa64r5 | mipsisa64r5el \
 			| mipsisa64r6 | mipsisa64r6el \
 			| mipsisa64sb1 | mipsisa64sb1el \
 			| mipsisa64sr71k | mipsisa64sr71kel \
@@ -1215,32 +1246,37 @@ case $cpu-$vendor in
 			| nds32 | nds32le | nds32be \
 			| nfp \
 			| nios | nios2 | nios2eb | nios2el \
-			| none | np1 | ns16k | ns32k \
+			| none | np1 | ns16k | ns32k | nvptx \
 			| open8 \
 			| or1k* \
 			| or32 \
 			| orion \
+			| picochip \
 			| pdp10 | pdp11 | pj | pjl | pn | power \
 			| powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
 			| pru \
 			| pyramid \
-			| riscv | riscv32 | riscv64 \
+			| riscv | riscv32 | riscv32be | riscv64 | riscv64be \
 			| rl78 | romp | rs6000 | rx \
+			| s390 | s390x \
 			| score \
-			| sh | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
+			| sh | shl \
+			| sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
 			| sh[1234]e[lb] |  sh[12345][lb]e | sh[23]ele | sh64 | sh64le \
 			| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \
 			| sparclite \
 			| sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \
 			| spu \
 			| tahoe \
+			| thumbv7* \
 			| tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
 			| tron \
 			| ubicom32 \
-			| v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
+			| v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
 			| vax \
 			| visium \
-			| wasm32 \
+			| w65 \
+			| wasm32 | wasm64 \
 			| we32k \
 			| x86 | x86_64 | xc16x | xgate | xps100 \
 			| xstormy16 | xtensa* \
@@ -1270,8 +1306,49 @@ esac
 
 # Decode manufacturer-specific aliases for certain operating systems.
 
-if [ x$os != x ]
+if test x$basic_os != x
 then
+
+# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just
+# set os.
+case $basic_os in
+	gnu/linux*)
+		kernel=linux
+		os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'`
+		;;
+	os2-emx)
+		kernel=os2
+		os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'`
+		;;
+	nto-qnx*)
+		kernel=nto
+		os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'`
+		;;
+	*-*)
+		# shellcheck disable=SC2162
+		saved_IFS=$IFS
+		IFS="-" read kernel os <<EOF
+$basic_os
+EOF
+		IFS=$saved_IFS
+		;;
+	# Default OS when just kernel was specified
+	nto*)
+		kernel=nto
+		os=`echo "$basic_os" | sed -e 's|nto|qnx|'`
+		;;
+	linux*)
+		kernel=linux
+		os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
+		;;
+	*)
+		kernel=
+		os=$basic_os
+		;;
+esac
+
+# Now, normalize the OS (knowing we just have one component, it's not a kernel,
+# etc.)
 case $os in
 	# First match some system type aliases that might get confused
 	# with valid system types.
@@ -1283,7 +1360,7 @@ case $os in
 		os=cnk
 		;;
 	solaris1 | solaris1.*)
-		os=`echo $os | sed -e 's|solaris1|sunos4|'`
+		os=`echo "$os" | sed -e 's|solaris1|sunos4|'`
 		;;
 	solaris)
 		os=solaris2
@@ -1291,9 +1368,6 @@ case $os in
 	unixware*)
 		os=sysv4.2uw
 		;;
-	gnu/linux*)
-		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
-		;;
 	# es1800 is here to avoid being matched by es* (a different OS)
 	es1800*)
 		os=ose
@@ -1315,12 +1389,9 @@ case $os in
 		os=sco3.2v4
 		;;
 	sco3.2.[4-9]*)
-		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+		os=`echo "$os" | sed -e 's/sco3.2./sco3.2v/'`
 		;;
-	sco3.2v[4-9]* | sco5v6*)
-		# Don't forget version if it is 3.2v4 or newer.
-		;;
-	scout)
+	sco*v* | scout)
 		# Don't match below
 		;;
 	sco*)
@@ -1329,77 +1400,25 @@ case $os in
 	psos*)
 		os=psos
 		;;
-	# Now accept the basic system types.
-	# The portable systems comes first.
-	# Each alternative MUST end in a * to match a version number.
-	# sysv* is not here because it comes later, after sysvr4.
-	gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
-	     | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\
-	     | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
-	     | sym* | kopensolaris* | plan9* \
-	     | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
-	     | aos* | aros* | cloudabi* | sortix* \
-	     | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
-	     | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
-	     | knetbsd* | mirbsd* | netbsd* \
-	     | bitrig* | openbsd* | solidbsd* | libertybsd* \
-	     | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \
-	     | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
-	     | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
-	     | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \
-	     | chorusrdb* | cegcc* | glidix* \
-	     | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
-	     | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \
-	     | linux-newlib* | linux-musl* | linux-uclibc* \
-	     | uxpv* | beos* | mpeix* | udk* | moxiebox* \
-	     | interix* | uwin* | mks* | rhapsody* | darwin* \
-	     | openstep* | oskit* | conix* | pw32* | nonstopux* \
-	     | storm-chaos* | tops10* | tenex* | tops20* | its* \
-	     | os2* | vos* | palmos* | uclinux* | nucleus* \
-	     | morphos* | superux* | rtmk* | windiss* \
-	     | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
-	     | skyos* | haiku* | rdos* | toppers* | drops* | es* \
-	     | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
-	     | midnightbsd*)
-	# Remember, each alternative MUST END IN *, to match a version number.
-		;;
 	qnx*)
-		case $cpu in
-		    x86 | i*86)
-			;;
-		    *)
-			os=nto-$os
-			;;
-		esac
+		os=qnx
 		;;
 	hiux*)
 		os=hiuxwe2
 		;;
-	nto-qnx*)
-		;;
-	nto*)
-		os=`echo $os | sed -e 's|nto|nto-qnx|'`
-		;;
-	sim | xray | os68k* | v88r* \
-	    | windows* | osx | abug | netware* | os9* \
-	    | macos* | mpw* | magic* | mmixware* | mon960* | lnews*)
-		;;
-	linux-dietlibc)
-		os=linux-dietlibc
-		;;
-	linux*)
-		os=`echo $os | sed -e 's|linux|linux-gnu|'`
-		;;
 	lynx*178)
 		os=lynxos178
 		;;
 	lynx*5)
 		os=lynxos5
 		;;
+	lynxos*)
+		# don't get caught up in next wildcard
+		;;
 	lynx*)
 		os=lynxos
 		;;
-	mac*)
+	mac[0-9]*)
 		os=`echo "$os" | sed -e 's|mac|macos|'`
 		;;
 	opened*)
@@ -1444,12 +1463,9 @@ case $os in
 	ns2)
 		os=nextstep2
 		;;
-	nsk*)
-		os=nsk
-		;;
 	# Preserve the version number of sinix5.
 	sinix5.*)
-		os=`echo $os | sed -e 's|sinix|sysv|'`
+		os=`echo "$os" | sed -e 's|sinix|sysv|'`
 		;;
 	sinix*)
 		os=sysv4
@@ -1472,18 +1488,12 @@ case $os in
 	sysvr4)
 		os=sysv4
 		;;
-	# This must come after sysvr4.
-	sysv*)
-		;;
 	ose*)
 		os=ose
 		;;
 	*mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
 		os=mint
 		;;
-	zvmoe)
-		os=zvmoe
-		;;
 	dicos*)
 		os=dicos
 		;;
@@ -1500,19 +1510,11 @@ case $os in
 			;;
 		esac
 		;;
-	nacl*)
-		;;
-	ios)
-		;;
-	none)
-		;;
-	*-eabi)
-		;;
 	*)
-		echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
-		exit 1
+		# No normalization, but not necessarily accepted, that comes below.
 		;;
 esac
+
 else
 
 # Here we handle the default operating systems that come with various machines.
@@ -1525,6 +1527,7 @@ else
 # will signal an error saying that MANUFACTURER isn't an operating
 # system, and we'll never get to this point.
 
+kernel=
 case $cpu-$vendor in
 	score-*)
 		os=elf
@@ -1536,7 +1539,8 @@ case $cpu-$vendor in
 		os=riscix1.2
 		;;
 	arm*-rebel)
-		os=linux
+		kernel=linux
+		os=gnu
 		;;
 	arm*-semi)
 		os=aout
@@ -1702,84 +1706,180 @@ case $cpu-$vendor in
 		os=none
 		;;
 esac
+
 fi
 
+# Now, validate our (potentially fixed-up) OS.
+case $os in
+	# Sometimes we do "kernel-libc", so those need to count as OSes.
+	musl* | newlib* | relibc* | uclibc*)
+		;;
+	# Likewise for "kernel-abi"
+	eabi* | gnueabi*)
+		;;
+	# VxWorks passes extra cpu info in the 4th filed.
+	simlinux | simwindows | spe)
+		;;
+	# Now accept the basic system types.
+	# The portable systems comes first.
+	# Each alternative MUST end in a * to match a version number.
+	gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
+	     | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
+	     | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
+	     | sym* |  plan9* | psp* | sim* | xray* | os68k* | v88r* \
+	     | hiux* | abug | nacl* | netware* | windows* \
+	     | os9* | macos* | osx* | ios* \
+	     | mpw* | magic* | mmixware* | mon960* | lnews* \
+	     | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
+	     | aos* | aros* | cloudabi* | sortix* | twizzler* \
+	     | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
+	     | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
+	     | mirbsd* | netbsd* | dicos* | openedition* | ose* \
+	     | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \
+	     | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \
+	     | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
+	     | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
+	     | udi* | lites* | ieee* | go32* | aux* | hcos* \
+	     | chorusrdb* | cegcc* | glidix* | serenity* \
+	     | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
+	     | midipix* | mingw32* | mingw64* | mint* \
+	     | uxpv* | beos* | mpeix* | udk* | moxiebox* \
+	     | interix* | uwin* | mks* | rhapsody* | darwin* \
+	     | openstep* | oskit* | conix* | pw32* | nonstopux* \
+	     | storm-chaos* | tops10* | tenex* | tops20* | its* \
+	     | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \
+	     | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \
+	     | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
+	     | skyos* | haiku* | rdos* | toppers* | drops* | es* \
+	     | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
+	     | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
+	     | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \
+	     | fiwix* )
+		;;
+	# This one is extra strict with allowed versions
+	sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
+		# Don't forget version if it is 3.2v4 or newer.
+		;;
+	none)
+		;;
+	*)
+		echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2
+		exit 1
+		;;
+esac
+
+# As a final step for OS-related things, validate the OS-kernel combination
+# (given a valid OS), if there is a kernel.
+case $kernel-$os in
+	linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \
+		   | linux-musl* | linux-relibc* | linux-uclibc* )
+		;;
+	uclinux-uclibc* )
+		;;
+	-dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* )
+		# These are just libc implementations, not actual OSes, and thus
+		# require a kernel.
+		echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2
+		exit 1
+		;;
+	kfreebsd*-gnu* | kopensolaris*-gnu*)
+		;;
+	vxworks-simlinux | vxworks-simwindows | vxworks-spe)
+		;;
+	nto-qnx*)
+		;;
+	os2-emx)
+		;;
+	*-eabi* | *-gnueabi*)
+		;;
+	-*)
+		# Blank kernel with real OS is always fine.
+		;;
+	*-*)
+		echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2
+		exit 1
+		;;
+esac
+
 # Here we handle the case where we know the os, and the CPU type, but not the
 # manufacturer.  We pick the logical manufacturer.
 case $vendor in
 	unknown)
-		case $os in
-			riscix*)
+		case $cpu-$os in
+			*-riscix*)
 				vendor=acorn
 				;;
-			sunos*)
+			*-sunos*)
 				vendor=sun
 				;;
-			cnk*|-aix*)
+			*-cnk* | *-aix*)
 				vendor=ibm
 				;;
-			beos*)
+			*-beos*)
 				vendor=be
 				;;
-			hpux*)
+			*-hpux*)
 				vendor=hp
 				;;
-			mpeix*)
+			*-mpeix*)
 				vendor=hp
 				;;
-			hiux*)
+			*-hiux*)
 				vendor=hitachi
 				;;
-			unos*)
+			*-unos*)
 				vendor=crds
 				;;
-			dgux*)
+			*-dgux*)
 				vendor=dg
 				;;
-			luna*)
+			*-luna*)
 				vendor=omron
 				;;
-			genix*)
+			*-genix*)
 				vendor=ns
 				;;
-			clix*)
+			*-clix*)
 				vendor=intergraph
 				;;
-			mvs* | opened*)
+			*-mvs* | *-opened*)
+				vendor=ibm
+				;;
+			*-os400*)
 				vendor=ibm
 				;;
-			os400*)
+			s390-* | s390x-*)
 				vendor=ibm
 				;;
-			ptx*)
+			*-ptx*)
 				vendor=sequent
 				;;
-			tpf*)
+			*-tpf*)
 				vendor=ibm
 				;;
-			vxsim* | vxworks* | windiss*)
+			*-vxsim* | *-vxworks* | *-windiss*)
 				vendor=wrs
 				;;
-			aux*)
+			*-aux*)
 				vendor=apple
 				;;
-			hms*)
+			*-hms*)
 				vendor=hitachi
 				;;
-			mpw* | macos*)
+			*-mpw* | *-macos*)
 				vendor=apple
 				;;
-			*mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
+			*-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*)
 				vendor=atari
 				;;
-			vos*)
+			*-vos*)
 				vendor=stratus
 				;;
 		esac
 		;;
 esac
 
-echo "$cpu-$vendor-$os"
+echo "$cpu-$vendor-${kernel:+$kernel-}$os"
 exit
 
 # Local variables:
diff --git a/configure b/configure
index 6a131a5..f099e23 100755
--- a/configure
+++ b/configure
@@ -1,11 +1,12 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for libdmapsharing 2.9.41.
+# Generated by GNU Autoconf 2.71 for libdmapsharing 3.9.12.
 #
 # Report bugs to <https://www.flyn.org/projects/libdmapsharing/>.
 #
 #
-# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
+# Inc.
 #
 #
 # This configure script is free software; the Free Software Foundation
@@ -16,14 +17,16 @@
 
 # Be more Bourne compatible
 DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+as_nop=:
+if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
   emulate sh
   NULLCMD=:
   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
   # is contrary to our usage.  Disable this feature.
   alias -g '${1+"$@"}'='"$@"'
   setopt NO_GLOB_SUBST
-else
+else $as_nop
   case `(set -o) 2>/dev/null` in #(
   *posix*) :
     set -o posix ;; #(
@@ -33,46 +36,46 @@ esac
 fi
 
 
+
+# Reset variables that may have inherited troublesome values from
+# the environment.
+
+# IFS needs to be set, to space, tab, and newline, in precisely that order.
+# (If _AS_PATH_WALK were called with IFS unset, it would have the
+# side effect of setting IFS to empty, thus disabling word splitting.)
+# Quoting is to prevent editors from complaining about space-tab.
 as_nl='
 '
 export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
-    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='print -r --'
-  as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='printf %s\n'
-  as_echo_n='printf %s'
-else
-  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
-    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
-    as_echo_n='/usr/ucb/echo -n'
-  else
-    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
-    as_echo_n_body='eval
-      arg=$1;
-      case $arg in #(
-      *"$as_nl"*)
-	expr "X$arg" : "X\\(.*\\)$as_nl";
-	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
-      esac;
-      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
-    '
-    export as_echo_n_body
-    as_echo_n='sh -c $as_echo_n_body as_echo'
-  fi
-  export as_echo_body
-  as_echo='sh -c $as_echo_body as_echo'
-fi
+IFS=" ""	$as_nl"
+
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# Ensure predictable behavior from utilities with locale-dependent output.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# We cannot yet rely on "unset" to work, but we need these variables
+# to be unset--not just set to an empty or harmless value--now, to
+# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh).  This construct
+# also avoids known problems related to "unset" and subshell syntax
+# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
+for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
+do eval test \${$as_var+y} \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+
+# Ensure that fds 0, 1, and 2 are open.
+if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
+if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
+if (exec 3>&2)            ; then :; else exec 2>/dev/null; fi
 
 # The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
+if ${PATH_SEPARATOR+false} :; then
   PATH_SEPARATOR=:
   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
@@ -81,13 +84,6 @@ if test "${PATH_SEPARATOR+set}" != set; then
 fi
 
 
-# IFS
-# We need space, tab and new line, in precisely that order.  Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" ""	$as_nl"
-
 # Find who we are.  Look in the path if we contain no directory separator.
 as_myself=
 case $0 in #((
@@ -96,8 +92,12 @@ case $0 in #((
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    test -r "$as_dir$0" && as_myself=$as_dir$0 && break
   done
 IFS=$as_save_IFS
 
@@ -109,30 +109,10 @@ if test "x$as_myself" = x; then
   as_myself=$0
 fi
 if test ! -f "$as_myself"; then
-  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
   exit 1
 fi
 
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there.  '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
-  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
 # Use a proper internal environment variable to ensure we don't fall
   # into an infinite loop, continuously re-executing ourselves.
@@ -154,20 +134,22 @@ esac
 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
 # Admittedly, this is quite paranoid, since all the known shells bail
 # out after a failed `exec'.
-$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
-as_fn_exit 255
+printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
   fi
   # We don't want this to propagate to other subprocesses.
           { _as_can_reexec=; unset _as_can_reexec;}
 if test "x$CONFIG_SHELL" = x; then
-  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+  as_bourne_compatible="as_nop=:
+if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
   emulate sh
   NULLCMD=:
   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
   # is contrary to our usage.  Disable this feature.
   alias -g '\${1+\"\$@\"}'='\"\$@\"'
   setopt NO_GLOB_SUBST
-else
+else \$as_nop
   case \`(set -o) 2>/dev/null\` in #(
   *posix*) :
     set -o posix ;; #(
@@ -187,18 +169,20 @@ as_fn_success || { exitcode=1; echo as_fn_success failed.; }
 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
-if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+if ( set x; as_fn_ret_success y && test x = \"\$1\" )
+then :
 
-else
+else \$as_nop
   exitcode=1; echo positional parameters were not saved.
 fi
 test x\$exitcode = x0 || exit 1
+blah=\$(echo \$(echo blah))
+test x\"\$blah\" = xblah || exit 1
 test -x / || exit 1"
   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
-test \$(( 1 + 1 )) = 2 || exit 1
 
   test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
     ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
@@ -206,31 +190,40 @@ test \$(( 1 + 1 )) = 2 || exit 1
     ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
     PATH=/empty FPATH=/empty; export PATH FPATH
     test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
-      || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
-  if (eval "$as_required") 2>/dev/null; then :
+      || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+  if (eval "$as_required") 2>/dev/null
+then :
   as_have_required=yes
-else
+else $as_nop
   as_have_required=no
 fi
-  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
+then :
 
-else
+else $as_nop
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 as_found=false
 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
   as_found=:
   case $as_dir in #(
 	 /*)
 	   for as_base in sh bash ksh sh5; do
 	     # Try only shells that exist, to save several forks.
-	     as_shell=$as_dir/$as_base
+	     as_shell=$as_dir$as_base
 	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
-		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+		    as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
+then :
   CONFIG_SHELL=$as_shell as_have_required=yes
-		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+		   if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
+then :
   break 2
 fi
 fi
@@ -238,14 +231,21 @@ fi
        esac
   as_found=false
 done
-$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
-	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
-  CONFIG_SHELL=$SHELL as_have_required=yes
-fi; }
 IFS=$as_save_IFS
+if $as_found
+then :
+
+else $as_nop
+  if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+	      as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
+then :
+  CONFIG_SHELL=$SHELL as_have_required=yes
+fi
+fi
 
 
-      if test "x$CONFIG_SHELL" != x; then :
+      if test "x$CONFIG_SHELL" != x
+then :
   export CONFIG_SHELL
              # We cannot yet assume a decent shell, so we have to provide a
 # neutralization value for shells without unset; and this also
@@ -263,18 +263,19 @@ esac
 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
 # Admittedly, this is quite paranoid, since all the known shells bail
 # out after a failed `exec'.
-$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
 exit 255
 fi
 
-    if test x$as_have_required = xno; then :
-  $as_echo "$0: This script requires a shell more modern than all"
-  $as_echo "$0: the shells that I found on your system."
-  if test x${ZSH_VERSION+set} = xset ; then
-    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
-    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+    if test x$as_have_required = xno
+then :
+  printf "%s\n" "$0: This script requires a shell more modern than all"
+  printf "%s\n" "$0: the shells that I found on your system."
+  if test ${ZSH_VERSION+y} ; then
+    printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+    printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
   else
-    $as_echo "$0: Please tell bug-autoconf@gnu.org and
+    printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and
 $0: https://www.flyn.org/projects/libdmapsharing/ about
 $0: your system, including any error possibly output before
 $0: this message. Then install a modern shell, or manually
@@ -302,6 +303,7 @@ as_fn_unset ()
 }
 as_unset=as_fn_unset
 
+
 # as_fn_set_status STATUS
 # -----------------------
 # Set $? to STATUS, without forking.
@@ -319,6 +321,14 @@ as_fn_exit ()
   as_fn_set_status $1
   exit $1
 } # as_fn_exit
+# as_fn_nop
+# ---------
+# Do nothing but, unlike ":", preserve the value of $?.
+as_fn_nop ()
+{
+  return $?
+}
+as_nop=as_fn_nop
 
 # as_fn_mkdir_p
 # -------------
@@ -333,7 +343,7 @@ as_fn_mkdir_p ()
     as_dirs=
     while :; do
       case $as_dir in #(
-      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
       *) as_qdir=$as_dir;;
       esac
       as_dirs="'$as_qdir' $as_dirs"
@@ -342,7 +352,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 	 X"$as_dir" : 'X\(//\)[^/]' \| \
 	 X"$as_dir" : 'X\(//\)$' \| \
 	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
+printf "%s\n" X"$as_dir" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 	    s//\1/
 	    q
@@ -381,12 +391,13 @@ as_fn_executable_p ()
 # advantage of any shell optimizations that allow amortized linear growth over
 # repeated appends, instead of the typical quadratic growth present in naive
 # implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
+then :
   eval 'as_fn_append ()
   {
     eval $1+=\$2
   }'
-else
+else $as_nop
   as_fn_append ()
   {
     eval $1=\$$1\$2
@@ -398,18 +409,27 @@ fi # as_fn_append
 # Perform arithmetic evaluation on the ARGs, and store the result in the
 # global $as_val. Take advantage of shells that can avoid forks. The arguments
 # must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
+then :
   eval 'as_fn_arith ()
   {
     as_val=$(( $* ))
   }'
-else
+else $as_nop
   as_fn_arith ()
   {
     as_val=`expr "$@" || test $? -eq 1`
   }
 fi # as_fn_arith
 
+# as_fn_nop
+# ---------
+# Do nothing but, unlike ":", preserve the value of $?.
+as_fn_nop ()
+{
+  return $?
+}
+as_nop=as_fn_nop
 
 # as_fn_error STATUS ERROR [LINENO LOG_FD]
 # ----------------------------------------
@@ -421,9 +441,9 @@ as_fn_error ()
   as_status=$1; test $as_status -eq 0 && as_status=1
   if test "$4"; then
     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
   fi
-  $as_echo "$as_me: error: $2" >&2
+  printf "%s\n" "$as_me: error: $2" >&2
   as_fn_exit $as_status
 } # as_fn_error
 
@@ -450,7 +470,7 @@ as_me=`$as_basename -- "$0" ||
 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 	 X"$0" : 'X\(//\)$' \| \
 	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
+printf "%s\n" X/"$0" |
     sed '/^.*\/\([^/][^/]*\)\/*$/{
 	    s//\1/
 	    q
@@ -494,7 +514,7 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
       s/-\n.*//
     ' >$as_me.lineno &&
   chmod +x "$as_me.lineno" ||
-    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+    { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 
   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
   # already done that, so ensure we don't try to do so again and fall
@@ -508,6 +528,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
   exit
 }
 
+
+# Determine whether it's possible to make 'echo' print without a newline.
+# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
+# for compatibility with existing Makefiles.
 ECHO_C= ECHO_N= ECHO_T=
 case `echo -n x` in #(((((
 -n*)
@@ -521,6 +545,13 @@ case `echo -n x` in #(((((
   ECHO_N='-n';;
 esac
 
+# For backward compatibility with old third-party macros, we provide
+# the shell variables $as_echo and $as_echo_n.  New code should use
+# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
+as_echo='printf %s\n'
+as_echo_n='printf %s'
+
+
 rm -f conf$$ conf$$.exe conf$$.file
 if test -d conf$$.dir; then
   rm -f conf$$.dir/conf$$.file
@@ -650,51 +681,50 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='libdmapsharing'
 PACKAGE_TARNAME='libdmapsharing'
-PACKAGE_VERSION='2.9.41'
-PACKAGE_STRING='libdmapsharing 2.9.41'
+PACKAGE_VERSION='3.9.12'
+PACKAGE_STRING='libdmapsharing 3.9.12'
 PACKAGE_BUGREPORT='https://www.flyn.org/projects/libdmapsharing/'
 PACKAGE_URL=''
 
 # Factoring default headers for most tests.
 ac_includes_default="\
-#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
+#include <stddef.h>
+#ifdef HAVE_STDIO_H
+# include <stdio.h>
 #endif
-#ifdef STDC_HEADERS
+#ifdef HAVE_STDLIB_H
 # include <stdlib.h>
-# include <stddef.h>
-#else
-# ifdef HAVE_STDLIB_H
-#  include <stdlib.h>
-# endif
 #endif
 #ifdef HAVE_STRING_H
-# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-#  include <memory.h>
-# endif
 # include <string.h>
 #endif
-#ifdef HAVE_STRINGS_H
-# include <strings.h>
-#endif
 #ifdef HAVE_INTTYPES_H
 # include <inttypes.h>
 #endif
 #ifdef HAVE_STDINT_H
 # include <stdint.h>
 #endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif"
 
+ac_header_c_list=
 ac_subst_vars='am__EXEEXT_FALSE
 am__EXEEXT_TRUE
 LTLIBOBJS
 LIBOBJS
+CSCOPE
+ETAGS
+CTAGS
 am__fastdepCC_FALSE
 am__fastdepCC_TRUE
 CCDEPMODE
@@ -827,12 +857,15 @@ ac_ct_AR
 AR
 DLLTOOL
 OBJDUMP
+FILECMD
 LN_S
 NM
 ac_ct_DUMPBIN
 DUMPBIN
 LD
 FGREP
+EGREP
+GREP
 SED
 host_os
 host_vendor
@@ -843,8 +876,6 @@ build_vendor
 build_cpu
 build
 LIBTOOL
-EGREP
-GREP
 CPP
 OBJEXT
 EXEEXT
@@ -874,6 +905,7 @@ infodir
 docdir
 oldincludedir
 includedir
+runstatedir
 localstatedir
 sharedstatedir
 sysconfdir
@@ -991,6 +1023,7 @@ datadir='${datarootdir}'
 sysconfdir='${prefix}/etc'
 sharedstatedir='${prefix}/com'
 localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1020,8 +1053,6 @@ do
   *)    ac_optarg=yes ;;
   esac
 
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
   case $ac_dashdash$ac_option in
   --)
     ac_dashdash=yes ;;
@@ -1062,9 +1093,9 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error $? "invalid feature name: $ac_useropt"
+      as_fn_error $? "invalid feature name: \`$ac_useropt'"
     ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
       *"
 "enable_$ac_useropt"
@@ -1088,9 +1119,9 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error $? "invalid feature name: $ac_useropt"
+      as_fn_error $? "invalid feature name: \`$ac_useropt'"
     ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
       *"
 "enable_$ac_useropt"
@@ -1243,6 +1274,15 @@ do
   | -silent | --silent | --silen | --sile | --sil)
     silent=yes ;;
 
+  -runstatedir | --runstatedir | --runstatedi | --runstated \
+  | --runstate | --runstat | --runsta | --runst | --runs \
+  | --run | --ru | --r)
+    ac_prev=runstatedir ;;
+  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+  | --run=* | --ru=* | --r=*)
+    runstatedir=$ac_optarg ;;
+
   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
     ac_prev=sbindir ;;
   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1292,9 +1332,9 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error $? "invalid package name: $ac_useropt"
+      as_fn_error $? "invalid package name: \`$ac_useropt'"
     ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
       *"
 "with_$ac_useropt"
@@ -1308,9 +1348,9 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error $? "invalid package name: $ac_useropt"
+      as_fn_error $? "invalid package name: \`$ac_useropt'"
     ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
       *"
 "with_$ac_useropt"
@@ -1354,9 +1394,9 @@ Try \`$0 --help' for more information"
 
   *)
     # FIXME: should be removed in autoconf 3.0.
-    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
-      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+      printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
     ;;
 
@@ -1372,7 +1412,7 @@ if test -n "$ac_unrecognized_opts"; then
   case $enable_option_checking in
     no) ;;
     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
-    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+    *)     printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
   esac
 fi
 
@@ -1380,7 +1420,7 @@ fi
 for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
 		datadir sysconfdir sharedstatedir localstatedir includedir \
 		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
-		libdir localedir mandir
+		libdir localedir mandir runstatedir
 do
   eval ac_val=\$$ac_var
   # Remove trailing slashes.
@@ -1436,7 +1476,7 @@ $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 	 X"$as_myself" : 'X\(//\)[^/]' \| \
 	 X"$as_myself" : 'X\(//\)$' \| \
 	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_myself" |
+printf "%s\n" X"$as_myself" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 	    s//\1/
 	    q
@@ -1493,7 +1533,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures libdmapsharing 2.9.41 to adapt to many kinds of systems.
+\`configure' configures libdmapsharing 3.9.12 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1533,6 +1573,7 @@ Fine tuning of the installation directories:
   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
   --libdir=DIR            object code libraries [EPREFIX/lib]
   --includedir=DIR        C header files [PREFIX/include]
   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
@@ -1563,7 +1604,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of libdmapsharing 2.9.41:";;
+     short | recursive ) echo "Configuration of libdmapsharing 3.9.12:";;
    esac
   cat <<\_ACEOF
 
@@ -1678,9 +1719,9 @@ if test "$ac_init_help" = "recursive"; then
 case "$ac_dir" in
 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
 *)
-  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
   # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
   case $ac_top_builddir_sub in
   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -1708,7 +1749,8 @@ esac
 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
 
     cd "$ac_dir" || { ac_status=$?; continue; }
-    # Check for guested configure.
+    # Check for configure.gnu first; this name is used for a wrapper for
+    # Metaconfig's "Configure" on case-insensitive file systems.
     if test -f "$ac_srcdir/configure.gnu"; then
       echo &&
       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
@@ -1716,7 +1758,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
       echo &&
       $SHELL "$ac_srcdir/configure" --help=recursive
     else
-      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+      printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
     fi || ac_status=$?
     cd "$ac_pwd" || { ac_status=$?; break; }
   done
@@ -1725,10 +1767,10 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-libdmapsharing configure 2.9.41
-generated by GNU Autoconf 2.69
+libdmapsharing configure 3.9.12
+generated by GNU Autoconf 2.71
 
-Copyright (C) 2012 Free Software Foundation, Inc.
+Copyright (C) 2021 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.
 _ACEOF
@@ -1745,14 +1787,14 @@ fi
 ac_fn_c_try_compile ()
 {
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  rm -f conftest.$ac_objext
+  rm -f conftest.$ac_objext conftest.beam
   if { { ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
   (eval "$ac_compile") 2>conftest.err
   ac_status=$?
   if test -s conftest.err; then
@@ -1760,14 +1802,15 @@ $as_echo "$ac_try_echo"; } >&5
     cat conftest.er1 >&5
     mv -f conftest.er1 conftest.err
   fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then :
+       } && test -s conftest.$ac_objext
+then :
   ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
+else $as_nop
+  printf "%s\n" "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_retval=1
@@ -1789,7 +1832,7 @@ case "(($ac_try" in
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
   ac_status=$?
   if test -s conftest.err; then
@@ -1797,14 +1840,15 @@ $as_echo "$ac_try_echo"; } >&5
     cat conftest.er1 >&5
     mv -f conftest.er1 conftest.err
   fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; } > conftest.i && {
 	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
 	 test ! -s conftest.err
-       }; then :
+       }
+then :
   ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
+else $as_nop
+  printf "%s\n" "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
     ac_retval=1
@@ -1814,62 +1858,20 @@ fi
 
 } # ac_fn_c_try_cpp
 
-# ac_fn_c_try_run LINENO
-# ----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
-# that executables *can* be run.
-ac_fn_c_try_run ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if { { ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
-  { { case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-       $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_retval=$ac_status
-fi
-  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-  as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_run
-
 # ac_fn_c_try_link LINENO
 # -----------------------
 # Try to link conftest.$ac_ext, and return whether this succeeded.
 ac_fn_c_try_link ()
 {
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  rm -f conftest.$ac_objext conftest$ac_exeext
+  rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
   if { { ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
   (eval "$ac_link") 2>conftest.err
   ac_status=$?
   if test -s conftest.err; then
@@ -1877,17 +1879,18 @@ $as_echo "$ac_try_echo"; } >&5
     cat conftest.er1 >&5
     mv -f conftest.er1 conftest.err
   fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
        } && test -s conftest$ac_exeext && {
 	 test "$cross_compiling" = yes ||
 	 test -x conftest$ac_exeext
-       }; then :
+       }
+then :
   ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
+else $as_nop
+  printf "%s\n" "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_retval=1
@@ -1909,26 +1912,28 @@ fi
 ac_fn_c_check_header_compile ()
 {
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 $4
 #include <$2>
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   eval "$3=yes"
-else
+else $as_nop
   eval "$3=no"
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_header_compile
@@ -1939,11 +1944,12 @@ $as_echo "$ac_res" >&6; }
 ac_fn_c_check_func ()
 {
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
@@ -1951,16 +1957,9 @@ else
 #define $2 innocuous_$2
 
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $2 (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+   which can conflict with char $2 (); below.  */
 
+#include <limits.h>
 #undef $2
 
 /* Override any GCC internal prototype to avoid an error.
@@ -1978,126 +1977,56 @@ choke me
 #endif
 
 int
-main ()
+main (void)
 {
 return $2 ();
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval "$3=yes"
-else
+else $as_nop
   eval "$3=no"
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_func
+ac_configure_args_raw=
+for ac_arg
+do
+  case $ac_arg in
+  *\'*)
+    ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+  esac
+  as_fn_append ac_configure_args_raw " '$ac_arg'"
+done
 
-# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists, giving a warning if it cannot be compiled using
-# the include files in INCLUDES and setting the cache variable VAR
-# accordingly.
-ac_fn_c_check_header_mongrel ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if eval \${$3+:} false; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
-  $as_echo_n "(cached) " >&6
-fi
-eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
-$as_echo_n "checking $2 usability... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_header_compiler=yes
-else
-  ac_header_compiler=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
-$as_echo_n "checking $2 presence... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <$2>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-  ac_header_preproc=yes
-else
-  ac_header_preproc=no
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
-  yes:no: )
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-( $as_echo "## ------------------------------------------------------------ ##
-## Report this to https://www.flyn.org/projects/libdmapsharing/ ##
-## ------------------------------------------------------------ ##"
-     ) | sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
+case $ac_configure_args_raw in
+  *$as_nl*)
+    ac_safe_unquote= ;;
+  *)
+    ac_unsafe_z='|&;<>()$`\\"*?[ ''	' # This string ends in space, tab.
+    ac_unsafe_a="$ac_unsafe_z#~"
+    ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
+    ac_configure_args_raw=`      printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
 esac
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  eval "$3=\$ac_header_compiler"
-fi
-eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-fi
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
-} # ac_fn_c_check_header_mongrel
 cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by libdmapsharing $as_me 2.9.41, which was
-generated by GNU Autoconf 2.69.  Invocation command line was
+It was created by libdmapsharing $as_me 3.9.12, which was
+generated by GNU Autoconf 2.71.  Invocation command line was
 
-  $ $0 $@
+  $ $0$ac_configure_args_raw
 
 _ACEOF
 exec 5>>config.log
@@ -2130,8 +2059,12 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    $as_echo "PATH: $as_dir"
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    printf "%s\n" "PATH: $as_dir"
   done
 IFS=$as_save_IFS
 
@@ -2166,7 +2099,7 @@ do
     | -silent | --silent | --silen | --sile | --sil)
       continue ;;
     *\'*)
-      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+      ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
     esac
     case $ac_pass in
     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
@@ -2201,11 +2134,13 @@ done
 # WARNING: Use '\'' to represent an apostrophe within the trap.
 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
 trap 'exit_status=$?
+  # Sanitize IFS.
+  IFS=" ""	$as_nl"
   # Save into config.log some information that might help in debugging.
   {
     echo
 
-    $as_echo "## ---------------- ##
+    printf "%s\n" "## ---------------- ##
 ## Cache variables. ##
 ## ---------------- ##"
     echo
@@ -2216,8 +2151,8 @@ trap 'exit_status=$?
     case $ac_val in #(
     *${as_nl}*)
       case $ac_var in #(
-      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
       esac
       case $ac_var in #(
       _ | IFS | as_nl) ;; #(
@@ -2241,7 +2176,7 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
 )
     echo
 
-    $as_echo "## ----------------- ##
+    printf "%s\n" "## ----------------- ##
 ## Output variables. ##
 ## ----------------- ##"
     echo
@@ -2249,14 +2184,14 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
     do
       eval ac_val=\$$ac_var
       case $ac_val in
-      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
       esac
-      $as_echo "$ac_var='\''$ac_val'\''"
+      printf "%s\n" "$ac_var='\''$ac_val'\''"
     done | sort
     echo
 
     if test -n "$ac_subst_files"; then
-      $as_echo "## ------------------- ##
+      printf "%s\n" "## ------------------- ##
 ## File substitutions. ##
 ## ------------------- ##"
       echo
@@ -2264,15 +2199,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
       do
 	eval ac_val=\$$ac_var
 	case $ac_val in
-	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+	*\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
 	esac
-	$as_echo "$ac_var='\''$ac_val'\''"
+	printf "%s\n" "$ac_var='\''$ac_val'\''"
       done | sort
       echo
     fi
 
     if test -s confdefs.h; then
-      $as_echo "## ----------- ##
+      printf "%s\n" "## ----------- ##
 ## confdefs.h. ##
 ## ----------- ##"
       echo
@@ -2280,8 +2215,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
       echo
     fi
     test "$ac_signal" != 0 &&
-      $as_echo "$as_me: caught signal $ac_signal"
-    $as_echo "$as_me: exit $exit_status"
+      printf "%s\n" "$as_me: caught signal $ac_signal"
+    printf "%s\n" "$as_me: exit $exit_status"
   } >&5
   rm -f core *.core core.conftest.* &&
     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
@@ -2295,63 +2230,48 @@ ac_signal=0
 # confdefs.h avoids OS command line length limits that DEFS can exceed.
 rm -f -r conftest* confdefs.h
 
-$as_echo "/* confdefs.h */" > confdefs.h
+printf "%s\n" "/* confdefs.h */" > confdefs.h
 
 # Predefined preprocessor variables.
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
+printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
+printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
+printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
+printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
+printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_URL "$PACKAGE_URL"
-_ACEOF
+printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
 
 
 # Let the site file select an alternate cache file if it wants to.
 # Prefer an explicitly selected file to automatically selected ones.
-ac_site_file1=NONE
-ac_site_file2=NONE
 if test -n "$CONFIG_SITE"; then
-  # We do not want a PATH search for config.site.
-  case $CONFIG_SITE in #((
-    -*)  ac_site_file1=./$CONFIG_SITE;;
-    */*) ac_site_file1=$CONFIG_SITE;;
-    *)   ac_site_file1=./$CONFIG_SITE;;
-  esac
+  ac_site_files="$CONFIG_SITE"
 elif test "x$prefix" != xNONE; then
-  ac_site_file1=$prefix/share/config.site
-  ac_site_file2=$prefix/etc/config.site
+  ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
 else
-  ac_site_file1=$ac_default_prefix/share/config.site
-  ac_site_file2=$ac_default_prefix/etc/config.site
+  ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
 fi
-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+
+for ac_site_file in $ac_site_files
 do
-  test "x$ac_site_file" = xNONE && continue
-  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
-$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+  case $ac_site_file in #(
+  */*) :
+     ;; #(
+  *) :
+    ac_site_file=./$ac_site_file ;;
+esac
+  if test -f "$ac_site_file" && test -r "$ac_site_file"; then
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
     sed 's/^/| /' "$ac_site_file" >&5
     . "$ac_site_file" \
-      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+      || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "failed to load site script $ac_site_file
 See \`config.log' for more details" "$LINENO" 5; }
   fi
@@ -2361,129 +2281,522 @@ if test -r "$cache_file"; then
   # Some versions of bash will fail to source /dev/null (special files
   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
-$as_echo "$as_me: loading cache $cache_file" >&6;}
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
     case $cache_file in
       [\\/]* | ?:[\\/]* ) . "$cache_file";;
       *)                      . "./$cache_file";;
     esac
   fi
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
-$as_echo "$as_me: creating cache $cache_file" >&6;}
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
   >$cache_file
 fi
 
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in $ac_precious_vars; do
-  eval ac_old_set=\$ac_cv_env_${ac_var}_set
-  eval ac_new_set=\$ac_env_${ac_var}_set
-  eval ac_old_val=\$ac_cv_env_${ac_var}_value
-  eval ac_new_val=\$ac_env_${ac_var}_value
-  case $ac_old_set,$ac_new_set in
-    set,)
-      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
-      ac_cache_corrupted=: ;;
-    ,set)
-      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
-      ac_cache_corrupted=: ;;
-    ,);;
-    *)
-      if test "x$ac_old_val" != "x$ac_new_val"; then
-	# differences in whitespace do not lead to failure.
-	ac_old_val_w=`echo x $ac_old_val`
-	ac_new_val_w=`echo x $ac_new_val`
-	if test "$ac_old_val_w" != "$ac_new_val_w"; then
-	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
-$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
-	  ac_cache_corrupted=:
-	else
-	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
-$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
-	  eval $ac_var=\$ac_old_val
-	fi
-	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
-$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
-	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
-$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
-      fi;;
-  esac
-  # Pass precious variables to config.status.
-  if test "$ac_new_set" = set; then
-    case $ac_new_val in
-    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
-    *) ac_arg=$ac_var=$ac_new_val ;;
-    esac
-    case " $ac_configure_args " in
-      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
-      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
-    esac
-  fi
-done
-if $ac_cache_corrupted; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
-$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
-  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
-fi
-## -------------------- ##
-## Main body of script. ##
-## -------------------- ##
+# Test code for whether the C compiler supports C89 (global declarations)
+ac_c_conftest_c89_globals='
+/* Does the compiler advertise C89 conformance?
+   Do not test the value of __STDC__, because some compilers set it to 0
+   while being otherwise adequately conformant. */
+#if !defined __STDC__
+# error "Compiler does not advertise C89 conformance"
+#endif
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+#include <stddef.h>
+#include <stdarg.h>
+struct stat;
+/* Most of the following tests are stolen from RCS 5.7 src/conf.sh.  */
+struct buf { int x; };
+struct buf * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
 
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not \xHH hex character constants.
+   These do not provoke an error unfortunately, instead are silently treated
+   as an "x".  The following induces an error, until -std is added to get
+   proper ANSI mode.  Curiously \x00 != x always comes out true, for an
+   array size at least.  It is necessary to write \x00 == 0 to get something
+   that is true only with -std.  */
+int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
 
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+   inside strings and character constants.  */
+#define FOO(x) '\''x'\''
+int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
 
-API_VERSION=3.0
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
+               int, int);'
 
+# Test code for whether the C compiler supports C89 (body of main).
+ac_c_conftest_c89_main='
+ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
+'
 
-SO_VERSION=11:41:9
+# Test code for whether the C compiler supports C99 (global declarations)
+ac_c_conftest_c99_globals='
+// Does the compiler advertise C99 conformance?
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
+# error "Compiler does not advertise C99 conformance"
+#endif
 
+#include <stdbool.h>
+extern int puts (const char *);
+extern int printf (const char *, ...);
+extern int dprintf (int, const char *, ...);
+extern void *malloc (size_t);
+
+// Check varargs macros.  These examples are taken from C99 6.10.3.5.
+// dprintf is used instead of fprintf to avoid needing to declare
+// FILE and stderr.
+#define debug(...) dprintf (2, __VA_ARGS__)
+#define showlist(...) puts (#__VA_ARGS__)
+#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
+static void
+test_varargs_macros (void)
+{
+  int x = 1234;
+  int y = 5678;
+  debug ("Flag");
+  debug ("X = %d\n", x);
+  showlist (The first, second, and third items.);
+  report (x>y, "x is %d but y is %d", x, y);
+}
 
-ac_config_headers="$ac_config_headers config.h"
+// Check long long types.
+#define BIG64 18446744073709551615ull
+#define BIG32 4294967295ul
+#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
+#if !BIG_OK
+  #error "your preprocessor is broken"
+#endif
+#if BIG_OK
+#else
+  #error "your preprocessor is broken"
+#endif
+static long long int bignum = -9223372036854775807LL;
+static unsigned long long int ubignum = BIG64;
 
+struct incomplete_array
+{
+  int datasize;
+  double data[];
+};
 
+struct named_init {
+  int number;
+  const wchar_t *name;
+  double average;
+};
 
-ac_aux_dir=
-for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
-  if test -f "$ac_dir/install-sh"; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f "$ac_dir/install.sh"; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  elif test -f "$ac_dir/shtool"; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/shtool install -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
-fi
+typedef const char *ccp;
 
-# These three variables are undocumented and unsupported,
-# and are intended to be withdrawn in a future Autoconf release.
-# They can cause serious problems if a builder's source tree is in a directory
+static inline int
+test_restrict (ccp restrict text)
+{
+  // See if C++-style comments work.
+  // Iterate through items via the restricted pointer.
+  // Also check for declarations in for loops.
+  for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
+    continue;
+  return 0;
+}
+
+// Check varargs and va_copy.
+static bool
+test_varargs (const char *format, ...)
+{
+  va_list args;
+  va_start (args, format);
+  va_list args_copy;
+  va_copy (args_copy, args);
+
+  const char *str = "";
+  int number = 0;
+  float fnumber = 0;
+
+  while (*format)
+    {
+      switch (*format++)
+	{
+	case '\''s'\'': // string
+	  str = va_arg (args_copy, const char *);
+	  break;
+	case '\''d'\'': // int
+	  number = va_arg (args_copy, int);
+	  break;
+	case '\''f'\'': // float
+	  fnumber = va_arg (args_copy, double);
+	  break;
+	default:
+	  break;
+	}
+    }
+  va_end (args_copy);
+  va_end (args);
+
+  return *str && number && fnumber;
+}
+'
+
+# Test code for whether the C compiler supports C99 (body of main).
+ac_c_conftest_c99_main='
+  // Check bool.
+  _Bool success = false;
+  success |= (argc != 0);
+
+  // Check restrict.
+  if (test_restrict ("String literal") == 0)
+    success = true;
+  char *restrict newvar = "Another string";
+
+  // Check varargs.
+  success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
+  test_varargs_macros ();
+
+  // Check flexible array members.
+  struct incomplete_array *ia =
+    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
+  ia->datasize = 10;
+  for (int i = 0; i < ia->datasize; ++i)
+    ia->data[i] = i * 1.234;
+
+  // Check named initializers.
+  struct named_init ni = {
+    .number = 34,
+    .name = L"Test wide string",
+    .average = 543.34343,
+  };
+
+  ni.number = 58;
+
+  int dynamic_array[ni.number];
+  dynamic_array[0] = argv[0][0];
+  dynamic_array[ni.number - 1] = 543;
+
+  // work around unused variable warnings
+  ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
+	 || dynamic_array[ni.number - 1] != 543);
+'
+
+# Test code for whether the C compiler supports C11 (global declarations)
+ac_c_conftest_c11_globals='
+// Does the compiler advertise C11 conformance?
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
+# error "Compiler does not advertise C11 conformance"
+#endif
+
+// Check _Alignas.
+char _Alignas (double) aligned_as_double;
+char _Alignas (0) no_special_alignment;
+extern char aligned_as_int;
+char _Alignas (0) _Alignas (int) aligned_as_int;
+
+// Check _Alignof.
+enum
+{
+  int_alignment = _Alignof (int),
+  int_array_alignment = _Alignof (int[100]),
+  char_alignment = _Alignof (char)
+};
+_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
+
+// Check _Noreturn.
+int _Noreturn does_not_return (void) { for (;;) continue; }
+
+// Check _Static_assert.
+struct test_static_assert
+{
+  int x;
+  _Static_assert (sizeof (int) <= sizeof (long int),
+                  "_Static_assert does not work in struct");
+  long int y;
+};
+
+// Check UTF-8 literals.
+#define u8 syntax error!
+char const utf8_literal[] = u8"happens to be ASCII" "another string";
+
+// Check duplicate typedefs.
+typedef long *long_ptr;
+typedef long int *long_ptr;
+typedef long_ptr long_ptr;
+
+// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
+struct anonymous
+{
+  union {
+    struct { int i; int j; };
+    struct { int k; long int l; } w;
+  };
+  int m;
+} v1;
+'
+
+# Test code for whether the C compiler supports C11 (body of main).
+ac_c_conftest_c11_main='
+  _Static_assert ((offsetof (struct anonymous, i)
+		   == offsetof (struct anonymous, w.k)),
+		  "Anonymous union alignment botch");
+  v1.i = 2;
+  v1.w.k = 5;
+  ok |= v1.i != 5;
+'
+
+# Test code for whether the C compiler supports C11 (complete).
+ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
+${ac_c_conftest_c99_globals}
+${ac_c_conftest_c11_globals}
+
+int
+main (int argc, char **argv)
+{
+  int ok = 0;
+  ${ac_c_conftest_c89_main}
+  ${ac_c_conftest_c99_main}
+  ${ac_c_conftest_c11_main}
+  return ok;
+}
+"
+
+# Test code for whether the C compiler supports C99 (complete).
+ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
+${ac_c_conftest_c99_globals}
+
+int
+main (int argc, char **argv)
+{
+  int ok = 0;
+  ${ac_c_conftest_c89_main}
+  ${ac_c_conftest_c99_main}
+  return ok;
+}
+"
+
+# Test code for whether the C compiler supports C89 (complete).
+ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
+
+int
+main (int argc, char **argv)
+{
+  int ok = 0;
+  ${ac_c_conftest_c89_main}
+  return ok;
+}
+"
+
+as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
+as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
+as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
+as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
+as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
+as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
+as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
+as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
+as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
+
+# Auxiliary files required by this configure script.
+ac_aux_files="missing install-sh config.guess config.sub ltmain.sh compile"
+
+# Locations in which to look for auxiliary files.
+ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.."
+
+# Search for a directory containing all of the required auxiliary files,
+# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
+# If we don't find one directory that contains all the files we need,
+# we report the set of missing files from the *first* directory in
+# $ac_aux_dir_candidates and give up.
+ac_missing_aux_files=""
+ac_first_candidate=:
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in $ac_aux_dir_candidates
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+  as_found=:
+
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}:  trying $as_dir" >&5
+  ac_aux_dir_found=yes
+  ac_install_sh=
+  for ac_aux in $ac_aux_files
+  do
+    # As a special case, if "install-sh" is required, that requirement
+    # can be satisfied by any of "install-sh", "install.sh", or "shtool",
+    # and $ac_install_sh is set appropriately for whichever one is found.
+    if test x"$ac_aux" = x"install-sh"
+    then
+      if test -f "${as_dir}install-sh"; then
+        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install-sh found" >&5
+        ac_install_sh="${as_dir}install-sh -c"
+      elif test -f "${as_dir}install.sh"; then
+        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install.sh found" >&5
+        ac_install_sh="${as_dir}install.sh -c"
+      elif test -f "${as_dir}shtool"; then
+        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}shtool found" >&5
+        ac_install_sh="${as_dir}shtool install -c"
+      else
+        ac_aux_dir_found=no
+        if $ac_first_candidate; then
+          ac_missing_aux_files="${ac_missing_aux_files} install-sh"
+        else
+          break
+        fi
+      fi
+    else
+      if test -f "${as_dir}${ac_aux}"; then
+        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}${ac_aux} found" >&5
+      else
+        ac_aux_dir_found=no
+        if $ac_first_candidate; then
+          ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
+        else
+          break
+        fi
+      fi
+    fi
+  done
+  if test "$ac_aux_dir_found" = yes; then
+    ac_aux_dir="$as_dir"
+    break
+  fi
+  ac_first_candidate=false
+
+  as_found=false
+done
+IFS=$as_save_IFS
+if $as_found
+then :
+
+else $as_nop
+  as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
+fi
+
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
 # whose full name contains unusual characters.
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
-ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
+if test -f "${ac_aux_dir}config.guess"; then
+  ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
+fi
+if test -f "${ac_aux_dir}config.sub"; then
+  ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
+fi
+if test -f "$ac_aux_dir/configure"; then
+  ac_configure="$SHELL ${ac_aux_dir}configure"
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val=\$ac_cv_env_${ac_var}_value
+  eval ac_new_val=\$ac_env_${ac_var}_value
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+	# differences in whitespace do not lead to failure.
+	ac_old_val_w=`echo x $ac_old_val`
+	ac_new_val_w=`echo x $ac_new_val`
+	if test "$ac_old_val_w" != "$ac_new_val_w"; then
+	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+	  ac_cache_corrupted=:
+	else
+	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+	  eval $ac_var=\$ac_old_val
+	fi
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
+printf "%s\n" "$as_me:   former value:  \`$ac_old_val'" >&2;}
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
+printf "%s\n" "$as_me:   current value: \`$ac_new_val'" >&2;}
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
+  as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
+	    and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+API_VERSION=4.0
+
+
+SO_VERSION=12:12:9
+
+
+ac_config_headers="$ac_config_headers config.h"
+
+
+
+
+
+
+
+
+
 
 
-# Expand $ac_aux_dir to an absolute path.
-am_aux_dir=`cd "$ac_aux_dir" && pwd`
 
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -2493,11 +2806,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
 set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
@@ -2505,11 +2819,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="${ac_tool_prefix}gcc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -2520,11 +2838,11 @@ fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -2533,11 +2851,12 @@ if test -z "$ac_cv_prog_CC"; then
   ac_ct_CC=$CC
   # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$ac_ct_CC"; then
   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
 else
@@ -2545,11 +2864,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_CC="gcc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -2560,11 +2883,11 @@ fi
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
   if test "x$ac_ct_CC" = x; then
@@ -2572,8 +2895,8 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
     CC=$ac_ct_CC
@@ -2586,11 +2909,12 @@ if test -z "$CC"; then
           if test -n "$ac_tool_prefix"; then
     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
 set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
@@ -2598,11 +2922,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="${ac_tool_prefix}cc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -2613,11 +2941,11 @@ fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -2626,11 +2954,12 @@ fi
 if test -z "$CC"; then
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
@@ -2639,15 +2968,19 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
        ac_prog_rejected=yes
        continue
      fi
     ac_cv_prog_CC="cc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -2663,18 +2996,18 @@ if test $ac_prog_rejected = yes; then
     # However, it has the same basename, so the bogon will be chosen
     # first if we set CC to just the basename; use the full file name.
     shift
-    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+    ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
   fi
 fi
 fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -2685,11 +3018,12 @@ if test -z "$CC"; then
   do
     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
@@ -2697,11 +3031,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -2712,11 +3050,11 @@ fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -2729,11 +3067,12 @@ if test -z "$CC"; then
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$ac_ct_CC"; then
   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
 else
@@ -2741,11 +3080,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_CC="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -2756,11 +3099,11 @@ fi
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -2772,34 +3115,138 @@ done
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+fi
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
+set dummy ${ac_tool_prefix}clang; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}clang"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "clang", so it can be a program name with args.
+set dummy clang; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="clang"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
     CC=$ac_ct_CC
   fi
+else
+  CC="$ac_cv_prog_CC"
 fi
 
 fi
 
 
-test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "no acceptable C compiler found in \$PATH
 See \`config.log' for more details" "$LINENO" 5; }
 
 # Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
 set X $ac_compile
 ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
+for ac_option in --version -v -V -qversion -version; do
   { { ac_try="$ac_compiler $ac_option >&5"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
   ac_status=$?
   if test -s conftest.err; then
@@ -2809,7 +3256,7 @@ $as_echo "$ac_try_echo"; } >&5
     cat conftest.er1 >&5
   fi
   rm -f conftest.er1 conftest.err
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }
 done
 
@@ -2817,7 +3264,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
-main ()
+main (void)
 {
 
   ;
@@ -2829,9 +3276,9 @@ ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
 # Try to create an executable without -o first, disregard a.out.
 # It will help us diagnose broken compilers, and finding out an intuition
 # of exeext.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&6; }
-ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+printf %s "checking whether the C compiler works... " >&6; }
+ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
 
 # The possible output files:
 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
@@ -2852,11 +3299,12 @@ case "(($ac_try" in
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
   (eval "$ac_link_default") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then :
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+then :
   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
@@ -2873,7 +3321,7 @@ do
 	# certainly right.
 	break;;
     *.* )
-	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+	if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
 	then :; else
 	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
 	fi
@@ -2889,44 +3337,46 @@ do
 done
 test "$ac_cv_exeext" = no && ac_cv_exeext=
 
-else
+else $as_nop
   ac_file=''
 fi
-if test -z "$ac_file"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-$as_echo "$as_me: failed program was:" >&5
+if test -z "$ac_file"
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+printf "%s\n" "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error 77 "C compiler cannot create executables
 See \`config.log' for more details" "$LINENO" 5; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+printf %s "checking for C compiler default output file name... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+printf "%s\n" "$ac_file" >&6; }
 ac_exeext=$ac_cv_exeext
 
 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
 ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
-$as_echo_n "checking for suffix of executables... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+printf %s "checking for suffix of executables... " >&6; }
 if { { ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then :
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+then :
   # If both `conftest.exe' and `conftest' are `present' (well, observable)
 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
 # work properly (i.e., refer to `conftest.exe'), while it won't with
@@ -2940,15 +3390,15 @@ for ac_file in conftest.exe conftest conftest.*; do
     * ) break;;
   esac
 done
-else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+else $as_nop
+  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
 See \`config.log' for more details" "$LINENO" 5; }
 fi
 rm -f conftest conftest$ac_cv_exeext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
-$as_echo "$ac_cv_exeext" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+printf "%s\n" "$ac_cv_exeext" >&6; }
 
 rm -f conftest.$ac_ext
 EXEEXT=$ac_cv_exeext
@@ -2957,7 +3407,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <stdio.h>
 int
-main ()
+main (void)
 {
 FILE *f = fopen ("conftest.out", "w");
  return ferror (f) || fclose (f) != 0;
@@ -2969,8 +3419,8 @@ _ACEOF
 ac_clean_files="$ac_clean_files conftest.out"
 # Check that the compiler produces executables we can run.  If not, either
 # the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+printf %s "checking whether we are cross compiling... " >&6; }
 if test "$cross_compiling" != yes; then
   { { ac_try="$ac_link"
 case "(($ac_try" in
@@ -2978,10 +3428,10 @@ case "(($ac_try" in
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }
   if { ac_try='./conftest$ac_cv_exeext'
   { { case "(($ac_try" in
@@ -2989,39 +3439,40 @@ $as_echo "$ac_try_echo"; } >&5
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then
     cross_compiling=no
   else
     if test "$cross_compiling" = maybe; then
 	cross_compiling=yes
     else
-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run C compiled programs.
+	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot run C compiled programs.
 If you meant to cross compile, use \`--host'.
 See \`config.log' for more details" "$LINENO" 5; }
     fi
   fi
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+printf "%s\n" "$cross_compiling" >&6; }
 
 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
 ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
-$as_echo_n "checking for suffix of object files... " >&6; }
-if ${ac_cv_objext+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+printf %s "checking for suffix of object files... " >&6; }
+if test ${ac_cv_objext+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
-main ()
+main (void)
 {
 
   ;
@@ -3035,11 +3486,12 @@ case "(($ac_try" in
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
   (eval "$ac_compile") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then :
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+then :
   for ac_file in conftest.o conftest.obj conftest.*; do
   test -f "$ac_file" || continue;
   case $ac_file in
@@ -3048,1010 +3500,32 @@ $as_echo "$ac_try_echo"; } >&5
        break;;
   esac
 done
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details" "$LINENO" 5; }
-fi
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
-$as_echo "$ac_cv_objext" >&6; }
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
-$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if ${ac_cv_c_compiler_gnu+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-#ifndef __GNUC__
-       choke me
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_compiler_gnu=yes
-else
-  ac_compiler_gnu=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
-$as_echo "$ac_cv_c_compiler_gnu" >&6; }
-if test $ac_compiler_gnu = yes; then
-  GCC=yes
-else
-  GCC=
-fi
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if ${ac_cv_prog_cc_g+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_save_c_werror_flag=$ac_c_werror_flag
-   ac_c_werror_flag=yes
-   ac_cv_prog_cc_g=no
-   CFLAGS="-g"
-   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_prog_cc_g=yes
-else
-  CFLAGS=""
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-else
-  ac_c_werror_flag=$ac_save_c_werror_flag
-	 CFLAGS="-g"
-	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_prog_cc_g=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-   ac_c_werror_flag=$ac_save_c_werror_flag
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
-$as_echo "$ac_cv_prog_cc_g" >&6; }
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if ${ac_cv_prog_cc_c89+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_prog_cc_c89=no
-ac_save_CC=$CC
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdarg.h>
-#include <stdio.h>
-struct stat;
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
-     char **p;
-     int i;
-{
-  return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
-  char *s;
-  va_list v;
-  va_start (v,p);
-  s = g (p, va_arg (v,int));
-  va_end (v);
-  return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
-   function prototypes and stuff, but not '\xHH' hex character constants.
-   These don't provoke an error unfortunately, instead are silently treated
-   as 'x'.  The following induces an error, until -std is added to get
-   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
-   array size at least.  It's necessary to write '\x00'==0 to get something
-   that's true only with -std.  */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
-   inside strings and character constants.  */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
-
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
-  ;
-  return 0;
-}
-_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
-	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
-  CC="$ac_save_CC $ac_arg"
-  if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_prog_cc_c89=$ac_arg
-fi
-rm -f core conftest.err conftest.$ac_objext
-  test "x$ac_cv_prog_cc_c89" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-
-fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
-  x)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
-  xno)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
-  *)
-    CC="$CC $ac_cv_prog_cc_c89"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c89" != xno; then :
-
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
-$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
-if ${am_cv_prog_cc_c_o+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-  # Make sure it works both with $CC and with simple cc.
-  # Following AC_PROG_CC_C_O, we do the test twice because some
-  # compilers refuse to overwrite an existing .o file with -o,
-  # though they will create one.
-  am_cv_prog_cc_c_o=yes
-  for am_i in 1 2; do
-    if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
-   ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
-   ac_status=$?
-   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-   (exit $ac_status); } \
-         && test -f conftest2.$ac_objext; then
-      : OK
-    else
-      am_cv_prog_cc_c_o=no
-      break
-    fi
-  done
-  rm -f core conftest*
-  unset am_i
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
-$as_echo "$am_cv_prog_cc_c_o" >&6; }
-if test "$am_cv_prog_cc_c_o" != yes; then
-   # Losing compiler, so override with the script.
-   # FIXME: It is wrong to rewrite CC.
-   # But if we don't then we get into trouble of one sort or another.
-   # A longer-term fix would be to have automake use am__CC in this case,
-   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
-   CC="$am_aux_dir/compile $CC"
-fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-  if ${ac_cv_prog_CPP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-      # Double quotes because CPP needs to be expanded
-    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
-    do
-      ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-		     Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
-  # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-  # Broken: success on invalid input.
-continue
-else
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-  break
-fi
-
-    done
-    ac_cv_prog_CPP=$CPP
-
-fi
-  CPP=$ac_cv_prog_CPP
-else
-  ac_cv_prog_CPP=$CPP
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
-$as_echo "$CPP" >&6; }
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-		     Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
-  # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-  # Broken: success on invalid input.
-continue
-else
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-
-else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
-$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if ${ac_cv_path_GREP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -z "$GREP"; then
-  ac_path_GREP_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_prog in grep ggrep; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
-      as_fn_executable_p "$ac_path_GREP" || continue
-# Check for GNU ac_path_GREP and select it if it is found.
-  # Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo 'GREP' >> "conftest.nl"
-    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    as_fn_arith $ac_count + 1 && ac_count=$as_val
-    if test $ac_count -gt ${ac_path_GREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_GREP="$ac_path_GREP"
-      ac_path_GREP_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-      $ac_path_GREP_found && break 3
-    done
-  done
-  done
-IFS=$as_save_IFS
-  if test -z "$ac_cv_path_GREP"; then
-    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
-  fi
-else
-  ac_cv_path_GREP=$GREP
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
-$as_echo "$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
-$as_echo_n "checking for egrep... " >&6; }
-if ${ac_cv_path_EGREP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
-   then ac_cv_path_EGREP="$GREP -E"
-   else
-     if test -z "$EGREP"; then
-  ac_path_EGREP_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_prog in egrep; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
-      as_fn_executable_p "$ac_path_EGREP" || continue
-# Check for GNU ac_path_EGREP and select it if it is found.
-  # Check for GNU $ac_path_EGREP
-case `"$ac_path_EGREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo 'EGREP' >> "conftest.nl"
-    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    as_fn_arith $ac_count + 1 && ac_count=$as_val
-    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_EGREP="$ac_path_EGREP"
-      ac_path_EGREP_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-      $ac_path_EGREP_found && break 3
-    done
-  done
-  done
-IFS=$as_save_IFS
-  if test -z "$ac_cv_path_EGREP"; then
-    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
-  fi
-else
-  ac_cv_path_EGREP=$EGREP
-fi
-
-   fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
-$as_echo "$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if ${ac_cv_header_stdc+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_header_stdc=yes
-else
-  ac_cv_header_stdc=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then :
-
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then :
-
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-  if test "$cross_compiling" = yes; then :
-  :
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
-		   (('a' <= (c) && (c) <= 'i') \
-		     || ('j' <= (c) && (c) <= 'r') \
-		     || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
-  int i;
-  for (i = 0; i < 256; i++)
-    if (XOR (islower (i), ISLOWER (i))
-	|| toupper (i) != TOUPPER (i))
-      return 2;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
-else
-  ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
-
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_CC="${ac_tool_prefix}gcc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_CC"; then
-  ac_ct_CC=$CC
-  # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_CC="gcc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    CC=$ac_ct_CC
-  fi
-else
-  CC="$ac_cv_prog_CC"
-fi
-
-if test -z "$CC"; then
-          if test -n "$ac_tool_prefix"; then
-    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_CC="${ac_tool_prefix}cc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  fi
-fi
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
-       ac_prog_rejected=yes
-       continue
-     fi
-    ac_cv_prog_CC="cc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# != 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
-  fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$CC"; then
-  if test -n "$ac_tool_prefix"; then
-  for ac_prog in cl.exe
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-    test -n "$CC" && break
-  done
-fi
-if test -z "$CC"; then
-  ac_ct_CC=$CC
-  for ac_prog in cl.exe
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_CC="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$ac_ct_CC" && break
-done
-
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    CC=$ac_ct_CC
-  fi
-fi
-
-fi
-
-
-test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "no acceptable C compiler found in \$PATH
-See \`config.log' for more details" "$LINENO" 5; }
-
-# Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
-  { { ac_try="$ac_compiler $ac_option >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    sed '10a\
-... rest of stderr output deleted ...
-         10q' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-  fi
-  rm -f conftest.er1 conftest.err
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }
-done
+else $as_nop
+  printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
-$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if ${ac_cv_c_compiler_gnu+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+printf "%s\n" "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
+printf %s "checking whether the compiler supports GNU C... " >&6; }
+if test ${ac_cv_c_compiler_gnu+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
-main ()
+main (void)
 {
 #ifndef __GNUC__
        choke me
@@ -4061,29 +3535,33 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   ac_compiler_gnu=yes
-else
+else $as_nop
   ac_compiler_gnu=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 ac_cv_c_compiler_gnu=$ac_compiler_gnu
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
-$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
 if test $ac_compiler_gnu = yes; then
   GCC=yes
 else
   GCC=
 fi
-ac_test_CFLAGS=${CFLAGS+set}
+ac_test_CFLAGS=${CFLAGS+y}
 ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if ${ac_cv_prog_cc_g+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+printf %s "checking whether $CC accepts -g... " >&6; }
+if test ${ac_cv_prog_cc_g+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   ac_save_c_werror_flag=$ac_c_werror_flag
    ac_c_werror_flag=yes
    ac_cv_prog_cc_g=no
@@ -4092,57 +3570,60 @@ else
 /* end confdefs.h.  */
 
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   ac_cv_prog_cc_g=yes
-else
+else $as_nop
   CFLAGS=""
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
 
-else
+else $as_nop
   ac_c_werror_flag=$ac_save_c_werror_flag
 	 CFLAGS="-g"
 	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   ac_cv_prog_cc_g=yes
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
    ac_c_werror_flag=$ac_save_c_werror_flag
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
-$as_echo "$ac_cv_prog_cc_g" >&6; }
-if test "$ac_test_CFLAGS" = set; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
+if test $ac_test_CFLAGS; then
   CFLAGS=$ac_save_CFLAGS
 elif test $ac_cv_prog_cc_g = yes; then
   if test "$GCC" = yes; then
@@ -4157,94 +3638,144 @@ else
     CFLAGS=
   fi
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if ${ac_cv_prog_cc_c89+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_prog_cc_c89=no
+ac_prog_cc_stdc=no
+if test x$ac_prog_cc_stdc = xno
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
+printf %s "checking for $CC option to enable C11 features... " >&6; }
+if test ${ac_cv_prog_cc_c11+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_cv_prog_cc_c11=no
 ac_save_CC=$CC
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <stdarg.h>
-#include <stdio.h>
-struct stat;
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
-     char **p;
-     int i;
-{
-  return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
-  char *s;
-  va_list v;
-  va_start (v,p);
-  s = g (p, va_arg (v,int));
-  va_end (v);
-  return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
-   function prototypes and stuff, but not '\xHH' hex character constants.
-   These don't provoke an error unfortunately, instead are silently treated
-   as 'x'.  The following induces an error, until -std is added to get
-   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
-   array size at least.  It's necessary to write '\x00'==0 to get something
-   that's true only with -std.  */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+$ac_c_conftest_c11_program
+_ACEOF
+for ac_arg in '' -std=gnu11
+do
+  CC="$ac_save_CC $ac_arg"
+  if ac_fn_c_try_compile "$LINENO"
+then :
+  ac_cv_prog_cc_c11=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+  test "x$ac_cv_prog_cc_c11" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
 
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
-   inside strings and character constants.  */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+if test "x$ac_cv_prog_cc_c11" = xno
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+  if test "x$ac_cv_prog_cc_c11" = x
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
+printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
+     CC="$CC $ac_cv_prog_cc_c11"
+fi
+  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
+  ac_prog_cc_stdc=c11
+fi
+fi
+if test x$ac_prog_cc_stdc = xno
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
+printf %s "checking for $CC option to enable C99 features... " >&6; }
+if test ${ac_cv_prog_cc_c99+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_c_conftest_c99_program
+_ACEOF
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
+do
+  CC="$ac_save_CC $ac_arg"
+  if ac_fn_c_try_compile "$LINENO"
+then :
+  ac_cv_prog_cc_c99=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+  test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
 
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
-  ;
-  return 0;
-}
+if test "x$ac_cv_prog_cc_c99" = xno
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+  if test "x$ac_cv_prog_cc_c99" = x
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
+     CC="$CC $ac_cv_prog_cc_c99"
+fi
+  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
+  ac_prog_cc_stdc=c99
+fi
+fi
+if test x$ac_prog_cc_stdc = xno
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
+printf %s "checking for $CC option to enable C89 features... " >&6; }
+if test ${ac_cv_prog_cc_c89+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_c_conftest_c89_program
 _ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
-	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
 do
   CC="$ac_save_CC $ac_arg"
-  if ac_fn_c_try_compile "$LINENO"; then :
+  if ac_fn_c_try_compile "$LINENO"
+then :
   ac_cv_prog_cc_c89=$ac_arg
 fi
-rm -f core conftest.err conftest.$ac_objext
+rm -f core conftest.err conftest.$ac_objext conftest.beam
   test "x$ac_cv_prog_cc_c89" != "xno" && break
 done
 rm -f conftest.$ac_ext
 CC=$ac_save_CC
-
 fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
-  x)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
-  xno)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
-  *)
-    CC="$CC $ac_cv_prog_cc_c89"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c89" != xno; then :
 
+if test "x$ac_cv_prog_cc_c89" = xno
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+  if test "x$ac_cv_prog_cc_c89" = x
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
+     CC="$CC $ac_cv_prog_cc_c89"
+fi
+  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
+  ac_prog_cc_stdc=c89
+fi
 fi
 
 ac_ext=c
@@ -4253,21 +3784,28 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-ac_ext=c
+
+
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
+
+
+  ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
-$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
-if ${am_cv_prog_cc_c_o+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
+printf %s "checking whether $CC understands -c and -o together... " >&6; }
+if test ${am_cv_prog_cc_c_o+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
-main ()
+main (void)
 {
 
   ;
@@ -4295,8 +3833,8 @@ _ACEOF
   rm -f core conftest*
   unset am_i
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
-$as_echo "$am_cv_prog_cc_c_o" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
+printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
 if test "$am_cv_prog_cc_c_o" != yes; then
    # Losing compiler, so override with the script.
    # FIXME: It is wrong to rewrite CC.
@@ -4317,40 +3855,36 @@ ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+printf %s "checking how to run the C preprocessor... " >&6; }
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
 fi
 if test -z "$CPP"; then
-  if ${ac_cv_prog_CPP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-      # Double quotes because CPP needs to be expanded
-    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+  if test ${ac_cv_prog_CPP+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+      # Double quotes because $CC needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
     do
       ac_preproc_ok=false
 for ac_c_preproc_warn_flag in '' yes
 do
   # Use a header file that comes with gcc, so configuring glibc
   # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp. "Syntax error" is here to catch this case.
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+#include <limits.h>
 		     Syntax error
 _ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
 
-else
+else $as_nop
   # Broken: fails on valid input.
 continue
 fi
@@ -4362,10 +3896,11 @@ rm -f conftest.err conftest.i conftest.$ac_ext
 /* end confdefs.h.  */
 #include <ac_nonexistent.h>
 _ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
   # Broken: success on invalid input.
 continue
-else
+else $as_nop
   # Passes both tests.
 ac_preproc_ok=:
 break
@@ -4375,7 +3910,8 @@ rm -f conftest.err conftest.i conftest.$ac_ext
 done
 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
 rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
+if $ac_preproc_ok
+then :
   break
 fi
 
@@ -4387,29 +3923,24 @@ fi
 else
   ac_cv_prog_CPP=$CPP
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
-$as_echo "$CPP" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+printf "%s\n" "$CPP" >&6; }
 ac_preproc_ok=false
 for ac_c_preproc_warn_flag in '' yes
 do
   # Use a header file that comes with gcc, so configuring glibc
   # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp. "Syntax error" is here to catch this case.
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+#include <limits.h>
 		     Syntax error
 _ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
 
-else
+else $as_nop
   # Broken: fails on valid input.
 continue
 fi
@@ -4421,10 +3952,11 @@ rm -f conftest.err conftest.i conftest.$ac_ext
 /* end confdefs.h.  */
 #include <ac_nonexistent.h>
 _ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
   # Broken: success on invalid input.
 continue
-else
+else $as_nop
   # Passes both tests.
 ac_preproc_ok=:
 break
@@ -4434,11 +3966,12 @@ rm -f conftest.err conftest.i conftest.$ac_ext
 done
 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
 rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
+if $ac_preproc_ok
+then :
 
-else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+else $as_nop
+  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
 See \`config.log' for more details" "$LINENO" 5; }
 fi
@@ -4451,14 +3984,15 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 case `pwd` in
   *\ * | *\	*)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
-$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
+printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
 esac
 
 
 
-macro_version='2.4.6'
-macro_revision='2.4.6'
+macro_version='2.4.7'
+macro_revision='2.4.7'
+
 
 
 
@@ -4474,26 +4008,29 @@ macro_revision='2.4.6'
 
 ltmain=$ac_aux_dir/ltmain.sh
 
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
-  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
-$as_echo_n "checking build system type... " >&6; }
-if ${ac_cv_build+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+
+  # Make sure we can run config.sub.
+$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
+  as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+printf %s "checking build system type... " >&6; }
+if test ${ac_cv_build+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   ac_build_alias=$build_alias
 test "x$ac_build_alias" = x &&
-  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+  ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
 test "x$ac_build_alias" = x &&
   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
-  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
+  as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
-$as_echo "$ac_cv_build" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+printf "%s\n" "$ac_cv_build" >&6; }
 case $ac_cv_build in
 *-*-*) ;;
 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
@@ -4512,21 +4049,22 @@ IFS=$ac_save_IFS
 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
-$as_echo_n "checking host system type... " >&6; }
-if ${ac_cv_host+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+printf %s "checking host system type... " >&6; }
+if test ${ac_cv_host+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test "x$host_alias" = x; then
   ac_cv_host=$ac_cv_build
 else
-  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
-    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+  ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
+    as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
 fi
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
-$as_echo "$ac_cv_host" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+printf "%s\n" "$ac_cv_host" >&6; }
 case $ac_cv_host in
 *-*-*) ;;
 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
@@ -4566,8 +4104,8 @@ ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
-$as_echo_n "checking how to print strings... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
+printf %s "checking how to print strings... " >&6; }
 # Test print first, because it will be a builtin if present.
 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
    test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
@@ -4593,12 +4131,12 @@ func_echo_all ()
 }
 
 case $ECHO in
-  printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
-$as_echo "printf" >&6; } ;;
-  print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
-$as_echo "print -r" >&6; } ;;
-  *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
-$as_echo "cat" >&6; } ;;
+  printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5
+printf "%s\n" "printf" >&6; } ;;
+  print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
+printf "%s\n" "print -r" >&6; } ;;
+  *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5
+printf "%s\n" "cat" >&6; } ;;
 esac
 
 
@@ -4614,11 +4152,12 @@ esac
 
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
-$as_echo_n "checking for a sed that does not truncate output... " >&6; }
-if ${ac_cv_path_SED+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+printf %s "checking for a sed that does not truncate output... " >&6; }
+if test ${ac_cv_path_SED+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
      for ac_i in 1 2 3 4 5 6 7; do
        ac_script="$ac_script$as_nl$ac_script"
@@ -4632,10 +4171,15 @@ else
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_prog in sed gsed; do
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_prog in sed gsed
+   do
     for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+      ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
       as_fn_executable_p "$ac_path_SED" || continue
 # Check for GNU ac_path_SED and select it if it is found.
   # Check for GNU $ac_path_SED
@@ -4644,13 +4188,13 @@ case `"$ac_path_SED" --version 2>&1` in
   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
 *)
   ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
+  printf %s 0123456789 >"conftest.in"
   while :
   do
     cat "conftest.in" "conftest.in" >"conftest.tmp"
     mv "conftest.tmp" "conftest.in"
     cp "conftest.in" "conftest.nl"
-    $as_echo '' >> "conftest.nl"
+    printf "%s\n" '' >> "conftest.nl"
     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
     as_fn_arith $ac_count + 1 && ac_count=$as_val
@@ -4678,8 +4222,8 @@ else
 fi
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
-$as_echo "$ac_cv_path_SED" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+printf "%s\n" "$ac_cv_path_SED" >&6; }
  SED="$ac_cv_path_SED"
   rm -f conftest.sed
 
@@ -4696,11 +4240,154 @@ Xsed="$SED -e 1s/^X//"
 
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
-$as_echo_n "checking for fgrep... " >&6; }
-if ${ac_cv_path_FGREP+:} false; then :
-  $as_echo_n "(cached) " >&6
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+printf %s "checking for grep that handles long lines and -e... " >&6; }
+if test ${ac_cv_path_GREP+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test -z "$GREP"; then
+  ac_path_GREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_prog in grep ggrep
+   do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
+      as_fn_executable_p "$ac_path_GREP" || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+  # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+  ac_count=0
+  printf %s 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    printf "%s\n" 'GREP' >> "conftest.nl"
+    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_GREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_GREP="$ac_path_GREP"
+      ac_path_GREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_GREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_GREP"; then
+    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+printf "%s\n" "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+printf %s "checking for egrep... " >&6; }
+if test ${ac_cv_path_EGREP+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+   then ac_cv_path_EGREP="$GREP -E"
+   else
+     if test -z "$EGREP"; then
+  ac_path_EGREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_prog in egrep
+   do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
+      as_fn_executable_p "$ac_path_EGREP" || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+  # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+  ac_count=0
+  printf %s 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    printf "%s\n" 'EGREP' >> "conftest.nl"
+    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_EGREP="$ac_path_EGREP"
+      ac_path_EGREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_EGREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_EGREP"; then
+    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
 else
+  ac_cv_path_EGREP=$EGREP
+fi
+
+   fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+printf "%s\n" "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
+printf %s "checking for fgrep... " >&6; }
+if test ${ac_cv_path_FGREP+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
    then ac_cv_path_FGREP="$GREP -F"
    else
@@ -4711,10 +4398,15 @@ else
 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_prog in fgrep; do
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_prog in fgrep
+   do
     for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
+      ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext"
       as_fn_executable_p "$ac_path_FGREP" || continue
 # Check for GNU ac_path_FGREP and select it if it is found.
   # Check for GNU $ac_path_FGREP
@@ -4723,13 +4415,13 @@ case `"$ac_path_FGREP" --version 2>&1` in
   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
 *)
   ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
+  printf %s 0123456789 >"conftest.in"
   while :
   do
     cat "conftest.in" "conftest.in" >"conftest.tmp"
     mv "conftest.tmp" "conftest.in"
     cp "conftest.in" "conftest.nl"
-    $as_echo 'FGREP' >> "conftest.nl"
+    printf "%s\n" 'FGREP' >> "conftest.nl"
     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
     as_fn_arith $ac_count + 1 && ac_count=$as_val
@@ -4758,8 +4450,8 @@ fi
 
    fi
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
-$as_echo "$ac_cv_path_FGREP" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
+printf "%s\n" "$ac_cv_path_FGREP" >&6; }
  FGREP="$ac_cv_path_FGREP"
 
 
@@ -4784,17 +4476,18 @@ test -z "$GREP" && GREP=grep
 
 
 # Check whether --with-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then :
+if test ${with_gnu_ld+y}
+then :
   withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
-else
+else $as_nop
   with_gnu_ld=no
 fi
 
 ac_prog=ld
 if test yes = "$GCC"; then
   # Check if gcc -print-prog-name=ld gives a path.
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
-$as_echo_n "checking for ld used by $CC... " >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+printf %s "checking for ld used by $CC... " >&6; }
   case $host in
   *-*-mingw*)
     # gcc leaves a trailing carriage return, which upsets mingw
@@ -4823,15 +4516,16 @@ $as_echo_n "checking for ld used by $CC... " >&6; }
     ;;
   esac
 elif test yes = "$with_gnu_ld"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
-$as_echo_n "checking for GNU ld... " >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+printf %s "checking for GNU ld... " >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
-$as_echo_n "checking for non-GNU ld... " >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+printf %s "checking for non-GNU ld... " >&6; }
 fi
-if ${lt_cv_path_LD+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+if test ${lt_cv_path_LD+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -z "$LD"; then
   lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
   for ac_dir in $PATH; do
@@ -4860,18 +4554,19 @@ fi
 
 LD=$lt_cv_path_LD
 if test -n "$LD"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
-$as_echo "$LD" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+printf "%s\n" "$LD" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
-$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
-if ${lt_cv_prog_gnu_ld+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
+if test ${lt_cv_prog_gnu_ld+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   # I'd rather use --version here, but apparently some GNU lds only accept -v.
 case `$LD -v 2>&1 </dev/null` in
 *GNU* | *'with BFD'*)
@@ -4882,8 +4577,8 @@ case `$LD -v 2>&1 </dev/null` in
   ;;
 esac
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
-$as_echo "$lt_cv_prog_gnu_ld" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
+printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; }
 with_gnu_ld=$lt_cv_prog_gnu_ld
 
 
@@ -4894,11 +4589,12 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
 
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
-$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
-if ${lt_cv_path_NM+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
+printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
+if test ${lt_cv_path_NM+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$NM"; then
   # Let the user override the test.
   lt_cv_path_NM=$NM
@@ -4923,13 +4619,13 @@ else
 	mingw*) lt_bad_file=conftest.nm/nofile ;;
 	*) lt_bad_file=/dev/null ;;
 	esac
-	case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
+	case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
 	*$lt_bad_file* | *'Invalid file or object type'*)
 	  lt_cv_path_NM="$tmp_nm -B"
 	  break 2
 	  ;;
 	*)
-	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+	  case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in
 	  */dev/null*)
 	    lt_cv_path_NM="$tmp_nm -p"
 	    break 2
@@ -4948,8 +4644,8 @@ else
   : ${lt_cv_path_NM=no}
 fi
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
-$as_echo "$lt_cv_path_NM" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
+printf "%s\n" "$lt_cv_path_NM" >&6; }
 if test no != "$lt_cv_path_NM"; then
   NM=$lt_cv_path_NM
 else
@@ -4962,11 +4658,12 @@ else
   do
     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_DUMPBIN+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_DUMPBIN+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$DUMPBIN"; then
   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
 else
@@ -4974,11 +4671,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -4989,11 +4690,11 @@ fi
 fi
 DUMPBIN=$ac_cv_prog_DUMPBIN
 if test -n "$DUMPBIN"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
-$as_echo "$DUMPBIN" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
+printf "%s\n" "$DUMPBIN" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -5006,11 +4707,12 @@ if test -z "$DUMPBIN"; then
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_DUMPBIN+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$ac_ct_DUMPBIN"; then
   ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
 else
@@ -5018,11 +4720,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -5033,11 +4739,11 @@ fi
 fi
 ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
 if test -n "$ac_ct_DUMPBIN"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
-$as_echo "$ac_ct_DUMPBIN" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
+printf "%s\n" "$ac_ct_DUMPBIN" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -5049,15 +4755,15 @@ done
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
     DUMPBIN=$ac_ct_DUMPBIN
   fi
 fi
 
-    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
+    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in
     *COFF*)
       DUMPBIN="$DUMPBIN -symbols -headers"
       ;;
@@ -5078,11 +4784,12 @@ test -z "$NM" && NM=nm
 
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
-$as_echo_n "checking the name lister ($NM) interface... " >&6; }
-if ${lt_cv_nm_interface+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
+printf %s "checking the name lister ($NM) interface... " >&6; }
+if test ${lt_cv_nm_interface+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   lt_cv_nm_interface="BSD nm"
   echo "int some_variable = 0;" > conftest.$ac_ext
   (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
@@ -5098,26 +4805,27 @@ else
   fi
   rm -f conftest*
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
-$as_echo "$lt_cv_nm_interface" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
+printf "%s\n" "$lt_cv_nm_interface" >&6; }
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
-$as_echo_n "checking whether ln -s works... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
+printf %s "checking whether ln -s works... " >&6; }
 LN_S=$as_ln_s
 if test "$LN_S" = "ln -s"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
-$as_echo "no, using $LN_S" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+printf "%s\n" "no, using $LN_S" >&6; }
 fi
 
 # find the maximum length of command line arguments
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
-$as_echo_n "checking the maximum length of command line arguments... " >&6; }
-if ${lt_cv_sys_max_cmd_len+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
+printf %s "checking the maximum length of command line arguments... " >&6; }
+if test ${lt_cv_sys_max_cmd_len+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
     i=0
   teststring=ABCD
 
@@ -5159,7 +4867,7 @@ else
     lt_cv_sys_max_cmd_len=8192;
     ;;
 
-  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
+  bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
     # This has been around since 386BSD, at least.  Likely further.
     if test -x /sbin/sysctl; then
       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
@@ -5202,7 +4910,7 @@ else
   sysv5* | sco5v6* | sysv4.2uw2*)
     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
     if test -n "$kargmax"; then
-      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[	 ]//'`
+      lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[	 ]//'`
     else
       lt_cv_sys_max_cmd_len=32768
     fi
@@ -5244,11 +4952,11 @@ else
 fi
 
 if test -n "$lt_cv_sys_max_cmd_len"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
-$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
+printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
-$as_echo "none" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
+printf "%s\n" "none" >&6; }
 fi
 max_cmd_len=$lt_cv_sys_max_cmd_len
 
@@ -5292,11 +5000,12 @@ esac
 
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
-$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
-if ${lt_cv_to_host_file_cmd+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
+printf %s "checking how to convert $build file names to $host format... " >&6; }
+if test ${lt_cv_to_host_file_cmd+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   case $host in
   *-*-mingw* )
     case $build in
@@ -5332,18 +5041,19 @@ esac
 fi
 
 to_host_file_cmd=$lt_cv_to_host_file_cmd
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
-$as_echo "$lt_cv_to_host_file_cmd" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
+printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; }
 
 
 
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
-$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
-if ${lt_cv_to_tool_file_cmd+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
+printf %s "checking how to convert $build file names to toolchain format... " >&6; }
+if test ${lt_cv_to_tool_file_cmd+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   #assume ordinary cross tools, or native build.
 lt_cv_to_tool_file_cmd=func_convert_file_noop
 case $host in
@@ -5359,22 +5069,23 @@ esac
 fi
 
 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
-$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
+printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; }
 
 
 
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
-$as_echo_n "checking for $LD option to reload object files... " >&6; }
-if ${lt_cv_ld_reload_flag+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
+printf %s "checking for $LD option to reload object files... " >&6; }
+if test ${lt_cv_ld_reload_flag+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   lt_cv_ld_reload_flag='-r'
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
-$as_echo "$lt_cv_ld_reload_flag" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
+printf "%s\n" "$lt_cv_ld_reload_flag" >&6; }
 reload_flag=$lt_cv_ld_reload_flag
 case $reload_flag in
 "" | " "*) ;;
@@ -5404,14 +5115,123 @@ esac
 
 
 
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}file", so it can be a program name with args.
+set dummy ${ac_tool_prefix}file; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_FILECMD+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test -n "$FILECMD"; then
+  ac_cv_prog_FILECMD="$FILECMD" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_prog_FILECMD="${ac_tool_prefix}file"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+FILECMD=$ac_cv_prog_FILECMD
+if test -n "$FILECMD"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FILECMD" >&5
+printf "%s\n" "$FILECMD" >&6; }
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_FILECMD"; then
+  ac_ct_FILECMD=$FILECMD
+  # Extract the first word of "file", so it can be a program name with args.
+set dummy file; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_FILECMD+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test -n "$ac_ct_FILECMD"; then
+  ac_cv_prog_ac_ct_FILECMD="$ac_ct_FILECMD" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_FILECMD="file"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_FILECMD=$ac_cv_prog_ac_ct_FILECMD
+if test -n "$ac_ct_FILECMD"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FILECMD" >&5
+printf "%s\n" "$ac_ct_FILECMD" >&6; }
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+  if test "x$ac_ct_FILECMD" = x; then
+    FILECMD=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    FILECMD=$ac_ct_FILECMD
+  fi
+else
+  FILECMD="$ac_cv_prog_FILECMD"
+fi
+
+
+
+
+
+
+
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
 set dummy ${ac_tool_prefix}objdump; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_OBJDUMP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_OBJDUMP+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$OBJDUMP"; then
   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
 else
@@ -5419,11 +5239,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -5434,11 +5258,11 @@ fi
 fi
 OBJDUMP=$ac_cv_prog_OBJDUMP
 if test -n "$OBJDUMP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
-$as_echo "$OBJDUMP" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
+printf "%s\n" "$OBJDUMP" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -5447,11 +5271,12 @@ if test -z "$ac_cv_prog_OBJDUMP"; then
   ac_ct_OBJDUMP=$OBJDUMP
   # Extract the first word of "objdump", so it can be a program name with args.
 set dummy objdump; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_OBJDUMP+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$ac_ct_OBJDUMP"; then
   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
 else
@@ -5459,11 +5284,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_OBJDUMP="objdump"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -5474,11 +5303,11 @@ fi
 fi
 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
 if test -n "$ac_ct_OBJDUMP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
-$as_echo "$ac_ct_OBJDUMP" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
+printf "%s\n" "$ac_ct_OBJDUMP" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
   if test "x$ac_ct_OBJDUMP" = x; then
@@ -5486,8 +5315,8 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
     OBJDUMP=$ac_ct_OBJDUMP
@@ -5506,11 +5335,12 @@ test -z "$OBJDUMP" && OBJDUMP=objdump
 
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
-$as_echo_n "checking how to recognize dependent libraries... " >&6; }
-if ${lt_cv_deplibs_check_method+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
+printf %s "checking how to recognize dependent libraries... " >&6; }
+if test ${lt_cv_deplibs_check_method+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   lt_cv_file_magic_cmd='$MAGIC_CMD'
 lt_cv_file_magic_test_file=
 lt_cv_deplibs_check_method='unknown'
@@ -5536,7 +5366,7 @@ beos*)
 
 bsdi[45]*)
   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
-  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  lt_cv_file_magic_cmd='$FILECMD -L'
   lt_cv_file_magic_test_file=/shlib/libc.so
   ;;
 
@@ -5570,14 +5400,14 @@ darwin* | rhapsody*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-freebsd* | dragonfly*)
+freebsd* | dragonfly* | midnightbsd*)
   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
     case $host_cpu in
     i*86 )
       # Not sure whether the presence of OpenBSD here was a mistake.
       # Let's accept both of them until this is cleared up.
       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
-      lt_cv_file_magic_cmd=/usr/bin/file
+      lt_cv_file_magic_cmd=$FILECMD
       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
       ;;
     esac
@@ -5591,7 +5421,7 @@ haiku*)
   ;;
 
 hpux10.20* | hpux11*)
-  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_cmd=$FILECMD
   case $host_cpu in
   ia64*)
     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
@@ -5638,7 +5468,7 @@ netbsd*)
 
 newos6*)
   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
-  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_cmd=$FILECMD
   lt_cv_file_magic_test_file=/usr/lib/libnls.so
   ;;
 
@@ -5706,8 +5536,8 @@ os2*)
 esac
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
-$as_echo "$lt_cv_deplibs_check_method" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
+printf "%s\n" "$lt_cv_deplibs_check_method" >&6; }
 
 file_magic_glob=
 want_nocaseglob=no
@@ -5751,11 +5581,12 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_DLLTOOL+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_DLLTOOL+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$DLLTOOL"; then
   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
 else
@@ -5763,11 +5594,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -5778,11 +5613,11 @@ fi
 fi
 DLLTOOL=$ac_cv_prog_DLLTOOL
 if test -n "$DLLTOOL"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
-$as_echo "$DLLTOOL" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
+printf "%s\n" "$DLLTOOL" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -5791,11 +5626,12 @@ if test -z "$ac_cv_prog_DLLTOOL"; then
   ac_ct_DLLTOOL=$DLLTOOL
   # Extract the first word of "dlltool", so it can be a program name with args.
 set dummy dlltool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_DLLTOOL+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$ac_ct_DLLTOOL"; then
   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
 else
@@ -5803,11 +5639,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -5818,11 +5658,11 @@ fi
 fi
 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
 if test -n "$ac_ct_DLLTOOL"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
-$as_echo "$ac_ct_DLLTOOL" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
+printf "%s\n" "$ac_ct_DLLTOOL" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
   if test "x$ac_ct_DLLTOOL" = x; then
@@ -5830,8 +5670,8 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
     DLLTOOL=$ac_ct_DLLTOOL
@@ -5851,11 +5691,12 @@ test -z "$DLLTOOL" && DLLTOOL=dlltool
 
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
-$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
-if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
+printf %s "checking how to associate runtime and link libraries... " >&6; }
+if test ${lt_cv_sharedlib_from_linklib_cmd+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   lt_cv_sharedlib_from_linklib_cmd='unknown'
 
 case $host_os in
@@ -5878,8 +5719,8 @@ cygwin* | mingw* | pw32* | cegcc*)
 esac
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
-$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
+printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
 
@@ -5889,16 +5730,18 @@ test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
 
 
 
+
 if test -n "$ac_tool_prefix"; then
   for ac_prog in ar
   do
     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_AR+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_AR+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$AR"; then
   ac_cv_prog_AR="$AR" # Let the user override the test.
 else
@@ -5906,11 +5749,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -5921,11 +5768,11 @@ fi
 fi
 AR=$ac_cv_prog_AR
 if test -n "$AR"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
-$as_echo "$AR" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+printf "%s\n" "$AR" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -5938,11 +5785,12 @@ if test -z "$AR"; then
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_AR+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_AR+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$ac_ct_AR"; then
   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
 else
@@ -5950,11 +5798,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_AR="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -5965,11 +5817,11 @@ fi
 fi
 ac_ct_AR=$ac_cv_prog_ac_ct_AR
 if test -n "$ac_ct_AR"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
-$as_echo "$ac_ct_AR" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+printf "%s\n" "$ac_ct_AR" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -5981,8 +5833,8 @@ done
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
     AR=$ac_ct_AR
@@ -5990,42 +5842,60 @@ esac
 fi
 
 : ${AR=ar}
-: ${AR_FLAGS=cru}
 
 
 
 
 
 
+# Use ARFLAGS variable as AR's operation code to sync the variable naming with
+# Automake.  If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
+# higher priority because thats what people were doing historically (setting
+# ARFLAGS for automake and AR_FLAGS for libtool).  FIXME: Make the AR_FLAGS
+# variable obsoleted/removed.
 
+test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
+lt_ar_flags=$AR_FLAGS
 
 
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
-$as_echo_n "checking for archiver @FILE support... " >&6; }
-if ${lt_cv_ar_at_file+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+
+
+# Make AR_FLAGS overridable by 'make ARFLAGS='.  Don't try to run-time override
+# by AR_FLAGS because that was never working and AR_FLAGS is about to die.
+
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
+printf %s "checking for archiver @FILE support... " >&6; }
+if test ${lt_cv_ar_at_file+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   lt_cv_ar_at_file=no
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   echo conftest.$ac_objext > conftest.lst
       lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
       { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
   (eval $lt_ar_try) 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }
       if test 0 -eq "$ac_status"; then
 	# Ensure the archiver fails upon bogus file names.
@@ -6033,7 +5903,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
 	{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
   (eval $lt_ar_try) 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }
 	if test 0 -ne "$ac_status"; then
           lt_cv_ar_at_file=@
@@ -6042,11 +5912,11 @@ if ac_fn_c_try_compile "$LINENO"; then :
       rm -f conftest.* libconftest.a
 
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
-$as_echo "$lt_cv_ar_at_file" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
+printf "%s\n" "$lt_cv_ar_at_file" >&6; }
 
 if test no = "$lt_cv_ar_at_file"; then
   archiver_list_spec=
@@ -6063,11 +5933,12 @@ fi
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
 set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_STRIP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_STRIP+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$STRIP"; then
   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
 else
@@ -6075,11 +5946,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -6090,11 +5965,11 @@ fi
 fi
 STRIP=$ac_cv_prog_STRIP
 if test -n "$STRIP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+printf "%s\n" "$STRIP" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -6103,11 +5978,12 @@ if test -z "$ac_cv_prog_STRIP"; then
   ac_ct_STRIP=$STRIP
   # Extract the first word of "strip", so it can be a program name with args.
 set dummy strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_STRIP+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$ac_ct_STRIP"; then
   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
 else
@@ -6115,11 +5991,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_STRIP="strip"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -6130,11 +6010,11 @@ fi
 fi
 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
 if test -n "$ac_ct_STRIP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
-$as_echo "$ac_ct_STRIP" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+printf "%s\n" "$ac_ct_STRIP" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
   if test "x$ac_ct_STRIP" = x; then
@@ -6142,8 +6022,8 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
     STRIP=$ac_ct_STRIP
@@ -6162,11 +6042,12 @@ test -z "$STRIP" && STRIP=:
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_RANLIB+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_RANLIB+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$RANLIB"; then
   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
 else
@@ -6174,11 +6055,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -6189,11 +6074,11 @@ fi
 fi
 RANLIB=$ac_cv_prog_RANLIB
 if test -n "$RANLIB"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
-$as_echo "$RANLIB" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+printf "%s\n" "$RANLIB" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -6202,11 +6087,12 @@ if test -z "$ac_cv_prog_RANLIB"; then
   ac_ct_RANLIB=$RANLIB
   # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_RANLIB+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$ac_ct_RANLIB"; then
   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
 else
@@ -6214,11 +6100,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_RANLIB="ranlib"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -6229,11 +6119,11 @@ fi
 fi
 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
 if test -n "$ac_ct_RANLIB"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
-$as_echo "$ac_ct_RANLIB" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+printf "%s\n" "$ac_ct_RANLIB" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
   if test "x$ac_ct_RANLIB" = x; then
@@ -6241,8 +6131,8 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
     RANLIB=$ac_ct_RANLIB
@@ -6306,11 +6196,12 @@ for ac_prog in gawk mawk nawk awk
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_AWK+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_AWK+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$AWK"; then
   ac_cv_prog_AWK="$AWK" # Let the user override the test.
 else
@@ -6318,11 +6209,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_AWK="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -6333,11 +6228,11 @@ fi
 fi
 AWK=$ac_cv_prog_AWK
 if test -n "$AWK"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
-$as_echo "$AWK" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+printf "%s\n" "$AWK" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -6373,11 +6268,12 @@ compiler=$CC
 
 
 # Check for command to grab the raw symbol name followed by C symbol from nm.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
-$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
-if ${lt_cv_sys_global_symbol_pipe+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
+printf %s "checking command to parse $NM output from $compiler object... " >&6; }
+if test ${lt_cv_sys_global_symbol_pipe+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
 
 # These are sane defaults that work on at least a few old systems.
 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
@@ -6432,7 +6328,7 @@ esac
 
 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
   # Gets list of data symbols to import.
-  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
+  lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'"
   # Adjust the below global symbol transforms to fixup imported variables.
   lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
   lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
@@ -6450,20 +6346,20 @@ fi
 # Transform an extracted symbol line into a proper C declaration.
 # Some systems (esp. on ia64) link data and code symbols differently,
 # so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n"\
+lt_cv_sys_global_symbol_to_cdecl="$SED -n"\
 $lt_cdecl_hook\
 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
 
 # Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
+lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\
 $lt_c_name_hook\
 " -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
 " -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
 
 # Transform an extracted symbol line into symbol name with lib prefix and
 # symbol address.
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\
 $lt_c_name_lib_hook\
 " -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
 " -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
@@ -6487,7 +6383,7 @@ for ac_symprfx in "" "_"; do
   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
     # Fake it for dumpbin and say T for any non-static function,
     # D for any global variable and I for any imported variable.
-    # Also find C++ and __fastcall symbols from MSVC++,
+    # Also find C++ and __fastcall symbols from MSVC++ or ICC,
     # which start with @ or ?.
     lt_cv_sys_global_symbol_pipe="$AWK '"\
 "     {last_section=section; section=\$ 3};"\
@@ -6505,9 +6401,9 @@ for ac_symprfx in "" "_"; do
 "     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
 "     ' prfx=^$ac_symprfx"
   else
-    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+    lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
   fi
-  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
+  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'"
 
   # Check to see that the pipe works correctly.
   pipe_works=no
@@ -6529,14 +6425,14 @@ _LT_EOF
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
     # Now try to grab the symbols.
     nlist=conftest.nm
     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
   (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; } && test -s "$nlist"; then
       # Try sorting and uniquifying the output.
       if sort "$nlist" | uniq > "$nlist"T; then
@@ -6605,7 +6501,7 @@ _LT_EOF
 	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; } && test -s conftest$ac_exeext; then
 	    pipe_works=yes
 	  fi
@@ -6640,11 +6536,11 @@ if test -z "$lt_cv_sys_global_symbol_pipe"; then
   lt_cv_sys_global_symbol_to_cdecl=
 fi
 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
-$as_echo "failed" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+printf "%s\n" "failed" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+printf "%s\n" "ok" >&6; }
 fi
 
 # Response file support.
@@ -6690,13 +6586,14 @@ fi
 
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
-$as_echo_n "checking for sysroot... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
+printf %s "checking for sysroot... " >&6; }
 
 # Check whether --with-sysroot was given.
-if test "${with_sysroot+set}" = set; then :
+if test ${with_sysroot+y}
+then :
   withval=$with_sysroot;
-else
+else $as_nop
   with_sysroot=no
 fi
 
@@ -6709,29 +6606,30 @@ case $with_sysroot in #(
    fi
    ;; #(
  /*)
-   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+   lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
    ;; #(
  no|'')
    ;; #(
  *)
-   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
-$as_echo "$with_sysroot" >&6; }
+   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
+printf "%s\n" "$with_sysroot" >&6; }
    as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
    ;;
 esac
 
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
-$as_echo "${lt_sysroot:-no}" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
+printf "%s\n" "${lt_sysroot:-no}" >&6; }
 
 
 
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
-$as_echo_n "checking for a working dd... " >&6; }
-if ${ac_cv_path_lt_DD+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
+printf %s "checking for a working dd... " >&6; }
+if test ${ac_cv_path_lt_DD+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   printf 0123456789abcdef0123456789abcdef >conftest.i
 cat conftest.i conftest.i >conftest2.i
 : ${lt_DD:=$DD}
@@ -6742,10 +6640,15 @@ if test -z "$lt_DD"; then
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_prog in dd; do
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_prog in dd
+   do
     for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
+      ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext"
       as_fn_executable_p "$ac_path_lt_DD" || continue
 if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
   cmp -s conftest.i conftest.out \
@@ -6765,15 +6668,16 @@ fi
 
 rm -f conftest.i conftest2.i conftest.out
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
-$as_echo "$ac_cv_path_lt_DD" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
+printf "%s\n" "$ac_cv_path_lt_DD" >&6; }
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
-$as_echo_n "checking how to truncate binary pipes... " >&6; }
-if ${lt_cv_truncate_bin+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
+printf %s "checking how to truncate binary pipes... " >&6; }
+if test ${lt_cv_truncate_bin+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   printf 0123456789abcdef0123456789abcdef >conftest.i
 cat conftest.i conftest.i >conftest2.i
 lt_cv_truncate_bin=
@@ -6784,8 +6688,8 @@ fi
 rm -f conftest.i conftest2.i conftest.out
 test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
-$as_echo "$lt_cv_truncate_bin" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
+printf "%s\n" "$lt_cv_truncate_bin" >&6; }
 
 
 
@@ -6808,7 +6712,8 @@ func_cc_basename ()
 }
 
 # Check whether --enable-libtool-lock was given.
-if test "${enable_libtool_lock+set}" = set; then :
+if test ${enable_libtool_lock+y}
+then :
   enableval=$enable_libtool_lock;
 fi
 
@@ -6824,9 +6729,9 @@ ia64-*-hpux*)
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-    case `/usr/bin/file conftest.$ac_objext` in
+    case `$FILECMD conftest.$ac_objext` in
       *ELF-32*)
 	HPUX_IA64_MODE=32
 	;;
@@ -6844,10 +6749,10 @@ ia64-*-hpux*)
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
     if test yes = "$lt_cv_prog_gnu_ld"; then
-      case `/usr/bin/file conftest.$ac_objext` in
+      case `$FILECMD conftest.$ac_objext` in
 	*32-bit*)
 	  LD="${LD-ld} -melf32bsmip"
 	  ;;
@@ -6859,7 +6764,7 @@ ia64-*-hpux*)
 	;;
       esac
     else
-      case `/usr/bin/file conftest.$ac_objext` in
+      case `$FILECMD conftest.$ac_objext` in
 	*32-bit*)
 	  LD="${LD-ld} -32"
 	  ;;
@@ -6882,10 +6787,10 @@ mips64*-*linux*)
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
     emul=elf
-    case `/usr/bin/file conftest.$ac_objext` in
+    case `$FILECMD conftest.$ac_objext` in
       *32-bit*)
 	emul="${emul}32"
 	;;
@@ -6893,7 +6798,7 @@ mips64*-*linux*)
 	emul="${emul}64"
 	;;
     esac
-    case `/usr/bin/file conftest.$ac_objext` in
+    case `$FILECMD conftest.$ac_objext` in
       *MSB*)
 	emul="${emul}btsmip"
 	;;
@@ -6901,7 +6806,7 @@ mips64*-*linux*)
 	emul="${emul}ltsmip"
 	;;
     esac
-    case `/usr/bin/file conftest.$ac_objext` in
+    case `$FILECMD conftest.$ac_objext` in
       *N32*)
 	emul="${emul}n32"
 	;;
@@ -6923,16 +6828,16 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-    case `/usr/bin/file conftest.o` in
+    case `$FILECMD conftest.o` in
       *32-bit*)
 	case $host in
 	  x86_64-*kfreebsd*-gnu)
 	    LD="${LD-ld} -m elf_i386_fbsd"
 	    ;;
 	  x86_64-*linux*)
-	    case `/usr/bin/file conftest.o` in
+	    case `$FILECMD conftest.o` in
 	      *x86-64*)
 		LD="${LD-ld} -m elf32_x86_64"
 		;;
@@ -6986,11 +6891,12 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
   SAVE_CFLAGS=$CFLAGS
   CFLAGS="$CFLAGS -belf"
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
-$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
-if ${lt_cv_cc_needs_belf+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
+printf %s "checking whether the C compiler needs -belf... " >&6; }
+if test ${lt_cv_cc_needs_belf+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -7001,19 +6907,20 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 /* end confdefs.h.  */
 
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   lt_cv_cc_needs_belf=yes
-else
+else $as_nop
   lt_cv_cc_needs_belf=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
      ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -7022,8 +6929,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
-$as_echo "$lt_cv_cc_needs_belf" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
+printf "%s\n" "$lt_cv_cc_needs_belf" >&6; }
   if test yes != "$lt_cv_cc_needs_belf"; then
     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
     CFLAGS=$SAVE_CFLAGS
@@ -7036,9 +6943,9 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; }
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-    case `/usr/bin/file conftest.o` in
+    case `$FILECMD conftest.o` in
     *64-bit*)
       case $lt_cv_prog_gnu_ld in
       yes*)
@@ -7073,11 +6980,12 @@ need_locks=$enable_libtool_lock
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
 set dummy ${ac_tool_prefix}mt; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_MANIFEST_TOOL+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$MANIFEST_TOOL"; then
   ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
 else
@@ -7085,11 +6993,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -7100,11 +7012,11 @@ fi
 fi
 MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
 if test -n "$MANIFEST_TOOL"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
-$as_echo "$MANIFEST_TOOL" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
+printf "%s\n" "$MANIFEST_TOOL" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -7113,11 +7025,12 @@ if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
   ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
   # Extract the first word of "mt", so it can be a program name with args.
 set dummy mt; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$ac_ct_MANIFEST_TOOL"; then
   ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
 else
@@ -7125,11 +7038,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -7140,11 +7057,11 @@ fi
 fi
 ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
 if test -n "$ac_ct_MANIFEST_TOOL"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
-$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
+printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
   if test "x$ac_ct_MANIFEST_TOOL" = x; then
@@ -7152,8 +7069,8 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
     MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
@@ -7163,11 +7080,12 @@ else
 fi
 
 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
-$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
-if ${lt_cv_path_mainfest_tool+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
+printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
+if test ${lt_cv_path_mainfest_tool+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   lt_cv_path_mainfest_tool=no
   echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
   $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
@@ -7177,8 +7095,8 @@ else
   fi
   rm -f conftest*
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
-$as_echo "$lt_cv_path_mainfest_tool" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
+printf "%s\n" "$lt_cv_path_mainfest_tool" >&6; }
 if test yes != "$lt_cv_path_mainfest_tool"; then
   MANIFEST_TOOL=:
 fi
@@ -7193,11 +7111,12 @@ fi
     if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
 set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_DSYMUTIL+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_DSYMUTIL+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$DSYMUTIL"; then
   ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
 else
@@ -7205,11 +7124,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -7220,11 +7143,11 @@ fi
 fi
 DSYMUTIL=$ac_cv_prog_DSYMUTIL
 if test -n "$DSYMUTIL"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
-$as_echo "$DSYMUTIL" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
+printf "%s\n" "$DSYMUTIL" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -7233,11 +7156,12 @@ if test -z "$ac_cv_prog_DSYMUTIL"; then
   ac_ct_DSYMUTIL=$DSYMUTIL
   # Extract the first word of "dsymutil", so it can be a program name with args.
 set dummy dsymutil; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_DSYMUTIL+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$ac_ct_DSYMUTIL"; then
   ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
 else
@@ -7245,11 +7169,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -7260,11 +7188,11 @@ fi
 fi
 ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
 if test -n "$ac_ct_DSYMUTIL"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
-$as_echo "$ac_ct_DSYMUTIL" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
+printf "%s\n" "$ac_ct_DSYMUTIL" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
   if test "x$ac_ct_DSYMUTIL" = x; then
@@ -7272,8 +7200,8 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
     DSYMUTIL=$ac_ct_DSYMUTIL
@@ -7285,11 +7213,12 @@ fi
     if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
 set dummy ${ac_tool_prefix}nmedit; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_NMEDIT+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_NMEDIT+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$NMEDIT"; then
   ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
 else
@@ -7297,11 +7226,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -7312,11 +7245,11 @@ fi
 fi
 NMEDIT=$ac_cv_prog_NMEDIT
 if test -n "$NMEDIT"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
-$as_echo "$NMEDIT" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
+printf "%s\n" "$NMEDIT" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -7325,11 +7258,12 @@ if test -z "$ac_cv_prog_NMEDIT"; then
   ac_ct_NMEDIT=$NMEDIT
   # Extract the first word of "nmedit", so it can be a program name with args.
 set dummy nmedit; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_NMEDIT+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$ac_ct_NMEDIT"; then
   ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
 else
@@ -7337,11 +7271,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_NMEDIT="nmedit"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -7352,11 +7290,11 @@ fi
 fi
 ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
 if test -n "$ac_ct_NMEDIT"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
-$as_echo "$ac_ct_NMEDIT" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
+printf "%s\n" "$ac_ct_NMEDIT" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
   if test "x$ac_ct_NMEDIT" = x; then
@@ -7364,8 +7302,8 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
     NMEDIT=$ac_ct_NMEDIT
@@ -7377,11 +7315,12 @@ fi
     if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
 set dummy ${ac_tool_prefix}lipo; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_LIPO+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_LIPO+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$LIPO"; then
   ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
 else
@@ -7389,11 +7328,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -7404,11 +7347,11 @@ fi
 fi
 LIPO=$ac_cv_prog_LIPO
 if test -n "$LIPO"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
-$as_echo "$LIPO" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
+printf "%s\n" "$LIPO" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -7417,11 +7360,12 @@ if test -z "$ac_cv_prog_LIPO"; then
   ac_ct_LIPO=$LIPO
   # Extract the first word of "lipo", so it can be a program name with args.
 set dummy lipo; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_LIPO+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$ac_ct_LIPO"; then
   ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
 else
@@ -7429,11 +7373,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_LIPO="lipo"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -7444,11 +7392,11 @@ fi
 fi
 ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
 if test -n "$ac_ct_LIPO"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
-$as_echo "$ac_ct_LIPO" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
+printf "%s\n" "$ac_ct_LIPO" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
   if test "x$ac_ct_LIPO" = x; then
@@ -7456,8 +7404,8 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
     LIPO=$ac_ct_LIPO
@@ -7469,11 +7417,12 @@ fi
     if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
 set dummy ${ac_tool_prefix}otool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_OTOOL+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_OTOOL+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$OTOOL"; then
   ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
 else
@@ -7481,11 +7430,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -7496,11 +7449,11 @@ fi
 fi
 OTOOL=$ac_cv_prog_OTOOL
 if test -n "$OTOOL"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
-$as_echo "$OTOOL" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
+printf "%s\n" "$OTOOL" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -7509,11 +7462,12 @@ if test -z "$ac_cv_prog_OTOOL"; then
   ac_ct_OTOOL=$OTOOL
   # Extract the first word of "otool", so it can be a program name with args.
 set dummy otool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_OTOOL+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$ac_ct_OTOOL"; then
   ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
 else
@@ -7521,11 +7475,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_OTOOL="otool"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -7536,11 +7494,11 @@ fi
 fi
 ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
 if test -n "$ac_ct_OTOOL"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
-$as_echo "$ac_ct_OTOOL" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
+printf "%s\n" "$ac_ct_OTOOL" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
   if test "x$ac_ct_OTOOL" = x; then
@@ -7548,8 +7506,8 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
     OTOOL=$ac_ct_OTOOL
@@ -7561,11 +7519,12 @@ fi
     if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
 set dummy ${ac_tool_prefix}otool64; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_OTOOL64+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_OTOOL64+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$OTOOL64"; then
   ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
 else
@@ -7573,11 +7532,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -7588,11 +7551,11 @@ fi
 fi
 OTOOL64=$ac_cv_prog_OTOOL64
 if test -n "$OTOOL64"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
-$as_echo "$OTOOL64" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
+printf "%s\n" "$OTOOL64" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -7601,11 +7564,12 @@ if test -z "$ac_cv_prog_OTOOL64"; then
   ac_ct_OTOOL64=$OTOOL64
   # Extract the first word of "otool64", so it can be a program name with args.
 set dummy otool64; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_OTOOL64+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$ac_ct_OTOOL64"; then
   ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
 else
@@ -7613,11 +7577,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_OTOOL64="otool64"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -7628,11 +7596,11 @@ fi
 fi
 ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
 if test -n "$ac_ct_OTOOL64"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
-$as_echo "$ac_ct_OTOOL64" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
+printf "%s\n" "$ac_ct_OTOOL64" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
   if test "x$ac_ct_OTOOL64" = x; then
@@ -7640,8 +7608,8 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
     OTOOL64=$ac_ct_OTOOL64
@@ -7676,11 +7644,12 @@ fi
 
 
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
-$as_echo_n "checking for -single_module linker flag... " >&6; }
-if ${lt_cv_apple_cc_single_mod+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
+printf %s "checking for -single_module linker flag... " >&6; }
+if test ${lt_cv_apple_cc_single_mod+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   lt_cv_apple_cc_single_mod=no
       if test -z "$LT_MULTI_MODULE"; then
 	# By default we will add the -single_module flag. You can override
@@ -7709,14 +7678,15 @@ else
 	rm -f conftest.*
       fi
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
-$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
+printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; }
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
-$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
-if ${lt_cv_ld_exported_symbols_list+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
+printf %s "checking for -exported_symbols_list linker flag... " >&6; }
+if test ${lt_cv_ld_exported_symbols_list+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   lt_cv_ld_exported_symbols_list=no
       save_LDFLAGS=$LDFLAGS
       echo "_main" > conftest.sym
@@ -7725,39 +7695,41 @@ else
 /* end confdefs.h.  */
 
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   lt_cv_ld_exported_symbols_list=yes
-else
+else $as_nop
   lt_cv_ld_exported_symbols_list=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 	LDFLAGS=$save_LDFLAGS
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
-$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
+printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; }
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
-$as_echo_n "checking for -force_load linker flag... " >&6; }
-if ${lt_cv_ld_force_load+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
+printf %s "checking for -force_load linker flag... " >&6; }
+if test ${lt_cv_ld_force_load+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   lt_cv_ld_force_load=no
       cat > conftest.c << _LT_EOF
 int forced_loaded() { return 2;}
 _LT_EOF
       echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
       $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
-      echo "$AR cru libconftest.a conftest.o" >&5
-      $AR cru libconftest.a conftest.o 2>&5
+      echo "$AR $AR_FLAGS libconftest.a conftest.o" >&5
+      $AR $AR_FLAGS libconftest.a conftest.o 2>&5
       echo "$RANLIB libconftest.a" >&5
       $RANLIB libconftest.a 2>&5
       cat > conftest.c << _LT_EOF
@@ -7777,24 +7749,19 @@ _LT_EOF
         rm -rf conftest.dSYM
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
-$as_echo "$lt_cv_ld_force_load" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
+printf "%s\n" "$lt_cv_ld_force_load" >&6; }
     case $host_os in
     rhapsody* | darwin1.[012])
       _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
     darwin1.*)
       _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
-    darwin*) # darwin 5.x on
-      # if running on 10.5 or later, the deployment target defaults
-      # to the OS version, if on x86, and 10.4, the deployment
-      # target defaults to 10.4. Don't you love it?
-      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
-	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
-	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
-	10.[012][,.]*)
-	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
-	10.*)
-	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+    darwin*)
+      case $MACOSX_DEPLOYMENT_TARGET,$host in
+        10.[012],*|,*powerpc*-darwin[5-8]*)
+          _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
+        *)
+          _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
       esac
     ;;
   esac
@@ -7849,35 +7816,42 @@ func_munge_path_list ()
     esac
 }
 
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
-		  inttypes.h stdint.h unistd.h
-do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ac_header= ac_cache=
+for ac_item in $ac_header_c_list
+do
+  if test $ac_cache; then
+    ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
+    if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
+      printf "%s\n" "#define $ac_item 1" >> confdefs.h
+    fi
+    ac_header= ac_cache=
+  elif test $ac_header; then
+    ac_cache=$ac_item
+  else
+    ac_header=$ac_item
+  fi
+done
+
+
+
 
-fi
 
-done
 
 
-for ac_header in dlfcn.h
-do :
-  ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
-"
-if test "x$ac_cv_header_dlfcn_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DLFCN_H 1
-_ACEOF
+
+if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
+then :
+
+printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
 
 fi
+ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_dlfcn_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
 
-done
+fi
 
 
 
@@ -7894,7 +7868,8 @@ done
 
 
             # Check whether --enable-shared was given.
-if test "${enable_shared+set}" = set; then :
+if test ${enable_shared+y}
+then :
   enableval=$enable_shared; p=${PACKAGE-default}
     case $enableval in
     yes) enable_shared=yes ;;
@@ -7912,7 +7887,7 @@ if test "${enable_shared+set}" = set; then :
       IFS=$lt_save_ifs
       ;;
     esac
-else
+else $as_nop
   enable_shared=yes
 fi
 
@@ -7925,7 +7900,8 @@ fi
 
 
   # Check whether --enable-static was given.
-if test "${enable_static+set}" = set; then :
+if test ${enable_static+y}
+then :
   enableval=$enable_static; p=${PACKAGE-default}
     case $enableval in
     yes) enable_static=yes ;;
@@ -7943,7 +7919,7 @@ if test "${enable_static+set}" = set; then :
       IFS=$lt_save_ifs
       ;;
     esac
-else
+else $as_nop
   enable_static=yes
 fi
 
@@ -7957,7 +7933,8 @@ fi
 
 
 # Check whether --with-pic was given.
-if test "${with_pic+set}" = set; then :
+if test ${with_pic+y}
+then :
   withval=$with_pic; lt_p=${PACKAGE-default}
     case $withval in
     yes|no) pic_mode=$withval ;;
@@ -7974,7 +7951,7 @@ if test "${with_pic+set}" = set; then :
       IFS=$lt_save_ifs
       ;;
     esac
-else
+else $as_nop
   pic_mode=default
 fi
 
@@ -7986,7 +7963,8 @@ fi
 
 
   # Check whether --enable-fast-install was given.
-if test "${enable_fast_install+set}" = set; then :
+if test ${enable_fast_install+y}
+then :
   enableval=$enable_fast_install; p=${PACKAGE-default}
     case $enableval in
     yes) enable_fast_install=yes ;;
@@ -8004,7 +7982,7 @@ if test "${enable_fast_install+set}" = set; then :
       IFS=$lt_save_ifs
       ;;
     esac
-else
+else $as_nop
   enable_fast_install=yes
 fi
 
@@ -8018,11 +7996,12 @@ fi
   shared_archive_member_spec=
 case $host,$enable_shared in
 power*-*-aix[5-9]*,yes)
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
-$as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
+printf %s "checking which variant of shared library versioning to provide... " >&6; }
 
 # Check whether --with-aix-soname was given.
-if test "${with_aix_soname+set}" = set; then :
+if test ${with_aix_soname+y}
+then :
   withval=$with_aix_soname; case $withval in
     aix|svr4|both)
       ;;
@@ -8031,18 +8010,19 @@ if test "${with_aix_soname+set}" = set; then :
       ;;
     esac
     lt_cv_with_aix_soname=$with_aix_soname
-else
-  if ${lt_cv_with_aix_soname+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+else $as_nop
+  if test ${lt_cv_with_aix_soname+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   lt_cv_with_aix_soname=aix
 fi
 
     with_aix_soname=$lt_cv_with_aix_soname
 fi
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
-$as_echo "$with_aix_soname" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
+printf "%s\n" "$with_aix_soname" >&6; }
   if test aix != "$with_aix_soname"; then
     # For the AIX way of multilib, we name the shared archive member
     # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
@@ -8124,11 +8104,12 @@ if test -n "${ZSH_VERSION+set}"; then
    setopt NO_GLOB_SUBST
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
-$as_echo_n "checking for objdir... " >&6; }
-if ${lt_cv_objdir+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
+printf %s "checking for objdir... " >&6; }
+if test ${lt_cv_objdir+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   rm -f .libs 2>/dev/null
 mkdir .libs 2>/dev/null
 if test -d .libs; then
@@ -8139,17 +8120,15 @@ else
 fi
 rmdir .libs 2>/dev/null
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
-$as_echo "$lt_cv_objdir" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
+printf "%s\n" "$lt_cv_objdir" >&6; }
 objdir=$lt_cv_objdir
 
 
 
 
 
-cat >>confdefs.h <<_ACEOF
-#define LT_OBJDIR "$lt_cv_objdir/"
-_ACEOF
+printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h
 
 
 
@@ -8170,8 +8149,8 @@ esac
 ofile=libtool
 can_build_shared=yes
 
-# All known linkers require a '.a' archive for static linking (except MSVC,
-# which needs '.lib').
+# All known linkers require a '.a' archive for static linking (except MSVC and
+# ICC, which need '.lib').
 libext=a
 
 with_gnu_ld=$lt_cv_prog_gnu_ld
@@ -8195,11 +8174,12 @@ test -z "$MAGIC_CMD" && MAGIC_CMD=file
 case $deplibs_check_method in
 file_magic*)
   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
-$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
-if ${lt_cv_path_MAGIC_CMD+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
+printf %s "checking for ${ac_tool_prefix}file... " >&6; }
+if test ${lt_cv_path_MAGIC_CMD+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   case $MAGIC_CMD in
 [\\/*] |  ?:[\\/]*)
   lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
@@ -8248,11 +8228,11 @@ fi
 
 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
 if test -n "$MAGIC_CMD"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
-$as_echo "$MAGIC_CMD" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+printf "%s\n" "$MAGIC_CMD" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -8261,11 +8241,12 @@ fi
 
 if test -z "$lt_cv_path_MAGIC_CMD"; then
   if test -n "$ac_tool_prefix"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
-$as_echo_n "checking for file... " >&6; }
-if ${lt_cv_path_MAGIC_CMD+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5
+printf %s "checking for file... " >&6; }
+if test ${lt_cv_path_MAGIC_CMD+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   case $MAGIC_CMD in
 [\\/*] |  ?:[\\/]*)
   lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
@@ -8314,11 +8295,11 @@ fi
 
 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
 if test -n "$MAGIC_CMD"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
-$as_echo "$MAGIC_CMD" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+printf "%s\n" "$MAGIC_CMD" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -8403,11 +8384,12 @@ if test yes = "$GCC"; then
     lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
   esac
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
-$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
-if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
+if test ${lt_cv_prog_compiler_rtti_exceptions+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   lt_cv_prog_compiler_rtti_exceptions=no
    ac_outfile=conftest.$ac_objext
    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
@@ -8438,8 +8420,8 @@ else
    $RM conftest*
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
-$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
 
 if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
     lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
@@ -8680,7 +8662,7 @@ lt_prog_compiler_static=
 	lt_prog_compiler_static='-qstaticlink'
 	;;
       *)
-	case `$CC -V 2>&1 | sed 5q` in
+	case `$CC -V 2>&1 | $SED 5q` in
 	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
 	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
 	  lt_prog_compiler_pic='-KPIC'
@@ -8796,26 +8778,28 @@ case $host_os in
     ;;
 esac
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
-$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
-if ${lt_cv_prog_compiler_pic+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+printf %s "checking for $compiler option to produce PIC... " >&6; }
+if test ${lt_cv_prog_compiler_pic+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
-$as_echo "$lt_cv_prog_compiler_pic" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
+printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; }
 lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
 
 #
 # Check to make sure the PIC flag actually works.
 #
 if test -n "$lt_prog_compiler_pic"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
-$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
-if ${lt_cv_prog_compiler_pic_works+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
+if test ${lt_cv_prog_compiler_pic_works+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   lt_cv_prog_compiler_pic_works=no
    ac_outfile=conftest.$ac_objext
    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
@@ -8846,8 +8830,8 @@ else
    $RM conftest*
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
-$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
+printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; }
 
 if test yes = "$lt_cv_prog_compiler_pic_works"; then
     case $lt_prog_compiler_pic in
@@ -8875,11 +8859,12 @@ fi
 # Check to make sure the static flag actually works.
 #
 wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
-if ${lt_cv_prog_compiler_static_works+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if test ${lt_cv_prog_compiler_static_works+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   lt_cv_prog_compiler_static_works=no
    save_LDFLAGS=$LDFLAGS
    LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
@@ -8903,8 +8888,8 @@ else
    LDFLAGS=$save_LDFLAGS
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
-$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
+printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; }
 
 if test yes = "$lt_cv_prog_compiler_static_works"; then
     :
@@ -8918,11 +8903,12 @@ fi
 
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
-$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if ${lt_cv_prog_compiler_c_o+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test ${lt_cv_prog_compiler_c_o+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   lt_cv_prog_compiler_c_o=no
    $RM -r conftest 2>/dev/null
    mkdir conftest
@@ -8965,19 +8951,20 @@ else
    $RM conftest*
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
-$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
 
 
 
 
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
-$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if ${lt_cv_prog_compiler_c_o+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test ${lt_cv_prog_compiler_c_o+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   lt_cv_prog_compiler_c_o=no
    $RM -r conftest 2>/dev/null
    mkdir conftest
@@ -9020,8 +9007,8 @@ else
    $RM conftest*
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
-$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
 
 
 
@@ -9029,19 +9016,19 @@ $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
 hard_links=nottested
 if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
   # do not overwrite the value of need_locks provided by the user
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
-$as_echo_n "checking if we can lock with hard links... " >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+printf %s "checking if we can lock with hard links... " >&6; }
   hard_links=yes
   $RM conftest*
   ln conftest.a conftest.b 2>/dev/null && hard_links=no
   touch conftest.a
   ln conftest.a conftest.b 2>&5 || hard_links=no
   ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
-$as_echo "$hard_links" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+printf "%s\n" "$hard_links" >&6; }
   if test no = "$hard_links"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
-$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
+printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
     need_locks=warn
   fi
 else
@@ -9053,8 +9040,8 @@ fi
 
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
 
   runpath_var=
   allow_undefined_flag=
@@ -9098,15 +9085,15 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
 
   case $host_os in
   cygwin* | mingw* | pw32* | cegcc*)
-    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
     # When not using gcc, we currently assume that we are using
-    # Microsoft Visual C++.
+    # Microsoft Visual C++ or Intel C++ Compiler.
     if test yes != "$GCC"; then
       with_gnu_ld=no
     fi
     ;;
   interix*)
-    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
     with_gnu_ld=yes
     ;;
   openbsd* | bitrig*)
@@ -9158,7 +9145,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
       whole_archive_flag_spec=
     fi
     supports_anon_versioning=no
-    case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
+    case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
       *GNU\ gold*) supports_anon_versioning=yes ;;
       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
@@ -9270,6 +9257,7 @@ _LT_EOF
 	emximp -o $lib $output_objdir/$libname.def'
       old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
       enable_shared_with_static_runtimes=yes
+      file_list_spec='@'
       ;;
 
     interix[3-9]*)
@@ -9284,7 +9272,7 @@ _LT_EOF
       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
       archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_expsym_cmds='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
       ;;
 
     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
@@ -9327,7 +9315,7 @@ _LT_EOF
 	  compiler_needs_object=yes
 	  ;;
 	esac
-	case `$CC -V 2>&1 | sed 5q` in
+	case `$CC -V 2>&1 | $SED 5q` in
 	*Sun\ C*)			# Sun C 5.9
 	  whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
 	  compiler_needs_object=yes
@@ -9339,7 +9327,7 @@ _LT_EOF
 
         if test yes = "$supports_anon_versioning"; then
           archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
-            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+            cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
             echo "local: *; };" >> $output_objdir/$libname.ver~
             $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
         fi
@@ -9355,7 +9343,7 @@ _LT_EOF
 	  archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
 	  if test yes = "$supports_anon_versioning"; then
 	    archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
-              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+              cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
               echo "local: *; };" >> $output_objdir/$libname.ver~
               $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
 	  fi
@@ -9487,7 +9475,7 @@ _LT_EOF
 	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
 	  export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
 	else
-	  export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
+	  export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
 	fi
 	aix_use_runtimelinking=no
 
@@ -9609,21 +9597,23 @@ _LT_EOF
         if test set = "${lt_cv_aix_libpath+set}"; then
   aix_libpath=$lt_cv_aix_libpath
 else
-  if ${lt_cv_aix_libpath_+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+  if test ${lt_cv_aix_libpath_+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
 
   lt_aix_libpath_sed='
       /Import File Strings/,/^$/ {
@@ -9638,7 +9628,7 @@ if ac_fn_c_try_link "$LINENO"; then :
     lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
   fi
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
   if test -z "$lt_cv_aix_libpath_"; then
     lt_cv_aix_libpath_=/usr/lib:/lib
@@ -9662,21 +9652,23 @@ fi
 	 if test set = "${lt_cv_aix_libpath+set}"; then
   aix_libpath=$lt_cv_aix_libpath
 else
-  if ${lt_cv_aix_libpath_+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+  if test ${lt_cv_aix_libpath_+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
 
   lt_aix_libpath_sed='
       /Import File Strings/,/^$/ {
@@ -9691,7 +9683,7 @@ if ac_fn_c_try_link "$LINENO"; then :
     lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
   fi
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
   if test -z "$lt_cv_aix_libpath_"; then
     lt_cv_aix_libpath_=/usr/lib:/lib
@@ -9754,12 +9746,12 @@ fi
 
     cygwin* | mingw* | pw32* | cegcc*)
       # When not using gcc, we currently assume that we are using
-      # Microsoft Visual C++.
+      # Microsoft Visual C++ or Intel C++ Compiler.
       # hardcode_libdir_flag_spec is actually meaningless, as there is
       # no search path for DLLs.
       case $cc_basename in
-      cl*)
-	# Native MSVC
+      cl* | icl*)
+	# Native MSVC or ICC
 	hardcode_libdir_flag_spec=' '
 	allow_undefined_flag=unsupported
 	always_export_symbols=yes
@@ -9800,7 +9792,7 @@ fi
           fi'
 	;;
       *)
-	# Assume MSVC wrapper
+	# Assume MSVC and ICC wrapper
 	hardcode_libdir_flag_spec=' '
 	allow_undefined_flag=unsupported
 	# Tell ltmain to make .lib files, not .a files.
@@ -9841,8 +9833,8 @@ fi
     output_verbose_link_cmd=func_echo_all
     archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
     module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
-    archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
-    module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
+    archive_expsym_cmds="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
+    module_expsym_cmds="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
 
   else
   ld_shlibs=no
@@ -9876,7 +9868,7 @@ fi
       ;;
 
     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-    freebsd* | dragonfly*)
+    freebsd* | dragonfly* | midnightbsd*)
       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
       hardcode_libdir_flag_spec='-R$libdir'
       hardcode_direct=yes
@@ -9942,11 +9934,12 @@ fi
 
 	  # Older versions of the 11.00 compiler do not understand -b yet
 	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
-	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
-$as_echo_n "checking if $CC understands -b... " >&6; }
-if ${lt_cv_prog_compiler__b+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
+printf %s "checking if $CC understands -b... " >&6; }
+if test ${lt_cv_prog_compiler__b+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   lt_cv_prog_compiler__b=no
    save_LDFLAGS=$LDFLAGS
    LDFLAGS="$LDFLAGS -b"
@@ -9970,8 +9963,8 @@ else
    LDFLAGS=$save_LDFLAGS
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
-$as_echo "$lt_cv_prog_compiler__b" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
+printf "%s\n" "$lt_cv_prog_compiler__b" >&6; }
 
 if test yes = "$lt_cv_prog_compiler__b"; then
     archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
@@ -10011,28 +10004,30 @@ fi
 	# work, assume that -exports_file does not work either and
 	# implicitly export all symbols.
 	# This should be the same for all languages, so no per-tag cache variable.
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
-$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
-if ${lt_cv_irix_exported_symbol+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
+printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
+if test ${lt_cv_irix_exported_symbol+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   save_LDFLAGS=$LDFLAGS
 	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
 	   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int foo (void) { return 0; }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   lt_cv_irix_exported_symbol=yes
-else
+else $as_nop
   lt_cv_irix_exported_symbol=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
            LDFLAGS=$save_LDFLAGS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
-$as_echo "$lt_cv_irix_exported_symbol" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
+printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; }
 	if test yes = "$lt_cv_irix_exported_symbol"; then
           archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
 	fi
@@ -10124,6 +10119,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
 	emximp -o $lib $output_objdir/$libname.def'
       old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
       enable_shared_with_static_runtimes=yes
+      file_list_spec='@'
       ;;
 
     osf3*)
@@ -10312,8 +10308,8 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
     fi
   fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
-$as_echo "$ld_shlibs" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
+printf "%s\n" "$ld_shlibs" >&6; }
 test no = "$ld_shlibs" && can_build_shared=no
 
 with_gnu_ld=$with_gnu_ld
@@ -10349,18 +10345,19 @@ x|xyes)
       # Test whether the compiler implicitly links with -lc since on some
       # systems, -lgcc has to come before -lc. If gcc already passes -lc
       # to ld, don't add -lc before -lgcc.
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
-$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
-if ${lt_cv_archive_cmds_need_lc+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
+printf %s "checking whether -lc should be explicitly linked in... " >&6; }
+if test ${lt_cv_archive_cmds_need_lc+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   $RM conftest*
 	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
 	if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; } 2>conftest.err; then
 	  soname=conftest
 	  lib=conftest
@@ -10378,7 +10375,7 @@ else
 	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
   (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }
 	  then
 	    lt_cv_archive_cmds_need_lc=no
@@ -10392,8 +10389,8 @@ else
 	$RM conftest*
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
-$as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
+printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; }
       archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
       ;;
     esac
@@ -10552,8 +10549,8 @@ esac
 
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
-$as_echo_n "checking dynamic linker characteristics... " >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+printf %s "checking dynamic linker characteristics... " >&6; }
 
 if test yes = "$GCC"; then
   case $host_os in
@@ -10815,7 +10812,7 @@ cygwin* | mingw* | pw32* | cegcc*)
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+      soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
 
       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
       ;;
@@ -10825,14 +10822,14 @@ cygwin* | mingw* | pw32* | cegcc*)
       ;;
     pw32*)
       # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+      library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
       ;;
     esac
     dynamic_linker='Win32 ld.exe'
     ;;
 
-  *,cl*)
-    # Native MSVC
+  *,cl* | *,icl*)
+    # Native MSVC or ICC
     libname_spec='$name'
     soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
     library_names_spec='$libname.dll.lib'
@@ -10851,7 +10848,7 @@ cygwin* | mingw* | pw32* | cegcc*)
       done
       IFS=$lt_save_ifs
       # Convert to MSYS style.
-      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
+      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
       ;;
     cygwin*)
       # Convert to unix form, then to dos form, then back to unix form
@@ -10888,7 +10885,7 @@ cygwin* | mingw* | pw32* | cegcc*)
     ;;
 
   *)
-    # Assume MSVC wrapper
+    # Assume MSVC and ICC wrapper
     library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
     dynamic_linker='Win32 ld.exe'
     ;;
@@ -10921,7 +10918,7 @@ dgux*)
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
-freebsd* | dragonfly*)
+freebsd* | dragonfly* | midnightbsd*)
   # DragonFly does not have aout.  When/if they implement a new
   # versioning mechanism, adjust this.
   if test -x /usr/bin/objformat; then
@@ -11114,9 +11111,10 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
   shlibpath_overrides_runpath=no
 
   # Some binutils ld are patched to set DT_RUNPATH
-  if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+  if test ${lt_cv_shlibpath_overrides_runpath+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   lt_cv_shlibpath_overrides_runpath=no
     save_LDFLAGS=$LDFLAGS
     save_libdir=$libdir
@@ -11126,19 +11124,21 @@ else
 /* end confdefs.h.  */
 
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
+if ac_fn_c_try_link "$LINENO"
+then :
+  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null
+then :
   lt_cv_shlibpath_overrides_runpath=yes
 fi
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
     LDFLAGS=$save_LDFLAGS
     libdir=$save_libdir
@@ -11373,8 +11373,8 @@ uts4*)
   dynamic_linker=no
   ;;
 esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
-$as_echo "$dynamic_linker" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
+printf "%s\n" "$dynamic_linker" >&6; }
 test no = "$dynamic_linker" && can_build_shared=no
 
 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
@@ -11495,8 +11495,8 @@ configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
 
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
-$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
+printf %s "checking how to hardcode library paths into programs... " >&6; }
 hardcode_action=
 if test -n "$hardcode_libdir_flag_spec" ||
    test -n "$runpath_var" ||
@@ -11520,8 +11520,8 @@ else
   # directories.
   hardcode_action=unsupported
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
-$as_echo "$hardcode_action" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
+printf "%s\n" "$hardcode_action" >&6; }
 
 if test relink = "$hardcode_action" ||
    test yes = "$inherit_rpath"; then
@@ -11565,11 +11565,12 @@ else
 
   darwin*)
     # if libdl is installed we need to link against it
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
-$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if ${ac_cv_lib_dl_dlopen+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+printf %s "checking for dlopen in -ldl... " >&6; }
+if test ${ac_cv_lib_dl_dlopen+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-ldl  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -11578,32 +11579,31 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
    builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
 char dlopen ();
 int
-main ()
+main (void)
 {
 return dlopen ();
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   ac_cv_lib_dl_dlopen=yes
-else
+else $as_nop
   ac_cv_lib_dl_dlopen=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
-$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes
+then :
   lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
-else
+else $as_nop
 
     lt_cv_dlopen=dyld
     lt_cv_dlopen_libs=
@@ -11623,14 +11623,16 @@ fi
 
   *)
     ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
-if test "x$ac_cv_func_shl_load" = xyes; then :
+if test "x$ac_cv_func_shl_load" = xyes
+then :
   lt_cv_dlopen=shl_load
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
-$as_echo_n "checking for shl_load in -ldld... " >&6; }
-if ${ac_cv_lib_dld_shl_load+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
+printf %s "checking for shl_load in -ldld... " >&6; }
+if test ${ac_cv_lib_dld_shl_load+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-ldld  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -11639,41 +11641,42 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
    builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
 char shl_load ();
 int
-main ()
+main (void)
 {
 return shl_load ();
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   ac_cv_lib_dld_shl_load=yes
-else
+else $as_nop
   ac_cv_lib_dld_shl_load=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
-$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
-if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
+printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; }
+if test "x$ac_cv_lib_dld_shl_load" = xyes
+then :
   lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
-else
+else $as_nop
   ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
-if test "x$ac_cv_func_dlopen" = xyes; then :
+if test "x$ac_cv_func_dlopen" = xyes
+then :
   lt_cv_dlopen=dlopen
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
-$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if ${ac_cv_lib_dl_dlopen+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+printf %s "checking for dlopen in -ldl... " >&6; }
+if test ${ac_cv_lib_dl_dlopen+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-ldl  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -11682,37 +11685,37 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
    builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
 char dlopen ();
 int
-main ()
+main (void)
 {
 return dlopen ();
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   ac_cv_lib_dl_dlopen=yes
-else
+else $as_nop
   ac_cv_lib_dl_dlopen=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
-$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes
+then :
   lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
-$as_echo_n "checking for dlopen in -lsvld... " >&6; }
-if ${ac_cv_lib_svld_dlopen+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
+printf %s "checking for dlopen in -lsvld... " >&6; }
+if test ${ac_cv_lib_svld_dlopen+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lsvld  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -11721,37 +11724,37 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
    builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
 char dlopen ();
 int
-main ()
+main (void)
 {
 return dlopen ();
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   ac_cv_lib_svld_dlopen=yes
-else
+else $as_nop
   ac_cv_lib_svld_dlopen=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
-$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
-if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
+printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; }
+if test "x$ac_cv_lib_svld_dlopen" = xyes
+then :
   lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
-$as_echo_n "checking for dld_link in -ldld... " >&6; }
-if ${ac_cv_lib_dld_dld_link+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
+printf %s "checking for dld_link in -ldld... " >&6; }
+if test ${ac_cv_lib_dld_dld_link+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-ldld  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -11760,30 +11763,29 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
    builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
 char dld_link ();
 int
-main ()
+main (void)
 {
 return dld_link ();
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   ac_cv_lib_dld_dld_link=yes
-else
+else $as_nop
   ac_cv_lib_dld_dld_link=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
-$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
-if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
+printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; }
+if test "x$ac_cv_lib_dld_dld_link" = xyes
+then :
   lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
 fi
 
@@ -11822,11 +11824,12 @@ fi
     save_LIBS=$LIBS
     LIBS="$lt_cv_dlopen_libs $LIBS"
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
-$as_echo_n "checking whether a program can dlopen itself... " >&6; }
-if ${lt_cv_dlopen_self+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
+printf %s "checking whether a program can dlopen itself... " >&6; }
+if test ${lt_cv_dlopen_self+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   	  if test yes = "$cross_compiling"; then :
   lt_cv_dlopen_self=cross
 else
@@ -11905,7 +11908,7 @@ _LT_EOF
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
     (./conftest; exit; ) >&5 2>/dev/null
     lt_status=$?
@@ -11923,16 +11926,17 @@ rm -fr conftest*
 
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
-$as_echo "$lt_cv_dlopen_self" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
+printf "%s\n" "$lt_cv_dlopen_self" >&6; }
 
     if test yes = "$lt_cv_dlopen_self"; then
       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
-$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
-if ${lt_cv_dlopen_self_static+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
+printf %s "checking whether a statically linked program can dlopen itself... " >&6; }
+if test ${lt_cv_dlopen_self_static+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   	  if test yes = "$cross_compiling"; then :
   lt_cv_dlopen_self_static=cross
 else
@@ -12011,7 +12015,7 @@ _LT_EOF
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
     (./conftest; exit; ) >&5 2>/dev/null
     lt_status=$?
@@ -12029,8 +12033,8 @@ rm -fr conftest*
 
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
-$as_echo "$lt_cv_dlopen_self_static" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
+printf "%s\n" "$lt_cv_dlopen_self_static" >&6; }
     fi
 
     CPPFLAGS=$save_CPPFLAGS
@@ -12068,32 +12072,43 @@ fi
 
 striplib=
 old_striplib=
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
-$as_echo_n "checking whether stripping libraries is possible... " >&6; }
-if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
-  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
-  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
-# FIXME - insert some real tests, host_os isn't really good enough
-  case $host_os in
-  darwin*)
-    if test -n "$STRIP"; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
+printf %s "checking whether stripping libraries is possible... " >&6; }
+if test -z "$STRIP"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+else
+  if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+    old_striplib="$STRIP --strip-debug"
+    striplib="$STRIP --strip-unneeded"
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+  else
+    case $host_os in
+    darwin*)
+      # FIXME - insert some real tests, host_os isn't really good enough
       striplib="$STRIP -x"
       old_striplib="$STRIP -S"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-    else
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-    fi
-    ;;
-  *)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-    ;;
-  esac
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+      ;;
+    freebsd*)
+      if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
+        old_striplib="$STRIP --strip-debug"
+        striplib="$STRIP --strip-unneeded"
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+      else
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+      fi
+      ;;
+    *)
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+      ;;
+    esac
+  fi
 fi
 
 
@@ -12108,13 +12123,13 @@ fi
 
 
   # Report what library types will actually be built
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
-$as_echo_n "checking if libtool supports shared libraries... " >&6; }
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
-$as_echo "$can_build_shared" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
+printf %s "checking if libtool supports shared libraries... " >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
+printf "%s\n" "$can_build_shared" >&6; }
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
-$as_echo_n "checking whether to build shared libraries... " >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
+printf %s "checking whether to build shared libraries... " >&6; }
   test no = "$can_build_shared" && enable_shared=no
 
   # On AIX, shared libraries and static libraries use the same namespace, and
@@ -12138,15 +12153,15 @@ $as_echo_n "checking whether to build shared libraries... " >&6; }
     fi
     ;;
   esac
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
-$as_echo "$enable_shared" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
+printf "%s\n" "$enable_shared" >&6; }
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
-$as_echo_n "checking whether to build static libraries... " >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
+printf %s "checking whether to build static libraries... " >&6; }
   # Make sure either enable_shared or enable_static is yes.
   test yes = "$enable_shared" || enable_static=yes
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
-$as_echo "$enable_static" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
+printf "%s\n" "$enable_static" >&6; }
 
 
 
@@ -12190,11 +12205,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
 set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
@@ -12202,11 +12218,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="${ac_tool_prefix}gcc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -12217,11 +12237,11 @@ fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -12230,11 +12250,12 @@ if test -z "$ac_cv_prog_CC"; then
   ac_ct_CC=$CC
   # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$ac_ct_CC"; then
   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
 else
@@ -12242,11 +12263,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_CC="gcc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -12257,11 +12282,11 @@ fi
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
   if test "x$ac_ct_CC" = x; then
@@ -12269,8 +12294,8 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
     CC=$ac_ct_CC
@@ -12283,11 +12308,12 @@ if test -z "$CC"; then
           if test -n "$ac_tool_prefix"; then
     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
 set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
@@ -12295,11 +12321,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="${ac_tool_prefix}cc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -12310,11 +12340,11 @@ fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -12323,11 +12353,12 @@ fi
 if test -z "$CC"; then
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
@@ -12336,15 +12367,19 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
        ac_prog_rejected=yes
        continue
      fi
     ac_cv_prog_CC="cc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -12360,33 +12395,144 @@ if test $ac_prog_rejected = yes; then
     # However, it has the same basename, so the bogon will be chosen
     # first if we set CC to just the basename; use the full file name.
     shift
-    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+    ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl.exe
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
   fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
+
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl.exe
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
 fi
 fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
+  test -n "$ac_ct_CC" && break
+done
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+fi
+
 fi
 if test -z "$CC"; then
   if test -n "$ac_tool_prefix"; then
-  for ac_prog in cl.exe
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+  # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
+set dummy ${ac_tool_prefix}clang; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
@@ -12394,11 +12540,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}clang"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -12409,28 +12559,25 @@ fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
-    test -n "$CC" && break
-  done
 fi
-if test -z "$CC"; then
+if test -z "$ac_cv_prog_CC"; then
   ac_ct_CC=$CC
-  for ac_prog in cl.exe
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+  # Extract the first word of "clang", so it can be a program name with args.
+set dummy clang; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$ac_ct_CC"; then
   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
 else
@@ -12438,11 +12585,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_CC="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="clang"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -12453,50 +12604,48 @@ fi
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
-
-  test -n "$ac_ct_CC" && break
-done
-
   if test "x$ac_ct_CC" = x; then
     CC=""
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
     CC=$ac_ct_CC
   fi
+else
+  CC="$ac_cv_prog_CC"
 fi
 
 fi
 
 
-test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "no acceptable C compiler found in \$PATH
 See \`config.log' for more details" "$LINENO" 5; }
 
 # Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
 set X $ac_compile
 ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
+for ac_option in --version -v -V -qversion -version; do
   { { ac_try="$ac_compiler $ac_option >&5"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
   ac_status=$?
   if test -s conftest.err; then
@@ -12506,20 +12655,21 @@ $as_echo "$ac_try_echo"; } >&5
     cat conftest.er1 >&5
   fi
   rm -f conftest.er1 conftest.err
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }
 done
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
-$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if ${ac_cv_c_compiler_gnu+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
+printf %s "checking whether the compiler supports GNU C... " >&6; }
+if test ${ac_cv_c_compiler_gnu+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
-main ()
+main (void)
 {
 #ifndef __GNUC__
        choke me
@@ -12529,29 +12679,33 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   ac_compiler_gnu=yes
-else
+else $as_nop
   ac_compiler_gnu=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 ac_cv_c_compiler_gnu=$ac_compiler_gnu
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
-$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
 if test $ac_compiler_gnu = yes; then
   GCC=yes
 else
   GCC=
 fi
-ac_test_CFLAGS=${CFLAGS+set}
+ac_test_CFLAGS=${CFLAGS+y}
 ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if ${ac_cv_prog_cc_g+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+printf %s "checking whether $CC accepts -g... " >&6; }
+if test ${ac_cv_prog_cc_g+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   ac_save_c_werror_flag=$ac_c_werror_flag
    ac_c_werror_flag=yes
    ac_cv_prog_cc_g=no
@@ -12560,57 +12714,60 @@ else
 /* end confdefs.h.  */
 
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   ac_cv_prog_cc_g=yes
-else
+else $as_nop
   CFLAGS=""
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
 
-else
+else $as_nop
   ac_c_werror_flag=$ac_save_c_werror_flag
 	 CFLAGS="-g"
 	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   ac_cv_prog_cc_g=yes
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
    ac_c_werror_flag=$ac_save_c_werror_flag
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
-$as_echo "$ac_cv_prog_cc_g" >&6; }
-if test "$ac_test_CFLAGS" = set; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
+if test $ac_test_CFLAGS; then
   CFLAGS=$ac_save_CFLAGS
 elif test $ac_cv_prog_cc_g = yes; then
   if test "$GCC" = yes; then
@@ -12625,94 +12782,144 @@ else
     CFLAGS=
   fi
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if ${ac_cv_prog_cc_c89+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_prog_cc_c89=no
+ac_prog_cc_stdc=no
+if test x$ac_prog_cc_stdc = xno
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
+printf %s "checking for $CC option to enable C11 features... " >&6; }
+if test ${ac_cv_prog_cc_c11+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_cv_prog_cc_c11=no
 ac_save_CC=$CC
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <stdarg.h>
-#include <stdio.h>
-struct stat;
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
-     char **p;
-     int i;
-{
-  return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
-  char *s;
-  va_list v;
-  va_start (v,p);
-  s = g (p, va_arg (v,int));
-  va_end (v);
-  return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
-   function prototypes and stuff, but not '\xHH' hex character constants.
-   These don't provoke an error unfortunately, instead are silently treated
-   as 'x'.  The following induces an error, until -std is added to get
-   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
-   array size at least.  It's necessary to write '\x00'==0 to get something
-   that's true only with -std.  */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+$ac_c_conftest_c11_program
+_ACEOF
+for ac_arg in '' -std=gnu11
+do
+  CC="$ac_save_CC $ac_arg"
+  if ac_fn_c_try_compile "$LINENO"
+then :
+  ac_cv_prog_cc_c11=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+  test "x$ac_cv_prog_cc_c11" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
 
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
-   inside strings and character constants.  */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+if test "x$ac_cv_prog_cc_c11" = xno
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+  if test "x$ac_cv_prog_cc_c11" = x
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
+printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
+     CC="$CC $ac_cv_prog_cc_c11"
+fi
+  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
+  ac_prog_cc_stdc=c11
+fi
+fi
+if test x$ac_prog_cc_stdc = xno
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
+printf %s "checking for $CC option to enable C99 features... " >&6; }
+if test ${ac_cv_prog_cc_c99+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_c_conftest_c99_program
+_ACEOF
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
+do
+  CC="$ac_save_CC $ac_arg"
+  if ac_fn_c_try_compile "$LINENO"
+then :
+  ac_cv_prog_cc_c99=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+  test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
 
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
-  ;
-  return 0;
-}
+if test "x$ac_cv_prog_cc_c99" = xno
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+  if test "x$ac_cv_prog_cc_c99" = x
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
+     CC="$CC $ac_cv_prog_cc_c99"
+fi
+  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
+  ac_prog_cc_stdc=c99
+fi
+fi
+if test x$ac_prog_cc_stdc = xno
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
+printf %s "checking for $CC option to enable C89 features... " >&6; }
+if test ${ac_cv_prog_cc_c89+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_c_conftest_c89_program
 _ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
-	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
 do
   CC="$ac_save_CC $ac_arg"
-  if ac_fn_c_try_compile "$LINENO"; then :
+  if ac_fn_c_try_compile "$LINENO"
+then :
   ac_cv_prog_cc_c89=$ac_arg
 fi
-rm -f core conftest.err conftest.$ac_objext
+rm -f core conftest.err conftest.$ac_objext conftest.beam
   test "x$ac_cv_prog_cc_c89" != "xno" && break
 done
 rm -f conftest.$ac_ext
 CC=$ac_save_CC
-
 fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
-  x)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
-  xno)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
-  *)
-    CC="$CC $ac_cv_prog_cc_c89"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c89" != xno; then :
 
+if test "x$ac_cv_prog_cc_c89" = xno
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+  if test "x$ac_cv_prog_cc_c89" = x
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
+     CC="$CC $ac_cv_prog_cc_c89"
+fi
+  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
+  ac_prog_cc_stdc=c89
+fi
 fi
 
 ac_ext=c
@@ -12721,21 +12928,23 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-ac_ext=c
+
+  ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
-$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
-if ${am_cv_prog_cc_c_o+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
+printf %s "checking whether $CC understands -c and -o together... " >&6; }
+if test ${am_cv_prog_cc_c_o+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
-main ()
+main (void)
 {
 
   ;
@@ -12763,8 +12972,8 @@ _ACEOF
   rm -f core conftest*
   unset am_i
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
-$as_echo "$am_cv_prog_cc_c_o" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
+printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
 if test "$am_cv_prog_cc_c_o" != yes; then
    # Losing compiler, so override with the script.
    # FIXME: It is wrong to rewrite CC.
@@ -12780,7 +12989,65 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing floorf" >&5
+printf %s "checking for library containing floorf... " >&6; }
+if test ${ac_cv_search_floorf+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+char floorf ();
+int
+main (void)
+{
+return floorf ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' m
+do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"
+then :
+  ac_cv_search_floorf=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext
+  if test ${ac_cv_search_floorf+y}
+then :
+  break
+fi
+done
+if test ${ac_cv_search_floorf+y}
+then :
+
+else $as_nop
+  ac_cv_search_floorf=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_floorf" >&5
+printf "%s\n" "$ac_cv_search_floorf" >&6; }
+ac_res=$ac_cv_search_floorf
+if test "$ac_res" != no
+then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
 
 
 
@@ -12794,11 +13061,12 @@ if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
 	if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PKG_CONFIG+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_PKG_CONFIG+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   case $PKG_CONFIG in
   [\\/]* | ?:[\\/]*)
   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
@@ -12808,11 +13076,15 @@ else
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -12824,11 +13096,11 @@ esac
 fi
 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
 if test -n "$PKG_CONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
-$as_echo "$PKG_CONFIG" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+printf "%s\n" "$PKG_CONFIG" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -12837,11 +13109,12 @@ if test -z "$ac_cv_path_PKG_CONFIG"; then
   ac_pt_PKG_CONFIG=$PKG_CONFIG
   # Extract the first word of "pkg-config", so it can be a program name with args.
 set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   case $ac_pt_PKG_CONFIG in
   [\\/]* | ?:[\\/]*)
   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
@@ -12851,11 +13124,15 @@ else
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -12867,11 +13144,11 @@ esac
 fi
 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
 if test -n "$ac_pt_PKG_CONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
-$as_echo "$ac_pt_PKG_CONFIG" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
   if test "x$ac_pt_PKG_CONFIG" = x; then
@@ -12879,8 +13156,8 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
     PKG_CONFIG=$ac_pt_PKG_CONFIG
@@ -12892,14 +13169,14 @@ fi
 fi
 if test -n "$PKG_CONFIG"; then
 	_pkg_min_version=0.9.0
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
-$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
+printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; }
 	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
 	else
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 		PKG_CONFIG=""
 	fi
 fi
@@ -12907,15 +13184,16 @@ fi
 
 
                 # Check whether --enable-introspection was given.
-if test "${enable_introspection+set}" = set; then :
+if test ${enable_introspection+y}
+then :
   enableval=$enable_introspection;
-else
+else $as_nop
   enable_introspection=auto
 fi
 
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gobject-introspection" >&5
-$as_echo_n "checking for gobject-introspection... " >&6; }
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gobject-introspection" >&5
+printf %s "checking for gobject-introspection... " >&6; }
 
         case $enable_introspection in #(
   no) :
@@ -12923,20 +13201,20 @@ $as_echo_n "checking for gobject-introspection... " >&6; }
      ;; #(
       yes) :
             if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-introspection-1.0\""; } >&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-introspection-1.0\""; } >&5
   ($PKG_CONFIG --exists --print-errors "gobject-introspection-1.0") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
   :
 else
   as_fn_error $? "gobject-introspection-1.0 is not installed" "$LINENO" 5
 fi
         if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-introspection-1.0 >= 1.30.0\""; } >&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-introspection-1.0 >= 1.30.0\""; } >&5
   ($PKG_CONFIG --exists --print-errors "gobject-introspection-1.0 >= 1.30.0") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
   found_introspection=yes
 else
@@ -12945,10 +13223,10 @@ fi
      ;; #(
       auto) :
             if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-introspection-1.0 >= 1.30.0\""; } >&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-introspection-1.0 >= 1.30.0\""; } >&5
   ($PKG_CONFIG --exists --print-errors "gobject-introspection-1.0 >= 1.30.0") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
   found_introspection=yes
 else
@@ -12960,8 +13238,8 @@ fi
                 as_fn_error $? "invalid argument passed to --enable-introspection, should be one of [no/auto/yes]" "$LINENO" 5
      ;;
 esac
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found_introspection" >&5
-$as_echo "$found_introspection" >&6; }
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $found_introspection" >&5
+printf "%s\n" "$found_introspection" >&6; }
 
     INTROSPECTION_SCANNER=
     INTROSPECTION_COMPILER=
@@ -13001,37 +13279,38 @@ fi
 
 
   gtk_doc_requires="gtk-doc >= 1.0"
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gtk-doc" >&5
-$as_echo_n "checking for gtk-doc... " >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gtk-doc" >&5
+printf %s "checking for gtk-doc... " >&6; }
   if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$gtk_doc_requires\""; } >&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$gtk_doc_requires\""; } >&5
   ($PKG_CONFIG --exists --print-errors "$gtk_doc_requires") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
   have_gtk_doc=yes
 else
   have_gtk_doc=no
 fi
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gtk_doc" >&5
-$as_echo "$have_gtk_doc" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_gtk_doc" >&5
+printf "%s\n" "$have_gtk_doc" >&6; }
 
   if test "$have_gtk_doc" = "no"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING:
   You will not be able to create source packages with 'make dist'
   because $gtk_doc_requires is not found." >&5
-$as_echo "$as_me: WARNING:
+printf "%s\n" "$as_me: WARNING:
   You will not be able to create source packages with 'make dist'
   because $gtk_doc_requires is not found." >&2;}
   fi
 
             # Extract the first word of "gtkdoc-check", so it can be a program name with args.
 set dummy gtkdoc-check; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_GTKDOC_CHECK+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_GTKDOC_CHECK+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$GTKDOC_CHECK"; then
   ac_cv_prog_GTKDOC_CHECK="$GTKDOC_CHECK" # Let the user override the test.
 else
@@ -13039,11 +13318,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_GTKDOC_CHECK="gtkdoc-check.test"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -13054,21 +13337,22 @@ fi
 fi
 GTKDOC_CHECK=$ac_cv_prog_GTKDOC_CHECK
 if test -n "$GTKDOC_CHECK"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_CHECK" >&5
-$as_echo "$GTKDOC_CHECK" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_CHECK" >&5
+printf "%s\n" "$GTKDOC_CHECK" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
   # Extract the first word of "gtkdoc-check", so it can be a program name with args.
 set dummy gtkdoc-check; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_GTKDOC_CHECK_PATH+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_GTKDOC_CHECK_PATH+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   case $GTKDOC_CHECK_PATH in
   [\\/]* | ?:[\\/]*)
   ac_cv_path_GTKDOC_CHECK_PATH="$GTKDOC_CHECK_PATH" # Let the user override the test with a path.
@@ -13078,11 +13362,15 @@ else
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_GTKDOC_CHECK_PATH="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_path_GTKDOC_CHECK_PATH="$as_dir$ac_word$ac_exec_ext"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -13094,11 +13382,11 @@ esac
 fi
 GTKDOC_CHECK_PATH=$ac_cv_path_GTKDOC_CHECK_PATH
 if test -n "$GTKDOC_CHECK_PATH"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_CHECK_PATH" >&5
-$as_echo "$GTKDOC_CHECK_PATH" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_CHECK_PATH" >&5
+printf "%s\n" "$GTKDOC_CHECK_PATH" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -13106,11 +13394,12 @@ fi
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_GTKDOC_REBASE+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_GTKDOC_REBASE+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   case $GTKDOC_REBASE in
   [\\/]* | ?:[\\/]*)
   ac_cv_path_GTKDOC_REBASE="$GTKDOC_REBASE" # Let the user override the test with a path.
@@ -13120,11 +13409,15 @@ else
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_GTKDOC_REBASE="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_path_GTKDOC_REBASE="$as_dir$ac_word$ac_exec_ext"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -13136,11 +13429,11 @@ esac
 fi
 GTKDOC_REBASE=$ac_cv_path_GTKDOC_REBASE
 if test -n "$GTKDOC_REBASE"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_REBASE" >&5
-$as_echo "$GTKDOC_REBASE" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_REBASE" >&5
+printf "%s\n" "$GTKDOC_REBASE" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -13150,11 +13443,12 @@ test -n "$GTKDOC_REBASE" || GTKDOC_REBASE="true"
 
   # Extract the first word of "gtkdoc-mkpdf", so it can be a program name with args.
 set dummy gtkdoc-mkpdf; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_GTKDOC_MKPDF+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_GTKDOC_MKPDF+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   case $GTKDOC_MKPDF in
   [\\/]* | ?:[\\/]*)
   ac_cv_path_GTKDOC_MKPDF="$GTKDOC_MKPDF" # Let the user override the test with a path.
@@ -13164,11 +13458,15 @@ else
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_GTKDOC_MKPDF="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_path_GTKDOC_MKPDF="$as_dir$ac_word$ac_exec_ext"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -13180,20 +13478,21 @@ esac
 fi
 GTKDOC_MKPDF=$ac_cv_path_GTKDOC_MKPDF
 if test -n "$GTKDOC_MKPDF"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_MKPDF" >&5
-$as_echo "$GTKDOC_MKPDF" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_MKPDF" >&5
+printf "%s\n" "$GTKDOC_MKPDF" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
 
 
 # Check whether --with-html-dir was given.
-if test "${with_html_dir+set}" = set; then :
+if test ${with_html_dir+y}
+then :
   withval=$with_html_dir;
-else
+else $as_nop
   with_html_dir='${datadir}/gtk-doc/html'
 fi
 
@@ -13201,17 +13500,18 @@ fi
 
 
     # Check whether --enable-gtk-doc was given.
-if test "${enable_gtk_doc+set}" = set; then :
+if test ${enable_gtk_doc+y}
+then :
   enableval=$enable_gtk_doc;
-else
+else $as_nop
   enable_gtk_doc=no
 fi
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build gtk-doc documentation" >&5
-$as_echo_n "checking whether to build gtk-doc documentation... " >&6; }
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_gtk_doc" >&5
-$as_echo "$enable_gtk_doc" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build gtk-doc documentation" >&5
+printf %s "checking whether to build gtk-doc documentation... " >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gtk_doc" >&5
+printf "%s\n" "$enable_gtk_doc" >&6; }
 
   if test "x$enable_gtk_doc" = "xyes" && test "$have_gtk_doc" = "no"; then
     as_fn_error $? "
@@ -13223,17 +13523,17 @@ $as_echo "$enable_gtk_doc" >&6; }
     if test "x$PACKAGE_NAME" != "xglib"; then
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTKDOC_DEPS" >&5
-$as_echo_n "checking for GTKDOC_DEPS... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTKDOC_DEPS" >&5
+printf %s "checking for GTKDOC_DEPS... " >&6; }
 
 if test -n "$GTKDOC_DEPS_CFLAGS"; then
     pkg_cv_GTKDOC_DEPS_CFLAGS="$GTKDOC_DEPS_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.10.0 gobject-2.0  >= 2.10.0\""; } >&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.10.0 gobject-2.0  >= 2.10.0\""; } >&5
   ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.10.0 gobject-2.0  >= 2.10.0") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
   pkg_cv_GTKDOC_DEPS_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.10.0 gobject-2.0  >= 2.10.0" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
@@ -13247,10 +13547,10 @@ if test -n "$GTKDOC_DEPS_LIBS"; then
     pkg_cv_GTKDOC_DEPS_LIBS="$GTKDOC_DEPS_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.10.0 gobject-2.0  >= 2.10.0\""; } >&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.10.0 gobject-2.0  >= 2.10.0\""; } >&5
   ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.10.0 gobject-2.0  >= 2.10.0") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
   pkg_cv_GTKDOC_DEPS_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.10.0 gobject-2.0  >= 2.10.0" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
@@ -13264,8 +13564,8 @@ fi
 
 
 if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -13282,29 +13582,31 @@ fi
 
 	:
 elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 	:
 else
 	GTKDOC_DEPS_CFLAGS=$pkg_cv_GTKDOC_DEPS_CFLAGS
 	GTKDOC_DEPS_LIBS=$pkg_cv_GTKDOC_DEPS_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
 
 fi
   fi
 
     # Check whether --enable-gtk-doc-html was given.
-if test "${enable_gtk_doc_html+set}" = set; then :
+if test ${enable_gtk_doc_html+y}
+then :
   enableval=$enable_gtk_doc_html;
-else
+else $as_nop
   enable_gtk_doc_html=yes
 fi
 
     # Check whether --enable-gtk-doc-pdf was given.
-if test "${enable_gtk_doc_pdf+set}" = set; then :
+if test ${enable_gtk_doc_pdf+y}
+then :
   enableval=$enable_gtk_doc_pdf;
-else
+else $as_nop
   enable_gtk_doc_pdf=no
 fi
 
@@ -13371,11 +13673,12 @@ fi
 # Have pedansee?
 # Extract the first word of "pedansee", so it can be a program name with args.
 set dummy pedansee; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PEDANSEE+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_PEDANSEE+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   case $PEDANSEE in
   [\\/]* | ?:[\\/]*)
   ac_cv_path_PEDANSEE="$PEDANSEE" # Let the user override the test with a path.
@@ -13385,11 +13688,15 @@ else
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_PEDANSEE="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_path_PEDANSEE="$as_dir$ac_word$ac_exec_ext"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -13401,11 +13708,11 @@ esac
 fi
 PEDANSEE=$ac_cv_path_PEDANSEE
 if test -n "$PEDANSEE"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PEDANSEE" >&5
-$as_echo "$PEDANSEE" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PEDANSEE" >&5
+printf "%s\n" "$PEDANSEE" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -13420,26 +13727,29 @@ fi
 
 # Select debugging or measuring code coverage?
 # Check whether --enable-debug was given.
-if test "${enable_debug+set}" = set; then :
+if test ${enable_debug+y}
+then :
   enableval=$enable_debug;
 fi
 
 # Check whether --enable-coverage was given.
-if test "${enable_coverage+set}" = set; then :
+if test ${enable_coverage+y}
+then :
   enableval=$enable_coverage;
 fi
 
 if test "x$enable_debug" = "xyes"; then
-	CFLAGS="$CFLAGS -g"
+	CFLAGS="$CFLAGS -O0 -g"
 elif test "x$enable_coverage" = "xyes"; then
-	CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
+	CFLAGS="$CFLAGS -O0 -g -fprofile-arcs -ftest-coverage"
 else
 	CFLAGS="$CFLAGS -O2"
 fi
 
 # Select more compiler warnings?
 # Check whether --enable-more-warnings was given.
-if test "${enable_more_warnings+set}" = set; then :
+if test ${enable_more_warnings+y}
+then :
   enableval=$enable_more_warnings;
 fi
 
@@ -13460,8 +13770,8 @@ if test "$GCC" = "yes" -a x$enable_more_warnings = "xyes"; then
 
 	for option in $WARN_CFLAGS; do
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands $option" >&5
-$as_echo_n "checking to see if compiler understands $option... " >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands $option" >&5
+printf %s "checking to see if compiler understands $option... " >&6; }
 
   save_CFLAGS="$CFLAGS"
   CFLAGS="$CFLAGS $option"
@@ -13470,19 +13780,20 @@ $as_echo_n "checking to see if compiler understands $option... " >&6; }
 /* end confdefs.h.  */
 
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   flag_ok=yes
-else
+else $as_nop
   flag_ok=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
   CFLAGS="$save_CFLAGS"
 
   if test "X$flag_ok" = Xyes ; then
@@ -13492,8 +13803,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     has_option=no
     true
   fi
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5
-$as_echo "$flag_ok" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5
+printf "%s\n" "$flag_ok" >&6; }
 
 		if test x$has_option = xyes; then
 			OK_CFLAGS="$OK_CFLAGS $option"
@@ -13508,26 +13819,27 @@ fi
 
 # Build test code?
 # Check whether --enable-tests was given.
-if test "${enable_tests+set}" = set; then :
+if test ${enable_tests+y}
+then :
   enableval=$enable_tests; tests=$enableval
-else
+else $as_nop
   tests=yes
 fi
 
 if test x$tests = xyes; then
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHECK" >&5
-$as_echo_n "checking for CHECK... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CHECK" >&5
+printf %s "checking for CHECK... " >&6; }
 
 if test -n "$CHECK_CFLAGS"; then
     pkg_cv_CHECK_CFLAGS="$CHECK_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"check >= 0.9.4\""; } >&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"check >= 0.9.4\""; } >&5
   ($PKG_CONFIG --exists --print-errors "check >= 0.9.4") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
   pkg_cv_CHECK_CFLAGS=`$PKG_CONFIG --cflags "check >= 0.9.4" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
@@ -13541,10 +13853,10 @@ if test -n "$CHECK_LIBS"; then
     pkg_cv_CHECK_LIBS="$CHECK_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"check >= 0.9.4\""; } >&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"check >= 0.9.4\""; } >&5
   ($PKG_CONFIG --exists --print-errors "check >= 0.9.4") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
   pkg_cv_CHECK_LIBS=`$PKG_CONFIG --libs "check >= 0.9.4" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
@@ -13558,8 +13870,8 @@ fi
 
 
 if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -13576,14 +13888,14 @@ fi
 
 	have_check=no
 elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 	have_check=no
 else
 	CHECK_CFLAGS=$pkg_cv_CHECK_CFLAGS
 	CHECK_LIBS=$pkg_cv_CHECK_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
 	have_check=yes
 fi
 	 if test x"$have_check" = "xyes"; then
@@ -13596,14 +13908,14 @@ fi
 
 	if test "x$have_check" = "xyes"; then
 
-$as_echo "#define HAVE_CHECK 1" >>confdefs.h
+printf "%s\n" "#define HAVE_CHECK 1" >>confdefs.h
 
 	else
 		as_fn_error $? "Must have check library present when tests enabled" "$LINENO" 5
 	fi
 
 
-$as_echo "#define TESTS_ENABLED 1" >>confdefs.h
+printf "%s\n" "#define TESTS_ENABLED 1" >>confdefs.h
 
 	 if true; then
   TESTS_ENABLED_TRUE=
@@ -13633,11 +13945,12 @@ fi
 fi
 
 # Have libz?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uncompress in -lz" >&5
-$as_echo_n "checking for uncompress in -lz... " >&6; }
-if ${ac_cv_lib_z_uncompress+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uncompress in -lz" >&5
+printf %s "checking for uncompress in -lz... " >&6; }
+if test ${ac_cv_lib_z_uncompress+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lz  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -13646,33 +13959,30 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
    builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
 char uncompress ();
 int
-main ()
+main (void)
 {
 return uncompress ();
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   ac_cv_lib_z_uncompress=yes
-else
+else $as_nop
   ac_cv_lib_z_uncompress=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_uncompress" >&5
-$as_echo "$ac_cv_lib_z_uncompress" >&6; }
-if test "x$ac_cv_lib_z_uncompress" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBZ 1
-_ACEOF
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_uncompress" >&5
+printf "%s\n" "$ac_cv_lib_z_uncompress" >&6; }
+if test "x$ac_cv_lib_z_uncompress" = xyes
+then :
+  printf "%s\n" "#define HAVE_LIBZ 1" >>confdefs.h
 
   LIBS="-lz $LIBS"
 
@@ -13682,11 +13992,12 @@ fi
 # Have pkg-config?
 # Extract the first word of "pkg-config", so it can be a program name with args.
 set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_HAVE_PKGCONFIG+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_HAVE_PKGCONFIG+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$HAVE_PKGCONFIG"; then
   ac_cv_prog_HAVE_PKGCONFIG="$HAVE_PKGCONFIG" # Let the user override the test.
 else
@@ -13694,11 +14005,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_HAVE_PKGCONFIG="yes"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -13710,11 +14025,11 @@ fi
 fi
 HAVE_PKGCONFIG=$ac_cv_prog_HAVE_PKGCONFIG
 if test -n "$HAVE_PKGCONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_PKGCONFIG" >&5
-$as_echo "$HAVE_PKGCONFIG" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HAVE_PKGCONFIG" >&5
+printf "%s\n" "$HAVE_PKGCONFIG" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -13725,19 +14040,19 @@ fi
 # Have glib?
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB" >&5
-$as_echo_n "checking for GLIB... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GLIB" >&5
+printf %s "checking for GLIB... " >&6; }
 
 if test -n "$GLIB_CFLAGS"; then
     pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.40\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.40") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.66\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.66") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.40" 2>/dev/null`
+  pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.66" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -13749,12 +14064,12 @@ if test -n "$GLIB_LIBS"; then
     pkg_cv_GLIB_LIBS="$GLIB_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.40\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.40") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.66\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.66") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.40" 2>/dev/null`
+  pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.66" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -13766,8 +14081,8 @@ fi
 
 
 if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -13775,23 +14090,23 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0 >= 2.40" 2>&1`
+	        GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0 >= 2.66" 2>&1`
         else
-	        GLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0 >= 2.40" 2>&1`
+	        GLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0 >= 2.66" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$GLIB_PKG_ERRORS" >&5
 
 	HAVE_GLIB=no
 elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 	HAVE_GLIB=no
 else
 	GLIB_CFLAGS=$pkg_cv_GLIB_CFLAGS
 	GLIB_LIBS=$pkg_cv_GLIB_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
 	HAVE_GLIB=yes
 fi
 if test "x$HAVE_GLIB" = "xno"; then
@@ -13799,10 +14114,10 @@ if test "x$HAVE_GLIB" = "xno"; then
 fi
 
 
-$as_echo "#define GLIB_VERSION_MIN_REQUIRED GLIB_VERSION_2_40" >>confdefs.h
+printf "%s\n" "#define GLIB_VERSION_MIN_REQUIRED GLIB_VERSION_2_66" >>confdefs.h
 
 
-$as_echo "#define GLIB_VERSION_MAX_ALLOWED GLIB_VERSION_2_40" >>confdefs.h
+printf "%s\n" "#define GLIB_VERSION_MAX_ALLOWED GLIB_VERSION_2_66" >>confdefs.h
 
 
 
@@ -13811,17 +14126,17 @@ $as_echo "#define GLIB_VERSION_MAX_ALLOWED GLIB_VERSION_2_40" >>confdefs.h
 # Have gthread?
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTHREAD" >&5
-$as_echo_n "checking for GTHREAD... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTHREAD" >&5
+printf %s "checking for GTHREAD... " >&6; }
 
 if test -n "$GTHREAD_CFLAGS"; then
     pkg_cv_GTHREAD_CFLAGS="$GTHREAD_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gthread-2.0\""; } >&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gthread-2.0\""; } >&5
   ($PKG_CONFIG --exists --print-errors "gthread-2.0") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
   pkg_cv_GTHREAD_CFLAGS=`$PKG_CONFIG --cflags "gthread-2.0" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
@@ -13835,10 +14150,10 @@ if test -n "$GTHREAD_LIBS"; then
     pkg_cv_GTHREAD_LIBS="$GTHREAD_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gthread-2.0\""; } >&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gthread-2.0\""; } >&5
   ($PKG_CONFIG --exists --print-errors "gthread-2.0") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
   pkg_cv_GTHREAD_LIBS=`$PKG_CONFIG --libs "gthread-2.0" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
@@ -13852,8 +14167,8 @@ fi
 
 
 if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -13870,14 +14185,14 @@ fi
 
 	HAVE_GTHREAD=no
 elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 	HAVE_GTHREAD=no
 else
 	GTHREAD_CFLAGS=$pkg_cv_GTHREAD_CFLAGS
 	GTHREAD_LIBS=$pkg_cv_GTHREAD_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
 	HAVE_GTHREAD=yes
 fi
 if test "x$HAVE_GTHREAD" = "xno"; then
@@ -13890,17 +14205,17 @@ fi
 # Have gobject?
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GOBJECT" >&5
-$as_echo_n "checking for GOBJECT... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GOBJECT" >&5
+printf %s "checking for GOBJECT... " >&6; }
 
 if test -n "$GOBJECT_CFLAGS"; then
     pkg_cv_GOBJECT_CFLAGS="$GOBJECT_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-2.0\""; } >&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-2.0\""; } >&5
   ($PKG_CONFIG --exists --print-errors "gobject-2.0") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
   pkg_cv_GOBJECT_CFLAGS=`$PKG_CONFIG --cflags "gobject-2.0" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
@@ -13914,10 +14229,10 @@ if test -n "$GOBJECT_LIBS"; then
     pkg_cv_GOBJECT_LIBS="$GOBJECT_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-2.0\""; } >&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-2.0\""; } >&5
   ($PKG_CONFIG --exists --print-errors "gobject-2.0") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
   pkg_cv_GOBJECT_LIBS=`$PKG_CONFIG --libs "gobject-2.0" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
@@ -13931,8 +14246,8 @@ fi
 
 
 if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -13949,14 +14264,14 @@ fi
 
 	HAVE_GOBJECT=no
 elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 	HAVE_GOBJECT=no
 else
 	GOBJECT_CFLAGS=$pkg_cv_GOBJECT_CFLAGS
 	GOBJECT_LIBS=$pkg_cv_GOBJECT_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
 	HAVE_GOBJECT=yes
 fi
 if test "x$HAVE_GOBJECT" = "xno"; then
@@ -13969,17 +14284,17 @@ fi
 # Have gdkpixbuf?
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GDKPIXBUF" >&5
-$as_echo_n "checking for GDKPIXBUF... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GDKPIXBUF" >&5
+printf %s "checking for GDKPIXBUF... " >&6; }
 
 if test -n "$GDKPIXBUF_CFLAGS"; then
     pkg_cv_GDKPIXBUF_CFLAGS="$GDKPIXBUF_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gdk-pixbuf-2.0\""; } >&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gdk-pixbuf-2.0\""; } >&5
   ($PKG_CONFIG --exists --print-errors "gdk-pixbuf-2.0") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
   pkg_cv_GDKPIXBUF_CFLAGS=`$PKG_CONFIG --cflags "gdk-pixbuf-2.0" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
@@ -13993,10 +14308,10 @@ if test -n "$GDKPIXBUF_LIBS"; then
     pkg_cv_GDKPIXBUF_LIBS="$GDKPIXBUF_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gdk-pixbuf-2.0\""; } >&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gdk-pixbuf-2.0\""; } >&5
   ($PKG_CONFIG --exists --print-errors "gdk-pixbuf-2.0") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
   pkg_cv_GDKPIXBUF_LIBS=`$PKG_CONFIG --libs "gdk-pixbuf-2.0" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
@@ -14010,8 +14325,8 @@ fi
 
 
 if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -14028,23 +14343,23 @@ fi
 
 	HAVE_GDKPIXBUF=no
 elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 	HAVE_GDKPIXBUF=no
 else
 	GDKPIXBUF_CFLAGS=$pkg_cv_GDKPIXBUF_CFLAGS
 	GDKPIXBUF_LIBS=$pkg_cv_GDKPIXBUF_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
 	HAVE_GDKPIXBUF=yes
 fi
 if test x"$HAVE_GDKPIXBUF" = "xyes"; then
 
-$as_echo "#define HAVE_GDKPIXBUF 1" >>confdefs.h
+printf "%s\n" "#define HAVE_GDKPIXBUF 1" >>confdefs.h
 
 else
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Gdk-pixbuf library not present; now-playing artwork might be affected" >&5
-$as_echo "$as_me: WARNING: Gdk-pixbuf library not present; now-playing artwork might be affected" >&2;}
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Gdk-pixbuf library not present; now-playing artwork might be affected" >&5
+printf "%s\n" "$as_me: WARNING: Gdk-pixbuf library not present; now-playing artwork might be affected" >&2;}
 fi
 
  if test x"$HAVE_GDKPIXBUF" = "xyes"; then
@@ -14062,19 +14377,19 @@ fi
 # Have libsoup?
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SOUP" >&5
-$as_echo_n "checking for SOUP... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SOUP" >&5
+printf %s "checking for SOUP... " >&6; }
 
 if test -n "$SOUP_CFLAGS"; then
     pkg_cv_SOUP_CFLAGS="$SOUP_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsoup-2.4 >= 2.48.0\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "libsoup-2.4 >= 2.48.0") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsoup-3.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libsoup-3.0") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_SOUP_CFLAGS=`$PKG_CONFIG --cflags "libsoup-2.4 >= 2.48.0" 2>/dev/null`
+  pkg_cv_SOUP_CFLAGS=`$PKG_CONFIG --cflags "libsoup-3.0" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -14086,12 +14401,12 @@ if test -n "$SOUP_LIBS"; then
     pkg_cv_SOUP_LIBS="$SOUP_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsoup-2.4 >= 2.48.0\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "libsoup-2.4 >= 2.48.0") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsoup-3.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libsoup-3.0") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_SOUP_LIBS=`$PKG_CONFIG --libs "libsoup-2.4 >= 2.48.0" 2>/dev/null`
+  pkg_cv_SOUP_LIBS=`$PKG_CONFIG --libs "libsoup-3.0" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -14103,8 +14418,8 @@ fi
 
 
 if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -14112,23 +14427,23 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        SOUP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsoup-2.4 >= 2.48.0" 2>&1`
+	        SOUP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsoup-3.0" 2>&1`
         else
-	        SOUP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsoup-2.4 >= 2.48.0" 2>&1`
+	        SOUP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsoup-3.0" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$SOUP_PKG_ERRORS" >&5
 
 	HAVE_LIBSOUP=no
 elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 	HAVE_LIBSOUP=no
 else
 	SOUP_CFLAGS=$pkg_cv_SOUP_CFLAGS
 	SOUP_LIBS=$pkg_cv_SOUP_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
 	HAVE_LIBSOUP=yes
 fi
 if test x"$HAVE_LIBSOUP" = "xno"; then
@@ -14141,17 +14456,17 @@ fi
 # Have GTK3?
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK" >&5
-$as_echo_n "checking for GTK... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK" >&5
+printf %s "checking for GTK... " >&6; }
 
 if test -n "$GTK_CFLAGS"; then
     pkg_cv_GTK_CFLAGS="$GTK_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0\""; } >&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0\""; } >&5
   ($PKG_CONFIG --exists --print-errors "gtk+-3.0") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
   pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-3.0" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
@@ -14165,10 +14480,10 @@ if test -n "$GTK_LIBS"; then
     pkg_cv_GTK_LIBS="$GTK_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0\""; } >&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0\""; } >&5
   ($PKG_CONFIG --exists --print-errors "gtk+-3.0") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
   pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "gtk+-3.0" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
@@ -14182,8 +14497,8 @@ fi
 
 
 if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -14200,14 +14515,14 @@ fi
 
 	HAVE_GTK=no
 elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 	HAVE_GTK=no
 else
 	GTK_CFLAGS=$pkg_cv_GTK_CFLAGS
 	GTK_LIBS=$pkg_cv_GTK_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
 	HAVE_GTK=yes
 fi
 
@@ -14217,17 +14532,17 @@ fi
 # Have libgee?
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GEE" >&5
-$as_echo_n "checking for GEE... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GEE" >&5
+printf %s "checking for GEE... " >&6; }
 
 if test -n "$GEE_CFLAGS"; then
     pkg_cv_GEE_CFLAGS="$GEE_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gee-0.8\""; } >&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gee-0.8\""; } >&5
   ($PKG_CONFIG --exists --print-errors "gee-0.8") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
   pkg_cv_GEE_CFLAGS=`$PKG_CONFIG --cflags "gee-0.8" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
@@ -14241,10 +14556,10 @@ if test -n "$GEE_LIBS"; then
     pkg_cv_GEE_LIBS="$GEE_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gee-0.8\""; } >&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gee-0.8\""; } >&5
   ($PKG_CONFIG --exists --print-errors "gee-0.8") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
   pkg_cv_GEE_LIBS=`$PKG_CONFIG --libs "gee-0.8" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
@@ -14258,8 +14573,8 @@ fi
 
 
 if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -14276,14 +14591,14 @@ fi
 
 	HAVE_GEE=no
 elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 	HAVE_GEE=no
 else
 	GEE_CFLAGS=$pkg_cv_GEE_CFLAGS
 	GEE_LIBS=$pkg_cv_GEE_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
 	HAVE_GEE=yes
 fi
 
@@ -14293,19 +14608,19 @@ fi
 # Have gstreamer-app?
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GSTREAMERAPP" >&5
-$as_echo_n "checking for GSTREAMERAPP... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GSTREAMERAPP" >&5
+printf %s "checking for GSTREAMERAPP... " >&6; }
 
 if test -n "$GSTREAMERAPP_CFLAGS"; then
     pkg_cv_GSTREAMERAPP_CFLAGS="$GSTREAMERAPP_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gstreamer-app-1.0
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gstreamer-app-1.0
 	gstreamer-plugins-base-1.0 >= 0.10.23.2\""; } >&5
   ($PKG_CONFIG --exists --print-errors "gstreamer-app-1.0
 	gstreamer-plugins-base-1.0 >= 0.10.23.2") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
   pkg_cv_GSTREAMERAPP_CFLAGS=`$PKG_CONFIG --cflags "gstreamer-app-1.0
 	gstreamer-plugins-base-1.0 >= 0.10.23.2" 2>/dev/null`
@@ -14320,12 +14635,12 @@ if test -n "$GSTREAMERAPP_LIBS"; then
     pkg_cv_GSTREAMERAPP_LIBS="$GSTREAMERAPP_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gstreamer-app-1.0
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gstreamer-app-1.0
 	gstreamer-plugins-base-1.0 >= 0.10.23.2\""; } >&5
   ($PKG_CONFIG --exists --print-errors "gstreamer-app-1.0
 	gstreamer-plugins-base-1.0 >= 0.10.23.2") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
   pkg_cv_GSTREAMERAPP_LIBS=`$PKG_CONFIG --libs "gstreamer-app-1.0
 	gstreamer-plugins-base-1.0 >= 0.10.23.2" 2>/dev/null`
@@ -14340,8 +14655,8 @@ fi
 
 
 if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -14361,27 +14676,27 @@ fi
 	HAVE_GSTREAMERAPP=no
 
 elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 	HAVE_GSTREAMERAPP=no
 
 else
 	GSTREAMERAPP_CFLAGS=$pkg_cv_GSTREAMERAPP_CFLAGS
 	GSTREAMERAPP_LIBS=$pkg_cv_GSTREAMERAPP_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
 	HAVE_GSTREAMERAPP=yes
 fi
 
 if test x"$HAVE_GSTREAMERAPP" = "xyes"; then
 
-$as_echo "#define HAVE_GSTREAMERAPP 1" >>confdefs.h
+printf "%s\n" "#define HAVE_GSTREAMERAPP 1" >>confdefs.h
 
 	GSTLIB="gstreamer-1.0 gstreamer-app-1.0"
 
 else
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GStreamer app element not present; transcoding will not be supported" >&5
-$as_echo "$as_me: WARNING: GStreamer app element not present; transcoding will not be supported" >&2;}
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: GStreamer app element not present; transcoding will not be supported" >&5
+printf "%s\n" "$as_me: WARNING: GStreamer app element not present; transcoding will not be supported" >&2;}
 fi
 
  if test x"$HAVE_GSTREAMERAPP" = "xyes"; then
@@ -14399,11 +14714,12 @@ fi
 # Have Vala compiler?
 # Extract the first word of "valac", so it can be a program name with args.
 set dummy valac; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_VALAC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_VALAC+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   case $VALAC in
   [\\/]* | ?:[\\/]*)
   ac_cv_path_VALAC="$VALAC" # Let the user override the test with a path.
@@ -14413,11 +14729,15 @@ else
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_VALAC="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_path_VALAC="$as_dir$ac_word$ac_exec_ext"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -14430,41 +14750,42 @@ esac
 fi
 VALAC=$ac_cv_path_VALAC
 if test -n "$VALAC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VALAC" >&5
-$as_echo "$VALAC" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $VALAC" >&5
+printf "%s\n" "$VALAC" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
-   if test "$VALAC" != valac && test -n "0.11.4"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $VALAC is at least version 0.11.4" >&5
-$as_echo_n "checking whether $VALAC is at least version 0.11.4... " >&6; }
-       am__vala_version=`$VALAC --version | sed 's/Vala  *//'`
+   if test "$VALAC" != valac && test -n "0.11.4"
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $VALAC supports at least API version 0.11.4" >&5
+printf %s "checking whether $VALAC supports at least API version 0.11.4... " >&6; }
+       am__vala_version=`$VALAC --api-version`
        as_arg_v1=0.11.4
 as_arg_v2="$am__vala_version"
 awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null
 case $? in #(
   1) :
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; } ;; #(
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; } ;; #(
   0) :
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; } ;; #(
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; } ;; #(
   2) :
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
           VALAC=valac ;; #(
   *) :
      ;;
 esac
 fi
     if test "$VALAC" = valac; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no proper vala compiler found" >&5
-$as_echo "$as_me: WARNING: no proper vala compiler found" >&2;}
-         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: you will not be able to compile vala source files" >&5
-$as_echo "$as_me: WARNING: you will not be able to compile vala source files" >&2;}
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Vala compiler not found or too old" >&5
+printf "%s\n" "$as_me: WARNING: Vala compiler not found or too old" >&2;}
+         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: you will not be able to compile Vala source files" >&5
+printf "%s\n" "$as_me: WARNING: you will not be able to compile Vala source files" >&2;}
     else
       :
     fi
@@ -14480,11 +14801,12 @@ fi
 # Have vala-gen-introspect?
 # Extract the first word of "vala-gen-introspect", so it can be a program name with args.
 set dummy vala-gen-introspect; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_VALA_GEN_INTROSPECT+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_VALA_GEN_INTROSPECT+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   case $VALA_GEN_INTROSPECT in
   [\\/]* | ?:[\\/]*)
   ac_cv_path_VALA_GEN_INTROSPECT="$VALA_GEN_INTROSPECT" # Let the user override the test with a path.
@@ -14494,11 +14816,15 @@ else
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_VALA_GEN_INTROSPECT="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_path_VALA_GEN_INTROSPECT="$as_dir$ac_word$ac_exec_ext"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -14510,21 +14836,22 @@ esac
 fi
 VALA_GEN_INTROSPECT=$ac_cv_path_VALA_GEN_INTROSPECT
 if test -n "$VALA_GEN_INTROSPECT"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VALA_GEN_INTROSPECT" >&5
-$as_echo "$VALA_GEN_INTROSPECT" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $VALA_GEN_INTROSPECT" >&5
+printf "%s\n" "$VALA_GEN_INTROSPECT" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
 # Extract the first word of "vapigen", so it can be a program name with args.
 set dummy vapigen; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_VAPIGEN+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_VAPIGEN+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   case $VAPIGEN in
   [\\/]* | ?:[\\/]*)
   ac_cv_path_VAPIGEN="$VAPIGEN" # Let the user override the test with a path.
@@ -14534,11 +14861,15 @@ else
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_VAPIGEN="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_path_VAPIGEN="$as_dir$ac_word$ac_exec_ext"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -14550,11 +14881,11 @@ esac
 fi
 VAPIGEN=$ac_cv_path_VAPIGEN
 if test -n "$VAPIGEN"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VAPIGEN" >&5
-$as_echo "$VAPIGEN" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $VAPIGEN" >&5
+printf "%s\n" "$VAPIGEN" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -14567,8 +14898,8 @@ else
 fi
 
 if ! test -n "$VALA_GEN_INTROSPECT" -a -n "$VAPIGEN" -a xyes = x"$found_introspection"; then
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Will not build vapi" >&5
-$as_echo "$as_me: WARNING: Will not build vapi" >&2;}
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Will not build vapi" >&5
+printf "%s\n" "$as_me: WARNING: Will not build vapi" >&2;}
 fi
 
  if test -x "$VALAC" -a "x$HAVE_GEE" = "xyes"; then
@@ -14580,8 +14911,8 @@ else
 fi
 
 if test -n "$BUILD_VALATESTS" ; then
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Will not build Vala tests" >&5
-$as_echo "$as_me: WARNING: Will not build Vala tests" >&2;}
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Will not build Vala tests" >&5
+printf "%s\n" "$as_me: WARNING: Will not build Vala tests" >&2;}
 fi
 
  if test -x "$VALAC" -a "x$HAVE_GEE" = "xyes" -a "x$HAVE_GTK" = "xyes"; then
@@ -14593,8 +14924,8 @@ else
 fi
 
 if test -n "$BUILD_DPAPVIEW" ; then
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Will not build dpapview" >&5
-$as_echo "$as_me: WARNING: Will not build dpapview" >&2;}
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Will not build dpapview" >&5
+printf "%s\n" "$as_me: WARNING: Will not build dpapview" >&2;}
 fi
 
 if test x${as_cv_unaligned_access} = xyes ; then
@@ -14607,9 +14938,10 @@ fi
 # Select mDNS library.
 
 # Check whether --with-mdns was given.
-if test "${with_mdns+set}" = set; then :
+if test ${with_mdns+y}
+then :
   withval=$with_mdns; WITH_MDNS=$withval
-else
+else $as_nop
   WITH_MDNS=auto
 
 fi
@@ -14623,19 +14955,19 @@ USE_DNS_SD=no
 if test x"$WITH_MDNS" = xauto || test x"$WITH_MDNS" = xavahi; then
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for AVAHI" >&5
-$as_echo_n "checking for AVAHI... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for AVAHI" >&5
+printf %s "checking for AVAHI... " >&6; }
 
 if test -n "$AVAHI_CFLAGS"; then
     pkg_cv_AVAHI_CFLAGS="$AVAHI_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"avahi-client >= 0.6
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"avahi-client >= 0.6
 		avahi-glib >= 0.6\""; } >&5
   ($PKG_CONFIG --exists --print-errors "avahi-client >= 0.6
 		avahi-glib >= 0.6") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
   pkg_cv_AVAHI_CFLAGS=`$PKG_CONFIG --cflags "avahi-client >= 0.6
 		avahi-glib >= 0.6" 2>/dev/null`
@@ -14650,12 +14982,12 @@ if test -n "$AVAHI_LIBS"; then
     pkg_cv_AVAHI_LIBS="$AVAHI_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"avahi-client >= 0.6
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"avahi-client >= 0.6
 		avahi-glib >= 0.6\""; } >&5
   ($PKG_CONFIG --exists --print-errors "avahi-client >= 0.6
 		avahi-glib >= 0.6") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
   pkg_cv_AVAHI_LIBS=`$PKG_CONFIG --libs "avahi-client >= 0.6
 		avahi-glib >= 0.6" 2>/dev/null`
@@ -14670,8 +15002,8 @@ fi
 
 
 if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -14691,39 +15023,38 @@ fi
 	HAVE_AVAHI=no
 
 elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 	HAVE_AVAHI=no
 
 else
 	AVAHI_CFLAGS=$pkg_cv_AVAHI_CFLAGS
 	AVAHI_LIBS=$pkg_cv_AVAHI_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
 	HAVE_AVAHI=yes
 fi
 fi
 
 if test x"$HAVE_AVAHI" = xno; then
 	if test x"$WITH_MDNS" = xauto || test x"$WITH_MDNS" = xdns_sd; then
-		for ac_header in dns_sd.h
+		       for ac_header in dns_sd.h
 do :
-  ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
-if test "x$ac_cv_header_dns_sd_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DNS_SD_H 1
-_ACEOF
+  ac_fn_c_check_header_compile "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
+if test "x$ac_cv_header_dns_sd_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_DNS_SD_H 1" >>confdefs.h
  HAVE_DNS_SD=yes
 fi
 
 done
-
 		if test x"$HAVE_DNS_SD" = xyes; then
-			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DNSServiceRegister in -ldns_sd" >&5
-$as_echo_n "checking for DNSServiceRegister in -ldns_sd... " >&6; }
-if ${ac_cv_lib_dns_sd_DNSServiceRegister+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for DNSServiceRegister in -ldns_sd" >&5
+printf %s "checking for DNSServiceRegister in -ldns_sd... " >&6; }
+if test ${ac_cv_lib_dns_sd_DNSServiceRegister+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-ldns_sd  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -14732,30 +15063,29 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
    builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
 char DNSServiceRegister ();
 int
-main ()
+main (void)
 {
 return DNSServiceRegister ();
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   ac_cv_lib_dns_sd_DNSServiceRegister=yes
-else
+else $as_nop
   ac_cv_lib_dns_sd_DNSServiceRegister=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dns_sd_DNSServiceRegister" >&5
-$as_echo "$ac_cv_lib_dns_sd_DNSServiceRegister" >&6; }
-if test "x$ac_cv_lib_dns_sd_DNSServiceRegister" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dns_sd_DNSServiceRegister" >&5
+printf "%s\n" "$ac_cv_lib_dns_sd_DNSServiceRegister" >&6; }
+if test "x$ac_cv_lib_dns_sd_DNSServiceRegister" = xyes
+then :
   DNS_SD_LIBS="-ldns_sd"
 fi
 
@@ -14768,14 +15098,14 @@ if test x"$WITH_MDNS" = xauto; then
 		MDNS_CFLAGS=$AVAHI_CFLAGS
 		MDNS_LIBS=$AVAHI_LIBS
 		USE_AVAHI=yes
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: Detected Avahi; using it for mDNS/DNS-SD" >&5
-$as_echo "$as_me: Detected Avahi; using it for mDNS/DNS-SD" >&6;}
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Detected Avahi; using it for mDNS/DNS-SD" >&5
+printf "%s\n" "$as_me: Detected Avahi; using it for mDNS/DNS-SD" >&6;}
 	elif test x"$HAVE_DNS_SD" = xyes; then
 		MDNS_CFLAGS=$DNS_SD_CFLAGS
 		MDNS_LIBS=$DNS_SD_LIBS
 		USE_DNS_SD=yes
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: Detected Apple's DNSSD; using it for mDNS/DNS-SD" >&5
-$as_echo "$as_me: Detected Apple's DNSSD; using it for mDNS/DNS-SD" >&6;}
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Detected Apple's DNSSD; using it for mDNS/DNS-SD" >&5
+printf "%s\n" "$as_me: Detected Apple's DNSSD; using it for mDNS/DNS-SD" >&6;}
 	else
 		as_fn_error $? "Must have avahi or dns_sd.h development files installed" "$LINENO" 5
 	fi
@@ -14787,8 +15117,8 @@ elif test x"$WITH_MDNS" = xavahi; then
 	MDNS_CFLAGS=$AVAHI_CFLAGS
 	MDNS_LIBS=$AVAHI_LIBS
 	USE_AVAHI=yes
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: Using Avahi for mDNS/DNS-SD" >&5
-$as_echo "$as_me: Using Avahi for mDNS/DNS-SD" >&6;}
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using Avahi for mDNS/DNS-SD" >&5
+printf "%s\n" "$as_me: Using Avahi for mDNS/DNS-SD" >&6;}
 elif test x"$WITH_MDNS" = xdns_sd; then
 	if test x"$HAVE_DNS_SD" = xno; then
 		as_fn_error $? "Apple DNSSD explicitly requested but not found. Install Apple DNSSD, or try --with-mdns=avahi" "$LINENO" 5
@@ -14797,8 +15127,8 @@ elif test x"$WITH_MDNS" = xdns_sd; then
 	MDNS_CFLAGS=$DNS_SD_CFLAGS
 	MDNS_LIBS=$DNS_SD_LIBS
 	USE_DNS_SD=yes
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: Using Apple's DNSSD for mDNS/DNS-SD" >&5
-$as_echo "$as_me: Using Apple's DNSSD for mDNS/DNS-SD" >&6;}
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using Apple's DNSSD for mDNS/DNS-SD" >&5
+printf "%s\n" "$as_me: Using Apple's DNSSD for mDNS/DNS-SD" >&6;}
 fi
 
  if test "x$USE_AVAHI" = "xyes"; then
@@ -14823,7 +15153,8 @@ fi
 
 # Enable silent build when available (Automake 1.11)
 # Check whether --enable-silent-rules was given.
-if test "${enable_silent_rules+set}" = set; then :
+if test ${enable_silent_rules+y}
+then :
   enableval=$enable_silent_rules;
 fi
 
@@ -14833,12 +15164,13 @@ case $enable_silent_rules in # (((
     *) AM_DEFAULT_VERBOSITY=0;;
 esac
 am_make=${MAKE-make}
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
-$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
-if ${am_cv_make_support_nested_variables+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if $as_echo 'TRUE=$(BAR$(V))
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+printf %s "checking whether $am_make supports nested variables... " >&6; }
+if test ${am_cv_make_support_nested_variables+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if printf "%s\n" 'TRUE=$(BAR$(V))
 BAR0=false
 BAR1=true
 V=1
@@ -14850,8 +15182,8 @@ else
   am_cv_make_support_nested_variables=no
 fi
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
-$as_echo "$am_cv_make_support_nested_variables" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
 if test $am_cv_make_support_nested_variables = yes; then
     AM_V='$(V)'
   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
@@ -14864,7 +15196,8 @@ AM_BACKSLASH='\'
 
 am__api_version='1.16'
 
-# Find a good install program.  We prefer a C program (faster),
+
+  # Find a good install program.  We prefer a C program (faster),
 # so one script is as good as another.  But avoid the broken or
 # incompatible versions:
 # SysV /etc/install, /usr/sbin/install
@@ -14878,20 +15211,25 @@ am__api_version='1.16'
 # OS/2's system install, which has a completely different semantic
 # ./install, which can be erroneously created by make from ./install.sh.
 # Reject install programs that cannot install multiple files.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
-$as_echo_n "checking for a BSD-compatible install... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+printf %s "checking for a BSD-compatible install... " >&6; }
 if test -z "$INSTALL"; then
-if ${ac_cv_path_install+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+if test ${ac_cv_path_install+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in #((
-  ./ | .// | /[cC]/* | \
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    # Account for fact that we put trailing slashes in our PATH walk.
+case $as_dir in #((
+  ./ | /[cC]/* | \
   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
   /usr/ucb/* ) ;;
@@ -14901,13 +15239,13 @@ case $as_dir/ in #((
     # by default.
     for ac_prog in ginstall scoinst install; do
       for ac_exec_ext in '' $ac_executable_extensions; do
-	if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+	if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
 	  if test $ac_prog = install &&
-	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
 	    # AIX install.  It has an incompatible calling convention.
 	    :
 	  elif test $ac_prog = install &&
-	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
 	    # program-specific install script used by HP pwplus--don't use.
 	    :
 	  else
@@ -14915,12 +15253,12 @@ case $as_dir/ in #((
 	    echo one > conftest.one
 	    echo two > conftest.two
 	    mkdir conftest.dir
-	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+	    if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
 	      test -s conftest.one && test -s conftest.two &&
 	      test -s conftest.dir/conftest.one &&
 	      test -s conftest.dir/conftest.two
 	    then
-	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+	      ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
 	      break 3
 	    fi
 	  fi
@@ -14936,7 +15274,7 @@ IFS=$as_save_IFS
 rm -rf conftest.one conftest.two conftest.dir
 
 fi
-  if test "${ac_cv_path_install+set}" = set; then
+  if test ${ac_cv_path_install+y}; then
     INSTALL=$ac_cv_path_install
   else
     # As a last resort, use the slow shell script.  Don't cache a
@@ -14946,8 +15284,8 @@ fi
     INSTALL=$ac_install_sh
   fi
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
-$as_echo "$INSTALL" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+printf "%s\n" "$INSTALL" >&6; }
 
 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
 # It thinks the first close brace ends the variable substitution.
@@ -14957,8 +15295,8 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
 
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
-$as_echo_n "checking whether build environment is sane... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+printf %s "checking whether build environment is sane... " >&6; }
 # Reject unsafe characters in $srcdir or the absolute working directory
 # name.  Accept space and tab only in the latter.
 am_lf='
@@ -15012,8 +15350,8 @@ else
    as_fn_error $? "newly created file is older than distributed files!
 Check your system clock" "$LINENO" 5
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
 # If we didn't sleep, we still need to ensure time stamps of config.status and
 # generated files are strictly newer.
 am_sleep_pid=
@@ -15032,23 +15370,19 @@ test "$program_suffix" != NONE &&
 # Double any \ or $.
 # By default was `s,x,x', remove it if useless.
 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
-program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"`
 
-if test x"${MISSING+set}" != xset; then
-  case $am_aux_dir in
-  *\ * | *\	*)
-    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
-  *)
-    MISSING="\${SHELL} $am_aux_dir/missing" ;;
-  esac
+
+  if test x"${MISSING+set}" != xset; then
+  MISSING="\${SHELL} '$am_aux_dir/missing'"
 fi
 # Use eval to expand $SHELL
 if eval "$MISSING --is-lightweight"; then
   am_missing_run="$MISSING "
 else
   am_missing_run=
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
-$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
+printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
 fi
 
 if test x"${install_sh+set}" != xset; then
@@ -15068,11 +15402,12 @@ if test "$cross_compiling" != no; then
   if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
 set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_STRIP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_STRIP+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$STRIP"; then
   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
 else
@@ -15080,11 +15415,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -15095,11 +15434,11 @@ fi
 fi
 STRIP=$ac_cv_prog_STRIP
 if test -n "$STRIP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+printf "%s\n" "$STRIP" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -15108,11 +15447,12 @@ if test -z "$ac_cv_prog_STRIP"; then
   ac_ct_STRIP=$STRIP
   # Extract the first word of "strip", so it can be a program name with args.
 set dummy strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_STRIP+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$ac_ct_STRIP"; then
   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
 else
@@ -15120,11 +15460,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_STRIP="strip"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -15135,11 +15479,11 @@ fi
 fi
 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
 if test -n "$ac_ct_STRIP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
-$as_echo "$ac_ct_STRIP" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+printf "%s\n" "$ac_ct_STRIP" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
   if test "x$ac_ct_STRIP" = x; then
@@ -15147,8 +15491,8 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
     STRIP=$ac_ct_STRIP
@@ -15160,25 +15504,31 @@ fi
 fi
 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
-$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5
+printf %s "checking for a race-free mkdir -p... " >&6; }
 if test -z "$MKDIR_P"; then
-  if ${ac_cv_path_mkdir+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+  if test ${ac_cv_path_mkdir+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_prog in mkdir gmkdir; do
 	 for ac_exec_ext in '' $ac_executable_extensions; do
-	   as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
-	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
-	     'mkdir (GNU coreutils) '* | \
-	     'mkdir (coreutils) '* | \
+	   as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
+	   case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
+	     'mkdir ('*'coreutils) '* | \
+	     'BusyBox '* | \
 	     'mkdir (fileutils) '4.1*)
-	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+	       ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
 	       break 3;;
 	   esac
 	 done
@@ -15189,7 +15539,7 @@ IFS=$as_save_IFS
 fi
 
   test -d ./--version && rmdir ./--version
-  if test "${ac_cv_path_mkdir+set}" = set; then
+  if test ${ac_cv_path_mkdir+y}; then
     MKDIR_P="$ac_cv_path_mkdir -p"
   else
     # As a last resort, use the slow shell script.  Don't cache a
@@ -15199,16 +15549,17 @@ fi
     MKDIR_P="$ac_install_sh -d"
   fi
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
-$as_echo "$MKDIR_P" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+printf "%s\n" "$MKDIR_P" >&6; }
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
 set x ${MAKE-make}
-ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval test \${ac_cv_prog_make_${ac_make}_set+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat >conftest.make <<\_ACEOF
 SHELL = /bin/sh
 all:
@@ -15224,12 +15575,12 @@ esac
 rm -f conftest.make
 fi
 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
   SET_MAKE=
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
   SET_MAKE="MAKE=${MAKE-make}"
 fi
 
@@ -15246,8 +15597,8 @@ DEPDIR="${am__leading_dot}deps"
 
 ac_config_commands="$ac_config_commands depfiles"
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
-$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
+printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; }
 cat > confinc.mk << 'END'
 am__doit:
 	@echo this is the am__doit target >confinc.out
@@ -15283,11 +15634,12 @@ esac
   fi
 done
 rm -f confinc.* confmf.*
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
-$as_echo "${_am_result}" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
+printf "%s\n" "${_am_result}" >&6; }
 
 # Check whether --enable-dependency-tracking was given.
-if test "${enable_dependency_tracking+set}" = set; then :
+if test ${enable_dependency_tracking+y}
+then :
   enableval=$enable_dependency_tracking;
 fi
 
@@ -15327,17 +15679,13 @@ fi
 
 # Define the identity of the package.
  PACKAGE='libdmapsharing'
- VERSION='2.9.41'
+ VERSION='3.9.12'
 
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE "$PACKAGE"
-_ACEOF
+printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
 
 
-cat >>confdefs.h <<_ACEOF
-#define VERSION "$VERSION"
-_ACEOF
+printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h
 
 # Some tools Automake needs.
 
@@ -15379,11 +15727,12 @@ am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
 
 depcc="$CC"   am_compiler_list=
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
-$as_echo_n "checking dependency style of $depcc... " >&6; }
-if ${am_cv_CC_dependencies_compiler_type+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+printf %s "checking dependency style of $depcc... " >&6; }
+if test ${am_cv_CC_dependencies_compiler_type+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
   # We make a subdir and do the tests there.  Otherwise we can end up
   # making bogus files that we don't know about and never remove.  For
@@ -15490,8 +15839,8 @@ else
 fi
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
-$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
 
  if
@@ -15505,6 +15854,20 @@ else
 fi
 
 
+# Variables for tags utilities; see am/tags.am
+if test -z "$CTAGS"; then
+  CTAGS=ctags
+fi
+
+if test -z "$ETAGS"; then
+  ETAGS=etags
+fi
+
+if test -z "$CSCOPE"; then
+  CSCOPE=cscope
+fi
+
+
 
 # POSIX will say in a future version that running "rm -f" with no argument
 # is OK; and we want to be able to make that assumption in our Makefile
@@ -15549,7 +15912,7 @@ END
 fi
 
 
-ac_config_files="$ac_config_files Makefile doc/Makefile libdmapsharing-${API_VERSION}-uninstalled.pc libdmapsharing-${API_VERSION}.pc libdmapsharing/Makefile libdmapsharing/dmap-config.h tests/Makefile m4/Makefile media/Makefile vala/Makefile vala/libdmapsharing-${API_VERSION}-daap/libdmapsharing-${API_VERSION}-uninstalled.files vala/libdmapsharing-${API_VERSION}-dacp/libdmapsharing-${API_VERSION}-uninstalled.files vala/libdmapsharing-${API_VERSION}-dmap/libdmapsharing-${API_VERSION}-uninstalled.files vala/libdmapsharing-${API_VERSION}-dpap/libdmapsharing-${API_VERSION}-uninstalled.files"
+ac_config_files="$ac_config_files Makefile doc/Makefile libdmapsharing-${API_VERSION}-uninstalled.pc libdmapsharing-${API_VERSION}.pc libdmapsharing/Makefile libdmapsharing/dmap-config.h tests/Makefile m4/Makefile media/Makefile vala/Makefile vala/libdmapsharing-${API_VERSION}-uninstalled.files"
 
 
 cat >confcache <<\_ACEOF
@@ -15579,8 +15942,8 @@ _ACEOF
     case $ac_val in #(
     *${as_nl}*)
       case $ac_var in #(
-      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
       esac
       case $ac_var in #(
       _ | IFS | as_nl) ;; #(
@@ -15610,15 +15973,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
      /^ac_cv_env_/b end
      t clear
      :clear
-     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
      t end
      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
      :end' >>confcache
 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
   if test -w "$cache_file"; then
     if test "x$cache_file" != "x/dev/null"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
-$as_echo "$as_me: updating cache $cache_file" >&6;}
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
       if test ! -f "$cache_file" || test -h "$cache_file"; then
 	cat confcache >"$cache_file"
       else
@@ -15632,8 +15995,8 @@ $as_echo "$as_me: updating cache $cache_file" >&6;}
       fi
     fi
   else
-    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
   fi
 fi
 rm -f confcache
@@ -15646,10 +16009,11 @@ DEFS=-DHAVE_CONFIG_H
 
 ac_libobjs=
 ac_ltlibobjs=
+U=
 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
   # 1. Remove the extension, and $U if already installed.
   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
-  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+  ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
   #    will be set to the directory where LIBOBJS objects are built.
   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
@@ -15740,14 +16104,14 @@ if test -z "${USE_DNS_SD_TRUE}" && test -z "${USE_DNS_SD_FALSE}"; then
   as_fn_error $? "conditional \"USE_DNS_SD\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
-$as_echo_n "checking that generated files are newer than configure... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
+printf %s "checking that generated files are newer than configure... " >&6; }
    if test -n "$am_sleep_pid"; then
      # Hide warnings about reused PIDs.
      wait $am_sleep_pid 2>/dev/null
    fi
-   { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
-$as_echo "done" >&6; }
+   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
+printf "%s\n" "done" >&6; }
 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
   as_fn_error $? "conditional \"AMDEP\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -15769,8 +16133,8 @@ fi
 ac_write_fail=0
 ac_clean_files_save=$ac_clean_files
 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
 as_write_fail=0
 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
 #! $SHELL
@@ -15793,14 +16157,16 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
 
 # Be more Bourne compatible
 DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+as_nop=:
+if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
   emulate sh
   NULLCMD=:
   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
   # is contrary to our usage.  Disable this feature.
   alias -g '${1+"$@"}'='"$@"'
   setopt NO_GLOB_SUBST
-else
+else $as_nop
   case `(set -o) 2>/dev/null` in #(
   *posix*) :
     set -o posix ;; #(
@@ -15810,46 +16176,46 @@ esac
 fi
 
 
+
+# Reset variables that may have inherited troublesome values from
+# the environment.
+
+# IFS needs to be set, to space, tab, and newline, in precisely that order.
+# (If _AS_PATH_WALK were called with IFS unset, it would have the
+# side effect of setting IFS to empty, thus disabling word splitting.)
+# Quoting is to prevent editors from complaining about space-tab.
 as_nl='
 '
 export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
-    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='print -r --'
-  as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='printf %s\n'
-  as_echo_n='printf %s'
-else
-  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
-    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
-    as_echo_n='/usr/ucb/echo -n'
-  else
-    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
-    as_echo_n_body='eval
-      arg=$1;
-      case $arg in #(
-      *"$as_nl"*)
-	expr "X$arg" : "X\\(.*\\)$as_nl";
-	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
-      esac;
-      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
-    '
-    export as_echo_n_body
-    as_echo_n='sh -c $as_echo_n_body as_echo'
-  fi
-  export as_echo_body
-  as_echo='sh -c $as_echo_body as_echo'
-fi
+IFS=" ""	$as_nl"
+
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# Ensure predictable behavior from utilities with locale-dependent output.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# We cannot yet rely on "unset" to work, but we need these variables
+# to be unset--not just set to an empty or harmless value--now, to
+# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh).  This construct
+# also avoids known problems related to "unset" and subshell syntax
+# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
+for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
+do eval test \${$as_var+y} \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+
+# Ensure that fds 0, 1, and 2 are open.
+if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
+if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
+if (exec 3>&2)            ; then :; else exec 2>/dev/null; fi
 
 # The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
+if ${PATH_SEPARATOR+false} :; then
   PATH_SEPARATOR=:
   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
@@ -15858,13 +16224,6 @@ if test "${PATH_SEPARATOR+set}" != set; then
 fi
 
 
-# IFS
-# We need space, tab and new line, in precisely that order.  Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" ""	$as_nl"
-
 # Find who we are.  Look in the path if we contain no directory separator.
 as_myself=
 case $0 in #((
@@ -15873,8 +16232,12 @@ case $0 in #((
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    test -r "$as_dir$0" && as_myself=$as_dir$0 && break
   done
 IFS=$as_save_IFS
 
@@ -15886,30 +16249,10 @@ if test "x$as_myself" = x; then
   as_myself=$0
 fi
 if test ! -f "$as_myself"; then
-  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
   exit 1
 fi
 
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there.  '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
-  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
 
 # as_fn_error STATUS ERROR [LINENO LOG_FD]
@@ -15922,13 +16265,14 @@ as_fn_error ()
   as_status=$1; test $as_status -eq 0 && as_status=1
   if test "$4"; then
     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
   fi
-  $as_echo "$as_me: error: $2" >&2
+  printf "%s\n" "$as_me: error: $2" >&2
   as_fn_exit $as_status
 } # as_fn_error
 
 
+
 # as_fn_set_status STATUS
 # -----------------------
 # Set $? to STATUS, without forking.
@@ -15955,18 +16299,20 @@ as_fn_unset ()
   { eval $1=; unset $1;}
 }
 as_unset=as_fn_unset
+
 # as_fn_append VAR VALUE
 # ----------------------
 # Append the text in VALUE to the end of the definition contained in VAR. Take
 # advantage of any shell optimizations that allow amortized linear growth over
 # repeated appends, instead of the typical quadratic growth present in naive
 # implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
+then :
   eval 'as_fn_append ()
   {
     eval $1+=\$2
   }'
-else
+else $as_nop
   as_fn_append ()
   {
     eval $1=\$$1\$2
@@ -15978,12 +16324,13 @@ fi # as_fn_append
 # Perform arithmetic evaluation on the ARGs, and store the result in the
 # global $as_val. Take advantage of shells that can avoid forks. The arguments
 # must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
+then :
   eval 'as_fn_arith ()
   {
     as_val=$(( $* ))
   }'
-else
+else $as_nop
   as_fn_arith ()
   {
     as_val=`expr "$@" || test $? -eq 1`
@@ -16014,7 +16361,7 @@ as_me=`$as_basename -- "$0" ||
 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 	 X"$0" : 'X\(//\)$' \| \
 	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
+printf "%s\n" X/"$0" |
     sed '/^.*\/\([^/][^/]*\)\/*$/{
 	    s//\1/
 	    q
@@ -16036,6 +16383,10 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS
 as_cr_digits='0123456789'
 as_cr_alnum=$as_cr_Letters$as_cr_digits
 
+
+# Determine whether it's possible to make 'echo' print without a newline.
+# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
+# for compatibility with existing Makefiles.
 ECHO_C= ECHO_N= ECHO_T=
 case `echo -n x` in #(((((
 -n*)
@@ -16049,6 +16400,12 @@ case `echo -n x` in #(((((
   ECHO_N='-n';;
 esac
 
+# For backward compatibility with old third-party macros, we provide
+# the shell variables $as_echo and $as_echo_n.  New code should use
+# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
+as_echo='printf %s\n'
+as_echo_n='printf %s'
+
 rm -f conf$$ conf$$.exe conf$$.file
 if test -d conf$$.dir; then
   rm -f conf$$.dir/conf$$.file
@@ -16090,7 +16447,7 @@ as_fn_mkdir_p ()
     as_dirs=
     while :; do
       case $as_dir in #(
-      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
       *) as_qdir=$as_dir;;
       esac
       as_dirs="'$as_qdir' $as_dirs"
@@ -16099,7 +16456,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 	 X"$as_dir" : 'X\(//\)[^/]' \| \
 	 X"$as_dir" : 'X\(//\)$' \| \
 	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
+printf "%s\n" X"$as_dir" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 	    s//\1/
 	    q
@@ -16161,8 +16518,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by libdmapsharing $as_me 2.9.41, which was
-generated by GNU Autoconf 2.69.  Invocation command line was
+This file was extended by libdmapsharing $as_me 3.9.12, which was
+generated by GNU Autoconf 2.71.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -16224,14 +16581,16 @@ $config_commands
 Report bugs to <https://www.flyn.org/projects/libdmapsharing/>."
 
 _ACEOF
+ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
+ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_config='$ac_cs_config_escaped'
 ac_cs_version="\\
-libdmapsharing config.status 2.9.41
-configured by $0, generated by GNU Autoconf 2.69,
+libdmapsharing config.status 3.9.12
+configured by $0, generated by GNU Autoconf 2.71,
   with options \\"\$ac_cs_config\\"
 
-Copyright (C) 2012 Free Software Foundation, Inc.
+Copyright (C) 2021 Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it."
 
@@ -16271,15 +16630,15 @@ do
   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
     ac_cs_recheck=: ;;
   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
-    $as_echo "$ac_cs_version"; exit ;;
+    printf "%s\n" "$ac_cs_version"; exit ;;
   --config | --confi | --conf | --con | --co | --c )
-    $as_echo "$ac_cs_config"; exit ;;
+    printf "%s\n" "$ac_cs_config"; exit ;;
   --debug | --debu | --deb | --de | --d | -d )
     debug=: ;;
   --file | --fil | --fi | --f )
     $ac_shift
     case $ac_optarg in
-    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
     '') as_fn_error $? "missing file argument" ;;
     esac
     as_fn_append CONFIG_FILES " '$ac_optarg'"
@@ -16287,7 +16646,7 @@ do
   --header | --heade | --head | --hea )
     $ac_shift
     case $ac_optarg in
-    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
     esac
     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
     ac_need_defaults=false;;
@@ -16296,7 +16655,7 @@ do
     as_fn_error $? "ambiguous option: \`$1'
 Try \`$0 --help' for more information.";;
   --help | --hel | -h )
-    $as_echo "$ac_cs_usage"; exit ;;
+    printf "%s\n" "$ac_cs_usage"; exit ;;
   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
   | -silent | --silent | --silen | --sile | --sil | --si | --s)
     ac_cs_silent=: ;;
@@ -16324,7 +16683,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 if \$ac_cs_recheck; then
   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
   shift
-  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+  \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
   CONFIG_SHELL='$SHELL'
   export CONFIG_SHELL
   exec "\$@"
@@ -16338,7 +16697,7 @@ exec 5>>config.log
   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
 ## Running $as_me. ##
 _ASBOX
-  $as_echo "$ac_log"
+  printf "%s\n" "$ac_log"
 } >&5
 
 _ACEOF
@@ -16389,6 +16748,7 @@ lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_q
 lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
 reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
 reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
+FILECMD='`$ECHO "$FILECMD" | $SED "$delay_single_quote_subst"`'
 OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
 deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
 file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
@@ -16397,6 +16757,7 @@ want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
 DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
 sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
 AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
+lt_ar_flags='`$ECHO "$lt_ar_flags" | $SED "$delay_single_quote_subst"`'
 AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
 archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
 STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
@@ -16517,6 +16878,7 @@ LN_S \
 lt_SP2NL \
 lt_NL2SP \
 reload_flag \
+FILECMD \
 OBJDUMP \
 deplibs_check_method \
 file_magic_cmd \
@@ -16525,7 +16887,6 @@ want_nocaseglob \
 DLLTOOL \
 sharedlib_from_linklib_cmd \
 AR \
-AR_FLAGS \
 archiver_list_spec \
 STRIP \
 RANLIB \
@@ -16652,10 +17013,7 @@ do
     "m4/Makefile") CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;;
     "media/Makefile") CONFIG_FILES="$CONFIG_FILES media/Makefile" ;;
     "vala/Makefile") CONFIG_FILES="$CONFIG_FILES vala/Makefile" ;;
-    "vala/libdmapsharing-${API_VERSION}-daap/libdmapsharing-${API_VERSION}-uninstalled.files") CONFIG_FILES="$CONFIG_FILES vala/libdmapsharing-${API_VERSION}-daap/libdmapsharing-${API_VERSION}-uninstalled.files" ;;
-    "vala/libdmapsharing-${API_VERSION}-dacp/libdmapsharing-${API_VERSION}-uninstalled.files") CONFIG_FILES="$CONFIG_FILES vala/libdmapsharing-${API_VERSION}-dacp/libdmapsharing-${API_VERSION}-uninstalled.files" ;;
-    "vala/libdmapsharing-${API_VERSION}-dmap/libdmapsharing-${API_VERSION}-uninstalled.files") CONFIG_FILES="$CONFIG_FILES vala/libdmapsharing-${API_VERSION}-dmap/libdmapsharing-${API_VERSION}-uninstalled.files" ;;
-    "vala/libdmapsharing-${API_VERSION}-dpap/libdmapsharing-${API_VERSION}-uninstalled.files") CONFIG_FILES="$CONFIG_FILES vala/libdmapsharing-${API_VERSION}-dpap/libdmapsharing-${API_VERSION}-uninstalled.files" ;;
+    "vala/libdmapsharing-${API_VERSION}-uninstalled.files") CONFIG_FILES="$CONFIG_FILES vala/libdmapsharing-${API_VERSION}-uninstalled.files" ;;
 
   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
@@ -16667,9 +17025,9 @@ done
 # We use the long form for the default assignment because of an extremely
 # bizarre bug on SunOS 4.1.3.
 if $ac_need_defaults; then
-  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
-  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
-  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+  test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
+  test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
+  test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
 fi
 
 # Have a temporary directory for convenience.  Make it in the build tree
@@ -17005,7 +17363,7 @@ do
 	   esac ||
 	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
       esac
-      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+      case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
       as_fn_append ac_file_inputs " '$ac_f'"
     done
 
@@ -17013,17 +17371,17 @@ do
     # use $as_me), people would be surprised to read:
     #    /* config.h.  Generated by config.status.  */
     configure_input='Generated from '`
-	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+	  printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
 	`' by configure.'
     if test x"$ac_file" != x-; then
       configure_input="$ac_file.  $configure_input"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
-$as_echo "$as_me: creating $ac_file" >&6;}
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+printf "%s\n" "$as_me: creating $ac_file" >&6;}
     fi
     # Neutralize special characters interpreted by sed in replacement strings.
     case $configure_input in #(
     *\&* | *\|* | *\\* )
-       ac_sed_conf_input=`$as_echo "$configure_input" |
+       ac_sed_conf_input=`printf "%s\n" "$configure_input" |
        sed 's/[\\\\&|]/\\\\&/g'`;; #(
     *) ac_sed_conf_input=$configure_input;;
     esac
@@ -17040,7 +17398,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 	 X"$ac_file" : 'X\(//\)[^/]' \| \
 	 X"$ac_file" : 'X\(//\)$' \| \
 	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$ac_file" |
+printf "%s\n" X"$ac_file" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 	    s//\1/
 	    q
@@ -17064,9 +17422,9 @@ $as_echo X"$ac_file" |
 case "$ac_dir" in
 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
 *)
-  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
   # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
   case $ac_top_builddir_sub in
   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -17128,8 +17486,8 @@ ac_sed_dataroot='
 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
 *datarootdir*) ac_datarootdir_seen=yes;;
 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
   ac_datarootdir_hack='
@@ -17173,9 +17531,9 @@ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
   { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
       "$ac_tmp/out"`; test -z "$ac_out"; } &&
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
 which seems to be undefined.  Please make sure it is defined" >&5
-$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
 which seems to be undefined.  Please make sure it is defined" >&2;}
 
   rm -f "$ac_tmp/stdin"
@@ -17191,20 +17549,20 @@ which seems to be undefined.  Please make sure it is defined" >&2;}
   #
   if test x"$ac_file" != x-; then
     {
-      $as_echo "/* $configure_input  */" \
+      printf "%s\n" "/* $configure_input  */" >&1 \
       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
     } >"$ac_tmp/config.h" \
       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
-$as_echo "$as_me: $ac_file is unchanged" >&6;}
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
     else
       rm -f "$ac_file"
       mv "$ac_tmp/config.h" "$ac_file" \
 	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
     fi
   else
-    $as_echo "/* $configure_input  */" \
+    printf "%s\n" "/* $configure_input  */" >&1 \
       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
       || as_fn_error $? "could not create -" "$LINENO" 5
   fi
@@ -17224,7 +17582,7 @@ $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 	 X"$_am_arg" : 'X\(//\)[^/]' \| \
 	 X"$_am_arg" : 'X\(//\)$' \| \
 	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$_am_arg" |
+printf "%s\n" X"$_am_arg" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 	    s//\1/
 	    q
@@ -17244,8 +17602,8 @@ $as_echo X"$_am_arg" |
 	  s/.*/./; q'`/stamp-h$_am_stamp_count
  ;;
 
-  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
-$as_echo "$as_me: executing $ac_file commands" >&6;}
+  :C)  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
  ;;
   esac
 
@@ -17386,6 +17744,9 @@ to_host_file_cmd=$lt_cv_to_host_file_cmd
 # convert \$build files to toolchain format.
 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
 
+# A file(cmd) program that detects file types.
+FILECMD=$lt_FILECMD
+
 # An object symbol dumper.
 OBJDUMP=$lt_OBJDUMP
 
@@ -17410,8 +17771,11 @@ sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
 # The archiver.
 AR=$lt_AR
 
+# Flags to create an archive (by configure).
+lt_ar_flags=$lt_ar_flags
+
 # Flags to create an archive.
-AR_FLAGS=$lt_AR_FLAGS
+AR_FLAGS=\${ARFLAGS-"\$lt_ar_flags"}
 
 # How to feed a file listing to the archiver.
 archiver_list_spec=$lt_archiver_list_spec
@@ -17779,6 +18143,7 @@ _LT_EOF
   esac
 
 
+
 ltmain=$ac_aux_dir/ltmain.sh
 
 
@@ -17786,7 +18151,7 @@ ltmain=$ac_aux_dir/ltmain.sh
   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
   # text mode, it properly converts lines to CR/LF.  This bash problem
   # is reportedly fixed, but why not run on old versions too?
-  sed '$q' "$ltmain" >> "$cfgfile" \
+  $SED '$q' "$ltmain" >> "$cfgfile" \
      || (rm -f "$cfgfile"; exit 1)
 
    mv -f "$cfgfile" "$ofile" ||
@@ -17814,7 +18179,7 @@ esac
   for am_mf
   do
     # Strip MF so we end up with the name of the file.
-    am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'`
+    am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'`
     # Check whether this is an Automake generated Makefile which includes
     # dependency-tracking related rules and includes.
     # Grep'ing the whole file directly is not great: AIX grep has a line
@@ -17826,7 +18191,7 @@ $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 	 X"$am_mf" : 'X\(//\)[^/]' \| \
 	 X"$am_mf" : 'X\(//\)$' \| \
 	 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$am_mf" |
+printf "%s\n" X"$am_mf" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 	    s//\1/
 	    q
@@ -17848,7 +18213,7 @@ $as_echo X"$am_mf" |
 $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
 	 X"$am_mf" : 'X\(//\)$' \| \
 	 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$am_mf" |
+printf "%s\n" X/"$am_mf" |
     sed '/^.*\/\([^/][^/]*\)\/*$/{
 	    s//\1/
 	    q
@@ -17873,10 +18238,12 @@ $as_echo X/"$am_mf" |
    (exit $ac_status); } || am_rc=$?
   done
   if test $am_rc -ne 0; then
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "Something went wrong bootstrapping makefile fragments
-    for automatic dependency tracking.  Try re-running configure with the
+    for automatic dependency tracking.  If GNU make was not used, consider
+    re-running the configure script with MAKE=\"gmake\" (or whatever is
+    necessary).  You can also try re-running configure with the
     '--disable-dependency-tracking' option to at least be able to build
     the package (albeit without support for automatic dependency tracking).
 See \`config.log' for more details" "$LINENO" 5; }
@@ -17922,7 +18289,8 @@ if test "$no_create" != yes; then
   $ac_cs_success || as_fn_exit 1
 fi
 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
-$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
 fi
 
+
diff --git a/configure.ac b/configure.ac
index b3e6005..5d2acf7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,24 +1,25 @@
-m4_define([libdmapsharing_major], [2])
+m4_define([libdmapsharing_major], [3])
 m4_define([libdmapsharing_minor], [9])
-m4_define([libdmapsharing_micro], [41])
+m4_define([libdmapsharing_micro], [12])
 m4_define([libdmapsharing_version], [libdmapsharing_major.libdmapsharing_minor.libdmapsharing_micro])
 
-AC_INIT(libdmapsharing, [libdmapsharing_version], [https://www.flyn.org/projects/libdmapsharing/])
+AC_INIT([libdmapsharing],[libdmapsharing_version],[https://www.flyn.org/projects/libdmapsharing/])
 
-API_VERSION=3.0
+API_VERSION=4.0
 AC_SUBST(API_VERSION)
 
 SO_VERSION=m4_eval(libdmapsharing_minor+libdmapsharing_major):m4_eval(libdmapsharing_micro):m4_eval(libdmapsharing_minor)
 AC_SUBST(SO_VERSION)
 
-AM_CONFIG_HEADER(config.h)
+AC_CONFIG_HEADERS(config.h)
 AC_CONFIG_MACRO_DIRS([m4])
 
-AC_HEADER_STDC
 AC_PROG_CC
 AC_PROG_CPP
-AC_PROG_LIBTOOL
-AM_PROG_CC_STDC
+LT_INIT
+AC_PROG_CC
+
+AC_SEARCH_LIBS([floorf], [m])
 
 GOBJECT_INTROSPECTION_CHECK([1.30.0])
 GTK_DOC_CHECK(1.0)
@@ -28,18 +29,18 @@ AC_PATH_PROG(PEDANSEE, pedansee)
 AM_CONDITIONAL(HAVE_PEDANSEE, test -n "$PEDANSEE")
 
 # Select debugging or measuring code coverage?
-AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug],[enable debugging build])])
-AC_ARG_ENABLE(coverage, [AC_HELP_STRING([--enable-coverage],[enable code-coverage build])])
+AC_ARG_ENABLE(debug, [AS_HELP_STRING([--enable-debug],[enable debugging build])])
+AC_ARG_ENABLE(coverage, [AS_HELP_STRING([--enable-coverage],[enable code-coverage build])])
 if test "x$enable_debug" = "xyes"; then
-	CFLAGS="$CFLAGS -g"
+	CFLAGS="$CFLAGS -O0 -g"
 elif test "x$enable_coverage" = "xyes"; then
-	CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
+	CFLAGS="$CFLAGS -O0 -g -fprofile-arcs -ftest-coverage"
 else
 	CFLAGS="$CFLAGS -O2"
 fi
 
 # Select more compiler warnings?
-AC_ARG_ENABLE(more-warnings, [AC_HELP_STRING([--enable-more-warnings],[maximum compiler warnings])])
+AC_ARG_ENABLE(more-warnings, [AS_HELP_STRING([--enable-more-warnings],[maximum compiler warnings])])
 if test "$GCC" = "yes" -a x$enable_more_warnings = "xyes"; then
 	WARN_CFLAGS="\
 		-Wcomment -Wformat -Wnonnull -Wimplicit-int -Wimplicit \
@@ -69,7 +70,7 @@ fi
 AC_SUBST(WARN_CFLAGS)
 
 # Build test code?
-AC_ARG_ENABLE(tests, [AC_HELP_STRING([--disable-tests],[do not build tests])], tests=$enableval, tests=yes)
+AC_ARG_ENABLE(tests, [AS_HELP_STRING([--disable-tests],[do not build tests])], tests=$enableval, tests=yes)
 if test x$tests = xyes; then
 	PKG_CHECK_MODULES([CHECK], [check >= 0.9.4],have_check=yes,have_check=no)
 	AM_CONDITIONAL(HAVE_CHECK, test x"$have_check" = "xyes")
@@ -96,13 +97,13 @@ if test "x$HAVE_PKGCONFIG" = "xno"; then
 fi
 
 # Have glib?
-PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.40, HAVE_GLIB=yes,HAVE_GLIB=no)
+PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.66, HAVE_GLIB=yes,HAVE_GLIB=no)
 if test "x$HAVE_GLIB" = "xno"; then
 	AC_MSG_ERROR([Must have glib-2.0 installed])
 fi
 
-AC_DEFINE(GLIB_VERSION_MIN_REQUIRED, GLIB_VERSION_2_40, [minimum glib version])
-AC_DEFINE(GLIB_VERSION_MAX_ALLOWED, GLIB_VERSION_2_40, [maximum glib version])
+AC_DEFINE(GLIB_VERSION_MIN_REQUIRED, GLIB_VERSION_2_66, [minimum glib version])
+AC_DEFINE(GLIB_VERSION_MAX_ALLOWED, GLIB_VERSION_2_66, [maximum glib version])
 
 AC_SUBST(GLIB_CFLAGS)
 AC_SUBST(GLIB_LIBS)
@@ -139,7 +140,7 @@ AC_SUBST(GDKPIXBUF_CFLAGS)
 AC_SUBST(GDKPIXBUF_LIBS)
 
 # Have libsoup?
-PKG_CHECK_MODULES(SOUP, libsoup-2.4 >= 2.48.0, HAVE_LIBSOUP=yes, HAVE_LIBSOUP=no)
+PKG_CHECK_MODULES(SOUP, libsoup-3.0, HAVE_LIBSOUP=yes, HAVE_LIBSOUP=no)
 if test x"$HAVE_LIBSOUP" = "xno"; then
 	AC_MSG_ERROR([Must have libsoup installed])
 fi
@@ -213,8 +214,7 @@ AC_SUBST(DMAP_HAVE_UNALIGNED_ACCESS_DEFINE)
 # Select mDNS library.
 AC_ARG_WITH(
 	mdns,
-	AC_HELP_STRING([--with-mdns=auto|avahi|dns_sd],
-	[Select the mDNS/DNS-SD implementation to use (default auto)]),
+	AS_HELP_STRING([--with-mdns=auto|avahi|dns_sd],[Select the mDNS/DNS-SD implementation to use (default auto)]),
 	WITH_MDNS=$withval,
 	WITH_MDNS=auto
 )
@@ -299,10 +299,7 @@ AC_CONFIG_FILES([
 	m4/Makefile
 	media/Makefile
 	vala/Makefile
-	vala/libdmapsharing-${API_VERSION}-daap/libdmapsharing-${API_VERSION}-uninstalled.files
-	vala/libdmapsharing-${API_VERSION}-dacp/libdmapsharing-${API_VERSION}-uninstalled.files
-	vala/libdmapsharing-${API_VERSION}-dmap/libdmapsharing-${API_VERSION}-uninstalled.files
-	vala/libdmapsharing-${API_VERSION}-dpap/libdmapsharing-${API_VERSION}-uninstalled.files
+	vala/libdmapsharing-${API_VERSION}-uninstalled.files
 ])
 
 AC_OUTPUT
diff --git a/debian/changelog b/debian/changelog
index 7bf739f..7108f81 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,12 +1,13 @@
-libdmapsharing (2.9.41-4) UNRELEASED; urgency=medium
+libdmapsharing (3.9.12-1) UNRELEASED; urgency=medium
 
   [ Debian Janitor ]
   * Add debian/upstream/metadata
   * Use secure URI in Homepage field
   * Avoid explicitly specifying -Wl,--as-needed linker flag
   * Update standards version to 4.6.2, no changes needed
+  * New upstream release.
 
- -- Jeremy Bícha <jbicha@ubuntu.com>  Mon, 15 May 2023 18:28:19 -0400
+ -- Jeremy Bícha <jbicha@ubuntu.com>  Wed, 31 May 2023 20:37:00 -0000
 
 libdmapsharing (2.9.41-3) unstable; urgency=medium
 
diff --git a/depcomp b/depcomp
index 65cbf70..715e343 100755
--- a/depcomp
+++ b/depcomp
@@ -3,7 +3,7 @@
 
 scriptversion=2018-03-07.03; # UTC
 
-# Copyright (C) 1999-2018 Free Software Foundation, Inc.
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 3883932..bf53282 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,100 +1,49 @@
-## Process this file with automake to produce Makefile.in
-
-# We require automake 1.6 at least.
 AUTOMAKE_OPTIONS = 1.6
 
-# This is a blank Makefile.am for using gtk-doc.
-# Copy this to your project's API docs directory and modify the variables to
-# suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples
-# of using the various options.
-
-# The name of the module, e.g. 'glib'.
-DOC_MODULE=libdmapsharing-3.0
-
-# Uncomment for versioned docs and specify the version of the module, e.g. '2'.
-#DOC_MODULE_VERSION=2
-
-# The top-level SGML file. You can change this if you want to.
-DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.xml
-
-# The directory containing the source code. Relative to $(srcdir).
-# gtk-doc will search all .c & .h files beneath here for inline comments
-# documenting the functions and macros.
-# e.g. DOC_SOURCE_DIR=../../../gtk
-DOC_SOURCE_DIR=../libdmapsharing
-
-# Extra options to pass to gtkdoc-scangobj. Not normally needed.
-SCANGOBJ_OPTIONS=
-
-# Extra options to supply to gtkdoc-scan.
-# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED"
-SCAN_OPTIONS=
+DOC_MODULE = libdmapsharing-4.0
 
-# Extra options to supply to gtkdoc-mkdb.
-# e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml
-MKDB_OPTIONS=--sgml-mode --output-format=xml
+DOC_MAIN_SGML_FILE = $(DOC_MODULE)-docs.xml
 
-# Extra options to supply to gtkdoc-mktmpl
-# e.g. MKTMPL_OPTIONS=--only-section-tmpl
-MKTMPL_OPTIONS=
+DOC_SOURCE_DIR = $(top_srcdir)/libdmapsharing
 
-# Extra options to supply to gtkdoc-mkhtml
-MKHTML_OPTIONS=
+SCAN_OPTIONS =
 
-# Extra options to supply to gtkdoc-fixref. Not normally needed.
-# e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html
-FIXXREF_OPTIONS=
+MKDB_OPTIONS = --sgml-mode --output-format=xml
 
-# Used for dependencies. The docs will be rebuilt if any of these change.
-# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h
-# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c
-HFILE_GLOB=
-CFILE_GLOB=
+HFILE_GLOB =
 
-# Extra header to include when scanning, which are not under DOC_SOURCE_DIR
-# e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h
-EXTRA_HFILES=
+CFILE_GLOB =
 
-# Header files to ignore when scanning. Use base file name, no paths
-# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h
-IGNORE_HFILES= \
+IGNORE_HFILES = \
 	dmap-config.h \
-	dmap-md5.h \
+	dmap-connection-private.h \
+	dmap-gst-mp3-input-stream.h \
+	dmap-gst-qt-input-stream.h \
+	dmap-gst-wav-input-stream.h \
+	dmap.h \
 	dmap-mdns-avahi.h \
-	dmap-mdns-publisher.h \
+	dmap-private-utils.h \
+	dmap-share-private.h \
 	dmap-structure.h \
-	dmap-utils.h \
-	g-gst-input-stream.h \
-	g-gst-mp3-input-stream.h \
-	g-gst-wav-input-stream.h \
-	gst-util.h
-
-# Images to copy into HTML directory.
-# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
-HTML_IMAGES=
-
-# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
-# e.g. content_files=running.sgml building.sgml changes-2.0.sgml
-content_files=
-
-# SGML files where gtk-doc abbrevations (#GtkWidget) are expanded
-# These files must be listed here *and* in content_files
-# e.g. expand_content_files=running.sgml
-expand_content_files=
-
-# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library.
-# Only needed if you are using gtkdoc-scangobj to dynamically query widget
-# signals and properties.
-# e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS)
-# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
-GTKDOC_CFLAGS= \
+	gst-util.h \
+	test-dmap-av-record-factory.h \
+	test-dmap-av-record.h \
+	test-dmap-container-db.h \
+	test-dmap-container-record.h \
+	test-dmap-db.h \
+	test-dmap-image-record-factory.h \
+	test-dmap-image-record.h
+
+HTML_IMAGES =
+
+GTKDOC_CFLAGS = \
 	-I$(top_srcdir) \
 	$(SOUP_CFLAGS) \
 	$(GSTREAMERAPP_CFLAGS) \
 	$(MDNS_CFLAGS)
 
-GTKDOC_LIBS= \
-	$(top_builddir)/libdmapsharing/libdmapsharing-3.0.la \
+GTKDOC_LIBS = \
+	$(top_builddir)/libdmapsharing/libdmapsharing-4.0.la \
 	$(CHECK_LIBS) \
 	$(GLIB_LIBS) \
 	$(GTHREAD_LIBS) \
@@ -103,25 +52,9 @@ GTKDOC_LIBS= \
 	$(GSTREAMERAPP_LIBS) \
 	$(SOUP_LIBS)
 
-# This includes the standard gtk-doc make rules, copied by gtkdocize.
 include $(top_srcdir)/gtk-doc.make
 
-# Other files to distribute
-# e.g. EXTRA_DIST += version.xml.in
-EXTRA_DIST +=
-
-# Files not to distribute
-# for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types
-# for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt
 DISTCLEANFILES = \
-	libdmapsharing-3.0-overrides.txt \
-	libdmapsharing-3.0-sections.txt \
-	libdmapsharing-3.0.types
-
-# Comment this out if you want your docs-status tested during 'make check'
-if ENABLE_GTK_DOC
-#TESTS_ENVIRONMENT = cd $(srcsrc)
-#TESTS = $(GTKDOC_CHECK)
-endif
-
--include $(top_srcdir)/git.mk
+	libdmapsharing-4.0-overrides.txt \
+	libdmapsharing-4.0-sections.txt \
+	libdmapsharing-4.0.types
diff --git a/doc/Makefile.in b/doc/Makefile.in
index bf0dd29..3d91ff9 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -165,6 +165,8 @@ CHECK_CFLAGS = @CHECK_CFLAGS@
 CHECK_LIBS = @CHECK_LIBS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
@@ -176,8 +178,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@
 GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@
 GEE_CFLAGS = @GEE_CFLAGS@
@@ -304,6 +308,7 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -312,95 +317,35 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-
-# We require automake 1.6 at least.
 AUTOMAKE_OPTIONS = 1.6
-
-# This is a blank Makefile.am for using gtk-doc.
-# Copy this to your project's API docs directory and modify the variables to
-# suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples
-# of using the various options.
-
-# The name of the module, e.g. 'glib'.
-DOC_MODULE = libdmapsharing-3.0
-
-# Uncomment for versioned docs and specify the version of the module, e.g. '2'.
-#DOC_MODULE_VERSION=2
-
-# The top-level SGML file. You can change this if you want to.
+DOC_MODULE = libdmapsharing-4.0
 DOC_MAIN_SGML_FILE = $(DOC_MODULE)-docs.xml
-
-# The directory containing the source code. Relative to $(srcdir).
-# gtk-doc will search all .c & .h files beneath here for inline comments
-# documenting the functions and macros.
-# e.g. DOC_SOURCE_DIR=../../../gtk
-DOC_SOURCE_DIR = ../libdmapsharing
-
-# Extra options to pass to gtkdoc-scangobj. Not normally needed.
-SCANGOBJ_OPTIONS = 
-
-# Extra options to supply to gtkdoc-scan.
-# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED"
+DOC_SOURCE_DIR = $(top_srcdir)/libdmapsharing
 SCAN_OPTIONS = 
-
-# Extra options to supply to gtkdoc-mkdb.
-# e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml
 MKDB_OPTIONS = --sgml-mode --output-format=xml
-
-# Extra options to supply to gtkdoc-mktmpl
-# e.g. MKTMPL_OPTIONS=--only-section-tmpl
-MKTMPL_OPTIONS = 
-
-# Extra options to supply to gtkdoc-mkhtml
-MKHTML_OPTIONS = 
-
-# Extra options to supply to gtkdoc-fixref. Not normally needed.
-# e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html
-FIXXREF_OPTIONS = 
-
-# Used for dependencies. The docs will be rebuilt if any of these change.
-# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h
-# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c
 HFILE_GLOB = 
 CFILE_GLOB = 
-
-# Extra header to include when scanning, which are not under DOC_SOURCE_DIR
-# e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h
-EXTRA_HFILES = 
-
-# Header files to ignore when scanning. Use base file name, no paths
-# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h
 IGNORE_HFILES = \
 	dmap-config.h \
-	dmap-md5.h \
+	dmap-connection-private.h \
+	dmap-gst-mp3-input-stream.h \
+	dmap-gst-qt-input-stream.h \
+	dmap-gst-wav-input-stream.h \
+	dmap.h \
 	dmap-mdns-avahi.h \
-	dmap-mdns-publisher.h \
+	dmap-private-utils.h \
+	dmap-share-private.h \
 	dmap-structure.h \
-	dmap-utils.h \
-	g-gst-input-stream.h \
-	g-gst-mp3-input-stream.h \
-	g-gst-wav-input-stream.h \
-	gst-util.h
+	gst-util.h \
+	test-dmap-av-record-factory.h \
+	test-dmap-av-record.h \
+	test-dmap-container-db.h \
+	test-dmap-container-record.h \
+	test-dmap-db.h \
+	test-dmap-image-record-factory.h \
+	test-dmap-image-record.h
 
-
-# Images to copy into HTML directory.
-# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
 HTML_IMAGES = 
-
-# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
-# e.g. content_files=running.sgml building.sgml changes-2.0.sgml
-content_files = 
-
-# SGML files where gtk-doc abbrevations (#GtkWidget) are expanded
-# These files must be listed here *and* in content_files
-# e.g. expand_content_files=running.sgml
-expand_content_files = 
-
-# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library.
-# Only needed if you are using gtkdoc-scangobj to dynamically query widget
-# signals and properties.
-# e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS)
-# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
 GTKDOC_CFLAGS = \
 	-I$(top_srcdir) \
 	$(SOUP_CFLAGS) \
@@ -408,7 +353,7 @@ GTKDOC_CFLAGS = \
 	$(MDNS_CFLAGS)
 
 GTKDOC_LIBS = \
-	$(top_builddir)/libdmapsharing/libdmapsharing-3.0.la \
+	$(top_builddir)/libdmapsharing/libdmapsharing-4.0.la \
 	$(CHECK_LIBS) \
 	$(GLIB_LIBS) \
 	$(GTHREAD_LIBS) \
@@ -438,17 +383,16 @@ SETUP_FILES = \
 	$(DOC_MODULE)-sections.txt	\
 	$(DOC_MODULE)-overrides.txt
 
+EXTRA_DIST = \
+	$(HTML_IMAGES)			\
+	$(SETUP_FILES)
 
-# This includes the standard gtk-doc make rules, copied by gtkdocize.
-
-# Other files to distribute
-# e.g. EXTRA_DIST += version.xml.in
-EXTRA_DIST = $(HTML_IMAGES) $(SETUP_FILES)
 DOC_STAMPS = setup-build.stamp scan-build.stamp sgml-build.stamp \
 	html-build.stamp pdf-build.stamp \
 	sgml.stamp html.stamp pdf.stamp
 
 SCANOBJ_FILES = \
+	$(DOC_MODULE).actions	 \
 	$(DOC_MODULE).args 	 \
 	$(DOC_MODULE).hierarchy  \
 	$(DOC_MODULE).interfaces \
@@ -496,14 +440,10 @@ GTK_DOC_V_XREF_0 = @echo "  DOC   Fixing cross-references";
 GTK_DOC_V_PDF = $(GTK_DOC_V_PDF_@AM_V@)
 GTK_DOC_V_PDF_ = $(GTK_DOC_V_PDF_@AM_DEFAULT_V@)
 GTK_DOC_V_PDF_0 = @echo "  DOC   Building PDF";
-
-# Files not to distribute
-# for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types
-# for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt
 DISTCLEANFILES = \
-	libdmapsharing-3.0-overrides.txt \
-	libdmapsharing-3.0-sections.txt \
-	libdmapsharing-3.0.types
+	libdmapsharing-4.0-overrides.txt \
+	libdmapsharing-4.0-sections.txt \
+	libdmapsharing-4.0.types
 
 all: all-am
 
@@ -550,7 +490,6 @@ ctags CTAGS:
 
 cscope cscopelist:
 
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
@@ -906,12 +845,6 @@ dist-hook: dist-check-gtkdoc all-gtk-doc dist-hook-local
 
 .PHONY : dist-hook-local docs
 
-# Comment this out if you want your docs-status tested during 'make check'
-#TESTS_ENVIRONMENT = cd $(srcsrc)
-#TESTS = $(GTKDOC_CHECK)
-
--include $(top_srcdir)/git.mk
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/doc/html/DAAPRecord.html b/doc/html/DAAPRecord.html
deleted file mode 100644
index 0c33738..0000000
--- a/doc/html/DAAPRecord.html
+++ /dev/null
@@ -1,506 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>DAAPRecord: libdmapsharing-3.0 Reference Manual</title>
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
-<link rel="home" href="index.html" title="libdmapsharing-3.0 Reference Manual">
-<link rel="up" href="ch01.html" title="Libdmapsharing overview">
-<link rel="prev" href="libdmapsharing-3.0-daap-connection.html" title="daap-connection">
-<link rel="next" href="libdmapsharing-3.0-daap-share.html" title="daap-share">
-<meta name="generator" content="GTK-Doc V1.32 (XML mode)">
-<link rel="stylesheet" href="style.css" type="text/css">
-</head>
-<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
-<td width="100%" align="left" class="shortcuts">
-<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
-                  <a href="#DAAPRecord.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
-                  <a href="#DAAPRecord.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span> 
-                  <a href="#DAAPRecord.properties" class="shortcut">Properties</a></span>
-</td>
-<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
-<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
-<td><a accesskey="p" href="libdmapsharing-3.0-daap-connection.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="libdmapsharing-3.0-daap-share.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
-</tr></table>
-<div class="refentry">
-<a name="DAAPRecord"></a><div class="titlepage"></div>
-<div class="refnamediv"><table width="100%"><tr>
-<td valign="top">
-<h2><span class="refentrytitle"><a name="DAAPRecord.top_of_page"></a>DAAPRecord</span></h2>
-<p>DAAPRecord</p>
-</td>
-<td class="gallery_image" valign="top" align="right"></td>
-</tr></table></div>
-<div class="refsect1">
-<a name="DAAPRecord.functions"></a><h2>Functions</h2>
-<div class="informaltable"><table class="informaltable" width="100%" border="0">
-<colgroup>
-<col width="150px" class="functions_proto_type">
-<col class="functions_proto_name">
-</colgroup>
-<tbody>
-<tr>
-<td class="function_type">
-<span class="returnvalue">gboolean</span>
-</td>
-<td class="function_name">
-<a class="link" href="DAAPRecord.html#daap-record-itunes-compat" title="daap_record_itunes_compat ()">daap_record_itunes_compat</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">GInputStream</span> *
-</td>
-<td class="function_name">
-<a class="link" href="DAAPRecord.html#daap-record-read" title="daap_record_read ()">daap_record_read</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">gint</span>
-</td>
-<td class="function_name">
-<a class="link" href="DAAPRecord.html#daap-record-cmp-by-album" title="daap_record_cmp_by_album ()">daap_record_cmp_by_album</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-</tbody>
-</table></div>
-</div>
-<div class="refsect1">
-<a name="DAAPRecord.properties"></a><h2>Properties</h2>
-<div class="informaltable"><table class="informaltable" border="0">
-<colgroup>
-<col width="150px" class="properties_type">
-<col width="300px" class="properties_name">
-<col width="200px" class="properties_flags">
-</colgroup>
-<tbody>
-<tr>
-<td class="property_type"><span class="type">gint</span></td>
-<td class="property_name"><a class="link" href="DAAPRecord.html#DAAPRecord--bitrate" title="The “bitrate” property">bitrate</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type"><span class="type">gint</span></td>
-<td class="property_name"><a class="link" href="DAAPRecord.html#DAAPRecord--disc" title="The “disc” property">disc</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type"><span class="type">gint</span></td>
-<td class="property_name"><a class="link" href="DAAPRecord.html#DAAPRecord--duration" title="The “duration” property">duration</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type"><span class="type">guint64</span></td>
-<td class="property_name"><a class="link" href="DAAPRecord.html#DAAPRecord--filesize" title="The “filesize” property">filesize</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type"><span class="type">gint</span></td>
-<td class="property_name"><a class="link" href="DAAPRecord.html#DAAPRecord--firstseen" title="The “firstseen” property">firstseen</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type">
-<span class="type">gchar</span> *</td>
-<td class="property_name"><a class="link" href="DAAPRecord.html#DAAPRecord--format" title="The “format” property">format</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type"><span class="type">gboolean</span></td>
-<td class="property_name"><a class="link" href="DAAPRecord.html#DAAPRecord--has-video" title="The “has-video” property">has-video</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type"><span class="type">gpointer</span></td>
-<td class="property_name"><a class="link" href="DAAPRecord.html#DAAPRecord--hash" title="The “hash” property">hash</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type">
-<span class="type">gchar</span> *</td>
-<td class="property_name"><a class="link" href="DAAPRecord.html#DAAPRecord--location" title="The “location” property">location</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type"><a class="link" href="DMAPRecord.html#DMAPMediaKind" title="enum DMAPMediaKind"><span class="type">DMAPMediaKind</span></a></td>
-<td class="property_name"><a class="link" href="DAAPRecord.html#DAAPRecord--mediakind" title="The “mediakind” property">mediakind</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type"><span class="type">gint</span></td>
-<td class="property_name"><a class="link" href="DAAPRecord.html#DAAPRecord--mtime" title="The “mtime” property">mtime</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type"><span class="type">gint</span></td>
-<td class="property_name"><a class="link" href="DAAPRecord.html#DAAPRecord--rating" title="The “rating” property">rating</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type">
-<span class="type">gchar</span> *</td>
-<td class="property_name"><a class="link" href="DAAPRecord.html#DAAPRecord--songalbum" title="The “songalbum” property">songalbum</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type"><span class="type">gint64</span></td>
-<td class="property_name"><a class="link" href="DAAPRecord.html#DAAPRecord--songalbumid" title="The “songalbumid” property">songalbumid</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type">
-<span class="type">gchar</span> *</td>
-<td class="property_name"><a class="link" href="DAAPRecord.html#DAAPRecord--songartist" title="The “songartist” property">songartist</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type">
-<span class="type">gchar</span> *</td>
-<td class="property_name"><a class="link" href="DAAPRecord.html#DAAPRecord--songgenre" title="The “songgenre” property">songgenre</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type">
-<span class="type">gchar</span> *</td>
-<td class="property_name"><a class="link" href="DAAPRecord.html#DAAPRecord--sort-album" title="The “sort-album” property">sort-album</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type">
-<span class="type">gchar</span> *</td>
-<td class="property_name"><a class="link" href="DAAPRecord.html#DAAPRecord--sort-artist" title="The “sort-artist” property">sort-artist</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type">
-<span class="type">gchar</span> *</td>
-<td class="property_name"><a class="link" href="DAAPRecord.html#DAAPRecord--title" title="The “title” property">title</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type"><span class="type">gint</span></td>
-<td class="property_name"><a class="link" href="DAAPRecord.html#DAAPRecord--track" title="The “track” property">track</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type"><span class="type">gint</span></td>
-<td class="property_name"><a class="link" href="DAAPRecord.html#DAAPRecord--year" title="The “year” property">year</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-</tbody>
-</table></div>
-</div>
-<div class="refsect1">
-<a name="DAAPRecord.object-hierarchy"></a><h2>Object Hierarchy</h2>
-<pre class="screen">    <a href="/usr/share/gtk-doc/html/gobject/GTypeModule.html">GInterface</a>
-    <span class="lineart">╰──</span> DAAPRecord
-</pre>
-</div>
-<div class="refsect1">
-<a name="DAAPRecord.description"></a><h2>Description</h2>
-</div>
-<div class="refsect1">
-<a name="DAAPRecord.functions_details"></a><h2>Functions</h2>
-<div class="refsect2">
-<a name="daap-record-itunes-compat"></a><h3>daap_record_itunes_compat ()</h3>
-<pre class="programlisting"><span class="returnvalue">gboolean</span>
-daap_record_itunes_compat (<em class="parameter"><code><a class="link" href="DAAPRecord.html" title="DAAPRecord"><span class="type">DAAPRecord</span></a> *record</code></em>);</pre>
-<div class="refsect3">
-<a name="daap-record-itunes-compat.parameters"></a><h4>Parameters</h4>
-<div class="informaltable"><table class="informaltable" width="100%" border="0">
-<colgroup>
-<col width="150px" class="parameters_name">
-<col class="parameters_description">
-<col width="200px" class="parameters_annotations">
-</colgroup>
-<tbody><tr>
-<td class="parameter_name"><p>record</p></td>
-<td class="parameter_description"><p>A DAAPRecord.</p></td>
-<td class="parameter_annotations"> </td>
-</tr></tbody>
-</table></div>
-</div>
-<div class="refsect3">
-<a name="daap-record-itunes-compat.returns"></a><h4>Returns</h4>
-<p> TRUE if record is compatible with iTunes, else FALSE.</p>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="daap-record-read"></a><h3>daap_record_read ()</h3>
-<pre class="programlisting"><span class="returnvalue">GInputStream</span> *
-daap_record_read (<em class="parameter"><code><a class="link" href="DAAPRecord.html" title="DAAPRecord"><span class="type">DAAPRecord</span></a> *record</code></em>,
-                  <em class="parameter"><code><span class="type">GError</span> **err</code></em>);</pre>
-<div class="refsect3">
-<a name="daap-record-read.parameters"></a><h4>Parameters</h4>
-<div class="informaltable"><table class="informaltable" width="100%" border="0">
-<colgroup>
-<col width="150px" class="parameters_name">
-<col class="parameters_description">
-<col width="200px" class="parameters_annotations">
-</colgroup>
-<tbody>
-<tr>
-<td class="parameter_name"><p>record</p></td>
-<td class="parameter_description"><p>a DAAPRecord.</p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-<tr>
-<td class="parameter_name"><p>err</p></td>
-<td class="parameter_description"><p>a GError.</p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-<div class="refsect3">
-<a name="daap-record-read.returns"></a><h4>Returns</h4>
-<p> A GInputStream that provides read-only access to the data stream
-associated with record.</p>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="daap-record-cmp-by-album"></a><h3>daap_record_cmp_by_album ()</h3>
-<pre class="programlisting"><span class="returnvalue">gint</span>
-daap_record_cmp_by_album (<em class="parameter"><code><span class="type">gpointer</span> a</code></em>,
-                          <em class="parameter"><code><span class="type">gpointer</span> b</code></em>,
-                          <em class="parameter"><code><a class="link" href="DMAPDb.html" title="DMAPDb"><span class="type">DMAPDb</span></a> *db</code></em>);</pre>
-<p>Compares the two records associated with the provided keys according
-to album. Suitable to sort lists of albums.</p>
-<div class="refsect3">
-<a name="daap-record-cmp-by-album.parameters"></a><h4>Parameters</h4>
-<div class="informaltable"><table class="informaltable" width="100%" border="0">
-<colgroup>
-<col width="150px" class="parameters_name">
-<col class="parameters_description">
-<col width="200px" class="parameters_annotations">
-</colgroup>
-<tbody>
-<tr>
-<td class="parameter_name"><p>a</p></td>
-<td class="parameter_description"><p>first ID.</p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-<tr>
-<td class="parameter_name"><p>b</p></td>
-<td class="parameter_description"><p>second ID.</p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-<tr>
-<td class="parameter_name"><p>db</p></td>
-<td class="parameter_description"><p>A DMAPDb for which a and b are valid ID's.</p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-</div>
-</div>
-<div class="refsect1">
-<a name="DAAPRecord.property-details"></a><h2>Property Details</h2>
-<div class="refsect2">
-<a name="DAAPRecord--bitrate"></a><h3>The <code class="literal">“bitrate”</code> property</h3>
-<pre class="programlisting">  “bitrate”                  <span class="type">gint</span></pre>
-<p>Song data bitrate in Kb/s.</p>
-<p>Owner: DAAPRecord</p>
-<p>Flags: Read / Write</p>
-<p>Allowed values: &gt;= 0</p>
-<p>Default value: 0</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="DAAPRecord--disc"></a><h3>The <code class="literal">“disc”</code> property</h3>
-<pre class="programlisting">  “disc”                     <span class="type">gint</span></pre>
-<p>Song disc number.</p>
-<p>Owner: DAAPRecord</p>
-<p>Flags: Read / Write</p>
-<p>Allowed values: &gt;= 0</p>
-<p>Default value: 0</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="DAAPRecord--duration"></a><h3>The <code class="literal">“duration”</code> property</h3>
-<pre class="programlisting">  “duration”                 <span class="type">gint</span></pre>
-<p>Song duration in seconds.</p>
-<p>Owner: DAAPRecord</p>
-<p>Flags: Read / Write</p>
-<p>Allowed values: &gt;= 0</p>
-<p>Default value: 0</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="DAAPRecord--filesize"></a><h3>The <code class="literal">“filesize”</code> property</h3>
-<pre class="programlisting">  “filesize”                 <span class="type">guint64</span></pre>
-<p>Song data size in bytes.</p>
-<p>Owner: DAAPRecord</p>
-<p>Flags: Read / Write</p>
-<p>Allowed values: &lt;= 2147483647</p>
-<p>Default value: 0</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="DAAPRecord--firstseen"></a><h3>The <code class="literal">“firstseen”</code> property</h3>
-<pre class="programlisting">  “firstseen”                <span class="type">gint</span></pre>
-<p>FIXME.</p>
-<p>Owner: DAAPRecord</p>
-<p>Flags: Read / Write</p>
-<p>Allowed values: &gt;= 0</p>
-<p>Default value: 0</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="DAAPRecord--format"></a><h3>The <code class="literal">“format”</code> property</h3>
-<pre class="programlisting">  “format”                   <span class="type">gchar</span> *</pre>
-<p>Song data format.</p>
-<p>Owner: DAAPRecord</p>
-<p>Flags: Read / Write</p>
-<p>Default value: "Unknown"</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="DAAPRecord--has-video"></a><h3>The <code class="literal">“has-video”</code> property</h3>
-<pre class="programlisting">  “has-video”                <span class="type">gboolean</span></pre>
-<p>Song has video component.</p>
-<p>Owner: DAAPRecord</p>
-<p>Flags: Read / Write</p>
-<p>Default value: FALSE</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="DAAPRecord--hash"></a><h3>The <code class="literal">“hash”</code> property</h3>
-<pre class="programlisting">  “hash”                     <span class="type">gpointer</span></pre>
-<p>Hash of media file contents.</p>
-<p>Owner: DAAPRecord</p>
-<p>Flags: Read / Write</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="DAAPRecord--location"></a><h3>The <code class="literal">“location”</code> property</h3>
-<pre class="programlisting">  “location”                 <span class="type">gchar</span> *</pre>
-<p>URI pointing to song data.</p>
-<p>Owner: DAAPRecord</p>
-<p>Flags: Read / Write</p>
-<p>Default value: NULL</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="DAAPRecord--mediakind"></a><h3>The <code class="literal">“mediakind”</code> property</h3>
-<pre class="programlisting">  “mediakind”                <a class="link" href="DMAPRecord.html#DMAPMediaKind" title="enum DMAPMediaKind"><span class="type">DMAPMediaKind</span></a></pre>
-<p>Media kind.</p>
-<p>Owner: DAAPRecord</p>
-<p>Flags: Read / Write</p>
-<p>Default value: DMAP_MEDIA_KIND_MUSIC</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="DAAPRecord--mtime"></a><h3>The <code class="literal">“mtime”</code> property</h3>
-<pre class="programlisting">  “mtime”                    <span class="type">gint</span></pre>
-<p>Song modification time.</p>
-<p>Owner: DAAPRecord</p>
-<p>Flags: Read / Write</p>
-<p>Allowed values: &gt;= 0</p>
-<p>Default value: 0</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="DAAPRecord--rating"></a><h3>The <code class="literal">“rating”</code> property</h3>
-<pre class="programlisting">  “rating”                   <span class="type">gint</span></pre>
-<p>Song rating.</p>
-<p>Owner: DAAPRecord</p>
-<p>Flags: Read / Write</p>
-<p>Allowed values: [0,5]</p>
-<p>Default value: 0</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="DAAPRecord--songalbum"></a><h3>The <code class="literal">“songalbum”</code> property</h3>
-<pre class="programlisting">  “songalbum”                <span class="type">gchar</span> *</pre>
-<p>Album name.</p>
-<p>Owner: DAAPRecord</p>
-<p>Flags: Read / Write</p>
-<p>Default value: "Unknown"</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="DAAPRecord--songalbumid"></a><h3>The <code class="literal">“songalbumid”</code> property</h3>
-<pre class="programlisting">  “songalbumid”              <span class="type">gint64</span></pre>
-<p>Album id.</p>
-<p>Owner: DAAPRecord</p>
-<p>Flags: Read / Write</p>
-<p>Default value: 0</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="DAAPRecord--songartist"></a><h3>The <code class="literal">“songartist”</code> property</h3>
-<pre class="programlisting">  “songartist”               <span class="type">gchar</span> *</pre>
-<p>Song artist.</p>
-<p>Owner: DAAPRecord</p>
-<p>Flags: Read / Write</p>
-<p>Default value: "Unknown"</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="DAAPRecord--songgenre"></a><h3>The <code class="literal">“songgenre”</code> property</h3>
-<pre class="programlisting">  “songgenre”                <span class="type">gchar</span> *</pre>
-<p>Song genre.</p>
-<p>Owner: DAAPRecord</p>
-<p>Flags: Read / Write</p>
-<p>Default value: "Unknown"</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="DAAPRecord--sort-album"></a><h3>The <code class="literal">“sort-album”</code> property</h3>
-<pre class="programlisting">  “sort-album”               <span class="type">gchar</span> *</pre>
-<p>Album sort name.</p>
-<p>Owner: DAAPRecord</p>
-<p>Flags: Read / Write</p>
-<p>Default value: "Unknown"</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="DAAPRecord--sort-artist"></a><h3>The <code class="literal">“sort-artist”</code> property</h3>
-<pre class="programlisting">  “sort-artist”              <span class="type">gchar</span> *</pre>
-<p>Song artist sort name.</p>
-<p>Owner: DAAPRecord</p>
-<p>Flags: Read / Write</p>
-<p>Default value: "Unknown"</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="DAAPRecord--title"></a><h3>The <code class="literal">“title”</code> property</h3>
-<pre class="programlisting">  “title”                    <span class="type">gchar</span> *</pre>
-<p>Song title.</p>
-<p>Owner: DAAPRecord</p>
-<p>Flags: Read / Write</p>
-<p>Default value: "Unknown"</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="DAAPRecord--track"></a><h3>The <code class="literal">“track”</code> property</h3>
-<pre class="programlisting">  “track”                    <span class="type">gint</span></pre>
-<p>Song track number.</p>
-<p>Owner: DAAPRecord</p>
-<p>Flags: Read / Write</p>
-<p>Allowed values: &gt;= 0</p>
-<p>Default value: 0</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="DAAPRecord--year"></a><h3>The <code class="literal">“year”</code> property</h3>
-<pre class="programlisting">  “year”                     <span class="type">gint</span></pre>
-<p>Song publication year.</p>
-<p>Owner: DAAPRecord</p>
-<p>Flags: Read / Write</p>
-<p>Allowed values: &gt;= 0</p>
-<p>Default value: 0</p>
-</div>
-</div>
-</div>
-<div class="footer">
-<hr>Generated by GTK-Doc V1.32</div>
-</body>
-</html>
\ No newline at end of file
diff --git a/doc/html/DACPPlayer.html b/doc/html/DACPPlayer.html
deleted file mode 100644
index aa53464..0000000
--- a/doc/html/DACPPlayer.html
+++ /dev/null
@@ -1,476 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>DACPPlayer: libdmapsharing-3.0 Reference Manual</title>
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
-<link rel="home" href="index.html" title="libdmapsharing-3.0 Reference Manual">
-<link rel="up" href="ch01.html" title="Libdmapsharing overview">
-<link rel="prev" href="libdmapsharing-3.0-dacp-connection.html" title="dacp-connection">
-<link rel="next" href="libdmapsharing-3.0-dacp-share.html" title="dacp-share">
-<meta name="generator" content="GTK-Doc V1.32 (XML mode)">
-<link rel="stylesheet" href="style.css" type="text/css">
-</head>
-<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
-<td width="100%" align="left" class="shortcuts">
-<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
-                  <a href="#DACPPlayer.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
-                  <a href="#DACPPlayer.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span> 
-                  <a href="#DACPPlayer.properties" class="shortcut">Properties</a></span>
-</td>
-<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
-<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
-<td><a accesskey="p" href="libdmapsharing-3.0-dacp-connection.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="libdmapsharing-3.0-dacp-share.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
-</tr></table>
-<div class="refentry">
-<a name="DACPPlayer"></a><div class="titlepage"></div>
-<div class="refnamediv"><table width="100%"><tr>
-<td valign="top">
-<h2><span class="refentrytitle"><a name="DACPPlayer.top_of_page"></a>DACPPlayer</span></h2>
-<p>DACPPlayer</p>
-</td>
-<td class="gallery_image" valign="top" align="right"></td>
-</tr></table></div>
-<div class="refsect1">
-<a name="DACPPlayer.functions"></a><h2>Functions</h2>
-<div class="informaltable"><table class="informaltable" width="100%" border="0">
-<colgroup>
-<col width="150px" class="functions_proto_type">
-<col class="functions_proto_name">
-</colgroup>
-<tbody>
-<tr>
-<td class="function_type">
-<a class="link" href="DAAPRecord.html" title="DAAPRecord"><span class="returnvalue">DAAPRecord</span></a> *
-</td>
-<td class="function_name">
-<a class="link" href="DACPPlayer.html#dacp-player-now-playing-record" title="dacp_player_now_playing_record ()">dacp_player_now_playing_record</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">guchar</span> *
-</td>
-<td class="function_name">
-<a class="link" href="DACPPlayer.html#dacp-player-now-playing-artwork" title="dacp_player_now_playing_artwork ()">dacp_player_now_playing_artwork</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">void</span>
-</td>
-<td class="function_name">
-<a class="link" href="DACPPlayer.html#dacp-player-play-pause" title="dacp_player_play_pause ()">dacp_player_play_pause</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">void</span>
-</td>
-<td class="function_name">
-<a class="link" href="DACPPlayer.html#dacp-player-pause" title="dacp_player_pause ()">dacp_player_pause</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">void</span>
-</td>
-<td class="function_name">
-<a class="link" href="DACPPlayer.html#dacp-player-next-item" title="dacp_player_next_item ()">dacp_player_next_item</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">void</span>
-</td>
-<td class="function_name">
-<a class="link" href="DACPPlayer.html#dacp-player-prev-item" title="dacp_player_prev_item ()">dacp_player_prev_item</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">void</span>
-</td>
-<td class="function_name">
-<a class="link" href="DACPPlayer.html#dacp-player-cue-clear" title="dacp_player_cue_clear ()">dacp_player_cue_clear</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">void</span>
-</td>
-<td class="function_name">
-<a class="link" href="DACPPlayer.html#dacp-player-cue-play" title="dacp_player_cue_play ()">dacp_player_cue_play</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-</tbody>
-</table></div>
-</div>
-<div class="refsect1">
-<a name="DACPPlayer.properties"></a><h2>Properties</h2>
-<div class="informaltable"><table class="informaltable" border="0">
-<colgroup>
-<col width="150px" class="properties_type">
-<col width="300px" class="properties_name">
-<col width="200px" class="properties_flags">
-</colgroup>
-<tbody>
-<tr>
-<td class="property_type"><a class="link" href="DACPPlayer.html#DACPPlayState" title="enum DACPPlayState"><span class="type">DACPPlayState</span></a></td>
-<td class="property_name"><a class="link" href="DACPPlayer.html#DACPPlayer--play-state" title="The “play-state” property">play-state</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type"><span class="type">gulong</span></td>
-<td class="property_name"><a class="link" href="DACPPlayer.html#DACPPlayer--playing-time" title="The “playing-time” property">playing-time</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type"><a class="link" href="DACPPlayer.html#DACPRepeatState" title="enum DACPRepeatState"><span class="type">DACPRepeatState</span></a></td>
-<td class="property_name"><a class="link" href="DACPPlayer.html#DACPPlayer--repeat-state" title="The “repeat-state” property">repeat-state</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type"><span class="type">gboolean</span></td>
-<td class="property_name"><a class="link" href="DACPPlayer.html#DACPPlayer--shuffle-state" title="The “shuffle-state” property">shuffle-state</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type"><span class="type">gulong</span></td>
-<td class="property_name"><a class="link" href="DACPPlayer.html#DACPPlayer--volume" title="The “volume” property">volume</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-</tbody>
-</table></div>
-</div>
-<div class="refsect1">
-<a name="DACPPlayer.other"></a><h2>Types and Values</h2>
-<div class="informaltable"><table class="informaltable" width="100%" border="0">
-<colgroup>
-<col width="150px" class="other_proto_type">
-<col class="other_proto_name">
-</colgroup>
-<tbody>
-<tr>
-<td class="datatype_keyword">enum</td>
-<td class="function_name"><a class="link" href="DACPPlayer.html#DACPRepeatState" title="enum DACPRepeatState">DACPRepeatState</a></td>
-</tr>
-<tr>
-<td class="datatype_keyword">enum</td>
-<td class="function_name"><a class="link" href="DACPPlayer.html#DACPPlayState" title="enum DACPPlayState">DACPPlayState</a></td>
-</tr>
-</tbody>
-</table></div>
-</div>
-<div class="refsect1">
-<a name="DACPPlayer.object-hierarchy"></a><h2>Object Hierarchy</h2>
-<pre class="screen">    <a href="/usr/share/gtk-doc/html/gobject/gobject-Enumeration-and-Flag-Types.html">GEnum</a>
-    <span class="lineart">├──</span> DACPPlayState
-    <span class="lineart">╰──</span> DACPRepeatState
-    <a href="/usr/share/gtk-doc/html/gobject/GTypeModule.html">GInterface</a>
-    <span class="lineart">╰──</span> DACPPlayer
-</pre>
-</div>
-<div class="refsect1">
-<a name="DACPPlayer.description"></a><h2>Description</h2>
-</div>
-<div class="refsect1">
-<a name="DACPPlayer.functions_details"></a><h2>Functions</h2>
-<div class="refsect2">
-<a name="dacp-player-now-playing-record"></a><h3>dacp_player_now_playing_record ()</h3>
-<pre class="programlisting"><a class="link" href="DAAPRecord.html" title="DAAPRecord"><span class="returnvalue">DAAPRecord</span></a> *
-dacp_player_now_playing_record (<em class="parameter"><code><a class="link" href="DACPPlayer.html" title="DACPPlayer"><span class="type">DACPPlayer</span></a> *player</code></em>);</pre>
-<div class="refsect3">
-<a name="dacp-player-now-playing-record.parameters"></a><h4>Parameters</h4>
-<div class="informaltable"><table class="informaltable" width="100%" border="0">
-<colgroup>
-<col width="150px" class="parameters_name">
-<col class="parameters_description">
-<col width="200px" class="parameters_annotations">
-</colgroup>
-<tbody><tr>
-<td class="parameter_name"><p>player</p></td>
-<td class="parameter_description"><p>a player</p></td>
-<td class="parameter_annotations"> </td>
-</tr></tbody>
-</table></div>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="dacp-player-now-playing-artwork"></a><h3>dacp_player_now_playing_artwork ()</h3>
-<pre class="programlisting"><span class="returnvalue">guchar</span> *
-dacp_player_now_playing_artwork (<em class="parameter"><code><a class="link" href="DACPPlayer.html" title="DACPPlayer"><span class="type">DACPPlayer</span></a> *player</code></em>,
-                                 <em class="parameter"><code><span class="type">guint</span> width</code></em>,
-                                 <em class="parameter"><code><span class="type">guint</span> height</code></em>);</pre>
-<div class="refsect3">
-<a name="dacp-player-now-playing-artwork.parameters"></a><h4>Parameters</h4>
-<div class="informaltable"><table class="informaltable" width="100%" border="0">
-<colgroup>
-<col width="150px" class="parameters_name">
-<col class="parameters_description">
-<col width="200px" class="parameters_annotations">
-</colgroup>
-<tbody>
-<tr>
-<td class="parameter_name"><p>player</p></td>
-<td class="parameter_description"><p>a player</p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-<tr>
-<td class="parameter_name"><p>width</p></td>
-<td class="parameter_description"><p>width</p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-<tr>
-<td class="parameter_name"><p>height</p></td>
-<td class="parameter_description"><p>height</p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="dacp-player-play-pause"></a><h3>dacp_player_play_pause ()</h3>
-<pre class="programlisting"><span class="returnvalue">void</span>
-dacp_player_play_pause (<em class="parameter"><code><a class="link" href="DACPPlayer.html" title="DACPPlayer"><span class="type">DACPPlayer</span></a> *player</code></em>);</pre>
-<div class="refsect3">
-<a name="dacp-player-play-pause.parameters"></a><h4>Parameters</h4>
-<div class="informaltable"><table class="informaltable" width="100%" border="0">
-<colgroup>
-<col width="150px" class="parameters_name">
-<col class="parameters_description">
-<col width="200px" class="parameters_annotations">
-</colgroup>
-<tbody><tr>
-<td class="parameter_name"><p>player</p></td>
-<td class="parameter_description"><p>a player</p></td>
-<td class="parameter_annotations"> </td>
-</tr></tbody>
-</table></div>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="dacp-player-pause"></a><h3>dacp_player_pause ()</h3>
-<pre class="programlisting"><span class="returnvalue">void</span>
-dacp_player_pause (<em class="parameter"><code><a class="link" href="DACPPlayer.html" title="DACPPlayer"><span class="type">DACPPlayer</span></a> *player</code></em>);</pre>
-<div class="refsect3">
-<a name="dacp-player-pause.parameters"></a><h4>Parameters</h4>
-<div class="informaltable"><table class="informaltable" width="100%" border="0">
-<colgroup>
-<col width="150px" class="parameters_name">
-<col class="parameters_description">
-<col width="200px" class="parameters_annotations">
-</colgroup>
-<tbody><tr>
-<td class="parameter_name"><p>player</p></td>
-<td class="parameter_description"><p>a player</p></td>
-<td class="parameter_annotations"> </td>
-</tr></tbody>
-</table></div>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="dacp-player-next-item"></a><h3>dacp_player_next_item ()</h3>
-<pre class="programlisting"><span class="returnvalue">void</span>
-dacp_player_next_item (<em class="parameter"><code><a class="link" href="DACPPlayer.html" title="DACPPlayer"><span class="type">DACPPlayer</span></a> *player</code></em>);</pre>
-<div class="refsect3">
-<a name="dacp-player-next-item.parameters"></a><h4>Parameters</h4>
-<div class="informaltable"><table class="informaltable" width="100%" border="0">
-<colgroup>
-<col width="150px" class="parameters_name">
-<col class="parameters_description">
-<col width="200px" class="parameters_annotations">
-</colgroup>
-<tbody><tr>
-<td class="parameter_name"><p>player</p></td>
-<td class="parameter_description"><p>a player</p></td>
-<td class="parameter_annotations"> </td>
-</tr></tbody>
-</table></div>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="dacp-player-prev-item"></a><h3>dacp_player_prev_item ()</h3>
-<pre class="programlisting"><span class="returnvalue">void</span>
-dacp_player_prev_item (<em class="parameter"><code><a class="link" href="DACPPlayer.html" title="DACPPlayer"><span class="type">DACPPlayer</span></a> *player</code></em>);</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="dacp-player-cue-clear"></a><h3>dacp_player_cue_clear ()</h3>
-<pre class="programlisting"><span class="returnvalue">void</span>
-dacp_player_cue_clear (<em class="parameter"><code><a class="link" href="DACPPlayer.html" title="DACPPlayer"><span class="type">DACPPlayer</span></a> *player</code></em>);</pre>
-<div class="refsect3">
-<a name="dacp-player-cue-clear.parameters"></a><h4>Parameters</h4>
-<div class="informaltable"><table class="informaltable" width="100%" border="0">
-<colgroup>
-<col width="150px" class="parameters_name">
-<col class="parameters_description">
-<col width="200px" class="parameters_annotations">
-</colgroup>
-<tbody><tr>
-<td class="parameter_name"><p>player</p></td>
-<td class="parameter_description"><p>a player</p></td>
-<td class="parameter_annotations"> </td>
-</tr></tbody>
-</table></div>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="dacp-player-cue-play"></a><h3>dacp_player_cue_play ()</h3>
-<pre class="programlisting"><span class="returnvalue">void</span>
-dacp_player_cue_play (<em class="parameter"><code><a class="link" href="DACPPlayer.html" title="DACPPlayer"><span class="type">DACPPlayer</span></a> *player</code></em>,
-                      <em class="parameter"><code><span class="type">GList</span> *records</code></em>,
-                      <em class="parameter"><code><span class="type">guint</span> index</code></em>);</pre>
-<div class="refsect3">
-<a name="dacp-player-cue-play.parameters"></a><h4>Parameters</h4>
-<div class="informaltable"><table class="informaltable" width="100%" border="0">
-<colgroup>
-<col width="150px" class="parameters_name">
-<col class="parameters_description">
-<col width="200px" class="parameters_annotations">
-</colgroup>
-<tbody>
-<tr>
-<td class="parameter_name"><p>player</p></td>
-<td class="parameter_description"><p>a player</p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-<tr>
-<td class="parameter_name"><p>records</p></td>
-<td class="parameter_description"><p>a list of records</p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-<tr>
-<td class="parameter_name"><p>index</p></td>
-<td class="parameter_description"><p>an index</p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-</div>
-</div>
-<div class="refsect1">
-<a name="DACPPlayer.other_details"></a><h2>Types and Values</h2>
-<div class="refsect2">
-<a name="DACPRepeatState"></a><h3>enum DACPRepeatState</h3>
-<div class="refsect3">
-<a name="DACPRepeatState.members"></a><h4>Members</h4>
-<div class="informaltable"><table class="informaltable" width="100%" border="0">
-<colgroup>
-<col width="300px" class="enum_members_name">
-<col class="enum_members_description">
-<col width="200px" class="enum_members_annotations">
-</colgroup>
-<tbody>
-<tr>
-<td class="enum_member_name"><p><a name="DACP-REPEAT-NONE:CAPS"></a>DACP_REPEAT_NONE</p></td>
-<td> </td>
-<td> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="DACP-REPEAT-SINGLE:CAPS"></a>DACP_REPEAT_SINGLE</p></td>
-<td> </td>
-<td> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="DACP-REPEAT-ALL:CAPS"></a>DACP_REPEAT_ALL</p></td>
-<td> </td>
-<td> </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="DACPPlayState"></a><h3>enum DACPPlayState</h3>
-<div class="refsect3">
-<a name="DACPPlayState.members"></a><h4>Members</h4>
-<div class="informaltable"><table class="informaltable" width="100%" border="0">
-<colgroup>
-<col width="300px" class="enum_members_name">
-<col class="enum_members_description">
-<col width="200px" class="enum_members_annotations">
-</colgroup>
-<tbody>
-<tr>
-<td class="enum_member_name"><p><a name="DACP-PLAY-STOPPED:CAPS"></a>DACP_PLAY_STOPPED</p></td>
-<td> </td>
-<td> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="DACP-PLAY-PAUSED:CAPS"></a>DACP_PLAY_PAUSED</p></td>
-<td> </td>
-<td> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="DACP-PLAY-PLAYING:CAPS"></a>DACP_PLAY_PLAYING</p></td>
-<td> </td>
-<td> </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-</div>
-</div>
-<div class="refsect1">
-<a name="DACPPlayer.property-details"></a><h2>Property Details</h2>
-<div class="refsect2">
-<a name="DACPPlayer--play-state"></a><h3>The <code class="literal">“play-state”</code> property</h3>
-<pre class="programlisting">  “play-state”               <a class="link" href="DACPPlayer.html#DACPPlayState" title="enum DACPPlayState"><span class="type">DACPPlayState</span></a></pre>
-<p>Play state.</p>
-<p>Owner: DACPPlayer</p>
-<p>Flags: Read / Write</p>
-<p>Default value: DACP_PLAY_STOPPED</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="DACPPlayer--playing-time"></a><h3>The <code class="literal">“playing-time”</code> property</h3>
-<pre class="programlisting">  “playing-time”             <span class="type">gulong</span></pre>
-<p>Playing time (ms).</p>
-<p>Owner: DACPPlayer</p>
-<p>Flags: Read / Write</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="DACPPlayer--repeat-state"></a><h3>The <code class="literal">“repeat-state”</code> property</h3>
-<pre class="programlisting">  “repeat-state”             <a class="link" href="DACPPlayer.html#DACPRepeatState" title="enum DACPRepeatState"><span class="type">DACPRepeatState</span></a></pre>
-<p>Repeat state.</p>
-<p>Owner: DACPPlayer</p>
-<p>Flags: Read / Write</p>
-<p>Default value: DACP_REPEAT_NONE</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="DACPPlayer--shuffle-state"></a><h3>The <code class="literal">“shuffle-state”</code> property</h3>
-<pre class="programlisting">  “shuffle-state”            <span class="type">gboolean</span></pre>
-<p>Shufle state.</p>
-<p>Owner: DACPPlayer</p>
-<p>Flags: Read / Write</p>
-<p>Default value: FALSE</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="DACPPlayer--volume"></a><h3>The <code class="literal">“volume”</code> property</h3>
-<pre class="programlisting">  “volume”                   <span class="type">gulong</span></pre>
-<p>Volume.</p>
-<p>Owner: DACPPlayer</p>
-<p>Flags: Read / Write</p>
-<p>Allowed values: &lt;= 100</p>
-</div>
-</div>
-</div>
-<div class="footer">
-<hr>Generated by GTK-Doc V1.32</div>
-</body>
-</html>
\ No newline at end of file
diff --git a/doc/html/DPAPRecord.html b/doc/html/DPAPRecord.html
deleted file mode 100644
index 4b944f1..0000000
--- a/doc/html/DPAPRecord.html
+++ /dev/null
@@ -1,292 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>DPAPRecord: libdmapsharing-3.0 Reference Manual</title>
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
-<link rel="home" href="index.html" title="libdmapsharing-3.0 Reference Manual">
-<link rel="up" href="ch01.html" title="Libdmapsharing overview">
-<link rel="prev" href="libdmapsharing-3.0-dpap-connection.html" title="dpap-connection">
-<link rel="next" href="libdmapsharing-3.0-dpap-share.html" title="dpap-share">
-<meta name="generator" content="GTK-Doc V1.32 (XML mode)">
-<link rel="stylesheet" href="style.css" type="text/css">
-</head>
-<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
-<td width="100%" align="left" class="shortcuts">
-<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
-                  <a href="#DPAPRecord.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
-                  <a href="#DPAPRecord.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span> 
-                  <a href="#DPAPRecord.properties" class="shortcut">Properties</a></span>
-</td>
-<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
-<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
-<td><a accesskey="p" href="libdmapsharing-3.0-dpap-connection.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="libdmapsharing-3.0-dpap-share.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
-</tr></table>
-<div class="refentry">
-<a name="DPAPRecord"></a><div class="titlepage"></div>
-<div class="refnamediv"><table width="100%"><tr>
-<td valign="top">
-<h2><span class="refentrytitle"><a name="DPAPRecord.top_of_page"></a>DPAPRecord</span></h2>
-<p>DPAPRecord</p>
-</td>
-<td class="gallery_image" valign="top" align="right"></td>
-</tr></table></div>
-<div class="refsect1">
-<a name="DPAPRecord.functions"></a><h2>Functions</h2>
-<div class="informaltable"><table class="informaltable" width="100%" border="0">
-<colgroup>
-<col width="150px" class="functions_proto_type">
-<col class="functions_proto_name">
-</colgroup>
-<tbody><tr>
-<td class="function_type">
-<span class="returnvalue">GInputStream</span> *
-</td>
-<td class="function_name">
-<a class="link" href="DPAPRecord.html#dpap-record-read" title="dpap_record_read ()">dpap_record_read</a> <span class="c_punctuation">()</span>
-</td>
-</tr></tbody>
-</table></div>
-</div>
-<div class="refsect1">
-<a name="DPAPRecord.properties"></a><h2>Properties</h2>
-<div class="informaltable"><table class="informaltable" border="0">
-<colgroup>
-<col width="150px" class="properties_type">
-<col width="300px" class="properties_name">
-<col width="200px" class="properties_flags">
-</colgroup>
-<tbody>
-<tr>
-<td class="property_type">
-<span class="type">gchar</span> *</td>
-<td class="property_name"><a class="link" href="DPAPRecord.html#DPAPRecord--aspect-ratio" title="The “aspect-ratio” property">aspect-ratio</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type">
-<span class="type">gchar</span> *</td>
-<td class="property_name"><a class="link" href="DPAPRecord.html#DPAPRecord--comments" title="The “comments” property">comments</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type"><span class="type">gint</span></td>
-<td class="property_name"><a class="link" href="DPAPRecord.html#DPAPRecord--creation-date" title="The “creation-date” property">creation-date</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type">
-<span class="type">gchar</span> *</td>
-<td class="property_name"><a class="link" href="DPAPRecord.html#DPAPRecord--filename" title="The “filename” property">filename</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type">
-<span class="type">gchar</span> *</td>
-<td class="property_name"><a class="link" href="DPAPRecord.html#DPAPRecord--format" title="The “format” property">format</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type"><span class="type">gpointer</span></td>
-<td class="property_name"><a class="link" href="DPAPRecord.html#DPAPRecord--hash" title="The “hash” property">hash</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type"><span class="type">gint</span></td>
-<td class="property_name"><a class="link" href="DPAPRecord.html#DPAPRecord--large-filesize" title="The “large-filesize” property">large-filesize</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type">
-<span class="type">gchar</span> *</td>
-<td class="property_name"><a class="link" href="DPAPRecord.html#DPAPRecord--location" title="The “location” property">location</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type"><span class="type">gint</span></td>
-<td class="property_name"><a class="link" href="DPAPRecord.html#DPAPRecord--pixel-height" title="The “pixel-height” property">pixel-height</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type"><span class="type">gint</span></td>
-<td class="property_name"><a class="link" href="DPAPRecord.html#DPAPRecord--pixel-width" title="The “pixel-width” property">pixel-width</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type"><span class="type">gint</span></td>
-<td class="property_name"><a class="link" href="DPAPRecord.html#DPAPRecord--rating" title="The “rating” property">rating</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-<tr>
-<td class="property_type"><span class="type">gpointer</span></td>
-<td class="property_name"><a class="link" href="DPAPRecord.html#DPAPRecord--thumbnail" title="The “thumbnail” property">thumbnail</a></td>
-<td class="property_flags">Read / Write</td>
-</tr>
-</tbody>
-</table></div>
-</div>
-<div class="refsect1">
-<a name="DPAPRecord.object-hierarchy"></a><h2>Object Hierarchy</h2>
-<pre class="screen">    <a href="/usr/share/gtk-doc/html/gobject/GTypeModule.html">GInterface</a>
-    <span class="lineart">╰──</span> DPAPRecord
-</pre>
-</div>
-<div class="refsect1">
-<a name="DPAPRecord.description"></a><h2>Description</h2>
-</div>
-<div class="refsect1">
-<a name="DPAPRecord.functions_details"></a><h2>Functions</h2>
-<div class="refsect2">
-<a name="dpap-record-read"></a><h3>dpap_record_read ()</h3>
-<pre class="programlisting"><span class="returnvalue">GInputStream</span> *
-dpap_record_read (<em class="parameter"><code><a class="link" href="DPAPRecord.html" title="DPAPRecord"><span class="type">DPAPRecord</span></a> *record</code></em>,
-                  <em class="parameter"><code><span class="type">GError</span> **err</code></em>);</pre>
-<div class="refsect3">
-<a name="dpap-record-read.parameters"></a><h4>Parameters</h4>
-<div class="informaltable"><table class="informaltable" width="100%" border="0">
-<colgroup>
-<col width="150px" class="parameters_name">
-<col class="parameters_description">
-<col width="200px" class="parameters_annotations">
-</colgroup>
-<tbody>
-<tr>
-<td class="parameter_name"><p>record</p></td>
-<td class="parameter_description"><p>a DPAPRecord.</p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-<tr>
-<td class="parameter_name"><p>err</p></td>
-<td class="parameter_description"><p>a GError.</p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-<div class="refsect3">
-<a name="dpap-record-read.returns"></a><h4>Returns</h4>
-<p> A GInputStream that provides read-only access to the data stream
-associated with record.</p>
-</div>
-</div>
-</div>
-<div class="refsect1">
-<a name="DPAPRecord.property-details"></a><h2>Property Details</h2>
-<div class="refsect2">
-<a name="DPAPRecord--aspect-ratio"></a><h3>The <code class="literal">“aspect-ratio”</code> property</h3>
-<pre class="programlisting">  “aspect-ratio”             <span class="type">gchar</span> *</pre>
-<p>Photo aspect ratio.</p>
-<p>Owner: DPAPRecord</p>
-<p>Flags: Read / Write</p>
-<p>Default value: NULL</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="DPAPRecord--comments"></a><h3>The <code class="literal">“comments”</code> property</h3>
-<pre class="programlisting">  “comments”                 <span class="type">gchar</span> *</pre>
-<p>Photo comments.</p>
-<p>Owner: DPAPRecord</p>
-<p>Flags: Read / Write</p>
-<p>Default value: NULL</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="DPAPRecord--creation-date"></a><h3>The <code class="literal">“creation-date”</code> property</h3>
-<pre class="programlisting">  “creation-date”            <span class="type">gint</span></pre>
-<p>Photo creation date.</p>
-<p>Owner: DPAPRecord</p>
-<p>Flags: Read / Write</p>
-<p>Allowed values: &gt;= 0</p>
-<p>Default value: 0</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="DPAPRecord--filename"></a><h3>The <code class="literal">“filename”</code> property</h3>
-<pre class="programlisting">  “filename”                 <span class="type">gchar</span> *</pre>
-<p>Photo filename.</p>
-<p>Owner: DPAPRecord</p>
-<p>Flags: Read / Write</p>
-<p>Default value: NULL</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="DPAPRecord--format"></a><h3>The <code class="literal">“format”</code> property</h3>
-<pre class="programlisting">  “format”                   <span class="type">gchar</span> *</pre>
-<p>Photo data format.</p>
-<p>Owner: DPAPRecord</p>
-<p>Flags: Read / Write</p>
-<p>Default value: NULL</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="DPAPRecord--hash"></a><h3>The <code class="literal">“hash”</code> property</h3>
-<pre class="programlisting">  “hash”                     <span class="type">gpointer</span></pre>
-<p>Hash of media file contents.</p>
-<p>Owner: DPAPRecord</p>
-<p>Flags: Read / Write</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="DPAPRecord--large-filesize"></a><h3>The <code class="literal">“large-filesize”</code> property</h3>
-<pre class="programlisting">  “large-filesize”           <span class="type">gint</span></pre>
-<p>Photo large file size.</p>
-<p>Owner: DPAPRecord</p>
-<p>Flags: Read / Write</p>
-<p>Allowed values: &gt;= 0</p>
-<p>Default value: 0</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="DPAPRecord--location"></a><h3>The <code class="literal">“location”</code> property</h3>
-<pre class="programlisting">  “location”                 <span class="type">gchar</span> *</pre>
-<p>URI pointing to photo data.</p>
-<p>Owner: DPAPRecord</p>
-<p>Flags: Read / Write</p>
-<p>Default value: NULL</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="DPAPRecord--pixel-height"></a><h3>The <code class="literal">“pixel-height”</code> property</h3>
-<pre class="programlisting">  “pixel-height”             <span class="type">gint</span></pre>
-<p>Photo pixel height.</p>
-<p>Owner: DPAPRecord</p>
-<p>Flags: Read / Write</p>
-<p>Allowed values: &gt;= 0</p>
-<p>Default value: 0</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="DPAPRecord--pixel-width"></a><h3>The <code class="literal">“pixel-width”</code> property</h3>
-<pre class="programlisting">  “pixel-width”              <span class="type">gint</span></pre>
-<p>Photo pixel width.</p>
-<p>Owner: DPAPRecord</p>
-<p>Flags: Read / Write</p>
-<p>Allowed values: &gt;= 0</p>
-<p>Default value: 0</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="DPAPRecord--rating"></a><h3>The <code class="literal">“rating”</code> property</h3>
-<pre class="programlisting">  “rating”                   <span class="type">gint</span></pre>
-<p>Photo rating.</p>
-<p>Owner: DPAPRecord</p>
-<p>Flags: Read / Write</p>
-<p>Allowed values: &gt;= 0</p>
-<p>Default value: 0</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="DPAPRecord--thumbnail"></a><h3>The <code class="literal">“thumbnail”</code> property</h3>
-<pre class="programlisting">  “thumbnail”                <span class="type">gpointer</span></pre>
-<p>Photo thumbnail.</p>
-<p>Owner: DPAPRecord</p>
-<p>Flags: Read / Write</p>
-</div>
-</div>
-</div>
-<div class="footer">
-<hr>Generated by GTK-Doc V1.32</div>
-</body>
-</html>
\ No newline at end of file
diff --git a/doc/html/DmapAvConnection.html b/doc/html/DmapAvConnection.html
new file mode 100644
index 0000000..2c9af4b
--- /dev/null
+++ b/doc/html/DmapAvConnection.html
@@ -0,0 +1,121 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>DmapAvConnection: libdmapsharing Reference Manual</title>
+<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
+<link rel="home" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="up" href="ch04.html" title="Libdmapsharing Objects and Interfaces">
+<link rel="prev" href="ch04.html" title="Libdmapsharing Objects and Interfaces">
+<link rel="next" href="DmapAvRecord.html" title="DmapAvRecord">
+<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
+<td width="100%" align="left" class="shortcuts">
+<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
+                  <a href="#DmapAvConnection.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
+                  <a href="#DmapAvConnection.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
+</td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
+<td><a accesskey="u" href="ch04.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="ch04.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="DmapAvRecord.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="refentry">
+<a name="DmapAvConnection"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="DmapAvConnection.top_of_page"></a>DmapAvConnection</span></h2>
+<p>DmapAvConnection — A DAAP connection.</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="DmapAvConnection.functions"></a><h2>Functions</h2>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="functions_proto_type">
+<col class="functions_proto_name">
+</colgroup>
+<tbody><tr>
+<td class="function_type">
+<a class="link" href="DmapAvConnection.html" title="DmapAvConnection"><span class="returnvalue">DmapAvConnection</span></a> *
+</td>
+<td class="function_name">
+<a class="link" href="DmapAvConnection.html#dmap-av-connection-new" title="dmap_av_connection_new ()">dmap_av_connection_new</a> <span class="c_punctuation">()</span>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="DmapAvConnection.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<pre class="screen">    GObject
+    <span class="lineart">╰──</span> <a class="link" href="DmapConnection.html" title="DmapConnection">DmapConnection</a>
+        <span class="lineart">╰──</span> DmapAvConnection
+</pre>
+</div>
+<div class="refsect1">
+<a name="DmapAvConnection.description"></a><h2>Description</h2>
+<p><a class="link" href="DmapAvConnection.html" title="DmapAvConnection"><span class="type">DmapAvConnection</span></a> objects encapsulate a DAAP connection.</p>
+</div>
+<div class="refsect1">
+<a name="DmapAvConnection.functions_details"></a><h2>Functions</h2>
+<div class="refsect2">
+<a name="dmap-av-connection-new"></a><h3>dmap_av_connection_new ()</h3>
+<pre class="programlisting"><a class="link" href="DmapAvConnection.html" title="DmapAvConnection"><span class="returnvalue">DmapAvConnection</span></a> *
+dmap_av_connection_new (<em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
+                        <em class="parameter"><code>const <span class="type">char</span> *host</code></em>,
+                        <em class="parameter"><code><span class="type">guint</span> port</code></em>,
+                        <em class="parameter"><code><a class="link" href="DmapDb.html" title="DmapDb"><span class="type">DmapDb</span></a> *db</code></em>,
+                        <em class="parameter"><code><a class="link" href="DmapRecordFactory.html" title="DmapRecordFactory"><span class="type">DmapRecordFactory</span></a> *factory</code></em>);</pre>
+<p>Create a new DAAP connection.</p>
+<div class="refsect3">
+<a name="dmap-av-connection-new.parameters"></a><h4>Parameters</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="parameters_name">
+<col class="parameters_description">
+<col width="200px" class="parameters_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="parameter_name"><p>name</p></td>
+<td class="parameter_description"><p>The name of the share to connect to.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>host</p></td>
+<td class="parameter_description"><p>The host of the share to connect to.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>port</p></td>
+<td class="parameter_description"><p>The port of the share to connect to.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>db</p></td>
+<td class="parameter_description"><p>The db that will receive the records found in the share. </p></td>
+<td class="parameter_annotations"><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></td>
+</tr>
+<tr>
+<td class="parameter_name"><p>factory</p></td>
+<td class="parameter_description"><p>A factory to create records. </p></td>
+<td class="parameter_annotations"><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="dmap-av-connection-new.returns"></a><h4>Returns</h4>
+<p> a pointer to a DmapAvConnection.</p>
+</div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.33.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/DmapAvRecord.html b/doc/html/DmapAvRecord.html
new file mode 100644
index 0000000..eb9c697
--- /dev/null
+++ b/doc/html/DmapAvRecord.html
@@ -0,0 +1,509 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>DmapAvRecord: libdmapsharing Reference Manual</title>
+<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
+<link rel="home" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="up" href="ch04.html" title="Libdmapsharing Objects and Interfaces">
+<link rel="prev" href="DmapAvConnection.html" title="DmapAvConnection">
+<link rel="next" href="DmapAvShare.html" title="DmapAvShare">
+<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
+<td width="100%" align="left" class="shortcuts">
+<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
+                  <a href="#DmapAvRecord.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
+                  <a href="#DmapAvRecord.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span> 
+                  <a href="#DmapAvRecord.properties" class="shortcut">Properties</a></span>
+</td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
+<td><a accesskey="u" href="ch04.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="DmapAvConnection.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="DmapAvShare.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="refentry">
+<a name="DmapAvRecord"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="DmapAvRecord.top_of_page"></a>DmapAvRecord</span></h2>
+<p>DmapAvRecord — The description of an item shared using DAAP.</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="DmapAvRecord.functions"></a><h2>Functions</h2>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="functions_proto_type">
+<col class="functions_proto_name">
+</colgroup>
+<tbody>
+<tr>
+<td class="function_type">
+<span class="returnvalue">gboolean</span>
+</td>
+<td class="function_name">
+<a class="link" href="DmapAvRecord.html#dmap-av-record-itunes-compat" title="dmap_av_record_itunes_compat ()">dmap_av_record_itunes_compat</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">GInputStream</span> *
+</td>
+<td class="function_name">
+<a class="link" href="DmapAvRecord.html#dmap-av-record-read" title="dmap_av_record_read ()">dmap_av_record_read</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">gint</span>
+</td>
+<td class="function_name">
+<a class="link" href="DmapAvRecord.html#dmap-av-record-cmp-by-album" title="dmap_av_record_cmp_by_album ()">dmap_av_record_cmp_by_album</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="DmapAvRecord.properties"></a><h2>Properties</h2>
+<div class="informaltable"><table class="informaltable" border="0">
+<colgroup>
+<col width="150px" class="properties_type">
+<col width="300px" class="properties_name">
+<col width="200px" class="properties_flags">
+</colgroup>
+<tbody>
+<tr>
+<td class="property_type"><span class="type">int</span></td>
+<td class="property_name"><a class="link" href="DmapAvRecord.html#DmapAvRecord--bitrate" title="The “bitrate” property">bitrate</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><span class="type">int</span></td>
+<td class="property_name"><a class="link" href="DmapAvRecord.html#DmapAvRecord--disc" title="The “disc” property">disc</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><span class="type">int</span></td>
+<td class="property_name"><a class="link" href="DmapAvRecord.html#DmapAvRecord--duration" title="The “duration” property">duration</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><span class="type">guint64</span></td>
+<td class="property_name"><a class="link" href="DmapAvRecord.html#DmapAvRecord--filesize" title="The “filesize” property">filesize</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><span class="type">int</span></td>
+<td class="property_name"><a class="link" href="DmapAvRecord.html#DmapAvRecord--firstseen" title="The “firstseen” property">firstseen</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type">
+<span class="type">char</span> *</td>
+<td class="property_name"><a class="link" href="DmapAvRecord.html#DmapAvRecord--format" title="The “format” property">format</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><span class="type">gboolean</span></td>
+<td class="property_name"><a class="link" href="DmapAvRecord.html#DmapAvRecord--has-video" title="The “has-video” property">has-video</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type">
+<span class="type">GArray</span> *</td>
+<td class="property_name"><a class="link" href="DmapAvRecord.html#DmapAvRecord--hash" title="The “hash” property">hash</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type">
+<span class="type">char</span> *</td>
+<td class="property_name"><a class="link" href="DmapAvRecord.html#DmapAvRecord--location" title="The “location” property">location</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><a class="link" href="DmapRecord.html#DmapMediaKind" title="enum DmapMediaKind"><span class="type">DmapMediaKind</span></a></td>
+<td class="property_name"><a class="link" href="DmapAvRecord.html#DmapAvRecord--mediakind" title="The “mediakind” property">mediakind</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><span class="type">int</span></td>
+<td class="property_name"><a class="link" href="DmapAvRecord.html#DmapAvRecord--mtime" title="The “mtime” property">mtime</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><span class="type">int</span></td>
+<td class="property_name"><a class="link" href="DmapAvRecord.html#DmapAvRecord--rating" title="The “rating” property">rating</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type">
+<span class="type">char</span> *</td>
+<td class="property_name"><a class="link" href="DmapAvRecord.html#DmapAvRecord--songalbum" title="The “songalbum” property">songalbum</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><span class="type">gint64</span></td>
+<td class="property_name"><a class="link" href="DmapAvRecord.html#DmapAvRecord--songalbumid" title="The “songalbumid” property">songalbumid</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type">
+<span class="type">char</span> *</td>
+<td class="property_name"><a class="link" href="DmapAvRecord.html#DmapAvRecord--songartist" title="The “songartist” property">songartist</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type">
+<span class="type">char</span> *</td>
+<td class="property_name"><a class="link" href="DmapAvRecord.html#DmapAvRecord--songgenre" title="The “songgenre” property">songgenre</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type">
+<span class="type">char</span> *</td>
+<td class="property_name"><a class="link" href="DmapAvRecord.html#DmapAvRecord--sort-album" title="The “sort-album” property">sort-album</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type">
+<span class="type">char</span> *</td>
+<td class="property_name"><a class="link" href="DmapAvRecord.html#DmapAvRecord--sort-artist" title="The “sort-artist” property">sort-artist</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type">
+<span class="type">char</span> *</td>
+<td class="property_name"><a class="link" href="DmapAvRecord.html#DmapAvRecord--title" title="The “title” property">title</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><span class="type">int</span></td>
+<td class="property_name"><a class="link" href="DmapAvRecord.html#DmapAvRecord--track" title="The “track” property">track</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><span class="type">int</span></td>
+<td class="property_name"><a class="link" href="DmapAvRecord.html#DmapAvRecord--year" title="The “year” property">year</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="DmapAvRecord.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<pre class="screen">    <a href="/usr/share/gtk-doc/html/gobject/GTypeModule.html">GInterface</a>
+    <span class="lineart">╰──</span> DmapAvRecord
+</pre>
+</div>
+<div class="refsect1">
+<a name="DmapAvRecord.description"></a><h2>Description</h2>
+<p><a class="link" href="DmapAvRecord.html" title="DmapAvRecord"><span class="type">DmapAvRecord</span></a> objects encapsulate the description of an item shared using DAAP.</p>
+</div>
+<div class="refsect1">
+<a name="DmapAvRecord.functions_details"></a><h2>Functions</h2>
+<div class="refsect2">
+<a name="dmap-av-record-itunes-compat"></a><h3>dmap_av_record_itunes_compat ()</h3>
+<pre class="programlisting"><span class="returnvalue">gboolean</span>
+dmap_av_record_itunes_compat (<em class="parameter"><code><a class="link" href="DmapAvRecord.html" title="DmapAvRecord"><span class="type">DmapAvRecord</span></a> *record</code></em>);</pre>
+<div class="refsect3">
+<a name="dmap-av-record-itunes-compat.parameters"></a><h4>Parameters</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="parameters_name">
+<col class="parameters_description">
+<col width="200px" class="parameters_annotations">
+</colgroup>
+<tbody><tr>
+<td class="parameter_name"><p>record</p></td>
+<td class="parameter_description"><p>A DmapAvRecord.</p></td>
+<td class="parameter_annotations"> </td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="dmap-av-record-itunes-compat.returns"></a><h4>Returns</h4>
+<p> TRUE if record is compatible with iTunes, else FALSE.</p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="dmap-av-record-read"></a><h3>dmap_av_record_read ()</h3>
+<pre class="programlisting"><span class="returnvalue">GInputStream</span> *
+dmap_av_record_read (<em class="parameter"><code><a class="link" href="DmapAvRecord.html" title="DmapAvRecord"><span class="type">DmapAvRecord</span></a> *record</code></em>,
+                     <em class="parameter"><code><span class="type">GError</span> **err</code></em>);</pre>
+<div class="refsect3">
+<a name="dmap-av-record-read.parameters"></a><h4>Parameters</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="parameters_name">
+<col class="parameters_description">
+<col width="200px" class="parameters_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="parameter_name"><p>record</p></td>
+<td class="parameter_description"><p>a DmapAvRecord.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>err</p></td>
+<td class="parameter_description"><p>a GError.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="dmap-av-record-read.returns"></a><h4>Returns</h4>
+<p>A GInputStream that provides read-only access to the data stream
+associated with record. </p>
+<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="dmap-av-record-cmp-by-album"></a><h3>dmap_av_record_cmp_by_album ()</h3>
+<pre class="programlisting"><span class="returnvalue">gint</span>
+dmap_av_record_cmp_by_album (<em class="parameter"><code><span class="type">gpointer</span> a</code></em>,
+                             <em class="parameter"><code><span class="type">gpointer</span> b</code></em>,
+                             <em class="parameter"><code><a class="link" href="DmapDb.html" title="DmapDb"><span class="type">DmapDb</span></a> *db</code></em>);</pre>
+<p>Compares the two records associated with the provided keys according
+to album. Suitable to sort lists of albums.</p>
+<div class="refsect3">
+<a name="dmap-av-record-cmp-by-album.parameters"></a><h4>Parameters</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="parameters_name">
+<col class="parameters_description">
+<col width="200px" class="parameters_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="parameter_name"><p>a</p></td>
+<td class="parameter_description"><p>first ID.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>b</p></td>
+<td class="parameter_description"><p>second ID.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>db</p></td>
+<td class="parameter_description"><p>A DmapDb for which a and b are valid ID's.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="refsect1">
+<a name="DmapAvRecord.property-details"></a><h2>Property Details</h2>
+<div class="refsect2">
+<a name="DmapAvRecord--bitrate"></a><h3>The <code class="literal">“bitrate”</code> property</h3>
+<pre class="programlisting">  “bitrate”                  <span class="type">int</span></pre>
+<p>Song data bitrate in Kb/s.</p>
+<p>Owner: DmapAvRecord</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: &gt;= 0</p>
+<p>Default value: 0</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapAvRecord--disc"></a><h3>The <code class="literal">“disc”</code> property</h3>
+<pre class="programlisting">  “disc”                     <span class="type">int</span></pre>
+<p>Song disc number.</p>
+<p>Owner: DmapAvRecord</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: &gt;= 0</p>
+<p>Default value: 0</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapAvRecord--duration"></a><h3>The <code class="literal">“duration”</code> property</h3>
+<pre class="programlisting">  “duration”                 <span class="type">int</span></pre>
+<p>Song duration in seconds.</p>
+<p>Owner: DmapAvRecord</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: &gt;= 0</p>
+<p>Default value: 0</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapAvRecord--filesize"></a><h3>The <code class="literal">“filesize”</code> property</h3>
+<pre class="programlisting">  “filesize”                 <span class="type">guint64</span></pre>
+<p>Song data size in bytes.</p>
+<p>Owner: DmapAvRecord</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: &lt;= 2147483647</p>
+<p>Default value: 0</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapAvRecord--firstseen"></a><h3>The <code class="literal">“firstseen”</code> property</h3>
+<pre class="programlisting">  “firstseen”                <span class="type">int</span></pre>
+<p>FIXME.</p>
+<p>Owner: DmapAvRecord</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: &gt;= 0</p>
+<p>Default value: 0</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapAvRecord--format"></a><h3>The <code class="literal">“format”</code> property</h3>
+<pre class="programlisting">  “format”                   <span class="type">char</span> *</pre>
+<p>Song data format.</p>
+<p>Owner: DmapAvRecord</p>
+<p>Flags: Read / Write</p>
+<p>Default value: "Unknown"</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapAvRecord--has-video"></a><h3>The <code class="literal">“has-video”</code> property</h3>
+<pre class="programlisting">  “has-video”                <span class="type">gboolean</span></pre>
+<p>Song has video component.</p>
+<p>Owner: DmapAvRecord</p>
+<p>Flags: Read / Write</p>
+<p>Default value: FALSE</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapAvRecord--hash"></a><h3>The <code class="literal">“hash”</code> property</h3>
+<pre class="programlisting">  “hash”                     <span class="type">GArray</span> *</pre>
+<p>Hash of media file contents.</p>
+<p>Owner: DmapAvRecord</p>
+<p>Flags: Read / Write</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapAvRecord--location"></a><h3>The <code class="literal">“location”</code> property</h3>
+<pre class="programlisting">  “location”                 <span class="type">char</span> *</pre>
+<p>URI pointing to song data.</p>
+<p>Owner: DmapAvRecord</p>
+<p>Flags: Read / Write</p>
+<p>Default value: NULL</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapAvRecord--mediakind"></a><h3>The <code class="literal">“mediakind”</code> property</h3>
+<pre class="programlisting">  “mediakind”                <a class="link" href="DmapRecord.html#DmapMediaKind" title="enum DmapMediaKind"><span class="type">DmapMediaKind</span></a></pre>
+<p>Media kind.</p>
+<p>Owner: DmapAvRecord</p>
+<p>Flags: Read / Write</p>
+<p>Default value: DMAP_MEDIA_KIND_MUSIC</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapAvRecord--mtime"></a><h3>The <code class="literal">“mtime”</code> property</h3>
+<pre class="programlisting">  “mtime”                    <span class="type">int</span></pre>
+<p>Song modification time.</p>
+<p>Owner: DmapAvRecord</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: &gt;= 0</p>
+<p>Default value: 0</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapAvRecord--rating"></a><h3>The <code class="literal">“rating”</code> property</h3>
+<pre class="programlisting">  “rating”                   <span class="type">int</span></pre>
+<p>Song rating.</p>
+<p>Owner: DmapAvRecord</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: [0,5]</p>
+<p>Default value: 0</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapAvRecord--songalbum"></a><h3>The <code class="literal">“songalbum”</code> property</h3>
+<pre class="programlisting">  “songalbum”                <span class="type">char</span> *</pre>
+<p>Album name.</p>
+<p>Owner: DmapAvRecord</p>
+<p>Flags: Read / Write</p>
+<p>Default value: "Unknown"</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapAvRecord--songalbumid"></a><h3>The <code class="literal">“songalbumid”</code> property</h3>
+<pre class="programlisting">  “songalbumid”              <span class="type">gint64</span></pre>
+<p>Album id.</p>
+<p>Owner: DmapAvRecord</p>
+<p>Flags: Read / Write</p>
+<p>Default value: 0</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapAvRecord--songartist"></a><h3>The <code class="literal">“songartist”</code> property</h3>
+<pre class="programlisting">  “songartist”               <span class="type">char</span> *</pre>
+<p>Song artist.</p>
+<p>Owner: DmapAvRecord</p>
+<p>Flags: Read / Write</p>
+<p>Default value: "Unknown"</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapAvRecord--songgenre"></a><h3>The <code class="literal">“songgenre”</code> property</h3>
+<pre class="programlisting">  “songgenre”                <span class="type">char</span> *</pre>
+<p>Song genre.</p>
+<p>Owner: DmapAvRecord</p>
+<p>Flags: Read / Write</p>
+<p>Default value: "Unknown"</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapAvRecord--sort-album"></a><h3>The <code class="literal">“sort-album”</code> property</h3>
+<pre class="programlisting">  “sort-album”               <span class="type">char</span> *</pre>
+<p>Album sort name.</p>
+<p>Owner: DmapAvRecord</p>
+<p>Flags: Read / Write</p>
+<p>Default value: "Unknown"</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapAvRecord--sort-artist"></a><h3>The <code class="literal">“sort-artist”</code> property</h3>
+<pre class="programlisting">  “sort-artist”              <span class="type">char</span> *</pre>
+<p>Song artist sort name.</p>
+<p>Owner: DmapAvRecord</p>
+<p>Flags: Read / Write</p>
+<p>Default value: "Unknown"</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapAvRecord--title"></a><h3>The <code class="literal">“title”</code> property</h3>
+<pre class="programlisting">  “title”                    <span class="type">char</span> *</pre>
+<p>Song title.</p>
+<p>Owner: DmapAvRecord</p>
+<p>Flags: Read / Write</p>
+<p>Default value: "Unknown"</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapAvRecord--track"></a><h3>The <code class="literal">“track”</code> property</h3>
+<pre class="programlisting">  “track”                    <span class="type">int</span></pre>
+<p>Song track number.</p>
+<p>Owner: DmapAvRecord</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: &gt;= 0</p>
+<p>Default value: 0</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapAvRecord--year"></a><h3>The <code class="literal">“year”</code> property</h3>
+<pre class="programlisting">  “year”                     <span class="type">int</span></pre>
+<p>Song publication year.</p>
+<p>Owner: DmapAvRecord</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: &gt;= 0</p>
+<p>Default value: 0</p>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.33.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/DmapAvShare.html b/doc/html/DmapAvShare.html
new file mode 100644
index 0000000..0778450
--- /dev/null
+++ b/doc/html/DmapAvShare.html
@@ -0,0 +1,121 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>DmapAvShare: libdmapsharing Reference Manual</title>
+<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
+<link rel="home" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="up" href="ch04.html" title="Libdmapsharing Objects and Interfaces">
+<link rel="prev" href="DmapAvRecord.html" title="DmapAvRecord">
+<link rel="next" href="libdmapsharing-4.0-dmap-cc.html" title="dmap-cc">
+<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
+<td width="100%" align="left" class="shortcuts">
+<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
+                  <a href="#DmapAvShare.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
+                  <a href="#DmapAvShare.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
+</td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
+<td><a accesskey="u" href="ch04.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="DmapAvRecord.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="libdmapsharing-4.0-dmap-cc.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="refentry">
+<a name="DmapAvShare"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="DmapAvShare.top_of_page"></a>DmapAvShare</span></h2>
+<p>DmapAvShare — A DAAP share.</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="DmapAvShare.functions"></a><h2>Functions</h2>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="functions_proto_type">
+<col class="functions_proto_name">
+</colgroup>
+<tbody><tr>
+<td class="function_type">
+<a class="link" href="DmapAvShare.html" title="DmapAvShare"><span class="returnvalue">DmapAvShare</span></a> *
+</td>
+<td class="function_name">
+<a class="link" href="DmapAvShare.html#dmap-av-share-new" title="dmap_av_share_new ()">dmap_av_share_new</a> <span class="c_punctuation">()</span>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="DmapAvShare.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<pre class="screen">    GObject
+    <span class="lineart">╰──</span> <a class="link" href="DmapShare.html" title="DmapShare">DmapShare</a>
+        <span class="lineart">╰──</span> DmapAvShare
+</pre>
+</div>
+<div class="refsect1">
+<a name="DmapAvShare.description"></a><h2>Description</h2>
+<p><a class="link" href="DmapAvShare.html" title="DmapAvShare"><span class="type">DmapAvShare</span></a> objects encapsulate a DAAP share.</p>
+</div>
+<div class="refsect1">
+<a name="DmapAvShare.functions_details"></a><h2>Functions</h2>
+<div class="refsect2">
+<a name="dmap-av-share-new"></a><h3>dmap_av_share_new ()</h3>
+<pre class="programlisting"><a class="link" href="DmapAvShare.html" title="DmapAvShare"><span class="returnvalue">DmapAvShare</span></a> *
+dmap_av_share_new (<em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
+                   <em class="parameter"><code>const <span class="type">char</span> *password</code></em>,
+                   <em class="parameter"><code><a class="link" href="DmapDb.html" title="DmapDb"><span class="type">DmapDb</span></a> *db</code></em>,
+                   <em class="parameter"><code><a class="link" href="DmapContainerDb.html" title="DmapContainerDb"><span class="type">DmapContainerDb</span></a> *container_db</code></em>,
+                   <em class="parameter"><code><span class="type">gchar</span> *transcode_mimetype</code></em>);</pre>
+<p>Creates a new DAAP share and publishes it using mDNS.</p>
+<div class="refsect3">
+<a name="dmap-av-share-new.parameters"></a><h4>Parameters</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="parameters_name">
+<col class="parameters_description">
+<col width="200px" class="parameters_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="parameter_name"><p>name</p></td>
+<td class="parameter_description"><p>The name that will be published by mDNS.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>password</p></td>
+<td class="parameter_description"><p>A share password or NULL. </p></td>
+<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
+</tr>
+<tr>
+<td class="parameter_name"><p>db</p></td>
+<td class="parameter_description"><p>A media database.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>container_db</p></td>
+<td class="parameter_description"><p>A container (album) database.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>transcode_mimetype</p></td>
+<td class="parameter_description"><p>A transcode mimetype or NULL. </p></td>
+<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="dmap-av-share-new.returns"></a><h4>Returns</h4>
+<p> a pointer to a DmapAvShare.</p>
+</div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.33.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/DmapConnection.html b/doc/html/DmapConnection.html
new file mode 100644
index 0000000..18cb14a
--- /dev/null
+++ b/doc/html/DmapConnection.html
@@ -0,0 +1,765 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>DmapConnection: libdmapsharing Reference Manual</title>
+<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
+<link rel="home" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="up" href="ch04.html" title="Libdmapsharing Objects and Interfaces">
+<link rel="prev" href="libdmapsharing-4.0-dmap-cc.html" title="dmap-cc">
+<link rel="next" href="DmapContainerDb.html" title="DmapContainerDb">
+<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
+<td width="100%" align="left" class="shortcuts">
+<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
+                  <a href="#DmapConnection.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
+                  <a href="#DmapConnection.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span> 
+                  <a href="#DmapConnection.properties" class="shortcut">Properties</a></span><span id="nav_signals">  <span class="dim">|</span> 
+                  <a href="#DmapConnection.signals" class="shortcut">Signals</a></span>
+</td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
+<td><a accesskey="u" href="ch04.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="libdmapsharing-4.0-dmap-cc.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="DmapContainerDb.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="refentry">
+<a name="DmapConnection"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="DmapConnection.top_of_page"></a>DmapConnection</span></h2>
+<p>DmapConnection — An abstract parent to the various connection classes.</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="DmapConnection.functions"></a><h2>Functions</h2>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="functions_proto_type">
+<col class="functions_proto_name">
+</colgroup>
+<tbody>
+<tr>
+<td class="function_type">
+<span class="returnvalue">void</span>
+</td>
+<td class="function_name">
+<span class="c_punctuation">(</span><a class="link" href="DmapConnection.html#DmapConnectionFunc" title="DmapConnectionFunc ()">*DmapConnectionFunc</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">gboolean</span>
+</td>
+<td class="function_name">
+<a class="link" href="DmapConnection.html#dmap-connection-is-connected" title="dmap_connection_is_connected ()">dmap_connection_is_connected</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">void</span>
+</td>
+<td class="function_name">
+<a class="link" href="DmapConnection.html#dmap-connection-start" title="dmap_connection_start ()">dmap_connection_start</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">void</span>
+</td>
+<td class="function_name">
+<a class="link" href="DmapConnection.html#dmap-connection-stop" title="dmap_connection_stop ()">dmap_connection_stop</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">SoupMessageHeaders</span> *
+</td>
+<td class="function_name">
+<a class="link" href="DmapConnection.html#dmap-connection-get-headers" title="dmap_connection_get_headers ()">dmap_connection_get_headers</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">GSList</span> *
+</td>
+<td class="function_name">
+<a class="link" href="DmapConnection.html#dmap-connection-get-playlists" title="dmap_connection_get_playlists ()">dmap_connection_get_playlists</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">void</span>
+</td>
+<td class="function_name">
+<a class="link" href="DmapConnection.html#dmap-connection-authenticate-message" title="dmap_connection_authenticate_message ()">dmap_connection_authenticate_message</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">void</span>
+</td>
+<td class="function_name">
+<a class="link" href="DmapConnection.html#dmap-connection-emit-error" title="dmap_connection_emit_error ()">dmap_connection_emit_error</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="DmapConnection.properties"></a><h2>Properties</h2>
+<div class="informaltable"><table class="informaltable" border="0">
+<colgroup>
+<col width="150px" class="properties_type">
+<col width="300px" class="properties_name">
+<col width="200px" class="properties_flags">
+</colgroup>
+<tbody>
+<tr>
+<td class="property_type">
+<span class="type">GUri</span> *</td>
+<td class="property_name"><a class="link" href="DmapConnection.html#DmapConnection--base-uri" title="The “base-uri” property">base-uri</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><span class="type">int</span></td>
+<td class="property_name"><a class="link" href="DmapConnection.html#DmapConnection--database-id" title="The “database-id” property">database-id</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type">
+<a class="link" href="DmapDb.html" title="DmapDb"><span class="type">DmapDb</span></a> *</td>
+<td class="property_name"><a class="link" href="DmapConnection.html#DmapConnection--db" title="The “db” property">db</a></td>
+<td class="property_flags">Read / Write / Construct Only</td>
+</tr>
+<tr>
+<td class="property_type"><span class="type">double</span></td>
+<td class="property_name"><a class="link" href="DmapConnection.html#DmapConnection--dmap-version" title="The “dmap-version” property">dmap-version</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type">
+<a class="link" href="DmapRecordFactory.html" title="DmapRecordFactory"><span class="type">DmapRecordFactory</span></a> *</td>
+<td class="property_name"><a class="link" href="DmapConnection.html#DmapConnection--factory" title="The “factory” property">factory</a></td>
+<td class="property_flags">Read / Write / Construct Only</td>
+</tr>
+<tr>
+<td class="property_type">
+<span class="type">char</span> *</td>
+<td class="property_name"><a class="link" href="DmapConnection.html#DmapConnection--host" title="The “host” property">host</a></td>
+<td class="property_flags">Read / Write / Construct Only</td>
+</tr>
+<tr>
+<td class="property_type">
+<span class="type">char</span> *</td>
+<td class="property_name"><a class="link" href="DmapConnection.html#DmapConnection--name" title="The “name” property">name</a></td>
+<td class="property_flags">Read / Write / Construct Only</td>
+</tr>
+<tr>
+<td class="property_type">
+<span class="type">char</span> *</td>
+<td class="property_name"><a class="link" href="DmapConnection.html#DmapConnection--password" title="The “password” property">password</a></td>
+<td class="property_flags">Write</td>
+</tr>
+<tr>
+<td class="property_type"><span class="type">guint</span></td>
+<td class="property_name"><a class="link" href="DmapConnection.html#DmapConnection--port" title="The “port” property">port</a></td>
+<td class="property_flags">Read / Write / Construct Only</td>
+</tr>
+<tr>
+<td class="property_type"><span class="type">int</span></td>
+<td class="property_name"><a class="link" href="DmapConnection.html#DmapConnection--revision-number" title="The “revision-number” property">revision-number</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><span class="type">int</span></td>
+<td class="property_name"><a class="link" href="DmapConnection.html#DmapConnection--session-id" title="The “session-id” property">session-id</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type">
+<span class="type">char</span> *</td>
+<td class="property_name"><a class="link" href="DmapConnection.html#DmapConnection--username" title="The “username” property">username</a></td>
+<td class="property_flags">Read / Write / Construct Only</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="DmapConnection.signals"></a><h2>Signals</h2>
+<div class="informaltable"><table class="informaltable" border="0">
+<colgroup>
+<col width="150px" class="signal_proto_type">
+<col width="300px" class="signal_proto_name">
+<col width="200px" class="signal_proto_flags">
+</colgroup>
+<tbody>
+<tr>
+<td class="signal_type"><span class="returnvalue">void</span></td>
+<td class="signal_name"><a class="link" href="DmapConnection.html#DmapConnection-authenticate" title="The “authenticate” signal">authenticate</a></td>
+<td class="signal_flags">Run Last</td>
+</tr>
+<tr>
+<td class="signal_type"><span class="returnvalue">void</span></td>
+<td class="signal_name"><a class="link" href="DmapConnection.html#DmapConnection-connected" title="The “connected” signal">connected</a></td>
+<td class="signal_flags">Run Last</td>
+</tr>
+<tr>
+<td class="signal_type"><span class="returnvalue">void</span></td>
+<td class="signal_name"><a class="link" href="DmapConnection.html#DmapConnection-connecting" title="The “connecting” signal">connecting</a></td>
+<td class="signal_flags">Run Last</td>
+</tr>
+<tr>
+<td class="signal_type"><span class="returnvalue">void</span></td>
+<td class="signal_name"><a class="link" href="DmapConnection.html#DmapConnection-disconnected" title="The “disconnected” signal">disconnected</a></td>
+<td class="signal_flags">Run Last</td>
+</tr>
+<tr>
+<td class="signal_type"><span class="returnvalue">void</span></td>
+<td class="signal_name"><a class="link" href="DmapConnection.html#DmapConnection-error" title="The “error” signal">error</a></td>
+<td class="signal_flags">Run First</td>
+</tr>
+<tr>
+<td class="signal_type"><span class="returnvalue">void</span></td>
+<td class="signal_name"><a class="link" href="DmapConnection.html#DmapConnection-operation-done" title="The “operation-done” signal">operation-done</a></td>
+<td class="signal_flags">Run First</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="DmapConnection.other"></a><h2>Types and Values</h2>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="other_proto_type">
+<col class="other_proto_name">
+</colgroup>
+<tbody>
+<tr>
+<td class="datatype_keyword"> </td>
+<td class="function_name"><a class="link" href="DmapConnection.html#DmapPlaylist" title="DmapPlaylist">DmapPlaylist</a></td>
+</tr>
+<tr>
+<td class="datatype_keyword">enum</td>
+<td class="function_name"><a class="link" href="DmapConnection.html#DmapConnectionState" title="enum DmapConnectionState">DmapConnectionState</a></td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="DmapConnection.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<pre class="screen">    <a href="/usr/share/gtk-doc/html/gobject/gobject-Enumeration-and-Flag-Types.html">GEnum</a>
+    <span class="lineart">╰──</span> DmapConnectionState
+    GObject
+    <span class="lineart">╰──</span> DmapConnection
+        <span class="lineart">├──</span> <a class="link" href="DmapAvConnection.html" title="DmapAvConnection">DmapAvConnection</a>
+        <span class="lineart">├──</span> <a class="link" href="DmapControlConnection.html" title="DmapControlConnection">DmapControlConnection</a>
+        <span class="lineart">╰──</span> <a class="link" href="DmapImageConnection.html" title="DmapImageConnection">DmapImageConnection</a>
+</pre>
+</div>
+<div class="refsect1">
+<a name="DmapConnection.description"></a><h2>Description</h2>
+<p><a class="link" href="DmapConnection.html" title="DmapConnection"><span class="type">DmapConnection</span></a> provides an abstract parent to the <a class="link" href="DmapAvConnection.html" title="DmapAvConnection"><span class="type">DmapAvConnection</span></a>, <a class="link" href="DmapControlConnection.html" title="DmapControlConnection"><span class="type">DmapControlConnection</span></a>, and <a class="link" href="DmapImageConnection.html" title="DmapImageConnection"><span class="type">DmapImageConnection</span></a> classes.</p>
+</div>
+<div class="refsect1">
+<a name="DmapConnection.functions_details"></a><h2>Functions</h2>
+<div class="refsect2">
+<a name="DmapConnectionFunc"></a><h3>DmapConnectionFunc ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+<span class="c_punctuation">(</span>*DmapConnectionFunc<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="DmapConnection.html" title="DmapConnection"><span class="type">DmapConnection</span></a> *connection</code></em>,
+                       <em class="parameter"><code><span class="type">gboolean</span> result</code></em>,
+                       <em class="parameter"><code>const <span class="type">char</span> *reason</code></em>,
+                       <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="dmap-connection-is-connected"></a><h3>dmap_connection_is_connected ()</h3>
+<pre class="programlisting"><span class="returnvalue">gboolean</span>
+dmap_connection_is_connected (<em class="parameter"><code><a class="link" href="DmapConnection.html" title="DmapConnection"><span class="type">DmapConnection</span></a> *connection</code></em>);</pre>
+<p>Returns TRUE if the connection is presently connected.</p>
+<div class="refsect3">
+<a name="dmap-connection-is-connected.parameters"></a><h4>Parameters</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="parameters_name">
+<col class="parameters_description">
+<col width="200px" class="parameters_annotations">
+</colgroup>
+<tbody><tr>
+<td class="parameter_name"><p>connection</p></td>
+<td class="parameter_description"><p>The connection.</p></td>
+<td class="parameter_annotations"> </td>
+</tr></tbody>
+</table></div>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="dmap-connection-start"></a><h3>dmap_connection_start ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+dmap_connection_start (<em class="parameter"><code><a class="link" href="DmapConnection.html" title="DmapConnection"><span class="type">DmapConnection</span></a> *connection</code></em>,
+                       <em class="parameter"><code><a class="link" href="DmapConnection.html#DmapConnectionFunc" title="DmapConnectionFunc ()"><span class="type">DmapConnectionFunc</span></a> callback</code></em>,
+                       <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);</pre>
+<p>Connect to the remote DMAP share.</p>
+<div class="refsect3">
+<a name="dmap-connection-start.parameters"></a><h4>Parameters</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="parameters_name">
+<col class="parameters_description">
+<col width="200px" class="parameters_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="parameter_name"><p>connection</p></td>
+<td class="parameter_description"><p>The connection.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>callback</p></td>
+<td class="parameter_description"><p>The function to call once the connection is complete. </p></td>
+<td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span></td>
+</tr>
+<tr>
+<td class="parameter_name"><p>user_data</p></td>
+<td class="parameter_description"><p>The data to pass to the callback.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="dmap-connection-stop"></a><h3>dmap_connection_stop ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+dmap_connection_stop (<em class="parameter"><code><a class="link" href="DmapConnection.html" title="DmapConnection"><span class="type">DmapConnection</span></a> *connection</code></em>,
+                      <em class="parameter"><code><a class="link" href="DmapConnection.html#DmapConnectionFunc" title="DmapConnectionFunc ()"><span class="type">DmapConnectionFunc</span></a> callback</code></em>,
+                      <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);</pre>
+<p>Disconnect from the remote DMAP share.</p>
+<div class="refsect3">
+<a name="dmap-connection-stop.parameters"></a><h4>Parameters</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="parameters_name">
+<col class="parameters_description">
+<col width="200px" class="parameters_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="parameter_name"><p>connection</p></td>
+<td class="parameter_description"><p>The connection.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>callback</p></td>
+<td class="parameter_description"><p>The function to call once the connection is complete. </p></td>
+<td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span></td>
+</tr>
+<tr>
+<td class="parameter_name"><p>user_data</p></td>
+<td class="parameter_description"><p>The data to pass to the callback.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="dmap-connection-get-headers"></a><h3>dmap_connection_get_headers ()</h3>
+<pre class="programlisting"><span class="returnvalue">SoupMessageHeaders</span> *
+dmap_connection_get_headers (<em class="parameter"><code><a class="link" href="DmapConnection.html" title="DmapConnection"><span class="type">DmapConnection</span></a> *connection</code></em>,
+                             <em class="parameter"><code>const <span class="type">char</span> *uri</code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="dmap-connection-get-playlists"></a><h3>dmap_connection_get_playlists ()</h3>
+<pre class="programlisting"><span class="returnvalue">GSList</span> *
+dmap_connection_get_playlists (<em class="parameter"><code><a class="link" href="DmapConnection.html" title="DmapConnection"><span class="type">DmapConnection</span></a> *connection</code></em>);</pre>
+<p>Get the playlists associated with a <a class="link" href="DmapConnection.html" title="DmapConnection"><span class="type">DmapConnection</span></a> instance.</p>
+<div class="refsect3">
+<a name="dmap-connection-get-playlists.parameters"></a><h4>Parameters</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="parameters_name">
+<col class="parameters_description">
+<col width="200px" class="parameters_annotations">
+</colgroup>
+<tbody><tr>
+<td class="parameter_name"><p>connection</p></td>
+<td class="parameter_description"><p>A <a class="link" href="DmapConnection.html" title="DmapConnection"><span class="type">DmapConnection</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="dmap-connection-get-playlists.returns"></a><h4>Returns</h4>
+<p>pointer to a list of playlists. </p>
+<p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> DmapPlaylist][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="dmap-connection-authenticate-message"></a><h3>dmap_connection_authenticate_message ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+dmap_connection_authenticate_message (<em class="parameter"><code><a class="link" href="DmapConnection.html" title="DmapConnection"><span class="type">DmapConnection</span></a> *connection</code></em>,
+                                      <em class="parameter"><code><span class="type">SoupSession</span> *session</code></em>,
+                                      <em class="parameter"><code><span class="type">SoupMessage</span> *message</code></em>,
+                                      <em class="parameter"><code><span class="type">SoupAuth</span> *auth</code></em>,
+                                      <em class="parameter"><code>const <span class="type">char</span> *password</code></em>);</pre>
+<p>Attach an authentication credential to a request. This
+method should be called by a function that is connected to the
+<a class="link" href="DmapConnection.html#DmapConnection-authenticate" title="The “authenticate” signal"><span class="type">“authenticate”</span></a> signal. The signal will provide the
+connection, session, message and auth to that function. That function
+should obtain a password and provide it to this method.</p>
+<div class="refsect3">
+<a name="dmap-connection-authenticate-message.parameters"></a><h4>Parameters</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="parameters_name">
+<col class="parameters_description">
+<col width="200px" class="parameters_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="parameter_name"><p>connection</p></td>
+<td class="parameter_description"><p>A <a class="link" href="DmapConnection.html" title="DmapConnection"><span class="type">DmapConnection</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>session</p></td>
+<td class="parameter_description"><p>A <span class="type">SoupSession</span></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>message</p></td>
+<td class="parameter_description"><p>A <span class="type">SoupMessage</span></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>auth</p></td>
+<td class="parameter_description"><p>A <span class="type">SoupAuth</span></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>password</p></td>
+<td class="parameter_description"><p>A password</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="dmap-connection-emit-error"></a><h3>dmap_connection_emit_error ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+dmap_connection_emit_error (<em class="parameter"><code><a class="link" href="DmapConnection.html" title="DmapConnection"><span class="type">DmapConnection</span></a> *connection</code></em>,
+                            <em class="parameter"><code><span class="type">gint</span> code</code></em>,
+                            <em class="parameter"><code>const <span class="type">gchar</span> *format</code></em>,
+                            <em class="parameter"><code>...</code></em>);</pre>
+<div class="refsect3">
+<a name="dmap-connection-emit-error.parameters"></a><h4>Parameters</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="parameters_name">
+<col class="parameters_description">
+<col width="200px" class="parameters_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="parameter_name"><p>connection</p></td>
+<td class="parameter_description"><p>a <a class="link" href="DmapConnection.html" title="DmapConnection"><span class="type">DmapConnection</span></a> instance.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>code</p></td>
+<td class="parameter_description"><p>error code.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>format</p></td>
+<td class="parameter_description"><p>printf()-style format for error message</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>...</p></td>
+<td class="parameter_description"><p>parameters for message format</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="refsect1">
+<a name="DmapConnection.other_details"></a><h2>Types and Values</h2>
+<div class="refsect2">
+<a name="DmapPlaylist"></a><h3>DmapPlaylist</h3>
+<pre class="programlisting">typedef struct {
+	char *name;
+	int id;
+	GList *uris;
+} DmapPlaylist;
+</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapConnectionState"></a><h3>enum DmapConnectionState</h3>
+<p>Enumeration of connection states.</p>
+<div class="refsect3">
+<a name="DmapConnectionState.members"></a><h4>Members</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="300px" class="enum_members_name">
+<col class="enum_members_description">
+<col width="200px" class="enum_members_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-GET-INFO:CAPS"></a>DMAP_GET_INFO</p></td>
+<td class="enum_member_description">
+<p>getting DMAP server information</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-LOGIN:CAPS"></a>DMAP_LOGIN</p></td>
+<td class="enum_member_description">
+<p>logging in to DMAP server</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-GET-REVISION-NUMBER:CAPS"></a>DMAP_GET_REVISION_NUMBER</p></td>
+<td class="enum_member_description">
+<p>getting server's database revision number</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-GET-DB-INFO:CAPS"></a>DMAP_GET_DB_INFO</p></td>
+<td class="enum_member_description">
+<p>getting DMAP database information</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-GET-MEDIA:CAPS"></a>DMAP_GET_MEDIA</p></td>
+<td class="enum_member_description">
+<p>getting DMAP media listing</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-GET-PLAYLISTS:CAPS"></a>DMAP_GET_PLAYLISTS</p></td>
+<td class="enum_member_description">
+<p>getting DMAP playlists</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-GET-PLAYLIST-ENTRIES:CAPS"></a>DMAP_GET_PLAYLIST_ENTRIES</p></td>
+<td class="enum_member_description">
+<p>getting entries in playlist</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-LOGOUT:CAPS"></a>DMAP_LOGOUT</p></td>
+<td class="enum_member_description">
+<p>logging out of DMAP server</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-DONE:CAPS"></a>DMAP_DONE</p></td>
+<td class="enum_member_description">
+<p>done</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="refsect1">
+<a name="DmapConnection.property-details"></a><h2>Property Details</h2>
+<div class="refsect2">
+<a name="DmapConnection--base-uri"></a><h3>The <code class="literal">“base-uri”</code> property</h3>
+<pre class="programlisting">  “base-uri”                 <span class="type">GUri</span> *</pre>
+<p>base URI.</p>
+<p>Owner: DmapConnection</p>
+<p>Flags: Read / Write</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapConnection--database-id"></a><h3>The <code class="literal">“database-id”</code> property</h3>
+<pre class="programlisting">  “database-id”              <span class="type">int</span></pre>
+<p>database ID.</p>
+<p>Owner: DmapConnection</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: &gt;= 0</p>
+<p>Default value: 0</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapConnection--db"></a><h3>The <code class="literal">“db”</code> property</h3>
+<pre class="programlisting">  “db”                       <a class="link" href="DmapDb.html" title="DmapDb"><span class="type">DmapDb</span></a> *</pre>
+<p>DmapDb object.</p>
+<p>Owner: DmapConnection</p>
+<p>Flags: Read / Write / Construct Only</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapConnection--dmap-version"></a><h3>The <code class="literal">“dmap-version”</code> property</h3>
+<pre class="programlisting">  “dmap-version”             <span class="type">double</span></pre>
+<p>DMAP version.</p>
+<p>Owner: DmapConnection</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: &gt;= 0</p>
+<p>Default value: 0</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapConnection--factory"></a><h3>The <code class="literal">“factory”</code> property</h3>
+<pre class="programlisting">  “factory”                  <a class="link" href="DmapRecordFactory.html" title="DmapRecordFactory"><span class="type">DmapRecordFactory</span></a> *</pre>
+<p>record factory.</p>
+<p>Owner: DmapConnection</p>
+<p>Flags: Read / Write / Construct Only</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapConnection--host"></a><h3>The <code class="literal">“host”</code> property</h3>
+<pre class="programlisting">  “host”                     <span class="type">char</span> *</pre>
+<p>host.</p>
+<p>Owner: DmapConnection</p>
+<p>Flags: Read / Write / Construct Only</p>
+<p>Default value: NULL</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapConnection--name"></a><h3>The <code class="literal">“name”</code> property</h3>
+<pre class="programlisting">  “name”                     <span class="type">char</span> *</pre>
+<p>connection name.</p>
+<p>Owner: DmapConnection</p>
+<p>Flags: Read / Write / Construct Only</p>
+<p>Default value: NULL</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapConnection--password"></a><h3>The <code class="literal">“password”</code> property</h3>
+<pre class="programlisting">  “password”                 <span class="type">char</span> *</pre>
+<p>connection password.</p>
+<p>Owner: DmapConnection</p>
+<p>Flags: Write</p>
+<p>Default value: NULL</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapConnection--port"></a><h3>The <code class="literal">“port”</code> property</h3>
+<pre class="programlisting">  “port”                     <span class="type">guint</span></pre>
+<p>port.</p>
+<p>Owner: DmapConnection</p>
+<p>Flags: Read / Write / Construct Only</p>
+<p>Allowed values: &lt;= G_MAXINT</p>
+<p>Default value: 0</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapConnection--revision-number"></a><h3>The <code class="literal">“revision-number”</code> property</h3>
+<pre class="programlisting">  “revision-number”          <span class="type">int</span></pre>
+<p>revision number.</p>
+<p>Owner: DmapConnection</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: &gt;= 0</p>
+<p>Default value: 0</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapConnection--session-id"></a><h3>The <code class="literal">“session-id”</code> property</h3>
+<pre class="programlisting">  “session-id”               <span class="type">int</span></pre>
+<p>session ID.</p>
+<p>Owner: DmapConnection</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: &gt;= 0</p>
+<p>Default value: 0</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapConnection--username"></a><h3>The <code class="literal">“username”</code> property</h3>
+<pre class="programlisting">  “username”                 <span class="type">char</span> *</pre>
+<p>connection username.</p>
+<p>Owner: DmapConnection</p>
+<p>Flags: Read / Write / Construct Only</p>
+<p>Default value: "libdmapsharing"</p>
+</div>
+</div>
+<div class="refsect1">
+<a name="DmapConnection.signal-details"></a><h2>Signal Details</h2>
+<div class="refsect2">
+<a name="DmapConnection-authenticate"></a><h3>The <code class="literal">“authenticate”</code> signal</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+user_function (<a class="link" href="DmapConnection.html" title="DmapConnection"><span class="type">DmapConnection</span></a> *dmapconnection,
+               <span class="type">char</span>           *arg1,
+               <span class="type">SoupSession</span>    *arg2,
+               <span class="type">SoupMessage</span>    *arg3,
+               <span class="type">SoupAuth</span>       *arg4,
+               <span class="type">gboolean</span>        arg5,
+               <span class="type">gpointer</span>        user_data)</pre>
+<p>Flags: Run Last</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapConnection-connected"></a><h3>The <code class="literal">“connected”</code> signal</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+user_function (<a class="link" href="DmapConnection.html" title="DmapConnection"><span class="type">DmapConnection</span></a> *dmapconnection,
+               <span class="type">gpointer</span>        user_data)</pre>
+<p>Flags: Run Last</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapConnection-connecting"></a><h3>The <code class="literal">“connecting”</code> signal</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+user_function (<a class="link" href="DmapConnection.html" title="DmapConnection"><span class="type">DmapConnection</span></a> *dmapconnection,
+               <span class="type">gulong</span>          arg1,
+               <span class="type">float</span>           arg2,
+               <span class="type">gpointer</span>        user_data)</pre>
+<p>Flags: Run Last</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapConnection-disconnected"></a><h3>The <code class="literal">“disconnected”</code> signal</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+user_function (<a class="link" href="DmapConnection.html" title="DmapConnection"><span class="type">DmapConnection</span></a> *dmapconnection,
+               <span class="type">gpointer</span>        user_data)</pre>
+<p>Flags: Run Last</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapConnection-error"></a><h3>The <code class="literal">“error”</code> signal</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+user_function (<a class="link" href="DmapConnection.html" title="DmapConnection"><span class="type">DmapConnection</span></a> *dmapconnection,
+               <span class="type">gpointer</span>        arg1,
+               <span class="type">gpointer</span>        user_data)</pre>
+<p>Flags: Run First</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapConnection-operation-done"></a><h3>The <code class="literal">“operation-done”</code> signal</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+user_function (<a class="link" href="DmapConnection.html" title="DmapConnection"><span class="type">DmapConnection</span></a> *dmapconnection,
+               <span class="type">gpointer</span>        user_data)</pre>
+<p>Flags: Run First</p>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.33.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/DMAPContainerDb.html b/doc/html/DmapContainerDb.html
similarity index 52%
rename from doc/html/DMAPContainerDb.html
rename to doc/html/DmapContainerDb.html
index 74b263d..f28f1c6 100644
--- a/doc/html/DMAPContainerDb.html
+++ b/doc/html/DmapContainerDb.html
@@ -2,38 +2,38 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>DMAPContainerDb: libdmapsharing-3.0 Reference Manual</title>
+<title>DmapContainerDb: libdmapsharing Reference Manual</title>
 <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
-<link rel="home" href="index.html" title="libdmapsharing-3.0 Reference Manual">
-<link rel="up" href="ch01.html" title="Libdmapsharing overview">
-<link rel="prev" href="libdmapsharing-3.0-dmap-connection.html" title="dmap-connection">
-<link rel="next" href="DMAPContainerRecord.html" title="DMAPContainerRecord">
-<meta name="generator" content="GTK-Doc V1.32 (XML mode)">
+<link rel="home" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="up" href="ch04.html" title="Libdmapsharing Objects and Interfaces">
+<link rel="prev" href="DmapConnection.html" title="DmapConnection">
+<link rel="next" href="DmapContainerRecord.html" title="DmapContainerRecord">
+<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
 <td width="100%" align="left" class="shortcuts">
 <a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
-                  <a href="#DMAPContainerDb.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
-                  <a href="#DMAPContainerDb.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
+                  <a href="#DmapContainerDb.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
+                  <a href="#DmapContainerDb.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
 </td>
 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
-<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
-<td><a accesskey="p" href="libdmapsharing-3.0-dmap-connection.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="DMAPContainerRecord.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+<td><a accesskey="u" href="ch04.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="DmapConnection.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="DmapContainerRecord.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
 </tr></table>
 <div class="refentry">
-<a name="DMAPContainerDb"></a><div class="titlepage"></div>
+<a name="DmapContainerDb"></a><div class="titlepage"></div>
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
-<h2><span class="refentrytitle"><a name="DMAPContainerDb.top_of_page"></a>DMAPContainerDb</span></h2>
-<p>DMAPContainerDb</p>
+<h2><span class="refentrytitle"><a name="DmapContainerDb.top_of_page"></a>DmapContainerDb</span></h2>
+<p>DmapContainerDb — An interface for DMAP container databases.</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="DMAPContainerDb.functions"></a><h2>Functions</h2>
+<a name="DmapContainerDb.functions"></a><h2>Functions</h2>
 <div class="informaltable"><table class="informaltable" width="100%" border="0">
 <colgroup>
 <col width="150px" class="functions_proto_type">
@@ -45,15 +45,23 @@
 <span class="returnvalue">void</span>
 </td>
 <td class="function_name">
-<a class="link" href="DMAPContainerDb.html#dmap-container-db-add" title="dmap_container_db_add ()">dmap_container_db_add</a> <span class="c_punctuation">()</span>
+<span class="c_punctuation">(</span><a class="link" href="DmapContainerDb.html#DmapIdContainerRecordFunc" title="DmapIdContainerRecordFunc ()">*DmapIdContainerRecordFunc</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
 </td>
 </tr>
 <tr>
 <td class="function_type">
-<a class="link" href="DMAPContainerRecord.html" title="DMAPContainerRecord"><span class="returnvalue">DMAPContainerRecord</span></a> *
+<span class="returnvalue">void</span>
 </td>
 <td class="function_name">
-<a class="link" href="DMAPContainerDb.html#dmap-container-db-lookup-by-id" title="dmap_container_db_lookup_by_id ()">dmap_container_db_lookup_by_id</a> <span class="c_punctuation">()</span>
+<a class="link" href="DmapContainerDb.html#dmap-container-db-add" title="dmap_container_db_add ()">dmap_container_db_add</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a class="link" href="DmapContainerRecord.html" title="DmapContainerRecord"><span class="returnvalue">DmapContainerRecord</span></a> *
+</td>
+<td class="function_name">
+<a class="link" href="DmapContainerDb.html#dmap-container-db-lookup-by-id" title="dmap_container_db_lookup_by_id ()">dmap_container_db_lookup_by_id</a> <span class="c_punctuation">()</span>
 </td>
 </tr>
 <tr>
@@ -61,7 +69,7 @@
 <span class="returnvalue">void</span>
 </td>
 <td class="function_name">
-<a class="link" href="DMAPContainerDb.html#dmap-container-db-foreach" title="dmap_container_db_foreach ()">dmap_container_db_foreach</a> <span class="c_punctuation">()</span>
+<a class="link" href="DmapContainerDb.html#dmap-container-db-foreach" title="dmap_container_db_foreach ()">dmap_container_db_foreach</a> <span class="c_punctuation">()</span>
 </td>
 </tr>
 <tr>
@@ -69,28 +77,66 @@
 <span class="returnvalue">gulong</span>
 </td>
 <td class="function_name">
-<a class="link" href="DMAPContainerDb.html#dmap-container-db-count" title="dmap_container_db_count ()">dmap_container_db_count</a> <span class="c_punctuation">()</span>
+<a class="link" href="DmapContainerDb.html#dmap-container-db-count" title="dmap_container_db_count ()">dmap_container_db_count</a> <span class="c_punctuation">()</span>
 </td>
 </tr>
 </tbody>
 </table></div>
 </div>
 <div class="refsect1">
-<a name="DMAPContainerDb.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<a name="DmapContainerDb.object-hierarchy"></a><h2>Object Hierarchy</h2>
 <pre class="screen">    <a href="/usr/share/gtk-doc/html/gobject/GTypeModule.html">GInterface</a>
-    <span class="lineart">╰──</span> DMAPContainerDb
+    <span class="lineart">╰──</span> DmapContainerDb
 </pre>
 </div>
 <div class="refsect1">
-<a name="DMAPContainerDb.description"></a><h2>Description</h2>
+<a name="DmapContainerDb.description"></a><h2>Description</h2>
+<p><a class="link" href="DmapContainerDb.html" title="DmapContainerDb"><span class="type">DmapContainerDb</span></a> provides an interface for DMAP container databases.</p>
 </div>
 <div class="refsect1">
-<a name="DMAPContainerDb.functions_details"></a><h2>Functions</h2>
+<a name="DmapContainerDb.functions_details"></a><h2>Functions</h2>
+<div class="refsect2">
+<a name="DmapIdContainerRecordFunc"></a><h3>DmapIdContainerRecordFunc ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+<span class="c_punctuation">(</span>*DmapIdContainerRecordFunc<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">guint</span> id</code></em>,
+                              <em class="parameter"><code><a class="link" href="DmapContainerRecord.html" title="DmapContainerRecord"><span class="type">DmapContainerRecord</span></a> *record</code></em>,
+                              <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);</pre>
+<p>The type of function passed to <a class="link" href="DmapContainerDb.html#dmap-container-db-foreach" title="dmap_container_db_foreach ()"><code class="function">dmap_container_db_foreach()</code></a>.</p>
+<div class="refsect3">
+<a name="DmapIdContainerRecordFunc.parameters"></a><h4>Parameters</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="parameters_name">
+<col class="parameters_description">
+<col width="200px" class="parameters_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="parameter_name"><p>id</p></td>
+<td class="parameter_description"><p>a DMAP container record ID</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>record</p></td>
+<td class="parameter_description"><p>a <a class="link" href="DmapContainerRecord.html" title="DmapContainerRecord"><span class="type">DmapContainerRecord</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>user_data</p></td>
+<td class="parameter_description"><p>user data. </p></td>
+<td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+<hr>
 <div class="refsect2">
 <a name="dmap-container-db-add"></a><h3>dmap_container_db_add ()</h3>
 <pre class="programlisting"><span class="returnvalue">void</span>
-dmap_container_db_add (<em class="parameter"><code><a class="link" href="DMAPContainerDb.html" title="DMAPContainerDb"><span class="type">DMAPContainerDb</span></a> *db</code></em>,
-                       <em class="parameter"><code><a class="link" href="DMAPContainerRecord.html" title="DMAPContainerRecord"><span class="type">DMAPContainerRecord</span></a> *record</code></em>);</pre>
+dmap_container_db_add (<em class="parameter"><code><a class="link" href="DmapContainerDb.html" title="DmapContainerDb"><span class="type">DmapContainerDb</span></a> *db</code></em>,
+                       <em class="parameter"><code><a class="link" href="DmapContainerRecord.html" title="DmapContainerRecord"><span class="type">DmapContainerRecord</span></a> *record</code></em>,
+                       <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
 <p>Add a record to the database.</p>
 <div class="refsect3">
 <a name="dmap-container-db-add.parameters"></a><h4>Parameters</h4>
@@ -111,6 +157,11 @@ dmap_container_db_add (<em class="parameter"><code><a class="link" href="DMAPCon
 <td class="parameter_description"><p>A record.</p></td>
 <td class="parameter_annotations"> </td>
 </tr>
+<tr>
+<td class="parameter_name"><p>error</p></td>
+<td class="parameter_description"><p>return location for a GError, or NULL.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
 </tbody>
 </table></div>
 </div>
@@ -118,8 +169,8 @@ dmap_container_db_add (<em class="parameter"><code><a class="link" href="DMAPCon
 <hr>
 <div class="refsect2">
 <a name="dmap-container-db-lookup-by-id"></a><h3>dmap_container_db_lookup_by_id ()</h3>
-<pre class="programlisting"><a class="link" href="DMAPContainerRecord.html" title="DMAPContainerRecord"><span class="returnvalue">DMAPContainerRecord</span></a> *
-dmap_container_db_lookup_by_id (<em class="parameter"><code><a class="link" href="DMAPContainerDb.html" title="DMAPContainerDb"><span class="type">DMAPContainerDb</span></a> *db</code></em>,
+<pre class="programlisting"><a class="link" href="DmapContainerRecord.html" title="DmapContainerRecord"><span class="returnvalue">DmapContainerRecord</span></a> *
+dmap_container_db_lookup_by_id (<em class="parameter"><code><a class="link" href="DmapContainerDb.html" title="DmapContainerDb"><span class="type">DmapContainerDb</span></a> *db</code></em>,
                                 <em class="parameter"><code><span class="type">guint</span> id</code></em>);</pre>
 <div class="refsect3">
 <a name="dmap-container-db-lookup-by-id.parameters"></a><h4>Parameters</h4>
@@ -145,17 +196,18 @@ dmap_container_db_lookup_by_id (<em class="parameter"><code><a class="link" href
 </div>
 <div class="refsect3">
 <a name="dmap-container-db-lookup-by-id.returns"></a><h4>Returns</h4>
-<p> the database record corresponding to <em class="parameter"><code>id</code></em>
+<p>the database record corresponding to <em class="parameter"><code>id</code></em>
 . This record should
-be unrefed when no longer required.</p>
+be unrefed when no longer required. </p>
+<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
 </div>
 </div>
 <hr>
 <div class="refsect2">
 <a name="dmap-container-db-foreach"></a><h3>dmap_container_db_foreach ()</h3>
 <pre class="programlisting"><span class="returnvalue">void</span>
-dmap_container_db_foreach (<em class="parameter"><code><a class="link" href="DMAPContainerDb.html" title="DMAPContainerDb"><span class="type">DMAPContainerDb</span></a> *db</code></em>,
-                           <em class="parameter"><code><span class="type">GHFunc</span> func</code></em>,
+dmap_container_db_foreach (<em class="parameter"><code><a class="link" href="DmapContainerDb.html" title="DmapContainerDb"><span class="type">DmapContainerDb</span></a> *db</code></em>,
+                           <em class="parameter"><code><a class="link" href="DmapContainerDb.html#DmapIdContainerRecordFunc" title="DmapIdContainerRecordFunc ()"><span class="type">DmapIdContainerRecordFunc</span></a> func</code></em>,
                            <em class="parameter"><code><span class="type">gpointer</span> data</code></em>);</pre>
 <p>Apply a function to each record in a container database.</p>
 <div class="refsect3">
@@ -174,8 +226,8 @@ dmap_container_db_foreach (<em class="parameter"><code><a class="link" href="DMA
 </tr>
 <tr>
 <td class="parameter_name"><p>func</p></td>
-<td class="parameter_description"><p>The function to apply to each record in the database.</p></td>
-<td class="parameter_annotations"> </td>
+<td class="parameter_description"><p>The function to apply to each record in the database. </p></td>
+<td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid only during the call to the method."><span class="acronym">scope call</span></acronym>]</span></td>
 </tr>
 <tr>
 <td class="parameter_name"><p>data</p></td>
@@ -190,7 +242,7 @@ dmap_container_db_foreach (<em class="parameter"><code><a class="link" href="DMA
 <div class="refsect2">
 <a name="dmap-container-db-count"></a><h3>dmap_container_db_count ()</h3>
 <pre class="programlisting"><span class="returnvalue">gulong</span>
-dmap_container_db_count (<em class="parameter"><code><a class="link" href="DMAPContainerDb.html" title="DMAPContainerDb"><span class="type">DMAPContainerDb</span></a> *db</code></em>);</pre>
+dmap_container_db_count (<em class="parameter"><code><a class="link" href="DmapContainerDb.html" title="DmapContainerDb"><span class="type">DmapContainerDb</span></a> *db</code></em>);</pre>
 <div class="refsect3">
 <a name="dmap-container-db-count.parameters"></a><h4>Parameters</h4>
 <div class="informaltable"><table class="informaltable" width="100%" border="0">
@@ -214,6 +266,6 @@ dmap_container_db_count (<em class="parameter"><code><a class="link" href="DMAPC
 </div>
 </div>
 <div class="footer">
-<hr>Generated by GTK-Doc V1.32</div>
+<hr>Generated by GTK-Doc V1.33.1</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/doc/html/DMAPContainerRecord.html b/doc/html/DmapContainerRecord.html
similarity index 63%
rename from doc/html/DMAPContainerRecord.html
rename to doc/html/DmapContainerRecord.html
index b599f33..501cc6e 100644
--- a/doc/html/DMAPContainerRecord.html
+++ b/doc/html/DmapContainerRecord.html
@@ -2,39 +2,39 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>DMAPContainerRecord: libdmapsharing-3.0 Reference Manual</title>
+<title>DmapContainerRecord: libdmapsharing Reference Manual</title>
 <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
-<link rel="home" href="index.html" title="libdmapsharing-3.0 Reference Manual">
-<link rel="up" href="ch01.html" title="Libdmapsharing overview">
-<link rel="prev" href="DMAPContainerDb.html" title="DMAPContainerDb">
-<link rel="next" href="DMAPDb.html" title="DMAPDb">
-<meta name="generator" content="GTK-Doc V1.32 (XML mode)">
+<link rel="home" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="up" href="ch04.html" title="Libdmapsharing Objects and Interfaces">
+<link rel="prev" href="DmapContainerDb.html" title="DmapContainerDb">
+<link rel="next" href="DmapControlConnection.html" title="DmapControlConnection">
+<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
 <td width="100%" align="left" class="shortcuts">
 <a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
-                  <a href="#DMAPContainerRecord.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
-                  <a href="#DMAPContainerRecord.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span> 
-                  <a href="#DMAPContainerRecord.properties" class="shortcut">Properties</a></span>
+                  <a href="#DmapContainerRecord.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
+                  <a href="#DmapContainerRecord.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span> 
+                  <a href="#DmapContainerRecord.properties" class="shortcut">Properties</a></span>
 </td>
 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
-<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
-<td><a accesskey="p" href="DMAPContainerDb.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="DMAPDb.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+<td><a accesskey="u" href="ch04.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="DmapContainerDb.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="DmapControlConnection.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
 </tr></table>
 <div class="refentry">
-<a name="DMAPContainerRecord"></a><div class="titlepage"></div>
+<a name="DmapContainerRecord"></a><div class="titlepage"></div>
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
-<h2><span class="refentrytitle"><a name="DMAPContainerRecord.top_of_page"></a>DMAPContainerRecord</span></h2>
-<p>DMAPContainerRecord</p>
+<h2><span class="refentrytitle"><a name="DmapContainerRecord.top_of_page"></a>DmapContainerRecord</span></h2>
+<p>DmapContainerRecord — The description of an item shared using DACP.</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="DMAPContainerRecord.functions"></a><h2>Functions</h2>
+<a name="DmapContainerRecord.functions"></a><h2>Functions</h2>
 <div class="informaltable"><table class="informaltable" width="100%" border="0">
 <colgroup>
 <col width="150px" class="functions_proto_type">
@@ -46,7 +46,7 @@
 <span class="returnvalue">guint</span>
 </td>
 <td class="function_name">
-<a class="link" href="DMAPContainerRecord.html#dmap-container-record-get-id" title="dmap_container_record_get_id ()">dmap_container_record_get_id</a> <span class="c_punctuation">()</span>
+<a class="link" href="DmapContainerRecord.html#dmap-container-record-get-id" title="dmap_container_record_get_id ()">dmap_container_record_get_id</a> <span class="c_punctuation">()</span>
 </td>
 </tr>
 <tr>
@@ -54,7 +54,7 @@
 <span class="returnvalue">void</span>
 </td>
 <td class="function_name">
-<a class="link" href="DMAPContainerRecord.html#dmap-container-record-add-entry" title="dmap_container_record_add_entry ()">dmap_container_record_add_entry</a> <span class="c_punctuation">()</span>
+<a class="link" href="DmapContainerRecord.html#dmap-container-record-add-entry" title="dmap_container_record_add_entry ()">dmap_container_record_add_entry</a> <span class="c_punctuation">()</span>
 </td>
 </tr>
 <tr>
@@ -62,22 +62,22 @@
 <span class="returnvalue">guint64</span>
 </td>
 <td class="function_name">
-<a class="link" href="DMAPContainerRecord.html#dmap-container-record-get-entry-count" title="dmap_container_record_get_entry_count ()">dmap_container_record_get_entry_count</a> <span class="c_punctuation">()</span>
+<a class="link" href="DmapContainerRecord.html#dmap-container-record-get-entry-count" title="dmap_container_record_get_entry_count ()">dmap_container_record_get_entry_count</a> <span class="c_punctuation">()</span>
 </td>
 </tr>
 <tr>
 <td class="function_type">
-<a class="link" href="DMAPDb.html" title="DMAPDb"><span class="returnvalue">DMAPDb</span></a> *
+<a class="link" href="DmapDb.html" title="DmapDb"><span class="returnvalue">DmapDb</span></a> *
 </td>
 <td class="function_name">
-<a class="link" href="DMAPContainerRecord.html#dmap-container-record-get-entries" title="dmap_container_record_get_entries ()">dmap_container_record_get_entries</a> <span class="c_punctuation">()</span>
+<a class="link" href="DmapContainerRecord.html#dmap-container-record-get-entries" title="dmap_container_record_get_entries ()">dmap_container_record_get_entries</a> <span class="c_punctuation">()</span>
 </td>
 </tr>
 </tbody>
 </table></div>
 </div>
 <div class="refsect1">
-<a name="DMAPContainerRecord.properties"></a><h2>Properties</h2>
+<a name="DmapContainerRecord.properties"></a><h2>Properties</h2>
 <div class="informaltable"><table class="informaltable" border="0">
 <colgroup>
 <col width="150px" class="properties_type">
@@ -86,27 +86,28 @@
 </colgroup>
 <tbody><tr>
 <td class="property_type">
-<span class="type">gchar</span> *</td>
-<td class="property_name"><a class="link" href="DMAPContainerRecord.html#DMAPContainerRecord--name" title="The “name” property">name</a></td>
+<span class="type">char</span> *</td>
+<td class="property_name"><a class="link" href="DmapContainerRecord.html#DmapContainerRecord--name" title="The “name” property">name</a></td>
 <td class="property_flags">Read / Write</td>
 </tr></tbody>
 </table></div>
 </div>
 <div class="refsect1">
-<a name="DMAPContainerRecord.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<a name="DmapContainerRecord.object-hierarchy"></a><h2>Object Hierarchy</h2>
 <pre class="screen">    <a href="/usr/share/gtk-doc/html/gobject/GTypeModule.html">GInterface</a>
-    <span class="lineart">╰──</span> DMAPContainerRecord
+    <span class="lineart">╰──</span> DmapContainerRecord
 </pre>
 </div>
 <div class="refsect1">
-<a name="DMAPContainerRecord.description"></a><h2>Description</h2>
+<a name="DmapContainerRecord.description"></a><h2>Description</h2>
+<p><a class="link" href="DmapContainerRecord.html" title="DmapContainerRecord"><span class="type">DmapContainerRecord</span></a> objects encapsulate the description of an item shared using DACP.</p>
 </div>
 <div class="refsect1">
-<a name="DMAPContainerRecord.functions_details"></a><h2>Functions</h2>
+<a name="DmapContainerRecord.functions_details"></a><h2>Functions</h2>
 <div class="refsect2">
 <a name="dmap-container-record-get-id"></a><h3>dmap_container_record_get_id ()</h3>
 <pre class="programlisting"><span class="returnvalue">guint</span>
-dmap_container_record_get_id (<em class="parameter"><code><a class="link" href="DMAPContainerRecord.html" title="DMAPContainerRecord"><span class="type">DMAPContainerRecord</span></a> *record</code></em>);</pre>
+dmap_container_record_get_id (<em class="parameter"><code><a class="link" href="DmapContainerRecord.html" title="DmapContainerRecord"><span class="type">DmapContainerRecord</span></a> *record</code></em>);</pre>
 <div class="refsect3">
 <a name="dmap-container-record-get-id.parameters"></a><h4>Parameters</h4>
 <div class="informaltable"><table class="informaltable" width="100%" border="0">
@@ -117,7 +118,7 @@ dmap_container_record_get_id (<em class="parameter"><code><a class="link" href="
 </colgroup>
 <tbody><tr>
 <td class="parameter_name"><p>record</p></td>
-<td class="parameter_description"><p>A DMAPContainerRecord.</p></td>
+<td class="parameter_description"><p>A DmapContainerRecord.</p></td>
 <td class="parameter_annotations"> </td>
 </tr></tbody>
 </table></div>
@@ -131,9 +132,10 @@ dmap_container_record_get_id (<em class="parameter"><code><a class="link" href="
 <div class="refsect2">
 <a name="dmap-container-record-add-entry"></a><h3>dmap_container_record_add_entry ()</h3>
 <pre class="programlisting"><span class="returnvalue">void</span>
-dmap_container_record_add_entry (<em class="parameter"><code><a class="link" href="DMAPContainerRecord.html" title="DMAPContainerRecord"><span class="type">DMAPContainerRecord</span></a> *container_record</code></em>,
-                                 <em class="parameter"><code><a class="link" href="DMAPRecord.html" title="DMAPRecord"><span class="type">DMAPRecord</span></a> *record</code></em>,
-                                 <em class="parameter"><code><span class="type">gint</span> id</code></em>);</pre>
+dmap_container_record_add_entry (<em class="parameter"><code><a class="link" href="DmapContainerRecord.html" title="DmapContainerRecord"><span class="type">DmapContainerRecord</span></a> *container_record</code></em>,
+                                 <em class="parameter"><code><a class="link" href="DmapRecord.html" title="DmapRecord"><span class="type">DmapRecord</span></a> *record</code></em>,
+                                 <em class="parameter"><code><span class="type">gint</span> id</code></em>,
+                                 <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
 <p>Add a record to the database. It is assumed that the record is placed
 directly into the database (not copied) and not freed.</p>
 <div class="refsect3">
@@ -147,12 +149,12 @@ directly into the database (not copied) and not freed.</p>
 <tbody>
 <tr>
 <td class="parameter_name"><p>container_record</p></td>
-<td class="parameter_description"><p>A DMAPContainerRecord.</p></td>
+<td class="parameter_description"><p>A DmapContainerRecord.</p></td>
 <td class="parameter_annotations"> </td>
 </tr>
 <tr>
 <td class="parameter_name"><p>record</p></td>
-<td class="parameter_description"><p>A DMAPRecord.</p></td>
+<td class="parameter_description"><p>A DmapRecord.</p></td>
 <td class="parameter_annotations"> </td>
 </tr>
 <tr>
@@ -160,6 +162,11 @@ directly into the database (not copied) and not freed.</p>
 <td class="parameter_description"><p>The record's ID.</p></td>
 <td class="parameter_annotations"> </td>
 </tr>
+<tr>
+<td class="parameter_name"><p>error</p></td>
+<td class="parameter_description"><p>return location for a GError, or NULL.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
 </tbody>
 </table></div>
 </div>
@@ -168,7 +175,7 @@ directly into the database (not copied) and not freed.</p>
 <div class="refsect2">
 <a name="dmap-container-record-get-entry-count"></a><h3>dmap_container_record_get_entry_count ()</h3>
 <pre class="programlisting"><span class="returnvalue">guint64</span>
-dmap_container_record_get_entry_count (<em class="parameter"><code><a class="link" href="DMAPContainerRecord.html" title="DMAPContainerRecord"><span class="type">DMAPContainerRecord</span></a> *record</code></em>);</pre>
+dmap_container_record_get_entry_count (<em class="parameter"><code><a class="link" href="DmapContainerRecord.html" title="DmapContainerRecord"><span class="type">DmapContainerRecord</span></a> *record</code></em>);</pre>
 <div class="refsect3">
 <a name="dmap-container-record-get-entry-count.parameters"></a><h4>Parameters</h4>
 <div class="informaltable"><table class="informaltable" width="100%" border="0">
@@ -179,7 +186,7 @@ dmap_container_record_get_entry_count (<em class="parameter"><code><a class="lin
 </colgroup>
 <tbody><tr>
 <td class="parameter_name"><p>record</p></td>
-<td class="parameter_description"><p>A DMAPContainerRecord.</p></td>
+<td class="parameter_description"><p>A DmapContainerRecord.</p></td>
 <td class="parameter_annotations"> </td>
 </tr></tbody>
 </table></div>
@@ -192,8 +199,8 @@ dmap_container_record_get_entry_count (<em class="parameter"><code><a class="lin
 <hr>
 <div class="refsect2">
 <a name="dmap-container-record-get-entries"></a><h3>dmap_container_record_get_entries ()</h3>
-<pre class="programlisting"><a class="link" href="DMAPDb.html" title="DMAPDb"><span class="returnvalue">DMAPDb</span></a> *
-dmap_container_record_get_entries (<em class="parameter"><code><a class="link" href="DMAPContainerRecord.html" title="DMAPContainerRecord"><span class="type">DMAPContainerRecord</span></a> *record</code></em>);</pre>
+<pre class="programlisting"><a class="link" href="DmapDb.html" title="DmapDb"><span class="returnvalue">DmapDb</span></a> *
+dmap_container_record_get_entries (<em class="parameter"><code><a class="link" href="DmapContainerRecord.html" title="DmapContainerRecord"><span class="type">DmapContainerRecord</span></a> *record</code></em>);</pre>
 <div class="refsect3">
 <a name="dmap-container-record-get-entries.parameters"></a><h4>Parameters</h4>
 <div class="informaltable"><table class="informaltable" width="100%" border="0">
@@ -204,30 +211,31 @@ dmap_container_record_get_entries (<em class="parameter"><code><a class="link" h
 </colgroup>
 <tbody><tr>
 <td class="parameter_name"><p>record</p></td>
-<td class="parameter_description"><p>A DMAPContainerRecord.</p></td>
+<td class="parameter_description"><p>A DmapContainerRecord.</p></td>
 <td class="parameter_annotations"> </td>
 </tr></tbody>
 </table></div>
 </div>
 <div class="refsect3">
 <a name="dmap-container-record-get-entries.returns"></a><h4>Returns</h4>
-<p> A pointer to a DMAPDb containing the entries contained in record.</p>
+<p>A pointer to a DmapDb containing the entries contained in record. </p>
+<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
 </div>
 </div>
 </div>
 <div class="refsect1">
-<a name="DMAPContainerRecord.property-details"></a><h2>Property Details</h2>
+<a name="DmapContainerRecord.property-details"></a><h2>Property Details</h2>
 <div class="refsect2">
-<a name="DMAPContainerRecord--name"></a><h3>The <code class="literal">“name”</code> property</h3>
-<pre class="programlisting">  “name”                     <span class="type">gchar</span> *</pre>
+<a name="DmapContainerRecord--name"></a><h3>The <code class="literal">“name”</code> property</h3>
+<pre class="programlisting">  “name”                     <span class="type">char</span> *</pre>
 <p>Container name.</p>
-<p>Owner: DMAPContainerRecord</p>
+<p>Owner: DmapContainerRecord</p>
 <p>Flags: Read / Write</p>
 <p>Default value: NULL</p>
 </div>
 </div>
 </div>
 <div class="footer">
-<hr>Generated by GTK-Doc V1.32</div>
+<hr>Generated by GTK-Doc V1.33.1</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/doc/html/DmapControlConnection.html b/doc/html/DmapControlConnection.html
new file mode 100644
index 0000000..517407a
--- /dev/null
+++ b/doc/html/DmapControlConnection.html
@@ -0,0 +1,101 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>DmapControlConnection: libdmapsharing Reference Manual</title>
+<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
+<link rel="home" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="up" href="ch04.html" title="Libdmapsharing Objects and Interfaces">
+<link rel="prev" href="DmapContainerRecord.html" title="DmapContainerRecord">
+<link rel="next" href="DmapControlPlayer.html" title="DmapControlPlayer">
+<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
+<td width="100%" align="left" class="shortcuts">
+<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
+                  <a href="#DmapControlConnection.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
+                  <a href="#DmapControlConnection.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
+</td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
+<td><a accesskey="u" href="ch04.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="DmapContainerRecord.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="DmapControlPlayer.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="refentry">
+<a name="DmapControlConnection"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="DmapControlConnection.top_of_page"></a>DmapControlConnection</span></h2>
+<p>DmapControlConnection — A DACP connection.</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="DmapControlConnection.functions"></a><h2>Functions</h2>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="functions_proto_type">
+<col class="functions_proto_name">
+</colgroup>
+<tbody><tr>
+<td class="function_type">
+<a class="link" href="DmapControlConnection.html" title="DmapControlConnection"><span class="returnvalue">DmapControlConnection</span></a> *
+</td>
+<td class="function_name">
+<a class="link" href="DmapControlConnection.html#dmap-control-connection-new" title="dmap_control_connection_new ()">dmap_control_connection_new</a> <span class="c_punctuation">()</span>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="DmapControlConnection.other"></a><h2>Types and Values</h2>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="other_proto_type">
+<col class="other_proto_name">
+</colgroup>
+<tbody><tr>
+<td class="define_keyword">#define</td>
+<td class="function_name"><a class="link" href="DmapControlConnection.html#DACP-TYPE-CONNECTION:CAPS" title="DACP_TYPE_CONNECTION">DACP_TYPE_CONNECTION</a></td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="DmapControlConnection.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<pre class="screen">    GObject
+    <span class="lineart">╰──</span> <a class="link" href="DmapConnection.html" title="DmapConnection">DmapConnection</a>
+        <span class="lineart">╰──</span> DmapControlConnection
+</pre>
+</div>
+<div class="refsect1">
+<a name="DmapControlConnection.description"></a><h2>Description</h2>
+<p><a class="link" href="DmapControlConnection.html" title="DmapControlConnection"><span class="type">DmapControlConnection</span></a> objects encapsulate a DACP connection.</p>
+</div>
+<div class="refsect1">
+<a name="DmapControlConnection.functions_details"></a><h2>Functions</h2>
+<div class="refsect2">
+<a name="dmap-control-connection-new"></a><h3>dmap_control_connection_new ()</h3>
+<pre class="programlisting"><a class="link" href="DmapControlConnection.html" title="DmapControlConnection"><span class="returnvalue">DmapControlConnection</span></a> *
+dmap_control_connection_new (<em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
+                             <em class="parameter"><code>const <span class="type">char</span> *host</code></em>,
+                             <em class="parameter"><code><span class="type">guint</span> port</code></em>,
+                             <em class="parameter"><code><a class="link" href="DmapDb.html" title="DmapDb"><span class="type">DmapDb</span></a> *db</code></em>,
+                             <em class="parameter"><code><a class="link" href="DmapRecordFactory.html" title="DmapRecordFactory"><span class="type">DmapRecordFactory</span></a> *factory</code></em>);</pre>
+</div>
+</div>
+<div class="refsect1">
+<a name="DmapControlConnection.other_details"></a><h2>Types and Values</h2>
+<div class="refsect2">
+<a name="DACP-TYPE-CONNECTION:CAPS"></a><h3>DACP_TYPE_CONNECTION</h3>
+<pre class="programlisting">#define DACP_TYPE_CONNECTION		(dmap_control_connection_get_type ())
+</pre>
+<p>The type for <a class="link" href="DmapControlConnection.html" title="DmapControlConnection"><span class="type">DmapControlConnection</span></a>.</p>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.33.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/DmapControlPlayer.html b/doc/html/DmapControlPlayer.html
new file mode 100644
index 0000000..2dd1c8b
--- /dev/null
+++ b/doc/html/DmapControlPlayer.html
@@ -0,0 +1,484 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>DmapControlPlayer: libdmapsharing Reference Manual</title>
+<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
+<link rel="home" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="up" href="ch04.html" title="Libdmapsharing Objects and Interfaces">
+<link rel="prev" href="DmapControlConnection.html" title="DmapControlConnection">
+<link rel="next" href="DmapControlShare.html" title="DmapControlShare">
+<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
+<td width="100%" align="left" class="shortcuts">
+<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
+                  <a href="#DmapControlPlayer.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
+                  <a href="#DmapControlPlayer.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span> 
+                  <a href="#DmapControlPlayer.properties" class="shortcut">Properties</a></span>
+</td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
+<td><a accesskey="u" href="ch04.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="DmapControlConnection.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="DmapControlShare.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="refentry">
+<a name="DmapControlPlayer"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="DmapControlPlayer.top_of_page"></a>DmapControlPlayer</span></h2>
+<p>DmapControlPlayer — An interface for media controllers.</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="DmapControlPlayer.functions"></a><h2>Functions</h2>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="functions_proto_type">
+<col class="functions_proto_name">
+</colgroup>
+<tbody>
+<tr>
+<td class="function_type">
+<a class="link" href="DmapAvRecord.html" title="DmapAvRecord"><span class="returnvalue">DmapAvRecord</span></a> *
+</td>
+<td class="function_name">
+<a class="link" href="DmapControlPlayer.html#dmap-control-player-now-playing-record" title="dmap_control_player_now_playing_record ()">dmap_control_player_now_playing_record</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">gchar</span> *
+</td>
+<td class="function_name">
+<a class="link" href="DmapControlPlayer.html#dmap-control-player-now-playing-artwork" title="dmap_control_player_now_playing_artwork ()">dmap_control_player_now_playing_artwork</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">void</span>
+</td>
+<td class="function_name">
+<a class="link" href="DmapControlPlayer.html#dmap-control-player-play-pause" title="dmap_control_player_play_pause ()">dmap_control_player_play_pause</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">void</span>
+</td>
+<td class="function_name">
+<a class="link" href="DmapControlPlayer.html#dmap-control-player-pause" title="dmap_control_player_pause ()">dmap_control_player_pause</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">void</span>
+</td>
+<td class="function_name">
+<a class="link" href="DmapControlPlayer.html#dmap-control-player-next-item" title="dmap_control_player_next_item ()">dmap_control_player_next_item</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">void</span>
+</td>
+<td class="function_name">
+<a class="link" href="DmapControlPlayer.html#dmap-control-player-prev-item" title="dmap_control_player_prev_item ()">dmap_control_player_prev_item</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">void</span>
+</td>
+<td class="function_name">
+<a class="link" href="DmapControlPlayer.html#dmap-control-player-cue-clear" title="dmap_control_player_cue_clear ()">dmap_control_player_cue_clear</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">void</span>
+</td>
+<td class="function_name">
+<a class="link" href="DmapControlPlayer.html#dmap-control-player-cue-play" title="dmap_control_player_cue_play ()">dmap_control_player_cue_play</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="DmapControlPlayer.properties"></a><h2>Properties</h2>
+<div class="informaltable"><table class="informaltable" border="0">
+<colgroup>
+<col width="150px" class="properties_type">
+<col width="300px" class="properties_name">
+<col width="200px" class="properties_flags">
+</colgroup>
+<tbody>
+<tr>
+<td class="property_type"><a class="link" href="DmapControlPlayer.html#DmapControlPlayState" title="enum DmapControlPlayState"><span class="type">DmapControlPlayState</span></a></td>
+<td class="property_name"><a class="link" href="DmapControlPlayer.html#DmapControlPlayer--play-state" title="The “play-state” property">play-state</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><span class="type">gulong</span></td>
+<td class="property_name"><a class="link" href="DmapControlPlayer.html#DmapControlPlayer--playing-time" title="The “playing-time” property">playing-time</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><a class="link" href="DmapControlPlayer.html#DmapControlRepeatState" title="enum DmapControlRepeatState"><span class="type">DmapControlRepeatState</span></a></td>
+<td class="property_name"><a class="link" href="DmapControlPlayer.html#DmapControlPlayer--repeat-state" title="The “repeat-state” property">repeat-state</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><span class="type">gboolean</span></td>
+<td class="property_name"><a class="link" href="DmapControlPlayer.html#DmapControlPlayer--shuffle-state" title="The “shuffle-state” property">shuffle-state</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><span class="type">gulong</span></td>
+<td class="property_name"><a class="link" href="DmapControlPlayer.html#DmapControlPlayer--volume" title="The “volume” property">volume</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="DmapControlPlayer.other"></a><h2>Types and Values</h2>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="other_proto_type">
+<col class="other_proto_name">
+</colgroup>
+<tbody>
+<tr>
+<td class="datatype_keyword">enum</td>
+<td class="function_name"><a class="link" href="DmapControlPlayer.html#DmapControlRepeatState" title="enum DmapControlRepeatState">DmapControlRepeatState</a></td>
+</tr>
+<tr>
+<td class="datatype_keyword">enum</td>
+<td class="function_name"><a class="link" href="DmapControlPlayer.html#DmapControlPlayState" title="enum DmapControlPlayState">DmapControlPlayState</a></td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="DmapControlPlayer.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<pre class="screen">    <a href="/usr/share/gtk-doc/html/gobject/gobject-Enumeration-and-Flag-Types.html">GEnum</a>
+    <span class="lineart">├──</span> DmapControlPlayState
+    <span class="lineart">╰──</span> DmapControlRepeatState
+    <a href="/usr/share/gtk-doc/html/gobject/GTypeModule.html">GInterface</a>
+    <span class="lineart">╰──</span> DmapControlPlayer
+</pre>
+</div>
+<div class="refsect1">
+<a name="DmapControlPlayer.description"></a><h2>Description</h2>
+<p><a class="link" href="DmapControlPlayer.html" title="DmapControlPlayer"><span class="type">DmapControlPlayer</span></a> provides an interface for controlling the playback of media.</p>
+</div>
+<div class="refsect1">
+<a name="DmapControlPlayer.functions_details"></a><h2>Functions</h2>
+<div class="refsect2">
+<a name="dmap-control-player-now-playing-record"></a><h3>dmap_control_player_now_playing_record ()</h3>
+<pre class="programlisting"><a class="link" href="DmapAvRecord.html" title="DmapAvRecord"><span class="returnvalue">DmapAvRecord</span></a> *
+dmap_control_player_now_playing_record
+                               (<em class="parameter"><code><a class="link" href="DmapControlPlayer.html" title="DmapControlPlayer"><span class="type">DmapControlPlayer</span></a> *player</code></em>);</pre>
+<div class="refsect3">
+<a name="dmap-control-player-now-playing-record.parameters"></a><h4>Parameters</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="parameters_name">
+<col class="parameters_description">
+<col width="200px" class="parameters_annotations">
+</colgroup>
+<tbody><tr>
+<td class="parameter_name"><p>player</p></td>
+<td class="parameter_description"><p>a player</p></td>
+<td class="parameter_annotations"> </td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="dmap-control-player-now-playing-record.returns"></a><h4>Returns</h4>
+<p>the currently playing record. </p>
+<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="dmap-control-player-now-playing-artwork"></a><h3>dmap_control_player_now_playing_artwork ()</h3>
+<pre class="programlisting"><span class="returnvalue">gchar</span> *
+dmap_control_player_now_playing_artwork
+                               (<em class="parameter"><code><a class="link" href="DmapControlPlayer.html" title="DmapControlPlayer"><span class="type">DmapControlPlayer</span></a> *player</code></em>,
+                                <em class="parameter"><code><span class="type">guint</span> width</code></em>,
+                                <em class="parameter"><code><span class="type">guint</span> height</code></em>);</pre>
+<div class="refsect3">
+<a name="dmap-control-player-now-playing-artwork.parameters"></a><h4>Parameters</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="parameters_name">
+<col class="parameters_description">
+<col width="200px" class="parameters_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="parameter_name"><p>player</p></td>
+<td class="parameter_description"><p>a player</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>width</p></td>
+<td class="parameter_description"><p>width</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>height</p></td>
+<td class="parameter_description"><p>height</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="dmap-control-player-play-pause"></a><h3>dmap_control_player_play_pause ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+dmap_control_player_play_pause (<em class="parameter"><code><a class="link" href="DmapControlPlayer.html" title="DmapControlPlayer"><span class="type">DmapControlPlayer</span></a> *player</code></em>);</pre>
+<div class="refsect3">
+<a name="dmap-control-player-play-pause.parameters"></a><h4>Parameters</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="parameters_name">
+<col class="parameters_description">
+<col width="200px" class="parameters_annotations">
+</colgroup>
+<tbody><tr>
+<td class="parameter_name"><p>player</p></td>
+<td class="parameter_description"><p>a player</p></td>
+<td class="parameter_annotations"> </td>
+</tr></tbody>
+</table></div>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="dmap-control-player-pause"></a><h3>dmap_control_player_pause ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+dmap_control_player_pause (<em class="parameter"><code><a class="link" href="DmapControlPlayer.html" title="DmapControlPlayer"><span class="type">DmapControlPlayer</span></a> *player</code></em>);</pre>
+<div class="refsect3">
+<a name="dmap-control-player-pause.parameters"></a><h4>Parameters</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="parameters_name">
+<col class="parameters_description">
+<col width="200px" class="parameters_annotations">
+</colgroup>
+<tbody><tr>
+<td class="parameter_name"><p>player</p></td>
+<td class="parameter_description"><p>a player</p></td>
+<td class="parameter_annotations"> </td>
+</tr></tbody>
+</table></div>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="dmap-control-player-next-item"></a><h3>dmap_control_player_next_item ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+dmap_control_player_next_item (<em class="parameter"><code><a class="link" href="DmapControlPlayer.html" title="DmapControlPlayer"><span class="type">DmapControlPlayer</span></a> *player</code></em>);</pre>
+<div class="refsect3">
+<a name="dmap-control-player-next-item.parameters"></a><h4>Parameters</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="parameters_name">
+<col class="parameters_description">
+<col width="200px" class="parameters_annotations">
+</colgroup>
+<tbody><tr>
+<td class="parameter_name"><p>player</p></td>
+<td class="parameter_description"><p>a player</p></td>
+<td class="parameter_annotations"> </td>
+</tr></tbody>
+</table></div>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="dmap-control-player-prev-item"></a><h3>dmap_control_player_prev_item ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+dmap_control_player_prev_item (<em class="parameter"><code><a class="link" href="DmapControlPlayer.html" title="DmapControlPlayer"><span class="type">DmapControlPlayer</span></a> *player</code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="dmap-control-player-cue-clear"></a><h3>dmap_control_player_cue_clear ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+dmap_control_player_cue_clear (<em class="parameter"><code><a class="link" href="DmapControlPlayer.html" title="DmapControlPlayer"><span class="type">DmapControlPlayer</span></a> *player</code></em>);</pre>
+<div class="refsect3">
+<a name="dmap-control-player-cue-clear.parameters"></a><h4>Parameters</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="parameters_name">
+<col class="parameters_description">
+<col width="200px" class="parameters_annotations">
+</colgroup>
+<tbody><tr>
+<td class="parameter_name"><p>player</p></td>
+<td class="parameter_description"><p>a player</p></td>
+<td class="parameter_annotations"> </td>
+</tr></tbody>
+</table></div>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="dmap-control-player-cue-play"></a><h3>dmap_control_player_cue_play ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+dmap_control_player_cue_play (<em class="parameter"><code><a class="link" href="DmapControlPlayer.html" title="DmapControlPlayer"><span class="type">DmapControlPlayer</span></a> *player</code></em>,
+                              <em class="parameter"><code><span class="type">GList</span> *records</code></em>,
+                              <em class="parameter"><code><span class="type">guint</span> index</code></em>);</pre>
+<div class="refsect3">
+<a name="dmap-control-player-cue-play.parameters"></a><h4>Parameters</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="parameters_name">
+<col class="parameters_description">
+<col width="200px" class="parameters_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="parameter_name"><p>player</p></td>
+<td class="parameter_description"><p>a player</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>records</p></td>
+<td class="parameter_description"><p>a list of records. </p></td>
+<td class="parameter_annotations"><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> DmapRecord]</span></td>
+</tr>
+<tr>
+<td class="parameter_name"><p>index</p></td>
+<td class="parameter_description"><p>an index</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="refsect1">
+<a name="DmapControlPlayer.other_details"></a><h2>Types and Values</h2>
+<div class="refsect2">
+<a name="DmapControlRepeatState"></a><h3>enum DmapControlRepeatState</h3>
+<div class="refsect3">
+<a name="DmapControlRepeatState.members"></a><h4>Members</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="300px" class="enum_members_name">
+<col class="enum_members_description">
+<col width="200px" class="enum_members_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CONTROL-REPEAT-NONE:CAPS"></a>DMAP_CONTROL_REPEAT_NONE</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CONTROL-REPEAT-SINGLE:CAPS"></a>DMAP_CONTROL_REPEAT_SINGLE</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CONTROL-REPEAT-ALL:CAPS"></a>DMAP_CONTROL_REPEAT_ALL</p></td>
+<td> </td>
+<td> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapControlPlayState"></a><h3>enum DmapControlPlayState</h3>
+<div class="refsect3">
+<a name="DmapControlPlayState.members"></a><h4>Members</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="300px" class="enum_members_name">
+<col class="enum_members_description">
+<col width="200px" class="enum_members_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CONTROL-PLAY-STOPPED:CAPS"></a>DMAP_CONTROL_PLAY_STOPPED</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CONTROL-PLAY-PAUSED:CAPS"></a>DMAP_CONTROL_PLAY_PAUSED</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CONTROL-PLAY-PLAYING:CAPS"></a>DMAP_CONTROL_PLAY_PLAYING</p></td>
+<td> </td>
+<td> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="refsect1">
+<a name="DmapControlPlayer.property-details"></a><h2>Property Details</h2>
+<div class="refsect2">
+<a name="DmapControlPlayer--play-state"></a><h3>The <code class="literal">“play-state”</code> property</h3>
+<pre class="programlisting">  “play-state”               <a class="link" href="DmapControlPlayer.html#DmapControlPlayState" title="enum DmapControlPlayState"><span class="type">DmapControlPlayState</span></a></pre>
+<p>Play state.</p>
+<p>Owner: DmapControlPlayer</p>
+<p>Flags: Read / Write</p>
+<p>Default value: DMAP_CONTROL_PLAY_STOPPED</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapControlPlayer--playing-time"></a><h3>The <code class="literal">“playing-time”</code> property</h3>
+<pre class="programlisting">  “playing-time”             <span class="type">gulong</span></pre>
+<p>Playing time (ms).</p>
+<p>Owner: DmapControlPlayer</p>
+<p>Flags: Read / Write</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapControlPlayer--repeat-state"></a><h3>The <code class="literal">“repeat-state”</code> property</h3>
+<pre class="programlisting">  “repeat-state”             <a class="link" href="DmapControlPlayer.html#DmapControlRepeatState" title="enum DmapControlRepeatState"><span class="type">DmapControlRepeatState</span></a></pre>
+<p>Repeat state.</p>
+<p>Owner: DmapControlPlayer</p>
+<p>Flags: Read / Write</p>
+<p>Default value: DMAP_CONTROL_REPEAT_NONE</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapControlPlayer--shuffle-state"></a><h3>The <code class="literal">“shuffle-state”</code> property</h3>
+<pre class="programlisting">  “shuffle-state”            <span class="type">gboolean</span></pre>
+<p>Shufle state.</p>
+<p>Owner: DmapControlPlayer</p>
+<p>Flags: Read / Write</p>
+<p>Default value: FALSE</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapControlPlayer--volume"></a><h3>The <code class="literal">“volume”</code> property</h3>
+<pre class="programlisting">  “volume”                   <span class="type">gulong</span></pre>
+<p>Volume.</p>
+<p>Owner: DmapControlPlayer</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: &lt;= 100</p>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.33.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/DmapControlShare.html b/doc/html/DmapControlShare.html
new file mode 100644
index 0000000..7bcc4f4
--- /dev/null
+++ b/doc/html/DmapControlShare.html
@@ -0,0 +1,551 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>DmapControlShare: libdmapsharing Reference Manual</title>
+<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
+<link rel="home" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="up" href="ch04.html" title="Libdmapsharing Objects and Interfaces">
+<link rel="prev" href="DmapControlPlayer.html" title="DmapControlPlayer">
+<link rel="next" href="DmapDb.html" title="DmapDb">
+<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
+<td width="100%" align="left" class="shortcuts">
+<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
+                  <a href="#DmapControlShare.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
+                  <a href="#DmapControlShare.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span> 
+                  <a href="#DmapControlShare.properties" class="shortcut">Properties</a></span><span id="nav_signals">  <span class="dim">|</span> 
+                  <a href="#DmapControlShare.signals" class="shortcut">Signals</a></span>
+</td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
+<td><a accesskey="u" href="ch04.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="DmapControlPlayer.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="DmapDb.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="refentry">
+<a name="DmapControlShare"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="DmapControlShare.top_of_page"></a>DmapControlShare</span></h2>
+<p>DmapControlShare — A DACP share.</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="DmapControlShare.functions"></a><h2>Functions</h2>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="functions_proto_type">
+<col class="functions_proto_name">
+</colgroup>
+<tbody>
+<tr>
+<td class="function_type">
+<a class="link" href="DmapControlShare.html" title="DmapControlShare"><span class="returnvalue">DmapControlShare</span></a> *
+</td>
+<td class="function_name">
+<a class="link" href="DmapControlShare.html#dmap-control-share-new" title="dmap_control_share_new ()">dmap_control_share_new</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">void</span>
+</td>
+<td class="function_name">
+<a class="link" href="DmapControlShare.html#dmap-control-share-pair" title="dmap_control_share_pair ()">dmap_control_share_pair</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">gboolean</span>
+</td>
+<td class="function_name">
+<a class="link" href="DmapControlShare.html#dmap-control-share-start-lookup" title="dmap_control_share_start_lookup ()">dmap_control_share_start_lookup</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">gboolean</span>
+</td>
+<td class="function_name">
+<a class="link" href="DmapControlShare.html#dmap-control-share-stop-lookup" title="dmap_control_share_stop_lookup ()">dmap_control_share_stop_lookup</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">void</span>
+</td>
+<td class="function_name">
+<a class="link" href="DmapControlShare.html#dmap-control-share-player-updated" title="dmap_control_share_player_updated ()">dmap_control_share_player_updated</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="DmapControlShare.properties"></a><h2>Properties</h2>
+<div class="informaltable"><table class="informaltable" border="0">
+<colgroup>
+<col width="150px" class="properties_type">
+<col width="300px" class="properties_name">
+<col width="200px" class="properties_flags">
+</colgroup>
+<tbody>
+<tr>
+<td class="property_type">
+<span class="type">char</span> *</td>
+<td class="property_name"><a class="link" href="DmapControlShare.html#DmapControlShare--library-name" title="The “library-name” property">library-name</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type">
+<span class="type">GObject</span> *</td>
+<td class="property_name"><a class="link" href="DmapControlShare.html#DmapControlShare--player" title="The “player” property">player</a></td>
+<td class="property_flags">Read / Write / Construct Only</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="DmapControlShare.signals"></a><h2>Signals</h2>
+<div class="informaltable"><table class="informaltable" border="0">
+<colgroup>
+<col width="150px" class="signal_proto_type">
+<col width="300px" class="signal_proto_name">
+<col width="200px" class="signal_proto_flags">
+</colgroup>
+<tbody>
+<tr>
+<td class="signal_type"><span class="returnvalue">void</span></td>
+<td class="signal_name"><a class="link" href="DmapControlShare.html#DmapControlShare-add-guid" title="The “add-guid” signal">add-guid</a></td>
+<td class="signal_flags">Run Last</td>
+</tr>
+<tr>
+<td class="signal_type"><span class="returnvalue">gboolean</span></td>
+<td class="signal_name"><a class="link" href="DmapControlShare.html#DmapControlShare-lookup-guid" title="The “lookup-guid” signal">lookup-guid</a></td>
+<td class="signal_flags">Run Last</td>
+</tr>
+<tr>
+<td class="signal_type"><span class="returnvalue">void</span></td>
+<td class="signal_name"><a class="link" href="DmapControlShare.html#DmapControlShare-remote-found" title="The “remote-found” signal">remote-found</a></td>
+<td class="signal_flags">Run Last</td>
+</tr>
+<tr>
+<td class="signal_type"><span class="returnvalue">void</span></td>
+<td class="signal_name"><a class="link" href="DmapControlShare.html#DmapControlShare-remote-lost" title="The “remote-lost” signal">remote-lost</a></td>
+<td class="signal_flags">Run Last</td>
+</tr>
+<tr>
+<td class="signal_type"><span class="returnvalue">void</span></td>
+<td class="signal_name"><a class="link" href="DmapControlShare.html#DmapControlShare-remote-paired" title="The “remote-paired” signal">remote-paired</a></td>
+<td class="signal_flags">Run Last</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="DmapControlShare.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<pre class="screen">    GObject
+    <span class="lineart">╰──</span> <a class="link" href="DmapShare.html" title="DmapShare">DmapShare</a>
+        <span class="lineart">╰──</span> DmapControlShare
+</pre>
+</div>
+<div class="refsect1">
+<a name="DmapControlShare.description"></a><h2>Description</h2>
+<p><a class="link" href="DmapControlShare.html" title="DmapControlShare"><span class="type">DmapControlShare</span></a> objects encapsulate a DACP share.</p>
+</div>
+<div class="refsect1">
+<a name="DmapControlShare.functions_details"></a><h2>Functions</h2>
+<div class="refsect2">
+<a name="dmap-control-share-new"></a><h3>dmap_control_share_new ()</h3>
+<pre class="programlisting"><a class="link" href="DmapControlShare.html" title="DmapControlShare"><span class="returnvalue">DmapControlShare</span></a> *
+dmap_control_share_new (<em class="parameter"><code>const <span class="type">gchar</span> *library_name</code></em>,
+                        <em class="parameter"><code><a class="link" href="DmapControlPlayer.html" title="DmapControlPlayer"><span class="type">DmapControlPlayer</span></a> *player</code></em>,
+                        <em class="parameter"><code><a class="link" href="DmapDb.html" title="DmapDb"><span class="type">DmapDb</span></a> *db</code></em>,
+                        <em class="parameter"><code><a class="link" href="DmapContainerDb.html" title="DmapContainerDb"><span class="type">DmapContainerDb</span></a> *container_db</code></em>);</pre>
+<p>Creates a new DACP share and publishes it using mDNS.</p>
+<div class="refsect3">
+<a name="dmap-control-share-new.parameters"></a><h4>Parameters</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="parameters_name">
+<col class="parameters_description">
+<col width="200px" class="parameters_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="parameter_name"><p>library_name</p></td>
+<td class="parameter_description"><p>The library name that will be shown in the remote.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>player</p></td>
+<td class="parameter_description"><p>A <a class="link" href="DmapControlPlayer.html" title="DmapControlPlayer"><span class="type">DmapControlPlayer</span></a> instance, used to retrieve information from a player
+implementation.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>db</p></td>
+<td class="parameter_description"><p>a media database represented by a <a class="link" href="DmapDb.html" title="DmapDb"><span class="type">DmapDb</span></a> instance.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>container_db</p></td>
+<td class="parameter_description"><p>a container (album) database represented by a <a class="link" href="DmapContainerDb.html" title="DmapContainerDb"><span class="type">DmapContainerDb</span></a>
+instance.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="dmap-control-share-new.returns"></a><h4>Returns</h4>
+<p> a pointer to a <a class="link" href="DmapControlShare.html" title="DmapControlShare"><span class="type">DmapControlShare</span></a>.</p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="dmap-control-share-pair"></a><h3>dmap_control_share_pair ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+dmap_control_share_pair (<em class="parameter"><code><a class="link" href="DmapControlShare.html" title="DmapControlShare"><span class="type">DmapControlShare</span></a> *share</code></em>,
+                         <em class="parameter"><code><span class="type">gchar</span> *service_name</code></em>,
+                         <em class="parameter"><code><span class="type">gchar</span> passcode[4]</code></em>);</pre>
+<p>Pairs a DACP client (Remote) with this server. If the passcode is 
+correct (the same as shown on the remote), the remote will start connecting
+to this server.</p>
+<div class="refsect3">
+<a name="dmap-control-share-pair.parameters"></a><h4>Parameters</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="parameters_name">
+<col class="parameters_description">
+<col width="200px" class="parameters_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="parameter_name"><p>share</p></td>
+<td class="parameter_description"><p>a <a class="link" href="DmapControlShare.html" title="DmapControlShare"><span class="type">DmapControlShare</span></a> </p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>service_name</p></td>
+<td class="parameter_description"><p>DACP client (remote) service identifier.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>passcode</p></td>
+<td class="parameter_description"><p>4-Digit PIN code entered by the user.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="dmap-control-share-start-lookup"></a><h3>dmap_control_share_start_lookup ()</h3>
+<pre class="programlisting"><span class="returnvalue">gboolean</span>
+dmap_control_share_start_lookup (<em class="parameter"><code><a class="link" href="DmapControlShare.html" title="DmapControlShare"><span class="type">DmapControlShare</span></a> *share</code></em>,
+                                 <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
+<p>Start looking up for DACP remotes. Connect to <a class="link" href="DmapControlShare.html#DmapControlShare-remote-found" title="The “remote-found” signal"><span class="type">“remote-found”</span></a> signal
+to detect new remotes. Be aware that when a <a class="link" href="DmapControlShare.html" title="DmapControlShare"><span class="type">DmapControlShare</span></a> is created, only 
+after calling this function is that it starts looking up for Remotes on the
+network.</p>
+<div class="refsect3">
+<a name="dmap-control-share-start-lookup.parameters"></a><h4>Parameters</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="parameters_name">
+<col class="parameters_description">
+<col width="200px" class="parameters_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="parameter_name"><p>share</p></td>
+<td class="parameter_description"><p>A <a class="link" href="DmapControlShare.html" title="DmapControlShare"><span class="type">DmapControlShare</span></a>.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>error</p></td>
+<td class="parameter_description"><p>A <span class="type">GError</span>.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="dmap-control-share-start-lookup.returns"></a><h4>Returns</h4>
+<p> TRUE on success, else FALSE with error set.</p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="dmap-control-share-stop-lookup"></a><h3>dmap_control_share_stop_lookup ()</h3>
+<pre class="programlisting"><span class="returnvalue">gboolean</span>
+dmap_control_share_stop_lookup (<em class="parameter"><code><a class="link" href="DmapControlShare.html" title="DmapControlShare"><span class="type">DmapControlShare</span></a> *share</code></em>,
+                                <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
+<p>Stop looking up for DACP remotes.</p>
+<div class="refsect3">
+<a name="dmap-control-share-stop-lookup.parameters"></a><h4>Parameters</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="parameters_name">
+<col class="parameters_description">
+<col width="200px" class="parameters_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="parameter_name"><p>share</p></td>
+<td class="parameter_description"><p>A <a class="link" href="DmapControlShare.html" title="DmapControlShare"><span class="type">DmapControlShare</span></a>.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>error</p></td>
+<td class="parameter_description"><p>A <span class="type">GError</span>.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="dmap-control-share-player-updated"></a><h3>dmap_control_share_player_updated ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+dmap_control_share_player_updated (<em class="parameter"><code><a class="link" href="DmapControlShare.html" title="DmapControlShare"><span class="type">DmapControlShare</span></a> *share</code></em>);</pre>
+</div>
+</div>
+<div class="refsect1">
+<a name="DmapControlShare.property-details"></a><h2>Property Details</h2>
+<div class="refsect2">
+<a name="DmapControlShare--library-name"></a><h3>The <code class="literal">“library-name”</code> property</h3>
+<pre class="programlisting">  “library-name”             <span class="type">char</span> *</pre>
+<p>Library name as will be shown in the Remote.</p>
+<p>Owner: DmapControlShare</p>
+<p>Flags: Read / Write</p>
+<p>Default value: NULL</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapControlShare--player"></a><h3>The <code class="literal">“player”</code> property</h3>
+<pre class="programlisting">  “player”                   <span class="type">GObject</span> *</pre>
+<p>Player.</p>
+<p>Owner: DmapControlShare</p>
+<p>Flags: Read / Write / Construct Only</p>
+</div>
+</div>
+<div class="refsect1">
+<a name="DmapControlShare.signal-details"></a><h2>Signal Details</h2>
+<div class="refsect2">
+<a name="DmapControlShare-add-guid"></a><h3>The <code class="literal">“add-guid”</code> signal</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+user_function (<a class="link" href="DmapControlShare.html" title="DmapControlShare"><span class="type">DmapControlShare</span></a> *share,
+               <span class="type">char</span>             *guid,
+               <span class="type">gpointer</span>          user_data)</pre>
+<p>Signal emited when the remote wants to log in and save a special guid
+which will be used later when it wants to reconnect. With this guid,
+we know that this remote has connected before, thus this signal must
+save somewhere all guids that connected before, so that ::lookup-guid
+will find this remote. The user interface probably wants to include
+a button to forget previously connected remotes, so that the user may
+disconnect all previously connected remotes.</p>
+<div class="refsect3">
+<a name="DmapControlShare-add-guid.parameters"></a><h4>Parameters</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="parameters_name">
+<col class="parameters_description">
+<col width="200px" class="parameters_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="parameter_name"><p>share</p></td>
+<td class="parameter_description"><p>the <a class="link" href="DmapControlShare.html" title="DmapControlShare"><span class="type">DmapControlShare</span></a> that received the signal</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>guid</p></td>
+<td class="parameter_description"><p>a string containing the guid to be saved.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>user_data</p></td>
+<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<p>Flags: Run Last</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapControlShare-lookup-guid"></a><h3>The <code class="literal">“lookup-guid”</code> signal</h3>
+<pre class="programlisting"><span class="returnvalue">gboolean</span>
+user_function (<a class="link" href="DmapControlShare.html" title="DmapControlShare"><span class="type">DmapControlShare</span></a> *share,
+               <span class="type">char</span>             *guid,
+               <span class="type">gpointer</span>          user_data)</pre>
+<p>Signal emited when the remote has logged in before and wants to be
+validated. An implementation must implement this signal to lookup
+for guids saved by ::add-guid</p>
+<div class="refsect3">
+<a name="DmapControlShare-lookup-guid.parameters"></a><h4>Parameters</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="parameters_name">
+<col class="parameters_description">
+<col width="200px" class="parameters_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="parameter_name"><p>share</p></td>
+<td class="parameter_description"><p>the <a class="link" href="DmapControlShare.html" title="DmapControlShare"><span class="type">DmapControlShare</span></a> that received the signal</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>guid</p></td>
+<td class="parameter_description"><p>a string containing the guid to be validated.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>user_data</p></td>
+<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<p>Flags: Run Last</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapControlShare-remote-found"></a><h3>The <code class="literal">“remote-found”</code> signal</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+user_function (<a class="link" href="DmapControlShare.html" title="DmapControlShare"><span class="type">DmapControlShare</span></a> *share,
+               <span class="type">char</span>             *service_name,
+               <span class="type">char</span>             *remote_name,
+               <span class="type">gpointer</span>          user_data)</pre>
+<p>Signal emited when a remote is found in the local network.</p>
+<div class="refsect3">
+<a name="DmapControlShare-remote-found.parameters"></a><h4>Parameters</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="parameters_name">
+<col class="parameters_description">
+<col width="200px" class="parameters_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="parameter_name"><p>share</p></td>
+<td class="parameter_description"><p>the <a class="link" href="DmapControlShare.html" title="DmapControlShare"><span class="type">DmapControlShare</span></a> that received the signal.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>service_name</p></td>
+<td class="parameter_description"><p>the remote identifier.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>remote_name</p></td>
+<td class="parameter_description"><p>the remote friendly name.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>user_data</p></td>
+<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<p>Flags: Run Last</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapControlShare-remote-lost"></a><h3>The <code class="literal">“remote-lost”</code> signal</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+user_function (<a class="link" href="DmapControlShare.html" title="DmapControlShare"><span class="type">DmapControlShare</span></a> *share,
+               <span class="type">char</span>             *service_name,
+               <span class="type">gpointer</span>          user_data)</pre>
+<p>Signal emited when a remote is lost in the local network.</p>
+<div class="refsect3">
+<a name="DmapControlShare-remote-lost.parameters"></a><h4>Parameters</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="parameters_name">
+<col class="parameters_description">
+<col width="200px" class="parameters_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="parameter_name"><p>share</p></td>
+<td class="parameter_description"><p>the <a class="link" href="DmapControlShare.html" title="DmapControlShare"><span class="type">DmapControlShare</span></a> that received the signal</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>service_name</p></td>
+<td class="parameter_description"><p>the remote identifier.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>user_data</p></td>
+<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<p>Flags: Run Last</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapControlShare-remote-paired"></a><h3>The <code class="literal">“remote-paired”</code> signal</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+user_function (<a class="link" href="DmapControlShare.html" title="DmapControlShare"><span class="type">DmapControlShare</span></a> *share,
+               <span class="type">char</span>             *service_name,
+               <span class="type">gboolean</span>          connected,
+               <span class="type">gpointer</span>          user_data)</pre>
+<p>Signal emited when a remote is paired.</p>
+<div class="refsect3">
+<a name="DmapControlShare-remote-paired.parameters"></a><h4>Parameters</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="parameters_name">
+<col class="parameters_description">
+<col width="200px" class="parameters_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="parameter_name"><p>share</p></td>
+<td class="parameter_description"><p>the <a class="link" href="DmapControlShare.html" title="DmapControlShare"><span class="type">DmapControlShare</span></a> that received the signal</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>service_name</p></td>
+<td class="parameter_description"><p>the remote identifier.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>connected</p></td>
+<td class="parameter_description"><p>indicates if the connection was succesfull or not.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>user_data</p></td>
+<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<p>Flags: Run Last</p>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.33.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/DMAPDb.html b/doc/html/DmapDb.html
similarity index 54%
rename from doc/html/DMAPDb.html
rename to doc/html/DmapDb.html
index b28d2a3..d380d8b 100644
--- a/doc/html/DMAPDb.html
+++ b/doc/html/DmapDb.html
@@ -2,38 +2,38 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>DMAPDb: libdmapsharing-3.0 Reference Manual</title>
+<title>DmapDb: libdmapsharing Reference Manual</title>
 <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
-<link rel="home" href="index.html" title="libdmapsharing-3.0 Reference Manual">
-<link rel="up" href="ch01.html" title="Libdmapsharing overview">
-<link rel="prev" href="DMAPContainerRecord.html" title="DMAPContainerRecord">
-<link rel="next" href="libdmapsharing-3.0-dmap-enums.html" title="dmap-enums">
-<meta name="generator" content="GTK-Doc V1.32 (XML mode)">
+<link rel="home" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="up" href="ch04.html" title="Libdmapsharing Objects and Interfaces">
+<link rel="prev" href="DmapControlShare.html" title="DmapControlShare">
+<link rel="next" href="libdmapsharing-4.0-dmap-enums.html" title="dmap-enums">
+<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
 <td width="100%" align="left" class="shortcuts">
 <a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
-                  <a href="#DMAPDb.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
-                  <a href="#DMAPDb.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
+                  <a href="#DmapDb.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
+                  <a href="#DmapDb.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
 </td>
 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
-<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
-<td><a accesskey="p" href="DMAPContainerRecord.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="libdmapsharing-3.0-dmap-enums.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+<td><a accesskey="u" href="ch04.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="DmapControlShare.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="libdmapsharing-4.0-dmap-enums.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
 </tr></table>
 <div class="refentry">
-<a name="DMAPDb"></a><div class="titlepage"></div>
+<a name="DmapDb"></a><div class="titlepage"></div>
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
-<h2><span class="refentrytitle"><a name="DMAPDb.top_of_page"></a>DMAPDb</span></h2>
-<p>DMAPDb</p>
+<h2><span class="refentrytitle"><a name="DmapDb.top_of_page"></a>DmapDb</span></h2>
+<p>DmapDb — An interface for DMAP databases.</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="DMAPDb.functions"></a><h2>Functions</h2>
+<a name="DmapDb.functions"></a><h2>Functions</h2>
 <div class="informaltable"><table class="informaltable" width="100%" border="0">
 <colgroup>
 <col width="150px" class="functions_proto_type">
@@ -41,10 +41,11 @@
 </colgroup>
 <tbody>
 <tr>
-<td class="function_type">const <span class="returnvalue">char</span> *
+<td class="function_type">
+<span class="returnvalue">void</span>
 </td>
 <td class="function_name">
-<span class="c_punctuation">(</span><a class="link" href="DMAPDb.html#RecordGetValueFunc" title="RecordGetValueFunc ()">*RecordGetValueFunc</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
+<span class="c_punctuation">(</span><a class="link" href="DmapDb.html#DmapIdRecordFunc" title="DmapIdRecordFunc ()">*DmapIdRecordFunc</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
 </td>
 </tr>
 <tr>
@@ -52,7 +53,7 @@
 <span class="returnvalue">guint</span>
 </td>
 <td class="function_name">
-<a class="link" href="DMAPDb.html#dmap-db-add" title="dmap_db_add ()">dmap_db_add</a> <span class="c_punctuation">()</span>
+<a class="link" href="DmapDb.html#dmap-db-add" title="dmap_db_add ()">dmap_db_add</a> <span class="c_punctuation">()</span>
 </td>
 </tr>
 <tr>
@@ -60,7 +61,7 @@
 <span class="returnvalue">guint</span>
 </td>
 <td class="function_name">
-<a class="link" href="DMAPDb.html#dmap-db-add-with-id" title="dmap_db_add_with_id ()">dmap_db_add_with_id</a> <span class="c_punctuation">()</span>
+<a class="link" href="DmapDb.html#dmap-db-add-with-id" title="dmap_db_add_with_id ()">dmap_db_add_with_id</a> <span class="c_punctuation">()</span>
 </td>
 </tr>
 <tr>
@@ -68,15 +69,15 @@
 <span class="returnvalue">guint</span>
 </td>
 <td class="function_name">
-<a class="link" href="DMAPDb.html#dmap-db-add-path" title="dmap_db_add_path ()">dmap_db_add_path</a> <span class="c_punctuation">()</span>
+<a class="link" href="DmapDb.html#dmap-db-add-path" title="dmap_db_add_path ()">dmap_db_add_path</a> <span class="c_punctuation">()</span>
 </td>
 </tr>
 <tr>
 <td class="function_type">
-<a class="link" href="DMAPRecord.html" title="DMAPRecord"><span class="returnvalue">DMAPRecord</span></a> *
+<a class="link" href="DmapRecord.html" title="DmapRecord"><span class="returnvalue">DmapRecord</span></a> *
 </td>
 <td class="function_name">
-<a class="link" href="DMAPDb.html#dmap-db-lookup-by-id" title="dmap_db_lookup_by_id ()">dmap_db_lookup_by_id</a> <span class="c_punctuation">()</span>
+<a class="link" href="DmapDb.html#dmap-db-lookup-by-id" title="dmap_db_lookup_by_id ()">dmap_db_lookup_by_id</a> <span class="c_punctuation">()</span>
 </td>
 </tr>
 <tr>
@@ -84,7 +85,7 @@
 <span class="returnvalue">guint</span>
 </td>
 <td class="function_name">
-<a class="link" href="DMAPDb.html#dmap-db-lookup-id-by-location" title="dmap_db_lookup_id_by_location ()">dmap_db_lookup_id_by_location</a> <span class="c_punctuation">()</span>
+<a class="link" href="DmapDb.html#dmap-db-lookup-id-by-location" title="dmap_db_lookup_id_by_location ()">dmap_db_lookup_id_by_location</a> <span class="c_punctuation">()</span>
 </td>
 </tr>
 <tr>
@@ -92,7 +93,7 @@
 <span class="returnvalue">void</span>
 </td>
 <td class="function_name">
-<a class="link" href="DMAPDb.html#dmap-db-foreach" title="dmap_db_foreach ()">dmap_db_foreach</a> <span class="c_punctuation">()</span>
+<a class="link" href="DmapDb.html#dmap-db-foreach" title="dmap_db_foreach ()">dmap_db_foreach</a> <span class="c_punctuation">()</span>
 </td>
 </tr>
 <tr>
@@ -100,7 +101,7 @@
 <span class="returnvalue">gulong</span>
 </td>
 <td class="function_name">
-<a class="link" href="DMAPDb.html#dmap-db-count" title="dmap_db_count ()">dmap_db_count</a> <span class="c_punctuation">()</span>
+<a class="link" href="DmapDb.html#dmap-db-count" title="dmap_db_count ()">dmap_db_count</a> <span class="c_punctuation">()</span>
 </td>
 </tr>
 <tr>
@@ -108,34 +109,81 @@
 <span class="returnvalue">GHashTable</span> *
 </td>
 <td class="function_name">
-<a class="link" href="DMAPDb.html#dmap-db-apply-filter" title="dmap_db_apply_filter ()">dmap_db_apply_filter</a> <span class="c_punctuation">()</span>
+<a class="link" href="DmapDb.html#dmap-db-apply-filter" title="dmap_db_apply_filter ()">dmap_db_apply_filter</a> <span class="c_punctuation">()</span>
 </td>
 </tr>
 </tbody>
 </table></div>
 </div>
 <div class="refsect1">
-<a name="DMAPDb.object-hierarchy"></a><h2>Object Hierarchy</h2>
-<pre class="screen">    <a href="/usr/share/gtk-doc/html/gobject/GTypeModule.html">GInterface</a>
-    <span class="lineart">╰──</span> DMAPDb
+<a name="DmapDb.other"></a><h2>Types and Values</h2>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="other_proto_type">
+<col class="other_proto_name">
+</colgroup>
+<tbody><tr>
+<td class="datatype_keyword">enum</td>
+<td class="function_name"><a class="link" href="DmapDb.html#DmapDbId" title="enum DmapDbId">DmapDbId</a></td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="DmapDb.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<pre class="screen">    <a href="/usr/share/gtk-doc/html/gobject/gobject-Enumeration-and-Flag-Types.html">GEnum</a>
+    <span class="lineart">╰──</span> DmapDbId
+    <a href="/usr/share/gtk-doc/html/gobject/GTypeModule.html">GInterface</a>
+    <span class="lineart">╰──</span> DmapDb
 </pre>
 </div>
 <div class="refsect1">
-<a name="DMAPDb.description"></a><h2>Description</h2>
+<a name="DmapDb.description"></a><h2>Description</h2>
+<p><a class="link" href="DmapDb.html" title="DmapDb"><span class="type">DmapDb</span></a> provides an interface for DMAP databases.</p>
 </div>
 <div class="refsect1">
-<a name="DMAPDb.functions_details"></a><h2>Functions</h2>
+<a name="DmapDb.functions_details"></a><h2>Functions</h2>
 <div class="refsect2">
-<a name="RecordGetValueFunc"></a><h3>RecordGetValueFunc ()</h3>
-<pre class="programlisting">const <span class="returnvalue">char</span> *
-<span class="c_punctuation">(</span>*RecordGetValueFunc<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="DMAPRecord.html" title="DMAPRecord"><span class="type">DMAPRecord</span></a> *record</code></em>);</pre>
+<a name="DmapIdRecordFunc"></a><h3>DmapIdRecordFunc ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+<span class="c_punctuation">(</span>*DmapIdRecordFunc<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">guint</span> id</code></em>,
+                     <em class="parameter"><code><a class="link" href="DmapRecord.html" title="DmapRecord"><span class="type">DmapRecord</span></a> *record</code></em>,
+                     <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);</pre>
+<p>The type of function passed to <a class="link" href="DmapDb.html#dmap-db-foreach" title="dmap_db_foreach ()"><code class="function">dmap_db_foreach()</code></a>.</p>
+<div class="refsect3">
+<a name="DmapIdRecordFunc.parameters"></a><h4>Parameters</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="parameters_name">
+<col class="parameters_description">
+<col width="200px" class="parameters_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="parameter_name"><p>id</p></td>
+<td class="parameter_description"><p>a DMAP record ID</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>record</p></td>
+<td class="parameter_description"><p>a <a class="link" href="DmapRecord.html" title="DmapRecord"><span class="type">DmapRecord</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>user_data</p></td>
+<td class="parameter_description"><p>user data. </p></td>
+<td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td>
+</tr>
+</tbody>
+</table></div>
+</div>
 </div>
 <hr>
 <div class="refsect2">
 <a name="dmap-db-add"></a><h3>dmap_db_add ()</h3>
 <pre class="programlisting"><span class="returnvalue">guint</span>
-dmap_db_add (<em class="parameter"><code><a class="link" href="DMAPDb.html" title="DMAPDb"><span class="type">DMAPDb</span></a> *db</code></em>,
-             <em class="parameter"><code><a class="link" href="DMAPRecord.html" title="DMAPRecord"><span class="type">DMAPRecord</span></a> *record</code></em>);</pre>
+dmap_db_add (<em class="parameter"><code><a class="link" href="DmapDb.html" title="DmapDb"><span class="type">DmapDb</span></a> *db</code></em>,
+             <em class="parameter"><code><a class="link" href="DmapRecord.html" title="DmapRecord"><span class="type">DmapRecord</span></a> *record</code></em>,
+             <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
 <p>Add a record to the database.</p>
 <div class="refsect3">
 <a name="dmap-db-add.parameters"></a><h4>Parameters</h4>
@@ -156,26 +204,36 @@ dmap_db_add (<em class="parameter"><code><a class="link" href="DMAPDb.html" titl
 <td class="parameter_description"><p>A database record.</p></td>
 <td class="parameter_annotations"> </td>
 </tr>
+<tr>
+<td class="parameter_name"><p>error</p></td>
+<td class="parameter_description"><p>return location for a GError, or NULL.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
 </tbody>
 </table></div>
 </div>
 <div class="refsect3">
 <a name="dmap-db-add.returns"></a><h4>Returns</h4>
-<p> The ID for the newly added record. A reference to the record
-will be retained by the database (if required; an adapter-type
-implementation may not want to retain a reference as the record data may
-be placed elsewhere). In all cases, the record should be unrefed by the
-calling code.</p>
+<p> The ID for the newly added record or <em class="parameter"><code>DMAP_DB_ID_BAD</code></em>
+on failure. A
+reference to the record will be retained by the database (if required; an
+adapter-type implementation might not want to retain a reference as the
+record data may be placed elsewhere). In all cases, a returned record should
+be unrefed by the calling code.</p>
 </div>
 </div>
 <hr>
 <div class="refsect2">
 <a name="dmap-db-add-with-id"></a><h3>dmap_db_add_with_id ()</h3>
 <pre class="programlisting"><span class="returnvalue">guint</span>
-dmap_db_add_with_id (<em class="parameter"><code><a class="link" href="DMAPDb.html" title="DMAPDb"><span class="type">DMAPDb</span></a> *db</code></em>,
-                     <em class="parameter"><code><a class="link" href="DMAPRecord.html" title="DMAPRecord"><span class="type">DMAPRecord</span></a> *record</code></em>,
-                     <em class="parameter"><code><span class="type">guint</span> id</code></em>);</pre>
-<p>Add a record to the database and assign it the given ID.</p>
+dmap_db_add_with_id (<em class="parameter"><code><a class="link" href="DmapDb.html" title="DmapDb"><span class="type">DmapDb</span></a> *db</code></em>,
+                     <em class="parameter"><code><a class="link" href="DmapRecord.html" title="DmapRecord"><span class="type">DmapRecord</span></a> *record</code></em>,
+                     <em class="parameter"><code><span class="type">guint</span> id</code></em>,
+                     <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
+<p>Add a record to the database and assign it the given ID. <em class="parameter"><code>id</code></em>
+ cannot be
+<em class="parameter"><code>DMAP_DB_ID_BAD</code></em>
+.</p>
 <div class="refsect3">
 <a name="dmap-db-add-with-id.parameters"></a><h4>Parameters</h4>
 <div class="informaltable"><table class="informaltable" width="100%" border="0">
@@ -200,12 +258,17 @@ dmap_db_add_with_id (<em class="parameter"><code><a class="link" href="DMAPDb.ht
 <td class="parameter_description"><p>A database record ID.</p></td>
 <td class="parameter_annotations"> </td>
 </tr>
+<tr>
+<td class="parameter_name"><p>error</p></td>
+<td class="parameter_description"><p>return location for a GError, or NULL.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
 </tbody>
 </table></div>
 </div>
 <div class="refsect3">
 <a name="dmap-db-add-with-id.returns"></a><h4>Returns</h4>
-<p> The ID for the newly added record.</p>
+<p> The ID for the newly added record or DMAP_DB_ID_BAD on failure.</p>
 <p>See also the notes for dmap_db_add regarding reference counting.</p>
 </div>
 </div>
@@ -213,8 +276,9 @@ dmap_db_add_with_id (<em class="parameter"><code><a class="link" href="DMAPDb.ht
 <div class="refsect2">
 <a name="dmap-db-add-path"></a><h3>dmap_db_add_path ()</h3>
 <pre class="programlisting"><span class="returnvalue">guint</span>
-dmap_db_add_path (<em class="parameter"><code><a class="link" href="DMAPDb.html" title="DMAPDb"><span class="type">DMAPDb</span></a> *db</code></em>,
-                  <em class="parameter"><code>const <span class="type">gchar</span> *path</code></em>);</pre>
+dmap_db_add_path (<em class="parameter"><code><a class="link" href="DmapDb.html" title="DmapDb"><span class="type">DmapDb</span></a> *db</code></em>,
+                  <em class="parameter"><code>const <span class="type">gchar</span> *path</code></em>,
+                  <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
 <p>Create a record and add it to the database.</p>
 <div class="refsect3">
 <a name="dmap-db-add-path.parameters"></a><h4>Parameters</h4>
@@ -235,20 +299,25 @@ dmap_db_add_path (<em class="parameter"><code><a class="link" href="DMAPDb.html"
 <td class="parameter_description"><p>A path to an appropriate media file.</p></td>
 <td class="parameter_annotations"> </td>
 </tr>
+<tr>
+<td class="parameter_name"><p>error</p></td>
+<td class="parameter_description"><p>return location for a GError, or NULL.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
 </tbody>
 </table></div>
 </div>
 <div class="refsect3">
 <a name="dmap-db-add-path.returns"></a><h4>Returns</h4>
-<p> The ID for the newly added record.</p>
+<p> The ID for the newly added record or DMAP_DB_ID_BAD on failure.</p>
 <p>See also the notes for dmap_db_add regarding reference counting.</p>
 </div>
 </div>
 <hr>
 <div class="refsect2">
 <a name="dmap-db-lookup-by-id"></a><h3>dmap_db_lookup_by_id ()</h3>
-<pre class="programlisting"><a class="link" href="DMAPRecord.html" title="DMAPRecord"><span class="returnvalue">DMAPRecord</span></a> *
-dmap_db_lookup_by_id (<em class="parameter"><code>const <a class="link" href="DMAPDb.html" title="DMAPDb"><span class="type">DMAPDb</span></a> *db</code></em>,
+<pre class="programlisting"><a class="link" href="DmapRecord.html" title="DmapRecord"><span class="returnvalue">DmapRecord</span></a> *
+dmap_db_lookup_by_id (<em class="parameter"><code>const <a class="link" href="DmapDb.html" title="DmapDb"><span class="type">DmapDb</span></a> *db</code></em>,
                       <em class="parameter"><code><span class="type">guint</span> id</code></em>);</pre>
 <div class="refsect3">
 <a name="dmap-db-lookup-by-id.parameters"></a><h4>Parameters</h4>
@@ -274,9 +343,10 @@ dmap_db_lookup_by_id (<em class="parameter"><code>const <a class="link" href="DM
 </div>
 <div class="refsect3">
 <a name="dmap-db-lookup-by-id.returns"></a><h4>Returns</h4>
-<p> the database record corresponding to <em class="parameter"><code>id</code></em>
-. This record should
-be unrefed by the calling code when no longer required.</p>
+<p>the database record corresponding to <em class="parameter"><code>id</code></em>
+. <em class="parameter"><code>id</code></em>
+cannot be DMAP_DB_ID_BAD. The returned record should be unrefed by the
+calling code when no longer required.</p>
 <p>If you are implementing a full database using this API, then you
 probably want to increment the reference count before returning a record
 pointer.</p>
@@ -285,14 +355,15 @@ and the records are stored elsewhere, then you will probably return a
 transient record. That is, once the user is done using it, the returned
 record should be free'd because it is a adapter copy of the real record.
 In this case, the reference count should not be incremented before
-returning a record pointer.</p>
+returning a record pointer. </p>
+<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
 </div>
 </div>
 <hr>
 <div class="refsect2">
 <a name="dmap-db-lookup-id-by-location"></a><h3>dmap_db_lookup_id_by_location ()</h3>
 <pre class="programlisting"><span class="returnvalue">guint</span>
-dmap_db_lookup_id_by_location (<em class="parameter"><code>const <a class="link" href="DMAPDb.html" title="DMAPDb"><span class="type">DMAPDb</span></a> *db</code></em>,
+dmap_db_lookup_id_by_location (<em class="parameter"><code>const <a class="link" href="DmapDb.html" title="DmapDb"><span class="type">DmapDb</span></a> *db</code></em>,
                                <em class="parameter"><code>const <span class="type">gchar</span> *location</code></em>);</pre>
 <div class="refsect3">
 <a name="dmap-db-lookup-id-by-location.parameters"></a><h4>Parameters</h4>
@@ -319,16 +390,16 @@ dmap_db_lookup_id_by_location (<em class="parameter"><code>const <a class="link"
 <div class="refsect3">
 <a name="dmap-db-lookup-id-by-location.returns"></a><h4>Returns</h4>
 <p> the database id for the record corresponding to <em class="parameter"><code>path</code></em>
-or 0 if
-such a record does not exist.</p>
+or
+DMAP_DB_ID_BAD if such a record does not exist.</p>
 </div>
 </div>
 <hr>
 <div class="refsect2">
 <a name="dmap-db-foreach"></a><h3>dmap_db_foreach ()</h3>
 <pre class="programlisting"><span class="returnvalue">void</span>
-dmap_db_foreach (<em class="parameter"><code>const <a class="link" href="DMAPDb.html" title="DMAPDb"><span class="type">DMAPDb</span></a> *db</code></em>,
-                 <em class="parameter"><code><span class="type">GHFunc</span> func</code></em>,
+dmap_db_foreach (<em class="parameter"><code>const <a class="link" href="DmapDb.html" title="DmapDb"><span class="type">DmapDb</span></a> *db</code></em>,
+                 <em class="parameter"><code><a class="link" href="DmapDb.html#DmapIdRecordFunc" title="DmapIdRecordFunc ()"><span class="type">DmapIdRecordFunc</span></a> func</code></em>,
                  <em class="parameter"><code><span class="type">gpointer</span> data</code></em>);</pre>
 <p>Apply a function to each record in a media database.</p>
 <div class="refsect3">
@@ -347,8 +418,8 @@ dmap_db_foreach (<em class="parameter"><code>const <a class="link" href="DMAPDb.
 </tr>
 <tr>
 <td class="parameter_name"><p>func</p></td>
-<td class="parameter_description"><p>The function to apply to each record in the database.</p></td>
-<td class="parameter_annotations"> </td>
+<td class="parameter_description"><p>The function to apply to each record in the database. </p></td>
+<td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid only during the call to the method."><span class="acronym">scope call</span></acronym>]</span></td>
 </tr>
 <tr>
 <td class="parameter_name"><p>data</p></td>
@@ -363,7 +434,7 @@ dmap_db_foreach (<em class="parameter"><code>const <a class="link" href="DMAPDb.
 <div class="refsect2">
 <a name="dmap-db-count"></a><h3>dmap_db_count ()</h3>
 <pre class="programlisting"><span class="returnvalue">gulong</span>
-dmap_db_count (<em class="parameter"><code>const <a class="link" href="DMAPDb.html" title="DMAPDb"><span class="type">DMAPDb</span></a> *db</code></em>);</pre>
+dmap_db_count (<em class="parameter"><code>const <a class="link" href="DmapDb.html" title="DmapDb"><span class="type">DmapDb</span></a> *db</code></em>);</pre>
 <div class="refsect3">
 <a name="dmap-db-count.parameters"></a><h4>Parameters</h4>
 <div class="informaltable"><table class="informaltable" width="100%" border="0">
@@ -388,12 +459,64 @@ dmap_db_count (<em class="parameter"><code>const <a class="link" href="DMAPDb.ht
 <div class="refsect2">
 <a name="dmap-db-apply-filter"></a><h3>dmap_db_apply_filter ()</h3>
 <pre class="programlisting"><span class="returnvalue">GHashTable</span> *
-dmap_db_apply_filter (<em class="parameter"><code><a class="link" href="DMAPDb.html" title="DMAPDb"><span class="type">DMAPDb</span></a> *db</code></em>,
+dmap_db_apply_filter (<em class="parameter"><code><a class="link" href="DmapDb.html" title="DmapDb"><span class="type">DmapDb</span></a> *db</code></em>,
                       <em class="parameter"><code><span class="type">GSList</span> *filter_def</code></em>);</pre>
+<div class="refsect3">
+<a name="dmap-db-apply-filter.parameters"></a><h4>Parameters</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="parameters_name">
+<col class="parameters_description">
+<col width="200px" class="parameters_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="parameter_name"><p>db</p></td>
+<td class="parameter_description"><p>A media database.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>filter_def</p></td>
+<td class="parameter_description"><p>A series of filter definitions. </p></td>
+<td class="parameter_annotations"><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> DmapDbFilterDefinition]</span></td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="dmap-db-apply-filter.returns"></a><h4>Returns</h4>
+<p>the records which satisfy a record in <em class="parameter"><code>filter_def</code></em>
+. </p>
+<p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> guint DmapRecord][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
+</div>
+</div>
+</div>
+<div class="refsect1">
+<a name="DmapDb.other_details"></a><h2>Types and Values</h2>
+<div class="refsect2">
+<a name="DmapDbId"></a><h3>enum DmapDbId</h3>
+<p>Special DmapDb ID values.</p>
+<div class="refsect3">
+<a name="DmapDbId.members"></a><h4>Members</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="300px" class="enum_members_name">
+<col class="enum_members_description">
+<col width="200px" class="enum_members_annotations">
+</colgroup>
+<tbody><tr>
+<td class="enum_member_name"><p><a name="DMAP-DB-ID-BAD:CAPS"></a>DMAP_DB_ID_BAD</p></td>
+<td class="enum_member_description">
+<p>the value which represents a bad DmapDb ID.</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr></tbody>
+</table></div>
+</div>
 </div>
 </div>
 </div>
 <div class="footer">
-<hr>Generated by GTK-Doc V1.32</div>
+<hr>Generated by GTK-Doc V1.33.1</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/doc/html/DmapImageConnection.html b/doc/html/DmapImageConnection.html
new file mode 100644
index 0000000..ab7f4e4
--- /dev/null
+++ b/doc/html/DmapImageConnection.html
@@ -0,0 +1,79 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>DmapImageConnection: libdmapsharing Reference Manual</title>
+<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
+<link rel="home" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="up" href="ch04.html" title="Libdmapsharing Objects and Interfaces">
+<link rel="prev" href="DmapTranscodeStream.html" title="DmapTranscodeStream">
+<link rel="next" href="DmapImageRecord.html" title="DmapImageRecord">
+<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
+<td width="100%" align="left" class="shortcuts">
+<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
+                  <a href="#DmapImageConnection.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
+                  <a href="#DmapImageConnection.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
+</td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
+<td><a accesskey="u" href="ch04.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="DmapTranscodeStream.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="DmapImageRecord.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="refentry">
+<a name="DmapImageConnection"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="DmapImageConnection.top_of_page"></a>DmapImageConnection</span></h2>
+<p>DmapImageConnection — A DPAP connection.</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="DmapImageConnection.functions"></a><h2>Functions</h2>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="functions_proto_type">
+<col class="functions_proto_name">
+</colgroup>
+<tbody><tr>
+<td class="function_type">
+<a class="link" href="DmapImageConnection.html" title="DmapImageConnection"><span class="returnvalue">DmapImageConnection</span></a> *
+</td>
+<td class="function_name">
+<a class="link" href="DmapImageConnection.html#dmap-image-connection-new" title="dmap_image_connection_new ()">dmap_image_connection_new</a> <span class="c_punctuation">()</span>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="DmapImageConnection.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<pre class="screen">    GObject
+    <span class="lineart">╰──</span> <a class="link" href="DmapConnection.html" title="DmapConnection">DmapConnection</a>
+        <span class="lineart">╰──</span> DmapImageConnection
+</pre>
+</div>
+<div class="refsect1">
+<a name="DmapImageConnection.description"></a><h2>Description</h2>
+<p><a class="link" href="DmapImageConnection.html" title="DmapImageConnection"><span class="type">DmapImageConnection</span></a> objects encapsulate a DPAP connection.</p>
+</div>
+<div class="refsect1">
+<a name="DmapImageConnection.functions_details"></a><h2>Functions</h2>
+<div class="refsect2">
+<a name="dmap-image-connection-new"></a><h3>dmap_image_connection_new ()</h3>
+<pre class="programlisting"><a class="link" href="DmapImageConnection.html" title="DmapImageConnection"><span class="returnvalue">DmapImageConnection</span></a> *
+dmap_image_connection_new (<em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
+                           <em class="parameter"><code>const <span class="type">char</span> *host</code></em>,
+                           <em class="parameter"><code><span class="type">guint</span> port</code></em>,
+                           <em class="parameter"><code><a class="link" href="DmapDb.html" title="DmapDb"><span class="type">DmapDb</span></a> *db</code></em>,
+                           <em class="parameter"><code><a class="link" href="DmapRecordFactory.html" title="DmapRecordFactory"><span class="type">DmapRecordFactory</span></a> *factory</code></em>);</pre>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.33.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/DmapImageRecord.html b/doc/html/DmapImageRecord.html
new file mode 100644
index 0000000..9c2370e
--- /dev/null
+++ b/doc/html/DmapImageRecord.html
@@ -0,0 +1,296 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>DmapImageRecord: libdmapsharing Reference Manual</title>
+<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
+<link rel="home" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="up" href="ch04.html" title="Libdmapsharing Objects and Interfaces">
+<link rel="prev" href="DmapImageConnection.html" title="DmapImageConnection">
+<link rel="next" href="DmapImageShare.html" title="DmapImageShare">
+<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
+<td width="100%" align="left" class="shortcuts">
+<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
+                  <a href="#DmapImageRecord.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
+                  <a href="#DmapImageRecord.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span> 
+                  <a href="#DmapImageRecord.properties" class="shortcut">Properties</a></span>
+</td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
+<td><a accesskey="u" href="ch04.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="DmapImageConnection.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="DmapImageShare.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="refentry">
+<a name="DmapImageRecord"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="DmapImageRecord.top_of_page"></a>DmapImageRecord</span></h2>
+<p>DmapImageRecord — The description of an item shared using DPAP.</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="DmapImageRecord.functions"></a><h2>Functions</h2>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="functions_proto_type">
+<col class="functions_proto_name">
+</colgroup>
+<tbody><tr>
+<td class="function_type">
+<span class="returnvalue">GInputStream</span> *
+</td>
+<td class="function_name">
+<a class="link" href="DmapImageRecord.html#dmap-image-record-read" title="dmap_image_record_read ()">dmap_image_record_read</a> <span class="c_punctuation">()</span>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="DmapImageRecord.properties"></a><h2>Properties</h2>
+<div class="informaltable"><table class="informaltable" border="0">
+<colgroup>
+<col width="150px" class="properties_type">
+<col width="300px" class="properties_name">
+<col width="200px" class="properties_flags">
+</colgroup>
+<tbody>
+<tr>
+<td class="property_type">
+<span class="type">char</span> *</td>
+<td class="property_name"><a class="link" href="DmapImageRecord.html#DmapImageRecord--aspect-ratio" title="The “aspect-ratio” property">aspect-ratio</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type">
+<span class="type">char</span> *</td>
+<td class="property_name"><a class="link" href="DmapImageRecord.html#DmapImageRecord--comments" title="The “comments” property">comments</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><span class="type">int</span></td>
+<td class="property_name"><a class="link" href="DmapImageRecord.html#DmapImageRecord--creation-date" title="The “creation-date” property">creation-date</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type">
+<span class="type">char</span> *</td>
+<td class="property_name"><a class="link" href="DmapImageRecord.html#DmapImageRecord--filename" title="The “filename” property">filename</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type">
+<span class="type">char</span> *</td>
+<td class="property_name"><a class="link" href="DmapImageRecord.html#DmapImageRecord--format" title="The “format” property">format</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type">
+<span class="type">GArray</span> *</td>
+<td class="property_name"><a class="link" href="DmapImageRecord.html#DmapImageRecord--hash" title="The “hash” property">hash</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><span class="type">int</span></td>
+<td class="property_name"><a class="link" href="DmapImageRecord.html#DmapImageRecord--large-filesize" title="The “large-filesize” property">large-filesize</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type">
+<span class="type">char</span> *</td>
+<td class="property_name"><a class="link" href="DmapImageRecord.html#DmapImageRecord--location" title="The “location” property">location</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><span class="type">int</span></td>
+<td class="property_name"><a class="link" href="DmapImageRecord.html#DmapImageRecord--pixel-height" title="The “pixel-height” property">pixel-height</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><span class="type">int</span></td>
+<td class="property_name"><a class="link" href="DmapImageRecord.html#DmapImageRecord--pixel-width" title="The “pixel-width” property">pixel-width</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><span class="type">int</span></td>
+<td class="property_name"><a class="link" href="DmapImageRecord.html#DmapImageRecord--rating" title="The “rating” property">rating</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type">
+<span class="type">GArray</span> *</td>
+<td class="property_name"><a class="link" href="DmapImageRecord.html#DmapImageRecord--thumbnail" title="The “thumbnail” property">thumbnail</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="DmapImageRecord.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<pre class="screen">    <a href="/usr/share/gtk-doc/html/gobject/GTypeModule.html">GInterface</a>
+    <span class="lineart">╰──</span> DmapImageRecord
+</pre>
+</div>
+<div class="refsect1">
+<a name="DmapImageRecord.description"></a><h2>Description</h2>
+<p><a class="link" href="DmapImageRecord.html" title="DmapImageRecord"><span class="type">DmapImageRecord</span></a> objects encapsulate the description of an item shared using DPAP.</p>
+</div>
+<div class="refsect1">
+<a name="DmapImageRecord.functions_details"></a><h2>Functions</h2>
+<div class="refsect2">
+<a name="dmap-image-record-read"></a><h3>dmap_image_record_read ()</h3>
+<pre class="programlisting"><span class="returnvalue">GInputStream</span> *
+dmap_image_record_read (<em class="parameter"><code><a class="link" href="DmapImageRecord.html" title="DmapImageRecord"><span class="type">DmapImageRecord</span></a> *record</code></em>,
+                        <em class="parameter"><code><span class="type">GError</span> **err</code></em>);</pre>
+<div class="refsect3">
+<a name="dmap-image-record-read.parameters"></a><h4>Parameters</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="parameters_name">
+<col class="parameters_description">
+<col width="200px" class="parameters_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="parameter_name"><p>record</p></td>
+<td class="parameter_description"><p>a DmapImageRecord.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>err</p></td>
+<td class="parameter_description"><p>a GError.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="dmap-image-record-read.returns"></a><h4>Returns</h4>
+<p>a GInputStream that provides read-only access to the data stream
+associated with record. </p>
+<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
+</div>
+</div>
+</div>
+<div class="refsect1">
+<a name="DmapImageRecord.property-details"></a><h2>Property Details</h2>
+<div class="refsect2">
+<a name="DmapImageRecord--aspect-ratio"></a><h3>The <code class="literal">“aspect-ratio”</code> property</h3>
+<pre class="programlisting">  “aspect-ratio”             <span class="type">char</span> *</pre>
+<p>Photo aspect ratio.</p>
+<p>Owner: DmapImageRecord</p>
+<p>Flags: Read / Write</p>
+<p>Default value: NULL</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapImageRecord--comments"></a><h3>The <code class="literal">“comments”</code> property</h3>
+<pre class="programlisting">  “comments”                 <span class="type">char</span> *</pre>
+<p>Photo comments.</p>
+<p>Owner: DmapImageRecord</p>
+<p>Flags: Read / Write</p>
+<p>Default value: NULL</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapImageRecord--creation-date"></a><h3>The <code class="literal">“creation-date”</code> property</h3>
+<pre class="programlisting">  “creation-date”            <span class="type">int</span></pre>
+<p>Photo creation date.</p>
+<p>Owner: DmapImageRecord</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: &gt;= 0</p>
+<p>Default value: 0</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapImageRecord--filename"></a><h3>The <code class="literal">“filename”</code> property</h3>
+<pre class="programlisting">  “filename”                 <span class="type">char</span> *</pre>
+<p>Photo filename.</p>
+<p>Owner: DmapImageRecord</p>
+<p>Flags: Read / Write</p>
+<p>Default value: NULL</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapImageRecord--format"></a><h3>The <code class="literal">“format”</code> property</h3>
+<pre class="programlisting">  “format”                   <span class="type">char</span> *</pre>
+<p>Photo data format.</p>
+<p>Owner: DmapImageRecord</p>
+<p>Flags: Read / Write</p>
+<p>Default value: NULL</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapImageRecord--hash"></a><h3>The <code class="literal">“hash”</code> property</h3>
+<pre class="programlisting">  “hash”                     <span class="type">GArray</span> *</pre>
+<p>Hash of media file contents.</p>
+<p>Owner: DmapImageRecord</p>
+<p>Flags: Read / Write</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapImageRecord--large-filesize"></a><h3>The <code class="literal">“large-filesize”</code> property</h3>
+<pre class="programlisting">  “large-filesize”           <span class="type">int</span></pre>
+<p>Photo large file size.</p>
+<p>Owner: DmapImageRecord</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: &gt;= 0</p>
+<p>Default value: 0</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapImageRecord--location"></a><h3>The <code class="literal">“location”</code> property</h3>
+<pre class="programlisting">  “location”                 <span class="type">char</span> *</pre>
+<p>URI pointing to photo data.</p>
+<p>Owner: DmapImageRecord</p>
+<p>Flags: Read / Write</p>
+<p>Default value: NULL</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapImageRecord--pixel-height"></a><h3>The <code class="literal">“pixel-height”</code> property</h3>
+<pre class="programlisting">  “pixel-height”             <span class="type">int</span></pre>
+<p>Photo pixel height.</p>
+<p>Owner: DmapImageRecord</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: &gt;= 0</p>
+<p>Default value: 0</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapImageRecord--pixel-width"></a><h3>The <code class="literal">“pixel-width”</code> property</h3>
+<pre class="programlisting">  “pixel-width”              <span class="type">int</span></pre>
+<p>Photo pixel width.</p>
+<p>Owner: DmapImageRecord</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: &gt;= 0</p>
+<p>Default value: 0</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapImageRecord--rating"></a><h3>The <code class="literal">“rating”</code> property</h3>
+<pre class="programlisting">  “rating”                   <span class="type">int</span></pre>
+<p>Photo rating.</p>
+<p>Owner: DmapImageRecord</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: &gt;= 0</p>
+<p>Default value: 0</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapImageRecord--thumbnail"></a><h3>The <code class="literal">“thumbnail”</code> property</h3>
+<pre class="programlisting">  “thumbnail”                <span class="type">GArray</span> *</pre>
+<p>Photo thumbnail.</p>
+<p>Owner: DmapImageRecord</p>
+<p>Flags: Read / Write</p>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.33.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/DmapImageShare.html b/doc/html/DmapImageShare.html
new file mode 100644
index 0000000..c5bae16
--- /dev/null
+++ b/doc/html/DmapImageShare.html
@@ -0,0 +1,121 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>DmapImageShare: libdmapsharing Reference Manual</title>
+<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
+<link rel="home" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="up" href="ch04.html" title="Libdmapsharing Objects and Interfaces">
+<link rel="prev" href="DmapImageRecord.html" title="DmapImageRecord">
+<link rel="next" href="libdmapsharing-4.0-dmap-md5.html" title="dmap-md5">
+<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
+<td width="100%" align="left" class="shortcuts">
+<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
+                  <a href="#DmapImageShare.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
+                  <a href="#DmapImageShare.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
+</td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
+<td><a accesskey="u" href="ch04.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="DmapImageRecord.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="libdmapsharing-4.0-dmap-md5.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="refentry">
+<a name="DmapImageShare"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="DmapImageShare.top_of_page"></a>DmapImageShare</span></h2>
+<p>DmapImageShare — A DPAP share.</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="DmapImageShare.functions"></a><h2>Functions</h2>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="functions_proto_type">
+<col class="functions_proto_name">
+</colgroup>
+<tbody><tr>
+<td class="function_type">
+<a class="link" href="DmapImageShare.html" title="DmapImageShare"><span class="returnvalue">DmapImageShare</span></a> *
+</td>
+<td class="function_name">
+<a class="link" href="DmapImageShare.html#dmap-image-share-new" title="dmap_image_share_new ()">dmap_image_share_new</a> <span class="c_punctuation">()</span>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="DmapImageShare.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<pre class="screen">    GObject
+    <span class="lineart">╰──</span> <a class="link" href="DmapShare.html" title="DmapShare">DmapShare</a>
+        <span class="lineart">╰──</span> DmapImageShare
+</pre>
+</div>
+<div class="refsect1">
+<a name="DmapImageShare.description"></a><h2>Description</h2>
+<p><a class="link" href="DmapImageShare.html" title="DmapImageShare"><span class="type">DmapImageShare</span></a> objects encapsulate a DPAP share.</p>
+</div>
+<div class="refsect1">
+<a name="DmapImageShare.functions_details"></a><h2>Functions</h2>
+<div class="refsect2">
+<a name="dmap-image-share-new"></a><h3>dmap_image_share_new ()</h3>
+<pre class="programlisting"><a class="link" href="DmapImageShare.html" title="DmapImageShare"><span class="returnvalue">DmapImageShare</span></a> *
+dmap_image_share_new (<em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
+                      <em class="parameter"><code>const <span class="type">char</span> *password</code></em>,
+                      <em class="parameter"><code><span class="type">gpointer</span> db</code></em>,
+                      <em class="parameter"><code><span class="type">gpointer</span> container_db</code></em>,
+                      <em class="parameter"><code><span class="type">gchar</span> *transcode_mimetype</code></em>);</pre>
+<p>Creates a new DPAP share and publishes it using mDNS.</p>
+<div class="refsect3">
+<a name="dmap-image-share-new.parameters"></a><h4>Parameters</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="parameters_name">
+<col class="parameters_description">
+<col width="200px" class="parameters_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="parameter_name"><p>name</p></td>
+<td class="parameter_description"><p>The name that will be published by mDNS.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>password</p></td>
+<td class="parameter_description"><p>A share password or NULL. </p></td>
+<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
+</tr>
+<tr>
+<td class="parameter_name"><p>db</p></td>
+<td class="parameter_description"><p>A media database.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>container_db</p></td>
+<td class="parameter_description"><p>A container (album) database.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>transcode_mimetype</p></td>
+<td class="parameter_description"><p>A transcode mimetype or NULL. </p></td>
+<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="dmap-image-share-new.returns"></a><h4>Returns</h4>
+<p> a pointer to a DmapImageShare.</p>
+</div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.33.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/DMAPMdnsBrowser.html b/doc/html/DmapMdnsBrowser.html
similarity index 53%
rename from doc/html/DMAPMdnsBrowser.html
rename to doc/html/DmapMdnsBrowser.html
index 24e5e97..8aa9ada 100644
--- a/doc/html/DMAPMdnsBrowser.html
+++ b/doc/html/DmapMdnsBrowser.html
@@ -2,39 +2,39 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>DMAPMdnsBrowser: libdmapsharing-3.0 Reference Manual</title>
+<title>DmapMdnsBrowser: libdmapsharing Reference Manual</title>
 <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
-<link rel="home" href="index.html" title="libdmapsharing-3.0 Reference Manual">
-<link rel="up" href="ch01.html" title="Libdmapsharing overview">
-<link rel="prev" href="libdmapsharing-3.0-dmap-gst-wav-input-stream.html" title="dmap-gst-wav-input-stream">
-<link rel="next" href="DMAPRecord.html" title="DMAPRecord">
-<meta name="generator" content="GTK-Doc V1.32 (XML mode)">
+<link rel="home" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="up" href="ch04.html" title="Libdmapsharing Objects and Interfaces">
+<link rel="prev" href="libdmapsharing-4.0-dmap-md5.html" title="dmap-md5">
+<link rel="next" href="DmapMdnsService.html" title="DmapMdnsService">
+<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
 <td width="100%" align="left" class="shortcuts">
 <a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
-                  <a href="#DMAPMdnsBrowser.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
-                  <a href="#DMAPMdnsBrowser.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_signals">  <span class="dim">|</span> 
-                  <a href="#DMAPMdnsBrowser.signals" class="shortcut">Signals</a></span>
+                  <a href="#DmapMdnsBrowser.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
+                  <a href="#DmapMdnsBrowser.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_signals">  <span class="dim">|</span> 
+                  <a href="#DmapMdnsBrowser.signals" class="shortcut">Signals</a></span>
 </td>
 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
-<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
-<td><a accesskey="p" href="libdmapsharing-3.0-dmap-gst-wav-input-stream.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="DMAPRecord.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+<td><a accesskey="u" href="ch04.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="libdmapsharing-4.0-dmap-md5.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="DmapMdnsService.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
 </tr></table>
 <div class="refentry">
-<a name="DMAPMdnsBrowser"></a><div class="titlepage"></div>
+<a name="DmapMdnsBrowser"></a><div class="titlepage"></div>
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
-<h2><span class="refentrytitle"><a name="DMAPMdnsBrowser.top_of_page"></a>DMAPMdnsBrowser</span></h2>
-<p>DMAPMdnsBrowser</p>
+<h2><span class="refentrytitle"><a name="DmapMdnsBrowser.top_of_page"></a>DmapMdnsBrowser</span></h2>
+<p>DmapMdnsBrowser — An mDNS browser.</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="DMAPMdnsBrowser.functions"></a><h2>Functions</h2>
+<a name="DmapMdnsBrowser.functions"></a><h2>Functions</h2>
 <div class="informaltable"><table class="informaltable" width="100%" border="0">
 <colgroup>
 <col width="150px" class="functions_proto_type">
@@ -46,15 +46,15 @@
 <span class="returnvalue">GQuark</span>
 </td>
 <td class="function_name">
-<a class="link" href="DMAPMdnsBrowser.html#dmap-mdns-browser-error-quark" title="dmap_mdns_browser_error_quark ()">dmap_mdns_browser_error_quark</a> <span class="c_punctuation">()</span>
+<a class="link" href="DmapMdnsBrowser.html#dmap-mdns-browser-error-quark" title="dmap_mdns_browser_error_quark ()">dmap_mdns_browser_error_quark</a> <span class="c_punctuation">()</span>
 </td>
 </tr>
 <tr>
 <td class="function_type">
-<a class="link" href="DMAPMdnsBrowser.html" title="DMAPMdnsBrowser"><span class="returnvalue">DMAPMdnsBrowser</span></a> *
+<a class="link" href="DmapMdnsBrowser.html" title="DmapMdnsBrowser"><span class="returnvalue">DmapMdnsBrowser</span></a> *
 </td>
 <td class="function_name">
-<a class="link" href="DMAPMdnsBrowser.html#dmap-mdns-browser-new" title="dmap_mdns_browser_new ()">dmap_mdns_browser_new</a> <span class="c_punctuation">()</span>
+<a class="link" href="DmapMdnsBrowser.html#dmap-mdns-browser-new" title="dmap_mdns_browser_new ()">dmap_mdns_browser_new</a> <span class="c_punctuation">()</span>
 </td>
 </tr>
 <tr>
@@ -62,7 +62,7 @@
 <span class="returnvalue">gboolean</span>
 </td>
 <td class="function_name">
-<a class="link" href="DMAPMdnsBrowser.html#dmap-mdns-browser-start" title="dmap_mdns_browser_start ()">dmap_mdns_browser_start</a> <span class="c_punctuation">()</span>
+<a class="link" href="DmapMdnsBrowser.html#dmap-mdns-browser-start" title="dmap_mdns_browser_start ()">dmap_mdns_browser_start</a> <span class="c_punctuation">()</span>
 </td>
 </tr>
 <tr>
@@ -70,29 +70,29 @@
 <span class="returnvalue">gboolean</span>
 </td>
 <td class="function_name">
-<a class="link" href="DMAPMdnsBrowser.html#dmap-mdns-browser-stop" title="dmap_mdns_browser_stop ()">dmap_mdns_browser_stop</a> <span class="c_punctuation">()</span>
+<a class="link" href="DmapMdnsBrowser.html#dmap-mdns-browser-stop" title="dmap_mdns_browser_stop ()">dmap_mdns_browser_stop</a> <span class="c_punctuation">()</span>
 </td>
 </tr>
 <tr>
 <td class="function_type">const <span class="returnvalue">GSList</span> *
 </td>
 <td class="function_name">
-<a class="link" href="DMAPMdnsBrowser.html#dmap-mdns-browser-get-services" title="dmap_mdns_browser_get_services ()">dmap_mdns_browser_get_services</a> <span class="c_punctuation">()</span>
+<a class="link" href="DmapMdnsBrowser.html#dmap-mdns-browser-get-services" title="dmap_mdns_browser_get_services ()">dmap_mdns_browser_get_services</a> <span class="c_punctuation">()</span>
 </td>
 </tr>
 <tr>
 <td class="function_type">
-<a class="link" href="DMAPMdnsBrowser.html#DMAPMdnsBrowserServiceType" title="enum DMAPMdnsBrowserServiceType"><span class="returnvalue">DMAPMdnsBrowserServiceType</span></a>
+<a class="link" href="DmapMdnsService.html#DmapMdnsServiceType" title="enum DmapMdnsServiceType"><span class="returnvalue">DmapMdnsServiceType</span></a>
 </td>
 <td class="function_name">
-<a class="link" href="DMAPMdnsBrowser.html#dmap-mdns-browser-get-service-type" title="dmap_mdns_browser_get_service_type ()">dmap_mdns_browser_get_service_type</a> <span class="c_punctuation">()</span>
+<a class="link" href="DmapMdnsBrowser.html#dmap-mdns-browser-get-service-type" title="dmap_mdns_browser_get_service_type ()">dmap_mdns_browser_get_service_type</a> <span class="c_punctuation">()</span>
 </td>
 </tr>
 </tbody>
 </table></div>
 </div>
 <div class="refsect1">
-<a name="DMAPMdnsBrowser.signals"></a><h2>Signals</h2>
+<a name="DmapMdnsBrowser.signals"></a><h2>Signals</h2>
 <div class="informaltable"><table class="informaltable" border="0">
 <colgroup>
 <col width="150px" class="signal_proto_type">
@@ -102,19 +102,19 @@
 <tbody>
 <tr>
 <td class="signal_type"><span class="returnvalue">void</span></td>
-<td class="signal_name"><a class="link" href="DMAPMdnsBrowser.html#DMAPMdnsBrowser-service-added" title="The “service-added” signal">service-added</a></td>
+<td class="signal_name"><a class="link" href="DmapMdnsBrowser.html#DmapMdnsBrowser-service-added" title="The “service-added” signal">service-added</a></td>
 <td class="signal_flags">Run Last</td>
 </tr>
 <tr>
 <td class="signal_type"><span class="returnvalue">void</span></td>
-<td class="signal_name"><a class="link" href="DMAPMdnsBrowser.html#DMAPMdnsBrowser-service-removed" title="The “service-removed” signal">service-removed</a></td>
+<td class="signal_name"><a class="link" href="DmapMdnsBrowser.html#DmapMdnsBrowser-service-removed" title="The “service-removed” signal">service-removed</a></td>
 <td class="signal_flags">Run Last</td>
 </tr>
 </tbody>
 </table></div>
 </div>
 <div class="refsect1">
-<a name="DMAPMdnsBrowser.other"></a><h2>Types and Values</h2>
+<a name="DmapMdnsBrowser.other"></a><h2>Types and Values</h2>
 <div class="informaltable"><table class="informaltable" width="100%" border="0">
 <colgroup>
 <col width="150px" class="other_proto_type">
@@ -123,46 +123,33 @@
 <tbody>
 <tr>
 <td class="datatype_keyword">enum</td>
-<td class="function_name"><a class="link" href="DMAPMdnsBrowser.html#DMAPMdnsBrowserServiceType" title="enum DMAPMdnsBrowserServiceType">DMAPMdnsBrowserServiceType</a></td>
+<td class="function_name"><a class="link" href="DmapMdnsBrowser.html#DmapMdnsBrowserError" title="enum DmapMdnsBrowserError">DmapMdnsBrowserError</a></td>
 </tr>
 <tr>
-<td class="datatype_keyword">enum</td>
-<td class="function_name"><a class="link" href="DMAPMdnsBrowser.html#DMAPMdnsBrowserTransportProtocol" title="enum DMAPMdnsBrowserTransportProtocol">DMAPMdnsBrowserTransportProtocol</a></td>
-</tr>
-<tr>
-<td class="datatype_keyword">enum</td>
-<td class="function_name"><a class="link" href="DMAPMdnsBrowser.html#DMAPMdnsBrowserError" title="enum DMAPMdnsBrowserError">DMAPMdnsBrowserError</a></td>
-</tr>
-<tr>
-<td class="datatype_keyword">struct</td>
-<td class="function_name"><a class="link" href="DMAPMdnsBrowser.html#DMAPMdnsBrowserService" title="struct DMAPMdnsBrowserService">DMAPMdnsBrowserService</a></td>
-</tr>
-<tr>
-<td class="datatype_keyword">struct</td>
-<td class="function_name"><a class="link" href="DMAPMdnsBrowser.html#DMAPMdnsBrowser-struct" title="struct DMAPMdnsBrowser">DMAPMdnsBrowser</a></td>
+<td class="datatype_keyword"> </td>
+<td class="function_name"><a class="link" href="DmapMdnsBrowser.html#DmapMdnsBrowser-struct" title="DmapMdnsBrowser">DmapMdnsBrowser</a></td>
 </tr>
 <tr>
 <td class="define_keyword">#define</td>
-<td class="function_name"><a class="link" href="DMAPMdnsBrowser.html#DMAP-MDNS-BROWSER-ERROR:CAPS" title="DMAP_MDNS_BROWSER_ERROR">DMAP_MDNS_BROWSER_ERROR</a></td>
+<td class="function_name"><a class="link" href="DmapMdnsBrowser.html#DMAP-MDNS-BROWSER-ERROR:CAPS" title="DMAP_MDNS_BROWSER_ERROR">DMAP_MDNS_BROWSER_ERROR</a></td>
 </tr>
 </tbody>
 </table></div>
 </div>
 <div class="refsect1">
-<a name="DMAPMdnsBrowser.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<a name="DmapMdnsBrowser.object-hierarchy"></a><h2>Object Hierarchy</h2>
 <pre class="screen">    <a href="/usr/share/gtk-doc/html/gobject/gobject-Enumeration-and-Flag-Types.html">GEnum</a>
-    <span class="lineart">├──</span> DMAPMdnsBrowserError
-    <span class="lineart">├──</span> DMAPMdnsBrowserServiceType
-    <span class="lineart">╰──</span> DMAPMdnsBrowserTransportProtocol
+    <span class="lineart">╰──</span> DmapMdnsBrowserError
     GObject
-    <span class="lineart">╰──</span> DMAPMdnsBrowser
+    <span class="lineart">╰──</span> DmapMdnsBrowser
 </pre>
 </div>
 <div class="refsect1">
-<a name="DMAPMdnsBrowser.description"></a><h2>Description</h2>
+<a name="DmapMdnsBrowser.description"></a><h2>Description</h2>
+<p><a class="link" href="DmapMdnsBrowser.html" title="DmapMdnsBrowser"><span class="type">DmapMdnsBrowser</span></a> objects watch for DMAP shares.</p>
 </div>
 <div class="refsect1">
-<a name="DMAPMdnsBrowser.functions_details"></a><h2>Functions</h2>
+<a name="DmapMdnsBrowser.functions_details"></a><h2>Functions</h2>
 <div class="refsect2">
 <a name="dmap-mdns-browser-error-quark"></a><h3>dmap_mdns_browser_error_quark ()</h3>
 <pre class="programlisting"><span class="returnvalue">GQuark</span>
@@ -171,8 +158,8 @@ dmap_mdns_browser_error_quark (<em class="parameter"><code><span class="type">vo
 <hr>
 <div class="refsect2">
 <a name="dmap-mdns-browser-new"></a><h3>dmap_mdns_browser_new ()</h3>
-<pre class="programlisting"><a class="link" href="DMAPMdnsBrowser.html" title="DMAPMdnsBrowser"><span class="returnvalue">DMAPMdnsBrowser</span></a> *
-dmap_mdns_browser_new (<em class="parameter"><code><a class="link" href="DMAPMdnsBrowser.html#DMAPMdnsBrowserServiceType" title="enum DMAPMdnsBrowserServiceType"><span class="type">DMAPMdnsBrowserServiceType</span></a> type</code></em>);</pre>
+<pre class="programlisting"><a class="link" href="DmapMdnsBrowser.html" title="DmapMdnsBrowser"><span class="returnvalue">DmapMdnsBrowser</span></a> *
+dmap_mdns_browser_new (<em class="parameter"><code><a class="link" href="DmapMdnsService.html#DmapMdnsServiceType" title="enum DmapMdnsServiceType"><span class="type">DmapMdnsServiceType</span></a> type</code></em>);</pre>
 <p>Creates a new mDNS browser.</p>
 <div class="refsect3">
 <a name="dmap-mdns-browser-new.parameters"></a><h4>Parameters</h4>
@@ -191,16 +178,16 @@ dmap_mdns_browser_new (<em class="parameter"><code><a class="link" href="DMAPMdn
 </div>
 <div class="refsect3">
 <a name="dmap-mdns-browser-new.returns"></a><h4>Returns</h4>
-<p> a pointer to a DMAPMdnsBrowser.</p>
+<p> a pointer to a DmapMdnsBrowser.</p>
 </div>
 </div>
 <hr>
 <div class="refsect2">
 <a name="dmap-mdns-browser-start"></a><h3>dmap_mdns_browser_start ()</h3>
 <pre class="programlisting"><span class="returnvalue">gboolean</span>
-dmap_mdns_browser_start (<em class="parameter"><code><a class="link" href="DMAPMdnsBrowser.html" title="DMAPMdnsBrowser"><span class="type">DMAPMdnsBrowser</span></a> *browser</code></em>,
+dmap_mdns_browser_start (<em class="parameter"><code><a class="link" href="DmapMdnsBrowser.html" title="DmapMdnsBrowser"><span class="type">DmapMdnsBrowser</span></a> *browser</code></em>,
                          <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
-<p>Starts a DMAPMdnsBrowser.</p>
+<p>Starts a DmapMdnsBrowser.</p>
 <div class="refsect3">
 <a name="dmap-mdns-browser-start.parameters"></a><h4>Parameters</h4>
 <div class="informaltable"><table class="informaltable" width="100%" border="0">
@@ -212,7 +199,7 @@ dmap_mdns_browser_start (<em class="parameter"><code><a class="link" href="DMAPM
 <tbody>
 <tr>
 <td class="parameter_name"><p>browser</p></td>
-<td class="parameter_description"><p>A DMAPMdnsBrowser.</p></td>
+<td class="parameter_description"><p>A DmapMdnsBrowser.</p></td>
 <td class="parameter_annotations"> </td>
 </tr>
 <tr>
@@ -232,9 +219,9 @@ dmap_mdns_browser_start (<em class="parameter"><code><a class="link" href="DMAPM
 <div class="refsect2">
 <a name="dmap-mdns-browser-stop"></a><h3>dmap_mdns_browser_stop ()</h3>
 <pre class="programlisting"><span class="returnvalue">gboolean</span>
-dmap_mdns_browser_stop (<em class="parameter"><code><a class="link" href="DMAPMdnsBrowser.html" title="DMAPMdnsBrowser"><span class="type">DMAPMdnsBrowser</span></a> *browser</code></em>,
+dmap_mdns_browser_stop (<em class="parameter"><code><a class="link" href="DmapMdnsBrowser.html" title="DmapMdnsBrowser"><span class="type">DmapMdnsBrowser</span></a> *browser</code></em>,
                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
-<p>Stops a DMAPMdnsBrowser.</p>
+<p>Stops a DmapMdnsBrowser.</p>
 <div class="refsect3">
 <a name="dmap-mdns-browser-stop.parameters"></a><h4>Parameters</h4>
 <div class="informaltable"><table class="informaltable" width="100%" border="0">
@@ -246,7 +233,7 @@ dmap_mdns_browser_stop (<em class="parameter"><code><a class="link" href="DMAPMd
 <tbody>
 <tr>
 <td class="parameter_name"><p>browser</p></td>
-<td class="parameter_description"><p>A DMAPMdnsBrowser.</p></td>
+<td class="parameter_description"><p>A DmapMdnsBrowser.</p></td>
 <td class="parameter_annotations"> </td>
 </tr>
 <tr>
@@ -266,98 +253,42 @@ dmap_mdns_browser_stop (<em class="parameter"><code><a class="link" href="DMAPMd
 <div class="refsect2">
 <a name="dmap-mdns-browser-get-services"></a><h3>dmap_mdns_browser_get_services ()</h3>
 <pre class="programlisting">const <span class="returnvalue">GSList</span> *
-dmap_mdns_browser_get_services (<em class="parameter"><code><a class="link" href="DMAPMdnsBrowser.html" title="DMAPMdnsBrowser"><span class="type">DMAPMdnsBrowser</span></a> *browser</code></em>);</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="dmap-mdns-browser-get-service-type"></a><h3>dmap_mdns_browser_get_service_type ()</h3>
-<pre class="programlisting"><a class="link" href="DMAPMdnsBrowser.html#DMAPMdnsBrowserServiceType" title="enum DMAPMdnsBrowserServiceType"><span class="returnvalue">DMAPMdnsBrowserServiceType</span></a>
-dmap_mdns_browser_get_service_type (<em class="parameter"><code><a class="link" href="DMAPMdnsBrowser.html" title="DMAPMdnsBrowser"><span class="type">DMAPMdnsBrowser</span></a> *browser</code></em>);</pre>
-</div>
-</div>
-<div class="refsect1">
-<a name="DMAPMdnsBrowser.other_details"></a><h2>Types and Values</h2>
-<div class="refsect2">
-<a name="DMAPMdnsBrowserServiceType"></a><h3>enum DMAPMdnsBrowserServiceType</h3>
+dmap_mdns_browser_get_services (<em class="parameter"><code><a class="link" href="DmapMdnsBrowser.html" title="DmapMdnsBrowser"><span class="type">DmapMdnsBrowser</span></a> *browser</code></em>);</pre>
 <div class="refsect3">
-<a name="DMAPMdnsBrowserServiceType.members"></a><h4>Members</h4>
+<a name="dmap-mdns-browser-get-services.parameters"></a><h4>Parameters</h4>
 <div class="informaltable"><table class="informaltable" width="100%" border="0">
 <colgroup>
-<col width="300px" class="enum_members_name">
-<col class="enum_members_description">
-<col width="200px" class="enum_members_annotations">
+<col width="150px" class="parameters_name">
+<col class="parameters_description">
+<col width="200px" class="parameters_annotations">
 </colgroup>
-<tbody>
-<tr>
-<td class="enum_member_name"><p><a name="DMAP-MDNS-BROWSER-SERVICE-TYPE-INVALID:CAPS"></a>DMAP_MDNS_BROWSER_SERVICE_TYPE_INVALID</p></td>
-<td> </td>
-<td> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="DMAP-MDNS-BROWSER-SERVICE-TYPE-DAAP:CAPS"></a>DMAP_MDNS_BROWSER_SERVICE_TYPE_DAAP</p></td>
-<td> </td>
-<td> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="DMAP-MDNS-BROWSER-SERVICE-TYPE-DPAP:CAPS"></a>DMAP_MDNS_BROWSER_SERVICE_TYPE_DPAP</p></td>
-<td> </td>
-<td> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="DMAP-MDNS-BROWSER-SERVICE-TYPE-DACP:CAPS"></a>DMAP_MDNS_BROWSER_SERVICE_TYPE_DACP</p></td>
-<td> </td>
-<td> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="DMAP-MDNS-BROWSER-SERVICE-TYPE-RAOP:CAPS"></a>DMAP_MDNS_BROWSER_SERVICE_TYPE_RAOP</p></td>
-<td> </td>
-<td> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="DMAP-MDNS-BROWSER-SERVICE-TYPE-LAST:CAPS"></a>DMAP_MDNS_BROWSER_SERVICE_TYPE_LAST</p></td>
-<td> </td>
-<td> </td>
-</tr>
-</tbody>
+<tbody><tr>
+<td class="parameter_name"><p>browser</p></td>
+<td class="parameter_description"><p>A DmapMdnsBrowser.</p></td>
+<td class="parameter_annotations"> </td>
+</tr></tbody>
 </table></div>
 </div>
+<div class="refsect3">
+<a name="dmap-mdns-browser-get-services.returns"></a><h4>Returns</h4>
+<p>services available to <em class="parameter"><code>browser</code></em>
+. </p>
+<p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> DmapMdnsService][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
+</div>
 </div>
 <hr>
 <div class="refsect2">
-<a name="DMAPMdnsBrowserTransportProtocol"></a><h3>enum DMAPMdnsBrowserTransportProtocol</h3>
-<div class="refsect3">
-<a name="DMAPMdnsBrowserTransportProtocol.members"></a><h4>Members</h4>
-<div class="informaltable"><table class="informaltable" width="100%" border="0">
-<colgroup>
-<col width="300px" class="enum_members_name">
-<col class="enum_members_description">
-<col width="200px" class="enum_members_annotations">
-</colgroup>
-<tbody>
-<tr>
-<td class="enum_member_name"><p><a name="DMAP-MDNS-BROWSER-TRANSPORT-PROTOCOL-TCP:CAPS"></a>DMAP_MDNS_BROWSER_TRANSPORT_PROTOCOL_TCP</p></td>
-<td> </td>
-<td> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="DMAP-MDNS-BROWSER-TRANSPORT-PROTOCOL-UDP:CAPS"></a>DMAP_MDNS_BROWSER_TRANSPORT_PROTOCOL_UDP</p></td>
-<td> </td>
-<td> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="DMAP-MDNS-BROWSER-TRANSPORT-PROTOCOL-LAST:CAPS"></a>DMAP_MDNS_BROWSER_TRANSPORT_PROTOCOL_LAST</p></td>
-<td> </td>
-<td> </td>
-</tr>
-</tbody>
-</table></div>
+<a name="dmap-mdns-browser-get-service-type"></a><h3>dmap_mdns_browser_get_service_type ()</h3>
+<pre class="programlisting"><a class="link" href="DmapMdnsService.html#DmapMdnsServiceType" title="enum DmapMdnsServiceType"><span class="returnvalue">DmapMdnsServiceType</span></a>
+dmap_mdns_browser_get_service_type (<em class="parameter"><code><a class="link" href="DmapMdnsBrowser.html" title="DmapMdnsBrowser"><span class="type">DmapMdnsBrowser</span></a> *browser</code></em>);</pre>
 </div>
 </div>
-<hr>
+<div class="refsect1">
+<a name="DmapMdnsBrowser.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
-<a name="DMAPMdnsBrowserError"></a><h3>enum DMAPMdnsBrowserError</h3>
+<a name="DmapMdnsBrowserError"></a><h3>enum DmapMdnsBrowserError</h3>
 <div class="refsect3">
-<a name="DMAPMdnsBrowserError.members"></a><h4>Members</h4>
+<a name="DmapMdnsBrowserError.members"></a><h4>Members</h4>
 <div class="informaltable"><table class="informaltable" width="100%" border="0">
 <colgroup>
 <col width="300px" class="enum_members_name">
@@ -381,22 +312,8 @@ dmap_mdns_browser_get_service_type (<em class="parameter"><code><a class="link"
 </div>
 <hr>
 <div class="refsect2">
-<a name="DMAPMdnsBrowserService"></a><h3>struct DMAPMdnsBrowserService</h3>
-<pre class="programlisting">struct DMAPMdnsBrowserService {
-	gchar *service_name;
-	gchar *name;
-	gchar *host;
-	guint port;
-	gboolean password_protected;
-	gchar *pair;                                         // FIXME: subclass
-	DMAPMdnsBrowserTransportProtocol transport_protocol; // FIXME: subclass
-};
-</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="DMAPMdnsBrowser-struct"></a><h3>struct DMAPMdnsBrowser</h3>
-<pre class="programlisting">struct DMAPMdnsBrowser;</pre>
+<a name="DmapMdnsBrowser-struct"></a><h3>DmapMdnsBrowser</h3>
+<pre class="programlisting">typedef struct _DmapMdnsBrowser DmapMdnsBrowser;</pre>
 </div>
 <hr>
 <div class="refsect2">
@@ -406,17 +323,17 @@ dmap_mdns_browser_get_service_type (<em class="parameter"><code><a class="link"
 </div>
 </div>
 <div class="refsect1">
-<a name="DMAPMdnsBrowser.signal-details"></a><h2>Signal Details</h2>
+<a name="DmapMdnsBrowser.signal-details"></a><h2>Signal Details</h2>
 <div class="refsect2">
-<a name="DMAPMdnsBrowser-service-added"></a><h3>The <code class="literal">“service-added”</code> signal</h3>
+<a name="DmapMdnsBrowser-service-added"></a><h3>The <code class="literal">“service-added”</code> signal</h3>
 <pre class="programlisting"><span class="returnvalue">void</span>
-user_function (<a class="link" href="DMAPMdnsBrowser.html" title="DMAPMdnsBrowser"><span class="type">DMAPMdnsBrowser</span></a> *browser,
-               <span class="type">gpointer</span>         service,
+user_function (<a class="link" href="DmapMdnsBrowser.html" title="DmapMdnsBrowser"><span class="type">DmapMdnsBrowser</span></a> *browser,
+               <a class="link" href="DmapMdnsService.html" title="DmapMdnsService"><span class="type">DmapMdnsService</span></a> *service,
                <span class="type">gpointer</span>         user_data)</pre>
 <p>Emitted each time a service becomes available to <em class="parameter"><code>browser</code></em>
 </p>
 <div class="refsect3">
-<a name="DMAPMdnsBrowser-service-added.parameters"></a><h4>Parameters</h4>
+<a name="DmapMdnsBrowser-service-added.parameters"></a><h4>Parameters</h4>
 <div class="informaltable"><table class="informaltable" width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -426,12 +343,12 @@ user_function (<a class="link" href="DMAPMdnsBrowser.html" title="DMAPMdnsBrowse
 <tbody>
 <tr>
 <td class="parameter_name"><p>browser</p></td>
-<td class="parameter_description"><p>the <a class="link" href="DMAPMdnsBrowser.html" title="DMAPMdnsBrowser"><span class="type">DMAPMdnsBrowser</span></a> which received the signal.</p></td>
+<td class="parameter_description"><p>the <a class="link" href="DmapMdnsBrowser.html" title="DmapMdnsBrowser"><span class="type">DmapMdnsBrowser</span></a> which received the signal.</p></td>
 <td class="parameter_annotations"> </td>
 </tr>
 <tr>
 <td class="parameter_name"><p>service</p></td>
-<td class="parameter_description"><p><a class="link" href="DMAPMdnsBrowser.html#DMAPMdnsBrowserService" title="struct DMAPMdnsBrowserService"><span class="type">DMAPMdnsBrowserService</span></a></p></td>
+<td class="parameter_description"><p><a class="link" href="DmapMdnsService.html" title="DmapMdnsService"><span class="type">DmapMdnsService</span></a></p></td>
 <td class="parameter_annotations"> </td>
 </tr>
 <tr>
@@ -446,16 +363,16 @@ user_function (<a class="link" href="DMAPMdnsBrowser.html" title="DMAPMdnsBrowse
 </div>
 <hr>
 <div class="refsect2">
-<a name="DMAPMdnsBrowser-service-removed"></a><h3>The <code class="literal">“service-removed”</code> signal</h3>
+<a name="DmapMdnsBrowser-service-removed"></a><h3>The <code class="literal">“service-removed”</code> signal</h3>
 <pre class="programlisting"><span class="returnvalue">void</span>
-user_function (<a class="link" href="DMAPMdnsBrowser.html" title="DMAPMdnsBrowser"><span class="type">DMAPMdnsBrowser</span></a> *dmapmdnsbrowser,
-               <span class="type">gchar</span>           *arg1,
+user_function (<a class="link" href="DmapMdnsBrowser.html" title="DmapMdnsBrowser"><span class="type">DmapMdnsBrowser</span></a> *dmapmdnsbrowser,
+               <span class="type">char</span>            *arg1,
                <span class="type">gpointer</span>         user_data)</pre>
 <p>Flags: Run Last</p>
 </div>
 </div>
 </div>
 <div class="footer">
-<hr>Generated by GTK-Doc V1.32</div>
+<hr>Generated by GTK-Doc V1.33.1</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/doc/html/DmapMdnsService.html b/doc/html/DmapMdnsService.html
new file mode 100644
index 0000000..6de5905
--- /dev/null
+++ b/doc/html/DmapMdnsService.html
@@ -0,0 +1,286 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>DmapMdnsService: libdmapsharing Reference Manual</title>
+<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
+<link rel="home" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="up" href="ch04.html" title="Libdmapsharing Objects and Interfaces">
+<link rel="prev" href="DmapMdnsBrowser.html" title="DmapMdnsBrowser">
+<link rel="next" href="DmapRecordFactory.html" title="DmapRecordFactory">
+<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
+<td width="100%" align="left" class="shortcuts">
+<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
+                  <a href="#DmapMdnsService.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
+                  <a href="#DmapMdnsService.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span> 
+                  <a href="#DmapMdnsService.properties" class="shortcut">Properties</a></span>
+</td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
+<td><a accesskey="u" href="ch04.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="DmapMdnsBrowser.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="DmapRecordFactory.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="refentry">
+<a name="DmapMdnsService"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="DmapMdnsService.top_of_page"></a>DmapMdnsService</span></h2>
+<p>DmapMdnsService — An mDNS service.</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="DmapMdnsService.properties"></a><h2>Properties</h2>
+<div class="informaltable"><table class="informaltable" border="0">
+<colgroup>
+<col width="150px" class="properties_type">
+<col width="300px" class="properties_name">
+<col width="200px" class="properties_flags">
+</colgroup>
+<tbody>
+<tr>
+<td class="property_type">
+<span class="type">char</span> *</td>
+<td class="property_name"><a class="link" href="DmapMdnsService.html#DmapMdnsService--host" title="The “host” property">host</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type">
+<span class="type">char</span> *</td>
+<td class="property_name"><a class="link" href="DmapMdnsService.html#DmapMdnsService--name" title="The “name” property">name</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type">
+<span class="type">char</span> *</td>
+<td class="property_name"><a class="link" href="DmapMdnsService.html#DmapMdnsService--pair" title="The “pair” property">pair</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><span class="type">gboolean</span></td>
+<td class="property_name"><a class="link" href="DmapMdnsService.html#DmapMdnsService--password-protected" title="The “password-protected” property">password-protected</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><span class="type">guint</span></td>
+<td class="property_name"><a class="link" href="DmapMdnsService.html#DmapMdnsService--port" title="The “port” property">port</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type">
+<span class="type">char</span> *</td>
+<td class="property_name"><a class="link" href="DmapMdnsService.html#DmapMdnsService--service-name" title="The “service-name” property">service-name</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><span class="type">guint</span></td>
+<td class="property_name"><a class="link" href="DmapMdnsService.html#DmapMdnsService--transport-protocol" title="The “transport-protocol” property">transport-protocol</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="DmapMdnsService.other"></a><h2>Types and Values</h2>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="other_proto_type">
+<col class="other_proto_name">
+</colgroup>
+<tbody>
+<tr>
+<td class="datatype_keyword">enum</td>
+<td class="function_name"><a class="link" href="DmapMdnsService.html#DmapMdnsServiceType" title="enum DmapMdnsServiceType">DmapMdnsServiceType</a></td>
+</tr>
+<tr>
+<td class="datatype_keyword">enum</td>
+<td class="function_name"><a class="link" href="DmapMdnsService.html#DmapMdnsServiceTransportProtocol" title="enum DmapMdnsServiceTransportProtocol">DmapMdnsServiceTransportProtocol</a></td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="DmapMdnsService.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<pre class="screen">    <a href="/usr/share/gtk-doc/html/gobject/gobject-Enumeration-and-Flag-Types.html">GEnum</a>
+    <span class="lineart">├──</span> DmapMdnsServiceTransportProtocol
+    <span class="lineart">╰──</span> DmapMdnsServiceType
+    GObject
+    <span class="lineart">╰──</span> DmapMdnsService
+</pre>
+</div>
+<div class="refsect1">
+<a name="DmapMdnsService.description"></a><h2>Description</h2>
+<p><a class="link" href="DmapMdnsService.html" title="DmapMdnsService"><span class="type">DmapMdnsService</span></a> objects advertise DMAP shares.</p>
+</div>
+<div class="refsect1">
+<a name="DmapMdnsService.functions_details"></a><h2>Functions</h2>
+<p></p>
+</div>
+<div class="refsect1">
+<a name="DmapMdnsService.other_details"></a><h2>Types and Values</h2>
+<div class="refsect2">
+<a name="DmapMdnsServiceType"></a><h3>enum DmapMdnsServiceType</h3>
+<p>Enum values used to specify the service type.</p>
+<div class="refsect3">
+<a name="DmapMdnsServiceType.members"></a><h4>Members</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="300px" class="enum_members_name">
+<col class="enum_members_description">
+<col width="200px" class="enum_members_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-MDNS-SERVICE-TYPE-INVALID:CAPS"></a>DMAP_MDNS_SERVICE_TYPE_INVALID</p></td>
+<td class="enum_member_description">
+<p>an invalid service type</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-MDNS-SERVICE-TYPE-DAAP:CAPS"></a>DMAP_MDNS_SERVICE_TYPE_DAAP</p></td>
+<td class="enum_member_description">
+<p>a DAAP service type</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-MDNS-SERVICE-TYPE-DPAP:CAPS"></a>DMAP_MDNS_SERVICE_TYPE_DPAP</p></td>
+<td class="enum_member_description">
+<p>a DPAP service type</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-MDNS-SERVICE-TYPE-DACP:CAPS"></a>DMAP_MDNS_SERVICE_TYPE_DACP</p></td>
+<td class="enum_member_description">
+<p>a DACP service type</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-MDNS-SERVICE-TYPE-RAOP:CAPS"></a>DMAP_MDNS_SERVICE_TYPE_RAOP</p></td>
+<td class="enum_member_description">
+<p>a RAOP service type</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-MDNS-SERVICE-TYPE-LAST:CAPS"></a>DMAP_MDNS_SERVICE_TYPE_LAST</p></td>
+<td class="enum_member_description">
+<p>an invalid service type</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapMdnsServiceTransportProtocol"></a><h3>enum DmapMdnsServiceTransportProtocol</h3>
+<div class="refsect3">
+<a name="DmapMdnsServiceTransportProtocol.members"></a><h4>Members</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="300px" class="enum_members_name">
+<col class="enum_members_description">
+<col width="200px" class="enum_members_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-MDNS-SERVICE-TRANSPORT-PROTOCOL-TCP:CAPS"></a>DMAP_MDNS_SERVICE_TRANSPORT_PROTOCOL_TCP</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-MDNS-SERVICE-TRANSPORT-PROTOCOL-UDP:CAPS"></a>DMAP_MDNS_SERVICE_TRANSPORT_PROTOCOL_UDP</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-MDNS-SERVICE-TRANSPORT-PROTOCOL-LAST:CAPS"></a>DMAP_MDNS_SERVICE_TRANSPORT_PROTOCOL_LAST</p></td>
+<td> </td>
+<td> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="refsect1">
+<a name="DmapMdnsService.property-details"></a><h2>Property Details</h2>
+<div class="refsect2">
+<a name="DmapMdnsService--host"></a><h3>The <code class="literal">“host”</code> property</h3>
+<pre class="programlisting">  “host”                     <span class="type">char</span> *</pre>
+<p>Host.</p>
+<p>Owner: DmapMdnsService</p>
+<p>Flags: Read / Write</p>
+<p>Default value: NULL</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapMdnsService--name"></a><h3>The <code class="literal">“name”</code> property</h3>
+<pre class="programlisting">  “name”                     <span class="type">char</span> *</pre>
+<p>Name.</p>
+<p>Owner: DmapMdnsService</p>
+<p>Flags: Read / Write</p>
+<p>Default value: NULL</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapMdnsService--pair"></a><h3>The <code class="literal">“pair”</code> property</h3>
+<pre class="programlisting">  “pair”                     <span class="type">char</span> *</pre>
+<p>Pair.</p>
+<p>Owner: DmapMdnsService</p>
+<p>Flags: Read / Write</p>
+<p>Default value: NULL</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapMdnsService--password-protected"></a><h3>The <code class="literal">“password-protected”</code> property</h3>
+<pre class="programlisting">  “password-protected”       <span class="type">gboolean</span></pre>
+<p>Password Protected.</p>
+<p>Owner: DmapMdnsService</p>
+<p>Flags: Read / Write</p>
+<p>Default value: FALSE</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapMdnsService--port"></a><h3>The <code class="literal">“port”</code> property</h3>
+<pre class="programlisting">  “port”                     <span class="type">guint</span></pre>
+<p>Port.</p>
+<p>Owner: DmapMdnsService</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: &lt;= G_MAXINT</p>
+<p>Default value: 0</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapMdnsService--service-name"></a><h3>The <code class="literal">“service-name”</code> property</h3>
+<pre class="programlisting">  “service-name”             <span class="type">char</span> *</pre>
+<p>Service Name.</p>
+<p>Owner: DmapMdnsService</p>
+<p>Flags: Read / Write</p>
+<p>Default value: NULL</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapMdnsService--transport-protocol"></a><h3>The <code class="literal">“transport-protocol”</code> property</h3>
+<pre class="programlisting">  “transport-protocol”       <span class="type">guint</span></pre>
+<p>Transport Protocol.</p>
+<p>Owner: DmapMdnsService</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: &lt;= 1</p>
+<p>Default value: 0</p>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.33.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/DMAPRecord.html b/doc/html/DmapRecord.html
similarity index 51%
rename from doc/html/DMAPRecord.html
rename to doc/html/DmapRecord.html
index 8de51e7..85384fa 100644
--- a/doc/html/DMAPRecord.html
+++ b/doc/html/DmapRecord.html
@@ -2,38 +2,38 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>DMAPRecord: libdmapsharing-3.0 Reference Manual</title>
+<title>DmapRecord: libdmapsharing Reference Manual</title>
 <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
-<link rel="home" href="index.html" title="libdmapsharing-3.0 Reference Manual">
-<link rel="up" href="ch01.html" title="Libdmapsharing overview">
-<link rel="prev" href="DMAPMdnsBrowser.html" title="DMAPMdnsBrowser">
-<link rel="next" href="DMAPRecordFactory.html" title="DMAPRecordFactory">
-<meta name="generator" content="GTK-Doc V1.32 (XML mode)">
+<link rel="home" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="up" href="ch04.html" title="Libdmapsharing Objects and Interfaces">
+<link rel="prev" href="DmapRecordFactory.html" title="DmapRecordFactory">
+<link rel="next" href="DmapShare.html" title="DmapShare">
+<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
 <td width="100%" align="left" class="shortcuts">
 <a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
-                  <a href="#DMAPRecord.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
-                  <a href="#DMAPRecord.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
+                  <a href="#DmapRecord.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
+                  <a href="#DmapRecord.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
 </td>
 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
-<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
-<td><a accesskey="p" href="DMAPMdnsBrowser.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="DMAPRecordFactory.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+<td><a accesskey="u" href="ch04.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="DmapRecordFactory.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="DmapShare.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
 </tr></table>
 <div class="refentry">
-<a name="DMAPRecord"></a><div class="titlepage"></div>
+<a name="DmapRecord"></a><div class="titlepage"></div>
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
-<h2><span class="refentrytitle"><a name="DMAPRecord.top_of_page"></a>DMAPRecord</span></h2>
-<p>DMAPRecord</p>
+<h2><span class="refentrytitle"><a name="DmapRecord.top_of_page"></a>DmapRecord</span></h2>
+<p>DmapRecord — An abstract parent to the various record classes.</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="DMAPRecord.functions"></a><h2>Functions</h2>
+<a name="DmapRecord.functions"></a><h2>Functions</h2>
 <div class="informaltable"><table class="informaltable" width="100%" border="0">
 <colgroup>
 <col width="150px" class="functions_proto_type">
@@ -42,10 +42,10 @@
 <tbody>
 <tr>
 <td class="function_type">
-<span class="returnvalue">GByteArray</span> *
+<span class="returnvalue">GArray</span> *
 </td>
 <td class="function_name">
-<a class="link" href="DMAPRecord.html#dmap-record-to-blob" title="dmap_record_to_blob ()">dmap_record_to_blob</a> <span class="c_punctuation">()</span>
+<a class="link" href="DmapRecord.html#dmap-record-to-blob" title="dmap_record_to_blob ()">dmap_record_to_blob</a> <span class="c_punctuation">()</span>
 </td>
 </tr>
 <tr>
@@ -53,48 +53,43 @@
 <span class="returnvalue">gboolean</span>
 </td>
 <td class="function_name">
-<a class="link" href="DMAPRecord.html#dmap-record-set-from-blob" title="dmap_record_set_from_blob ()">dmap_record_set_from_blob</a> <span class="c_punctuation">()</span>
+<a class="link" href="DmapRecord.html#dmap-record-set-from-blob" title="dmap_record_set_from_blob ()">dmap_record_set_from_blob</a> <span class="c_punctuation">()</span>
 </td>
 </tr>
 </tbody>
 </table></div>
 </div>
 <div class="refsect1">
-<a name="DMAPRecord.other"></a><h2>Types and Values</h2>
+<a name="DmapRecord.other"></a><h2>Types and Values</h2>
 <div class="informaltable"><table class="informaltable" width="100%" border="0">
 <colgroup>
 <col width="150px" class="other_proto_type">
 <col class="other_proto_name">
 </colgroup>
-<tbody>
-<tr>
-<td class="typedef_keyword">typedef</td>
-<td class="function_name"><a class="link" href="DMAPRecord.html#bitwise" title="bitwise">bitwise</a></td>
-</tr>
-<tr>
+<tbody><tr>
 <td class="datatype_keyword">enum</td>
-<td class="function_name"><a class="link" href="DMAPRecord.html#DMAPMediaKind" title="enum DMAPMediaKind">DMAPMediaKind</a></td>
-</tr>
-</tbody>
+<td class="function_name"><a class="link" href="DmapRecord.html#DmapMediaKind" title="enum DmapMediaKind">DmapMediaKind</a></td>
+</tr></tbody>
 </table></div>
 </div>
 <div class="refsect1">
-<a name="DMAPRecord.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<a name="DmapRecord.object-hierarchy"></a><h2>Object Hierarchy</h2>
 <pre class="screen">    <a href="/usr/share/gtk-doc/html/gobject/gobject-Enumeration-and-Flag-Types.html">GEnum</a>
-    <span class="lineart">╰──</span> DMAPMediaKind
+    <span class="lineart">╰──</span> DmapMediaKind
     <a href="/usr/share/gtk-doc/html/gobject/GTypeModule.html">GInterface</a>
-    <span class="lineart">╰──</span> DMAPRecord
+    <span class="lineart">╰──</span> DmapRecord
 </pre>
 </div>
 <div class="refsect1">
-<a name="DMAPRecord.description"></a><h2>Description</h2>
+<a name="DmapRecord.description"></a><h2>Description</h2>
+<p><a class="link" href="DmapRecord.html" title="DmapRecord"><span class="type">DmapRecord</span></a> provides an abstract parent to the <a class="link" href="DmapAvRecord.html" title="DmapAvRecord"><span class="type">DmapAvRecord</span></a> and <a class="link" href="DmapImageRecord.html" title="DmapImageRecord"><span class="type">DmapImageRecord</span></a> classes.</p>
 </div>
 <div class="refsect1">
-<a name="DMAPRecord.functions_details"></a><h2>Functions</h2>
+<a name="DmapRecord.functions_details"></a><h2>Functions</h2>
 <div class="refsect2">
 <a name="dmap-record-to-blob"></a><h3>dmap_record_to_blob ()</h3>
-<pre class="programlisting"><span class="returnvalue">GByteArray</span> *
-dmap_record_to_blob (<em class="parameter"><code><a class="link" href="DMAPRecord.html" title="DMAPRecord"><span class="type">DMAPRecord</span></a> *record</code></em>);</pre>
+<pre class="programlisting"><span class="returnvalue">GArray</span> *
+dmap_record_to_blob (<em class="parameter"><code><a class="link" href="DmapRecord.html" title="DmapRecord"><span class="type">DmapRecord</span></a> *record</code></em>);</pre>
 <div class="refsect3">
 <a name="dmap-record-to-blob.parameters"></a><h4>Parameters</h4>
 <div class="informaltable"><table class="informaltable" width="100%" border="0">
@@ -105,36 +100,57 @@ dmap_record_to_blob (<em class="parameter"><code><a class="link" href="DMAPRecor
 </colgroup>
 <tbody><tr>
 <td class="parameter_name"><p>record</p></td>
-<td class="parameter_description"><p>A DMAPRecord.</p></td>
+<td class="parameter_description"><p>A DmapRecord.</p></td>
 <td class="parameter_annotations"> </td>
 </tr></tbody>
 </table></div>
 </div>
 <div class="refsect3">
 <a name="dmap-record-to-blob.returns"></a><h4>Returns</h4>
-<p> A byte array representation of the record.</p>
+<p>A byte array representation of the record. </p>
+<p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> guint8][<acronym title="The caller owns the data container, but not the data inside it."><span class="acronym">transfer container</span></acronym>]</span></p>
 </div>
 </div>
 <hr>
 <div class="refsect2">
 <a name="dmap-record-set-from-blob"></a><h3>dmap_record_set_from_blob ()</h3>
 <pre class="programlisting"><span class="returnvalue">gboolean</span>
-dmap_record_set_from_blob (<em class="parameter"><code><a class="link" href="DMAPRecord.html" title="DMAPRecord"><span class="type">DMAPRecord</span></a> *record</code></em>,
-                           <em class="parameter"><code><span class="type">GByteArray</span> *blob</code></em>);</pre>
+dmap_record_set_from_blob (<em class="parameter"><code><a class="link" href="DmapRecord.html" title="DmapRecord"><span class="type">DmapRecord</span></a> *record</code></em>,
+                           <em class="parameter"><code><span class="type">GArray</span> *blob</code></em>);</pre>
+<div class="refsect3">
+<a name="dmap-record-set-from-blob.parameters"></a><h4>Parameters</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="parameters_name">
+<col class="parameters_description">
+<col width="200px" class="parameters_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="parameter_name"><p>record</p></td>
+<td class="parameter_description"><p>The record to set.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>blob</p></td>
+<td class="parameter_description"><p>A byte array representation of a record. </p></td>
+<td class="parameter_annotations"><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> guint8]</span></td>
+</tr>
+</tbody>
+</table></div>
 </div>
+<div class="refsect3">
+<a name="dmap-record-set-from-blob.returns"></a><h4>Returns</h4>
+<p> True on success, else false.</p>
 </div>
-<div class="refsect1">
-<a name="DMAPRecord.other_details"></a><h2>Types and Values</h2>
-<div class="refsect2">
-<a name="bitwise"></a><h3>bitwise</h3>
-<pre class="programlisting">typedef unsigned long long bitwise;
-</pre>
 </div>
-<hr>
+</div>
+<div class="refsect1">
+<a name="DmapRecord.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
-<a name="DMAPMediaKind"></a><h3>enum DMAPMediaKind</h3>
+<a name="DmapMediaKind"></a><h3>enum DmapMediaKind</h3>
 <div class="refsect3">
-<a name="DMAPMediaKind.members"></a><h4>Members</h4>
+<a name="DmapMediaKind.members"></a><h4>Members</h4>
 <div class="informaltable"><table class="informaltable" width="100%" border="0">
 <colgroup>
 <col width="300px" class="enum_members_name">
@@ -169,6 +185,6 @@ dmap_record_set_from_blob (<em class="parameter"><code><a class="link" href="DMA
 </div>
 </div>
 <div class="footer">
-<hr>Generated by GTK-Doc V1.32</div>
+<hr>Generated by GTK-Doc V1.33.1</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/doc/html/DMAPRecordFactory.html b/doc/html/DmapRecordFactory.html
similarity index 50%
rename from doc/html/DMAPRecordFactory.html
rename to doc/html/DmapRecordFactory.html
index 51935d3..dd24360 100644
--- a/doc/html/DMAPRecordFactory.html
+++ b/doc/html/DmapRecordFactory.html
@@ -2,38 +2,38 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>DMAPRecordFactory: libdmapsharing-3.0 Reference Manual</title>
+<title>DmapRecordFactory: libdmapsharing Reference Manual</title>
 <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
-<link rel="home" href="index.html" title="libdmapsharing-3.0 Reference Manual">
-<link rel="up" href="ch01.html" title="Libdmapsharing overview">
-<link rel="prev" href="DMAPRecord.html" title="DMAPRecord">
-<link rel="next" href="libdmapsharing-3.0-dmap-share.html" title="dmap-share">
-<meta name="generator" content="GTK-Doc V1.32 (XML mode)">
+<link rel="home" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="up" href="ch04.html" title="Libdmapsharing Objects and Interfaces">
+<link rel="prev" href="DmapMdnsService.html" title="DmapMdnsService">
+<link rel="next" href="DmapRecord.html" title="DmapRecord">
+<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
 <td width="100%" align="left" class="shortcuts">
 <a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
-                  <a href="#DMAPRecordFactory.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
-                  <a href="#DMAPRecordFactory.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
+                  <a href="#DmapRecordFactory.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
+                  <a href="#DmapRecordFactory.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
 </td>
 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
-<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
-<td><a accesskey="p" href="DMAPRecord.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="libdmapsharing-3.0-dmap-share.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+<td><a accesskey="u" href="ch04.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="DmapMdnsService.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="DmapRecord.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
 </tr></table>
 <div class="refentry">
-<a name="DMAPRecordFactory"></a><div class="titlepage"></div>
+<a name="DmapRecordFactory"></a><div class="titlepage"></div>
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
-<h2><span class="refentrytitle"><a name="DMAPRecordFactory.top_of_page"></a>DMAPRecordFactory</span></h2>
-<p>DMAPRecordFactory</p>
+<h2><span class="refentrytitle"><a name="DmapRecordFactory.top_of_page"></a>DmapRecordFactory</span></h2>
+<p>DmapRecordFactory — A factory for DmapRecord objects.</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="DMAPRecordFactory.functions"></a><h2>Functions</h2>
+<a name="DmapRecordFactory.functions"></a><h2>Functions</h2>
 <div class="informaltable"><table class="informaltable" width="100%" border="0">
 <colgroup>
 <col width="150px" class="functions_proto_type">
@@ -41,30 +41,32 @@
 </colgroup>
 <tbody><tr>
 <td class="function_type">
-<a class="link" href="DMAPRecord.html" title="DMAPRecord"><span class="returnvalue">DMAPRecord</span></a> *
+<a class="link" href="DmapRecord.html" title="DmapRecord"><span class="returnvalue">DmapRecord</span></a> *
 </td>
 <td class="function_name">
-<a class="link" href="DMAPRecordFactory.html#dmap-record-factory-create" title="dmap_record_factory_create ()">dmap_record_factory_create</a> <span class="c_punctuation">()</span>
+<a class="link" href="DmapRecordFactory.html#dmap-record-factory-create" title="dmap_record_factory_create ()">dmap_record_factory_create</a> <span class="c_punctuation">()</span>
 </td>
 </tr></tbody>
 </table></div>
 </div>
 <div class="refsect1">
-<a name="DMAPRecordFactory.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<a name="DmapRecordFactory.object-hierarchy"></a><h2>Object Hierarchy</h2>
 <pre class="screen">    <a href="/usr/share/gtk-doc/html/gobject/GTypeModule.html">GInterface</a>
-    <span class="lineart">╰──</span> DMAPRecordFactory
+    <span class="lineart">╰──</span> DmapRecordFactory
 </pre>
 </div>
 <div class="refsect1">
-<a name="DMAPRecordFactory.description"></a><h2>Description</h2>
+<a name="DmapRecordFactory.description"></a><h2>Description</h2>
+<p><a class="link" href="DmapRecordFactory.html" title="DmapRecordFactory"><span class="type">DmapRecordFactory</span></a> is a factory capable of creating <a class="link" href="DmapRecord.html" title="DmapRecord"><span class="type">DmapRecord</span></a> objects.</p>
 </div>
 <div class="refsect1">
-<a name="DMAPRecordFactory.functions_details"></a><h2>Functions</h2>
+<a name="DmapRecordFactory.functions_details"></a><h2>Functions</h2>
 <div class="refsect2">
 <a name="dmap-record-factory-create"></a><h3>dmap_record_factory_create ()</h3>
-<pre class="programlisting"><a class="link" href="DMAPRecord.html" title="DMAPRecord"><span class="returnvalue">DMAPRecord</span></a> *
-dmap_record_factory_create (<em class="parameter"><code><a class="link" href="DMAPRecordFactory.html" title="DMAPRecordFactory"><span class="type">DMAPRecordFactory</span></a> *factory</code></em>,
-                            <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);</pre>
+<pre class="programlisting"><a class="link" href="DmapRecord.html" title="DmapRecord"><span class="returnvalue">DmapRecord</span></a> *
+dmap_record_factory_create (<em class="parameter"><code><a class="link" href="DmapRecordFactory.html" title="DmapRecordFactory"><span class="type">DmapRecordFactory</span></a> *factory</code></em>,
+                            <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>,
+                            <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
 <div class="refsect3">
 <a name="dmap-record-factory-create.parameters"></a><h4>Parameters</h4>
 <div class="informaltable"><table class="informaltable" width="100%" border="0">
@@ -76,7 +78,7 @@ dmap_record_factory_create (<em class="parameter"><code><a class="link" href="DM
 <tbody>
 <tr>
 <td class="parameter_name"><p>factory</p></td>
-<td class="parameter_description"><p>A DMAPRecordFactory.</p></td>
+<td class="parameter_description"><p>A DmapRecordFactory.</p></td>
 <td class="parameter_annotations"> </td>
 </tr>
 <tr>
@@ -84,17 +86,23 @@ dmap_record_factory_create (<em class="parameter"><code><a class="link" href="DM
 <td class="parameter_description"><p>Some piece of data that may be used to initialize return value.</p></td>
 <td class="parameter_annotations"> </td>
 </tr>
+<tr>
+<td class="parameter_name"><p>error</p></td>
+<td class="parameter_description"><p>return location for a GError, or NULL.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
 </tbody>
 </table></div>
 </div>
 <div class="refsect3">
 <a name="dmap-record-factory-create.returns"></a><h4>Returns</h4>
-<p> a new DMAPRecord as read from path.</p>
+<p>a new DmapRecord, else NULL with error set. </p>
+<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
 </div>
 </div>
 </div>
 </div>
 <div class="footer">
-<hr>Generated by GTK-Doc V1.32</div>
+<hr>Generated by GTK-Doc V1.33.1</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/doc/html/DmapShare.html b/doc/html/DmapShare.html
new file mode 100644
index 0000000..7eeca07
--- /dev/null
+++ b/doc/html/DmapShare.html
@@ -0,0 +1,485 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>DmapShare: libdmapsharing Reference Manual</title>
+<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
+<link rel="home" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="up" href="ch04.html" title="Libdmapsharing Objects and Interfaces">
+<link rel="prev" href="DmapRecord.html" title="DmapRecord">
+<link rel="next" href="libdmapsharing-4.0-dmap-utils.html" title="dmap-utils">
+<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
+<td width="100%" align="left" class="shortcuts">
+<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
+                  <a href="#DmapShare.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
+                  <a href="#DmapShare.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span> 
+                  <a href="#DmapShare.properties" class="shortcut">Properties</a></span><span id="nav_signals">  <span class="dim">|</span> 
+                  <a href="#DmapShare.signals" class="shortcut">Signals</a></span>
+</td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
+<td><a accesskey="u" href="ch04.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="DmapRecord.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="libdmapsharing-4.0-dmap-utils.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="refentry">
+<a name="DmapShare"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="DmapShare.top_of_page"></a>DmapShare</span></h2>
+<p>DmapShare — An abstract parent to the various share classes.</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="DmapShare.functions"></a><h2>Functions</h2>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="functions_proto_type">
+<col class="functions_proto_name">
+</colgroup>
+<tbody>
+<tr>
+<td class="function_type">
+<span class="returnvalue">gboolean</span>
+</td>
+<td class="function_name">
+<a class="link" href="DmapShare.html#dmap-share-serve" title="dmap_share_serve ()">dmap_share_serve</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">gboolean</span>
+</td>
+<td class="function_name">
+<a class="link" href="DmapShare.html#dmap-share-publish" title="dmap_share_publish ()">dmap_share_publish</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">void</span>
+</td>
+<td class="function_name">
+<a class="link" href="DmapShare.html#dmap-share-free-filter" title="dmap_share_free_filter ()">dmap_share_free_filter</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">void</span>
+</td>
+<td class="function_name">
+<a class="link" href="DmapShare.html#dmap-share-emit-error" title="dmap_share_emit_error ()">dmap_share_emit_error</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="DmapShare.properties"></a><h2>Properties</h2>
+<div class="informaltable"><table class="informaltable" border="0">
+<colgroup>
+<col width="150px" class="properties_type">
+<col width="300px" class="properties_name">
+<col width="200px" class="properties_flags">
+</colgroup>
+<tbody>
+<tr>
+<td class="property_type"><span class="type">guint</span></td>
+<td class="property_name"><a class="link" href="DmapShare.html#DmapShare--auth-method" title="The “auth-method” property">auth-method</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type">
+<a class="link" href="DmapContainerDb.html" title="DmapContainerDb"><span class="type">DmapContainerDb</span></a> *</td>
+<td class="property_name"><a class="link" href="DmapShare.html#DmapShare--container-db" title="The “container-db” property">container-db</a></td>
+<td class="property_flags">Read / Write / Construct Only</td>
+</tr>
+<tr>
+<td class="property_type">
+<a class="link" href="DmapDb.html" title="DmapDb"><span class="type">DmapDb</span></a> *</td>
+<td class="property_name"><a class="link" href="DmapShare.html#DmapShare--db" title="The “db” property">db</a></td>
+<td class="property_flags">Read / Write / Construct Only</td>
+</tr>
+<tr>
+<td class="property_type">
+<span class="type">char</span> *</td>
+<td class="property_name"><a class="link" href="DmapShare.html#DmapShare--name" title="The “name” property">name</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type">
+<span class="type">char</span> *</td>
+<td class="property_name"><a class="link" href="DmapShare.html#DmapShare--password" title="The “password” property">password</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type"><span class="type">guint</span></td>
+<td class="property_name"><a class="link" href="DmapShare.html#DmapShare--revision-number" title="The “revision-number” property">revision-number</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+<tr>
+<td class="property_type">
+<span class="type">SoupServer</span> *</td>
+<td class="property_name"><a class="link" href="DmapShare.html#DmapShare--server" title="The “server” property">server</a></td>
+<td class="property_flags">Read</td>
+</tr>
+<tr>
+<td class="property_type">
+<span class="type">char</span> *</td>
+<td class="property_name"><a class="link" href="DmapShare.html#DmapShare--transcode-mimetype" title="The “transcode-mimetype” property">transcode-mimetype</a></td>
+<td class="property_flags">Read / Write / Construct Only</td>
+</tr>
+<tr>
+<td class="property_type"><span class="type">GStrv</span></td>
+<td class="property_name"><a class="link" href="DmapShare.html#DmapShare--txt-records" title="The “txt-records” property">txt-records</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="DmapShare.signals"></a><h2>Signals</h2>
+<div class="informaltable"><table class="informaltable" border="0">
+<colgroup>
+<col width="150px" class="signal_proto_type">
+<col width="300px" class="signal_proto_name">
+<col width="200px" class="signal_proto_flags">
+</colgroup>
+<tbody><tr>
+<td class="signal_type"><span class="returnvalue">void</span></td>
+<td class="signal_name"><a class="link" href="DmapShare.html#DmapShare-error" title="The “error” signal">error</a></td>
+<td class="signal_flags">Run First</td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="DmapShare.other"></a><h2>Types and Values</h2>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="other_proto_type">
+<col class="other_proto_name">
+</colgroup>
+<tbody>
+<tr>
+<td class="typedef_keyword">typedef</td>
+<td class="function_name"><a class="link" href="DmapShare.html#DmapMetaDataMap" title="DmapMetaDataMap">DmapMetaDataMap</a></td>
+</tr>
+<tr>
+<td class="datatype_keyword">enum</td>
+<td class="function_name"><a class="link" href="DmapShare.html#DmapShareAuthMethod" title="enum DmapShareAuthMethod">DmapShareAuthMethod</a></td>
+</tr>
+<tr>
+<td class="typedef_keyword">typedef</td>
+<td class="function_name"><a class="link" href="DmapShare.html#DmapBits" title="DmapBits">DmapBits</a></td>
+</tr>
+<tr>
+<td class="datatype_keyword">struct</td>
+<td class="function_name"><a class="link" href="DmapShare.html#DmapMlclBits" title="struct DmapMlclBits">DmapMlclBits</a></td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="DmapShare.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<pre class="screen">    <a href="/usr/share/gtk-doc/html/gobject/gobject-Enumeration-and-Flag-Types.html">GEnum</a>
+    <span class="lineart">╰──</span> DmapShareAuthMethod
+    GObject
+    <span class="lineart">╰──</span> DmapShare
+        <span class="lineart">├──</span> <a class="link" href="DmapAvShare.html" title="DmapAvShare">DmapAvShare</a>
+        <span class="lineart">├──</span> <a class="link" href="DmapControlShare.html" title="DmapControlShare">DmapControlShare</a>
+        <span class="lineart">╰──</span> <a class="link" href="DmapImageShare.html" title="DmapImageShare">DmapImageShare</a>
+</pre>
+</div>
+<div class="refsect1">
+<a name="DmapShare.description"></a><h2>Description</h2>
+<p><a class="link" href="DmapShare.html" title="DmapShare"><span class="type">DmapShare</span></a> provides an abstract parent to the <a class="link" href="DmapAvShare.html" title="DmapAvShare"><span class="type">DmapAvShare</span></a>, <a class="link" href="DmapControlShare.html" title="DmapControlShare"><span class="type">DmapControlShare</span></a>, and <a class="link" href="DmapImageShare.html" title="DmapImageShare"><span class="type">DmapImageShare</span></a> classes.</p>
+</div>
+<div class="refsect1">
+<a name="DmapShare.functions_details"></a><h2>Functions</h2>
+<div class="refsect2">
+<a name="dmap-share-serve"></a><h3>dmap_share_serve ()</h3>
+<pre class="programlisting"><span class="returnvalue">gboolean</span>
+dmap_share_serve (<em class="parameter"><code><a class="link" href="DmapShare.html" title="DmapShare"><span class="type">DmapShare</span></a> *share</code></em>,
+                  <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
+<p>Begin serving the service defined by share. A program will normally also
+call dmap_share_publish.</p>
+<div class="refsect3">
+<a name="dmap-share-serve.parameters"></a><h4>Parameters</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="parameters_name">
+<col class="parameters_description">
+<col width="200px" class="parameters_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="parameter_name"><p>share</p></td>
+<td class="parameter_description"><p>a <a class="link" href="DmapShare.html" title="DmapShare"><span class="type">DmapShare</span></a> instance.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>error</p></td>
+<td class="parameter_description"><p>return location for a GError, or NULL.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="dmap-share-serve.returns"></a><h4>Returns</h4>
+<p> TRUE if serving succeeds, else FALSE with error set.</p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="dmap-share-publish"></a><h3>dmap_share_publish ()</h3>
+<pre class="programlisting"><span class="returnvalue">gboolean</span>
+dmap_share_publish (<em class="parameter"><code><a class="link" href="DmapShare.html" title="DmapShare"><span class="type">DmapShare</span></a> *share</code></em>,
+                    <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
+<p>Publish the availability of the given share using mDNS-SD.</p>
+<div class="refsect3">
+<a name="dmap-share-publish.parameters"></a><h4>Parameters</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="parameters_name">
+<col class="parameters_description">
+<col width="200px" class="parameters_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="parameter_name"><p>share</p></td>
+<td class="parameter_description"><p>a <a class="link" href="DmapShare.html" title="DmapShare"><span class="type">DmapShare</span></a> instance.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>error</p></td>
+<td class="parameter_description"><p>return location for a GError, or NULL.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="dmap-share-publish.returns"></a><h4>Returns</h4>
+<p> TRUE if publishing succeeds, else FALSE.</p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="dmap-share-free-filter"></a><h3>dmap_share_free_filter ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+dmap_share_free_filter (<em class="parameter"><code><span class="type">GSList</span> *filter</code></em>);</pre>
+<p>Free the given filter list.</p>
+<div class="refsect3">
+<a name="dmap-share-free-filter.parameters"></a><h4>Parameters</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="parameters_name">
+<col class="parameters_description">
+<col width="200px" class="parameters_annotations">
+</colgroup>
+<tbody><tr>
+<td class="parameter_name"><p>filter</p></td>
+<td class="parameter_description"><p>The filter list to free. </p></td>
+<td class="parameter_annotations"><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GSList]</span></td>
+</tr></tbody>
+</table></div>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="dmap-share-emit-error"></a><h3>dmap_share_emit_error ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+dmap_share_emit_error (<em class="parameter"><code><a class="link" href="DmapShare.html" title="DmapShare"><span class="type">DmapShare</span></a> *share</code></em>,
+                       <em class="parameter"><code><span class="type">gint</span> code</code></em>,
+                       <em class="parameter"><code>const <span class="type">gchar</span> *format</code></em>,
+                       <em class="parameter"><code>...</code></em>);</pre>
+<div class="refsect3">
+<a name="dmap-share-emit-error.parameters"></a><h4>Parameters</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="parameters_name">
+<col class="parameters_description">
+<col width="200px" class="parameters_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="parameter_name"><p>share</p></td>
+<td class="parameter_description"><p>a <a class="link" href="DmapShare.html" title="DmapShare"><span class="type">DmapShare</span></a> instance.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>code</p></td>
+<td class="parameter_description"><p>error code.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>format</p></td>
+<td class="parameter_description"><p>printf()-style format for error message</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>...</p></td>
+<td class="parameter_description"><p>parameters for message format</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="refsect1">
+<a name="DmapShare.other_details"></a><h2>Types and Values</h2>
+<div class="refsect2">
+<a name="DmapMetaDataMap"></a><h3>DmapMetaDataMap</h3>
+<pre class="programlisting">typedef struct DmapMetaDataMap DmapMetaDataMap;
+</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapShareAuthMethod"></a><h3>enum DmapShareAuthMethod</h3>
+<div class="refsect3">
+<a name="DmapShareAuthMethod.members"></a><h4>Members</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="300px" class="enum_members_name">
+<col class="enum_members_description">
+<col width="200px" class="enum_members_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-SHARE-AUTH-METHOD-NONE:CAPS"></a>DMAP_SHARE_AUTH_METHOD_NONE</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-SHARE-AUTH-METHOD-NAME-AND-PASSWORD:CAPS"></a>DMAP_SHARE_AUTH_METHOD_NAME_AND_PASSWORD</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-SHARE-AUTH-METHOD-PASSWORD:CAPS"></a>DMAP_SHARE_AUTH_METHOD_PASSWORD</p></td>
+<td> </td>
+<td> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapBits"></a><h3>DmapBits</h3>
+<pre class="programlisting">typedef guint64 DmapBits;
+</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapMlclBits"></a><h3>struct DmapMlclBits</h3>
+<pre class="programlisting">struct DmapMlclBits {
+	GNode *mlcl;
+	DmapBits bits;
+	DmapShare *share;
+};
+</pre>
+</div>
+</div>
+<div class="refsect1">
+<a name="DmapShare.property-details"></a><h2>Property Details</h2>
+<div class="refsect2">
+<a name="DmapShare--auth-method"></a><h3>The <code class="literal">“auth-method”</code> property</h3>
+<pre class="programlisting">  “auth-method”              <span class="type">guint</span></pre>
+<p>Authentication method.</p>
+<p>Owner: DmapShare</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: &lt;= 2</p>
+<p>Default value: 0</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapShare--container-db"></a><h3>The <code class="literal">“container-db”</code> property</h3>
+<pre class="programlisting">  “container-db”             <a class="link" href="DmapContainerDb.html" title="DmapContainerDb"><span class="type">DmapContainerDb</span></a> *</pre>
+<p>Container DB object.</p>
+<p>Owner: DmapShare</p>
+<p>Flags: Read / Write / Construct Only</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapShare--db"></a><h3>The <code class="literal">“db”</code> property</h3>
+<pre class="programlisting">  “db”                       <a class="link" href="DmapDb.html" title="DmapDb"><span class="type">DmapDb</span></a> *</pre>
+<p>DB object.</p>
+<p>Owner: DmapShare</p>
+<p>Flags: Read / Write / Construct Only</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapShare--name"></a><h3>The <code class="literal">“name”</code> property</h3>
+<pre class="programlisting">  “name”                     <span class="type">char</span> *</pre>
+<p>Share Name.</p>
+<p>Owner: DmapShare</p>
+<p>Flags: Read / Write</p>
+<p>Default value: NULL</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapShare--password"></a><h3>The <code class="literal">“password”</code> property</h3>
+<pre class="programlisting">  “password”                 <span class="type">char</span> *</pre>
+<p>Authentication password.</p>
+<p>Owner: DmapShare</p>
+<p>Flags: Read / Write</p>
+<p>Default value: NULL</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapShare--revision-number"></a><h3>The <code class="literal">“revision-number”</code> property</h3>
+<pre class="programlisting">  “revision-number”          <span class="type">guint</span></pre>
+<p>Revision number.</p>
+<p>Owner: DmapShare</p>
+<p>Flags: Read / Write</p>
+<p>Allowed values: &lt;= G_MAXINT</p>
+<p>Default value: 0</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapShare--server"></a><h3>The <code class="literal">“server”</code> property</h3>
+<pre class="programlisting">  “server”                   <span class="type">SoupServer</span> *</pre>
+<p>Soup server.</p>
+<p>Owner: DmapShare</p>
+<p>Flags: Read</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapShare--transcode-mimetype"></a><h3>The <code class="literal">“transcode-mimetype”</code> property</h3>
+<pre class="programlisting">  “transcode-mimetype”       <span class="type">char</span> *</pre>
+<p>Set mimetype of stream after transcoding.</p>
+<p>Owner: DmapShare</p>
+<p>Flags: Read / Write / Construct Only</p>
+<p>Default value: NULL</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DmapShare--txt-records"></a><h3>The <code class="literal">“txt-records”</code> property</h3>
+<pre class="programlisting">  “txt-records”              <span class="type">GStrv</span></pre>
+<p>Set TXT-Records used for MDNS publishing.</p>
+<p>Owner: DmapShare</p>
+<p>Flags: Read / Write</p>
+</div>
+</div>
+<div class="refsect1">
+<a name="DmapShare.signal-details"></a><h2>Signal Details</h2>
+<div class="refsect2">
+<a name="DmapShare-error"></a><h3>The <code class="literal">“error”</code> signal</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+user_function (<a class="link" href="DmapShare.html" title="DmapShare"><span class="type">DmapShare</span></a> *dmapshare,
+               <span class="type">gpointer</span>   arg1,
+               <span class="type">gpointer</span>   user_data)</pre>
+<p>Flags: Run First</p>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.33.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/DmapTranscodeStream.html b/doc/html/DmapTranscodeStream.html
new file mode 100644
index 0000000..bca948f
--- /dev/null
+++ b/doc/html/DmapTranscodeStream.html
@@ -0,0 +1,79 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>DmapTranscodeStream: libdmapsharing Reference Manual</title>
+<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
+<link rel="home" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="up" href="ch04.html" title="Libdmapsharing Objects and Interfaces">
+<link rel="prev" href="libdmapsharing-4.0-dmap-enums.html" title="dmap-enums">
+<link rel="next" href="DmapImageConnection.html" title="DmapImageConnection">
+<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
+<td width="100%" align="left" class="shortcuts">
+<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
+                  <a href="#DmapTranscodeStream.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
+                  <a href="#DmapTranscodeStream.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
+</td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
+<td><a accesskey="u" href="ch04.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="libdmapsharing-4.0-dmap-enums.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="DmapImageConnection.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="refentry">
+<a name="DmapTranscodeStream"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="DmapTranscodeStream.top_of_page"></a>DmapTranscodeStream</span></h2>
+<p>DmapTranscodeStream — A transcoding <span class="type">GInputStream</span> wrapper.</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="DmapTranscodeStream.functions"></a><h2>Functions</h2>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="functions_proto_type">
+<col class="functions_proto_name">
+</colgroup>
+<tbody><tr>
+<td class="function_type">
+<span class="returnvalue">GInputStream</span> *
+</td>
+<td class="function_name">
+<a class="link" href="DmapTranscodeStream.html#dmap-transcode-stream-new" title="dmap_transcode_stream_new ()">dmap_transcode_stream_new</a> <span class="c_punctuation">()</span>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="DmapTranscodeStream.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<pre class="screen">    GObject
+    <span class="lineart">╰──</span> GInputStream
+        <span class="lineart">╰──</span> DmapTranscodeStream
+            <span class="lineart">├──</span> DmapTranscodeMp3Stream
+            <span class="lineart">├──</span> DmapTranscodeQtStream
+            <span class="lineart">╰──</span> DmapTranscodeWavStream
+</pre>
+</div>
+<div class="refsect1">
+<a name="DmapTranscodeStream.description"></a><h2>Description</h2>
+<p><a class="link" href="DmapTranscodeStream.html" title="DmapTranscodeStream"><span class="type">DmapTranscodeStream</span></a> objects wrap a <span class="type">GInputStream</span> in a way that transcodes the data therein.</p>
+</div>
+<div class="refsect1">
+<a name="DmapTranscodeStream.functions_details"></a><h2>Functions</h2>
+<div class="refsect2">
+<a name="dmap-transcode-stream-new"></a><h3>dmap_transcode_stream_new ()</h3>
+<pre class="programlisting"><span class="returnvalue">GInputStream</span> *
+dmap_transcode_stream_new (<em class="parameter"><code>const <span class="type">gchar</span> *transcode_mimetype</code></em>,
+                           <em class="parameter"><code><span class="type">GInputStream</span> *src_stream</code></em>);</pre>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.33.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/annotation-glossary.html b/doc/html/annotation-glossary.html
index 4db5f41..cb338aa 100644
--- a/doc/html/annotation-glossary.html
+++ b/doc/html/annotation-glossary.html
@@ -2,12 +2,12 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>Annotation Glossary: libdmapsharing-3.0 Reference Manual</title>
+<title>Annotation Glossary: libdmapsharing Reference Manual</title>
 <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
-<link rel="home" href="index.html" title="libdmapsharing-3.0 Reference Manual">
-<link rel="up" href="index.html" title="libdmapsharing-3.0 Reference Manual">
+<link rel="home" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="up" href="index.html" title="libdmapsharing Reference Manual">
 <link rel="prev" href="deprecated-api-index.html" title="Index of deprecated API">
-<meta name="generator" content="GTK-Doc V1.32 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -16,6 +16,8 @@
                      <span class="dim">|</span> 
                   <a class="shortcut" href="#glsE">E</a>
                      <span class="dim">|</span> 
+                  <a class="shortcut" href="#glsN">N</a>
+                     <span class="dim">|</span> 
                   <a class="shortcut" href="#glsS">S</a>
                      <span class="dim">|</span> 
                   <a class="shortcut" href="#glsT">T</a></span></td>
@@ -33,6 +35,9 @@
 <a name="glsE"></a><h3 class="title">E</h3>
 <dt><span class="glossterm"><a name="annotation-glossterm-element-type"></a>element-type</span></dt>
 <dd class="glossdef"><p>Generics and defining elements of containers and arrays.</p></dd>
+<a name="glsN"></a><h3 class="title">N</h3>
+<dt><span class="glossterm"><a name="annotation-glossterm-nullable"></a>nullable</span></dt>
+<dd class="glossdef"><p>NULL may be passed as the value in, out, in-out; or as a return value.</p></dd>
 <a name="glsS"></a><h3 class="title">S</h3>
 <dt><span class="glossterm"><a name="annotation-glossterm-scope%20async"></a>scope async</span></dt>
 <dd class="glossdef"><p>The callback is valid until first called.</p></dd>
@@ -40,13 +45,13 @@
 <dd class="glossdef"><p>The callback is valid only during the call to the method.</p></dd>
 <a name="glsT"></a><h3 class="title">T</h3>
 <dt><span class="glossterm"><a name="annotation-glossterm-transfer%20container"></a>transfer container</span></dt>
-<dd class="glossdef"><p>Free data container after the code is done.</p></dd>
+<dd class="glossdef"><p>The caller owns the data container, but not the data inside it.</p></dd>
 <dt><span class="glossterm"><a name="annotation-glossterm-transfer%20full"></a>transfer full</span></dt>
-<dd class="glossdef"><p>Free data after the code is done.</p></dd>
+<dd class="glossdef"><p>The caller owns the data, and is responsible for free it.</p></dd>
 <dt><span class="glossterm"><a name="annotation-glossterm-transfer%20none"></a>transfer none</span></dt>
-<dd class="glossdef"><p>Don't free data after the code is done.</p></dd>
+<dd class="glossdef"><p>The data is owned by the callee, which is responsible of freeing it.</p></dd>
 </div>
 <div class="footer">
-<hr>Generated by GTK-Doc V1.32</div>
+<hr>Generated by GTK-Doc V1.33.1</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/doc/html/api-index-full.html b/doc/html/api-index-full.html
index 1fcd447..1cf1aa3 100644
--- a/doc/html/api-index-full.html
+++ b/doc/html/api-index-full.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>API Index: libdmapsharing-3.0 Reference Manual</title>
+<title>API Index: libdmapsharing Reference Manual</title>
 <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
-<link rel="home" href="index.html" title="libdmapsharing-3.0 Reference Manual">
-<link rel="up" href="index.html" title="libdmapsharing-3.0 Reference Manual">
+<link rel="home" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="up" href="index.html" title="libdmapsharing Reference Manual">
 <link rel="prev" href="object-tree.html" title="Object Hierarchy">
 <link rel="next" href="deprecated-api-index.html" title="Index of deprecated API">
-<meta name="generator" content="GTK-Doc V1.32 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -21,20 +21,14 @@
                      <span class="dim">|</span> 
                   <a class="shortcut" href="#idxD">D</a>
                      <span class="dim">|</span> 
-                  <a class="shortcut" href="#idxG">G</a>
+                  <a class="shortcut" href="#idxE">E</a>
                      <span class="dim">|</span> 
                   <a class="shortcut" href="#idxH">H</a>
                      <span class="dim">|</span> 
-                  <a class="shortcut" href="#idxK">K</a>
-                     <span class="dim">|</span> 
-                  <a class="shortcut" href="#idxL">L</a>
+                  <a class="shortcut" href="#idxI">I</a>
                      <span class="dim">|</span> 
                   <a class="shortcut" href="#idxM">M</a>
                      <span class="dim">|</span> 
-                  <a class="shortcut" href="#idxN">N</a>
-                     <span class="dim">|</span> 
-                  <a class="shortcut" href="#idxO">O</a>
-                     <span class="dim">|</span> 
                   <a class="shortcut" href="#idxP">P</a>
                      <span class="dim">|</span> 
                   <a class="shortcut" href="#idxR">R</a>
@@ -43,9 +37,7 @@
                      <span class="dim">|</span> 
                   <a class="shortcut" href="#idxT">T</a>
                      <span class="dim">|</span> 
-                  <a class="shortcut" href="#idxU">U</a>
-                     <span class="dim">|</span> 
-                  <a class="shortcut" href="#idxW">W</a></span></td>
+                  <a class="shortcut" href="#idxU">U</a></span></td>
 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
 <td><img src="up-insensitive.png" width="16" height="16" border="0"></td>
 <td><a accesskey="p" href="object-tree.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
@@ -56,652 +48,733 @@
 <a name="api-index-full"></a>API Index</h1></div></div></div>
 <a name="idx"></a><a name="idxA"></a><h3 class="title">A</h3>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dmap-share.html#add-entry-to-mlcl" title="add_entry_to_mlcl ()">add_entry_to_mlcl</a>, user_function in <a class="link" href="libdmapsharing-3.0-dmap-share.html" title="dmap-share">dmap-share</a>
+<a class="link" href="DmapAvRecord.html#DmapAvRecord--bitrate" title="The “bitrate” property">DmapAvRecord:bitrate</a>, object property in <a class="link" href="DmapAvRecord.html" title="DmapAvRecord">DmapAvRecord</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dacp-share.html#add-guid" title="add_guid ()">add_guid</a>, user_function in <a class="link" href="libdmapsharing-3.0-dacp-share.html" title="dacp-share">dacp-share</a>
+<a class="link" href="DmapAvRecord.html#DmapAvRecord--disc" title="The “disc” property">DmapAvRecord:disc</a>, object property in <a class="link" href="DmapAvRecord.html" title="DmapAvRecord">DmapAvRecord</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dmap-connection.html#authenticate" title="authenticate ()">authenticate</a>, user_function in <a class="link" href="libdmapsharing-3.0-dmap-connection.html" title="dmap-connection">dmap-connection</a>
+<a class="link" href="DmapAvRecord.html#DmapAvRecord--duration" title="The “duration” property">DmapAvRecord:duration</a>, object property in <a class="link" href="DmapAvRecord.html" title="DmapAvRecord">DmapAvRecord</a>
 </dt>
 <dd></dd>
-<a name="idxB"></a><h3 class="title">B</h3>
 <dt>
-<a class="link" href="DMAPRecord.html#bitwise" title="bitwise">bitwise</a>, typedef in <a class="link" href="DMAPRecord.html" title="DMAPRecord">DMAPRecord</a>
+<a class="link" href="DmapAvRecord.html#DmapAvRecord--filesize" title="The “filesize” property">DmapAvRecord:filesize</a>, object property in <a class="link" href="DmapAvRecord.html" title="DmapAvRecord">DmapAvRecord</a>
 </dt>
 <dd></dd>
-<a name="idxC"></a><h3 class="title">C</h3>
 <dt>
-dmap_chunked_message_finished, function in dmap-private-utils
+<a class="link" href="DmapAvRecord.html#DmapAvRecord--firstseen" title="The “firstseen” property">DmapAvRecord:firstseen</a>, object property in <a class="link" href="DmapAvRecord.html" title="DmapAvRecord">DmapAvRecord</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dmap-connection.html#connected" title="connected ()">connected</a>, user_function in <a class="link" href="libdmapsharing-3.0-dmap-connection.html" title="dmap-connection">dmap-connection</a>
+<a class="link" href="DmapAvRecord.html#DmapAvRecord--format" title="The “format” property">DmapAvRecord:format</a>, object property in <a class="link" href="DmapAvRecord.html" title="DmapAvRecord">DmapAvRecord</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dmap-connection.html#connecting" title="connecting ()">connecting</a>, user_function in <a class="link" href="libdmapsharing-3.0-dmap-connection.html" title="dmap-connection">dmap-connection</a>
+<a class="link" href="DmapAvRecord.html#DmapAvRecord--has-video" title="The “has-video” property">DmapAvRecord:has-video</a>, object property in <a class="link" href="DmapAvRecord.html" title="DmapAvRecord">DmapAvRecord</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dmap-connection.html#DMAPConnectionCallback" title="DMAPConnectionCallback ()">DMAPConnectionCallback</a>, user_function in <a class="link" href="libdmapsharing-3.0-dmap-connection.html" title="dmap-connection">dmap-connection</a>
+<a class="link" href="DmapAvRecord.html#DmapAvRecord--hash" title="The “hash” property">DmapAvRecord:hash</a>, object property in <a class="link" href="DmapAvRecord.html" title="DmapAvRecord">DmapAvRecord</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dmap-connection.html#DMAPConnectionState" title="enum DMAPConnectionState">DMAPConnectionState</a>, enum in <a class="link" href="libdmapsharing-3.0-dmap-connection.html" title="dmap-connection">dmap-connection</a>
+<a class="link" href="DmapAvRecord.html#DmapAvRecord--location" title="The “location” property">DmapAvRecord:location</a>, object property in <a class="link" href="DmapAvRecord.html" title="DmapAvRecord">DmapAvRecord</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dmap-connection.html#dmap-connection-authenticate-message" title="dmap_connection_authenticate_message ()">dmap_connection_authenticate_message</a>, function in <a class="link" href="libdmapsharing-3.0-dmap-connection.html" title="dmap-connection">dmap-connection</a>
+<a class="link" href="DmapAvRecord.html#DmapAvRecord--mediakind" title="The “mediakind” property">DmapAvRecord:mediakind</a>, object property in <a class="link" href="DmapAvRecord.html" title="DmapAvRecord">DmapAvRecord</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dmap-connection.html#dmap-connection-build-message" title="dmap_connection_build_message ()">dmap_connection_build_message</a>, function in <a class="link" href="libdmapsharing-3.0-dmap-connection.html" title="dmap-connection">dmap-connection</a>
+<a class="link" href="DmapAvRecord.html#DmapAvRecord--mtime" title="The “mtime” property">DmapAvRecord:mtime</a>, object property in <a class="link" href="DmapAvRecord.html" title="DmapAvRecord">DmapAvRecord</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dmap-connection.html#dmap-connection-connect" title="dmap_connection_connect ()">dmap_connection_connect</a>, function in <a class="link" href="libdmapsharing-3.0-dmap-connection.html" title="dmap-connection">dmap-connection</a>
+<a class="link" href="DmapAvRecord.html#DmapAvRecord--rating" title="The “rating” property">DmapAvRecord:rating</a>, object property in <a class="link" href="DmapAvRecord.html" title="DmapAvRecord">DmapAvRecord</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dmap-connection.html#dmap-connection-disconnect" title="dmap_connection_disconnect ()">dmap_connection_disconnect</a>, function in <a class="link" href="libdmapsharing-3.0-dmap-connection.html" title="dmap-connection">dmap-connection</a>
+<a class="link" href="DmapAvRecord.html#DmapAvRecord--songalbum" title="The “songalbum” property">DmapAvRecord:songalbum</a>, object property in <a class="link" href="DmapAvRecord.html" title="DmapAvRecord">DmapAvRecord</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dmap-connection.html#dmap-connection-get" title="dmap_connection_get ()">dmap_connection_get</a>, function in <a class="link" href="libdmapsharing-3.0-dmap-connection.html" title="dmap-connection">dmap-connection</a>
+<a class="link" href="DmapAvRecord.html#DmapAvRecord--songalbumid" title="The “songalbumid” property">DmapAvRecord:songalbumid</a>, object property in <a class="link" href="DmapAvRecord.html" title="DmapAvRecord">DmapAvRecord</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dmap-connection.html#dmap-connection-get-headers" title="dmap_connection_get_headers ()">dmap_connection_get_headers</a>, function in <a class="link" href="libdmapsharing-3.0-dmap-connection.html" title="dmap-connection">dmap-connection</a>
+<a class="link" href="DmapAvRecord.html#DmapAvRecord--songartist" title="The “songartist” property">DmapAvRecord:songartist</a>, object property in <a class="link" href="DmapAvRecord.html" title="DmapAvRecord">DmapAvRecord</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dmap-connection.html#dmap-connection-get-playlists" title="dmap_connection_get_playlists ()">dmap_connection_get_playlists</a>, function in <a class="link" href="libdmapsharing-3.0-dmap-connection.html" title="dmap-connection">dmap-connection</a>
+<a class="link" href="DmapAvRecord.html#DmapAvRecord--songgenre" title="The “songgenre” property">DmapAvRecord:songgenre</a>, object property in <a class="link" href="DmapAvRecord.html" title="DmapAvRecord">DmapAvRecord</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dmap-connection.html#dmap-connection-is-connected" title="dmap_connection_is_connected ()">dmap_connection_is_connected</a>, function in <a class="link" href="libdmapsharing-3.0-dmap-connection.html" title="dmap-connection">dmap-connection</a>
+<a class="link" href="DmapAvRecord.html#DmapAvRecord--sort-album" title="The “sort-album” property">DmapAvRecord:sort-album</a>, object property in <a class="link" href="DmapAvRecord.html" title="DmapAvRecord">DmapAvRecord</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dmap-connection.html#dmap-connection-setup" title="dmap_connection_setup ()">dmap_connection_setup</a>, function in <a class="link" href="libdmapsharing-3.0-dmap-connection.html" title="dmap-connection">dmap-connection</a>
+<a class="link" href="DmapAvRecord.html#DmapAvRecord--sort-artist" title="The “sort-artist” property">DmapAvRecord:sort-artist</a>, object property in <a class="link" href="DmapAvRecord.html" title="DmapAvRecord">DmapAvRecord</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DMAPContainerRecord.html#DMAPContainerRecord--name" title="The “name” property">DMAPContainerRecord:name</a>, object property in <a class="link" href="DMAPContainerRecord.html" title="DMAPContainerRecord">DMAPContainerRecord</a>
+<a class="link" href="DmapAvRecord.html#DmapAvRecord--title" title="The “title” property">DmapAvRecord:title</a>, object property in <a class="link" href="DmapAvRecord.html" title="DmapAvRecord">DmapAvRecord</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DMAPContainerDb.html#dmap-container-db-add" title="dmap_container_db_add ()">dmap_container_db_add</a>, function in <a class="link" href="DMAPContainerDb.html" title="DMAPContainerDb">DMAPContainerDb</a>
+<a class="link" href="DmapAvRecord.html#DmapAvRecord--track" title="The “track” property">DmapAvRecord:track</a>, object property in <a class="link" href="DmapAvRecord.html" title="DmapAvRecord">DmapAvRecord</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DMAPContainerDb.html#dmap-container-db-count" title="dmap_container_db_count ()">dmap_container_db_count</a>, function in <a class="link" href="DMAPContainerDb.html" title="DMAPContainerDb">DMAPContainerDb</a>
+<a class="link" href="DmapAvRecord.html#DmapAvRecord--year" title="The “year” property">DmapAvRecord:year</a>, object property in <a class="link" href="DmapAvRecord.html" title="DmapAvRecord">DmapAvRecord</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DMAPContainerDb.html#dmap-container-db-foreach" title="dmap_container_db_foreach ()">dmap_container_db_foreach</a>, function in <a class="link" href="DMAPContainerDb.html" title="DMAPContainerDb">DMAPContainerDb</a>
+<a class="link" href="DmapAvConnection.html#dmap-av-connection-new" title="dmap_av_connection_new ()">dmap_av_connection_new</a>, function in <a class="link" href="DmapAvConnection.html" title="DmapAvConnection">DmapAvConnection</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DMAPContainerDb.html#dmap-container-db-lookup-by-id" title="dmap_container_db_lookup_by_id ()">dmap_container_db_lookup_by_id</a>, function in <a class="link" href="DMAPContainerDb.html" title="DMAPContainerDb">DMAPContainerDb</a>
+<a class="link" href="DmapAvRecord.html#dmap-av-record-cmp-by-album" title="dmap_av_record_cmp_by_album ()">dmap_av_record_cmp_by_album</a>, function in <a class="link" href="DmapAvRecord.html" title="DmapAvRecord">DmapAvRecord</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DMAPContainerRecord.html#dmap-container-record-add-entry" title="dmap_container_record_add_entry ()">dmap_container_record_add_entry</a>, function in <a class="link" href="DMAPContainerRecord.html" title="DMAPContainerRecord">DMAPContainerRecord</a>
+<a class="link" href="DmapAvRecord.html#dmap-av-record-itunes-compat" title="dmap_av_record_itunes_compat ()">dmap_av_record_itunes_compat</a>, function in <a class="link" href="DmapAvRecord.html" title="DmapAvRecord">DmapAvRecord</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DMAPContainerRecord.html#dmap-container-record-get-entries" title="dmap_container_record_get_entries ()">dmap_container_record_get_entries</a>, function in <a class="link" href="DMAPContainerRecord.html" title="DMAPContainerRecord">DMAPContainerRecord</a>
+<a class="link" href="DmapAvRecord.html#dmap-av-record-read" title="dmap_av_record_read ()">dmap_av_record_read</a>, function in <a class="link" href="DmapAvRecord.html" title="DmapAvRecord">DmapAvRecord</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DMAPContainerRecord.html#dmap-container-record-get-entry-count" title="dmap_container_record_get_entry_count ()">dmap_container_record_get_entry_count</a>, function in <a class="link" href="DMAPContainerRecord.html" title="DMAPContainerRecord">DMAPContainerRecord</a>
+<a class="link" href="DmapAvShare.html#dmap-av-share-new" title="dmap_av_share_new ()">dmap_av_share_new</a>, function in <a class="link" href="DmapAvShare.html" title="DmapAvShare">DmapAvShare</a>
 </dt>
 <dd></dd>
+<a name="idxB"></a><h3 class="title">B</h3>
 <dt>
-<a class="link" href="DMAPContainerRecord.html#dmap-container-record-get-id" title="dmap_container_record_get_id ()">dmap_container_record_get_id</a>, function in <a class="link" href="DMAPContainerRecord.html" title="DMAPContainerRecord">DMAPContainerRecord</a>
+<a class="link" href="DmapShare.html#DmapBits" title="DmapBits">DmapBits</a>, typedef in <a class="link" href="DmapShare.html" title="DmapShare">DmapShare</a>
 </dt>
 <dd></dd>
+<a name="idxC"></a><h3 class="title">C</h3>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dmap-share.html#content-codes" title="content_codes ()">content_codes</a>, user_function in <a class="link" href="libdmapsharing-3.0-dmap-share.html" title="dmap-share">dmap-share</a>
+<a class="link" href="DmapConnection.html#DmapConnection-authenticate" title="The “authenticate” signal">DmapConnection::authenticate</a>, object signal in <a class="link" href="DmapConnection.html" title="DmapConnection">DmapConnection</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dmap-share.html#ctrl-int" title="ctrl_int ()">ctrl_int</a>, user_function in <a class="link" href="libdmapsharing-3.0-dmap-share.html" title="dmap-share">dmap-share</a>
+<a class="link" href="DmapConnection.html#DmapConnection-connected" title="The “connected” signal">DmapConnection::connected</a>, object signal in <a class="link" href="DmapConnection.html" title="DmapConnection">DmapConnection</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="DmapConnection.html#DmapConnection-connecting" title="The “connecting” signal">DmapConnection::connecting</a>, object signal in <a class="link" href="DmapConnection.html" title="DmapConnection">DmapConnection</a>
 </dt>
 <dd></dd>
-<a name="idxD"></a><h3 class="title">D</h3>
 <dt>
-<a class="link" href="DAAPRecord.html#DAAPRecord--bitrate" title="The “bitrate” property">DAAPRecord:bitrate</a>, object property in <a class="link" href="DAAPRecord.html" title="DAAPRecord">DAAPRecord</a>
+<a class="link" href="DmapConnection.html#DmapConnection-disconnected" title="The “disconnected” signal">DmapConnection::disconnected</a>, object signal in <a class="link" href="DmapConnection.html" title="DmapConnection">DmapConnection</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DAAPRecord.html#DAAPRecord--disc" title="The “disc” property">DAAPRecord:disc</a>, object property in <a class="link" href="DAAPRecord.html" title="DAAPRecord">DAAPRecord</a>
+<a class="link" href="DmapConnection.html#DmapConnection-error" title="The “error” signal">DmapConnection::error</a>, object signal in <a class="link" href="DmapConnection.html" title="DmapConnection">DmapConnection</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DAAPRecord.html#DAAPRecord--duration" title="The “duration” property">DAAPRecord:duration</a>, object property in <a class="link" href="DAAPRecord.html" title="DAAPRecord">DAAPRecord</a>
+<a class="link" href="DmapConnection.html#DmapConnection-operation-done" title="The “operation-done” signal">DmapConnection::operation-done</a>, object signal in <a class="link" href="DmapConnection.html" title="DmapConnection">DmapConnection</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DAAPRecord.html#DAAPRecord--filesize" title="The “filesize” property">DAAPRecord:filesize</a>, object property in <a class="link" href="DAAPRecord.html" title="DAAPRecord">DAAPRecord</a>
+<a class="link" href="DmapConnection.html#DmapConnection--base-uri" title="The “base-uri” property">DmapConnection:base-uri</a>, object property in <a class="link" href="DmapConnection.html" title="DmapConnection">DmapConnection</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DAAPRecord.html#DAAPRecord--firstseen" title="The “firstseen” property">DAAPRecord:firstseen</a>, object property in <a class="link" href="DAAPRecord.html" title="DAAPRecord">DAAPRecord</a>
+<a class="link" href="DmapConnection.html#DmapConnection--database-id" title="The “database-id” property">DmapConnection:database-id</a>, object property in <a class="link" href="DmapConnection.html" title="DmapConnection">DmapConnection</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DAAPRecord.html#DAAPRecord--format" title="The “format” property">DAAPRecord:format</a>, object property in <a class="link" href="DAAPRecord.html" title="DAAPRecord">DAAPRecord</a>
+<a class="link" href="DmapConnection.html#DmapConnection--db" title="The “db” property">DmapConnection:db</a>, object property in <a class="link" href="DmapConnection.html" title="DmapConnection">DmapConnection</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DAAPRecord.html#DAAPRecord--has-video" title="The “has-video” property">DAAPRecord:has-video</a>, object property in <a class="link" href="DAAPRecord.html" title="DAAPRecord">DAAPRecord</a>
+<a class="link" href="DmapConnection.html#DmapConnection--dmap-version" title="The “dmap-version” property">DmapConnection:dmap-version</a>, object property in <a class="link" href="DmapConnection.html" title="DmapConnection">DmapConnection</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DAAPRecord.html#DAAPRecord--hash" title="The “hash” property">DAAPRecord:hash</a>, object property in <a class="link" href="DAAPRecord.html" title="DAAPRecord">DAAPRecord</a>
+<a class="link" href="DmapConnection.html#DmapConnection--factory" title="The “factory” property">DmapConnection:factory</a>, object property in <a class="link" href="DmapConnection.html" title="DmapConnection">DmapConnection</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DAAPRecord.html#DAAPRecord--location" title="The “location” property">DAAPRecord:location</a>, object property in <a class="link" href="DAAPRecord.html" title="DAAPRecord">DAAPRecord</a>
+<a class="link" href="DmapConnection.html#DmapConnection--host" title="The “host” property">DmapConnection:host</a>, object property in <a class="link" href="DmapConnection.html" title="DmapConnection">DmapConnection</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DAAPRecord.html#DAAPRecord--mediakind" title="The “mediakind” property">DAAPRecord:mediakind</a>, object property in <a class="link" href="DAAPRecord.html" title="DAAPRecord">DAAPRecord</a>
+<a class="link" href="DmapConnection.html#DmapConnection--name" title="The “name” property">DmapConnection:name</a>, object property in <a class="link" href="DmapConnection.html" title="DmapConnection">DmapConnection</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DAAPRecord.html#DAAPRecord--mtime" title="The “mtime” property">DAAPRecord:mtime</a>, object property in <a class="link" href="DAAPRecord.html" title="DAAPRecord">DAAPRecord</a>
+<a class="link" href="DmapConnection.html#DmapConnection--password" title="The “password” property">DmapConnection:password</a>, object property in <a class="link" href="DmapConnection.html" title="DmapConnection">DmapConnection</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DAAPRecord.html#DAAPRecord--rating" title="The “rating” property">DAAPRecord:rating</a>, object property in <a class="link" href="DAAPRecord.html" title="DAAPRecord">DAAPRecord</a>
+<a class="link" href="DmapConnection.html#DmapConnection--port" title="The “port” property">DmapConnection:port</a>, object property in <a class="link" href="DmapConnection.html" title="DmapConnection">DmapConnection</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DAAPRecord.html#DAAPRecord--songalbum" title="The “songalbum” property">DAAPRecord:songalbum</a>, object property in <a class="link" href="DAAPRecord.html" title="DAAPRecord">DAAPRecord</a>
+<a class="link" href="DmapConnection.html#DmapConnection--revision-number" title="The “revision-number” property">DmapConnection:revision-number</a>, object property in <a class="link" href="DmapConnection.html" title="DmapConnection">DmapConnection</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DAAPRecord.html#DAAPRecord--songalbumid" title="The “songalbumid” property">DAAPRecord:songalbumid</a>, object property in <a class="link" href="DAAPRecord.html" title="DAAPRecord">DAAPRecord</a>
+<a class="link" href="DmapConnection.html#DmapConnection--session-id" title="The “session-id” property">DmapConnection:session-id</a>, object property in <a class="link" href="DmapConnection.html" title="DmapConnection">DmapConnection</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DAAPRecord.html#DAAPRecord--songartist" title="The “songartist” property">DAAPRecord:songartist</a>, object property in <a class="link" href="DAAPRecord.html" title="DAAPRecord">DAAPRecord</a>
+<a class="link" href="DmapConnection.html#DmapConnection--username" title="The “username” property">DmapConnection:username</a>, object property in <a class="link" href="DmapConnection.html" title="DmapConnection">DmapConnection</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DAAPRecord.html#DAAPRecord--songgenre" title="The “songgenre” property">DAAPRecord:songgenre</a>, object property in <a class="link" href="DAAPRecord.html" title="DAAPRecord">DAAPRecord</a>
+<a class="link" href="DmapConnection.html#DmapConnectionFunc" title="DmapConnectionFunc ()">DmapConnectionFunc</a>, user_function in <a class="link" href="DmapConnection.html" title="DmapConnection">DmapConnection</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DAAPRecord.html#DAAPRecord--sort-album" title="The “sort-album” property">DAAPRecord:sort-album</a>, object property in <a class="link" href="DAAPRecord.html" title="DAAPRecord">DAAPRecord</a>
+<a class="link" href="DmapConnection.html#DmapConnectionState" title="enum DmapConnectionState">DmapConnectionState</a>, enum in <a class="link" href="DmapConnection.html" title="DmapConnection">DmapConnection</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DAAPRecord.html#DAAPRecord--sort-artist" title="The “sort-artist” property">DAAPRecord:sort-artist</a>, object property in <a class="link" href="DAAPRecord.html" title="DAAPRecord">DAAPRecord</a>
+<a class="link" href="DmapConnection.html#dmap-connection-authenticate-message" title="dmap_connection_authenticate_message ()">dmap_connection_authenticate_message</a>, function in <a class="link" href="DmapConnection.html" title="DmapConnection">DmapConnection</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DAAPRecord.html#DAAPRecord--title" title="The “title” property">DAAPRecord:title</a>, object property in <a class="link" href="DAAPRecord.html" title="DAAPRecord">DAAPRecord</a>
+<a class="link" href="DmapConnection.html#dmap-connection-emit-error" title="dmap_connection_emit_error ()">dmap_connection_emit_error</a>, function in <a class="link" href="DmapConnection.html" title="DmapConnection">DmapConnection</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DAAPRecord.html#DAAPRecord--track" title="The “track” property">DAAPRecord:track</a>, object property in <a class="link" href="DAAPRecord.html" title="DAAPRecord">DAAPRecord</a>
+<a class="link" href="DmapConnection.html#dmap-connection-get-headers" title="dmap_connection_get_headers ()">dmap_connection_get_headers</a>, function in <a class="link" href="DmapConnection.html" title="DmapConnection">DmapConnection</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DAAPRecord.html#DAAPRecord--year" title="The “year” property">DAAPRecord:year</a>, object property in <a class="link" href="DAAPRecord.html" title="DAAPRecord">DAAPRecord</a>
+<a class="link" href="DmapConnection.html#dmap-connection-get-playlists" title="dmap_connection_get_playlists ()">dmap_connection_get_playlists</a>, function in <a class="link" href="DmapConnection.html" title="DmapConnection">DmapConnection</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-daap-connection.html#daap-connection-new" title="daap_connection_new ()">daap_connection_new</a>, function in <a class="link" href="libdmapsharing-3.0-daap-connection.html" title="daap-connection">daap-connection</a>
+<a class="link" href="DmapConnection.html#dmap-connection-is-connected" title="dmap_connection_is_connected ()">dmap_connection_is_connected</a>, function in <a class="link" href="DmapConnection.html" title="DmapConnection">DmapConnection</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DAAPRecord.html#daap-record-cmp-by-album" title="daap_record_cmp_by_album ()">daap_record_cmp_by_album</a>, function in <a class="link" href="DAAPRecord.html" title="DAAPRecord">DAAPRecord</a>
+<a class="link" href="DmapConnection.html#dmap-connection-start" title="dmap_connection_start ()">dmap_connection_start</a>, function in <a class="link" href="DmapConnection.html" title="DmapConnection">DmapConnection</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DAAPRecord.html#daap-record-itunes-compat" title="daap_record_itunes_compat ()">daap_record_itunes_compat</a>, function in <a class="link" href="DAAPRecord.html" title="DAAPRecord">DAAPRecord</a>
+<a class="link" href="DmapConnection.html#dmap-connection-stop" title="dmap_connection_stop ()">dmap_connection_stop</a>, function in <a class="link" href="DmapConnection.html" title="DmapConnection">DmapConnection</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DAAPRecord.html#daap-record-read" title="daap_record_read ()">daap_record_read</a>, function in <a class="link" href="DAAPRecord.html" title="DAAPRecord">DAAPRecord</a>
+<a class="link" href="DmapContainerRecord.html#DmapContainerRecord--name" title="The “name” property">DmapContainerRecord:name</a>, object property in <a class="link" href="DmapContainerRecord.html" title="DmapContainerRecord">DmapContainerRecord</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-daap-share.html#daap-share-new" title="daap_share_new ()">daap_share_new</a>, function in <a class="link" href="libdmapsharing-3.0-daap-share.html" title="daap-share">daap-share</a>
+<a class="link" href="DmapContainerDb.html#dmap-container-db-add" title="dmap_container_db_add ()">dmap_container_db_add</a>, function in <a class="link" href="DmapContainerDb.html" title="DmapContainerDb">DmapContainerDb</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DACPPlayer.html#DACPPlayer--play-state" title="The “play-state” property">DACPPlayer:play-state</a>, object property in <a class="link" href="DACPPlayer.html" title="DACPPlayer">DACPPlayer</a>
+<a class="link" href="DmapContainerDb.html#dmap-container-db-count" title="dmap_container_db_count ()">dmap_container_db_count</a>, function in <a class="link" href="DmapContainerDb.html" title="DmapContainerDb">DmapContainerDb</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DACPPlayer.html#DACPPlayer--playing-time" title="The “playing-time” property">DACPPlayer:playing-time</a>, object property in <a class="link" href="DACPPlayer.html" title="DACPPlayer">DACPPlayer</a>
+<a class="link" href="DmapContainerDb.html#dmap-container-db-foreach" title="dmap_container_db_foreach ()">dmap_container_db_foreach</a>, function in <a class="link" href="DmapContainerDb.html" title="DmapContainerDb">DmapContainerDb</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DACPPlayer.html#DACPPlayer--repeat-state" title="The “repeat-state” property">DACPPlayer:repeat-state</a>, object property in <a class="link" href="DACPPlayer.html" title="DACPPlayer">DACPPlayer</a>
+<a class="link" href="DmapContainerDb.html#dmap-container-db-lookup-by-id" title="dmap_container_db_lookup_by_id ()">dmap_container_db_lookup_by_id</a>, function in <a class="link" href="DmapContainerDb.html" title="DmapContainerDb">DmapContainerDb</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DACPPlayer.html#DACPPlayer--shuffle-state" title="The “shuffle-state” property">DACPPlayer:shuffle-state</a>, object property in <a class="link" href="DACPPlayer.html" title="DACPPlayer">DACPPlayer</a>
+<a class="link" href="DmapContainerRecord.html#dmap-container-record-add-entry" title="dmap_container_record_add_entry ()">dmap_container_record_add_entry</a>, function in <a class="link" href="DmapContainerRecord.html" title="DmapContainerRecord">DmapContainerRecord</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DACPPlayer.html#DACPPlayer--volume" title="The “volume” property">DACPPlayer:volume</a>, object property in <a class="link" href="DACPPlayer.html" title="DACPPlayer">DACPPlayer</a>
+<a class="link" href="DmapContainerRecord.html#dmap-container-record-get-entries" title="dmap_container_record_get_entries ()">dmap_container_record_get_entries</a>, function in <a class="link" href="DmapContainerRecord.html" title="DmapContainerRecord">DmapContainerRecord</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DACPPlayer.html#DACPPlayState" title="enum DACPPlayState">DACPPlayState</a>, enum in <a class="link" href="DACPPlayer.html" title="DACPPlayer">DACPPlayer</a>
+<a class="link" href="DmapContainerRecord.html#dmap-container-record-get-entry-count" title="dmap_container_record_get_entry_count ()">dmap_container_record_get_entry_count</a>, function in <a class="link" href="DmapContainerRecord.html" title="DmapContainerRecord">DmapContainerRecord</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DACPPlayer.html#DACPRepeatState" title="enum DACPRepeatState">DACPRepeatState</a>, enum in <a class="link" href="DACPPlayer.html" title="DACPPlayer">DACPPlayer</a>
+<a class="link" href="DmapContainerRecord.html#dmap-container-record-get-id" title="dmap_container_record_get_id ()">dmap_container_record_get_id</a>, function in <a class="link" href="DmapContainerRecord.html" title="DmapContainerRecord">DmapContainerRecord</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dacp-connection.html#dacp-connection-new" title="dacp_connection_new ()">dacp_connection_new</a>, function in <a class="link" href="libdmapsharing-3.0-dacp-connection.html" title="dacp-connection">dacp-connection</a>
+<a class="link" href="libdmapsharing-4.0-dmap-cc.html#DmapContentCode" title="enum DmapContentCode">DmapContentCode</a>, enum in <a class="link" href="libdmapsharing-4.0-dmap-cc.html" title="dmap-cc">dmap-cc</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DACPPlayer.html#dacp-player-cue-clear" title="dacp_player_cue_clear ()">dacp_player_cue_clear</a>, function in <a class="link" href="DACPPlayer.html" title="DACPPlayer">DACPPlayer</a>
+<a class="link" href="DmapControlPlayer.html#DmapControlPlayer--play-state" title="The “play-state” property">DmapControlPlayer:play-state</a>, object property in <a class="link" href="DmapControlPlayer.html" title="DmapControlPlayer">DmapControlPlayer</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DACPPlayer.html#dacp-player-cue-play" title="dacp_player_cue_play ()">dacp_player_cue_play</a>, function in <a class="link" href="DACPPlayer.html" title="DACPPlayer">DACPPlayer</a>
+<a class="link" href="DmapControlPlayer.html#DmapControlPlayer--playing-time" title="The “playing-time” property">DmapControlPlayer:playing-time</a>, object property in <a class="link" href="DmapControlPlayer.html" title="DmapControlPlayer">DmapControlPlayer</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DACPPlayer.html#dacp-player-next-item" title="dacp_player_next_item ()">dacp_player_next_item</a>, function in <a class="link" href="DACPPlayer.html" title="DACPPlayer">DACPPlayer</a>
+<a class="link" href="DmapControlPlayer.html#DmapControlPlayer--repeat-state" title="The “repeat-state” property">DmapControlPlayer:repeat-state</a>, object property in <a class="link" href="DmapControlPlayer.html" title="DmapControlPlayer">DmapControlPlayer</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DACPPlayer.html#dacp-player-now-playing-artwork" title="dacp_player_now_playing_artwork ()">dacp_player_now_playing_artwork</a>, function in <a class="link" href="DACPPlayer.html" title="DACPPlayer">DACPPlayer</a>
+<a class="link" href="DmapControlPlayer.html#DmapControlPlayer--shuffle-state" title="The “shuffle-state” property">DmapControlPlayer:shuffle-state</a>, object property in <a class="link" href="DmapControlPlayer.html" title="DmapControlPlayer">DmapControlPlayer</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DACPPlayer.html#dacp-player-now-playing-record" title="dacp_player_now_playing_record ()">dacp_player_now_playing_record</a>, function in <a class="link" href="DACPPlayer.html" title="DACPPlayer">DACPPlayer</a>
+<a class="link" href="DmapControlPlayer.html#DmapControlPlayer--volume" title="The “volume” property">DmapControlPlayer:volume</a>, object property in <a class="link" href="DmapControlPlayer.html" title="DmapControlPlayer">DmapControlPlayer</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DACPPlayer.html#dacp-player-pause" title="dacp_player_pause ()">dacp_player_pause</a>, function in <a class="link" href="DACPPlayer.html" title="DACPPlayer">DACPPlayer</a>
+<a class="link" href="DmapControlPlayer.html#DmapControlPlayState" title="enum DmapControlPlayState">DmapControlPlayState</a>, enum in <a class="link" href="DmapControlPlayer.html" title="DmapControlPlayer">DmapControlPlayer</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DACPPlayer.html#dacp-player-play-pause" title="dacp_player_play_pause ()">dacp_player_play_pause</a>, function in <a class="link" href="DACPPlayer.html" title="DACPPlayer">DACPPlayer</a>
+<a class="link" href="DmapControlPlayer.html#DmapControlRepeatState" title="enum DmapControlRepeatState">DmapControlRepeatState</a>, enum in <a class="link" href="DmapControlPlayer.html" title="DmapControlPlayer">DmapControlPlayer</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DACPPlayer.html#dacp-player-prev-item" title="dacp_player_prev_item ()">dacp_player_prev_item</a>, function in <a class="link" href="DACPPlayer.html" title="DACPPlayer">DACPPlayer</a>
+<a class="link" href="DmapControlShare.html#DmapControlShare-add-guid" title="The “add-guid” signal">DmapControlShare::add-guid</a>, object signal in <a class="link" href="DmapControlShare.html" title="DmapControlShare">DmapControlShare</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dacp-share.html#dacp-share-new" title="dacp_share_new ()">dacp_share_new</a>, function in <a class="link" href="libdmapsharing-3.0-dacp-share.html" title="dacp-share">dacp-share</a>
+<a class="link" href="DmapControlShare.html#DmapControlShare-lookup-guid" title="The “lookup-guid” signal">DmapControlShare::lookup-guid</a>, object signal in <a class="link" href="DmapControlShare.html" title="DmapControlShare">DmapControlShare</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dacp-share.html#dacp-share-pair" title="dacp_share_pair ()">dacp_share_pair</a>, function in <a class="link" href="libdmapsharing-3.0-dacp-share.html" title="dacp-share">dacp-share</a>
+<a class="link" href="DmapControlShare.html#DmapControlShare-remote-found" title="The “remote-found” signal">DmapControlShare::remote-found</a>, object signal in <a class="link" href="DmapControlShare.html" title="DmapControlShare">DmapControlShare</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dacp-share.html#dacp-share-player-updated" title="dacp_share_player_updated ()">dacp_share_player_updated</a>, function in <a class="link" href="libdmapsharing-3.0-dacp-share.html" title="dacp-share">dacp-share</a>
+<a class="link" href="DmapControlShare.html#DmapControlShare-remote-lost" title="The “remote-lost” signal">DmapControlShare::remote-lost</a>, object signal in <a class="link" href="DmapControlShare.html" title="DmapControlShare">DmapControlShare</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dacp-share.html#dacp-share-start-lookup" title="dacp_share_start_lookup ()">dacp_share_start_lookup</a>, function in <a class="link" href="libdmapsharing-3.0-dacp-share.html" title="dacp-share">dacp-share</a>
+<a class="link" href="DmapControlShare.html#DmapControlShare-remote-paired" title="The “remote-paired” signal">DmapControlShare::remote-paired</a>, object signal in <a class="link" href="DmapControlShare.html" title="DmapControlShare">DmapControlShare</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dacp-share.html#dacp-share-stop-lookup" title="dacp_share_stop_lookup ()">dacp_share_stop_lookup</a>, function in <a class="link" href="libdmapsharing-3.0-dacp-share.html" title="dacp-share">dacp-share</a>
+<a class="link" href="DmapControlShare.html#DmapControlShare--library-name" title="The “library-name” property">DmapControlShare:library-name</a>, object property in <a class="link" href="DmapControlShare.html" title="DmapControlShare">DmapControlShare</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dmap-share.html#databases" title="databases ()">databases</a>, user_function in <a class="link" href="libdmapsharing-3.0-dmap-share.html" title="dmap-share">dmap-share</a>
+<a class="link" href="DmapControlShare.html#DmapControlShare--player" title="The “player” property">DmapControlShare:player</a>, object property in <a class="link" href="DmapControlShare.html" title="DmapControlShare">DmapControlShare</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dmap-share.html#databases-browse-xxx" title="databases_browse_xxx ()">databases_browse_xxx</a>, user_function in <a class="link" href="libdmapsharing-3.0-dmap-share.html" title="dmap-share">dmap-share</a>
+<a class="link" href="DmapControlConnection.html#dmap-control-connection-new" title="dmap_control_connection_new ()">dmap_control_connection_new</a>, function in <a class="link" href="DmapControlConnection.html" title="DmapControlConnection">DmapControlConnection</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dmap-share.html#databases-items-xxx" title="databases_items_xxx ()">databases_items_xxx</a>, user_function in <a class="link" href="libdmapsharing-3.0-dmap-share.html" title="dmap-share">dmap-share</a>
+<a class="link" href="DmapControlPlayer.html#dmap-control-player-cue-clear" title="dmap_control_player_cue_clear ()">dmap_control_player_cue_clear</a>, function in <a class="link" href="DmapControlPlayer.html" title="DmapControlPlayer">DmapControlPlayer</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DMAPDb.html#dmap-db-add" title="dmap_db_add ()">dmap_db_add</a>, function in <a class="link" href="DMAPDb.html" title="DMAPDb">DMAPDb</a>
+<a class="link" href="DmapControlPlayer.html#dmap-control-player-cue-play" title="dmap_control_player_cue_play ()">dmap_control_player_cue_play</a>, function in <a class="link" href="DmapControlPlayer.html" title="DmapControlPlayer">DmapControlPlayer</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DMAPDb.html#dmap-db-add-path" title="dmap_db_add_path ()">dmap_db_add_path</a>, function in <a class="link" href="DMAPDb.html" title="DMAPDb">DMAPDb</a>
+<a class="link" href="DmapControlPlayer.html#dmap-control-player-next-item" title="dmap_control_player_next_item ()">dmap_control_player_next_item</a>, function in <a class="link" href="DmapControlPlayer.html" title="DmapControlPlayer">DmapControlPlayer</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DMAPDb.html#dmap-db-add-with-id" title="dmap_db_add_with_id ()">dmap_db_add_with_id</a>, function in <a class="link" href="DMAPDb.html" title="DMAPDb">DMAPDb</a>
+<a class="link" href="DmapControlPlayer.html#dmap-control-player-now-playing-artwork" title="dmap_control_player_now_playing_artwork ()">dmap_control_player_now_playing_artwork</a>, function in <a class="link" href="DmapControlPlayer.html" title="DmapControlPlayer">DmapControlPlayer</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DMAPDb.html#dmap-db-apply-filter" title="dmap_db_apply_filter ()">dmap_db_apply_filter</a>, function in <a class="link" href="DMAPDb.html" title="DMAPDb">DMAPDb</a>
+<a class="link" href="DmapControlPlayer.html#dmap-control-player-now-playing-record" title="dmap_control_player_now_playing_record ()">dmap_control_player_now_playing_record</a>, function in <a class="link" href="DmapControlPlayer.html" title="DmapControlPlayer">DmapControlPlayer</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DMAPDb.html#dmap-db-count" title="dmap_db_count ()">dmap_db_count</a>, function in <a class="link" href="DMAPDb.html" title="DMAPDb">DMAPDb</a>
+<a class="link" href="DmapControlPlayer.html#dmap-control-player-pause" title="dmap_control_player_pause ()">dmap_control_player_pause</a>, function in <a class="link" href="DmapControlPlayer.html" title="DmapControlPlayer">DmapControlPlayer</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DMAPDb.html#dmap-db-foreach" title="dmap_db_foreach ()">dmap_db_foreach</a>, function in <a class="link" href="DMAPDb.html" title="DMAPDb">DMAPDb</a>
+<a class="link" href="DmapControlPlayer.html#dmap-control-player-play-pause" title="dmap_control_player_play_pause ()">dmap_control_player_play_pause</a>, function in <a class="link" href="DmapControlPlayer.html" title="DmapControlPlayer">DmapControlPlayer</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DMAPDb.html#dmap-db-lookup-by-id" title="dmap_db_lookup_by_id ()">dmap_db_lookup_by_id</a>, function in <a class="link" href="DMAPDb.html" title="DMAPDb">DMAPDb</a>
+<a class="link" href="DmapControlPlayer.html#dmap-control-player-prev-item" title="dmap_control_player_prev_item ()">dmap_control_player_prev_item</a>, function in <a class="link" href="DmapControlPlayer.html" title="DmapControlPlayer">DmapControlPlayer</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DMAPDb.html#dmap-db-lookup-id-by-location" title="dmap_db_lookup_id_by_location ()">dmap_db_lookup_id_by_location</a>, function in <a class="link" href="DMAPDb.html" title="DMAPDb">DMAPDb</a>
+<a class="link" href="DmapControlShare.html#dmap-control-share-new" title="dmap_control_share_new ()">dmap_control_share_new</a>, function in <a class="link" href="DmapControlShare.html" title="DmapControlShare">DmapControlShare</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dmap-connection.html#disconnected" title="disconnected ()">disconnected</a>, user_function in <a class="link" href="libdmapsharing-3.0-dmap-connection.html" title="dmap-connection">dmap-connection</a>
+<a class="link" href="DmapControlShare.html#dmap-control-share-pair" title="dmap_control_share_pair ()">dmap_control_share_pair</a>, function in <a class="link" href="DmapControlShare.html" title="DmapControlShare">DmapControlShare</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DPAPRecord.html#DPAPRecord--aspect-ratio" title="The “aspect-ratio” property">DPAPRecord:aspect-ratio</a>, object property in <a class="link" href="DPAPRecord.html" title="DPAPRecord">DPAPRecord</a>
+<a class="link" href="DmapControlShare.html#dmap-control-share-player-updated" title="dmap_control_share_player_updated ()">dmap_control_share_player_updated</a>, function in <a class="link" href="DmapControlShare.html" title="DmapControlShare">DmapControlShare</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DPAPRecord.html#DPAPRecord--comments" title="The “comments” property">DPAPRecord:comments</a>, object property in <a class="link" href="DPAPRecord.html" title="DPAPRecord">DPAPRecord</a>
+<a class="link" href="DmapControlShare.html#dmap-control-share-start-lookup" title="dmap_control_share_start_lookup ()">dmap_control_share_start_lookup</a>, function in <a class="link" href="DmapControlShare.html" title="DmapControlShare">DmapControlShare</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DPAPRecord.html#DPAPRecord--creation-date" title="The “creation-date” property">DPAPRecord:creation-date</a>, object property in <a class="link" href="DPAPRecord.html" title="DPAPRecord">DPAPRecord</a>
+<a class="link" href="DmapControlShare.html#dmap-control-share-stop-lookup" title="dmap_control_share_stop_lookup ()">dmap_control_share_stop_lookup</a>, function in <a class="link" href="DmapControlShare.html" title="DmapControlShare">DmapControlShare</a>
 </dt>
 <dd></dd>
+<a name="idxD"></a><h3 class="title">D</h3>
 <dt>
-<a class="link" href="DPAPRecord.html#DPAPRecord--filename" title="The “filename” property">DPAPRecord:filename</a>, object property in <a class="link" href="DPAPRecord.html" title="DPAPRecord">DPAPRecord</a>
+<a class="link" href="DmapControlConnection.html#DACP-TYPE-CONNECTION:CAPS" title="DACP_TYPE_CONNECTION">DACP_TYPE_CONNECTION</a>, macro in <a class="link" href="DmapControlConnection.html" title="DmapControlConnection">DmapControlConnection</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DPAPRecord.html#DPAPRecord--format" title="The “format” property">DPAPRecord:format</a>, object property in <a class="link" href="DPAPRecord.html" title="DPAPRecord">DPAPRecord</a>
+<a class="link" href="DmapDb.html#DmapDbId" title="enum DmapDbId">DmapDbId</a>, enum in <a class="link" href="DmapDb.html" title="DmapDb">DmapDb</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DPAPRecord.html#DPAPRecord--hash" title="The “hash” property">DPAPRecord:hash</a>, object property in <a class="link" href="DPAPRecord.html" title="DPAPRecord">DPAPRecord</a>
+<a class="link" href="DmapDb.html#dmap-db-add" title="dmap_db_add ()">dmap_db_add</a>, function in <a class="link" href="DmapDb.html" title="DmapDb">DmapDb</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DPAPRecord.html#DPAPRecord--large-filesize" title="The “large-filesize” property">DPAPRecord:large-filesize</a>, object property in <a class="link" href="DPAPRecord.html" title="DPAPRecord">DPAPRecord</a>
+<a class="link" href="DmapDb.html#dmap-db-add-path" title="dmap_db_add_path ()">dmap_db_add_path</a>, function in <a class="link" href="DmapDb.html" title="DmapDb">DmapDb</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DPAPRecord.html#DPAPRecord--location" title="The “location” property">DPAPRecord:location</a>, object property in <a class="link" href="DPAPRecord.html" title="DPAPRecord">DPAPRecord</a>
+<a class="link" href="DmapDb.html#dmap-db-add-with-id" title="dmap_db_add_with_id ()">dmap_db_add_with_id</a>, function in <a class="link" href="DmapDb.html" title="DmapDb">DmapDb</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DPAPRecord.html#DPAPRecord--pixel-height" title="The “pixel-height” property">DPAPRecord:pixel-height</a>, object property in <a class="link" href="DPAPRecord.html" title="DPAPRecord">DPAPRecord</a>
+<a class="link" href="DmapDb.html#dmap-db-apply-filter" title="dmap_db_apply_filter ()">dmap_db_apply_filter</a>, function in <a class="link" href="DmapDb.html" title="DmapDb">DmapDb</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DPAPRecord.html#DPAPRecord--pixel-width" title="The “pixel-width” property">DPAPRecord:pixel-width</a>, object property in <a class="link" href="DPAPRecord.html" title="DPAPRecord">DPAPRecord</a>
+<a class="link" href="DmapDb.html#dmap-db-count" title="dmap_db_count ()">dmap_db_count</a>, function in <a class="link" href="DmapDb.html" title="DmapDb">DmapDb</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DPAPRecord.html#DPAPRecord--rating" title="The “rating” property">DPAPRecord:rating</a>, object property in <a class="link" href="DPAPRecord.html" title="DPAPRecord">DPAPRecord</a>
+<a class="link" href="DmapDb.html#dmap-db-foreach" title="dmap_db_foreach ()">dmap_db_foreach</a>, function in <a class="link" href="DmapDb.html" title="DmapDb">DmapDb</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DPAPRecord.html#DPAPRecord--thumbnail" title="The “thumbnail” property">DPAPRecord:thumbnail</a>, object property in <a class="link" href="DPAPRecord.html" title="DPAPRecord">DPAPRecord</a>
+<a class="link" href="DmapDb.html#dmap-db-lookup-by-id" title="dmap_db_lookup_by_id ()">dmap_db_lookup_by_id</a>, function in <a class="link" href="DmapDb.html" title="DmapDb">DmapDb</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dpap-connection.html#dpap-connection-new" title="dpap_connection_new ()">dpap_connection_new</a>, function in <a class="link" href="libdmapsharing-3.0-dpap-connection.html" title="dpap-connection">dpap-connection</a>
+<a class="link" href="DmapDb.html#dmap-db-lookup-id-by-location" title="dmap_db_lookup_id_by_location ()">dmap_db_lookup_id_by_location</a>, function in <a class="link" href="DmapDb.html" title="DmapDb">DmapDb</a>
 </dt>
 <dd></dd>
+<a name="idxE"></a><h3 class="title">E</h3>
 <dt>
-<a class="link" href="DPAPRecord.html#dpap-record-read" title="dpap_record_read ()">dpap_record_read</a>, function in <a class="link" href="DPAPRecord.html" title="DPAPRecord">DPAPRecord</a>
+DMAP_ERROR, macro in dmap-error
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dpap-share.html#dpap-share-new" title="dpap_share_new ()">dpap_share_new</a>, function in <a class="link" href="libdmapsharing-3.0-dpap-share.html" title="dpap-share">dpap-share</a>
+DmapError, enum in dmap-error
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dmap-gst-input-stream.html#dmapd-input-stream-strdup-format-extension" title="dmapd_input_stream_strdup_format_extension ()">dmapd_input_stream_strdup_format_extension</a>, function in <a class="link" href="libdmapsharing-3.0-dmap-gst-input-stream.html" title="dmap-gst-input-stream">dmap-gst-input-stream</a>
+dmap_error_quark, function in dmap-error
 </dt>
 <dd></dd>
-<a name="idxG"></a><h3 class="title">G</h3>
+<a name="idxH"></a><h3 class="title">H</h3>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dmap-share.html#get-desired-port" title="get_desired_port ()">get_desired_port</a>, user_function in <a class="link" href="libdmapsharing-3.0-dmap-share.html" title="dmap-share">dmap-share</a>
+<a class="link" href="libdmapsharing-4.0-dmap-md5.html#DMAP-HASH-SIZE:CAPS" title="DMAP_HASH_SIZE">DMAP_HASH_SIZE</a>, macro in <a class="link" href="libdmapsharing-4.0-dmap-md5.html" title="dmap-md5">dmap-md5</a>
 </dt>
 <dd></dd>
+<a name="idxI"></a><h3 class="title">I</h3>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dmap-connection.html#get-protocol-version-cc" title="get_protocol_version_cc ()">get_protocol_version_cc</a>, user_function in <a class="link" href="libdmapsharing-3.0-dmap-connection.html" title="dmap-connection">dmap-connection</a>
+<a class="link" href="DmapContainerDb.html#DmapIdContainerRecordFunc" title="DmapIdContainerRecordFunc ()">DmapIdContainerRecordFunc</a>, user_function in <a class="link" href="DmapContainerDb.html" title="DmapContainerDb">DmapContainerDb</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dmap-connection.html#get-query-metadata" title="get_query_metadata ()">get_query_metadata</a>, user_function in <a class="link" href="libdmapsharing-3.0-dmap-connection.html" title="dmap-connection">dmap-connection</a>
+<a class="link" href="DmapDb.html#DmapIdRecordFunc" title="DmapIdRecordFunc ()">DmapIdRecordFunc</a>, user_function in <a class="link" href="DmapDb.html" title="DmapDb">DmapDb</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dmap-share.html#get-type-of-service" title="get_type_of_service ()">get_type_of_service</a>, user_function in <a class="link" href="libdmapsharing-3.0-dmap-share.html" title="dmap-share">dmap-share</a>
+<a class="link" href="DmapImageRecord.html#DmapImageRecord--aspect-ratio" title="The “aspect-ratio” property">DmapImageRecord:aspect-ratio</a>, object property in <a class="link" href="DmapImageRecord.html" title="DmapImageRecord">DmapImageRecord</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dmap-gst-input-stream.html#dmap-gst-input-stream-new" title="dmap_gst_input_stream_new ()">dmap_gst_input_stream_new</a>, function in <a class="link" href="libdmapsharing-3.0-dmap-gst-input-stream.html" title="dmap-gst-input-stream">dmap-gst-input-stream</a>
+<a class="link" href="DmapImageRecord.html#DmapImageRecord--comments" title="The “comments” property">DmapImageRecord:comments</a>, object property in <a class="link" href="DmapImageRecord.html" title="DmapImageRecord">DmapImageRecord</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dmap-gst-mp3-input-stream.html#dmap-gst-mp3-input-stream-new" title="dmap_gst_mp3_input_stream_new ()">dmap_gst_mp3_input_stream_new</a>, function in <a class="link" href="libdmapsharing-3.0-dmap-gst-mp3-input-stream.html" title="dmap-gst-mp3-input-stream">dmap-gst-mp3-input-stream</a>
+<a class="link" href="DmapImageRecord.html#DmapImageRecord--creation-date" title="The “creation-date” property">DmapImageRecord:creation-date</a>, object property in <a class="link" href="DmapImageRecord.html" title="DmapImageRecord">DmapImageRecord</a>
 </dt>
 <dd></dd>
 <dt>
-dmap_gst_qt_input_stream_new, function in dmap-gst-qt-input-stream
+<a class="link" href="DmapImageRecord.html#DmapImageRecord--filename" title="The “filename” property">DmapImageRecord:filename</a>, object property in <a class="link" href="DmapImageRecord.html" title="DmapImageRecord">DmapImageRecord</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dmap-gst-wav-input-stream.html#dmap-gst-wav-input-stream-new" title="dmap_gst_wav_input_stream_new ()">dmap_gst_wav_input_stream_new</a>, function in <a class="link" href="libdmapsharing-3.0-dmap-gst-wav-input-stream.html" title="dmap-gst-wav-input-stream">dmap-gst-wav-input-stream</a>
+<a class="link" href="DmapImageRecord.html#DmapImageRecord--format" title="The “format” property">DmapImageRecord:format</a>, object property in <a class="link" href="DmapImageRecord.html" title="DmapImageRecord">DmapImageRecord</a>
 </dt>
 <dd></dd>
-<a name="idxH"></a><h3 class="title">H</h3>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dmap-connection.html#handle-mlcl" title="handle_mlcl ()">handle_mlcl</a>, user_function in <a class="link" href="libdmapsharing-3.0-dmap-connection.html" title="dmap-connection">dmap-connection</a>
+<a class="link" href="DmapImageRecord.html#DmapImageRecord--hash" title="The “hash” property">DmapImageRecord:hash</a>, object property in <a class="link" href="DmapImageRecord.html" title="DmapImageRecord">DmapImageRecord</a>
 </dt>
 <dd></dd>
-<a name="idxK"></a><h3 class="title">K</h3>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dmap-gst-input-stream.html#kill-pipeline" title="kill_pipeline ()">kill_pipeline</a>, user_function in <a class="link" href="libdmapsharing-3.0-dmap-gst-input-stream.html" title="dmap-gst-input-stream">dmap-gst-input-stream</a>
+<a class="link" href="DmapImageRecord.html#DmapImageRecord--large-filesize" title="The “large-filesize” property">DmapImageRecord:large-filesize</a>, object property in <a class="link" href="DmapImageRecord.html" title="DmapImageRecord">DmapImageRecord</a>
 </dt>
 <dd></dd>
-<a name="idxL"></a><h3 class="title">L</h3>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dmap-share.html#login" title="login ()">login</a>, user_function in <a class="link" href="libdmapsharing-3.0-dmap-share.html" title="dmap-share">dmap-share</a>
+<a class="link" href="DmapImageRecord.html#DmapImageRecord--location" title="The “location” property">DmapImageRecord:location</a>, object property in <a class="link" href="DmapImageRecord.html" title="DmapImageRecord">DmapImageRecord</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dmap-share.html#logout" title="logout ()">logout</a>, user_function in <a class="link" href="libdmapsharing-3.0-dmap-share.html" title="dmap-share">dmap-share</a>
+<a class="link" href="DmapImageRecord.html#DmapImageRecord--pixel-height" title="The “pixel-height” property">DmapImageRecord:pixel-height</a>, object property in <a class="link" href="DmapImageRecord.html" title="DmapImageRecord">DmapImageRecord</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dacp-share.html#lookup-guid" title="lookup_guid ()">lookup_guid</a>, user_function in <a class="link" href="libdmapsharing-3.0-dacp-share.html" title="dacp-share">dacp-share</a>
+<a class="link" href="DmapImageRecord.html#DmapImageRecord--pixel-width" title="The “pixel-width” property">DmapImageRecord:pixel-width</a>, object property in <a class="link" href="DmapImageRecord.html" title="DmapImageRecord">DmapImageRecord</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="DmapImageRecord.html#DmapImageRecord--rating" title="The “rating” property">DmapImageRecord:rating</a>, object property in <a class="link" href="DmapImageRecord.html" title="DmapImageRecord">DmapImageRecord</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="DmapImageRecord.html#DmapImageRecord--thumbnail" title="The “thumbnail” property">DmapImageRecord:thumbnail</a>, object property in <a class="link" href="DmapImageRecord.html" title="DmapImageRecord">DmapImageRecord</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="DmapImageConnection.html#dmap-image-connection-new" title="dmap_image_connection_new ()">dmap_image_connection_new</a>, function in <a class="link" href="DmapImageConnection.html" title="DmapImageConnection">DmapImageConnection</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="DmapImageRecord.html#dmap-image-record-read" title="dmap_image_record_read ()">dmap_image_record_read</a>, function in <a class="link" href="DmapImageRecord.html" title="DmapImageRecord">DmapImageRecord</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="DmapImageShare.html#dmap-image-share-new" title="dmap_image_share_new ()">dmap_image_share_new</a>, function in <a class="link" href="DmapImageShare.html" title="DmapImageShare">DmapImageShare</a>
 </dt>
 <dd></dd>
 <a name="idxM"></a><h3 class="title">M</h3>
 <dt>
-<a class="link" href="DMAPMdnsBrowser.html#DMAPMdnsBrowser-struct" title="struct DMAPMdnsBrowser">DMAPMdnsBrowser</a>, struct in <a class="link" href="DMAPMdnsBrowser.html" title="DMAPMdnsBrowser">DMAPMdnsBrowser</a>
+<a class="link" href="libdmapsharing-4.0-dmap-md5.html#dmap-md5-generate" title="dmap_md5_generate ()">dmap_md5_generate</a>, function in <a class="link" href="libdmapsharing-4.0-dmap-md5.html" title="dmap-md5">dmap-md5</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DMAPMdnsBrowser.html#DMAPMdnsBrowser-service-added" title="The “service-added” signal">DMAPMdnsBrowser::service-added</a>, object signal in <a class="link" href="DMAPMdnsBrowser.html" title="DMAPMdnsBrowser">DMAPMdnsBrowser</a>
+<a class="link" href="libdmapsharing-4.0-dmap-md5.html#dmap-md5-progressive-final" title="dmap_md5_progressive_final ()">dmap_md5_progressive_final</a>, function in <a class="link" href="libdmapsharing-4.0-dmap-md5.html" title="dmap-md5">dmap-md5</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DMAPMdnsBrowser.html#DMAPMdnsBrowser-service-removed" title="The “service-removed” signal">DMAPMdnsBrowser::service-removed</a>, object signal in <a class="link" href="DMAPMdnsBrowser.html" title="DMAPMdnsBrowser">DMAPMdnsBrowser</a>
+<a class="link" href="libdmapsharing-4.0-dmap-md5.html#dmap-md5-progressive-init" title="dmap_md5_progressive_init ()">dmap_md5_progressive_init</a>, function in <a class="link" href="libdmapsharing-4.0-dmap-md5.html" title="dmap-md5">dmap-md5</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DMAPMdnsBrowser.html#DMAPMdnsBrowserError" title="enum DMAPMdnsBrowserError">DMAPMdnsBrowserError</a>, enum in <a class="link" href="DMAPMdnsBrowser.html" title="DMAPMdnsBrowser">DMAPMdnsBrowser</a>
+<a class="link" href="libdmapsharing-4.0-dmap-md5.html#dmap-md5-progressive-to-string" title="dmap_md5_progressive_to_string ()">dmap_md5_progressive_to_string</a>, function in <a class="link" href="libdmapsharing-4.0-dmap-md5.html" title="dmap-md5">dmap-md5</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DMAPMdnsBrowser.html#DMAPMdnsBrowserService" title="struct DMAPMdnsBrowserService">DMAPMdnsBrowserService</a>, struct in <a class="link" href="DMAPMdnsBrowser.html" title="DMAPMdnsBrowser">DMAPMdnsBrowser</a>
+<a class="link" href="libdmapsharing-4.0-dmap-md5.html#dmap-md5-progressive-update" title="dmap_md5_progressive_update ()">dmap_md5_progressive_update</a>, function in <a class="link" href="libdmapsharing-4.0-dmap-md5.html" title="dmap-md5">dmap-md5</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DMAPMdnsBrowser.html#DMAPMdnsBrowserServiceType" title="enum DMAPMdnsBrowserServiceType">DMAPMdnsBrowserServiceType</a>, enum in <a class="link" href="DMAPMdnsBrowser.html" title="DMAPMdnsBrowser">DMAPMdnsBrowser</a>
+<a class="link" href="DmapMdnsBrowser.html#DmapMdnsBrowser-struct" title="DmapMdnsBrowser">DmapMdnsBrowser</a>, struct in <a class="link" href="DmapMdnsBrowser.html" title="DmapMdnsBrowser">DmapMdnsBrowser</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DMAPMdnsBrowser.html#DMAPMdnsBrowserTransportProtocol" title="enum DMAPMdnsBrowserTransportProtocol">DMAPMdnsBrowserTransportProtocol</a>, enum in <a class="link" href="DMAPMdnsBrowser.html" title="DMAPMdnsBrowser">DMAPMdnsBrowser</a>
+<a class="link" href="DmapMdnsBrowser.html#DmapMdnsBrowser-service-added" title="The “service-added” signal">DmapMdnsBrowser::service-added</a>, object signal in <a class="link" href="DmapMdnsBrowser.html" title="DmapMdnsBrowser">DmapMdnsBrowser</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DMAPMdnsBrowser.html#DMAP-MDNS-BROWSER-ERROR:CAPS" title="DMAP_MDNS_BROWSER_ERROR">DMAP_MDNS_BROWSER_ERROR</a>, macro in <a class="link" href="DMAPMdnsBrowser.html" title="DMAPMdnsBrowser">DMAPMdnsBrowser</a>
+<a class="link" href="DmapMdnsBrowser.html#DmapMdnsBrowser-service-removed" title="The “service-removed” signal">DmapMdnsBrowser::service-removed</a>, object signal in <a class="link" href="DmapMdnsBrowser.html" title="DmapMdnsBrowser">DmapMdnsBrowser</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DMAPMdnsBrowser.html#dmap-mdns-browser-error-quark" title="dmap_mdns_browser_error_quark ()">dmap_mdns_browser_error_quark</a>, function in <a class="link" href="DMAPMdnsBrowser.html" title="DMAPMdnsBrowser">DMAPMdnsBrowser</a>
+<a class="link" href="DmapMdnsBrowser.html#DmapMdnsBrowserError" title="enum DmapMdnsBrowserError">DmapMdnsBrowserError</a>, enum in <a class="link" href="DmapMdnsBrowser.html" title="DmapMdnsBrowser">DmapMdnsBrowser</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DMAPMdnsBrowser.html#dmap-mdns-browser-get-services" title="dmap_mdns_browser_get_services ()">dmap_mdns_browser_get_services</a>, function in <a class="link" href="DMAPMdnsBrowser.html" title="DMAPMdnsBrowser">DMAPMdnsBrowser</a>
+DmapMdnsPublisher::name-collision, object signal in DmapMdnsPublisher
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DMAPMdnsBrowser.html#dmap-mdns-browser-get-service-type" title="dmap_mdns_browser_get_service_type ()">dmap_mdns_browser_get_service_type</a>, function in <a class="link" href="DMAPMdnsBrowser.html" title="DMAPMdnsBrowser">DMAPMdnsBrowser</a>
+DmapMdnsPublisher::published, object signal in DmapMdnsPublisher
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DMAPMdnsBrowser.html#dmap-mdns-browser-new" title="dmap_mdns_browser_new ()">dmap_mdns_browser_new</a>, function in <a class="link" href="DMAPMdnsBrowser.html" title="DMAPMdnsBrowser">DMAPMdnsBrowser</a>
+DmapMdnsPublisherError, enum in DmapMdnsPublisher
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DMAPMdnsBrowser.html#dmap-mdns-browser-start" title="dmap_mdns_browser_start ()">dmap_mdns_browser_start</a>, function in <a class="link" href="DMAPMdnsBrowser.html" title="DMAPMdnsBrowser">DMAPMdnsBrowser</a>
+<a class="link" href="DmapMdnsService.html#DmapMdnsService--host" title="The “host” property">DmapMdnsService:host</a>, object property in <a class="link" href="DmapMdnsService.html" title="DmapMdnsService">DmapMdnsService</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DMAPMdnsBrowser.html#dmap-mdns-browser-stop" title="dmap_mdns_browser_stop ()">dmap_mdns_browser_stop</a>, function in <a class="link" href="DMAPMdnsBrowser.html" title="DMAPMdnsBrowser">DMAPMdnsBrowser</a>
+<a class="link" href="DmapMdnsService.html#DmapMdnsService--name" title="The “name” property">DmapMdnsService:name</a>, object property in <a class="link" href="DmapMdnsService.html" title="DmapMdnsService">DmapMdnsService</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DMAPRecord.html#DMAPMediaKind" title="enum DMAPMediaKind">DMAPMediaKind</a>, enum in <a class="link" href="DMAPRecord.html" title="DMAPRecord">DMAPRecord</a>
+<a class="link" href="DmapMdnsService.html#DmapMdnsService--pair" title="The “pair” property">DmapMdnsService:pair</a>, object property in <a class="link" href="DmapMdnsService.html" title="DmapMdnsService">DmapMdnsService</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dmap-share.html#message-add-standard-headers" title="message_add_standard_headers ()">message_add_standard_headers</a>, user_function in <a class="link" href="libdmapsharing-3.0-dmap-share.html" title="dmap-share">dmap-share</a>
+<a class="link" href="DmapMdnsService.html#DmapMdnsService--password-protected" title="The “password-protected” property">DmapMdnsService:password-protected</a>, object property in <a class="link" href="DmapMdnsService.html" title="DmapMdnsService">DmapMdnsService</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dmap-share.html#DMAPMetaDataMap" title="DMAPMetaDataMap">DMAPMetaDataMap</a>, typedef in <a class="link" href="libdmapsharing-3.0-dmap-share.html" title="dmap-share">dmap-share</a>
+<a class="link" href="DmapMdnsService.html#DmapMdnsService--port" title="The “port” property">DmapMdnsService:port</a>, object property in <a class="link" href="DmapMdnsService.html" title="DmapMdnsService">DmapMdnsService</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dmap-share.html#MLCL-Bits" title="struct MLCL_Bits">MLCL_Bits</a>, struct in <a class="link" href="libdmapsharing-3.0-dmap-share.html" title="dmap-share">dmap-share</a>
+<a class="link" href="DmapMdnsService.html#DmapMdnsService--service-name" title="The “service-name” property">DmapMdnsService:service-name</a>, object property in <a class="link" href="DmapMdnsService.html" title="DmapMdnsService">DmapMdnsService</a>
 </dt>
 <dd></dd>
-<a name="idxN"></a><h3 class="title">N</h3>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dmap-share.html#name-collision" title="name_collision ()">name_collision</a>, user_function in <a class="link" href="libdmapsharing-3.0-dmap-share.html" title="dmap-share">dmap-share</a>
+<a class="link" href="DmapMdnsService.html#DmapMdnsService--transport-protocol" title="The “transport-protocol” property">DmapMdnsService:transport-protocol</a>, object property in <a class="link" href="DmapMdnsService.html" title="DmapMdnsService">DmapMdnsService</a>
 </dt>
 <dd></dd>
-<a name="idxO"></a><h3 class="title">O</h3>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dmap-connection.html#operation-done" title="operation_done ()">operation_done</a>, user_function in <a class="link" href="libdmapsharing-3.0-dmap-connection.html" title="dmap-connection">dmap-connection</a>
+<a class="link" href="DmapMdnsService.html#DmapMdnsServiceTransportProtocol" title="enum DmapMdnsServiceTransportProtocol">DmapMdnsServiceTransportProtocol</a>, enum in <a class="link" href="DmapMdnsService.html" title="DmapMdnsService">DmapMdnsService</a>
 </dt>
 <dd></dd>
-<a name="idxP"></a><h3 class="title">P</h3>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dmap-share.html#published" title="published ()">published</a>, user_function in <a class="link" href="libdmapsharing-3.0-dmap-share.html" title="dmap-share">dmap-share</a>
+<a class="link" href="DmapMdnsService.html#DmapMdnsServiceType" title="enum DmapMdnsServiceType">DmapMdnsServiceType</a>, enum in <a class="link" href="DmapMdnsService.html" title="DmapMdnsService">DmapMdnsService</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="DmapMdnsBrowser.html#DMAP-MDNS-BROWSER-ERROR:CAPS" title="DMAP_MDNS_BROWSER_ERROR">DMAP_MDNS_BROWSER_ERROR</a>, macro in <a class="link" href="DmapMdnsBrowser.html" title="DmapMdnsBrowser">DmapMdnsBrowser</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="DmapMdnsBrowser.html#dmap-mdns-browser-error-quark" title="dmap_mdns_browser_error_quark ()">dmap_mdns_browser_error_quark</a>, function in <a class="link" href="DmapMdnsBrowser.html" title="DmapMdnsBrowser">DmapMdnsBrowser</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="DmapMdnsBrowser.html#dmap-mdns-browser-get-services" title="dmap_mdns_browser_get_services ()">dmap_mdns_browser_get_services</a>, function in <a class="link" href="DmapMdnsBrowser.html" title="DmapMdnsBrowser">DmapMdnsBrowser</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="DmapMdnsBrowser.html#dmap-mdns-browser-get-service-type" title="dmap_mdns_browser_get_service_type ()">dmap_mdns_browser_get_service_type</a>, function in <a class="link" href="DmapMdnsBrowser.html" title="DmapMdnsBrowser">DmapMdnsBrowser</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="DmapMdnsBrowser.html#dmap-mdns-browser-new" title="dmap_mdns_browser_new ()">dmap_mdns_browser_new</a>, function in <a class="link" href="DmapMdnsBrowser.html" title="DmapMdnsBrowser">DmapMdnsBrowser</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="DmapMdnsBrowser.html#dmap-mdns-browser-start" title="dmap_mdns_browser_start ()">dmap_mdns_browser_start</a>, function in <a class="link" href="DmapMdnsBrowser.html" title="DmapMdnsBrowser">DmapMdnsBrowser</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="DmapMdnsBrowser.html#dmap-mdns-browser-stop" title="dmap_mdns_browser_stop ()">dmap_mdns_browser_stop</a>, function in <a class="link" href="DmapMdnsBrowser.html" title="DmapMdnsBrowser">DmapMdnsBrowser</a>
+</dt>
+<dd></dd>
+<dt>
+DMAP_MDNS_PUBLISHER_ERROR, macro in DmapMdnsPublisher
 </dt>
 <dd></dd>
-<a name="idxR"></a><h3 class="title">R</h3>
 <dt>
-DMAP_READ_UINT16_BE, macro in dmap-private-utils
+dmap_mdns_publisher_error_quark, function in DmapMdnsPublisher
 </dt>
 <dd></dd>
 <dt>
-DMAP_READ_UINT32_BE, macro in dmap-private-utils
+dmap_mdns_publisher_new, function in DmapMdnsPublisher
 </dt>
 <dd></dd>
 <dt>
-DMAP_READ_UINT64_BE, macro in dmap-private-utils
+dmap_mdns_publisher_publish, function in DmapMdnsPublisher
 </dt>
 <dd></dd>
 <dt>
-DMAP_READ_UINT8, macro in dmap-private-utils
+dmap_mdns_publisher_rename_at_port, function in DmapMdnsPublisher
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DMAPDb.html#RecordGetValueFunc" title="RecordGetValueFunc ()">RecordGetValueFunc</a>, user_function in <a class="link" href="DMAPDb.html" title="DMAPDb">DMAPDb</a>
+dmap_mdns_publisher_withdraw, function in DmapMdnsPublisher
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DMAPRecordFactory.html#dmap-record-factory-create" title="dmap_record_factory_create ()">dmap_record_factory_create</a>, function in <a class="link" href="DMAPRecordFactory.html" title="DMAPRecordFactory">DMAPRecordFactory</a>
+<a class="link" href="DmapRecord.html#DmapMediaKind" title="enum DmapMediaKind">DmapMediaKind</a>, enum in <a class="link" href="DmapRecord.html" title="DmapRecord">DmapRecord</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DMAPRecord.html#dmap-record-set-from-blob" title="dmap_record_set_from_blob ()">dmap_record_set_from_blob</a>, function in <a class="link" href="DMAPRecord.html" title="DMAPRecord">DMAPRecord</a>
+<a class="link" href="DmapShare.html#DmapMetaDataMap" title="DmapMetaDataMap">DmapMetaDataMap</a>, typedef in <a class="link" href="DmapShare.html" title="DmapShare">DmapShare</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="DMAPRecord.html#dmap-record-to-blob" title="dmap_record_to_blob ()">dmap_record_to_blob</a>, function in <a class="link" href="DMAPRecord.html" title="DMAPRecord">DMAPRecord</a>
+<a class="link" href="DmapShare.html#DmapMlclBits" title="struct DmapMlclBits">DmapMlclBits</a>, struct in <a class="link" href="DmapShare.html" title="DmapShare">DmapShare</a>
 </dt>
 <dd></dd>
+<a name="idxP"></a><h3 class="title">P</h3>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dacp-share.html#remote-found" title="remote_found ()">remote_found</a>, user_function in <a class="link" href="libdmapsharing-3.0-dacp-share.html" title="dacp-share">dacp-share</a>
+<a class="link" href="DmapConnection.html#DmapPlaylist" title="DmapPlaylist">DmapPlaylist</a>, struct in <a class="link" href="DmapConnection.html" title="DmapConnection">DmapConnection</a>
 </dt>
 <dd></dd>
+<a name="idxR"></a><h3 class="title">R</h3>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dacp-share.html#remote-lost" title="remote_lost ()">remote_lost</a>, user_function in <a class="link" href="libdmapsharing-3.0-dacp-share.html" title="dacp-share">dacp-share</a>
+<a class="link" href="DmapRecordFactory.html#dmap-record-factory-create" title="dmap_record_factory_create ()">dmap_record_factory_create</a>, function in <a class="link" href="DmapRecordFactory.html" title="DmapRecordFactory">DmapRecordFactory</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dacp-share.html#remote-paired" title="remote_paired ()">remote_paired</a>, user_function in <a class="link" href="libdmapsharing-3.0-dacp-share.html" title="dacp-share">dacp-share</a>
+<a class="link" href="DmapRecord.html#dmap-record-set-from-blob" title="dmap_record_set_from_blob ()">dmap_record_set_from_blob</a>, function in <a class="link" href="DmapRecord.html" title="DmapRecord">DmapRecord</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dmap-connection.html#DMAPResponseHandler" title="DMAPResponseHandler ()">DMAPResponseHandler</a>, user_function in <a class="link" href="libdmapsharing-3.0-dmap-connection.html" title="dmap-connection">dmap-connection</a>
+<a class="link" href="DmapRecord.html#dmap-record-to-blob" title="dmap_record_to_blob ()">dmap_record_to_blob</a>, function in <a class="link" href="DmapRecord.html" title="DmapRecord">DmapRecord</a>
 </dt>
 <dd></dd>
 <a name="idxS"></a><h3 class="title">S</h3>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dmap-share.html#server-info" title="server_info ()">server_info</a>, user_function in <a class="link" href="libdmapsharing-3.0-dmap-share.html" title="dmap-share">dmap-share</a>
+<a class="link" href="DmapShare.html#DmapShare-error" title="The “error” signal">DmapShare::error</a>, object signal in <a class="link" href="DmapShare.html" title="DmapShare">DmapShare</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dmap-share.html#dmap-share-free-filter" title="dmap_share_free_filter ()">dmap_share_free_filter</a>, function in <a class="link" href="libdmapsharing-3.0-dmap-share.html" title="dmap-share">dmap-share</a>
+<a class="link" href="DmapShare.html#DmapShare--auth-method" title="The “auth-method” property">DmapShare:auth-method</a>, object property in <a class="link" href="DmapShare.html" title="DmapShare">DmapShare</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dmap-share.html#DMAP-STATUS-OK:CAPS" title="DMAP_STATUS_OK">DMAP_STATUS_OK</a>, macro in <a class="link" href="libdmapsharing-3.0-dmap-share.html" title="dmap-share">dmap-share</a>
+<a class="link" href="DmapShare.html#DmapShare--container-db" title="The “container-db” property">DmapShare:container-db</a>, object property in <a class="link" href="DmapShare.html" title="DmapShare">DmapShare</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="DmapShare.html#DmapShare--db" title="The “db” property">DmapShare:db</a>, object property in <a class="link" href="DmapShare.html" title="DmapShare">DmapShare</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="DmapShare.html#DmapShare--name" title="The “name” property">DmapShare:name</a>, object property in <a class="link" href="DmapShare.html" title="DmapShare">DmapShare</a>
 </dt>
 <dd></dd>
-<a name="idxT"></a><h3 class="title">T</h3>
 <dt>
-TestDAAPRecord:real-format, object property in TestDAAPRecord
+<a class="link" href="DmapShare.html#DmapShare--password" title="The “password” property">DmapShare:password</a>, object property in <a class="link" href="DmapShare.html" title="DmapShare">DmapShare</a>
 </dt>
 <dd></dd>
 <dt>
-dmap_test_daap_connection, function in daap-connection-suite
+<a class="link" href="DmapShare.html#DmapShare--revision-number" title="The “revision-number” property">DmapShare:revision-number</a>, object property in <a class="link" href="DmapShare.html" title="DmapShare">DmapShare</a>
 </dt>
 <dd></dd>
 <dt>
-test_daap_record_factory_new, function in TestDAAPRecordFactory
+<a class="link" href="DmapShare.html#DmapShare--server" title="The “server” property">DmapShare:server</a>, object property in <a class="link" href="DmapShare.html" title="DmapShare">DmapShare</a>
 </dt>
 <dd></dd>
 <dt>
-TEST_DAAP_RECORD_GET_PRIVATE, macro in TestDAAPRecord
+<a class="link" href="DmapShare.html#DmapShare--transcode-mimetype" title="The “transcode-mimetype” property">DmapShare:transcode-mimetype</a>, object property in <a class="link" href="DmapShare.html" title="DmapShare">DmapShare</a>
 </dt>
 <dd></dd>
 <dt>
-test_daap_record_new, function in TestDAAPRecord
+<a class="link" href="DmapShare.html#DmapShare--txt-records" title="The “txt-records” property">DmapShare:txt-records</a>, object property in <a class="link" href="DmapShare.html" title="DmapShare">DmapShare</a>
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="DmapShare.html#DmapShareAuthMethod" title="enum DmapShareAuthMethod">DmapShareAuthMethod</a>, enum in <a class="link" href="DmapShare.html" title="DmapShare">DmapShare</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="DmapShare.html#dmap-share-emit-error" title="dmap_share_emit_error ()">dmap_share_emit_error</a>, function in <a class="link" href="DmapShare.html" title="DmapShare">DmapShare</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="DmapShare.html#dmap-share-free-filter" title="dmap_share_free_filter ()">dmap_share_free_filter</a>, function in <a class="link" href="DmapShare.html" title="DmapShare">DmapShare</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="DmapShare.html#dmap-share-publish" title="dmap_share_publish ()">dmap_share_publish</a>, function in <a class="link" href="DmapShare.html" title="DmapShare">DmapShare</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="DmapShare.html#dmap-share-serve" title="dmap_share_serve ()">dmap_share_serve</a>, function in <a class="link" href="DmapShare.html" title="DmapShare">DmapShare</a>
+</dt>
+<dd></dd>
+<a name="idxT"></a><h3 class="title">T</h3>
+<dt>
 dmap_test_dmap_av_connection, function in dmap-av-connection-suite
 </dt>
 <dd></dd>
@@ -726,29 +799,32 @@ dmap_test_dmap_utils, function in dmap-utils-suite
 </dt>
 <dd></dd>
 <dt>
-test_dpap_record_factory_new, function in TestDPAPRecordFactory
+dmap_transcode_mp3_stream_new, function in DmapTranscodeMp3Stream
 </dt>
 <dd></dd>
 <dt>
-TEST_DPAP_RECORD_GET_PRIVATE, macro in TestDPAPRecord
+dmap_transcode_qt_stream_new, function in DmapTranscodeQtStream
 </dt>
 <dd></dd>
 <dt>
-test_dpap_record_new, function in TestDPAPRecord
+<a class="link" href="DmapTranscodeStream.html#dmap-transcode-stream-new" title="dmap_transcode_stream_new ()">dmap_transcode_stream_new</a>, function in <a class="link" href="DmapTranscodeStream.html" title="DmapTranscodeStream">DmapTranscodeStream</a>
 </dt>
 <dd></dd>
-<a name="idxU"></a><h3 class="title">U</h3>
 <dt>
-<a class="link" href="libdmapsharing-3.0-dmap-share.html#update" title="update ()">update</a>, user_function in <a class="link" href="libdmapsharing-3.0-dmap-share.html" title="dmap-share">dmap-share</a>
+dmap_transcode_stream_private_new_buffer_cb, function in dmap-transcode-stream-private
 </dt>
 <dd></dd>
-<a name="idxW"></a><h3 class="title">W</h3>
 <dt>
-dmap_write_next_chunk, function in dmap-private-utils
+dmap_transcode_wav_stream_new, function in DmapTranscodeWavStream
+</dt>
+<dd></dd>
+<a name="idxU"></a><h3 class="title">U</h3>
+<dt>
+<a class="link" href="libdmapsharing-4.0-dmap-utils.html#dmap-utils-mime-to-format" title="dmap_utils_mime_to_format ()">dmap_utils_mime_to_format</a>, function in <a class="link" href="libdmapsharing-4.0-dmap-utils.html" title="dmap-utils">dmap-utils</a>
 </dt>
 <dd></dd>
 </div>
 <div class="footer">
-<hr>Generated by GTK-Doc V1.32</div>
+<hr>Generated by GTK-Doc V1.33.1</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/doc/html/authenticatecb.html b/doc/html/authenticatecb.html
new file mode 100644
index 0000000..1439de7
--- /dev/null
+++ b/doc/html/authenticatecb.html
@@ -0,0 +1,70 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Authenticate Callback: libdmapsharing Reference Manual</title>
+<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
+<link rel="home" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="up" href="ch02.html" title="Libdmapsharing Browsing Overview">
+<link rel="prev" href="serviceaddedcb.html" title="Service Added Callback">
+<link rel="next" href="errorcb.html" title="Error Callback">
+<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
+<td width="100%" align="left" class="shortcuts"></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
+<td><a accesskey="u" href="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="serviceaddedcb.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="errorcb.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="refentry">
+<a name="authenticatecb"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle">Authenticate Callback</span></h2>
+<p>Authenticate Callback — 
+			Defining an Authenticate Callback
+		</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="id-1.3.6.3"></a><h2>Authenticate Callback</h2>
+<p>
+The "authenticate" callback allows a program to prompt for an authentication token
+after receiving an indication from a DMAP server that authentication is required.
+Once it receives the authentication token, the callback should call
+dmap_connection_authenticate_message.
+		</p>
+<p>
+The following is a simple "authenticate" callback:
+
+		</p>
+<pre class="screen">
+static void
+authenticate_cb(DmapConnection *connection,
+                const char     *name,
+                SoupSession    *session,
+                SoupMessage    *msg,
+                SoupAuth       *auth,
+                gboolean        retrying,
+                gpointer        user_data)
+{
+	char *username, password[BUFSIZ + 1];
+	g_object_get (connection, "username", &amp;username, NULL);
+	fgets (password, BUFSIZ, stdin);
+	password[strlen(password) - 1] = 0x00; /* Remove newline. */
+
+	dmap_connection_authenticate_message(connection, session, msg, auth, password);
+
+	g_free(username);
+}
+		</pre>
+</div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.33.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/browserapi.html b/doc/html/browserapi.html
new file mode 100644
index 0000000..c3aea52
--- /dev/null
+++ b/doc/html/browserapi.html
@@ -0,0 +1,55 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>mDNS Browser API: libdmapsharing Reference Manual</title>
+<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
+<link rel="home" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="up" href="ch02.html" title="Libdmapsharing Browsing Overview">
+<link rel="prev" href="containerdb.html" title="Container Database Implementation">
+<link rel="next" href="serviceaddedcb.html" title="Service Added Callback">
+<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
+<td width="100%" align="left" class="shortcuts"></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
+<td><a accesskey="u" href="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="containerdb.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="serviceaddedcb.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="refentry">
+<a name="browserapi"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle">mDNS Browser API</span></h2>
+<p>mDNS Browser API — 
+			Using the mDNS browser API
+		</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="id-1.3.4.3"></a><h2>mDNS Browser API</h2>
+<p>
+The mDNS browser API allows a client program to discover and connect to
+DMAP services.  The dmap_mdns_browser_new function creates a new mDNS
+browser object. Passing DMAP_MDNS_SERVICE_TYPE_DAAP to this function
+results in a DAAP browser, and passing DMAP_MDNS_SERVICE_TYPE_DPAP results in
+a DPAP browser. Subsequently calling dmap_mdns_browser_start and g_main_loop_run
+causes the browser to begin watching for services of the appropriate type.
+
+		</p>
+<p>
+The mDNS browser object emits a "service-added" signal for each
+DMAP service encountered, and it emits a "service-remove" signal when
+a service disappears. We describe these callbacks in the next sections.
+
+		</p>
+</div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.33.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/ch01.html b/doc/html/ch01.html
index ada6137..f137055 100644
--- a/doc/html/ch01.html
+++ b/doc/html/ch01.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>Libdmapsharing overview: libdmapsharing-3.0 Reference Manual</title>
+<title>Libdmapsharing Sharing Overview: libdmapsharing Reference Manual</title>
 <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
-<link rel="home" href="index.html" title="libdmapsharing-3.0 Reference Manual">
-<link rel="up" href="index.html" title="libdmapsharing-3.0 Reference Manual">
-<link rel="prev" href="index.html" title="libdmapsharing-3.0 Reference Manual">
-<link rel="next" href="libdmapsharing-3.0-daap-connection.html" title="daap-connection">
-<meta name="generator" content="GTK-Doc V1.32 (XML mode)">
+<link rel="home" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="up" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="prev" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="next" href="mediadb.html" title="Media Database Implementation">
+<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -17,78 +17,30 @@
 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
 <td><img src="up-insensitive.png" width="16" height="16" border="0"></td>
 <td><a accesskey="p" href="index.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="libdmapsharing-3.0-daap-connection.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+<td><a accesskey="n" href="mediadb.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
 </tr></table>
 <div class="chapter">
 <div class="titlepage"><div><div><h1 class="title">
-<a name="id-1.2"></a>Libdmapsharing overview</h1></div></div></div>
+<a name="id-1.2"></a>Libdmapsharing Sharing Overview</h1></div></div></div>
 <div class="toc"><dl class="toc">
 <dt>
-<span class="refentrytitle"><a href="libdmapsharing-3.0-daap-connection.html">daap-connection</a></span><span class="refpurpose"></span>
+<span class="refentrytitle"><a href="mediadb.html">Media Database Implementation</a></span><span class="refpurpose"> — 
+			Implementing a media database
+		</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="DAAPRecord.html">DAAPRecord</a></span><span class="refpurpose"></span>
+<span class="refentrytitle"><a href="containerdb.html">Container Database Implementation</a></span><span class="refpurpose"> — 
+			Implementing a container database
+		</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="libdmapsharing-3.0-daap-share.html">daap-share</a></span><span class="refpurpose"></span>
-</dt>
-<dt>
-<span class="refentrytitle"><a href="libdmapsharing-3.0-dacp-connection.html">dacp-connection</a></span><span class="refpurpose"></span>
-</dt>
-<dt>
-<span class="refentrytitle"><a href="DACPPlayer.html">DACPPlayer</a></span><span class="refpurpose"></span>
-</dt>
-<dt>
-<span class="refentrytitle"><a href="libdmapsharing-3.0-dacp-share.html">dacp-share</a></span><span class="refpurpose"></span>
-</dt>
-<dt>
-<span class="refentrytitle"><a href="libdmapsharing-3.0-dmap-connection.html">dmap-connection</a></span><span class="refpurpose"></span>
-</dt>
-<dt>
-<span class="refentrytitle"><a href="DMAPContainerDb.html">DMAPContainerDb</a></span><span class="refpurpose"></span>
-</dt>
-<dt>
-<span class="refentrytitle"><a href="DMAPContainerRecord.html">DMAPContainerRecord</a></span><span class="refpurpose"></span>
-</dt>
-<dt>
-<span class="refentrytitle"><a href="DMAPDb.html">DMAPDb</a></span><span class="refpurpose"></span>
-</dt>
-<dt>
-<span class="refentrytitle"><a href="libdmapsharing-3.0-dmap-enums.html">dmap-enums</a></span><span class="refpurpose"></span>
-</dt>
-<dt>
-<span class="refentrytitle"><a href="libdmapsharing-3.0-dmap-gst-input-stream.html">dmap-gst-input-stream</a></span><span class="refpurpose"></span>
-</dt>
-<dt>
-<span class="refentrytitle"><a href="libdmapsharing-3.0-dmap-gst-mp3-input-stream.html">dmap-gst-mp3-input-stream</a></span><span class="refpurpose"></span>
-</dt>
-<dt>
-<span class="refentrytitle"><a href="libdmapsharing-3.0-dmap-gst-wav-input-stream.html">dmap-gst-wav-input-stream</a></span><span class="refpurpose"></span>
-</dt>
-<dt>
-<span class="refentrytitle"><a href="DMAPMdnsBrowser.html">DMAPMdnsBrowser</a></span><span class="refpurpose"></span>
-</dt>
-<dt>
-<span class="refentrytitle"><a href="DMAPRecord.html">DMAPRecord</a></span><span class="refpurpose"></span>
-</dt>
-<dt>
-<span class="refentrytitle"><a href="DMAPRecordFactory.html">DMAPRecordFactory</a></span><span class="refpurpose"></span>
-</dt>
-<dt>
-<span class="refentrytitle"><a href="libdmapsharing-3.0-dmap-share.html">dmap-share</a></span><span class="refpurpose"></span>
-</dt>
-<dt>
-<span class="refentrytitle"><a href="libdmapsharing-3.0-dpap-connection.html">dpap-connection</a></span><span class="refpurpose"></span>
-</dt>
-<dt>
-<span class="refentrytitle"><a href="DPAPRecord.html">DPAPRecord</a></span><span class="refpurpose"></span>
-</dt>
-<dt>
-<span class="refentrytitle"><a href="libdmapsharing-3.0-dpap-share.html">dpap-share</a></span><span class="refpurpose"></span>
+<span class="refentrytitle"><a href="shareapi.html">Share API</a></span><span class="refpurpose"> — 
+			Using the share API
+		</span>
 </dt>
 </dl></div>
 </div>
 <div class="footer">
-<hr>Generated by GTK-Doc V1.32</div>
+<hr>Generated by GTK-Doc V1.33.1</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/doc/html/ch02.html b/doc/html/ch02.html
new file mode 100644
index 0000000..df4955a
--- /dev/null
+++ b/doc/html/ch02.html
@@ -0,0 +1,66 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Libdmapsharing Browsing Overview: libdmapsharing Reference Manual</title>
+<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
+<link rel="home" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="up" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="prev" href="shareapi.html" title="Share API">
+<link rel="next" href="mediadb.html" title="Media Database Implementation">
+<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
+<td width="100%" align="left" class="shortcuts"></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
+<td><img src="up-insensitive.png" width="16" height="16" border="0"></td>
+<td><a accesskey="p" href="shareapi.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="mediadb.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="chapter">
+<div class="titlepage"><div><div><h1 class="title">
+<a name="id-1.3"></a>Libdmapsharing Browsing Overview</h1></div></div></div>
+<div class="toc"><dl class="toc">
+<dt>
+<span class="refentrytitle"><a href="mediadb.html">Media Database Implementation</a></span><span class="refpurpose"> — 
+			Implementing a media database
+		</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="containerdb.html">Container Database Implementation</a></span><span class="refpurpose"> — 
+			Implementing a container database
+		</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="browserapi.html">mDNS Browser API</a></span><span class="refpurpose"> — 
+			Using the mDNS browser API
+		</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="serviceaddedcb.html">Service Added Callback</a></span><span class="refpurpose"> — 
+			Defining a Service Added Callback
+		</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="authenticatecb.html">Authenticate Callback</a></span><span class="refpurpose"> — 
+			Defining an Authenticate Callback
+		</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="errorcb.html">Error Callback</a></span><span class="refpurpose"> — 
+			Defining an Error Callback
+		</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="connectedcb.html">Connected Callback</a></span><span class="refpurpose"> — 
+			Defining a Connected Callback
+		</span>
+</dt>
+</dl></div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.33.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/ch03.html b/doc/html/ch03.html
new file mode 100644
index 0000000..0dc5363
--- /dev/null
+++ b/doc/html/ch03.html
@@ -0,0 +1,46 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Libdmapsharing Internals: libdmapsharing Reference Manual</title>
+<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
+<link rel="home" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="up" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="prev" href="connectedcb.html" title="Connected Callback">
+<link rel="next" href="coding-standards.html" title="Libdmapsharing Coding Standards">
+<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
+<td width="100%" align="left" class="shortcuts"></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
+<td><img src="up-insensitive.png" width="16" height="16" border="0"></td>
+<td><a accesskey="p" href="connectedcb.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="coding-standards.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="chapter">
+<div class="titlepage"><div><div><h1 class="title">
+<a name="id-1.4"></a>Libdmapsharing Internals</h1></div></div></div>
+<div class="toc"><dl class="toc">
+<dt>
+<span class="refentrytitle"><a href="coding-standards.html">Libdmapsharing Coding Standards</a></span><span class="refpurpose"> — 
+			Description of libdmapsharing's coding standards
+		</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="server-internals.html">Libdmapsharing Server Internals</a></span><span class="refpurpose"> — 
+			Description of libdmapsharing's internal server code
+		</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="client-internals.html">Libdmapsharing Client Internals</a></span><span class="refpurpose"> — 
+			Description of libdmapsharing's internal client code
+		</span>
+</dt>
+</dl></div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.33.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/ch04.html b/doc/html/ch04.html
new file mode 100644
index 0000000..ed0ae96
--- /dev/null
+++ b/doc/html/ch04.html
@@ -0,0 +1,100 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Libdmapsharing Objects and Interfaces: libdmapsharing Reference Manual</title>
+<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
+<link rel="home" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="up" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="prev" href="client-internals.html" title="Libdmapsharing Client Internals">
+<link rel="next" href="DmapAvConnection.html" title="DmapAvConnection">
+<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
+<td width="100%" align="left" class="shortcuts"></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
+<td><img src="up-insensitive.png" width="16" height="16" border="0"></td>
+<td><a accesskey="p" href="client-internals.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="DmapAvConnection.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="chapter">
+<div class="titlepage"><div><div><h1 class="title">
+<a name="id-1.5"></a>Libdmapsharing Objects and Interfaces</h1></div></div></div>
+<div class="toc"><dl class="toc">
+<dt>
+<span class="refentrytitle"><a href="DmapAvConnection.html">DmapAvConnection</a></span><span class="refpurpose"> — A DAAP connection.</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="DmapAvRecord.html">DmapAvRecord</a></span><span class="refpurpose"> — The description of an item shared using DAAP.</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="DmapAvShare.html">DmapAvShare</a></span><span class="refpurpose"> — A DAAP share.</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="libdmapsharing-4.0-dmap-cc.html">dmap-cc</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="DmapConnection.html">DmapConnection</a></span><span class="refpurpose"> — An abstract parent to the various connection classes.</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="DmapContainerDb.html">DmapContainerDb</a></span><span class="refpurpose"> — An interface for DMAP container databases.</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="DmapContainerRecord.html">DmapContainerRecord</a></span><span class="refpurpose"> — The description of an item shared using DACP.</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="DmapControlConnection.html">DmapControlConnection</a></span><span class="refpurpose"> — A DACP connection.</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="DmapControlPlayer.html">DmapControlPlayer</a></span><span class="refpurpose"> — An interface for media controllers.</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="DmapControlShare.html">DmapControlShare</a></span><span class="refpurpose"> — A DACP share.</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="DmapDb.html">DmapDb</a></span><span class="refpurpose"> — An interface for DMAP databases.</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="libdmapsharing-4.0-dmap-enums.html">dmap-enums</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="DmapTranscodeStream.html">DmapTranscodeStream</a></span><span class="refpurpose"> — A transcoding <span class="type">GInputStream</span> wrapper.</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="DmapImageConnection.html">DmapImageConnection</a></span><span class="refpurpose"> — A DPAP connection.</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="DmapImageRecord.html">DmapImageRecord</a></span><span class="refpurpose"> — The description of an item shared using DPAP.</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="DmapImageShare.html">DmapImageShare</a></span><span class="refpurpose"> — A DPAP share.</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="libdmapsharing-4.0-dmap-md5.html">dmap-md5</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="DmapMdnsBrowser.html">DmapMdnsBrowser</a></span><span class="refpurpose"> — An mDNS browser.</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="DmapMdnsService.html">DmapMdnsService</a></span><span class="refpurpose"> — An mDNS service.</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="DmapRecordFactory.html">DmapRecordFactory</a></span><span class="refpurpose"> — A factory for DmapRecord objects.</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="DmapRecord.html">DmapRecord</a></span><span class="refpurpose"> — An abstract parent to the various record classes.</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="DmapShare.html">DmapShare</a></span><span class="refpurpose"> — An abstract parent to the various share classes.</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="libdmapsharing-4.0-dmap-utils.html">dmap-utils</a></span><span class="refpurpose"></span>
+</dt>
+</dl></div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.33.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/client-internals.html b/doc/html/client-internals.html
new file mode 100644
index 0000000..94bcd73
--- /dev/null
+++ b/doc/html/client-internals.html
@@ -0,0 +1,60 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Libdmapsharing Client Internals: libdmapsharing Reference Manual</title>
+<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
+<link rel="home" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="up" href="ch03.html" title="Libdmapsharing Internals">
+<link rel="prev" href="server-internals.html" title="Libdmapsharing Server Internals">
+<link rel="next" href="ch04.html" title="Libdmapsharing Objects and Interfaces">
+<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
+<td width="100%" align="left" class="shortcuts"></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
+<td><a accesskey="u" href="ch03.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="server-internals.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="ch04.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="refentry">
+<a name="client-internals"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle">Libdmapsharing Client Internals</span></h2>
+<p>Libdmapsharing Client Internals — 
+			Description of libdmapsharing's internal client code
+		</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="id-1.4.4.3"></a><h2>Libdmapsharing Client Internals</h2>
+<p>
+The DMAPMdnsBrowser class allows for asynchronous interaction with a DMAP
+server using mDNS.
+		
+		</p>
+<p>
+The DmapConnection class's dmap_connection_start sets up a connection to a
+DMAP server using libsoup, stores the application-provided callback, sets
+the connection state to DMAP_GET_INFO, adds dmap_connection_do_something
+as a GLib loop idle function, and connects the function _connected_cb
+to the "operation-done" signal. The connection state progresses
+from DMAP_GET_INFO to DMAP_GET_PASSWORD then DMAP_LOGIN then
+DMAP_GET_REVISION_NUMBER then DMAP_GET_DB_INFO then DMAP_GET_MEDIA
+then DMAP_GET_PLAYLISTS then (possibly) DMAP_GET_PLAYLIST_ENTRIES. Each
+time the state changes, dmap_connection_do_something executes as an idle
+function. By the time these state transitions are complete, DMAPConnection
+has populated the media database. The _connected_cb function, in turn,
+executes the application-provided callback.
+
+		</p>
+</div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.33.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/coding-standards.html b/doc/html/coding-standards.html
new file mode 100644
index 0000000..9a2a9e8
--- /dev/null
+++ b/doc/html/coding-standards.html
@@ -0,0 +1,94 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Libdmapsharing Coding Standards: libdmapsharing Reference Manual</title>
+<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
+<link rel="home" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="up" href="ch03.html" title="Libdmapsharing Internals">
+<link rel="prev" href="ch03.html" title="Libdmapsharing Internals">
+<link rel="next" href="server-internals.html" title="Libdmapsharing Server Internals">
+<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
+<td width="100%" align="left" class="shortcuts"></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
+<td><a accesskey="u" href="ch03.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="ch03.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="server-internals.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="refentry">
+<a name="coding-standards"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle">Libdmapsharing Coding Standards</span></h2>
+<p>Libdmapsharing Coding Standards — 
+			Description of libdmapsharing's coding standards
+		</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="id-1.4.2.3"></a><h2>Libdmapsharing Coding Standards</h2>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem">Use tabs to indent</li>
+<li class="listitem">Use spaces to align</li>
+<li class="listitem">Attempt to limit lines to 80 characters</li>
+<li class="listitem">Use whitespace to keep expressions clear:
+<pre class="programlisting">
+int foo = x + 1 - bar (y);
+</pre>
+</li>
+<li class="listitem">In order to protect against an accidental use of assignment in a Boolean expression, use:
+<pre class="programlisting">if (CONSTANT == variable)</pre>
+	not: 
+<pre class="programlisting">if (variable == CONSTANT)</pre>
+</li>
+<li class="listitem">Braces should be formatted as follows:
+<pre class="programlisting">
+if (foo) {
+	something ();
+}
+</pre>
+	or, in the case of function definitions:
+<pre class="programlisting">
+void foo (void)
+{
+	something ();
+}
+</pre>
+</li>
+<li class="listitem">Place a semicolon following function-like preprocessor macros because the lack of one might confuse tools such as <span class="application">indent</span> (even if the semicolon is actually repetitive):
+<pre class="programlisting">
+CPPFUNC(foo);
+</pre>
+</li>
+<li class="listitem">Perform a Git commit after finishing a single
+	task</li>
+<li class="listitem">Patches submitted should perform one task (e.g.,
+	don't add functionality and reformat existing code in the same
+	patch)</li>
+<li class="listitem">Git commit messages should be of the following form:
+<div class="literallayout"><p>single line summary with no period<br>
+<br>
+Optional detailed description. This should use paragraph grammar,<br>
+including periods. This may be any number of lines long. Paragraphs are<br>
+separated by an empty line but are not indented. Lines are less than 80<br>
+characters long.<br>
+</p></div>
+</li>
+<li class="listitem">Use GObject conventions for things not covered here</li>
+<li class="listitem">You may use the following indent command to format libdmapsharing code:
+<pre class="programlisting">
+indent -i8 -bad -bap -br -ce -d0 -ndj -lp -pcs -psl -sc -sob foo.c
+</pre>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.33.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/connectedcb.html b/doc/html/connectedcb.html
new file mode 100644
index 0000000..ec1207d
--- /dev/null
+++ b/doc/html/connectedcb.html
@@ -0,0 +1,57 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Connected Callback: libdmapsharing Reference Manual</title>
+<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
+<link rel="home" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="up" href="ch02.html" title="Libdmapsharing Browsing Overview">
+<link rel="prev" href="errorcb.html" title="Error Callback">
+<link rel="next" href="ch03.html" title="Libdmapsharing Internals">
+<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
+<td width="100%" align="left" class="shortcuts"></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
+<td><a accesskey="u" href="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="errorcb.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="ch03.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="refentry">
+<a name="connectedcb"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle">Connected Callback</span></h2>
+<p>Connected Callback — 
+			Defining a Connected Callback
+		</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="id-1.3.8.3"></a><h2>Connected Callback</h2>
+<p>
+Once the DmapConnection object completes its interrogation of a DMAP
+server, it will emit the "connected" signal. Libdmapsharing has fully
+populated the DmapConnection's DmapDb by this point. The following is
+a simple "connected" callback which assumes db had previously been passed as the
+third argument to dmap_connection_start:
+
+		</p>
+<pre class="screen">
+static void
+connected_cb(DmapConnection *connection, gboolean result, const char *reason, DmapDb *db)
+{
+	g_print ("DB has %lu entries\n", dmap_db_count (db));
+	dmap_db_foreach (db, print_record, NULL);
+	g_main_loop_quit (loop);
+}
+		</pre>
+</div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.33.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/containerdb.html b/doc/html/containerdb.html
new file mode 100644
index 0000000..4ef9fb8
--- /dev/null
+++ b/doc/html/containerdb.html
@@ -0,0 +1,49 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Container Database Implementation: libdmapsharing Reference Manual</title>
+<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
+<link rel="home" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="up" href="ch02.html" title="Libdmapsharing Browsing Overview">
+<link rel="prev" href="mediadb.html" title="Media Database Implementation">
+<link rel="next" href="browserapi.html" title="mDNS Browser API">
+<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
+<td width="100%" align="left" class="shortcuts"></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
+<td><a accesskey="u" href="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="mediadb.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="browserapi.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="refentry">
+<a name="containerdb"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle">Container Database Implementation</span></h2>
+<p>Container Database Implementation — 
+			Implementing a container database
+		</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="id-1.3.3.3"></a><h2>Container Database Implementation</h2>
+<p>
+A program can collect media database records in a container database,
+allowing logical playlists (DAAP) or albums (DPAP).
+Creating a container database is a matter of implementing
+the DmapContainerDb and DmapContainerRecord interfaces. For an
+example of this, see libdmapsharing's test-dmap-container-db.c and
+test-dmap-container-record.c.
+
+		</p>
+</div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.33.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/errorcb.html b/doc/html/errorcb.html
new file mode 100644
index 0000000..782632c
--- /dev/null
+++ b/doc/html/errorcb.html
@@ -0,0 +1,56 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Error Callback: libdmapsharing Reference Manual</title>
+<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
+<link rel="home" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="up" href="ch02.html" title="Libdmapsharing Browsing Overview">
+<link rel="prev" href="authenticatecb.html" title="Authenticate Callback">
+<link rel="next" href="connectedcb.html" title="Connected Callback">
+<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
+<td width="100%" align="left" class="shortcuts"></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
+<td><a accesskey="u" href="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="authenticatecb.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="connectedcb.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="refentry">
+<a name="errorcb"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle">Error Callback</span></h2>
+<p>Error Added Callback — 
+			Defining an Error Callback
+		</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="id-1.3.7.3"></a><h2>Error Callback</h2>
+<p>
+The "error" callback handles errors which might occur while executing the libdmapsharing
+mainloop. The parameters are a DmapConnection, GError, and pointer to user data.
+
+		</p>
+<p>
+The following is a simple "error" callback:
+
+		</p>
+<pre class="screen">
+static void
+error_cb(DmapConnection *connection, GError *error, gpointer user_data)
+{
+	fprintf(stderr, "%s\n", error-&gt;message);
+}
+		</pre>
+</div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.33.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/index.html b/doc/html/index.html
index 79ffba9..e4b6ce3 100644
--- a/doc/html/index.html
+++ b/doc/html/index.html
@@ -2,91 +2,171 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>libdmapsharing-3.0 Reference Manual: libdmapsharing-3.0 Reference Manual</title>
+<title>libdmapsharing Reference Manual: libdmapsharing Reference Manual</title>
 <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
-<link rel="home" href="index.html" title="libdmapsharing-3.0 Reference Manual">
-<link rel="next" href="ch01.html" title="Libdmapsharing overview">
-<meta name="generator" content="GTK-Doc V1.32 (XML mode)">
+<link rel="home" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="next" href="ch01.html" title="Libdmapsharing Sharing Overview">
+<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 <div class="book">
 <div class="titlepage">
 <div>
-<div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">libdmapsharing-3.0 Reference Manual</p></th></tr></table></div>
+<div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">libdmapsharing Reference Manual</p></th></tr></table></div>
 <div><p class="releaseinfo">
-      for libdmapsharing 2.9.30.
-      The latest version of this documentation can be found online at
-      <a class="ulink" href="https://www.flyn.org/projects/libdmapsharing/doc/" target="_top">https://www.flyn.org/projects/libdmapsharing/doc/</a>.
+      for libdmapsharing 3.0
+      The latest version of this documentation can be found on-line at
+      <a class="ulink" href="http://www.flyn.org/projects/libdmapsharing/doc/" target="_top">http://www.flyn.org/projects/libdmapsharing/doc/</a>.
     </p></div>
 </div>
 <hr>
 </div>
 <div class="toc"><dl class="toc">
-<dt><span class="chapter"><a href="ch01.html">Libdmapsharing overview</a></span></dt>
+<dt><span class="chapter"><a href="ch01.html">Libdmapsharing Sharing Overview</a></span></dt>
 <dd><dl>
 <dt>
-<span class="refentrytitle"><a href="libdmapsharing-3.0-daap-connection.html">daap-connection</a></span><span class="refpurpose"></span>
+<span class="refentrytitle"><a href="mediadb.html">Media Database Implementation</a></span><span class="refpurpose"> — 
+			Implementing a media database
+		</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="DAAPRecord.html">DAAPRecord</a></span><span class="refpurpose"></span>
+<span class="refentrytitle"><a href="containerdb.html">Container Database Implementation</a></span><span class="refpurpose"> — 
+			Implementing a container database
+		</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="libdmapsharing-3.0-daap-share.html">daap-share</a></span><span class="refpurpose"></span>
+<span class="refentrytitle"><a href="shareapi.html">Share API</a></span><span class="refpurpose"> — 
+			Using the share API
+		</span>
+</dt>
+</dl></dd>
+<dt><span class="chapter"><a href="ch02.html">Libdmapsharing Browsing Overview</a></span></dt>
+<dd><dl>
+<dt>
+<span class="refentrytitle"><a href="mediadb.html">Media Database Implementation</a></span><span class="refpurpose"> — 
+			Implementing a media database
+		</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="containerdb.html">Container Database Implementation</a></span><span class="refpurpose"> — 
+			Implementing a container database
+		</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="browserapi.html">mDNS Browser API</a></span><span class="refpurpose"> — 
+			Using the mDNS browser API
+		</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="serviceaddedcb.html">Service Added Callback</a></span><span class="refpurpose"> — 
+			Defining a Service Added Callback
+		</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="authenticatecb.html">Authenticate Callback</a></span><span class="refpurpose"> — 
+			Defining an Authenticate Callback
+		</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="errorcb.html">Error Callback</a></span><span class="refpurpose"> — 
+			Defining an Error Callback
+		</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="connectedcb.html">Connected Callback</a></span><span class="refpurpose"> — 
+			Defining a Connected Callback
+		</span>
+</dt>
+</dl></dd>
+<dt><span class="chapter"><a href="ch03.html">Libdmapsharing Internals</a></span></dt>
+<dd><dl>
+<dt>
+<span class="refentrytitle"><a href="coding-standards.html">Libdmapsharing Coding Standards</a></span><span class="refpurpose"> — 
+			Description of libdmapsharing's coding standards
+		</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="server-internals.html">Libdmapsharing Server Internals</a></span><span class="refpurpose"> — 
+			Description of libdmapsharing's internal server code
+		</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="client-internals.html">Libdmapsharing Client Internals</a></span><span class="refpurpose"> — 
+			Description of libdmapsharing's internal client code
+		</span>
+</dt>
+</dl></dd>
+<dt><span class="chapter"><a href="ch04.html">Libdmapsharing Objects and Interfaces</a></span></dt>
+<dd><dl>
+<dt>
+<span class="refentrytitle"><a href="DmapAvConnection.html">DmapAvConnection</a></span><span class="refpurpose"> — A DAAP connection.</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="DmapAvRecord.html">DmapAvRecord</a></span><span class="refpurpose"> — The description of an item shared using DAAP.</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="DmapAvShare.html">DmapAvShare</a></span><span class="refpurpose"> — A DAAP share.</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="libdmapsharing-4.0-dmap-cc.html">dmap-cc</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="DmapConnection.html">DmapConnection</a></span><span class="refpurpose"> — An abstract parent to the various connection classes.</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="libdmapsharing-3.0-dacp-connection.html">dacp-connection</a></span><span class="refpurpose"></span>
+<span class="refentrytitle"><a href="DmapContainerDb.html">DmapContainerDb</a></span><span class="refpurpose"> — An interface for DMAP container databases.</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="DACPPlayer.html">DACPPlayer</a></span><span class="refpurpose"></span>
+<span class="refentrytitle"><a href="DmapContainerRecord.html">DmapContainerRecord</a></span><span class="refpurpose"> — The description of an item shared using DACP.</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="libdmapsharing-3.0-dacp-share.html">dacp-share</a></span><span class="refpurpose"></span>
+<span class="refentrytitle"><a href="DmapControlConnection.html">DmapControlConnection</a></span><span class="refpurpose"> — A DACP connection.</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="libdmapsharing-3.0-dmap-connection.html">dmap-connection</a></span><span class="refpurpose"></span>
+<span class="refentrytitle"><a href="DmapControlPlayer.html">DmapControlPlayer</a></span><span class="refpurpose"> — An interface for media controllers.</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="DMAPContainerDb.html">DMAPContainerDb</a></span><span class="refpurpose"></span>
+<span class="refentrytitle"><a href="DmapControlShare.html">DmapControlShare</a></span><span class="refpurpose"> — A DACP share.</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="DMAPContainerRecord.html">DMAPContainerRecord</a></span><span class="refpurpose"></span>
+<span class="refentrytitle"><a href="DmapDb.html">DmapDb</a></span><span class="refpurpose"> — An interface for DMAP databases.</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="DMAPDb.html">DMAPDb</a></span><span class="refpurpose"></span>
+<span class="refentrytitle"><a href="libdmapsharing-4.0-dmap-enums.html">dmap-enums</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="libdmapsharing-3.0-dmap-enums.html">dmap-enums</a></span><span class="refpurpose"></span>
+<span class="refentrytitle"><a href="DmapTranscodeStream.html">DmapTranscodeStream</a></span><span class="refpurpose"> — A transcoding <span class="type">GInputStream</span> wrapper.</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="libdmapsharing-3.0-dmap-gst-input-stream.html">dmap-gst-input-stream</a></span><span class="refpurpose"></span>
+<span class="refentrytitle"><a href="DmapImageConnection.html">DmapImageConnection</a></span><span class="refpurpose"> — A DPAP connection.</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="libdmapsharing-3.0-dmap-gst-mp3-input-stream.html">dmap-gst-mp3-input-stream</a></span><span class="refpurpose"></span>
+<span class="refentrytitle"><a href="DmapImageRecord.html">DmapImageRecord</a></span><span class="refpurpose"> — The description of an item shared using DPAP.</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="libdmapsharing-3.0-dmap-gst-wav-input-stream.html">dmap-gst-wav-input-stream</a></span><span class="refpurpose"></span>
+<span class="refentrytitle"><a href="DmapImageShare.html">DmapImageShare</a></span><span class="refpurpose"> — A DPAP share.</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="DMAPMdnsBrowser.html">DMAPMdnsBrowser</a></span><span class="refpurpose"></span>
+<span class="refentrytitle"><a href="libdmapsharing-4.0-dmap-md5.html">dmap-md5</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="DMAPRecord.html">DMAPRecord</a></span><span class="refpurpose"></span>
+<span class="refentrytitle"><a href="DmapMdnsBrowser.html">DmapMdnsBrowser</a></span><span class="refpurpose"> — An mDNS browser.</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="DMAPRecordFactory.html">DMAPRecordFactory</a></span><span class="refpurpose"></span>
+<span class="refentrytitle"><a href="DmapMdnsService.html">DmapMdnsService</a></span><span class="refpurpose"> — An mDNS service.</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="libdmapsharing-3.0-dmap-share.html">dmap-share</a></span><span class="refpurpose"></span>
+<span class="refentrytitle"><a href="DmapRecordFactory.html">DmapRecordFactory</a></span><span class="refpurpose"> — A factory for DmapRecord objects.</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="libdmapsharing-3.0-dpap-connection.html">dpap-connection</a></span><span class="refpurpose"></span>
+<span class="refentrytitle"><a href="DmapRecord.html">DmapRecord</a></span><span class="refpurpose"> — An abstract parent to the various record classes.</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="DPAPRecord.html">DPAPRecord</a></span><span class="refpurpose"></span>
+<span class="refentrytitle"><a href="DmapShare.html">DmapShare</a></span><span class="refpurpose"> — An abstract parent to the various share classes.</span>
 </dt>
 <dt>
-<span class="refentrytitle"><a href="libdmapsharing-3.0-dpap-share.html">dpap-share</a></span><span class="refpurpose"></span>
+<span class="refentrytitle"><a href="libdmapsharing-4.0-dmap-utils.html">dmap-utils</a></span><span class="refpurpose"></span>
 </dt>
 </dl></dd>
 <dt><span class="chapter"><a href="object-tree.html">Object Hierarchy</a></span></dt>
@@ -95,6 +175,6 @@
 </dl></div>
 </div>
 <div class="footer">
-<hr>Generated by GTK-Doc V1.32</div>
+<hr>Generated by GTK-Doc V1.33.1</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/doc/html/libdmapsharing-3.0-daap-connection.html b/doc/html/libdmapsharing-3.0-daap-connection.html
deleted file mode 100644
index 2e551e6..0000000
--- a/doc/html/libdmapsharing-3.0-daap-connection.html
+++ /dev/null
@@ -1,70 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>daap-connection: libdmapsharing-3.0 Reference Manual</title>
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
-<link rel="home" href="index.html" title="libdmapsharing-3.0 Reference Manual">
-<link rel="up" href="ch01.html" title="Libdmapsharing overview">
-<link rel="prev" href="ch01.html" title="Libdmapsharing overview">
-<link rel="next" href="DAAPRecord.html" title="DAAPRecord">
-<meta name="generator" content="GTK-Doc V1.32 (XML mode)">
-<link rel="stylesheet" href="style.css" type="text/css">
-</head>
-<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
-<td width="100%" align="left" class="shortcuts">
-<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
-                  <a href="#libdmapsharing-3.0-daap-connection.description" class="shortcut">Description</a></span>
-</td>
-<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
-<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
-<td><a accesskey="p" href="ch01.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="DAAPRecord.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
-</tr></table>
-<div class="refentry">
-<a name="libdmapsharing-3.0-daap-connection"></a><div class="titlepage"></div>
-<div class="refnamediv"><table width="100%"><tr>
-<td valign="top">
-<h2><span class="refentrytitle"><a name="libdmapsharing-3.0-daap-connection.top_of_page"></a>daap-connection</span></h2>
-<p>daap-connection</p>
-</td>
-<td class="gallery_image" valign="top" align="right"></td>
-</tr></table></div>
-<div class="refsect1">
-<a name="libdmapsharing-3.0-daap-connection.functions"></a><h2>Functions</h2>
-<div class="informaltable"><table class="informaltable" width="100%" border="0">
-<colgroup>
-<col width="150px" class="functions_proto_type">
-<col class="functions_proto_name">
-</colgroup>
-<tbody><tr>
-<td class="function_type">
-<span class="returnvalue">DAAPConnection</span> *
-</td>
-<td class="function_name">
-<a class="link" href="libdmapsharing-3.0-daap-connection.html#daap-connection-new" title="daap_connection_new ()">daap_connection_new</a> <span class="c_punctuation">()</span>
-</td>
-</tr></tbody>
-</table></div>
-</div>
-<div class="refsect1">
-<a name="libdmapsharing-3.0-daap-connection.description"></a><h2>Description</h2>
-</div>
-<div class="refsect1">
-<a name="libdmapsharing-3.0-daap-connection.functions_details"></a><h2>Functions</h2>
-<div class="refsect2">
-<a name="daap-connection-new"></a><h3>daap_connection_new ()</h3>
-<pre class="programlisting"><span class="returnvalue">DAAPConnection</span> *
-daap_connection_new (<em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
-                     <em class="parameter"><code>const <span class="type">char</span> *host</code></em>,
-                     <em class="parameter"><code><span class="type">guint</span> port</code></em>,
-                     <em class="parameter"><code><a class="link" href="DMAPDb.html" title="DMAPDb"><span class="type">DMAPDb</span></a> *db</code></em>,
-                     <em class="parameter"><code><a class="link" href="DMAPRecordFactory.html" title="DMAPRecordFactory"><span class="type">DMAPRecordFactory</span></a> *factory</code></em>);</pre>
-</div>
-</div>
-</div>
-<div class="footer">
-<hr>Generated by GTK-Doc V1.32</div>
-</body>
-</html>
\ No newline at end of file
diff --git a/doc/html/libdmapsharing-3.0-daap-share.html b/doc/html/libdmapsharing-3.0-daap-share.html
deleted file mode 100644
index 6a33fa8..0000000
--- a/doc/html/libdmapsharing-3.0-daap-share.html
+++ /dev/null
@@ -1,112 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>daap-share: libdmapsharing-3.0 Reference Manual</title>
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
-<link rel="home" href="index.html" title="libdmapsharing-3.0 Reference Manual">
-<link rel="up" href="ch01.html" title="Libdmapsharing overview">
-<link rel="prev" href="DAAPRecord.html" title="DAAPRecord">
-<link rel="next" href="libdmapsharing-3.0-dacp-connection.html" title="dacp-connection">
-<meta name="generator" content="GTK-Doc V1.32 (XML mode)">
-<link rel="stylesheet" href="style.css" type="text/css">
-</head>
-<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
-<td width="100%" align="left" class="shortcuts">
-<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
-                  <a href="#libdmapsharing-3.0-daap-share.description" class="shortcut">Description</a></span>
-</td>
-<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
-<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
-<td><a accesskey="p" href="DAAPRecord.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="libdmapsharing-3.0-dacp-connection.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
-</tr></table>
-<div class="refentry">
-<a name="libdmapsharing-3.0-daap-share"></a><div class="titlepage"></div>
-<div class="refnamediv"><table width="100%"><tr>
-<td valign="top">
-<h2><span class="refentrytitle"><a name="libdmapsharing-3.0-daap-share.top_of_page"></a>daap-share</span></h2>
-<p>daap-share</p>
-</td>
-<td class="gallery_image" valign="top" align="right"></td>
-</tr></table></div>
-<div class="refsect1">
-<a name="libdmapsharing-3.0-daap-share.functions"></a><h2>Functions</h2>
-<div class="informaltable"><table class="informaltable" width="100%" border="0">
-<colgroup>
-<col width="150px" class="functions_proto_type">
-<col class="functions_proto_name">
-</colgroup>
-<tbody><tr>
-<td class="function_type">
-<span class="returnvalue">DAAPShare</span> *
-</td>
-<td class="function_name">
-<a class="link" href="libdmapsharing-3.0-daap-share.html#daap-share-new" title="daap_share_new ()">daap_share_new</a> <span class="c_punctuation">()</span>
-</td>
-</tr></tbody>
-</table></div>
-</div>
-<div class="refsect1">
-<a name="libdmapsharing-3.0-daap-share.description"></a><h2>Description</h2>
-</div>
-<div class="refsect1">
-<a name="libdmapsharing-3.0-daap-share.functions_details"></a><h2>Functions</h2>
-<div class="refsect2">
-<a name="daap-share-new"></a><h3>daap_share_new ()</h3>
-<pre class="programlisting"><span class="returnvalue">DAAPShare</span> *
-daap_share_new (<em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
-                <em class="parameter"><code>const <span class="type">char</span> *password</code></em>,
-                <em class="parameter"><code><a class="link" href="DMAPDb.html" title="DMAPDb"><span class="type">DMAPDb</span></a> *db</code></em>,
-                <em class="parameter"><code><a class="link" href="DMAPContainerDb.html" title="DMAPContainerDb"><span class="type">DMAPContainerDb</span></a> *container_db</code></em>,
-                <em class="parameter"><code><span class="type">gchar</span> *transcode_mimetype</code></em>);</pre>
-<p>Creates a new DAAP share and publishes it using mDNS.</p>
-<div class="refsect3">
-<a name="daap-share-new.parameters"></a><h4>Parameters</h4>
-<div class="informaltable"><table class="informaltable" width="100%" border="0">
-<colgroup>
-<col width="150px" class="parameters_name">
-<col class="parameters_description">
-<col width="200px" class="parameters_annotations">
-</colgroup>
-<tbody>
-<tr>
-<td class="parameter_name"><p>name</p></td>
-<td class="parameter_description"><p>The name that will be published by mDNS.</p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-<tr>
-<td class="parameter_name"><p>password</p></td>
-<td class="parameter_description"><p>A share password or NULL.</p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-<tr>
-<td class="parameter_name"><p>db</p></td>
-<td class="parameter_description"><p>A media database.</p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-<tr>
-<td class="parameter_name"><p>container_db</p></td>
-<td class="parameter_description"><p>A container (album) database.</p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-<tr>
-<td class="parameter_name"><p>transcode_mimetype</p></td>
-<td class="parameter_description"><p>A transcode mimetype or NULL.</p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-<div class="refsect3">
-<a name="daap-share-new.returns"></a><h4>Returns</h4>
-<p> a pointer to a DAAPShare.</p>
-</div>
-</div>
-</div>
-</div>
-<div class="footer">
-<hr>Generated by GTK-Doc V1.32</div>
-</body>
-</html>
\ No newline at end of file
diff --git a/doc/html/libdmapsharing-3.0-dacp-connection.html b/doc/html/libdmapsharing-3.0-dacp-connection.html
deleted file mode 100644
index b4413e4..0000000
--- a/doc/html/libdmapsharing-3.0-dacp-connection.html
+++ /dev/null
@@ -1,70 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>dacp-connection: libdmapsharing-3.0 Reference Manual</title>
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
-<link rel="home" href="index.html" title="libdmapsharing-3.0 Reference Manual">
-<link rel="up" href="ch01.html" title="Libdmapsharing overview">
-<link rel="prev" href="libdmapsharing-3.0-daap-share.html" title="daap-share">
-<link rel="next" href="DACPPlayer.html" title="DACPPlayer">
-<meta name="generator" content="GTK-Doc V1.32 (XML mode)">
-<link rel="stylesheet" href="style.css" type="text/css">
-</head>
-<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
-<td width="100%" align="left" class="shortcuts">
-<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
-                  <a href="#libdmapsharing-3.0-dacp-connection.description" class="shortcut">Description</a></span>
-</td>
-<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
-<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
-<td><a accesskey="p" href="libdmapsharing-3.0-daap-share.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="DACPPlayer.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
-</tr></table>
-<div class="refentry">
-<a name="libdmapsharing-3.0-dacp-connection"></a><div class="titlepage"></div>
-<div class="refnamediv"><table width="100%"><tr>
-<td valign="top">
-<h2><span class="refentrytitle"><a name="libdmapsharing-3.0-dacp-connection.top_of_page"></a>dacp-connection</span></h2>
-<p>dacp-connection</p>
-</td>
-<td class="gallery_image" valign="top" align="right"></td>
-</tr></table></div>
-<div class="refsect1">
-<a name="libdmapsharing-3.0-dacp-connection.functions"></a><h2>Functions</h2>
-<div class="informaltable"><table class="informaltable" width="100%" border="0">
-<colgroup>
-<col width="150px" class="functions_proto_type">
-<col class="functions_proto_name">
-</colgroup>
-<tbody><tr>
-<td class="function_type">
-<span class="returnvalue">DACPConnection</span> *
-</td>
-<td class="function_name">
-<a class="link" href="libdmapsharing-3.0-dacp-connection.html#dacp-connection-new" title="dacp_connection_new ()">dacp_connection_new</a> <span class="c_punctuation">()</span>
-</td>
-</tr></tbody>
-</table></div>
-</div>
-<div class="refsect1">
-<a name="libdmapsharing-3.0-dacp-connection.description"></a><h2>Description</h2>
-</div>
-<div class="refsect1">
-<a name="libdmapsharing-3.0-dacp-connection.functions_details"></a><h2>Functions</h2>
-<div class="refsect2">
-<a name="dacp-connection-new"></a><h3>dacp_connection_new ()</h3>
-<pre class="programlisting"><span class="returnvalue">DACPConnection</span> *
-dacp_connection_new (<em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
-                     <em class="parameter"><code>const <span class="type">char</span> *host</code></em>,
-                     <em class="parameter"><code><span class="type">guint</span> port</code></em>,
-                     <em class="parameter"><code><a class="link" href="DMAPDb.html" title="DMAPDb"><span class="type">DMAPDb</span></a> *db</code></em>,
-                     <em class="parameter"><code><a class="link" href="DMAPRecordFactory.html" title="DMAPRecordFactory"><span class="type">DMAPRecordFactory</span></a> *factory</code></em>);</pre>
-</div>
-</div>
-</div>
-<div class="footer">
-<hr>Generated by GTK-Doc V1.32</div>
-</body>
-</html>
\ No newline at end of file
diff --git a/doc/html/libdmapsharing-3.0-dacp-share.html b/doc/html/libdmapsharing-3.0-dacp-share.html
deleted file mode 100644
index 0ae7b4a..0000000
--- a/doc/html/libdmapsharing-3.0-dacp-share.html
+++ /dev/null
@@ -1,310 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>dacp-share: libdmapsharing-3.0 Reference Manual</title>
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
-<link rel="home" href="index.html" title="libdmapsharing-3.0 Reference Manual">
-<link rel="up" href="ch01.html" title="Libdmapsharing overview">
-<link rel="prev" href="DACPPlayer.html" title="DACPPlayer">
-<link rel="next" href="libdmapsharing-3.0-dmap-connection.html" title="dmap-connection">
-<meta name="generator" content="GTK-Doc V1.32 (XML mode)">
-<link rel="stylesheet" href="style.css" type="text/css">
-</head>
-<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
-<td width="100%" align="left" class="shortcuts">
-<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
-                  <a href="#libdmapsharing-3.0-dacp-share.description" class="shortcut">Description</a></span>
-</td>
-<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
-<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
-<td><a accesskey="p" href="DACPPlayer.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="libdmapsharing-3.0-dmap-connection.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
-</tr></table>
-<div class="refentry">
-<a name="libdmapsharing-3.0-dacp-share"></a><div class="titlepage"></div>
-<div class="refnamediv"><table width="100%"><tr>
-<td valign="top">
-<h2><span class="refentrytitle"><a name="libdmapsharing-3.0-dacp-share.top_of_page"></a>dacp-share</span></h2>
-<p>dacp-share</p>
-</td>
-<td class="gallery_image" valign="top" align="right"></td>
-</tr></table></div>
-<div class="refsect1">
-<a name="libdmapsharing-3.0-dacp-share.functions"></a><h2>Functions</h2>
-<div class="informaltable"><table class="informaltable" width="100%" border="0">
-<colgroup>
-<col width="150px" class="functions_proto_type">
-<col class="functions_proto_name">
-</colgroup>
-<tbody>
-<tr>
-<td class="function_type">
-<span class="returnvalue">gboolean</span>
-</td>
-<td class="function_name">
-<span class="c_punctuation">(</span><a class="link" href="libdmapsharing-3.0-dacp-share.html#lookup-guid" title="lookup_guid ()">*lookup_guid</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">void</span>
-</td>
-<td class="function_name">
-<span class="c_punctuation">(</span><a class="link" href="libdmapsharing-3.0-dacp-share.html#add-guid" title="add_guid ()">*add_guid</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">void</span>
-</td>
-<td class="function_name">
-<span class="c_punctuation">(</span><a class="link" href="libdmapsharing-3.0-dacp-share.html#remote-found" title="remote_found ()">*remote_found</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">void</span>
-</td>
-<td class="function_name">
-<span class="c_punctuation">(</span><a class="link" href="libdmapsharing-3.0-dacp-share.html#remote-lost" title="remote_lost ()">*remote_lost</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">void</span>
-</td>
-<td class="function_name">
-<span class="c_punctuation">(</span><a class="link" href="libdmapsharing-3.0-dacp-share.html#remote-paired" title="remote_paired ()">*remote_paired</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">DACPShare</span> *
-</td>
-<td class="function_name">
-<a class="link" href="libdmapsharing-3.0-dacp-share.html#dacp-share-new" title="dacp_share_new ()">dacp_share_new</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">void</span>
-</td>
-<td class="function_name">
-<a class="link" href="libdmapsharing-3.0-dacp-share.html#dacp-share-pair" title="dacp_share_pair ()">dacp_share_pair</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">void</span>
-</td>
-<td class="function_name">
-<a class="link" href="libdmapsharing-3.0-dacp-share.html#dacp-share-start-lookup" title="dacp_share_start_lookup ()">dacp_share_start_lookup</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">void</span>
-</td>
-<td class="function_name">
-<a class="link" href="libdmapsharing-3.0-dacp-share.html#dacp-share-stop-lookup" title="dacp_share_stop_lookup ()">dacp_share_stop_lookup</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">void</span>
-</td>
-<td class="function_name">
-<a class="link" href="libdmapsharing-3.0-dacp-share.html#dacp-share-player-updated" title="dacp_share_player_updated ()">dacp_share_player_updated</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-</tbody>
-</table></div>
-</div>
-<div class="refsect1">
-<a name="libdmapsharing-3.0-dacp-share.description"></a><h2>Description</h2>
-</div>
-<div class="refsect1">
-<a name="libdmapsharing-3.0-dacp-share.functions_details"></a><h2>Functions</h2>
-<div class="refsect2">
-<a name="lookup-guid"></a><h3>lookup_guid ()</h3>
-<pre class="programlisting"><span class="returnvalue">gboolean</span>
-<span class="c_punctuation">(</span>*lookup_guid<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">DACPShare</span> *share</code></em>,
-                <em class="parameter"><code><span class="type">gchar</span> *guid</code></em>);</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="add-guid"></a><h3>add_guid ()</h3>
-<pre class="programlisting"><span class="returnvalue">void</span>
-<span class="c_punctuation">(</span>*add_guid<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">DACPShare</span> *share</code></em>,
-             <em class="parameter"><code><span class="type">gchar</span> *guid</code></em>);</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="remote-found"></a><h3>remote_found ()</h3>
-<pre class="programlisting"><span class="returnvalue">void</span>
-<span class="c_punctuation">(</span>*remote_found<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">DACPShare</span> *share</code></em>,
-                 <em class="parameter"><code><span class="type">gchar</span> *service_name</code></em>,
-                 <em class="parameter"><code><span class="type">gchar</span> *remote_name</code></em>);</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="remote-lost"></a><h3>remote_lost ()</h3>
-<pre class="programlisting"><span class="returnvalue">void</span>
-<span class="c_punctuation">(</span>*remote_lost<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">DACPShare</span> *share</code></em>,
-                <em class="parameter"><code><span class="type">gchar</span> *service_name</code></em>);</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="remote-paired"></a><h3>remote_paired ()</h3>
-<pre class="programlisting"><span class="returnvalue">void</span>
-<span class="c_punctuation">(</span>*remote_paired<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">DACPShare</span> *share</code></em>,
-                  <em class="parameter"><code><span class="type">gchar</span> *service_name</code></em>,
-                  <em class="parameter"><code><span class="type">gboolean</span> connected</code></em>);</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="dacp-share-new"></a><h3>dacp_share_new ()</h3>
-<pre class="programlisting"><span class="returnvalue">DACPShare</span> *
-dacp_share_new (<em class="parameter"><code>const <span class="type">gchar</span> *library_name</code></em>,
-                <em class="parameter"><code><a class="link" href="DACPPlayer.html" title="DACPPlayer"><span class="type">DACPPlayer</span></a> *player</code></em>,
-                <em class="parameter"><code><a class="link" href="DMAPDb.html" title="DMAPDb"><span class="type">DMAPDb</span></a> *db</code></em>,
-                <em class="parameter"><code><a class="link" href="DMAPContainerDb.html" title="DMAPContainerDb"><span class="type">DMAPContainerDb</span></a> *container_db</code></em>);</pre>
-<p>Creates a new DACP share and publishes it using mDNS.</p>
-<div class="refsect3">
-<a name="dacp-share-new.parameters"></a><h4>Parameters</h4>
-<div class="informaltable"><table class="informaltable" width="100%" border="0">
-<colgroup>
-<col width="150px" class="parameters_name">
-<col class="parameters_description">
-<col width="200px" class="parameters_annotations">
-</colgroup>
-<tbody>
-<tr>
-<td class="parameter_name"><p>library_name</p></td>
-<td class="parameter_description"><p>The library name that will be shown in the remote.</p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-<tr>
-<td class="parameter_name"><p>player</p></td>
-<td class="parameter_description"><p>A <a class="link" href="DACPPlayer.html" title="DACPPlayer"><span class="type">DACPPlayer</span></a> instance, used to retrieve information from a player
-implementation.</p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-<tr>
-<td class="parameter_name"><p>db</p></td>
-<td class="parameter_description"><p>a media database represented by a <a class="link" href="DMAPDb.html" title="DMAPDb"><span class="type">DMAPDb</span></a> instance.</p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-<tr>
-<td class="parameter_name"><p>container_db</p></td>
-<td class="parameter_description"><p>a container (album) database represented by a <a class="link" href="DMAPContainerDb.html" title="DMAPContainerDb"><span class="type">DMAPContainerDb</span></a>
-instance.</p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-<div class="refsect3">
-<a name="dacp-share-new.returns"></a><h4>Returns</h4>
-<p> a pointer to a <span class="type">DACPShare</span>.</p>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="dacp-share-pair"></a><h3>dacp_share_pair ()</h3>
-<pre class="programlisting"><span class="returnvalue">void</span>
-dacp_share_pair (<em class="parameter"><code><span class="type">DACPShare</span> *share</code></em>,
-                 <em class="parameter"><code><span class="type">gchar</span> *service_name</code></em>,
-                 <em class="parameter"><code><span class="type">gchar</span> passcode[4]</code></em>);</pre>
-<p>Pairs a DACP client (Remote) with this server. If the passcode is 
-correct (the same as shown on the remote), the remote will start connecting
-to this server.</p>
-<div class="refsect3">
-<a name="dacp-share-pair.parameters"></a><h4>Parameters</h4>
-<div class="informaltable"><table class="informaltable" width="100%" border="0">
-<colgroup>
-<col width="150px" class="parameters_name">
-<col class="parameters_description">
-<col width="200px" class="parameters_annotations">
-</colgroup>
-<tbody>
-<tr>
-<td class="parameter_name"><p>share</p></td>
-<td class="parameter_description"><p>a <span class="type">DACPShare</span> </p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-<tr>
-<td class="parameter_name"><p>service_name</p></td>
-<td class="parameter_description"><p>DACP client (remote) service identifier.</p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-<tr>
-<td class="parameter_name"><p>passcode</p></td>
-<td class="parameter_description"><p>4-Digit PIN code entered by the user.</p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="dacp-share-start-lookup"></a><h3>dacp_share_start_lookup ()</h3>
-<pre class="programlisting"><span class="returnvalue">void</span>
-dacp_share_start_lookup (<em class="parameter"><code><span class="type">DACPShare</span> *share</code></em>);</pre>
-<p>Start looking up for DACP remotes. Connect to <span class="type">“remote-found”</span> signal
-to detect new remotes. Be aware that when a <span class="type">DACPShare</span> is created, only 
-after calling this function is that it starts looking up for Remotes on the
-network.</p>
-<div class="refsect3">
-<a name="dacp-share-start-lookup.parameters"></a><h4>Parameters</h4>
-<div class="informaltable"><table class="informaltable" width="100%" border="0">
-<colgroup>
-<col width="150px" class="parameters_name">
-<col class="parameters_description">
-<col width="200px" class="parameters_annotations">
-</colgroup>
-<tbody><tr>
-<td class="parameter_name"><p>share</p></td>
-<td class="parameter_description"><p>A <span class="type">DACPShare</span>.</p></td>
-<td class="parameter_annotations"> </td>
-</tr></tbody>
-</table></div>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="dacp-share-stop-lookup"></a><h3>dacp_share_stop_lookup ()</h3>
-<pre class="programlisting"><span class="returnvalue">void</span>
-dacp_share_stop_lookup (<em class="parameter"><code><span class="type">DACPShare</span> *share</code></em>);</pre>
-<p>Stop looking up for DACP remotes.</p>
-<div class="refsect3">
-<a name="dacp-share-stop-lookup.parameters"></a><h4>Parameters</h4>
-<div class="informaltable"><table class="informaltable" width="100%" border="0">
-<colgroup>
-<col width="150px" class="parameters_name">
-<col class="parameters_description">
-<col width="200px" class="parameters_annotations">
-</colgroup>
-<tbody><tr>
-<td class="parameter_name"><p>share</p></td>
-<td class="parameter_description"><p>A <span class="type">DACPShare</span>.</p></td>
-<td class="parameter_annotations"> </td>
-</tr></tbody>
-</table></div>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="dacp-share-player-updated"></a><h3>dacp_share_player_updated ()</h3>
-<pre class="programlisting"><span class="returnvalue">void</span>
-dacp_share_player_updated (<em class="parameter"><code><span class="type">DACPShare</span> *share</code></em>);</pre>
-</div>
-</div>
-</div>
-<div class="footer">
-<hr>Generated by GTK-Doc V1.32</div>
-</body>
-</html>
\ No newline at end of file
diff --git a/doc/html/libdmapsharing-3.0-dmap-connection.html b/doc/html/libdmapsharing-3.0-dmap-connection.html
deleted file mode 100644
index e5b2f2c..0000000
--- a/doc/html/libdmapsharing-3.0-dmap-connection.html
+++ /dev/null
@@ -1,475 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>dmap-connection: libdmapsharing-3.0 Reference Manual</title>
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
-<link rel="home" href="index.html" title="libdmapsharing-3.0 Reference Manual">
-<link rel="up" href="ch01.html" title="Libdmapsharing overview">
-<link rel="prev" href="libdmapsharing-3.0-dacp-share.html" title="dacp-share">
-<link rel="next" href="DMAPContainerDb.html" title="DMAPContainerDb">
-<meta name="generator" content="GTK-Doc V1.32 (XML mode)">
-<link rel="stylesheet" href="style.css" type="text/css">
-</head>
-<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
-<td width="100%" align="left" class="shortcuts">
-<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
-                  <a href="#libdmapsharing-3.0-dmap-connection.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
-                  <a href="#libdmapsharing-3.0-dmap-connection.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
-</td>
-<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
-<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
-<td><a accesskey="p" href="libdmapsharing-3.0-dacp-share.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="DMAPContainerDb.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
-</tr></table>
-<div class="refentry">
-<a name="libdmapsharing-3.0-dmap-connection"></a><div class="titlepage"></div>
-<div class="refnamediv"><table width="100%"><tr>
-<td valign="top">
-<h2><span class="refentrytitle"><a name="libdmapsharing-3.0-dmap-connection.top_of_page"></a>dmap-connection</span></h2>
-<p>dmap-connection</p>
-</td>
-<td class="gallery_image" valign="top" align="right"></td>
-</tr></table></div>
-<div class="refsect1">
-<a name="libdmapsharing-3.0-dmap-connection.functions"></a><h2>Functions</h2>
-<div class="informaltable"><table class="informaltable" width="100%" border="0">
-<colgroup>
-<col width="150px" class="functions_proto_type">
-<col class="functions_proto_name">
-</colgroup>
-<tbody>
-<tr>
-<td class="function_type">
-<span class="returnvalue">DMAPContentCode</span>
-</td>
-<td class="function_name">
-<span class="c_punctuation">(</span><a class="link" href="libdmapsharing-3.0-dmap-connection.html#get-protocol-version-cc" title="get_protocol_version_cc ()">*get_protocol_version_cc</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">gchar</span> *
-</td>
-<td class="function_name">
-<span class="c_punctuation">(</span><a class="link" href="libdmapsharing-3.0-dmap-connection.html#get-query-metadata" title="get_query_metadata ()">*get_query_metadata</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<a class="link" href="DMAPRecord.html" title="DMAPRecord"><span class="returnvalue">DMAPRecord</span></a> *
-</td>
-<td class="function_name">
-<span class="c_punctuation">(</span><a class="link" href="libdmapsharing-3.0-dmap-connection.html#handle-mlcl" title="handle_mlcl ()">*handle_mlcl</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">void</span>
-</td>
-<td class="function_name">
-<span class="c_punctuation">(</span><a class="link" href="libdmapsharing-3.0-dmap-connection.html#connected" title="connected ()">*connected</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">void</span>
-</td>
-<td class="function_name">
-<span class="c_punctuation">(</span><a class="link" href="libdmapsharing-3.0-dmap-connection.html#disconnected" title="disconnected ()">*disconnected</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">char</span> *
-</td>
-<td class="function_name">
-<span class="c_punctuation">(</span><a class="link" href="libdmapsharing-3.0-dmap-connection.html#authenticate" title="authenticate ()">*authenticate</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">void</span>
-</td>
-<td class="function_name">
-<span class="c_punctuation">(</span><a class="link" href="libdmapsharing-3.0-dmap-connection.html#connecting" title="connecting ()">*connecting</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">void</span>
-</td>
-<td class="function_name">
-<span class="c_punctuation">(</span><a class="link" href="libdmapsharing-3.0-dmap-connection.html#operation-done" title="operation_done ()">*operation_done</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">gboolean</span>
-</td>
-<td class="function_name">
-<span class="c_punctuation">(</span><a class="link" href="libdmapsharing-3.0-dmap-connection.html#DMAPConnectionCallback" title="DMAPConnectionCallback ()">*DMAPConnectionCallback</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">void</span>
-</td>
-<td class="function_name">
-<span class="c_punctuation">(</span><a class="link" href="libdmapsharing-3.0-dmap-connection.html#DMAPResponseHandler" title="DMAPResponseHandler ()">*DMAPResponseHandler</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">gboolean</span>
-</td>
-<td class="function_name">
-<a class="link" href="libdmapsharing-3.0-dmap-connection.html#dmap-connection-is-connected" title="dmap_connection_is_connected ()">dmap_connection_is_connected</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">void</span>
-</td>
-<td class="function_name">
-<a class="link" href="libdmapsharing-3.0-dmap-connection.html#dmap-connection-setup" title="dmap_connection_setup ()">dmap_connection_setup</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">void</span>
-</td>
-<td class="function_name">
-<a class="link" href="libdmapsharing-3.0-dmap-connection.html#dmap-connection-connect" title="dmap_connection_connect ()">dmap_connection_connect</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">void</span>
-</td>
-<td class="function_name">
-<a class="link" href="libdmapsharing-3.0-dmap-connection.html#dmap-connection-disconnect" title="dmap_connection_disconnect ()">dmap_connection_disconnect</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupMessageHeaders.html#SoupMessageHeaders"><span class="returnvalue">SoupMessageHeaders</span></a> *
-</td>
-<td class="function_name">
-<a class="link" href="libdmapsharing-3.0-dmap-connection.html#dmap-connection-get-headers" title="dmap_connection_get_headers ()">dmap_connection_get_headers</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">GSList</span> *
-</td>
-<td class="function_name">
-<a class="link" href="libdmapsharing-3.0-dmap-connection.html#dmap-connection-get-playlists" title="dmap_connection_get_playlists ()">dmap_connection_get_playlists</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupMessage.html#SoupMessage-struct"><span class="returnvalue">SoupMessage</span></a> *
-</td>
-<td class="function_name">
-<a class="link" href="libdmapsharing-3.0-dmap-connection.html#dmap-connection-build-message" title="dmap_connection_build_message ()">dmap_connection_build_message</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">void</span>
-</td>
-<td class="function_name">
-<a class="link" href="libdmapsharing-3.0-dmap-connection.html#dmap-connection-authenticate-message" title="dmap_connection_authenticate_message ()">dmap_connection_authenticate_message</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">gboolean</span>
-</td>
-<td class="function_name">
-<a class="link" href="libdmapsharing-3.0-dmap-connection.html#dmap-connection-get" title="dmap_connection_get ()">dmap_connection_get</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-</tbody>
-</table></div>
-</div>
-<div class="refsect1">
-<a name="libdmapsharing-3.0-dmap-connection.other"></a><h2>Types and Values</h2>
-<div class="informaltable"><table class="informaltable" width="100%" border="0">
-<colgroup>
-<col width="150px" class="other_proto_type">
-<col class="other_proto_name">
-</colgroup>
-<tbody><tr>
-<td class="datatype_keyword">enum</td>
-<td class="function_name"><a class="link" href="libdmapsharing-3.0-dmap-connection.html#DMAPConnectionState" title="enum DMAPConnectionState">DMAPConnectionState</a></td>
-</tr></tbody>
-</table></div>
-</div>
-<div class="refsect1">
-<a name="libdmapsharing-3.0-dmap-connection.object-hierarchy"></a><h2>Object Hierarchy</h2>
-<pre class="screen">    <a href="/usr/share/gtk-doc/html/gobject/gobject-Enumeration-and-Flag-Types.html">GEnum</a>
-    <span class="lineart">╰──</span> DMAPConnectionState
-</pre>
-</div>
-<div class="refsect1">
-<a name="libdmapsharing-3.0-dmap-connection.description"></a><h2>Description</h2>
-</div>
-<div class="refsect1">
-<a name="libdmapsharing-3.0-dmap-connection.functions_details"></a><h2>Functions</h2>
-<div class="refsect2">
-<a name="get-protocol-version-cc"></a><h3>get_protocol_version_cc ()</h3>
-<pre class="programlisting"><span class="returnvalue">DMAPContentCode</span>
-<span class="c_punctuation">(</span>*get_protocol_version_cc<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">DMAPConnection</span> *connection</code></em>);</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="get-query-metadata"></a><h3>get_query_metadata ()</h3>
-<pre class="programlisting"><span class="returnvalue">gchar</span> *
-<span class="c_punctuation">(</span>*get_query_metadata<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">DMAPConnection</span> *connection</code></em>);</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="handle-mlcl"></a><h3>handle_mlcl ()</h3>
-<pre class="programlisting"><a class="link" href="DMAPRecord.html" title="DMAPRecord"><span class="returnvalue">DMAPRecord</span></a> *
-<span class="c_punctuation">(</span>*handle_mlcl<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">DMAPConnection</span> *connection</code></em>,
-                <em class="parameter"><code><a class="link" href="DMAPRecordFactory.html" title="DMAPRecordFactory"><span class="type">DMAPRecordFactory</span></a> *factory</code></em>,
-                <em class="parameter"><code><span class="type">GNode</span> *mlcl</code></em>,
-                <em class="parameter"><code><span class="type">gint</span> *item_id</code></em>);</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="connected"></a><h3>connected ()</h3>
-<pre class="programlisting"><span class="returnvalue">void</span>
-<span class="c_punctuation">(</span>*connected<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">DMAPConnection</span> *connection</code></em>);</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="disconnected"></a><h3>disconnected ()</h3>
-<pre class="programlisting"><span class="returnvalue">void</span>
-<span class="c_punctuation">(</span>*disconnected<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">DMAPConnection</span> *connection</code></em>);</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="authenticate"></a><h3>authenticate ()</h3>
-<pre class="programlisting"><span class="returnvalue">char</span> *
-<span class="c_punctuation">(</span>*authenticate<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">DMAPConnection</span> *connection</code></em>,
-                 <em class="parameter"><code>const <span class="type">char</span> *name</code></em>);</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="connecting"></a><h3>connecting ()</h3>
-<pre class="programlisting"><span class="returnvalue">void</span>
-<span class="c_punctuation">(</span>*connecting<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">DMAPConnection</span> *connection</code></em>,
-               <em class="parameter"><code><a class="link" href="libdmapsharing-3.0-dmap-connection.html#DMAPConnectionState" title="enum DMAPConnectionState"><span class="type">DMAPConnectionState</span></a> state</code></em>,
-               <em class="parameter"><code><span class="type">float</span> progress</code></em>);</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="operation-done"></a><h3>operation_done ()</h3>
-<pre class="programlisting"><span class="returnvalue">void</span>
-<span class="c_punctuation">(</span>*operation_done<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">DMAPConnection</span> *connection</code></em>);</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="DMAPConnectionCallback"></a><h3>DMAPConnectionCallback ()</h3>
-<pre class="programlisting"><span class="returnvalue">gboolean</span>
-<span class="c_punctuation">(</span>*DMAPConnectionCallback<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">DMAPConnection</span> *connection</code></em>,
-                           <em class="parameter"><code><span class="type">gboolean</span> result</code></em>,
-                           <em class="parameter"><code>const <span class="type">char</span> *reason</code></em>,
-                           <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="DMAPResponseHandler"></a><h3>DMAPResponseHandler ()</h3>
-<pre class="programlisting"><span class="returnvalue">void</span>
-<span class="c_punctuation">(</span>*DMAPResponseHandler<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">DMAPConnection</span> *connection</code></em>,
-                        <em class="parameter"><code><span class="type">guint</span> status</code></em>,
-                        <em class="parameter"><code><span class="type">GNode</span> *structure</code></em>,
-                        <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="dmap-connection-is-connected"></a><h3>dmap_connection_is_connected ()</h3>
-<pre class="programlisting"><span class="returnvalue">gboolean</span>
-dmap_connection_is_connected (<em class="parameter"><code><span class="type">DMAPConnection</span> *connection</code></em>);</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="dmap-connection-setup"></a><h3>dmap_connection_setup ()</h3>
-<pre class="programlisting"><span class="returnvalue">void</span>
-dmap_connection_setup (<em class="parameter"><code><span class="type">DMAPConnection</span> *connection</code></em>);</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="dmap-connection-connect"></a><h3>dmap_connection_connect ()</h3>
-<pre class="programlisting"><span class="returnvalue">void</span>
-dmap_connection_connect (<em class="parameter"><code><span class="type">DMAPConnection</span> *connection</code></em>,
-                         <em class="parameter"><code><a class="link" href="libdmapsharing-3.0-dmap-connection.html#DMAPConnectionCallback" title="DMAPConnectionCallback ()"><span class="type">DMAPConnectionCallback</span></a> callback</code></em>,
-                         <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="dmap-connection-disconnect"></a><h3>dmap_connection_disconnect ()</h3>
-<pre class="programlisting"><span class="returnvalue">void</span>
-dmap_connection_disconnect (<em class="parameter"><code><span class="type">DMAPConnection</span> *connection</code></em>,
-                            <em class="parameter"><code><a class="link" href="libdmapsharing-3.0-dmap-connection.html#DMAPConnectionCallback" title="DMAPConnectionCallback ()"><span class="type">DMAPConnectionCallback</span></a> callback</code></em>,
-                            <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="dmap-connection-get-headers"></a><h3>dmap_connection_get_headers ()</h3>
-<pre class="programlisting"><a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupMessageHeaders.html#SoupMessageHeaders"><span class="returnvalue">SoupMessageHeaders</span></a> *
-dmap_connection_get_headers (<em class="parameter"><code><span class="type">DMAPConnection</span> *connection</code></em>,
-                             <em class="parameter"><code>const <span class="type">char</span> *uri</code></em>);</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="dmap-connection-get-playlists"></a><h3>dmap_connection_get_playlists ()</h3>
-<pre class="programlisting"><span class="returnvalue">GSList</span> *
-dmap_connection_get_playlists (<em class="parameter"><code><span class="type">DMAPConnection</span> *connection</code></em>);</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="dmap-connection-build-message"></a><h3>dmap_connection_build_message ()</h3>
-<pre class="programlisting"><a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupMessage.html#SoupMessage-struct"><span class="returnvalue">SoupMessage</span></a> *
-dmap_connection_build_message (<em class="parameter"><code><span class="type">DMAPConnection</span> *connection</code></em>,
-                               <em class="parameter"><code>const <span class="type">gchar</span> *path</code></em>,
-                               <em class="parameter"><code><span class="type">gboolean</span> need_hash</code></em>,
-                               <em class="parameter"><code><span class="type">gdouble</span> version</code></em>,
-                               <em class="parameter"><code><span class="type">gint</span> req_id</code></em>,
-                               <em class="parameter"><code><span class="type">gboolean</span> send_close</code></em>);</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="dmap-connection-authenticate-message"></a><h3>dmap_connection_authenticate_message ()</h3>
-<pre class="programlisting"><span class="returnvalue">void</span>
-dmap_connection_authenticate_message (<em class="parameter"><code><span class="type">DMAPConnection</span> *connection</code></em>,
-                                      <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupSession.html#SoupSession-struct"><span class="type">SoupSession</span></a> *session</code></em>,
-                                      <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupMessage.html#SoupMessage-struct"><span class="type">SoupMessage</span></a> *message</code></em>,
-                                      <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupAuth.html#SoupAuth-struct"><span class="type">SoupAuth</span></a> *auth</code></em>,
-                                      <em class="parameter"><code>const <span class="type">char</span> *password</code></em>);</pre>
-<p>Attach an authentication credential to a request. This
-method should be called by a function that is connected to the
-<span class="type">“authenticate”</span> signal. The signal will provide the
-connection, session, message and auth to that function. That function
-should obtain a password and provide it to this method.</p>
-<div class="refsect3">
-<a name="dmap-connection-authenticate-message.parameters"></a><h4>Parameters</h4>
-<div class="informaltable"><table class="informaltable" width="100%" border="0">
-<colgroup>
-<col width="150px" class="parameters_name">
-<col class="parameters_description">
-<col width="200px" class="parameters_annotations">
-</colgroup>
-<tbody>
-<tr>
-<td class="parameter_name"><p>connection</p></td>
-<td class="parameter_description"><p>A <span class="type">DMAPConnection</span></p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-<tr>
-<td class="parameter_name"><p>session</p></td>
-<td class="parameter_description"><p>A <a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupSession.html#SoupSession-struct"><span class="type">SoupSession</span></a></p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-<tr>
-<td class="parameter_name"><p>message</p></td>
-<td class="parameter_description"><p>A <a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupMessage.html#SoupMessage-struct"><span class="type">SoupMessage</span></a></p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-<tr>
-<td class="parameter_name"><p>auth</p></td>
-<td class="parameter_description"><p>A <a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupAuth.html#SoupAuth-struct"><span class="type">SoupAuth</span></a></p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-<tr>
-<td class="parameter_name"><p>password</p></td>
-<td class="parameter_description"><p>A password</p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-</div>
-<hr>
-<div class="refsect2">
-<a name="dmap-connection-get"></a><h3>dmap_connection_get ()</h3>
-<pre class="programlisting"><span class="returnvalue">gboolean</span>
-dmap_connection_get (<em class="parameter"><code><span class="type">DMAPConnection</span> *self</code></em>,
-                     <em class="parameter"><code>const <span class="type">gchar</span> *path</code></em>,
-                     <em class="parameter"><code><span class="type">gboolean</span> need_hash</code></em>,
-                     <em class="parameter"><code><a class="link" href="libdmapsharing-3.0-dmap-connection.html#DMAPResponseHandler" title="DMAPResponseHandler ()"><span class="type">DMAPResponseHandler</span></a> handler</code></em>,
-                     <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);</pre>
-</div>
-</div>
-<div class="refsect1">
-<a name="libdmapsharing-3.0-dmap-connection.other_details"></a><h2>Types and Values</h2>
-<div class="refsect2">
-<a name="DMAPConnectionState"></a><h3>enum DMAPConnectionState</h3>
-<div class="refsect3">
-<a name="DMAPConnectionState.members"></a><h4>Members</h4>
-<div class="informaltable"><table class="informaltable" width="100%" border="0">
-<colgroup>
-<col width="300px" class="enum_members_name">
-<col class="enum_members_description">
-<col width="200px" class="enum_members_annotations">
-</colgroup>
-<tbody>
-<tr>
-<td class="enum_member_name"><p><a name="DMAP-GET-INFO:CAPS"></a>DMAP_GET_INFO</p></td>
-<td> </td>
-<td> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="DMAP-LOGIN:CAPS"></a>DMAP_LOGIN</p></td>
-<td> </td>
-<td> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="DMAP-GET-REVISION-NUMBER:CAPS"></a>DMAP_GET_REVISION_NUMBER</p></td>
-<td> </td>
-<td> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="DMAP-GET-DB-INFO:CAPS"></a>DMAP_GET_DB_INFO</p></td>
-<td> </td>
-<td> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="DMAP-GET-SONGS:CAPS"></a>DMAP_GET_SONGS</p></td>
-<td> </td>
-<td> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="DMAP-GET-PLAYLISTS:CAPS"></a>DMAP_GET_PLAYLISTS</p></td>
-<td> </td>
-<td> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="DMAP-GET-PLAYLIST-ENTRIES:CAPS"></a>DMAP_GET_PLAYLIST_ENTRIES</p></td>
-<td> </td>
-<td> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="DMAP-LOGOUT:CAPS"></a>DMAP_LOGOUT</p></td>
-<td> </td>
-<td> </td>
-</tr>
-<tr>
-<td class="enum_member_name"><p><a name="DMAP-DONE:CAPS"></a>DMAP_DONE</p></td>
-<td> </td>
-<td> </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-</div>
-</div>
-</div>
-<div class="footer">
-<hr>Generated by GTK-Doc V1.32</div>
-</body>
-</html>
\ No newline at end of file
diff --git a/doc/html/libdmapsharing-3.0-dmap-gst-input-stream.html b/doc/html/libdmapsharing-3.0-dmap-gst-input-stream.html
deleted file mode 100644
index 853dea2..0000000
--- a/doc/html/libdmapsharing-3.0-dmap-gst-input-stream.html
+++ /dev/null
@@ -1,98 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>dmap-gst-input-stream: libdmapsharing-3.0 Reference Manual</title>
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
-<link rel="home" href="index.html" title="libdmapsharing-3.0 Reference Manual">
-<link rel="up" href="ch01.html" title="Libdmapsharing overview">
-<link rel="prev" href="libdmapsharing-3.0-dmap-enums.html" title="dmap-enums">
-<link rel="next" href="libdmapsharing-3.0-dmap-gst-mp3-input-stream.html" title="dmap-gst-mp3-input-stream">
-<meta name="generator" content="GTK-Doc V1.32 (XML mode)">
-<link rel="stylesheet" href="style.css" type="text/css">
-</head>
-<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
-<td width="100%" align="left" class="shortcuts">
-<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
-                  <a href="#libdmapsharing-3.0-dmap-gst-input-stream.description" class="shortcut">Description</a></span>
-</td>
-<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
-<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
-<td><a accesskey="p" href="libdmapsharing-3.0-dmap-enums.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="libdmapsharing-3.0-dmap-gst-mp3-input-stream.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
-</tr></table>
-<div class="refentry">
-<a name="libdmapsharing-3.0-dmap-gst-input-stream"></a><div class="titlepage"></div>
-<div class="refnamediv"><table width="100%"><tr>
-<td valign="top">
-<h2><span class="refentrytitle"><a name="libdmapsharing-3.0-dmap-gst-input-stream.top_of_page"></a>dmap-gst-input-stream</span></h2>
-<p>dmap-gst-input-stream</p>
-</td>
-<td class="gallery_image" valign="top" align="right"></td>
-</tr></table></div>
-<div class="refsect1">
-<a name="libdmapsharing-3.0-dmap-gst-input-stream.functions"></a><h2>Functions</h2>
-<div class="informaltable"><table class="informaltable" width="100%" border="0">
-<colgroup>
-<col width="150px" class="functions_proto_type">
-<col class="functions_proto_name">
-</colgroup>
-<tbody>
-<tr>
-<td class="function_type">
-<span class="returnvalue">void</span>
-</td>
-<td class="function_name">
-<span class="c_punctuation">(</span><a class="link" href="libdmapsharing-3.0-dmap-gst-input-stream.html#kill-pipeline" title="kill_pipeline ()">*kill_pipeline</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">GInputStream</span> *
-</td>
-<td class="function_name">
-<a class="link" href="libdmapsharing-3.0-dmap-gst-input-stream.html#dmap-gst-input-stream-new" title="dmap_gst_input_stream_new ()">dmap_gst_input_stream_new</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">gchar</span> *
-</td>
-<td class="function_name">
-<a class="link" href="libdmapsharing-3.0-dmap-gst-input-stream.html#dmapd-input-stream-strdup-format-extension" title="dmapd_input_stream_strdup_format_extension ()">dmapd_input_stream_strdup_format_extension</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-</tbody>
-</table></div>
-</div>
-<div class="refsect1">
-<a name="libdmapsharing-3.0-dmap-gst-input-stream.description"></a><h2>Description</h2>
-</div>
-<div class="refsect1">
-<a name="libdmapsharing-3.0-dmap-gst-input-stream.functions_details"></a><h2>Functions</h2>
-<div class="refsect2">
-<a name="kill-pipeline"></a><h3>kill_pipeline ()</h3>
-<pre class="programlisting"><span class="returnvalue">void</span>
-<span class="c_punctuation">(</span>*kill_pipeline<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">DMAPGstInputStream</span> *Param1</code></em>);</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="dmap-gst-input-stream-new"></a><h3>dmap_gst_input_stream_new ()</h3>
-<pre class="programlisting"><span class="returnvalue">GInputStream</span> *
-dmap_gst_input_stream_new (<em class="parameter"><code>const <span class="type">gchar</span> *transcode_mimetype</code></em>,
-                           <em class="parameter"><code><span class="type">GInputStream</span> *src_stream</code></em>);</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="dmapd-input-stream-strdup-format-extension"></a><h3>dmapd_input_stream_strdup_format_extension ()</h3>
-<pre class="programlisting"><span class="returnvalue">gchar</span> *
-dmapd_input_stream_strdup_format_extension
-                               (<em class="parameter"><code>const <span class="type">gint</span> format_code</code></em>);</pre>
-</div>
-</div>
-</div>
-<div class="footer">
-<hr>Generated by GTK-Doc V1.32</div>
-</body>
-</html>
\ No newline at end of file
diff --git a/doc/html/libdmapsharing-3.0-dmap-gst-mp3-input-stream.html b/doc/html/libdmapsharing-3.0-dmap-gst-mp3-input-stream.html
deleted file mode 100644
index ed11fbd..0000000
--- a/doc/html/libdmapsharing-3.0-dmap-gst-mp3-input-stream.html
+++ /dev/null
@@ -1,66 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>dmap-gst-mp3-input-stream: libdmapsharing-3.0 Reference Manual</title>
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
-<link rel="home" href="index.html" title="libdmapsharing-3.0 Reference Manual">
-<link rel="up" href="ch01.html" title="Libdmapsharing overview">
-<link rel="prev" href="libdmapsharing-3.0-dmap-gst-input-stream.html" title="dmap-gst-input-stream">
-<link rel="next" href="libdmapsharing-3.0-dmap-gst-wav-input-stream.html" title="dmap-gst-wav-input-stream">
-<meta name="generator" content="GTK-Doc V1.32 (XML mode)">
-<link rel="stylesheet" href="style.css" type="text/css">
-</head>
-<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
-<td width="100%" align="left" class="shortcuts">
-<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
-                  <a href="#libdmapsharing-3.0-dmap-gst-mp3-input-stream.description" class="shortcut">Description</a></span>
-</td>
-<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
-<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
-<td><a accesskey="p" href="libdmapsharing-3.0-dmap-gst-input-stream.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="libdmapsharing-3.0-dmap-gst-wav-input-stream.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
-</tr></table>
-<div class="refentry">
-<a name="libdmapsharing-3.0-dmap-gst-mp3-input-stream"></a><div class="titlepage"></div>
-<div class="refnamediv"><table width="100%"><tr>
-<td valign="top">
-<h2><span class="refentrytitle"><a name="libdmapsharing-3.0-dmap-gst-mp3-input-stream.top_of_page"></a>dmap-gst-mp3-input-stream</span></h2>
-<p>dmap-gst-mp3-input-stream</p>
-</td>
-<td class="gallery_image" valign="top" align="right"></td>
-</tr></table></div>
-<div class="refsect1">
-<a name="libdmapsharing-3.0-dmap-gst-mp3-input-stream.functions"></a><h2>Functions</h2>
-<div class="informaltable"><table class="informaltable" width="100%" border="0">
-<colgroup>
-<col width="150px" class="functions_proto_type">
-<col class="functions_proto_name">
-</colgroup>
-<tbody><tr>
-<td class="function_type">
-<span class="returnvalue">GInputStream</span> *
-</td>
-<td class="function_name">
-<a class="link" href="libdmapsharing-3.0-dmap-gst-mp3-input-stream.html#dmap-gst-mp3-input-stream-new" title="dmap_gst_mp3_input_stream_new ()">dmap_gst_mp3_input_stream_new</a> <span class="c_punctuation">()</span>
-</td>
-</tr></tbody>
-</table></div>
-</div>
-<div class="refsect1">
-<a name="libdmapsharing-3.0-dmap-gst-mp3-input-stream.description"></a><h2>Description</h2>
-</div>
-<div class="refsect1">
-<a name="libdmapsharing-3.0-dmap-gst-mp3-input-stream.functions_details"></a><h2>Functions</h2>
-<div class="refsect2">
-<a name="dmap-gst-mp3-input-stream-new"></a><h3>dmap_gst_mp3_input_stream_new ()</h3>
-<pre class="programlisting"><span class="returnvalue">GInputStream</span> *
-dmap_gst_mp3_input_stream_new (<em class="parameter"><code><span class="type">GInputStream</span> *stream</code></em>);</pre>
-</div>
-</div>
-</div>
-<div class="footer">
-<hr>Generated by GTK-Doc V1.32</div>
-</body>
-</html>
\ No newline at end of file
diff --git a/doc/html/libdmapsharing-3.0-dmap-gst-wav-input-stream.html b/doc/html/libdmapsharing-3.0-dmap-gst-wav-input-stream.html
deleted file mode 100644
index 9f702e9..0000000
--- a/doc/html/libdmapsharing-3.0-dmap-gst-wav-input-stream.html
+++ /dev/null
@@ -1,66 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>dmap-gst-wav-input-stream: libdmapsharing-3.0 Reference Manual</title>
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
-<link rel="home" href="index.html" title="libdmapsharing-3.0 Reference Manual">
-<link rel="up" href="ch01.html" title="Libdmapsharing overview">
-<link rel="prev" href="libdmapsharing-3.0-dmap-gst-mp3-input-stream.html" title="dmap-gst-mp3-input-stream">
-<link rel="next" href="DMAPMdnsBrowser.html" title="DMAPMdnsBrowser">
-<meta name="generator" content="GTK-Doc V1.32 (XML mode)">
-<link rel="stylesheet" href="style.css" type="text/css">
-</head>
-<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
-<td width="100%" align="left" class="shortcuts">
-<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
-                  <a href="#libdmapsharing-3.0-dmap-gst-wav-input-stream.description" class="shortcut">Description</a></span>
-</td>
-<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
-<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
-<td><a accesskey="p" href="libdmapsharing-3.0-dmap-gst-mp3-input-stream.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="DMAPMdnsBrowser.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
-</tr></table>
-<div class="refentry">
-<a name="libdmapsharing-3.0-dmap-gst-wav-input-stream"></a><div class="titlepage"></div>
-<div class="refnamediv"><table width="100%"><tr>
-<td valign="top">
-<h2><span class="refentrytitle"><a name="libdmapsharing-3.0-dmap-gst-wav-input-stream.top_of_page"></a>dmap-gst-wav-input-stream</span></h2>
-<p>dmap-gst-wav-input-stream</p>
-</td>
-<td class="gallery_image" valign="top" align="right"></td>
-</tr></table></div>
-<div class="refsect1">
-<a name="libdmapsharing-3.0-dmap-gst-wav-input-stream.functions"></a><h2>Functions</h2>
-<div class="informaltable"><table class="informaltable" width="100%" border="0">
-<colgroup>
-<col width="150px" class="functions_proto_type">
-<col class="functions_proto_name">
-</colgroup>
-<tbody><tr>
-<td class="function_type">
-<span class="returnvalue">GInputStream</span> *
-</td>
-<td class="function_name">
-<a class="link" href="libdmapsharing-3.0-dmap-gst-wav-input-stream.html#dmap-gst-wav-input-stream-new" title="dmap_gst_wav_input_stream_new ()">dmap_gst_wav_input_stream_new</a> <span class="c_punctuation">()</span>
-</td>
-</tr></tbody>
-</table></div>
-</div>
-<div class="refsect1">
-<a name="libdmapsharing-3.0-dmap-gst-wav-input-stream.description"></a><h2>Description</h2>
-</div>
-<div class="refsect1">
-<a name="libdmapsharing-3.0-dmap-gst-wav-input-stream.functions_details"></a><h2>Functions</h2>
-<div class="refsect2">
-<a name="dmap-gst-wav-input-stream-new"></a><h3>dmap_gst_wav_input_stream_new ()</h3>
-<pre class="programlisting"><span class="returnvalue">GInputStream</span> *
-dmap_gst_wav_input_stream_new (<em class="parameter"><code><span class="type">GInputStream</span> *stream</code></em>);</pre>
-</div>
-</div>
-</div>
-<div class="footer">
-<hr>Generated by GTK-Doc V1.32</div>
-</body>
-</html>
\ No newline at end of file
diff --git a/doc/html/libdmapsharing-3.0-dmap-share.html b/doc/html/libdmapsharing-3.0-dmap-share.html
deleted file mode 100644
index 396641e..0000000
--- a/doc/html/libdmapsharing-3.0-dmap-share.html
+++ /dev/null
@@ -1,376 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>dmap-share: libdmapsharing-3.0 Reference Manual</title>
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
-<link rel="home" href="index.html" title="libdmapsharing-3.0 Reference Manual">
-<link rel="up" href="ch01.html" title="Libdmapsharing overview">
-<link rel="prev" href="DMAPRecordFactory.html" title="DMAPRecordFactory">
-<link rel="next" href="libdmapsharing-3.0-dpap-connection.html" title="dpap-connection">
-<meta name="generator" content="GTK-Doc V1.32 (XML mode)">
-<link rel="stylesheet" href="style.css" type="text/css">
-</head>
-<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
-<td width="100%" align="left" class="shortcuts">
-<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
-                  <a href="#libdmapsharing-3.0-dmap-share.description" class="shortcut">Description</a></span>
-</td>
-<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
-<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
-<td><a accesskey="p" href="DMAPRecordFactory.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="libdmapsharing-3.0-dpap-connection.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
-</tr></table>
-<div class="refentry">
-<a name="libdmapsharing-3.0-dmap-share"></a><div class="titlepage"></div>
-<div class="refnamediv"><table width="100%"><tr>
-<td valign="top">
-<h2><span class="refentrytitle"><a name="libdmapsharing-3.0-dmap-share.top_of_page"></a>dmap-share</span></h2>
-<p>dmap-share</p>
-</td>
-<td class="gallery_image" valign="top" align="right"></td>
-</tr></table></div>
-<div class="refsect1">
-<a name="libdmapsharing-3.0-dmap-share.functions"></a><h2>Functions</h2>
-<div class="informaltable"><table class="informaltable" width="100%" border="0">
-<colgroup>
-<col width="150px" class="functions_proto_type">
-<col class="functions_proto_name">
-</colgroup>
-<tbody>
-<tr>
-<td class="function_type">
-<span class="returnvalue">guint</span>
-</td>
-<td class="function_name">
-<span class="c_punctuation">(</span><a class="link" href="libdmapsharing-3.0-dmap-share.html#get-desired-port" title="get_desired_port ()">*get_desired_port</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">const <span class="returnvalue">char</span> *
-</td>
-<td class="function_name">
-<span class="c_punctuation">(</span><a class="link" href="libdmapsharing-3.0-dmap-share.html#get-type-of-service" title="get_type_of_service ()">*get_type_of_service</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">void</span>
-</td>
-<td class="function_name">
-<span class="c_punctuation">(</span><a class="link" href="libdmapsharing-3.0-dmap-share.html#message-add-standard-headers" title="message_add_standard_headers ()">*message_add_standard_headers</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">void</span>
-</td>
-<td class="function_name">
-<span class="c_punctuation">(</span><a class="link" href="libdmapsharing-3.0-dmap-share.html#add-entry-to-mlcl" title="add_entry_to_mlcl ()">*add_entry_to_mlcl</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">void</span>
-</td>
-<td class="function_name">
-<span class="c_punctuation">(</span><a class="link" href="libdmapsharing-3.0-dmap-share.html#databases-browse-xxx" title="databases_browse_xxx ()">*databases_browse_xxx</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">void</span>
-</td>
-<td class="function_name">
-<span class="c_punctuation">(</span><a class="link" href="libdmapsharing-3.0-dmap-share.html#databases-items-xxx" title="databases_items_xxx ()">*databases_items_xxx</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">void</span>
-</td>
-<td class="function_name">
-<span class="c_punctuation">(</span><a class="link" href="libdmapsharing-3.0-dmap-share.html#server-info" title="server_info ()">*server_info</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">void</span>
-</td>
-<td class="function_name">
-<span class="c_punctuation">(</span><a class="link" href="libdmapsharing-3.0-dmap-share.html#content-codes" title="content_codes ()">*content_codes</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">void</span>
-</td>
-<td class="function_name">
-<span class="c_punctuation">(</span><a class="link" href="libdmapsharing-3.0-dmap-share.html#login" title="login ()">*login</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">void</span>
-</td>
-<td class="function_name">
-<span class="c_punctuation">(</span><a class="link" href="libdmapsharing-3.0-dmap-share.html#logout" title="logout ()">*logout</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">void</span>
-</td>
-<td class="function_name">
-<span class="c_punctuation">(</span><a class="link" href="libdmapsharing-3.0-dmap-share.html#update" title="update ()">*update</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">void</span>
-</td>
-<td class="function_name">
-<span class="c_punctuation">(</span><a class="link" href="libdmapsharing-3.0-dmap-share.html#ctrl-int" title="ctrl_int ()">*ctrl_int</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">void</span>
-</td>
-<td class="function_name">
-<span class="c_punctuation">(</span><a class="link" href="libdmapsharing-3.0-dmap-share.html#published" title="published ()">*published</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">void</span>
-</td>
-<td class="function_name">
-<span class="c_punctuation">(</span><a class="link" href="libdmapsharing-3.0-dmap-share.html#name-collision" title="name_collision ()">*name_collision</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">void</span>
-</td>
-<td class="function_name">
-<span class="c_punctuation">(</span><a class="link" href="libdmapsharing-3.0-dmap-share.html#databases" title="databases ()">*databases</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<span class="returnvalue">void</span>
-</td>
-<td class="function_name">
-<a class="link" href="libdmapsharing-3.0-dmap-share.html#dmap-share-free-filter" title="dmap_share_free_filter ()">dmap_share_free_filter</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-</tbody>
-</table></div>
-</div>
-<div class="refsect1">
-<a name="libdmapsharing-3.0-dmap-share.other"></a><h2>Types and Values</h2>
-<div class="informaltable"><table class="informaltable" width="100%" border="0">
-<colgroup>
-<col width="150px" class="other_proto_type">
-<col class="other_proto_name">
-</colgroup>
-<tbody>
-<tr>
-<td class="define_keyword">#define</td>
-<td class="function_name"><a class="link" href="libdmapsharing-3.0-dmap-share.html#DMAP-STATUS-OK:CAPS" title="DMAP_STATUS_OK">DMAP_STATUS_OK</a></td>
-</tr>
-<tr>
-<td class="typedef_keyword">typedef</td>
-<td class="function_name"><a class="link" href="libdmapsharing-3.0-dmap-share.html#DMAPMetaDataMap" title="DMAPMetaDataMap">DMAPMetaDataMap</a></td>
-</tr>
-<tr>
-<td class="datatype_keyword">struct</td>
-<td class="function_name"><a class="link" href="libdmapsharing-3.0-dmap-share.html#MLCL-Bits" title="struct MLCL_Bits">MLCL_Bits</a></td>
-</tr>
-</tbody>
-</table></div>
-</div>
-<div class="refsect1">
-<a name="libdmapsharing-3.0-dmap-share.description"></a><h2>Description</h2>
-</div>
-<div class="refsect1">
-<a name="libdmapsharing-3.0-dmap-share.functions_details"></a><h2>Functions</h2>
-<div class="refsect2">
-<a name="get-desired-port"></a><h3>get_desired_port ()</h3>
-<pre class="programlisting"><span class="returnvalue">guint</span>
-<span class="c_punctuation">(</span>*get_desired_port<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">DMAPShare</span> *share</code></em>);</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="get-type-of-service"></a><h3>get_type_of_service ()</h3>
-<pre class="programlisting">const <span class="returnvalue">char</span> *
-<span class="c_punctuation">(</span>*get_type_of_service<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">DMAPShare</span> *share</code></em>);</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="message-add-standard-headers"></a><h3>message_add_standard_headers ()</h3>
-<pre class="programlisting"><span class="returnvalue">void</span>
-<span class="c_punctuation">(</span>*message_add_standard_headers<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">DMAPShare</span> *share</code></em>,
-                                 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupMessage.html#SoupMessage-struct"><span class="type">SoupMessage</span></a> *msg</code></em>);</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="add-entry-to-mlcl"></a><h3>add_entry_to_mlcl ()</h3>
-<pre class="programlisting"><span class="returnvalue">void</span>
-<span class="c_punctuation">(</span>*add_entry_to_mlcl<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">gpointer</span> id</code></em>,
-                      <em class="parameter"><code><a class="link" href="DMAPRecord.html" title="DMAPRecord"><span class="type">DMAPRecord</span></a> *record</code></em>,
-                      <em class="parameter"><code><span class="type">gpointer</span> mb</code></em>);</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="databases-browse-xxx"></a><h3>databases_browse_xxx ()</h3>
-<pre class="programlisting"><span class="returnvalue">void</span>
-<span class="c_punctuation">(</span>*databases_browse_xxx<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">DMAPShare</span> *share</code></em>,
-                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupServer.html#SoupServer-struct"><span class="type">SoupServer</span></a> *server</code></em>,
-                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupMessage.html#SoupMessage-struct"><span class="type">SoupMessage</span></a> *msg</code></em>,
-                         <em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
-                         <em class="parameter"><code><span class="type">GHashTable</span> *query</code></em>,
-                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupServer.html#SoupClientContext"><span class="type">SoupClientContext</span></a> *context</code></em>);</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="databases-items-xxx"></a><h3>databases_items_xxx ()</h3>
-<pre class="programlisting"><span class="returnvalue">void</span>
-<span class="c_punctuation">(</span>*databases_items_xxx<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">DMAPShare</span> *share</code></em>,
-                        <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupServer.html#SoupServer-struct"><span class="type">SoupServer</span></a> *server</code></em>,
-                        <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupMessage.html#SoupMessage-struct"><span class="type">SoupMessage</span></a> *msg</code></em>,
-                        <em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
-                        <em class="parameter"><code><span class="type">GHashTable</span> *query</code></em>,
-                        <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupServer.html#SoupClientContext"><span class="type">SoupClientContext</span></a> *context</code></em>);</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="server-info"></a><h3>server_info ()</h3>
-<pre class="programlisting"><span class="returnvalue">void</span>
-<span class="c_punctuation">(</span>*server_info<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">DMAPShare</span> *share</code></em>,
-                <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupServer.html#SoupServer-struct"><span class="type">SoupServer</span></a> *server</code></em>,
-                <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupMessage.html#SoupMessage-struct"><span class="type">SoupMessage</span></a> *message</code></em>,
-                <em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
-                <em class="parameter"><code><span class="type">GHashTable</span> *query</code></em>,
-                <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupServer.html#SoupClientContext"><span class="type">SoupClientContext</span></a> *ctx</code></em>);</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="content-codes"></a><h3>content_codes ()</h3>
-<pre class="programlisting"><span class="returnvalue">void</span>
-<span class="c_punctuation">(</span>*content_codes<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">DMAPShare</span> *share</code></em>,
-                  <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupServer.html#SoupServer-struct"><span class="type">SoupServer</span></a> *server</code></em>,
-                  <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupMessage.html#SoupMessage-struct"><span class="type">SoupMessage</span></a> *message</code></em>,
-                  <em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
-                  <em class="parameter"><code><span class="type">GHashTable</span> *query</code></em>,
-                  <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupServer.html#SoupClientContext"><span class="type">SoupClientContext</span></a> *ctx</code></em>);</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="login"></a><h3>login ()</h3>
-<pre class="programlisting"><span class="returnvalue">void</span>
-<span class="c_punctuation">(</span>*login<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">DMAPShare</span> *share</code></em>,
-          <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupServer.html#SoupServer-struct"><span class="type">SoupServer</span></a> *server</code></em>,
-          <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupMessage.html#SoupMessage-struct"><span class="type">SoupMessage</span></a> *message</code></em>,
-          <em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
-          <em class="parameter"><code><span class="type">GHashTable</span> *query</code></em>,
-          <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupServer.html#SoupClientContext"><span class="type">SoupClientContext</span></a> *ctx</code></em>);</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="logout"></a><h3>logout ()</h3>
-<pre class="programlisting"><span class="returnvalue">void</span>
-<span class="c_punctuation">(</span>*logout<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">DMAPShare</span> *share</code></em>,
-           <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupServer.html#SoupServer-struct"><span class="type">SoupServer</span></a> *server</code></em>,
-           <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupMessage.html#SoupMessage-struct"><span class="type">SoupMessage</span></a> *message</code></em>,
-           <em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
-           <em class="parameter"><code><span class="type">GHashTable</span> *query</code></em>,
-           <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupServer.html#SoupClientContext"><span class="type">SoupClientContext</span></a> *ctx</code></em>);</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="update"></a><h3>update ()</h3>
-<pre class="programlisting"><span class="returnvalue">void</span>
-<span class="c_punctuation">(</span>*update<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">DMAPShare</span> *share</code></em>,
-           <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupServer.html#SoupServer-struct"><span class="type">SoupServer</span></a> *server</code></em>,
-           <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupMessage.html#SoupMessage-struct"><span class="type">SoupMessage</span></a> *message</code></em>,
-           <em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
-           <em class="parameter"><code><span class="type">GHashTable</span> *query</code></em>,
-           <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupServer.html#SoupClientContext"><span class="type">SoupClientContext</span></a> *ctx</code></em>);</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="ctrl-int"></a><h3>ctrl_int ()</h3>
-<pre class="programlisting"><span class="returnvalue">void</span>
-<span class="c_punctuation">(</span>*ctrl_int<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">DMAPShare</span> *share</code></em>,
-             <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupServer.html#SoupServer-struct"><span class="type">SoupServer</span></a> *server</code></em>,
-             <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupMessage.html#SoupMessage-struct"><span class="type">SoupMessage</span></a> *message</code></em>,
-             <em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
-             <em class="parameter"><code><span class="type">GHashTable</span> *query</code></em>,
-             <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupServer.html#SoupClientContext"><span class="type">SoupClientContext</span></a> *ctx</code></em>);</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="published"></a><h3>published ()</h3>
-<pre class="programlisting"><span class="returnvalue">void</span>
-<span class="c_punctuation">(</span>*published<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">DMAPShare</span> *share</code></em>,
-              <em class="parameter"><code><span class="type">DMAPMdnsPublisher</span> *publisher</code></em>,
-              <em class="parameter"><code>const <span class="type">char</span> *name</code></em>);</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="name-collision"></a><h3>name_collision ()</h3>
-<pre class="programlisting"><span class="returnvalue">void</span>
-<span class="c_punctuation">(</span>*name_collision<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">DMAPShare</span> *share</code></em>,
-                   <em class="parameter"><code><span class="type">DMAPMdnsPublisher</span> *publisher</code></em>,
-                   <em class="parameter"><code>const <span class="type">char</span> *name</code></em>);</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="databases"></a><h3>databases ()</h3>
-<pre class="programlisting"><span class="returnvalue">void</span>
-<span class="c_punctuation">(</span>*databases<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">DMAPShare</span> *share</code></em>,
-              <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupServer.html#SoupServer-struct"><span class="type">SoupServer</span></a> *server</code></em>,
-              <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupMessage.html#SoupMessage-struct"><span class="type">SoupMessage</span></a> *message</code></em>,
-              <em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
-              <em class="parameter"><code><span class="type">GHashTable</span> *query</code></em>,
-              <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupServer.html#SoupClientContext"><span class="type">SoupClientContext</span></a> *context</code></em>);</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="dmap-share-free-filter"></a><h3>dmap_share_free_filter ()</h3>
-<pre class="programlisting"><span class="returnvalue">void</span>
-dmap_share_free_filter (<em class="parameter"><code><span class="type">GSList</span> *filter</code></em>);</pre>
-</div>
-</div>
-<div class="refsect1">
-<a name="libdmapsharing-3.0-dmap-share.other_details"></a><h2>Types and Values</h2>
-<div class="refsect2">
-<a name="DMAP-STATUS-OK:CAPS"></a><h3>DMAP_STATUS_OK</h3>
-<pre class="programlisting">#define DMAP_STATUS_OK 200
-</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="DMAPMetaDataMap"></a><h3>DMAPMetaDataMap</h3>
-<pre class="programlisting">typedef struct DMAPMetaDataMap DMAPMetaDataMap;
-</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="MLCL-Bits"></a><h3>struct MLCL_Bits</h3>
-<pre class="programlisting">struct MLCL_Bits {
-	GNode *mlcl;
-	bitwise bits;
-	DMAPShare *share;
-};
-</pre>
-</div>
-</div>
-</div>
-<div class="footer">
-<hr>Generated by GTK-Doc V1.32</div>
-</body>
-</html>
\ No newline at end of file
diff --git a/doc/html/libdmapsharing-3.0-dpap-connection.html b/doc/html/libdmapsharing-3.0-dpap-connection.html
deleted file mode 100644
index d837842..0000000
--- a/doc/html/libdmapsharing-3.0-dpap-connection.html
+++ /dev/null
@@ -1,70 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>dpap-connection: libdmapsharing-3.0 Reference Manual</title>
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
-<link rel="home" href="index.html" title="libdmapsharing-3.0 Reference Manual">
-<link rel="up" href="ch01.html" title="Libdmapsharing overview">
-<link rel="prev" href="libdmapsharing-3.0-dmap-share.html" title="dmap-share">
-<link rel="next" href="DPAPRecord.html" title="DPAPRecord">
-<meta name="generator" content="GTK-Doc V1.32 (XML mode)">
-<link rel="stylesheet" href="style.css" type="text/css">
-</head>
-<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
-<td width="100%" align="left" class="shortcuts">
-<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
-                  <a href="#libdmapsharing-3.0-dpap-connection.description" class="shortcut">Description</a></span>
-</td>
-<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
-<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
-<td><a accesskey="p" href="libdmapsharing-3.0-dmap-share.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="DPAPRecord.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
-</tr></table>
-<div class="refentry">
-<a name="libdmapsharing-3.0-dpap-connection"></a><div class="titlepage"></div>
-<div class="refnamediv"><table width="100%"><tr>
-<td valign="top">
-<h2><span class="refentrytitle"><a name="libdmapsharing-3.0-dpap-connection.top_of_page"></a>dpap-connection</span></h2>
-<p>dpap-connection</p>
-</td>
-<td class="gallery_image" valign="top" align="right"></td>
-</tr></table></div>
-<div class="refsect1">
-<a name="libdmapsharing-3.0-dpap-connection.functions"></a><h2>Functions</h2>
-<div class="informaltable"><table class="informaltable" width="100%" border="0">
-<colgroup>
-<col width="150px" class="functions_proto_type">
-<col class="functions_proto_name">
-</colgroup>
-<tbody><tr>
-<td class="function_type">
-<span class="returnvalue">DPAPConnection</span> *
-</td>
-<td class="function_name">
-<a class="link" href="libdmapsharing-3.0-dpap-connection.html#dpap-connection-new" title="dpap_connection_new ()">dpap_connection_new</a> <span class="c_punctuation">()</span>
-</td>
-</tr></tbody>
-</table></div>
-</div>
-<div class="refsect1">
-<a name="libdmapsharing-3.0-dpap-connection.description"></a><h2>Description</h2>
-</div>
-<div class="refsect1">
-<a name="libdmapsharing-3.0-dpap-connection.functions_details"></a><h2>Functions</h2>
-<div class="refsect2">
-<a name="dpap-connection-new"></a><h3>dpap_connection_new ()</h3>
-<pre class="programlisting"><span class="returnvalue">DPAPConnection</span> *
-dpap_connection_new (<em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
-                     <em class="parameter"><code>const <span class="type">char</span> *host</code></em>,
-                     <em class="parameter"><code><span class="type">guint</span> port</code></em>,
-                     <em class="parameter"><code><a class="link" href="DMAPDb.html" title="DMAPDb"><span class="type">DMAPDb</span></a> *db</code></em>,
-                     <em class="parameter"><code><a class="link" href="DMAPRecordFactory.html" title="DMAPRecordFactory"><span class="type">DMAPRecordFactory</span></a> *factory</code></em>);</pre>
-</div>
-</div>
-</div>
-<div class="footer">
-<hr>Generated by GTK-Doc V1.32</div>
-</body>
-</html>
\ No newline at end of file
diff --git a/doc/html/libdmapsharing-3.0-dpap-share.html b/doc/html/libdmapsharing-3.0-dpap-share.html
deleted file mode 100644
index 9decfa2..0000000
--- a/doc/html/libdmapsharing-3.0-dpap-share.html
+++ /dev/null
@@ -1,112 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>dpap-share: libdmapsharing-3.0 Reference Manual</title>
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
-<link rel="home" href="index.html" title="libdmapsharing-3.0 Reference Manual">
-<link rel="up" href="ch01.html" title="Libdmapsharing overview">
-<link rel="prev" href="DPAPRecord.html" title="DPAPRecord">
-<link rel="next" href="object-tree.html" title="Object Hierarchy">
-<meta name="generator" content="GTK-Doc V1.32 (XML mode)">
-<link rel="stylesheet" href="style.css" type="text/css">
-</head>
-<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
-<td width="100%" align="left" class="shortcuts">
-<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
-                  <a href="#libdmapsharing-3.0-dpap-share.description" class="shortcut">Description</a></span>
-</td>
-<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
-<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
-<td><a accesskey="p" href="DPAPRecord.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="object-tree.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
-</tr></table>
-<div class="refentry">
-<a name="libdmapsharing-3.0-dpap-share"></a><div class="titlepage"></div>
-<div class="refnamediv"><table width="100%"><tr>
-<td valign="top">
-<h2><span class="refentrytitle"><a name="libdmapsharing-3.0-dpap-share.top_of_page"></a>dpap-share</span></h2>
-<p>dpap-share</p>
-</td>
-<td class="gallery_image" valign="top" align="right"></td>
-</tr></table></div>
-<div class="refsect1">
-<a name="libdmapsharing-3.0-dpap-share.functions"></a><h2>Functions</h2>
-<div class="informaltable"><table class="informaltable" width="100%" border="0">
-<colgroup>
-<col width="150px" class="functions_proto_type">
-<col class="functions_proto_name">
-</colgroup>
-<tbody><tr>
-<td class="function_type">
-<span class="returnvalue">DPAPShare</span> *
-</td>
-<td class="function_name">
-<a class="link" href="libdmapsharing-3.0-dpap-share.html#dpap-share-new" title="dpap_share_new ()">dpap_share_new</a> <span class="c_punctuation">()</span>
-</td>
-</tr></tbody>
-</table></div>
-</div>
-<div class="refsect1">
-<a name="libdmapsharing-3.0-dpap-share.description"></a><h2>Description</h2>
-</div>
-<div class="refsect1">
-<a name="libdmapsharing-3.0-dpap-share.functions_details"></a><h2>Functions</h2>
-<div class="refsect2">
-<a name="dpap-share-new"></a><h3>dpap_share_new ()</h3>
-<pre class="programlisting"><span class="returnvalue">DPAPShare</span> *
-dpap_share_new (<em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
-                <em class="parameter"><code>const <span class="type">char</span> *password</code></em>,
-                <em class="parameter"><code><span class="type">gpointer</span> db</code></em>,
-                <em class="parameter"><code><span class="type">gpointer</span> container_db</code></em>,
-                <em class="parameter"><code><span class="type">gchar</span> *transcode_mimetype</code></em>);</pre>
-<p>Creates a new DPAP share and publishes it using mDNS.</p>
-<div class="refsect3">
-<a name="dpap-share-new.parameters"></a><h4>Parameters</h4>
-<div class="informaltable"><table class="informaltable" width="100%" border="0">
-<colgroup>
-<col width="150px" class="parameters_name">
-<col class="parameters_description">
-<col width="200px" class="parameters_annotations">
-</colgroup>
-<tbody>
-<tr>
-<td class="parameter_name"><p>name</p></td>
-<td class="parameter_description"><p>The name that will be published by mDNS.</p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-<tr>
-<td class="parameter_name"><p>password</p></td>
-<td class="parameter_description"><p>A share password or NULL.</p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-<tr>
-<td class="parameter_name"><p>db</p></td>
-<td class="parameter_description"><p>A media database.</p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-<tr>
-<td class="parameter_name"><p>container_db</p></td>
-<td class="parameter_description"><p>A container (album) database.</p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-<tr>
-<td class="parameter_name"><p>transcode_mimetype</p></td>
-<td class="parameter_description"><p>A transcode mimetype or NULL.</p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-<div class="refsect3">
-<a name="dpap-share-new.returns"></a><h4>Returns</h4>
-<p> a pointer to a DPAPShare.</p>
-</div>
-</div>
-</div>
-</div>
-<div class="footer">
-<hr>Generated by GTK-Doc V1.32</div>
-</body>
-</html>
\ No newline at end of file
diff --git a/doc/html/libdmapsharing-3.0.devhelp2 b/doc/html/libdmapsharing-3.0.devhelp2
deleted file mode 100644
index 56cb9e4..0000000
--- a/doc/html/libdmapsharing-3.0.devhelp2
+++ /dev/null
@@ -1,212 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="no"?>
-<book xmlns="http://www.devhelp.net/book" title="libdmapsharing-3.0 Reference Manual" link="index.html" author="" name="libdmapsharing-3.0" version="2" language="c" online="https://www.flyn.org/projects/libdmapsharing/doc/">
-  <chapters>
-    <sub name="Libdmapsharing overview" link="ch01.html">
-      <sub name="daap-connection" link="libdmapsharing-3.0-daap-connection.html"/>
-      <sub name="DAAPRecord" link="DAAPRecord.html"/>
-      <sub name="daap-share" link="libdmapsharing-3.0-daap-share.html"/>
-      <sub name="dacp-connection" link="libdmapsharing-3.0-dacp-connection.html"/>
-      <sub name="DACPPlayer" link="DACPPlayer.html"/>
-      <sub name="dacp-share" link="libdmapsharing-3.0-dacp-share.html"/>
-      <sub name="dmap-connection" link="libdmapsharing-3.0-dmap-connection.html"/>
-      <sub name="DMAPContainerDb" link="DMAPContainerDb.html"/>
-      <sub name="DMAPContainerRecord" link="DMAPContainerRecord.html"/>
-      <sub name="DMAPDb" link="DMAPDb.html"/>
-      <sub name="dmap-enums" link="libdmapsharing-3.0-dmap-enums.html"/>
-      <sub name="dmap-gst-input-stream" link="libdmapsharing-3.0-dmap-gst-input-stream.html"/>
-      <sub name="dmap-gst-mp3-input-stream" link="libdmapsharing-3.0-dmap-gst-mp3-input-stream.html"/>
-      <sub name="dmap-gst-wav-input-stream" link="libdmapsharing-3.0-dmap-gst-wav-input-stream.html"/>
-      <sub name="DMAPMdnsBrowser" link="DMAPMdnsBrowser.html"/>
-      <sub name="DMAPRecord" link="DMAPRecord.html"/>
-      <sub name="DMAPRecordFactory" link="DMAPRecordFactory.html"/>
-      <sub name="dmap-share" link="libdmapsharing-3.0-dmap-share.html"/>
-      <sub name="dpap-connection" link="libdmapsharing-3.0-dpap-connection.html"/>
-      <sub name="DPAPRecord" link="DPAPRecord.html"/>
-      <sub name="dpap-share" link="libdmapsharing-3.0-dpap-share.html"/>
-    </sub>
-    <sub name="Object Hierarchy" link="object-tree.html"/>
-    <sub name="API Index" link="api-index-full.html"/>
-    <sub name="Index of deprecated API" link="deprecated-api-index.html"/>
-    <sub name="Annotation Glossary" link="annotation-glossary.html"/>
-  </chapters>
-  <functions>
-    <keyword type="function" name="daap_connection_new ()" link="libdmapsharing-3.0-daap-connection.html#daap-connection-new"/>
-    <keyword type="function" name="daap_record_itunes_compat ()" link="DAAPRecord.html#daap-record-itunes-compat"/>
-    <keyword type="function" name="daap_record_read ()" link="DAAPRecord.html#daap-record-read"/>
-    <keyword type="function" name="daap_record_cmp_by_album ()" link="DAAPRecord.html#daap-record-cmp-by-album"/>
-    <keyword type="property" name="The “bitrate” property" link="DAAPRecord.html#DAAPRecord--bitrate"/>
-    <keyword type="property" name="The “disc” property" link="DAAPRecord.html#DAAPRecord--disc"/>
-    <keyword type="property" name="The “duration” property" link="DAAPRecord.html#DAAPRecord--duration"/>
-    <keyword type="property" name="The “filesize” property" link="DAAPRecord.html#DAAPRecord--filesize"/>
-    <keyword type="property" name="The “firstseen” property" link="DAAPRecord.html#DAAPRecord--firstseen"/>
-    <keyword type="property" name="The “format” property" link="DAAPRecord.html#DAAPRecord--format"/>
-    <keyword type="property" name="The “has-video” property" link="DAAPRecord.html#DAAPRecord--has-video"/>
-    <keyword type="property" name="The “hash” property" link="DAAPRecord.html#DAAPRecord--hash"/>
-    <keyword type="property" name="The “location” property" link="DAAPRecord.html#DAAPRecord--location"/>
-    <keyword type="property" name="The “mediakind” property" link="DAAPRecord.html#DAAPRecord--mediakind"/>
-    <keyword type="property" name="The “mtime” property" link="DAAPRecord.html#DAAPRecord--mtime"/>
-    <keyword type="property" name="The “rating” property" link="DAAPRecord.html#DAAPRecord--rating"/>
-    <keyword type="property" name="The “songalbum” property" link="DAAPRecord.html#DAAPRecord--songalbum"/>
-    <keyword type="property" name="The “songalbumid” property" link="DAAPRecord.html#DAAPRecord--songalbumid"/>
-    <keyword type="property" name="The “songartist” property" link="DAAPRecord.html#DAAPRecord--songartist"/>
-    <keyword type="property" name="The “songgenre” property" link="DAAPRecord.html#DAAPRecord--songgenre"/>
-    <keyword type="property" name="The “sort-album” property" link="DAAPRecord.html#DAAPRecord--sort-album"/>
-    <keyword type="property" name="The “sort-artist” property" link="DAAPRecord.html#DAAPRecord--sort-artist"/>
-    <keyword type="property" name="The “title” property" link="DAAPRecord.html#DAAPRecord--title"/>
-    <keyword type="property" name="The “track” property" link="DAAPRecord.html#DAAPRecord--track"/>
-    <keyword type="property" name="The “year” property" link="DAAPRecord.html#DAAPRecord--year"/>
-    <keyword type="function" name="daap_share_new ()" link="libdmapsharing-3.0-daap-share.html#daap-share-new"/>
-    <keyword type="function" name="dacp_connection_new ()" link="libdmapsharing-3.0-dacp-connection.html#dacp-connection-new"/>
-    <keyword type="function" name="dacp_player_now_playing_record ()" link="DACPPlayer.html#dacp-player-now-playing-record"/>
-    <keyword type="function" name="dacp_player_now_playing_artwork ()" link="DACPPlayer.html#dacp-player-now-playing-artwork"/>
-    <keyword type="function" name="dacp_player_play_pause ()" link="DACPPlayer.html#dacp-player-play-pause"/>
-    <keyword type="function" name="dacp_player_pause ()" link="DACPPlayer.html#dacp-player-pause"/>
-    <keyword type="function" name="dacp_player_next_item ()" link="DACPPlayer.html#dacp-player-next-item"/>
-    <keyword type="function" name="dacp_player_prev_item ()" link="DACPPlayer.html#dacp-player-prev-item"/>
-    <keyword type="function" name="dacp_player_cue_clear ()" link="DACPPlayer.html#dacp-player-cue-clear"/>
-    <keyword type="function" name="dacp_player_cue_play ()" link="DACPPlayer.html#dacp-player-cue-play"/>
-    <keyword type="enum" name="enum DACPRepeatState" link="DACPPlayer.html#DACPRepeatState"/>
-    <keyword type="enum" name="enum DACPPlayState" link="DACPPlayer.html#DACPPlayState"/>
-    <keyword type="property" name="The “play-state” property" link="DACPPlayer.html#DACPPlayer--play-state"/>
-    <keyword type="property" name="The “playing-time” property" link="DACPPlayer.html#DACPPlayer--playing-time"/>
-    <keyword type="property" name="The “repeat-state” property" link="DACPPlayer.html#DACPPlayer--repeat-state"/>
-    <keyword type="property" name="The “shuffle-state” property" link="DACPPlayer.html#DACPPlayer--shuffle-state"/>
-    <keyword type="property" name="The “volume” property" link="DACPPlayer.html#DACPPlayer--volume"/>
-    <keyword type="function" name="lookup_guid ()" link="libdmapsharing-3.0-dacp-share.html#lookup-guid"/>
-    <keyword type="function" name="add_guid ()" link="libdmapsharing-3.0-dacp-share.html#add-guid"/>
-    <keyword type="function" name="remote_found ()" link="libdmapsharing-3.0-dacp-share.html#remote-found"/>
-    <keyword type="function" name="remote_lost ()" link="libdmapsharing-3.0-dacp-share.html#remote-lost"/>
-    <keyword type="function" name="remote_paired ()" link="libdmapsharing-3.0-dacp-share.html#remote-paired"/>
-    <keyword type="function" name="dacp_share_new ()" link="libdmapsharing-3.0-dacp-share.html#dacp-share-new"/>
-    <keyword type="function" name="dacp_share_pair ()" link="libdmapsharing-3.0-dacp-share.html#dacp-share-pair"/>
-    <keyword type="function" name="dacp_share_start_lookup ()" link="libdmapsharing-3.0-dacp-share.html#dacp-share-start-lookup"/>
-    <keyword type="function" name="dacp_share_stop_lookup ()" link="libdmapsharing-3.0-dacp-share.html#dacp-share-stop-lookup"/>
-    <keyword type="function" name="dacp_share_player_updated ()" link="libdmapsharing-3.0-dacp-share.html#dacp-share-player-updated"/>
-    <keyword type="function" name="get_protocol_version_cc ()" link="libdmapsharing-3.0-dmap-connection.html#get-protocol-version-cc"/>
-    <keyword type="function" name="get_query_metadata ()" link="libdmapsharing-3.0-dmap-connection.html#get-query-metadata"/>
-    <keyword type="function" name="handle_mlcl ()" link="libdmapsharing-3.0-dmap-connection.html#handle-mlcl"/>
-    <keyword type="function" name="connected ()" link="libdmapsharing-3.0-dmap-connection.html#connected"/>
-    <keyword type="function" name="disconnected ()" link="libdmapsharing-3.0-dmap-connection.html#disconnected"/>
-    <keyword type="function" name="authenticate ()" link="libdmapsharing-3.0-dmap-connection.html#authenticate"/>
-    <keyword type="function" name="connecting ()" link="libdmapsharing-3.0-dmap-connection.html#connecting"/>
-    <keyword type="function" name="operation_done ()" link="libdmapsharing-3.0-dmap-connection.html#operation-done"/>
-    <keyword type="function" name="DMAPConnectionCallback ()" link="libdmapsharing-3.0-dmap-connection.html#DMAPConnectionCallback"/>
-    <keyword type="function" name="DMAPResponseHandler ()" link="libdmapsharing-3.0-dmap-connection.html#DMAPResponseHandler"/>
-    <keyword type="function" name="dmap_connection_is_connected ()" link="libdmapsharing-3.0-dmap-connection.html#dmap-connection-is-connected"/>
-    <keyword type="function" name="dmap_connection_setup ()" link="libdmapsharing-3.0-dmap-connection.html#dmap-connection-setup"/>
-    <keyword type="function" name="dmap_connection_connect ()" link="libdmapsharing-3.0-dmap-connection.html#dmap-connection-connect"/>
-    <keyword type="function" name="dmap_connection_disconnect ()" link="libdmapsharing-3.0-dmap-connection.html#dmap-connection-disconnect"/>
-    <keyword type="function" name="dmap_connection_get_headers ()" link="libdmapsharing-3.0-dmap-connection.html#dmap-connection-get-headers"/>
-    <keyword type="function" name="dmap_connection_get_playlists ()" link="libdmapsharing-3.0-dmap-connection.html#dmap-connection-get-playlists"/>
-    <keyword type="function" name="dmap_connection_build_message ()" link="libdmapsharing-3.0-dmap-connection.html#dmap-connection-build-message"/>
-    <keyword type="function" name="dmap_connection_authenticate_message ()" link="libdmapsharing-3.0-dmap-connection.html#dmap-connection-authenticate-message"/>
-    <keyword type="function" name="dmap_connection_get ()" link="libdmapsharing-3.0-dmap-connection.html#dmap-connection-get"/>
-    <keyword type="enum" name="enum DMAPConnectionState" link="libdmapsharing-3.0-dmap-connection.html#DMAPConnectionState"/>
-    <keyword type="function" name="dmap_container_db_add ()" link="DMAPContainerDb.html#dmap-container-db-add"/>
-    <keyword type="function" name="dmap_container_db_lookup_by_id ()" link="DMAPContainerDb.html#dmap-container-db-lookup-by-id"/>
-    <keyword type="function" name="dmap_container_db_foreach ()" link="DMAPContainerDb.html#dmap-container-db-foreach"/>
-    <keyword type="function" name="dmap_container_db_count ()" link="DMAPContainerDb.html#dmap-container-db-count"/>
-    <keyword type="function" name="dmap_container_record_get_id ()" link="DMAPContainerRecord.html#dmap-container-record-get-id"/>
-    <keyword type="function" name="dmap_container_record_add_entry ()" link="DMAPContainerRecord.html#dmap-container-record-add-entry"/>
-    <keyword type="function" name="dmap_container_record_get_entry_count ()" link="DMAPContainerRecord.html#dmap-container-record-get-entry-count"/>
-    <keyword type="function" name="dmap_container_record_get_entries ()" link="DMAPContainerRecord.html#dmap-container-record-get-entries"/>
-    <keyword type="property" name="The “name” property" link="DMAPContainerRecord.html#DMAPContainerRecord--name"/>
-    <keyword type="function" name="RecordGetValueFunc ()" link="DMAPDb.html#RecordGetValueFunc"/>
-    <keyword type="function" name="dmap_db_add ()" link="DMAPDb.html#dmap-db-add"/>
-    <keyword type="function" name="dmap_db_add_with_id ()" link="DMAPDb.html#dmap-db-add-with-id"/>
-    <keyword type="function" name="dmap_db_add_path ()" link="DMAPDb.html#dmap-db-add-path"/>
-    <keyword type="function" name="dmap_db_lookup_by_id ()" link="DMAPDb.html#dmap-db-lookup-by-id"/>
-    <keyword type="function" name="dmap_db_lookup_id_by_location ()" link="DMAPDb.html#dmap-db-lookup-id-by-location"/>
-    <keyword type="function" name="dmap_db_foreach ()" link="DMAPDb.html#dmap-db-foreach"/>
-    <keyword type="function" name="dmap_db_count ()" link="DMAPDb.html#dmap-db-count"/>
-    <keyword type="function" name="dmap_db_apply_filter ()" link="DMAPDb.html#dmap-db-apply-filter"/>
-    <keyword type="function" name="kill_pipeline ()" link="libdmapsharing-3.0-dmap-gst-input-stream.html#kill-pipeline"/>
-    <keyword type="function" name="dmap_gst_input_stream_new ()" link="libdmapsharing-3.0-dmap-gst-input-stream.html#dmap-gst-input-stream-new"/>
-    <keyword type="function" name="dmapd_input_stream_strdup_format_extension ()" link="libdmapsharing-3.0-dmap-gst-input-stream.html#dmapd-input-stream-strdup-format-extension"/>
-    <keyword type="function" name="dmap_gst_mp3_input_stream_new ()" link="libdmapsharing-3.0-dmap-gst-mp3-input-stream.html#dmap-gst-mp3-input-stream-new"/>
-    <keyword type="function" name="dmap_gst_wav_input_stream_new ()" link="libdmapsharing-3.0-dmap-gst-wav-input-stream.html#dmap-gst-wav-input-stream-new"/>
-    <keyword type="function" name="dmap_mdns_browser_error_quark ()" link="DMAPMdnsBrowser.html#dmap-mdns-browser-error-quark"/>
-    <keyword type="function" name="dmap_mdns_browser_new ()" link="DMAPMdnsBrowser.html#dmap-mdns-browser-new"/>
-    <keyword type="function" name="dmap_mdns_browser_start ()" link="DMAPMdnsBrowser.html#dmap-mdns-browser-start"/>
-    <keyword type="function" name="dmap_mdns_browser_stop ()" link="DMAPMdnsBrowser.html#dmap-mdns-browser-stop"/>
-    <keyword type="function" name="dmap_mdns_browser_get_services ()" link="DMAPMdnsBrowser.html#dmap-mdns-browser-get-services"/>
-    <keyword type="function" name="dmap_mdns_browser_get_service_type ()" link="DMAPMdnsBrowser.html#dmap-mdns-browser-get-service-type"/>
-    <keyword type="enum" name="enum DMAPMdnsBrowserServiceType" link="DMAPMdnsBrowser.html#DMAPMdnsBrowserServiceType"/>
-    <keyword type="enum" name="enum DMAPMdnsBrowserTransportProtocol" link="DMAPMdnsBrowser.html#DMAPMdnsBrowserTransportProtocol"/>
-    <keyword type="enum" name="enum DMAPMdnsBrowserError" link="DMAPMdnsBrowser.html#DMAPMdnsBrowserError"/>
-    <keyword type="struct" name="struct DMAPMdnsBrowserService" link="DMAPMdnsBrowser.html#DMAPMdnsBrowserService"/>
-    <keyword type="struct" name="struct DMAPMdnsBrowser" link="DMAPMdnsBrowser.html#DMAPMdnsBrowser-struct"/>
-    <keyword type="macro" name="DMAP_MDNS_BROWSER_ERROR" link="DMAPMdnsBrowser.html#DMAP-MDNS-BROWSER-ERROR:CAPS"/>
-    <keyword type="signal" name="The “service-added” signal" link="DMAPMdnsBrowser.html#DMAPMdnsBrowser-service-added"/>
-    <keyword type="signal" name="The “service-removed” signal" link="DMAPMdnsBrowser.html#DMAPMdnsBrowser-service-removed"/>
-    <keyword type="function" name="dmap_record_to_blob ()" link="DMAPRecord.html#dmap-record-to-blob"/>
-    <keyword type="function" name="dmap_record_set_from_blob ()" link="DMAPRecord.html#dmap-record-set-from-blob"/>
-    <keyword type="typedef" name="bitwise" link="DMAPRecord.html#bitwise"/>
-    <keyword type="enum" name="enum DMAPMediaKind" link="DMAPRecord.html#DMAPMediaKind"/>
-    <keyword type="function" name="dmap_record_factory_create ()" link="DMAPRecordFactory.html#dmap-record-factory-create"/>
-    <keyword type="function" name="get_desired_port ()" link="libdmapsharing-3.0-dmap-share.html#get-desired-port"/>
-    <keyword type="function" name="get_type_of_service ()" link="libdmapsharing-3.0-dmap-share.html#get-type-of-service"/>
-    <keyword type="function" name="message_add_standard_headers ()" link="libdmapsharing-3.0-dmap-share.html#message-add-standard-headers"/>
-    <keyword type="function" name="add_entry_to_mlcl ()" link="libdmapsharing-3.0-dmap-share.html#add-entry-to-mlcl"/>
-    <keyword type="function" name="databases_browse_xxx ()" link="libdmapsharing-3.0-dmap-share.html#databases-browse-xxx"/>
-    <keyword type="function" name="databases_items_xxx ()" link="libdmapsharing-3.0-dmap-share.html#databases-items-xxx"/>
-    <keyword type="function" name="server_info ()" link="libdmapsharing-3.0-dmap-share.html#server-info"/>
-    <keyword type="function" name="content_codes ()" link="libdmapsharing-3.0-dmap-share.html#content-codes"/>
-    <keyword type="function" name="login ()" link="libdmapsharing-3.0-dmap-share.html#login"/>
-    <keyword type="function" name="logout ()" link="libdmapsharing-3.0-dmap-share.html#logout"/>
-    <keyword type="function" name="update ()" link="libdmapsharing-3.0-dmap-share.html#update"/>
-    <keyword type="function" name="ctrl_int ()" link="libdmapsharing-3.0-dmap-share.html#ctrl-int"/>
-    <keyword type="function" name="published ()" link="libdmapsharing-3.0-dmap-share.html#published"/>
-    <keyword type="function" name="name_collision ()" link="libdmapsharing-3.0-dmap-share.html#name-collision"/>
-    <keyword type="function" name="databases ()" link="libdmapsharing-3.0-dmap-share.html#databases"/>
-    <keyword type="function" name="dmap_share_free_filter ()" link="libdmapsharing-3.0-dmap-share.html#dmap-share-free-filter"/>
-    <keyword type="macro" name="DMAP_STATUS_OK" link="libdmapsharing-3.0-dmap-share.html#DMAP-STATUS-OK:CAPS"/>
-    <keyword type="typedef" name="DMAPMetaDataMap" link="libdmapsharing-3.0-dmap-share.html#DMAPMetaDataMap"/>
-    <keyword type="struct" name="struct MLCL_Bits" link="libdmapsharing-3.0-dmap-share.html#MLCL-Bits"/>
-    <keyword type="function" name="dpap_connection_new ()" link="libdmapsharing-3.0-dpap-connection.html#dpap-connection-new"/>
-    <keyword type="function" name="dpap_record_read ()" link="DPAPRecord.html#dpap-record-read"/>
-    <keyword type="property" name="The “aspect-ratio” property" link="DPAPRecord.html#DPAPRecord--aspect-ratio"/>
-    <keyword type="property" name="The “comments” property" link="DPAPRecord.html#DPAPRecord--comments"/>
-    <keyword type="property" name="The “creation-date” property" link="DPAPRecord.html#DPAPRecord--creation-date"/>
-    <keyword type="property" name="The “filename” property" link="DPAPRecord.html#DPAPRecord--filename"/>
-    <keyword type="property" name="The “format” property" link="DPAPRecord.html#DPAPRecord--format"/>
-    <keyword type="property" name="The “hash” property" link="DPAPRecord.html#DPAPRecord--hash"/>
-    <keyword type="property" name="The “large-filesize” property" link="DPAPRecord.html#DPAPRecord--large-filesize"/>
-    <keyword type="property" name="The “location” property" link="DPAPRecord.html#DPAPRecord--location"/>
-    <keyword type="property" name="The “pixel-height” property" link="DPAPRecord.html#DPAPRecord--pixel-height"/>
-    <keyword type="property" name="The “pixel-width” property" link="DPAPRecord.html#DPAPRecord--pixel-width"/>
-    <keyword type="property" name="The “rating” property" link="DPAPRecord.html#DPAPRecord--rating"/>
-    <keyword type="property" name="The “thumbnail” property" link="DPAPRecord.html#DPAPRecord--thumbnail"/>
-    <keyword type="function" name="dpap_share_new ()" link="libdmapsharing-3.0-dpap-share.html#dpap-share-new"/>
-    <keyword type="constant" name="DACP_REPEAT_NONE" link="DACPPlayer.html#DACP-REPEAT-NONE:CAPS"/>
-    <keyword type="constant" name="DACP_REPEAT_SINGLE" link="DACPPlayer.html#DACP-REPEAT-SINGLE:CAPS"/>
-    <keyword type="constant" name="DACP_REPEAT_ALL" link="DACPPlayer.html#DACP-REPEAT-ALL:CAPS"/>
-    <keyword type="constant" name="DACP_PLAY_STOPPED" link="DACPPlayer.html#DACP-PLAY-STOPPED:CAPS"/>
-    <keyword type="constant" name="DACP_PLAY_PAUSED" link="DACPPlayer.html#DACP-PLAY-PAUSED:CAPS"/>
-    <keyword type="constant" name="DACP_PLAY_PLAYING" link="DACPPlayer.html#DACP-PLAY-PLAYING:CAPS"/>
-    <keyword type="constant" name="DMAP_GET_INFO" link="libdmapsharing-3.0-dmap-connection.html#DMAP-GET-INFO:CAPS"/>
-    <keyword type="constant" name="DMAP_LOGIN" link="libdmapsharing-3.0-dmap-connection.html#DMAP-LOGIN:CAPS"/>
-    <keyword type="constant" name="DMAP_GET_REVISION_NUMBER" link="libdmapsharing-3.0-dmap-connection.html#DMAP-GET-REVISION-NUMBER:CAPS"/>
-    <keyword type="constant" name="DMAP_GET_DB_INFO" link="libdmapsharing-3.0-dmap-connection.html#DMAP-GET-DB-INFO:CAPS"/>
-    <keyword type="constant" name="DMAP_GET_SONGS" link="libdmapsharing-3.0-dmap-connection.html#DMAP-GET-SONGS:CAPS"/>
-    <keyword type="constant" name="DMAP_GET_PLAYLISTS" link="libdmapsharing-3.0-dmap-connection.html#DMAP-GET-PLAYLISTS:CAPS"/>
-    <keyword type="constant" name="DMAP_GET_PLAYLIST_ENTRIES" link="libdmapsharing-3.0-dmap-connection.html#DMAP-GET-PLAYLIST-ENTRIES:CAPS"/>
-    <keyword type="constant" name="DMAP_LOGOUT" link="libdmapsharing-3.0-dmap-connection.html#DMAP-LOGOUT:CAPS"/>
-    <keyword type="constant" name="DMAP_DONE" link="libdmapsharing-3.0-dmap-connection.html#DMAP-DONE:CAPS"/>
-    <keyword type="constant" name="DMAP_MDNS_BROWSER_SERVICE_TYPE_INVALID" link="DMAPMdnsBrowser.html#DMAP-MDNS-BROWSER-SERVICE-TYPE-INVALID:CAPS"/>
-    <keyword type="constant" name="DMAP_MDNS_BROWSER_SERVICE_TYPE_DAAP" link="DMAPMdnsBrowser.html#DMAP-MDNS-BROWSER-SERVICE-TYPE-DAAP:CAPS"/>
-    <keyword type="constant" name="DMAP_MDNS_BROWSER_SERVICE_TYPE_DPAP" link="DMAPMdnsBrowser.html#DMAP-MDNS-BROWSER-SERVICE-TYPE-DPAP:CAPS"/>
-    <keyword type="constant" name="DMAP_MDNS_BROWSER_SERVICE_TYPE_DACP" link="DMAPMdnsBrowser.html#DMAP-MDNS-BROWSER-SERVICE-TYPE-DACP:CAPS"/>
-    <keyword type="constant" name="DMAP_MDNS_BROWSER_SERVICE_TYPE_RAOP" link="DMAPMdnsBrowser.html#DMAP-MDNS-BROWSER-SERVICE-TYPE-RAOP:CAPS"/>
-    <keyword type="constant" name="DMAP_MDNS_BROWSER_SERVICE_TYPE_LAST" link="DMAPMdnsBrowser.html#DMAP-MDNS-BROWSER-SERVICE-TYPE-LAST:CAPS"/>
-    <keyword type="constant" name="DMAP_MDNS_BROWSER_TRANSPORT_PROTOCOL_TCP" link="DMAPMdnsBrowser.html#DMAP-MDNS-BROWSER-TRANSPORT-PROTOCOL-TCP:CAPS"/>
-    <keyword type="constant" name="DMAP_MDNS_BROWSER_TRANSPORT_PROTOCOL_UDP" link="DMAPMdnsBrowser.html#DMAP-MDNS-BROWSER-TRANSPORT-PROTOCOL-UDP:CAPS"/>
-    <keyword type="constant" name="DMAP_MDNS_BROWSER_TRANSPORT_PROTOCOL_LAST" link="DMAPMdnsBrowser.html#DMAP-MDNS-BROWSER-TRANSPORT-PROTOCOL-LAST:CAPS"/>
-    <keyword type="constant" name="DMAP_MDNS_BROWSER_ERROR_NOT_RUNNING" link="DMAPMdnsBrowser.html#DMAP-MDNS-BROWSER-ERROR-NOT-RUNNING:CAPS"/>
-    <keyword type="constant" name="DMAP_MDNS_BROWSER_ERROR_FAILED" link="DMAPMdnsBrowser.html#DMAP-MDNS-BROWSER-ERROR-FAILED:CAPS"/>
-    <keyword type="constant" name="DMAP_MEDIA_KIND_MUSIC" link="DMAPRecord.html#DMAP-MEDIA-KIND-MUSIC:CAPS"/>
-    <keyword type="constant" name="DMAP_MEDIA_KIND_MOVIE" link="DMAPRecord.html#DMAP-MEDIA-KIND-MOVIE:CAPS"/>
-    <keyword type="constant" name="DMAP_MEDIA_KIND_PODCAST" link="DMAPRecord.html#DMAP-MEDIA-KIND-PODCAST:CAPS"/>
-    <keyword type="constant" name="DMAP_MEDIA_KIND_TV_SHOW" link="DMAPRecord.html#DMAP-MEDIA-KIND-TV-SHOW:CAPS"/>
-  </functions>
-</book>
diff --git a/doc/html/libdmapsharing-4.0-dmap-cc.html b/doc/html/libdmapsharing-4.0-dmap-cc.html
new file mode 100644
index 0000000..954196c
--- /dev/null
+++ b/doc/html/libdmapsharing-4.0-dmap-cc.html
@@ -0,0 +1,908 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>dmap-cc: libdmapsharing Reference Manual</title>
+<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
+<link rel="home" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="up" href="ch04.html" title="Libdmapsharing Objects and Interfaces">
+<link rel="prev" href="DmapAvShare.html" title="DmapAvShare">
+<link rel="next" href="DmapConnection.html" title="DmapConnection">
+<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
+<td width="100%" align="left" class="shortcuts">
+<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
+                  <a href="#libdmapsharing-4.0-dmap-cc.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
+                  <a href="#libdmapsharing-4.0-dmap-cc.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
+</td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
+<td><a accesskey="u" href="ch04.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="DmapAvShare.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="DmapConnection.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="refentry">
+<a name="libdmapsharing-4.0-dmap-cc"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="libdmapsharing-4.0-dmap-cc.top_of_page"></a>dmap-cc</span></h2>
+<p>dmap-cc</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="libdmapsharing-4.0-dmap-cc.other"></a><h2>Types and Values</h2>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="other_proto_type">
+<col class="other_proto_name">
+</colgroup>
+<tbody><tr>
+<td class="datatype_keyword">enum</td>
+<td class="function_name"><a class="link" href="libdmapsharing-4.0-dmap-cc.html#DmapContentCode" title="enum DmapContentCode">DmapContentCode</a></td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="libdmapsharing-4.0-dmap-cc.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<pre class="screen">    <a href="/usr/share/gtk-doc/html/gobject/gobject-Enumeration-and-Flag-Types.html">GEnum</a>
+    <span class="lineart">╰──</span> DmapContentCode
+</pre>
+</div>
+<div class="refsect1">
+<a name="libdmapsharing-4.0-dmap-cc.description"></a><h2>Description</h2>
+</div>
+<div class="refsect1">
+<a name="libdmapsharing-4.0-dmap-cc.functions_details"></a><h2>Functions</h2>
+<p></p>
+</div>
+<div class="refsect1">
+<a name="libdmapsharing-4.0-dmap-cc.other_details"></a><h2>Types and Values</h2>
+<div class="refsect2">
+<a name="DmapContentCode"></a><h3>enum DmapContentCode</h3>
+<div class="refsect3">
+<a name="DmapContentCode.members"></a><h4>Members</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="300px" class="enum_members_name">
+<col class="enum_members_description">
+<col width="200px" class="enum_members_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-INVALID:CAPS"></a>DMAP_CC_INVALID</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-RAW:CAPS"></a>DMAP_RAW</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MDCL:CAPS"></a>DMAP_CC_MDCL</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MEDS:CAPS"></a>DMAP_CC_MEDS</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MSTT:CAPS"></a>DMAP_CC_MSTT</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MIID:CAPS"></a>DMAP_CC_MIID</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MINM:CAPS"></a>DMAP_CC_MINM</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MIKD:CAPS"></a>DMAP_CC_MIKD</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MPER:CAPS"></a>DMAP_CC_MPER</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MCON:CAPS"></a>DMAP_CC_MCON</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MCTI:CAPS"></a>DMAP_CC_MCTI</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MPCO:CAPS"></a>DMAP_CC_MPCO</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MSTS:CAPS"></a>DMAP_CC_MSTS</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MIMC:CAPS"></a>DMAP_CC_MIMC</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MCTC:CAPS"></a>DMAP_CC_MCTC</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MRCO:CAPS"></a>DMAP_CC_MRCO</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MTCO:CAPS"></a>DMAP_CC_MTCO</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MLCL:CAPS"></a>DMAP_CC_MLCL</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MLIT:CAPS"></a>DMAP_CC_MLIT</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MBCL:CAPS"></a>DMAP_CC_MBCL</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MSRV:CAPS"></a>DMAP_CC_MSRV</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MSAU:CAPS"></a>DMAP_CC_MSAU</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MSLR:CAPS"></a>DMAP_CC_MSLR</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MPRO:CAPS"></a>DMAP_CC_MPRO</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MSAL:CAPS"></a>DMAP_CC_MSAL</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MSUP:CAPS"></a>DMAP_CC_MSUP</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MSPI:CAPS"></a>DMAP_CC_MSPI</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MSEX:CAPS"></a>DMAP_CC_MSEX</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MSBR:CAPS"></a>DMAP_CC_MSBR</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MSQY:CAPS"></a>DMAP_CC_MSQY</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MSIX:CAPS"></a>DMAP_CC_MSIX</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MSRS:CAPS"></a>DMAP_CC_MSRS</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MSTM:CAPS"></a>DMAP_CC_MSTM</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MSDC:CAPS"></a>DMAP_CC_MSDC</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MCCR:CAPS"></a>DMAP_CC_MCCR</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MCNM:CAPS"></a>DMAP_CC_MCNM</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MCNA:CAPS"></a>DMAP_CC_MCNA</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MCTY:CAPS"></a>DMAP_CC_MCTY</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MLOG:CAPS"></a>DMAP_CC_MLOG</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MLID:CAPS"></a>DMAP_CC_MLID</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MUPD:CAPS"></a>DMAP_CC_MUPD</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MUSR:CAPS"></a>DMAP_CC_MUSR</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MUTY:CAPS"></a>DMAP_CC_MUTY</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MUDL:CAPS"></a>DMAP_CC_MUDL</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MSMA:CAPS"></a>DMAP_CC_MSMA</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-FQUESCH:CAPS"></a>DMAP_CC_FQUESCH</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MDBK:CAPS"></a>DMAP_CC_MDBK</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-APRO:CAPS"></a>DMAP_CC_APRO</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-AVDB:CAPS"></a>DMAP_CC_AVDB</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-ABRO:CAPS"></a>DMAP_CC_ABRO</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-ABAL:CAPS"></a>DMAP_CC_ABAL</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-ABAR:CAPS"></a>DMAP_CC_ABAR</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-ABCP:CAPS"></a>DMAP_CC_ABCP</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-ABGN:CAPS"></a>DMAP_CC_ABGN</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-ADBS:CAPS"></a>DMAP_CC_ADBS</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-ASAL:CAPS"></a>DMAP_CC_ASAL</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-ASAI:CAPS"></a>DMAP_CC_ASAI</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-ASAA:CAPS"></a>DMAP_CC_ASAA</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-ASAR:CAPS"></a>DMAP_CC_ASAR</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-ASBT:CAPS"></a>DMAP_CC_ASBT</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-ASBR:CAPS"></a>DMAP_CC_ASBR</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-ASCM:CAPS"></a>DMAP_CC_ASCM</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-ASCO:CAPS"></a>DMAP_CC_ASCO</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-ASDA:CAPS"></a>DMAP_CC_ASDA</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-ASDM:CAPS"></a>DMAP_CC_ASDM</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-ASDC:CAPS"></a>DMAP_CC_ASDC</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-ASDN:CAPS"></a>DMAP_CC_ASDN</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-ASDB:CAPS"></a>DMAP_CC_ASDB</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-ASEQ:CAPS"></a>DMAP_CC_ASEQ</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-ASFM:CAPS"></a>DMAP_CC_ASFM</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-ASGN:CAPS"></a>DMAP_CC_ASGN</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-ASDT:CAPS"></a>DMAP_CC_ASDT</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-ASRV:CAPS"></a>DMAP_CC_ASRV</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-ASSR:CAPS"></a>DMAP_CC_ASSR</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-ASSZ:CAPS"></a>DMAP_CC_ASSZ</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-ASST:CAPS"></a>DMAP_CC_ASST</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-ASSP:CAPS"></a>DMAP_CC_ASSP</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-ASTM:CAPS"></a>DMAP_CC_ASTM</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-ASTC:CAPS"></a>DMAP_CC_ASTC</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-ASTN:CAPS"></a>DMAP_CC_ASTN</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-ASUR:CAPS"></a>DMAP_CC_ASUR</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-ASYR:CAPS"></a>DMAP_CC_ASYR</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-ASDK:CAPS"></a>DMAP_CC_ASDK</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-ASUL:CAPS"></a>DMAP_CC_ASUL</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-ASSU:CAPS"></a>DMAP_CC_ASSU</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-ASSA:CAPS"></a>DMAP_CC_ASSA</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-APLY:CAPS"></a>DMAP_CC_APLY</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-ABPL:CAPS"></a>DMAP_CC_ABPL</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-APSO:CAPS"></a>DMAP_CC_APSO</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-PRSV:CAPS"></a>DMAP_CC_PRSV</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-ARIF:CAPS"></a>DMAP_CC_ARIF</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MSAS:CAPS"></a>DMAP_CC_MSAS</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-AGRP:CAPS"></a>DMAP_CC_AGRP</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-AGAL:CAPS"></a>DMAP_CC_AGAL</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-ASCP:CAPS"></a>DMAP_CC_ASCP</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-PPRO:CAPS"></a>DMAP_CC_PPRO</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-PASP:CAPS"></a>DMAP_CC_PASP</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-PFDT:CAPS"></a>DMAP_CC_PFDT</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-PICD:CAPS"></a>DMAP_CC_PICD</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-PIMF:CAPS"></a>DMAP_CC_PIMF</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-PFMT:CAPS"></a>DMAP_CC_PFMT</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-PIFS:CAPS"></a>DMAP_CC_PIFS</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-PLSZ:CAPS"></a>DMAP_CC_PLSZ</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-PHGT:CAPS"></a>DMAP_CC_PHGT</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-PWTH:CAPS"></a>DMAP_CC_PWTH</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-PRAT:CAPS"></a>DMAP_CC_PRAT</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-PCMT:CAPS"></a>DMAP_CC_PCMT</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-PRET:CAPS"></a>DMAP_CC_PRET</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-AECS:CAPS"></a>DMAP_CC_AECS</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-AESV:CAPS"></a>DMAP_CC_AESV</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-AEHV:CAPS"></a>DMAP_CC_AEHV</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-AESP:CAPS"></a>DMAP_CC_AESP</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-AEPP:CAPS"></a>DMAP_CC_AEPP</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-AEPS:CAPS"></a>DMAP_CC_AEPS</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-AESG:CAPS"></a>DMAP_CC_AESG</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-AEMK:CAPS"></a>DMAP_CC_AEMK</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-AEMK2:CAPS"></a>DMAP_CC_AEMK2</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-AEFP:CAPS"></a>DMAP_CC_AEFP</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-ATED:CAPS"></a>DMAP_CC_ATED</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-ASGR:CAPS"></a>DMAP_CC_ASGR</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-AEMQ:CAPS"></a>DMAP_CC_AEMQ</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-AESL:CAPS"></a>DMAP_CC_AESL</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-AESR:CAPS"></a>DMAP_CC_AESR</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-AETR:CAPS"></a>DMAP_CC_AETR</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-MSED:CAPS"></a>DMAP_CC_MSED</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-CMPA:CAPS"></a>DMAP_CC_CMPA</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-CMNM:CAPS"></a>DMAP_CC_CMNM</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-CMTY:CAPS"></a>DMAP_CC_CMTY</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-CMPG:CAPS"></a>DMAP_CC_CMPG</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-CACI:CAPS"></a>DMAP_CC_CACI</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-CAPS"></a>DMAP_CC_CAPS</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-CASH:CAPS"></a>DMAP_CC_CASH</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-CARP:CAPS"></a>DMAP_CC_CARP</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-CAAS:CAPS"></a>DMAP_CC_CAAS</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-CAAR:CAPS"></a>DMAP_CC_CAAR</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-CAIA:CAPS"></a>DMAP_CC_CAIA</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-CANP:CAPS"></a>DMAP_CC_CANP</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-CANN:CAPS"></a>DMAP_CC_CANN</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-CANA:CAPS"></a>DMAP_CC_CANA</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-CANL:CAPS"></a>DMAP_CC_CANL</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-CANG:CAPS"></a>DMAP_CC_CANG</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-CANT:CAPS"></a>DMAP_CC_CANT</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-CASP:CAPS"></a>DMAP_CC_CASP</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-CASS:CAPS"></a>DMAP_CC_CASS</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-CAST:CAPS"></a>DMAP_CC_CAST</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-CASU:CAPS"></a>DMAP_CC_CASU</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-CASG:CAPS"></a>DMAP_CC_CASG</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-CACR:CAPS"></a>DMAP_CC_CACR</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-CMCP:CAPS"></a>DMAP_CC_CMCP</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-CMGT:CAPS"></a>DMAP_CC_CMGT</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-CMIK:CAPS"></a>DMAP_CC_CMIK</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-CMSP:CAPS"></a>DMAP_CC_CMSP</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-CMST:CAPS"></a>DMAP_CC_CMST</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-CMSV:CAPS"></a>DMAP_CC_CMSV</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-CMSR:CAPS"></a>DMAP_CC_CMSR</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-CMMK:CAPS"></a>DMAP_CC_CMMK</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-CMVO:CAPS"></a>DMAP_CC_CMVO</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-CMPR:CAPS"></a>DMAP_CC_CMPR</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-CAPR:CAPS"></a>DMAP_CC_CAPR</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-AEFR:CAPS"></a>DMAP_CC_AEFR</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-CAOV:CAPS"></a>DMAP_CC_CAOV</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-CMRL:CAPS"></a>DMAP_CC_CMRL</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-CAHP:CAPS"></a>DMAP_CC_CAHP</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-CAIV:CAPS"></a>DMAP_CC_CAIV</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="DMAP-CC-CAVC:CAPS"></a>DMAP_CC_CAVC</p></td>
+<td> </td>
+<td> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.33.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/libdmapsharing-3.0-dmap-enums.html b/doc/html/libdmapsharing-4.0-dmap-enums.html
similarity index 55%
rename from doc/html/libdmapsharing-3.0-dmap-enums.html
rename to doc/html/libdmapsharing-4.0-dmap-enums.html
index 29801fb..21f9c8b 100644
--- a/doc/html/libdmapsharing-3.0-dmap-enums.html
+++ b/doc/html/libdmapsharing-4.0-dmap-enums.html
@@ -2,44 +2,44 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>dmap-enums: libdmapsharing-3.0 Reference Manual</title>
+<title>dmap-enums: libdmapsharing Reference Manual</title>
 <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
-<link rel="home" href="index.html" title="libdmapsharing-3.0 Reference Manual">
-<link rel="up" href="ch01.html" title="Libdmapsharing overview">
-<link rel="prev" href="DMAPDb.html" title="DMAPDb">
-<link rel="next" href="libdmapsharing-3.0-dmap-gst-input-stream.html" title="dmap-gst-input-stream">
-<meta name="generator" content="GTK-Doc V1.32 (XML mode)">
+<link rel="home" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="up" href="ch04.html" title="Libdmapsharing Objects and Interfaces">
+<link rel="prev" href="DmapDb.html" title="DmapDb">
+<link rel="next" href="DmapTranscodeStream.html" title="DmapTranscodeStream">
+<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
 <td width="100%" align="left" class="shortcuts">
 <a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
-                  <a href="#libdmapsharing-3.0-dmap-enums.description" class="shortcut">Description</a></span>
+                  <a href="#libdmapsharing-4.0-dmap-enums.description" class="shortcut">Description</a></span>
 </td>
 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
-<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
-<td><a accesskey="p" href="DMAPDb.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="libdmapsharing-3.0-dmap-gst-input-stream.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+<td><a accesskey="u" href="ch04.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="DmapDb.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="DmapTranscodeStream.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
 </tr></table>
 <div class="refentry">
-<a name="libdmapsharing-3.0-dmap-enums"></a><div class="titlepage"></div>
+<a name="libdmapsharing-4.0-dmap-enums"></a><div class="titlepage"></div>
 <div class="refnamediv"><table width="100%"><tr>
 <td valign="top">
-<h2><span class="refentrytitle"><a name="libdmapsharing-3.0-dmap-enums.top_of_page"></a>dmap-enums</span></h2>
+<h2><span class="refentrytitle"><a name="libdmapsharing-4.0-dmap-enums.top_of_page"></a>dmap-enums</span></h2>
 <p>dmap-enums</p>
 </td>
 <td class="gallery_image" valign="top" align="right"></td>
 </tr></table></div>
 <div class="refsect1">
-<a name="libdmapsharing-3.0-dmap-enums.description"></a><h2>Description</h2>
+<a name="libdmapsharing-4.0-dmap-enums.description"></a><h2>Description</h2>
 </div>
 <div class="refsect1">
-<a name="libdmapsharing-3.0-dmap-enums.functions_details"></a><h2>Functions</h2>
+<a name="libdmapsharing-4.0-dmap-enums.functions_details"></a><h2>Functions</h2>
 <p></p>
 </div>
 </div>
 <div class="footer">
-<hr>Generated by GTK-Doc V1.32</div>
+<hr>Generated by GTK-Doc V1.33.1</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/doc/html/libdmapsharing-4.0-dmap-md5.html b/doc/html/libdmapsharing-4.0-dmap-md5.html
new file mode 100644
index 0000000..2e32cf6
--- /dev/null
+++ b/doc/html/libdmapsharing-4.0-dmap-md5.html
@@ -0,0 +1,153 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>dmap-md5: libdmapsharing Reference Manual</title>
+<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
+<link rel="home" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="up" href="ch04.html" title="Libdmapsharing Objects and Interfaces">
+<link rel="prev" href="DmapImageShare.html" title="DmapImageShare">
+<link rel="next" href="DmapMdnsBrowser.html" title="DmapMdnsBrowser">
+<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
+<td width="100%" align="left" class="shortcuts">
+<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
+                  <a href="#libdmapsharing-4.0-dmap-md5.description" class="shortcut">Description</a></span>
+</td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
+<td><a accesskey="u" href="ch04.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="DmapImageShare.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="DmapMdnsBrowser.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="refentry">
+<a name="libdmapsharing-4.0-dmap-md5"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="libdmapsharing-4.0-dmap-md5.top_of_page"></a>dmap-md5</span></h2>
+<p>dmap-md5</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="libdmapsharing-4.0-dmap-md5.functions"></a><h2>Functions</h2>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="functions_proto_type">
+<col class="functions_proto_name">
+</colgroup>
+<tbody>
+<tr>
+<td class="function_type">
+<span class="returnvalue">void</span>
+</td>
+<td class="function_name">
+<a class="link" href="libdmapsharing-4.0-dmap-md5.html#dmap-md5-progressive-init" title="dmap_md5_progressive_init ()">dmap_md5_progressive_init</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">void</span>
+</td>
+<td class="function_name">
+<a class="link" href="libdmapsharing-4.0-dmap-md5.html#dmap-md5-progressive-update" title="dmap_md5_progressive_update ()">dmap_md5_progressive_update</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">void</span>
+</td>
+<td class="function_name">
+<a class="link" href="libdmapsharing-4.0-dmap-md5.html#dmap-md5-progressive-final" title="dmap_md5_progressive_final ()">dmap_md5_progressive_final</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">void</span>
+</td>
+<td class="function_name">
+<a class="link" href="libdmapsharing-4.0-dmap-md5.html#dmap-md5-progressive-to-string" title="dmap_md5_progressive_to_string ()">dmap_md5_progressive_to_string</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">void</span>
+</td>
+<td class="function_name">
+<a class="link" href="libdmapsharing-4.0-dmap-md5.html#dmap-md5-generate" title="dmap_md5_generate ()">dmap_md5_generate</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="libdmapsharing-4.0-dmap-md5.other"></a><h2>Types and Values</h2>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="other_proto_type">
+<col class="other_proto_name">
+</colgroup>
+<tbody><tr>
+<td class="define_keyword">#define</td>
+<td class="function_name"><a class="link" href="libdmapsharing-4.0-dmap-md5.html#DMAP-HASH-SIZE:CAPS" title="DMAP_HASH_SIZE">DMAP_HASH_SIZE</a></td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="libdmapsharing-4.0-dmap-md5.description"></a><h2>Description</h2>
+</div>
+<div class="refsect1">
+<a name="libdmapsharing-4.0-dmap-md5.functions_details"></a><h2>Functions</h2>
+<div class="refsect2">
+<a name="dmap-md5-progressive-init"></a><h3>dmap_md5_progressive_init ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+dmap_md5_progressive_init (<em class="parameter"><code><span class="type">DmapHashContext</span> *context</code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="dmap-md5-progressive-update"></a><h3>dmap_md5_progressive_update ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+dmap_md5_progressive_update (<em class="parameter"><code><span class="type">DmapHashContext</span> *context</code></em>,
+                             <em class="parameter"><code>unsigned <span class="type">char</span> const *buffer</code></em>,
+                             <em class="parameter"><code>unsigned <span class="type">int</span> length</code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="dmap-md5-progressive-final"></a><h3>dmap_md5_progressive_final ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+dmap_md5_progressive_final (<em class="parameter"><code><span class="type">DmapHashContext</span> *context</code></em>,
+                            <em class="parameter"><code>unsigned <span class="type">char</span> digest[16]</code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="dmap-md5-progressive-to-string"></a><h3>dmap_md5_progressive_to_string ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+dmap_md5_progressive_to_string (<em class="parameter"><code>const unsigned <span class="type">char</span> *digest</code></em>,
+                                <em class="parameter"><code><span class="type">gchar</span> *string</code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="dmap-md5-generate"></a><h3>dmap_md5_generate ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+dmap_md5_generate (<em class="parameter"><code>short <span class="type">version_major</span> Param1</code></em>,
+                   <em class="parameter"><code>const <span class="type">guchar</span> *url</code></em>,
+                   <em class="parameter"><code><span class="type">guchar</span> hash_select</code></em>,
+                   <em class="parameter"><code><span class="type">guchar</span> *out</code></em>,
+                   <em class="parameter"><code><span class="type">gint</span> request_id</code></em>);</pre>
+</div>
+</div>
+<div class="refsect1">
+<a name="libdmapsharing-4.0-dmap-md5.other_details"></a><h2>Types and Values</h2>
+<div class="refsect2">
+<a name="DMAP-HASH-SIZE:CAPS"></a><h3>DMAP_HASH_SIZE</h3>
+<pre class="programlisting">#define DMAP_HASH_SIZE 16
+</pre>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.33.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/libdmapsharing-4.0-dmap-utils.html b/doc/html/libdmapsharing-4.0-dmap-utils.html
new file mode 100644
index 0000000..be78233
--- /dev/null
+++ b/doc/html/libdmapsharing-4.0-dmap-utils.html
@@ -0,0 +1,85 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>dmap-utils: libdmapsharing Reference Manual</title>
+<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
+<link rel="home" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="up" href="ch04.html" title="Libdmapsharing Objects and Interfaces">
+<link rel="prev" href="DmapShare.html" title="DmapShare">
+<link rel="next" href="object-tree.html" title="Object Hierarchy">
+<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
+<td width="100%" align="left" class="shortcuts">
+<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
+                  <a href="#libdmapsharing-4.0-dmap-utils.description" class="shortcut">Description</a></span>
+</td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
+<td><a accesskey="u" href="ch04.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="DmapShare.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="object-tree.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="refentry">
+<a name="libdmapsharing-4.0-dmap-utils"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="libdmapsharing-4.0-dmap-utils.top_of_page"></a>dmap-utils</span></h2>
+<p>dmap-utils</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="libdmapsharing-4.0-dmap-utils.functions"></a><h2>Functions</h2>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="functions_proto_type">
+<col class="functions_proto_name">
+</colgroup>
+<tbody><tr>
+<td class="function_type">
+<span class="returnvalue">gchar</span> *
+</td>
+<td class="function_name">
+<a class="link" href="libdmapsharing-4.0-dmap-utils.html#dmap-utils-mime-to-format" title="dmap_utils_mime_to_format ()">dmap_utils_mime_to_format</a> <span class="c_punctuation">()</span>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="libdmapsharing-4.0-dmap-utils.description"></a><h2>Description</h2>
+</div>
+<div class="refsect1">
+<a name="libdmapsharing-4.0-dmap-utils.functions_details"></a><h2>Functions</h2>
+<div class="refsect2">
+<a name="dmap-utils-mime-to-format"></a><h3>dmap_utils_mime_to_format ()</h3>
+<pre class="programlisting"><span class="returnvalue">gchar</span> *
+dmap_utils_mime_to_format (<em class="parameter"><code>const <span class="type">gchar</span> *transcode_mimetype</code></em>);</pre>
+<div class="refsect3">
+<a name="dmap-utils-mime-to-format.parameters"></a><h4>Parameters</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="parameters_name">
+<col class="parameters_description">
+<col width="200px" class="parameters_annotations">
+</colgroup>
+<tbody><tr>
+<td class="parameter_name"><p>transcode_mimetype</p></td>
+<td class="parameter_description"><p>a string representing a MIME type (e.g., "audio/wav").</p></td>
+<td class="parameter_annotations"> </td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="dmap-utils-mime-to-format.returns"></a><h4>Returns</h4>
+<p> a string representing the corresponding type  (e.g., "wav").</p>
+</div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.33.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/libdmapsharing-4.0.devhelp2 b/doc/html/libdmapsharing-4.0.devhelp2
new file mode 100644
index 0000000..5bec7e6
--- /dev/null
+++ b/doc/html/libdmapsharing-4.0.devhelp2
@@ -0,0 +1,423 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<book xmlns="http://www.devhelp.net/book" title="libdmapsharing Reference Manual" link="index.html" author="" name="libdmapsharing-4.0" version="2" language="c" online="http://www.flyn.org/projects/libdmapsharing/doc/">
+  <chapters>
+    <sub name="Libdmapsharing Sharing Overview" link="ch01.html">
+      <sub name="Media Database Implementation" link="mediadb.html"/>
+      <sub name="Container Database Implementation" link="containerdb.html"/>
+      <sub name="Share API" link="shareapi.html"/>
+    </sub>
+    <sub name="Libdmapsharing Browsing Overview" link="ch02.html">
+      <sub name="Media Database Implementation" link="mediadb.html"/>
+      <sub name="Container Database Implementation" link="containerdb.html"/>
+      <sub name="mDNS Browser API" link="browserapi.html"/>
+      <sub name="Service Added Callback" link="serviceaddedcb.html"/>
+      <sub name="Authenticate Callback" link="authenticatecb.html"/>
+      <sub name="Error Callback" link="errorcb.html"/>
+      <sub name="Connected Callback" link="connectedcb.html"/>
+    </sub>
+    <sub name="Libdmapsharing Internals" link="ch03.html">
+      <sub name="Libdmapsharing Coding Standards" link="coding-standards.html"/>
+      <sub name="Libdmapsharing Server Internals" link="server-internals.html"/>
+      <sub name="Libdmapsharing Client Internals" link="client-internals.html"/>
+    </sub>
+    <sub name="Libdmapsharing Objects and Interfaces" link="ch04.html">
+      <sub name="DmapAvConnection" link="DmapAvConnection.html"/>
+      <sub name="DmapAvRecord" link="DmapAvRecord.html"/>
+      <sub name="DmapAvShare" link="DmapAvShare.html"/>
+      <sub name="dmap-cc" link="libdmapsharing-4.0-dmap-cc.html"/>
+      <sub name="DmapConnection" link="DmapConnection.html"/>
+      <sub name="DmapContainerDb" link="DmapContainerDb.html"/>
+      <sub name="DmapContainerRecord" link="DmapContainerRecord.html"/>
+      <sub name="DmapControlConnection" link="DmapControlConnection.html"/>
+      <sub name="DmapControlPlayer" link="DmapControlPlayer.html"/>
+      <sub name="DmapControlShare" link="DmapControlShare.html"/>
+      <sub name="DmapDb" link="DmapDb.html"/>
+      <sub name="dmap-enums" link="libdmapsharing-4.0-dmap-enums.html"/>
+      <sub name="DmapTranscodeStream" link="DmapTranscodeStream.html"/>
+      <sub name="DmapImageConnection" link="DmapImageConnection.html"/>
+      <sub name="DmapImageRecord" link="DmapImageRecord.html"/>
+      <sub name="DmapImageShare" link="DmapImageShare.html"/>
+      <sub name="dmap-md5" link="libdmapsharing-4.0-dmap-md5.html"/>
+      <sub name="DmapMdnsBrowser" link="DmapMdnsBrowser.html"/>
+      <sub name="DmapMdnsService" link="DmapMdnsService.html"/>
+      <sub name="DmapRecordFactory" link="DmapRecordFactory.html"/>
+      <sub name="DmapRecord" link="DmapRecord.html"/>
+      <sub name="DmapShare" link="DmapShare.html"/>
+      <sub name="dmap-utils" link="libdmapsharing-4.0-dmap-utils.html"/>
+    </sub>
+    <sub name="Object Hierarchy" link="object-tree.html"/>
+    <sub name="API Index" link="api-index-full.html"/>
+    <sub name="Index of deprecated API" link="deprecated-api-index.html"/>
+    <sub name="Annotation Glossary" link="annotation-glossary.html"/>
+  </chapters>
+  <functions>
+    <keyword type="function" name="dmap_av_connection_new ()" link="DmapAvConnection.html#dmap-av-connection-new"/>
+    <keyword type="function" name="dmap_av_record_itunes_compat ()" link="DmapAvRecord.html#dmap-av-record-itunes-compat"/>
+    <keyword type="function" name="dmap_av_record_read ()" link="DmapAvRecord.html#dmap-av-record-read"/>
+    <keyword type="function" name="dmap_av_record_cmp_by_album ()" link="DmapAvRecord.html#dmap-av-record-cmp-by-album"/>
+    <keyword type="property" name="The “bitrate” property" link="DmapAvRecord.html#DmapAvRecord--bitrate"/>
+    <keyword type="property" name="The “disc” property" link="DmapAvRecord.html#DmapAvRecord--disc"/>
+    <keyword type="property" name="The “duration” property" link="DmapAvRecord.html#DmapAvRecord--duration"/>
+    <keyword type="property" name="The “filesize” property" link="DmapAvRecord.html#DmapAvRecord--filesize"/>
+    <keyword type="property" name="The “firstseen” property" link="DmapAvRecord.html#DmapAvRecord--firstseen"/>
+    <keyword type="property" name="The “format” property" link="DmapAvRecord.html#DmapAvRecord--format"/>
+    <keyword type="property" name="The “has-video” property" link="DmapAvRecord.html#DmapAvRecord--has-video"/>
+    <keyword type="property" name="The “hash” property" link="DmapAvRecord.html#DmapAvRecord--hash"/>
+    <keyword type="property" name="The “location” property" link="DmapAvRecord.html#DmapAvRecord--location"/>
+    <keyword type="property" name="The “mediakind” property" link="DmapAvRecord.html#DmapAvRecord--mediakind"/>
+    <keyword type="property" name="The “mtime” property" link="DmapAvRecord.html#DmapAvRecord--mtime"/>
+    <keyword type="property" name="The “rating” property" link="DmapAvRecord.html#DmapAvRecord--rating"/>
+    <keyword type="property" name="The “songalbum” property" link="DmapAvRecord.html#DmapAvRecord--songalbum"/>
+    <keyword type="property" name="The “songalbumid” property" link="DmapAvRecord.html#DmapAvRecord--songalbumid"/>
+    <keyword type="property" name="The “songartist” property" link="DmapAvRecord.html#DmapAvRecord--songartist"/>
+    <keyword type="property" name="The “songgenre” property" link="DmapAvRecord.html#DmapAvRecord--songgenre"/>
+    <keyword type="property" name="The “sort-album” property" link="DmapAvRecord.html#DmapAvRecord--sort-album"/>
+    <keyword type="property" name="The “sort-artist” property" link="DmapAvRecord.html#DmapAvRecord--sort-artist"/>
+    <keyword type="property" name="The “title” property" link="DmapAvRecord.html#DmapAvRecord--title"/>
+    <keyword type="property" name="The “track” property" link="DmapAvRecord.html#DmapAvRecord--track"/>
+    <keyword type="property" name="The “year” property" link="DmapAvRecord.html#DmapAvRecord--year"/>
+    <keyword type="function" name="dmap_av_share_new ()" link="DmapAvShare.html#dmap-av-share-new"/>
+    <keyword type="enum" name="enum DmapContentCode" link="libdmapsharing-4.0-dmap-cc.html#DmapContentCode"/>
+    <keyword type="function" name="DmapConnectionFunc ()" link="DmapConnection.html#DmapConnectionFunc"/>
+    <keyword type="function" name="dmap_connection_is_connected ()" link="DmapConnection.html#dmap-connection-is-connected"/>
+    <keyword type="function" name="dmap_connection_start ()" link="DmapConnection.html#dmap-connection-start"/>
+    <keyword type="function" name="dmap_connection_stop ()" link="DmapConnection.html#dmap-connection-stop"/>
+    <keyword type="function" name="dmap_connection_get_headers ()" link="DmapConnection.html#dmap-connection-get-headers"/>
+    <keyword type="function" name="dmap_connection_get_playlists ()" link="DmapConnection.html#dmap-connection-get-playlists"/>
+    <keyword type="function" name="dmap_connection_authenticate_message ()" link="DmapConnection.html#dmap-connection-authenticate-message"/>
+    <keyword type="function" name="dmap_connection_emit_error ()" link="DmapConnection.html#dmap-connection-emit-error"/>
+    <keyword type="struct" name="DmapPlaylist" link="DmapConnection.html#DmapPlaylist"/>
+    <keyword type="enum" name="enum DmapConnectionState" link="DmapConnection.html#DmapConnectionState"/>
+    <keyword type="property" name="The “base-uri” property" link="DmapConnection.html#DmapConnection--base-uri"/>
+    <keyword type="property" name="The “database-id” property" link="DmapConnection.html#DmapConnection--database-id"/>
+    <keyword type="property" name="The “db” property" link="DmapConnection.html#DmapConnection--db"/>
+    <keyword type="property" name="The “dmap-version” property" link="DmapConnection.html#DmapConnection--dmap-version"/>
+    <keyword type="property" name="The “factory” property" link="DmapConnection.html#DmapConnection--factory"/>
+    <keyword type="property" name="The “host” property" link="DmapConnection.html#DmapConnection--host"/>
+    <keyword type="property" name="The “name” property" link="DmapConnection.html#DmapConnection--name"/>
+    <keyword type="property" name="The “password” property" link="DmapConnection.html#DmapConnection--password"/>
+    <keyword type="property" name="The “port” property" link="DmapConnection.html#DmapConnection--port"/>
+    <keyword type="property" name="The “revision-number” property" link="DmapConnection.html#DmapConnection--revision-number"/>
+    <keyword type="property" name="The “session-id” property" link="DmapConnection.html#DmapConnection--session-id"/>
+    <keyword type="property" name="The “username” property" link="DmapConnection.html#DmapConnection--username"/>
+    <keyword type="signal" name="The “authenticate” signal" link="DmapConnection.html#DmapConnection-authenticate"/>
+    <keyword type="signal" name="The “connected” signal" link="DmapConnection.html#DmapConnection-connected"/>
+    <keyword type="signal" name="The “connecting” signal" link="DmapConnection.html#DmapConnection-connecting"/>
+    <keyword type="signal" name="The “disconnected” signal" link="DmapConnection.html#DmapConnection-disconnected"/>
+    <keyword type="signal" name="The “error” signal" link="DmapConnection.html#DmapConnection-error"/>
+    <keyword type="signal" name="The “operation-done” signal" link="DmapConnection.html#DmapConnection-operation-done"/>
+    <keyword type="function" name="DmapIdContainerRecordFunc ()" link="DmapContainerDb.html#DmapIdContainerRecordFunc"/>
+    <keyword type="function" name="dmap_container_db_add ()" link="DmapContainerDb.html#dmap-container-db-add"/>
+    <keyword type="function" name="dmap_container_db_lookup_by_id ()" link="DmapContainerDb.html#dmap-container-db-lookup-by-id"/>
+    <keyword type="function" name="dmap_container_db_foreach ()" link="DmapContainerDb.html#dmap-container-db-foreach"/>
+    <keyword type="function" name="dmap_container_db_count ()" link="DmapContainerDb.html#dmap-container-db-count"/>
+    <keyword type="function" name="dmap_container_record_get_id ()" link="DmapContainerRecord.html#dmap-container-record-get-id"/>
+    <keyword type="function" name="dmap_container_record_add_entry ()" link="DmapContainerRecord.html#dmap-container-record-add-entry"/>
+    <keyword type="function" name="dmap_container_record_get_entry_count ()" link="DmapContainerRecord.html#dmap-container-record-get-entry-count"/>
+    <keyword type="function" name="dmap_container_record_get_entries ()" link="DmapContainerRecord.html#dmap-container-record-get-entries"/>
+    <keyword type="property" name="The “name” property" link="DmapContainerRecord.html#DmapContainerRecord--name"/>
+    <keyword type="function" name="dmap_control_connection_new ()" link="DmapControlConnection.html#dmap-control-connection-new"/>
+    <keyword type="macro" name="DACP_TYPE_CONNECTION" link="DmapControlConnection.html#DACP-TYPE-CONNECTION:CAPS"/>
+    <keyword type="function" name="dmap_control_player_now_playing_record ()" link="DmapControlPlayer.html#dmap-control-player-now-playing-record"/>
+    <keyword type="function" name="dmap_control_player_now_playing_artwork ()" link="DmapControlPlayer.html#dmap-control-player-now-playing-artwork"/>
+    <keyword type="function" name="dmap_control_player_play_pause ()" link="DmapControlPlayer.html#dmap-control-player-play-pause"/>
+    <keyword type="function" name="dmap_control_player_pause ()" link="DmapControlPlayer.html#dmap-control-player-pause"/>
+    <keyword type="function" name="dmap_control_player_next_item ()" link="DmapControlPlayer.html#dmap-control-player-next-item"/>
+    <keyword type="function" name="dmap_control_player_prev_item ()" link="DmapControlPlayer.html#dmap-control-player-prev-item"/>
+    <keyword type="function" name="dmap_control_player_cue_clear ()" link="DmapControlPlayer.html#dmap-control-player-cue-clear"/>
+    <keyword type="function" name="dmap_control_player_cue_play ()" link="DmapControlPlayer.html#dmap-control-player-cue-play"/>
+    <keyword type="enum" name="enum DmapControlRepeatState" link="DmapControlPlayer.html#DmapControlRepeatState"/>
+    <keyword type="enum" name="enum DmapControlPlayState" link="DmapControlPlayer.html#DmapControlPlayState"/>
+    <keyword type="property" name="The “play-state” property" link="DmapControlPlayer.html#DmapControlPlayer--play-state"/>
+    <keyword type="property" name="The “playing-time” property" link="DmapControlPlayer.html#DmapControlPlayer--playing-time"/>
+    <keyword type="property" name="The “repeat-state” property" link="DmapControlPlayer.html#DmapControlPlayer--repeat-state"/>
+    <keyword type="property" name="The “shuffle-state” property" link="DmapControlPlayer.html#DmapControlPlayer--shuffle-state"/>
+    <keyword type="property" name="The “volume” property" link="DmapControlPlayer.html#DmapControlPlayer--volume"/>
+    <keyword type="function" name="dmap_control_share_new ()" link="DmapControlShare.html#dmap-control-share-new"/>
+    <keyword type="function" name="dmap_control_share_pair ()" link="DmapControlShare.html#dmap-control-share-pair"/>
+    <keyword type="function" name="dmap_control_share_start_lookup ()" link="DmapControlShare.html#dmap-control-share-start-lookup"/>
+    <keyword type="function" name="dmap_control_share_stop_lookup ()" link="DmapControlShare.html#dmap-control-share-stop-lookup"/>
+    <keyword type="function" name="dmap_control_share_player_updated ()" link="DmapControlShare.html#dmap-control-share-player-updated"/>
+    <keyword type="property" name="The “library-name” property" link="DmapControlShare.html#DmapControlShare--library-name"/>
+    <keyword type="property" name="The “player” property" link="DmapControlShare.html#DmapControlShare--player"/>
+    <keyword type="signal" name="The “add-guid” signal" link="DmapControlShare.html#DmapControlShare-add-guid"/>
+    <keyword type="signal" name="The “lookup-guid” signal" link="DmapControlShare.html#DmapControlShare-lookup-guid"/>
+    <keyword type="signal" name="The “remote-found” signal" link="DmapControlShare.html#DmapControlShare-remote-found"/>
+    <keyword type="signal" name="The “remote-lost” signal" link="DmapControlShare.html#DmapControlShare-remote-lost"/>
+    <keyword type="signal" name="The “remote-paired” signal" link="DmapControlShare.html#DmapControlShare-remote-paired"/>
+    <keyword type="function" name="DmapIdRecordFunc ()" link="DmapDb.html#DmapIdRecordFunc"/>
+    <keyword type="function" name="dmap_db_add ()" link="DmapDb.html#dmap-db-add"/>
+    <keyword type="function" name="dmap_db_add_with_id ()" link="DmapDb.html#dmap-db-add-with-id"/>
+    <keyword type="function" name="dmap_db_add_path ()" link="DmapDb.html#dmap-db-add-path"/>
+    <keyword type="function" name="dmap_db_lookup_by_id ()" link="DmapDb.html#dmap-db-lookup-by-id"/>
+    <keyword type="function" name="dmap_db_lookup_id_by_location ()" link="DmapDb.html#dmap-db-lookup-id-by-location"/>
+    <keyword type="function" name="dmap_db_foreach ()" link="DmapDb.html#dmap-db-foreach"/>
+    <keyword type="function" name="dmap_db_count ()" link="DmapDb.html#dmap-db-count"/>
+    <keyword type="function" name="dmap_db_apply_filter ()" link="DmapDb.html#dmap-db-apply-filter"/>
+    <keyword type="enum" name="enum DmapDbId" link="DmapDb.html#DmapDbId"/>
+    <keyword type="function" name="dmap_transcode_stream_new ()" link="DmapTranscodeStream.html#dmap-transcode-stream-new"/>
+    <keyword type="function" name="dmap_image_connection_new ()" link="DmapImageConnection.html#dmap-image-connection-new"/>
+    <keyword type="function" name="dmap_image_record_read ()" link="DmapImageRecord.html#dmap-image-record-read"/>
+    <keyword type="property" name="The “aspect-ratio” property" link="DmapImageRecord.html#DmapImageRecord--aspect-ratio"/>
+    <keyword type="property" name="The “comments” property" link="DmapImageRecord.html#DmapImageRecord--comments"/>
+    <keyword type="property" name="The “creation-date” property" link="DmapImageRecord.html#DmapImageRecord--creation-date"/>
+    <keyword type="property" name="The “filename” property" link="DmapImageRecord.html#DmapImageRecord--filename"/>
+    <keyword type="property" name="The “format” property" link="DmapImageRecord.html#DmapImageRecord--format"/>
+    <keyword type="property" name="The “hash” property" link="DmapImageRecord.html#DmapImageRecord--hash"/>
+    <keyword type="property" name="The “large-filesize” property" link="DmapImageRecord.html#DmapImageRecord--large-filesize"/>
+    <keyword type="property" name="The “location” property" link="DmapImageRecord.html#DmapImageRecord--location"/>
+    <keyword type="property" name="The “pixel-height” property" link="DmapImageRecord.html#DmapImageRecord--pixel-height"/>
+    <keyword type="property" name="The “pixel-width” property" link="DmapImageRecord.html#DmapImageRecord--pixel-width"/>
+    <keyword type="property" name="The “rating” property" link="DmapImageRecord.html#DmapImageRecord--rating"/>
+    <keyword type="property" name="The “thumbnail” property" link="DmapImageRecord.html#DmapImageRecord--thumbnail"/>
+    <keyword type="function" name="dmap_image_share_new ()" link="DmapImageShare.html#dmap-image-share-new"/>
+    <keyword type="function" name="dmap_md5_progressive_init ()" link="libdmapsharing-4.0-dmap-md5.html#dmap-md5-progressive-init"/>
+    <keyword type="function" name="dmap_md5_progressive_update ()" link="libdmapsharing-4.0-dmap-md5.html#dmap-md5-progressive-update"/>
+    <keyword type="function" name="dmap_md5_progressive_final ()" link="libdmapsharing-4.0-dmap-md5.html#dmap-md5-progressive-final"/>
+    <keyword type="function" name="dmap_md5_progressive_to_string ()" link="libdmapsharing-4.0-dmap-md5.html#dmap-md5-progressive-to-string"/>
+    <keyword type="function" name="dmap_md5_generate ()" link="libdmapsharing-4.0-dmap-md5.html#dmap-md5-generate"/>
+    <keyword type="macro" name="DMAP_HASH_SIZE" link="libdmapsharing-4.0-dmap-md5.html#DMAP-HASH-SIZE:CAPS"/>
+    <keyword type="function" name="dmap_mdns_browser_error_quark ()" link="DmapMdnsBrowser.html#dmap-mdns-browser-error-quark"/>
+    <keyword type="function" name="dmap_mdns_browser_new ()" link="DmapMdnsBrowser.html#dmap-mdns-browser-new"/>
+    <keyword type="function" name="dmap_mdns_browser_start ()" link="DmapMdnsBrowser.html#dmap-mdns-browser-start"/>
+    <keyword type="function" name="dmap_mdns_browser_stop ()" link="DmapMdnsBrowser.html#dmap-mdns-browser-stop"/>
+    <keyword type="function" name="dmap_mdns_browser_get_services ()" link="DmapMdnsBrowser.html#dmap-mdns-browser-get-services"/>
+    <keyword type="function" name="dmap_mdns_browser_get_service_type ()" link="DmapMdnsBrowser.html#dmap-mdns-browser-get-service-type"/>
+    <keyword type="enum" name="enum DmapMdnsBrowserError" link="DmapMdnsBrowser.html#DmapMdnsBrowserError"/>
+    <keyword type="struct" name="DmapMdnsBrowser" link="DmapMdnsBrowser.html#DmapMdnsBrowser-struct"/>
+    <keyword type="macro" name="DMAP_MDNS_BROWSER_ERROR" link="DmapMdnsBrowser.html#DMAP-MDNS-BROWSER-ERROR:CAPS"/>
+    <keyword type="signal" name="The “service-added” signal" link="DmapMdnsBrowser.html#DmapMdnsBrowser-service-added"/>
+    <keyword type="signal" name="The “service-removed” signal" link="DmapMdnsBrowser.html#DmapMdnsBrowser-service-removed"/>
+    <keyword type="enum" name="enum DmapMdnsServiceType" link="DmapMdnsService.html#DmapMdnsServiceType"/>
+    <keyword type="enum" name="enum DmapMdnsServiceTransportProtocol" link="DmapMdnsService.html#DmapMdnsServiceTransportProtocol"/>
+    <keyword type="property" name="The “host” property" link="DmapMdnsService.html#DmapMdnsService--host"/>
+    <keyword type="property" name="The “name” property" link="DmapMdnsService.html#DmapMdnsService--name"/>
+    <keyword type="property" name="The “pair” property" link="DmapMdnsService.html#DmapMdnsService--pair"/>
+    <keyword type="property" name="The “password-protected” property" link="DmapMdnsService.html#DmapMdnsService--password-protected"/>
+    <keyword type="property" name="The “port” property" link="DmapMdnsService.html#DmapMdnsService--port"/>
+    <keyword type="property" name="The “service-name” property" link="DmapMdnsService.html#DmapMdnsService--service-name"/>
+    <keyword type="property" name="The “transport-protocol” property" link="DmapMdnsService.html#DmapMdnsService--transport-protocol"/>
+    <keyword type="function" name="dmap_record_factory_create ()" link="DmapRecordFactory.html#dmap-record-factory-create"/>
+    <keyword type="function" name="dmap_record_to_blob ()" link="DmapRecord.html#dmap-record-to-blob"/>
+    <keyword type="function" name="dmap_record_set_from_blob ()" link="DmapRecord.html#dmap-record-set-from-blob"/>
+    <keyword type="enum" name="enum DmapMediaKind" link="DmapRecord.html#DmapMediaKind"/>
+    <keyword type="function" name="dmap_share_serve ()" link="DmapShare.html#dmap-share-serve"/>
+    <keyword type="function" name="dmap_share_publish ()" link="DmapShare.html#dmap-share-publish"/>
+    <keyword type="function" name="dmap_share_free_filter ()" link="DmapShare.html#dmap-share-free-filter"/>
+    <keyword type="function" name="dmap_share_emit_error ()" link="DmapShare.html#dmap-share-emit-error"/>
+    <keyword type="typedef" name="DmapMetaDataMap" link="DmapShare.html#DmapMetaDataMap"/>
+    <keyword type="enum" name="enum DmapShareAuthMethod" link="DmapShare.html#DmapShareAuthMethod"/>
+    <keyword type="typedef" name="DmapBits" link="DmapShare.html#DmapBits"/>
+    <keyword type="struct" name="struct DmapMlclBits" link="DmapShare.html#DmapMlclBits"/>
+    <keyword type="property" name="The “auth-method” property" link="DmapShare.html#DmapShare--auth-method"/>
+    <keyword type="property" name="The “container-db” property" link="DmapShare.html#DmapShare--container-db"/>
+    <keyword type="property" name="The “db” property" link="DmapShare.html#DmapShare--db"/>
+    <keyword type="property" name="The “name” property" link="DmapShare.html#DmapShare--name"/>
+    <keyword type="property" name="The “password” property" link="DmapShare.html#DmapShare--password"/>
+    <keyword type="property" name="The “revision-number” property" link="DmapShare.html#DmapShare--revision-number"/>
+    <keyword type="property" name="The “server” property" link="DmapShare.html#DmapShare--server"/>
+    <keyword type="property" name="The “transcode-mimetype” property" link="DmapShare.html#DmapShare--transcode-mimetype"/>
+    <keyword type="property" name="The “txt-records” property" link="DmapShare.html#DmapShare--txt-records"/>
+    <keyword type="signal" name="The “error” signal" link="DmapShare.html#DmapShare-error"/>
+    <keyword type="function" name="dmap_utils_mime_to_format ()" link="libdmapsharing-4.0-dmap-utils.html#dmap-utils-mime-to-format"/>
+    <keyword type="constant" name="DMAP_CC_INVALID" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-INVALID:CAPS"/>
+    <keyword type="constant" name="DMAP_RAW" link="libdmapsharing-4.0-dmap-cc.html#DMAP-RAW:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MDCL" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MDCL:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MEDS" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MEDS:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MSTT" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MSTT:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MIID" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MIID:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MINM" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MINM:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MIKD" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MIKD:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MPER" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MPER:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MCON" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MCON:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MCTI" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MCTI:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MPCO" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MPCO:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MSTS" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MSTS:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MIMC" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MIMC:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MCTC" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MCTC:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MRCO" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MRCO:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MTCO" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MTCO:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MLCL" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MLCL:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MLIT" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MLIT:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MBCL" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MBCL:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MSRV" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MSRV:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MSAU" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MSAU:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MSLR" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MSLR:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MPRO" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MPRO:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MSAL" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MSAL:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MSUP" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MSUP:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MSPI" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MSPI:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MSEX" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MSEX:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MSBR" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MSBR:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MSQY" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MSQY:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MSIX" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MSIX:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MSRS" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MSRS:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MSTM" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MSTM:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MSDC" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MSDC:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MCCR" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MCCR:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MCNM" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MCNM:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MCNA" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MCNA:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MCTY" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MCTY:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MLOG" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MLOG:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MLID" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MLID:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MUPD" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MUPD:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MUSR" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MUSR:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MUTY" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MUTY:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MUDL" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MUDL:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MSMA" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MSMA:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_FQUESCH" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-FQUESCH:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MDBK" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MDBK:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_APRO" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-APRO:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_AVDB" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-AVDB:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_ABRO" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-ABRO:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_ABAL" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-ABAL:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_ABAR" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-ABAR:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_ABCP" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-ABCP:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_ABGN" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-ABGN:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_ADBS" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-ADBS:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_ASAL" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-ASAL:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_ASAI" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-ASAI:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_ASAA" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-ASAA:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_ASAR" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-ASAR:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_ASBT" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-ASBT:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_ASBR" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-ASBR:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_ASCM" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-ASCM:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_ASCO" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-ASCO:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_ASDA" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-ASDA:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_ASDM" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-ASDM:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_ASDC" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-ASDC:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_ASDN" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-ASDN:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_ASDB" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-ASDB:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_ASEQ" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-ASEQ:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_ASFM" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-ASFM:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_ASGN" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-ASGN:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_ASDT" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-ASDT:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_ASRV" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-ASRV:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_ASSR" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-ASSR:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_ASSZ" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-ASSZ:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_ASST" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-ASST:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_ASSP" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-ASSP:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_ASTM" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-ASTM:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_ASTC" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-ASTC:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_ASTN" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-ASTN:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_ASUR" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-ASUR:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_ASYR" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-ASYR:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_ASDK" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-ASDK:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_ASUL" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-ASUL:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_ASSU" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-ASSU:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_ASSA" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-ASSA:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_APLY" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-APLY:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_ABPL" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-ABPL:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_APSO" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-APSO:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_PRSV" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-PRSV:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_ARIF" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-ARIF:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MSAS" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MSAS:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_AGRP" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-AGRP:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_AGAL" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-AGAL:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_ASCP" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-ASCP:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_PPRO" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-PPRO:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_PASP" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-PASP:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_PFDT" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-PFDT:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_PICD" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-PICD:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_PIMF" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-PIMF:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_PFMT" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-PFMT:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_PIFS" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-PIFS:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_PLSZ" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-PLSZ:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_PHGT" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-PHGT:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_PWTH" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-PWTH:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_PRAT" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-PRAT:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_PCMT" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-PCMT:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_PRET" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-PRET:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_AECS" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-AECS:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_AESV" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-AESV:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_AEHV" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-AEHV:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_AESP" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-AESP:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_AEPP" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-AEPP:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_AEPS" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-AEPS:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_AESG" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-AESG:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_AEMK" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-AEMK:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_AEMK2" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-AEMK2:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_AEFP" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-AEFP:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_ATED" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-ATED:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_ASGR" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-ASGR:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_AEMQ" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-AEMQ:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_AESL" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-AESL:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_AESR" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-AESR:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_AETR" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-AETR:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_MSED" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-MSED:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_CMPA" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-CMPA:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_CMNM" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-CMNM:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_CMTY" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-CMTY:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_CMPG" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-CMPG:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_CACI" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-CACI:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_CAPS" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-CAPS"/>
+    <keyword type="constant" name="DMAP_CC_CASH" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-CASH:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_CARP" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-CARP:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_CAAS" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-CAAS:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_CAAR" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-CAAR:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_CAIA" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-CAIA:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_CANP" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-CANP:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_CANN" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-CANN:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_CANA" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-CANA:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_CANL" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-CANL:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_CANG" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-CANG:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_CANT" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-CANT:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_CASP" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-CASP:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_CASS" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-CASS:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_CAST" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-CAST:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_CASU" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-CASU:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_CASG" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-CASG:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_CACR" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-CACR:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_CMCP" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-CMCP:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_CMGT" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-CMGT:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_CMIK" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-CMIK:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_CMSP" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-CMSP:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_CMST" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-CMST:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_CMSV" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-CMSV:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_CMSR" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-CMSR:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_CMMK" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-CMMK:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_CMVO" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-CMVO:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_CMPR" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-CMPR:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_CAPR" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-CAPR:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_AEFR" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-AEFR:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_CAOV" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-CAOV:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_CMRL" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-CMRL:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_CAHP" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-CAHP:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_CAIV" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-CAIV:CAPS"/>
+    <keyword type="constant" name="DMAP_CC_CAVC" link="libdmapsharing-4.0-dmap-cc.html#DMAP-CC-CAVC:CAPS"/>
+    <keyword type="constant" name="DMAP_GET_INFO" link="DmapConnection.html#DMAP-GET-INFO:CAPS"/>
+    <keyword type="constant" name="DMAP_LOGIN" link="DmapConnection.html#DMAP-LOGIN:CAPS"/>
+    <keyword type="constant" name="DMAP_GET_REVISION_NUMBER" link="DmapConnection.html#DMAP-GET-REVISION-NUMBER:CAPS"/>
+    <keyword type="constant" name="DMAP_GET_DB_INFO" link="DmapConnection.html#DMAP-GET-DB-INFO:CAPS"/>
+    <keyword type="constant" name="DMAP_GET_MEDIA" link="DmapConnection.html#DMAP-GET-MEDIA:CAPS"/>
+    <keyword type="constant" name="DMAP_GET_PLAYLISTS" link="DmapConnection.html#DMAP-GET-PLAYLISTS:CAPS"/>
+    <keyword type="constant" name="DMAP_GET_PLAYLIST_ENTRIES" link="DmapConnection.html#DMAP-GET-PLAYLIST-ENTRIES:CAPS"/>
+    <keyword type="constant" name="DMAP_LOGOUT" link="DmapConnection.html#DMAP-LOGOUT:CAPS"/>
+    <keyword type="constant" name="DMAP_DONE" link="DmapConnection.html#DMAP-DONE:CAPS"/>
+    <keyword type="constant" name="DMAP_CONTROL_REPEAT_NONE" link="DmapControlPlayer.html#DMAP-CONTROL-REPEAT-NONE:CAPS"/>
+    <keyword type="constant" name="DMAP_CONTROL_REPEAT_SINGLE" link="DmapControlPlayer.html#DMAP-CONTROL-REPEAT-SINGLE:CAPS"/>
+    <keyword type="constant" name="DMAP_CONTROL_REPEAT_ALL" link="DmapControlPlayer.html#DMAP-CONTROL-REPEAT-ALL:CAPS"/>
+    <keyword type="constant" name="DMAP_CONTROL_PLAY_STOPPED" link="DmapControlPlayer.html#DMAP-CONTROL-PLAY-STOPPED:CAPS"/>
+    <keyword type="constant" name="DMAP_CONTROL_PLAY_PAUSED" link="DmapControlPlayer.html#DMAP-CONTROL-PLAY-PAUSED:CAPS"/>
+    <keyword type="constant" name="DMAP_CONTROL_PLAY_PLAYING" link="DmapControlPlayer.html#DMAP-CONTROL-PLAY-PLAYING:CAPS"/>
+    <keyword type="constant" name="DMAP_DB_ID_BAD" link="DmapDb.html#DMAP-DB-ID-BAD:CAPS"/>
+    <keyword type="constant" name="DMAP_MDNS_BROWSER_ERROR_NOT_RUNNING" link="DmapMdnsBrowser.html#DMAP-MDNS-BROWSER-ERROR-NOT-RUNNING:CAPS"/>
+    <keyword type="constant" name="DMAP_MDNS_BROWSER_ERROR_FAILED" link="DmapMdnsBrowser.html#DMAP-MDNS-BROWSER-ERROR-FAILED:CAPS"/>
+    <keyword type="constant" name="DMAP_MDNS_SERVICE_TYPE_INVALID" link="DmapMdnsService.html#DMAP-MDNS-SERVICE-TYPE-INVALID:CAPS"/>
+    <keyword type="constant" name="DMAP_MDNS_SERVICE_TYPE_DAAP" link="DmapMdnsService.html#DMAP-MDNS-SERVICE-TYPE-DAAP:CAPS"/>
+    <keyword type="constant" name="DMAP_MDNS_SERVICE_TYPE_DPAP" link="DmapMdnsService.html#DMAP-MDNS-SERVICE-TYPE-DPAP:CAPS"/>
+    <keyword type="constant" name="DMAP_MDNS_SERVICE_TYPE_DACP" link="DmapMdnsService.html#DMAP-MDNS-SERVICE-TYPE-DACP:CAPS"/>
+    <keyword type="constant" name="DMAP_MDNS_SERVICE_TYPE_RAOP" link="DmapMdnsService.html#DMAP-MDNS-SERVICE-TYPE-RAOP:CAPS"/>
+    <keyword type="constant" name="DMAP_MDNS_SERVICE_TYPE_LAST" link="DmapMdnsService.html#DMAP-MDNS-SERVICE-TYPE-LAST:CAPS"/>
+    <keyword type="constant" name="DMAP_MDNS_SERVICE_TRANSPORT_PROTOCOL_TCP" link="DmapMdnsService.html#DMAP-MDNS-SERVICE-TRANSPORT-PROTOCOL-TCP:CAPS"/>
+    <keyword type="constant" name="DMAP_MDNS_SERVICE_TRANSPORT_PROTOCOL_UDP" link="DmapMdnsService.html#DMAP-MDNS-SERVICE-TRANSPORT-PROTOCOL-UDP:CAPS"/>
+    <keyword type="constant" name="DMAP_MDNS_SERVICE_TRANSPORT_PROTOCOL_LAST" link="DmapMdnsService.html#DMAP-MDNS-SERVICE-TRANSPORT-PROTOCOL-LAST:CAPS"/>
+    <keyword type="constant" name="DMAP_MEDIA_KIND_MUSIC" link="DmapRecord.html#DMAP-MEDIA-KIND-MUSIC:CAPS"/>
+    <keyword type="constant" name="DMAP_MEDIA_KIND_MOVIE" link="DmapRecord.html#DMAP-MEDIA-KIND-MOVIE:CAPS"/>
+    <keyword type="constant" name="DMAP_MEDIA_KIND_PODCAST" link="DmapRecord.html#DMAP-MEDIA-KIND-PODCAST:CAPS"/>
+    <keyword type="constant" name="DMAP_MEDIA_KIND_TV_SHOW" link="DmapRecord.html#DMAP-MEDIA-KIND-TV-SHOW:CAPS"/>
+    <keyword type="constant" name="DMAP_SHARE_AUTH_METHOD_NONE" link="DmapShare.html#DMAP-SHARE-AUTH-METHOD-NONE:CAPS"/>
+    <keyword type="constant" name="DMAP_SHARE_AUTH_METHOD_NAME_AND_PASSWORD" link="DmapShare.html#DMAP-SHARE-AUTH-METHOD-NAME-AND-PASSWORD:CAPS"/>
+    <keyword type="constant" name="DMAP_SHARE_AUTH_METHOD_PASSWORD" link="DmapShare.html#DMAP-SHARE-AUTH-METHOD-PASSWORD:CAPS"/>
+  </functions>
+</book>
diff --git a/doc/html/mediadb.html b/doc/html/mediadb.html
new file mode 100644
index 0000000..3e59f48
--- /dev/null
+++ b/doc/html/mediadb.html
@@ -0,0 +1,56 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Media Database Implementation: libdmapsharing Reference Manual</title>
+<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
+<link rel="home" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="up" href="ch02.html" title="Libdmapsharing Browsing Overview">
+<link rel="prev" href="ch02.html" title="Libdmapsharing Browsing Overview">
+<link rel="next" href="containerdb.html" title="Container Database Implementation">
+<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
+<td width="100%" align="left" class="shortcuts"></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
+<td><a accesskey="u" href="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="ch02.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="containerdb.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="refentry">
+<a name="mediadb"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle">Media Database Implementation</span></h2>
+<p>Media Database Implementation — 
+			Implementing a media database
+		</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="id-1.3.2.3"></a><h2>Media Database Implementation</h2>
+<p>
+A media database is a collection of records which describe the media a
+program can share or access; for example, connecting to a DAAP server
+will populate a media database with DmapAvRecords which correspond to
+the media the server provides.
+
+		</p>
+<p>
+Creating a media database is a
+matter of implementing the DmapDb and DmapAvRecord (or DmapImageRecord)
+interfaces. For an example of this, see libdmapsharing's test-dmap-db.c
+and test-dmap-av-record.c. If your application already has a media
+database interface, then these new definitions will simply adapt your
+existing interface.
+
+		</p>
+</div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.33.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/object-tree.html b/doc/html/object-tree.html
index cf6688e..837a021 100644
--- a/doc/html/object-tree.html
+++ b/doc/html/object-tree.html
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>Object Hierarchy: libdmapsharing-3.0 Reference Manual</title>
+<title>Object Hierarchy: libdmapsharing Reference Manual</title>
 <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
-<link rel="home" href="index.html" title="libdmapsharing-3.0 Reference Manual">
-<link rel="up" href="index.html" title="libdmapsharing-3.0 Reference Manual">
-<link rel="prev" href="libdmapsharing-3.0-dpap-share.html" title="dpap-share">
+<link rel="home" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="up" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="prev" href="libdmapsharing-4.0-dmap-utils.html" title="dmap-utils">
 <link rel="next" href="api-index-full.html" title="API Index">
-<meta name="generator" content="GTK-Doc V1.32 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -16,7 +16,7 @@
 <td width="100%" align="left" class="shortcuts"></td>
 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
 <td><img src="up-insensitive.png" width="16" height="16" border="0"></td>
-<td><a accesskey="p" href="libdmapsharing-3.0-dpap-share.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="p" href="libdmapsharing-4.0-dmap-utils.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
 <td><a accesskey="n" href="api-index-full.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
 </tr></table>
 <div class="chapter">
@@ -24,31 +24,47 @@
 <a name="object-tree"></a>Object Hierarchy</h1></div></div></div>
 <pre class="screen">
     GObject
-    <span class="lineart">├──</span> <a class="link" href="DMAPMdnsBrowser.html" title="DMAPMdnsBrowser">DMAPMdnsBrowser</a>
-    <span class="lineart">├──</span> TestDAAPRecordFactory
-    <span class="lineart">├──</span> TestDAAPRecord
-    <span class="lineart">├──</span> TestDPAPRecordFactory
-    <span class="lineart">╰──</span> TestDPAPRecord
+    <span class="lineart">├──</span> <a class="link" href="DmapConnection.html" title="DmapConnection">DmapConnection</a>
+    <span class="lineart">│</span>   <span class="lineart">├──</span> <a class="link" href="DmapAvConnection.html" title="DmapAvConnection">DmapAvConnection</a>
+    <span class="lineart">│</span>   <span class="lineart">├──</span> <a class="link" href="DmapControlConnection.html" title="DmapControlConnection">DmapControlConnection</a>
+    <span class="lineart">│</span>   <span class="lineart">╰──</span> <a class="link" href="DmapImageConnection.html" title="DmapImageConnection">DmapImageConnection</a>
+    <span class="lineart">├──</span> <a class="link" href="DmapShare.html" title="DmapShare">DmapShare</a>
+    <span class="lineart">│</span>   <span class="lineart">├──</span> <a class="link" href="DmapAvShare.html" title="DmapAvShare">DmapAvShare</a>
+    <span class="lineart">│</span>   <span class="lineart">├──</span> <a class="link" href="DmapControlShare.html" title="DmapControlShare">DmapControlShare</a>
+    <span class="lineart">│</span>   <span class="lineart">╰──</span> <a class="link" href="DmapImageShare.html" title="DmapImageShare">DmapImageShare</a>
+    <span class="lineart">├──</span> <a class="link" href="DmapMdnsBrowser.html" title="DmapMdnsBrowser">DmapMdnsBrowser</a>
+    <span class="lineart">├──</span> DmapMdnsPublisher
+    <span class="lineart">├──</span> <a class="link" href="DmapMdnsService.html" title="DmapMdnsService">DmapMdnsService</a>
+    <span class="lineart">╰──</span> GInputStream
+        <span class="lineart">╰──</span> <a class="link" href="DmapTranscodeStream.html" title="DmapTranscodeStream">DmapTranscodeStream</a>
+            <span class="lineart">├──</span> DmapTranscodeMp3Stream
+            <span class="lineart">├──</span> DmapTranscodeQtStream
+            <span class="lineart">╰──</span> DmapTranscodeWavStream
     <a href="/usr/share/gtk-doc/html/gobject/GTypeModule.html">GInterface</a>
-    <span class="lineart">├──</span> <a class="link" href="DAAPRecord.html" title="DAAPRecord">DAAPRecord</a>
-    <span class="lineart">├──</span> <a class="link" href="DACPPlayer.html" title="DACPPlayer">DACPPlayer</a>
-    <span class="lineart">├──</span> <a class="link" href="DMAPContainerDb.html" title="DMAPContainerDb">DMAPContainerDb</a>
-    <span class="lineart">├──</span> <a class="link" href="DMAPContainerRecord.html" title="DMAPContainerRecord">DMAPContainerRecord</a>
-    <span class="lineart">├──</span> <a class="link" href="DMAPDb.html" title="DMAPDb">DMAPDb</a>
-    <span class="lineart">├──</span> <a class="link" href="DMAPRecordFactory.html" title="DMAPRecordFactory">DMAPRecordFactory</a>
-    <span class="lineart">├──</span> <a class="link" href="DMAPRecord.html" title="DMAPRecord">DMAPRecord</a>
-    <span class="lineart">╰──</span> <a class="link" href="DPAPRecord.html" title="DPAPRecord">DPAPRecord</a>
+    <span class="lineart">├──</span> <a class="link" href="DmapAvRecord.html" title="DmapAvRecord">DmapAvRecord</a>
+    <span class="lineart">├──</span> <a class="link" href="DmapContainerDb.html" title="DmapContainerDb">DmapContainerDb</a>
+    <span class="lineart">├──</span> <a class="link" href="DmapContainerRecord.html" title="DmapContainerRecord">DmapContainerRecord</a>
+    <span class="lineart">├──</span> <a class="link" href="DmapControlPlayer.html" title="DmapControlPlayer">DmapControlPlayer</a>
+    <span class="lineart">├──</span> <a class="link" href="DmapDb.html" title="DmapDb">DmapDb</a>
+    <span class="lineart">├──</span> <a class="link" href="DmapImageRecord.html" title="DmapImageRecord">DmapImageRecord</a>
+    <span class="lineart">├──</span> <a class="link" href="DmapRecordFactory.html" title="DmapRecordFactory">DmapRecordFactory</a>
+    <span class="lineart">╰──</span> <a class="link" href="DmapRecord.html" title="DmapRecord">DmapRecord</a>
     <a href="/usr/share/gtk-doc/html/gobject/gobject-Enumeration-and-Flag-Types.html">GEnum</a>
-    <span class="lineart">├──</span> <a class="link" href="DACPPlayer.html#DACPPlayState" title="enum DACPPlayState">DACPPlayState</a>
-    <span class="lineart">├──</span> <a class="link" href="DACPPlayer.html#DACPRepeatState" title="enum DACPRepeatState">DACPRepeatState</a>
-    <span class="lineart">├──</span> <a class="link" href="libdmapsharing-3.0-dmap-connection.html#DMAPConnectionState" title="enum DMAPConnectionState">DMAPConnectionState</a>
-    <span class="lineart">├──</span> <a class="link" href="DMAPMdnsBrowser.html#DMAPMdnsBrowserError" title="enum DMAPMdnsBrowserError">DMAPMdnsBrowserError</a>
-    <span class="lineart">├──</span> <a class="link" href="DMAPMdnsBrowser.html#DMAPMdnsBrowserServiceType" title="enum DMAPMdnsBrowserServiceType">DMAPMdnsBrowserServiceType</a>
-    <span class="lineart">├──</span> <a class="link" href="DMAPMdnsBrowser.html#DMAPMdnsBrowserTransportProtocol" title="enum DMAPMdnsBrowserTransportProtocol">DMAPMdnsBrowserTransportProtocol</a>
-    <span class="lineart">╰──</span> <a class="link" href="DMAPRecord.html#DMAPMediaKind" title="enum DMAPMediaKind">DMAPMediaKind</a>
+    <span class="lineart">├──</span> <a class="link" href="DmapConnection.html#DmapConnectionState" title="enum DmapConnectionState">DmapConnectionState</a>
+    <span class="lineart">├──</span> <a class="link" href="libdmapsharing-4.0-dmap-cc.html#DmapContentCode" title="enum DmapContentCode">DmapContentCode</a>
+    <span class="lineart">├──</span> <a class="link" href="DmapControlPlayer.html#DmapControlPlayState" title="enum DmapControlPlayState">DmapControlPlayState</a>
+    <span class="lineart">├──</span> <a class="link" href="DmapControlPlayer.html#DmapControlRepeatState" title="enum DmapControlRepeatState">DmapControlRepeatState</a>
+    <span class="lineart">├──</span> <a class="link" href="DmapDb.html#DmapDbId" title="enum DmapDbId">DmapDbId</a>
+    <span class="lineart">├──</span> DmapError
+    <span class="lineart">├──</span> <a class="link" href="DmapMdnsBrowser.html#DmapMdnsBrowserError" title="enum DmapMdnsBrowserError">DmapMdnsBrowserError</a>
+    <span class="lineart">├──</span> DmapMdnsPublisherError
+    <span class="lineart">├──</span> <a class="link" href="DmapMdnsService.html#DmapMdnsServiceTransportProtocol" title="enum DmapMdnsServiceTransportProtocol">DmapMdnsServiceTransportProtocol</a>
+    <span class="lineart">├──</span> <a class="link" href="DmapMdnsService.html#DmapMdnsServiceType" title="enum DmapMdnsServiceType">DmapMdnsServiceType</a>
+    <span class="lineart">├──</span> <a class="link" href="DmapRecord.html#DmapMediaKind" title="enum DmapMediaKind">DmapMediaKind</a>
+    <span class="lineart">╰──</span> <a class="link" href="DmapShare.html#DmapShareAuthMethod" title="enum DmapShareAuthMethod">DmapShareAuthMethod</a>
 </pre>
 </div>
 <div class="footer">
-<hr>Generated by GTK-Doc V1.32</div>
+<hr>Generated by GTK-Doc V1.33.1</div>
 </body>
 </html>
\ No newline at end of file
diff --git a/doc/html/server-internals.html b/doc/html/server-internals.html
new file mode 100644
index 0000000..92d1df7
--- /dev/null
+++ b/doc/html/server-internals.html
@@ -0,0 +1,81 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Libdmapsharing Server Internals: libdmapsharing Reference Manual</title>
+<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
+<link rel="home" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="up" href="ch03.html" title="Libdmapsharing Internals">
+<link rel="prev" href="coding-standards.html" title="Libdmapsharing Coding Standards">
+<link rel="next" href="client-internals.html" title="Libdmapsharing Client Internals">
+<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
+<td width="100%" align="left" class="shortcuts"></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
+<td><a accesskey="u" href="ch03.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="coding-standards.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="client-internals.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="refentry">
+<a name="server-internals"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle">Libdmapsharing Server Internals</span></h2>
+<p>Libdmapsharing Server Internals — 
+			Description of libdmapsharing's internal server code
+		</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="id-1.4.3.3"></a><h2>Libdmapsharing Server Internals</h2>
+<p>
+This description uses DmapAvShare to describe the libdmapsharing internals.
+DmapAvShare resembles each implmentation of
+the abstract class DMAPShare, including its cousin DmapImageShare. 
+After creating a new DmapAvShare, an application should call the object's
+dmap_share_serve and dmap_share_publish methods.
+The former method starts a new web server by calling
+soup_server_new, and it adds callbacks to the SoupServer object to handle
+the various paths required by the DMAP specification (/server-info,
+/content-codes, /login, and so on). DmapAvShare implements these callbacks,
+and DmapShare wraps them in an adapter method to make them suitable
+for the SoupServer's requirements.
+(Note that some callbacks are common to all DMAP protocols
+and are implemented in DMAPShare; e.g., the login callback.) The latter
+method, dmap_share_publish, starts the mDNS subsystem. It does
+this by using the mDNS implmentation option choosen at compile-time
+(either Avahi, DNS-SD, or Howl).
+
+		</p>
+<p>
+The DmapStructure class represents the data
+which makes up a DMAP request or response. The _cc_defs array defines the
+allowed entries in a DmapStructure representation. Likewise,
+the numeric content code used by each node is defined by the enum
+DmapContentCode. Both the _cc_defs array and the DmapContentCode enum
+must be in the same order. That is, if you add an entry to _cc_defs,
+then you must add its corresponding content code to DmapContentCode
+at the same relative position.
+
+		</p>
+<p>
+Assuming DmapStructure defines all the entries you require, DmapAvShare builds
+the actual
+protocol-specific structures. Note the use of the
+function dmap_structure_add. Often, the data dmap_structure_add
+adds is provided by a DmapAvRecord object that exists in a DmapDb
+object (both interfaces are implemented by the application). Eventually,
+the DmapAvShare provides the DmapStructure to the SoupServer object using
+the dmap_share_message_set_from_dmap_structure function.
+
+		</p>
+</div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.33.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/serviceaddedcb.html b/doc/html/serviceaddedcb.html
new file mode 100644
index 0000000..85a7bf5
--- /dev/null
+++ b/doc/html/serviceaddedcb.html
@@ -0,0 +1,70 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Service Added Callback: libdmapsharing Reference Manual</title>
+<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
+<link rel="home" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="up" href="ch02.html" title="Libdmapsharing Browsing Overview">
+<link rel="prev" href="browserapi.html" title="mDNS Browser API">
+<link rel="next" href="authenticatecb.html" title="Authenticate Callback">
+<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
+<td width="100%" align="left" class="shortcuts"></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
+<td><a accesskey="u" href="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="browserapi.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="authenticatecb.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="refentry">
+<a name="serviceaddedcb"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle">Service Added Callback</span></h2>
+<p>Service Added Callback — 
+			Defining a Service Added Callback
+		</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="id-1.3.5.3"></a><h2>Service Added Callback</h2>
+<p>
+The "service-added" callback typically creates DmapDb and
+DmapRecordFactory objects, and then passes these objects to
+dmap_connection_new. A subsequent call to the dmap_connection_start
+method causes this connection object to interact with the DAAP share in order to
+populate the client's DmapDb.
+
+		</p>
+<p>
+The following is a simple "service-added" callback which creates a DAAP connection:
+
+		</p>
+<pre class="screen">
+static void
+service_added_cb(DmapMdnsBrowser *browser, DmapMdnsBrowserService *service, gpointer user_data)
+
+	DmapDb *db;
+	DmapRecordFactory *factory;
+	DmapConnection *conn;
+
+	db      = DMAP_DB(my_dmap_db_new());
+	factory = DMAP_RECORD_FACTORY(my_dmap_av_record_factory_new());
+	conn    = DMAP_CONNECTION(dmap_av_connection_new(service-&gt;name, service-&gt;host, service-&gt;port, db, factory));
+
+	g_signal_connect(conn, "authenticate", G_CALLBACK(authenticate_cb), NULL, NULL);
+	g_signal_connect(conn, "error", G_CALLBACK(error_cb), NULL, NULL);
+
+	dmap_connection_start(conn, (DmapConnectionFunc) connected_cb, db);
+}
+		</pre>
+</div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.33.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/shareapi.html b/doc/html/shareapi.html
new file mode 100644
index 0000000..4393cc7
--- /dev/null
+++ b/doc/html/shareapi.html
@@ -0,0 +1,82 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Share API: libdmapsharing Reference Manual</title>
+<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
+<link rel="home" href="index.html" title="libdmapsharing Reference Manual">
+<link rel="up" href="ch01.html" title="Libdmapsharing Sharing Overview">
+<link rel="prev" href="containerdb.html" title="Container Database Implementation">
+<link rel="next" href="ch02.html" title="Libdmapsharing Browsing Overview">
+<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
+<td width="100%" align="left" class="shortcuts"></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
+<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="containerdb.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="ch02.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="refentry">
+<a name="shareapi"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle">Share API</span></h2>
+<p>Share API — 
+			Using the share API
+		</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="id-1.2.4.3"></a><h2>Share API</h2>
+<p>
+A DmapAvShare (or DmapImageShare) allows a program to share the media
+described by its DmapDb object.  The libdmapsharing package also provides
+an optional interface, DmapRecordFactory, that can be used in conjunction
+with a DmapDb implementation.  The following demonstrates the use of
+the share API; it serves up a media database made up of a single record.
+
+		</p>
+<pre class="screen">
+DmapRecordFactory *factory;
+DmapRecord *record;
+DmapDb *db;
+gboolean ok;
+DmapShare *share;
+GError *error = NULL;
+
+factory = DMAP_RECORD_FACTORY (my_dmap_av_record_factory_new ());
+
+record  = DMAP_RECORD (dmap_record_factory_create (factory, path_to_media_file, &amp;error));
+if (record == NULL) {
+	g_error("Error reading record: %s\n", error-&gt;messaage);
+}
+
+db = DMAP_DB (my_dmap_db_new ());
+dmap_db_add (db, record, &amp;error);
+g_object_unref (record);
+
+share = DMAP_SHARE(dmap_av_share_new (name, NULL, db, dmap_container_db, NULL);
+
+ok = dmap_share_serve(share, &amp;error);
+if (!ok) {
+	g_error("Error sharing: %s", error-&gt;message);
+}
+
+ok = dmap_share_publish(share, &amp;errro);
+if (!ok) {
+	g_error("Error publishing: %s", error-&gt;message);
+}
+
+g_main_loop_run(loop);
+
+		</pre>
+</div>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.33.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/html/style.css b/doc/html/style.css
index b4a1493..2eeda1f 100644
--- a/doc/html/style.css
+++ b/doc/html/style.css
@@ -61,18 +61,6 @@ a:hover
   color: #729fcf;
 }
 
-div.informaltable table
-{
-  border-collapse: separate;
-  border-spacing: 1em 0.3em;
-  border: none;
-}
-
-div.informaltable table td, div.informaltable table th
-{
-  vertical-align: top;
-}
-
 .function_type,
 .variable_type,
 .property_type,
@@ -127,6 +115,7 @@ td p
   margin: 0.25em;
 }
 
+div.informaltable table[border="1"],
 div.table table
 {
   border-collapse: collapse;
@@ -135,6 +124,8 @@ div.table table
   border: solid 1px #babdb6;
 }
 
+div.informaltable table[border="1"] td,
+div.informaltable table th,
 div.table table td, div.table table th
 {
   /* tango:aluminium 3 */
@@ -143,6 +134,7 @@ div.table table td, div.table table th
   vertical-align: top;
 }
 
+div.informaltable table[border="1"] th,
 div.table table th
 {
   /* tango:aluminium 2 */
@@ -463,23 +455,28 @@ acronym,abbr
   }
 }
 
+pre { line-height: 125%; }
+td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
+span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
+td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
+span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
 .hll { background-color: #ffffcc }
-.c { color: #408080; font-style: italic } /* Comment */
+.c { color: #3D7B7B; font-style: italic } /* Comment */
 .err { border: 1px solid #FF0000 } /* Error */
 .k { color: #008000; font-weight: bold } /* Keyword */
 .o { color: #666666 } /* Operator */
-.ch { color: #408080; font-style: italic } /* Comment.Hashbang */
-.cm { color: #408080; font-style: italic } /* Comment.Multiline */
-.cp { color: #BC7A00 } /* Comment.Preproc */
-.cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */
-.c1 { color: #408080; font-style: italic } /* Comment.Single */
-.cs { color: #408080; font-style: italic } /* Comment.Special */
+.ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */
+.cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */
+.cp { color: #9C6500 } /* Comment.Preproc */
+.cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */
+.c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */
+.cs { color: #3D7B7B; font-style: italic } /* Comment.Special */
 .gd { color: #A00000 } /* Generic.Deleted */
 .ge { font-style: italic } /* Generic.Emph */
-.gr { color: #FF0000 } /* Generic.Error */
+.gr { color: #E40000 } /* Generic.Error */
 .gh { color: #000080; font-weight: bold } /* Generic.Heading */
-.gi { color: #00A000 } /* Generic.Inserted */
-.go { color: #888888 } /* Generic.Output */
+.gi { color: #008400 } /* Generic.Inserted */
+.go { color: #717171 } /* Generic.Output */
 .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
 .gs { font-weight: bold } /* Generic.Strong */
 .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
@@ -492,15 +489,15 @@ acronym,abbr
 .kt { color: #B00040 } /* Keyword.Type */
 .m { color: #666666 } /* Literal.Number */
 .s { color: #BA2121 } /* Literal.String */
-.na { color: #7D9029 } /* Name.Attribute */
+.na { color: #687822 } /* Name.Attribute */
 .nb { color: #008000 } /* Name.Builtin */
 .nc { color: #0000FF; font-weight: bold } /* Name.Class */
 .no { color: #880000 } /* Name.Constant */
 .nd { color: #AA22FF } /* Name.Decorator */
-.ni { color: #999999; font-weight: bold } /* Name.Entity */
-.ne { color: #D2413A; font-weight: bold } /* Name.Exception */
+.ni { color: #717171; font-weight: bold } /* Name.Entity */
+.ne { color: #CB3F38; font-weight: bold } /* Name.Exception */
 .nf { color: #0000FF } /* Name.Function */
-.nl { color: #A0A000 } /* Name.Label */
+.nl { color: #767600 } /* Name.Label */
 .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
 .nt { color: #008000; font-weight: bold } /* Name.Tag */
 .nv { color: #19177C } /* Name.Variable */
@@ -517,11 +514,11 @@ acronym,abbr
 .dl { color: #BA2121 } /* Literal.String.Delimiter */
 .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
 .s2 { color: #BA2121 } /* Literal.String.Double */
-.se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
+.se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */
 .sh { color: #BA2121 } /* Literal.String.Heredoc */
-.si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
+.si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */
 .sx { color: #008000 } /* Literal.String.Other */
-.sr { color: #BB6688 } /* Literal.String.Regex */
+.sr { color: #A45A77 } /* Literal.String.Regex */
 .s1 { color: #BA2121 } /* Literal.String.Single */
 .ss { color: #19177C } /* Literal.String.Symbol */
 .bp { color: #008000 } /* Name.Builtin.Pseudo */
diff --git a/doc/libdmapsharing-3.0-docs.xml b/doc/libdmapsharing-3.0-docs.xml
deleted file mode 100644
index c9970f5..0000000
--- a/doc/libdmapsharing-3.0-docs.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
-               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
-[
-  <!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
-]>
-<book id="index">
-  <bookinfo>
-    <title>libdmapsharing-3.0 Reference Manual</title>
-    <releaseinfo>
-      for libdmapsharing 2.9.30.
-      The latest version of this documentation can be found online at
-      <ulink role="online-location" url="https://www.flyn.org/projects/libdmapsharing/doc/">https://www.flyn.org/projects/libdmapsharing/doc/</ulink>.
-    </releaseinfo>
-  </bookinfo>
-
-  <chapter>
-    <title>Libdmapsharing overview</title>
-        <xi:include href="xml/daap-connection.xml"/>
-    <xi:include href="xml/daap-record.xml"/>
-    <xi:include href="xml/daap-share.xml"/>
-    <xi:include href="xml/dacp-connection.xml"/>
-    <xi:include href="xml/dacp-player.xml"/>
-    <xi:include href="xml/dacp-share.xml"/>
-    <xi:include href="xml/dmap-connection.xml"/>
-    <xi:include href="xml/dmap-container-db.xml"/>
-    <xi:include href="xml/dmap-container-record.xml"/>
-    <xi:include href="xml/dmap-db.xml"/>
-    <xi:include href="xml/dmap-enums.xml"/>
-    <xi:include href="xml/dmap-gst-input-stream.xml"/>
-    <xi:include href="xml/dmap-gst-mp3-input-stream.xml"/>
-    <xi:include href="xml/dmap-gst-wav-input-stream.xml"/>
-    <xi:include href="xml/dmap-mdns-browser.xml"/>
-    <xi:include href="xml/dmap-record.xml"/>
-    <xi:include href="xml/dmap-record-factory.xml"/>
-    <xi:include href="xml/dmap-share.xml"/>
-    <xi:include href="xml/dpap-connection.xml"/>
-    <xi:include href="xml/dpap-record.xml"/>
-    <xi:include href="xml/dpap-share.xml"/>
-
-  </chapter>
-  <chapter id="object-tree">
-    <title>Object Hierarchy</title>
-     <xi:include href="xml/tree_index.sgml"/>
-  </chapter>
-  <index id="api-index-full">
-    <title>API Index</title>
-    <xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
-  </index>
-  <index id="deprecated-api-index" role="deprecated">
-    <title>Index of deprecated API</title>
-    <xi:include href="xml/api-index-deprecated.xml"><xi:fallback /></xi:include>
-  </index>
-
-  <xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
-</book>
diff --git a/doc/libdmapsharing-4.0-docs.xml b/doc/libdmapsharing-4.0-docs.xml
new file mode 100644
index 0000000..b3bdc36
--- /dev/null
+++ b/doc/libdmapsharing-4.0-docs.xml
@@ -0,0 +1,86 @@
+<?xml version="1.0"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
+[
+  <!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
+  <!ENTITY % gtkdocentities SYSTEM "xml/gtkdocentities.ent">
+  %gtkdocentities;
+]>
+<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
+  <bookinfo>
+    <title>libdmapsharing Reference Manual</title>
+    <releaseinfo>
+      for libdmapsharing 3.0
+      The latest version of this documentation can be found on-line at
+      <ulink role="online-location" url="http://www.flyn.org/projects/libdmapsharing/doc/">http://www.flyn.org/projects/libdmapsharing/doc/</ulink>.
+    </releaseinfo>
+  </bookinfo>
+
+  <chapter>
+    <title>Libdmapsharing Sharing Overview</title>
+    <xi:include href="mediadb.xml"/>
+    <xi:include href="containerdb.xml"/>
+    <xi:include href="shareapi.xml"/>
+  </chapter>
+
+  <chapter>
+    <title>Libdmapsharing Browsing Overview</title>
+    <xi:include href="mediadb.xml"/>
+    <xi:include href="containerdb.xml"/>
+    <xi:include href="browserapi.xml"/>
+    <xi:include href="serviceaddedcb.xml"/>
+    <xi:include href="authenticatecb.xml"/>
+    <xi:include href="errorcb.xml"/>
+    <xi:include href="connectedcb.xml"/>
+  </chapter>
+
+  <chapter>
+    <title>Libdmapsharing Internals</title>
+    <xi:include href="coding-standards.xml"/>
+    <xi:include href="server-internals.xml"/>
+    <xi:include href="client-internals.xml"/>
+  </chapter>
+
+  <chapter>
+    <title>Libdmapsharing Objects and Interfaces</title>
+        <xi:include href="xml/dmap-av-connection.xml"/>
+        <xi:include href="xml/dmap-av-record.xml"/>
+        <xi:include href="xml/dmap-av-share.xml"/>
+        <xi:include href="xml/dmap-cc.xml"/>
+        <xi:include href="xml/dmap-connection.xml"/>
+        <xi:include href="xml/dmap-container-db.xml"/>
+        <xi:include href="xml/dmap-container-record.xml"/>
+        <xi:include href="xml/dmap-control-connection.xml"/>
+        <xi:include href="xml/dmap-control-player.xml"/>
+        <xi:include href="xml/dmap-control-share.xml"/>
+        <xi:include href="xml/dmap-db.xml"/>
+        <xi:include href="xml/dmap-enums.xml"/>
+        <xi:include href="xml/dmap-transcode-stream.xml"/>
+        <xi:include href="xml/dmap-image-connection.xml"/>
+        <xi:include href="xml/dmap-image-record.xml"/>
+        <xi:include href="xml/dmap-image-share.xml"/>
+        <xi:include href="xml/dmap-md5.xml"/>
+        <xi:include href="xml/dmap-mdns-browser.xml"/>
+        <xi:include href="xml/dmap-mdns-service.xml"/>
+        <xi:include href="xml/dmap-record-factory.xml"/>
+        <xi:include href="xml/dmap-record.xml"/>
+        <xi:include href="xml/dmap-share.xml"/>
+        <xi:include href="xml/dmap-utils.xml"/>
+  </chapter>
+
+  <chapter id="object-tree">
+    <title>Object Hierarchy</title>
+    <xi:include href="xml/tree_index.sgml"/>
+  </chapter>
+  <index id="api-index-full">
+    <title>API Index</title>
+    <xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
+  </index>
+  <index id="deprecated-api-index" role="deprecated">
+    <title>Index of deprecated API</title>
+    <xi:include href="xml/api-index-deprecated.xml"><xi:fallback /></xi:include>
+  </index>
+
+
+  <xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
+</book>
diff --git a/gtk-doc.make b/gtk-doc.make
index 7d9a27f..c673175 100644
--- a/gtk-doc.make
+++ b/gtk-doc.make
@@ -57,6 +57,7 @@ DOC_STAMPS=setup-build.stamp scan-build.stamp sgml-build.stamp \
 	sgml.stamp html.stamp pdf.stamp
 
 SCANOBJ_FILES = 		 \
+	$(DOC_MODULE).actions	 \
 	$(DOC_MODULE).args 	 \
 	$(DOC_MODULE).hierarchy  \
 	$(DOC_MODULE).interfaces \
diff --git a/install-sh b/install-sh
index 6781b98..ec298b5 100755
--- a/install-sh
+++ b/install-sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2020-11-14.01; # UTC
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -35,25 +35,21 @@ scriptversion=2009-04-28.21; # UTC
 # FSF changes to this file are in the public domain.
 #
 # Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
+# 'make' implicit rules from creating a file called install from it
 # when there is no Makefile.
 #
 # This script is compatible with the BSD install script, but was written
 # from scratch.
 
+tab='	'
 nl='
 '
-IFS=" ""	$nl"
+IFS=" $tab$nl"
 
-# set DOITPROG to echo to test this script
+# Set DOITPROG to "echo" to test this script.
 
-# Don't use :- since 4.3BSD and earlier shells don't like it.
 doit=${DOITPROG-}
-if test -z "$doit"; then
-  doit_exec=exec
-else
-  doit_exec=$doit
-fi
+doit_exec=${doit:-exec}
 
 # Put in absolute file names if you don't have them in your path;
 # or use environment vars.
@@ -68,22 +64,16 @@ mvprog=${MVPROG-mv}
 rmprog=${RMPROG-rm}
 stripprog=${STRIPPROG-strip}
 
-posix_glob='?'
-initialize_posix_glob='
-  test "$posix_glob" != "?" || {
-    if (set -f) 2>/dev/null; then
-      posix_glob=
-    else
-      posix_glob=:
-    fi
-  }
-'
-
 posix_mkdir=
 
 # Desired mode of installed file.
 mode=0755
 
+# Create dirs (including intermediate dirs) using mode 755.
+# This is like GNU 'install' as of coreutils 8.32 (2020).
+mkdir_umask=22
+
+backupsuffix=
 chgrpcmd=
 chmodcmd=$chmodprog
 chowncmd=
@@ -97,7 +87,7 @@ dir_arg=
 dst_arg=
 
 copy_on_change=false
-no_target_directory=
+is_target_a_directory=possibly
 
 usage="\
 Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
@@ -114,18 +104,28 @@ Options:
      --version  display version info and exit.
 
   -c            (ignored)
-  -C            install only if different (preserve the last data modification time)
+  -C            install only if different (preserve data modification time)
   -d            create directories instead of installing files.
   -g GROUP      $chgrpprog installed files to GROUP.
   -m MODE       $chmodprog installed files to MODE.
   -o USER       $chownprog installed files to USER.
+  -p            pass -p to $cpprog.
   -s            $stripprog installed files.
+  -S SUFFIX     attempt to back up existing files, with suffix SUFFIX.
   -t DIRECTORY  install into DIRECTORY.
   -T            report an error if DSTFILE is a directory.
 
 Environment variables override the default commands:
   CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
   RMPROG STRIPPROG
+
+By default, rm is invoked with -f; when overridden with RMPROG,
+it's up to you to specify -f if you want it.
+
+If -S is not specified, no backups are attempted.
+
+Email bug reports to bug-automake@gnu.org.
+Automake home page: https://www.gnu.org/software/automake/
 "
 
 while test $# -ne 0; do
@@ -137,42 +137,62 @@ while test $# -ne 0; do
     -d) dir_arg=true;;
 
     -g) chgrpcmd="$chgrpprog $2"
-	shift;;
+        shift;;
 
     --help) echo "$usage"; exit $?;;
 
     -m) mode=$2
-	case $mode in
-	  *' '* | *'	'* | *'
-'*	  | *'*'* | *'?'* | *'['*)
-	    echo "$0: invalid mode: $mode" >&2
-	    exit 1;;
-	esac
-	shift;;
+        case $mode in
+          *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
+            echo "$0: invalid mode: $mode" >&2
+            exit 1;;
+        esac
+        shift;;
 
     -o) chowncmd="$chownprog $2"
-	shift;;
+        shift;;
+
+    -p) cpprog="$cpprog -p";;
 
     -s) stripcmd=$stripprog;;
 
-    -t) dst_arg=$2
-	shift;;
+    -S) backupsuffix="$2"
+        shift;;
+
+    -t)
+        is_target_a_directory=always
+        dst_arg=$2
+        # Protect names problematic for 'test' and other utilities.
+        case $dst_arg in
+          -* | [=\(\)!]) dst_arg=./$dst_arg;;
+        esac
+        shift;;
 
-    -T) no_target_directory=true;;
+    -T) is_target_a_directory=never;;
 
     --version) echo "$0 $scriptversion"; exit $?;;
 
-    --)	shift
-	break;;
+    --) shift
+        break;;
 
-    -*)	echo "$0: invalid option: $1" >&2
-	exit 1;;
+    -*) echo "$0: invalid option: $1" >&2
+        exit 1;;
 
     *)  break;;
   esac
   shift
 done
 
+# We allow the use of options -d and -T together, by making -d
+# take the precedence; this is for compatibility with GNU install.
+
+if test -n "$dir_arg"; then
+  if test -n "$dst_arg"; then
+    echo "$0: target directory not allowed when installing a directory." >&2
+    exit 1
+  fi
+fi
+
 if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
   # When -d is used, all remaining arguments are directories to create.
   # When -t is used, the destination is already specified.
@@ -186,6 +206,10 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
     fi
     shift # arg
     dst_arg=$arg
+    # Protect names problematic for 'test' and other utilities.
+    case $dst_arg in
+      -* | [=\(\)!]) dst_arg=./$dst_arg;;
+    esac
   done
 fi
 
@@ -194,13 +218,26 @@ if test $# -eq 0; then
     echo "$0: no input file specified." >&2
     exit 1
   fi
-  # It's OK to call `install-sh -d' without argument.
+  # It's OK to call 'install-sh -d' without argument.
   # This can happen when creating conditional directories.
   exit 0
 fi
 
 if test -z "$dir_arg"; then
-  trap '(exit $?); exit' 1 2 13 15
+  if test $# -gt 1 || test "$is_target_a_directory" = always; then
+    if test ! -d "$dst_arg"; then
+      echo "$0: $dst_arg: Is not a directory." >&2
+      exit 1
+    fi
+  fi
+fi
+
+if test -z "$dir_arg"; then
+  do_exit='(exit $ret); exit $ret'
+  trap "ret=129; $do_exit" 1
+  trap "ret=130; $do_exit" 2
+  trap "ret=141; $do_exit" 13
+  trap "ret=143; $do_exit" 15
 
   # Set umask so as not to create temps with too-generous modes.
   # However, 'strip' requires both read and write access to temps.
@@ -211,16 +248,16 @@ if test -z "$dir_arg"; then
 
     *[0-7])
       if test -z "$stripcmd"; then
-	u_plus_rw=
+        u_plus_rw=
       else
-	u_plus_rw='% 200'
+        u_plus_rw='% 200'
       fi
       cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
     *)
       if test -z "$stripcmd"; then
-	u_plus_rw=
+        u_plus_rw=
       else
-	u_plus_rw=,u+rw
+        u_plus_rw=,u+rw
       fi
       cp_umask=$mode$u_plus_rw;;
   esac
@@ -228,9 +265,9 @@ fi
 
 for src
 do
-  # Protect names starting with `-'.
+  # Protect names problematic for 'test' and other utilities.
   case $src in
-    -*) src=./$src;;
+    -* | [=\(\)!]) src=./$src;;
   esac
 
   if test -n "$dir_arg"; then
@@ -238,6 +275,10 @@ do
     dstdir=$dst
     test -d "$dstdir"
     dstdir_status=$?
+    # Don't chown directories that already exist.
+    if test $dstdir_status = 0; then
+      chowncmd=""
+    fi
   else
 
     # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
@@ -252,185 +293,150 @@ do
       echo "$0: no destination specified." >&2
       exit 1
     fi
-
     dst=$dst_arg
-    # Protect names starting with `-'.
-    case $dst in
-      -*) dst=./$dst;;
-    esac
 
-    # If destination is a directory, append the input filename; won't work
-    # if double slashes aren't ignored.
+    # If destination is a directory, append the input filename.
     if test -d "$dst"; then
-      if test -n "$no_target_directory"; then
-	echo "$0: $dst_arg: Is a directory" >&2
-	exit 1
+      if test "$is_target_a_directory" = never; then
+        echo "$0: $dst_arg: Is a directory" >&2
+        exit 1
       fi
       dstdir=$dst
-      dst=$dstdir/`basename "$src"`
+      dstbase=`basename "$src"`
+      case $dst in
+	*/) dst=$dst$dstbase;;
+	*)  dst=$dst/$dstbase;;
+      esac
       dstdir_status=0
     else
-      # Prefer dirname, but fall back on a substitute if dirname fails.
-      dstdir=`
-	(dirname "$dst") 2>/dev/null ||
-	expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	     X"$dst" : 'X\(//\)[^/]' \| \
-	     X"$dst" : 'X\(//\)$' \| \
-	     X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
-	echo X"$dst" |
-	    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-		   s//\1/
-		   q
-		 }
-		 /^X\(\/\/\)[^/].*/{
-		   s//\1/
-		   q
-		 }
-		 /^X\(\/\/\)$/{
-		   s//\1/
-		   q
-		 }
-		 /^X\(\/\).*/{
-		   s//\1/
-		   q
-		 }
-		 s/.*/./; q'
-      `
-
+      dstdir=`dirname "$dst"`
       test -d "$dstdir"
       dstdir_status=$?
     fi
   fi
 
+  case $dstdir in
+    */) dstdirslash=$dstdir;;
+    *)  dstdirslash=$dstdir/;;
+  esac
+
   obsolete_mkdir_used=false
 
   if test $dstdir_status != 0; then
     case $posix_mkdir in
       '')
-	# Create intermediate dirs using mode 755 as modified by the umask.
-	# This is like FreeBSD 'install' as of 1997-10-28.
-	umask=`umask`
-	case $stripcmd.$umask in
-	  # Optimize common cases.
-	  *[2367][2367]) mkdir_umask=$umask;;
-	  .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
-
-	  *[0-7])
-	    mkdir_umask=`expr $umask + 22 \
-	      - $umask % 100 % 40 + $umask % 20 \
-	      - $umask % 10 % 4 + $umask % 2
-	    `;;
-	  *) mkdir_umask=$umask,go-w;;
-	esac
-
-	# With -d, create the new directory with the user-specified mode.
-	# Otherwise, rely on $mkdir_umask.
-	if test -n "$dir_arg"; then
-	  mkdir_mode=-m$mode
+        # With -d, create the new directory with the user-specified mode.
+        # Otherwise, rely on $mkdir_umask.
+        if test -n "$dir_arg"; then
+          mkdir_mode=-m$mode
+        else
+          mkdir_mode=
+        fi
+
+        posix_mkdir=false
+	# The $RANDOM variable is not portable (e.g., dash).  Use it
+	# here however when possible just to lower collision chance.
+	tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+
+	trap '
+	  ret=$?
+	  rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
+	  exit $ret
+	' 0
+
+	# Because "mkdir -p" follows existing symlinks and we likely work
+	# directly in world-writeable /tmp, make sure that the '$tmpdir'
+	# directory is successfully created first before we actually test
+	# 'mkdir -p'.
+	if (umask $mkdir_umask &&
+	    $mkdirprog $mkdir_mode "$tmpdir" &&
+	    exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
+	then
+	  if test -z "$dir_arg" || {
+	       # Check for POSIX incompatibilities with -m.
+	       # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+	       # other-writable bit of parent directory when it shouldn't.
+	       # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+	       test_tmpdir="$tmpdir/a"
+	       ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
+	       case $ls_ld_tmpdir in
+		 d????-?r-*) different_mode=700;;
+		 d????-?--*) different_mode=755;;
+		 *) false;;
+	       esac &&
+	       $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
+		 ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
+		 test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+	       }
+	     }
+	  then posix_mkdir=:
+	  fi
+	  rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
 	else
-	  mkdir_mode=
+	  # Remove any dirs left behind by ancient mkdir implementations.
+	  rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
 	fi
-
-	posix_mkdir=false
-	case $umask in
-	  *[123567][0-7][0-7])
-	    # POSIX mkdir -p sets u+wx bits regardless of umask, which
-	    # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
-	    ;;
-	  *)
-	    tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
-	    trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
-
-	    if (umask $mkdir_umask &&
-		exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
-	    then
-	      if test -z "$dir_arg" || {
-		   # Check for POSIX incompatibilities with -m.
-		   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
-		   # other-writeable bit of parent directory when it shouldn't.
-		   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
-		   ls_ld_tmpdir=`ls -ld "$tmpdir"`
-		   case $ls_ld_tmpdir in
-		     d????-?r-*) different_mode=700;;
-		     d????-?--*) different_mode=755;;
-		     *) false;;
-		   esac &&
-		   $mkdirprog -m$different_mode -p -- "$tmpdir" && {
-		     ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
-		     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
-		   }
-		 }
-	      then posix_mkdir=:
-	      fi
-	      rmdir "$tmpdir/d" "$tmpdir"
-	    else
-	      # Remove any dirs left behind by ancient mkdir implementations.
-	      rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
-	    fi
-	    trap '' 0;;
-	esac;;
+	trap '' 0;;
     esac
 
     if
       $posix_mkdir && (
-	umask $mkdir_umask &&
-	$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+        umask $mkdir_umask &&
+        $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
       )
     then :
     else
 
-      # The umask is ridiculous, or mkdir does not conform to POSIX,
+      # mkdir does not conform to POSIX,
       # or it failed possibly due to a race condition.  Create the
       # directory the slow way, step by step, checking for races as we go.
 
       case $dstdir in
-	/*) prefix='/';;
-	-*) prefix='./';;
-	*)  prefix='';;
+        /*) prefix='/';;
+        [-=\(\)!]*) prefix='./';;
+        *)  prefix='';;
       esac
 
-      eval "$initialize_posix_glob"
-
       oIFS=$IFS
       IFS=/
-      $posix_glob set -f
+      set -f
       set fnord $dstdir
       shift
-      $posix_glob set +f
+      set +f
       IFS=$oIFS
 
       prefixes=
 
       for d
       do
-	test -z "$d" && continue
-
-	prefix=$prefix$d
-	if test -d "$prefix"; then
-	  prefixes=
-	else
-	  if $posix_mkdir; then
-	    (umask=$mkdir_umask &&
-	     $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
-	    # Don't fail if two instances are running concurrently.
-	    test -d "$prefix" || exit 1
-	  else
-	    case $prefix in
-	      *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
-	      *) qprefix=$prefix;;
-	    esac
-	    prefixes="$prefixes '$qprefix'"
-	  fi
-	fi
-	prefix=$prefix/
+        test X"$d" = X && continue
+
+        prefix=$prefix$d
+        if test -d "$prefix"; then
+          prefixes=
+        else
+          if $posix_mkdir; then
+            (umask $mkdir_umask &&
+             $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+            # Don't fail if two instances are running concurrently.
+            test -d "$prefix" || exit 1
+          else
+            case $prefix in
+              *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+              *) qprefix=$prefix;;
+            esac
+            prefixes="$prefixes '$qprefix'"
+          fi
+        fi
+        prefix=$prefix/
       done
 
       if test -n "$prefixes"; then
-	# Don't fail if two instances are running concurrently.
-	(umask $mkdir_umask &&
-	 eval "\$doit_exec \$mkdirprog $prefixes") ||
-	  test -d "$dstdir" || exit 1
-	obsolete_mkdir_used=true
+        # Don't fail if two instances are running concurrently.
+        (umask $mkdir_umask &&
+         eval "\$doit_exec \$mkdirprog $prefixes") ||
+          test -d "$dstdir" || exit 1
+        obsolete_mkdir_used=true
       fi
     fi
   fi
@@ -443,14 +449,25 @@ do
   else
 
     # Make a couple of temp file names in the proper directory.
-    dsttmp=$dstdir/_inst.$$_
-    rmtmp=$dstdir/_rm.$$_
+    dsttmp=${dstdirslash}_inst.$$_
+    rmtmp=${dstdirslash}_rm.$$_
 
     # Trap to clean up those temp files at exit.
     trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
 
     # Copy the file name to the temp name.
-    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+    (umask $cp_umask &&
+     { test -z "$stripcmd" || {
+	 # Create $dsttmp read-write so that cp doesn't create it read-only,
+	 # which would cause strip to fail.
+	 if test -z "$doit"; then
+	   : >"$dsttmp" # No need to fork-exec 'touch'.
+	 else
+	   $doit touch "$dsttmp"
+	 fi
+       }
+     } &&
+     $doit_exec $cpprog "$src" "$dsttmp") &&
 
     # and set any options; do chmod last to preserve setuid bits.
     #
@@ -465,20 +482,24 @@ do
 
     # If -C, don't bother to copy if it wouldn't change the file.
     if $copy_on_change &&
-       old=`LC_ALL=C ls -dlL "$dst"	2>/dev/null` &&
-       new=`LC_ALL=C ls -dlL "$dsttmp"	2>/dev/null` &&
-
-       eval "$initialize_posix_glob" &&
-       $posix_glob set -f &&
+       old=`LC_ALL=C ls -dlL "$dst"     2>/dev/null` &&
+       new=`LC_ALL=C ls -dlL "$dsttmp"  2>/dev/null` &&
+       set -f &&
        set X $old && old=:$2:$4:$5:$6 &&
        set X $new && new=:$2:$4:$5:$6 &&
-       $posix_glob set +f &&
-
+       set +f &&
        test "$old" = "$new" &&
        $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
     then
       rm -f "$dsttmp"
     else
+      # If $backupsuffix is set, and the file being installed
+      # already exists, attempt a backup.  Don't worry if it fails,
+      # e.g., if mv doesn't support -f.
+      if test -n "$backupsuffix" && test -f "$dst"; then
+        $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
+      fi
+
       # Rename the file to the real destination.
       $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
 
@@ -486,24 +507,24 @@ do
       # to itself, or perhaps because mv is so ancient that it does not
       # support -f.
       {
-	# Now remove or move aside any old file at destination location.
-	# We try this two ways since rm can't unlink itself on some
-	# systems and the destination file might be busy for other
-	# reasons.  In this case, the final cleanup might fail but the new
-	# file should still install successfully.
-	{
-	  test ! -f "$dst" ||
-	  $doit $rmcmd -f "$dst" 2>/dev/null ||
-	  { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
-	    { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
-	  } ||
-	  { echo "$0: cannot unlink or rename $dst" >&2
-	    (exit 1); exit 1
-	  }
-	} &&
-
-	# Now rename the file to the real destination.
-	$doit $mvcmd "$dsttmp" "$dst"
+        # Now remove or move aside any old file at destination location.
+        # We try this two ways since rm can't unlink itself on some
+        # systems and the destination file might be busy for other
+        # reasons.  In this case, the final cleanup might fail but the new
+        # file should still install successfully.
+        {
+          test ! -f "$dst" ||
+          $doit $rmcmd "$dst" 2>/dev/null ||
+          { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+            { $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
+          } ||
+          { echo "$0: cannot unlink or rename $dst" >&2
+            (exit 1); exit 1
+          }
+        } &&
+
+        # Now rename the file to the real destination.
+        $doit $mvcmd "$dsttmp" "$dst"
       }
     fi || exit 1
 
@@ -512,9 +533,9 @@ do
 done
 
 # Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
 # time-stamp-end: "; # UTC"
 # End:
diff --git a/libdmapsharing-3.0-uninstalled.pc b/libdmapsharing-4.0-uninstalled.pc
similarity index 57%
rename from libdmapsharing-3.0-uninstalled.pc
rename to libdmapsharing-4.0-uninstalled.pc
index 157d21b..75befde 100644
--- a/libdmapsharing-3.0-uninstalled.pc
+++ b/libdmapsharing-4.0-uninstalled.pc
@@ -5,7 +5,7 @@ includedir=${pcfiledir}
 
 Name: libdmapsharing
 Description: libdmapsharing
-Version: 2.9.41
-Requires: glib-2.0 libsoup-2.4 gstreamer-1.0 gstreamer-app-1.0
-Libs: -L${libdir} -ldmapsharing-3.0
+Version: 3.9.12
+Requires: glib-2.0 libsoup-3.0 gstreamer-1.0 gstreamer-app-1.0
+Libs: -L${libdir} -ldmapsharing-4.0
 Cflags: -I${includedir}
diff --git a/libdmapsharing-3.0-uninstalled.pc.in b/libdmapsharing-4.0-uninstalled.pc.in
similarity index 84%
rename from libdmapsharing-3.0-uninstalled.pc.in
rename to libdmapsharing-4.0-uninstalled.pc.in
index 52ea1db..d2f7b03 100644
--- a/libdmapsharing-3.0-uninstalled.pc.in
+++ b/libdmapsharing-4.0-uninstalled.pc.in
@@ -6,6 +6,6 @@ includedir=${pcfiledir}
 Name: libdmapsharing
 Description: libdmapsharing
 Version: @VERSION@
-Requires: glib-2.0 libsoup-2.4 @GSTLIB@
+Requires: glib-2.0 libsoup-3.0 @GSTLIB@
 Libs: -L${libdir} -ldmapsharing-@API_VERSION@
 Cflags: -I${includedir}
diff --git a/libdmapsharing-3.0.pc.in b/libdmapsharing-4.0.pc.in
similarity index 81%
rename from libdmapsharing-3.0.pc.in
rename to libdmapsharing-4.0.pc.in
index 0aa1e33..72b0b48 100644
--- a/libdmapsharing-3.0.pc.in
+++ b/libdmapsharing-4.0.pc.in
@@ -6,6 +6,7 @@ includedir=@includedir@
 Name: libdmapsharing
 Description: libdmapsharing
 Version: @VERSION@
-Requires: glib-2.0 libsoup-2.4 @GSTLIB@
+Requires: glib-2.0 libsoup-3.0
+Requires.private: @GSTLIB@
 Libs: -L${libdir} -ldmapsharing-@API_VERSION@
 Cflags: -I${includedir}/libdmapsharing-@API_VERSION@
diff --git a/libdmapsharing/Makefile.am b/libdmapsharing/Makefile.am
index a76ea46..3c1f79d 100644
--- a/libdmapsharing/Makefile.am
+++ b/libdmapsharing/Makefile.am
@@ -1,57 +1,64 @@
-lib_LTLIBRARIES = libdmapsharing-3.0.la
-
-libdmapsharing_3_0_la_SOURCES = \
-	daap-connection.c \
-	daap-record.c \
-	daap-share.c \
-	dacp-connection.c \
-	dacp-player.c \
-	dacp-share.c \
+lib_LTLIBRARIES = libdmapsharing-4.0.la
+
+libdmapsharing_4_0_la_SOURCES = \
+	dmap-av-connection.c \
+	dmap-av-record.c \
+	dmap-av-share.c \
+	dmap-control-connection.c \
+	dmap-control-player.c \
+	dmap-control-share.c \
 	dmap-connection.c \
 	dmap-container-db.c \
 	dmap-container-record.c \
 	dmap-db.c \
 	dmap-enums.c \
+	dmap-error.c \
 	dmap-md5.c \
+	dmap-mdns-service.c \
 	dmap-private-utils.c \
 	dmap-record.c \
 	dmap-record-factory.c \
 	dmap-share.c \
 	dmap-structure.c \
 	dmap-utils.c \
-	dpap-connection.c \
-	dpap-record.c \
-	dpap-share.c
+	dmap-image-connection.c \
+	dmap-image-record.c \
+	dmap-image-share.c
 
 if TESTS_ENABLED
-libdmapsharing_3_0_la_SOURCES += \
-	test-daap-record.c \
-	test-daap-record-factory.c \
-	test-dpap-record.c \
-	test-dpap-record-factory.c
+libdmapsharing_4_0_la_SOURCES += \
+	test-dmap-av-record.c \
+	test-dmap-av-record-factory.c \
+	test-dmap-container-db.c \
+	test-dmap-container-record.c \
+	test-dmap-db.c \
+	test-dmap-image-record.c \
+	test-dmap-image-record-factory.c
 endif
 
 if USE_AVAHI
-libdmapsharing_3_0_la_SOURCES += \
+libdmapsharing_4_0_la_SOURCES += \
 	dmap-mdns-avahi.c \
 	dmap-mdns-browser-avahi.c \
 	dmap-mdns-publisher-avahi.c
 else
-libdmapsharing_3_0_la_SOURCES += \
+libdmapsharing_4_0_la_SOURCES += \
 	dmap-mdns-browser-dnssd.c \
 	dmap-mdns-publisher-dnssd.c
 endif
 
 if USE_GSTREAMERAPP
-libdmapsharing_3_0_la_SOURCES += \
-	dmap-gst-input-stream.c \
-	dmap-gst-mp3-input-stream.c \
-	dmap-gst-qt-input-stream.c \
-	dmap-gst-wav-input-stream.c \
+libdmapsharing_4_0_la_SOURCES += \
+	dmap-transcode-stream.c \
+	dmap-transcode-mp3-stream.c \
+	dmap-transcode-qt-stream.c \
+	dmap-transcode-wav-stream.c \
 	gst-util.c
 endif
 
-libdmapsharing_3_0_la_CFLAGS = \
+libdmapsharing_4_0_la_CFLAGS = \
+	-Wall \
+	-Wextra \
 	-DG_LOG_DOMAIN=\"libdmapsharing\" \
 	-I$(top_srcdir) \
 	-I$(top_builddir) \
@@ -61,7 +68,7 @@ libdmapsharing_3_0_la_CFLAGS = \
 	$(MDNS_CFLAGS) \
 	$(WARN_CFLAGS)
 
-libdmapsharing_3_0_la_LDFLAGS = \
+libdmapsharing_4_0_la_LDFLAGS = \
 	-version-info @SO_VERSION@ \
 	$(CHECK_LIBS) \
 	$(GLIB_LIBS) \
@@ -75,72 +82,90 @@ libdmapsharing_3_0_la_LDFLAGS = \
 libdmapsharingincludedir = \
 	$(includedir)/libdmapsharing-@API_VERSION@/libdmapsharing
 
-libdmapsharinginclude_HEADERS = \
-	daap-connection.h \
-	daap-record.h \
-	daap-share.h \
-	dacp-connection.h \
-	dacp-share.h \
-	dacp-player.h \
+maintained_headers = \
+	dmap-av-connection.h \
+	dmap-av-record.h \
+	dmap-av-share.h \
+	dmap-cc.h \
+	dmap-control-connection.h \
+	dmap-control-share.h \
+	dmap-control-player.h \
 	dmap.h \
 	dmap-connection.h \
 	dmap-container-db.h \
 	dmap-container-record.h \
 	dmap-db.h \
-	dmap-enums.h \
+	dmap-error.h \
 	dmap-md5.h \
 	dmap-mdns-browser.h \
 	dmap-mdns-publisher.h \
+	dmap-mdns-service.h \
 	dmap-record.h \
 	dmap-record-factory.h \
 	dmap-share.h \
-	dmap-structure.h \
 	dmap-utils.h \
-	dpap-connection.h \
-	dpap-record.h \
-	dpap-share.h
+	dmap-image-connection.h \
+	dmap-image-record.h \
+	dmap-image-share.h
 
 if USE_GSTREAMERAPP
-libdmapsharinginclude_HEADERS += \
-	dmap-gst-input-stream.h
+maintained_headers += \
+	dmap-transcode-stream.h
 endif
 
+generated_headers = \
+	dmap-enums.h
+
+libdmapsharinginclude_HEADERS = \
+	$(maintained_headers) \
+	$(generated_headers)
+
 noinst_HEADERS = \
 	dmap-config.h \
-	dmap-gst-mp3-input-stream.h \
-	dmap-gst-qt-input-stream.h \
-	dmap-gst-wav-input-stream.h \
+	dmap-connection-private.h \
+	dmap-transcode-mp3-stream.h \
+	dmap-transcode-qt-stream.h \
+	dmap-transcode-stream-private.h \
+	dmap-transcode-wav-stream.h \
 	dmap-mdns-avahi.h \
 	dmap-private-utils.h \
+	dmap-share-private.h \
+	dmap-structure.h \
 	gst-util.h \
-	test-daap-record-factory.h \
-	test-daap-record.h \
-	test-dpap-record-factory.h \
-	test-dpap-record.h
+	test-dmap-av-record-factory.h \
+	test-dmap-av-record.h \
+	test-dmap-container-db.h \
+	test-dmap-container-record.h \
+	test-dmap-db.h \
+	test-dmap-image-record-factory.h \
+	test-dmap-image-record.h
 
-BUILT_SOURCES = dmap-enums.c dmap-enums.h unit-test.stamp
+BUILT_SOURCES = \
+	dmap-enums.c \
+	dmap-enums.h \
+	unit-test.stamp
 
-CLEANFILES = $(BUILT_SOURCES) ../tests/unit-test.c *-suite.c pedansee.conf
+CLEANFILES = $(BUILT_SOURCES) \
+	../tests/unit-test.c \
+	*-suite.c \
+	*-suite.h \
+	pedansee.conf
 
-dmap-enums.c: $(libdmapsharinginclude_headers) Makefile dmap-enums.h
+dmap-enums.c: $(maintained_headers) Makefile dmap-enums.h
 	@glib-mkenums \
-			--fhead "/* Automatically generated by glib-mkenums */\n\n#include \"dacp-share.h\"\n#include \"dacp-player.h\"\n#include \"dmap-mdns-publisher.h\"\n#include \"dmap-mdns-browser.h\"\n#include \"dmap-connection.h\"\n#include \"dmap-enums.h\"" \
+			--fhead "/* Automatically generated by glib-mkenums */\n\n#include \"dmap-control-share.h\"\n#include \"dmap-control-player.h\"\n#include \"dmap-mdns-publisher.h\"\n#include \"dmap-mdns-browser.h\"\n#include \"dmap-connection.h\"\n#include \"dmap-error.h\"\n#include \"dmap-enums.h\"" \
 			--fprod "\n/* enumerations from \"@filename@\" */" \
 			--vhead "GType\n@enum_name@_get_type (void)\n{\n  static GType etype = 0;\n  if (etype == 0) {\n    static const G@Type@Value values[] = {" \
 			--vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
 			--vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
-		$(addprefix $(srcdir)/,$(libdmapsharinginclude_HEADERS)) > $@.tmp \
-	&& sed -e "s/d_map/dmap/" -e "s/D_MAP/DMAP/" -e "s/d_acp/dacp/" -e "s/D_ACP/DACP/" $@.tmp > $@ \
-	&& rm -f $@.tmp
+		$(maintained_headers) >$@
 
-dmap-enums.h: $(libdmapsharinginclude_HEADERS) Makefile
+dmap-enums.h: $(maintained_headers) Makefile
 	@glib-mkenums \
-			--fhead "/* Automatically generated by glib-mkenums */\n\n#ifndef DMAP_ENUMS_H\n#define DMAP_ENUMS_H\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n\n" \
+			--fhead "/* Automatically generated by glib-mkenums */\n\n#ifndef _DMAP_ENUMS_H\n#define _DMAP_ENUMS_H\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n\n" \
 			--fprod "\n/* enumerations from \"@filename@\" */\n" \
 			--vhead "GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define DMAP_TYPE_@ENUMNAME@ (@enum_name@_get_type())\n" \
-			--ftail "G_END_DECLS\n\n#endif /* !DMAP_ENUMS_H */" $(addprefix $(srcdir)/,$(libdmapsharinginclude_HEADERS)) > $@.tmp \
-	&& sed -e "s/d_map/dmap/" -e "s/D_MAP/DMAP/" -e "s/d_acp/dacp/" -e "s/D_ACP/DACP/" $@.tmp > $@ \
-	&& rm -f $@.tmp
+			--ftail "G_END_DECLS\n\n#endif /* _DMAP_ENUMS_H */" $(maintained_headers) >$@
 
 unit-test.stamp: *.c
 	./generate-test-suites
@@ -149,21 +174,19 @@ unit-test.stamp: *.c
 
 if HAVE_INTROSPECTION
 include $(INTROSPECTION_MAKEFILE)
-INTROSPECTION_GIRS =
-INTROSPECTION_SCANNER_ARGS = --symbol-prefix=dmap --add-include-path=$(srcdir) --warn-all
+INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --warn-all
 INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
-
 introspection_sources = $(libdmapsharinginclude_HEADERS) $(libdmapsharinginclude_SOURCES)
 
-DMAP-3.0.gir: libdmapsharing-3.0.la
-DMAP_3_0_gir_INCLUDES = GObject-2.0 Soup-2.4
-DMAP_3_0_gir_CFLAGS = \
-	$(libdmapsharing_3_0_la_CFLAGS)
-DMAP_3_0_gir_LIBS = \
-	libdmapsharing-3.0.la
-DMAP_3_0_gir_FILES = $(introspection_sources)
+Dmap-4.0.gir: libdmapsharing-4.0.la
+Dmap_4_0_gir_NAMESPACE = Dmap 
+Dmap_4_0_gir_SCANNERFLAGS = --symbol-prefix=dmap
+Dmap_4_0_gir_LIBS = libdmapsharing-4.0.la
+Dmap_4_0_gir_FILES = $(introspection_sources)
+Dmap_4_0_gir_INCLUDES = GObject-2.0 Soup-3.0 Gst-1.0
+Dmap_4_0_gir_CFLAGS = $(INCLUDES) $(libdmapsharing_4_0_la_CFLAGS)
 
-INTROSPECTION_GIRS += DMAP-3.0.gir
+INTROSPECTION_GIRS = Dmap-4.0.gir
 
 girdir = $(datadir)/gir-1.0
 gir_DATA = $(INTROSPECTION_GIRS)
@@ -174,27 +197,123 @@ typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
 CLEANFILES += $(gir_DATA) $(typelib_DATA)
 endif
 
-check:
+check-local:
+	make clean
+	make CFLAGS="-fprofile-arcs -ftest-coverage -g"
+	../tests/unit-test
+	set -e; for i in $(libdmapsharing_4_0_la_SOURCES); do \
+		gcov -r -o .libs/libdmapsharing_4_0_la-$${i%.c}.o $$i >/dev/null; \
+	done
+	../tests/summarize-coverage ${libdmapsharing_4_0_la_SOURCES:.c=.c.gcov}
 if HAVE_PEDANSEE
-	echo    "[ignore]" > pedansee.conf
-	echo -n "	name = " >> pedansee.conf
-	for i in $$(grep G_DEFINE_TYPE *.c | sed 's/[^,]*, \([^,]*\),.*/\1/g'); do \
-		echo -n $${i}_init\;; \
-		echo -n $${i}_class_init\;; \
-		echo -n $${i}_parent_class\;; \
-		echo -n $${i}_get_instance_private\;; \
-		echo -n $${i}_class_intern_init\;; \
-		echo -n $${i}_get_type\;; \
-	done >> pedansee.conf
-	for i in $$(grep G_DEFINE_TYPE *.c | sed 's/.*(\([^,]*\),.*/\1/g'); do \
-		echo -n $${i}_private_offset\;; \
-	done >> pedansee.conf
-	set -e; for i in $(libdmapsharing_3_0_la_SOURCES); do \
-		$(PEDANSEE) -c pedansee.conf $$i -- -x c $(DEFS) $(libdmapsharing_3_0_la_CFLAGS); \
+	echo    "[flags]" >pedansee.conf
+	echo    "	skip-unit-test-present = true" >>pedansee.conf
+	echo    "	skip-return-value-used = true" >>pedansee.conf
+	echo    "[ignore-return-check]" >>pedansee.conf
+	echo    "	# Ignore dmap_structure_add; return cannot indicate error." >>pedansee.conf
+	echo    "	# Ignore g_object_ref; return value merely a convenience." >>pedansee.conf
+	echo -n "	name = " >>pedansee.conf
+	echo -n "dmap_structure_add;" >>pedansee.conf
+	echo -n "g_object_ref;" >>pedansee.conf
+	echo -n "g_string_ascii_up;" >>pedansee.conf
+	echo -n "g_string_append_len;" >>pedansee.conf
+	echo >>pedansee.conf
+	echo    "[ignore-entirely]" >>pedansee.conf
+	echo    "       # Ignore CPP-generated GObject code." >>pedansee.conf
+	echo -n "       name = " >>pedansee.conf
+	echo -n  	      "dmap_mdns_browser_new;" >>pedansee.conf
+	echo -n  	      "dmap_mdns_browser_start;" >>pedansee.conf
+	echo -n  	      "dmap_mdns_browser_stop;" >>pedansee.conf
+	echo -n  	      "dmap_mdns_browser_error_quark;" >>pedansee.conf
+	echo -n  	      "dmap_mdns_browser_get_services;" >>pedansee.conf
+	echo -n  	      "dmap_mdns_browser_get_service_type;" >>pedansee.conf
+	echo -n		      "dmap_mdns_publisher_new;" >>pedansee.conf
+	echo -n		      "dmap_mdns_publisher_error_quark;" >>pedansee.conf
+	echo -n		      "dmap_mdns_publisher_rename_at_port;" >>pedansee.conf
+	echo -n		      "dmap_mdns_publisher_publish;" >>pedansee.conf
+	echo -n		      "dmap_mdns_publisher_withdraw;" >>pedansee.conf
+	echo -n		      "dmap_connection_get;" >>pedansee.conf
+	for i in $$(grep -l G_DEFINE_INTERFACE *.c); do \
+		j=$$(cat $$i | awk '/^G_DEFINE_INTERFACE/ { x = 1 } { if (x == 1) printf("%s ", $$0) }' | sed 's/[^,]*, \([^,]*\),.*/\1/g'); \
+		echo -n $${j}_default_init\;; \
+		echo -n $${j}_get_type\;; \
+	done >>pedansee.conf
+	for i in $$(grep -l G_DEFINE_TYPE *.c); do \
+		j=$$(cat $$i | awk '/^G_DEFINE_TYPE/ { x = 1 } { if (x == 1) printf("%s ", $$0) }' | sed 's/[^,]*, \([^,]*\),.*/\1/g'); \
+		echo -n $${j}_class_init\;; \
+		echo -n $${j}_class_intern_init\;; \
+		echo -n $${j}_get_instance_private\;; \
+		echo -n $${j}_get_type\;; \
+		echo -n $${j}_get_type_once\;; \
+		echo -n $${j}_init\;; \
+		echo -n $${j}_parent_class\;; \
+	done >>pedansee.conf
+	for i in $$(grep -l G_DEFINE_TYPE *.c); do \
+		j=$$(cat $$i | awk '/^G_DEFINE_TYPE/ { x = 1 } { if (x == 1) printf("%s ", $$0) }' | sed 's/[^(]*(\([^,]*\),.*/\1/g'); \
+		echo -n $${j}_private_offset\;; \
+	done >>pedansee.conf
+	for i in $$(grep -l G_DEFINE_DYNAMIC_TYPE *.c); do \
+		j=$$(cat $$i | awk '/^G_DEFINE_DYNAMIC_TYPE/ { x = 1 } { if (x == 1) printf("%s ", $$0) }' | sed 's/[^,]*, \([^,]*\),.*/\1/g'); \
+		echo -n $${j}_class_init\;; \
+		echo -n $${j}_class_finalize\;; \
+		echo -n $${j}_init\;; \
+		echo -n $${j}_parent_class\;; \
+		echo -n $${j}_type_id\;; \
+		echo -n $${j}_register_type\;; \
+		echo -n $${j}_class_intern_init\;; \
+		echo -n $${j}_get_instance_private\;; \
+		echo -n $${j}_register_type\;; \
+	done >>pedansee.conf
+	for i in $$(grep -l G_DEFINE_DYNAMIC_TYPE *.c); do \
+		j=$$(cat $$i | awk '/^G_DEFINE_DYNAMIC_TYPE/ { x = 1 } { if (x == 1) printf("%s ", $$0) }' | sed 's/[^(]*(\([^,]*\),.*/\1/g'); \
+		echo -n $${j}_private_offset\;; \
+	done >>pedansee.conf
+	for i in $$(grep -l G_DEFINE_DYNAMIC_TYPE_EXTENDED *.c); do \
+		j=$$(cat $$i | awk '/^G_DEFINE_DYNAMIC_TYPE_EXTENDED/ { x = 1 } { if (x == 1) printf("%s ", $$0) }' | sed 's/[^,]*, \([^,]*\),.*/\1/g'); \
+		echo -n $${j}_class_finalize\;; \
+		echo -n $${j}_register_type\;; \
+		echo -n $${j}_init\;; \
+		echo -n $${j}_parent_class\;; \
+		echo -n $${j}_type_id\;; \
+		echo -n $${j}_intern_init\;; \
+		echo -n $${j}_get_instance_private\;; \
+		echo -n $${j}_register_type\;; \
+		echo -n $${j}_class_intern_init\;; \
+	done >>pedansee.conf
+	for i in $$(grep -l G_DEFINE_DYNAMIC_TYPE_EXTENDED *.c); do \
+		j=$$(cat $$i | awk '/^G_DEFINE_DYNAMIC_TYPE_EXTENDED/ { x = 1 } { if (x == 1) printf("%s ", $$0) }' | sed 's/[^(]*(\([^,]*\),.*/\1/g'); \
+		echo -n $${j}_private_offset\;; \
+	done >>pedansee.conf
+	for i in $$(grep -l G_DEFINE_ABSTRACT_TYPE *.c); do \
+		j=$$(cat $$i | awk '/^G_DEFINE_ABSTRACT_TYPE/ { x = 1 } { if (x == 1) printf("%s ", $$0) }' | sed 's/[^,]*, \([^,]*\),.*/\1/g'); \
+		echo -n $${j}_init\;; \
+		echo -n $${j}_class_init\;; \
+		echo -n $${j}_get_type_once\;; \
+		echo -n $${j}_parent_class\;; \
+		echo -n $${j}_get_instance_private\;; \
+		echo -n $${j}_class_intern_init\;; \
+	done >>pedansee.conf
+	for i in $$(grep -l G_DEFINE_ABSTRACT_TYPE *.c); do \
+		j=$$(cat $$i | awk '/^G_DEFINE_ABSTRACT_TYPE/ { x = 1 } { if (x == 1) printf("%s ", $$0) }' | sed 's/[^(]*(\([^,]*\),.*/\1/g'); \
+		echo -n $${j}_private_offset\;; \
+	done >>pedansee.conf
+
+	set -e; for i in $(libdmapsharing_4_0_la_SOURCES); do \
+		if [ $$i = dmap-enums.c ]; then # Skip this generated code. \
+			continue; \
+		fi; \
+		$(PEDANSEE) -c pedansee.conf $$i -- -x c $(DEFS) $(libdmapsharing_4_0_la_CFLAGS); \
 	done
-	set -e; for i in $(libdmapsharinginclude_HEADERS) \
+
+	set -e; for i in $(maintained_headers) \
 	                 $(noinst_HEADERS); do \
-		$(PEDANSEE) -c pedansee.conf $$i -- -x c $(DEFS) $(libdmapsharing_3_0_la_CFLAGS); \
+		if [ $$i = dmap-share-private.h ]; then # Skip this code. \
+			continue; \
+		fi; \
+		if [ $$i = dmap-connection-private.h ]; then # Skip this code. \
+			continue; \
+		fi; \
+		$(PEDANSEE) -c pedansee.conf $$i -- -x c $(DEFS) $(libdmapsharing_4_0_la_CFLAGS); \
 	done
 endif
 
diff --git a/libdmapsharing/Makefile.in b/libdmapsharing/Makefile.in
index 35e62a9..dd0b270 100644
--- a/libdmapsharing/Makefile.in
+++ b/libdmapsharing/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -91,10 +91,13 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 @TESTS_ENABLED_TRUE@am__append_1 = \
-@TESTS_ENABLED_TRUE@	test-daap-record.c \
-@TESTS_ENABLED_TRUE@	test-daap-record-factory.c \
-@TESTS_ENABLED_TRUE@	test-dpap-record.c \
-@TESTS_ENABLED_TRUE@	test-dpap-record-factory.c
+@TESTS_ENABLED_TRUE@	test-dmap-av-record.c \
+@TESTS_ENABLED_TRUE@	test-dmap-av-record-factory.c \
+@TESTS_ENABLED_TRUE@	test-dmap-container-db.c \
+@TESTS_ENABLED_TRUE@	test-dmap-container-record.c \
+@TESTS_ENABLED_TRUE@	test-dmap-db.c \
+@TESTS_ENABLED_TRUE@	test-dmap-image-record.c \
+@TESTS_ENABLED_TRUE@	test-dmap-image-record-factory.c
 
 @USE_AVAHI_TRUE@am__append_2 = \
 @USE_AVAHI_TRUE@	dmap-mdns-avahi.c \
@@ -106,14 +109,14 @@ host_triplet = @host@
 @USE_AVAHI_FALSE@	dmap-mdns-publisher-dnssd.c
 
 @USE_GSTREAMERAPP_TRUE@am__append_4 = \
-@USE_GSTREAMERAPP_TRUE@	dmap-gst-input-stream.c \
-@USE_GSTREAMERAPP_TRUE@	dmap-gst-mp3-input-stream.c \
-@USE_GSTREAMERAPP_TRUE@	dmap-gst-qt-input-stream.c \
-@USE_GSTREAMERAPP_TRUE@	dmap-gst-wav-input-stream.c \
+@USE_GSTREAMERAPP_TRUE@	dmap-transcode-stream.c \
+@USE_GSTREAMERAPP_TRUE@	dmap-transcode-mp3-stream.c \
+@USE_GSTREAMERAPP_TRUE@	dmap-transcode-qt-stream.c \
+@USE_GSTREAMERAPP_TRUE@	dmap-transcode-wav-stream.c \
 @USE_GSTREAMERAPP_TRUE@	gst-util.c
 
 @USE_GSTREAMERAPP_TRUE@am__append_5 = \
-@USE_GSTREAMERAPP_TRUE@	dmap-gst-input-stream.h
+@USE_GSTREAMERAPP_TRUE@	dmap-transcode-stream.h
 
 @HAVE_INTROSPECTION_TRUE@am__append_6 = $(gir_DATA) $(typelib_DATA)
 subdir = libdmapsharing
@@ -163,69 +166,76 @@ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(girdir)" \
 	"$(DESTDIR)$(typelibdir)" \
 	"$(DESTDIR)$(libdmapsharingincludedir)"
 LTLIBRARIES = $(lib_LTLIBRARIES)
-libdmapsharing_3_0_la_LIBADD =
-am__libdmapsharing_3_0_la_SOURCES_DIST = daap-connection.c \
-	daap-record.c daap-share.c dacp-connection.c dacp-player.c \
-	dacp-share.c dmap-connection.c dmap-container-db.c \
-	dmap-container-record.c dmap-db.c dmap-enums.c dmap-md5.c \
+libdmapsharing_4_0_la_LIBADD =
+am__libdmapsharing_4_0_la_SOURCES_DIST = dmap-av-connection.c \
+	dmap-av-record.c dmap-av-share.c dmap-control-connection.c \
+	dmap-control-player.c dmap-control-share.c dmap-connection.c \
+	dmap-container-db.c dmap-container-record.c dmap-db.c \
+	dmap-enums.c dmap-error.c dmap-md5.c dmap-mdns-service.c \
 	dmap-private-utils.c dmap-record.c dmap-record-factory.c \
-	dmap-share.c dmap-structure.c dmap-utils.c dpap-connection.c \
-	dpap-record.c dpap-share.c test-daap-record.c \
-	test-daap-record-factory.c test-dpap-record.c \
-	test-dpap-record-factory.c dmap-mdns-avahi.c \
+	dmap-share.c dmap-structure.c dmap-utils.c \
+	dmap-image-connection.c dmap-image-record.c dmap-image-share.c \
+	test-dmap-av-record.c test-dmap-av-record-factory.c \
+	test-dmap-container-db.c test-dmap-container-record.c \
+	test-dmap-db.c test-dmap-image-record.c \
+	test-dmap-image-record-factory.c dmap-mdns-avahi.c \
 	dmap-mdns-browser-avahi.c dmap-mdns-publisher-avahi.c \
 	dmap-mdns-browser-dnssd.c dmap-mdns-publisher-dnssd.c \
-	dmap-gst-input-stream.c dmap-gst-mp3-input-stream.c \
-	dmap-gst-qt-input-stream.c dmap-gst-wav-input-stream.c \
+	dmap-transcode-stream.c dmap-transcode-mp3-stream.c \
+	dmap-transcode-qt-stream.c dmap-transcode-wav-stream.c \
 	gst-util.c
-@TESTS_ENABLED_TRUE@am__objects_1 =  \
-@TESTS_ENABLED_TRUE@	libdmapsharing_3_0_la-test-daap-record.lo \
-@TESTS_ENABLED_TRUE@	libdmapsharing_3_0_la-test-daap-record-factory.lo \
-@TESTS_ENABLED_TRUE@	libdmapsharing_3_0_la-test-dpap-record.lo \
-@TESTS_ENABLED_TRUE@	libdmapsharing_3_0_la-test-dpap-record-factory.lo
+@TESTS_ENABLED_TRUE@am__objects_1 = libdmapsharing_4_0_la-test-dmap-av-record.lo \
+@TESTS_ENABLED_TRUE@	libdmapsharing_4_0_la-test-dmap-av-record-factory.lo \
+@TESTS_ENABLED_TRUE@	libdmapsharing_4_0_la-test-dmap-container-db.lo \
+@TESTS_ENABLED_TRUE@	libdmapsharing_4_0_la-test-dmap-container-record.lo \
+@TESTS_ENABLED_TRUE@	libdmapsharing_4_0_la-test-dmap-db.lo \
+@TESTS_ENABLED_TRUE@	libdmapsharing_4_0_la-test-dmap-image-record.lo \
+@TESTS_ENABLED_TRUE@	libdmapsharing_4_0_la-test-dmap-image-record-factory.lo
 @USE_AVAHI_TRUE@am__objects_2 =  \
-@USE_AVAHI_TRUE@	libdmapsharing_3_0_la-dmap-mdns-avahi.lo \
-@USE_AVAHI_TRUE@	libdmapsharing_3_0_la-dmap-mdns-browser-avahi.lo \
-@USE_AVAHI_TRUE@	libdmapsharing_3_0_la-dmap-mdns-publisher-avahi.lo
-@USE_AVAHI_FALSE@am__objects_3 = libdmapsharing_3_0_la-dmap-mdns-browser-dnssd.lo \
-@USE_AVAHI_FALSE@	libdmapsharing_3_0_la-dmap-mdns-publisher-dnssd.lo
-@USE_GSTREAMERAPP_TRUE@am__objects_4 = libdmapsharing_3_0_la-dmap-gst-input-stream.lo \
-@USE_GSTREAMERAPP_TRUE@	libdmapsharing_3_0_la-dmap-gst-mp3-input-stream.lo \
-@USE_GSTREAMERAPP_TRUE@	libdmapsharing_3_0_la-dmap-gst-qt-input-stream.lo \
-@USE_GSTREAMERAPP_TRUE@	libdmapsharing_3_0_la-dmap-gst-wav-input-stream.lo \
-@USE_GSTREAMERAPP_TRUE@	libdmapsharing_3_0_la-gst-util.lo
-am_libdmapsharing_3_0_la_OBJECTS =  \
-	libdmapsharing_3_0_la-daap-connection.lo \
-	libdmapsharing_3_0_la-daap-record.lo \
-	libdmapsharing_3_0_la-daap-share.lo \
-	libdmapsharing_3_0_la-dacp-connection.lo \
-	libdmapsharing_3_0_la-dacp-player.lo \
-	libdmapsharing_3_0_la-dacp-share.lo \
-	libdmapsharing_3_0_la-dmap-connection.lo \
-	libdmapsharing_3_0_la-dmap-container-db.lo \
-	libdmapsharing_3_0_la-dmap-container-record.lo \
-	libdmapsharing_3_0_la-dmap-db.lo \
-	libdmapsharing_3_0_la-dmap-enums.lo \
-	libdmapsharing_3_0_la-dmap-md5.lo \
-	libdmapsharing_3_0_la-dmap-private-utils.lo \
-	libdmapsharing_3_0_la-dmap-record.lo \
-	libdmapsharing_3_0_la-dmap-record-factory.lo \
-	libdmapsharing_3_0_la-dmap-share.lo \
-	libdmapsharing_3_0_la-dmap-structure.lo \
-	libdmapsharing_3_0_la-dmap-utils.lo \
-	libdmapsharing_3_0_la-dpap-connection.lo \
-	libdmapsharing_3_0_la-dpap-record.lo \
-	libdmapsharing_3_0_la-dpap-share.lo $(am__objects_1) \
+@USE_AVAHI_TRUE@	libdmapsharing_4_0_la-dmap-mdns-avahi.lo \
+@USE_AVAHI_TRUE@	libdmapsharing_4_0_la-dmap-mdns-browser-avahi.lo \
+@USE_AVAHI_TRUE@	libdmapsharing_4_0_la-dmap-mdns-publisher-avahi.lo
+@USE_AVAHI_FALSE@am__objects_3 = libdmapsharing_4_0_la-dmap-mdns-browser-dnssd.lo \
+@USE_AVAHI_FALSE@	libdmapsharing_4_0_la-dmap-mdns-publisher-dnssd.lo
+@USE_GSTREAMERAPP_TRUE@am__objects_4 = libdmapsharing_4_0_la-dmap-transcode-stream.lo \
+@USE_GSTREAMERAPP_TRUE@	libdmapsharing_4_0_la-dmap-transcode-mp3-stream.lo \
+@USE_GSTREAMERAPP_TRUE@	libdmapsharing_4_0_la-dmap-transcode-qt-stream.lo \
+@USE_GSTREAMERAPP_TRUE@	libdmapsharing_4_0_la-dmap-transcode-wav-stream.lo \
+@USE_GSTREAMERAPP_TRUE@	libdmapsharing_4_0_la-gst-util.lo
+am_libdmapsharing_4_0_la_OBJECTS =  \
+	libdmapsharing_4_0_la-dmap-av-connection.lo \
+	libdmapsharing_4_0_la-dmap-av-record.lo \
+	libdmapsharing_4_0_la-dmap-av-share.lo \
+	libdmapsharing_4_0_la-dmap-control-connection.lo \
+	libdmapsharing_4_0_la-dmap-control-player.lo \
+	libdmapsharing_4_0_la-dmap-control-share.lo \
+	libdmapsharing_4_0_la-dmap-connection.lo \
+	libdmapsharing_4_0_la-dmap-container-db.lo \
+	libdmapsharing_4_0_la-dmap-container-record.lo \
+	libdmapsharing_4_0_la-dmap-db.lo \
+	libdmapsharing_4_0_la-dmap-enums.lo \
+	libdmapsharing_4_0_la-dmap-error.lo \
+	libdmapsharing_4_0_la-dmap-md5.lo \
+	libdmapsharing_4_0_la-dmap-mdns-service.lo \
+	libdmapsharing_4_0_la-dmap-private-utils.lo \
+	libdmapsharing_4_0_la-dmap-record.lo \
+	libdmapsharing_4_0_la-dmap-record-factory.lo \
+	libdmapsharing_4_0_la-dmap-share.lo \
+	libdmapsharing_4_0_la-dmap-structure.lo \
+	libdmapsharing_4_0_la-dmap-utils.lo \
+	libdmapsharing_4_0_la-dmap-image-connection.lo \
+	libdmapsharing_4_0_la-dmap-image-record.lo \
+	libdmapsharing_4_0_la-dmap-image-share.lo $(am__objects_1) \
 	$(am__objects_2) $(am__objects_3) $(am__objects_4)
-libdmapsharing_3_0_la_OBJECTS = $(am_libdmapsharing_3_0_la_OBJECTS)
+libdmapsharing_4_0_la_OBJECTS = $(am_libdmapsharing_4_0_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
 am__v_lt_0 = --silent
 am__v_lt_1 = 
-libdmapsharing_3_0_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+libdmapsharing_4_0_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
-	$(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) \
-	$(libdmapsharing_3_0_la_LDFLAGS) $(LDFLAGS) -o $@
+	$(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) \
+	$(libdmapsharing_4_0_la_LDFLAGS) $(LDFLAGS) -o $@
 AM_V_P = $(am__v_P_@AM_V@)
 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
 am__v_P_0 = false
@@ -242,41 +252,46 @@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__maybe_remake_depfiles = depfiles
 am__depfiles_remade =  \
-	./$(DEPDIR)/libdmapsharing_3_0_la-daap-connection.Plo \
-	./$(DEPDIR)/libdmapsharing_3_0_la-daap-record.Plo \
-	./$(DEPDIR)/libdmapsharing_3_0_la-daap-share.Plo \
-	./$(DEPDIR)/libdmapsharing_3_0_la-dacp-connection.Plo \
-	./$(DEPDIR)/libdmapsharing_3_0_la-dacp-player.Plo \
-	./$(DEPDIR)/libdmapsharing_3_0_la-dacp-share.Plo \
-	./$(DEPDIR)/libdmapsharing_3_0_la-dmap-connection.Plo \
-	./$(DEPDIR)/libdmapsharing_3_0_la-dmap-container-db.Plo \
-	./$(DEPDIR)/libdmapsharing_3_0_la-dmap-container-record.Plo \
-	./$(DEPDIR)/libdmapsharing_3_0_la-dmap-db.Plo \
-	./$(DEPDIR)/libdmapsharing_3_0_la-dmap-enums.Plo \
-	./$(DEPDIR)/libdmapsharing_3_0_la-dmap-gst-input-stream.Plo \
-	./$(DEPDIR)/libdmapsharing_3_0_la-dmap-gst-mp3-input-stream.Plo \
-	./$(DEPDIR)/libdmapsharing_3_0_la-dmap-gst-qt-input-stream.Plo \
-	./$(DEPDIR)/libdmapsharing_3_0_la-dmap-gst-wav-input-stream.Plo \
-	./$(DEPDIR)/libdmapsharing_3_0_la-dmap-md5.Plo \
-	./$(DEPDIR)/libdmapsharing_3_0_la-dmap-mdns-avahi.Plo \
-	./$(DEPDIR)/libdmapsharing_3_0_la-dmap-mdns-browser-avahi.Plo \
-	./$(DEPDIR)/libdmapsharing_3_0_la-dmap-mdns-browser-dnssd.Plo \
-	./$(DEPDIR)/libdmapsharing_3_0_la-dmap-mdns-publisher-avahi.Plo \
-	./$(DEPDIR)/libdmapsharing_3_0_la-dmap-mdns-publisher-dnssd.Plo \
-	./$(DEPDIR)/libdmapsharing_3_0_la-dmap-private-utils.Plo \
-	./$(DEPDIR)/libdmapsharing_3_0_la-dmap-record-factory.Plo \
-	./$(DEPDIR)/libdmapsharing_3_0_la-dmap-record.Plo \
-	./$(DEPDIR)/libdmapsharing_3_0_la-dmap-share.Plo \
-	./$(DEPDIR)/libdmapsharing_3_0_la-dmap-structure.Plo \
-	./$(DEPDIR)/libdmapsharing_3_0_la-dmap-utils.Plo \
-	./$(DEPDIR)/libdmapsharing_3_0_la-dpap-connection.Plo \
-	./$(DEPDIR)/libdmapsharing_3_0_la-dpap-record.Plo \
-	./$(DEPDIR)/libdmapsharing_3_0_la-dpap-share.Plo \
-	./$(DEPDIR)/libdmapsharing_3_0_la-gst-util.Plo \
-	./$(DEPDIR)/libdmapsharing_3_0_la-test-daap-record-factory.Plo \
-	./$(DEPDIR)/libdmapsharing_3_0_la-test-daap-record.Plo \
-	./$(DEPDIR)/libdmapsharing_3_0_la-test-dpap-record-factory.Plo \
-	./$(DEPDIR)/libdmapsharing_3_0_la-test-dpap-record.Plo
+	./$(DEPDIR)/libdmapsharing_4_0_la-dmap-av-connection.Plo \
+	./$(DEPDIR)/libdmapsharing_4_0_la-dmap-av-record.Plo \
+	./$(DEPDIR)/libdmapsharing_4_0_la-dmap-av-share.Plo \
+	./$(DEPDIR)/libdmapsharing_4_0_la-dmap-connection.Plo \
+	./$(DEPDIR)/libdmapsharing_4_0_la-dmap-container-db.Plo \
+	./$(DEPDIR)/libdmapsharing_4_0_la-dmap-container-record.Plo \
+	./$(DEPDIR)/libdmapsharing_4_0_la-dmap-control-connection.Plo \
+	./$(DEPDIR)/libdmapsharing_4_0_la-dmap-control-player.Plo \
+	./$(DEPDIR)/libdmapsharing_4_0_la-dmap-control-share.Plo \
+	./$(DEPDIR)/libdmapsharing_4_0_la-dmap-db.Plo \
+	./$(DEPDIR)/libdmapsharing_4_0_la-dmap-enums.Plo \
+	./$(DEPDIR)/libdmapsharing_4_0_la-dmap-error.Plo \
+	./$(DEPDIR)/libdmapsharing_4_0_la-dmap-image-connection.Plo \
+	./$(DEPDIR)/libdmapsharing_4_0_la-dmap-image-record.Plo \
+	./$(DEPDIR)/libdmapsharing_4_0_la-dmap-image-share.Plo \
+	./$(DEPDIR)/libdmapsharing_4_0_la-dmap-md5.Plo \
+	./$(DEPDIR)/libdmapsharing_4_0_la-dmap-mdns-avahi.Plo \
+	./$(DEPDIR)/libdmapsharing_4_0_la-dmap-mdns-browser-avahi.Plo \
+	./$(DEPDIR)/libdmapsharing_4_0_la-dmap-mdns-browser-dnssd.Plo \
+	./$(DEPDIR)/libdmapsharing_4_0_la-dmap-mdns-publisher-avahi.Plo \
+	./$(DEPDIR)/libdmapsharing_4_0_la-dmap-mdns-publisher-dnssd.Plo \
+	./$(DEPDIR)/libdmapsharing_4_0_la-dmap-mdns-service.Plo \
+	./$(DEPDIR)/libdmapsharing_4_0_la-dmap-private-utils.Plo \
+	./$(DEPDIR)/libdmapsharing_4_0_la-dmap-record-factory.Plo \
+	./$(DEPDIR)/libdmapsharing_4_0_la-dmap-record.Plo \
+	./$(DEPDIR)/libdmapsharing_4_0_la-dmap-share.Plo \
+	./$(DEPDIR)/libdmapsharing_4_0_la-dmap-structure.Plo \
+	./$(DEPDIR)/libdmapsharing_4_0_la-dmap-transcode-mp3-stream.Plo \
+	./$(DEPDIR)/libdmapsharing_4_0_la-dmap-transcode-qt-stream.Plo \
+	./$(DEPDIR)/libdmapsharing_4_0_la-dmap-transcode-stream.Plo \
+	./$(DEPDIR)/libdmapsharing_4_0_la-dmap-transcode-wav-stream.Plo \
+	./$(DEPDIR)/libdmapsharing_4_0_la-dmap-utils.Plo \
+	./$(DEPDIR)/libdmapsharing_4_0_la-gst-util.Plo \
+	./$(DEPDIR)/libdmapsharing_4_0_la-test-dmap-av-record-factory.Plo \
+	./$(DEPDIR)/libdmapsharing_4_0_la-test-dmap-av-record.Plo \
+	./$(DEPDIR)/libdmapsharing_4_0_la-test-dmap-container-db.Plo \
+	./$(DEPDIR)/libdmapsharing_4_0_la-test-dmap-container-record.Plo \
+	./$(DEPDIR)/libdmapsharing_4_0_la-test-dmap-db.Plo \
+	./$(DEPDIR)/libdmapsharing_4_0_la-test-dmap-image-record-factory.Plo \
+	./$(DEPDIR)/libdmapsharing_4_0_la-test-dmap-image-record.Plo
 am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -296,22 +311,24 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@)
 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
 am__v_CCLD_0 = @echo "  CCLD    " $@;
 am__v_CCLD_1 = 
-SOURCES = $(libdmapsharing_3_0_la_SOURCES)
-DIST_SOURCES = $(am__libdmapsharing_3_0_la_SOURCES_DIST)
+SOURCES = $(libdmapsharing_4_0_la_SOURCES)
+DIST_SOURCES = $(am__libdmapsharing_4_0_la_SOURCES_DIST)
 am__can_run_installinfo = \
   case $$AM_UPDATE_INFO_DIR in \
     n|no|NO) false;; \
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
 DATA = $(gir_DATA) $(typelib_DATA)
-am__libdmapsharinginclude_HEADERS_DIST = daap-connection.h \
-	daap-record.h daap-share.h dacp-connection.h dacp-share.h \
-	dacp-player.h dmap.h dmap-connection.h dmap-container-db.h \
-	dmap-container-record.h dmap-db.h dmap-enums.h dmap-md5.h \
-	dmap-mdns-browser.h dmap-mdns-publisher.h dmap-record.h \
-	dmap-record-factory.h dmap-share.h dmap-structure.h \
-	dmap-utils.h dpap-connection.h dpap-record.h dpap-share.h \
-	dmap-gst-input-stream.h
+am__libdmapsharinginclude_HEADERS_DIST = dmap-av-connection.h \
+	dmap-av-record.h dmap-av-share.h dmap-cc.h \
+	dmap-control-connection.h dmap-control-share.h \
+	dmap-control-player.h dmap.h dmap-connection.h \
+	dmap-container-db.h dmap-container-record.h dmap-db.h \
+	dmap-error.h dmap-md5.h dmap-mdns-browser.h \
+	dmap-mdns-publisher.h dmap-mdns-service.h dmap-record.h \
+	dmap-record-factory.h dmap-share.h dmap-utils.h \
+	dmap-image-connection.h dmap-image-record.h dmap-image-share.h \
+	dmap-transcode-stream.h dmap-enums.h
 HEADERS = $(libdmapsharinginclude_HEADERS) $(noinst_HEADERS)
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
 # Read a list of newline-separated strings from the standard input,
@@ -330,8 +347,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/dmap-config.h.in \
 	$(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -353,6 +368,8 @@ CHECK_CFLAGS = @CHECK_CFLAGS@
 CHECK_LIBS = @CHECK_LIBS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
@@ -364,8 +381,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@
 GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@
 GEE_CFLAGS = @GEE_CFLAGS@
@@ -492,6 +511,7 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -500,16 +520,20 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-lib_LTLIBRARIES = libdmapsharing-3.0.la
-libdmapsharing_3_0_la_SOURCES = daap-connection.c daap-record.c \
-	daap-share.c dacp-connection.c dacp-player.c dacp-share.c \
-	dmap-connection.c dmap-container-db.c dmap-container-record.c \
-	dmap-db.c dmap-enums.c dmap-md5.c dmap-private-utils.c \
-	dmap-record.c dmap-record-factory.c dmap-share.c \
-	dmap-structure.c dmap-utils.c dpap-connection.c dpap-record.c \
-	dpap-share.c $(am__append_1) $(am__append_2) $(am__append_3) \
+lib_LTLIBRARIES = libdmapsharing-4.0.la
+libdmapsharing_4_0_la_SOURCES = dmap-av-connection.c dmap-av-record.c \
+	dmap-av-share.c dmap-control-connection.c \
+	dmap-control-player.c dmap-control-share.c dmap-connection.c \
+	dmap-container-db.c dmap-container-record.c dmap-db.c \
+	dmap-enums.c dmap-error.c dmap-md5.c dmap-mdns-service.c \
+	dmap-private-utils.c dmap-record.c dmap-record-factory.c \
+	dmap-share.c dmap-structure.c dmap-utils.c \
+	dmap-image-connection.c dmap-image-record.c dmap-image-share.c \
+	$(am__append_1) $(am__append_2) $(am__append_3) \
 	$(am__append_4)
-libdmapsharing_3_0_la_CFLAGS = \
+libdmapsharing_4_0_la_CFLAGS = \
+	-Wall \
+	-Wextra \
 	-DG_LOG_DOMAIN=\"libdmapsharing\" \
 	-I$(top_srcdir) \
 	-I$(top_builddir) \
@@ -519,7 +543,7 @@ libdmapsharing_3_0_la_CFLAGS = \
 	$(MDNS_CFLAGS) \
 	$(WARN_CFLAGS)
 
-libdmapsharing_3_0_la_LDFLAGS = \
+libdmapsharing_4_0_la_LDFLAGS = \
 	-version-info @SO_VERSION@ \
 	$(CHECK_LIBS) \
 	$(GLIB_LIBS) \
@@ -533,42 +557,59 @@ libdmapsharing_3_0_la_LDFLAGS = \
 libdmapsharingincludedir = \
 	$(includedir)/libdmapsharing-@API_VERSION@/libdmapsharing
 
-libdmapsharinginclude_HEADERS = daap-connection.h daap-record.h \
-	daap-share.h dacp-connection.h dacp-share.h dacp-player.h \
-	dmap.h dmap-connection.h dmap-container-db.h \
-	dmap-container-record.h dmap-db.h dmap-enums.h dmap-md5.h \
-	dmap-mdns-browser.h dmap-mdns-publisher.h dmap-record.h \
-	dmap-record-factory.h dmap-share.h dmap-structure.h \
-	dmap-utils.h dpap-connection.h dpap-record.h dpap-share.h \
+maintained_headers = dmap-av-connection.h dmap-av-record.h \
+	dmap-av-share.h dmap-cc.h dmap-control-connection.h \
+	dmap-control-share.h dmap-control-player.h dmap.h \
+	dmap-connection.h dmap-container-db.h dmap-container-record.h \
+	dmap-db.h dmap-error.h dmap-md5.h dmap-mdns-browser.h \
+	dmap-mdns-publisher.h dmap-mdns-service.h dmap-record.h \
+	dmap-record-factory.h dmap-share.h dmap-utils.h \
+	dmap-image-connection.h dmap-image-record.h dmap-image-share.h \
 	$(am__append_5)
+generated_headers = \
+	dmap-enums.h
+
+libdmapsharinginclude_HEADERS = \
+	$(maintained_headers) \
+	$(generated_headers)
+
 noinst_HEADERS = \
 	dmap-config.h \
-	dmap-gst-mp3-input-stream.h \
-	dmap-gst-qt-input-stream.h \
-	dmap-gst-wav-input-stream.h \
+	dmap-connection-private.h \
+	dmap-transcode-mp3-stream.h \
+	dmap-transcode-qt-stream.h \
+	dmap-transcode-stream-private.h \
+	dmap-transcode-wav-stream.h \
 	dmap-mdns-avahi.h \
 	dmap-private-utils.h \
+	dmap-share-private.h \
+	dmap-structure.h \
 	gst-util.h \
-	test-daap-record-factory.h \
-	test-daap-record.h \
-	test-dpap-record-factory.h \
-	test-dpap-record.h
-
-BUILT_SOURCES = dmap-enums.c dmap-enums.h unit-test.stamp
-CLEANFILES = $(BUILT_SOURCES) ../tests/unit-test.c *-suite.c \
+	test-dmap-av-record-factory.h \
+	test-dmap-av-record.h \
+	test-dmap-container-db.h \
+	test-dmap-container-record.h \
+	test-dmap-db.h \
+	test-dmap-image-record-factory.h \
+	test-dmap-image-record.h
+
+BUILT_SOURCES = \
+	dmap-enums.c \
+	dmap-enums.h \
+	unit-test.stamp
+
+CLEANFILES = $(BUILT_SOURCES) ../tests/unit-test.c *-suite.c *-suite.h \
 	pedansee.conf $(am__append_6)
-@HAVE_INTROSPECTION_TRUE@INTROSPECTION_GIRS = DMAP-3.0.gir
-@HAVE_INTROSPECTION_TRUE@INTROSPECTION_SCANNER_ARGS = --symbol-prefix=dmap --add-include-path=$(srcdir) --warn-all
+@HAVE_INTROSPECTION_TRUE@INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --warn-all
 @HAVE_INTROSPECTION_TRUE@INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
 @HAVE_INTROSPECTION_TRUE@introspection_sources = $(libdmapsharinginclude_HEADERS) $(libdmapsharinginclude_SOURCES)
-@HAVE_INTROSPECTION_TRUE@DMAP_3_0_gir_INCLUDES = GObject-2.0 Soup-2.4
-@HAVE_INTROSPECTION_TRUE@DMAP_3_0_gir_CFLAGS = \
-@HAVE_INTROSPECTION_TRUE@	$(libdmapsharing_3_0_la_CFLAGS)
-
-@HAVE_INTROSPECTION_TRUE@DMAP_3_0_gir_LIBS = \
-@HAVE_INTROSPECTION_TRUE@	libdmapsharing-3.0.la
-
-@HAVE_INTROSPECTION_TRUE@DMAP_3_0_gir_FILES = $(introspection_sources)
+@HAVE_INTROSPECTION_TRUE@Dmap_4_0_gir_NAMESPACE = Dmap 
+@HAVE_INTROSPECTION_TRUE@Dmap_4_0_gir_SCANNERFLAGS = --symbol-prefix=dmap
+@HAVE_INTROSPECTION_TRUE@Dmap_4_0_gir_LIBS = libdmapsharing-4.0.la
+@HAVE_INTROSPECTION_TRUE@Dmap_4_0_gir_FILES = $(introspection_sources)
+@HAVE_INTROSPECTION_TRUE@Dmap_4_0_gir_INCLUDES = GObject-2.0 Soup-3.0 Gst-1.0
+@HAVE_INTROSPECTION_TRUE@Dmap_4_0_gir_CFLAGS = $(INCLUDES) $(libdmapsharing_4_0_la_CFLAGS)
+@HAVE_INTROSPECTION_TRUE@INTROSPECTION_GIRS = Dmap-4.0.gir
 @HAVE_INTROSPECTION_TRUE@girdir = $(datadir)/gir-1.0
 @HAVE_INTROSPECTION_TRUE@gir_DATA = $(INTROSPECTION_GIRS)
 @HAVE_INTROSPECTION_TRUE@typelibdir = $(libdir)/girepository-1.0
@@ -646,8 +687,8 @@ clean-libLTLIBRARIES:
 	  rm -f $${locs}; \
 	}
 
-libdmapsharing-3.0.la: $(libdmapsharing_3_0_la_OBJECTS) $(libdmapsharing_3_0_la_DEPENDENCIES) $(EXTRA_libdmapsharing_3_0_la_DEPENDENCIES) 
-	$(AM_V_CCLD)$(libdmapsharing_3_0_la_LINK) -rpath $(libdir) $(libdmapsharing_3_0_la_OBJECTS) $(libdmapsharing_3_0_la_LIBADD) $(LIBS)
+libdmapsharing-4.0.la: $(libdmapsharing_4_0_la_OBJECTS) $(libdmapsharing_4_0_la_DEPENDENCIES) $(EXTRA_libdmapsharing_4_0_la_DEPENDENCIES) 
+	$(AM_V_CCLD)$(libdmapsharing_4_0_la_LINK) -rpath $(libdir) $(libdmapsharing_4_0_la_OBJECTS) $(libdmapsharing_4_0_la_LIBADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -655,41 +696,46 @@ mostlyclean-compile:
 distclean-compile:
 	-rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_3_0_la-daap-connection.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_3_0_la-daap-record.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_3_0_la-daap-share.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_3_0_la-dacp-connection.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_3_0_la-dacp-player.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_3_0_la-dacp-share.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_3_0_la-dmap-connection.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_3_0_la-dmap-container-db.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_3_0_la-dmap-container-record.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_3_0_la-dmap-db.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_3_0_la-dmap-enums.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_3_0_la-dmap-gst-input-stream.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_3_0_la-dmap-gst-mp3-input-stream.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_3_0_la-dmap-gst-qt-input-stream.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_3_0_la-dmap-gst-wav-input-stream.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_3_0_la-dmap-md5.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_3_0_la-dmap-mdns-avahi.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_3_0_la-dmap-mdns-browser-avahi.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_3_0_la-dmap-mdns-browser-dnssd.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_3_0_la-dmap-mdns-publisher-avahi.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_3_0_la-dmap-mdns-publisher-dnssd.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_3_0_la-dmap-private-utils.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_3_0_la-dmap-record-factory.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_3_0_la-dmap-record.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_3_0_la-dmap-share.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_3_0_la-dmap-structure.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_3_0_la-dmap-utils.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_3_0_la-dpap-connection.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_3_0_la-dpap-record.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_3_0_la-dpap-share.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_3_0_la-gst-util.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_3_0_la-test-daap-record-factory.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_3_0_la-test-daap-record.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_3_0_la-test-dpap-record-factory.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_3_0_la-test-dpap-record.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_4_0_la-dmap-av-connection.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_4_0_la-dmap-av-record.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_4_0_la-dmap-av-share.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_4_0_la-dmap-connection.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_4_0_la-dmap-container-db.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_4_0_la-dmap-container-record.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_4_0_la-dmap-control-connection.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_4_0_la-dmap-control-player.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_4_0_la-dmap-control-share.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_4_0_la-dmap-db.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_4_0_la-dmap-enums.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_4_0_la-dmap-error.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_4_0_la-dmap-image-connection.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_4_0_la-dmap-image-record.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_4_0_la-dmap-image-share.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_4_0_la-dmap-md5.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_4_0_la-dmap-mdns-avahi.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_4_0_la-dmap-mdns-browser-avahi.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_4_0_la-dmap-mdns-browser-dnssd.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_4_0_la-dmap-mdns-publisher-avahi.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_4_0_la-dmap-mdns-publisher-dnssd.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_4_0_la-dmap-mdns-service.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_4_0_la-dmap-private-utils.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_4_0_la-dmap-record-factory.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_4_0_la-dmap-record.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_4_0_la-dmap-share.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_4_0_la-dmap-structure.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_4_0_la-dmap-transcode-mp3-stream.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_4_0_la-dmap-transcode-qt-stream.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_4_0_la-dmap-transcode-stream.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_4_0_la-dmap-transcode-wav-stream.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_4_0_la-dmap-utils.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_4_0_la-gst-util.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_4_0_la-test-dmap-av-record-factory.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_4_0_la-test-dmap-av-record.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_4_0_la-test-dmap-container-db.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_4_0_la-test-dmap-container-record.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_4_0_la-test-dmap-db.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_4_0_la-test-dmap-image-record-factory.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmapsharing_4_0_la-test-dmap-image-record.Plo@am__quote@ # am--include-marker
 
 $(am__depfiles_remade):
 	@$(MKDIR_P) $(@D)
@@ -718,250 +764,285 @@ am--depfiles: $(am__depfiles_remade)
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
 
-libdmapsharing_3_0_la-daap-connection.lo: daap-connection.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_3_0_la-daap-connection.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_3_0_la-daap-connection.Tpo -c -o libdmapsharing_3_0_la-daap-connection.lo `test -f 'daap-connection.c' || echo '$(srcdir)/'`daap-connection.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_3_0_la-daap-connection.Tpo $(DEPDIR)/libdmapsharing_3_0_la-daap-connection.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='daap-connection.c' object='libdmapsharing_3_0_la-daap-connection.lo' libtool=yes @AMDEPBACKSLASH@
+libdmapsharing_4_0_la-dmap-av-connection.lo: dmap-av-connection.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_4_0_la-dmap-av-connection.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_4_0_la-dmap-av-connection.Tpo -c -o libdmapsharing_4_0_la-dmap-av-connection.lo `test -f 'dmap-av-connection.c' || echo '$(srcdir)/'`dmap-av-connection.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_4_0_la-dmap-av-connection.Tpo $(DEPDIR)/libdmapsharing_4_0_la-dmap-av-connection.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-av-connection.c' object='libdmapsharing_4_0_la-dmap-av-connection.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_4_0_la-dmap-av-connection.lo `test -f 'dmap-av-connection.c' || echo '$(srcdir)/'`dmap-av-connection.c
+
+libdmapsharing_4_0_la-dmap-av-record.lo: dmap-av-record.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_4_0_la-dmap-av-record.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_4_0_la-dmap-av-record.Tpo -c -o libdmapsharing_4_0_la-dmap-av-record.lo `test -f 'dmap-av-record.c' || echo '$(srcdir)/'`dmap-av-record.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_4_0_la-dmap-av-record.Tpo $(DEPDIR)/libdmapsharing_4_0_la-dmap-av-record.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-av-record.c' object='libdmapsharing_4_0_la-dmap-av-record.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_4_0_la-dmap-av-record.lo `test -f 'dmap-av-record.c' || echo '$(srcdir)/'`dmap-av-record.c
+
+libdmapsharing_4_0_la-dmap-av-share.lo: dmap-av-share.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_4_0_la-dmap-av-share.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_4_0_la-dmap-av-share.Tpo -c -o libdmapsharing_4_0_la-dmap-av-share.lo `test -f 'dmap-av-share.c' || echo '$(srcdir)/'`dmap-av-share.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_4_0_la-dmap-av-share.Tpo $(DEPDIR)/libdmapsharing_4_0_la-dmap-av-share.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-av-share.c' object='libdmapsharing_4_0_la-dmap-av-share.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_3_0_la-daap-connection.lo `test -f 'daap-connection.c' || echo '$(srcdir)/'`daap-connection.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_4_0_la-dmap-av-share.lo `test -f 'dmap-av-share.c' || echo '$(srcdir)/'`dmap-av-share.c
 
-libdmapsharing_3_0_la-daap-record.lo: daap-record.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_3_0_la-daap-record.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_3_0_la-daap-record.Tpo -c -o libdmapsharing_3_0_la-daap-record.lo `test -f 'daap-record.c' || echo '$(srcdir)/'`daap-record.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_3_0_la-daap-record.Tpo $(DEPDIR)/libdmapsharing_3_0_la-daap-record.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='daap-record.c' object='libdmapsharing_3_0_la-daap-record.lo' libtool=yes @AMDEPBACKSLASH@
+libdmapsharing_4_0_la-dmap-control-connection.lo: dmap-control-connection.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_4_0_la-dmap-control-connection.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_4_0_la-dmap-control-connection.Tpo -c -o libdmapsharing_4_0_la-dmap-control-connection.lo `test -f 'dmap-control-connection.c' || echo '$(srcdir)/'`dmap-control-connection.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_4_0_la-dmap-control-connection.Tpo $(DEPDIR)/libdmapsharing_4_0_la-dmap-control-connection.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-control-connection.c' object='libdmapsharing_4_0_la-dmap-control-connection.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_3_0_la-daap-record.lo `test -f 'daap-record.c' || echo '$(srcdir)/'`daap-record.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_4_0_la-dmap-control-connection.lo `test -f 'dmap-control-connection.c' || echo '$(srcdir)/'`dmap-control-connection.c
 
-libdmapsharing_3_0_la-daap-share.lo: daap-share.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_3_0_la-daap-share.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_3_0_la-daap-share.Tpo -c -o libdmapsharing_3_0_la-daap-share.lo `test -f 'daap-share.c' || echo '$(srcdir)/'`daap-share.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_3_0_la-daap-share.Tpo $(DEPDIR)/libdmapsharing_3_0_la-daap-share.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='daap-share.c' object='libdmapsharing_3_0_la-daap-share.lo' libtool=yes @AMDEPBACKSLASH@
+libdmapsharing_4_0_la-dmap-control-player.lo: dmap-control-player.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_4_0_la-dmap-control-player.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_4_0_la-dmap-control-player.Tpo -c -o libdmapsharing_4_0_la-dmap-control-player.lo `test -f 'dmap-control-player.c' || echo '$(srcdir)/'`dmap-control-player.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_4_0_la-dmap-control-player.Tpo $(DEPDIR)/libdmapsharing_4_0_la-dmap-control-player.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-control-player.c' object='libdmapsharing_4_0_la-dmap-control-player.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_3_0_la-daap-share.lo `test -f 'daap-share.c' || echo '$(srcdir)/'`daap-share.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_4_0_la-dmap-control-player.lo `test -f 'dmap-control-player.c' || echo '$(srcdir)/'`dmap-control-player.c
 
-libdmapsharing_3_0_la-dacp-connection.lo: dacp-connection.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_3_0_la-dacp-connection.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_3_0_la-dacp-connection.Tpo -c -o libdmapsharing_3_0_la-dacp-connection.lo `test -f 'dacp-connection.c' || echo '$(srcdir)/'`dacp-connection.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_3_0_la-dacp-connection.Tpo $(DEPDIR)/libdmapsharing_3_0_la-dacp-connection.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dacp-connection.c' object='libdmapsharing_3_0_la-dacp-connection.lo' libtool=yes @AMDEPBACKSLASH@
+libdmapsharing_4_0_la-dmap-control-share.lo: dmap-control-share.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_4_0_la-dmap-control-share.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_4_0_la-dmap-control-share.Tpo -c -o libdmapsharing_4_0_la-dmap-control-share.lo `test -f 'dmap-control-share.c' || echo '$(srcdir)/'`dmap-control-share.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_4_0_la-dmap-control-share.Tpo $(DEPDIR)/libdmapsharing_4_0_la-dmap-control-share.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-control-share.c' object='libdmapsharing_4_0_la-dmap-control-share.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_3_0_la-dacp-connection.lo `test -f 'dacp-connection.c' || echo '$(srcdir)/'`dacp-connection.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_4_0_la-dmap-control-share.lo `test -f 'dmap-control-share.c' || echo '$(srcdir)/'`dmap-control-share.c
 
-libdmapsharing_3_0_la-dacp-player.lo: dacp-player.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_3_0_la-dacp-player.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_3_0_la-dacp-player.Tpo -c -o libdmapsharing_3_0_la-dacp-player.lo `test -f 'dacp-player.c' || echo '$(srcdir)/'`dacp-player.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_3_0_la-dacp-player.Tpo $(DEPDIR)/libdmapsharing_3_0_la-dacp-player.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dacp-player.c' object='libdmapsharing_3_0_la-dacp-player.lo' libtool=yes @AMDEPBACKSLASH@
+libdmapsharing_4_0_la-dmap-connection.lo: dmap-connection.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_4_0_la-dmap-connection.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_4_0_la-dmap-connection.Tpo -c -o libdmapsharing_4_0_la-dmap-connection.lo `test -f 'dmap-connection.c' || echo '$(srcdir)/'`dmap-connection.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_4_0_la-dmap-connection.Tpo $(DEPDIR)/libdmapsharing_4_0_la-dmap-connection.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-connection.c' object='libdmapsharing_4_0_la-dmap-connection.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_3_0_la-dacp-player.lo `test -f 'dacp-player.c' || echo '$(srcdir)/'`dacp-player.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_4_0_la-dmap-connection.lo `test -f 'dmap-connection.c' || echo '$(srcdir)/'`dmap-connection.c
 
-libdmapsharing_3_0_la-dacp-share.lo: dacp-share.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_3_0_la-dacp-share.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_3_0_la-dacp-share.Tpo -c -o libdmapsharing_3_0_la-dacp-share.lo `test -f 'dacp-share.c' || echo '$(srcdir)/'`dacp-share.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_3_0_la-dacp-share.Tpo $(DEPDIR)/libdmapsharing_3_0_la-dacp-share.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dacp-share.c' object='libdmapsharing_3_0_la-dacp-share.lo' libtool=yes @AMDEPBACKSLASH@
+libdmapsharing_4_0_la-dmap-container-db.lo: dmap-container-db.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_4_0_la-dmap-container-db.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_4_0_la-dmap-container-db.Tpo -c -o libdmapsharing_4_0_la-dmap-container-db.lo `test -f 'dmap-container-db.c' || echo '$(srcdir)/'`dmap-container-db.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_4_0_la-dmap-container-db.Tpo $(DEPDIR)/libdmapsharing_4_0_la-dmap-container-db.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-container-db.c' object='libdmapsharing_4_0_la-dmap-container-db.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_3_0_la-dacp-share.lo `test -f 'dacp-share.c' || echo '$(srcdir)/'`dacp-share.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_4_0_la-dmap-container-db.lo `test -f 'dmap-container-db.c' || echo '$(srcdir)/'`dmap-container-db.c
 
-libdmapsharing_3_0_la-dmap-connection.lo: dmap-connection.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_3_0_la-dmap-connection.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_3_0_la-dmap-connection.Tpo -c -o libdmapsharing_3_0_la-dmap-connection.lo `test -f 'dmap-connection.c' || echo '$(srcdir)/'`dmap-connection.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_3_0_la-dmap-connection.Tpo $(DEPDIR)/libdmapsharing_3_0_la-dmap-connection.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-connection.c' object='libdmapsharing_3_0_la-dmap-connection.lo' libtool=yes @AMDEPBACKSLASH@
+libdmapsharing_4_0_la-dmap-container-record.lo: dmap-container-record.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_4_0_la-dmap-container-record.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_4_0_la-dmap-container-record.Tpo -c -o libdmapsharing_4_0_la-dmap-container-record.lo `test -f 'dmap-container-record.c' || echo '$(srcdir)/'`dmap-container-record.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_4_0_la-dmap-container-record.Tpo $(DEPDIR)/libdmapsharing_4_0_la-dmap-container-record.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-container-record.c' object='libdmapsharing_4_0_la-dmap-container-record.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_3_0_la-dmap-connection.lo `test -f 'dmap-connection.c' || echo '$(srcdir)/'`dmap-connection.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_4_0_la-dmap-container-record.lo `test -f 'dmap-container-record.c' || echo '$(srcdir)/'`dmap-container-record.c
 
-libdmapsharing_3_0_la-dmap-container-db.lo: dmap-container-db.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_3_0_la-dmap-container-db.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_3_0_la-dmap-container-db.Tpo -c -o libdmapsharing_3_0_la-dmap-container-db.lo `test -f 'dmap-container-db.c' || echo '$(srcdir)/'`dmap-container-db.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_3_0_la-dmap-container-db.Tpo $(DEPDIR)/libdmapsharing_3_0_la-dmap-container-db.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-container-db.c' object='libdmapsharing_3_0_la-dmap-container-db.lo' libtool=yes @AMDEPBACKSLASH@
+libdmapsharing_4_0_la-dmap-db.lo: dmap-db.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_4_0_la-dmap-db.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_4_0_la-dmap-db.Tpo -c -o libdmapsharing_4_0_la-dmap-db.lo `test -f 'dmap-db.c' || echo '$(srcdir)/'`dmap-db.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_4_0_la-dmap-db.Tpo $(DEPDIR)/libdmapsharing_4_0_la-dmap-db.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-db.c' object='libdmapsharing_4_0_la-dmap-db.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_3_0_la-dmap-container-db.lo `test -f 'dmap-container-db.c' || echo '$(srcdir)/'`dmap-container-db.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_4_0_la-dmap-db.lo `test -f 'dmap-db.c' || echo '$(srcdir)/'`dmap-db.c
 
-libdmapsharing_3_0_la-dmap-container-record.lo: dmap-container-record.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_3_0_la-dmap-container-record.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_3_0_la-dmap-container-record.Tpo -c -o libdmapsharing_3_0_la-dmap-container-record.lo `test -f 'dmap-container-record.c' || echo '$(srcdir)/'`dmap-container-record.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_3_0_la-dmap-container-record.Tpo $(DEPDIR)/libdmapsharing_3_0_la-dmap-container-record.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-container-record.c' object='libdmapsharing_3_0_la-dmap-container-record.lo' libtool=yes @AMDEPBACKSLASH@
+libdmapsharing_4_0_la-dmap-enums.lo: dmap-enums.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_4_0_la-dmap-enums.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_4_0_la-dmap-enums.Tpo -c -o libdmapsharing_4_0_la-dmap-enums.lo `test -f 'dmap-enums.c' || echo '$(srcdir)/'`dmap-enums.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_4_0_la-dmap-enums.Tpo $(DEPDIR)/libdmapsharing_4_0_la-dmap-enums.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-enums.c' object='libdmapsharing_4_0_la-dmap-enums.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_3_0_la-dmap-container-record.lo `test -f 'dmap-container-record.c' || echo '$(srcdir)/'`dmap-container-record.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_4_0_la-dmap-enums.lo `test -f 'dmap-enums.c' || echo '$(srcdir)/'`dmap-enums.c
 
-libdmapsharing_3_0_la-dmap-db.lo: dmap-db.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_3_0_la-dmap-db.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_3_0_la-dmap-db.Tpo -c -o libdmapsharing_3_0_la-dmap-db.lo `test -f 'dmap-db.c' || echo '$(srcdir)/'`dmap-db.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_3_0_la-dmap-db.Tpo $(DEPDIR)/libdmapsharing_3_0_la-dmap-db.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-db.c' object='libdmapsharing_3_0_la-dmap-db.lo' libtool=yes @AMDEPBACKSLASH@
+libdmapsharing_4_0_la-dmap-error.lo: dmap-error.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_4_0_la-dmap-error.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_4_0_la-dmap-error.Tpo -c -o libdmapsharing_4_0_la-dmap-error.lo `test -f 'dmap-error.c' || echo '$(srcdir)/'`dmap-error.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_4_0_la-dmap-error.Tpo $(DEPDIR)/libdmapsharing_4_0_la-dmap-error.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-error.c' object='libdmapsharing_4_0_la-dmap-error.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_3_0_la-dmap-db.lo `test -f 'dmap-db.c' || echo '$(srcdir)/'`dmap-db.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_4_0_la-dmap-error.lo `test -f 'dmap-error.c' || echo '$(srcdir)/'`dmap-error.c
 
-libdmapsharing_3_0_la-dmap-enums.lo: dmap-enums.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_3_0_la-dmap-enums.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_3_0_la-dmap-enums.Tpo -c -o libdmapsharing_3_0_la-dmap-enums.lo `test -f 'dmap-enums.c' || echo '$(srcdir)/'`dmap-enums.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_3_0_la-dmap-enums.Tpo $(DEPDIR)/libdmapsharing_3_0_la-dmap-enums.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-enums.c' object='libdmapsharing_3_0_la-dmap-enums.lo' libtool=yes @AMDEPBACKSLASH@
+libdmapsharing_4_0_la-dmap-md5.lo: dmap-md5.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_4_0_la-dmap-md5.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_4_0_la-dmap-md5.Tpo -c -o libdmapsharing_4_0_la-dmap-md5.lo `test -f 'dmap-md5.c' || echo '$(srcdir)/'`dmap-md5.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_4_0_la-dmap-md5.Tpo $(DEPDIR)/libdmapsharing_4_0_la-dmap-md5.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-md5.c' object='libdmapsharing_4_0_la-dmap-md5.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_3_0_la-dmap-enums.lo `test -f 'dmap-enums.c' || echo '$(srcdir)/'`dmap-enums.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_4_0_la-dmap-md5.lo `test -f 'dmap-md5.c' || echo '$(srcdir)/'`dmap-md5.c
 
-libdmapsharing_3_0_la-dmap-md5.lo: dmap-md5.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_3_0_la-dmap-md5.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_3_0_la-dmap-md5.Tpo -c -o libdmapsharing_3_0_la-dmap-md5.lo `test -f 'dmap-md5.c' || echo '$(srcdir)/'`dmap-md5.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_3_0_la-dmap-md5.Tpo $(DEPDIR)/libdmapsharing_3_0_la-dmap-md5.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-md5.c' object='libdmapsharing_3_0_la-dmap-md5.lo' libtool=yes @AMDEPBACKSLASH@
+libdmapsharing_4_0_la-dmap-mdns-service.lo: dmap-mdns-service.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_4_0_la-dmap-mdns-service.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_4_0_la-dmap-mdns-service.Tpo -c -o libdmapsharing_4_0_la-dmap-mdns-service.lo `test -f 'dmap-mdns-service.c' || echo '$(srcdir)/'`dmap-mdns-service.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_4_0_la-dmap-mdns-service.Tpo $(DEPDIR)/libdmapsharing_4_0_la-dmap-mdns-service.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-mdns-service.c' object='libdmapsharing_4_0_la-dmap-mdns-service.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_3_0_la-dmap-md5.lo `test -f 'dmap-md5.c' || echo '$(srcdir)/'`dmap-md5.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_4_0_la-dmap-mdns-service.lo `test -f 'dmap-mdns-service.c' || echo '$(srcdir)/'`dmap-mdns-service.c
 
-libdmapsharing_3_0_la-dmap-private-utils.lo: dmap-private-utils.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_3_0_la-dmap-private-utils.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_3_0_la-dmap-private-utils.Tpo -c -o libdmapsharing_3_0_la-dmap-private-utils.lo `test -f 'dmap-private-utils.c' || echo '$(srcdir)/'`dmap-private-utils.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_3_0_la-dmap-private-utils.Tpo $(DEPDIR)/libdmapsharing_3_0_la-dmap-private-utils.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-private-utils.c' object='libdmapsharing_3_0_la-dmap-private-utils.lo' libtool=yes @AMDEPBACKSLASH@
+libdmapsharing_4_0_la-dmap-private-utils.lo: dmap-private-utils.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_4_0_la-dmap-private-utils.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_4_0_la-dmap-private-utils.Tpo -c -o libdmapsharing_4_0_la-dmap-private-utils.lo `test -f 'dmap-private-utils.c' || echo '$(srcdir)/'`dmap-private-utils.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_4_0_la-dmap-private-utils.Tpo $(DEPDIR)/libdmapsharing_4_0_la-dmap-private-utils.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-private-utils.c' object='libdmapsharing_4_0_la-dmap-private-utils.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_3_0_la-dmap-private-utils.lo `test -f 'dmap-private-utils.c' || echo '$(srcdir)/'`dmap-private-utils.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_4_0_la-dmap-private-utils.lo `test -f 'dmap-private-utils.c' || echo '$(srcdir)/'`dmap-private-utils.c
 
-libdmapsharing_3_0_la-dmap-record.lo: dmap-record.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_3_0_la-dmap-record.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_3_0_la-dmap-record.Tpo -c -o libdmapsharing_3_0_la-dmap-record.lo `test -f 'dmap-record.c' || echo '$(srcdir)/'`dmap-record.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_3_0_la-dmap-record.Tpo $(DEPDIR)/libdmapsharing_3_0_la-dmap-record.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-record.c' object='libdmapsharing_3_0_la-dmap-record.lo' libtool=yes @AMDEPBACKSLASH@
+libdmapsharing_4_0_la-dmap-record.lo: dmap-record.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_4_0_la-dmap-record.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_4_0_la-dmap-record.Tpo -c -o libdmapsharing_4_0_la-dmap-record.lo `test -f 'dmap-record.c' || echo '$(srcdir)/'`dmap-record.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_4_0_la-dmap-record.Tpo $(DEPDIR)/libdmapsharing_4_0_la-dmap-record.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-record.c' object='libdmapsharing_4_0_la-dmap-record.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_3_0_la-dmap-record.lo `test -f 'dmap-record.c' || echo '$(srcdir)/'`dmap-record.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_4_0_la-dmap-record.lo `test -f 'dmap-record.c' || echo '$(srcdir)/'`dmap-record.c
 
-libdmapsharing_3_0_la-dmap-record-factory.lo: dmap-record-factory.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_3_0_la-dmap-record-factory.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_3_0_la-dmap-record-factory.Tpo -c -o libdmapsharing_3_0_la-dmap-record-factory.lo `test -f 'dmap-record-factory.c' || echo '$(srcdir)/'`dmap-record-factory.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_3_0_la-dmap-record-factory.Tpo $(DEPDIR)/libdmapsharing_3_0_la-dmap-record-factory.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-record-factory.c' object='libdmapsharing_3_0_la-dmap-record-factory.lo' libtool=yes @AMDEPBACKSLASH@
+libdmapsharing_4_0_la-dmap-record-factory.lo: dmap-record-factory.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_4_0_la-dmap-record-factory.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_4_0_la-dmap-record-factory.Tpo -c -o libdmapsharing_4_0_la-dmap-record-factory.lo `test -f 'dmap-record-factory.c' || echo '$(srcdir)/'`dmap-record-factory.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_4_0_la-dmap-record-factory.Tpo $(DEPDIR)/libdmapsharing_4_0_la-dmap-record-factory.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-record-factory.c' object='libdmapsharing_4_0_la-dmap-record-factory.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_3_0_la-dmap-record-factory.lo `test -f 'dmap-record-factory.c' || echo '$(srcdir)/'`dmap-record-factory.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_4_0_la-dmap-record-factory.lo `test -f 'dmap-record-factory.c' || echo '$(srcdir)/'`dmap-record-factory.c
 
-libdmapsharing_3_0_la-dmap-share.lo: dmap-share.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_3_0_la-dmap-share.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_3_0_la-dmap-share.Tpo -c -o libdmapsharing_3_0_la-dmap-share.lo `test -f 'dmap-share.c' || echo '$(srcdir)/'`dmap-share.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_3_0_la-dmap-share.Tpo $(DEPDIR)/libdmapsharing_3_0_la-dmap-share.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-share.c' object='libdmapsharing_3_0_la-dmap-share.lo' libtool=yes @AMDEPBACKSLASH@
+libdmapsharing_4_0_la-dmap-share.lo: dmap-share.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_4_0_la-dmap-share.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_4_0_la-dmap-share.Tpo -c -o libdmapsharing_4_0_la-dmap-share.lo `test -f 'dmap-share.c' || echo '$(srcdir)/'`dmap-share.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_4_0_la-dmap-share.Tpo $(DEPDIR)/libdmapsharing_4_0_la-dmap-share.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-share.c' object='libdmapsharing_4_0_la-dmap-share.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_3_0_la-dmap-share.lo `test -f 'dmap-share.c' || echo '$(srcdir)/'`dmap-share.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_4_0_la-dmap-share.lo `test -f 'dmap-share.c' || echo '$(srcdir)/'`dmap-share.c
 
-libdmapsharing_3_0_la-dmap-structure.lo: dmap-structure.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_3_0_la-dmap-structure.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_3_0_la-dmap-structure.Tpo -c -o libdmapsharing_3_0_la-dmap-structure.lo `test -f 'dmap-structure.c' || echo '$(srcdir)/'`dmap-structure.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_3_0_la-dmap-structure.Tpo $(DEPDIR)/libdmapsharing_3_0_la-dmap-structure.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-structure.c' object='libdmapsharing_3_0_la-dmap-structure.lo' libtool=yes @AMDEPBACKSLASH@
+libdmapsharing_4_0_la-dmap-structure.lo: dmap-structure.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_4_0_la-dmap-structure.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_4_0_la-dmap-structure.Tpo -c -o libdmapsharing_4_0_la-dmap-structure.lo `test -f 'dmap-structure.c' || echo '$(srcdir)/'`dmap-structure.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_4_0_la-dmap-structure.Tpo $(DEPDIR)/libdmapsharing_4_0_la-dmap-structure.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-structure.c' object='libdmapsharing_4_0_la-dmap-structure.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_3_0_la-dmap-structure.lo `test -f 'dmap-structure.c' || echo '$(srcdir)/'`dmap-structure.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_4_0_la-dmap-structure.lo `test -f 'dmap-structure.c' || echo '$(srcdir)/'`dmap-structure.c
 
-libdmapsharing_3_0_la-dmap-utils.lo: dmap-utils.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_3_0_la-dmap-utils.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_3_0_la-dmap-utils.Tpo -c -o libdmapsharing_3_0_la-dmap-utils.lo `test -f 'dmap-utils.c' || echo '$(srcdir)/'`dmap-utils.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_3_0_la-dmap-utils.Tpo $(DEPDIR)/libdmapsharing_3_0_la-dmap-utils.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-utils.c' object='libdmapsharing_3_0_la-dmap-utils.lo' libtool=yes @AMDEPBACKSLASH@
+libdmapsharing_4_0_la-dmap-utils.lo: dmap-utils.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_4_0_la-dmap-utils.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_4_0_la-dmap-utils.Tpo -c -o libdmapsharing_4_0_la-dmap-utils.lo `test -f 'dmap-utils.c' || echo '$(srcdir)/'`dmap-utils.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_4_0_la-dmap-utils.Tpo $(DEPDIR)/libdmapsharing_4_0_la-dmap-utils.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-utils.c' object='libdmapsharing_4_0_la-dmap-utils.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_3_0_la-dmap-utils.lo `test -f 'dmap-utils.c' || echo '$(srcdir)/'`dmap-utils.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_4_0_la-dmap-utils.lo `test -f 'dmap-utils.c' || echo '$(srcdir)/'`dmap-utils.c
 
-libdmapsharing_3_0_la-dpap-connection.lo: dpap-connection.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_3_0_la-dpap-connection.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_3_0_la-dpap-connection.Tpo -c -o libdmapsharing_3_0_la-dpap-connection.lo `test -f 'dpap-connection.c' || echo '$(srcdir)/'`dpap-connection.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_3_0_la-dpap-connection.Tpo $(DEPDIR)/libdmapsharing_3_0_la-dpap-connection.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dpap-connection.c' object='libdmapsharing_3_0_la-dpap-connection.lo' libtool=yes @AMDEPBACKSLASH@
+libdmapsharing_4_0_la-dmap-image-connection.lo: dmap-image-connection.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_4_0_la-dmap-image-connection.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_4_0_la-dmap-image-connection.Tpo -c -o libdmapsharing_4_0_la-dmap-image-connection.lo `test -f 'dmap-image-connection.c' || echo '$(srcdir)/'`dmap-image-connection.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_4_0_la-dmap-image-connection.Tpo $(DEPDIR)/libdmapsharing_4_0_la-dmap-image-connection.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-image-connection.c' object='libdmapsharing_4_0_la-dmap-image-connection.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_3_0_la-dpap-connection.lo `test -f 'dpap-connection.c' || echo '$(srcdir)/'`dpap-connection.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_4_0_la-dmap-image-connection.lo `test -f 'dmap-image-connection.c' || echo '$(srcdir)/'`dmap-image-connection.c
 
-libdmapsharing_3_0_la-dpap-record.lo: dpap-record.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_3_0_la-dpap-record.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_3_0_la-dpap-record.Tpo -c -o libdmapsharing_3_0_la-dpap-record.lo `test -f 'dpap-record.c' || echo '$(srcdir)/'`dpap-record.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_3_0_la-dpap-record.Tpo $(DEPDIR)/libdmapsharing_3_0_la-dpap-record.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dpap-record.c' object='libdmapsharing_3_0_la-dpap-record.lo' libtool=yes @AMDEPBACKSLASH@
+libdmapsharing_4_0_la-dmap-image-record.lo: dmap-image-record.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_4_0_la-dmap-image-record.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_4_0_la-dmap-image-record.Tpo -c -o libdmapsharing_4_0_la-dmap-image-record.lo `test -f 'dmap-image-record.c' || echo '$(srcdir)/'`dmap-image-record.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_4_0_la-dmap-image-record.Tpo $(DEPDIR)/libdmapsharing_4_0_la-dmap-image-record.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-image-record.c' object='libdmapsharing_4_0_la-dmap-image-record.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_3_0_la-dpap-record.lo `test -f 'dpap-record.c' || echo '$(srcdir)/'`dpap-record.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_4_0_la-dmap-image-record.lo `test -f 'dmap-image-record.c' || echo '$(srcdir)/'`dmap-image-record.c
 
-libdmapsharing_3_0_la-dpap-share.lo: dpap-share.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_3_0_la-dpap-share.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_3_0_la-dpap-share.Tpo -c -o libdmapsharing_3_0_la-dpap-share.lo `test -f 'dpap-share.c' || echo '$(srcdir)/'`dpap-share.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_3_0_la-dpap-share.Tpo $(DEPDIR)/libdmapsharing_3_0_la-dpap-share.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dpap-share.c' object='libdmapsharing_3_0_la-dpap-share.lo' libtool=yes @AMDEPBACKSLASH@
+libdmapsharing_4_0_la-dmap-image-share.lo: dmap-image-share.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_4_0_la-dmap-image-share.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_4_0_la-dmap-image-share.Tpo -c -o libdmapsharing_4_0_la-dmap-image-share.lo `test -f 'dmap-image-share.c' || echo '$(srcdir)/'`dmap-image-share.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_4_0_la-dmap-image-share.Tpo $(DEPDIR)/libdmapsharing_4_0_la-dmap-image-share.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-image-share.c' object='libdmapsharing_4_0_la-dmap-image-share.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_3_0_la-dpap-share.lo `test -f 'dpap-share.c' || echo '$(srcdir)/'`dpap-share.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_4_0_la-dmap-image-share.lo `test -f 'dmap-image-share.c' || echo '$(srcdir)/'`dmap-image-share.c
 
-libdmapsharing_3_0_la-test-daap-record.lo: test-daap-record.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_3_0_la-test-daap-record.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_3_0_la-test-daap-record.Tpo -c -o libdmapsharing_3_0_la-test-daap-record.lo `test -f 'test-daap-record.c' || echo '$(srcdir)/'`test-daap-record.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_3_0_la-test-daap-record.Tpo $(DEPDIR)/libdmapsharing_3_0_la-test-daap-record.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='test-daap-record.c' object='libdmapsharing_3_0_la-test-daap-record.lo' libtool=yes @AMDEPBACKSLASH@
+libdmapsharing_4_0_la-test-dmap-av-record.lo: test-dmap-av-record.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_4_0_la-test-dmap-av-record.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_4_0_la-test-dmap-av-record.Tpo -c -o libdmapsharing_4_0_la-test-dmap-av-record.lo `test -f 'test-dmap-av-record.c' || echo '$(srcdir)/'`test-dmap-av-record.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_4_0_la-test-dmap-av-record.Tpo $(DEPDIR)/libdmapsharing_4_0_la-test-dmap-av-record.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='test-dmap-av-record.c' object='libdmapsharing_4_0_la-test-dmap-av-record.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_3_0_la-test-daap-record.lo `test -f 'test-daap-record.c' || echo '$(srcdir)/'`test-daap-record.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_4_0_la-test-dmap-av-record.lo `test -f 'test-dmap-av-record.c' || echo '$(srcdir)/'`test-dmap-av-record.c
 
-libdmapsharing_3_0_la-test-daap-record-factory.lo: test-daap-record-factory.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_3_0_la-test-daap-record-factory.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_3_0_la-test-daap-record-factory.Tpo -c -o libdmapsharing_3_0_la-test-daap-record-factory.lo `test -f 'test-daap-record-factory.c' || echo '$(srcdir)/'`test-daap-record-factory.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_3_0_la-test-daap-record-factory.Tpo $(DEPDIR)/libdmapsharing_3_0_la-test-daap-record-factory.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='test-daap-record-factory.c' object='libdmapsharing_3_0_la-test-daap-record-factory.lo' libtool=yes @AMDEPBACKSLASH@
+libdmapsharing_4_0_la-test-dmap-av-record-factory.lo: test-dmap-av-record-factory.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_4_0_la-test-dmap-av-record-factory.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_4_0_la-test-dmap-av-record-factory.Tpo -c -o libdmapsharing_4_0_la-test-dmap-av-record-factory.lo `test -f 'test-dmap-av-record-factory.c' || echo '$(srcdir)/'`test-dmap-av-record-factory.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_4_0_la-test-dmap-av-record-factory.Tpo $(DEPDIR)/libdmapsharing_4_0_la-test-dmap-av-record-factory.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='test-dmap-av-record-factory.c' object='libdmapsharing_4_0_la-test-dmap-av-record-factory.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_3_0_la-test-daap-record-factory.lo `test -f 'test-daap-record-factory.c' || echo '$(srcdir)/'`test-daap-record-factory.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_4_0_la-test-dmap-av-record-factory.lo `test -f 'test-dmap-av-record-factory.c' || echo '$(srcdir)/'`test-dmap-av-record-factory.c
 
-libdmapsharing_3_0_la-test-dpap-record.lo: test-dpap-record.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_3_0_la-test-dpap-record.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_3_0_la-test-dpap-record.Tpo -c -o libdmapsharing_3_0_la-test-dpap-record.lo `test -f 'test-dpap-record.c' || echo '$(srcdir)/'`test-dpap-record.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_3_0_la-test-dpap-record.Tpo $(DEPDIR)/libdmapsharing_3_0_la-test-dpap-record.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='test-dpap-record.c' object='libdmapsharing_3_0_la-test-dpap-record.lo' libtool=yes @AMDEPBACKSLASH@
+libdmapsharing_4_0_la-test-dmap-container-db.lo: test-dmap-container-db.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_4_0_la-test-dmap-container-db.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_4_0_la-test-dmap-container-db.Tpo -c -o libdmapsharing_4_0_la-test-dmap-container-db.lo `test -f 'test-dmap-container-db.c' || echo '$(srcdir)/'`test-dmap-container-db.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_4_0_la-test-dmap-container-db.Tpo $(DEPDIR)/libdmapsharing_4_0_la-test-dmap-container-db.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='test-dmap-container-db.c' object='libdmapsharing_4_0_la-test-dmap-container-db.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_3_0_la-test-dpap-record.lo `test -f 'test-dpap-record.c' || echo '$(srcdir)/'`test-dpap-record.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_4_0_la-test-dmap-container-db.lo `test -f 'test-dmap-container-db.c' || echo '$(srcdir)/'`test-dmap-container-db.c
 
-libdmapsharing_3_0_la-test-dpap-record-factory.lo: test-dpap-record-factory.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_3_0_la-test-dpap-record-factory.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_3_0_la-test-dpap-record-factory.Tpo -c -o libdmapsharing_3_0_la-test-dpap-record-factory.lo `test -f 'test-dpap-record-factory.c' || echo '$(srcdir)/'`test-dpap-record-factory.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_3_0_la-test-dpap-record-factory.Tpo $(DEPDIR)/libdmapsharing_3_0_la-test-dpap-record-factory.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='test-dpap-record-factory.c' object='libdmapsharing_3_0_la-test-dpap-record-factory.lo' libtool=yes @AMDEPBACKSLASH@
+libdmapsharing_4_0_la-test-dmap-container-record.lo: test-dmap-container-record.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_4_0_la-test-dmap-container-record.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_4_0_la-test-dmap-container-record.Tpo -c -o libdmapsharing_4_0_la-test-dmap-container-record.lo `test -f 'test-dmap-container-record.c' || echo '$(srcdir)/'`test-dmap-container-record.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_4_0_la-test-dmap-container-record.Tpo $(DEPDIR)/libdmapsharing_4_0_la-test-dmap-container-record.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='test-dmap-container-record.c' object='libdmapsharing_4_0_la-test-dmap-container-record.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_3_0_la-test-dpap-record-factory.lo `test -f 'test-dpap-record-factory.c' || echo '$(srcdir)/'`test-dpap-record-factory.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_4_0_la-test-dmap-container-record.lo `test -f 'test-dmap-container-record.c' || echo '$(srcdir)/'`test-dmap-container-record.c
 
-libdmapsharing_3_0_la-dmap-mdns-avahi.lo: dmap-mdns-avahi.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_3_0_la-dmap-mdns-avahi.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_3_0_la-dmap-mdns-avahi.Tpo -c -o libdmapsharing_3_0_la-dmap-mdns-avahi.lo `test -f 'dmap-mdns-avahi.c' || echo '$(srcdir)/'`dmap-mdns-avahi.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_3_0_la-dmap-mdns-avahi.Tpo $(DEPDIR)/libdmapsharing_3_0_la-dmap-mdns-avahi.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-mdns-avahi.c' object='libdmapsharing_3_0_la-dmap-mdns-avahi.lo' libtool=yes @AMDEPBACKSLASH@
+libdmapsharing_4_0_la-test-dmap-db.lo: test-dmap-db.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_4_0_la-test-dmap-db.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_4_0_la-test-dmap-db.Tpo -c -o libdmapsharing_4_0_la-test-dmap-db.lo `test -f 'test-dmap-db.c' || echo '$(srcdir)/'`test-dmap-db.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_4_0_la-test-dmap-db.Tpo $(DEPDIR)/libdmapsharing_4_0_la-test-dmap-db.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='test-dmap-db.c' object='libdmapsharing_4_0_la-test-dmap-db.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_3_0_la-dmap-mdns-avahi.lo `test -f 'dmap-mdns-avahi.c' || echo '$(srcdir)/'`dmap-mdns-avahi.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_4_0_la-test-dmap-db.lo `test -f 'test-dmap-db.c' || echo '$(srcdir)/'`test-dmap-db.c
 
-libdmapsharing_3_0_la-dmap-mdns-browser-avahi.lo: dmap-mdns-browser-avahi.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_3_0_la-dmap-mdns-browser-avahi.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_3_0_la-dmap-mdns-browser-avahi.Tpo -c -o libdmapsharing_3_0_la-dmap-mdns-browser-avahi.lo `test -f 'dmap-mdns-browser-avahi.c' || echo '$(srcdir)/'`dmap-mdns-browser-avahi.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_3_0_la-dmap-mdns-browser-avahi.Tpo $(DEPDIR)/libdmapsharing_3_0_la-dmap-mdns-browser-avahi.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-mdns-browser-avahi.c' object='libdmapsharing_3_0_la-dmap-mdns-browser-avahi.lo' libtool=yes @AMDEPBACKSLASH@
+libdmapsharing_4_0_la-test-dmap-image-record.lo: test-dmap-image-record.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_4_0_la-test-dmap-image-record.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_4_0_la-test-dmap-image-record.Tpo -c -o libdmapsharing_4_0_la-test-dmap-image-record.lo `test -f 'test-dmap-image-record.c' || echo '$(srcdir)/'`test-dmap-image-record.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_4_0_la-test-dmap-image-record.Tpo $(DEPDIR)/libdmapsharing_4_0_la-test-dmap-image-record.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='test-dmap-image-record.c' object='libdmapsharing_4_0_la-test-dmap-image-record.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_3_0_la-dmap-mdns-browser-avahi.lo `test -f 'dmap-mdns-browser-avahi.c' || echo '$(srcdir)/'`dmap-mdns-browser-avahi.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_4_0_la-test-dmap-image-record.lo `test -f 'test-dmap-image-record.c' || echo '$(srcdir)/'`test-dmap-image-record.c
 
-libdmapsharing_3_0_la-dmap-mdns-publisher-avahi.lo: dmap-mdns-publisher-avahi.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_3_0_la-dmap-mdns-publisher-avahi.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_3_0_la-dmap-mdns-publisher-avahi.Tpo -c -o libdmapsharing_3_0_la-dmap-mdns-publisher-avahi.lo `test -f 'dmap-mdns-publisher-avahi.c' || echo '$(srcdir)/'`dmap-mdns-publisher-avahi.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_3_0_la-dmap-mdns-publisher-avahi.Tpo $(DEPDIR)/libdmapsharing_3_0_la-dmap-mdns-publisher-avahi.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-mdns-publisher-avahi.c' object='libdmapsharing_3_0_la-dmap-mdns-publisher-avahi.lo' libtool=yes @AMDEPBACKSLASH@
+libdmapsharing_4_0_la-test-dmap-image-record-factory.lo: test-dmap-image-record-factory.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_4_0_la-test-dmap-image-record-factory.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_4_0_la-test-dmap-image-record-factory.Tpo -c -o libdmapsharing_4_0_la-test-dmap-image-record-factory.lo `test -f 'test-dmap-image-record-factory.c' || echo '$(srcdir)/'`test-dmap-image-record-factory.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_4_0_la-test-dmap-image-record-factory.Tpo $(DEPDIR)/libdmapsharing_4_0_la-test-dmap-image-record-factory.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='test-dmap-image-record-factory.c' object='libdmapsharing_4_0_la-test-dmap-image-record-factory.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_3_0_la-dmap-mdns-publisher-avahi.lo `test -f 'dmap-mdns-publisher-avahi.c' || echo '$(srcdir)/'`dmap-mdns-publisher-avahi.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_4_0_la-test-dmap-image-record-factory.lo `test -f 'test-dmap-image-record-factory.c' || echo '$(srcdir)/'`test-dmap-image-record-factory.c
 
-libdmapsharing_3_0_la-dmap-mdns-browser-dnssd.lo: dmap-mdns-browser-dnssd.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_3_0_la-dmap-mdns-browser-dnssd.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_3_0_la-dmap-mdns-browser-dnssd.Tpo -c -o libdmapsharing_3_0_la-dmap-mdns-browser-dnssd.lo `test -f 'dmap-mdns-browser-dnssd.c' || echo '$(srcdir)/'`dmap-mdns-browser-dnssd.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_3_0_la-dmap-mdns-browser-dnssd.Tpo $(DEPDIR)/libdmapsharing_3_0_la-dmap-mdns-browser-dnssd.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-mdns-browser-dnssd.c' object='libdmapsharing_3_0_la-dmap-mdns-browser-dnssd.lo' libtool=yes @AMDEPBACKSLASH@
+libdmapsharing_4_0_la-dmap-mdns-avahi.lo: dmap-mdns-avahi.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_4_0_la-dmap-mdns-avahi.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_4_0_la-dmap-mdns-avahi.Tpo -c -o libdmapsharing_4_0_la-dmap-mdns-avahi.lo `test -f 'dmap-mdns-avahi.c' || echo '$(srcdir)/'`dmap-mdns-avahi.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_4_0_la-dmap-mdns-avahi.Tpo $(DEPDIR)/libdmapsharing_4_0_la-dmap-mdns-avahi.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-mdns-avahi.c' object='libdmapsharing_4_0_la-dmap-mdns-avahi.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_3_0_la-dmap-mdns-browser-dnssd.lo `test -f 'dmap-mdns-browser-dnssd.c' || echo '$(srcdir)/'`dmap-mdns-browser-dnssd.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_4_0_la-dmap-mdns-avahi.lo `test -f 'dmap-mdns-avahi.c' || echo '$(srcdir)/'`dmap-mdns-avahi.c
 
-libdmapsharing_3_0_la-dmap-mdns-publisher-dnssd.lo: dmap-mdns-publisher-dnssd.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_3_0_la-dmap-mdns-publisher-dnssd.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_3_0_la-dmap-mdns-publisher-dnssd.Tpo -c -o libdmapsharing_3_0_la-dmap-mdns-publisher-dnssd.lo `test -f 'dmap-mdns-publisher-dnssd.c' || echo '$(srcdir)/'`dmap-mdns-publisher-dnssd.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_3_0_la-dmap-mdns-publisher-dnssd.Tpo $(DEPDIR)/libdmapsharing_3_0_la-dmap-mdns-publisher-dnssd.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-mdns-publisher-dnssd.c' object='libdmapsharing_3_0_la-dmap-mdns-publisher-dnssd.lo' libtool=yes @AMDEPBACKSLASH@
+libdmapsharing_4_0_la-dmap-mdns-browser-avahi.lo: dmap-mdns-browser-avahi.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_4_0_la-dmap-mdns-browser-avahi.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_4_0_la-dmap-mdns-browser-avahi.Tpo -c -o libdmapsharing_4_0_la-dmap-mdns-browser-avahi.lo `test -f 'dmap-mdns-browser-avahi.c' || echo '$(srcdir)/'`dmap-mdns-browser-avahi.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_4_0_la-dmap-mdns-browser-avahi.Tpo $(DEPDIR)/libdmapsharing_4_0_la-dmap-mdns-browser-avahi.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-mdns-browser-avahi.c' object='libdmapsharing_4_0_la-dmap-mdns-browser-avahi.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_3_0_la-dmap-mdns-publisher-dnssd.lo `test -f 'dmap-mdns-publisher-dnssd.c' || echo '$(srcdir)/'`dmap-mdns-publisher-dnssd.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_4_0_la-dmap-mdns-browser-avahi.lo `test -f 'dmap-mdns-browser-avahi.c' || echo '$(srcdir)/'`dmap-mdns-browser-avahi.c
 
-libdmapsharing_3_0_la-dmap-gst-input-stream.lo: dmap-gst-input-stream.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_3_0_la-dmap-gst-input-stream.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_3_0_la-dmap-gst-input-stream.Tpo -c -o libdmapsharing_3_0_la-dmap-gst-input-stream.lo `test -f 'dmap-gst-input-stream.c' || echo '$(srcdir)/'`dmap-gst-input-stream.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_3_0_la-dmap-gst-input-stream.Tpo $(DEPDIR)/libdmapsharing_3_0_la-dmap-gst-input-stream.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-gst-input-stream.c' object='libdmapsharing_3_0_la-dmap-gst-input-stream.lo' libtool=yes @AMDEPBACKSLASH@
+libdmapsharing_4_0_la-dmap-mdns-publisher-avahi.lo: dmap-mdns-publisher-avahi.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_4_0_la-dmap-mdns-publisher-avahi.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_4_0_la-dmap-mdns-publisher-avahi.Tpo -c -o libdmapsharing_4_0_la-dmap-mdns-publisher-avahi.lo `test -f 'dmap-mdns-publisher-avahi.c' || echo '$(srcdir)/'`dmap-mdns-publisher-avahi.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_4_0_la-dmap-mdns-publisher-avahi.Tpo $(DEPDIR)/libdmapsharing_4_0_la-dmap-mdns-publisher-avahi.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-mdns-publisher-avahi.c' object='libdmapsharing_4_0_la-dmap-mdns-publisher-avahi.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_3_0_la-dmap-gst-input-stream.lo `test -f 'dmap-gst-input-stream.c' || echo '$(srcdir)/'`dmap-gst-input-stream.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_4_0_la-dmap-mdns-publisher-avahi.lo `test -f 'dmap-mdns-publisher-avahi.c' || echo '$(srcdir)/'`dmap-mdns-publisher-avahi.c
 
-libdmapsharing_3_0_la-dmap-gst-mp3-input-stream.lo: dmap-gst-mp3-input-stream.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_3_0_la-dmap-gst-mp3-input-stream.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_3_0_la-dmap-gst-mp3-input-stream.Tpo -c -o libdmapsharing_3_0_la-dmap-gst-mp3-input-stream.lo `test -f 'dmap-gst-mp3-input-stream.c' || echo '$(srcdir)/'`dmap-gst-mp3-input-stream.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_3_0_la-dmap-gst-mp3-input-stream.Tpo $(DEPDIR)/libdmapsharing_3_0_la-dmap-gst-mp3-input-stream.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-gst-mp3-input-stream.c' object='libdmapsharing_3_0_la-dmap-gst-mp3-input-stream.lo' libtool=yes @AMDEPBACKSLASH@
+libdmapsharing_4_0_la-dmap-mdns-browser-dnssd.lo: dmap-mdns-browser-dnssd.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_4_0_la-dmap-mdns-browser-dnssd.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_4_0_la-dmap-mdns-browser-dnssd.Tpo -c -o libdmapsharing_4_0_la-dmap-mdns-browser-dnssd.lo `test -f 'dmap-mdns-browser-dnssd.c' || echo '$(srcdir)/'`dmap-mdns-browser-dnssd.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_4_0_la-dmap-mdns-browser-dnssd.Tpo $(DEPDIR)/libdmapsharing_4_0_la-dmap-mdns-browser-dnssd.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-mdns-browser-dnssd.c' object='libdmapsharing_4_0_la-dmap-mdns-browser-dnssd.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_3_0_la-dmap-gst-mp3-input-stream.lo `test -f 'dmap-gst-mp3-input-stream.c' || echo '$(srcdir)/'`dmap-gst-mp3-input-stream.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_4_0_la-dmap-mdns-browser-dnssd.lo `test -f 'dmap-mdns-browser-dnssd.c' || echo '$(srcdir)/'`dmap-mdns-browser-dnssd.c
 
-libdmapsharing_3_0_la-dmap-gst-qt-input-stream.lo: dmap-gst-qt-input-stream.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_3_0_la-dmap-gst-qt-input-stream.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_3_0_la-dmap-gst-qt-input-stream.Tpo -c -o libdmapsharing_3_0_la-dmap-gst-qt-input-stream.lo `test -f 'dmap-gst-qt-input-stream.c' || echo '$(srcdir)/'`dmap-gst-qt-input-stream.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_3_0_la-dmap-gst-qt-input-stream.Tpo $(DEPDIR)/libdmapsharing_3_0_la-dmap-gst-qt-input-stream.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-gst-qt-input-stream.c' object='libdmapsharing_3_0_la-dmap-gst-qt-input-stream.lo' libtool=yes @AMDEPBACKSLASH@
+libdmapsharing_4_0_la-dmap-mdns-publisher-dnssd.lo: dmap-mdns-publisher-dnssd.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_4_0_la-dmap-mdns-publisher-dnssd.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_4_0_la-dmap-mdns-publisher-dnssd.Tpo -c -o libdmapsharing_4_0_la-dmap-mdns-publisher-dnssd.lo `test -f 'dmap-mdns-publisher-dnssd.c' || echo '$(srcdir)/'`dmap-mdns-publisher-dnssd.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_4_0_la-dmap-mdns-publisher-dnssd.Tpo $(DEPDIR)/libdmapsharing_4_0_la-dmap-mdns-publisher-dnssd.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-mdns-publisher-dnssd.c' object='libdmapsharing_4_0_la-dmap-mdns-publisher-dnssd.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_3_0_la-dmap-gst-qt-input-stream.lo `test -f 'dmap-gst-qt-input-stream.c' || echo '$(srcdir)/'`dmap-gst-qt-input-stream.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_4_0_la-dmap-mdns-publisher-dnssd.lo `test -f 'dmap-mdns-publisher-dnssd.c' || echo '$(srcdir)/'`dmap-mdns-publisher-dnssd.c
 
-libdmapsharing_3_0_la-dmap-gst-wav-input-stream.lo: dmap-gst-wav-input-stream.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_3_0_la-dmap-gst-wav-input-stream.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_3_0_la-dmap-gst-wav-input-stream.Tpo -c -o libdmapsharing_3_0_la-dmap-gst-wav-input-stream.lo `test -f 'dmap-gst-wav-input-stream.c' || echo '$(srcdir)/'`dmap-gst-wav-input-stream.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_3_0_la-dmap-gst-wav-input-stream.Tpo $(DEPDIR)/libdmapsharing_3_0_la-dmap-gst-wav-input-stream.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-gst-wav-input-stream.c' object='libdmapsharing_3_0_la-dmap-gst-wav-input-stream.lo' libtool=yes @AMDEPBACKSLASH@
+libdmapsharing_4_0_la-dmap-transcode-stream.lo: dmap-transcode-stream.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_4_0_la-dmap-transcode-stream.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_4_0_la-dmap-transcode-stream.Tpo -c -o libdmapsharing_4_0_la-dmap-transcode-stream.lo `test -f 'dmap-transcode-stream.c' || echo '$(srcdir)/'`dmap-transcode-stream.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_4_0_la-dmap-transcode-stream.Tpo $(DEPDIR)/libdmapsharing_4_0_la-dmap-transcode-stream.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-transcode-stream.c' object='libdmapsharing_4_0_la-dmap-transcode-stream.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_3_0_la-dmap-gst-wav-input-stream.lo `test -f 'dmap-gst-wav-input-stream.c' || echo '$(srcdir)/'`dmap-gst-wav-input-stream.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_4_0_la-dmap-transcode-stream.lo `test -f 'dmap-transcode-stream.c' || echo '$(srcdir)/'`dmap-transcode-stream.c
 
-libdmapsharing_3_0_la-gst-util.lo: gst-util.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_3_0_la-gst-util.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_3_0_la-gst-util.Tpo -c -o libdmapsharing_3_0_la-gst-util.lo `test -f 'gst-util.c' || echo '$(srcdir)/'`gst-util.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_3_0_la-gst-util.Tpo $(DEPDIR)/libdmapsharing_3_0_la-gst-util.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gst-util.c' object='libdmapsharing_3_0_la-gst-util.lo' libtool=yes @AMDEPBACKSLASH@
+libdmapsharing_4_0_la-dmap-transcode-mp3-stream.lo: dmap-transcode-mp3-stream.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_4_0_la-dmap-transcode-mp3-stream.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_4_0_la-dmap-transcode-mp3-stream.Tpo -c -o libdmapsharing_4_0_la-dmap-transcode-mp3-stream.lo `test -f 'dmap-transcode-mp3-stream.c' || echo '$(srcdir)/'`dmap-transcode-mp3-stream.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_4_0_la-dmap-transcode-mp3-stream.Tpo $(DEPDIR)/libdmapsharing_4_0_la-dmap-transcode-mp3-stream.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-transcode-mp3-stream.c' object='libdmapsharing_4_0_la-dmap-transcode-mp3-stream.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_3_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_3_0_la-gst-util.lo `test -f 'gst-util.c' || echo '$(srcdir)/'`gst-util.c
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_4_0_la-dmap-transcode-mp3-stream.lo `test -f 'dmap-transcode-mp3-stream.c' || echo '$(srcdir)/'`dmap-transcode-mp3-stream.c
+
+libdmapsharing_4_0_la-dmap-transcode-qt-stream.lo: dmap-transcode-qt-stream.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_4_0_la-dmap-transcode-qt-stream.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_4_0_la-dmap-transcode-qt-stream.Tpo -c -o libdmapsharing_4_0_la-dmap-transcode-qt-stream.lo `test -f 'dmap-transcode-qt-stream.c' || echo '$(srcdir)/'`dmap-transcode-qt-stream.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_4_0_la-dmap-transcode-qt-stream.Tpo $(DEPDIR)/libdmapsharing_4_0_la-dmap-transcode-qt-stream.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-transcode-qt-stream.c' object='libdmapsharing_4_0_la-dmap-transcode-qt-stream.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_4_0_la-dmap-transcode-qt-stream.lo `test -f 'dmap-transcode-qt-stream.c' || echo '$(srcdir)/'`dmap-transcode-qt-stream.c
+
+libdmapsharing_4_0_la-dmap-transcode-wav-stream.lo: dmap-transcode-wav-stream.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_4_0_la-dmap-transcode-wav-stream.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_4_0_la-dmap-transcode-wav-stream.Tpo -c -o libdmapsharing_4_0_la-dmap-transcode-wav-stream.lo `test -f 'dmap-transcode-wav-stream.c' || echo '$(srcdir)/'`dmap-transcode-wav-stream.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_4_0_la-dmap-transcode-wav-stream.Tpo $(DEPDIR)/libdmapsharing_4_0_la-dmap-transcode-wav-stream.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmap-transcode-wav-stream.c' object='libdmapsharing_4_0_la-dmap-transcode-wav-stream.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_4_0_la-dmap-transcode-wav-stream.lo `test -f 'dmap-transcode-wav-stream.c' || echo '$(srcdir)/'`dmap-transcode-wav-stream.c
+
+libdmapsharing_4_0_la-gst-util.lo: gst-util.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -MT libdmapsharing_4_0_la-gst-util.lo -MD -MP -MF $(DEPDIR)/libdmapsharing_4_0_la-gst-util.Tpo -c -o libdmapsharing_4_0_la-gst-util.lo `test -f 'gst-util.c' || echo '$(srcdir)/'`gst-util.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdmapsharing_4_0_la-gst-util.Tpo $(DEPDIR)/libdmapsharing_4_0_la-gst-util.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gst-util.c' object='libdmapsharing_4_0_la-gst-util.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdmapsharing_4_0_la_CFLAGS) $(CFLAGS) -c -o libdmapsharing_4_0_la-gst-util.lo `test -f 'gst-util.c' || echo '$(srcdir)/'`gst-util.c
 
 mostlyclean-libtool:
 	-rm -f *.lo
@@ -1083,7 +1164,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
@@ -1118,6 +1198,7 @@ distdir-am: $(DISTFILES)
 	  fi; \
 	done
 check-am: all-am
+	$(MAKE) $(AM_MAKEFLAGS) check-local
 check: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) check-am
 all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS)
@@ -1127,7 +1208,8 @@ installdirs:
 	done
 install: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) install-am
-install-exec: install-exec-am
+install-exec: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-exec-am
 install-data: install-data-am
 uninstall: uninstall-am
 
@@ -1164,41 +1246,46 @@ clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
 	mostlyclean-am
 
 distclean: distclean-am
-		-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-daap-connection.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-daap-record.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-daap-share.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dacp-connection.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dacp-player.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dacp-share.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dmap-connection.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dmap-container-db.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dmap-container-record.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dmap-db.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dmap-enums.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dmap-gst-input-stream.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dmap-gst-mp3-input-stream.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dmap-gst-qt-input-stream.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dmap-gst-wav-input-stream.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dmap-md5.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dmap-mdns-avahi.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dmap-mdns-browser-avahi.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dmap-mdns-browser-dnssd.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dmap-mdns-publisher-avahi.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dmap-mdns-publisher-dnssd.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dmap-private-utils.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dmap-record-factory.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dmap-record.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dmap-share.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dmap-structure.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dmap-utils.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dpap-connection.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dpap-record.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dpap-share.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-gst-util.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-test-daap-record-factory.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-test-daap-record.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-test-dpap-record-factory.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-test-dpap-record.Plo
+		-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-av-connection.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-av-record.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-av-share.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-connection.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-container-db.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-container-record.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-control-connection.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-control-player.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-control-share.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-db.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-enums.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-error.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-image-connection.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-image-record.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-image-share.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-md5.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-mdns-avahi.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-mdns-browser-avahi.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-mdns-browser-dnssd.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-mdns-publisher-avahi.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-mdns-publisher-dnssd.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-mdns-service.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-private-utils.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-record-factory.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-record.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-share.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-structure.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-transcode-mp3-stream.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-transcode-qt-stream.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-transcode-stream.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-transcode-wav-stream.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-utils.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-gst-util.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-test-dmap-av-record-factory.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-test-dmap-av-record.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-test-dmap-container-db.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-test-dmap-container-record.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-test-dmap-db.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-test-dmap-image-record-factory.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-test-dmap-image-record.Plo
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
 	distclean-tags
@@ -1245,41 +1332,46 @@ install-ps-am:
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
-		-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-daap-connection.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-daap-record.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-daap-share.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dacp-connection.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dacp-player.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dacp-share.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dmap-connection.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dmap-container-db.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dmap-container-record.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dmap-db.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dmap-enums.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dmap-gst-input-stream.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dmap-gst-mp3-input-stream.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dmap-gst-qt-input-stream.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dmap-gst-wav-input-stream.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dmap-md5.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dmap-mdns-avahi.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dmap-mdns-browser-avahi.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dmap-mdns-browser-dnssd.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dmap-mdns-publisher-avahi.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dmap-mdns-publisher-dnssd.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dmap-private-utils.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dmap-record-factory.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dmap-record.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dmap-share.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dmap-structure.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dmap-utils.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dpap-connection.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dpap-record.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-dpap-share.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-gst-util.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-test-daap-record-factory.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-test-daap-record.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-test-dpap-record-factory.Plo
-	-rm -f ./$(DEPDIR)/libdmapsharing_3_0_la-test-dpap-record.Plo
+		-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-av-connection.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-av-record.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-av-share.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-connection.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-container-db.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-container-record.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-control-connection.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-control-player.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-control-share.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-db.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-enums.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-error.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-image-connection.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-image-record.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-image-share.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-md5.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-mdns-avahi.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-mdns-browser-avahi.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-mdns-browser-dnssd.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-mdns-publisher-avahi.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-mdns-publisher-dnssd.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-mdns-service.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-private-utils.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-record-factory.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-record.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-share.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-structure.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-transcode-mp3-stream.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-transcode-qt-stream.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-transcode-stream.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-transcode-wav-stream.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-dmap-utils.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-gst-util.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-test-dmap-av-record-factory.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-test-dmap-av-record.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-test-dmap-container-db.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-test-dmap-container-record.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-test-dmap-db.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-test-dmap-image-record-factory.Plo
+	-rm -f ./$(DEPDIR)/libdmapsharing_4_0_la-test-dmap-image-record.Plo
 	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 
@@ -1299,47 +1391,45 @@ ps-am:
 uninstall-am: uninstall-girDATA uninstall-libLTLIBRARIES \
 	uninstall-libdmapsharingincludeHEADERS uninstall-typelibDATA
 
-.MAKE: all check install install-am install-strip
-
-.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
-	clean-generic clean-libLTLIBRARIES clean-libtool cscopelist-am \
-	ctags ctags-am distclean distclean-compile distclean-generic \
-	distclean-libtool distclean-tags distdir dvi dvi-am html \
-	html-am info info-am install install-am install-data \
-	install-data-am install-dvi install-dvi-am install-exec \
-	install-exec-am install-girDATA install-html install-html-am \
-	install-info install-info-am install-libLTLIBRARIES \
-	install-libdmapsharingincludeHEADERS install-man install-pdf \
-	install-pdf-am install-ps install-ps-am install-strip \
-	install-typelibDATA installcheck installcheck-am installdirs \
-	maintainer-clean maintainer-clean-generic mostlyclean \
-	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
-	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
-	uninstall-girDATA uninstall-libLTLIBRARIES \
+.MAKE: all check check-am install install-am install-exec \
+	install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am \
+	check-local clean clean-generic clean-libLTLIBRARIES \
+	clean-libtool cscopelist-am ctags ctags-am distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-girDATA \
+	install-html install-html-am install-info install-info-am \
+	install-libLTLIBRARIES install-libdmapsharingincludeHEADERS \
+	install-man install-pdf install-pdf-am install-ps \
+	install-ps-am install-strip install-typelibDATA installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags tags-am uninstall uninstall-am uninstall-girDATA \
+	uninstall-libLTLIBRARIES \
 	uninstall-libdmapsharingincludeHEADERS uninstall-typelibDATA
 
 .PRECIOUS: Makefile
 
 
-dmap-enums.c: $(libdmapsharinginclude_headers) Makefile dmap-enums.h
+dmap-enums.c: $(maintained_headers) Makefile dmap-enums.h
 	@glib-mkenums \
-			--fhead "/* Automatically generated by glib-mkenums */\n\n#include \"dacp-share.h\"\n#include \"dacp-player.h\"\n#include \"dmap-mdns-publisher.h\"\n#include \"dmap-mdns-browser.h\"\n#include \"dmap-connection.h\"\n#include \"dmap-enums.h\"" \
+			--fhead "/* Automatically generated by glib-mkenums */\n\n#include \"dmap-control-share.h\"\n#include \"dmap-control-player.h\"\n#include \"dmap-mdns-publisher.h\"\n#include \"dmap-mdns-browser.h\"\n#include \"dmap-connection.h\"\n#include \"dmap-error.h\"\n#include \"dmap-enums.h\"" \
 			--fprod "\n/* enumerations from \"@filename@\" */" \
 			--vhead "GType\n@enum_name@_get_type (void)\n{\n  static GType etype = 0;\n  if (etype == 0) {\n    static const G@Type@Value values[] = {" \
 			--vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
 			--vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
-		$(addprefix $(srcdir)/,$(libdmapsharinginclude_HEADERS)) > $@.tmp \
-	&& sed -e "s/d_map/dmap/" -e "s/D_MAP/DMAP/" -e "s/d_acp/dacp/" -e "s/D_ACP/DACP/" $@.tmp > $@ \
-	&& rm -f $@.tmp
+		$(maintained_headers) >$@
 
-dmap-enums.h: $(libdmapsharinginclude_HEADERS) Makefile
+dmap-enums.h: $(maintained_headers) Makefile
 	@glib-mkenums \
-			--fhead "/* Automatically generated by glib-mkenums */\n\n#ifndef DMAP_ENUMS_H\n#define DMAP_ENUMS_H\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n\n" \
+			--fhead "/* Automatically generated by glib-mkenums */\n\n#ifndef _DMAP_ENUMS_H\n#define _DMAP_ENUMS_H\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n\n" \
 			--fprod "\n/* enumerations from \"@filename@\" */\n" \
 			--vhead "GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define DMAP_TYPE_@ENUMNAME@ (@enum_name@_get_type())\n" \
-			--ftail "G_END_DECLS\n\n#endif /* !DMAP_ENUMS_H */" $(addprefix $(srcdir)/,$(libdmapsharinginclude_HEADERS)) > $@.tmp \
-	&& sed -e "s/d_map/dmap/" -e "s/D_MAP/DMAP/" -e "s/d_acp/dacp/" -e "s/D_ACP/DACP/" $@.tmp > $@ \
-	&& rm -f $@.tmp
+			--ftail "G_END_DECLS\n\n#endif /* _DMAP_ENUMS_H */" $(maintained_headers) >$@
 
 unit-test.stamp: *.c
 	./generate-test-suites
@@ -1348,28 +1438,124 @@ unit-test.stamp: *.c
 
 @HAVE_INTROSPECTION_TRUE@include $(INTROSPECTION_MAKEFILE)
 
-@HAVE_INTROSPECTION_TRUE@DMAP-3.0.gir: libdmapsharing-3.0.la
-
-check:
-@HAVE_PEDANSEE_TRUE@	echo    "[ignore]" > pedansee.conf
-@HAVE_PEDANSEE_TRUE@	echo -n "	name = " >> pedansee.conf
-@HAVE_PEDANSEE_TRUE@	for i in $$(grep G_DEFINE_TYPE *.c | sed 's/[^,]*, \([^,]*\),.*/\1/g'); do \
-@HAVE_PEDANSEE_TRUE@		echo -n $${i}_init\;; \
-@HAVE_PEDANSEE_TRUE@		echo -n $${i}_class_init\;; \
-@HAVE_PEDANSEE_TRUE@		echo -n $${i}_parent_class\;; \
-@HAVE_PEDANSEE_TRUE@		echo -n $${i}_get_instance_private\;; \
-@HAVE_PEDANSEE_TRUE@		echo -n $${i}_class_intern_init\;; \
-@HAVE_PEDANSEE_TRUE@		echo -n $${i}_get_type\;; \
-@HAVE_PEDANSEE_TRUE@	done >> pedansee.conf
-@HAVE_PEDANSEE_TRUE@	for i in $$(grep G_DEFINE_TYPE *.c | sed 's/.*(\([^,]*\),.*/\1/g'); do \
-@HAVE_PEDANSEE_TRUE@		echo -n $${i}_private_offset\;; \
-@HAVE_PEDANSEE_TRUE@	done >> pedansee.conf
-@HAVE_PEDANSEE_TRUE@	set -e; for i in $(libdmapsharing_3_0_la_SOURCES); do \
-@HAVE_PEDANSEE_TRUE@		$(PEDANSEE) -c pedansee.conf $$i -- -x c $(DEFS) $(libdmapsharing_3_0_la_CFLAGS); \
+@HAVE_INTROSPECTION_TRUE@Dmap-4.0.gir: libdmapsharing-4.0.la
+
+check-local:
+	make clean
+	make CFLAGS="-fprofile-arcs -ftest-coverage -g"
+	../tests/unit-test
+	set -e; for i in $(libdmapsharing_4_0_la_SOURCES); do \
+		gcov -r -o .libs/libdmapsharing_4_0_la-$${i%.c}.o $$i >/dev/null; \
+	done
+	../tests/summarize-coverage ${libdmapsharing_4_0_la_SOURCES:.c=.c.gcov}
+@HAVE_PEDANSEE_TRUE@	echo    "[flags]" >pedansee.conf
+@HAVE_PEDANSEE_TRUE@	echo    "	skip-unit-test-present = true" >>pedansee.conf
+@HAVE_PEDANSEE_TRUE@	echo    "	skip-return-value-used = true" >>pedansee.conf
+@HAVE_PEDANSEE_TRUE@	echo    "[ignore-return-check]" >>pedansee.conf
+@HAVE_PEDANSEE_TRUE@	echo    "	# Ignore dmap_structure_add; return cannot indicate error." >>pedansee.conf
+@HAVE_PEDANSEE_TRUE@	echo    "	# Ignore g_object_ref; return value merely a convenience." >>pedansee.conf
+@HAVE_PEDANSEE_TRUE@	echo -n "	name = " >>pedansee.conf
+@HAVE_PEDANSEE_TRUE@	echo -n "dmap_structure_add;" >>pedansee.conf
+@HAVE_PEDANSEE_TRUE@	echo -n "g_object_ref;" >>pedansee.conf
+@HAVE_PEDANSEE_TRUE@	echo -n "g_string_ascii_up;" >>pedansee.conf
+@HAVE_PEDANSEE_TRUE@	echo -n "g_string_append_len;" >>pedansee.conf
+@HAVE_PEDANSEE_TRUE@	echo >>pedansee.conf
+@HAVE_PEDANSEE_TRUE@	echo    "[ignore-entirely]" >>pedansee.conf
+@HAVE_PEDANSEE_TRUE@	echo    "       # Ignore CPP-generated GObject code." >>pedansee.conf
+@HAVE_PEDANSEE_TRUE@	echo -n "       name = " >>pedansee.conf
+@HAVE_PEDANSEE_TRUE@	echo -n  	      "dmap_mdns_browser_new;" >>pedansee.conf
+@HAVE_PEDANSEE_TRUE@	echo -n  	      "dmap_mdns_browser_start;" >>pedansee.conf
+@HAVE_PEDANSEE_TRUE@	echo -n  	      "dmap_mdns_browser_stop;" >>pedansee.conf
+@HAVE_PEDANSEE_TRUE@	echo -n  	      "dmap_mdns_browser_error_quark;" >>pedansee.conf
+@HAVE_PEDANSEE_TRUE@	echo -n  	      "dmap_mdns_browser_get_services;" >>pedansee.conf
+@HAVE_PEDANSEE_TRUE@	echo -n  	      "dmap_mdns_browser_get_service_type;" >>pedansee.conf
+@HAVE_PEDANSEE_TRUE@	echo -n		      "dmap_mdns_publisher_new;" >>pedansee.conf
+@HAVE_PEDANSEE_TRUE@	echo -n		      "dmap_mdns_publisher_error_quark;" >>pedansee.conf
+@HAVE_PEDANSEE_TRUE@	echo -n		      "dmap_mdns_publisher_rename_at_port;" >>pedansee.conf
+@HAVE_PEDANSEE_TRUE@	echo -n		      "dmap_mdns_publisher_publish;" >>pedansee.conf
+@HAVE_PEDANSEE_TRUE@	echo -n		      "dmap_mdns_publisher_withdraw;" >>pedansee.conf
+@HAVE_PEDANSEE_TRUE@	echo -n		      "dmap_connection_get;" >>pedansee.conf
+@HAVE_PEDANSEE_TRUE@	for i in $$(grep -l G_DEFINE_INTERFACE *.c); do \
+@HAVE_PEDANSEE_TRUE@		j=$$(cat $$i | awk '/^G_DEFINE_INTERFACE/ { x = 1 } { if (x == 1) printf("%s ", $$0) }' | sed 's/[^,]*, \([^,]*\),.*/\1/g'); \
+@HAVE_PEDANSEE_TRUE@		echo -n $${j}_default_init\;; \
+@HAVE_PEDANSEE_TRUE@		echo -n $${j}_get_type\;; \
+@HAVE_PEDANSEE_TRUE@	done >>pedansee.conf
+@HAVE_PEDANSEE_TRUE@	for i in $$(grep -l G_DEFINE_TYPE *.c); do \
+@HAVE_PEDANSEE_TRUE@		j=$$(cat $$i | awk '/^G_DEFINE_TYPE/ { x = 1 } { if (x == 1) printf("%s ", $$0) }' | sed 's/[^,]*, \([^,]*\),.*/\1/g'); \
+@HAVE_PEDANSEE_TRUE@		echo -n $${j}_class_init\;; \
+@HAVE_PEDANSEE_TRUE@		echo -n $${j}_class_intern_init\;; \
+@HAVE_PEDANSEE_TRUE@		echo -n $${j}_get_instance_private\;; \
+@HAVE_PEDANSEE_TRUE@		echo -n $${j}_get_type\;; \
+@HAVE_PEDANSEE_TRUE@		echo -n $${j}_get_type_once\;; \
+@HAVE_PEDANSEE_TRUE@		echo -n $${j}_init\;; \
+@HAVE_PEDANSEE_TRUE@		echo -n $${j}_parent_class\;; \
+@HAVE_PEDANSEE_TRUE@	done >>pedansee.conf
+@HAVE_PEDANSEE_TRUE@	for i in $$(grep -l G_DEFINE_TYPE *.c); do \
+@HAVE_PEDANSEE_TRUE@		j=$$(cat $$i | awk '/^G_DEFINE_TYPE/ { x = 1 } { if (x == 1) printf("%s ", $$0) }' | sed 's/[^(]*(\([^,]*\),.*/\1/g'); \
+@HAVE_PEDANSEE_TRUE@		echo -n $${j}_private_offset\;; \
+@HAVE_PEDANSEE_TRUE@	done >>pedansee.conf
+@HAVE_PEDANSEE_TRUE@	for i in $$(grep -l G_DEFINE_DYNAMIC_TYPE *.c); do \
+@HAVE_PEDANSEE_TRUE@		j=$$(cat $$i | awk '/^G_DEFINE_DYNAMIC_TYPE/ { x = 1 } { if (x == 1) printf("%s ", $$0) }' | sed 's/[^,]*, \([^,]*\),.*/\1/g'); \
+@HAVE_PEDANSEE_TRUE@		echo -n $${j}_class_init\;; \
+@HAVE_PEDANSEE_TRUE@		echo -n $${j}_class_finalize\;; \
+@HAVE_PEDANSEE_TRUE@		echo -n $${j}_init\;; \
+@HAVE_PEDANSEE_TRUE@		echo -n $${j}_parent_class\;; \
+@HAVE_PEDANSEE_TRUE@		echo -n $${j}_type_id\;; \
+@HAVE_PEDANSEE_TRUE@		echo -n $${j}_register_type\;; \
+@HAVE_PEDANSEE_TRUE@		echo -n $${j}_class_intern_init\;; \
+@HAVE_PEDANSEE_TRUE@		echo -n $${j}_get_instance_private\;; \
+@HAVE_PEDANSEE_TRUE@		echo -n $${j}_register_type\;; \
+@HAVE_PEDANSEE_TRUE@	done >>pedansee.conf
+@HAVE_PEDANSEE_TRUE@	for i in $$(grep -l G_DEFINE_DYNAMIC_TYPE *.c); do \
+@HAVE_PEDANSEE_TRUE@		j=$$(cat $$i | awk '/^G_DEFINE_DYNAMIC_TYPE/ { x = 1 } { if (x == 1) printf("%s ", $$0) }' | sed 's/[^(]*(\([^,]*\),.*/\1/g'); \
+@HAVE_PEDANSEE_TRUE@		echo -n $${j}_private_offset\;; \
+@HAVE_PEDANSEE_TRUE@	done >>pedansee.conf
+@HAVE_PEDANSEE_TRUE@	for i in $$(grep -l G_DEFINE_DYNAMIC_TYPE_EXTENDED *.c); do \
+@HAVE_PEDANSEE_TRUE@		j=$$(cat $$i | awk '/^G_DEFINE_DYNAMIC_TYPE_EXTENDED/ { x = 1 } { if (x == 1) printf("%s ", $$0) }' | sed 's/[^,]*, \([^,]*\),.*/\1/g'); \
+@HAVE_PEDANSEE_TRUE@		echo -n $${j}_class_finalize\;; \
+@HAVE_PEDANSEE_TRUE@		echo -n $${j}_register_type\;; \
+@HAVE_PEDANSEE_TRUE@		echo -n $${j}_init\;; \
+@HAVE_PEDANSEE_TRUE@		echo -n $${j}_parent_class\;; \
+@HAVE_PEDANSEE_TRUE@		echo -n $${j}_type_id\;; \
+@HAVE_PEDANSEE_TRUE@		echo -n $${j}_intern_init\;; \
+@HAVE_PEDANSEE_TRUE@		echo -n $${j}_get_instance_private\;; \
+@HAVE_PEDANSEE_TRUE@		echo -n $${j}_register_type\;; \
+@HAVE_PEDANSEE_TRUE@		echo -n $${j}_class_intern_init\;; \
+@HAVE_PEDANSEE_TRUE@	done >>pedansee.conf
+@HAVE_PEDANSEE_TRUE@	for i in $$(grep -l G_DEFINE_DYNAMIC_TYPE_EXTENDED *.c); do \
+@HAVE_PEDANSEE_TRUE@		j=$$(cat $$i | awk '/^G_DEFINE_DYNAMIC_TYPE_EXTENDED/ { x = 1 } { if (x == 1) printf("%s ", $$0) }' | sed 's/[^(]*(\([^,]*\),.*/\1/g'); \
+@HAVE_PEDANSEE_TRUE@		echo -n $${j}_private_offset\;; \
+@HAVE_PEDANSEE_TRUE@	done >>pedansee.conf
+@HAVE_PEDANSEE_TRUE@	for i in $$(grep -l G_DEFINE_ABSTRACT_TYPE *.c); do \
+@HAVE_PEDANSEE_TRUE@		j=$$(cat $$i | awk '/^G_DEFINE_ABSTRACT_TYPE/ { x = 1 } { if (x == 1) printf("%s ", $$0) }' | sed 's/[^,]*, \([^,]*\),.*/\1/g'); \
+@HAVE_PEDANSEE_TRUE@		echo -n $${j}_init\;; \
+@HAVE_PEDANSEE_TRUE@		echo -n $${j}_class_init\;; \
+@HAVE_PEDANSEE_TRUE@		echo -n $${j}_get_type_once\;; \
+@HAVE_PEDANSEE_TRUE@		echo -n $${j}_parent_class\;; \
+@HAVE_PEDANSEE_TRUE@		echo -n $${j}_get_instance_private\;; \
+@HAVE_PEDANSEE_TRUE@		echo -n $${j}_class_intern_init\;; \
+@HAVE_PEDANSEE_TRUE@	done >>pedansee.conf
+@HAVE_PEDANSEE_TRUE@	for i in $$(grep -l G_DEFINE_ABSTRACT_TYPE *.c); do \
+@HAVE_PEDANSEE_TRUE@		j=$$(cat $$i | awk '/^G_DEFINE_ABSTRACT_TYPE/ { x = 1 } { if (x == 1) printf("%s ", $$0) }' | sed 's/[^(]*(\([^,]*\),.*/\1/g'); \
+@HAVE_PEDANSEE_TRUE@		echo -n $${j}_private_offset\;; \
+@HAVE_PEDANSEE_TRUE@	done >>pedansee.conf
+
+@HAVE_PEDANSEE_TRUE@	set -e; for i in $(libdmapsharing_4_0_la_SOURCES); do \
+@HAVE_PEDANSEE_TRUE@		if [ $$i = dmap-enums.c ]; then # Skip this generated code. \
+@HAVE_PEDANSEE_TRUE@			continue; \
+@HAVE_PEDANSEE_TRUE@		fi; \
+@HAVE_PEDANSEE_TRUE@		$(PEDANSEE) -c pedansee.conf $$i -- -x c $(DEFS) $(libdmapsharing_4_0_la_CFLAGS); \
 @HAVE_PEDANSEE_TRUE@	done
-@HAVE_PEDANSEE_TRUE@	set -e; for i in $(libdmapsharinginclude_HEADERS) \
+
+@HAVE_PEDANSEE_TRUE@	set -e; for i in $(maintained_headers) \
 @HAVE_PEDANSEE_TRUE@	                 $(noinst_HEADERS); do \
-@HAVE_PEDANSEE_TRUE@		$(PEDANSEE) -c pedansee.conf $$i -- -x c $(DEFS) $(libdmapsharing_3_0_la_CFLAGS); \
+@HAVE_PEDANSEE_TRUE@		if [ $$i = dmap-share-private.h ]; then # Skip this code. \
+@HAVE_PEDANSEE_TRUE@			continue; \
+@HAVE_PEDANSEE_TRUE@		fi; \
+@HAVE_PEDANSEE_TRUE@		if [ $$i = dmap-connection-private.h ]; then # Skip this code. \
+@HAVE_PEDANSEE_TRUE@			continue; \
+@HAVE_PEDANSEE_TRUE@		fi; \
+@HAVE_PEDANSEE_TRUE@		$(PEDANSEE) -c pedansee.conf $$i -- -x c $(DEFS) $(libdmapsharing_4_0_la_CFLAGS); \
 @HAVE_PEDANSEE_TRUE@	done
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/libdmapsharing/daap-connection.h b/libdmapsharing/daap-connection.h
deleted file mode 100644
index 8f0425c..0000000
--- a/libdmapsharing/daap-connection.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#ifndef __DAAP_CONNECTION_H
-#define __DAAP_CONNECTION_H
-
-#include <glib-object.h>
-
-#include <libdmapsharing/dmap-connection.h>
-#include <libdmapsharing/dmap-db.h>
-
-G_BEGIN_DECLS
-/**
- * DAAP_TYPE_CONNECTION:
- *
- * The type for #DAAPConnection.
- */
-#define DAAP_TYPE_CONNECTION		(daap_connection_get_type ())
-/**
- * DAAP_CONNECTION:
- * @o: Object which is subject to casting.
- *
- * Casts a #DAAPConnection or derived pointer into a (DAAPConnection *) pointer.
- * Depending on the current debugging level, this function may invoke
- * certain runtime checks to identify invalid casts.
- */
-#define DAAP_CONNECTION(o)		(G_TYPE_CHECK_INSTANCE_CAST ((o), DAAP_TYPE_CONNECTION, DAAPConnection))
-/**
- * DAAP_CONNECTION_CLASS:
- * @k: a valid #DAAPConnectionClass
- *
- * Casts a derived #DAAPConnectionClass structure into a #DAAPConnectionClass
- * structure.
- */
-#define DAAP_CONNECTION_CLASS(k)	(G_TYPE_CHECK_CLASS_CAST((k), DAAP_TYPE_CONNECTION, DAAPConnectionClass))
-/**
- * IS_DAAP_CONNECTION:
- * @o: Instance to check for being a %DAAP_TYPE_CONNECTION.
- *
- * Checks whether a valid #GTypeInstance pointer is of type %DAAP_TYPE_CONNECTION.
- */
-#define IS_DAAP_CONNECTION(o)	(G_TYPE_CHECK_INSTANCE_TYPE ((o), DAAP_TYPE_CONNECTION))
-/**
- * IS_DAAP_CONNECTION_CLASS:
- * @k: a #DAAPConnectionClass
- *
- * Checks whether @k "is a" valid #DAAPConnectionClass structure of type
- * %DAAP_CONNECTION or derived.
- */
-#define IS_DAAP_CONNECTION_CLASS(k)	(G_TYPE_CHECK_CLASS_TYPE ((k), DAAP_TYPE_CONNECTION))
-/**
- * DAAP_CONNECTION_GET_CLASS:
- * @o: a #DAAPConnection instance.
- *
- * Get the class structure associated to a #DAAPConnection instance.
- *
- * Returns: pointer to object class structure.
- */
-#define DAAP_CONNECTION_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), DAAP_TYPE_CONNECTION, DAAPConnectionClass))
-typedef struct DAAPConnectionPrivate DAAPConnectionPrivate;
-
-typedef struct
-{
-	DMAPConnectionClass dmap_connection_class;
-} DAAPConnectionClass;
-
-typedef struct
-{
-	DMAPConnection dmap_connection_instance;
-	DAAPConnectionPrivate *priv;
-} DAAPConnection;
-
-GType daap_connection_get_type (void);
-
-DAAPConnection *daap_connection_new (const char *name,
-				     const char *host,
-				     guint port,
-				     DMAPDb * db,
-				     DMAPRecordFactory * factory);
-
-G_END_DECLS
-#endif /* __DAAP_CONNECTION_H */
diff --git a/libdmapsharing/daap-record.h b/libdmapsharing/daap-record.h
deleted file mode 100644
index b4a0aac..0000000
--- a/libdmapsharing/daap-record.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- *  Database record interface for DAAP sharing
- *
- *  Copyright (C) 2008 W. Michael Petullo <mike@flyn.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#ifndef __DAAP_RECORD_H
-#define __DAAP_RECORD_H
-
-#include <glib.h>
-#include <gio/gio.h>
-
-#include <libdmapsharing/dmap-record.h>
-#include <libdmapsharing/dmap-db.h>
-
-G_BEGIN_DECLS
-/**
- * DAAP_TYPE_RECORD:
- *
- * The type for #DAAPRecord.
- */
-#define DAAP_TYPE_RECORD	     (daap_record_get_type ())
-/**
- * DAAP_RECORD:
- * @o: Object which is subject to casting.
- *
- * Casts a #DAAPRecord or derived pointer into a (DAAPRecord *) pointer.
- * Depending on the current debugging level, this function may invoke
- * certain runtime checks to identify invalid casts.
- */
-#define DAAP_RECORD(o)		     (G_TYPE_CHECK_INSTANCE_CAST ((o), \
-				      DAAP_TYPE_RECORD, DAAPRecord))
-/**
- * IS_DAAP_RECORD:
- * @o: Instance to check for being a %DAAP_TYPE_RECORD.
- *
- * Checks whether a valid #GTypeInstance pointer is of type %DAAP_TYPE_RECORD.
- */
-#define IS_DAAP_RECORD(o)	     (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
-				      DAAP_TYPE_RECORD))
-/**
- * DAAP_RECORD_GET_INTERFACE:
- * @o: a #DAAPRecord instance.
- *
- * Get the class structure associated to a #DAAPRecord instance.
- *
- * Returns: pointer to object interface structure.
- */
-#define DAAP_RECORD_GET_INTERFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), \
-				      DAAP_TYPE_RECORD, DAAPRecordIface))
-typedef struct _DAAPRecord DAAPRecord;
-typedef struct _DAAPRecordIface DAAPRecordIface;
-
-struct _DAAPRecordIface
-{
-	GTypeInterface parent;
-
-	  gboolean (*itunes_compat) (DAAPRecord * record);
-	GInputStream *(*read) (DAAPRecord * record, GError ** err);
-};
-
-GType daap_record_get_type (void);
-
-/**
- * daap_record_itunes_compat:
- * @record: A DAAPRecord.
- *
- * Returns: TRUE if record is compatible with iTunes, else FALSE.
- */
-gboolean daap_record_itunes_compat (DAAPRecord * record);
-
-/**
- * daap_record_read:
- * @record: a DAAPRecord.
- * @err: a GError.
- *
- * Returns: A GInputStream that provides read-only access to the data stream
- * associated with record.
- */
-GInputStream *daap_record_read (DAAPRecord * record, GError ** err);
-
-/**
- * daap_record_cmp_by_album:
- * @a: first ID.
- * @b: second ID.
- * @db: A DMAPDb for which a and b are valid ID's.
- *
- * Compares the two records associated with the provided keys according
- * to album. Suitable to sort lists of albums.
- */
-gint daap_record_cmp_by_album (gpointer a, gpointer b, DMAPDb * db);
-
-#endif /* __DAAP_RECORD_H */
-
-G_END_DECLS
diff --git a/libdmapsharing/daap-share.c b/libdmapsharing/daap-share.c
deleted file mode 100644
index 8899a9f..0000000
--- a/libdmapsharing/daap-share.c
+++ /dev/null
@@ -1,890 +0,0 @@
-/* Implmentation of DAAP (e.g., iTunes Music) sharing
- *
- * Copyright (C) 2005 Charles Schmidt <cschmidt2@emich.edu>
- *
- * Modifications Copyright (C) 2008 W. Michael Petullo <mike@flyn.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- *
- */
-
-#include "config.h"
-
-#include <time.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include <glib.h>
-
-#include <libsoup/soup.h>
-#include <libsoup/soup-address.h>
-#include <libsoup/soup-message.h>
-#include <libsoup/soup-uri.h>
-#include <libsoup/soup-server.h>
-
-#include <libdmapsharing/dmap.h>
-#include <libdmapsharing/dmap-structure.h>
-#include <libdmapsharing/dmap-private-utils.h>
-#include <libdmapsharing/dmap-utils.h>
-
-#ifdef HAVE_GSTREAMERAPP
-#include <libdmapsharing/dmap-gst-input-stream.h>
-#endif /* HAVE_GSTREAMERAPP */
-
-guint daap_share_get_desired_port (DMAPShare * share);
-const char *daap_share_get_type_of_service (DMAPShare * share);
-void daap_share_server_info (DMAPShare * share,
-			     SoupServer * server,
-			     SoupMessage * message,
-			     const char *path,
-			     GHashTable * query, SoupClientContext * context);
-void daap_share_message_add_standard_headers (DMAPShare * share,
-					      SoupMessage * message);
-static void databases_browse_xxx (DMAPShare * share,
-				  SoupServer * server,
-				  SoupMessage * msg,
-				  const char *path,
-				  GHashTable * query,
-				  SoupClientContext * context);
-static void databases_items_xxx (DMAPShare * share,
-				 SoupServer * server,
-				 SoupMessage * msg,
-				 const char *path,
-				 GHashTable * query,
-				 SoupClientContext * context);
-static struct DMAPMetaDataMap *get_meta_data_map (DMAPShare * share);
-static void add_entry_to_mlcl (gpointer id, DMAPRecord * record, gpointer mb);
-
-#define DAAP_TYPE_OF_SERVICE "_daap._tcp"
-#define DAAP_PORT 3689
-
-G_DEFINE_TYPE (DAAPShare, daap_share, DMAP_TYPE_SHARE);
-
-static void
-daap_share_class_init (DAAPShareClass * klass)
-{
-	GObjectClass *object_class = G_OBJECT_CLASS (klass);
-	DMAPShareClass *parent_class = DMAP_SHARE_CLASS (object_class);
-
-	parent_class->get_desired_port = daap_share_get_desired_port;
-	parent_class->get_type_of_service = daap_share_get_type_of_service;
-	parent_class->message_add_standard_headers =
-		daap_share_message_add_standard_headers;
-	parent_class->get_meta_data_map = get_meta_data_map;
-	parent_class->add_entry_to_mlcl = add_entry_to_mlcl;
-	parent_class->databases_browse_xxx = databases_browse_xxx;
-	parent_class->databases_items_xxx = databases_items_xxx;
-	parent_class->server_info = daap_share_server_info;
-}
-
-static void
-daap_share_init (G_GNUC_UNUSED DAAPShare * share)
-{
-}
-
-DAAPShare *
-daap_share_new (const char *name,
-		const char *password,
-		DMAPDb * db,
-		DMAPContainerDb * container_db, gchar * transcode_mimetype)
-{
-	DAAPShare *share;
-
-	g_object_ref (db);
-	g_object_ref (container_db);
-
-	share = DAAP_SHARE (g_object_new (DAAP_TYPE_SHARE,
-					  "name", name,
-					  "password", password,
-					  "db", db,
-					  "container-db", container_db,
-					  "transcode-mimetype",
-					  transcode_mimetype, NULL));
-
-	_dmap_share_server_start (DMAP_SHARE (share));
-	_dmap_share_publish_start (DMAP_SHARE (share));
-
-	return share;
-}
-
-void
-daap_share_message_add_standard_headers (G_GNUC_UNUSED DMAPShare * share,
-					 SoupMessage * message)
-{
-	soup_message_headers_append (message->response_headers, "DMAP-Server",
-				     "libdmapsharing" VERSION);
-}
-
-#define DMAP_VERSION 2.0
-#define DAAP_VERSION 3.0
-#define DAAP_TIMEOUT 1800
-
-guint
-daap_share_get_desired_port (G_GNUC_UNUSED DMAPShare * share)
-{
-	return DAAP_PORT;
-}
-
-const char *
-daap_share_get_type_of_service (G_GNUC_UNUSED DMAPShare * share)
-{
-	return DAAP_TYPE_OF_SERVICE;
-}
-
-void
-daap_share_server_info (DMAPShare * share,
-			G_GNUC_UNUSED SoupServer * server,
-			SoupMessage * message,
-			const char *path,
-			G_GNUC_UNUSED GHashTable * query,
-                        G_GNUC_UNUSED SoupClientContext * context)
-{
-/* MSRV	server info response
- * 	MSTT status
- * 	MPRO daap version
- * 	APRO daap version
- * 	MINM name
- * 	MSAU authentication method
- * 	MSLR login required
- * 	MSTM timeout interval
- * 	MSAL supports auto logout
- * 	MSUP supports update
- * 	MSPI supports persistent ids
- * 	MSEX supports extensions
- * 	MSBR supports browse
- * 	MSQY supports query
- * 	MSIX supports index
- * 	MSRS supports resolve
- * 	MSDC databases count
- */
-	gchar *nameprop;
-	GNode *msrv;
-
-	g_debug ("Path is %s.", path);
-
-	g_object_get ((gpointer) share, "name", &nameprop, NULL);
-
-	msrv = dmap_structure_add (NULL, DMAP_CC_MSRV);
-	dmap_structure_add (msrv, DMAP_CC_MSTT, (gint32) DMAP_STATUS_OK);
-	dmap_structure_add (msrv, DMAP_CC_MPRO, (gdouble) DAAP_VERSION);
-	dmap_structure_add (msrv, DMAP_CC_APRO, (gdouble) DAAP_VERSION);
-	/* 2/3 is for itunes 4.8 (at least).  its determined by the
-	 * Client-DAAP-Version header sent, but if we decide not to support
-	 * older versions..? anyway
-	 *
-	 * 1.0 is 1/1
-	 * 2.0 is 1/2
-	 * 3.0 is 2/3
-	 */
-	dmap_structure_add (msrv, DMAP_CC_MINM, nameprop);
-	dmap_structure_add (msrv, DMAP_CC_MSAU,
-			    _dmap_share_get_auth_method (share));
-	/* authentication method
-	 * 0 is nothing
-	 * 1 is name & password
-	 * 2 is password only
-	 */
-	dmap_structure_add (msrv, DMAP_CC_MSLR, 0);
-	dmap_structure_add (msrv, DMAP_CC_MSTM, (gint32) DAAP_TIMEOUT);
-	dmap_structure_add (msrv, DMAP_CC_MSAL, (gchar) 0);
-	dmap_structure_add (msrv, DMAP_CC_MSUP, (gchar) 1);
-	dmap_structure_add (msrv, DMAP_CC_MSPI, (gchar) 0);
-	dmap_structure_add (msrv, DMAP_CC_MSEX, (gchar) 0);
-	dmap_structure_add (msrv, DMAP_CC_MSBR, (gchar) 0);
-	dmap_structure_add (msrv, DMAP_CC_MSQY, (gchar) 0);
-	dmap_structure_add (msrv, DMAP_CC_MSIX, (gchar) 0);
-	dmap_structure_add (msrv, DMAP_CC_MSRS, (gchar) 0);
-	dmap_structure_add (msrv, DMAP_CC_MSDC, (gint32) 1);
-
-	_dmap_share_message_set_from_dmap_structure (share, message, msrv);
-	dmap_structure_destroy (msrv);
-
-	g_free (nameprop);
-}
-
-typedef enum
-{
-	ITEM_ID = 0,
-	ITEM_NAME,
-	ITEM_KIND,
-	PERSISTENT_ID,
-	CONTAINER_ITEM_ID,
-	SONG_ALBUM,
-	SONG_GROUPING,
-	SONG_ARTIST,
-	SONG_BITRATE,
-	SONG_BPM,
-	SONG_COMMENT,
-	SONG_COMPILATION,
-	SONG_COMPOSER,
-	SONG_DATA_KIND,
-	SONG_DATA_URL,
-	SONG_DATE_ADDED,
-	SONG_DATE_MODIFIED,
-	SONG_DISC_COUNT,
-	SONG_DISC_NUMBER,
-	SONG_DISABLED,
-	SONG_EQ_PRESET,
-	SONG_FORMAT,
-	SONG_GENRE,
-	SONG_DESCRIPTION,
-	SONG_RELATIVE_VOLUME,
-	SONG_SAMPLE_RATE,
-	SONG_SIZE,
-	SONG_SORT_ALBUM,
-	SONG_SORT_ARTIST,
-	SONG_START_TIME,
-	SONG_STOP_TIME,
-	SONG_TIME,
-	SONG_TRACK_COUNT,
-	SONG_TRACK_NUMBER,
-	SONG_USER_RATING,
-	SONG_YEAR,
-	SONG_HAS_VIDEO,
-	SONG_SMART_PLAYLIST,
-	SONG_IS_PODCAST_PLAYLIST,
-	SONG_SPECIAL_PLAYLIST,
-	SONG_SAVED_GENIUS,
-	SONG_MEDIAKIND,
-	HAS_CHILD_CONTAINERS,
-	PARENT_CONTAINER_ID
-} DAAPMetaData;
-
-static struct DMAPMetaDataMap meta_data_map[] = {
-	{"dmap.itemid", ITEM_ID},
-	{"dmap.itemname", ITEM_NAME},
-	{"dmap.itemkind", ITEM_KIND},
-	{"dmap.persistentid", PERSISTENT_ID},
-	{"dmap.containeritemid", CONTAINER_ITEM_ID},
-	{"daap.songalbum", SONG_ALBUM},
-	{"daap.songartist", SONG_ARTIST},
-	{"daap.songbitrate", SONG_BITRATE},
-	{"daap.songbeatsperminute", SONG_BPM},
-	{"daap.songcomment", SONG_COMMENT},
-	{"daap.songcompilation", SONG_COMPILATION},
-	{"daap.songcomposer", SONG_COMPOSER},
-	{"daap.songdatakind", SONG_DATA_KIND},
-	{"daap.songdataurl", SONG_DATA_URL},
-	{"daap.songdateadded", SONG_DATE_ADDED},
-	{"daap.songdatemodified", SONG_DATE_MODIFIED},
-	{"daap.songdescription", SONG_DESCRIPTION},
-	{"daap.songdisabled", SONG_DISABLED},
-	{"daap.songdisccount", SONG_DISC_COUNT},
-	{"daap.songdiscnumber", SONG_DISC_NUMBER},
-	{"daap.songeqpreset", SONG_EQ_PRESET},
-	{"daap.songformat", SONG_FORMAT},
-	{"daap.songgenre", SONG_GENRE},
-	{"daap.songgrouping", SONG_GROUPING},
-	{"daap.songrelativevolume", SONG_RELATIVE_VOLUME},
-	{"daap.songsamplerate", SONG_SAMPLE_RATE},
-	{"daap.songsize", SONG_SIZE},
-	{"daap.songstarttime", SONG_START_TIME},
-	{"daap.songstoptime", SONG_STOP_TIME},
-	{"daap.songtime", SONG_TIME},
-	{"daap.songtrackcount", SONG_TRACK_COUNT},
-	{"daap.songtracknumber", SONG_TRACK_NUMBER},
-	{"daap.songuserrating", SONG_USER_RATING},
-	{"daap.songyear", SONG_YEAR},
-	{"daap.sortalbum", SONG_SORT_ALBUM},
-	{"daap.sortartist", SONG_SORT_ARTIST},
-	{"com.apple.itunes.has-video", SONG_HAS_VIDEO},
-	{"com.apple.itunes.smart-playlist", SONG_SMART_PLAYLIST},
-	{"com.apple.itunes.is-podcast-playlist", SONG_IS_PODCAST_PLAYLIST},
-	{"com.apple.itunes.special-playlist", SONG_SPECIAL_PLAYLIST},
-	{"com.apple.itunes.saved-genius", SONG_SAVED_GENIUS},
-	{"com.apple.itunes.mediakind", SONG_MEDIAKIND},
-	{"dmap.haschildcontainers", HAS_CHILD_CONTAINERS},
-	{"dmap.parentcontainerid", PARENT_CONTAINER_ID},
-	{NULL, 0}
-};
-
-#define DAAP_ITEM_KIND_AUDIO 2
-#define DAAP_SONG_DATA_KIND_NONE 0
-
-static gboolean should_transcode (const gchar *format, const gboolean has_video, const gchar *transcode_mimetype)
-{
-	gboolean fnval = FALSE;
-	char *format2 = NULL;
-
-	// Not presently transcoding videos (see also same comments elsewhere).
-	if (TRUE == has_video) {
-		goto done;
-	}
-
-	if (NULL == transcode_mimetype) {
-		goto done;
-	}
-
-	format2 = dmap_utils_mime_to_format (transcode_mimetype);
-	if (NULL == format2) {
-		g_warning ("Configured to transcode, but target format is bad");
-		goto done;
-	}
-
-	if (strcmp (format, format2)) {
-		fnval = TRUE;
-	}
-
-done:
-	g_debug ("    Should%s transcode %s to %s", fnval ? "" : " not", format, format2 ? format2 : "[no target format]");
-
-	return fnval;
-}
-
-static void
-send_chunked_file (SoupServer * server, SoupMessage * message,
-		   DAAPRecord * record, guint64 filesize, guint64 offset,
-		   const gchar * transcode_mimetype)
-{
-	gchar *format = NULL;
-	gchar *location = NULL;
-	GInputStream *stream = NULL;
-	gboolean has_video;
-	GError *error = NULL;
-	ChunkData *cd = NULL;
-
-	cd = g_new0 (ChunkData, 1);
-
-	g_object_get (record, "location", &location, "has-video", &has_video, NULL);
-	if (NULL == location) {
-		g_warning ("Error getting location from record\n");
-		goto _error;
-	}
-
-	/* FIXME: This crashes on powerpc-440fp-linux-gnu:
-	 * g_debug ("Sending %s chunked from offset %" G_GUINT64_FORMAT ".", location, offset);
-	 */
-
-	cd->server = server;
-
-	stream = G_INPUT_STREAM (daap_record_read (record, &error));
-	if (error != NULL) {
-		g_warning ("Couldn't open %s: %s.", location, error->message);
-		goto _error;
-	}
-
-	g_object_get (record, "format", &format, NULL);
-	if (NULL == format) {
-		g_warning ("Error getting format from record\n");
-		goto _error;
-	}
-
-	// Not presently transcoding videos (see also same comments elsewhere).
-	if (should_transcode (format, has_video, transcode_mimetype)) {
-#ifdef HAVE_GSTREAMERAPP
-		cd->stream = dmap_gst_input_stream_new (transcode_mimetype, stream);
-#else
-		g_warning ("Transcode format %s not supported", transcode_mimetype);
-		cd->stream = stream;
-#endif /* HAVE_GSTREAMERAPP */
-	} else {
-		g_debug ("Not transcoding %s", location);
-		cd->stream = stream;
-	}
-
-	if (cd->stream == NULL) {
-		g_warning ("Could not set up input stream");
-		goto _error;
-	}
-
-	if (offset != 0) {
-		if (g_seekable_seek (G_SEEKABLE (cd->stream), offset, G_SEEK_SET, NULL, &error) == FALSE) {
-			g_warning ("Error seeking: %s.", error->message);
-			goto _error;
-		}
-		filesize -= offset;
-	}
-
-	/* Free memory after each chunk sent out over network. */
-	soup_message_body_set_accumulate (message->response_body, FALSE);
-
-	if (! should_transcode (format, has_video, transcode_mimetype)) {
-	        /* NOTE: iTunes seems to require this or it stops reading 
-	         * video data after about 2.5MB. Perhaps this is so iTunes
-	         * knows how much data to buffer.
-	         */
-		g_debug ("Using HTTP 1.1 content length encoding.");
-		soup_message_headers_set_encoding (message->response_headers, SOUP_ENCODING_CONTENT_LENGTH);
-
-	        /* NOTE: iTunes 8 (and other versions?) will not seek
-	         * properly without a Content-Length header.
-	         */
-		g_debug ("Content length is %" G_GUINT64_FORMAT ".", filesize);
-		soup_message_headers_set_content_length (message->response_headers, filesize);
-	} else if (soup_message_get_http_version (message) == SOUP_HTTP_1_0) {
-		/* NOTE: Roku clients support only HTTP 1.0. */
-		g_debug ("Using HTTP 1.0 encoding.");
-		soup_message_headers_set_encoding (message->response_headers, SOUP_ENCODING_EOF);
-	} else {
-		/* NOTE: Can not provide Content-Length when performing
-		 * real-time transcoding.
-		 */
-		g_debug ("Using HTTP 1.1 chunked encoding.");
-		soup_message_headers_set_encoding (message->response_headers, SOUP_ENCODING_CHUNKED);
-	}
-
-	soup_message_headers_append (message->response_headers, "Connection",
-				     "Close");
-	soup_message_headers_append (message->response_headers,
-				     "Content-Type",
-				     "application/x-dmap-tagged");
-
-	g_signal_connect (message, "wrote_headers",
-			  G_CALLBACK (dmap_write_next_chunk), cd);
-	g_signal_connect (message, "wrote_chunk",
-			  G_CALLBACK (dmap_write_next_chunk), cd);
-	g_signal_connect (message, "finished",
-			  G_CALLBACK (dmap_chunked_message_finished), cd);
-	/* NOTE: cd g_free'd by chunked_message_finished(). */
-
-	return;
-_error:
-	soup_message_set_status (message, SOUP_STATUS_INTERNAL_SERVER_ERROR);
-
-	if (NULL != cd) {
-		if (NULL != cd->stream) {
-			g_input_stream_close (cd->stream, NULL, NULL);
-		}
-
-		g_free (cd);
-	}
-
-	if (NULL != format) {
-		g_free (format);
-	}
-
-	if (NULL != location) {
-		g_free (location);
-	}
-
-	if (NULL != error) {
-		g_error_free (error);
-	}
-
-	if (NULL != stream) {
-		g_input_stream_close (stream, NULL, NULL);
-	}
-
-	return;
-}
-
-static void
-add_entry_to_mlcl (gpointer id, DMAPRecord * record, gpointer _mb)
-{
-	GNode *mlit;
-	gboolean has_video = 0;
-	struct MLCL_Bits *mb = (struct MLCL_Bits *) _mb;
-
-	mlit = dmap_structure_add (mb->mlcl, DMAP_CC_MLIT);
-	g_object_get (record, "has-video", &has_video, NULL);
-
-	if (_dmap_share_client_requested (mb->bits, ITEM_KIND))
-		dmap_structure_add (mlit, DMAP_CC_MIKD,
-				    (gchar) DAAP_ITEM_KIND_AUDIO);
-	if (_dmap_share_client_requested (mb->bits, ITEM_ID))
-		dmap_structure_add (mlit, DMAP_CC_MIID,
-				    GPOINTER_TO_UINT (id));
-	if (_dmap_share_client_requested (mb->bits, ITEM_NAME)) {
-		gchar *title = NULL;
-
-		g_object_get (record, "title", &title, NULL);
-		if (title) {
-			dmap_structure_add (mlit, DMAP_CC_MINM, title);
-			g_free (title);
-		} else
-			g_debug ("Title requested but not available");
-	}
-	if (_dmap_share_client_requested (mb->bits, PERSISTENT_ID))
-		dmap_structure_add (mlit, DMAP_CC_MPER,
-				    GPOINTER_TO_UINT (id));
-	if (_dmap_share_client_requested (mb->bits, CONTAINER_ITEM_ID))
-		dmap_structure_add (mlit, DMAP_CC_MCTI,
-				    GPOINTER_TO_UINT (id));
-	if (_dmap_share_client_requested (mb->bits, SONG_DATA_KIND))
-		dmap_structure_add (mlit, DMAP_CC_ASDK,
-				    (gchar) DAAP_SONG_DATA_KIND_NONE);
-	/* FIXME: Any use for this?
-	 * if (_dmap_share_client_requested (mb->bits, SONG_DATA_URL))
-	 * dmap_structure_add (mlit, DMAP_CC_ASUL, "daap://192.168.0.100:%u/databases/1/items/%d.%s?session-id=%s", data->port, *id, daap_record_get_format (DAAP_RECORD (record)), data->session_id);
-	 */
-	if (_dmap_share_client_requested (mb->bits, SONG_ALBUM)) {
-		gchar *album = NULL;
-
-		g_object_get (record, "songalbum", &album, NULL);
-		if (album) {
-			dmap_structure_add (mlit, DMAP_CC_ASAL, album);
-			g_free (album);
-		} else
-			g_debug ("Album requested but not available");
-	}
-	if (_dmap_share_client_requested (mb->bits, SONG_GROUPING))
-		dmap_structure_add (mlit, DMAP_CC_AGRP, "");
-	if (_dmap_share_client_requested (mb->bits, SONG_ARTIST)) {
-		gchar *artist = NULL;
-
-		g_object_get (record, "songartist", &artist, NULL);
-		if (artist) {
-			dmap_structure_add (mlit, DMAP_CC_ASAR, artist);
-			g_free (artist);
-		} else
-			g_debug ("Artist requested but not available");
-	}
-	if (_dmap_share_client_requested (mb->bits, SONG_BITRATE)) {
-		gint32 bitrate = 0;
-
-		g_object_get (record, "bitrate", &bitrate, NULL);
-		if (bitrate != 0)
-			dmap_structure_add (mlit, DMAP_CC_ASBR,
-					    (gint32) bitrate);
-	}
-	if (_dmap_share_client_requested (mb->bits, SONG_BPM))
-		dmap_structure_add (mlit, DMAP_CC_ASBT, (gint32) 0);
-	if (_dmap_share_client_requested (mb->bits, SONG_COMMENT))
-		dmap_structure_add (mlit, DMAP_CC_ASCM, "");
-	if (_dmap_share_client_requested (mb->bits, SONG_COMPILATION))
-		dmap_structure_add (mlit, DMAP_CC_ASCO, (gchar) FALSE);
-	if (_dmap_share_client_requested (mb->bits, SONG_COMPOSER))
-		dmap_structure_add (mlit, DMAP_CC_ASCP, "");
-	if (_dmap_share_client_requested (mb->bits, SONG_DATE_ADDED)) {
-		gint32 firstseen = 0;
-
-		g_object_get (record, "firstseen", &firstseen, NULL);
-		dmap_structure_add (mlit, DMAP_CC_ASDA, firstseen);
-	}
-	if (_dmap_share_client_requested (mb->bits, SONG_DATE_MODIFIED)) {
-		gint32 mtime = 0;
-
-		g_object_get (record, "mtime", &mtime, NULL);
-		dmap_structure_add (mlit, DMAP_CC_ASDM, mtime);
-	}
-	if (_dmap_share_client_requested (mb->bits, SONG_DISC_COUNT))
-		dmap_structure_add (mlit, DMAP_CC_ASDC, (gint32) 0);
-	if (_dmap_share_client_requested (mb->bits, SONG_DISC_NUMBER)) {
-		gint32 disc = 0;
-
-		g_object_get (record, "disc", &disc, NULL);
-		dmap_structure_add (mlit, DMAP_CC_ASDN, disc);
-	}
-	if (_dmap_share_client_requested (mb->bits, SONG_DISABLED))
-		dmap_structure_add (mlit, DMAP_CC_ASDB, (gchar) FALSE);
-	if (_dmap_share_client_requested (mb->bits, SONG_EQ_PRESET))
-		dmap_structure_add (mlit, DMAP_CC_ASEQ, "");
-	if (_dmap_share_client_requested (mb->bits, SONG_FORMAT)) {
-		gchar *format = NULL;
-		gchar *transcode_mimetype = NULL;
-
-		g_object_get (mb->share, "transcode-mimetype",
-			      &transcode_mimetype, NULL);
-		// Not presently transcoding videos (see also same comments elsewhere).
-		if (! has_video && transcode_mimetype) {
-			format = g_strdup (dmap_utils_mime_to_format
-					   (transcode_mimetype));
-			g_free (transcode_mimetype);
-		} else {
-			g_object_get (record, "format", &format, NULL);
-		}
-		if (format) {
-			dmap_structure_add (mlit, DMAP_CC_ASFM, format);
-			g_free (format);
-		} else
-			g_debug ("Format requested but not available");
-	}
-	if (_dmap_share_client_requested (mb->bits, SONG_GENRE)) {
-		gchar *genre = NULL;
-
-		g_object_get (record, "songgenre", &genre, NULL);
-		if (genre) {
-			dmap_structure_add (mlit, DMAP_CC_ASGN, genre);
-			g_free (genre);
-		} else
-			g_debug ("Genre requested but not available");
-	}
-	if (_dmap_share_client_requested (mb->bits, SONG_DESCRIPTION))
-		dmap_structure_add (mlit, DMAP_CC_ASDT, "");	/* FIXME: e.g., wav audio file */
-	if (_dmap_share_client_requested (mb->bits, SONG_RELATIVE_VOLUME))
-		dmap_structure_add (mlit, DMAP_CC_ASRV, 0);
-	if (_dmap_share_client_requested (mb->bits, SONG_SAMPLE_RATE))
-		dmap_structure_add (mlit, DMAP_CC_ASSR, 0);
-	if (_dmap_share_client_requested (mb->bits, SONG_SIZE)) {
-		guint64 filesize = 0;
-
-		g_object_get (record, "filesize", &filesize, NULL);
-		dmap_structure_add (mlit, DMAP_CC_ASSZ, (gint32) filesize);
-	}
-	if (_dmap_share_client_requested (mb->bits, SONG_START_TIME))
-		dmap_structure_add (mlit, DMAP_CC_ASST, 0);
-	if (_dmap_share_client_requested (mb->bits, SONG_STOP_TIME))
-		dmap_structure_add (mlit, DMAP_CC_ASSP, 0);
-	if (_dmap_share_client_requested (mb->bits, SONG_TIME)) {
-		gint32 duration;
-
-		g_object_get (record, "duration", &duration, NULL);
-		dmap_structure_add (mlit, DMAP_CC_ASTM, (1000 * duration));
-	}
-	if (_dmap_share_client_requested (mb->bits, SONG_TRACK_COUNT))
-		dmap_structure_add (mlit, DMAP_CC_ASTC, 0);
-	if (_dmap_share_client_requested (mb->bits, SONG_TRACK_NUMBER)) {
-		gint32 track = 0;
-
-		g_object_get (record, "track", &track, NULL);
-		dmap_structure_add (mlit, DMAP_CC_ASTN, track);
-	}
-	if (_dmap_share_client_requested (mb->bits, SONG_USER_RATING)) {
-		gint32 rating = 0;
-
-		g_object_get (record, "rating", &rating, NULL);
-		dmap_structure_add (mlit, DMAP_CC_ASUR, rating);
-	}
-	if (_dmap_share_client_requested (mb->bits, SONG_YEAR)) {
-		gint32 year = 0;
-
-		g_object_get (record, "year", &year, NULL);
-		dmap_structure_add (mlit, DMAP_CC_ASYR, year);
-	}
-	if (_dmap_share_client_requested (mb->bits, SONG_HAS_VIDEO)) {
-		dmap_structure_add (mlit, DMAP_CC_AEHV, has_video);
-	}
-	if (_dmap_share_client_requested (mb->bits, SONG_SORT_ARTIST)) {
-		gchar *sort_artist = NULL;
-
-		g_object_get (record, "sort-artist", &sort_artist, NULL);
-		if (sort_artist) {
-			dmap_structure_add (mlit, DMAP_CC_ASSA, sort_artist);
-			g_free (sort_artist);
-		} else {
-			g_debug ("Sort artist requested but not available");
-		}
-	}
-	if (_dmap_share_client_requested (mb->bits, SONG_SORT_ALBUM)) {
-		gchar *sort_album = NULL;
-
-		g_object_get (record, "sort-album", &sort_album, NULL);
-		if (sort_album) {
-			dmap_structure_add (mlit, DMAP_CC_ASSU, sort_album);
-			g_free (sort_album);
-		} else {
-			g_debug ("Sort album requested but not available");
-		}
-	}
-	if (_dmap_share_client_requested (mb->bits, SONG_MEDIAKIND)) {
-		gint mediakind = 0;
-
-		g_object_get (record, "mediakind", &mediakind, NULL);
-		dmap_structure_add (mlit, DMAP_CC_AEMK, mediakind);
-	}
-}
-
-static void
-genre_tabulator (G_GNUC_UNUSED gpointer id, DMAPRecord * record, GHashTable * ht)
-{
-	const gchar *genre;
-
-	g_object_get (record, "songgenre", &genre, NULL);
-	if (!genre)
-		return;
-	if (!g_hash_table_lookup (ht, genre))
-		g_hash_table_insert (ht, (gchar *) genre, NULL);
-}
-
-static void
-artist_tabulator (G_GNUC_UNUSED gpointer id, DMAPRecord * record, GHashTable * ht)
-{
-	const gchar *artist;
-
-	g_object_get (record, "songartist", &artist, NULL);
-	if (!artist)
-		return;
-	if (!g_hash_table_lookup (ht, artist))
-		g_hash_table_insert (ht, (gchar *) artist, NULL);
-}
-
-static void
-album_tabulator (G_GNUC_UNUSED gpointer id, DMAPRecord * record, GHashTable * ht)
-{
-	const gchar *album;
-
-	g_object_get (record, "songalbum", &album, NULL);
-	if (!album)
-		return;
-	if (!g_hash_table_lookup (ht, album))
-		g_hash_table_insert (ht, (gchar *) album, NULL);
-}
-
-static void
-add_to_category_listing (gpointer key, gpointer user_data)
-{
-	GNode *mlit;
-	GNode *node = (GNode *) user_data;
-
-	mlit = dmap_structure_add (node, DMAP_CC_MLIT);
-	dmap_structure_add (mlit, DMAP_RAW, (char *) key);
-}
-
-static void
-databases_browse_xxx (DMAPShare * share,
-		      G_GNUC_UNUSED SoupServer * server,
-		      SoupMessage * msg,
-		      const char *path,
-		      GHashTable * query,
-                      G_GNUC_UNUSED SoupClientContext * context)
-{
-	/* ABRO database browse
-	 *      MSTT status
-	 *      MUTY update type
-	 *      MTCO specified total count
-	 *      MRCO returned count
-	 *      ABGN genre listing
-	 *              MLIT listing item
-	 *              ...
-	 */
-	DMAPDb *db;
-	const gchar *rest_of_path;
-	GNode *abro, *node;
-	gchar *filter;
-	GSList *filter_def;
-	GHashTable *filtered;
-	guint num_genre;
-	const gchar *browse_category;
-	GHashTable *category_items;
-	DMAPContentCode category_cc;
-	GList *values;
-
-	rest_of_path = strchr (path + 1, '/');
-	browse_category = rest_of_path + 10;
-	category_items = g_hash_table_new (g_str_hash, g_str_equal);
-
-	filter = g_hash_table_lookup (query, "filter");
-	filter_def = _dmap_share_build_filter (filter);
-	g_object_get (share, "db", &db, NULL);
-	filtered = dmap_db_apply_filter (db, filter_def);
-
-	if (g_ascii_strcasecmp (browse_category, "genres") == 0) {
-		g_hash_table_foreach (filtered, (GHFunc) genre_tabulator,
-				      category_items);
-		category_cc = DMAP_CC_ABGN;
-	} else if (g_ascii_strcasecmp (browse_category, "artists") == 0) {
-		g_hash_table_foreach (filtered, (GHFunc) artist_tabulator,
-				      category_items);
-		category_cc = DMAP_CC_ABAR;
-	} else if (g_ascii_strcasecmp (browse_category, "albums") == 0) {
-		g_hash_table_foreach (filtered, (GHFunc) album_tabulator,
-				      category_items);
-		category_cc = DMAP_CC_ABAL;
-	} else {
-		g_warning ("Unsupported browse category: %s",
-			   browse_category);
-		goto _bad_category;
-	}
-
-	abro = dmap_structure_add (NULL, DMAP_CC_ABRO);
-	dmap_structure_add (abro, DMAP_CC_MSTT, (gint32) DMAP_STATUS_OK);
-	dmap_structure_add (abro, DMAP_CC_MUTY, 0);
-
-	num_genre = g_hash_table_size (category_items);
-	dmap_structure_add (abro, DMAP_CC_MTCO, (gint32) num_genre);
-	dmap_structure_add (abro, DMAP_CC_MRCO, (gint32) num_genre);
-
-	node = dmap_structure_add (abro, category_cc);
-
-	values = g_hash_table_get_keys (category_items);
-	if (values && g_hash_table_lookup (query, "include-sort-headers")) {
-		g_debug ("Sorting...");
-		values = g_list_sort (values,
-				      (GCompareFunc) g_ascii_strcasecmp);
-	}
-
-	g_list_foreach (values, add_to_category_listing, node);
-
-	g_list_free (values);
-
-	_dmap_share_message_set_from_dmap_structure (share, msg, abro);
-	dmap_structure_destroy (abro);
-      _bad_category:
-	dmap_share_free_filter (filter_def);
-	/* Free's hash table but not data (points into real DB): */
-	g_hash_table_destroy (filtered);
-	g_hash_table_destroy (category_items);
-}
-
-static void
-databases_items_xxx (DMAPShare * share,
-		     SoupServer * server,
-		     SoupMessage * msg,
-		     const char *path,
-		     G_GNUC_UNUSED GHashTable * query,
-                     G_GNUC_UNUSED SoupClientContext * context)
-{
-	DMAPDb *db;
-	const gchar *transcode_mimetype;
-	const gchar *rest_of_path;
-	const gchar *id_str;
-	guint id;
-	const gchar *range_header;
-	guint64 filesize;
-	guint64 offset = 0;
-	DAAPRecord *record;
-
-	rest_of_path = strchr (path + 1, '/');
-	id_str = rest_of_path + 9;
-	id = strtoul (id_str, NULL, 10);
-
-	g_object_get (share, "db", &db, NULL);
-	record = DAAP_RECORD (dmap_db_lookup_by_id (db, id));
-	g_object_get (record, "filesize", &filesize, NULL);
-
-	DMAP_SHARE_GET_CLASS (share)->message_add_standard_headers
-		(share, msg);
-	soup_message_headers_append (msg->response_headers, "Accept-Ranges",
-				     "bytes");
-
-	range_header =
-		soup_message_headers_get_one (msg->request_headers, "Range");
-	if (range_header) {
-		const gchar *s;
-		gchar *content_range;
-
-		if (!g_str_has_prefix (range_header, "bytes=")) {
-			/* Not starting with "bytes=" ? */
-			offset = 0;
-		} else {
-			s = range_header + strlen ("bytes=");	/* bytes= */
-			offset = atoll (s);
-		}
-
-		content_range =
-			g_strdup_printf ("bytes %" G_GUINT64_FORMAT "-%"
-					 G_GUINT64_FORMAT "/%"
-					 G_GUINT64_FORMAT, offset, filesize,
-					 filesize);
-		soup_message_headers_append (msg->response_headers,
-					     "Content-Range", content_range);
-		g_debug ("Content range is %s.", content_range);
-		g_free (content_range);
-		soup_message_set_status (msg, SOUP_STATUS_PARTIAL_CONTENT);
-	} else {
-		soup_message_set_status (msg, SOUP_STATUS_OK);
-	}
-	g_object_get (share, "transcode-mimetype", &transcode_mimetype, NULL);
-	send_chunked_file (server, msg, record, filesize, offset,
-			   transcode_mimetype);
-
-	g_object_unref (record);
-}
-
-static struct DMAPMetaDataMap *
-get_meta_data_map (G_GNUC_UNUSED DMAPShare * share)
-{
-	return meta_data_map;
-}
diff --git a/libdmapsharing/daap-share.h b/libdmapsharing/daap-share.h
deleted file mode 100644
index 50d0d2d..0000000
--- a/libdmapsharing/daap-share.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Header for DAAP (e.g., iTunes Music) sharing
- *
- * Copyright (C) 2005 Charles Schmidt <cschmidt2@emich.edu>
- *
- * Modifications Copyright (C) 2008 W. Michael Petullo <mike@flyn.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- *
- */
-
-#ifndef __DAAP_SHARE_H
-#define __DAAP_SHARE_H
-
-#include <glib-object.h>
-
-#include <libdmapsharing/dmap-share.h>
-#include <libdmapsharing/dmap-db.h>
-#include <libdmapsharing/dmap-container-db.h>
-
-G_BEGIN_DECLS
-/**
- * DAAP_TYPE_SHARE:
- *
- * The type for #DAAPShare.
- */
-#define DAAP_TYPE_SHARE         (daap_share_get_type ())
-/**
- * DAAP_SHARE:
- * @o: Object which is subject to casting.
- * 
- * Casts a #DAAPShare or derived pointer into a (DAAPShare*) pointer.
- * Depending on the current debugging level, this function may invoke
- * certain runtime checks to identify invalid casts.
- */
-#define DAAP_SHARE(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), \
-				 DAAP_TYPE_SHARE, DAAPShare))
-/**
- * DAAP_SHARE_CLASS:
- * @k: a valid #DAAPShareClass
- *
- * Casts a derived #DAAPShareClass structure into a #DAAPShareClass structure.
- */
-#define DAAP_SHARE_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), \
-				 DAAP_TYPE_SHARE, DAAPShareClass))
-/**
- * IS_DAAP_SHARE:
- * @o: Instance to check for being a %DAAP_TYPE_SHARE.
- * 
- * Checks whether a valid #GTypeInstance pointer is of type %DAAP_TYPE_SHARE.
- */
-#define IS_DAAP_SHARE(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
-				 DAAP_TYPE_SHARE))
-/**
- * IS_DAAP_SHARE_CLASS:
- * @k: a #DAAPShareClass
- * 
- * Checks whether @k "is a" valid #DAAPShareClass structure of type
- * %DAAP_SHARE or derived.
- */
-#define IS_DAAP_SHARE_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), \
-				 DAAP_TYPE_SHARE))
-/**
- * DAAP_SHARE_GET_CLASS:
- * @o: a #DAAPShare instance.
- * 
- * Get the class structure associated to a #DAAPShare instance.
- *
- * Returns: pointer to object class structure.
- */
-#define DAAP_SHARE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
-				 DAAP_TYPE_SHARE, DAAPShareClass))
-typedef struct DAAPSharePrivate DAAPSharePrivate;
-
-typedef struct
-{
-	DMAPShareClass dmap_share_class;
-} DAAPShareClass;
-
-typedef struct
-{
-	DMAPShare dmap_share_instance;
-	DAAPSharePrivate *priv;
-} DAAPShare;
-
-GType daap_share_get_type (void);
-
-/**
- * daap_share_new:
- * @name: The name that will be published by mDNS.
- * @password: A share password or NULL.
- * @db: A media database.
- * @container_db: A container (album) database.
- * @transcode_mimetype: A transcode mimetype or NULL.
- * 
- * Creates a new DAAP share and publishes it using mDNS.
- *
- * Returns: a pointer to a DAAPShare.
- */
-DAAPShare *daap_share_new (const char *name, const char *password,
-			   DMAPDb * db, DMAPContainerDb * container_db,
-			   gchar * transcode_mimetype);
-
-#endif /* __DAAP_SHARE_H */
-
-G_END_DECLS
diff --git a/libdmapsharing/dacp-connection.h b/libdmapsharing/dacp-connection.h
deleted file mode 100644
index 54c898f..0000000
--- a/libdmapsharing/dacp-connection.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#ifndef __DACP_CONNECTION_H
-#define __DACP_CONNECTION_H
-
-#include <glib-object.h>
-
-#include <libdmapsharing/dmap-connection.h>
-#include <libdmapsharing/dmap-db.h>
-
-G_BEGIN_DECLS
-/**
- * DACP_TYPE_CONNECTION:
- *
- * The type for #DACPConnection.
- */
-#define DACP_TYPE_CONNECTION		(dacp_connection_get_type ())
-/**
- * DACP_CONNECTION:
- * @o: Object which is subject to casting.
- *
- * Casts a #DACPConnection or derived pointer into a (DACPConnection *) pointer.
- * Depending on the current debugging level, this function may invoke
- * certain runtime checks to identify invalid casts.
- */
-#define DACP_CONNECTION(o)		(G_TYPE_CHECK_INSTANCE_CAST ((o), DACP_TYPE_CONNECTION, DACPConnection))
-/**
- * DACP_CONNECTION_CLASS:
- * @k: a valid #DACPConnectionClass
- *
- * Casts a derived #DACPConnectionClass structure into a #DACPConnectionClass
- * structure.
- */
-#define DACP_CONNECTION_CLASS(k)	(G_TYPE_CHECK_CLASS_CAST((k), DACP_TYPE_CONNECTION, DACPConnectionClass))
-/**
- * IS_DACP_CONNECTION:
- * @o: Instance to check for being a %DACP_TYPE_CONNECTION.
- *
- * Checks whether a valid #GTypeInstance pointer is of type %DACP_TYPE_CONNECTION.
- */
-#define IS_DACP_CONNECTION(o)	(G_TYPE_CHECK_INSTANCE_TYPE ((o), DACP_TYPE_CONNECTION))
-/**
- * IS_DACP_CONNECTION_CLASS:
- * @k: a #DACPConnectionClass
- *
- * Checks whether @k "is a" valid #DACPConnectionClass structure of type
- * %DACP_CONNECTION or derived.
- */
-#define IS_DACP_CONNECTION_CLASS(k)	(G_TYPE_CHECK_CLASS_TYPE ((k), DACP_TYPE_CONNECTION))
-/**
- * DACP_CONNECTION_GET_CLASS:
- * @o: a #DACPConnection instance.
- *
- * Get the class structure associated to a #DACPConnection instance.
- *
- * Returns: pointer to object class structure.
- */
-#define DACP_CONNECTION_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), DACP_TYPE_CONNECTION, DACPConnectionClass))
-typedef struct DACPConnectionPrivate DACPConnectionPrivate;
-
-typedef struct
-{
-	DMAPConnectionClass dmap_connection_class;
-} DACPConnectionClass;
-
-typedef struct
-{
-	DMAPConnection dmap_connection_instance;
-	DACPConnectionPrivate *priv;
-} DACPConnection;
-
-GType dacp_connection_get_type (void);
-
-DACPConnection *dacp_connection_new (const char *name,
-				     const char *host,
-				     guint port,
-				     DMAPDb * db,
-				     DMAPRecordFactory * factory);
-G_END_DECLS
-#endif /* __DACP_CONNECTION_H */
diff --git a/libdmapsharing/dacp-player.h b/libdmapsharing/dacp-player.h
deleted file mode 100644
index eb13241..0000000
--- a/libdmapsharing/dacp-player.h
+++ /dev/null
@@ -1,147 +0,0 @@
-/* Copyright (C) Alexandre Rosenfeld 2010 <alexandre.rosenfeld@gmail.com>
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#ifndef _DACP_PLAYER_H_
-#define _DACP_PLAYER_H_
-
-#include <glib-object.h>
-
-#include "daap-record.h"
-
-G_BEGIN_DECLS
-/**
- * DACP_TYPE_PLAYER:
- *
- * The type for #DACPPlayer.
- */
-#define DACP_TYPE_PLAYER               (dacp_player_get_type ())
-/**
- * DACP_PLAYER:
- * @o: Object which is subject to casting.
- *
- * Casts a #DACPPlayer or derived pointer into a (DACPPlayer *) pointer.
- * Depending on the current debugging level, this function may invoke
- * certain runtime checks to identify invalid casts.
- */
-#define DACP_PLAYER(o)               (G_TYPE_CHECK_INSTANCE_CAST ((o), DACP_TYPE_PLAYER, DACPPlayer))
-/**
- * IS_DACP_PLAYER:
- * @o: Instance to check for being a %DACP_TYPE_PLAYER.
- *
- * Checks whether a valid #GTypeInstance pointer is of type %DACP_TYPE_PLAYER.
- */
-#define IS_DACP_PLAYER(o)            (G_TYPE_CHECK_INSTANCE_TYPE ((o), DACP_TYPE_PLAYER))
-/**
- * DACP_PLAYER_GET_INTERFACE:
- * @o: a #DACPPlayer instance.
- *
- * Get the insterface structure associated to a #DACPPlayer instance.
- *
- * Returns: pointer to object interface structure.
- */
-#define DACP_PLAYER_GET_INTERFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), \
-                                        DACP_TYPE_PLAYER, DACPPlayerIface))
-typedef struct _DACPPlayerIface DACPPlayerIface;
-typedef struct _DACPPlayer DACPPlayer;
-
-typedef enum
-{
-	DACP_REPEAT_NONE = 0,
-	DACP_REPEAT_SINGLE = 1,
-	DACP_REPEAT_ALL = 2
-} DACPRepeatState;
-
-typedef enum
-{
-	DACP_PLAY_STOPPED = 2,
-	DACP_PLAY_PAUSED = 3,
-	DACP_PLAY_PLAYING = 4
-} DACPPlayState;
-
-struct _DACPPlayerIface
-{
-	GTypeInterface parent_class;
-
-	DAAPRecord *(*now_playing_record) (DACPPlayer * player);
-	guchar *(*now_playing_artwork) (DACPPlayer * player,
-	                                guint width, guint height);
-	void (*play_pause) (DACPPlayer * player);
-	void (*pause) (DACPPlayer * player);
-	void (*next_item) (DACPPlayer * player);
-	void (*prev_item) (DACPPlayer * player);
-
-	void (*cue_clear) (DACPPlayer * player);
-	void (*cue_play) (DACPPlayer * player, GList * records, guint index);
-};
-
-GType dacp_player_get_type (void);
-
-/**
- * dacp_player_now_playing_record:
- * @player: a player
- */
-DAAPRecord *dacp_player_now_playing_record (DACPPlayer * player);
-
-/**
- * dacp_player_now_playing_artwork:
- * @player: a player
- * @width: width
- * @height: height
- */
-guchar *dacp_player_now_playing_artwork (DACPPlayer * player,
-                                         guint width, guint height);
-
-/**
- * dacp_player_play_pause:
- * @player: a player
- */
-void dacp_player_play_pause (DACPPlayer * player);
-
-/**
- * dacp_player_pause:
- * @player: a player
- */
-void dacp_player_pause (DACPPlayer * player);
-
-/**
- * dacp_player_next_item:
- * @player: a player
- */
-void dacp_player_next_item (DACPPlayer * player);
-
-/**
- * dacp_player_now_prev_item:
- * @player: a player
- */
-void dacp_player_prev_item (DACPPlayer * player);
-
-/**
- * dacp_player_cue_clear:
- * @player: a player
- */
-void dacp_player_cue_clear (DACPPlayer * player);
-
-/**
- * dacp_player_cue_play:
- * @player: a player
- * @records : a list of records
- * @index: an index
- */
-void dacp_player_cue_play (DACPPlayer * player, GList * records, guint index);
-
-G_END_DECLS
-#endif /* _DACP_PLAYER_H_ */
diff --git a/libdmapsharing/dacp-share.h b/libdmapsharing/dacp-share.h
deleted file mode 100644
index f0e5fc7..0000000
--- a/libdmapsharing/dacp-share.h
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * Header for DACP (e.g., iTunes Remote) sharing
- *
- * Copyright (C) 2010 Alexandre Rosenfeld <airmind@gmail.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- *
- */
-
-#ifndef __DACP_SHARE_H
-#define __DACP_SHARE_H
-
-#include <glib-object.h>
-
-#include <libdmapsharing/dacp-player.h>
-#include <libdmapsharing/dmap-share.h>
-#include <libdmapsharing/dmap-db.h>
-#include <libdmapsharing/dmap-container-db.h>
-#include <libdmapsharing/daap-share.h>
-
-G_BEGIN_DECLS
-/**
- * DACP_TYPE_SHARE:
- *
- * The type for #DACPShare.
- */
-#define DACP_TYPE_SHARE         (dacp_share_get_type ())
-/**
- * DACP_SHARE:
- * @o: Object which is subject to casting.
- * 
- * Casts a #DACPShare or derived pointer into a (DACPShare*) pointer.
- * Depending on the current debugging level, this function may invoke
- * certain runtime checks to identify invalid casts.
- */
-#define DACP_SHARE(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), \
-				 DACP_TYPE_SHARE, DACPShare))
-/**
- * DACP_SHARE_CLASS:
- * @k: a valid #DACPShareClass
- *
- * Casts a derived #DACPShareClass structure into a #DACPShareClass structure.
- */
-#define DACP_SHARE_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), \
-				 DACP_TYPE_SHARE, DACPShareClass))
-/**
- * IS_DACP_SHARE:
- * @o: Instance to check for being a %DACP_TYPE_SHARE.
- * 
- * Checks whether a valid #GTypeInstance pointer is of type %DACP_TYPE_SHARE.
- */
-#define IS_DACP_SHARE(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
-				 DACP_TYPE_SHARE))
-/**
- * IS_DACP_SHARE_CLASS:
- * @k: a #DACPShareClass
- * 
- * Checks whether @k "is a" valid #DACPShareClass structure of type
- * %DACP_SHARE or derived.
- */
-#define IS_DACP_SHARE_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), \
-				 DACP_TYPE_SHARE))
-/**
- * DACP_SHARE_GET_CLASS:
- * @o: a #DACPShare instance.
- * 
- * Get the class structure associated to a #DACPShare instance.
- *
- * Returns: pointer to object class structure.
- */
-#define DACP_SHARE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
-				 DACP_TYPE_SHARE, DACPShareClass))
-typedef struct DACPSharePrivate DACPSharePrivate;
-
-typedef struct
-{
-	DAAPShare daap_share_instance;
-	DACPSharePrivate *priv;
-} DACPShare;
-
-typedef struct
-{
-	DAAPShareClass daap_share_class;
-
-	  gboolean (*lookup_guid) (DACPShare * share, gchar * guid);
-	void (*add_guid) (DACPShare * share, gchar * guid);
-
-	void (*remote_found) (DACPShare * share,
-			      gchar * service_name, gchar * remote_name);
-	void (*remote_lost) (DACPShare * share, gchar * service_name);
-	void (*remote_paired) (DACPShare * share,
-			       gchar * service_name, gboolean connected);
-} DACPShareClass;
-
-GType dacp_share_get_type (void);
-
-/**
- * dacp_share_new:
- * @library_name: The library name that will be shown in the remote.
- * @player: A #DACPPlayer instance, used to retrieve information from a player
- *          implementation.
- * @db: a media database represented by a #DMAPDb instance.
- * @container_db: a container (album) database represented by a #DMAPContainerDb
- *                instance.
- * 
- * Creates a new DACP share and publishes it using mDNS.
- *
- * Returns: a pointer to a #DACPShare.
- */
-DACPShare *dacp_share_new (const gchar * library_name, DACPPlayer * player,
-			   DMAPDb * db, DMAPContainerDb * container_db);
-
-/**
- * dacp_share_pair:
- * @share: a #DACPShare 
- * @service_name: DACP client (remote) service identifier.
- * @passcode: 4-Digit PIN code entered by the user.
- * 
- * Pairs a DACP client (Remote) with this server. If the passcode is 
- * correct (the same as shown on the remote), the remote will start connecting
- * to this server.
- */
-void dacp_share_pair (DACPShare * share, gchar * service_name,
-		      gchar passcode[4]);
-
-/**
- * dacp_share_start_lookup:
- * @share: A #DACPShare.
- *     
- * Start looking up for DACP remotes. Connect to #DACPShare::remote-found signal
- * to detect new remotes. Be aware that when a #DACPShare is created, only 
- * after calling this function is that it starts looking up for Remotes on the
- * network.
- */
-void dacp_share_start_lookup (DACPShare * share);
-
-/**
- * dacp_share_stop_lookup:
- * @share: A #DACPShare.
- *     
- * Stop looking up for DACP remotes.
- */
-void dacp_share_stop_lookup (DACPShare * share);
-
-/**
- * dacp_share_player_update:
- * @share: A #DACPShare.
- * 
- * Signals that the player has been updated (different track playing, playing
- * state changed, suffle state changed, etc).
- */
-void dacp_share_player_updated (DACPShare * share);
-
-#endif /* __DACP_SHARE_H */
-
-G_END_DECLS
diff --git a/libdmapsharing/daap-connection.c b/libdmapsharing/dmap-av-connection.c
similarity index 67%
rename from libdmapsharing/daap-connection.c
rename to libdmapsharing/dmap-av-connection.c
index 9014317..8f38c69 100644
--- a/libdmapsharing/daap-connection.c
+++ b/libdmapsharing/dmap-av-connection.c
@@ -20,17 +20,18 @@
 
 #include "config.h"
 
-#include <libdmapsharing/daap-connection.h>
+#include <libdmapsharing/dmap-av-connection.h>
 #include <libdmapsharing/dmap-structure.h>
+#include <libdmapsharing/test-dmap-db.h>
 
-static DMAPContentCode
-_get_protocol_version_cc (G_GNUC_UNUSED DMAPConnection * connection)
+static DmapContentCode
+_get_protocol_version_cc (G_GNUC_UNUSED DmapConnection * connection)
 {
 	return DMAP_CC_APRO;
 }
 
 static gchar *
-_get_query_metadata (G_GNUC_UNUSED DMAPConnection * connection)
+_get_query_metadata (G_GNUC_UNUSED DmapConnection * connection)
 {
 	return g_strdup ("dmap.itemid,dmap.itemname,daap.songalbum,"
 			 "daap.songartist,daap.songgenre,daap.songsize,"
@@ -40,12 +41,13 @@ _get_query_metadata (G_GNUC_UNUSED DMAPConnection * connection)
 			 "daap.sortartist,daap.sortalbum,com.apple.itunes.has-video");
 }
 
-static DMAPRecord *
-_handle_mlcl (G_GNUC_UNUSED DMAPConnection * connection,
-              DMAPRecordFactory * factory, GNode * n, int *item_id)
+static DmapRecord *
+_handle_mlcl (DmapConnection * connection, DmapRecordFactory * factory,
+	      GNode * n, int *item_id)
 {
 	GNode *n2;
-	DMAPRecord *record = NULL;
+	GError *error = NULL;
+	DmapRecord *record = NULL;
 	const gchar *title = NULL;
 	const gchar *album = NULL;
 	const gchar *artist = NULL;
@@ -62,7 +64,7 @@ _handle_mlcl (G_GNUC_UNUSED DMAPConnection * connection,
 	gint bitrate = 0;
 
 	for (n2 = n->children; n2; n2 = n2->next) {
-		DMAPStructureItem *meta_item;
+		DmapStructureItem *meta_item;
 
 		meta_item = n2->data;
 
@@ -120,11 +122,21 @@ _handle_mlcl (G_GNUC_UNUSED DMAPConnection * connection,
 		}
 	}
 
-	record = dmap_record_factory_create (factory, NULL);
-	if (record == NULL) {
-		goto _return;
+	record = dmap_record_factory_create (factory, NULL, &error);
+	if (NULL != error) {
+		g_signal_emit_by_name (connection, "error", error);
+		goto done;
 	}
-
+	g_assert(NULL != record);
+
+	/*
+	 * We do not free the dynamically-allocated properties
+	 * here. dmap-connection.c's actual_http_response_handler calls
+	 * dmap_structure_destroy to free the structure containing the
+	 * elements processed here.
+	 *
+	 * TODO: This could probably be made more clear.
+	 */
 	g_object_set (record,
 		      "year", year,
 		      "has-video", has_video,
@@ -141,15 +153,15 @@ _handle_mlcl (G_GNUC_UNUSED DMAPConnection * connection,
 		      "sort-artist", sort_artist,
 		      "sort-album", sort_album, NULL);
 
-      _return:
+done:
 	return record;
 }
 
 static void
-daap_connection_class_init (DAAPConnectionClass * klass)
+dmap_av_connection_class_init (DmapAvConnectionClass * klass)
 {
 	GObjectClass *object_class = G_OBJECT_CLASS (klass);
-	DMAPConnectionClass *parent_class =
+	DmapConnectionClass *parent_class =
 		DMAP_CONNECTION_CLASS (object_class);
 
 	parent_class->get_protocol_version_cc = _get_protocol_version_cc;
@@ -157,16 +169,16 @@ daap_connection_class_init (DAAPConnectionClass * klass)
 	parent_class->handle_mlcl = _handle_mlcl;
 }
 
-DAAPConnection *
-daap_connection_new (const char *name,
+DmapAvConnection *
+dmap_av_connection_new (const char *name,
 		     const char *host,
 		     guint port,
-		     DMAPDb * db,
-		     DMAPRecordFactory * factory)
+		     DmapDb * db,
+		     DmapRecordFactory * factory)
 {
-	DAAPConnection *connection;
+	DmapAvConnection *connection;
 
-	connection = g_object_new (DAAP_TYPE_CONNECTION,
+	connection = g_object_new (DMAP_TYPE_AV_CONNECTION,
 				  "name", name,
 				  "host", host,
 				  "port", port,
@@ -178,22 +190,22 @@ daap_connection_new (const char *name,
 }
 
 static void
-daap_connection_init (G_GNUC_UNUSED DAAPConnection * connection)
+dmap_av_connection_init (G_GNUC_UNUSED DmapAvConnection * connection)
 {
 }
 
-G_DEFINE_TYPE (DAAPConnection, daap_connection, DMAP_TYPE_CONNECTION);
+G_DEFINE_TYPE (DmapAvConnection, dmap_av_connection, DMAP_TYPE_CONNECTION);
 
 #ifdef HAVE_CHECK
 
 #include <check.h>
-#include <libdmapsharing/test-daap-record.h>
-#include <libdmapsharing/test-daap-record-factory.h>
+#include <libdmapsharing/test-dmap-av-record.h>
+#include <libdmapsharing/test-dmap-av-record-factory.h>
 
 START_TEST(_get_protocol_version_cc_test)
 {
-	DMAPConnection *conn = g_object_new (DAAP_TYPE_CONNECTION, NULL);
-	DMAPContentCode cc = _get_protocol_version_cc (conn);
+	DmapConnection *conn = g_object_new (DMAP_TYPE_AV_CONNECTION, NULL);
+	DmapContentCode cc = _get_protocol_version_cc (conn);
 	fail_unless (cc == DMAP_CC_APRO);
 	g_object_unref (conn);
 }
@@ -214,89 +226,52 @@ START_TEST(_get_query_metadata_test)
 }
 END_TEST
 
-START_TEST(daap_connection_new_test)
+START_TEST(_new_test)
 {
 	char *str;
 	int   port;
-	DMAPDb *db;
-	DMAPRecordFactory *factory;
+	DmapDb *db1, *db2;
+	DmapRecordFactory *factory1, *factory2;
+
+	db1 = DMAP_DB(test_dmap_db_new());
+	factory1 = DMAP_RECORD_FACTORY(test_dmap_av_record_factory_new());
 
-	DAAPConnection *connection = daap_connection_new("foo",
+	DmapAvConnection *connection = dmap_av_connection_new("foo",
 	                                                 "foo.example.com",
 	                                                  3689,
-	                                                  NULL,
-	                                                  NULL);
+	                                                  db1,
+	                                                  factory1);
 
 	g_object_get(connection, "name", &str, NULL);
 	ck_assert_str_eq("foo", str);
+	g_free(str);
 
 	g_object_get(connection, "host", &str, NULL);
 	ck_assert_str_eq("foo.example.com", str);
+	g_free(str);
 
 	g_object_get(connection, "port", &port, NULL);
 	ck_assert_int_eq(3689, port);
 
-	g_object_get(connection, "db", &db, NULL);
-	ck_assert(NULL == db);
+	g_object_get(connection, "db", &db2, NULL);
+	ck_assert(db1 == db2);
+	g_object_unref(db2);
 
-	g_object_get(connection, "factory", &factory, NULL);
-	ck_assert(NULL == factory);
+	g_object_get(connection, "factory", &factory2, NULL);
+	ck_assert(factory1 == factory2);
+	g_object_unref(factory2);
 
+	g_object_unref(db1);
+	g_object_unref(factory1);
 	g_object_unref(connection);
 }
 END_TEST
 
-static void
-_append_str_test(GNode *parent, int code, char *value)
-{
-	DMAPStructureItem *item;
-	GNode *child;
-
-	item = g_new0(DMAPStructureItem, 1);
-	item->content_code = code;
-	item->size = strlen(value);
-	g_value_init(&(item->content), G_TYPE_STRING);
-	g_value_take_string (&(item->content), value);
-	child = g_node_new(item);
-	g_node_append(parent, child);
-}
-
-static void
-_append_boolean_test(GNode *parent, int code, const gboolean value)
-{
-	DMAPStructureItem *item;
-	GNode *child;
-
-	item = g_new0(DMAPStructureItem, 1);
-	item->content_code = code;
-	item->size = 1;
-	g_value_init(&(item->content), G_TYPE_CHAR);
-	g_value_set_schar(&(item->content), value);
-	child = g_node_new(item);
-	g_node_append(parent, child);
-}
-
-static void
-_append_int_test(GNode *parent, int code, const int value)
-{
-	DMAPStructureItem *item;
-	GNode *child;
-
-	item = g_new0(DMAPStructureItem, 1);
-	item->content_code = code;
-	item->size = 4;
-	g_value_init(&(item->content), G_TYPE_INT);
-	g_value_set_int(&(item->content), value);
-	child = g_node_new(item);
-	g_node_append(parent, child);
-}
-
 START_TEST(_handle_mlcl_test)
 {
-	DMAPStructureItem *item;
-	TestDAAPRecordFactory *factory;
+	TestDmapAvRecordFactory *factory;
 	GNode *parent;
-	DMAPRecord *record;
+	DmapRecord *record;
 	char *expected_title        = "title", *title             = NULL;
 	char *expected_album        = "album", *album             = NULL;
 	char *expected_artist       = "artist", *artist           = NULL;
@@ -313,51 +288,56 @@ START_TEST(_handle_mlcl_test)
 	gint  expected_bitrate      =  60, bitrate                = 0;
 	gint  expected_item_id      =  70, item_id                = 0;
 
-	item = g_new0(DMAPStructureItem, 1);
-	item->content_code = 0;
-	parent = g_node_new(item);
-
-	_append_int_test(parent, DMAP_CC_MIID, expected_item_id);
-	_append_str_test(parent, DMAP_CC_MINM, expected_title);
-	_append_str_test(parent, DMAP_CC_ASAL, expected_album);
-	_append_str_test(parent, DMAP_CC_ASAR, expected_artist);
-	_append_str_test(parent, DMAP_CC_ASFM, expected_format);
-	_append_str_test(parent, DMAP_CC_ASGN, expected_genre);
-	_append_str_test(parent, DMAP_CC_ASSA, expected_sort_artist);
-	_append_str_test(parent, DMAP_CC_ASSU, expected_sort_album);
-	_append_boolean_test(parent, DMAP_CC_AEHV, expected_has_video);
-	_append_int_test(parent, DMAP_CC_ASTM, expected_length);
-	_append_int_test(parent, DMAP_CC_ASTN, expected_track);
-	_append_int_test(parent, DMAP_CC_ASDN, expected_disc);
-	_append_int_test(parent, DMAP_CC_ASYR, expected_year);
-	_append_int_test(parent, DMAP_CC_ASSZ, expected_size);
-	_append_int_test(parent, DMAP_CC_ASBR, expected_bitrate);
-
-	factory = test_daap_record_factory_new();
+	parent = dmap_structure_add(NULL, DMAP_CC_MLCL);
+
+	dmap_structure_add(parent, DMAP_CC_MIID, expected_item_id);
+	dmap_structure_add(parent, DMAP_CC_MINM, expected_title);
+	dmap_structure_add(parent, DMAP_CC_ASAL, expected_album);
+	dmap_structure_add(parent, DMAP_CC_ASAR, expected_artist);
+	dmap_structure_add(parent, DMAP_CC_ASFM, expected_format);
+	dmap_structure_add(parent, DMAP_CC_ASGN, expected_genre);
+	dmap_structure_add(parent, DMAP_CC_ASSA, expected_sort_artist);
+	dmap_structure_add(parent, DMAP_CC_ASSU, expected_sort_album);
+	dmap_structure_add(parent, DMAP_CC_AEHV, expected_has_video);
+	dmap_structure_add(parent, DMAP_CC_ASTM, expected_length);
+	dmap_structure_add(parent, DMAP_CC_ASTN, expected_track);
+	dmap_structure_add(parent, DMAP_CC_ASDN, expected_disc);
+	dmap_structure_add(parent, DMAP_CC_ASYR, expected_year);
+	dmap_structure_add(parent, DMAP_CC_ASSZ, expected_size);
+	dmap_structure_add(parent, DMAP_CC_ASBR, expected_bitrate);
+
+	factory = test_dmap_av_record_factory_new();
 	record  = _handle_mlcl(NULL, DMAP_RECORD_FACTORY(factory), parent, &item_id);
 
 	ck_assert_int_eq(expected_item_id, item_id);
 
 	g_object_get(record, "title", &title, NULL);
 	ck_assert_str_eq(expected_title, title);
+	g_free(title);
 
 	g_object_get(record, "songalbum", &album, NULL);
 	ck_assert_str_eq(expected_album, album);
+	g_free(album);
 
 	g_object_get(record, "songartist", &artist, NULL);
 	ck_assert_str_eq(expected_artist, artist);
+	g_free(artist);
 
 	g_object_get(record, "format", &format, NULL);
 	ck_assert_str_eq(expected_format, format);
+	g_free(format);
 
 	g_object_get(record, "songgenre", &genre, NULL);
 	ck_assert_str_eq(expected_genre, genre);
+	g_free(genre);
 
 	g_object_get(record, "sort-artist", &sort_artist, NULL);
 	ck_assert_str_eq(expected_sort_artist, sort_artist);
+	g_free(sort_artist);
 
 	g_object_get(record, "sort-album", &sort_album, NULL);
 	ck_assert_str_eq(expected_sort_album, sort_album);
+	g_free(sort_album);
 
 	g_object_get(record, "has-video", &has_video, NULL);
 	ck_assert_int_eq(expected_has_video, has_video);
@@ -379,35 +359,49 @@ START_TEST(_handle_mlcl_test)
 
 	g_object_get(record, "bitrate", &bitrate, NULL);
 	ck_assert_int_eq(expected_bitrate, bitrate);
+
+	g_object_unref(record);
+
+	dmap_structure_destroy(parent);
 }
 END_TEST
 
 /* Do not crash on bad field code (~0). */
 START_TEST(_handle_mlcl_bad_code_test)
 {
-	DMAPStructureItem *item;
-	TestDAAPRecordFactory *factory;
-	GNode *parent;
-	DMAPRecord *record;
+	DmapStructureItem *item;
+	TestDmapAvRecordFactory *factory;
+	GNode *parent, *child;
+	DmapRecord *record;
 	int item_id;
 	char *set_value      = "value";
 	char *expected_title = "title", *title = NULL;
 
-	item = g_new0(DMAPStructureItem, 1);
-	item->content_code = 0;
-	parent = g_node_new(item);
+	parent = dmap_structure_add(NULL, DMAP_CC_MLCL);
+
+	/* A node with a bad content code. */
+	item = g_new0(DmapStructureItem, 1);
+	item->content_code = ~0;
+	item->size = strlen(set_value);
+	g_value_init(&(item->content), G_TYPE_STRING);
+	g_value_set_string (&(item->content), set_value);
+	child = g_node_new(item);
+	g_node_append(parent, child);
 
-	_append_str_test(parent, ~0, set_value);
-	_append_str_test(parent, DMAP_CC_MINM, expected_title);
+	/* A well-formed node. */
+	dmap_structure_add(parent, DMAP_CC_MINM, expected_title);
 
-	factory = test_daap_record_factory_new();
+	factory = test_dmap_av_record_factory_new();
 	record  = _handle_mlcl(NULL, DMAP_RECORD_FACTORY(factory), parent, &item_id);
 
 	g_object_get(record, "title", &title, NULL);
 	ck_assert_str_eq(expected_title, title);
+	g_free(title);
+
+	dmap_structure_destroy(parent);
 }
 END_TEST
 
-#include "daap-connection-suite.c"
+#include "dmap-av-connection-suite.c"
 
 #endif
diff --git a/libdmapsharing/dmap-av-connection.h b/libdmapsharing/dmap-av-connection.h
new file mode 100644
index 0000000..219499d
--- /dev/null
+++ b/libdmapsharing/dmap-av-connection.h
@@ -0,0 +1,112 @@
+/*
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#ifndef _DMAP_AV_CONNECTION_H
+#define _DMAP_AV_CONNECTION_H
+
+#include <glib-object.h>
+
+#include <libdmapsharing/dmap-connection.h>
+#include <libdmapsharing/dmap-db.h>
+
+G_BEGIN_DECLS
+/**
+ * SECTION: dmap-av-connection
+ * @short_description: A DAAP connection.
+ *
+ * #DmapAvConnection objects encapsulate a DAAP connection.
+ */
+
+/**
+ * DMAP_TYPE_AV_CONNECTION:
+ *
+ * The type for #DmapAvConnection.
+ */
+#define DMAP_TYPE_AV_CONNECTION		(dmap_av_connection_get_type ())
+/**
+ * DMAP_AV_CONNECTION:
+ * @o: Object which is subject to casting.
+ *
+ * Casts a #DmapAvConnection or derived pointer into a (DmapAvConnection *) pointer.
+ * Depending on the current debugging level, this function may invoke
+ * certain runtime checks to identify invalid casts.
+ */
+#define DMAP_AV_CONNECTION(o)		(G_TYPE_CHECK_INSTANCE_CAST ((o), DMAP_TYPE_AV_CONNECTION, DmapAvConnection))
+/**
+ * DMAP_AV_CONNECTION_CLASS:
+ * @k: a valid #DmapAvConnectionClass
+ *
+ * Casts a derived #DmapAvConnectionClass structure into a #DmapAvConnectionClass
+ * structure.
+ */
+#define DMAP_AV_CONNECTION_CLASS(k)	(G_TYPE_CHECK_CLASS_CAST((k), DMAP_TYPE_AV_CONNECTION, DmapAvConnectionClass))
+/**
+ * DMAP_IS_AV_CONNECTION:
+ * @o: Instance to check for being a %DMAP_TYPE_AV_CONNECTION.
+ *
+ * Checks whether a valid #GTypeInstance pointer is of type %DMAP_TYPE_AV_CONNECTION.
+ */
+#define DMAP_IS_AV_CONNECTION(o)	(G_TYPE_CHECK_INSTANCE_TYPE ((o), DMAP_TYPE_AV_CONNECTION))
+/**
+ * DMAP_IS_AV_CONNECTION_CLASS:
+ * @k: a #DmapAvConnectionClass
+ *
+ * Checks whether @k "is a" valid #DmapAvConnectionClass structure of type
+ * %DMAP_AV_CONNECTION or derived.
+ */
+#define DMAP_IS_AV_CONNECTION_CLASS(k)	(G_TYPE_CHECK_CLASS_TYPE ((k), DMAP_TYPE_AV_CONNECTION))
+/**
+ * DMAP_AV_CONNECTION_GET_CLASS:
+ * @o: a #DmapAvConnection instance.
+ *
+ * Get the class structure associated to a #DmapAvConnection instance.
+ *
+ * Returns: pointer to object class structure.
+ */
+#define DMAP_AV_CONNECTION_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), DMAP_TYPE_AV_CONNECTION, DmapAvConnectionClass))
+typedef struct DmapAvConnectionPrivate DmapAvConnectionPrivate;
+
+typedef struct {
+	DmapConnectionClass dmap_connection_class;
+} DmapAvConnectionClass;
+
+typedef struct {
+	DmapConnection dmap_connection_instance;
+	DmapAvConnectionPrivate *priv;
+} DmapAvConnection;
+
+GType dmap_av_connection_get_type (void);
+
+/**
+ * dmap_av_connection_new:
+ * @name: The name of the share to connect to.
+ * @host: The host of the share to connect to.
+ * @port: The port of the share to connect to.
+ * @db: (transfer full): The db that will receive the records found in the share.
+ * @factory: (transfer full): A factory to create records.
+ *
+ * Create a new DAAP connection.
+ *
+ * Returns: a pointer to a DmapAvConnection.
+ */
+DmapAvConnection *dmap_av_connection_new (const char *name,
+				     const char *host,
+				     guint port,
+				     DmapDb * db,
+				     DmapRecordFactory * factory);
+
+G_END_DECLS
+#endif /* _DMAP_AV_CONNECTION_H */
diff --git a/libdmapsharing/daap-record.c b/libdmapsharing/dmap-av-record.c
similarity index 52%
rename from libdmapsharing/daap-record.c
rename to libdmapsharing/dmap-av-record.c
index 772ecd7..3f617bd 100644
--- a/libdmapsharing/daap-record.c
+++ b/libdmapsharing/dmap-av-record.c
@@ -18,18 +18,16 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include <libdmapsharing/daap-record.h>
-#include <libdmapsharing/dmap-enums.h>
+#include "config.h"
 
-static gint daap_record_init_count = 0;
+#include <libdmapsharing/dmap-av-record.h>
+#include <libdmapsharing/dmap-enums.h>
 
 static void
-daap_record_init (DAAPRecordIface * iface)
+dmap_av_record_default_init (DmapAvRecordInterface * iface)
 {
 	static gboolean is_initialized = FALSE;
 
-	daap_record_init_count++;
-
 	if (!is_initialized) {
 		g_object_interface_install_property (iface,
 						     g_param_spec_string
@@ -40,10 +38,11 @@ daap_record_init (DAAPRecordIface * iface)
 						      G_PARAM_READWRITE));
 
 		g_object_interface_install_property (iface,
-						     g_param_spec_pointer
+						     g_param_spec_boxed
 						     ("hash",
 						      "Hash of media file contents",
 						      "Hash of media file contents",
+		                                      G_TYPE_ARRAY,
 						      G_PARAM_READWRITE));
 
 		g_object_interface_install_property (iface,
@@ -198,57 +197,33 @@ daap_record_init (DAAPRecordIface * iface)
 	}
 }
 
-static void
-daap_record_finalize (G_GNUC_UNUSED DAAPRecordIface * iface)
-{
-	daap_record_init_count--;
-}
-
-/* FIXME: No G_DEFINE_INTERFACE available in GObject headers: */
-GType
-daap_record_get_type (void)
-{
-	static GType object_type = 0;
-
-	if (!object_type) {
-		static const GTypeInfo object_info = {
-			class_size:     sizeof (DAAPRecordIface),
-			base_init:     (GBaseInitFunc) daap_record_init,
-			base_finalize: (GBaseFinalizeFunc) daap_record_finalize
-		};
-		object_type =
-			g_type_register_static (G_TYPE_INTERFACE,
-						"DAAPRecord",
-						&object_info, 0);
-	}
-	return object_type;
-}
+G_DEFINE_INTERFACE(DmapAvRecord, dmap_av_record, G_TYPE_OBJECT)
 
 gboolean
-daap_record_itunes_compat (DAAPRecord * record)
+dmap_av_record_itunes_compat (DmapAvRecord * record)
 {
-	return DAAP_RECORD_GET_INTERFACE (record)->itunes_compat (record);
+	return DMAP_AV_RECORD_GET_INTERFACE (record)->itunes_compat (record);
 }
 
 GInputStream *
-daap_record_read (DAAPRecord * record, GError ** err)
+dmap_av_record_read (DmapAvRecord * record, GError ** err)
 {
-	return DAAP_RECORD_GET_INTERFACE (record)->read (record, err);
+	return DMAP_AV_RECORD_GET_INTERFACE (record)->read (record, err);
 }
 
 gint
-daap_record_cmp_by_album (gpointer a, gpointer b, DMAPDb * db)
+dmap_av_record_cmp_by_album (gpointer a, gpointer b, DmapDb * db)
 {
-	DAAPRecord *record_a, *record_b;
+	DmapAvRecord *record_a, *record_b;
 	gchar *album_a, *album_b;
 	gchar *sort_album_a, *sort_album_b;
 	gint track_a, track_b;
 	gint ret;
 
 	record_a =
-		DAAP_RECORD (dmap_db_lookup_by_id (db, GPOINTER_TO_UINT (a)));
+		DMAP_AV_RECORD (dmap_db_lookup_by_id (db, GPOINTER_TO_UINT (a)));
 	record_b =
-		DAAP_RECORD (dmap_db_lookup_by_id (db, GPOINTER_TO_UINT (b)));
+		DMAP_AV_RECORD (dmap_db_lookup_by_id (db, GPOINTER_TO_UINT (b)));
 
 	g_assert (record_a);
 	g_assert (record_b);
@@ -257,15 +232,17 @@ daap_record_cmp_by_album (gpointer a, gpointer b, DMAPDb * db)
 		      &sort_album_a, "track", &track_a, NULL);
 	g_object_get (record_b, "songalbum", &album_b, "sort-album",
 		      &sort_album_b, "track", &track_b, NULL);
-	if (sort_album_a && sort_album_b)
+	if (sort_album_a && sort_album_b) {
 		ret = g_strcmp0 (sort_album_a, sort_album_b);
-	else
+	} else {
 		ret = g_strcmp0 (album_a, album_b);
+	}
 	if (ret == 0) {
-		if (track_a < track_b)
+		if (track_a < track_b) {
 			ret = -1;
-		else
+		} else {
 			ret = (track_a == track_b) ? 0 : 1;
+		}
 	}
 	g_object_unref (record_a);
 	g_object_unref (record_b);
@@ -275,3 +252,198 @@ daap_record_cmp_by_album (gpointer a, gpointer b, DMAPDb * db)
 	g_free (sort_album_b);
 	return ret;
 }
+
+#ifdef HAVE_CHECK
+
+#include <check.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <libdmapsharing/test-dmap-av-record.h>
+#include <libdmapsharing/test-dmap-db.h>
+
+#define TMP "/tmp/libdmapsharing-test-XXXXXX"
+
+START_TEST(_read_test)
+{
+	DmapAvRecord *record;
+	GInputStream *stream;
+	GError *error = NULL;
+	gssize count1, count2;
+	char buf[PATH_MAX];
+	char template[sizeof TMP];
+	char uri[PATH_MAX];
+	int tmp;
+
+	strcpy(template, TMP);
+
+	tmp = mkstemp(template);
+	if (-1 == tmp) {
+		ck_abort();
+	}
+
+	/* Use randomization of template name for test data. */
+	count1 = write(tmp, template, strlen(template));
+	if (-1 == count1) {
+		ck_abort();
+	}
+
+	ck_assert_int_eq(count1, strlen(template));
+
+	sprintf(uri, "file://%s", template);
+
+	record = DMAP_AV_RECORD(test_dmap_av_record_new());
+	g_object_set(record, "location", uri, NULL);
+
+	stream = dmap_av_record_read(record, &error);
+
+	ck_assert(NULL == error);
+
+	count2 = g_input_stream_read(stream,
+	                            buf,
+	                            BUFSIZ,
+	                            NULL,
+	                           &error);
+	ck_assert(NULL == error);
+	ck_assert_int_eq(count1, count2);
+	ck_assert_str_eq(buf, template);
+
+	g_input_stream_close(stream, NULL, NULL);
+	g_object_unref(record);
+	close(tmp);
+	unlink(template);
+}
+END_TEST
+
+START_TEST(_read_bad_path_test)
+{
+	DmapAvRecord *record;
+	GError *error = NULL;
+	const char *uri = "/xxx";
+
+	record = DMAP_AV_RECORD(test_dmap_av_record_new());
+	g_object_set(record, "location", uri, NULL);
+
+	dmap_av_record_read(record, &error);
+
+	ck_assert(NULL != error);
+
+	g_object_unref(record);
+}
+END_TEST
+
+START_TEST(_itunes_compat_test)
+{
+	DmapAvRecord *record;
+	gboolean ok;
+
+	record = DMAP_AV_RECORD(test_dmap_av_record_new());
+	g_object_set(record, "format", "mp3", NULL);
+
+	ok = dmap_av_record_itunes_compat(record);
+	ck_assert(TRUE == ok);
+
+	g_object_unref(record);
+}
+END_TEST
+
+START_TEST(_itunes_compat_no_test)
+{
+	DmapAvRecord *record;
+	gboolean ok;
+
+	record = DMAP_AV_RECORD(test_dmap_av_record_new());
+	g_object_set(record, "format", "ogg", NULL);
+
+	ok = dmap_av_record_itunes_compat(record);
+	ck_assert(FALSE == ok);
+
+	g_object_unref(record);
+}
+END_TEST
+
+START_TEST(_cmp_by_album_test)
+{
+	gint id;
+	gchar *album;
+	TestDmapAvRecord *record;
+	GList *records = NULL;
+	DmapDb *db = DMAP_DB(test_dmap_db_new());
+
+	/* Create records, add to database, add identifiers to list. */
+	record = test_dmap_av_record_new();
+	g_object_set(record, "songalbum", "a", NULL);
+	g_object_set(record, "sort-album", "a", NULL);
+	id = dmap_db_add(db, DMAP_RECORD(record), NULL);
+	g_object_unref(record);
+	records = g_list_append (records, GINT_TO_POINTER(id));
+
+	record = test_dmap_av_record_new();
+	g_object_set(record, "songalbum",  "c", NULL);
+	g_object_set(record, "sort-album", "c", NULL);
+	id = dmap_db_add(db, DMAP_RECORD(record), NULL);
+	g_object_unref(record);
+	records = g_list_append (records, GINT_TO_POINTER(id));
+
+	record = test_dmap_av_record_new();
+	g_object_set(record, "songalbum",  "b", NULL);
+	g_object_set(record, "sort-album", "b", NULL);
+	id = dmap_db_add(db, DMAP_RECORD(record), NULL);
+	g_object_unref(record);
+	records = g_list_append (records, GINT_TO_POINTER(id));
+
+	/* Check list of record identifiers is not yet sorted (a, c, b). */
+	id = GPOINTER_TO_INT(g_list_nth_data(records, 0));
+	record = TEST_DMAP_AV_RECORD(dmap_db_lookup_by_id(db, id));
+	g_object_get(record, "songalbum", &album, NULL);
+	ck_assert_str_eq("a", album);
+	g_object_unref(record);
+	g_free(album);
+
+	id = GPOINTER_TO_INT(g_list_nth_data(records, 1));
+	record = TEST_DMAP_AV_RECORD(dmap_db_lookup_by_id(db, id));
+	g_object_get(record, "songalbum", &album, NULL);
+	ck_assert_str_eq("c", album);
+	g_object_unref(record);
+	g_free(album);
+
+	id = GPOINTER_TO_INT(g_list_nth_data(records, 2));
+	record = TEST_DMAP_AV_RECORD(dmap_db_lookup_by_id(db, id));
+	g_object_get(record, "songalbum", &album, NULL);
+	ck_assert_str_eq("b", album);
+	g_object_unref(record);
+	g_free(album);
+
+	records = g_list_sort_with_data(records,
+	                               (GCompareDataFunc) dmap_av_record_cmp_by_album,
+	                                db);
+
+	/* Check list of record identifiers is now sorted (a, b, c). */
+	id = GPOINTER_TO_INT(g_list_nth_data(records, 0));
+	record = TEST_DMAP_AV_RECORD(dmap_db_lookup_by_id(db, id));
+	g_object_get(record, "songalbum", &album, NULL);
+	ck_assert_str_eq("a", album);
+	g_object_unref(record);
+	g_free(album);
+
+	id = GPOINTER_TO_INT(g_list_nth_data(records, 1));
+	record = TEST_DMAP_AV_RECORD(dmap_db_lookup_by_id(db, id));
+	g_object_get(record, "songalbum", &album, NULL);
+	ck_assert_str_eq("b", album);
+	g_object_unref(record);
+	g_free(album);
+
+	id = GPOINTER_TO_INT(g_list_nth_data(records, 2));
+	record = TEST_DMAP_AV_RECORD(dmap_db_lookup_by_id(db, id));
+	g_object_get(record, "songalbum", &album, NULL);
+	ck_assert_str_eq("c", album);
+	g_object_unref(record);
+	g_free(album);
+
+	g_list_free(records);
+	g_object_unref(db);
+}
+END_TEST
+
+#include "dmap-av-record-suite.c"
+
+#endif
diff --git a/libdmapsharing/dmap-av-record.h b/libdmapsharing/dmap-av-record.h
new file mode 100644
index 0000000..affba23
--- /dev/null
+++ b/libdmapsharing/dmap-av-record.h
@@ -0,0 +1,116 @@
+/*
+ *  Database record interface for DAAP sharing
+ *
+ *  Copyright (C) 2008 W. Michael Petullo <mike@flyn.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#ifndef _DMAP_AV_RECORD_H
+#define _DMAP_AV_RECORD_H
+
+#include <glib.h>
+#include <gio/gio.h>
+
+#include <libdmapsharing/dmap-record.h>
+#include <libdmapsharing/dmap-db.h>
+
+G_BEGIN_DECLS
+/**
+ * SECTION: dmap-av-record
+ * @short_description: The description of an item shared using DAAP.
+ *
+ * #DmapAvRecord objects encapsulate the description of an item shared using DAAP.
+ */
+
+/**
+ * DMAP_TYPE_AV_RECORD:
+ *
+ * The type for #DmapAvRecord.
+ */
+#define DMAP_TYPE_AV_RECORD	     (dmap_av_record_get_type ())
+/**
+ * DMAP_AV_RECORD:
+ * @o: Object which is subject to casting.
+ *
+ * Casts a #DmapAvRecord or derived pointer into a (DmapAvRecord *) pointer.
+ * Depending on the current debugging level, this function may invoke
+ * certain runtime checks to identify invalid casts.
+ */
+#define DMAP_AV_RECORD(o)		     (G_TYPE_CHECK_INSTANCE_CAST ((o), \
+				      DMAP_TYPE_AV_RECORD, DmapAvRecord))
+/**
+ * DMAP_IS_AV_RECORD:
+ * @o: Instance to check for being a %DMAP_TYPE_AV_RECORD.
+ *
+ * Checks whether a valid #GTypeInstance pointer is of type %DMAP_TYPE_AV_RECORD.
+ */
+#define DMAP_IS_AV_RECORD(o)	     (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
+				      DMAP_TYPE_AV_RECORD))
+/**
+ * DMAP_AV_RECORD_GET_INTERFACE:
+ * @o: a #DmapAvRecord instance.
+ *
+ * Get the class structure associated to a #DmapAvRecord instance.
+ *
+ * Returns: pointer to object interface structure.
+ */
+#define DMAP_AV_RECORD_GET_INTERFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), \
+				      DMAP_TYPE_AV_RECORD, DmapAvRecordInterface))
+typedef struct _DmapAvRecord DmapAvRecord;
+typedef struct _DmapAvRecordInterface DmapAvRecordInterface;
+
+struct _DmapAvRecordInterface
+{
+	GTypeInterface parent;
+
+	  gboolean (*itunes_compat) (DmapAvRecord * record);
+	GInputStream *(*read) (DmapAvRecord * record, GError ** err);
+};
+
+GType dmap_av_record_get_type (void);
+
+/**
+ * dmap_av_record_itunes_compat:
+ * @record: A DmapAvRecord.
+ *
+ * Returns: TRUE if record is compatible with iTunes, else FALSE.
+ */
+gboolean dmap_av_record_itunes_compat (DmapAvRecord * record);
+
+/**
+ * dmap_av_record_read:
+ * @record: a DmapAvRecord.
+ * @err: a GError.
+ *
+ * Returns: (transfer full): A GInputStream that provides read-only access to the data stream
+ * associated with record.
+ */
+GInputStream *dmap_av_record_read (DmapAvRecord * record, GError ** err);
+
+/**
+ * dmap_av_record_cmp_by_album:
+ * @a: first ID.
+ * @b: second ID.
+ * @db: A DmapDb for which a and b are valid ID's.
+ *
+ * Compares the two records associated with the provided keys according
+ * to album. Suitable to sort lists of albums.
+ */
+gint dmap_av_record_cmp_by_album (gpointer a, gpointer b, DmapDb * db);
+
+#endif /* _DMAP_AV_RECORD_H */
+
+G_END_DECLS
diff --git a/libdmapsharing/dmap-av-share.c b/libdmapsharing/dmap-av-share.c
new file mode 100644
index 0000000..a4c0f58
--- /dev/null
+++ b/libdmapsharing/dmap-av-share.c
@@ -0,0 +1,1725 @@
+/* Implmentation of DAAP (e.g., iTunes Music) sharing
+ *
+ * Copyright (C) 2005 Charles Schmidt <cschmidt2@emich.edu>
+ *
+ * Modifications Copyright (C) 2008 W. Michael Petullo <mike@flyn.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ */
+
+#include "config.h"
+
+#include <time.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include <glib.h>
+
+#include <libsoup/soup.h>
+
+#include <libdmapsharing/dmap.h>
+#include <libdmapsharing/dmap-share-private.h>
+#include <libdmapsharing/dmap-structure.h>
+#include <libdmapsharing/dmap-private-utils.h>
+#include <libdmapsharing/dmap-utils.h>
+
+#ifdef HAVE_GSTREAMERAPP
+#include <libdmapsharing/dmap-transcode-stream.h>
+#endif /* HAVE_GSTREAMERAPP */
+
+static guint _get_desired_port (DmapShare * share);
+static const char *_get_type_of_service (DmapShare * share);
+static void _server_info (DmapShare * share,
+                          SoupServerMessage * message,
+                          const char *path);
+static void _message_add_standard_headers (DmapShare * share,
+                                           SoupServerMessage * message);
+static void _databases_browse_xxx (DmapShare * share,
+                                   SoupServerMessage * msg,
+                                   const char *path,
+                                   GHashTable * query);
+static void _databases_items_xxx (DmapShare * share,
+                                  SoupServer * server,
+                                  SoupServerMessage * msg,
+                                  const char *path);
+static struct DmapMetaDataMap *_get_meta_data_map (DmapShare * share);
+static void _add_entry_to_mlcl (guint id, DmapRecord * record, gpointer mb);
+
+#define DAAP_TYPE_OF_SERVICE "_daap._tcp"
+#define DAAP_PORT 3689
+
+G_DEFINE_TYPE (DmapAvShare, dmap_av_share, DMAP_TYPE_SHARE);
+
+static void
+dmap_av_share_class_init (DmapAvShareClass * klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+	DmapShareClass *parent_class = DMAP_SHARE_CLASS (object_class);
+
+	parent_class->get_desired_port = _get_desired_port;
+	parent_class->get_type_of_service = _get_type_of_service;
+	parent_class->message_add_standard_headers = _message_add_standard_headers;
+	parent_class->get_meta_data_map = _get_meta_data_map;
+	parent_class->add_entry_to_mlcl = _add_entry_to_mlcl;
+	parent_class->databases_browse_xxx = _databases_browse_xxx;
+	parent_class->databases_items_xxx = _databases_items_xxx;
+	parent_class->server_info = _server_info;
+}
+
+static void
+dmap_av_share_init (G_GNUC_UNUSED DmapAvShare * share)
+{
+}
+
+DmapAvShare *
+dmap_av_share_new (const char *name,
+                   const char *password,
+                   DmapDb * db,
+                   DmapContainerDb * container_db,
+                   gchar * transcode_mimetype)
+{
+	return DMAP_AV_SHARE (g_object_new (DMAP_TYPE_AV_SHARE,
+	                                   "name", name,
+	                                   "password", password,
+	                                   "db", db,
+	                                   "container-db", container_db,
+	                                   "transcode-mimetype",
+	                                    transcode_mimetype, NULL));
+}
+
+static void
+_message_add_standard_headers (G_GNUC_UNUSED DmapShare * share,
+                               SoupServerMessage * message)
+{
+	soup_message_headers_append (soup_server_message_get_response_headers(message),
+	                             "DMAP-Server",
+				     "libdmapsharing" VERSION);
+}
+
+#define DMAP_VERSION 2.0
+#define DAAP_VERSION 3.0
+#define DAAP_TIMEOUT 1800
+
+static guint
+_get_desired_port (G_GNUC_UNUSED DmapShare * share)
+{
+	return DAAP_PORT;
+}
+
+static const char *
+_get_type_of_service (G_GNUC_UNUSED DmapShare * share)
+{
+	return DAAP_TYPE_OF_SERVICE;
+}
+
+static void
+_server_info (DmapShare * share,
+              SoupServerMessage * message,
+              const char *path)
+{
+/* MSRV	server info response
+ * 	MSTT status
+ * 	MPRO daap version
+ * 	APRO daap version
+ * 	MINM name
+ * 	MSAU authentication method
+ * 	MSLR login required
+ * 	MSTM timeout interval
+ * 	MSAL supports auto logout
+ * 	MSUP supports update
+ * 	MSPI supports persistent ids
+ * 	MSEX supports extensions
+ * 	MSBR supports browse
+ * 	MSQY supports query
+ * 	MSIX supports index
+ * 	MSRS supports resolve
+ * 	MSDC databases count
+ */
+	gchar *nameprop;
+	GNode *msrv;
+
+	g_debug ("Path is %s.", path);
+
+	g_object_get ((gpointer) share, "name", &nameprop, NULL);
+
+	msrv = dmap_structure_add (NULL, DMAP_CC_MSRV);
+	dmap_structure_add (msrv, DMAP_CC_MSTT, (gint32) SOUP_STATUS_OK);
+	dmap_structure_add (msrv, DMAP_CC_MPRO, (gdouble) DAAP_VERSION);
+	dmap_structure_add (msrv, DMAP_CC_APRO, (gdouble) DAAP_VERSION);
+	/* 2/3 is for itunes 4.8 (at least).  its determined by the
+	 * Client-DAAP-Version header sent, but if we decide not to support
+	 * older versions..? anyway
+	 *
+	 * 1.0 is 1/1
+	 * 2.0 is 1/2
+	 * 3.0 is 2/3
+	 */
+	dmap_structure_add (msrv, DMAP_CC_MINM, nameprop);
+	dmap_structure_add (msrv, DMAP_CC_MSAU,
+			    dmap_share_get_auth_method (share));
+	dmap_structure_add (msrv, DMAP_CC_MSLR, DMAP_SHARE_AUTH_METHOD_NONE);
+	dmap_structure_add (msrv, DMAP_CC_MSTM, (gint32) DAAP_TIMEOUT);
+	dmap_structure_add (msrv, DMAP_CC_MSAL, (gchar) 0);
+	dmap_structure_add (msrv, DMAP_CC_MSUP, (gchar) 1);
+	dmap_structure_add (msrv, DMAP_CC_MSPI, (gchar) 0);
+	dmap_structure_add (msrv, DMAP_CC_MSEX, (gchar) 0);
+	dmap_structure_add (msrv, DMAP_CC_MSBR, (gchar) 0);
+	dmap_structure_add (msrv, DMAP_CC_MSQY, (gchar) 0);
+	dmap_structure_add (msrv, DMAP_CC_MSIX, (gchar) 0);
+	dmap_structure_add (msrv, DMAP_CC_MSRS, (gchar) 0);
+	dmap_structure_add (msrv, DMAP_CC_MSDC, (gint32) 1);
+
+	dmap_share_message_set_from_dmap_structure (share, message, msrv);
+	dmap_structure_destroy (msrv);
+
+	g_free (nameprop);
+}
+
+typedef enum {
+	ITEM_ID = 0,
+	ITEM_NAME,
+	ITEM_KIND,
+	PERSISTENT_ID,
+	CONTAINER_ITEM_ID,
+	SONG_ALBUM,
+	SONG_GROUPING,
+	SONG_ARTIST,
+	SONG_BITRATE,
+	SONG_BPM,
+	SONG_COMMENT,
+	SONG_COMPILATION,
+	SONG_COMPOSER,
+	SONG_DATA_KIND,
+	SONG_DATA_URL,
+	SONG_DATE_ADDED,
+	SONG_DATE_MODIFIED,
+	SONG_DISC_COUNT,
+	SONG_DISC_NUMBER,
+	SONG_DISABLED,
+	SONG_EQ_PRESET,
+	SONG_FORMAT,
+	SONG_GENRE,
+	SONG_DESCRIPTION,
+	SONG_RELATIVE_VOLUME,
+	SONG_SAMPLE_RATE,
+	SONG_SIZE,
+	SONG_SORT_ALBUM,
+	SONG_SORT_ARTIST,
+	SONG_START_TIME,
+	SONG_STOP_TIME,
+	SONG_TIME,
+	SONG_TRACK_COUNT,
+	SONG_TRACK_NUMBER,
+	SONG_USER_RATING,
+	SONG_YEAR,
+	SONG_HAS_VIDEO,
+	SONG_SMART_PLAYLIST,
+	SONG_IS_PODCAST_PLAYLIST,
+	SONG_SPECIAL_PLAYLIST,
+	SONG_SAVED_GENIUS,
+	SONG_MEDIAKIND,
+	HAS_CHILD_CONTAINERS,
+	PARENT_CONTAINER_ID
+} DAAPMetaData;
+
+static struct DmapMetaDataMap _meta_data_map[] = {
+	{"dmap.itemid", ITEM_ID},
+	{"dmap.itemname", ITEM_NAME},
+	{"dmap.itemkind", ITEM_KIND},
+	{"dmap.persistentid", PERSISTENT_ID},
+	{"dmap.containeritemid", CONTAINER_ITEM_ID},
+	{"daap.songalbum", SONG_ALBUM},
+	{"daap.songartist", SONG_ARTIST},
+	{"daap.songbitrate", SONG_BITRATE},
+	{"daap.songbeatsperminute", SONG_BPM},
+	{"daap.songcomment", SONG_COMMENT},
+	{"daap.songcompilation", SONG_COMPILATION},
+	{"daap.songcomposer", SONG_COMPOSER},
+	{"daap.songdatakind", SONG_DATA_KIND},
+	{"daap.songdataurl", SONG_DATA_URL},
+	{"daap.songdateadded", SONG_DATE_ADDED},
+	{"daap.songdatemodified", SONG_DATE_MODIFIED},
+	{"daap.songdescription", SONG_DESCRIPTION},
+	{"daap.songdisabled", SONG_DISABLED},
+	{"daap.songdisccount", SONG_DISC_COUNT},
+	{"daap.songdiscnumber", SONG_DISC_NUMBER},
+	{"daap.songeqpreset", SONG_EQ_PRESET},
+	{"daap.songformat", SONG_FORMAT},
+	{"daap.songgenre", SONG_GENRE},
+	{"daap.songgrouping", SONG_GROUPING},
+	{"daap.songrelativevolume", SONG_RELATIVE_VOLUME},
+	{"daap.songsamplerate", SONG_SAMPLE_RATE},
+	{"daap.songsize", SONG_SIZE},
+	{"daap.songstarttime", SONG_START_TIME},
+	{"daap.songstoptime", SONG_STOP_TIME},
+	{"daap.songtime", SONG_TIME},
+	{"daap.songtrackcount", SONG_TRACK_COUNT},
+	{"daap.songtracknumber", SONG_TRACK_NUMBER},
+	{"daap.songuserrating", SONG_USER_RATING},
+	{"daap.songyear", SONG_YEAR},
+	{"daap.sortalbum", SONG_SORT_ALBUM},
+	{"daap.sortartist", SONG_SORT_ARTIST},
+	{"com.apple.itunes.has-video", SONG_HAS_VIDEO},
+	{"com.apple.itunes.smart-playlist", SONG_SMART_PLAYLIST},
+	{"com.apple.itunes.is-podcast-playlist", SONG_IS_PODCAST_PLAYLIST},
+	{"com.apple.itunes.special-playlist", SONG_SPECIAL_PLAYLIST},
+	{"com.apple.itunes.saved-genius", SONG_SAVED_GENIUS},
+	{"com.apple.itunes.mediakind", SONG_MEDIAKIND},
+	{"dmap.haschildcontainers", HAS_CHILD_CONTAINERS},
+	{"dmap.parentcontainerid", PARENT_CONTAINER_ID},
+	{NULL, 0}
+};
+
+#define DAAP_ITEM_KIND_AUDIO 2
+#define DAAP_SONG_DATA_KIND_NONE 0
+
+static gboolean
+_should_transcode (DmapAvShare *share,
+                   const gchar *format,
+                   const gboolean has_video,
+                   const gchar *transcode_mimetype)
+{
+	gboolean fnval = FALSE;
+	char *format2 = NULL;
+
+	// Not presently transcoding videos (see also same comments elsewhere).
+	if (TRUE == has_video) {
+		goto done;
+	}
+
+	if (NULL == transcode_mimetype) {
+		goto done;
+	}
+
+	format2 = dmap_utils_mime_to_format (transcode_mimetype);
+	if (NULL == format2) {
+		dmap_share_emit_error(DMAP_SHARE(share), DMAP_STATUS_BAD_FORMAT,
+		                     "Configured to transcode, but target format bad");
+		goto done;
+	}
+
+	if (strcmp (format, format2)) {
+		fnval = TRUE;
+	}
+
+done:
+	g_debug ("    Should%s transcode %s to %s", fnval ? "" : " not", format, format2 ? format2 : "[no target format]");
+
+	g_free(format2);
+
+	return fnval;
+}
+
+static void
+_send_chunked_file (DmapAvShare *share, SoupServer * server, SoupServerMessage * message,
+		   DmapAvRecord * record, guint64 filesize, guint64 offset,
+		   const gchar * transcode_mimetype)
+{
+	gchar *format = NULL;
+	gchar *location = NULL;
+	GInputStream *stream = NULL;
+	gboolean has_video;
+	GError *error = NULL;
+	ChunkData *cd = NULL;
+	gboolean teardown = TRUE;
+
+	cd = g_new0 (ChunkData, 1);
+
+	g_object_get (record, "location", &location, "has-video", &has_video, NULL);
+	if (NULL == location) {
+		dmap_share_emit_error(DMAP_SHARE(share), DMAP_STATUS_RECORD_MISSING_FIELD,
+		                     "Error getting location from record");
+		goto done;
+	}
+
+	/* FIXME: This crashes on powerpc-440fp-linux-gnu:
+	 * g_debug ("Sending %s chunked from offset %" G_GUINT64_FORMAT ".", location, offset);
+	 */
+
+	cd->server = server;
+
+	stream = G_INPUT_STREAM (dmap_av_record_read (record, &error));
+	if (error != NULL) {
+		dmap_share_emit_error(DMAP_SHARE(share), DMAP_STATUS_OPEN_FAILED,
+		                     "Cannot open %s", error->message);
+		goto done;
+	}
+
+	g_object_get (record, "format", &format, NULL);
+	if (NULL == format) {
+		dmap_share_emit_error(DMAP_SHARE(share), DMAP_STATUS_RECORD_MISSING_FIELD,
+		                     "Error getting format from record");
+		goto done;
+	}
+
+	// Not presently transcoding videos (see also same comments elsewhere).
+	if (_should_transcode (share, format, has_video, transcode_mimetype)) {
+#ifdef HAVE_GSTREAMERAPP
+		cd->original_stream = stream;
+		cd->stream = dmap_transcode_stream_new (transcode_mimetype, stream);
+#else
+		dmap_share_emit_error(DMAP_SHARE(share), DMAP_STATUS_BAD_FORMAT,
+		                     "Transcode format %s not supported",
+		                      transcode_mimetype);
+		cd->original_stream = NULL;
+		cd->stream = stream;
+#endif /* HAVE_GSTREAMERAPP */
+	} else {
+		g_debug ("Not transcoding %s", location);
+		cd->original_stream = NULL;
+		cd->stream = stream;
+	}
+
+	if (cd->stream == NULL) {
+		dmap_share_emit_error(DMAP_SHARE(share), DMAP_STATUS_OPEN_FAILED,
+		                     "Could not setup input stream");
+		goto done;
+	}
+
+	if (offset != 0) {
+		if (g_seekable_seek (G_SEEKABLE (cd->stream), offset, G_SEEK_SET, NULL, &error) == FALSE) {
+			dmap_share_emit_error(DMAP_SHARE(share), DMAP_STATUS_SEEK_FAILED,
+			                     "Error seeking: %s.", error->message);
+			goto done;
+		}
+		filesize -= offset;
+	}
+
+	/* Free memory after each chunk sent out over network. */
+	soup_message_body_set_accumulate (soup_server_message_get_response_body(message), FALSE);
+
+	if (! _should_transcode (share, format, has_video, transcode_mimetype)) {
+	        /* NOTE: iTunes seems to require this or it stops reading
+	         * video data after about 2.5MB. Perhaps this is so iTunes
+	         * knows how much data to buffer.
+	         */
+		g_debug ("Using HTTP 1.1 content length encoding.");
+		soup_message_headers_set_encoding (soup_server_message_get_response_headers(message),
+		                                   SOUP_ENCODING_CONTENT_LENGTH);
+
+	        /* NOTE: iTunes 8 (and other versions?) will not seek
+	         * properly without a Content-Length header.
+	         */
+		g_debug ("Content length is %" G_GUINT64_FORMAT ".", filesize);
+		soup_message_headers_set_content_length (soup_server_message_get_response_headers(message), filesize);
+	} else if (soup_server_message_get_http_version (message) == SOUP_HTTP_1_0) {
+		/* NOTE: Roku clients support only HTTP 1.0. */
+		g_debug ("Using HTTP 1.0 encoding.");
+		soup_message_headers_set_encoding (soup_server_message_get_response_headers(message), SOUP_ENCODING_EOF);
+	} else {
+		/* NOTE: Can not provide Content-Length when performing
+		 * real-time transcoding.
+		 */
+		g_debug ("Using HTTP 1.1 chunked encoding.");
+		soup_message_headers_set_encoding (soup_server_message_get_response_headers(message), SOUP_ENCODING_CHUNKED);
+	}
+
+	soup_message_headers_append (soup_server_message_get_response_headers(message), "Connection",
+				     "Close");
+	soup_message_headers_append (soup_server_message_get_response_headers(message),
+				     "Content-Type",
+				     "application/x-dmap-tagged");
+
+	if (0 == g_signal_connect (message, "wrote_headers",
+			           G_CALLBACK (dmap_private_utils_write_next_chunk), cd)) {
+		dmap_share_emit_error(DMAP_SHARE(share), DMAP_STATUS_FAILED,
+		                     "Error connecting to wrote_headers signal");
+		goto done;
+	}
+
+	if (0 == g_signal_connect (message, "wrote_chunk",
+			  G_CALLBACK (dmap_private_utils_write_next_chunk), cd)) {
+		dmap_share_emit_error(DMAP_SHARE(share), DMAP_STATUS_FAILED,
+		                     "Error connecting to wrote_chunk signal");
+		goto done;
+	}
+
+	if (0 == g_signal_connect (message, "finished",
+			  G_CALLBACK (dmap_private_utils_chunked_message_finished), cd)) {
+		dmap_share_emit_error(DMAP_SHARE(share), DMAP_STATUS_FAILED,
+		                     "Error connecting to finished signal");
+		goto done;
+	}
+	/* NOTE: cd g_free'd by chunked_message_finished(). */
+
+	teardown = FALSE;
+
+done:
+	if (teardown) {
+		gboolean ok;
+
+		soup_server_message_set_status (message, SOUP_STATUS_INTERNAL_SERVER_ERROR, NULL);
+
+		if (NULL != cd && NULL != cd->stream) {
+			ok = g_input_stream_close (cd->stream, NULL, &error);
+			if (!ok) {
+				dmap_share_emit_error(DMAP_SHARE(share), DMAP_STATUS_CLOSE_FAILED,
+				                     "Error closing transcode stream: %s.",
+				                      error->message);
+			}
+		}
+
+		g_clear_error(&error);
+
+		if (NULL != stream) {
+			ok = g_input_stream_close (stream, NULL, &error);
+			if (!ok) {
+				dmap_share_emit_error(DMAP_SHARE(share), DMAP_STATUS_CLOSE_FAILED,
+				                     "Error closing stream: %s.",
+				                      error->message);
+			}
+		}
+
+		g_free (cd);
+	}
+
+
+	g_free (location);
+	g_free (format);
+
+	if (NULL != error) {
+		g_error_free(error);
+	}
+
+	return;
+}
+
+static void
+_add_entry_to_mlcl (guint id, DmapRecord * record, gpointer _mb)
+{
+	GNode *mlit;
+	gboolean has_video = 0;
+	struct DmapMlclBits *mb = (struct DmapMlclBits *) _mb;
+
+	mlit = dmap_structure_add (mb->mlcl, DMAP_CC_MLIT);
+	g_object_get (record, "has-video", &has_video, NULL);
+
+	if (dmap_share_client_requested (mb->bits, ITEM_KIND)) {
+		dmap_structure_add (mlit, DMAP_CC_MIKD,
+				    (gchar) DAAP_ITEM_KIND_AUDIO);
+	}
+
+	if (dmap_share_client_requested (mb->bits, ITEM_ID)) {
+		dmap_structure_add (mlit, DMAP_CC_MIID, id);
+	}
+
+	if (dmap_share_client_requested (mb->bits, ITEM_NAME)) {
+		gchar *title = NULL;
+
+		g_object_get (record, "title", &title, NULL);
+		if (title) {
+			dmap_structure_add (mlit, DMAP_CC_MINM, title);
+			g_free (title);
+		} else {
+			g_debug ("Title requested but not available");
+		}
+	}
+
+	if (dmap_share_client_requested (mb->bits, PERSISTENT_ID)) {
+		dmap_structure_add (mlit, DMAP_CC_MPER, id);
+	}
+
+	if (dmap_share_client_requested (mb->bits, CONTAINER_ITEM_ID)) {
+		dmap_structure_add (mlit, DMAP_CC_MCTI, id);
+	}
+
+	if (dmap_share_client_requested (mb->bits, SONG_DATA_KIND)) {
+		dmap_structure_add (mlit, DMAP_CC_ASDK,
+				    (gchar) DAAP_SONG_DATA_KIND_NONE);
+	}
+
+	/* FIXME: Any use for this?
+	 * if (dmap_share_client_requested (mb->bits, SONG_DATA_URL))
+	 * dmap_structure_add (mlit, DMAP_CC_ASUL, "daap://192.168.0.100:%u/databases/1/items/%d.%s?session-id=%s", data->port, *id, dmap_av_record_get_format (DMAP_AV_RECORD (record)), data->session_id);
+	 */
+	if (dmap_share_client_requested (mb->bits, SONG_ALBUM)) {
+		gchar *album = NULL;
+
+		g_object_get (record, "songalbum", &album, NULL);
+		if (album) {
+			dmap_structure_add (mlit, DMAP_CC_ASAL, album);
+			g_free (album);
+		} else {
+			g_debug ("Album requested but not available");
+		}
+	}
+
+	if (dmap_share_client_requested (mb->bits, SONG_GROUPING)) {
+		dmap_structure_add (mlit, DMAP_CC_AGRP, "");
+	}
+
+	if (dmap_share_client_requested (mb->bits, SONG_ARTIST)) {
+		gchar *artist = NULL;
+
+		g_object_get (record, "songartist", &artist, NULL);
+		if (artist) {
+			dmap_structure_add (mlit, DMAP_CC_ASAR, artist);
+			g_free (artist);
+		} else {
+			g_debug ("Artist requested but not available");
+		}
+	}
+
+	if (dmap_share_client_requested (mb->bits, SONG_BITRATE)) {
+		gint32 bitrate = 0;
+
+		g_object_get (record, "bitrate", &bitrate, NULL);
+		if (bitrate != 0) {
+			dmap_structure_add (mlit, DMAP_CC_ASBR,
+					    (gint32) bitrate);
+		}
+	}
+
+	if (dmap_share_client_requested (mb->bits, SONG_BPM)) {
+		dmap_structure_add (mlit, DMAP_CC_ASBT, (gint32) 0);
+	}
+
+	if (dmap_share_client_requested (mb->bits, SONG_COMMENT)) {
+		dmap_structure_add (mlit, DMAP_CC_ASCM, "");
+	}
+
+	if (dmap_share_client_requested (mb->bits, SONG_COMPILATION)) {
+		dmap_structure_add (mlit, DMAP_CC_ASCO, (gchar) FALSE);
+	}
+
+	if (dmap_share_client_requested (mb->bits, SONG_COMPOSER)) {
+		dmap_structure_add (mlit, DMAP_CC_ASCP, "");
+	}
+
+	if (dmap_share_client_requested (mb->bits, SONG_DATE_ADDED)) {
+		gint32 firstseen = 0;
+
+		g_object_get (record, "firstseen", &firstseen, NULL);
+		dmap_structure_add (mlit, DMAP_CC_ASDA, firstseen);
+	}
+
+	if (dmap_share_client_requested (mb->bits, SONG_DATE_MODIFIED)) {
+		gint32 mtime = 0;
+
+		g_object_get (record, "mtime", &mtime, NULL);
+		dmap_structure_add (mlit, DMAP_CC_ASDM, mtime);
+	}
+
+	if (dmap_share_client_requested (mb->bits, SONG_DISC_COUNT)) {
+		dmap_structure_add (mlit, DMAP_CC_ASDC, (gint32) 0);
+	}
+
+	if (dmap_share_client_requested (mb->bits, SONG_DISC_NUMBER)) {
+		gint32 disc = 0;
+
+		g_object_get (record, "disc", &disc, NULL);
+		dmap_structure_add (mlit, DMAP_CC_ASDN, disc);
+	}
+
+	if (dmap_share_client_requested (mb->bits, SONG_DISABLED)) {
+		dmap_structure_add (mlit, DMAP_CC_ASDB, (gchar) FALSE);
+	}
+
+	if (dmap_share_client_requested (mb->bits, SONG_EQ_PRESET)) {
+		dmap_structure_add (mlit, DMAP_CC_ASEQ, "");
+	}
+
+	if (dmap_share_client_requested (mb->bits, SONG_FORMAT)) {
+		gchar *format = NULL;
+		gchar *transcode_mimetype = NULL;
+
+		g_object_get (mb->share, "transcode-mimetype",
+			      &transcode_mimetype, NULL);
+		// Not presently transcoding videos (see also same comments elsewhere).
+		if (! has_video && transcode_mimetype) {
+			format = dmap_utils_mime_to_format (transcode_mimetype);
+			g_free (transcode_mimetype);
+		} else {
+			g_object_get (record, "format", &format, NULL);
+		}
+		if (format) {
+			dmap_structure_add (mlit, DMAP_CC_ASFM, format);
+			g_free (format);
+		} else {
+			g_debug ("Format requested but not available");
+		}
+	}
+
+	if (dmap_share_client_requested (mb->bits, SONG_GENRE)) {
+		gchar *genre = NULL;
+
+		g_object_get (record, "songgenre", &genre, NULL);
+		if (genre) {
+			dmap_structure_add (mlit, DMAP_CC_ASGN, genre);
+			g_free (genre);
+		} else {
+			g_debug ("Genre requested but not available");
+		}
+	}
+
+	if (dmap_share_client_requested (mb->bits, SONG_DESCRIPTION)) {
+		dmap_structure_add (mlit, DMAP_CC_ASDT, "");	/* FIXME: e.g., wav audio file */
+	}
+
+	if (dmap_share_client_requested (mb->bits, SONG_RELATIVE_VOLUME)) {
+		dmap_structure_add (mlit, DMAP_CC_ASRV, 0);
+	}
+
+	if (dmap_share_client_requested (mb->bits, SONG_SAMPLE_RATE)) {
+		dmap_structure_add (mlit, DMAP_CC_ASSR, 0);
+	}
+
+	if (dmap_share_client_requested (mb->bits, SONG_SIZE)) {
+		guint64 filesize = 0;
+
+		g_object_get (record, "filesize", &filesize, NULL);
+		dmap_structure_add (mlit, DMAP_CC_ASSZ, (gint32) filesize);
+	}
+
+	if (dmap_share_client_requested (mb->bits, SONG_START_TIME)) {
+		dmap_structure_add (mlit, DMAP_CC_ASST, 0);
+	}
+
+	if (dmap_share_client_requested (mb->bits, SONG_STOP_TIME)) {
+		dmap_structure_add (mlit, DMAP_CC_ASSP, 0);
+	}
+
+	if (dmap_share_client_requested (mb->bits, SONG_TIME)) {
+		gint32 duration;
+
+		g_object_get (record, "duration", &duration, NULL);
+		dmap_structure_add (mlit, DMAP_CC_ASTM, (1000 * duration));
+	}
+
+	if (dmap_share_client_requested (mb->bits, SONG_TRACK_COUNT)) {
+		dmap_structure_add (mlit, DMAP_CC_ASTC, 0);
+	}
+
+	if (dmap_share_client_requested (mb->bits, SONG_TRACK_NUMBER)) {
+		gint32 track = 0;
+
+		g_object_get (record, "track", &track, NULL);
+		dmap_structure_add (mlit, DMAP_CC_ASTN, track);
+	}
+
+	if (dmap_share_client_requested (mb->bits, SONG_USER_RATING)) {
+		gint32 rating = 0;
+
+		g_object_get (record, "rating", &rating, NULL);
+		dmap_structure_add (mlit, DMAP_CC_ASUR, rating);
+	}
+
+	if (dmap_share_client_requested (mb->bits, SONG_YEAR)) {
+		gint32 year = 0;
+
+		g_object_get (record, "year", &year, NULL);
+		dmap_structure_add (mlit, DMAP_CC_ASYR, year);
+	}
+
+	if (dmap_share_client_requested (mb->bits, SONG_HAS_VIDEO)) {
+		dmap_structure_add (mlit, DMAP_CC_AEHV, has_video);
+	}
+
+	if (dmap_share_client_requested (mb->bits, SONG_SORT_ARTIST)) {
+		gchar *sort_artist = NULL;
+
+		g_object_get (record, "sort-artist", &sort_artist, NULL);
+		if (sort_artist) {
+			dmap_structure_add (mlit, DMAP_CC_ASSA, sort_artist);
+			g_free (sort_artist);
+		} else {
+			g_debug ("Sort artist requested but not available");
+		}
+	}
+
+	if (dmap_share_client_requested (mb->bits, SONG_SORT_ALBUM)) {
+		gchar *sort_album = NULL;
+
+		g_object_get (record, "sort-album", &sort_album, NULL);
+		if (sort_album) {
+			dmap_structure_add (mlit, DMAP_CC_ASSU, sort_album);
+			g_free (sort_album);
+		} else {
+			g_debug ("Sort album requested but not available");
+		}
+	}
+
+	if (dmap_share_client_requested (mb->bits, SONG_MEDIAKIND)) {
+		gint mediakind = 0;
+
+		g_object_get (record, "mediakind", &mediakind, NULL);
+		dmap_structure_add (mlit, DMAP_CC_AEMK, mediakind);
+	}
+}
+
+static void
+_genre_tabulator (G_GNUC_UNUSED gpointer id, DmapRecord *record, GHashTable *ht)
+{
+	const gchar *genre;
+
+	g_object_get (record, "songgenre", &genre, NULL);
+	if (!genre) {
+		return;
+	}
+
+	if (!g_hash_table_lookup (ht, genre)) {
+		gboolean ok;
+
+		ok = g_hash_table_insert (ht, (gchar *) genre, NULL);
+		if (!ok) {
+			g_warning("error inserting %s", genre);
+		}
+	}
+}
+
+static void
+_artist_tabulator (G_GNUC_UNUSED gpointer id, DmapRecord * record, GHashTable * ht)
+{
+	const gchar *artist;
+
+	g_object_get (record, "songartist", &artist, NULL);
+	if (!artist) {
+		return;
+	}
+
+	if (!g_hash_table_lookup (ht, artist)) {
+		gboolean ok;
+
+		ok = g_hash_table_insert (ht, (gchar *) artist, NULL);
+		if (!ok) {
+			g_warning("error inserting %s", artist);
+		}
+	}
+}
+
+static void
+_album_tabulator (G_GNUC_UNUSED gpointer id, DmapRecord * record, GHashTable * ht)
+{
+	const gchar *album;
+
+	g_object_get (record, "songalbum", &album, NULL);
+	if (!album) {
+		return;
+	}
+
+	if (!g_hash_table_lookup (ht, album)) {
+		gboolean ok;
+
+		ok = g_hash_table_insert (ht, (gchar *) album, NULL);
+		if (!ok) {
+			g_warning("error inserting %s", album);
+		}
+	}
+}
+
+static void
+_add_to_category_listing (gpointer key, gpointer user_data)
+{
+	GNode *mlit;
+	GNode *node = (GNode *) user_data;
+
+	mlit = dmap_structure_add (node, DMAP_CC_MLIT);
+	dmap_structure_add (mlit, DMAP_RAW, (char *) key);
+}
+
+static void
+_databases_browse_xxx (DmapShare * share,
+                       SoupServerMessage * msg,
+                       const char *path,
+                       GHashTable * query)
+{
+	/* ABRO database browse
+	 *      MSTT status
+	 *      MUTY update type
+	 *      MTCO specified total count
+	 *      MRCO returned count
+	 *      ABGN genre listing
+	 *              MLIT listing item
+	 *              ...
+	 */
+	DmapDb *db;
+	const gchar *rest_of_path;
+	GNode *abro, *node;
+	gchar *filter;
+	GSList *filter_def;
+	GHashTable *filtered;
+	guint num_genre;
+	const gchar *browse_category;
+	GHashTable *category_items;
+	DmapContentCode category_cc;
+	GList *values;
+
+	rest_of_path = strchr (path + 1, '/');
+	browse_category = rest_of_path + 10;
+	category_items = g_hash_table_new (g_str_hash, g_str_equal);
+
+	filter = g_hash_table_lookup (query, "filter");
+	filter_def = dmap_share_build_filter (filter);
+	g_object_get (share, "db", &db, NULL);
+	filtered = dmap_db_apply_filter (db, filter_def);
+
+	if (g_ascii_strcasecmp (browse_category, "genres") == 0) {
+		g_hash_table_foreach (filtered, (GHFunc) _genre_tabulator,
+				      category_items);
+		category_cc = DMAP_CC_ABGN;
+	} else if (g_ascii_strcasecmp (browse_category, "artists") == 0) {
+		g_hash_table_foreach (filtered, (GHFunc) _artist_tabulator,
+				      category_items);
+		category_cc = DMAP_CC_ABAR;
+	} else if (g_ascii_strcasecmp (browse_category, "albums") == 0) {
+		g_hash_table_foreach (filtered, (GHFunc) _album_tabulator,
+				      category_items);
+		category_cc = DMAP_CC_ABAL;
+	} else {
+		dmap_share_emit_error(share, DMAP_STATUS_BAD_BROWSE_CATEGORY,
+		                     "Unsupported browse category: %s",
+		                      browse_category);
+		goto _bad_category;
+	}
+
+	abro = dmap_structure_add (NULL, DMAP_CC_ABRO);
+	dmap_structure_add (abro, DMAP_CC_MSTT, (gint32) SOUP_STATUS_OK);
+	dmap_structure_add (abro, DMAP_CC_MUTY, 0);
+
+	num_genre = g_hash_table_size (category_items);
+	dmap_structure_add (abro, DMAP_CC_MTCO, (gint32) num_genre);
+	dmap_structure_add (abro, DMAP_CC_MRCO, (gint32) num_genre);
+
+	node = dmap_structure_add (abro, category_cc);
+
+	values = g_hash_table_get_keys (category_items);
+	if (values && g_hash_table_lookup (query, "include-sort-headers")) {
+		g_debug ("Sorting...");
+		values = g_list_sort (values,
+				      (GCompareFunc) g_ascii_strcasecmp);
+	}
+
+	g_list_foreach (values, _add_to_category_listing, node);
+
+	g_list_free (values);
+
+	dmap_share_message_set_from_dmap_structure (share, msg, abro);
+	dmap_structure_destroy (abro);
+      _bad_category:
+	dmap_share_free_filter (filter_def);
+	/* Free's hash table but not data (points into real DB): */
+	g_hash_table_destroy (filtered);
+	g_hash_table_destroy (category_items);
+}
+
+static void
+_databases_items_xxx (DmapShare * share,
+                      SoupServer * server,
+                      SoupServerMessage * msg,
+                      const char *path)
+{
+	DmapDb *db = NULL;
+	DmapAvRecord *record = NULL;
+	gchar *transcode_mimetype = NULL;
+	const gchar *rest_of_path;
+	const gchar *id_str;
+	guint id;
+	const gchar *range_header;
+	guint64 filesize = 0;
+	guint64 offset = 0;
+
+	rest_of_path = strchr (path + 1, '/');
+	id_str = rest_of_path + 9;
+	id = strtoul (id_str, NULL, 10);
+
+	g_object_get (share, "db", &db, NULL);
+
+	record = DMAP_AV_RECORD (dmap_db_lookup_by_id (db, id));
+	if (NULL == record) {
+		g_signal_emit_by_name(share, "error",
+			g_error_new(DMAP_ERROR,
+			            DMAP_STATUS_DB_BAD_ID,
+			           "Bad record identifier requested"));
+		soup_server_message_set_status (msg, SOUP_STATUS_NOT_FOUND, NULL);
+		goto done;
+	}
+
+	g_object_get (record, "filesize", &filesize, NULL);
+
+	DMAP_SHARE_GET_CLASS (share)->message_add_standard_headers
+		(share, msg);
+	soup_message_headers_append (soup_server_message_get_response_headers(msg), "Accept-Ranges",
+				     "bytes");
+
+	range_header =
+		soup_message_headers_get_one (soup_server_message_get_request_headers(msg), "Range");
+	if (range_header) {
+		const gchar *s;
+		gchar *content_range;
+
+		if (!g_str_has_prefix (range_header, "bytes=")) {
+			/* Not starting with "bytes=" ? */
+			offset = 0;
+		} else {
+			s = range_header + strlen ("bytes=");	/* bytes= */
+			offset = atoll (s);
+		}
+
+		content_range =
+			g_strdup_printf ("bytes %" G_GUINT64_FORMAT "-%"
+					 G_GUINT64_FORMAT "/%"
+					 G_GUINT64_FORMAT, offset, filesize,
+					 filesize);
+		soup_message_headers_append (soup_server_message_get_response_headers(msg),
+					     "Content-Range", content_range);
+		g_debug ("Content range is %s.", content_range);
+		g_free (content_range);
+		soup_server_message_set_status (msg, SOUP_STATUS_PARTIAL_CONTENT, NULL);
+	} else {
+		soup_server_message_set_status (msg, SOUP_STATUS_OK, NULL);
+	}
+	g_object_get (share, "transcode-mimetype", &transcode_mimetype, NULL);
+	_send_chunked_file (DMAP_AV_SHARE(share), server, msg, record, filesize,
+	                    offset, transcode_mimetype);
+
+done:
+	if (NULL != record) {
+		g_object_unref (record);
+	}
+
+	if (NULL != db) {
+		g_object_unref (db);
+	}
+
+	g_free(transcode_mimetype);
+}
+
+static struct DmapMetaDataMap *
+_get_meta_data_map (G_GNUC_UNUSED DmapShare * share)
+{
+	return _meta_data_map;
+}
+
+#ifdef HAVE_CHECK
+
+#include <check.h>
+#include <libdmapsharing/test-dmap-db.h>
+#include <libdmapsharing/test-dmap-av-record.h>
+#include <libdmapsharing/test-dmap-container-db.h>
+#include <libdmapsharing/test-dmap-container-record.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+static DmapShare *
+_build_share_test(char *name)
+{
+	DmapDb *db;
+	DmapContainerRecord *container_record;
+	DmapContainerDb *container_db;
+	DmapRecord *record;
+	DmapShare *share;
+	struct stat statbuf;
+
+	db = DMAP_DB(test_dmap_db_new());
+	container_record = DMAP_CONTAINER_RECORD (test_dmap_container_record_new ());
+	container_db = DMAP_CONTAINER_DB(test_dmap_container_db_new(container_record));
+
+	if (-1 == stat("/etc/services", &statbuf)) {
+		ck_abort();
+	}
+
+	record = DMAP_RECORD(test_dmap_av_record_new());
+	g_object_set(record, "songgenre", "genre1", NULL);
+	g_object_set(record, "songartist", "artist1", NULL);
+	g_object_set(record, "songalbum", "album1", NULL);
+	g_object_set(record, "location", "file:///etc/services", NULL);
+	g_object_set(record, "filesize", statbuf.st_size, NULL);
+
+	dmap_db_add(db, record, NULL);
+
+	if (-1 == stat("/etc/group", &statbuf)) {
+		ck_abort();
+	}
+
+	record = DMAP_RECORD(test_dmap_av_record_new());
+	g_object_set(record, "songgenre", "genre2", NULL);
+	g_object_set(record, "songartist", "artist2", NULL);
+	g_object_set(record, "songalbum", "album2", NULL);
+	g_object_set(record, "location", "file:///etc/group", NULL);
+	g_object_set(record, "filesize", statbuf.st_size, NULL);
+
+	dmap_db_add(db, record, NULL);
+
+	share  = DMAP_SHARE(dmap_av_share_new(name,
+	                                   NULL,
+	                                   db,
+	                                   container_db,
+	                                   NULL));
+
+	g_object_unref(db);
+	g_object_unref(container_record);
+	g_object_unref(container_db);
+
+	return share;
+}
+
+START_TEST(_get_meta_data_map_test)
+{
+	ck_assert_ptr_eq(_meta_data_map, _get_meta_data_map(NULL));
+}
+END_TEST
+
+START_TEST(_new_test)
+{
+	DmapDb *db;
+	DmapContainerRecord *container_record;
+	DmapContainerDb *container_db;
+	DmapRecord *record;
+	DmapShare *share;
+	char *str;
+
+	db = DMAP_DB(test_dmap_db_new());
+	container_record = DMAP_CONTAINER_RECORD (test_dmap_container_record_new ());
+	container_db = DMAP_CONTAINER_DB(test_dmap_container_db_new(container_record));
+
+
+	record = DMAP_RECORD(test_dmap_av_record_new());
+	g_object_set(record, "songgenre", "genre1", NULL);
+	g_object_set(record, "songartist", "artist1", NULL);
+	g_object_set(record, "songalbum", "album1", NULL);
+
+	dmap_db_add(db, record, NULL);
+
+	share = DMAP_SHARE(dmap_av_share_new("name",
+	                                     "password",
+	                                      db,
+	                                      container_db,
+	                                     "audio/mp3"));
+
+	g_object_get(share, "name", &str, NULL);
+	ck_assert_str_eq("name", str);
+	g_free(str);
+
+	g_object_get(share, "password", &str, NULL);
+	ck_assert_str_eq("password", str);
+	g_free(str);
+
+	g_object_get(share, "transcode-mimetype", &str, NULL);
+	ck_assert_str_eq("audio/mp3", str);
+	g_free(str);
+
+	g_object_unref(db);
+	g_object_unref(container_record);
+	g_object_unref(container_db);
+	g_object_unref(share);
+}
+END_TEST
+
+START_TEST(_serve_publish_test)
+{
+	DmapDb *db;
+	gboolean ok;
+	DmapContainerRecord *container_record;
+	DmapContainerDb *container_db;
+	DmapRecord *record;
+	DmapShare *share;
+
+	db = DMAP_DB(test_dmap_db_new());
+	container_record = DMAP_CONTAINER_RECORD (test_dmap_container_record_new ());
+	container_db = DMAP_CONTAINER_DB(test_dmap_container_db_new(container_record));
+
+
+	record = DMAP_RECORD(test_dmap_av_record_new());
+	g_object_set(record, "songgenre", "genre1", NULL);
+	g_object_set(record, "songartist", "artist1", NULL);
+	g_object_set(record, "songalbum", "album1", NULL);
+
+	dmap_db_add(db, record, NULL);
+
+	share = DMAP_SHARE(dmap_av_share_new("name",
+	                                     "password",
+	                                      db,
+	                                      container_db,
+	                                     "audio/mp3"));
+
+	ok = dmap_share_serve(share, NULL);
+	ck_assert(ok);
+
+	ok = dmap_share_publish(share, NULL);
+	ck_assert(ok);
+
+	g_object_unref(db);
+	g_object_unref(container_record);
+	g_object_unref(container_db);
+	g_object_unref(share);
+}
+END_TEST
+
+START_TEST(_serve_publish_collision_test)
+{
+	DmapDb *db;
+	gboolean ok;
+	DmapContainerRecord *container_record;
+	DmapContainerDb *container_db;
+	DmapRecord *record;
+	DmapShare *share1, *share2;
+
+	db = DMAP_DB(test_dmap_db_new());
+	container_record = DMAP_CONTAINER_RECORD (test_dmap_container_record_new ());
+	container_db = DMAP_CONTAINER_DB(test_dmap_container_db_new(container_record));
+
+
+	record = DMAP_RECORD(test_dmap_av_record_new());
+	g_object_set(record, "songgenre", "genre1", NULL);
+	g_object_set(record, "songartist", "artist1", NULL);
+	g_object_set(record, "songalbum", "album1", NULL);
+
+	dmap_db_add(db, record, NULL);
+
+	share1 = DMAP_SHARE(dmap_av_share_new("name",
+	                                      "password",
+	                                       db,
+	                                       container_db,
+	                                      "audio/mp3"));
+
+	ok = dmap_share_serve(share1, NULL);
+	ck_assert(ok);
+
+	ok = dmap_share_publish(share1, NULL);
+	ck_assert(ok);
+
+	share2 = DMAP_SHARE(dmap_av_share_new("name",
+	                                      "password",
+	                                       db,
+	                                       container_db,
+	                                      "audio/mp3"));
+
+	ok = dmap_share_serve(share2, NULL);
+	ck_assert(ok);
+
+	ok = dmap_share_publish(share2, NULL);
+	ck_assert(ok);
+
+	g_object_unref(db);
+	g_object_unref(container_record);
+	g_object_unref(container_db);
+	g_object_unref(share1);
+	g_object_unref(share2);
+}
+END_TEST
+
+static void
+_tabulator_test(char *property,
+                void (*tabulator) (gpointer id, DmapRecord * record, GHashTable * ht))
+{
+	guint id1, id2;
+	DmapRecord *record1, *record2;
+	DmapDb *db;
+	GHashTable *ht;
+	gboolean ok;
+
+	db = DMAP_DB(test_dmap_db_new());
+
+	record1 = DMAP_RECORD(test_dmap_av_record_new());
+	g_object_set(record1, property, "str1", NULL);
+
+	id1 = dmap_db_add(db, record1, NULL);
+
+	record2 = DMAP_RECORD(test_dmap_av_record_new());
+	g_object_set(record2, property, "str2", NULL);
+
+	id2 = dmap_db_add(db, record2, NULL);
+
+	ht = g_hash_table_new (g_str_hash, g_str_equal);
+
+	tabulator (GINT_TO_POINTER(id1), record1, ht);
+	tabulator (GINT_TO_POINTER(id2), record2, ht);
+
+	ok = g_hash_table_contains(ht, "str1");
+	ck_assert_int_eq(TRUE, ok);
+
+	ok = g_hash_table_contains(ht, "str2");
+	ck_assert_int_eq(TRUE, ok);
+
+	g_object_unref(record1);
+	g_object_unref(record2);
+	g_object_unref(db);
+	g_hash_table_destroy(ht);
+}
+
+START_TEST(_genre_tabulator_test)
+{
+	_tabulator_test("songgenre", _genre_tabulator);
+}
+END_TEST
+
+START_TEST(_artist_tabulator_test)
+{
+	_tabulator_test("songartist", _artist_tabulator);
+}
+END_TEST
+
+START_TEST(_album_tabulator_test)
+{
+	_tabulator_test("songalbum", _album_tabulator);
+}
+END_TEST
+
+static int _status = DMAP_STATUS_OK;
+
+static void
+_error_cb(G_GNUC_UNUSED DmapShare *share, GError *error, G_GNUC_UNUSED gpointer user_data)
+{
+	_status = error->code;
+}
+
+START_TEST(_should_transcode_test_no)
+{
+	_status = DMAP_STATUS_OK;
+	DmapAvShare *share = dmap_av_share_new("test", NULL, NULL, NULL, NULL);
+	g_signal_connect(share, "error", G_CALLBACK(_error_cb), NULL);
+	ck_assert_int_eq(FALSE, _should_transcode(share, "mp3", TRUE, "audio/wav"));
+	ck_assert_int_eq(DMAP_STATUS_OK, _status);
+}
+END_TEST
+
+START_TEST(_should_transcode_test_no_trancode_mimetype)
+{
+	_status = DMAP_STATUS_OK;
+	DmapAvShare *share = dmap_av_share_new("test", NULL, NULL, NULL, NULL);
+	g_signal_connect(share, "error", G_CALLBACK(_error_cb), NULL);
+	ck_assert_int_eq(FALSE, _should_transcode(share, "foo", FALSE, NULL));
+	ck_assert_int_eq(DMAP_STATUS_OK, _status);
+}
+END_TEST
+
+START_TEST(_should_transcode_test_no_trancode_mimetype_unknown_mimetype)
+{
+	_status = DMAP_STATUS_OK;
+	DmapAvShare *share = dmap_av_share_new("test", NULL, NULL, NULL, NULL);
+	g_signal_connect(share, "error", G_CALLBACK(_error_cb), NULL);
+	ck_assert_int_eq(FALSE, _should_transcode(share, "mp3", FALSE, "foo"));
+	ck_assert_int_eq(DMAP_STATUS_BAD_FORMAT, _status);
+}
+END_TEST
+
+START_TEST(_should_transcode_test_no_trancode_mimetype_already_good)
+{
+	_status = DMAP_STATUS_OK;
+	DmapAvShare *share = dmap_av_share_new("test", NULL, NULL, NULL, NULL);
+	g_signal_connect(share, "error", G_CALLBACK(_error_cb), NULL);
+	ck_assert_int_eq(FALSE, _should_transcode(share, "mp3", FALSE, "audio/mp3"));
+	ck_assert_int_eq(DMAP_STATUS_OK, _status);
+}
+END_TEST
+
+START_TEST(_should_transcode_test_yes_trancode_mimetype_to_wav)
+{
+	_status = DMAP_STATUS_OK;
+	DmapAvShare *share = dmap_av_share_new("test", NULL, NULL, NULL, NULL);
+	g_signal_connect(share, "error", G_CALLBACK(_error_cb), NULL);
+	ck_assert_int_eq(TRUE, _should_transcode(share, "mp3", FALSE, "audio/wav"));
+	ck_assert_int_eq(DMAP_STATUS_OK, _status);
+}
+END_TEST
+
+START_TEST(_should_transcode_test_yes_trancode_mimetype_to_mp3)
+{
+	_status = DMAP_STATUS_OK;
+	DmapAvShare *share = dmap_av_share_new("test", NULL, NULL, NULL, NULL);
+	g_signal_connect(share, "error", G_CALLBACK(_error_cb), NULL);
+	ck_assert_int_eq(TRUE, _should_transcode(share, "wav", FALSE, "audio/mp3"));
+	ck_assert_int_eq(DMAP_STATUS_OK, _status);
+}
+END_TEST
+
+START_TEST(_should_transcode_test_yes_trancode_mimetype_to_mp4)
+{
+	_status = DMAP_STATUS_OK;
+	DmapAvShare *share = dmap_av_share_new("test", NULL, NULL, NULL, NULL);
+	g_signal_connect(share, "error", G_CALLBACK(_error_cb), NULL);
+	ck_assert_int_eq(TRUE, _should_transcode(share, "wav", FALSE, "video/quicktime"));
+	ck_assert_int_eq(DMAP_STATUS_OK, _status);
+}
+END_TEST
+
+START_TEST(_get_desired_port_test)
+{
+	DmapShare *share = _build_share_test("_get_desired_port_test");
+	ck_assert_int_eq(DAAP_PORT, _get_desired_port(share));
+	g_object_unref(share);
+}
+END_TEST
+
+START_TEST(_get_type_of_service_test)
+{
+	DmapShare *share = _build_share_test("_get_type_of_service_test");
+	ck_assert_str_eq(DAAP_TYPE_OF_SERVICE, _get_type_of_service(share));
+	g_object_unref(share);
+}
+END_TEST
+
+START_TEST(_server_info_test)
+{
+	char *nameprop = "_server_info_test";
+	DmapShare *share;
+	SoupServerMessage *message;
+	SoupMessageBody *body;
+	GBytes *buffer;
+	const guint8 *data;
+	gsize length;
+	GNode *root;
+	DmapStructureItem *item;
+
+	share   = _build_share_test(nameprop);
+	message = g_object_new (SOUP_TYPE_SERVER_MESSAGE, NULL);
+
+	/* Causes auth. method to be set to DMAP_SHARE_AUTH_METHOD_PASSWORD. */
+	g_object_set(share, "password", "password", NULL);
+
+	_server_info(share, message, "/");
+
+	body = soup_server_message_get_response_body(message);
+	buffer = soup_message_body_flatten(body);
+	data = g_bytes_get_data(buffer, &length);
+
+	root = dmap_structure_parse(data, length, NULL);
+
+	item = dmap_structure_find_item(root, DMAP_CC_MSTT);
+	ck_assert_int_eq(SOUP_STATUS_OK, item->content.data->v_int);
+
+	item = dmap_structure_find_item(root, DMAP_CC_MPRO);
+	ck_assert_int_eq(DAAP_VERSION, item->content.data->v_double);
+
+	item = dmap_structure_find_item(root, DMAP_CC_APRO);
+	ck_assert_int_eq(DAAP_VERSION, item->content.data->v_double);
+
+	item = dmap_structure_find_item(root, DMAP_CC_MINM);
+	ck_assert_str_eq(nameprop, item->content.data->v_pointer);
+
+	item = dmap_structure_find_item(root, DMAP_CC_MSAU);
+	ck_assert_int_eq(DMAP_SHARE_AUTH_METHOD_PASSWORD, item->content.data->v_int);
+
+	item = dmap_structure_find_item(root, DMAP_CC_MSLR);
+	ck_assert_int_eq(0, item->content.data->v_int);
+
+	item = dmap_structure_find_item(root, DMAP_CC_MSTM);
+	ck_assert_int_eq(DAAP_TIMEOUT, item->content.data->v_int);
+
+	item = dmap_structure_find_item(root, DMAP_CC_MSAL);
+	ck_assert_int_eq(0, item->content.data->v_int);
+
+	item = dmap_structure_find_item(root, DMAP_CC_MSUP);
+	ck_assert_int_eq(1, item->content.data->v_int);
+
+	item = dmap_structure_find_item(root, DMAP_CC_MSPI);
+	ck_assert_int_eq(0, item->content.data->v_int);
+
+	item = dmap_structure_find_item(root, DMAP_CC_MSEX);
+	ck_assert_int_eq(0, item->content.data->v_int);
+
+	item = dmap_structure_find_item(root, DMAP_CC_MSBR);
+	ck_assert_int_eq(0, item->content.data->v_int);
+
+	item = dmap_structure_find_item(root, DMAP_CC_MSQY);
+	ck_assert_int_eq(0, item->content.data->v_int);
+
+	item = dmap_structure_find_item(root, DMAP_CC_MSIX);
+	ck_assert_int_eq(0, item->content.data->v_int);
+
+	item = dmap_structure_find_item(root, DMAP_CC_MSRS);
+	ck_assert_int_eq(0, item->content.data->v_int);
+
+	item = dmap_structure_find_item(root, DMAP_CC_MSDC);
+	ck_assert_int_eq(1, item->content.data->v_int);
+
+	g_object_unref(share);
+}
+END_TEST
+
+START_TEST(_message_add_standard_headers_test)
+{
+	const char *header;
+	DmapShare *share;
+	SoupMessage *message;
+	SoupMessageHeaders *headers;
+
+	share = _build_share_test("_message_add_standard_headers_test");
+	message = soup_message_new(SOUP_METHOD_GET, "http://test/");
+
+	soup_message_headers_append(soup_message_get_response_headers(message),
+	                           "DMAP-Server",
+	                           "libdmapsharing" VERSION);
+
+	headers = soup_message_get_response_headers(message);
+	header = soup_message_headers_get_one(headers, "DMAP-Server");
+
+	ck_assert_str_eq("libdmapsharing" VERSION, header);
+
+	g_object_unref(share);
+}
+END_TEST
+
+START_TEST(_databases_browse_xxx_test)
+{
+	char *nameprop = "databases_browse_xxx_test";
+	DmapShare *share;
+	SoupServerMessage *message;
+	GHashTable *query;
+	SoupMessageBody *body;
+	GBytes *buffer;
+	const guint8 *data;
+	gsize length;
+	GNode *root;
+	DmapStructureItem *item;
+
+	share   = _build_share_test(nameprop);
+	message = g_object_new (SOUP_TYPE_SERVER_MESSAGE, NULL);
+	query = g_hash_table_new(g_str_hash, g_str_equal);
+
+	g_hash_table_insert(query, "filter", "");
+
+	_databases_browse_xxx(share, message, "/db/1/browse/genres", query);
+
+	body = soup_server_message_get_response_body(message);
+	buffer = soup_message_body_flatten(body);
+	data = g_bytes_get_data(buffer, &length);
+
+	root = dmap_structure_parse(data, length, NULL);
+
+	item = dmap_structure_find_item(root, DMAP_CC_MSTT);
+	ck_assert_int_eq(SOUP_STATUS_OK, item->content.data->v_int);
+
+	item = dmap_structure_find_item(root, DMAP_CC_MUTY);
+	ck_assert_int_eq(0, item->content.data->v_int);
+
+	item = dmap_structure_find_item(root, DMAP_CC_MTCO);
+	ck_assert_int_eq(2, item->content.data->v_int);
+
+	item = dmap_structure_find_item(root, DMAP_CC_MRCO);
+	ck_assert_int_eq(2, item->content.data->v_int);
+
+	item = dmap_structure_find_item(root, DMAP_CC_ABGN);
+	ck_assert(NULL != item);
+
+	root = dmap_structure_find_node(root, DMAP_CC_MLIT);
+	ck_assert(NULL != root);
+
+	ck_assert_str_eq("genre2",
+                        ((DmapStructureItem *) root->children->data)->content.data->v_pointer);
+	ck_assert_str_eq("genre1",
+                        ((DmapStructureItem *) root->next->children->data)->content.data->v_pointer);
+
+	g_object_unref(share);
+	g_hash_table_destroy(query);
+}
+END_TEST
+
+START_TEST(_databases_browse_xxx_artists_test)
+{
+	char *nameprop = "databases_browse_xxx_artists_test";
+	DmapShare *share;
+	SoupServerMessage *message;
+	GHashTable *query;
+	SoupMessageBody *body;
+	GBytes *buffer;
+	const guint8 *data;
+	gsize length;
+	GNode *root;
+
+	share   = _build_share_test(nameprop);
+	message = g_object_new (SOUP_TYPE_SERVER_MESSAGE, NULL);
+	query = g_hash_table_new(g_str_hash, g_str_equal);
+
+	g_hash_table_insert(query, "filter", "");
+
+	_databases_browse_xxx(share, message, "/db/1/browse/artists", query);
+
+	body = soup_server_message_get_response_body(message);
+	buffer = soup_message_body_flatten(body);
+	data = g_bytes_get_data(buffer, &length);
+
+	root = dmap_structure_parse(data, length, NULL);
+
+	root = dmap_structure_find_node(root, DMAP_CC_MLIT);
+	ck_assert(NULL != root);
+
+	ck_assert_str_eq("artist1",
+                        ((DmapStructureItem *) root->children->data)->content.data->v_pointer);
+	ck_assert_str_eq("artist2",
+                        ((DmapStructureItem *) root->next->children->data)->content.data->v_pointer);
+
+	g_object_unref(share);
+	g_hash_table_destroy(query);
+}
+END_TEST
+
+START_TEST(_databases_browse_xxx_albums_test)
+{
+	char *nameprop = "databases_browse_xxx_albums_test";
+	DmapShare *share;
+	SoupServerMessage *message;
+	GHashTable *query;
+	SoupMessageBody *body;
+	GBytes *buffer;
+	const guint8 *data;
+	gsize length;
+	GNode *root;
+
+	share   = _build_share_test(nameprop);
+	message = g_object_new (SOUP_TYPE_SERVER_MESSAGE, NULL);
+	query = g_hash_table_new(g_str_hash, g_str_equal);
+
+	g_hash_table_insert(query, "filter", "");
+
+	_databases_browse_xxx(share, message, "/db/1/browse/albums", query);
+
+	body = soup_server_message_get_response_body(message);
+	buffer = soup_message_body_flatten(body);
+	data = g_bytes_get_data(buffer, &length);
+
+	root = dmap_structure_parse(data, length, NULL);
+
+	root = dmap_structure_find_node(root, DMAP_CC_MLIT);
+	ck_assert(NULL != root);
+
+	ck_assert_str_eq("album1",
+                        ((DmapStructureItem *) root->children->data)->content.data->v_pointer);
+	ck_assert_str_eq("album2",
+                        ((DmapStructureItem *) root->next->children->data)->content.data->v_pointer);
+
+	g_object_unref(share);
+	g_hash_table_destroy(query);
+}
+END_TEST
+
+START_TEST(_databases_browse_xxx_bad_category_test)
+{
+	char *nameprop = "databases_browse_xxx_bad_category_test";
+	DmapShare *share;
+	SoupServerMessage *message;
+	GHashTable *query;
+	SoupMessageBody *body;
+	GBytes *buffer;
+	const guint8 *data;
+	gsize length;
+	GNode *root;
+
+	share   = _build_share_test(nameprop);
+	message = g_object_new (SOUP_TYPE_SERVER_MESSAGE, NULL);
+	query = g_hash_table_new(g_str_hash, g_str_equal);
+
+	g_hash_table_insert(query, "filter", "");
+
+	_databases_browse_xxx(share, message, "/db/1/browse/bad_category", query);
+
+	body = soup_server_message_get_response_body(message);
+	buffer = soup_message_body_flatten(body);
+	data = g_bytes_get_data(buffer, &length);
+
+	root = dmap_structure_parse(data, length, NULL);
+	ck_assert(NULL == root);
+
+	g_object_unref(share);
+	g_hash_table_destroy(query);
+}
+END_TEST
+
+START_TEST(_databases_items_xxx_test)
+{
+	char *nameprop = "databases_items_xxx_test";
+	DmapShare *share;
+	SoupServer *server;
+	SoupServerMessage *message;
+	SoupMessageBody *body = NULL;
+	GBytes *buffer;
+	char path[PATH_MAX + 1];
+	DmapDb *db = NULL;
+	DmapRecord *record = NULL;
+	gsize size1 = 0, size2 = 0;
+	const guint8 *contents1;
+	char *location, *contents2, *etag_out;
+	GFile *file;
+	GError *error = NULL;
+	gboolean ok;
+	guint64 i;
+
+	share   = _build_share_test(nameprop);
+	server  = soup_server_new(NULL, NULL);
+	message = g_object_new (SOUP_TYPE_SERVER_MESSAGE, NULL);
+
+	g_snprintf(path, sizeof path, "/db/1/items/%d", G_MAXINT);
+
+	_databases_items_xxx(share, server, message, path);
+
+	g_object_get(share, "db", &db, NULL);
+	ck_assert(NULL != db);
+
+	record = dmap_db_lookup_by_id(db, G_MAXINT);
+	ck_assert(NULL != record);
+
+	g_object_get(record, "filesize", &size1, "location", &location, NULL);
+	ck_assert(0 != size1);
+	ck_assert(NULL != location);
+
+	g_signal_emit_by_name(message, "wrote_headers", NULL);
+
+	for (i = 0; i < size1 / DMAP_SHARE_CHUNK_SIZE + 1; i++) {
+		g_signal_emit_by_name(message, "wrote_chunk", NULL);
+	}
+
+	g_signal_emit_by_name(message, "finished", NULL);
+
+	body = soup_server_message_get_response_body(message);
+	ck_assert(NULL != body);
+
+	soup_message_body_set_accumulate (body, TRUE);
+	buffer = soup_message_body_flatten(body);
+	contents1 = g_bytes_get_data(buffer, &size1);
+
+	file = g_file_new_for_uri(location);
+	ck_assert(NULL != file);
+
+	ok = g_file_load_contents(file, NULL, &contents2, &size2, &etag_out, &error);
+	ck_assert(ok);
+
+	ck_assert(size1 == size2);
+	ck_assert(0 == memcmp(contents1, contents2, size1));
+
+	g_object_unref(record);
+	g_object_unref(db);
+	g_object_unref(share);
+}
+END_TEST
+
+START_TEST(_databases_items_xxx_test_bad_id)
+{
+	char *nameprop = "databases_items_xxx_test";
+	DmapShare *share;
+	SoupServer *server;
+	SoupServerMessage *message;
+	char path[PATH_MAX + 1];
+
+	share   = _build_share_test(nameprop);
+	server  = soup_server_new(NULL, NULL);
+	message = g_object_new (SOUP_TYPE_SERVER_MESSAGE, NULL);
+
+	/* IDs go from G_MAXINT down, so 0 does not exist. */
+	g_snprintf(path, sizeof path, "/db/1/items/%d", 0);
+
+	_status = DMAP_STATUS_OK;
+	g_signal_connect(share, "error", G_CALLBACK(_error_cb), NULL);
+	_databases_items_xxx(share, server, message, path);
+	ck_assert_int_eq(DMAP_STATUS_DB_BAD_ID, _status);
+
+	g_object_unref(share);
+}
+END_TEST
+
+#include "dmap-av-share-suite.c"
+
+#endif
diff --git a/libdmapsharing/dmap-av-share.h b/libdmapsharing/dmap-av-share.h
new file mode 100644
index 0000000..34c9ee9
--- /dev/null
+++ b/libdmapsharing/dmap-av-share.h
@@ -0,0 +1,123 @@
+/*
+ * Header for DAAP (e.g., iTunes Music) sharing
+ *
+ * Copyright (C) 2005 Charles Schmidt <cschmidt2@emich.edu>
+ *
+ * Modifications Copyright (C) 2008 W. Michael Petullo <mike@flyn.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ */
+
+#ifndef _DMAP_AV_SHARE_H
+#define _DMAP_AV_SHARE_H
+
+#include <glib-object.h>
+
+#include <libdmapsharing/dmap-share.h>
+#include <libdmapsharing/dmap-db.h>
+#include <libdmapsharing/dmap-container-db.h>
+
+G_BEGIN_DECLS
+/**
+ * SECTION: dmap-av-share
+ * @short_description: A DAAP share.
+ *
+ * #DmapAvShare objects encapsulate a DAAP share.
+ */
+
+/**
+ * DMAP_TYPE_AV_SHARE:
+ *
+ * The type for #DmapAvShare.
+ */
+#define DMAP_TYPE_AV_SHARE         (dmap_av_share_get_type ())
+/**
+ * DMAP_AV_SHARE:
+ * @o: Object which is subject to casting.
+ * 
+ * Casts a #DmapAvShare or derived pointer into a (DmapAvShare*) pointer.
+ * Depending on the current debugging level, this function may invoke
+ * certain runtime checks to identify invalid casts.
+ */
+#define DMAP_AV_SHARE(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), \
+				 DMAP_TYPE_AV_SHARE, DmapAvShare))
+/**
+ * DMAP_AV_SHARE_CLASS:
+ * @k: a valid #DmapAvShareClass
+ *
+ * Casts a derived #DmapAvShareClass structure into a #DmapAvShareClass structure.
+ */
+#define DMAP_AV_SHARE_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), \
+				 DMAP_TYPE_AV_SHARE, DmapAvShareClass))
+/**
+ * DMAP_IS_AV_SHARE:
+ * @o: Instance to check for being a %DMAP_TYPE_AV_SHARE.
+ * 
+ * Checks whether a valid #GTypeInstance pointer is of type %DMAP_TYPE_AV_SHARE.
+ */
+#define DMAP_IS_AV_SHARE(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
+				 DMAP_TYPE_AV_SHARE))
+/**
+ * DMAP_IS_AV_SHARE_CLASS:
+ * @k: a #DmapAvShareClass
+ * 
+ * Checks whether @k "is a" valid #DmapAvShareClass structure of type
+ * %DMAP_AV_SHARE or derived.
+ */
+#define DMAP_IS_AV_SHARE_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), \
+				 DMAP_TYPE_AV_SHARE))
+/**
+ * DMAP_AV_SHARE_GET_CLASS:
+ * @o: a #DmapAvShare instance.
+ * 
+ * Get the class structure associated to a #DmapAvShare instance.
+ *
+ * Returns: pointer to object class structure.
+ */
+#define DMAP_AV_SHARE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
+				 DMAP_TYPE_AV_SHARE, DmapAvShareClass))
+typedef struct DmapAvSharePrivate DmapAvSharePrivate;
+
+typedef struct {
+	DmapShareClass dmap_share_class;
+} DmapAvShareClass;
+
+typedef struct {
+	DmapShare dmap_share_instance;
+	DmapAvSharePrivate *priv;
+} DmapAvShare;
+
+GType dmap_av_share_get_type (void);
+
+/**
+ * dmap_av_share_new:
+ * @name: The name that will be published by mDNS.
+ * @password: (nullable): A share password or NULL.
+ * @db: A media database.
+ * @container_db: A container (album) database.
+ * @transcode_mimetype: (nullable): A transcode mimetype or NULL.
+ * 
+ * Creates a new DAAP share and publishes it using mDNS.
+ *
+ * Returns: a pointer to a DmapAvShare.
+ */
+DmapAvShare *dmap_av_share_new (const char *name, const char *password,
+			   DmapDb * db, DmapContainerDb * container_db,
+			   gchar * transcode_mimetype);
+
+#endif /* _DMAP_AV_SHARE_H */
+
+G_END_DECLS
diff --git a/libdmapsharing/dmap-cc.h b/libdmapsharing/dmap-cc.h
new file mode 100644
index 0000000..decd978
--- /dev/null
+++ b/libdmapsharing/dmap-cc.h
@@ -0,0 +1,190 @@
+#ifndef _DMAP_CC_H
+#define _DMAP_CC_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+typedef enum {
+	DMAP_CC_INVALID = 0,
+	DMAP_RAW,		/* The RAW type does not use a content code.
+				 * Instead of:
+				 * CCCC BYTECOUNT DATA
+				 * RAW sends:
+				 * DATA
+				 */
+	DMAP_CC_MDCL,
+	DMAP_CC_MEDS,
+	DMAP_CC_MSTT,
+	DMAP_CC_MIID,
+	DMAP_CC_MINM,
+	DMAP_CC_MIKD,
+	DMAP_CC_MPER,
+	DMAP_CC_MCON,
+	DMAP_CC_MCTI,
+	DMAP_CC_MPCO,
+	DMAP_CC_MSTS,
+	DMAP_CC_MIMC,
+	DMAP_CC_MCTC,
+	DMAP_CC_MRCO,
+	DMAP_CC_MTCO,
+	DMAP_CC_MLCL,
+	DMAP_CC_MLIT,
+	DMAP_CC_MBCL,
+	DMAP_CC_MSRV,
+	DMAP_CC_MSAU,
+	DMAP_CC_MSLR,
+	DMAP_CC_MPRO,
+	DMAP_CC_MSAL,
+	DMAP_CC_MSUP,
+	DMAP_CC_MSPI,
+	DMAP_CC_MSEX,
+	DMAP_CC_MSBR,
+	DMAP_CC_MSQY,
+	DMAP_CC_MSIX,
+	DMAP_CC_MSRS,
+	DMAP_CC_MSTM,
+	DMAP_CC_MSDC,
+	DMAP_CC_MCCR,
+	DMAP_CC_MCNM,
+	DMAP_CC_MCNA,
+	DMAP_CC_MCTY,
+	DMAP_CC_MLOG,
+	DMAP_CC_MLID,
+	DMAP_CC_MUPD,
+	DMAP_CC_MUSR,
+	DMAP_CC_MUTY,
+	DMAP_CC_MUDL,
+	DMAP_CC_MSMA,
+	DMAP_CC_FQUESCH,
+	DMAP_CC_MDBK,
+
+	DMAP_CC_APRO,
+	DMAP_CC_AVDB,
+	DMAP_CC_ABRO,
+	DMAP_CC_ABAL,
+	DMAP_CC_ABAR,
+	DMAP_CC_ABCP,
+	DMAP_CC_ABGN,
+	DMAP_CC_ADBS,
+	DMAP_CC_ASAL,
+	DMAP_CC_ASAI,
+	DMAP_CC_ASAA,
+	DMAP_CC_ASAR,
+	DMAP_CC_ASBT,
+	DMAP_CC_ASBR,
+	DMAP_CC_ASCM,
+	DMAP_CC_ASCO,
+	DMAP_CC_ASDA,
+	DMAP_CC_ASDM,
+	DMAP_CC_ASDC,
+	DMAP_CC_ASDN,
+	DMAP_CC_ASDB,
+	DMAP_CC_ASEQ,
+	DMAP_CC_ASFM,
+	DMAP_CC_ASGN,
+	DMAP_CC_ASDT,
+	DMAP_CC_ASRV,
+	DMAP_CC_ASSR,
+	DMAP_CC_ASSZ,
+	DMAP_CC_ASST,
+	DMAP_CC_ASSP,
+	DMAP_CC_ASTM,
+	DMAP_CC_ASTC,
+	DMAP_CC_ASTN,
+	DMAP_CC_ASUR,
+	DMAP_CC_ASYR,
+	DMAP_CC_ASDK,
+	DMAP_CC_ASUL,
+	DMAP_CC_ASSU,
+	DMAP_CC_ASSA,
+	DMAP_CC_APLY,
+	DMAP_CC_ABPL,
+	DMAP_CC_APSO,
+	DMAP_CC_PRSV,
+	DMAP_CC_ARIF,
+	DMAP_CC_MSAS,
+	DMAP_CC_AGRP,
+	DMAP_CC_AGAL,
+	DMAP_CC_ASCP,
+	DMAP_CC_PPRO,
+	DMAP_CC_PASP,
+	DMAP_CC_PFDT,
+	DMAP_CC_PICD,
+	DMAP_CC_PIMF,
+	DMAP_CC_PFMT,
+	DMAP_CC_PIFS,
+	DMAP_CC_PLSZ,
+	DMAP_CC_PHGT,
+	DMAP_CC_PWTH,
+	DMAP_CC_PRAT,
+	DMAP_CC_PCMT,
+	DMAP_CC_PRET,
+
+	/* iTunes 6.02+ */
+	DMAP_CC_AECS,
+	DMAP_CC_AESV,
+	DMAP_CC_AEHV,
+
+	DMAP_CC_AESP,
+	DMAP_CC_AEPP,
+	DMAP_CC_AEPS,
+	DMAP_CC_AESG,
+	DMAP_CC_AEMK,
+	DMAP_CC_AEMK2,
+	DMAP_CC_AEFP,
+	DMAP_CC_ATED,
+	DMAP_CC_ASGR,
+	DMAP_CC_AEMQ,
+	DMAP_CC_AESL,
+	DMAP_CC_AESR,
+	DMAP_CC_AETR,
+	DMAP_CC_MSED,
+
+	/* DACP */
+	DMAP_CC_CMPA,
+	DMAP_CC_CMNM,
+	DMAP_CC_CMTY,
+	DMAP_CC_CMPG,
+
+	DMAP_CC_CACI,
+	DMAP_CC_CAPS,
+	DMAP_CC_CASH,
+	DMAP_CC_CARP,
+	DMAP_CC_CAAS,
+	DMAP_CC_CAAR,
+	DMAP_CC_CAIA,
+	DMAP_CC_CANP,
+	DMAP_CC_CANN,
+	DMAP_CC_CANA,
+	DMAP_CC_CANL,
+	DMAP_CC_CANG,
+	DMAP_CC_CANT,
+	DMAP_CC_CASP,
+	DMAP_CC_CASS,
+	DMAP_CC_CAST,
+	DMAP_CC_CASU,
+	DMAP_CC_CASG,
+	DMAP_CC_CACR,
+
+	DMAP_CC_CMCP,
+	DMAP_CC_CMGT,
+	DMAP_CC_CMIK,
+	DMAP_CC_CMSP,
+	DMAP_CC_CMST,
+	DMAP_CC_CMSV,
+	DMAP_CC_CMSR,
+	DMAP_CC_CMMK,
+	DMAP_CC_CMVO,
+
+	DMAP_CC_CMPR,
+	DMAP_CC_CAPR,
+	DMAP_CC_AEFR,
+	DMAP_CC_CAOV,
+	DMAP_CC_CMRL,
+	DMAP_CC_CAHP,
+	DMAP_CC_CAIV,
+	DMAP_CC_CAVC
+} DmapContentCode;
+
+#endif
diff --git a/libdmapsharing/dmap-config.h.in b/libdmapsharing/dmap-config.h.in
index 153fe1c..2258661 100644
--- a/libdmapsharing/dmap-config.h.in
+++ b/libdmapsharing/dmap-config.h.in
@@ -17,8 +17,8 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA*
  */
 
-#ifndef __DMAP_CONFIG_H__
-#define __DMAP_CONFIG_H__
+#ifndef _DMAP_CONFIG_H
+#define _DMAP_CONFIG_H
 
 /* whether or not the CPU supports unaligned access */
 @DMAP_HAVE_UNALIGNED_ACCESS_DEFINE@
diff --git a/libdmapsharing/dmap-connection-private.h b/libdmapsharing/dmap-connection-private.h
new file mode 100644
index 0000000..f7d000b
--- /dev/null
+++ b/libdmapsharing/dmap-connection-private.h
@@ -0,0 +1,40 @@
+/* Header for DMAP (e.g., iTunes Music or iPhoto Picture) sharing
+ *
+ * Copyright (C) 2018 W. Michael Petullo <mike@flyn.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ */
+
+#include <glib-object.h>
+
+#include <libdmapsharing/dmap-connection.h>
+
+#ifndef _DMAP_CONNECTION_PRIVATE_H
+#define _DMAP_CONNECTION_PRIVATE_H
+
+typedef void (*DmapResponseHandler) (DmapConnection * connection,
+				     guint status,
+				     GNode * structure,
+                                     gpointer user_data);
+
+gboolean dmap_connection_get (DmapConnection * self,
+                              const gchar * path,
+                              DmapResponseHandler handler,
+                              gpointer user_data);
+
+void dmap_connection_setup (DmapConnection * connection);
+
+#endif
diff --git a/libdmapsharing/dmap-connection.c b/libdmapsharing/dmap-connection.c
index c3a388c..16dcf9a 100644
--- a/libdmapsharing/dmap-connection.c
+++ b/libdmapsharing/dmap-connection.c
@@ -32,28 +32,18 @@
 
 #include "dmap-md5.h"
 #include "dmap-connection.h"
+#include "dmap-connection-private.h"
+#include "dmap-error.h"
 #include "dmap-record-factory.h"
+#include "dmap-structure.h"
 
 #define DMAP_USER_AGENT "iTunes/4.6 (Windows; N)"
 
 #define ITUNES_7_SERVER "iTunes/7"
 
-static void dmap_connection_dispose (GObject * obj);
-static void dmap_connection_set_property (GObject * object,
-					  guint prop_id,
-					  const GValue * value,
-					  GParamSpec * pspec);
-static void dmap_connection_get_property (GObject * object,
-					  guint prop_id,
-					  GValue * value, GParamSpec * pspec);
+static gboolean _do_something (DmapConnection * connection);
 
-static gboolean dmap_connection_do_something (DMAPConnection * connection);
-static void dmap_connection_state_done (DMAPConnection * connection,
-					gboolean result);
-
-static gboolean emit_progress_idle (DMAPConnection * connection);
-
-struct DMAPConnectionPrivate
+struct DmapConnectionPrivate
 {
 	char *name;
 	char *username;
@@ -65,7 +55,7 @@ struct DMAPConnectionPrivate
 	gboolean is_connecting;
 
 	SoupSession *session;
-	SoupURI *base_uri;
+	GUri *base_uri;
 	gchar *daap_base_uri;
 
 	gdouble dmap_version;
@@ -79,10 +69,10 @@ struct DMAPConnectionPrivate
 	GSList *playlists;
 	GHashTable *item_id_to_uri;
 
-	DMAPDb *db;
-	DMAPRecordFactory *record_factory;
+	DmapDb *db;
+	DmapRecordFactory *record_factory;
 
-	DMAPConnectionState state;
+	DmapConnectionState state;
 	gboolean use_response_handler_thread;
 	float progress;
 
@@ -93,7 +83,15 @@ struct DMAPConnectionPrivate
 	char *last_error_message;
 };
 
-G_DEFINE_TYPE_WITH_PRIVATE (DMAPConnection, dmap_connection, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE (DmapConnection,
+                            dmap_connection,
+                            G_TYPE_OBJECT);
+
+static void
+dmap_connection_init (DmapConnection * connection)
+{
+	connection->priv = dmap_connection_get_instance_private(connection);
+}
 
 enum
 {
@@ -120,30 +118,211 @@ enum
 	CONNECTED,
 	DISCONNECTED,
 	OPERATION_DONE,
+	ERROR,
 	LAST_SIGNAL
 };
 
-static guint signals[LAST_SIGNAL] = { 0, };
+static guint _signals[LAST_SIGNAL] = { 0, };
 
 static void
-dmap_connection_finalize (GObject * object)
+_dispose (GObject * object)
 {
-	DMAPConnection *connection;
+	DmapConnectionPrivate *priv = DMAP_CONNECTION (object)->priv;
+	GSList *l;
+
+	g_debug ("DMAP connection dispose");
+
+	if (priv->emit_progress_id != 0) {
+		g_source_remove (priv->emit_progress_id);
+		priv->emit_progress_id = 0;
+	}
+
+	if (priv->do_something_id != 0) {
+		g_source_remove (priv->do_something_id);
+		priv->do_something_id = 0;
+	}
+
+	if (priv->playlists) {
+		for (l = priv->playlists; l; l = l->next) {
+			DmapPlaylist *playlist = l->data;
+
+			/* FIXME: refstring: */
+			g_list_free_full (playlist->uris, g_free);
+			g_free (playlist->name);
+			g_free (playlist);
+			l->data = NULL;
+		}
+		g_slist_free (priv->playlists);
+		priv->playlists = NULL;
+	}
 
-	g_return_if_fail (object != NULL);
-	g_return_if_fail (IS_DMAP_CONNECTION (object));
+	if (priv->item_id_to_uri) {
+		g_hash_table_destroy (priv->item_id_to_uri);
+		priv->item_id_to_uri = NULL;
+	}
+
+	if (priv->session) {
+		g_debug ("Aborting all pending requests");
+		soup_session_abort (priv->session);
+		g_object_unref (G_OBJECT (priv->session));
+		priv->session = NULL;
+	}
+
+	if (priv->base_uri) {
+		g_uri_unref (priv->base_uri);
+		priv->base_uri = NULL;
+	}
+
+	if (priv->daap_base_uri) {
+		g_free (priv->daap_base_uri);
+		priv->daap_base_uri = NULL;
+	}
 
-	connection = DMAP_CONNECTION (object);
+	g_clear_object(&priv->db);
+	g_clear_object(&priv->record_factory);
+
+	if (priv->last_error_message != NULL) {
+		g_free (priv->last_error_message);
+		priv->last_error_message = NULL;
+	}
 
-	g_return_if_fail (connection->priv != NULL);
+	G_OBJECT_CLASS (dmap_connection_parent_class)->dispose (object);
+}
 
+static void
+_finalize (GObject * object)
+{
 	g_debug ("Finalize");
 
+	g_assert(DMAP_IS_CONNECTION (object));
+
+	DmapConnection *connection = DMAP_CONNECTION (object);
+	if (NULL == connection->priv) {
+		goto done;
+	}
+
+	g_free (connection->priv->name);
+	g_free (connection->priv->username);
+	g_free (connection->priv->password);
+	g_free (connection->priv->host);
+
 	G_OBJECT_CLASS (dmap_connection_parent_class)->finalize (object);
+
+done:
+	return;
+}
+
+static void
+_set_property (GObject * object, guint prop_id,
+               const GValue * value, GParamSpec * pspec)
+{
+	DmapConnectionPrivate *priv = DMAP_CONNECTION (object)->priv;
+
+	switch (prop_id) {
+	case PROP_NAME:
+		g_free (priv->name);
+		priv->name = g_value_dup_string (value);
+		break;
+	case PROP_DB:
+		if (priv->db) {
+			g_object_unref(priv->db);
+		}
+		priv->db = DMAP_DB (g_value_dup_object (value));
+		break;
+	case PROP_FACTORY:
+		if (priv->record_factory) {
+			g_object_unref(priv->record_factory);
+		}
+		priv->record_factory =
+			DMAP_RECORD_FACTORY (g_value_dup_object (value));
+		break;
+	case PROP_HOST:
+		g_free (priv->host);
+		priv->host = g_value_dup_string (value);
+		break;
+	case PROP_PORT:
+		priv->port = g_value_get_uint (value);
+		break;
+	case PROP_BASE_URI:
+		if (priv->base_uri) {
+			g_uri_unref (priv->base_uri);
+		}
+		priv->base_uri = g_value_get_boxed (value);
+		break;
+	case PROP_DATABASE_ID:
+		priv->database_id = g_value_get_int (value);
+		break;
+	case PROP_SESSION_ID:
+		priv->session_id = g_value_get_int (value);
+		break;
+	case PROP_DMAP_VERSION:
+		priv->dmap_version = g_value_get_double (value);
+		break;
+	case PROP_REVISION_NUMBER:
+		priv->revision_number = g_value_get_int (value);
+		break;
+	case PROP_USERNAME:
+		g_free(priv->username);
+		priv->username = g_value_dup_string (value);
+		break;
+	case PROP_PASSWORD:
+		g_free(priv->password);
+		priv->password = g_value_dup_string (value);
+		break;
+	default:
+		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+		break;
+	}
+}
+
+static void
+_get_property (GObject * object, guint prop_id,
+               GValue * value, GParamSpec * pspec)
+{
+	DmapConnectionPrivate *priv = DMAP_CONNECTION (object)->priv;
+
+	switch (prop_id) {
+	case PROP_DB:
+		g_value_set_object (value, priv->db);
+		break;
+	case PROP_FACTORY:
+		g_value_set_object (value, priv->record_factory);
+		break;
+	case PROP_NAME:
+		g_value_set_string (value, priv->name);
+		break;
+	case PROP_HOST:
+		g_value_set_string (value, priv->host);
+		break;
+	case PROP_PORT:
+		g_value_set_uint (value, priv->port);
+		break;
+	case PROP_BASE_URI:
+		g_value_set_boxed (value, priv->base_uri);
+		break;
+	case PROP_DATABASE_ID:
+		g_value_set_int (value, priv->database_id);
+		break;
+	case PROP_SESSION_ID:
+		g_value_set_int (value, priv->session_id);
+		break;
+	case PROP_DMAP_VERSION:
+		g_value_set_double (value, priv->dmap_version);
+		break;
+	case PROP_REVISION_NUMBER:
+		g_value_set_int (value, priv->revision_number);
+		break;
+	case PROP_USERNAME:
+		g_value_set_string (value, priv->username);
+		break;
+	default:
+		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+		break;
+	}
 }
 
 static void
-dmap_connection_class_init (DMAPConnectionClass * klass)
+dmap_connection_class_init (DmapConnectionClass * klass)
 {
 	GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
@@ -151,28 +330,30 @@ dmap_connection_class_init (DMAPConnectionClass * klass)
 	klass->get_query_metadata = NULL;
 	klass->handle_mlcl = NULL;
 
-	object_class->finalize = dmap_connection_finalize;
-	object_class->dispose = dmap_connection_dispose;
-	object_class->set_property = dmap_connection_set_property;
-	object_class->get_property = dmap_connection_get_property;
+	object_class->dispose = _dispose;
+	object_class->finalize = _finalize;
+	object_class->set_property = _set_property;
+	object_class->get_property = _get_property;
 
 	g_object_class_install_property (object_class,
 					 PROP_DB,
-					 g_param_spec_pointer ("db",
-							       "DMAPDb",
-							       "DMAPDb object",
-							       G_PARAM_READWRITE
-							       |
-							       G_PARAM_CONSTRUCT_ONLY));
+					 g_param_spec_object ("db",
+							      "DmapDb",
+							      "DmapDb object",
+	                                                      DMAP_TYPE_DB,
+							      G_PARAM_READWRITE
+							      |
+							      G_PARAM_CONSTRUCT_ONLY));
 
 	g_object_class_install_property (object_class,
 					 PROP_FACTORY,
-					 g_param_spec_pointer ("factory",
-							       "record factory",
-							       "record factory",
-							       G_PARAM_READWRITE
-							       |
-							       G_PARAM_CONSTRUCT_ONLY));
+					 g_param_spec_object ("factory",
+							      "record factory",
+							      "record factory",
+	                                                       DMAP_TYPE_RECORD_FACTORY,
+							      G_PARAM_READWRITE
+							      |
+							      G_PARAM_CONSTRUCT_ONLY));
 
 	g_object_class_install_property (object_class, PROP_NAME,
 					 g_param_spec_string ("name",
@@ -198,10 +379,11 @@ dmap_connection_class_init (DMAPConnectionClass * klass)
 
 	g_object_class_install_property (object_class,
 					 PROP_BASE_URI,
-					 g_param_spec_pointer ("base-uri",
-							       "base URI",
-							       "base URI",
-							       G_PARAM_READWRITE));
+					 g_param_spec_boxed ("base-uri",
+	                                                     "base URI",
+	                                                     "base URI",
+	                                                      G_TYPE_URI,
+	                                                      G_PARAM_READWRITE));
 
 	g_object_class_install_property (object_class,
 					 PROP_DATABASE_ID,
@@ -251,12 +433,12 @@ dmap_connection_class_init (DMAPConnectionClass * klass)
 							      NULL,
 							      G_PARAM_WRITABLE));
 
-	signals[AUTHENTICATE] = g_signal_new ("authenticate",
+	_signals[AUTHENTICATE] = g_signal_new ("authenticate",
 					      G_TYPE_FROM_CLASS
 					      (object_class),
 					      G_SIGNAL_RUN_LAST,
 					      G_STRUCT_OFFSET
-					      (DMAPConnectionClass,
+					      (DmapConnectionClass,
 					       authenticate), NULL, NULL,
 					      NULL,
 					      G_TYPE_NONE, 5,
@@ -265,112 +447,191 @@ dmap_connection_class_init (DMAPConnectionClass * klass)
 					      SOUP_TYPE_MESSAGE,
 					      SOUP_TYPE_AUTH,
 					      G_TYPE_BOOLEAN);
-	signals[CONNECTING] =
+	_signals[CONNECTING] =
 		g_signal_new ("connecting", G_TYPE_FROM_CLASS (object_class),
 			      G_SIGNAL_RUN_LAST,
-			      G_STRUCT_OFFSET (DMAPConnectionClass,
+			      G_STRUCT_OFFSET (DmapConnectionClass,
 					       connecting), NULL, NULL,
 			      NULL, G_TYPE_NONE, 2,
 			      G_TYPE_ULONG, G_TYPE_FLOAT);
-	signals[CONNECTED] =
+	_signals[CONNECTED] =
 		g_signal_new ("connected", G_TYPE_FROM_CLASS (object_class),
 			      G_SIGNAL_RUN_LAST,
-			      G_STRUCT_OFFSET (DMAPConnectionClass,
+			      G_STRUCT_OFFSET (DmapConnectionClass,
 					       connected), NULL, NULL,
 			      NULL, G_TYPE_NONE, 0);
-	signals[DISCONNECTED] =
+	_signals[DISCONNECTED] =
 		g_signal_new ("disconnected",
 			      G_TYPE_FROM_CLASS (object_class),
 			      G_SIGNAL_RUN_LAST,
-			      G_STRUCT_OFFSET (DMAPConnectionClass,
+			      G_STRUCT_OFFSET (DmapConnectionClass,
 					       disconnected), NULL, NULL,
 			      NULL, G_TYPE_NONE, 0);
-	signals[OPERATION_DONE] =
+	_signals[OPERATION_DONE] =
 		g_signal_new ("operation-done",
 			      G_TYPE_FROM_CLASS (object_class),
 			      G_SIGNAL_RUN_FIRST,
-			      G_STRUCT_OFFSET (DMAPConnectionClass,
+			      G_STRUCT_OFFSET (DmapConnectionClass,
 					       operation_done), NULL, NULL,
 			      NULL, G_TYPE_NONE, 0);
+	_signals[ERROR] =
+		g_signal_new ("error",
+		              G_TYPE_FROM_CLASS (object_class),
+		              G_SIGNAL_RUN_FIRST,
+		              0, NULL, NULL,
+		              NULL, G_TYPE_NONE, 1,
+		              G_TYPE_POINTER);
 }
 
 static void
-dmap_connection_init (DMAPConnection * connection)
-{
-	connection->priv = dmap_connection_get_instance_private(connection);
-}
-
-static void
-connection_connected (DMAPConnection * connection)
+_connection_connected (DmapConnection * connection)
 {
 	g_debug ("Emitting connected");
 
 	connection->priv->is_connected = TRUE;
 
 	// FIXME: GDK_THREADS_ENTER ();
-	g_signal_emit (connection, signals[CONNECTED], 0);
+	g_signal_emit (connection, _signals[CONNECTED], 0);
 	// FIXME: GDK_THREADS_LEAVE ();
 }
 
 static void
-connection_disconnected (DMAPConnection * connection)
+_connection_disconnected (DmapConnection * connection)
 {
 	g_debug ("Emitting disconnected");
 
 	connection->priv->is_connected = FALSE;
 
 	// FIXME: GDK_THREADS_ENTER ();
-	g_signal_emit (connection, signals[DISCONNECTED], 0);
+	g_signal_emit (connection, _signals[DISCONNECTED], 0);
 	// FIXME: GDK_THREADS_LEAVE ();
 }
 
 static void
-connection_operation_done (DMAPConnection * connection)
+_connection_operation_done (DmapConnection * connection)
 {
 	g_debug ("Emitting operation done");
 
 	// FIXME: GDK_THREADS_ENTER ();
-	g_signal_emit (connection, signals[OPERATION_DONE], 0);
+	g_signal_emit (connection, _signals[OPERATION_DONE], 0);
 	// FIXME: GDK_THREADS_LEAVE ();
 }
 
-SoupMessage *
-dmap_connection_build_message (DMAPConnection * connection,
-			       const char *path,
-			       G_GNUC_UNUSED gboolean need_hash,
-			       G_GNUC_UNUSED gdouble version,
-			       G_GNUC_UNUSED gint req_id,
-                               G_GNUC_UNUSED gboolean send_close)
+static void
+_message_add_headers (SoupMessage *message, DmapConnection * connection, const gchar * uri)
+{
+	DmapConnectionPrivate *priv = connection->priv;
+	SoupMessageHeaders *headers;
+	char hash[33] = { 0 };
+	char *norb_daap_uri = (char *) uri;
+	char *request_id;
+
+	headers = soup_message_get_request_headers(message);
+
+	priv->request_id++;
+
+	if (g_ascii_strncasecmp (uri, "daap://", 7) == 0) {
+		norb_daap_uri = strstr (uri, "/data");
+	}
+
+	dmap_md5_generate ((short) floorf (priv->dmap_version),
+			    (const guchar *) norb_daap_uri, 2,
+			    (guchar *) hash, priv->request_id);
+
+	soup_message_headers_append (headers, "Accept", "*/*");
+	soup_message_headers_append (headers, "Cache-Control", "no-cache");
+	soup_message_headers_append (headers, "Accept-Language",
+				     "en-us, en;q=5.0");
+	soup_message_headers_append (headers, "Client-DAAP-Access-Index",
+				     "2");
+	soup_message_headers_append (headers, "Client-DAAP-Version", "3.0");
+	soup_message_headers_append (headers, "Client-DAAP-Validation", hash);
+
+	request_id = g_strdup_printf ("%d", priv->request_id);
+	soup_message_headers_append (headers, "Client-DAAP-Request-ID",
+				     request_id);
+	soup_message_headers_append(headers, "User-Agent", DMAP_USER_AGENT);
+	soup_message_headers_append(headers, "Connection", "close");
+	g_free (request_id);
+}
+
+static void
+_authenticate_cb (SoupMessage *msg, SoupAuth *auth, gboolean retrying,
+                  DmapConnection *connection)
+{
+	if (retrying || ! connection->priv->password) {
+		g_debug ("Requesting password from application");
+		// FIXME: GDK_THREADS_ENTER ();
+		g_signal_emit (connection,
+			       _signals[AUTHENTICATE],
+			       0,
+			       connection->priv->name,
+			       connection->priv->session,
+			       msg,
+			       auth,
+			       retrying);
+		// FIXME: GDK_THREADS_LEAVE ();
+	} else {
+		g_debug ("Using cached credentials");
+		soup_auth_authenticate (auth, connection->priv->username, connection->priv->password);
+	}
+}
+
+/*
+ * FIXME: Assuming pause/unpause is really not needed, then session and message
+ * parameters are not required. Drop them and prompt API change?
+ */
+void
+dmap_connection_authenticate_message (DmapConnection * connection,
+                                      G_GNUC_UNUSED SoupSession *session,
+                                      G_GNUC_UNUSED SoupMessage *message,
+                                      SoupAuth *auth,
+                                      const char *password)
+{
+	char *username = NULL;
+
+	g_object_set (connection, "password", password, NULL);
+
+	g_object_get (connection, "username", &username, NULL);
+	g_assert (username);
+
+	soup_auth_authenticate (auth, username, password);
+
+	g_free(username);
+}
+
+static SoupMessage *
+_build_message (DmapConnection * connection,
+                const char *path)
 {
 	SoupMessage *message = NULL;
-	SoupURI *base_uri = NULL;
-	SoupURI *uri = NULL;
+	GUri *base_uri = NULL;
+	GUri *uri = NULL;
 	char *uri_str = NULL;
 
 	g_object_get (connection, "base-uri", &base_uri, NULL);
 	if (base_uri == NULL) {
-		return NULL;
+		goto done;
 	}
 
-	uri = soup_uri_new_with_base (base_uri, path);
+	uri = g_uri_parse_relative(base_uri, path, G_URI_FLAGS_NONE, NULL);
 	if (uri == NULL) {
-		return NULL;
+		goto done;
 	}
 
 	message = soup_message_new_from_uri (SOUP_METHOD_GET, uri);
 
+	g_signal_connect (message, "authenticate", G_CALLBACK(_authenticate_cb), connection);
+
 	/* FIXME: only set Client-DAAP-Validation if need_hash? */
 	/* FIXME: only set Connection if send_close? */
-	uri_str = soup_uri_to_string (uri, FALSE);
-	message->request_headers =
-		dmap_connection_get_headers (connection, uri_str);
+	uri_str = g_uri_to_string (uri);
 
-	soup_message_headers_append (message->request_headers,
-				     "User-Agent", DMAP_USER_AGENT);
-	soup_message_headers_append (message->request_headers,
-				     "Connection", "close");
+	_message_add_headers(message, connection, uri_str);
 
-	soup_uri_free (uri);
+done:
+	g_uri_unref (base_uri);
+	g_uri_unref (uri);
 	g_free (uri_str);
 
 	return message;
@@ -378,27 +639,33 @@ dmap_connection_build_message (DMAPConnection * connection,
 
 #ifdef HAVE_LIBZ
 static void *
-g_zalloc_wrapper (G_GNUC_UNUSED voidpf opaque, uInt items, uInt size)
+_zalloc_wrapper (G_GNUC_UNUSED voidpf opaque, uInt items, uInt size)
 {
+	void *fnval = Z_NULL;
+
 	if ((items != 0) && (size >= G_MAXUINT / items)) {
-		return Z_NULL;
+		goto done;
 	}
 	if ((size != 0) && (items >= G_MAXUINT / size)) {
-		return Z_NULL;
+		goto done;
 	}
-	return g_malloc0 (items * size);
+
+	fnval = g_malloc0 (items * size);
+
+done:
+	return fnval;
 }
 
 static void
-g_zfree_wrapper (G_GNUC_UNUSED voidpf opaque, voidpf address)
+_zfree_wrapper (G_GNUC_UNUSED voidpf opaque, voidpf address)
 {
 	g_free (address);
 }
 #endif
 
 static void
-connection_set_error_message (DMAPConnection * connection,
-			      const char *message)
+_connection_set_error_message (DmapConnection * connection,
+                               const char *message)
 {
 	/* FIXME: obtain a lock */
 	g_free (connection->priv->last_error_message);
@@ -409,57 +676,144 @@ connection_set_error_message (DMAPConnection * connection,
 	}
 }
 
-typedef struct
-{
-	SoupMessage *message;
+typedef struct {
+	GBytes *body;
 	int status;
-	DMAPConnection *connection;
+	DmapConnection *connection;
 
-	DMAPResponseHandler response_handler;
+	char *message_path;
+	char *reason_phrase;
+	SoupMessageHeaders *headers;
+
+	DmapResponseHandler response_handler;
 	gpointer user_data;
-} DAAPResponseData;
+} DmapResponseData;
 
-static gpointer
-actual_http_response_handler (DAAPResponseData * data)
+static void
+_dmap_response_data_free(DmapResponseData *data)
 {
-	DMAPConnectionPrivate *priv;
-	GNode *structure;
-	char *new_response = NULL;
-	const char *response;
-	const char *encoding_header;
-	char *message_path;
-	int response_length;
-	gboolean compatible_server = TRUE;
-
-	priv = data->connection->priv;
-	structure = NULL;
-	encoding_header = NULL;
-	response = data->message->response_body->data;
-	response_length = data->message->response_body->length;
+	if (NULL == data) {
+		return;
+	}
 
-	message_path =
-		soup_uri_to_string (soup_message_get_uri (data->message),
-				    FALSE);
+	g_bytes_unref(data->body);
+	g_object_unref (G_OBJECT (data->connection));
+	g_free(data->message_path);
+	g_free(data->reason_phrase);
+	soup_message_headers_unref(data->headers);
+	g_free (data);
+}
 
-	g_debug ("Received response from %s: %d, %s\n",
-		 message_path,
-		 data->message->status_code, data->message->reason_phrase);
+static gboolean
+_emit_progress_idle (DmapConnection * connection)
+{
+	g_debug ("Emitting progress");
 
-	if (data->message->response_headers) {
-		const char *server;
+	// FIXME: GDK_THREADS_ENTER ();
+	g_signal_emit (G_OBJECT (connection), _signals[CONNECTING], 0,
+		       connection->priv->state, connection->priv->progress);
+	connection->priv->emit_progress_id = 0;
+	// FIXME: GDK_THREADS_LEAVE ();
+	return FALSE;
+}
+
+static void
+_state_done (DmapConnection * connection, gboolean result)
+{
+	DmapConnectionPrivate *priv = connection->priv;
+
+	g_debug ("Transitioning to next state from %d", priv->state);
+
+	if (result == FALSE) {
+		priv->state = DMAP_DONE;
+		priv->result = FALSE;
+	} else {
+		switch (priv->state) {
+		case DMAP_GET_PLAYLISTS:
+			if (priv->playlists == NULL) {
+				priv->state = DMAP_DONE;
+			} else {
+				priv->state = DMAP_GET_PLAYLIST_ENTRIES;
+			}
+			break;
+		case DMAP_GET_PLAYLIST_ENTRIES:
+			/* keep reading playlists until we've got them all */
+			if (++priv->reading_playlist >=
+			    g_slist_length (priv->playlists)) {
+				priv->state = DMAP_DONE;
+			}
+			break;
+
+		case DMAP_LOGOUT:
+			priv->state = DMAP_DONE;
+			break;
+
+		case DMAP_DONE:
+			/* uhh.. */
+			g_debug ("This should never happen.");
+			break;
+
+		default:
+			/* in most states, we just move on to the next */
+			if (priv->state > DMAP_DONE) {
+				g_debug ("This should REALLY never happen.");
+				return;
+			}
+			priv->state++;
+			break;
+		}
+
+		priv->progress = 1.0f;
+		if (connection->priv->emit_progress_id != 0) {
+			g_source_remove (connection->priv->emit_progress_id);
+		}
+		connection->priv->emit_progress_id =
+			g_idle_add ((GSourceFunc) _emit_progress_idle,
+				    connection);
+	}
+
+	if (priv->do_something_id != 0) {
+		g_source_remove (priv->do_something_id);
+	}
+	priv->do_something_id =
+		g_idle_add ((GSourceFunc) _do_something, connection);
+}
+
+static gpointer
+_actual_http_response_handler (DmapResponseData * data)
+{
+	DmapConnectionPrivate *priv;
+	GNode *structure;
+	guint8 *new_response = NULL;
+	const guint8 *response;
+	const char *encoding_header;
+	gsize response_length;
+	gboolean ok = FALSE;
+
+	priv = data->connection->priv;
+	structure = NULL;
+	encoding_header = NULL;
+
+	response = g_bytes_get_data(data->body, &response_length);
+
+	g_debug ("Received response from %s: %d, %s",
+		 data->message_path,
+	         data->status,
+		 data->reason_phrase);
 
-		encoding_header =
-			soup_message_headers_get_one (data->
-						      message->response_headers,
-						     "Content-Encoding");
-
-		server = soup_message_headers_get_one (data->
-						       message->response_headers,
-						      "DAAP-Server");
-		if (server != NULL
-		    && strstr (server, ITUNES_7_SERVER) != NULL) {
-			g_debug ("giving up.  we can't talk to %s", server);
-			compatible_server = FALSE;
+	if (data->headers) {
+		const char *server;
+
+		encoding_header = soup_message_headers_get_one (data->headers, "Content-Encoding");
+		server = soup_message_headers_get_one (data->headers, "DAAP-Server");
+
+		if (server != NULL && strstr (server, ITUNES_7_SERVER) != NULL) {
+			g_debug ("giving up. We can't talk to %s", server);
+			_connection_set_error_message (
+				data->connection,
+				"libdmapsharing is not able to connect to iTunes 7 shares"
+			);
+			goto done;
 		}
 	}
 
@@ -478,8 +832,8 @@ actual_http_response_handler (DAAPResponseData * data)
 		stream.next_out = (unsigned char *) new_response;
 		stream.avail_out = unc_size;
 		stream.total_out = 0;
-		stream.zalloc = g_zalloc_wrapper;
-		stream.zfree = g_zfree_wrapper;
+		stream.zalloc = _zalloc_wrapper;
+		stream.zfree = _zfree_wrapper;
 		stream.opaque = NULL;
 
 		if (inflateInit2
@@ -487,9 +841,14 @@ actual_http_response_handler (DAAPResponseData * data)
 		     32 /* auto-detect */  + 15 /* max */ ) != Z_OK) {
 			inflateEnd (&stream);
 			g_free (new_response);
+			new_response = NULL;
 			g_debug ("Unable to decompress response from %s",
-				 message_path);
-			data->status = SOUP_STATUS_MALFORMED;
+				 data->message_path);
+			_connection_set_error_message (
+				data->connection,
+				"unable to decompress response"
+			);
+			goto done;
 		} else {
 			do {
 				int z_res;
@@ -529,19 +888,18 @@ actual_http_response_handler (DAAPResponseData * data)
 			response_length = stream.total_out;
 		}
 #else
-		g_debug ("Received compressed response from %s but can't handle it", message_path);
-		data->status = SOUP_STATUS_MALFORMED;
+		g_debug ("Received compressed response from %s but can't handle it", data->message_path);
+		_connection_set_error_message (
+			data->connection,
+			"cannot handle compressed response"
+		);
+		goto done;
 #endif
 	}
 
-	if (compatible_server == FALSE) {
-		/* leaving structure == NULL here causes the connection process
-		 * to fail at the first step.
-		 */
-		connection_set_error_message (data->connection,
-					      ("libdmapsharing is not able to connect to iTunes 7 shares"));
-	} else if (SOUP_STATUS_IS_SUCCESSFUL (data->status)) {
-		DMAPStructureItem *item;
+	if (SOUP_STATUS_IS_SUCCESSFUL (data->status)) {
+		GError *error = NULL;
+		DmapStructureItem *item;
 
 		if ( /* FIXME: !rb_is_main_thread () */ TRUE) {
 			priv->progress = -1.0f;
@@ -549,15 +907,16 @@ actual_http_response_handler (DAAPResponseData * data)
 				g_source_remove (priv->emit_progress_id);
 			}
 			priv->emit_progress_id =
-				g_idle_add ((GSourceFunc) emit_progress_idle,
+				g_idle_add ((GSourceFunc) _emit_progress_idle,
 					    data->connection);
 		}
-		structure = dmap_structure_parse (response, response_length);
-		if (structure == NULL) {
-			g_debug ("No daap structure returned from %s",
-				 message_path);
-
-			data->status = SOUP_STATUS_MALFORMED;
+		structure = dmap_structure_parse (response, response_length, &error);
+		if (error != NULL) {
+			dmap_connection_emit_error(data->connection, error->code,
+			                          "Error parsing %s response: %s\n", data->message_path,
+			                           error->message);
+			g_clear_error(&error);
+			goto done;
 		} else {
 			int dmap_status = 0;
 
@@ -568,9 +927,12 @@ actual_http_response_handler (DAAPResponseData * data)
 					g_value_get_int (&(item->content));
 
 				if (dmap_status != 200) {
-					g_debug ("Error, dmap.status is not 200 in response from %s", message_path);
-
-					data->status = SOUP_STATUS_MALFORMED;
+					g_debug ("Error, dmap.status is not 200 in response from %s", data->message_path);
+					_connection_set_error_message (
+						data->connection,
+						"Bad response"
+					);
+					goto done;
 				}
 			}
 		}
@@ -580,16 +942,16 @@ actual_http_response_handler (DAAPResponseData * data)
 				g_source_remove (priv->emit_progress_id);
 			}
 			priv->emit_progress_id =
-				g_idle_add ((GSourceFunc) emit_progress_idle,
+				g_idle_add ((GSourceFunc) _emit_progress_idle,
 					    data->connection);
 		}
 	} else {
-		g_debug ("Error getting %s: %d, %s\n",
-			 message_path,
-			 data->message->status_code,
-			 data->message->reason_phrase);
-		connection_set_error_message (data->connection,
-					      data->message->reason_phrase);
+		g_debug ("Error getting %s: %d, %s",
+			 data->message_path,
+		         data->status,
+			 data->reason_phrase);
+		_connection_set_error_message (data->connection,
+					       data->reason_phrase);
 	}
 
 	if (data->response_handler) {
@@ -597,131 +959,155 @@ actual_http_response_handler (DAAPResponseData * data)
 					     structure, data->user_data);
 	}
 
+	ok = TRUE;
+
+done:
+	if (!ok) {
+		_state_done (data->connection, FALSE);
+	}
+
 	if (structure) {
 		dmap_structure_destroy (structure);
 	}
 
 	g_free (new_response);
-	g_free (message_path);
-	g_object_unref (G_OBJECT (data->connection));
-	g_object_unref (G_OBJECT (data->message));
-	g_free (data);
+
+	_dmap_response_data_free(data);
 
 	return NULL;
 }
 
 static void
-http_response_handler (G_GNUC_UNUSED SoupSession * session,
-		       SoupMessage * message, DAAPResponseData * data)
+_http_response_handler (G_GNUC_UNUSED GObject *source,
+                        GAsyncResult *result,
+                        gpointer user_data)
 {
+	gboolean ok = FALSE;
+	SoupSession *session = SOUP_SESSION(source);
+	DmapResponseData *data = user_data;
+	SoupMessage *message = NULL;
 	goffset response_length;
+	GError *error = NULL;
 
-	if (message->status_code == SOUP_STATUS_CANCELLED) {
-		g_debug ("Message cancelled");
-		g_free (data);
-		return;
+	data->body = soup_session_send_and_read_finish (session, result, &error);
+	if (NULL == data->body) {
+		g_debug("Failed to finish read: %s", error->message);
+		goto done;
 	}
 
-	data->status = message->status_code;
-	response_length = message->response_body->length;
+	message = soup_session_get_async_result_message (session, result);
+	if (NULL == message) {
+		g_debug ("Failed to get message result");
+		goto done;
+	}
 
-	g_object_ref (G_OBJECT (message));
-	data->message = message;
+	data->status = soup_message_get_status(message);
+	data->reason_phrase = g_strdup(soup_message_get_reason_phrase(message));
+	data->headers = soup_message_headers_ref(soup_message_get_response_headers(message));
+	response_length = g_bytes_get_size(data->body);
 
 	if (response_length >= G_MAXUINT / 4 - 1) {
 		/* If response_length is too big,
 		 * the g_malloc (unc_size + 1) below would overflow
 		 */
-		data->status = SOUP_STATUS_MALFORMED;
+		g_debug ("Response length exceeded limit");
+		goto done;
 	}
 
 	/* to avoid blocking the UI, handle big responses in a separate thread */
 	if (SOUP_STATUS_IS_SUCCESSFUL (data->status)
 	    && data->connection->priv->use_response_handler_thread) {
 		g_debug ("creating thread to handle daap response");
-		GThread *thread = g_thread_new (NULL, (GThreadFunc) actual_http_response_handler, data);
-		if (NULL == thread) {
-			g_warning ("failed to create new thread");
-		}
+		g_thread_new (NULL, (GThreadFunc) _actual_http_response_handler, data);
 	} else {
-		actual_http_response_handler (data);
+		_actual_http_response_handler (data);
 	}
+
+	/*
+	 * Ownership of data passed to _actual_http_response_handler; set to
+	 * NULL to avoid freeing.
+	 */
+	data = NULL;
+
+	ok = TRUE;
+
+done:
+	g_object_unref(message);
+
+	if (!ok) {
+		_state_done (data->connection, FALSE);
+	}
+
+	_dmap_response_data_free(data); /* Ownership possibly passed; see above. */
+
+	return;
 }
 
 static gboolean
-http_get (DMAPConnection * connection,
-	  const char *path,
-	  gboolean need_hash,
-	  gdouble version,
-	  gint req_id,
-	  gboolean send_close,
-	  DMAPResponseHandler handler,
-	  gpointer user_data, gboolean use_thread)
+_http_get (DmapConnection * connection,
+           const char *path,
+           DmapResponseHandler handler,
+           gpointer user_data, gboolean use_thread)
 {
-	DMAPConnectionPrivate *priv = connection->priv;
-	DAAPResponseData *data;
+	gboolean ok = FALSE;
+	DmapConnectionPrivate *priv = connection->priv;
+	DmapResponseData *data;
 	SoupMessage *message;
 
-	message =
-		dmap_connection_build_message (connection, path, need_hash,
-					       version, req_id, send_close);
+	message = _build_message (connection, path);
 	if (message == NULL) {
 		g_debug ("Error building message for http://%s:%d/%s",
-			 priv->base_uri->host, priv->base_uri->port, path);
-		return FALSE;
+			 g_uri_get_host(priv->base_uri), g_uri_get_port(priv->base_uri), path);
+		goto done;
 	}
 
 	priv->use_response_handler_thread = use_thread;
 
-	data = g_new0 (DAAPResponseData, 1);
+	data = g_new0 (DmapResponseData, 1);
+	data->message_path = g_uri_to_string (soup_message_get_uri (message));
 	data->response_handler = handler;
 	data->user_data = user_data;
 
 	g_object_ref (G_OBJECT (connection));
 	data->connection = connection;
 
-	soup_session_queue_message (priv->session, message,
-				    (SoupSessionCallback)
-				    http_response_handler, data);
-	g_debug ("Queued message for http://%s:%d/%s", priv->base_uri->host,
-		 priv->base_uri->port, path);
-	return TRUE;
+	soup_session_send_and_read_async(
+		priv->session,
+		message,
+		G_PRIORITY_DEFAULT,
+		NULL,
+		_http_response_handler,
+		data
+	);
+
+	g_debug ("Queued message for http://%s:%d/%s", g_uri_get_host(priv->base_uri),
+		 g_uri_get_port(priv->base_uri), path);
+
+	ok = TRUE;
+
+done:
+	return ok;
 }
 
 gboolean
-dmap_connection_get (DMAPConnection * self,
+dmap_connection_get (DmapConnection * self,
 		     const gchar * path,
-		     gboolean need_hash,
-		     DMAPResponseHandler handler, gpointer user_data)
-{
-	return http_get (self, path, need_hash,
-			 self->priv->dmap_version, 0, FALSE,
-			 (DMAPResponseHandler) handler, user_data, FALSE);
-}
-
-static gboolean
-emit_progress_idle (DMAPConnection * connection)
+		     DmapResponseHandler handler, gpointer user_data)
 {
-	g_debug ("Emitting progress");
-
-	// FIXME: GDK_THREADS_ENTER ();
-	g_signal_emit (G_OBJECT (connection), signals[CONNECTING], 0,
-		       connection->priv->state, connection->priv->progress);
-	connection->priv->emit_progress_id = 0;
-	// FIXME: GDK_THREADS_LEAVE ();
-	return FALSE;
+	return _http_get (self, path, (DmapResponseHandler) handler, user_data,
+	                  FALSE);
 }
 
 static void
-handle_server_info (DMAPConnection * connection,
-		    guint status, GNode * structure, G_GNUC_UNUSED gpointer user_data)
+_handle_server_info (DmapConnection * connection, guint status,
+                     GNode * structure, G_GNUC_UNUSED gpointer user_data)
 {
-	DMAPConnectionPrivate *priv = connection->priv;
-	DMAPStructureItem *item = NULL;
+	gboolean ok = FALSE;
+	DmapConnectionPrivate *priv = connection->priv;
+	DmapStructureItem *item = NULL;
 
 	if (!SOUP_STATUS_IS_SUCCESSFUL (status) || structure == NULL) {
-		dmap_connection_state_done (connection, FALSE);
-		return;
+		goto done;
 	}
 
 	/* get the daap version number */
@@ -730,20 +1116,24 @@ handle_server_info (DMAPConnection * connection,
 					 (connection)->get_protocol_version_cc
 					 (connection));
 	if (item == NULL) {
-		dmap_connection_state_done (connection, FALSE);
-		return;
+		goto done;
 	}
 
 	priv->dmap_version = g_value_get_double (&(item->content));
-	dmap_connection_state_done (connection, TRUE);
+	ok = TRUE;
+
+done:
+	_state_done (connection, ok);
+	return;
 }
 
 static void
-handle_login (DMAPConnection * connection,
-	      guint status, GNode * structure, G_GNUC_UNUSED gpointer user_data)
+_handle_login (DmapConnection * connection, guint status, GNode * structure,
+               G_GNUC_UNUSED gpointer user_data)
 {
-	DMAPConnectionPrivate *priv = connection->priv;
-	DMAPStructureItem *item = NULL;
+	gboolean ok = FALSE;
+	DmapConnectionPrivate *priv = connection->priv;
+	DmapStructureItem *item = NULL;
 
 	if (status == SOUP_STATUS_UNAUTHORIZED
 	    || status == SOUP_STATUS_FORBIDDEN) {
@@ -752,108 +1142,116 @@ handle_login (DMAPConnection * connection,
 		if (priv->do_something_id != 0) {
 			g_source_remove (priv->do_something_id);
 		}
-		priv->do_something_id = g_idle_add ((GSourceFunc)
-						    dmap_connection_do_something,
+		priv->do_something_id = g_idle_add ((GSourceFunc) _do_something,
 						    connection);
-		return;
+		goto done;
 	}
 
 	if (structure == NULL || SOUP_STATUS_IS_SUCCESSFUL (status) == FALSE) {
-		dmap_connection_state_done (connection, FALSE);
-		return;
+		goto done;
 	}
 
 	item = dmap_structure_find_item (structure, DMAP_CC_MLID);
 	if (item == NULL) {
 		g_debug ("Could not find daap.sessionid item in /login");
-		dmap_connection_state_done (connection, FALSE);
-		return;
+		goto done;
 	}
 
 	priv->session_id = (guint32) g_value_get_int (&(item->content));
 
-	connection_connected (connection);
+	_connection_connected (connection);
 
-	dmap_connection_state_done (connection, TRUE);
+	ok = TRUE;
+
+done:
+	_state_done (connection, ok);
+	return;
 }
 
 static void
-handle_update (DMAPConnection * connection,
-	       guint status, GNode * structure, G_GNUC_UNUSED gpointer user_data)
+_handle_update (DmapConnection * connection, guint status, GNode * structure,
+                G_GNUC_UNUSED gpointer user_data)
 {
-	DMAPConnectionPrivate *priv = connection->priv;
-	DMAPStructureItem *item;
+	gboolean ok = FALSE;
+	DmapConnectionPrivate *priv = connection->priv;
+	DmapStructureItem *item;
 
 	if (structure == NULL || SOUP_STATUS_IS_SUCCESSFUL (status) == FALSE) {
-		dmap_connection_state_done (connection, FALSE);
-		return;
+		goto done;
 	}
 
 	/* get a revision number */
 	item = dmap_structure_find_item (structure, DMAP_CC_MUSR);
 	if (item == NULL) {
 		g_debug ("Could not find daap.serverrevision item in /update");
-		dmap_connection_state_done (connection, FALSE);
-		return;
+		goto done;
 	}
 
 	priv->revision_number = g_value_get_int (&(item->content));
-	dmap_connection_state_done (connection, TRUE);
+
+	ok = TRUE;
+
+done:
+	_state_done (connection, ok);
+	return;
 }
 
 static void
-handle_database_info (DMAPConnection * connection,
-		      guint status, GNode * structure, G_GNUC_UNUSED gpointer user_data)
+_handle_database_info (DmapConnection * connection, guint status,
+                       GNode * structure, G_GNUC_UNUSED gpointer user_data)
 {
-	DMAPConnectionPrivate *priv = connection->priv;
-	DMAPStructureItem *item = NULL;
+	gboolean ok = FALSE;
+	DmapConnectionPrivate *priv = connection->priv;
+	DmapStructureItem *item = NULL;
 	GNode *listing_node;
 	gint n_databases = 0;
 
 	/* get a list of databases, there should be only 1 */
 
 	if (structure == NULL || SOUP_STATUS_IS_SUCCESSFUL (status) == FALSE) {
-		dmap_connection_state_done (connection, FALSE);
-		return;
+		goto done;
 	}
 
 	item = dmap_structure_find_item (structure, DMAP_CC_MRCO);
 	if (item == NULL) {
 		g_debug ("Could not find dmap.returnedcount item in /databases");
-		dmap_connection_state_done (connection, FALSE);
-		return;
+		goto done;
 	}
 
 	n_databases = g_value_get_int (&(item->content));
 	if (n_databases != 1) {
-		g_debug ("Host seems to have more than 1 database, how strange\n");
+		g_debug ("Host seems to have more than 1 database, how strange");
 	}
 
 	listing_node = dmap_structure_find_node (structure, DMAP_CC_MLCL);
 	if (listing_node == NULL) {
 		g_debug ("Could not find dmap.listing item in /databases");
-		dmap_connection_state_done (connection, FALSE);
-		return;
+		goto done;
 	}
 
 	item = dmap_structure_find_item (listing_node->children,
 					 DMAP_CC_MIID);
 	if (item == NULL) {
 		g_debug ("Could not find dmap.itemid item in /databases");
-		dmap_connection_state_done (connection, FALSE);
-		return;
+		goto done;
 	}
 
 	priv->database_id = g_value_get_int (&(item->content));
-	dmap_connection_state_done (connection, TRUE);
+
+	ok = TRUE;
+
+done:
+	_state_done (connection, ok);
+	return;
 }
 
 static void
-handle_song_listing (DMAPConnection * connection,
-		     guint status, GNode * structure, G_GNUC_UNUSED gpointer user_data)
+_handle_song_listing (DmapConnection * connection, guint status,
+                      GNode * structure, G_GNUC_UNUSED gpointer user_data)
 {
-	DMAPConnectionPrivate *priv = connection->priv;
-	DMAPStructureItem *item = NULL;
+	gboolean ok = FALSE;
+	DmapConnectionPrivate *priv = connection->priv;
+	DmapStructureItem *item = NULL;
 	GNode *listing_node;
 	gint returned_count;
 	gint i;
@@ -863,15 +1261,13 @@ handle_song_listing (DMAPConnection * connection,
 	/* get the songs */
 
 	if (structure == NULL || SOUP_STATUS_IS_SUCCESSFUL (status) == FALSE) {
-		dmap_connection_state_done (connection, FALSE);
-		return;
+		goto done;
 	}
 
 	item = dmap_structure_find_item (structure, DMAP_CC_MRCO);
 	if (item == NULL) {
 		g_debug ("Could not find dmap.returnedcount item in /databases/%d/items", priv->database_id);
-		dmap_connection_state_done (connection, FALSE);
-		return;
+		goto done;
 	}
 	returned_count = g_value_get_int (&(item->content));
 	if (returned_count > 20) {
@@ -883,22 +1279,19 @@ handle_song_listing (DMAPConnection * connection,
 	item = dmap_structure_find_item (structure, DMAP_CC_MTCO);
 	if (item == NULL) {
 		g_debug ("Could not find dmap.specifiedtotalcount item in /databases/%d/items", priv->database_id);
-		dmap_connection_state_done (connection, FALSE);
-		return;
+		goto done;
 	}
 
 	item = dmap_structure_find_item (structure, DMAP_CC_MUTY);
 	if (item == NULL) {
 		g_debug ("Could not find dmap.updatetype item in /databases/%d/items", priv->database_id);
-		dmap_connection_state_done (connection, FALSE);
-		return;
+		goto done;
 	}
 
 	listing_node = dmap_structure_find_node (structure, DMAP_CC_MLCL);
 	if (listing_node == NULL) {
 		g_debug ("Could not find dmap.listing item in /databases/%d/items", priv->database_id);
-		dmap_connection_state_done (connection, FALSE);
-		return;
+		goto done;
 	}
 
 	/* FIXME: refstring: */
@@ -911,16 +1304,17 @@ handle_song_listing (DMAPConnection * connection,
 		g_source_remove (priv->emit_progress_id);
 	}
 	priv->emit_progress_id =
-		g_idle_add ((GSourceFunc) emit_progress_idle, connection);
+		g_idle_add ((GSourceFunc) _emit_progress_idle, connection);
 
 	for (i = 0, n = listing_node->children; n; i++, n = n->next) {
 		gint item_id = 0;
-		DMAPRecord *record =
+		DmapRecord *record =
 			DMAP_CONNECTION_GET_CLASS (connection)->handle_mlcl
 			(connection, priv->record_factory, n,
 			 &item_id);
 
 		if (record) {
+			GError *error = NULL;
 			gchar *uri = NULL;
 			gchar *format = NULL;
 
@@ -947,7 +1341,10 @@ handle_song_listing (DMAPConnection * connection,
 			/*} */
 
 			g_object_set (record, "location", uri, NULL);
-			dmap_db_add (connection->priv->db, record);
+			dmap_db_add (connection->priv->db, record, &error);
+			if (NULL != error) {
+				g_signal_emit (connection, _signals[ERROR], 0, error);
+			}
 			g_object_unref (record);
 			g_hash_table_insert (connection->priv->item_id_to_uri,
 					     GINT_TO_POINTER (item_id),
@@ -965,19 +1362,23 @@ handle_song_listing (DMAPConnection * connection,
 						 priv->emit_progress_id);
 			}
 			priv->emit_progress_id =
-				g_idle_add ((GSourceFunc) emit_progress_idle,
+				g_idle_add ((GSourceFunc) _emit_progress_idle,
 					    connection);
 		}
 	}
 
-	dmap_connection_state_done (connection, TRUE);
+	ok = TRUE;
+
+done:
+	_state_done (connection, ok);
+	return;
 }
 
 static int
-compare_playlists_by_name (gconstpointer a, gconstpointer b)
+_compare_playlists_by_name (gconstpointer a, gconstpointer b)
 {
-	const DMAPPlaylist *playlist1 = a;
-	const DMAPPlaylist *playlist2 = b;
+	const DmapPlaylist *playlist1 = a;
+	const DmapPlaylist *playlist2 = b;
 
 	return strcmp (playlist1->name, playlist2->name);
 }
@@ -990,31 +1391,30 @@ compare_playlists_by_name (gconstpointer a, gconstpointer b)
  */
 
 static void
-handle_playlists (DMAPConnection * connection,
-		  guint status, GNode * structure, G_GNUC_UNUSED gpointer user_data)
+_handle_playlists (DmapConnection * connection, guint status,
+                   GNode * structure, G_GNUC_UNUSED gpointer user_data)
 {
-	DMAPConnectionPrivate *priv = connection->priv;
+	gboolean ok = FALSE;
+	DmapConnectionPrivate *priv = connection->priv;
 	GNode *listing_node;
 	gint i;
 	GNode *n;
 
 	if (structure == NULL || SOUP_STATUS_IS_SUCCESSFUL (status) == FALSE) {
-		dmap_connection_state_done (connection, FALSE);
-		return;
+		goto done;
 	}
 
 	listing_node = dmap_structure_find_node (structure, DMAP_CC_MLCL);
 	if (listing_node == NULL) {
 		g_debug ("Could not find dmap.listing item in /databases/%d/containers", priv->database_id);
-		dmap_connection_state_done (connection, FALSE);
-		return;
+		goto done;
 	}
 
 	for (i = 0, n = listing_node->children; n; n = n->next, i++) {
-		DMAPStructureItem *item;
+		DmapStructureItem *item;
 		gint id;
 		gchar *name;
-		DMAPPlaylist *playlist;
+		DmapPlaylist *playlist;
 
 		item = dmap_structure_find_item (n, DMAP_CC_ABPL);
 		if (item != NULL) {
@@ -1035,7 +1435,7 @@ handle_playlists (DMAPConnection * connection,
 		}
 		name = g_value_dup_string (&(item->content));
 
-		playlist = g_new0 (DMAPPlaylist, 1);
+		playlist = g_new0 (DmapPlaylist, 1);
 		playlist->id = id;
 		playlist->name = name;
 		g_debug ("Got playlist %p: name %s, id %d", playlist,
@@ -1047,44 +1447,47 @@ handle_playlists (DMAPConnection * connection,
 	/* Sort the playlists into lexical order. Established DAAP clients already
 	 * do this leading to an absence of sorting functionality in DAAP servers. */
 	priv->playlists =
-		g_slist_sort (priv->playlists, compare_playlists_by_name);
+		g_slist_sort (priv->playlists, _compare_playlists_by_name);
 
-	dmap_connection_state_done (connection, TRUE);
+	ok = TRUE;
+
+done:
+	_state_done (connection, ok);
+	return;
 }
 
 static void
-handle_playlist_entries (DMAPConnection * connection,
-			 guint status, GNode * structure, G_GNUC_UNUSED gpointer user_data)
+_handle_playlist_entries (DmapConnection * connection, guint status,
+                          GNode * structure, G_GNUC_UNUSED gpointer user_data)
 {
-	DMAPConnectionPrivate *priv = connection->priv;
-	DMAPPlaylist *playlist;
+	gboolean ok = FALSE;
+	DmapConnectionPrivate *priv = connection->priv;
+	DmapPlaylist *playlist;
 	GNode *listing_node;
 	GNode *node;
 	gint i;
 	GList *playlist_uris = NULL;
 
 	if (structure == NULL || SOUP_STATUS_IS_SUCCESSFUL (status) == FALSE) {
-		dmap_connection_state_done (connection, FALSE);
-		return;
+		goto done;
 	}
 
 	playlist =
-		(DMAPPlaylist *) g_slist_nth_data (priv->playlists,
+		(DmapPlaylist *) g_slist_nth_data (priv->playlists,
 						   priv->reading_playlist);
 	g_assert (playlist);
 
 	listing_node = dmap_structure_find_node (structure, DMAP_CC_MLCL);
 	if (listing_node == NULL) {
 		g_debug ("Could not find dmap.listing item in /databases/%d/containers/%d/items", priv->database_id, playlist->id);
-		dmap_connection_state_done (connection, FALSE);
-		return;
+		goto done;
 	}
 
 	for (i = 0, node = listing_node->children; node;
 	     node = node->next, i++) {
 		gchar *item_uri;
 		gint playlist_item_id;
-		DMAPStructureItem *item;
+		DmapStructureItem *item;
 
 		item = dmap_structure_find_item (node, DMAP_CC_MIID);
 		if (item == NULL) {
@@ -1098,7 +1501,7 @@ handle_playlist_entries (DMAPConnection * connection,
 					     GINT_TO_POINTER
 					     (playlist_item_id));
 		if (item_uri == NULL) {
-			g_debug ("Entry %d in playlist %s doesn't exist in the database\n", playlist_item_id, playlist->name);
+			g_debug ("Entry %d in playlist %s doesn't exist in the database", playlist_item_id, playlist->name);
 			continue;
 		}
 
@@ -1109,39 +1512,202 @@ handle_playlist_entries (DMAPConnection * connection,
 	}
 
 	playlist->uris = g_list_reverse (playlist_uris);
-	dmap_connection_state_done (connection, TRUE);
+
+	ok = TRUE;
+
+done:
+	_state_done (connection, ok);
+	return;
 }
 
 static void
-handle_logout (DMAPConnection * connection,
-	       G_GNUC_UNUSED guint status,
-               G_GNUC_UNUSED GNode * structure,
-               G_GNUC_UNUSED gpointer user_data)
+_handle_logout (DmapConnection * connection, G_GNUC_UNUSED guint status,
+                G_GNUC_UNUSED GNode * structure, G_GNUC_UNUSED gpointer user_data)
 {
-	connection_disconnected (connection);
+	_connection_disconnected (connection);
 
 	/* is there any point handling errors here? */
-	dmap_connection_state_done (connection, TRUE);
+	_state_done (connection, TRUE);
+}
+
+static void
+_finish (DmapConnection * connection)
+{
+	g_assert(DMAP_IS_CONNECTION (connection));
+
+	g_debug ("DMAP finish");
+	connection->priv->state = DMAP_DONE;
+	connection->priv->progress = 1.0f;
+
+	_connection_operation_done (connection);
+
+	return;
+}
+
+static gboolean
+_do_something (DmapConnection * connection)
+{
+	DmapConnectionPrivate *priv = connection->priv;
+	char *meta;
+	char *path;
+
+	g_debug ("Doing something for state: %d", priv->state);
+
+	priv->do_something_id = 0;
+
+	switch (priv->state) {
+	case DMAP_GET_INFO:
+		g_debug ("Getting DMAP server info");
+		if (!_http_get
+		    (connection, "/server-info",
+		     (DmapResponseHandler) _handle_server_info, NULL, FALSE)) {
+			g_debug ("Could not get DMAP connection info");
+			_state_done (connection, FALSE);
+		}
+		break;
+
+	case DMAP_LOGIN:
+		// NOTE: libsoup will signal if password required and not present.
+		g_debug ("Logging into DMAP server");
+		if (!_http_get (connection, "/login",
+			       (DmapResponseHandler) _handle_login, NULL,
+			       FALSE)) {
+			g_debug ("Could not login to DMAP server");
+			_state_done (connection, FALSE);
+		}
+
+		break;
+
+	case DMAP_GET_REVISION_NUMBER:
+		g_debug ("Getting DMAP server database revision number");
+		path = g_strdup_printf
+			("/update?session-id=%u&revision-number=1",
+			 priv->session_id);
+		if (!_http_get
+		    (connection, path,
+		     (DmapResponseHandler) _handle_update, NULL, FALSE)) {
+			g_debug ("Could not get server database revision number");
+			_state_done (connection, FALSE);
+		}
+		g_free (path);
+		break;
+
+	case DMAP_GET_DB_INFO:
+		g_debug ("Getting DMAP database info");
+		path = g_strdup_printf
+			("/databases?session-id=%u&revision-number=%d",
+			 priv->session_id, priv->revision_number);
+		if (!_http_get
+		    (connection, path,
+		     (DmapResponseHandler) _handle_database_info, NULL,
+		     FALSE)) {
+			g_debug ("Could not get DMAP database info");
+			_state_done (connection, FALSE);
+		}
+		g_free (path);
+		break;
+
+	case DMAP_GET_MEDIA:
+		g_debug ("Getting DMAP song listing");
+		meta = DMAP_CONNECTION_GET_CLASS
+			(connection)->get_query_metadata (connection);
+		path = g_strdup_printf
+			("/databases/%i/items?session-id=%u&revision-number=%i"
+			 "&meta=%s", priv->database_id, priv->session_id,
+			 priv->revision_number, meta);
+		if (!_http_get
+		    (connection, path,
+		     (DmapResponseHandler) _handle_song_listing, NULL, TRUE)) {
+			g_debug ("Could not get DMAP song listing");
+			_state_done (connection, FALSE);
+		}
+		g_free (path);
+		g_free (meta);
+		break;
+
+	case DMAP_GET_PLAYLISTS:
+		g_debug ("Getting DMAP playlists");
+		path = g_strdup_printf
+			("/databases/%d/containers?session-id=%u&revision-number=%d",
+			 priv->database_id, priv->session_id,
+			 priv->revision_number);
+		if (!_http_get
+		    (connection, path,
+		     (DmapResponseHandler) _handle_playlists, NULL, TRUE)) {
+			g_debug ("Could not get DMAP playlists");
+			_state_done (connection, FALSE);
+		}
+		g_free (path);
+		break;
+
+	case DMAP_GET_PLAYLIST_ENTRIES:
+		{
+			DmapPlaylist *playlist =
+				(DmapPlaylist *)
+				g_slist_nth_data (priv->playlists,
+						  priv->reading_playlist);
+
+			g_assert (playlist);
+			g_debug ("Reading DMAP playlist %d entries",
+				 priv->reading_playlist);
+			path = g_strdup_printf
+				("/databases/%d/containers/%d/items?session-id=%u&revision-number=%d&meta=dmap.itemid",
+				 priv->database_id, playlist->id,
+				 priv->session_id, priv->revision_number);
+			if (!_http_get
+			    (connection, path,
+			     (DmapResponseHandler) _handle_playlist_entries,
+			     NULL, TRUE)) {
+				g_debug ("Could not get entries for DMAP playlist %d", priv->reading_playlist);
+				_state_done (connection,
+							    FALSE);
+			}
+			g_free (path);
+		}
+		break;
+
+	case DMAP_LOGOUT:
+		g_debug ("Logging out of DMAP server");
+		path = g_strdup_printf ("/logout?session-id=%u",
+					priv->session_id);
+		if (!_http_get
+		    (connection, path,
+		     (DmapResponseHandler) _handle_logout, NULL, FALSE)) {
+			g_debug ("Could not log out of DMAP server");
+			_state_done (connection, FALSE);
+		}
+
+		g_free (path);
+		break;
+
+	case DMAP_DONE:
+		g_debug ("DMAP done");
+
+		_finish (connection);
+
+		break;
+	}
+
+	return FALSE;
 }
 
 gboolean
-dmap_connection_is_connected (DMAPConnection * connection)
+dmap_connection_is_connected (DmapConnection * connection)
 {
-	g_return_val_if_fail (IS_DMAP_CONNECTION (connection), FALSE);
+	g_assert(DMAP_IS_CONNECTION (connection));
 
 	return connection->priv->is_connected;
 }
 
-typedef struct
-{
-	DMAPConnection *connection;
-	DMAPConnectionCallback callback;
-	gpointer data;
+typedef struct {
+	DmapConnection *connection;
+	DmapConnectionFunc callback;
+	gpointer user_data;
 	GDestroyNotify destroy;
 } ConnectionResponseData;
 
 static void
-connection_response_data_free (gpointer data)
+_connection_response_data_free (gpointer data)
 {
 	ConnectionResponseData *rdata = data;
 
@@ -1150,7 +1716,7 @@ connection_response_data_free (gpointer data)
 }
 
 static void
-connected_cb (DMAPConnection * connection, ConnectionResponseData * rdata)
+_connected_cb (DmapConnection * connection, ConnectionResponseData * rdata)
 {
 	gboolean result;
 
@@ -1159,17 +1725,17 @@ connected_cb (DMAPConnection * connection, ConnectionResponseData * rdata)
 	connection->priv->is_connecting = FALSE;
 
 	g_signal_handlers_disconnect_by_func (connection,
-					      G_CALLBACK (connected_cb),
+					      G_CALLBACK (_connected_cb),
 					      rdata);
 
 	/* if connected then we succeeded */
-	result = dmap_connection_is_connected (connection);
+	result = connection->priv->is_connected;
 
 	if (rdata->callback) {
 		rdata->callback (rdata->connection,
 				 result,
 				 rdata->connection->priv->last_error_message,
-				 rdata->data);
+				 rdata->user_data);
 	}
 
 	if (rdata->destroy) {
@@ -1177,82 +1743,38 @@ connected_cb (DMAPConnection * connection, ConnectionResponseData * rdata)
 	}
 }
 
-static void
-authenticate_cb (SoupSession *session, SoupMessage *msg, SoupAuth *auth, gboolean retrying, DMAPConnection *connection)
-{
-	if (retrying || ! connection->priv->password) {
-		g_debug ("Requesting password from application");
-		soup_session_pause_message (session, msg);
-		// FIXME: GDK_THREADS_ENTER ();
-		g_signal_emit (connection,
-			       signals[AUTHENTICATE],
-			       0,
-			       connection->priv->name,
-			       session,
-			       msg,
-			       auth,
-			       retrying);
-		// FIXME: GDK_THREADS_LEAVE ();
-	} else {
-		g_debug ("Using cached credentials");
-		soup_auth_authenticate (auth, connection->priv->username, connection->priv->password);
-	}
-}
-
-void
-dmap_connection_authenticate_message (DMAPConnection * connection, SoupSession *session, SoupMessage *message, SoupAuth *auth, const char *password)
-{
-	char *username = NULL;
-
-	g_object_set (connection, "password", password, NULL);
-
-	g_object_get (connection, "username", &username, NULL);
-	g_assert (username);
-
-	soup_auth_authenticate (auth, username, password);
-	soup_session_unpause_message (session, message);
-}
-
-void
-dmap_connection_setup (DMAPConnection * connection)
+void
+dmap_connection_setup (DmapConnection * connection)
 {
 	connection->priv->session = soup_session_new ();
 
-	g_signal_connect (connection->priv->session, "authenticate", G_CALLBACK(authenticate_cb), connection);
-
-	connection->priv->base_uri = soup_uri_new (NULL);
-	soup_uri_set_scheme (connection->priv->base_uri,
-			     SOUP_URI_SCHEME_HTTP);
-	soup_uri_set_host (connection->priv->base_uri,
-			   connection->priv->host);
-	soup_uri_set_port (connection->priv->base_uri,
-			   connection->priv->port);
-	soup_uri_set_path (connection->priv->base_uri, "");
+	connection->priv->base_uri = g_uri_build(
+		G_URI_FLAGS_NONE,
+		"http",
+		NULL,
+		connection->priv->host,
+		connection->priv->port,
+		"",
+		NULL,
+		NULL);
 }
 
-// FIXME: it would be nice if this mirrored the use of DMAPMdnsBrowser. That is, connect callback handler to a signal.
-// This would allow Vala to associated a lambda function with the signal.
+// FIXME: it would be nice if this mirrored the use of DmapMdnsBrowser. That is, connect callback handler to a signal.
+// This would allow Vala to associate a lambda function with the signal.
 void
-dmap_connection_connect (DMAPConnection * connection,
-			 DMAPConnectionCallback callback, gpointer user_data)
+dmap_connection_start (DmapConnection * connection,
+                       DmapConnectionFunc callback, gpointer user_data)
 {
 	ConnectionResponseData *rdata;
 
-	g_return_if_fail (IS_DMAP_CONNECTION (connection));
-	g_return_if_fail (connection->priv->state == DMAP_GET_INFO);
+	g_assert(DMAP_IS_CONNECTION (connection));
+	g_assert(connection->priv->state == DMAP_GET_INFO);
 
-	g_debug ("Creating new DAAP connection to %s:%d",
+	g_debug ("Creating new DMAP connection to %s:%d",
 		 connection->priv->host, connection->priv->port);
 
 	dmap_connection_setup (connection);
 
-	if (connection->priv->base_uri == NULL) {
-		g_debug ("Error parsing http://%s:%d", connection->priv->host,
-			 connection->priv->port);
-		/* FIXME: do callback */
-		return;
-	}
-
 	connection->priv->daap_base_uri =
 		g_strdup_printf ("daap://%s:%d", connection->priv->host,
 				 connection->priv->port);
@@ -1260,10 +1782,10 @@ dmap_connection_connect (DMAPConnection * connection,
 	rdata = g_new0 (ConnectionResponseData, 1);
 	rdata->connection = g_object_ref (connection);
 	rdata->callback = callback;
-	rdata->data = user_data;
-	rdata->destroy = connection_response_data_free;
+	rdata->user_data = user_data;
+	rdata->destroy = _connection_response_data_free;
 	g_signal_connect (connection, "operation-done",
-			  G_CALLBACK (connected_cb), rdata);
+			  G_CALLBACK (_connected_cb), rdata);
 
 	if (connection->priv->do_something_id != 0) {
 		g_source_remove (connection->priv->do_something_id);
@@ -1271,29 +1793,28 @@ dmap_connection_connect (DMAPConnection * connection,
 
 	connection->priv->is_connecting = TRUE;
 	connection->priv->do_something_id =
-		g_idle_add ((GSourceFunc) dmap_connection_do_something,
-			    connection);
+		g_idle_add ((GSourceFunc) _do_something, connection);
 }
 
 static void
-disconnected_cb (DMAPConnection * connection, ConnectionResponseData * rdata)
+_disconnected_cb (DmapConnection * connection, ConnectionResponseData * rdata)
 {
 	gboolean result;
 
 	g_debug ("Disconnected callback");
 
 	g_signal_handlers_disconnect_by_func (connection,
-					      G_CALLBACK (disconnected_cb),
+					      G_CALLBACK (_disconnected_cb),
 					      rdata);
 
 	/* if not connected then we succeeded */
-	result = !dmap_connection_is_connected (connection);
+	result = !connection->priv->is_connected;
 
 	if (rdata->callback) {
 		rdata->callback (rdata->connection,
 				 result,
 				 rdata->connection->priv->last_error_message,
-				 rdata->data);
+				 (gpointer) rdata->user_data);
 	}
 
 	if (rdata->destroy) {
@@ -1301,27 +1822,15 @@ disconnected_cb (DMAPConnection * connection, ConnectionResponseData * rdata)
 	}
 }
 
-static void
-dmap_connection_finish (DMAPConnection * connection)
-{
-	g_return_if_fail (IS_DMAP_CONNECTION (connection));
-
-	g_debug ("DAAP finish");
-	connection->priv->state = DMAP_DONE;
-	connection->priv->progress = 1.0f;
-
-	connection_operation_done (connection);
-}
-
 void
-dmap_connection_disconnect (DMAPConnection * connection,
-			    DMAPConnectionCallback callback,
-			    gpointer user_data)
+dmap_connection_stop(DmapConnection * connection,
+                     DmapConnectionFunc callback,
+                     gpointer user_data)
 {
-	DMAPConnectionPrivate *priv = connection->priv;
+	DmapConnectionPrivate *priv = connection->priv;
 	ConnectionResponseData *rdata;
 
-	g_return_if_fail (IS_DMAP_CONNECTION (connection));
+	g_assert(DMAP_IS_CONNECTION (connection));
 
 	g_debug ("Disconnecting");
 
@@ -1331,18 +1840,18 @@ dmap_connection_disconnect (DMAPConnection * connection,
 		 * to finish */
 		priv->state = DMAP_DONE;
 		// FIXME: GDK_THREADS_LEAVE ();
-		dmap_connection_finish (connection);
+		_finish (connection);
 		// FIXME: GDK_THREADS_ENTER ();
 	}
 
 	rdata = g_new0 (ConnectionResponseData, 1);
 	rdata->connection = g_object_ref (connection);
 	rdata->callback = callback;
-	rdata->data = user_data;
-	rdata->destroy = connection_response_data_free;
+	rdata->user_data = user_data;
+	rdata->destroy = _connection_response_data_free;
 
 	g_signal_connect (connection, "operation-done",
-			  G_CALLBACK (disconnected_cb), rdata);
+			  G_CALLBACK (_disconnected_cb), rdata);
 
 	if (priv->do_something_id != 0) {
 		g_source_remove (priv->do_something_id);
@@ -1351,230 +1860,20 @@ dmap_connection_disconnect (DMAPConnection * connection,
 	if (!connection->priv->is_connected) {
 		priv->state = DMAP_DONE;
 		// FIXME: GDK_THREADS_LEAVE ();
-		dmap_connection_finish (connection);
+		_finish (connection);
 		// FIXME: GDK_THREADS_ENTER ();
 	} else {
 		priv->state = DMAP_LOGOUT;
 
-		priv->do_something_id = g_idle_add ((GSourceFunc)
-						    dmap_connection_do_something,
+		priv->do_something_id = g_idle_add ((GSourceFunc) _do_something,
 						    connection);
 	}
 }
 
-static void
-dmap_connection_state_done (DMAPConnection * connection, gboolean result)
-{
-	DMAPConnectionPrivate *priv = connection->priv;
-
-	g_debug ("Transitioning to next state from %d", priv->state);
-
-	if (result == FALSE) {
-		priv->state = DMAP_DONE;
-		priv->result = FALSE;
-	} else {
-		switch (priv->state) {
-		case DMAP_GET_PLAYLISTS:
-			if (priv->playlists == NULL)
-				priv->state = DMAP_DONE;
-			else
-				priv->state = DMAP_GET_PLAYLIST_ENTRIES;
-			break;
-		case DMAP_GET_PLAYLIST_ENTRIES:
-			/* keep reading playlists until we've got them all */
-			if (++priv->reading_playlist >=
-			    g_slist_length (priv->playlists))
-				priv->state = DMAP_DONE;
-			break;
-
-		case DMAP_LOGOUT:
-			priv->state = DMAP_DONE;
-			break;
-
-		case DMAP_DONE:
-			/* uhh.. */
-			g_debug ("This should never happen.");
-			break;
-
-		default:
-			/* in most states, we just move on to the next */
-			if (priv->state > DMAP_DONE) {
-				g_debug ("This should REALLY never happen.");
-				return;
-			}
-			priv->state++;
-			break;
-		}
-
-		priv->progress = 1.0f;
-		if (connection->priv->emit_progress_id != 0) {
-			g_source_remove (connection->priv->emit_progress_id);
-		}
-		connection->priv->emit_progress_id =
-			g_idle_add ((GSourceFunc) emit_progress_idle,
-				    connection);
-	}
-
-	if (priv->do_something_id != 0) {
-		g_source_remove (priv->do_something_id);
-	}
-	priv->do_something_id =
-		g_idle_add ((GSourceFunc) dmap_connection_do_something,
-			    connection);
-}
-
-static gboolean
-dmap_connection_do_something (DMAPConnection * connection)
-{
-	DMAPConnectionPrivate *priv = connection->priv;
-	char *meta;
-	char *path;
-
-	g_debug ("Doing something for state: %d", priv->state);
-
-	priv->do_something_id = 0;
-
-	switch (priv->state) {
-	case DMAP_GET_INFO:
-		g_debug ("Getting DAAP server info");
-		if (!http_get
-		    (connection, "/server-info", FALSE, 0.0, 0, FALSE,
-		     (DMAPResponseHandler) handle_server_info, NULL, FALSE)) {
-			g_debug ("Could not get DAAP connection info");
-			dmap_connection_state_done (connection, FALSE);
-		}
-		break;
-
-	case DMAP_LOGIN:
-		// NOTE: libsoup will signal if password required and not present.
-		g_debug ("Logging into DAAP server");
-		if (!http_get (connection, "/login", FALSE, 0.0, 0, FALSE,
-			       (DMAPResponseHandler) handle_login, NULL,
-			       FALSE)) {
-			g_debug ("Could not login to DAAP server");
-			dmap_connection_state_done (connection, FALSE);
-		}
-
-		break;
-
-	case DMAP_GET_REVISION_NUMBER:
-		g_debug ("Getting DAAP server database revision number");
-		path = g_strdup_printf
-			("/update?session-id=%u&revision-number=1",
-			 priv->session_id);
-		if (!http_get
-		    (connection, path, TRUE, priv->dmap_version, 0, FALSE,
-		     (DMAPResponseHandler) handle_update, NULL, FALSE)) {
-			g_debug ("Could not get server database revision number");
-			dmap_connection_state_done (connection, FALSE);
-		}
-		g_free (path);
-		break;
-
-	case DMAP_GET_DB_INFO:
-		g_debug ("Getting DAAP database info");
-		path = g_strdup_printf
-			("/databases?session-id=%u&revision-number=%d",
-			 priv->session_id, priv->revision_number);
-		if (!http_get
-		    (connection, path, TRUE, priv->dmap_version, 0, FALSE,
-		     (DMAPResponseHandler) handle_database_info, NULL,
-		     FALSE)) {
-			g_debug ("Could not get DAAP database info");
-			dmap_connection_state_done (connection, FALSE);
-		}
-		g_free (path);
-		break;
-
-	case DMAP_GET_SONGS:
-		g_debug ("Getting DAAP song listing");
-		meta = DMAP_CONNECTION_GET_CLASS
-			(connection)->get_query_metadata (connection);
-		path = g_strdup_printf
-			("/databases/%i/items?session-id=%u&revision-number=%i"
-			 "&meta=%s", priv->database_id, priv->session_id,
-			 priv->revision_number, meta);
-		if (!http_get
-		    (connection, path, TRUE, priv->dmap_version, 0, FALSE,
-		     (DMAPResponseHandler) handle_song_listing, NULL, TRUE)) {
-			g_debug ("Could not get DAAP song listing");
-			dmap_connection_state_done (connection, FALSE);
-		}
-		g_free (path);
-		g_free (meta);
-		break;
-
-	case DMAP_GET_PLAYLISTS:
-		g_debug ("Getting DAAP playlists");
-		path = g_strdup_printf
-			("/databases/%d/containers?session-id=%u&revision-number=%d",
-			 priv->database_id, priv->session_id,
-			 priv->revision_number);
-		if (!http_get
-		    (connection, path, TRUE, priv->dmap_version, 0, FALSE,
-		     (DMAPResponseHandler) handle_playlists, NULL, TRUE)) {
-			g_debug ("Could not get DAAP playlists");
-			dmap_connection_state_done (connection, FALSE);
-		}
-		g_free (path);
-		break;
-
-	case DMAP_GET_PLAYLIST_ENTRIES:
-		{
-			DMAPPlaylist *playlist =
-				(DMAPPlaylist *)
-				g_slist_nth_data (priv->playlists,
-						  priv->reading_playlist);
-
-			g_assert (playlist);
-			g_debug ("Reading DAAP playlist %d entries",
-				 priv->reading_playlist);
-			path = g_strdup_printf
-				("/databases/%d/containers/%d/items?session-id=%u&revision-number=%d&meta=dmap.itemid",
-				 priv->database_id, playlist->id,
-				 priv->session_id, priv->revision_number);
-			if (!http_get
-			    (connection, path, TRUE, priv->dmap_version, 0,
-			     FALSE,
-			     (DMAPResponseHandler) handle_playlist_entries,
-			     NULL, TRUE)) {
-				g_debug ("Could not get entries for DAAP playlist %d", priv->reading_playlist);
-				dmap_connection_state_done (connection,
-							    FALSE);
-			}
-			g_free (path);
-		}
-		break;
-
-	case DMAP_LOGOUT:
-		g_debug ("Logging out of DAAP server");
-		path = g_strdup_printf ("/logout?session-id=%u",
-					priv->session_id);
-		if (!http_get
-		    (connection, path, TRUE, priv->dmap_version, 0, FALSE,
-		     (DMAPResponseHandler) handle_logout, NULL, FALSE)) {
-			g_debug ("Could not log out of DAAP server");
-			dmap_connection_state_done (connection, FALSE);
-		}
-
-		g_free (path);
-		break;
-
-	case DMAP_DONE:
-		g_debug ("DAAP done");
-
-		dmap_connection_finish (connection);
-
-		break;
-	}
-
-	return FALSE;
-}
-
 SoupMessageHeaders *
-dmap_connection_get_headers (DMAPConnection * connection, const gchar * uri)
+dmap_connection_get_headers (DmapConnection * connection, const gchar * uri)
 {
-	DMAPConnectionPrivate *priv = connection->priv;
+	DmapConnectionPrivate *priv = connection->priv;
 	SoupMessageHeaders *headers = NULL;
 	char hash[33] = { 0 };
 	char *norb_daap_uri = (char *) uri;
@@ -1586,7 +1885,7 @@ dmap_connection_get_headers (DMAPConnection * connection, const gchar * uri)
 		norb_daap_uri = strstr (uri, "/data");
 	}
 
-	dmap_hash_generate ((short) floorf (priv->dmap_version),
+	dmap_md5_generate ((short) floorf (priv->dmap_version),
 			    (const guchar *) norb_daap_uri, 2,
 			    (guchar *) hash, priv->request_id);
 
@@ -1611,199 +1910,84 @@ dmap_connection_get_headers (DMAPConnection * connection, const gchar * uri)
 
 // FIXME: unify this with share API? Build Container DB?
 GSList *
-dmap_connection_get_playlists (DMAPConnection * connection)
+dmap_connection_get_playlists (DmapConnection * connection)
 {
 	return connection->priv->playlists;
 }
 
-static void
-dmap_connection_dispose (GObject * object)
+void
+dmap_connection_emit_error(DmapConnection *connection, gint code,
+                           const gchar *format, ...)
 {
-	DMAPConnectionPrivate *priv = DMAP_CONNECTION (object)->priv;
-	GSList *l;
-
-	g_debug ("DAAP connection dispose");
-
-	if (priv->emit_progress_id != 0) {
-		g_source_remove (priv->emit_progress_id);
-		priv->emit_progress_id = 0;
-	}
-
-	if (priv->do_something_id != 0) {
-		g_source_remove (priv->do_something_id);
-		priv->do_something_id = 0;
-	}
-
-	if (priv->name) {
-		g_free (priv->name);
-		priv->name = NULL;
-	}
-
-	if (priv->username) {
-		g_free (priv->username);
-		priv->username = NULL;
-	}
-
-	if (priv->password) {
-		g_free (priv->password);
-		priv->password = NULL;
-	}
-
-	if (priv->host) {
-		g_free (priv->host);
-		priv->host = NULL;
-	}
+	va_list ap;
+	GError *error;
 
-	if (priv->playlists) {
-		for (l = priv->playlists; l; l = l->next) {
-			DMAPPlaylist *playlist = l->data;
+	va_start(ap, format);
+	error = g_error_new_valist(DMAP_ERROR, code, format, ap);
+	g_signal_emit_by_name(connection, "error", error);
 
-			/* FIXME: refstring: */
-			g_list_free_full (playlist->uris, g_free);
-			g_free (playlist->name);
-			g_free (playlist);
-			l->data = NULL;
-		}
-		g_slist_free (priv->playlists);
-		priv->playlists = NULL;
-	}
-
-	if (priv->item_id_to_uri) {
-		g_hash_table_destroy (priv->item_id_to_uri);
-		priv->item_id_to_uri = NULL;
-	}
-
-	if (priv->session) {
-		g_debug ("Aborting all pending requests");
-		soup_session_abort (priv->session);
-		g_object_unref (G_OBJECT (priv->session));
-		priv->session = NULL;
-	}
-
-	if (priv->base_uri) {
-		soup_uri_free (priv->base_uri);
-		priv->base_uri = NULL;
-	}
-
-	if (priv->daap_base_uri) {
-		g_free (priv->daap_base_uri);
-		priv->daap_base_uri = NULL;
-	}
-
-	if (priv->db) {
-		g_object_unref (G_OBJECT (priv->db));
-		priv->db = NULL;
-	}
+	va_end(ap);
+}
 
-	if (priv->record_factory) {
-		g_object_unref (G_OBJECT (priv->record_factory));
-		priv->record_factory = NULL;
-	}
+#ifdef HAVE_CHECK
 
-	if (priv->last_error_message != NULL) {
-		g_free (priv->last_error_message);
-		priv->last_error_message = NULL;
-	}
+#include <check.h>
+#include <libdmapsharing/dmap-av-connection.h>
 
-	G_OBJECT_CLASS (dmap_connection_parent_class)->dispose (object);
-}
+static int _status = DMAP_STATUS_OK;
 
 static void
-dmap_connection_set_property (GObject * object,
-			      guint prop_id,
-			      const GValue * value, GParamSpec * pspec)
+_error_cb(G_GNUC_UNUSED DmapConnection *connection, GError *error,
+          G_GNUC_UNUSED gpointer user_data)
 {
-	DMAPConnectionPrivate *priv = DMAP_CONNECTION (object)->priv;
-
-	switch (prop_id) {
-	case PROP_NAME:
-		g_free (priv->name);
-		priv->name = g_value_dup_string (value);
-		break;
-	case PROP_DB:
-		priv->db = DMAP_DB (g_value_get_pointer (value));
-		break;
-	case PROP_FACTORY:
-		priv->record_factory =
-			DMAP_RECORD_FACTORY (g_value_get_pointer (value));
-		break;
-	case PROP_HOST:
-		g_free (priv->host);
-		priv->host = g_value_dup_string (value);
-		break;
-	case PROP_PORT:
-		priv->port = g_value_get_uint (value);
-		break;
-	case PROP_BASE_URI:
-		priv->base_uri = g_value_get_pointer (value);
-		break;
-	case PROP_DATABASE_ID:
-		priv->database_id = g_value_get_int (value);
-		break;
-	case PROP_SESSION_ID:
-		priv->session_id = g_value_get_int (value);
-		break;
-	case PROP_DMAP_VERSION:
-		priv->dmap_version = g_value_get_double (value);
-		break;
-	case PROP_REVISION_NUMBER:
-		priv->revision_number = g_value_get_int (value);
-		break;
-	case PROP_USERNAME:
-		priv->username = g_value_dup_string (value);
-		break;
-	case PROP_PASSWORD:
-		priv->password = g_value_dup_string (value);
-		break;
-	default:
-		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-		break;
-	}
+	_status = error->code;
 }
 
-static void
-dmap_connection_get_property (GObject * object,
-			      guint prop_id,
-			      GValue * value, GParamSpec * pspec)
-{
-	DMAPConnectionPrivate *priv = DMAP_CONNECTION (object)->priv;
+#define _ACTUAL_HTTP_RESPONSE_HANDLER_TEST(bytes, size, __status) \
+{ \
+	DmapConnection *connection; \
+	DmapResponseData  *data; \
+	\
+	_status = DMAP_STATUS_OK; \
+	\
+	connection = g_object_new(DMAP_TYPE_AV_CONNECTION, NULL); \
+	g_signal_connect(connection, "error", G_CALLBACK(_error_cb), NULL); \
+	\
+	data = g_new0(DmapResponseData, 1); \
+	data->body    = g_bytes_new(bytes, sizeof(bytes)); \
+	data->status     = SOUP_STATUS_OK; \
+	data->connection = connection; \
+	data->message_path = g_strdup("/"); \
+	data->headers = NULL; \
+	\
+	_actual_http_response_handler(data); \
+	\
+	ck_assert(_status == __status); \
+} \
+
+START_TEST(_actual_http_response_handler_test) \
+_ACTUAL_HTTP_RESPONSE_HANDLER_TEST("minm\x00\x00\x00\x0eHello, world!",
+                                    sizeof bytes, DMAP_STATUS_OK);
+END_TEST
+
+/* Length < 8 only allowed for DMAP_RAW. */
+START_TEST(_actual_http_response_handler_too_short_test) \
+_ACTUAL_HTTP_RESPONSE_HANDLER_TEST("xxxx", sizeof bytes,
+                                    DMAP_STATUS_RESPONSE_TOO_SHORT);
+END_TEST
+
+START_TEST(_actual_http_response_handler_bad_cc_test) \
+_ACTUAL_HTTP_RESPONSE_HANDLER_TEST("xxxx\x00\x00\x00\x00", sizeof bytes,
+                                    DMAP_STATUS_INVALID_CONTENT_CODE);
+END_TEST
+
+/* Length of 99 is larger than sizeof containing array. */
+START_TEST(_actual_http_response_handler_bad_len_test) \
+_ACTUAL_HTTP_RESPONSE_HANDLER_TEST("minm\x00\x00\x00\x99Hello, world!",
+                                    sizeof bytes,
+                                    DMAP_STATUS_INVALID_CONTENT_CODE_SIZE);
+END_TEST
+
+#include "dmap-connection-suite.c"
 
-	switch (prop_id) {
-	case PROP_DB:
-		g_value_set_pointer (value, priv->db);
-		break;
-	case PROP_FACTORY:
-		g_value_set_pointer (value, priv->record_factory);
-		break;
-	case PROP_NAME:
-		g_value_set_string (value, priv->name);
-		break;
-	case PROP_HOST:
-		g_value_set_string (value, priv->host);
-		break;
-	case PROP_PORT:
-		g_value_set_uint (value, priv->port);
-		break;
-	case PROP_BASE_URI:
-		g_value_set_pointer (value, priv->base_uri);
-		break;
-	case PROP_DATABASE_ID:
-		g_value_set_int (value, priv->database_id);
-		break;
-	case PROP_SESSION_ID:
-		g_value_set_int (value, priv->session_id);
-		break;
-	case PROP_DMAP_VERSION:
-		g_value_set_double (value, priv->dmap_version);
-		break;
-	case PROP_REVISION_NUMBER:
-		g_value_set_int (value, priv->revision_number);
-		break;
-	case PROP_USERNAME:
-		g_value_set_string (value, priv->username);
-		break;
-	default:
-		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-		break;
-	}
-}
+#endif
diff --git a/libdmapsharing/dmap-connection.h b/libdmapsharing/dmap-connection.h
index ccf6f00..a27e2da 100644
--- a/libdmapsharing/dmap-connection.h
+++ b/libdmapsharing/dmap-connection.h
@@ -18,180 +18,223 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef __DMAP_CONNECTION_H
-#define __DMAP_CONNECTION_H
+#ifndef _DMAP_CONNECTION_H
+#define _DMAP_CONNECTION_H
 
 #include <glib.h>
 #include <glib-object.h>
 #include <libsoup/soup.h>
 
-#include <libdmapsharing/dmap-structure.h>
+#include <libdmapsharing/dmap-cc.h>
 #include <libdmapsharing/dmap-db.h>
 #include <libdmapsharing/dmap-record-factory.h>
 
-G_BEGIN_DECLS typedef struct
-{
+G_BEGIN_DECLS
+
+/**
+ * SECTION: dmap-connection
+ * @short_description: An abstract parent to the various connection classes.
+ *
+ * #DmapConnection provides an abstract parent to the #DmapAvConnection, #DmapControlConnection, and #DmapImageConnection classes.
+ */
+
+typedef struct {
 	char *name;
 	int id;
 	GList *uris;
-} DMAPPlaylist;
+} DmapPlaylist;
 
 /**
  * DMAP_TYPE_CONNECTION:
  *
- * The type for #DMAPConnection.
+ * The type for #DmapConnection.
  */
 #define DMAP_TYPE_CONNECTION		(dmap_connection_get_type ())
 /**
  * DMAP_CONNECTION:
  * @o: Object which is subject to casting.
  *
- * Casts a #DMAPConnection or derived pointer into a (DMAPConnection *) pointer.
+ * Casts a #DmapConnection or derived pointer into a (DmapConnection *) pointer.
  * Depending on the current debugging level, this function may invoke
  * certain runtime checks to identify invalid casts.
  */
-#define DMAP_CONNECTION(o)		(G_TYPE_CHECK_INSTANCE_CAST ((o), DMAP_TYPE_CONNECTION, DMAPConnection))
+#define DMAP_CONNECTION(o)		(G_TYPE_CHECK_INSTANCE_CAST ((o), DMAP_TYPE_CONNECTION, DmapConnection))
 /**
  * DMAP_CONNECTION_CLASS:
- * @k: a valid #DMAPConnectionClass
+ * @k: a valid #DmapConnectionClass
  *
- * Casts a derived #DMAPConnectionClass structure into a #DMAPConnectionClass
+ * Casts a derived #DmapConnectionClass structure into a #DmapConnectionClass
  * structure.
  */
-#define DMAP_CONNECTION_CLASS(k)	(G_TYPE_CHECK_CLASS_CAST((k), DMAP_TYPE_CONNECTION, DMAPConnectionClass))
+#define DMAP_CONNECTION_CLASS(k)	(G_TYPE_CHECK_CLASS_CAST((k), DMAP_TYPE_CONNECTION, DmapConnectionClass))
 /**
- * IS_DMAP_CONNECTION:
+ * DMAP_IS_CONNECTION:
  * @o: Instance to check for being a %DMAP_TYPE_CONNECTION.
  *
  * Checks whether a valid #GTypeInstance pointer is of type %DMAP_TYPE_CONNECTION.
  */
-#define IS_DMAP_CONNECTION(o)	(G_TYPE_CHECK_INSTANCE_TYPE ((o), DMAP_TYPE_CONNECTION))
+#define DMAP_IS_CONNECTION(o)	(G_TYPE_CHECK_INSTANCE_TYPE ((o), DMAP_TYPE_CONNECTION))
 /**
- * IS_DMAP_CONNECTION_CLASS:
- * @k: a #DMAPConnectionClass
+ * DMAP_IS_CONNECTION_CLASS:
+ * @k: a #DmapConnectionClass
  *
- * Checks whether @k "is a" valid #DMAPConnectionClass structure of type
+ * Checks whether @k "is a" valid #DmapConnectionClass structure of type
  * %DMAP_CONNECTION or derived.
  */
-#define IS_DMAP_CONNECTION_CLASS(k)	(G_TYPE_CHECK_CLASS_TYPE ((k), DMAP_TYPE_CONNECTION))
+#define DMAP_IS_CONNECTION_CLASS(k)	(G_TYPE_CHECK_CLASS_TYPE ((k), DMAP_TYPE_CONNECTION))
 /**
  * DMAP_CONNECTION_GET_CLASS:
- * @o: a #DMAPConnection instance.
+ * @o: a #DmapConnection instance.
  *
- * Get the class structure associated to a #DMAPConnection instance.
+ * Get the class structure associated to a #DmapConnection instance.
  *
  * Returns: pointer to object class structure.
  */
-#define DMAP_CONNECTION_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), DMAP_TYPE_CONNECTION, DMAPConnectionClass))
+#define DMAP_CONNECTION_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), DMAP_TYPE_CONNECTION, DmapConnectionClass))
 
-typedef struct DMAPConnectionPrivate DMAPConnectionPrivate;
+typedef struct DmapConnectionPrivate DmapConnectionPrivate;
 
-typedef enum
-{
+/**
+ * DmapConnectionState:
+ * @DMAP_GET_INFO: getting DMAP server information
+ * @DMAP_LOGIN: logging in to DMAP server
+ * @DMAP_GET_REVISION_NUMBER: getting server's database revision number
+ * @DMAP_GET_DB_INFO: getting DMAP database information
+ * @DMAP_GET_MEDIA: getting DMAP media listing
+ * @DMAP_GET_PLAYLISTS: getting DMAP playlists
+ * @DMAP_GET_PLAYLIST_ENTRIES: getting entries in playlist
+ * @DMAP_LOGOUT: logging out of DMAP server
+ * @DMAP_DONE: done
+ *
+ * Enumeration of connection states.
+ */
+typedef enum {
 	DMAP_GET_INFO = 0,
 	DMAP_LOGIN,
 	DMAP_GET_REVISION_NUMBER,
 	DMAP_GET_DB_INFO,
-	DMAP_GET_SONGS,
+	DMAP_GET_MEDIA,
 	DMAP_GET_PLAYLISTS,
 	DMAP_GET_PLAYLIST_ENTRIES,
 	DMAP_LOGOUT,
 	DMAP_DONE
-} DMAPConnectionState;
+} DmapConnectionState;
 
-typedef struct
-{
+typedef struct {
 	GObject parent;
-	DMAPConnectionPrivate *priv;
-} DMAPConnection;
+	DmapConnectionPrivate *priv;
+} DmapConnection;
 
-typedef struct
-{
+typedef struct {
 	GObjectClass parent;
 
 	/* Pure virtual methods: */
-	  DMAPContentCode (*get_protocol_version_cc) (DMAPConnection *
+	  DmapContentCode (*get_protocol_version_cc) (DmapConnection *
 						      connection);
-	gchar *(*get_query_metadata) (DMAPConnection * connection);
-	DMAPRecord *(*handle_mlcl) (DMAPConnection * connection,
-				    DMAPRecordFactory * factory, GNode * mlcl,
+	gchar *(*get_query_metadata) (DmapConnection * connection);
+	DmapRecord *(*handle_mlcl) (DmapConnection * connection,
+				    DmapRecordFactory * factory, GNode * mlcl,
 				    gint * item_id);
 
-	SoupMessage *(*build_message)
-	 
-		(DMAPConnection * connection,
-	   const gchar * path,
-	   gboolean need_hash,
-	   gdouble version, gint req_id, gboolean send_close);
-	void (*connected) (DMAPConnection * connection);
-	void (*disconnected) (DMAPConnection * connection);
+	SoupMessage *(*build_message) (DmapConnection * connection,
+	                               const gchar * path,
+	                               gboolean need_hash,
+	                               gdouble version,
+	                               gint req_id,
+	                               gboolean send_close);
+	void (*connected) (DmapConnection * connection);
+	void (*disconnected) (DmapConnection * connection);
 
-	char *(*authenticate) (DMAPConnection * connection, const char *name);
-	void (*connecting) (DMAPConnection * connection,
-			    DMAPConnectionState state, float progress);
+	char *(*authenticate) (DmapConnection * connection, const char *name);
+	void (*connecting) (DmapConnection * connection,
+			    DmapConnectionState state, float progress);
 
-	void (*operation_done) (DMAPConnection * connection);
+	void (*operation_done) (DmapConnection * connection);
 
-} DMAPConnectionClass;
+} DmapConnectionClass;
 
 /* hmm, maybe should give more error information? */
-typedef gboolean (*DMAPConnectionCallback) (DMAPConnection * connection,
-					    gboolean result,
-					    const char *reason,
-					    gpointer user_data);
-
-typedef void (*DMAPResponseHandler) (DMAPConnection * connection,
-				     guint status,
-				     GNode * structure, gpointer user_data);
+typedef void (*DmapConnectionFunc) (DmapConnection * connection,
+                                    gboolean result,
+                                    const char *reason,
+                                    gpointer user_data);
 
 GType dmap_connection_get_type (void);
 
-gboolean dmap_connection_is_connected (DMAPConnection * connection);
-void dmap_connection_setup (DMAPConnection * connection);
-void dmap_connection_connect (DMAPConnection * connection,
-			      DMAPConnectionCallback callback,
-			      gpointer user_data);
-void dmap_connection_disconnect (DMAPConnection * connection,
-				 DMAPConnectionCallback callback,
-				 gpointer user_data);
+/**
+ * dmap_connection_is_connected:
+ * @connection: The connection.
+ *
+ * Returns TRUE if the connection is presently connected.
+ */
+gboolean dmap_connection_is_connected (DmapConnection * connection);
 
-SoupMessageHeaders *dmap_connection_get_headers (DMAPConnection * connection,
-						 const char *uri);
+/**
+ * dmap_connection_start:
+ * @connection: The connection.
+ * @callback: (scope async): The function to call once the connection is complete.
+ * @user_data: The data to pass to the callback.
+ *
+ * Connect to the remote DMAP share.
+ */
+void dmap_connection_start (DmapConnection * connection,
+			    DmapConnectionFunc callback,
+			    gpointer user_data);
 
-GSList *dmap_connection_get_playlists (DMAPConnection * connection);
+/**
+ * dmap_connection_stop:
+ * @connection: The connection.
+ * @callback: (scope async): The function to call once the connection is complete.
+ * @user_data: The data to pass to the callback.
+ *
+ * Disconnect from the remote DMAP share.
+ */
+void dmap_connection_stop(DmapConnection * connection,
+                          DmapConnectionFunc callback,
+                          gpointer user_data);
 
-SoupMessage *dmap_connection_build_message (DMAPConnection * connection,
-					    const gchar * path,
-					    gboolean need_hash,
-					    gdouble version,
-					    gint req_id, gboolean send_close);
+SoupMessageHeaders *dmap_connection_get_headers (DmapConnection * connection,
+						 const char *uri);
+
+/**
+ * dmap_connection_get_playlists:
+ * @connection: A #DmapConnection
+ *
+ * Get the playlists associated with a #DmapConnection instance.
+ *
+ * Returns: (element-type DmapPlaylist) (transfer none): pointer to a list of playlists.
+ */
+GSList *dmap_connection_get_playlists (DmapConnection * connection);
 
 /**
  * dmap_connection_authenticate_message:
- * @connection: A #DMAPConnection
+ * @connection: A #DmapConnection
  * @session: A #SoupSession
  * @message: A #SoupMessage
  * @auth: A #SoupAuth
  * @password: A password
- *     
+ *
  * Attach an authentication credential to a request. This
  * method should be called by a function that is connected to the
- * #DMAPConnection::authenticate signal. The signal will provide the
+ * #DmapConnection::authenticate signal. The signal will provide the
  * connection, session, message and auth to that function. That function
  * should obtain a password and provide it to this method.
  */
-void dmap_connection_authenticate_message (DMAPConnection *connection,
+void dmap_connection_authenticate_message (DmapConnection *connection,
                                            SoupSession *session,
                                            SoupMessage *message,
 					   SoupAuth *auth,
 					   const char *password);
 
-
-gboolean dmap_connection_get (DMAPConnection * self,
-			      const gchar * path,
-			      gboolean need_hash,
-			      DMAPResponseHandler handler,
-			      gpointer user_data);
+/**
+ * dmap_connection_emit_error:
+ * @connection: a #DmapConnection instance.
+ * @code: error code.
+ * @format: printf()-style format for error message
+ * @...: parameters for message format
+ */
+void dmap_connection_emit_error(DmapConnection *connection, gint code,
+                                const gchar *format, ...);
 
 G_END_DECLS
-#endif /* __DMAP_CONNECTION_H */
+#endif /* _DMAP_CONNECTION_H */
diff --git a/libdmapsharing/dmap-container-db.c b/libdmapsharing/dmap-container-db.c
index 10ff091..f50c49f 100644
--- a/libdmapsharing/dmap-container-db.c
+++ b/libdmapsharing/dmap-container-db.c
@@ -20,62 +20,33 @@
 
 #include <libdmapsharing/dmap-container-db.h>
 
-static gint dmap_container_db_init_count = 0;
-
-static void
-dmap_container_db_init (G_GNUC_UNUSED DMAPContainerDbIface * iface)
-{
-	dmap_container_db_init_count++;
-}
-
 static void
-dmap_container_db_finalize (G_GNUC_UNUSED DMAPContainerDbIface * iface)
+dmap_container_db_default_init (G_GNUC_UNUSED DmapContainerDbInterface * iface)
 {
-	dmap_container_db_init_count--;
 }
 
-/* FIXME: No G_DEFINE_INTERFACE available in GObject headers: */
-GType
-dmap_container_db_get_type (void)
-{
-	static GType object_type = 0;
-
-	if (!object_type) {
-		static const GTypeInfo object_info = {
-			class_size:     sizeof (DMAPContainerDbIface),
-			base_init:     (GBaseInitFunc) dmap_container_db_init,
-			base_finalize: (GBaseFinalizeFunc) dmap_container_db_finalize
-		};
-		object_type =
-			g_type_register_static (G_TYPE_INTERFACE,
-						"DMAPContainerDb",
-						&object_info, 0);
-		g_type_interface_add_prerequisite (object_type,
-						   G_TYPE_OBJECT);
-	}
-	return object_type;
-}
+G_DEFINE_INTERFACE(DmapContainerDb, dmap_container_db, G_TYPE_OBJECT)
 
 void
-dmap_container_db_add (DMAPContainerDb * db, DMAPContainerRecord *record)
+dmap_container_db_add (DmapContainerDb *db, DmapContainerRecord *record, GError **error)
 {
-	return DMAP_CONTAINER_DB_GET_INTERFACE (db)->add (db, record);
+	return DMAP_CONTAINER_DB_GET_INTERFACE (db)->add (db, record, error);
 }
 
-DMAPContainerRecord *
-dmap_container_db_lookup_by_id (DMAPContainerDb * db, guint id)
+DmapContainerRecord *
+dmap_container_db_lookup_by_id (DmapContainerDb * db, guint id)
 {
 	return DMAP_CONTAINER_DB_GET_INTERFACE (db)->lookup_by_id (db, id);
 }
 
 void
-dmap_container_db_foreach (DMAPContainerDb * db, GHFunc func, gpointer data)
+dmap_container_db_foreach (DmapContainerDb * db, DmapIdContainerRecordFunc func, gpointer data)
 {
 	DMAP_CONTAINER_DB_GET_INTERFACE (db)->foreach (db, func, data);
 }
 
 gulong
-dmap_container_db_count (DMAPContainerDb * db)
+dmap_container_db_count (DmapContainerDb * db)
 {
 	return DMAP_CONTAINER_DB_GET_INTERFACE (db)->count (db);
 }
diff --git a/libdmapsharing/dmap-container-db.h b/libdmapsharing/dmap-container-db.h
index f001a82..11867a4 100644
--- a/libdmapsharing/dmap-container-db.h
+++ b/libdmapsharing/dmap-container-db.h
@@ -18,63 +18,82 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef __DMAP_CONTAINER_DB_H
-#define __DMAP_CONTAINER_DB_H
+#ifndef _DMAP_CONTAINER_DB_H
+#define _DMAP_CONTAINER_DB_H
 
 #include <glib-object.h>
 
 #include <libdmapsharing/dmap-container-record.h>
 
 G_BEGIN_DECLS
+/**
+ * SECTION: dmap-container-db
+ * @short_description: An interface for DMAP container databases.
+ *
+ * #DmapContainerDb provides an interface for DMAP container databases.
+ */
+
 /**
  * DMAP_TYPE_CONTAINER_DB:
  *
- * The type for #DMAPContainerDb.
+ * The type for #DmapContainerDb.
  */
 #define DMAP_TYPE_CONTAINER_DB		 (dmap_container_db_get_type ())
 /**
  * DMAP_CONTAINER_DB:
  * @o: Object which is subject to casting.
  *
- * Casts a #DMAPContainerDb or derived pointer into a (DMAPContainerDb*) 
+ * Casts a #DmapContainerDb or derived pointer into a (DmapContainerDb*) 
  * pointer. Depending on the current debugging level, this function may invoke
  * certain runtime checks to identify invalid casts.
  */
 #define DMAP_CONTAINER_DB(o)		 (G_TYPE_CHECK_INSTANCE_CAST ((o), \
-				          DMAP_TYPE_CONTAINER_DB, DMAPContainerDb))
+				          DMAP_TYPE_CONTAINER_DB, DmapContainerDb))
 /**
- * IS_DMAP_CONTAINER_DB:
+ * DMAP_IS_CONTAINER_DB:
  * @o: Instance to check for being a %DMAP_TYPE_CONTAINER_DB.
  *
  * Checks whether a valid #GTypeInstance pointer is of type
  * %DMAP_TYPE_CONTAINER_DB.
  */
-#define IS_DMAP_CONTAINER_DB(o)		 (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
+#define DMAP_IS_CONTAINER_DB(o)		 (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
 				          DMAP_TYPE_CONTAINER_DB))
 /**
  * DMAP_CONTAINER_DB_GET_INTERFACE:
- * @o: a #DMAPContainerDb instance.
+ * @o: a #DmapContainerDb instance.
  *
- * Get the interface structure associated to a #DMAPContainerDb instance.
+ * Get the interface structure associated to a #DmapContainerDb instance.
  *
  * Returns: pointer to object interface structure.
  */
 #define DMAP_CONTAINER_DB_GET_INTERFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), \
-				            DMAP_TYPE_CONTAINER_DB, DMAPContainerDbIface))
-typedef struct _DMAPContainerDb DMAPContainerDb;
-typedef struct _DMAPContainerDbIface DMAPContainerDbIface;
+				            DMAP_TYPE_CONTAINER_DB, DmapContainerDbInterface))
+typedef struct _DmapContainerDb DmapContainerDb;
+typedef struct _DmapContainerDbInterface DmapContainerDbInterface;
+
+/**
+ * DmapIdContainerRecordFunc:
+ * @id: a DMAP container record ID
+ * @record: a #DmapContainerRecord
+ * @user_data: (closure): user data
+ *
+ * The type of function passed to dmap_container_db_foreach().
+ */
+typedef void (*DmapIdContainerRecordFunc) (guint id,
+                                           DmapContainerRecord *record,
+                                           gpointer user_data);
 
-struct _DMAPContainerDbIface
+struct _DmapContainerDbInterface
 {
 	GTypeInterface parent;
 
-	void (*add) (DMAPContainerDb * db, DMAPContainerRecord * record);
+	void (*add) (DmapContainerDb *db, DmapContainerRecord *record, GError **error);
 
-	DMAPContainerRecord *(*lookup_by_id) (DMAPContainerDb * db, guint id);
+	DmapContainerRecord *(*lookup_by_id) (DmapContainerDb * db, guint id);
 
-	void (*foreach) (DMAPContainerDb * db, GHFunc func, gpointer data);
+	void (*foreach) (DmapContainerDb * db, DmapIdContainerRecordFunc func, gpointer data);
 
-	  gint64 (*count) (DMAPContainerDb * db);
+	  gint64 (*count) (DmapContainerDb * db);
 };
 
 GType dmap_container_db_get_type (void);
@@ -83,33 +102,35 @@ GType dmap_container_db_get_type (void);
  * dmap_container_db_add:
  * @db: A container database.
  * @record: A record.
+ * @error: return location for a GError, or NULL.
  *
  * Add a record to the database.
  */
-void dmap_container_db_add (DMAPContainerDb * db,
-                            DMAPContainerRecord * record);
+void dmap_container_db_add (DmapContainerDb * db,
+                            DmapContainerRecord * record,
+                            GError **error);
 
 /**
  * dmap_container_db_lookup_by_id:
  * @db: A container database.
  * @id: A record ID.
  *
- * Returns: the database record corresponding to @id. This record should
+ * Returns: (transfer full): the database record corresponding to @id. This record should
  * be unrefed when no longer required.
  */
-DMAPContainerRecord *dmap_container_db_lookup_by_id (DMAPContainerDb * db,
+DmapContainerRecord *dmap_container_db_lookup_by_id (DmapContainerDb * db,
 						     guint id);
 
 /**
  * dmap_container_db_foreach:
  * @db: A container database.
- * @func: The function to apply to each record in the database.
+ * @func: (scope call): The function to apply to each record in the database.
  * @data: User data to pass to the function.
  *
  * Apply a function to each record in a container database.
  */
-void dmap_container_db_foreach (DMAPContainerDb * db,
-				GHFunc func, gpointer data);
+void dmap_container_db_foreach (DmapContainerDb * db,
+				DmapIdContainerRecordFunc func, gpointer data);
 
 /**
  * dmap_container_db_count:
@@ -117,8 +138,8 @@ void dmap_container_db_foreach (DMAPContainerDb * db,
  *
  * Returns: the number of records in the database.
  */
-gulong dmap_container_db_count (DMAPContainerDb * db);
+gulong dmap_container_db_count (DmapContainerDb * db);
 
-#endif /* __DMAP_CONTAINER_DB_H */
+#endif /* _DMAP_CONTAINER_DB_H */
 
 G_END_DECLS
diff --git a/libdmapsharing/dmap-container-record.c b/libdmapsharing/dmap-container-record.c
index 43faca1..19756d7 100644
--- a/libdmapsharing/dmap-container-record.c
+++ b/libdmapsharing/dmap-container-record.c
@@ -20,15 +20,11 @@
 
 #include <libdmapsharing/dmap-container-record.h>
 
-static gint dmap_container_record_init_count = 0;
-
 static void
-dmap_container_record_init (DMAPContainerRecordIface * iface)
+dmap_container_record_default_init (DmapContainerRecordInterface * iface)
 {
 	static gboolean is_initialized = FALSE;
 
-	dmap_container_record_init_count++;
-
 	if (!is_initialized) {
 		g_object_interface_install_property (iface,
 						     g_param_spec_string
@@ -41,34 +37,10 @@ dmap_container_record_init (DMAPContainerRecordIface * iface)
 	}
 }
 
-static void
-dmap_container_record_finalize (G_GNUC_UNUSED DMAPContainerRecordIface * iface)
-{
-	dmap_container_record_init_count--;
-}
-
-/* FIXME: No G_DEFINE_INTERFACE available in GObject headers: */
-GType
-dmap_container_record_get_type (void)
-{
-	static GType object_type = 0;
-
-	if (!object_type) {
-		static const GTypeInfo object_info = {
-			class_size:     sizeof (DMAPContainerRecordIface),
-			base_init:     (GBaseInitFunc) dmap_container_record_init,
-			base_finalize: (GBaseFinalizeFunc) dmap_container_record_finalize
-		};
-		object_type =
-			g_type_register_static (G_TYPE_INTERFACE,
-						"DMAPContainerRecord",
-						&object_info, 0);
-	}
-	return object_type;
-}
+G_DEFINE_INTERFACE(DmapContainerRecord, dmap_container_record, G_TYPE_OBJECT)
 
 guint
-dmap_container_record_get_id (DMAPContainerRecord * record)
+dmap_container_record_get_id (DmapContainerRecord * record)
 {
 	return DMAP_CONTAINER_RECORD_GET_INTERFACE (record)->get_id (record);
 }
@@ -78,22 +50,22 @@ dmap_container_record_get_id (DMAPContainerRecord * record)
  * a pointer to the "whole" media database (in which the ID is valid)?
  */
 void
-dmap_container_record_add_entry (DMAPContainerRecord * container_record,
-				 DMAPRecord * record, gint id)
+dmap_container_record_add_entry (DmapContainerRecord * container_record,
+				 DmapRecord * record, gint id, GError **error)
 {
 	DMAP_CONTAINER_RECORD_GET_INTERFACE (container_record)->
-		add_entry (container_record, record, id);
+		add_entry (container_record, record, id, error);
 }
 
 guint64
-dmap_container_record_get_entry_count (DMAPContainerRecord * record)
+dmap_container_record_get_entry_count (DmapContainerRecord * record)
 {
 	return DMAP_CONTAINER_RECORD_GET_INTERFACE (record)->
 		get_entry_count (record);
 }
 
-DMAPDb *
-dmap_container_record_get_entries (DMAPContainerRecord * record)
+DmapDb *
+dmap_container_record_get_entries (DmapContainerRecord * record)
 {
 	return DMAP_CONTAINER_RECORD_GET_INTERFACE (record)->
 		get_entries (record);
diff --git a/libdmapsharing/dmap-container-record.h b/libdmapsharing/dmap-container-record.h
index a2df44b..6b16b4d 100644
--- a/libdmapsharing/dmap-container-record.h
+++ b/libdmapsharing/dmap-container-record.h
@@ -18,103 +18,111 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef __DMAP_CONTAINER_RECORD_H
-#define __DMAP_CONTAINER_RECORD_H
+#ifndef _DMAP_CONTAINER_RECORD_H
+#define _DMAP_CONTAINER_RECORD_H
 
 #include <glib-object.h>
 #include <libdmapsharing/dmap-db.h>
 
 G_BEGIN_DECLS
+/**
+ * SECTION: dmap-container-record
+ * @short_description: The description of an item shared using DACP.
+ *
+ * #DmapContainerRecord objects encapsulate the description of an item shared using DACP.
+ */
+
 /**
  * DMAP_TYPE_CONTAINER_RECORD:
  *
- * The type for #DMAPContainerRecord.
+ * The type for #DmapContainerRecord.
  */
 #define DMAP_TYPE_CONTAINER_RECORD	     (dmap_container_record_get_type ())
 /**
  * DMAP_CONTAINER_RECORD:
  * @o: Object which is subject to casting.
  *
- * Casts a #DMAPContainerRecord or derived pointer into a (DMAPContainerRecord*) 
+ * Casts a #DmapContainerRecord or derived pointer into a (DmapContainerRecord*) 
  * pointer. Depending on the current debugging level, this function may invoke
  * certain runtime checks to identify invalid casts.
  */
 #define DMAP_CONTAINER_RECORD(o)		     (G_TYPE_CHECK_INSTANCE_CAST ((o), \
-				      DMAP_TYPE_CONTAINER_RECORD, DMAPContainerRecord))
+				      DMAP_TYPE_CONTAINER_RECORD, DmapContainerRecord))
 /**
- * IS_DMAP_CONTAINER_RECORD:
+ * DMAP_IS_CONTAINER_RECORD:
  * @o: Instance to check for being a %DMAP_TYPE_CONTAINER_RECORD.
  *
  * Checks whether a valid #GTypeInstance pointer is of type
  * %DMAP_TYPE_CONTAINER_RECORD.
  */
-#define IS_DMAP_CONTAINER_RECORD(o)	     (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
+#define DMAP_IS_CONTAINER_RECORD(o)	     (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
 				      DMAP_TYPE_CONTAINER_RECORD))
 /**
  * DMAP_CONTAINER_RECORD_GET_INTERFACE:
- * @o: a #DMAPContainerRecord instance.
+ * @o: a #DmapContainerRecord instance.
  *
- * Get the class structure associated to a #DMAPContainerRecord instance.
+ * Get the class structure associated to a #DmapContainerRecord instance.
  *
  * Returns: pointer to object interface structure.
  */
 #define DMAP_CONTAINER_RECORD_GET_INTERFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), \
-				      DMAP_TYPE_CONTAINER_RECORD, DMAPContainerRecordIface))
-typedef struct _DMAPContainerRecord DMAPContainerRecord;
-typedef struct _DMAPContainerRecordIface DMAPContainerRecordIface;
+				      DMAP_TYPE_CONTAINER_RECORD, DmapContainerRecordInterface))
+typedef struct _DmapContainerRecord DmapContainerRecord;
+typedef struct _DmapContainerRecordInterface DmapContainerRecordInterface;
 
-struct _DMAPContainerRecordIface
+struct _DmapContainerRecordInterface
 {
 	GTypeInterface parent;
 
-	  guint (*get_id) (DMAPContainerRecord * record);
+	  guint (*get_id) (DmapContainerRecord * record);
 
-	void (*add_entry) (DMAPContainerRecord * container_record,
-			   DMAPRecord * record, gint id);
+	void (*add_entry) (DmapContainerRecord * container_record,
+			   DmapRecord * record, gint id, GError **error);
 
-	  guint64 (*get_entry_count) (DMAPContainerRecord * record);
+	  guint64 (*get_entry_count) (DmapContainerRecord * record);
 
-	DMAPDb *(*get_entries) (DMAPContainerRecord * record);
+	DmapDb *(*get_entries) (DmapContainerRecord * record);
 };
 
 GType dmap_container_record_get_type (void);
 
 /**
  * dmap_container_record_get_id:
- * @record: A DMAPContainerRecord.
+ * @record: A DmapContainerRecord.
  *
  * Returns: the ID for the given record.
  */
-guint dmap_container_record_get_id (DMAPContainerRecord * record);
+guint dmap_container_record_get_id (DmapContainerRecord * record);
 
 /**
  * dmap_container_record_add_entry:
- * @container_record: A DMAPContainerRecord.
- * @record: A DMAPRecord.
+ * @container_record: A DmapContainerRecord.
+ * @record: A DmapRecord.
  * @id: The record's ID.
+ * @error: return location for a GError, or NULL.
  *
  * Add a record to the database. It is assumed that the record is placed
  * directly into the database (not copied) and not freed.
  */
-void dmap_container_record_add_entry (DMAPContainerRecord * container_record,
-				      DMAPRecord * record, gint id);
+void dmap_container_record_add_entry (DmapContainerRecord * container_record,
+				      DmapRecord * record, gint id, GError **error);
 
 /**
  * dmap_container_record_get_entry_count:
- * @record: A DMAPContainerRecord.
+ * @record: A DmapContainerRecord.
  *
  * Returns: the number of records in the container record.
  */
-guint64 dmap_container_record_get_entry_count (DMAPContainerRecord * record);
+guint64 dmap_container_record_get_entry_count (DmapContainerRecord * record);
 
 /**
  * dmap_container_record_get_entries:
- * @record: A DMAPContainerRecord.
+ * @record: A DmapContainerRecord.
  *
- * Returns: A pointer to a DMAPDb containing the entries contained in record.
+ * Returns: (transfer full): A pointer to a DmapDb containing the entries contained in record.
  */
-DMAPDb *dmap_container_record_get_entries (DMAPContainerRecord * record);
+DmapDb *dmap_container_record_get_entries (DmapContainerRecord * record);
 
-#endif /* __DMAP_CONTAINER_RECORD_H */
+#endif /* _DMAP_CONTAINER_RECORD_H */
 
 G_END_DECLS
diff --git a/libdmapsharing/dacp-connection.c b/libdmapsharing/dmap-control-connection.c
similarity index 58%
rename from libdmapsharing/dacp-connection.c
rename to libdmapsharing/dmap-control-connection.c
index 81908f5..969e32b 100644
--- a/libdmapsharing/dacp-connection.c
+++ b/libdmapsharing/dmap-control-connection.c
@@ -20,11 +20,11 @@
 
 #include "config.h"
 
-#include <libdmapsharing/dacp-connection.h>
+#include <libdmapsharing/dmap-control-connection.h>
 #include <libdmapsharing/dmap-structure.h>
 
-static DMAPContentCode
-get_protocol_version_cc (G_GNUC_UNUSED DMAPConnection * connection)
+static DmapContentCode
+_get_protocol_version_cc (G_GNUC_UNUSED DmapConnection * connection)
 {
 	/* FIXME: */
 	g_error ("Not implemented");
@@ -32,18 +32,18 @@ get_protocol_version_cc (G_GNUC_UNUSED DMAPConnection * connection)
 }
 
 static gchar *
-get_query_metadata (G_GNUC_UNUSED DMAPConnection * connection)
+_get_query_metadata (G_GNUC_UNUSED DmapConnection * connection)
 {
 	/* FIXME: */
 	g_error ("Not implemented");
 	return NULL;
 }
 
-static DMAPRecord *
-handle_mlcl (G_GNUC_UNUSED DMAPConnection * connection,
-             G_GNUC_UNUSED DMAPRecordFactory * factory,
-	     G_GNUC_UNUSED GNode * n,
-             G_GNUC_UNUSED int *item_id)
+static DmapRecord *
+_handle_mlcl (G_GNUC_UNUSED DmapConnection * connection,
+              G_GNUC_UNUSED DmapRecordFactory * factory,
+              G_GNUC_UNUSED GNode * n,
+              G_GNUC_UNUSED int *item_id)
 {
 	/* FIXME: */
 	g_error ("Not implemented");
@@ -51,24 +51,24 @@ handle_mlcl (G_GNUC_UNUSED DMAPConnection * connection,
 }
 
 static void
-dacp_connection_class_init (DACPConnectionClass * klass)
+dmap_control_connection_class_init (DmapControlConnectionClass * klass)
 {
 	GObjectClass *object_class = G_OBJECT_CLASS (klass);
-	DMAPConnectionClass *parent_class =
+	DmapConnectionClass *parent_class =
 		DMAP_CONNECTION_CLASS (object_class);
 
-	parent_class->get_protocol_version_cc = get_protocol_version_cc;
-	parent_class->get_query_metadata = get_query_metadata;
-	parent_class->handle_mlcl = handle_mlcl;
+	parent_class->get_protocol_version_cc = _get_protocol_version_cc;
+	parent_class->get_query_metadata = _get_query_metadata;
+	parent_class->handle_mlcl = _handle_mlcl;
 }
 
-DACPConnection *
-dacp_connection_new (const char *name,
+DmapControlConnection *
+dmap_control_connection_new (const char *name,
 		     const char *host,
 		     guint port,
-		     DMAPDb * db, DMAPRecordFactory * factory)
+		     DmapDb * db, DmapRecordFactory * factory)
 {
-	DACPConnection *connection;
+	DmapControlConnection *connection;
 
 	connection = g_object_new (DACP_TYPE_CONNECTION,
 				   "name", name,
@@ -79,9 +79,10 @@ dacp_connection_new (const char *name,
 	return connection;
 }
 
+G_DEFINE_TYPE (DmapControlConnection, dmap_control_connection, DMAP_TYPE_CONNECTION);
+
 static void
-dacp_connection_init (G_GNUC_UNUSED DACPConnection * connection)
+dmap_control_connection_init (DmapControlConnection * connection)
 {
+	connection->priv = dmap_control_connection_get_instance_private(connection);
 }
-
-G_DEFINE_TYPE (DACPConnection, dacp_connection, DMAP_TYPE_CONNECTION);
diff --git a/libdmapsharing/dmap-control-connection.h b/libdmapsharing/dmap-control-connection.h
new file mode 100644
index 0000000..597d593
--- /dev/null
+++ b/libdmapsharing/dmap-control-connection.h
@@ -0,0 +1,99 @@
+/*
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#ifndef _DMAP_CONTROL_CONNECTION_H
+#define _DMAP_CONTROL_CONNECTION_H
+
+#include <glib-object.h>
+
+#include <libdmapsharing/dmap-connection.h>
+#include <libdmapsharing/dmap-db.h>
+
+G_BEGIN_DECLS
+/**
+ * SECTION: dmap-control-connection
+ * @short_description: A DACP connection.
+ *
+ * #DmapControlConnection objects encapsulate a DACP connection.
+ */
+
+/**
+ * DACP_TYPE_CONNECTION:
+ *
+ * The type for #DmapControlConnection.
+ */
+#define DACP_TYPE_CONNECTION		(dmap_control_connection_get_type ())
+/**
+ * DMAP_CONTROL_CONNECTION:
+ * @o: Object which is subject to casting.
+ *
+ * Casts a #DmapControlConnection or derived pointer into a (DmapControlConnection *) pointer.
+ * Depending on the current debugging level, this function may invoke
+ * certain runtime checks to identify invalid casts.
+ */
+#define DMAP_CONTROL_CONNECTION(o)		(G_TYPE_CHECK_INSTANCE_CAST ((o), DACP_TYPE_CONNECTION, DmapControlConnection))
+/**
+ * DMAP_CONTROL_CONNECTION_CLASS:
+ * @k: a valid #DmapControlConnectionClass
+ *
+ * Casts a derived #DmapControlConnectionClass structure into a #DmapControlConnectionClass
+ * structure.
+ */
+#define DMAP_CONTROL_CONNECTION_CLASS(k)	(G_TYPE_CHECK_CLASS_CAST((k), DACP_TYPE_CONNECTION, DmapControlConnectionClass))
+/**
+ * DMAP_IS_CONTROL_CONNECTION:
+ * @o: Instance to check for being a %DACP_TYPE_CONNECTION.
+ *
+ * Checks whether a valid #GTypeInstance pointer is of type %DACP_TYPE_CONNECTION.
+ */
+#define DMAP_IS_CONTROL_CONNECTION(o)	(G_TYPE_CHECK_INSTANCE_TYPE ((o), DACP_TYPE_CONNECTION))
+/**
+ * DMAP_IS_CONTROL_CONNECTION_CLASS:
+ * @k: a #DmapControlConnectionClass
+ *
+ * Checks whether @k "is a" valid #DmapControlConnectionClass structure of type
+ * %DMAP_CONTROL_CONNECTION or derived.
+ */
+#define DMAP_IS_CONTROL_CONNECTION_CLASS(k)	(G_TYPE_CHECK_CLASS_TYPE ((k), DACP_TYPE_CONNECTION))
+/**
+ * DMAP_CONTROL_CONNECTION_GET_CLASS:
+ * @o: a #DmapControlConnection instance.
+ *
+ * Get the class structure associated to a #DmapControlConnection instance.
+ *
+ * Returns: pointer to object class structure.
+ */
+#define DMAP_CONTROL_CONNECTION_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), DACP_TYPE_CONNECTION, DmapControlConnectionClass))
+typedef struct DmapControlConnectionPrivate DmapControlConnectionPrivate;
+
+typedef struct {
+	DmapConnectionClass dmap_connection_class;
+} DmapControlConnectionClass;
+
+typedef struct {
+	DmapConnection dmap_connection_instance;
+	DmapControlConnectionPrivate *priv;
+} DmapControlConnection;
+
+GType dmap_control_connection_get_type (void);
+
+DmapControlConnection *dmap_control_connection_new (const char *name,
+				     const char *host,
+				     guint port,
+				     DmapDb * db,
+				     DmapRecordFactory * factory);
+G_END_DECLS
+#endif /* _DMAP_CONTROL_CONNECTION_H */
diff --git a/libdmapsharing/dacp-player.c b/libdmapsharing/dmap-control-player.c
similarity index 55%
rename from libdmapsharing/dacp-player.c
rename to libdmapsharing/dmap-control-player.c
index 50df0dd..7ea7d99 100644
--- a/libdmapsharing/dacp-player.c
+++ b/libdmapsharing/dmap-control-player.c
@@ -15,12 +15,12 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include <libdmapsharing/dacp-player.h>
+#include <libdmapsharing/dmap-control-player.h>
 #include <libdmapsharing/dmap-enums.h>
-#include <libdmapsharing/daap-record.h>
+#include <libdmapsharing/dmap-av-record.h>
 
 static void
-dacp_player_init (DACPPlayerIface * iface)
+dmap_control_player_default_init (DmapControlPlayerInterface * iface)
 {
 	static gboolean initialized = FALSE;
 
@@ -47,8 +47,8 @@ dacp_player_init (DACPPlayerIface * iface)
 						     ("repeat-state",
 						      "Repeat state",
 						      "Repeat state",
-						      DMAP_TYPE_DACP_REPEAT_STATE,
-						      DACP_REPEAT_NONE,
+						      DMAP_TYPE_DMAP_CONTROL_REPEAT_STATE,
+						      DMAP_CONTROL_REPEAT_NONE,
 						      G_PARAM_READWRITE));
 
 		g_object_interface_install_property (iface,
@@ -56,8 +56,8 @@ dacp_player_init (DACPPlayerIface * iface)
 						     ("play-state",
 						      "Play state",
 						      "Play state",
-						      DMAP_TYPE_DACP_PLAY_STATE,
-						      DACP_PLAY_STOPPED,
+						      DMAP_TYPE_DMAP_CONTROL_PLAY_STATE,
+						      DMAP_CONTROL_PLAY_STOPPED,
 						      G_PARAM_READWRITE));
 
 		g_object_interface_install_property (iface,
@@ -68,78 +68,55 @@ dacp_player_init (DACPPlayerIface * iface)
 	}
 }
 
-static void
-dacp_player_finalize (G_GNUC_UNUSED DACPPlayerIface * iface)
-{
-}
-
-GType
-dacp_player_get_type (void)
-{
-	static GType object_type = 0;
-
-	if (!object_type) {
-		static const GTypeInfo object_info = {
-			class_size:     sizeof (DACPPlayerIface),
-			base_init:     (GBaseInitFunc) dacp_player_init,
-			base_finalize: (GBaseFinalizeFunc) dacp_player_finalize
-		};
-		object_type = g_type_register_static (G_TYPE_INTERFACE,
-						      "DACPPlayer",
-						      &object_info, 0);
-		g_type_interface_add_prerequisite (object_type,
-						   G_TYPE_OBJECT);
-	}
-	return object_type;
-}
+G_DEFINE_INTERFACE(DmapControlPlayer, dmap_control_player, G_TYPE_OBJECT)
 
-DAAPRecord *
-dacp_player_now_playing_record (DACPPlayer * player)
+DmapAvRecord *
+dmap_control_player_now_playing_record (DmapControlPlayer * player)
 {
-	return DACP_PLAYER_GET_INTERFACE (player)->
+	return DMAP_CONTROL_PLAYER_GET_INTERFACE (player)->
 		now_playing_record (player);
 }
 
-guchar *
-dacp_player_now_playing_artwork (DACPPlayer * player, guint width,
+gchar *
+dmap_control_player_now_playing_artwork (DmapControlPlayer * player, guint width,
 				 guint height)
 {
-	return DACP_PLAYER_GET_INTERFACE (player)->
+	return DMAP_CONTROL_PLAYER_GET_INTERFACE (player)->
 		now_playing_artwork (player, width, height);
 }
 
 void
-dacp_player_play_pause (DACPPlayer * player)
+dmap_control_player_play_pause (DmapControlPlayer * player)
 {
-	DACP_PLAYER_GET_INTERFACE (player)->play_pause (player);
+	DMAP_CONTROL_PLAYER_GET_INTERFACE (player)->play_pause (player);
 }
 
 void
-dacp_player_pause (DACPPlayer * player)
+dmap_control_player_pause (DmapControlPlayer * player)
 {
-	DACP_PLAYER_GET_INTERFACE (player)->pause (player);
+	DMAP_CONTROL_PLAYER_GET_INTERFACE (player)->pause (player);
 }
 
 void
-dacp_player_next_item (DACPPlayer * player)
+dmap_control_player_next_item (DmapControlPlayer * player)
 {
-	DACP_PLAYER_GET_INTERFACE (player)->next_item (player);
+	DMAP_CONTROL_PLAYER_GET_INTERFACE (player)->next_item (player);
 }
 
 void
-dacp_player_prev_item (DACPPlayer * player)
+dmap_control_player_prev_item (DmapControlPlayer * player)
 {
-	DACP_PLAYER_GET_INTERFACE (player)->prev_item (player);
+	DMAP_CONTROL_PLAYER_GET_INTERFACE (player)->prev_item (player);
 }
 
 void
-dacp_player_cue_clear (DACPPlayer * player)
+dmap_control_player_cue_clear (DmapControlPlayer * player)
 {
-	DACP_PLAYER_GET_INTERFACE (player)->cue_clear (player);
+	DMAP_CONTROL_PLAYER_GET_INTERFACE (player)->cue_clear (player);
 }
 
 void
-dacp_player_cue_play (DACPPlayer * player, GList * records, guint index)
+dmap_control_player_cue_play (DmapControlPlayer * player, GList * records, guint index)
 {
-	DACP_PLAYER_GET_INTERFACE (player)->cue_play (player, records, index);
+	DMAP_CONTROL_PLAYER_GET_INTERFACE (player)->cue_play (player, records, index);
 }
diff --git a/libdmapsharing/dmap-control-player.h b/libdmapsharing/dmap-control-player.h
new file mode 100644
index 0000000..abcbd3d
--- /dev/null
+++ b/libdmapsharing/dmap-control-player.h
@@ -0,0 +1,154 @@
+/* Copyright (C) Alexandre Rosenfeld 2010 <alexandre.rosenfeld@gmail.com>
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#ifndef _DMAP_CONTROL_PLAYER_H_
+#define _DMAP_CONTROL_PLAYER_H_
+
+#include <glib-object.h>
+
+#include "dmap-av-record.h"
+
+G_BEGIN_DECLS
+/**
+ * SECTION: dmap-control-player
+ * @short_description: An interface for media controllers.
+ *
+ * #DmapControlPlayer provides an interface for controlling the playback of media.
+ */
+
+/**
+ * DMAP_TYPE_CONTROL_PLAYER:
+ *
+ * The type for #DmapControlPlayer.
+ */
+#define DMAP_TYPE_CONTROL_PLAYER             (dmap_control_player_get_type ())
+/**
+ * DMAP_CONTROL_PLAYER:
+ * @o: Object which is subject to casting.
+ *
+ * Casts a #DmapControlPlayer or derived pointer into a (DmapControlPlayer *) pointer.
+ * Depending on the current debugging level, this function may invoke
+ * certain runtime checks to identify invalid casts.
+ */
+#define DMAP_CONTROL_PLAYER(o)               (G_TYPE_CHECK_INSTANCE_CAST ((o), DMAP_TYPE_CONTROL_PLAYER, DmapControlPlayer))
+/**
+ * DMAP_IS_CONTROL_PLAYER:
+ * @o: Instance to check for being a %DMAP_TYPE_CONTROL_PLAYER.
+ *
+ * Checks whether a valid #GTypeInstance pointer is of type %DMAP_TYPE_CONTROL_PLAYER.
+ */
+#define DMAP_IS_CONTROL_PLAYER(o)            (G_TYPE_CHECK_INSTANCE_TYPE ((o), DMAP_TYPE_CONTROL_PLAYER))
+/**
+ * DMAP_CONTROL_PLAYER_GET_INTERFACE:
+ * @o: a #DmapControlPlayer instance.
+ *
+ * Get the insterface structure associated to a #DmapControlPlayer instance.
+ *
+ * Returns: pointer to object interface structure.
+ */
+#define DMAP_CONTROL_PLAYER_GET_INTERFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), \
+                                        DMAP_TYPE_CONTROL_PLAYER, DmapControlPlayerInterface))
+typedef struct _DmapControlPlayerInterface DmapControlPlayerInterface;
+typedef struct _DmapControlPlayer DmapControlPlayer;
+
+typedef enum {
+	DMAP_CONTROL_REPEAT_NONE = 0,
+	DMAP_CONTROL_REPEAT_SINGLE = 1,
+	DMAP_CONTROL_REPEAT_ALL = 2
+} DmapControlRepeatState;
+
+typedef enum {
+	DMAP_CONTROL_PLAY_STOPPED = 2,
+	DMAP_CONTROL_PLAY_PAUSED = 3,
+	DMAP_CONTROL_PLAY_PLAYING = 4
+} DmapControlPlayState;
+
+struct _DmapControlPlayerInterface
+{
+	GTypeInterface parent_class;
+
+	DmapAvRecord *(*now_playing_record) (DmapControlPlayer * player);
+	gchar *(*now_playing_artwork) (DmapControlPlayer * player,
+	                               guint width, guint height);
+	void (*play_pause) (DmapControlPlayer * player);
+	void (*pause) (DmapControlPlayer * player);
+	void (*next_item) (DmapControlPlayer * player);
+	void (*prev_item) (DmapControlPlayer * player);
+
+	void (*cue_clear) (DmapControlPlayer * player);
+	void (*cue_play) (DmapControlPlayer * player, GList * records, guint index);
+};
+
+GType dmap_control_player_get_type (void);
+
+/**
+ * dmap_control_player_now_playing_record:
+ * @player: a player
+ *
+ * Returns: (transfer none): the currently playing record.
+ */
+DmapAvRecord *dmap_control_player_now_playing_record (DmapControlPlayer * player);
+
+/**
+ * dmap_control_player_now_playing_artwork:
+ * @player: a player
+ * @width: width
+ * @height: height
+ */
+gchar *dmap_control_player_now_playing_artwork (DmapControlPlayer * player,
+                                                guint width, guint height);
+
+/**
+ * dmap_control_player_play_pause:
+ * @player: a player
+ */
+void dmap_control_player_play_pause (DmapControlPlayer * player);
+
+/**
+ * dmap_control_player_pause:
+ * @player: a player
+ */
+void dmap_control_player_pause (DmapControlPlayer * player);
+
+/**
+ * dmap_control_player_next_item:
+ * @player: a player
+ */
+void dmap_control_player_next_item (DmapControlPlayer * player);
+
+/**
+ * dmap_control_player_now_prev_item:
+ * @player: a player
+ */
+void dmap_control_player_prev_item (DmapControlPlayer * player);
+
+/**
+ * dmap_control_player_cue_clear:
+ * @player: a player
+ */
+void dmap_control_player_cue_clear (DmapControlPlayer * player);
+
+/**
+ * dmap_control_player_cue_play:
+ * @player: a player
+ * @records: (element-type DmapRecord): a list of records
+ * @index: an index
+ */
+void dmap_control_player_cue_play (DmapControlPlayer * player, GList * records, guint index);
+
+G_END_DECLS
+#endif /* _DMAP_CONTROL_PLAYER_H_ */
diff --git a/libdmapsharing/dacp-share.c b/libdmapsharing/dmap-control-share.c
similarity index 59%
rename from libdmapsharing/dacp-share.c
rename to libdmapsharing/dmap-control-share.c
index 8740932..1ada6a9 100644
--- a/libdmapsharing/dacp-share.c
+++ b/libdmapsharing/dmap-control-share.c
@@ -32,51 +32,32 @@
 #endif /* HAVE_GDKPIXBUF */
 
 #include <libsoup/soup.h>
-#include <libsoup/soup-address.h>
-#include <libsoup/soup-message.h>
-#include <libsoup/soup-uri.h>
-#include <libsoup/soup-server.h>
 
 #include <libdmapsharing/dmap.h>
 #include <libdmapsharing/dmap-structure.h>
+#include <libdmapsharing/dmap-share-private.h>
 
 #include <libdmapsharing/dmap-share.h>
-#include <libdmapsharing/dacp-share.h>
-#include <libdmapsharing/dacp-connection.h>
-#include <libdmapsharing/dacp-player.h>
-
-static void dacp_share_set_property (GObject * object,
-				     guint prop_id,
-				     const GValue * value,
-				     GParamSpec * pspec);
-static void dacp_share_get_property (GObject * object,
-				     guint prop_id,
-				     GValue * value, GParamSpec * pspec);
-static void dacp_share_dispose (GObject * object);
-const char *dacp_share_get_type_of_service (DMAPShare * share);
-void dacp_share_ctrl_int (DMAPShare * share,
-			  SoupServer * server,
-			  SoupMessage * message,
+#include <libdmapsharing/dmap-connection-private.h>
+#include <libdmapsharing/dmap-control-share.h>
+#include <libdmapsharing/dmap-control-connection.h>
+#include <libdmapsharing/dmap-control-player.h>
+
+void dmap_control_share_ctrl_int (DmapShare * share,
+			  SoupServerMessage * message,
 			  const char *path,
-			  GHashTable * query, SoupClientContext * context);
-void dacp_share_login (DMAPShare * share,
-		       SoupServer * server,
-		       SoupMessage * message,
+			  GHashTable * query);
+void dmap_control_share_login (DmapShare * share,
+		       SoupServerMessage * message,
 		       const char *path,
-		       GHashTable * query, SoupClientContext * context);
-
-static gchar *dacp_share_pairing_code (DACPShare * share, gchar * pair_txt,
-				       gchar passcode[4]);
-static void dacp_share_send_playstatusupdate (DACPShare * share);
-static void dacp_share_fill_playstatusupdate (DACPShare * share,
-					      SoupMessage * message);
+		       GHashTable * query);
 
 #define DACP_TYPE_OF_SERVICE "_touch-able._tcp"
 #define DACP_PORT 3689
 
-struct DACPSharePrivate
+struct DmapControlSharePrivate
 {
-	DMAPMdnsBrowser *mdns_browser;
+	DmapMdnsBrowser *mdns_browser;
 
 	gchar *library_name;
 	GHashTable *remotes;
@@ -85,29 +66,26 @@ struct DACPSharePrivate
 
 	GSList *update_queue;
 
-	DACPPlayer *player;
+	DmapControlPlayer *player;
 };
 
 /*
  * Internal representation of a DACP remote.
  */
-typedef struct
-{
+typedef struct {
 	gchar *host;
 	guint port;
 	gchar *pair_txt;
-	DMAPConnection *connection;
+	DmapConnection *connection;
 } DACPRemoteInfo;
 
-enum
-{
+enum {
 	PROP_0,
 	PROP_LIBRARY_NAME,
 	PROP_PLAYER
 };
 
-enum
-{
+enum {
 	REMOTE_FOUND,
 	REMOTE_LOST,
 	REMOTE_PAIRED,
@@ -118,23 +96,155 @@ enum
 	LAST_SIGNAL
 };
 
-static guint signals[LAST_SIGNAL] = { 0, };
+static guint _signals[LAST_SIGNAL] = { 0, };
+
+G_DEFINE_TYPE_WITH_PRIVATE (DmapControlShare,
+                            dmap_control_share,
+                            DMAP_TYPE_SHARE);
+
+static gchar *
+_get_dbid (void)
+{
+	static gchar *dbid;
+
+	if (!dbid) {
+		GString *name;
+
+		// Creates a service name 14 characters long concatenating the hostname
+		// hash hex value with itself.
+		// Idea taken from stereo.
+		name = g_string_new (NULL);
+		g_string_printf (name, "%.8x",
+				 g_str_hash (g_get_host_name ()));
+		g_string_ascii_up (name);
+		g_string_append_len (name, name->str, 4);
+
+		dbid = g_string_free (name, FALSE);
+	}
+	return dbid;
+}
+
+static void
+_update_txt_records (DmapControlShare * share)
+{
+	gchar *dbid_record;
+	gchar *library_name_record;
+
+	library_name_record =
+		g_strdup_printf ("CtlN=%s", share->priv->library_name);
+	dbid_record = g_strdup_printf ("DbId=%s", _get_dbid ());
+
+	gchar *txt_records[] = { "Ver=131073",
+		"DvSv=2049",
+		dbid_record,
+		"DvTy=iTunes",
+		"OSsi=0x1F6",
+		"txtvers=1",
+		library_name_record,
+		NULL
+	};
+
+	g_object_set (share, "txt-records", txt_records, NULL);
+
+	g_free (dbid_record);
+	g_free (library_name_record);
+}
+
+static void
+_set_property (GObject * object,
+               guint prop_id,
+               const GValue * value, GParamSpec * pspec)
+{
+	DmapControlShare *share = DMAP_CONTROL_SHARE (object);
+
+	switch (prop_id) {
+	case PROP_LIBRARY_NAME:
+		g_free (share->priv->library_name);
+		share->priv->library_name = g_value_dup_string (value);
+		_update_txt_records (share);
+		break;
+	case PROP_PLAYER:
+		if (share->priv->player) {
+			g_object_unref (share->priv->player);
+		}
+		share->priv->player = DMAP_CONTROL_PLAYER (g_value_dup_object (value));
+		break;
+	default:
+		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+		break;
+	}
+}
+
+static void
+_get_property (GObject * object,
+               guint prop_id, GValue * value, GParamSpec * pspec)
+{
+	DmapControlShare *share = DMAP_CONTROL_SHARE (object);
+
+	switch (prop_id) {
+	case PROP_LIBRARY_NAME:
+		g_value_set_string (value, share->priv->library_name);
+		break;
+	case PROP_PLAYER:
+		g_value_set_object (value, G_OBJECT (share->priv->player));
+		break;
+	default:
+		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+		break;
+	}
+}
+
+static void
+_dispose (GObject * object)
+{
+	DmapControlShare *share = DMAP_CONTROL_SHARE (object);
+
+	g_clear_object(&share->priv->mdns_browser);
+	g_clear_object(&share->priv->player);
+
+	if (NULL != share->priv->update_queue) {
+		g_slist_free_full (share->priv->update_queue, g_object_unref);
+		share->priv->update_queue = NULL;
+	}
 
-G_DEFINE_TYPE_WITH_PRIVATE (DACPShare, dacp_share, DAAP_TYPE_SHARE);
+	if (NULL != share->priv->remotes) {
+		g_hash_table_destroy (share->priv->remotes);
+		share->priv->remotes = NULL;
+	}
+
+	G_OBJECT_CLASS (dmap_control_share_parent_class)->dispose (object);
+}
+
+static void
+_finalize (GObject * object)
+{
+	DmapControlShare *share = DMAP_CONTROL_SHARE (object);
+
+	g_free (share->priv->library_name);
+
+	G_OBJECT_CLASS (dmap_control_share_parent_class)->finalize (object);
+}
+
+static const char *
+_get_type_of_service (G_GNUC_UNUSED DmapShare * share)
+{
+	return DACP_TYPE_OF_SERVICE;
+}
 
 static void
-dacp_share_class_init (DACPShareClass * klass)
+dmap_control_share_class_init (DmapControlShareClass * klass)
 {
 	GObjectClass *object_class = G_OBJECT_CLASS (klass);
-	DMAPShareClass *dmap_class = DMAP_SHARE_CLASS (object_class);
+	DmapShareClass *dmap_class = DMAP_SHARE_CLASS (object_class);
 
-	object_class->get_property = dacp_share_get_property;
-	object_class->set_property = dacp_share_set_property;
-	object_class->dispose = dacp_share_dispose;
+	object_class->get_property = _get_property;
+	object_class->set_property = _set_property;
+	object_class->dispose = _dispose;
+	object_class->finalize = _finalize;
 
-	dmap_class->get_type_of_service = dacp_share_get_type_of_service;
-	dmap_class->ctrl_int = dacp_share_ctrl_int;
-	dmap_class->login = dacp_share_login;
+	dmap_class->get_type_of_service = _get_type_of_service;
+	dmap_class->ctrl_int = dmap_control_share_ctrl_int;
+	dmap_class->login = dmap_control_share_login;
 
 	g_object_class_install_property (object_class,
 					 PROP_LIBRARY_NAME,
@@ -155,80 +265,80 @@ dacp_share_class_init (DACPShareClass * klass)
 							      G_PARAM_CONSTRUCT_ONLY));
 
 	/**
-	 * DACPShare::remote-found
-	 * @share: the #DACPShare that received the signal.
+	 * DmapControlShare::remote-found
+	 * @share: the #DmapControlShare that received the signal.
 	 * @service_name: the remote identifier.
 	 * @remote_name: the remote friendly name.
 	 *
 	 * Signal emited when a remote is found in the local network.
 	 */
-	signals[REMOTE_FOUND] =
+	_signals[REMOTE_FOUND] =
 		g_signal_new ("remote-found",
 			      G_TYPE_FROM_CLASS (object_class),
 			      G_SIGNAL_RUN_LAST,
-			      G_STRUCT_OFFSET (DACPShareClass, remote_found),
+			      G_STRUCT_OFFSET (DmapControlShareClass, remote_found),
 			      NULL,
 			      NULL,
 			      NULL,
 			      G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING);
 
 	/**
-	 * DACPShare::remote-lost
-	 * @share: the #DACPShare that received the signal
+	 * DmapControlShare::remote-lost
+	 * @share: the #DmapControlShare that received the signal
 	 * @service_name: the remote identifier.
 	 *
 	 * Signal emited when a remote is lost in the local network.
 	 */
-	signals[REMOTE_LOST] =
+	_signals[REMOTE_LOST] =
 		g_signal_new ("remote-lost",
 			      G_TYPE_FROM_CLASS (object_class),
 			      G_SIGNAL_RUN_LAST,
-			      G_STRUCT_OFFSET (DACPShareClass, remote_lost),
+			      G_STRUCT_OFFSET (DmapControlShareClass, remote_lost),
 			      NULL,
 			      NULL,
 			      NULL,
 			      G_TYPE_NONE, 1, G_TYPE_STRING);
 
 	/**
-	 * DACPShare::remote-paired
-	 * @share: the #DACPShare that received the signal
+	 * DmapControlShare::remote-paired
+	 * @share: the #DmapControlShare that received the signal
 	 * @service_name: the remote identifier.
 	 * @connected: indicates if the connection was succesfull or not.
 	 *
 	 * Signal emited when a remote is paired.
 	 */
-	signals[REMOTE_PAIRED] =
+	_signals[REMOTE_PAIRED] =
 		g_signal_new ("remote-paired",
 			      G_TYPE_FROM_CLASS (object_class),
 			      G_SIGNAL_RUN_LAST,
-			      G_STRUCT_OFFSET (DACPShareClass, remote_paired),
+			      G_STRUCT_OFFSET (DmapControlShareClass, remote_paired),
 			      NULL,
 			      NULL,
 			      NULL,
 			      G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_BOOLEAN);
 
 	/**
-	 * DACPShare::lookup-guid
-	 * @share: the #DACPShare that received the signal
+	 * DmapControlShare::lookup-guid
+	 * @share: the #DmapControlShare that received the signal
 	 * @guid: a string containing the guid to be validated.
 	 *
 	 * Signal emited when the remote has logged in before and wants to be
 	 * validated. An implementation must implement this signal to lookup
 	 * for guids saved by ::add-guid
 	 */
-	signals[LOOKUP_GUID] =
+	_signals[LOOKUP_GUID] =
 		g_signal_new ("lookup-guid",
 			      G_TYPE_FROM_CLASS (object_class),
 			      G_SIGNAL_RUN_LAST,
-			      G_STRUCT_OFFSET (DACPShareClass, lookup_guid),
+			      G_STRUCT_OFFSET (DmapControlShareClass, lookup_guid),
 			      NULL,
 			      NULL,
 			      NULL,
 			      G_TYPE_BOOLEAN, 1, G_TYPE_STRING);
 
 	/**
-	 * DACPShare::add-guid
-	 * @share: the #DACPShare that received the signal
+	 * DmapControlShare::add-guid
+	 * @share: the #DmapControlShare that received the signal
 	 * @guid: a string containing the guid to be saved.
 	 *
 	 * Signal emited when the remote wants to log in and save a special guid
@@ -239,11 +349,11 @@ dacp_share_class_init (DACPShareClass * klass)
 	 * a button to forget previously connected remotes, so that the user may
 	 * disconnect all previously connected remotes.
 	 */
-	signals[ADD_GUID] =
+	_signals[ADD_GUID] =
 		g_signal_new ("add-guid",
 			      G_TYPE_FROM_CLASS (object_class),
 			      G_SIGNAL_RUN_LAST,
-			      G_STRUCT_OFFSET (DACPShareClass, add_guid),
+			      G_STRUCT_OFFSET (DmapControlShareClass, add_guid),
 			      NULL,
 			      NULL,
 			      NULL,
@@ -251,9 +361,9 @@ dacp_share_class_init (DACPShareClass * klass)
 }
 
 static void
-dacp_share_init (DACPShare * share)
+dmap_control_share_init (DmapControlShare * share)
 {
-	share->priv = dacp_share_get_instance_private(share);
+	share->priv = dmap_control_share_get_instance_private(share);
 
 	share->priv->current_revision = 2;
 
@@ -265,289 +375,131 @@ dacp_share_init (DACPShare * share)
 						      g_free);
 }
 
-static gchar *
-get_dbid (void)
-{
-	static gchar *dbid;
-
-	if (!dbid) {
-		GString *name;
-
-		// Creates a service name 14 characters long concatenating the hostname
-		// hash hex value with itself.
-		// Idea taken from stereo.
-		name = g_string_new (NULL);
-		g_string_printf (name, "%.8x",
-				 g_str_hash (g_get_host_name ()));
-		g_string_ascii_up (name);
-		g_string_append_len (name, name->str, 4);
-
-		dbid = name->str;
-
-		g_string_free (name, FALSE);
-	}
-	return dbid;
-}
-
-static void
-dacp_share_update_txt_records (DACPShare * share)
-{
-	gchar *dbid_record;
-	gchar *library_name_record;
-
-	library_name_record =
-		g_strdup_printf ("CtlN=%s", share->priv->library_name);
-	dbid_record = g_strdup_printf ("DbId=%s", get_dbid ());
-
-	gchar *txt_records[] = { "Ver=131073",
-		"DvSv=2049",
-		dbid_record,
-		"DvTy=iTunes",
-		"OSsi=0x1F6",
-		"txtvers=1",
-		library_name_record,
-		NULL
-	};
-
-	g_object_set (share, "txt-records", txt_records, NULL);
-
-	g_free (dbid_record);
-	g_free (library_name_record);
-}
-
-static void
-dacp_share_set_property (GObject * object,
-			 guint prop_id,
-			 const GValue * value, GParamSpec * pspec)
-{
-	DACPShare *share = DACP_SHARE (object);
-
-	switch (prop_id) {
-	case PROP_LIBRARY_NAME:
-		g_free (share->priv->library_name);
-		share->priv->library_name = g_value_dup_string (value);
-		dacp_share_update_txt_records (share);
-		break;
-	case PROP_PLAYER:
-		if (share->priv->player)
-			g_object_unref (share->priv->player);
-		share->priv->player =
-			DACP_PLAYER (g_value_dup_object (value));
-		break;
-	default:
-		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-		break;
-	}
-}
-
-static void
-dacp_share_get_property (GObject * object,
-			 guint prop_id, GValue * value, GParamSpec * pspec)
-{
-	DACPShare *share = DACP_SHARE (object);
-
-	switch (prop_id) {
-	case PROP_LIBRARY_NAME:
-		g_value_set_string (value, share->priv->library_name);
-		break;
-	case PROP_PLAYER:
-		g_value_set_object (value, G_OBJECT (share->priv->player));
-		break;
-	default:
-		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-		break;
-	}
-}
-
-static void
-dacp_share_dispose (GObject * object)
-{
-	DACPShare *share = DACP_SHARE (object);
-
-	g_free (share->priv->library_name);
-
-	if (share->priv->mdns_browser)
-		g_object_unref (share->priv->mdns_browser);
-
-	if (share->priv->player)
-		g_object_unref (share->priv->player);
-
-	g_slist_free (share->priv->update_queue);
-
-	g_hash_table_destroy (share->priv->remotes);
-}
-
 static void
-mdns_remote_added (G_GNUC_UNUSED DMAPMdnsBrowser * browser,
-		   DMAPMdnsBrowserService * service, DACPShare * share)
+_mdns_remote_added (G_GNUC_UNUSED DmapMdnsBrowser * browser,
+                    DmapMdnsService * service, DmapControlShare * share)
 {
+	gboolean new;
+	guint port;
 	DACPRemoteInfo *remote_info;
+	gchar *service_name, *name, *host, *pair;
 
-	remote_info = g_new0 (DACPRemoteInfo, 1);
-	remote_info->host = g_strdup (service->host);
-	remote_info->port = service->port;
-	remote_info->pair_txt = g_strdup (service->pair);
+	g_object_get (service, "service-name", &service_name,
+	                       "name", &name,
+	                       "host", &host,
+	                       "port", &port,
+	                       "pair", &pair, NULL);
+
+	remote_info = g_new (DACPRemoteInfo, 1);
+	remote_info->host = g_strdup (host);
+	remote_info->port = port;
 	remote_info->connection = NULL;
+	remote_info->pair_txt = g_strdup (pair);
 
 	g_debug ("New Remote found: %s name=%s host=%s port=%u pair=%s",
-		 service->service_name,
-		 service->name,
+		 service_name,
+		 name,
 		 remote_info->host, remote_info->port, remote_info->pair_txt);
 
-	g_hash_table_insert (share->priv->remotes,
-			     service->service_name, remote_info);
+	new = g_hash_table_insert (share->priv->remotes,
+	                           service_name, remote_info);
+	g_assert(new);
+
+	g_signal_emit (share, _signals[REMOTE_FOUND], 0, service_name, name);
 
-	g_signal_emit (share,
-		       signals[REMOTE_FOUND],
-		       0, service->service_name, service->name);
+	g_free(name);
+	g_free(host);
+	g_free(pair);
 }
 
 static void
-mdns_remote_removed (G_GNUC_UNUSED DMAPMdnsBrowser * browser,
-		     const char *service_name, DACPShare * share)
+_mdns_remote_removed (G_GNUC_UNUSED DmapMdnsBrowser * browser,
+                      const char *service_name, DmapControlShare * share)
 {
-	g_signal_emit (share, signals[REMOTE_LOST], 0, service_name);
+	gboolean found;
+	g_signal_emit (share, _signals[REMOTE_LOST], 0, service_name);
 
-	g_hash_table_remove (share->priv->remotes, service_name);
+	found = g_hash_table_remove (share->priv->remotes, service_name);
+	g_assert(found);
 }
 
-DACPShare *
-dacp_share_new (const gchar * library_name,
-		DACPPlayer * player,
-		DMAPDb * db, DMAPContainerDb * container_db)
+DmapControlShare *
+dmap_control_share_new (const gchar *library_name,
+                        DmapControlPlayer *player,
+                        DmapDb *db,
+                        DmapContainerDb *container_db)
 {
-	DACPShare *share;
-
 	g_object_ref (db);
 	g_object_ref (container_db);
 
-	share = DACP_SHARE (g_object_new (DACP_TYPE_SHARE,
-					  "name", get_dbid (),
-					  "library-name", library_name,
-					  "password", NULL,
-					  "db", db,
-					  "container-db", container_db,
-					  "player", G_OBJECT (player),
-					  "transcode-mimetype", NULL, NULL));
-
-	g_debug ("Starting DACP server");
-	_dmap_share_server_start (DMAP_SHARE (share));
-	_dmap_share_publish_start (DMAP_SHARE (share));
-
-	return share;
+	return DMAP_CONTROL_SHARE (g_object_new (DMAP_TYPE_CONTROL_SHARE,
+	                                        "name", _get_dbid (),
+	                                        "library-name", library_name,
+	                                        "password", NULL,
+	                                        "db", db,
+	                                        "container-db", container_db,
+	                                        "player", G_OBJECT (player),
+	                                        "transcode-mimetype", NULL, NULL));
 }
 
-void
-dacp_share_start_lookup (DACPShare * share)
+gboolean
+dmap_control_share_start_lookup (DmapControlShare * share, GError **error)
 {
-	GError *error;
-
-	if (share->priv->mdns_browser) {
-		g_warning ("DACP browsing already started");
-		return;
-	}
+	g_assert(NULL == share->priv->mdns_browser);
 
 	share->priv->mdns_browser =
-		dmap_mdns_browser_new (DMAP_MDNS_BROWSER_SERVICE_TYPE_DACP);
+		dmap_mdns_browser_new (DMAP_MDNS_SERVICE_TYPE_DACP);
 
 	g_signal_connect_object (share->priv->mdns_browser,
 				 "service-added",
-				 G_CALLBACK (mdns_remote_added), share, 0);
+				 G_CALLBACK (_mdns_remote_added), share, 0);
 	g_signal_connect_object (share->priv->mdns_browser,
 				 "service-removed",
-				 G_CALLBACK (mdns_remote_removed), share, 0);
-
-	error = NULL;
-	dmap_mdns_browser_start (share->priv->mdns_browser, &error);
-	if (error != NULL) {
-		g_warning ("Unable to start Remote lookup: %s",
-			   error->message);
-		g_error_free (error);
-	}
+				 G_CALLBACK (_mdns_remote_removed), share, 0);
+
+	return dmap_mdns_browser_start (share->priv->mdns_browser, error);
 }
 
 static gboolean
-remove_remotes_cb (gpointer service_name, G_GNUC_UNUSED gpointer remote_info,
-		   gpointer share)
+_remove_remotes_cb (gpointer service_name, G_GNUC_UNUSED gpointer remote_info,
+                    gpointer share)
 {
-	g_signal_emit ((DACPShare *) share,
-		       signals[REMOTE_LOST], 0, (gchar *) service_name);
+	g_signal_emit ((DmapControlShare *) share,
+		       _signals[REMOTE_LOST], 0, (gchar *) service_name);
 	return TRUE;
 }
 
-void
-dacp_share_stop_lookup (DACPShare * share)
+gboolean
+dmap_control_share_stop_lookup (DmapControlShare * share, GError **error)
 {
-	GError *error;
+	gboolean ok = FALSE;
 
-	if (!share->priv->mdns_browser) {
-		g_warning ("DACP browsing not started");
-		return;
-	}
+	g_assert(NULL != share->priv->mdns_browser);
 
-	g_hash_table_foreach_remove (share->priv->remotes, remove_remotes_cb,
-				     share);
+	g_hash_table_foreach_remove (share->priv->remotes,	
+                                     _remove_remotes_cb,
+	                             share);
 
-	error = NULL;
-	dmap_mdns_browser_stop (share->priv->mdns_browser, &error);
-	if (error != NULL) {
-		g_warning ("Unable to stop Remote lookup: %s",
-			   error->message);
-		g_error_free (error);
+	ok = dmap_mdns_browser_stop (share->priv->mdns_browser, error);
+	if (!ok) {
+		goto done;
 	}
 
 	share->priv->mdns_browser = NULL;
-}
-
-const char *
-dacp_share_get_type_of_service (G_GNUC_UNUSED DMAPShare * share)
-{
-	return DACP_TYPE_OF_SERVICE;
-}
-
-void
-dacp_share_player_updated (DACPShare * share)
-{
-	share->priv->current_revision++;
-	dacp_share_send_playstatusupdate (share);
-}
-
-static void
-status_update_message_finished (SoupMessage * message, DACPShare * share)
-{
-	share->priv->update_queue =
-		g_slist_remove (share->priv->update_queue, message);
-	g_object_unref (message);
-}
 
-static void
-dacp_share_send_playstatusupdate (DACPShare * share)
-{
-	GSList *list;
-	SoupServer *server = NULL;
+	ok = TRUE;
 
-	g_object_get (share, "server", &server, NULL);
-	if (server) {
-		for (list = share->priv->update_queue; list;
-		     list = list->next) {
-			dacp_share_fill_playstatusupdate (share,
-			                                  (SoupMessage*) list->data);
-			soup_server_unpause_message (server,
-			                             (SoupMessage*) list->data);
-		}
-		g_object_unref (server);
-	}
-	g_slist_free (share->priv->update_queue);
-	share->priv->update_queue = NULL;
+done:
+	return ok;
 }
 
 static void
-dacp_share_fill_playstatusupdate (DACPShare * share, SoupMessage * message)
+_fill_playstatusupdate (DmapControlShare * share, SoupServerMessage * message)
 {
 	GNode *cmst;
-	DAAPRecord *record;
-	DACPPlayState play_state;
-	DACPRepeatState repeat_state;
+	DmapAvRecord *record;
+	DmapControlPlayState play_state;
+	DmapControlRepeatState repeat_state;
 	gboolean shuffle_state;
 	guint playing_time;
 
@@ -557,10 +509,10 @@ dacp_share_fill_playstatusupdate (DACPShare * share, SoupMessage * message)
 		      "shuffle-state", &shuffle_state,
 		      "playing-time", &playing_time, NULL);
 
-	record = dacp_player_now_playing_record (share->priv->player);
+	record = dmap_control_player_now_playing_record (share->priv->player);
 
 	cmst = dmap_structure_add (NULL, DMAP_CC_CMST);
-	dmap_structure_add (cmst, DMAP_CC_MSTT, (gint32) DMAP_STATUS_OK);
+	dmap_structure_add (cmst, DMAP_CC_MSTT, (gint32) SOUP_STATUS_OK);
 	dmap_structure_add (cmst, DMAP_CC_CMSR,
 			    share->priv->current_revision);
 	dmap_structure_add (cmst, DMAP_CC_CAVC, 1);
@@ -583,12 +535,15 @@ dacp_share_fill_playstatusupdate (DACPShare * share, SoupMessage * message)
 		dmap_structure_add (cmst, DMAP_CC_CAAS, 2);
 		dmap_structure_add (cmst, DMAP_CC_CAAR, 6);
 		dmap_structure_add (cmst, DMAP_CC_CANP, (gint64) 0); // FIXME: may be wrong.
-		if (title)
+		if (title) {
 			dmap_structure_add (cmst, DMAP_CC_CANN, title);
-		if (artist)
+		}
+		if (artist) {
 			dmap_structure_add (cmst, DMAP_CC_CANA, artist);
-		if (album)
+		}
+		if (album) {
 			dmap_structure_add (cmst, DMAP_CC_CANL, album);
+		}
 		dmap_structure_add (cmst, DMAP_CC_CANG, "");
 		dmap_structure_add (cmst, DMAP_CC_ASAI, 0);
 		//dmap_structure_add (cmst, DMAP_CC_AEMK, 1);
@@ -605,29 +560,63 @@ dacp_share_fill_playstatusupdate (DACPShare * share, SoupMessage * message)
 		g_object_unref (record);
 	}
 
-	_dmap_share_message_set_from_dmap_structure (DMAP_SHARE (share),
+	dmap_share_message_set_from_dmap_structure (DMAP_SHARE (share),
 						     message, cmst);
 	dmap_structure_destroy (cmst);
 }
 
 static void
-debug_param (gpointer key, gpointer val, G_GNUC_UNUSED gpointer user_data)
+_send_playstatusupdate (DmapControlShare * share)
+{
+	GSList *list;
+	SoupServer *server = NULL;
+
+	g_object_get (share, "server", &server, NULL);
+	if (server) {
+		for (list = share->priv->update_queue; list;
+		     list = list->next) {
+			_fill_playstatusupdate (share,
+			                       (SoupServerMessage*) list->data);
+			soup_server_message_unpause ((SoupServerMessage*) list->data);
+		}
+		g_object_unref (server);
+	}
+	g_slist_free (share->priv->update_queue);
+	share->priv->update_queue = NULL;
+}
+
+void
+dmap_control_share_player_updated (DmapControlShare * share)
+{
+	share->priv->current_revision++;
+	_send_playstatusupdate (share);
+}
+
+static void
+_status_update_message_finished (SoupServerMessage * message, DmapControlShare * share)
+{
+	share->priv->update_queue =
+		g_slist_remove (share->priv->update_queue, message);
+	g_object_unref (message);
+}
+
+static void
+_debug_param (gpointer key, gpointer val, G_GNUC_UNUSED gpointer user_data)
 {
 	g_debug ("%s %s", (char *) key, (char *) val);
 }
 
 void
-dacp_share_login (DMAPShare * share,
-		  SoupServer * server,
-		  SoupMessage * message,
+dmap_control_share_login (DmapShare * share,
+		  SoupServerMessage * message,
 		  const char *path,
-		  GHashTable * query, SoupClientContext * context)
+		  GHashTable * query)
 {
 	gchar *pairing_guid;
 
 	g_debug ("Path is %s.", path);
 	if (query) {
-		g_hash_table_foreach (query, debug_param, NULL);
+		g_hash_table_foreach (query, _debug_param, NULL);
 	}
 
 	pairing_guid = g_hash_table_lookup (query, "pairing-guid");
@@ -635,34 +624,32 @@ dacp_share_login (DMAPShare * share,
 	if (pairing_guid != NULL) {
 		gboolean allow_login;
 
-		g_signal_emit (share, signals[LOOKUP_GUID], 0, pairing_guid,
+		g_signal_emit (share, _signals[LOOKUP_GUID], 0, pairing_guid,
 			       &allow_login);
 
 		if (!allow_login) {
-			g_debug ("Unknown remote trying to connect");
-			soup_message_set_status (message,
-						 SOUP_STATUS_FORBIDDEN);
+			g_warning("Unknown remote trying to connect");
+			soup_server_message_set_status (message, SOUP_STATUS_FORBIDDEN, NULL);
 			return;
 		}
 	}
 
-	_dmap_share_login (share, server, message, path, query, context);
+	dmap_share_login (share, message, path, query);
 }
 
 void
-dacp_share_ctrl_int (DMAPShare * share,
-		     SoupServer * server,
-		     SoupMessage * message,
-		     const char *path,
-		     GHashTable * query, SoupClientContext * context)
+dmap_control_share_ctrl_int (DmapShare * share,
+                             SoupServerMessage * message,
+                             const char *path,
+                             GHashTable * query)
 {
 	const char *rest_of_path;
 
-	DACPShare *dacp_share = DACP_SHARE (share);
+	DmapControlShare *dmap_control_share = DMAP_CONTROL_SHARE (share);
 
 	g_debug ("Path is %s.", path);
 	if (query) {
-		g_hash_table_foreach (query, debug_param, NULL);
+		g_hash_table_foreach (query, _debug_param, NULL);
 	}
 
 	rest_of_path = strchr (path + 1, '/');
@@ -671,10 +658,10 @@ dacp_share_ctrl_int (DMAPShare * share,
 	 * session-id, otherwise it does and it should be validated. */
 	if ((rest_of_path != NULL)
 	    &&
-	    (!_dmap_share_session_id_validate
-	     (share, context, message, query, NULL))) {
-		soup_message_set_status (message, SOUP_STATUS_FORBIDDEN);
-		return;
+	    (!dmap_share_session_id_validate
+	     (share, message, query, NULL))) {
+		soup_server_message_set_status (message, SOUP_STATUS_FORBIDDEN, NULL);
+		goto done;
 	}
 
 	if (rest_of_path == NULL) {
@@ -702,7 +689,7 @@ dacp_share_ctrl_int (DMAPShare * share,
 		caci = dmap_structure_add (NULL, DMAP_CC_CACI);
 		// dmap.status
 		dmap_structure_add (caci, DMAP_CC_MSTT,
-				    (gint32) DMAP_STATUS_OK);
+				    (gint32) SOUP_STATUS_OK);
 		// dmap.updatetype
 		dmap_structure_add (caci, DMAP_CC_MUTY, 0);
 		// dmap.specifiedtotalcount
@@ -733,7 +720,7 @@ dacp_share_ctrl_int (DMAPShare * share,
 		dmap_structure_add (mlit, DMAP_CC_CASG, (gint32) 1);
 		dmap_structure_add (mlit, DMAP_CC_CMRL, 1);
 
-		_dmap_share_message_set_from_dmap_structure (share, message,
+		dmap_share_message_set_from_dmap_structure (share, message,
 							     caci);
 		dmap_structure_destroy (caci);
 	} else if (g_ascii_strcasecmp ("/1/getproperty", rest_of_path) == 0) {
@@ -744,11 +731,11 @@ dacp_share_ctrl_int (DMAPShare * share,
 
 		if (!properties_query) {
 			g_warning ("No property specified");
-			return;
+			goto done;
 		}
 
 		cmgt = dmap_structure_add (NULL, DMAP_CC_CMGT);
-		dmap_structure_add (cmgt, DMAP_CC_MSTT, DMAP_STATUS_OK);
+		dmap_structure_add (cmgt, DMAP_CC_MSTT, SOUP_STATUS_OK);
 
 		properties = g_strsplit (properties_query, ",", -1);
 		for (property = properties; *property; property++) {
@@ -756,7 +743,7 @@ dacp_share_ctrl_int (DMAPShare * share,
 			    0) {
 				gulong volume;
 
-				g_object_get (dacp_share->priv->player,
+				g_object_get (dmap_control_share->priv->player,
 					      "volume", &volume, NULL);
 				dmap_structure_add (cmgt, DMAP_CC_CMVO,
 						    volume);
@@ -768,7 +755,7 @@ dacp_share_ctrl_int (DMAPShare * share,
 
 		g_strfreev (properties);
 
-		_dmap_share_message_set_from_dmap_structure (share, message,
+		dmap_share_message_set_from_dmap_structure (share, message,
 							     cmgt);
 		dmap_structure_destroy (cmgt);
 	} else if (g_ascii_strcasecmp ("/1/setproperty", rest_of_path) == 0) {
@@ -776,17 +763,17 @@ dacp_share_ctrl_int (DMAPShare * share,
 			gdouble volume =
 				strtod (g_hash_table_lookup
 					(query, "dmcp.volume"), NULL);
-			g_object_set (dacp_share->priv->player, "volume",
+			g_object_set (dmap_control_share->priv->player, "volume",
 				      (gulong) volume, NULL);
 		}
-		soup_message_set_status (message, SOUP_STATUS_NO_CONTENT);
+		soup_server_message_set_status (message, SOUP_STATUS_NO_CONTENT, NULL);
 	} else if (g_ascii_strcasecmp ("/1/getspeakers", rest_of_path) == 0) {
 		GNode *casp;
 		gulong volume;
 
 		casp = dmap_structure_add (NULL, DMAP_CC_CASP);
 		dmap_structure_add (casp, DMAP_CC_MSTT,
-				    (gint32) DMAP_STATUS_OK);
+				    (gint32) SOUP_STATUS_OK);
 		dmap_structure_add (casp, DMAP_CC_MDCL);
 
 		dmap_structure_add (casp, DMAP_CC_CAIA, TRUE);
@@ -795,10 +782,10 @@ dacp_share_ctrl_int (DMAPShare * share,
 		dmap_structure_add (casp, DMAP_CC_MINM, "Computer");
 		dmap_structure_add (casp, DMAP_CC_MSMA, (gint32) 0);
 
-		g_object_get (dacp_share->priv->player, "volume", &volume, NULL);
+		g_object_get (dmap_control_share->priv->player, "volume", &volume, NULL);
 		dmap_structure_add (casp, DMAP_CC_CMVO, volume);
 
-		_dmap_share_message_set_from_dmap_structure (share, message,
+		dmap_share_message_set_from_dmap_structure (share, message,
 							     casp);
 		dmap_structure_destroy (casp);
 	} else if (g_ascii_strcasecmp ("/1/playstatusupdate", rest_of_path) ==
@@ -807,75 +794,79 @@ dacp_share_ctrl_int (DMAPShare * share,
 			g_hash_table_lookup (query, "revision-number");
 		gint revision_number = atoi (revision);
 
-		if (revision_number >= dacp_share->priv->current_revision) {
+		if (revision_number >= dmap_control_share->priv->current_revision) {
 			g_object_ref (message);
-			dacp_share->priv->update_queue =
-				g_slist_prepend (dacp_share->
+			dmap_control_share->priv->update_queue =
+				g_slist_prepend (dmap_control_share->
 						 priv->update_queue, message);
 			g_signal_connect_object (message, "finished",
 						 G_CALLBACK
-						 (status_update_message_finished),
-						 dacp_share, 0);
-			soup_server_pause_message (server, message);
+						 (_status_update_message_finished),
+						 dmap_control_share, 0);
+			soup_server_message_pause (message);
 		} else {
-			dacp_share_fill_playstatusupdate (dacp_share,
-							  message);
+			_fill_playstatusupdate (dmap_control_share, message);
 		}
 	} else if (g_ascii_strcasecmp ("/1/playpause", rest_of_path) == 0) {
-		dacp_player_play_pause (dacp_share->priv->player);
-		soup_message_set_status (message, SOUP_STATUS_NO_CONTENT);
+		dmap_control_player_play_pause (dmap_control_share->priv->player);
+		soup_server_message_set_status (message, SOUP_STATUS_NO_CONTENT, NULL);
 	} else if (g_ascii_strcasecmp ("/1/pause", rest_of_path) == 0) {
-		dacp_player_pause (dacp_share->priv->player);
-		soup_message_set_status (message, SOUP_STATUS_NO_CONTENT);
+		dmap_control_player_pause (dmap_control_share->priv->player);
+		soup_server_message_set_status (message, SOUP_STATUS_NO_CONTENT, NULL);
 	} else if (g_ascii_strcasecmp ("/1/nextitem", rest_of_path) == 0) {
-		dacp_player_next_item (dacp_share->priv->player);
-		soup_message_set_status (message, SOUP_STATUS_NO_CONTENT);
+		dmap_control_player_next_item (dmap_control_share->priv->player);
+		soup_server_message_set_status (message, SOUP_STATUS_NO_CONTENT, NULL);
 	} else if (g_ascii_strcasecmp ("/1/previtem", rest_of_path) == 0) {
-		dacp_player_prev_item (dacp_share->priv->player);
-		soup_message_set_status (message, SOUP_STATUS_NO_CONTENT);
+		dmap_control_player_prev_item (dmap_control_share->priv->player);
+		soup_server_message_set_status (message, SOUP_STATUS_NO_CONTENT, NULL);
 	} else if (g_ascii_strcasecmp ("/1/nowplayingartwork", rest_of_path)
 		   == 0) {
 		guint width = 320;
 		guint height = 320;
-		guchar *artwork_filename;
+		gchar *artwork_filename;
 		gchar *buffer;
 		gsize buffer_len;
 
-		if (g_hash_table_lookup (query, "mw"))
+		if (g_hash_table_lookup (query, "mw")) {
 			width = atoi (g_hash_table_lookup (query, "mw"));
-		if (g_hash_table_lookup (query, "mh"))
+		}
+		if (g_hash_table_lookup (query, "mh")) {
 			height = atoi (g_hash_table_lookup (query, "mh"));
+		}
 		artwork_filename =
-			dacp_player_now_playing_artwork (dacp_share->
-							 priv->player, width,
-							 height);
+			dmap_control_player_now_playing_artwork (dmap_control_share->
+			                                         priv->player, width,
+		                                                 height);
 		if (!artwork_filename) {
 			g_debug ("No artwork for currently playing song");
-			soup_message_set_status (message,
-						 SOUP_STATUS_NOT_FOUND);
-			return;
+			soup_server_message_set_status (message,
+			                                SOUP_STATUS_NOT_FOUND,
+			                                NULL);
+			goto done;
 		}
 #ifdef HAVE_GDKPIXBUF
 		GdkPixbuf *artwork =
-			gdk_pixbuf_new_from_file_at_scale ((char *) artwork_filename,
+			gdk_pixbuf_new_from_file_at_scale (artwork_filename,
 							   width, height,
 							   TRUE, NULL);
 
 		if (!artwork) {
 			g_debug ("Error loading image file");
 			g_free (artwork_filename);
-			soup_message_set_status (message,
-						 SOUP_STATUS_INTERNAL_SERVER_ERROR);
-			return;
+			soup_server_message_set_status (message,
+			                                SOUP_STATUS_INTERNAL_SERVER_ERROR,
+			                                NULL);
+			goto done;
 		}
 		if (!gdk_pixbuf_save_to_buffer
 		    (artwork, &buffer, &buffer_len, "png", NULL, NULL)) {
 			g_debug ("Error saving artwork to PNG");
 			g_object_unref (artwork);
 			g_free (artwork_filename);
-			soup_message_set_status (message,
-						 SOUP_STATUS_INTERNAL_SERVER_ERROR);
-			return;
+			soup_server_message_set_status (message,
+			                                SOUP_STATUS_INTERNAL_SERVER_ERROR,
+			                                NULL);
+			goto done;
 		}
 		g_object_unref (artwork);
 #else
@@ -883,16 +874,17 @@ dacp_share_ctrl_int (DMAPShare * share,
 		    (artwork_filename, &buffer, &buffer_len, NULL)) {
 			g_debug ("Error getting artwork data");
 			g_free (artwork_filename);
-			soup_message_set_status (message,
-						 SOUP_STATUS_INTERNAL_SERVER_ERROR);
-			return;
+			soup_server_message_set_status (message,
+			                                SOUP_STATUS_INTERNAL_SERVER_ERROR,
+			                                NULL);
+			goto done;
 		}
 #endif
 		g_free (artwork_filename);
-		soup_message_set_status (message, SOUP_STATUS_OK);
-		soup_message_set_response (message, "image/png",
-					   SOUP_MEMORY_TAKE, buffer,
-					   buffer_len);
+		soup_server_message_set_status (message, SOUP_STATUS_OK, NULL);
+		soup_server_message_set_response (message, "image/png",
+		                                  SOUP_MEMORY_TAKE, buffer,
+		                                  buffer_len);
 	} else if (g_ascii_strcasecmp ("/1/cue", rest_of_path) == 0) {
 		gchar *command;
 
@@ -900,13 +892,15 @@ dacp_share_ctrl_int (DMAPShare * share,
 
 		if (!command) {
 			g_debug ("No CUE command specified");
-			soup_message_set_status (message,
-						 SOUP_STATUS_NO_CONTENT);
-			return;
+			soup_server_message_set_status (message,
+			                                SOUP_STATUS_NO_CONTENT,
+			                                NULL);
+			goto done;
 		} else if (g_ascii_strcasecmp ("clear", command) == 0) {
-			dacp_player_cue_clear (dacp_share->priv->player);
-			soup_message_set_status (message,
-						 SOUP_STATUS_NO_CONTENT);
+			dmap_control_player_cue_clear (dmap_control_share->priv->player);
+			soup_server_message_set_status (message,
+			                                SOUP_STATUS_NO_CONTENT,
+			                                NULL);
 		} else if (g_ascii_strcasecmp ("play", command) == 0) {
 			GNode *cacr;
 			gchar *record_query;
@@ -914,13 +908,13 @@ dacp_share_ctrl_int (DMAPShare * share,
 			GHashTable *records;
 			GList *sorted_records;
 			GSList *filter_def;
-			DMAPDb *db;
+			DmapDb *db;
 			gint index =
 				atoi (g_hash_table_lookup (query, "index"));
 
 			g_object_get (share, "db", &db, NULL);
 			record_query = g_hash_table_lookup (query, "query");
-			filter_def = _dmap_share_build_filter (record_query);
+			filter_def = dmap_share_build_filter (record_query);
 			records = dmap_db_apply_filter (db, filter_def);
 			sorted_records = g_hash_table_get_values (records);
 			sort_by = g_hash_table_lookup (query, "sort");
@@ -928,14 +922,14 @@ dacp_share_ctrl_int (DMAPShare * share,
 				sorted_records =
 					g_list_sort_with_data (sorted_records,
 							       (GCompareDataFunc)
-							       daap_record_cmp_by_album,
+							       dmap_av_record_cmp_by_album,
 							       db);
 			} else if (sort_by != NULL) {
 				g_warning ("Unknown sort column: %s",
 					   sort_by);
 			}
 
-			dacp_player_cue_play (dacp_share->priv->player,
+			dmap_control_player_cue_play (dmap_control_share->priv->player,
 					      sorted_records, index);
 
 			g_list_free (sorted_records);
@@ -944,34 +938,40 @@ dacp_share_ctrl_int (DMAPShare * share,
 
 			cacr = dmap_structure_add (NULL, DMAP_CC_CACR);
 			dmap_structure_add (cacr, DMAP_CC_MSTT,
-					    DMAP_STATUS_OK);
+					    SOUP_STATUS_OK);
 			dmap_structure_add (cacr, DMAP_CC_MIID, index);
 
-			_dmap_share_message_set_from_dmap_structure (share,
+			dmap_share_message_set_from_dmap_structure (share,
 								     message,
 								     cacr);
+			g_object_unref(db);
 			dmap_structure_destroy (cacr);
 		} else {
 			g_warning ("Unhandled cue command: %s", command);
-			soup_message_set_status (message,
-						 SOUP_STATUS_NO_CONTENT);
-			return;
+			soup_server_message_set_status (message,
+			                                SOUP_STATUS_NO_CONTENT,
+			                                NULL);
+			goto done;
 		}
 	} else {
 		g_warning ("Unhandled ctrl-int command: %s", rest_of_path);
-		soup_message_set_status (message, SOUP_STATUS_BAD_REQUEST);
+		soup_server_message_set_status (message,
+		                                SOUP_STATUS_BAD_REQUEST,
+		                                NULL);
 	}
+
+done:
+	return;
 }
 
 #define PAIR_TXT_LENGTH 16
 #define PASSCODE_LENGTH 4
 
 static gchar *
-dacp_share_pairing_code (G_GNUC_UNUSED DACPShare * share,
-                         gchar * pair_txt,
-			 gchar passcode[4])
+_pairing_code (gchar * pair_txt, gchar passcode[4])
 {
 	int i;
+	gsize ssize, dsize;
 	GString *pairing_code;
 	gchar *pairing_string;
 	gchar *ret;
@@ -980,8 +980,11 @@ dacp_share_pairing_code (G_GNUC_UNUSED DACPShare * share,
 	 * with the passcode, but the passcode takes 16-bits unicodes characters */
 	pairing_string =
 		g_strnfill (PAIR_TXT_LENGTH + PASSCODE_LENGTH * 2, '\0');
-	g_strlcpy (pairing_string, pair_txt,
-		   PAIR_TXT_LENGTH + PASSCODE_LENGTH * 2);
+
+	dsize = PAIR_TXT_LENGTH + PASSCODE_LENGTH * 2;
+	ssize = g_strlcpy (pairing_string, pair_txt, dsize);
+	g_assert(dsize >= ssize);
+
 	for (i = 0; i < 4; i++) {
 		pairing_string[PAIR_TXT_LENGTH + i * 2] = passcode[i];
 	}
@@ -991,23 +994,22 @@ dacp_share_pairing_code (G_GNUC_UNUSED DACPShare * share,
 			      (G_CHECKSUM_MD5, (guchar *) pairing_string,
 			       PAIR_TXT_LENGTH + PASSCODE_LENGTH * 2));
 	g_string_ascii_up (pairing_code);
-	ret = pairing_code->str;
-	g_string_free (pairing_code, FALSE);
+	ret = g_string_free (pairing_code, FALSE);
 
 	return ret;
 }
 
 static void
-connection_handler_cb (DMAPConnection * connection, guint status,
+_connection_handler_cb (DmapConnection * connection, guint status,
 		       GNode * structure, gpointer user_data)
 {
 	gboolean connected;
 	GHashTableIter iter;
 	gpointer key, value;
-	DACPShare *share = user_data;
+	DmapControlShare *share = user_data;
 	DACPRemoteInfo *remote_info = NULL;
 	gchar *service_name = NULL;
-	DMAPStructureItem *item = NULL;
+	DmapStructureItem *item = NULL;
 	gchar *pairing_guid;
 
 	g_debug ("Pairing returned with code %u", status);
@@ -1018,15 +1020,16 @@ connection_handler_cb (DMAPConnection * connection, guint status,
 	}
 
 	/* Get the pairing-guid to identify this remote in the future. */
-	if (structure)
+	if (structure) {
 		item = dmap_structure_find_item (structure, DMAP_CC_CMPG);
+	}
 	if (item) {
 		guint64 guid = g_value_get_int64 (&(item->content));
 
 		pairing_guid =
 			g_strdup_printf ("0x%.16" G_GINT64_MODIFIER "X",
 					 guid);
-		g_signal_emit (share, signals[ADD_GUID], 0, pairing_guid);
+		g_signal_emit (share, _signals[ADD_GUID], 0, pairing_guid);
 		g_free (pairing_guid);
 	}
 
@@ -1050,44 +1053,41 @@ connection_handler_cb (DMAPConnection * connection, guint status,
 	g_object_unref (connection);
 
 	/* FIXME: Send more detailed error info, such as wrong pair code, etc */
-	g_signal_emit (share, signals[REMOTE_PAIRED], 0, service_name,
+	g_signal_emit (share, _signals[REMOTE_PAIRED], 0, service_name,
 		       connected);
 }
 
 void
-dacp_share_pair (DACPShare * share, gchar * service_name, gchar passcode[4])
+dmap_control_share_pair (DmapControlShare * share, gchar * service_name, gchar passcode[4])
 {
+	gboolean ok;
 	gchar *pairing_code;
-	gchar *name;
-	gchar *path;
+	gchar *name = NULL;
+	gchar *path = NULL;
 	DACPRemoteInfo *remote_info;
 
-	remote_info = g_hash_table_lookup (share->priv->remotes,
-					   service_name);
-
+	remote_info = g_hash_table_lookup (share->priv->remotes, service_name);
 	if (remote_info == NULL) {
 		g_warning ("Remote %s not found.", service_name);
-		return;
+		goto done;
 	}
 
 	if (remote_info->connection != NULL) {
 		g_warning ("Already pairing remote %s.", service_name);
-		return;
+		goto done;
 	}
 
 	g_object_get (share, "name", &name, NULL);
 
-	remote_info->connection = DMAP_CONNECTION (dacp_connection_new (name,
+	remote_info->connection = DMAP_CONNECTION (dmap_control_connection_new (name,
 						                        remote_info->host, remote_info->port,
 									NULL,
 									NULL));
-	/* This is required since we don't call DMAPConnection default handler */
+	/* This is required since we don't call DmapConnection default handler */
 	dmap_connection_setup (remote_info->connection);
 
 	/* Get the remote path for pairing */
-	pairing_code =
-		dacp_share_pairing_code (share, remote_info->pair_txt,
-					 passcode);
+	pairing_code = _pairing_code (remote_info->pair_txt, passcode);
 	path = g_strdup_printf ("/pair?pairingcode=%s&servicename=%s",
 				pairing_code, name);
 	g_free (pairing_code);
@@ -1095,9 +1095,14 @@ dacp_share_pair (DACPShare * share, gchar * service_name, gchar passcode[4])
 	g_debug ("Pairing remote in %s:%d/%s", remote_info->host,
 		 remote_info->port, path);
 
-	/* Let DMAPConnection do the heavy work */
-	dmap_connection_get (remote_info->connection, path, FALSE,
-			     connection_handler_cb, share);
+	/* Let DmapConnection do the heavy lifting. */
+	ok = dmap_connection_get (remote_info->connection, path,
+	                          _connection_handler_cb, share);
+	if (!ok) {
+		g_debug("Error pairing remote");
+	}
 
+done:
+	g_free (name);
 	g_free (path);
 }
diff --git a/libdmapsharing/dmap-control-share.h b/libdmapsharing/dmap-control-share.h
new file mode 100644
index 0000000..e361b46
--- /dev/null
+++ b/libdmapsharing/dmap-control-share.h
@@ -0,0 +1,177 @@
+/*
+ * Header for DACP (e.g., iTunes Remote) sharing
+ *
+ * Copyright (C) 2010 Alexandre Rosenfeld <airmind@gmail.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ */
+
+#ifndef _DMAP_CONTROL_SHARE_H
+#define _DMAP_CONTROL_SHARE_H
+
+#include <glib-object.h>
+
+#include <libdmapsharing/dmap-control-player.h>
+#include <libdmapsharing/dmap-share.h>
+#include <libdmapsharing/dmap-db.h>
+#include <libdmapsharing/dmap-container-db.h>
+#include <libdmapsharing/dmap-av-share.h>
+
+G_BEGIN_DECLS
+/**
+ * SECTION: dmap-control-share
+ * @short_description: A DACP share.
+ *
+ * #DmapControlShare objects encapsulate a DACP share.
+ */
+
+/**
+ * DMAP_TYPE_CONTROL_SHARE:
+ *
+ * The type for #DmapControlShare.
+ */
+#define DMAP_TYPE_CONTROL_SHARE         (dmap_control_share_get_type ())
+/**
+ * DMAP_CONTROL_SHARE:
+ * @o: Object which is subject to casting.
+ * 
+ * Casts a #DmapControlShare or derived pointer into a (DmapControlShare*) pointer.
+ * Depending on the current debugging level, this function may invoke
+ * certain runtime checks to identify invalid casts.
+ */
+#define DMAP_CONTROL_SHARE(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), \
+				 DMAP_TYPE_CONTROL_SHARE, DmapControlShare))
+/**
+ * DMAP_CONTROL_SHARE_CLASS:
+ * @k: a valid #DmapControlShareClass
+ *
+ * Casts a derived #DmapControlShareClass structure into a #DmapControlShareClass structure.
+ */
+#define DMAP_CONTROL_SHARE_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), \
+				 DMAP_TYPE_CONTROL_SHARE, DmapControlShareClass))
+/**
+ * DMAP_IS_CONTROL_SHARE:
+ * @o: Instance to check for being a %DMAP_TYPE_CONTROL_SHARE.
+ * 
+ * Checks whether a valid #GTypeInstance pointer is of type %DMAP_TYPE_CONTROL_SHARE.
+ */
+#define DMAP_IS_CONTROL_SHARE(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
+				 DMAP_TYPE_CONTROL_SHARE))
+/**
+ * DMAP_IS_CONTROL_SHARE_CLASS:
+ * @k: a #DmapControlShareClass
+ * 
+ * Checks whether @k "is a" valid #DmapControlShareClass structure of type
+ * %DMAP_CONTROL_SHARE or derived.
+ */
+#define DMAP_IS_CONTROL_SHARE_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), \
+				 DMAP_TYPE_CONTROL_SHARE))
+/**
+ * DMAP_CONTROL_SHARE_GET_CLASS:
+ * @o: a #DmapControlShare instance.
+ * 
+ * Get the class structure associated to a #DmapControlShare instance.
+ *
+ * Returns: pointer to object class structure.
+ */
+#define DMAP_CONTROL_SHARE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
+				 DMAP_TYPE_CONTROL_SHARE, DmapControlShareClass))
+typedef struct DmapControlSharePrivate DmapControlSharePrivate;
+
+typedef struct {
+	DmapAvShare dmap_av_share_instance;
+	DmapControlSharePrivate *priv;
+} DmapControlShare;
+
+typedef struct {
+	DmapAvShareClass dmap_av_share_class;
+
+	  gboolean (*lookup_guid) (DmapControlShare * share, gchar * guid);
+	void (*add_guid) (DmapControlShare * share, gchar * guid);
+
+	void (*remote_found) (DmapControlShare * share,
+			      gchar * service_name, gchar * remote_name);
+	void (*remote_lost) (DmapControlShare * share, gchar * service_name);
+	void (*remote_paired) (DmapControlShare * share,
+			       gchar * service_name, gboolean connected);
+} DmapControlShareClass;
+
+GType dmap_control_share_get_type (void);
+
+/**
+ * dmap_control_share_new:
+ * @library_name: The library name that will be shown in the remote.
+ * @player: A #DmapControlPlayer instance, used to retrieve information from a player
+ *          implementation.
+ * @db: a media database represented by a #DmapDb instance.
+ * @container_db: a container (album) database represented by a #DmapContainerDb
+ *                instance.
+ * 
+ * Creates a new DACP share and publishes it using mDNS.
+ *
+ * Returns: a pointer to a #DmapControlShare.
+ */
+DmapControlShare *dmap_control_share_new (const gchar * library_name, DmapControlPlayer * player,
+			   DmapDb * db, DmapContainerDb * container_db);
+
+/**
+ * dmap_control_share_pair:
+ * @share: a #DmapControlShare 
+ * @service_name: DACP client (remote) service identifier.
+ * @passcode: 4-Digit PIN code entered by the user.
+ * 
+ * Pairs a DACP client (Remote) with this server. If the passcode is 
+ * correct (the same as shown on the remote), the remote will start connecting
+ * to this server.
+ */
+void dmap_control_share_pair (DmapControlShare * share, gchar * service_name,
+		      gchar passcode[4]);
+
+/**
+ * dmap_control_share_start_lookup:
+ * @share: A #DmapControlShare.
+ * @error: A #GError.
+ *     
+ * Start looking up for DACP remotes. Connect to #DmapControlShare::remote-found signal
+ * to detect new remotes. Be aware that when a #DmapControlShare is created, only 
+ * after calling this function is that it starts looking up for Remotes on the
+ * network.
+ *
+ * Returns: TRUE on success, else FALSE with error set.
+ */
+gboolean dmap_control_share_start_lookup (DmapControlShare * share, GError **error);
+
+/**
+ * dmap_control_share_stop_lookup:
+ * @share: A #DmapControlShare.
+ * @error: A #GError.
+ *     
+ * Stop looking up for DACP remotes.
+ */
+gboolean dmap_control_share_stop_lookup (DmapControlShare * share, GError **error);
+
+/**
+ * dmap_control_share_player_update:
+ * @share: A #DmapControlShare.
+ * 
+ * Signals that the player has been updated (different track playing, playing
+ * state changed, suffle state changed, etc).
+ */
+void dmap_control_share_player_updated (DmapControlShare * share);
+
+#endif /* _DMAP_CONTROL_SHARE_H */
+
+G_END_DECLS
diff --git a/libdmapsharing/dmap-db.c b/libdmapsharing/dmap-db.c
index fc73de8..ec51920 100644
--- a/libdmapsharing/dmap-db.c
+++ b/libdmapsharing/dmap-db.c
@@ -24,152 +24,78 @@
 
 typedef struct FilterData
 {
-	DMAPDb *db;
+	DmapDb *db;
 	GSList *filter_def;
 	GHashTable *ht;
 } FilterData;
 
-static gint dmap_db_init_count = 0;
-
-static void
-dmap_db_init (G_GNUC_UNUSED DMAPDbIface * iface)
-{
-	dmap_db_init_count++;
-}
-
 static void
-dmap_db_finalize (G_GNUC_UNUSED DMAPDbIface * iface)
+dmap_db_default_init (G_GNUC_UNUSED DmapDbInterface * iface)
 {
-	dmap_db_init_count--;
 }
 
-/* FIXME: No G_DEFINE_INTERFACE available in GObject headers: */
-GType
-dmap_db_get_type (void)
-{
-	static GType object_type = 0;
-
-	if (!object_type) {
-		static const GTypeInfo object_info = {
-			class_size:     sizeof (DMAPDbIface),
-			base_init:     (GBaseInitFunc) dmap_db_init,
-			base_finalize: (GBaseFinalizeFunc) dmap_db_finalize
-		};
-		object_type =
-			g_type_register_static (G_TYPE_INTERFACE,
-						"DMAPDb", &object_info, 0);
-		g_type_interface_add_prerequisite (object_type,
-						   G_TYPE_OBJECT);
-	}
-	return object_type;
-}
+G_DEFINE_INTERFACE(DmapDb, dmap_db, G_TYPE_OBJECT)
 
-DMAPRecord *
-dmap_db_lookup_by_id (const DMAPDb * db, guint id)
+DmapRecord *
+dmap_db_lookup_by_id (const DmapDb * db, guint id)
 {
 	return DMAP_DB_GET_INTERFACE (db)->lookup_by_id (db, id);
 }
 
 guint
-dmap_db_lookup_id_by_location (const DMAPDb * db, const gchar * location)
+dmap_db_lookup_id_by_location (const DmapDb * db, const gchar * location)
 {
 	return DMAP_DB_GET_INTERFACE (db)->lookup_id_by_location (db,
 								  location);
 }
 
 void
-dmap_db_foreach (const DMAPDb * db, GHFunc func, gpointer data)
+dmap_db_foreach (const DmapDb * db, DmapIdRecordFunc func, gpointer data)
 {
 	DMAP_DB_GET_INTERFACE (db)->foreach (db, func, data);
 }
 
 guint
-dmap_db_add (DMAPDb * db, DMAPRecord * record)
+dmap_db_add (DmapDb *db, DmapRecord *record, GError **error)
 {
-	return DMAP_DB_GET_INTERFACE (db)->add (db, record);
+	return DMAP_DB_GET_INTERFACE (db)->add (db, record, error);
 }
 
 guint
-dmap_db_add_with_id (DMAPDb * db, DMAPRecord * record, guint id)
+dmap_db_add_with_id (DmapDb *db, DmapRecord *record, guint id, GError **error)
 {
-	return DMAP_DB_GET_INTERFACE (db)->add_with_id (db, record, id);
+	return DMAP_DB_GET_INTERFACE (db)->add_with_id (db, record, id, error);
 }
 
 guint
-dmap_db_add_path (DMAPDb * db, const gchar * path)
+dmap_db_add_path (DmapDb *db, const gchar *path, GError **error)
 {
-	return DMAP_DB_GET_INTERFACE (db)->add_path (db, path);
+	return DMAP_DB_GET_INTERFACE (db)->add_path (db, path, error);
 }
 
 gulong
-dmap_db_count (const DMAPDb * db)
+dmap_db_count (const DmapDb * db)
 {
 	return DMAP_DB_GET_INTERFACE (db)->count (db);
 }
 
-gchar **
-_dmap_db_strsplit_using_quotes (const gchar * str)
-{
-	/* What we are splitting looks something like this:
-	 * 'foo'text to ignore'bar'.
-	 */
-
-	gchar **fnval = NULL;
-
-	if (str != NULL) {
-		int i, j;
-
-		fnval = g_strsplit (str, "\'", 0);
-
-		for (i = j = 0; fnval[i]; i++) {
-			gchar *token = fnval[i];
-
-			/* Handle areas around ':
-			 * 'foo' 'bar'
-			 * ^
-			 * 'foo' 'bar'
-			 *      ^
-			 * 'foo'+'bar'
-			 *      ^
-			 */
-			if (*token == '\0' || *token == ' ' || *token == '+')
-				continue;
-
-			/* Handle mistaken split at escaped '. */
-			if (token[strlen (token) - 1] == '\\') {
-				token = g_strconcat (fnval[i], "'",
-						     fnval[i + 1], NULL);
-				g_free (fnval[i]);
-				g_free (fnval[i + 1]);
-				i++;
-			}
-
-			fnval[j++] = token;
-
-		}
-
-		fnval[j] = 0x00;
-	}
-
-	return fnval;
-}
-
 static gboolean
-compare_record_property (DMAPRecord * record, const gchar * property_name,
-			 const gchar * property_value)
+_compare_record_property (DmapRecord * record, const gchar * property_name,
+                          const gchar * property_value)
 {
+	gboolean accept = FALSE;
 	GParamSpec *pspec;
 	GValue value = { 0, };
 	/* Note that this string belongs to value and will not be freed explicitely. */
 	const gchar *str_value;
-	gboolean accept;
 
 	pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (record),
 					      property_name);
 
-	if (pspec == NULL)
+	if (pspec == NULL) {
 		// Can't find the property in this record, so don't accept it.
-		return FALSE;
+		goto done;
+	}
 
 	// Get the property value as a GValue set to the type of this
 	// property.
@@ -183,7 +109,7 @@ compare_record_property (DMAPRecord * record, const gchar * property_name,
 		accept = (g_value_get_boolean (&value) &&
 			  g_strcmp0 (property_value, "1") == 0);
 		g_value_unset (&value);
-		return accept;
+		goto done;
 	} else if (g_value_type_transformable
 		   (G_VALUE_TYPE (&value), G_TYPE_LONG)) {
 		// Prefer integer conversion.
@@ -194,13 +120,13 @@ compare_record_property (DMAPRecord * record, const gchar * property_name,
 				("Failed to convert value into long for property %s",
 				 property_name);
 			g_value_unset (&value);
-			return FALSE;
+			goto done;
 		}
 		g_debug ("Compare %s (long): %ld %s", property_name, g_value_get_long (&dest), property_value);
 		accept = (g_value_get_long (&dest) ==
 			  strtol (property_value, NULL, 10));
 		g_value_unset (&value);
-		return accept;
+		goto done;
 	} else if (g_value_type_transformable
 		   (G_VALUE_TYPE (&value), G_TYPE_STRING)) {
 		// Use standard transform functions from GLib (note that these
@@ -214,7 +140,7 @@ compare_record_property (DMAPRecord * record, const gchar * property_name,
 				("Failed to convert value into string for property %s",
 				 property_name);
 			g_value_unset (&value);
-			return FALSE;
+			goto done;
 		}
 		str_value = g_value_dup_string (&dest);
 		g_value_reset (&value);
@@ -224,7 +150,7 @@ compare_record_property (DMAPRecord * record, const gchar * property_name,
 	} else {
 		g_warning ("Attempt to compare unhandled type");
 		g_value_unset (&value);
-		return FALSE;
+		goto done;
 	}
 
 	// Only arrive here if we are handling strings.
@@ -234,33 +160,30 @@ compare_record_property (DMAPRecord * record, const gchar * property_name,
 		accept = TRUE;
 	} else if (str_value == NULL && property_value == NULL) {
 		accept = TRUE;
-	} else {
-		accept = FALSE;
 	}
 
 	// This will destroy str_value since it belongs to value.
 	g_value_unset (&value);
 
+done:
 	return accept;
 }
 
 static void
-apply_filter (gpointer id, DMAPRecord * record, gpointer data)
+_apply_filter (guint id, DmapRecord * record, gpointer data)
 {
+	g_assert(DMAP_IS_RECORD (record));
+
 	FilterData *fd;
 	gboolean accept = FALSE;
 
 	const gchar *query_key;
 	const gchar *query_value;
 
-	g_return_if_fail (record != NULL);
-	g_return_if_fail (G_IS_OBJECT (record));
-
 	fd = data;
 	if (fd->filter_def == NULL) {
-		g_hash_table_insert (fd->ht, GUINT_TO_POINTER (id),
-				     g_object_ref (record));
-		return;
+		g_hash_table_insert (fd->ht, GUINT_TO_POINTER(id), g_object_ref (record));
+		goto done;
 	}
 
 	GSList *list, *filter;
@@ -268,15 +191,14 @@ apply_filter (gpointer id, DMAPRecord * record, gpointer data)
 	for (list = fd->filter_def; list != NULL; list = list->next) {
 		for (filter = list->data; filter != NULL;
 		     filter = filter->next) {
-			DMAPDbFilterDefinition *def = filter->data;
+			DmapDbFilterDefinition *def = filter->data;
 			const gchar *property_name;
 
 			query_key = def->key;
 			query_value = def->value;
 
 			if (g_strcmp0 (query_key, "dmap.itemid") == 0) {
-				if (GPOINTER_TO_UINT (id) ==
-				    strtoul (query_value, NULL, 10)) {
+				if (id == strtoul (query_value, NULL, 10)) {
 					accept = TRUE;
 					break;
 				}
@@ -285,37 +207,44 @@ apply_filter (gpointer id, DMAPRecord * record, gpointer data)
 			// Use only the part after the last dot.
 			// For instance, dmap.songgenre becomes songgenre.
 			property_name = strrchr (query_key, '.');
-			if (property_name == NULL)
+			if (property_name == NULL) {
 				property_name = query_key;
-			else
+			} else {
 				//Don't include the dot in the property name.
 				property_name++;
+			}
 
-			accept = compare_record_property (record,
+			accept = _compare_record_property (record,
 							  property_name,
 							  query_value);
 
-			if (def->negate)
+			if (def->negate) {
 				accept = !accept;
+			}
 
 			// If we accept this value, then quit looking at this 
 			// group (groups are always OR)
-			if (accept)
+			if (accept) {
 				break;
+			}
 		}
 		// Don't look any further, because groups are AND between 
 		// each other, the first FALSE means FALSE at the end.
-		if (!accept)
+		if (!accept) {
 			break;
+		}
 	}
 	if (accept) {
-		g_hash_table_insert (fd->ht, GUINT_TO_POINTER (id),
+		g_hash_table_insert (fd->ht, GUINT_TO_POINTER(id),
 				     g_object_ref (record));
 	}
+
+done:
+	return;
 }
 
 GHashTable *
-dmap_db_apply_filter (DMAPDb * db, GSList * filter_def)
+dmap_db_apply_filter (DmapDb * db, GSList * filter_def)
 {
 	GHashTable *ht;
 	FilterData data;
@@ -326,7 +255,7 @@ dmap_db_apply_filter (DMAPDb * db, GSList * filter_def)
 	data.filter_def = filter_def;
 	data.ht = ht;
 
-	dmap_db_foreach (db, (GHFunc) apply_filter, &data);
+	dmap_db_foreach (db, (DmapIdRecordFunc) _apply_filter, &data);
 
 	return data.ht;
 }
diff --git a/libdmapsharing/dmap-db.h b/libdmapsharing/dmap-db.h
index 4fd54f1..b0945a1 100644
--- a/libdmapsharing/dmap-db.h
+++ b/libdmapsharing/dmap-db.h
@@ -18,73 +18,100 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef __DMAP_DB_H
-#define __DMAP_DB_H
+#ifndef _DMAP_DB_H
+#define _DMAP_DB_H
 
 #include <glib-object.h>
 
 #include <libdmapsharing/dmap-record.h>
 
 G_BEGIN_DECLS
+/**
+ * SECTION: dmap-db
+ * @short_description: An interface for DMAP databases.
+ *
+ * #DmapDb provides an interface for DMAP databases.
+ */
+
 /**
  * DMAP_TYPE_DB:
  *
- * The type for #DMAPDb.
+ * The type for #DmapDb.
  */
 #define DMAP_TYPE_DB		 (dmap_db_get_type ())
 /**
  * DMAP_DB:
  * @o: Object which is subject to casting.
  *
- * Casts a #DMAPDb or derived pointer into a (DMAPDb *) pointer.
+ * Casts a #DmapDb or derived pointer into a (DmapDb *) pointer.
  * Depending on the current debugging level, this function may invoke
  * certain runtime checks to identify invalid casts.
  */
 #define DMAP_DB(o)		 (G_TYPE_CHECK_INSTANCE_CAST ((o), \
-				  DMAP_TYPE_DB, DMAPDb))
+				  DMAP_TYPE_DB, DmapDb))
 /**
- * IS_DMAP_DB:
+ * DMAP_IS_DB:
  * @o: Instance to check for being a %DMAP_TYPE_DB.
  *
  * Checks whether a valid #GTypeInstance pointer is of type %DMAP_TYPE_DB.
  */
-#define IS_DMAP_DB(o)		 (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
+#define DMAP_IS_DB(o)		 (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
 				  DMAP_TYPE_DB))
 /**
  * DMAP_DB_GET_INTERFACE:
- * @o: a #DMAPDb instance.
+ * @o: a #DmapDb instance.
  *
- * Get the insterface structure associated to a #DMAPDb instance.
+ * Get the insterface structure associated to a #DmapDb instance.
  *
  * Returns: pointer to object interface structure.
  */
 #define DMAP_DB_GET_INTERFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), \
-				  DMAP_TYPE_DB, DMAPDbIface))
-typedef struct _DMAPDb DMAPDb;
-typedef struct _DMAPDbIface DMAPDbIface;
+				  DMAP_TYPE_DB, DmapDbInterface))
+
+/**
+ * DmapDbId:
+ * @DMAP_DB_ID_BAD: the value which represents a bad DmapDb ID.
+ *
+ * Special DmapDb ID values.
+ */
+typedef enum
+{
+	DMAP_DB_ID_BAD = 0,
+} DmapDbId;
+
+typedef struct _DmapDb DmapDb;
+typedef struct _DmapDbInterface DmapDbInterface;
 
-struct _DMAPDbIface
+/**
+ * DmapIdRecordFunc:
+ * @id: a DMAP record ID
+ * @record: a #DmapRecord
+ * @user_data: (closure): user data
+ *
+ * The type of function passed to dmap_db_foreach().
+ */
+typedef void (*DmapIdRecordFunc) (guint id, DmapRecord *record, gpointer user_data);
+
+struct _DmapDbInterface
 {
 	GTypeInterface parent;
 
-	  guint (*add) (DMAPDb * db, DMAPRecord * record);
-	  guint (*add_with_id) (DMAPDb * db, DMAPRecord * record, guint id);
-	  guint (*add_path) (DMAPDb * db, const gchar * path);
-	DMAPRecord *(*lookup_by_id) (const DMAPDb * db, guint id);
-	  guint (*lookup_id_by_location) (const DMAPDb * db,
-					  const gchar * location);
-	void (*foreach) (const DMAPDb * db, GHFunc func, gpointer data);
-	  gint64 (*count) (const DMAPDb * db);
+	guint (*add) (DmapDb *db, DmapRecord *record, GError **error);
+	guint (*add_with_id) (DmapDb * db, DmapRecord * record, guint id, GError **error);
+	guint (*add_path) (DmapDb * db, const gchar * path, GError **error);
+	DmapRecord *(*lookup_by_id) (const DmapDb * db, guint id);
+	guint (*lookup_id_by_location) (const DmapDb * db,
+				  const gchar * location);
+	void (*foreach) (const DmapDb * db, DmapIdRecordFunc func, gpointer data);
+	gint64 (*count) (const DmapDb * db);
 };
 
-typedef const char *(*RecordGetValueFunc) (DMAPRecord * record);
-
-typedef struct DMAPDbFilterDefinition
+typedef struct DmapDbFilterDefinition
 {
 	gchar *key;
 	gchar *value;
 	gboolean negate;
-} DMAPDbFilterDefinition;
+} DmapDbFilterDefinition;
 
 GType dmap_db_get_type (void);
 
@@ -92,51 +119,56 @@ GType dmap_db_get_type (void);
  * dmap_db_add:
  * @db: A media database.
  * @record: A database record.
+ * @error: return location for a GError, or NULL.
  *
  * Add a record to the database. 
  *
- * Returns: The ID for the newly added record. A reference to the record
- * will be retained by the database (if required; an adapter-type 
- * implementation may not want to retain a reference as the record data may
- * be placed elsewhere). In all cases, the record should be unrefed by the 
- * calling code.
+ * Returns: The ID for the newly added record or @DMAP_DB_ID_BAD on failure. A
+ * reference to the record will be retained by the database (if required; an
+ * adapter-type implementation might not want to retain a reference as the
+ * record data may be placed elsewhere). In all cases, a returned record should
+ * be unrefed by the calling code.
  */
-guint dmap_db_add (DMAPDb * db, DMAPRecord * record);
+guint dmap_db_add (DmapDb *db, DmapRecord *record, GError **error);
 
 /**
  * dmap_db_add_with_id:
  * @db: A media database.
  * @record: A database record.
  * @id: A database record ID.
+ * @error: return location for a GError, or NULL.
  *
- * Add a record to the database and assign it the given ID. 
+ * Add a record to the database and assign it the given ID. @id cannot be
+ * @DMAP_DB_ID_BAD.
  *
- * Returns: The ID for the newly added record.
+ * Returns: The ID for the newly added record or DMAP_DB_ID_BAD on failure.
  *
  * See also the notes for dmap_db_add regarding reference counting.
  */
-guint dmap_db_add_with_id (DMAPDb * db, DMAPRecord * record, guint id);
+guint dmap_db_add_with_id (DmapDb *db, DmapRecord *record, guint id, GError **error);
 
 /**
  * dmap_db_add_path:
  * @db: A media database.
  * @path: A path to an appropriate media file.
+ * @error: return location for a GError, or NULL.
  *
  * Create a record and add it to the database. 
  *
- * Returns: The ID for the newly added record.
+ * Returns: The ID for the newly added record or DMAP_DB_ID_BAD on failure.
  *
  * See also the notes for dmap_db_add regarding reference counting.
  */
-guint dmap_db_add_path (DMAPDb * db, const gchar * path);
+guint dmap_db_add_path (DmapDb * db, const gchar * path, GError **error);
 
 /**
  * dmap_db_lookup_by_id:
  * @db: A media database. 
  * @id: A record ID.
  *
- * Returns: the database record corresponding to @id. This record should
- * be unrefed by the calling code when no longer required.
+ * Returns: (transfer full): the database record corresponding to @id. @id
+ * cannot be DMAP_DB_ID_BAD. The returned record should be unrefed by the
+ * calling code when no longer required.
  *
  * If you are implementing a full database using this API, then you
  * probably want to increment the reference count before returning a record
@@ -149,28 +181,28 @@ guint dmap_db_add_path (DMAPDb * db, const gchar * path);
  * In this case, the reference count should not be incremented before
  * returning a record pointer.
  */
-DMAPRecord *dmap_db_lookup_by_id (const DMAPDb * db, guint id);
+DmapRecord *dmap_db_lookup_by_id (const DmapDb * db, guint id);
 
 /**
  * dmap_db_lookup_id_by_location:
  * @db: A media database. 
  * @location: A record location.
  *
- * Returns: the database id for the record corresponding to @path or 0 if
- * such a record does not exist.
+ * Returns: the database id for the record corresponding to @path or
+ * DMAP_DB_ID_BAD if such a record does not exist.
  */
-guint dmap_db_lookup_id_by_location (const DMAPDb * db,
+guint dmap_db_lookup_id_by_location (const DmapDb * db,
 				     const gchar * location);
 
 /**
  * dmap_db_foreach:
  * @db: A media database.
- * @func: The function to apply to each record in the database.
+ * @func: (scope call): The function to apply to each record in the database.
  * @data: User data to pass to the function.
  *
  * Apply a function to each record in a media database.
  */
-void dmap_db_foreach (const DMAPDb * db, GHFunc func, gpointer data);
+void dmap_db_foreach (const DmapDb * db, DmapIdRecordFunc func, gpointer data);
 
 /**
  * dmap_db_count:
@@ -178,12 +210,17 @@ void dmap_db_foreach (const DMAPDb * db, GHFunc func, gpointer data);
  *
  * Returns: the number of records in the database.
  */
-gulong dmap_db_count (const DMAPDb * db);
+gulong dmap_db_count (const DmapDb * db);
 
-gchar **_dmap_db_strsplit_using_quotes (const gchar * str);
-
-GHashTable *dmap_db_apply_filter (DMAPDb * db, GSList * filter_def);
+/**
+ * dmap_db_apply_filter:
+ * @db: A media database.
+ * @filter_def: (element-type DmapDbFilterDefinition): A series of filter definitions.
+ *
+ * Returns: (element-type guint DmapRecord) (transfer full): the records which satisfy a record in @filter_def.
+ */
+GHashTable *dmap_db_apply_filter (DmapDb * db, GSList * filter_def);
 
-#endif /* __DMAP_DB_H */
+#endif /* _DMAP_DB_H */
 
 G_END_DECLS
diff --git a/libdmapsharing/dmap-enums.c b/libdmapsharing/dmap-enums.c
index d82bbbd..5b6ce6b 100644
--- a/libdmapsharing/dmap-enums.c
+++ b/libdmapsharing/dmap-enums.c
@@ -3,102 +3,291 @@
 
 /* Automatically generated by glib-mkenums */
 
-#include "dacp-share.h"
-#include "dacp-player.h"
+#include "dmap-control-share.h"
+#include "dmap-control-player.h"
 #include "dmap-mdns-publisher.h"
 #include "dmap-mdns-browser.h"
 #include "dmap-connection.h"
+#include "dmap-error.h"
 #include "dmap-enums.h"
 
-/* enumerations from "./dacp-player.h" */
+/* enumerations from "dmap-cc.h" */
 GType
-dacp_repeat_state_get_type (void)
+dmap_content_code_get_type (void)
 {
   static GType etype = 0;
   if (etype == 0) {
     static const GEnumValue values[] = {
-      { DACP_REPEAT_NONE, "DACP_REPEAT_NONE", "none" },
-      { DACP_REPEAT_SINGLE, "DACP_REPEAT_SINGLE", "single" },
-      { DACP_REPEAT_ALL, "DACP_REPEAT_ALL", "all" },
+      { DMAP_CC_INVALID, "DMAP_CC_INVALID", "cc-invalid" },
+      { DMAP_RAW, "DMAP_RAW", "raw" },
+      { DMAP_CC_MDCL, "DMAP_CC_MDCL", "cc-mdcl" },
+      { DMAP_CC_MEDS, "DMAP_CC_MEDS", "cc-meds" },
+      { DMAP_CC_MSTT, "DMAP_CC_MSTT", "cc-mstt" },
+      { DMAP_CC_MIID, "DMAP_CC_MIID", "cc-miid" },
+      { DMAP_CC_MINM, "DMAP_CC_MINM", "cc-minm" },
+      { DMAP_CC_MIKD, "DMAP_CC_MIKD", "cc-mikd" },
+      { DMAP_CC_MPER, "DMAP_CC_MPER", "cc-mper" },
+      { DMAP_CC_MCON, "DMAP_CC_MCON", "cc-mcon" },
+      { DMAP_CC_MCTI, "DMAP_CC_MCTI", "cc-mcti" },
+      { DMAP_CC_MPCO, "DMAP_CC_MPCO", "cc-mpco" },
+      { DMAP_CC_MSTS, "DMAP_CC_MSTS", "cc-msts" },
+      { DMAP_CC_MIMC, "DMAP_CC_MIMC", "cc-mimc" },
+      { DMAP_CC_MCTC, "DMAP_CC_MCTC", "cc-mctc" },
+      { DMAP_CC_MRCO, "DMAP_CC_MRCO", "cc-mrco" },
+      { DMAP_CC_MTCO, "DMAP_CC_MTCO", "cc-mtco" },
+      { DMAP_CC_MLCL, "DMAP_CC_MLCL", "cc-mlcl" },
+      { DMAP_CC_MLIT, "DMAP_CC_MLIT", "cc-mlit" },
+      { DMAP_CC_MBCL, "DMAP_CC_MBCL", "cc-mbcl" },
+      { DMAP_CC_MSRV, "DMAP_CC_MSRV", "cc-msrv" },
+      { DMAP_CC_MSAU, "DMAP_CC_MSAU", "cc-msau" },
+      { DMAP_CC_MSLR, "DMAP_CC_MSLR", "cc-mslr" },
+      { DMAP_CC_MPRO, "DMAP_CC_MPRO", "cc-mpro" },
+      { DMAP_CC_MSAL, "DMAP_CC_MSAL", "cc-msal" },
+      { DMAP_CC_MSUP, "DMAP_CC_MSUP", "cc-msup" },
+      { DMAP_CC_MSPI, "DMAP_CC_MSPI", "cc-mspi" },
+      { DMAP_CC_MSEX, "DMAP_CC_MSEX", "cc-msex" },
+      { DMAP_CC_MSBR, "DMAP_CC_MSBR", "cc-msbr" },
+      { DMAP_CC_MSQY, "DMAP_CC_MSQY", "cc-msqy" },
+      { DMAP_CC_MSIX, "DMAP_CC_MSIX", "cc-msix" },
+      { DMAP_CC_MSRS, "DMAP_CC_MSRS", "cc-msrs" },
+      { DMAP_CC_MSTM, "DMAP_CC_MSTM", "cc-mstm" },
+      { DMAP_CC_MSDC, "DMAP_CC_MSDC", "cc-msdc" },
+      { DMAP_CC_MCCR, "DMAP_CC_MCCR", "cc-mccr" },
+      { DMAP_CC_MCNM, "DMAP_CC_MCNM", "cc-mcnm" },
+      { DMAP_CC_MCNA, "DMAP_CC_MCNA", "cc-mcna" },
+      { DMAP_CC_MCTY, "DMAP_CC_MCTY", "cc-mcty" },
+      { DMAP_CC_MLOG, "DMAP_CC_MLOG", "cc-mlog" },
+      { DMAP_CC_MLID, "DMAP_CC_MLID", "cc-mlid" },
+      { DMAP_CC_MUPD, "DMAP_CC_MUPD", "cc-mupd" },
+      { DMAP_CC_MUSR, "DMAP_CC_MUSR", "cc-musr" },
+      { DMAP_CC_MUTY, "DMAP_CC_MUTY", "cc-muty" },
+      { DMAP_CC_MUDL, "DMAP_CC_MUDL", "cc-mudl" },
+      { DMAP_CC_MSMA, "DMAP_CC_MSMA", "cc-msma" },
+      { DMAP_CC_FQUESCH, "DMAP_CC_FQUESCH", "cc-fquesch" },
+      { DMAP_CC_MDBK, "DMAP_CC_MDBK", "cc-mdbk" },
+      { DMAP_CC_APRO, "DMAP_CC_APRO", "cc-apro" },
+      { DMAP_CC_AVDB, "DMAP_CC_AVDB", "cc-avdb" },
+      { DMAP_CC_ABRO, "DMAP_CC_ABRO", "cc-abro" },
+      { DMAP_CC_ABAL, "DMAP_CC_ABAL", "cc-abal" },
+      { DMAP_CC_ABAR, "DMAP_CC_ABAR", "cc-abar" },
+      { DMAP_CC_ABCP, "DMAP_CC_ABCP", "cc-abcp" },
+      { DMAP_CC_ABGN, "DMAP_CC_ABGN", "cc-abgn" },
+      { DMAP_CC_ADBS, "DMAP_CC_ADBS", "cc-adbs" },
+      { DMAP_CC_ASAL, "DMAP_CC_ASAL", "cc-asal" },
+      { DMAP_CC_ASAI, "DMAP_CC_ASAI", "cc-asai" },
+      { DMAP_CC_ASAA, "DMAP_CC_ASAA", "cc-asaa" },
+      { DMAP_CC_ASAR, "DMAP_CC_ASAR", "cc-asar" },
+      { DMAP_CC_ASBT, "DMAP_CC_ASBT", "cc-asbt" },
+      { DMAP_CC_ASBR, "DMAP_CC_ASBR", "cc-asbr" },
+      { DMAP_CC_ASCM, "DMAP_CC_ASCM", "cc-ascm" },
+      { DMAP_CC_ASCO, "DMAP_CC_ASCO", "cc-asco" },
+      { DMAP_CC_ASDA, "DMAP_CC_ASDA", "cc-asda" },
+      { DMAP_CC_ASDM, "DMAP_CC_ASDM", "cc-asdm" },
+      { DMAP_CC_ASDC, "DMAP_CC_ASDC", "cc-asdc" },
+      { DMAP_CC_ASDN, "DMAP_CC_ASDN", "cc-asdn" },
+      { DMAP_CC_ASDB, "DMAP_CC_ASDB", "cc-asdb" },
+      { DMAP_CC_ASEQ, "DMAP_CC_ASEQ", "cc-aseq" },
+      { DMAP_CC_ASFM, "DMAP_CC_ASFM", "cc-asfm" },
+      { DMAP_CC_ASGN, "DMAP_CC_ASGN", "cc-asgn" },
+      { DMAP_CC_ASDT, "DMAP_CC_ASDT", "cc-asdt" },
+      { DMAP_CC_ASRV, "DMAP_CC_ASRV", "cc-asrv" },
+      { DMAP_CC_ASSR, "DMAP_CC_ASSR", "cc-assr" },
+      { DMAP_CC_ASSZ, "DMAP_CC_ASSZ", "cc-assz" },
+      { DMAP_CC_ASST, "DMAP_CC_ASST", "cc-asst" },
+      { DMAP_CC_ASSP, "DMAP_CC_ASSP", "cc-assp" },
+      { DMAP_CC_ASTM, "DMAP_CC_ASTM", "cc-astm" },
+      { DMAP_CC_ASTC, "DMAP_CC_ASTC", "cc-astc" },
+      { DMAP_CC_ASTN, "DMAP_CC_ASTN", "cc-astn" },
+      { DMAP_CC_ASUR, "DMAP_CC_ASUR", "cc-asur" },
+      { DMAP_CC_ASYR, "DMAP_CC_ASYR", "cc-asyr" },
+      { DMAP_CC_ASDK, "DMAP_CC_ASDK", "cc-asdk" },
+      { DMAP_CC_ASUL, "DMAP_CC_ASUL", "cc-asul" },
+      { DMAP_CC_ASSU, "DMAP_CC_ASSU", "cc-assu" },
+      { DMAP_CC_ASSA, "DMAP_CC_ASSA", "cc-assa" },
+      { DMAP_CC_APLY, "DMAP_CC_APLY", "cc-aply" },
+      { DMAP_CC_ABPL, "DMAP_CC_ABPL", "cc-abpl" },
+      { DMAP_CC_APSO, "DMAP_CC_APSO", "cc-apso" },
+      { DMAP_CC_PRSV, "DMAP_CC_PRSV", "cc-prsv" },
+      { DMAP_CC_ARIF, "DMAP_CC_ARIF", "cc-arif" },
+      { DMAP_CC_MSAS, "DMAP_CC_MSAS", "cc-msas" },
+      { DMAP_CC_AGRP, "DMAP_CC_AGRP", "cc-agrp" },
+      { DMAP_CC_AGAL, "DMAP_CC_AGAL", "cc-agal" },
+      { DMAP_CC_ASCP, "DMAP_CC_ASCP", "cc-ascp" },
+      { DMAP_CC_PPRO, "DMAP_CC_PPRO", "cc-ppro" },
+      { DMAP_CC_PASP, "DMAP_CC_PASP", "cc-pasp" },
+      { DMAP_CC_PFDT, "DMAP_CC_PFDT", "cc-pfdt" },
+      { DMAP_CC_PICD, "DMAP_CC_PICD", "cc-picd" },
+      { DMAP_CC_PIMF, "DMAP_CC_PIMF", "cc-pimf" },
+      { DMAP_CC_PFMT, "DMAP_CC_PFMT", "cc-pfmt" },
+      { DMAP_CC_PIFS, "DMAP_CC_PIFS", "cc-pifs" },
+      { DMAP_CC_PLSZ, "DMAP_CC_PLSZ", "cc-plsz" },
+      { DMAP_CC_PHGT, "DMAP_CC_PHGT", "cc-phgt" },
+      { DMAP_CC_PWTH, "DMAP_CC_PWTH", "cc-pwth" },
+      { DMAP_CC_PRAT, "DMAP_CC_PRAT", "cc-prat" },
+      { DMAP_CC_PCMT, "DMAP_CC_PCMT", "cc-pcmt" },
+      { DMAP_CC_PRET, "DMAP_CC_PRET", "cc-pret" },
+      { DMAP_CC_AECS, "DMAP_CC_AECS", "cc-aecs" },
+      { DMAP_CC_AESV, "DMAP_CC_AESV", "cc-aesv" },
+      { DMAP_CC_AEHV, "DMAP_CC_AEHV", "cc-aehv" },
+      { DMAP_CC_AESP, "DMAP_CC_AESP", "cc-aesp" },
+      { DMAP_CC_AEPP, "DMAP_CC_AEPP", "cc-aepp" },
+      { DMAP_CC_AEPS, "DMAP_CC_AEPS", "cc-aeps" },
+      { DMAP_CC_AESG, "DMAP_CC_AESG", "cc-aesg" },
+      { DMAP_CC_AEMK, "DMAP_CC_AEMK", "cc-aemk" },
+      { DMAP_CC_AEMK2, "DMAP_CC_AEMK2", "cc-aemk2" },
+      { DMAP_CC_AEFP, "DMAP_CC_AEFP", "cc-aefp" },
+      { DMAP_CC_ATED, "DMAP_CC_ATED", "cc-ated" },
+      { DMAP_CC_ASGR, "DMAP_CC_ASGR", "cc-asgr" },
+      { DMAP_CC_AEMQ, "DMAP_CC_AEMQ", "cc-aemq" },
+      { DMAP_CC_AESL, "DMAP_CC_AESL", "cc-aesl" },
+      { DMAP_CC_AESR, "DMAP_CC_AESR", "cc-aesr" },
+      { DMAP_CC_AETR, "DMAP_CC_AETR", "cc-aetr" },
+      { DMAP_CC_MSED, "DMAP_CC_MSED", "cc-msed" },
+      { DMAP_CC_CMPA, "DMAP_CC_CMPA", "cc-cmpa" },
+      { DMAP_CC_CMNM, "DMAP_CC_CMNM", "cc-cmnm" },
+      { DMAP_CC_CMTY, "DMAP_CC_CMTY", "cc-cmty" },
+      { DMAP_CC_CMPG, "DMAP_CC_CMPG", "cc-cmpg" },
+      { DMAP_CC_CACI, "DMAP_CC_CACI", "cc-caci" },
+      { DMAP_CC_CAPS, "DMAP_CC_CAPS", "cc-caps" },
+      { DMAP_CC_CASH, "DMAP_CC_CASH", "cc-cash" },
+      { DMAP_CC_CARP, "DMAP_CC_CARP", "cc-carp" },
+      { DMAP_CC_CAAS, "DMAP_CC_CAAS", "cc-caas" },
+      { DMAP_CC_CAAR, "DMAP_CC_CAAR", "cc-caar" },
+      { DMAP_CC_CAIA, "DMAP_CC_CAIA", "cc-caia" },
+      { DMAP_CC_CANP, "DMAP_CC_CANP", "cc-canp" },
+      { DMAP_CC_CANN, "DMAP_CC_CANN", "cc-cann" },
+      { DMAP_CC_CANA, "DMAP_CC_CANA", "cc-cana" },
+      { DMAP_CC_CANL, "DMAP_CC_CANL", "cc-canl" },
+      { DMAP_CC_CANG, "DMAP_CC_CANG", "cc-cang" },
+      { DMAP_CC_CANT, "DMAP_CC_CANT", "cc-cant" },
+      { DMAP_CC_CASP, "DMAP_CC_CASP", "cc-casp" },
+      { DMAP_CC_CASS, "DMAP_CC_CASS", "cc-cass" },
+      { DMAP_CC_CAST, "DMAP_CC_CAST", "cc-cast" },
+      { DMAP_CC_CASU, "DMAP_CC_CASU", "cc-casu" },
+      { DMAP_CC_CASG, "DMAP_CC_CASG", "cc-casg" },
+      { DMAP_CC_CACR, "DMAP_CC_CACR", "cc-cacr" },
+      { DMAP_CC_CMCP, "DMAP_CC_CMCP", "cc-cmcp" },
+      { DMAP_CC_CMGT, "DMAP_CC_CMGT", "cc-cmgt" },
+      { DMAP_CC_CMIK, "DMAP_CC_CMIK", "cc-cmik" },
+      { DMAP_CC_CMSP, "DMAP_CC_CMSP", "cc-cmsp" },
+      { DMAP_CC_CMST, "DMAP_CC_CMST", "cc-cmst" },
+      { DMAP_CC_CMSV, "DMAP_CC_CMSV", "cc-cmsv" },
+      { DMAP_CC_CMSR, "DMAP_CC_CMSR", "cc-cmsr" },
+      { DMAP_CC_CMMK, "DMAP_CC_CMMK", "cc-cmmk" },
+      { DMAP_CC_CMVO, "DMAP_CC_CMVO", "cc-cmvo" },
+      { DMAP_CC_CMPR, "DMAP_CC_CMPR", "cc-cmpr" },
+      { DMAP_CC_CAPR, "DMAP_CC_CAPR", "cc-capr" },
+      { DMAP_CC_AEFR, "DMAP_CC_AEFR", "cc-aefr" },
+      { DMAP_CC_CAOV, "DMAP_CC_CAOV", "cc-caov" },
+      { DMAP_CC_CMRL, "DMAP_CC_CMRL", "cc-cmrl" },
+      { DMAP_CC_CAHP, "DMAP_CC_CAHP", "cc-cahp" },
+      { DMAP_CC_CAIV, "DMAP_CC_CAIV", "cc-caiv" },
+      { DMAP_CC_CAVC, "DMAP_CC_CAVC", "cc-cavc" },
       { 0, NULL, NULL }
     };
-    etype = g_enum_register_static ("DACPRepeatState", values);
+    etype = g_enum_register_static ("DmapContentCode", values);
   }
   return etype;
 }
+
+/* enumerations from "dmap-connection.h" */
 GType
-dacp_play_state_get_type (void)
+dmap_connection_state_get_type (void)
 {
   static GType etype = 0;
   if (etype == 0) {
     static const GEnumValue values[] = {
-      { DACP_PLAY_STOPPED, "DACP_PLAY_STOPPED", "stopped" },
-      { DACP_PLAY_PAUSED, "DACP_PLAY_PAUSED", "paused" },
-      { DACP_PLAY_PLAYING, "DACP_PLAY_PLAYING", "playing" },
+      { DMAP_GET_INFO, "DMAP_GET_INFO", "get-info" },
+      { DMAP_LOGIN, "DMAP_LOGIN", "login" },
+      { DMAP_GET_REVISION_NUMBER, "DMAP_GET_REVISION_NUMBER", "get-revision-number" },
+      { DMAP_GET_DB_INFO, "DMAP_GET_DB_INFO", "get-db-info" },
+      { DMAP_GET_MEDIA, "DMAP_GET_MEDIA", "get-media" },
+      { DMAP_GET_PLAYLISTS, "DMAP_GET_PLAYLISTS", "get-playlists" },
+      { DMAP_GET_PLAYLIST_ENTRIES, "DMAP_GET_PLAYLIST_ENTRIES", "get-playlist-entries" },
+      { DMAP_LOGOUT, "DMAP_LOGOUT", "logout" },
+      { DMAP_DONE, "DMAP_DONE", "done" },
       { 0, NULL, NULL }
     };
-    etype = g_enum_register_static ("DACPPlayState", values);
+    etype = g_enum_register_static ("DmapConnectionState", values);
   }
   return etype;
 }
 
-/* enumerations from "./dmap-connection.h" */
+/* enumerations from "dmap-control-player.h" */
 GType
-dmap_connection_state_get_type (void)
+dmap_control_repeat_state_get_type (void)
 {
   static GType etype = 0;
   if (etype == 0) {
     static const GEnumValue values[] = {
-      { DMAP_GET_INFO, "DMAP_GET_INFO", "get-info" },
-      { DMAP_LOGIN, "DMAP_LOGIN", "login" },
-      { DMAP_GET_REVISION_NUMBER, "DMAP_GET_REVISION_NUMBER", "get-revision-number" },
-      { DMAP_GET_DB_INFO, "DMAP_GET_DB_INFO", "get-db-info" },
-      { DMAP_GET_SONGS, "DMAP_GET_SONGS", "get-songs" },
-      { DMAP_GET_PLAYLISTS, "DMAP_GET_PLAYLISTS", "get-playlists" },
-      { DMAP_GET_PLAYLIST_ENTRIES, "DMAP_GET_PLAYLIST_ENTRIES", "get-playlist-entries" },
-      { DMAP_LOGOUT, "DMAP_LOGOUT", "logout" },
-      { DMAP_DONE, "DMAP_DONE", "done" },
+      { DMAP_CONTROL_REPEAT_NONE, "DMAP_CONTROL_REPEAT_NONE", "none" },
+      { DMAP_CONTROL_REPEAT_SINGLE, "DMAP_CONTROL_REPEAT_SINGLE", "single" },
+      { DMAP_CONTROL_REPEAT_ALL, "DMAP_CONTROL_REPEAT_ALL", "all" },
+      { 0, NULL, NULL }
+    };
+    etype = g_enum_register_static ("DmapControlRepeatState", values);
+  }
+  return etype;
+}
+GType
+dmap_control_play_state_get_type (void)
+{
+  static GType etype = 0;
+  if (etype == 0) {
+    static const GEnumValue values[] = {
+      { DMAP_CONTROL_PLAY_STOPPED, "DMAP_CONTROL_PLAY_STOPPED", "stopped" },
+      { DMAP_CONTROL_PLAY_PAUSED, "DMAP_CONTROL_PLAY_PAUSED", "paused" },
+      { DMAP_CONTROL_PLAY_PLAYING, "DMAP_CONTROL_PLAY_PLAYING", "playing" },
       { 0, NULL, NULL }
     };
-    etype = g_enum_register_static ("DMAPConnectionState", values);
+    etype = g_enum_register_static ("DmapControlPlayState", values);
   }
   return etype;
 }
 
-/* enumerations from "./dmap-mdns-browser.h" */
+/* enumerations from "dmap-db.h" */
 GType
-dmap_mdns_browser_service_type_get_type (void)
+dmap_db_id_get_type (void)
 {
   static GType etype = 0;
   if (etype == 0) {
     static const GEnumValue values[] = {
-      { DMAP_MDNS_BROWSER_SERVICE_TYPE_INVALID, "DMAP_MDNS_BROWSER_SERVICE_TYPE_INVALID", "invalid" },
-      { DMAP_MDNS_BROWSER_SERVICE_TYPE_DAAP, "DMAP_MDNS_BROWSER_SERVICE_TYPE_DAAP", "daap" },
-      { DMAP_MDNS_BROWSER_SERVICE_TYPE_DPAP, "DMAP_MDNS_BROWSER_SERVICE_TYPE_DPAP", "dpap" },
-      { DMAP_MDNS_BROWSER_SERVICE_TYPE_DACP, "DMAP_MDNS_BROWSER_SERVICE_TYPE_DACP", "dacp" },
-      { DMAP_MDNS_BROWSER_SERVICE_TYPE_RAOP, "DMAP_MDNS_BROWSER_SERVICE_TYPE_RAOP", "raop" },
-      { DMAP_MDNS_BROWSER_SERVICE_TYPE_LAST, "DMAP_MDNS_BROWSER_SERVICE_TYPE_LAST", "last" },
+      { DMAP_DB_ID_BAD, "DMAP_DB_ID_BAD", "bad" },
       { 0, NULL, NULL }
     };
-    etype = g_enum_register_static ("DMAPMdnsBrowserServiceType", values);
+    etype = g_enum_register_static ("DmapDbId", values);
   }
   return etype;
 }
+
+/* enumerations from "dmap-error.h" */
 GType
-dmap_mdns_browser_transport_protocol_get_type (void)
+dmap_error_get_type (void)
 {
   static GType etype = 0;
   if (etype == 0) {
     static const GEnumValue values[] = {
-      { DMAP_MDNS_BROWSER_TRANSPORT_PROTOCOL_TCP, "DMAP_MDNS_BROWSER_TRANSPORT_PROTOCOL_TCP", "tcp" },
-      { DMAP_MDNS_BROWSER_TRANSPORT_PROTOCOL_UDP, "DMAP_MDNS_BROWSER_TRANSPORT_PROTOCOL_UDP", "udp" },
-      { DMAP_MDNS_BROWSER_TRANSPORT_PROTOCOL_LAST, "DMAP_MDNS_BROWSER_TRANSPORT_PROTOCOL_LAST", "last" },
+      { DMAP_STATUS_OK, "DMAP_STATUS_OK", "ok" },
+      { DMAP_STATUS_FAILED, "DMAP_STATUS_FAILED", "failed" },
+      { DMAP_STATUS_INVALID_CONTENT_CODE, "DMAP_STATUS_INVALID_CONTENT_CODE", "invalid-content-code" },
+      { DMAP_STATUS_INVALID_CONTENT_CODE_SIZE, "DMAP_STATUS_INVALID_CONTENT_CODE_SIZE", "invalid-content-code-size" },
+      { DMAP_STATUS_RESPONSE_TOO_SHORT, "DMAP_STATUS_RESPONSE_TOO_SHORT", "response-too-short" },
+      { DMAP_STATUS_BAD_FORMAT, "DMAP_STATUS_BAD_FORMAT", "bad-format" },
+      { DMAP_STATUS_BAD_BROWSE_CATEGORY, "DMAP_STATUS_BAD_BROWSE_CATEGORY", "bad-browse-category" },
+      { DMAP_STATUS_RECORD_MISSING_FIELD, "DMAP_STATUS_RECORD_MISSING_FIELD", "record-missing-field" },
+      { DMAP_STATUS_DB_BAD_ID, "DMAP_STATUS_DB_BAD_ID", "db-bad-id" },
+      { DMAP_STATUS_OPEN_FAILED, "DMAP_STATUS_OPEN_FAILED", "open-failed" },
+      { DMAP_STATUS_CLOSE_FAILED, "DMAP_STATUS_CLOSE_FAILED", "close-failed" },
+      { DMAP_STATUS_SEEK_FAILED, "DMAP_STATUS_SEEK_FAILED", "seek-failed" },
+      { DMAP_STATUS_NUM_ERRORS, "DMAP_STATUS_NUM_ERRORS", "num-errors" },
       { 0, NULL, NULL }
     };
-    etype = g_enum_register_static ("DMAPMdnsBrowserTransportProtocol", values);
+    etype = g_enum_register_static ("DmapError", values);
   }
   return etype;
 }
+
+/* enumerations from "dmap-mdns-browser.h" */
 GType
 dmap_mdns_browser_error_get_type (void)
 {
@@ -109,12 +298,12 @@ dmap_mdns_browser_error_get_type (void)
       { DMAP_MDNS_BROWSER_ERROR_FAILED, "DMAP_MDNS_BROWSER_ERROR_FAILED", "failed" },
       { 0, NULL, NULL }
     };
-    etype = g_enum_register_static ("DMAPMdnsBrowserError", values);
+    etype = g_enum_register_static ("DmapMdnsBrowserError", values);
   }
   return etype;
 }
 
-/* enumerations from "./dmap-mdns-publisher.h" */
+/* enumerations from "dmap-mdns-publisher.h" */
 GType
 dmap_mdns_publisher_error_get_type (void)
 {
@@ -125,12 +314,47 @@ dmap_mdns_publisher_error_get_type (void)
       { DMAP_MDNS_PUBLISHER_ERROR_FAILED, "DMAP_MDNS_PUBLISHER_ERROR_FAILED", "failed" },
       { 0, NULL, NULL }
     };
-    etype = g_enum_register_static ("DMAPMdnsPublisherError", values);
+    etype = g_enum_register_static ("DmapMdnsPublisherError", values);
+  }
+  return etype;
+}
+
+/* enumerations from "dmap-mdns-service.h" */
+GType
+dmap_mdns_service_type_get_type (void)
+{
+  static GType etype = 0;
+  if (etype == 0) {
+    static const GEnumValue values[] = {
+      { DMAP_MDNS_SERVICE_TYPE_INVALID, "DMAP_MDNS_SERVICE_TYPE_INVALID", "invalid" },
+      { DMAP_MDNS_SERVICE_TYPE_DAAP, "DMAP_MDNS_SERVICE_TYPE_DAAP", "daap" },
+      { DMAP_MDNS_SERVICE_TYPE_DPAP, "DMAP_MDNS_SERVICE_TYPE_DPAP", "dpap" },
+      { DMAP_MDNS_SERVICE_TYPE_DACP, "DMAP_MDNS_SERVICE_TYPE_DACP", "dacp" },
+      { DMAP_MDNS_SERVICE_TYPE_RAOP, "DMAP_MDNS_SERVICE_TYPE_RAOP", "raop" },
+      { DMAP_MDNS_SERVICE_TYPE_LAST, "DMAP_MDNS_SERVICE_TYPE_LAST", "last" },
+      { 0, NULL, NULL }
+    };
+    etype = g_enum_register_static ("DmapMdnsServiceType", values);
+  }
+  return etype;
+}
+GType
+dmap_mdns_service_transport_protocol_get_type (void)
+{
+  static GType etype = 0;
+  if (etype == 0) {
+    static const GEnumValue values[] = {
+      { DMAP_MDNS_SERVICE_TRANSPORT_PROTOCOL_TCP, "DMAP_MDNS_SERVICE_TRANSPORT_PROTOCOL_TCP", "tcp" },
+      { DMAP_MDNS_SERVICE_TRANSPORT_PROTOCOL_UDP, "DMAP_MDNS_SERVICE_TRANSPORT_PROTOCOL_UDP", "udp" },
+      { DMAP_MDNS_SERVICE_TRANSPORT_PROTOCOL_LAST, "DMAP_MDNS_SERVICE_TRANSPORT_PROTOCOL_LAST", "last" },
+      { 0, NULL, NULL }
+    };
+    etype = g_enum_register_static ("DmapMdnsServiceTransportProtocol", values);
   }
   return etype;
 }
 
-/* enumerations from "./dmap-record.h" */
+/* enumerations from "dmap-record.h" */
 GType
 dmap_media_kind_get_type (void)
 {
@@ -143,31 +367,24 @@ dmap_media_kind_get_type (void)
       { DMAP_MEDIA_KIND_TV_SHOW, "DMAP_MEDIA_KIND_TV_SHOW", "tv-show" },
       { 0, NULL, NULL }
     };
-    etype = g_enum_register_static ("DMAPMediaKind", values);
+    etype = g_enum_register_static ("DmapMediaKind", values);
   }
   return etype;
 }
 
-/* enumerations from "./dmap-structure.h" */
+/* enumerations from "dmap-share.h" */
 GType
-dmap_type_get_type (void)
+dmap_share_auth_method_get_type (void)
 {
   static GType etype = 0;
   if (etype == 0) {
     static const GEnumValue values[] = {
-      { DMAP_TYPE_BYTE, "DMAP_TYPE_BYTE", "byte" },
-      { DMAP_TYPE_SIGNED_INT, "DMAP_TYPE_SIGNED_INT", "signed-int" },
-      { DMAP_TYPE_SHORT, "DMAP_TYPE_SHORT", "short" },
-      { DMAP_TYPE_INT, "DMAP_TYPE_INT", "int" },
-      { DMAP_TYPE_INT64, "DMAP_TYPE_INT64", "int64" },
-      { DMAP_TYPE_STRING, "DMAP_TYPE_STRING", "string" },
-      { DMAP_TYPE_DATE, "DMAP_TYPE_DATE", "date" },
-      { DMAP_TYPE_VERSION, "DMAP_TYPE_VERSION", "version" },
-      { DMAP_TYPE_CONTAINER, "DMAP_TYPE_CONTAINER", "container" },
-      { DMAP_TYPE_POINTER, "DMAP_TYPE_POINTER", "pointer" },
+      { DMAP_SHARE_AUTH_METHOD_NONE, "DMAP_SHARE_AUTH_METHOD_NONE", "none" },
+      { DMAP_SHARE_AUTH_METHOD_NAME_AND_PASSWORD, "DMAP_SHARE_AUTH_METHOD_NAME_AND_PASSWORD", "name-and-password" },
+      { DMAP_SHARE_AUTH_METHOD_PASSWORD, "DMAP_SHARE_AUTH_METHOD_PASSWORD", "password" },
       { 0, NULL, NULL }
     };
-    etype = g_enum_register_static ("DMAPType", values);
+    etype = g_enum_register_static ("DmapShareAuthMethod", values);
   }
   return etype;
 }
diff --git a/libdmapsharing/dmap-enums.h b/libdmapsharing/dmap-enums.h
index 1d05ceb..35395be 100644
--- a/libdmapsharing/dmap-enums.h
+++ b/libdmapsharing/dmap-enums.h
@@ -3,45 +3,59 @@
 
 /* Automatically generated by glib-mkenums */
 
-#ifndef DMAP_ENUMS_H
-#define DMAP_ENUMS_H
+#ifndef _DMAP_ENUMS_H
+#define _DMAP_ENUMS_H
 
 #include <glib-object.h>
 
 G_BEGIN_DECLS
 
-/* enumerations from "./dacp-player.h" */
-GType dacp_repeat_state_get_type (void) G_GNUC_CONST;
-#define DMAP_TYPE_DACP_REPEAT_STATE (dacp_repeat_state_get_type())
-GType dacp_play_state_get_type (void) G_GNUC_CONST;
-#define DMAP_TYPE_DACP_PLAY_STATE (dacp_play_state_get_type())
+/* enumerations from "dmap-cc.h" */
+GType dmap_content_code_get_type (void) G_GNUC_CONST;
+#define DMAP_TYPE_DMAP_CONTENT_CODE (dmap_content_code_get_type())
 
-/* enumerations from "./dmap-connection.h" */
+/* enumerations from "dmap-connection.h" */
 GType dmap_connection_state_get_type (void) G_GNUC_CONST;
 #define DMAP_TYPE_DMAP_CONNECTION_STATE (dmap_connection_state_get_type())
 
-/* enumerations from "./dmap-mdns-browser.h" */
-GType dmap_mdns_browser_service_type_get_type (void) G_GNUC_CONST;
-#define DMAP_TYPE_DMAP_MDNS_BROWSER_SERVICE_TYPE (dmap_mdns_browser_service_type_get_type())
-GType dmap_mdns_browser_transport_protocol_get_type (void) G_GNUC_CONST;
-#define DMAP_TYPE_DMAP_MDNS_BROWSER_TRANSPORT_PROTOCOL (dmap_mdns_browser_transport_protocol_get_type())
+/* enumerations from "dmap-control-player.h" */
+GType dmap_control_repeat_state_get_type (void) G_GNUC_CONST;
+#define DMAP_TYPE_DMAP_CONTROL_REPEAT_STATE (dmap_control_repeat_state_get_type())
+GType dmap_control_play_state_get_type (void) G_GNUC_CONST;
+#define DMAP_TYPE_DMAP_CONTROL_PLAY_STATE (dmap_control_play_state_get_type())
+
+/* enumerations from "dmap-db.h" */
+GType dmap_db_id_get_type (void) G_GNUC_CONST;
+#define DMAP_TYPE_DMAP_DB_ID (dmap_db_id_get_type())
+
+/* enumerations from "dmap-error.h" */
+GType dmap_error_get_type (void) G_GNUC_CONST;
+#define DMAP_TYPE_DMAP_ERROR (dmap_error_get_type())
+
+/* enumerations from "dmap-mdns-browser.h" */
 GType dmap_mdns_browser_error_get_type (void) G_GNUC_CONST;
 #define DMAP_TYPE_DMAP_MDNS_BROWSER_ERROR (dmap_mdns_browser_error_get_type())
 
-/* enumerations from "./dmap-mdns-publisher.h" */
+/* enumerations from "dmap-mdns-publisher.h" */
 GType dmap_mdns_publisher_error_get_type (void) G_GNUC_CONST;
 #define DMAP_TYPE_DMAP_MDNS_PUBLISHER_ERROR (dmap_mdns_publisher_error_get_type())
 
-/* enumerations from "./dmap-record.h" */
+/* enumerations from "dmap-mdns-service.h" */
+GType dmap_mdns_service_type_get_type (void) G_GNUC_CONST;
+#define DMAP_TYPE_DMAP_MDNS_SERVICE_TYPE (dmap_mdns_service_type_get_type())
+GType dmap_mdns_service_transport_protocol_get_type (void) G_GNUC_CONST;
+#define DMAP_TYPE_DMAP_MDNS_SERVICE_TRANSPORT_PROTOCOL (dmap_mdns_service_transport_protocol_get_type())
+
+/* enumerations from "dmap-record.h" */
 GType dmap_media_kind_get_type (void) G_GNUC_CONST;
 #define DMAP_TYPE_DMAP_MEDIA_KIND (dmap_media_kind_get_type())
 
-/* enumerations from "./dmap-structure.h" */
-GType dmap_type_get_type (void) G_GNUC_CONST;
-#define DMAP_TYPE_DMAP_TYPE (dmap_type_get_type())
+/* enumerations from "dmap-share.h" */
+GType dmap_share_auth_method_get_type (void) G_GNUC_CONST;
+#define DMAP_TYPE_DMAP_SHARE_AUTH_METHOD (dmap_share_auth_method_get_type())
 G_END_DECLS
 
-#endif /* !DMAP_ENUMS_H */
+#endif /* _DMAP_ENUMS_H */
 
 /* Generated data ends here */
 
diff --git a/libdmapsharing/dmap-error.c b/libdmapsharing/dmap-error.c
new file mode 100644
index 0000000..73e41e0
--- /dev/null
+++ b/libdmapsharing/dmap-error.c
@@ -0,0 +1,33 @@
+/*
+ * Error definitions for DMAP sharing
+ *
+ * Copyright (C) 2018 W. Michael Petullo <mike@flyn.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include <libdmapsharing/dmap-error.h>
+
+GQuark
+dmap_error_quark (void)
+{
+	static GQuark quark = 0;
+
+	if (quark == 0) {
+		quark = g_quark_from_static_string ("dmap-error-quark");
+	}
+
+	return quark;
+}
diff --git a/libdmapsharing/dmap-error.h b/libdmapsharing/dmap-error.h
new file mode 100644
index 0000000..dd515a3
--- /dev/null
+++ b/libdmapsharing/dmap-error.h
@@ -0,0 +1,73 @@
+/*
+ * Error definitions for DMAP sharing
+ *
+ * Copyright (C) 2018 W. Michael Petullo <mike@flyn.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#ifndef _DMAP_ERROR_H
+#define _DMAP_ERROR_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+GQuark dmap_error_quark (void);
+
+/**
+ * DMAP_ERROR:
+ *
+ * Error domain for DMAP library. Errors in this domain will
+ * be from the #DmapError enumeration.
+ * See #GError for information on error domains.
+ */
+#define DMAP_ERROR      dmap_error_quark ()
+
+/**
+ * DmapError:
+ * @GST_CORE_ERROR_FAILED: a general error which doesn't fit in any other
+ * category.  Make sure you add a custom message to the error call.
+ *
+ * Errors inside the libdmapsharing library.
+ */
+typedef enum
+{
+	DMAP_STATUS_OK = 0,
+	DMAP_STATUS_FAILED,
+
+	DMAP_STATUS_INVALID_CONTENT_CODE,
+	DMAP_STATUS_INVALID_CONTENT_CODE_SIZE,
+	DMAP_STATUS_RESPONSE_TOO_SHORT,
+
+	DMAP_STATUS_BAD_FORMAT,
+	DMAP_STATUS_BAD_BROWSE_CATEGORY,
+
+	DMAP_STATUS_RECORD_MISSING_FIELD,
+
+	DMAP_STATUS_DB_BAD_ID,
+
+	DMAP_STATUS_OPEN_FAILED,
+	DMAP_STATUS_CLOSE_FAILED,
+	DMAP_STATUS_SEEK_FAILED,
+
+	DMAP_STATUS_NUM_ERRORS,
+} DmapError;
+
+G_END_DECLS
+
+#endif
+
diff --git a/libdmapsharing/dmap-gst-input-stream.h b/libdmapsharing/dmap-gst-input-stream.h
deleted file mode 100644
index 91cc4be..0000000
--- a/libdmapsharing/dmap-gst-input-stream.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * DMAPGstInputStream class: Open a URI using dmap_gst_input_stream_new ().
- * Data is decoded using GStreamer and is then made available by the class's
- * read operations.
- *
- * Copyright (C) 2008 W. Michael Petullo <mike@flyn.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#ifndef __DMAP_GST_INPUT_STREAM
-#define __DMAP_GST_INPUT_STREAM
-
-#include <glib-object.h>
-#include <gio/gio.h>
-
-G_BEGIN_DECLS
-#define DMAP_TYPE_GST_INPUT_STREAM         (dmap_gst_input_stream_get_type ())
-#define DMAP_GST_INPUT_STREAM(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), \
-				               DMAP_TYPE_GST_INPUT_STREAM, \
-					       DMAPGstInputStream))
-#define DMAP_GST_INPUT_STREAM_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), \
-				               DMAP_TYPE_GST_INPUT_STREAM, \
-					       DMAPGstInputStreamClass))
-#define IS_DMAP_GST_INPUT_STREAM(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
-				               DMAP_TYPE_GST_INPUT_STREAM))
-#define IS_DMAP_GST_INPUT_STREAM_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), \
-				               DMAP_TYPE_GST_INPUT_STREAM_CLASS))
-#define DMAP_GST_INPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
-				               DMAP_TYPE_GST_INPUT_STREAM, \
-					       DMAPGstInputStreamClass))
-typedef struct DMAPGstInputStreamPrivate DMAPGstInputStreamPrivate;
-
-typedef struct
-{
-	GInputStream parent;
-	DMAPGstInputStreamPrivate *priv;
-} DMAPGstInputStream;
-
-typedef struct
-{
-	GInputStreamClass parent;
-
-	void (*kill_pipeline) (DMAPGstInputStream *);
-} DMAPGstInputStreamClass;
-
-GType dmap_gst_input_stream_get_type (void);
-
-/* Supported transcode target formats (data read from DMAPGstInputStream
- * will be in one of these formats): */
-enum
-{
-	RAW,			/* No transcoding performed. */
-	WAV16,
-	MP3
-};
-
-GInputStream *dmap_gst_input_stream_new (const gchar * transcode_mimetype,
-					 GInputStream * src_stream);
-
-gchar *dmapd_input_stream_strdup_format_extension (const gint format_code);
-
-G_END_DECLS
-#endif /* __DMAP_GST_INPUT_STREAM */
diff --git a/libdmapsharing/dpap-connection.c b/libdmapsharing/dmap-image-connection.c
similarity index 65%
rename from libdmapsharing/dpap-connection.c
rename to libdmapsharing/dmap-image-connection.c
index 9b22eec..251ee6f 100644
--- a/libdmapsharing/dpap-connection.c
+++ b/libdmapsharing/dmap-image-connection.c
@@ -20,33 +20,34 @@
 
 #include "config.h"
 
-#include <libdmapsharing/dpap-connection.h>
+#include <libdmapsharing/dmap-image-connection.h>
 #include <libdmapsharing/dmap-structure.h>
 
-static DMAPContentCode
-get_protocol_version_cc (G_GNUC_UNUSED DMAPConnection * connection)
+static DmapContentCode
+_get_protocol_version_cc (G_GNUC_UNUSED DmapConnection * connection)
 {
 	return DMAP_CC_PPRO;
 }
 
 static gchar *
-get_query_metadata (G_GNUC_UNUSED DMAPConnection * connection)
+_get_query_metadata (G_GNUC_UNUSED DmapConnection * connection)
 {
 	return g_strdup ("all");
 }
 
-static DMAPRecord *
-handle_mlcl (G_GNUC_UNUSED DMAPConnection * connection, DMAPRecordFactory * factory,
-	     GNode * n, int *item_id)
+static DmapRecord *
+_handle_mlcl (DmapConnection * connection, DmapRecordFactory * factory,
+              GNode * n, int *item_id)
 {
 	GNode *n2;
-	DMAPRecord *record = NULL;
+	GError *error = NULL;
+	DmapRecord *record = NULL;
 	const gchar *filename = NULL;
 	const gchar *aspect_ratio = NULL;
 	const gchar *format = NULL;
 	const gchar *comments = NULL;
 	const gchar *thumbnail = NULL;
-	GByteArray *ptr = NULL;
+	GArray *ptr = NULL;
 	gint creation_date = 0;
 	gint filesize = 0;
 	gint large_filesize = 0;
@@ -55,7 +56,7 @@ handle_mlcl (G_GNUC_UNUSED DMAPConnection * connection, DMAPRecordFactory * fact
 	gint rating = 0;
 
 	for (n2 = n->children; n2; n2 = n2->next) {
-		DMAPStructureItem *meta_item;
+		DmapStructureItem *meta_item;
 
 		meta_item = n2->data;
 
@@ -105,18 +106,28 @@ handle_mlcl (G_GNUC_UNUSED DMAPConnection * connection, DMAPRecordFactory * fact
 		}
 	}
 
-	record = dmap_record_factory_create (factory, NULL);
-	if (record == NULL) {
-		goto _return;
+	record = dmap_record_factory_create (factory, NULL, &error);
+	if (NULL != error) {
+		g_signal_emit_by_name (connection, "error", error);
+		goto done;
 	}
+	g_assert(NULL != record);
 
 	if (filesize) {
-		ptr = g_byte_array_sized_new (filesize);
-		g_byte_array_append (ptr, (guint8 *) thumbnail, filesize);
+		ptr = g_array_sized_new (FALSE, FALSE, 1, filesize);
+		g_array_append_vals (ptr, (guint8 *) thumbnail, filesize);
 	} else {
-		ptr = g_byte_array_sized_new (0);
+		ptr = g_array_sized_new (FALSE, FALSE, 1, 0);
 	}
 
+	/*
+	 * We do not free the dynamically-allocated properties
+	 * here. dmap-connection.c's actual_http_response_handler calls
+	 * dmap_structure_destroy to free the structure containing the
+	 * elements processed here.
+	 *
+	 * TODO: This could probably be made more clear.
+	 */
 	g_object_set (record,
 		      "filename", filename,
 		      "aspect-ratio", aspect_ratio,
@@ -128,35 +139,35 @@ handle_mlcl (G_GNUC_UNUSED DMAPConnection * connection, DMAPRecordFactory * fact
 		      "rating", rating,
 		      "comments", comments, "thumbnail", ptr, NULL);
 
+done:
 	if (ptr) {
-		g_byte_array_unref (ptr);
+		g_array_unref (ptr);
 	}
 
-      _return:
 	return record;
 }
 
 static void
-dpap_connection_class_init (DPAPConnectionClass * klass)
+dmap_image_connection_class_init (DmapImageConnectionClass * klass)
 {
 	GObjectClass *object_class = G_OBJECT_CLASS (klass);
-	DMAPConnectionClass *parent_class =
+	DmapConnectionClass *parent_class =
 		DMAP_CONNECTION_CLASS (object_class);
 
-	parent_class->get_protocol_version_cc = get_protocol_version_cc;
-	parent_class->get_query_metadata = get_query_metadata;
-	parent_class->handle_mlcl = handle_mlcl;
+	parent_class->get_protocol_version_cc = _get_protocol_version_cc;
+	parent_class->get_query_metadata = _get_query_metadata;
+	parent_class->handle_mlcl = _handle_mlcl;
 }
 
-DPAPConnection *
-dpap_connection_new (const char *name,
+DmapImageConnection *
+dmap_image_connection_new (const char *name,
 		     const char *host,
 		     guint port,
-		     DMAPDb * db, DMAPRecordFactory * factory)
+		     DmapDb * db, DmapRecordFactory * factory)
 {
-	DPAPConnection *connection;
+	DmapImageConnection *connection;
 
-	connection = g_object_new (DPAP_TYPE_CONNECTION,
+	connection = g_object_new (DMAP_TYPE_IMAGE_CONNECTION,
 				   "name", name,
 				   "db", db,
 				   "host", host,
@@ -166,8 +177,8 @@ dpap_connection_new (const char *name,
 }
 
 static void
-dpap_connection_init (G_GNUC_UNUSED DPAPConnection * connection)
+dmap_image_connection_init (G_GNUC_UNUSED DmapImageConnection * connection)
 {
 }
 
-G_DEFINE_TYPE (DPAPConnection, dpap_connection, DMAP_TYPE_CONNECTION);
+G_DEFINE_TYPE (DmapImageConnection, dmap_image_connection, DMAP_TYPE_CONNECTION);
diff --git a/libdmapsharing/dmap-image-connection.h b/libdmapsharing/dmap-image-connection.h
new file mode 100644
index 0000000..1559fbf
--- /dev/null
+++ b/libdmapsharing/dmap-image-connection.h
@@ -0,0 +1,99 @@
+/*
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#ifndef _DMAP_IMAGE_CONNECTION_H
+#define _DMAP_IMAGE_CONNECTION_H
+
+#include <glib-object.h>
+
+#include <libdmapsharing/dmap-connection.h>
+#include <libdmapsharing/dmap-db.h>
+
+G_BEGIN_DECLS
+/**
+ * SECTION: dmap-image-connection
+ * @short_description: A DPAP connection.
+ *
+ * #DmapImageConnection objects encapsulate a DPAP connection.
+ */
+
+/**
+ * DMAP_TYPE_IMAGE_CONNECTION:
+ *
+ * The type for #DmapImageConnection.
+ */
+#define DMAP_TYPE_IMAGE_CONNECTION		(dmap_image_connection_get_type ())
+/**
+ * DMAP_IMAGE_CONNECTION:
+ * @o: Object which is subject to casting.
+ *
+ * Casts a #DmapImageConnection or derived pointer into a (DmapImageConnection *) pointer.
+ * Depending on the current debugging level, this function may invoke
+ * certain runtime checks to identify invalid casts.
+ */
+#define DMAP_IMAGE_CONNECTION(o)		(G_TYPE_CHECK_INSTANCE_CAST ((o), DMAP_TYPE_IMAGE_CONNECTION, DmapImageConnection))
+/**
+ * DMAP_IMAGE_CONNECTION_CLASS:
+ * @k: a valid #DmapImageConnectionClass
+ *
+ * Casts a derived #DmapImageConnectionClass structure into a #DmapImageConnectionClass
+ * structure.
+ */
+#define DMAP_IMAGE_CONNECTION_CLASS(k)	(G_TYPE_CHECK_CLASS_CAST((k), DMAP_TYPE_IMAGE_CONNECTION, DmapImageConnectionClass))
+/**
+ * DMAP_IS_IMAGE_CONNECTION:
+ * @o: Instance to check for being a %DMAP_TYPE_IMAGE_CONNECTION.
+ *
+ * Checks whether a valid #GTypeInstance pointer is of type %DMAP_TYPE_IMAGE_CONNECTION.
+ */
+#define DMAP_IS_IMAGE_CONNECTION(o)	(G_TYPE_CHECK_INSTANCE_TYPE ((o), DMAP_TYPE_IMAGE_CONNECTION))
+/**
+ * DMAP_IS_IMAGE_CONNECTION_CLASS:
+ * @k: a #DmapImageConnectionClass
+ *
+ * Checks whether @k "is a" valid #DmapImageConnectionClass structure of type
+ * %DMAP_IMAGE_CONNECTION or derived.
+ */
+#define DMAP_IS_IMAGE_CONNECTION_CLASS(k)	(G_TYPE_CHECK_CLASS_TYPE ((k), DMAP_TYPE_IMAGE_CONNECTION))
+/**
+ * DMAP_IMAGE_CONNECTION_GET_CLASS:
+ * @o: a #DmapImageConnection instance.
+ *
+ * Get the class structure associated to a #DmapImageConnection instance.
+ *
+ * Returns: pointer to object class structure.
+ */
+#define DMAP_IMAGE_CONNECTION_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), DMAP_TYPE_IMAGE_CONNECTION, DmapImageConnectionClass))
+typedef struct DmapImageConnectionPrivate DmapImageConnectionPrivate;
+
+typedef struct {
+	DmapConnectionClass dmap_connection_class;
+} DmapImageConnectionClass;
+
+typedef struct {
+	DmapConnection dmap_connection_instance;
+	DmapImageConnectionPrivate *priv;
+} DmapImageConnection;
+
+GType dmap_image_connection_get_type (void);
+
+DmapImageConnection *dmap_image_connection_new (const char *name,
+				     const char *host,
+				     guint port,
+				     DmapDb * db,
+				     DmapRecordFactory * factory);
+G_END_DECLS
+#endif /* _DMAP_IMAGE_CONNECTION_H */
diff --git a/libdmapsharing/dpap-record.c b/libdmapsharing/dmap-image-record.c
similarity index 80%
rename from libdmapsharing/dpap-record.c
rename to libdmapsharing/dmap-image-record.c
index c793277..06ffa1c 100644
--- a/libdmapsharing/dpap-record.c
+++ b/libdmapsharing/dmap-image-record.c
@@ -19,17 +19,13 @@
  */
 
 #include <libdmapsharing/dmap-record.h>
-#include <libdmapsharing/dpap-record.h>
-
-static gint dpap_record_init_count = 0;
+#include <libdmapsharing/dmap-image-record.h>
 
 static void
-dpap_record_init (DPAPRecordIface * iface)
+dmap_image_record_default_init (DmapImageRecordInterface * iface)
 {
 	static gboolean is_initialized = FALSE;
 
-	dpap_record_init_count++;
-
 	if (!is_initialized) {
 		g_object_interface_install_property (iface,
 						     g_param_spec_string
@@ -40,10 +36,11 @@ dpap_record_init (DPAPRecordIface * iface)
 						      G_PARAM_READWRITE));
 
 		g_object_interface_install_property (iface,
-						     g_param_spec_pointer
+						     g_param_spec_boxed
 						     ("hash",
 						      "Hash of media file contents",
 						      "Hash of media file contents",
+		                                      G_TYPE_ARRAY,
 						      G_PARAM_READWRITE));
 
 		/* iTunes does not require to this to match the datatype for the image
@@ -81,10 +78,11 @@ dpap_record_init (DPAPRecordIface * iface)
 						      G_PARAM_READWRITE));
 
 		g_object_interface_install_property (iface,
-						     g_param_spec_pointer
+						     g_param_spec_boxed
 						     ("thumbnail",
 						      "Photo thumbnail",
 						      "Photo thumbnail",
+		                                      G_TYPE_ARRAY,
 						      G_PARAM_READWRITE));
 
 		g_object_interface_install_property (iface,
@@ -131,34 +129,10 @@ dpap_record_init (DPAPRecordIface * iface)
 	}
 }
 
-static void
-dpap_record_finalize (G_GNUC_UNUSED DPAPRecordIface * iface)
-{
-	dpap_record_init_count--;
-}
-
-/* FIXME: No G_DEFINE_INTERFACE available in GObject headers: */
-GType
-dpap_record_get_type (void)
-{
-	static GType object_type = 0;
-
-	if (!object_type) {
-		static const GTypeInfo object_info = {
-			class_size:     sizeof (DPAPRecordIface),
-			base_init:     (GBaseInitFunc) dpap_record_init,
-			base_finalize: (GBaseFinalizeFunc) dpap_record_finalize
-		};
-		object_type =
-			g_type_register_static (G_TYPE_INTERFACE,
-						"DPAPRecord",
-						&object_info, 0);
-	}
-	return object_type;
-}
+G_DEFINE_INTERFACE(DmapImageRecord, dmap_image_record, G_TYPE_OBJECT)
 
 GInputStream *
-dpap_record_read (DPAPRecord * record, GError ** err)
+dmap_image_record_read (DmapImageRecord * record, GError ** err)
 {
-	return DPAP_RECORD_GET_INTERFACE (record)->read (record, err);
+	return DMAP_IMAGE_RECORD_GET_INTERFACE (record)->read (record, err);
 }
diff --git a/libdmapsharing/dmap-image-record.h b/libdmapsharing/dmap-image-record.h
new file mode 100644
index 0000000..0bafda7
--- /dev/null
+++ b/libdmapsharing/dmap-image-record.h
@@ -0,0 +1,95 @@
+/*
+ *  Database record interface for DPAP sharing
+ *
+ *  Copyright (C) 2008 W. Michael Petullo <mike@flyn.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#ifndef _DMAP_IMAGE_RECORD_H
+#define _DMAP_IMAGE_RECORD_H
+
+#include <glib.h>
+#include <gio/gio.h>
+
+#include <libdmapsharing/dmap-record.h>
+
+G_BEGIN_DECLS
+/**
+ * SECTION: dmap-image-record
+ * @short_description: The description of an item shared using DPAP.
+ *
+ * #DmapImageRecord objects encapsulate the description of an item shared using DPAP.
+ */
+
+/**
+ * DMAP_TYPE_IMAGE_RECORD:
+ *
+ * The type for #DmapImageRecord.
+ */
+#define DMAP_TYPE_IMAGE_RECORD	     (dmap_image_record_get_type ())
+/**
+ * DMAP_IMAGE_RECORD:
+ * @o: Object which is subject to casting.
+ *
+ * Casts a #DmapImageRecord or derived pointer into a (DmapImageRecord *) pointer.
+ * Depending on the current debugging level, this function may invoke
+ * certain runtime checks to identify invalid casts.
+ */
+#define DMAP_IMAGE_RECORD(o)		     (G_TYPE_CHECK_INSTANCE_CAST ((o), \
+				      DMAP_TYPE_IMAGE_RECORD, DmapImageRecord))
+/**
+ * DMAP_IS_IMAGE_RECORD:
+ * @o: Instance to check for being a %DMAP_TYPE_IMAGE_RECORD.
+ *
+ * Checks whether a valid #GTypeInstance pointer is of type %DMAP_TYPE_IMAGE_RECORD.
+ */
+#define DMAP_IS_IMAGE_RECORD(o)	     (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
+				      DMAP_TYPE_IMAGE_RECORD))
+/**
+ * DMAP_IMAGE_RECORD_GET_INTERFACE:
+ * @o: a #DmapImageRecord instance.
+ *
+ * Get the class structure associated to a #DmapImageRecord instance.
+ *
+ * Returns: pointer to object interface structure.
+ */
+#define DMAP_IMAGE_RECORD_GET_INTERFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), \
+				      DMAP_TYPE_IMAGE_RECORD, DmapImageRecordInterface))
+typedef struct _DmapImageRecord DmapImageRecord;
+typedef struct _DmapImageRecordInterface DmapImageRecordInterface;
+
+struct _DmapImageRecordInterface
+{
+	GTypeInterface parent;
+
+	GInputStream *(*read) (DmapImageRecord * record, GError ** err);
+};
+
+GType dmap_image_record_get_type (void);
+
+/**
+ * dmap_image_record_read:
+ * @record: a DmapImageRecord.
+ * @err: a GError.
+ *
+ * Returns: (transfer full): a GInputStream that provides read-only access to the data stream
+ * associated with record.
+ */
+GInputStream *dmap_image_record_read (DmapImageRecord * record, GError ** err);
+
+#endif /* _DMAP_IMAGE_RECORD_H */
+
+G_END_DECLS
diff --git a/libdmapsharing/dpap-share.c b/libdmapsharing/dmap-image-share.c
similarity index 53%
rename from libdmapsharing/dpap-share.c
rename to libdmapsharing/dmap-image-share.c
index d3394b3..85d3f0b 100644
--- a/libdmapsharing/dpap-share.c
+++ b/libdmapsharing/dmap-image-share.c
@@ -35,243 +35,26 @@
 #include <fcntl.h>
 
 #include <libsoup/soup.h>
-#include <libsoup/soup-address.h>
-#include <libsoup/soup-message.h>
-#include <libsoup/soup-uri.h>
-#include <libsoup/soup-server.h>
 
 #include <libdmapsharing/dmap.h>
+#include <libdmapsharing/dmap-share-private.h>
 #include <libdmapsharing/dmap-private-utils.h>
 #include <libdmapsharing/dmap-structure.h>
 
-static void dpap_share_set_property (GObject * object,
-				     guint prop_id,
-				     const GValue * value,
-				     GParamSpec * pspec);
-static void dpap_share_get_property (GObject * object,
-				     guint prop_id,
-				     GValue * value, GParamSpec * pspec);
-static void dpap_share_dispose (GObject * object);
-guint dpap_share_get_desired_port (DMAPShare * share);
-const char *dpap_share_get_type_of_service (DMAPShare * share);
-void dpap_share_server_info (DMAPShare * share,
-			     SoupServer * server,
-			     SoupMessage * message,
-			     const char *path,
-			     GHashTable * query, SoupClientContext * context);
-void dpap_share_message_add_standard_headers (DMAPShare * share,
-					      SoupMessage * message);
-static void databases_browse_xxx (DMAPShare * share,
-				  SoupServer * server,
-				  SoupMessage * msg,
-				  const char *path,
-				  GHashTable * query,
-				  SoupClientContext * context);
-static void databases_items_xxx (DMAPShare * share,
-				 SoupServer * server,
-				 SoupMessage * msg,
-				 const char *path,
-				 GHashTable * query,
-				 SoupClientContext * context);
-static struct DMAPMetaDataMap *get_meta_data_map (DMAPShare * share);
-static void add_entry_to_mlcl (gpointer id, DMAPRecord * record, gpointer mb);
+static guint _get_desired_port (DmapShare * share);
+static const char *_get_type_of_service (DmapShare * share);
+static void _server_info (DmapShare * share, SoupServerMessage * message, const char *path);
+static void _message_add_standard_headers (DmapShare * share, SoupServerMessage * message);
 
 #define DPAP_TYPE_OF_SERVICE "_dpap._tcp"
 #define DPAP_PORT 8770
 
-struct DPAPSharePrivate
+struct DmapImageSharePrivate
 {
 	gchar unused;
 };
 
-/* Mmap'ed full image file. Global so that it may be free'ed in a different
- * function call that the one that set it up.
- */
-static GMappedFile *mapped_file = NULL;
-
-enum
-{
-	PROP_0,
-};
-
-G_DEFINE_TYPE_WITH_PRIVATE (DPAPShare, dpap_share, DMAP_TYPE_SHARE);
-
-static void
-dpap_share_class_init (DPAPShareClass * klass)
-{
-	GObjectClass *object_class = G_OBJECT_CLASS (klass);
-	DMAPShareClass *parent_class = DMAP_SHARE_CLASS (object_class);
-
-	object_class->get_property = dpap_share_get_property;
-	object_class->set_property = dpap_share_set_property;
-	object_class->dispose = dpap_share_dispose;
-
-	parent_class->get_desired_port = dpap_share_get_desired_port;
-	parent_class->get_type_of_service = dpap_share_get_type_of_service;
-	parent_class->message_add_standard_headers =
-		dpap_share_message_add_standard_headers;
-	parent_class->get_meta_data_map = get_meta_data_map;
-	parent_class->add_entry_to_mlcl = add_entry_to_mlcl;
-	parent_class->databases_browse_xxx = databases_browse_xxx;
-	parent_class->databases_items_xxx = databases_items_xxx;
-	parent_class->server_info = dpap_share_server_info;
-}
-
-static void
-dpap_share_init (DPAPShare * share)
-{
-	/* FIXME: do I need to manually call parent _init? */
-	share->priv = dpap_share_get_instance_private(share);
-}
-
-static void
-dpap_share_set_property (GObject * object,
-			 guint prop_id,
-			 G_GNUC_UNUSED const GValue * value,
-                         GParamSpec * pspec)
-{
-	// DPAPShare *share = DPAP_SHARE (object);
-
-	switch (prop_id) {
-		/* FIXME: */
-	default:
-		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-		break;
-	}
-}
-
-static void
-dpap_share_get_property (GObject * object, guint prop_id,
-                         G_GNUC_UNUSED GValue * value, GParamSpec * pspec)
-{
-	// DPAPShare *share = DPAP_SHARE (object);
-
-	switch (prop_id) {
-	default:
-		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-		break;
-	}
-}
-
-static void
-dpap_share_dispose (G_GNUC_UNUSED GObject * object)
-{
-	/* FIXME: implement in parent */
-}
-
-/* FIXME: trancode_mimetype currently not used for DPAP, only DAAP. 
- *        Threrfore, it is not passed to g_object_new.
- */
-DPAPShare *
-dpap_share_new (const char *name,
-		const char *password,
-		gpointer db,
-		gpointer container_db,
-                G_GNUC_UNUSED gchar * transcode_mimetype)
-{
-	DPAPShare *share;
-
-	share = DPAP_SHARE (g_object_new (DPAP_TYPE_SHARE,
-					  "name", name,
-					  "password", password,
-					  "db", db,
-					  "container-db", container_db,
-					  NULL));
-
-	_dmap_share_server_start (DMAP_SHARE (share));
-	_dmap_share_publish_start (DMAP_SHARE (share));
-
-	return share;
-}
-
-void
-dpap_share_message_add_standard_headers (G_GNUC_UNUSED DMAPShare * share,
-					 SoupMessage * message)
-{
-	soup_message_headers_append (message->response_headers, "DPAP-Server",
-				     "libdmapsharing" VERSION);
-}
-
-#define DMAP_VERSION 2.0
-#define DPAP_VERSION 1.1
-#define DPAP_TIMEOUT 1800
-
-guint
-dpap_share_get_desired_port (G_GNUC_UNUSED DMAPShare * share)
-{
-	return DPAP_PORT;
-}
-
-const char *
-dpap_share_get_type_of_service (G_GNUC_UNUSED DMAPShare * share)
-{
-	return DPAP_TYPE_OF_SERVICE;
-}
-
-void
-dpap_share_server_info (DMAPShare * share,
-			G_GNUC_UNUSED SoupServer * server,
-			SoupMessage * message,
-			const char *path,
-			G_GNUC_UNUSED GHashTable * query,
-                        G_GNUC_UNUSED SoupClientContext * context)
-{
-/* MSRV	server info response
- * 	MSTT status
- * 	MPRO dpap version
- * 	PPRO dpap version
- * 	MINM name
- * 	MSAU authentication method
- * 	MSLR login required
- * 	MSTM timeout interval
- * 	MSAL supports auto logout
- * 	MSUP supports update
- * 	MSPI supports persistent ids
- * 	MSEX supports extensions
- * 	MSBR supports browse
- * 	MSQY supports query
- * 	MSIX supports index
- * 	MSRS supports resolve
- * 	MSDC databases count
- */
-	gchar *nameprop;
-	GNode *msrv;
-
-	g_debug ("Path is %s.", path);
-
-	g_object_get ((gpointer) share, "name", &nameprop, NULL);
-
-	msrv = dmap_structure_add (NULL, DMAP_CC_MSRV);
-	dmap_structure_add (msrv, DMAP_CC_MSTT, (gint32) DMAP_STATUS_OK);
-	dmap_structure_add (msrv, DMAP_CC_MPRO, (gdouble) DMAP_VERSION);
-	dmap_structure_add (msrv, DMAP_CC_PPRO, (gdouble) DPAP_VERSION);
-	dmap_structure_add (msrv, DMAP_CC_MINM, nameprop);
-	/*dmap_structure_add (msrv, DMAP_CC_MSAU, _dmap_share_get_auth_method (share)); */
-	/* authentication method
-	 * 0 is nothing
-	 * 1 is name & password
-	 * 2 is password only
-	 */
-	dmap_structure_add (msrv, DMAP_CC_MSLR, 0);
-	dmap_structure_add (msrv, DMAP_CC_MSTM, (gint32) DPAP_TIMEOUT);
-	dmap_structure_add (msrv, DMAP_CC_MSAL, (gchar) 0);
-	/*dmap_structure_add (msrv, DMAP_CC_MSUP, (gchar) 1);
-	 *dmap_structure_add (msrv, DMAP_CC_MSPI, (gchar) 0);
-	 *dmap_structure_add (msrv, DMAP_CC_MSEX, (gchar) 0);
-	 *dmap_structure_add (msrv, DMAP_CC_MSBR, (gchar) 0);
-	 *dmap_structure_add (msrv, DMAP_CC_MSQY, (gchar) 0); */
-	dmap_structure_add (msrv, DMAP_CC_MSIX, (gchar) 0);
-	/* dmap_structure_add (msrv, DMAP_CC_MSRS, (gchar) 0); */
-	dmap_structure_add (msrv, DMAP_CC_MSDC, (gint32) 1);
-
-	_dmap_share_message_set_from_dmap_structure (share, message, msrv);
-	dmap_structure_destroy (msrv);
-
-	g_free (nameprop);
-}
-
-typedef enum
-{
+typedef enum {
 	ITEM_ID = 0,
 	ITEM_NAME,
 	ITEM_KIND,
@@ -292,7 +75,7 @@ typedef enum
 	PHOTO_IMAGECOMMENTS
 } DPAPMetaData;
 
-static struct DMAPMetaDataMap meta_data_map[] = {
+static struct DmapMetaDataMap _meta_data_map[] = {
 	{"dmap.itemid", ITEM_ID},
 	{"dmap.itemname", ITEM_NAME},
 	{"dmap.itemkind", ITEM_KIND},
@@ -316,12 +99,27 @@ static struct DMAPMetaDataMap meta_data_map[] = {
 
 #define DPAP_ITEM_KIND_PHOTO 3	/* This is the constant that dpap-sharp uses. */
 
+/* Mmap'ed full image file. Global so that it may be free'ed in a different
+ * function call that the one that set it up.
+ */
+static GMappedFile *_mapped_file = NULL;
+
+G_DEFINE_TYPE_WITH_PRIVATE (DmapImageShare,
+                            dmap_image_share,
+                            DMAP_TYPE_SHARE);
+
+static struct DmapMetaDataMap *
+_get_meta_data_map (G_GNUC_UNUSED DmapShare * share)
+{
+	return _meta_data_map;
+}
+
 static GMappedFile *
-file_to_mmap (const char *location)
+_file_to_mmap (const char *location)
 {
 	GFile *file;
 	GMappedFile *mapped_file = NULL;
-	char *path;
+	char *path = NULL;
 	GError *error = NULL;
 
 	file = g_file_new_for_uri (location);
@@ -333,7 +131,7 @@ file_to_mmap (const char *location)
 	if (path == NULL) {
 		g_warning ("Couldn't mmap %s: couldn't get path", path);
 		g_object_unref (file);
-		return mapped_file;
+		goto done;
 	}
 	g_object_unref (file);
 
@@ -342,37 +140,45 @@ file_to_mmap (const char *location)
 		g_warning ("Unable to map file %s: %s", path, error->message);
 	}
 
+done:
 	g_free (path);
+
 	return mapped_file;
 }
 
 static void
-add_entry_to_mlcl (gpointer id, DMAPRecord * record, gpointer _mb)
+_add_entry_to_mlcl (guint id, DmapRecord * record, gpointer _mb)
 {
 	GNode *mlit;
-	struct MLCL_Bits *mb = (struct MLCL_Bits *) _mb;
+	struct DmapMlclBits *mb = (struct DmapMlclBits *) _mb;
 
 	mlit = dmap_structure_add (mb->mlcl, DMAP_CC_MLIT);
 
-	if (_dmap_share_client_requested (mb->bits, ITEM_KIND))
+	if (dmap_share_client_requested (mb->bits, ITEM_KIND)) {
 		dmap_structure_add (mlit, DMAP_CC_MIKD,
 				    (gchar) DPAP_ITEM_KIND_PHOTO);
-	if (_dmap_share_client_requested (mb->bits, ITEM_ID))
-		dmap_structure_add (mlit, DMAP_CC_MIID,
-				    GPOINTER_TO_UINT (id));
-	if (_dmap_share_client_requested (mb->bits, ITEM_NAME)) {
+	}
+
+	if (dmap_share_client_requested (mb->bits, ITEM_ID)) {
+		dmap_structure_add (mlit, DMAP_CC_MIID, id);
+	}
+
+	if (dmap_share_client_requested (mb->bits, ITEM_NAME)) {
 		gchar *filename = NULL;
 
 		g_object_get (record, "filename", &filename, NULL);
 		if (filename) {
 			dmap_structure_add (mlit, DMAP_CC_MINM, filename);
 			g_free (filename);
-		} else
+		} else {
 			g_debug ("Filename requested but not available");
+		}
+	}
+
+	if (dmap_share_client_requested (mb->bits, PERSISTENT_ID)) {
+		dmap_structure_add (mlit, DMAP_CC_MPER, id);
 	}
-	if (_dmap_share_client_requested (mb->bits, PERSISTENT_ID))
-		dmap_structure_add (mlit, DMAP_CC_MPER,
-				    GPOINTER_TO_UINT (id));
+
 	if (TRUE) {
 		/* dpap-sharp claims iPhoto '08 will not show thumbnails without PASP
 		 * and this does seem to be the case when testing. */
@@ -382,84 +188,102 @@ add_entry_to_mlcl (gpointer id, DMAPRecord * record, gpointer _mb)
 		if (aspect_ratio) {
 			dmap_structure_add (mlit, DMAP_CC_PASP, aspect_ratio);
 			g_free (aspect_ratio);
-		} else
+		} else {
 			g_debug
 				("Aspect ratio requested but not available");
+		}
 	}
-	if (_dmap_share_client_requested (mb->bits, PHOTO_CREATIONDATE)) {
+
+	if (dmap_share_client_requested (mb->bits, PHOTO_CREATIONDATE)) {
 		gint creation_date = 0;
 
 		g_object_get (record, "creation-date", &creation_date, NULL);
 		dmap_structure_add (mlit, DMAP_CC_PICD, creation_date);
 	}
-	if (_dmap_share_client_requested (mb->bits, PHOTO_IMAGEFILENAME)) {
+
+	if (dmap_share_client_requested (mb->bits, PHOTO_IMAGEFILENAME)) {
 		gchar *filename = NULL;
 
 		g_object_get (record, "filename", &filename, NULL);
 		if (filename) {
 			dmap_structure_add (mlit, DMAP_CC_PIMF, filename);
 			g_free (filename);
-		} else
+		} else {
 			g_debug ("Filename requested but not available");
+		}
 	}
-	if (_dmap_share_client_requested (mb->bits, PHOTO_IMAGEFORMAT)) {
+
+	if (dmap_share_client_requested (mb->bits, PHOTO_IMAGEFORMAT)) {
 		gchar *format = NULL;
 
 		g_object_get (record, "format", &format, NULL);
 		if (format) {
 			dmap_structure_add (mlit, DMAP_CC_PFMT, format);
 			g_free (format);
-		} else
+		} else {
 			g_debug ("Format requested but not available");
+		}
 	}
-	if (_dmap_share_client_requested (mb->bits, PHOTO_IMAGEFILESIZE)) {
-		GByteArray *thumbnail = NULL;
+
+	if (dmap_share_client_requested (mb->bits, PHOTO_IMAGEFILESIZE)) {
+		GArray *thumbnail = NULL;
 
 		g_object_get (record, "thumbnail", &thumbnail, NULL);
-		dmap_structure_add (mlit, DMAP_CC_PIFS,
-				    thumbnail ? thumbnail->len : 0);
+		if (thumbnail) {
+			dmap_structure_add (mlit, DMAP_CC_PIFS, thumbnail->len);
+			g_array_unref(thumbnail);
+		} else {
+			dmap_structure_add (mlit, DMAP_CC_PIFS, 0);
+		}
 	}
-	if (_dmap_share_client_requested (mb->bits, PHOTO_IMAGELARGEFILESIZE)) {
+
+	if (dmap_share_client_requested (mb->bits, PHOTO_IMAGELARGEFILESIZE)) {
 		gint large_filesize = 0;
 
 		g_object_get (record, "large-filesize", &large_filesize,
 			      NULL);
 		dmap_structure_add (mlit, DMAP_CC_PLSZ, large_filesize);
 	}
-	if (_dmap_share_client_requested (mb->bits, PHOTO_IMAGEPIXELHEIGHT)) {
+
+	if (dmap_share_client_requested (mb->bits, PHOTO_IMAGEPIXELHEIGHT)) {
 		gint pixel_height = 0;
 
 		g_object_get (record, "pixel-height", &pixel_height, NULL);
 		dmap_structure_add (mlit, DMAP_CC_PHGT, pixel_height);
 	}
-	if (_dmap_share_client_requested (mb->bits, PHOTO_IMAGEPIXELWIDTH)) {
+
+	if (dmap_share_client_requested (mb->bits, PHOTO_IMAGEPIXELWIDTH)) {
 		gint pixel_width = 0;
 
 		g_object_get (record, "pixel-width", &pixel_width, NULL);
 		dmap_structure_add (mlit, DMAP_CC_PWTH, pixel_width);
 	}
-	if (_dmap_share_client_requested (mb->bits, PHOTO_IMAGERATING)) {
+
+	if (dmap_share_client_requested (mb->bits, PHOTO_IMAGERATING)) {
 		gint rating = 0;
 
 		g_object_get (record, "rating", &rating, NULL);
 		dmap_structure_add (mlit, DMAP_CC_PRAT, rating);
 	}
-	if (_dmap_share_client_requested (mb->bits, PHOTO_IMAGECOMMENTS)) {
+
+	if (dmap_share_client_requested (mb->bits, PHOTO_IMAGECOMMENTS)) {
 		gchar *comments = NULL;
 
 		g_object_get (record, "comments", &comments, NULL);
 		if (comments) {
 			dmap_structure_add (mlit, DMAP_CC_PCMT, comments);
 			g_free (comments);
-		} else
+		} else {
 			g_debug ("Comments requested but not available");
+		}
 	}
-	if (_dmap_share_client_requested (mb->bits, PHOTO_FILEDATA)) {
+
+	if (dmap_share_client_requested (mb->bits, PHOTO_FILEDATA)) {
 		size_t size = 0;
-		unsigned char *data = NULL;
-		GByteArray *thumbnail = NULL;
+		char *data = NULL;
+		GArray *thumbnail = NULL;
 
-		if (_dmap_share_client_requested (mb->bits, PHOTO_THUMB)) {
+		if (dmap_share_client_requested (mb->bits, PHOTO_THUMB)) {
 			g_object_get (record, "thumbnail", &thumbnail, NULL);
 			if (thumbnail) {
 				data = thumbnail->data;
@@ -473,22 +297,21 @@ add_entry_to_mlcl (gpointer id, DMAPRecord * record, gpointer _mb)
 			char *location = NULL;
 
 			g_object_get (record, "location", &location, NULL);
-			if (mapped_file) {
+			if (_mapped_file) {
 				/* Free any previously mapped image */
-				g_mapped_file_unref (mapped_file);
-				mapped_file = NULL;
+				g_mapped_file_unref (_mapped_file);
+				_mapped_file = NULL;
 			}
 
-			mapped_file = file_to_mmap (location);
-			if (mapped_file == NULL) {
+			_mapped_file = _file_to_mmap (location);
+			if (_mapped_file == NULL) {
 				g_warning ("Error opening %s", location);
 				data = NULL;
 				size = 0;
 			} else {
-				data = (unsigned char *)
-					g_mapped_file_get_contents
-					(mapped_file);
-				size = g_mapped_file_get_length (mapped_file);
+				data = (char *)
+					g_mapped_file_get_contents (_mapped_file);
+				size = g_mapped_file_get_length (_mapped_file);
 			}
 			g_free (location);
 		}
@@ -497,38 +320,37 @@ add_entry_to_mlcl (gpointer id, DMAPRecord * record, gpointer _mb)
 }
 
 static void
-databases_browse_xxx (G_GNUC_UNUSED DMAPShare * share,
-		      G_GNUC_UNUSED SoupServer * server,
-		      G_GNUC_UNUSED SoupMessage * msg,
-		      const char *path,
-		      G_GNUC_UNUSED GHashTable * query,
-                      G_GNUC_UNUSED SoupClientContext * context)
+_databases_browse_xxx (G_GNUC_UNUSED DmapShare * share,
+                       G_GNUC_UNUSED SoupServerMessage * msg,
+                       const char *path,
+                       G_GNUC_UNUSED GHashTable *query)
 {
-	g_warning ("Unhandled: %s\n", path);
+	g_warning ("Unhandled: %s", path);
 }
 
 static void
-send_chunked_file (SoupServer * server, SoupMessage * message,
-		   DPAPRecord * record, guint64 filesize)
+_send_chunked_file (SoupServer * server, SoupServerMessage * message,
+                    DmapImageRecord * record, guint64 filesize)
 {
 	GInputStream *stream;
-	const char *location;
+	char *location = NULL;
 	GError *error = NULL;
 	ChunkData *cd = g_new0 (ChunkData, 1);
+	SoupMessageHeaders *headers = NULL;
 
 	g_object_get (record, "location", &location, NULL);
 
 	cd->server = server;
 
-	stream = G_INPUT_STREAM (dpap_record_read (record, &error));
+	stream = G_INPUT_STREAM (dmap_image_record_read (record, &error));
 
 	if (error != NULL) {
 		g_warning ("Couldn't open %s: %s.", location, error->message);
 		g_error_free (error);
-		soup_message_set_status (message,
-					 SOUP_STATUS_INTERNAL_SERVER_ERROR);
+		soup_server_message_set_status (message,
+					 SOUP_STATUS_INTERNAL_SERVER_ERROR, NULL);
 		g_free (cd);
-		return;
+		goto done;
 	}
 
 	cd->stream = stream;
@@ -536,63 +358,182 @@ send_chunked_file (SoupServer * server, SoupMessage * message,
 	if (cd->stream == NULL) {
 		g_warning ("Could not set up input stream");
 		g_free (cd);
-		return;
+		goto done;
 	}
 
-	soup_message_headers_set_encoding (message->response_headers,
-					   SOUP_ENCODING_CONTENT_LENGTH);
-	soup_message_headers_set_content_length (message->response_headers,
-						 filesize);
+	headers = soup_server_message_get_response_headers(message);
+
+	soup_message_headers_set_encoding (headers, SOUP_ENCODING_CONTENT_LENGTH);
+	soup_message_headers_set_content_length (headers, filesize);
 
-	soup_message_headers_append (message->response_headers, "Connection",
-				     "Close");
-	soup_message_headers_append (message->response_headers,
-				     "Content-Type",
-				     "application/x-dmap-tagged");
+	soup_message_headers_append (headers, "Connection", "Close");
+	soup_message_headers_append (headers, "Content-Type", "application/x-dmap-tagged");
 
 	g_signal_connect (message, "wrote_headers",
-			  G_CALLBACK (dmap_write_next_chunk), cd);
+			  G_CALLBACK (dmap_private_utils_write_next_chunk), cd);
 	g_signal_connect (message, "wrote_chunk",
-			  G_CALLBACK (dmap_write_next_chunk), cd);
+			  G_CALLBACK (dmap_private_utils_write_next_chunk), cd);
 	g_signal_connect (message, "finished",
-			  G_CALLBACK (dmap_chunked_message_finished), cd);
+			  G_CALLBACK (dmap_private_utils_chunked_message_finished), cd);
 	/* NOTE: cd g_free'd by chunked_message_finished(). */
+
+done:
+	g_free(location);
 }
 
 static void
-databases_items_xxx (DMAPShare * share,
-		     SoupServer * server,
-		     SoupMessage * msg,
-		     const char *path,
-		     G_GNUC_UNUSED GHashTable * query,
-                     G_GNUC_UNUSED SoupClientContext * context)
+_databases_items_xxx (DmapShare * share,
+                      SoupServer * server,
+                      SoupServerMessage * msg,
+                      const char *path)
 {
-	DMAPDb *db;
+	DmapDb *db = NULL;
 	const gchar *rest_of_path;
 	const gchar *id_str;
 	guint id;
-	guint64 filesize;
-	DPAPRecord *record;
+	guint64 filesize = 0;
+	DmapImageRecord *record;
 
 	rest_of_path = strchr (path + 1, '/');
 	id_str = rest_of_path + 9;
 	id = strtoul (id_str, NULL, 10);
 
 	g_object_get (share, "db", &db, NULL);
-	record = DPAP_RECORD (dmap_db_lookup_by_id (db, id));
+	record = DMAP_IMAGE_RECORD (dmap_db_lookup_by_id (db, id));
 	g_object_get (record, "large-filesize", &filesize, NULL);
 
 	DMAP_SHARE_GET_CLASS (share)->message_add_standard_headers
 		(share, msg);
-	soup_message_set_status (msg, SOUP_STATUS_OK);
+	soup_server_message_set_status (msg, SOUP_STATUS_OK, NULL);
 
-	send_chunked_file (server, msg, record, filesize);
+	_send_chunked_file (server, msg, record, filesize);
 
 	g_object_unref (record);
 }
 
-static struct DMAPMetaDataMap *
-get_meta_data_map (G_GNUC_UNUSED DMAPShare * share)
+static void
+dmap_image_share_class_init (DmapImageShareClass * klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+	DmapShareClass *parent_class = DMAP_SHARE_CLASS (object_class);
+
+	parent_class->get_desired_port = _get_desired_port;
+	parent_class->get_type_of_service = _get_type_of_service;
+	parent_class->message_add_standard_headers = _message_add_standard_headers;
+	parent_class->get_meta_data_map = _get_meta_data_map;
+	parent_class->add_entry_to_mlcl = _add_entry_to_mlcl;
+	parent_class->databases_browse_xxx = _databases_browse_xxx;
+	parent_class->databases_items_xxx = _databases_items_xxx;
+	parent_class->server_info = _server_info;
+}
+
+static void
+dmap_image_share_init (DmapImageShare * share)
+{
+	/* FIXME: do I need to manually call parent _init? */
+	share->priv = dmap_image_share_get_instance_private(share);
+}
+
+/* FIXME: trancode_mimetype currently not used for DPAP, only DAAP. 
+ *        Threrfore, it is not passed to g_object_new.
+ */
+DmapImageShare *
+dmap_image_share_new (const char *name,
+                      const char *password,
+                      gpointer db,
+                      gpointer container_db,
+                      G_GNUC_UNUSED gchar * transcode_mimetype)
+{
+	g_object_ref (db);
+	g_object_ref (container_db);
+
+	return DMAP_IMAGE_SHARE (g_object_new (DMAP_TYPE_IMAGE_SHARE,
+	                                      "name", name,
+	                                      "password", password,
+	                                      "db", db,
+	                                      "container-db", container_db,
+	                                       NULL));
+}
+
+static void
+_message_add_standard_headers (G_GNUC_UNUSED DmapShare * share, SoupServerMessage * message)
+{
+	soup_message_headers_append (
+		soup_server_message_get_response_headers(message),
+		"DPAP-Server",
+		"libdmapsharing" VERSION
+	);
+}
+
+#define DMAP_VERSION 2.0
+#define DPAP_VERSION 1.1
+#define DPAP_TIMEOUT 1800
+
+static guint
+_get_desired_port (G_GNUC_UNUSED DmapShare * share)
+{
+	return DPAP_PORT;
+}
+
+static const char *
+_get_type_of_service (G_GNUC_UNUSED DmapShare * share)
 {
-	return meta_data_map;
+	return DPAP_TYPE_OF_SERVICE;
+}
+
+static void
+_server_info (DmapShare * share, SoupServerMessage * message, const char *path)
+{
+/* MSRV	server info response
+ * 	MSTT status
+ * 	MPRO dpap version
+ * 	PPRO dpap version
+ * 	MINM name
+ * 	MSAU authentication method
+ * 	MSLR login required
+ * 	MSTM timeout interval
+ * 	MSAL supports auto logout
+ * 	MSUP supports update
+ * 	MSPI supports persistent ids
+ * 	MSEX supports extensions
+ * 	MSBR supports browse
+ * 	MSQY supports query
+ * 	MSIX supports index
+ * 	MSRS supports resolve
+ * 	MSDC databases count
+ */
+	gchar *nameprop;
+	GNode *msrv;
+
+	g_debug ("Path is %s.", path);
+
+	g_object_get ((gpointer) share, "name", &nameprop, NULL);
+
+	msrv = dmap_structure_add (NULL, DMAP_CC_MSRV);
+	dmap_structure_add (msrv, DMAP_CC_MSTT, (gint32) SOUP_STATUS_OK);
+	dmap_structure_add (msrv, DMAP_CC_MPRO, (gdouble) DMAP_VERSION);
+	dmap_structure_add (msrv, DMAP_CC_PPRO, (gdouble) DPAP_VERSION);
+	dmap_structure_add (msrv, DMAP_CC_MINM, nameprop);
+	/*dmap_structure_add (msrv, DMAP_CC_MSAU, dmap_share_get_auth_method (share)); */
+	/* authentication method
+	 * 0 is nothing
+	 * 1 is name & password
+	 * 2 is password only
+	 */
+	dmap_structure_add (msrv, DMAP_CC_MSLR, 0);
+	dmap_structure_add (msrv, DMAP_CC_MSTM, (gint32) DPAP_TIMEOUT);
+	dmap_structure_add (msrv, DMAP_CC_MSAL, (gchar) 0);
+	/*dmap_structure_add (msrv, DMAP_CC_MSUP, (gchar) 1);
+	 *dmap_structure_add (msrv, DMAP_CC_MSPI, (gchar) 0);
+	 *dmap_structure_add (msrv, DMAP_CC_MSEX, (gchar) 0);
+	 *dmap_structure_add (msrv, DMAP_CC_MSBR, (gchar) 0);
+	 *dmap_structure_add (msrv, DMAP_CC_MSQY, (gchar) 0); */
+	dmap_structure_add (msrv, DMAP_CC_MSIX, (gchar) 0);
+	/* dmap_structure_add (msrv, DMAP_CC_MSRS, (gchar) 0); */
+	dmap_structure_add (msrv, DMAP_CC_MSDC, (gint32) 1);
+
+	dmap_share_message_set_from_dmap_structure (share, message, msrv);
+	dmap_structure_destroy (msrv);
+
+	g_free (nameprop);
 }
diff --git a/libdmapsharing/dmap-image-share.h b/libdmapsharing/dmap-image-share.h
new file mode 100644
index 0000000..921a01d
--- /dev/null
+++ b/libdmapsharing/dmap-image-share.h
@@ -0,0 +1,120 @@
+/*
+ * Header for DPAP (e.g., iPhoto Picture) sharing
+ *
+ * Copyright (C) 2005 Charles Schmidt <cschmidt2@emich.edu>
+ *
+ * Modifications Copyright (C) 2008 W. Michael Petullo <mike@flyn.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ */
+
+#ifndef _DMAP_IMAGE_SHARE_H
+#define _DMAP_IMAGE_SHARE_H
+
+#include <glib-object.h>
+
+#include <libdmapsharing/dmap-share.h>
+
+G_BEGIN_DECLS
+/**
+ * SECTION: dmap-image-share
+ * @short_description: A DPAP share.
+ *
+ * #DmapImageShare objects encapsulate a DPAP share.
+ */
+
+/**
+ * DMAP_TYPE_IMAGE_SHARE:
+ *
+ * The type for #DmapImageShare.
+ */
+#define DMAP_TYPE_IMAGE_SHARE         (dmap_image_share_get_type ())
+/**
+ * DMAP_IMAGE_SHARE:
+ * @o: Object which is subject to casting.
+ *
+ * Casts a #DmapImageShare or derived pointer into a (DmapImageShare*) pointer.
+ * Depending on the current debugging level, this function may invoke
+ * certain runtime checks to identify invalid casts.
+ */
+#define DMAP_IMAGE_SHARE(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), \
+				 DMAP_TYPE_IMAGE_SHARE, DmapImageShare))
+/**
+ * DMAP_IMAGE_SHARE_CLASS:
+ * @k: a valid #DmapImageShareClass
+ *
+ * Casts a derived #DmapImageShareClass structure into a #DmapImageShareClass structure.
+ */
+#define DMAP_IMAGE_SHARE_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), \
+				 DMAP_TYPE_IMAGE_SHARE, DmapImageShareClass))
+/**
+ * DMAP_IS_IMAGE_SHARE:
+ * @o: Instance to check for being a %DMAP_TYPE_IMAGE_SHARE.
+ *
+ * Checks whether a valid #GTypeInstance pointer is of type %DMAP_TYPE_IMAGE_SHARE.
+ */
+#define DMAP_IS_IMAGE_SHARE(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
+				 DMAP_TYPE_IMAGE_SHARE))
+/**
+ * DMAP_IS_IMAGE_SHARE_CLASS:
+ * @k: a #DmapImageShareClass
+ *
+ * Checks whether @k "is a" valid #DmapImageShareClass structure of type
+ * %DMAP_IMAGE_SHARE or derived.
+ */
+#define DMAP_IS_IMAGE_SHARE_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), DMAP_TYPE_IMAGE_SHARE))
+/**
+ * DMAP_IMAGE_SHARE_GET_CLASS:
+ * @o: a #DmapImageShare instance.
+ *
+ * Get the class structure associated to a #DmapImageShare instance.
+ *
+ * Returns: pointer to object class structure.
+ */
+#define DMAP_IMAGE_SHARE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
+				 DMAP_TYPE_IMAGE_SHARE, DmapImageShareClass))
+typedef struct DmapImageSharePrivate DmapImageSharePrivate;
+
+typedef struct {
+	DmapShareClass dmap_share_class;
+} DmapImageShareClass;
+
+typedef struct {
+	DmapShare dmap_share_instance;
+	DmapImageSharePrivate *priv;
+} DmapImageShare;
+
+GType dmap_image_share_get_type (void);
+
+/**
+ * dmap_image_share_new:
+ * @name: The name that will be published by mDNS.
+ * @password: (nullable): A share password or NULL.
+ * @db: A media database.
+ * @container_db: A container (album) database.
+ * @transcode_mimetype: (nullable): A transcode mimetype or NULL.
+ *
+ * Creates a new DPAP share and publishes it using mDNS.
+ *
+ * Returns: a pointer to a DmapImageShare.
+ */
+DmapImageShare *dmap_image_share_new (const char *name, const char *password,
+			   gpointer db, gpointer container_db,
+			   gchar * transcode_mimetype);
+
+#endif /* _DMAP_IMAGE_SHARE_H */
+
+G_END_DECLS
diff --git a/libdmapsharing/dmap-md5.c b/libdmapsharing/dmap-md5.c
index e5cd882..486dc3e 100644
--- a/libdmapsharing/dmap-md5.c
+++ b/libdmapsharing/dmap-md5.c
@@ -43,27 +43,27 @@
  * with every copy.
  *
  * To compute the message digest of a chunk of bytes, declare an MD5Context
- * structure, pass it to DMAP_MD5Init, call DMAP_MD5Update as needed
- * on buffers full of bytes, and then call DMAP_MD5Final, which will fill
+ * structure, pass it to _init, call _update as needed
+ * on buffers full of bytes, and then call _final, which will fill
  * a supplied 16-byte array with the digest.
  */
-static void MD5Transform (guint32 buf[4], guint32 const in[16], gint version);
+static void _transform (guint32 buf[4], guint32 const in[16], gint version);
 
 /* for some reason we still have to reverse bytes on bigendian machines
  * I don't really know why... but otherwise it fails..
  * Any MD5 gurus out there know why???
  */
 #if 0				//ndef WORDS_BIGENDIAN /* was: HIGHFIRST */
-#define byteReverse(buf, len)	/* Nothing */
+#define _byte_reverse(buf, len)	/* Nothing */
 #else
-static void byteReverse (unsigned char *buf, unsigned longs);
+static void _byte_reverse (unsigned char *buf, unsigned longs);
 
 #ifndef ASM_MD5
 /*
 * Note: this code is harmless on little-endian machines.
 */
 static void
-byteReverse (unsigned char *buf, unsigned longs)
+_byte_reverse (unsigned char *buf, unsigned longs)
 {
 	guint32 t;
 
@@ -78,9 +78,9 @@ byteReverse (unsigned char *buf, unsigned longs)
 #endif /* #if 0 */
 
 static void
-DMAP_MD5Init (DMAPHashContext * ctx, gint version)
+_init (DmapHashContext * ctx, gint version)
 {
-	memset (ctx, 0, sizeof (DMAPHashContext));
+	memset (ctx, 0, sizeof (DmapHashContext));
 	ctx->buf[0] = 0x67452301;
 	ctx->buf[1] = 0xefcdab89;
 	ctx->buf[2] = 0x98badcfe;
@@ -93,15 +93,16 @@ DMAP_MD5Init (DMAPHashContext * ctx, gint version)
 }
 
 static void
-DMAP_MD5Update (DMAPHashContext * ctx, unsigned char const *buf, unsigned int len)
+_update (DmapHashContext * ctx, unsigned char const *buf, unsigned int len)
 {
 	guint32 t;
 
 	/* Update bitcount */
 
 	t = ctx->bits[0];
-	if ((ctx->bits[0] = t + ((guint32) len << 3)) < t)
+	if ((ctx->bits[0] = t + ((guint32) len << 3)) < t) {
 		ctx->bits[1]++;	/* Carry from low to high */
+	}
 	ctx->bits[1] += len >> 29;
 
 	t = (t >> 3) & 0x3f;	/* Bytes already in shsInfo->data */
@@ -117,8 +118,8 @@ DMAP_MD5Update (DMAPHashContext * ctx, unsigned char const *buf, unsigned int le
 			return;
 		}
 		memcpy (p, buf, t);
-		byteReverse (ctx->in, 16);
-		MD5Transform (ctx->buf, (guint32 *) ctx->in, ctx->version);
+		_byte_reverse (ctx->in, 16);
+		_transform (ctx->buf, (guint32 *) ctx->in, ctx->version);
 		buf += t;
 		len -= t;
 	}
@@ -126,8 +127,8 @@ DMAP_MD5Update (DMAPHashContext * ctx, unsigned char const *buf, unsigned int le
 
 	while (len >= 64) {
 		memcpy (ctx->in, buf, 64);
-		byteReverse (ctx->in, 16);
-		MD5Transform (ctx->buf, (guint32 *) ctx->in, ctx->version);
+		_byte_reverse (ctx->in, 16);
+		_transform (ctx->buf, (guint32 *) ctx->in, ctx->version);
 		buf += 64;
 		len -= 64;
 	}
@@ -138,7 +139,7 @@ DMAP_MD5Update (DMAPHashContext * ctx, unsigned char const *buf, unsigned int le
 }
 
 static void
-DMAP_MD5Final (DMAPHashContext * ctx, unsigned char digest[16])
+_final (DmapHashContext * ctx, unsigned char digest[16])
 {
 	unsigned count;
 	unsigned char *p;
@@ -159,8 +160,8 @@ DMAP_MD5Final (DMAPHashContext * ctx, unsigned char digest[16])
 	if (count < 8) {
 		/* Two lots of padding:  Pad the first block to 64 bytes */
 		memset (p, 0, count);
-		byteReverse (ctx->in, 16);
-		MD5Transform (ctx->buf, (guint32 *) ctx->in, ctx->version);
+		_byte_reverse (ctx->in, 16);
+		_transform (ctx->buf, (guint32 *) ctx->in, ctx->version);
 
 		/* Now fill the next block with 56 bytes */
 		memset (ctx->in, 0, 56);
@@ -168,15 +169,15 @@ DMAP_MD5Final (DMAPHashContext * ctx, unsigned char digest[16])
 		/* Pad block to 56 bytes */
 		memset (p, 0, count - 8);
 	}
-	byteReverse (ctx->in, 14);
+	_byte_reverse (ctx->in, 14);
 
 	/* Append length in bits and transform */
 	tmp = (guint32 *) ctx->in;
 	tmp[14] = ctx->bits[0];
 	tmp[15] = ctx->bits[1];
 
-	MD5Transform (ctx->buf, (guint32 *) ctx->in, ctx->version);
-	byteReverse ((unsigned char *) ctx->buf, 4);
+	_transform (ctx->buf, (guint32 *) ctx->in, ctx->version);
+	_byte_reverse ((unsigned char *) ctx->buf, 4);
 	memcpy (digest, ctx->buf, 16);
 	memset (ctx, 0, sizeof (*ctx));	/* In case it's sensitive */
 
@@ -199,11 +200,11 @@ DMAP_MD5Final (DMAPHashContext * ctx, unsigned char digest[16])
 
 /*
 * The core of the MD5 algorithm, this alters an existing MD5 hash to reflect
-* the addition of 16 longwords of new data.  DMAP_MD5Update blocks the
+* the addition of 16 longwords of new data.  _update blocks the
 * data and converts bytes into longwords for this routine.
 */
 static void
-MD5Transform (guint32 buf[4], guint32 const in[16], gint version)
+_transform (guint32 buf[4], guint32 const in[16], gint version)
 {
 	guint32 a, b, c, d;
 
@@ -294,268 +295,287 @@ MD5Transform (guint32 buf[4], guint32 const in[16], gint version)
 
 #endif
 
-static gint staticHashDone = 0;
-static unsigned char staticHash_42[256 * 65] = { 0 };
-static unsigned char staticHash_45[256 * 65] = { 0 };
+static gint _done = 0;
+static unsigned char _42[256 * 65] = { 0 };
+static unsigned char _45[256 * 65] = { 0 };
 
-static const gchar hexchars[] = "0123456789ABCDEF";
-static gchar ac[] = "Dpqzsjhiu!3114!Bqqmf!Dpnqvufs-!Jod/";	/* +1 */
-static gboolean ac_unfudged = FALSE;
+static const gchar _hexchars[] = "0123456789ABCDEF";
+static gchar _ac[] = "Dpqzsjhiu!3114!Bqqmf!Dpnqvufs-!Jod/";	/* +1 */
+static gboolean _ac_unfudged = FALSE;
 
 void
-dmap_hash_progressive_to_string (const unsigned char *digest, gchar * string)
+dmap_md5_progressive_to_string (const unsigned char *digest, gchar * string)
 {
 	gint i;
 
 	for (i = 0; i < 16; i++) {
 		unsigned char tmp = digest[i];
 
-		string[i * 2 + 1] = hexchars[tmp & 0x0f];
-		string[i * 2] = hexchars[(tmp >> 4) & 0x0f];
+		string[i * 2 + 1] = _hexchars[tmp & 0x0f];
+		string[i * 2] = _hexchars[(tmp >> 4) & 0x0f];
 	}
 }
 
 static void
-GenerateStatic_42 ()
+_generate_static_42 ()
 {
-	DMAPHashContext ctx;
-	unsigned char *p = staticHash_42;
+	DmapHashContext ctx;
+	unsigned char *p = _42;
 	int i;
 	unsigned char buf[16];
 
 	for (i = 0; i < 256; i++) {
-		DMAP_MD5Init (&ctx, 0);
+		_init (&ctx, 0);
 
-#define MD5_STRUPDATE(str) DMAP_MD5Update(&ctx, (unsigned char const *)str, strlen(str))
+#define MD5_STRUPDATE(str) _update(&ctx, (unsigned char const *)str, strlen(str))
 
-		if ((i & 0x80) != 0)
+		if ((i & 0x80) != 0) {
 			MD5_STRUPDATE ("Accept-Language");
-		else
+		} else {
 			MD5_STRUPDATE ("user-agent");
+		}
 
-		if ((i & 0x40) != 0)
+		if ((i & 0x40) != 0) {
 			MD5_STRUPDATE ("max-age");
-		else
+		} else {
 			MD5_STRUPDATE ("Authorization");
+		}
 
-		if ((i & 0x20) != 0)
+		if ((i & 0x20) != 0) {
 			MD5_STRUPDATE ("Client-DAAP-Version");
-		else
+		} else {
 			MD5_STRUPDATE ("Accept-Encoding");
+		}
 
-		if ((i & 0x10) != 0)
+		if ((i & 0x10) != 0) {
 			MD5_STRUPDATE ("daap.protocolversion");
-		else
+		} else {
 			MD5_STRUPDATE ("daap.songartist");
+		}
 
-		if ((i & 0x08) != 0)
+		if ((i & 0x08) != 0) {
 			MD5_STRUPDATE ("daap.songcomposer");
-		else
+		} else {
 			MD5_STRUPDATE ("daap.songdatemodified");
+		}
 
-		if ((i & 0x04) != 0)
+		if ((i & 0x04) != 0) {
 			MD5_STRUPDATE ("daap.songdiscnumber");
-		else
+		} else {
 			MD5_STRUPDATE ("daap.songdisabled");
+		}
 
-		if ((i & 0x02) != 0)
+		if ((i & 0x02) != 0) {
 			MD5_STRUPDATE ("playlist-item-spec");
-		else
+		} else {
 			MD5_STRUPDATE ("revision-number");
+		}
 
-		if ((i & 0x01) != 0)
+		if ((i & 0x01) != 0) {
 			MD5_STRUPDATE ("session-id");
-		else
+		} else {
 			MD5_STRUPDATE ("content-codes");
+		}
 #undef MD5_STRUPDATE
 
-		DMAP_MD5Final (&ctx, buf);
-		dmap_hash_progressive_to_string (buf, (char *) p);
+		_final (&ctx, buf);
+		dmap_md5_progressive_to_string (buf, (char *) p);
 		p += 65;
 	}
 }
 
 static void
-GenerateStatic_45 ()
+_generate_static_45 ()
 {
-	DMAPHashContext ctx;
-	unsigned char *p = staticHash_45;
+	DmapHashContext ctx;
+	unsigned char *p = _45;
 	int i;
 	unsigned char buf[16];
 
 	for (i = 0; i < 256; i++) {
-		DMAP_MD5Init (&ctx, 1);
+		_init (&ctx, 1);
 
-#define MD5_STRUPDATE(str) DMAP_MD5Update(&ctx, (unsigned char const *)str, strlen(str))
+#define MD5_STRUPDATE(str) _update(&ctx, (unsigned char const *)str, strlen(str))
 
-		if ((i & 0x40) != 0)
+		if ((i & 0x40) != 0) {
 			MD5_STRUPDATE ("eqwsdxcqwesdc");
-		else
+		} else {
 			MD5_STRUPDATE ("op[;lm,piojkmn");
+		}
 
-		if ((i & 0x20) != 0)
+		if ((i & 0x20) != 0) {
 			MD5_STRUPDATE ("876trfvb 34rtgbvc");
-		else
+		} else {
 			MD5_STRUPDATE ("=-0ol.,m3ewrdfv");
+		}
 
-		if ((i & 0x10) != 0)
+		if ((i & 0x10) != 0) {
 			MD5_STRUPDATE ("87654323e4rgbv ");
-		else
+		} else {
 			MD5_STRUPDATE ("1535753690868867974342659792");
+		}
 
-		if ((i & 0x08) != 0)
+		if ((i & 0x08) != 0) {
 			MD5_STRUPDATE ("Song Name");
-		else
+		} else {
 			MD5_STRUPDATE ("DAAP-CLIENT-ID:");
+		}
 
-		if ((i & 0x04) != 0)
+		if ((i & 0x04) != 0) {
 			MD5_STRUPDATE ("111222333444555");
-		else
+		} else {
 			MD5_STRUPDATE ("4089961010");
+		}
 
-		if ((i & 0x02) != 0)
+		if ((i & 0x02) != 0) {
 			MD5_STRUPDATE ("playlist-item-spec");
-		else
+		} else {
 			MD5_STRUPDATE ("revision-number");
+		}
 
-		if ((i & 0x01) != 0)
+		if ((i & 0x01) != 0) {
 			MD5_STRUPDATE ("session-id");
-		else
+		} else {
 			MD5_STRUPDATE ("content-codes");
+		}
 
-		if ((i & 0x80) != 0)
+		if ((i & 0x80) != 0) {
 			MD5_STRUPDATE ("IUYHGFDCXWEDFGHN");
-		else
+		} else {
 			MD5_STRUPDATE ("iuytgfdxwerfghjm");
+		}
 
 #undef MD5_STRUPDATE
 
-		DMAP_MD5Final (&ctx, buf);
-		dmap_hash_progressive_to_string (buf, (char *) p);
+		_final (&ctx, buf);
+		dmap_md5_progressive_to_string (buf, (char *) p);
 		p += 65;
 	}
 }
 
 void
-dmap_hash_generate (short version_major,
-		    const guchar * url,
-		    guchar hash_select, guchar * out, gint request_id)
+dmap_md5_generate (short version_major,
+                   const guchar * url,
+                   guchar hash_select, guchar * out, gint request_id)
 {
 	unsigned char buf[16];
-	DMAPHashContext ctx;
-	size_t i;
+	DmapHashContext ctx;
+	gsize i;
 
 	unsigned char *hashTable = (version_major == 3) ?
-		staticHash_45 : staticHash_42;
+		_45 : _42;
 
-	if (!staticHashDone) {
-		GenerateStatic_42 ();
-		GenerateStatic_45 ();
-		staticHashDone = 1;
+	if (!_done) {
+		_generate_static_42 ();
+		_generate_static_45 ();
+		_done = 1;
 	}
 
-	DMAP_MD5Init (&ctx, (version_major == 3) ? 1 : 0);
+	_init (&ctx, (version_major == 3) ? 1 : 0);
 
-	DMAP_MD5Update (&ctx, url, strlen ((const gchar *) url));
-	if (ac_unfudged == FALSE) {
-		for (i = 0; i < strlen (ac); i++) {
-			ac[i] = ac[i] - 1;
+	_update (&ctx, url, strlen ((const gchar *) url));
+	if (_ac_unfudged == FALSE) {
+		for (i = 0; i < strlen (_ac); i++) {
+			_ac[i] = _ac[i] - 1;
 		}
-		ac_unfudged = TRUE;
+		_ac_unfudged = TRUE;
 	}
 
-	DMAP_MD5Update (&ctx, (const guchar *) ac, strlen (ac));
+	_update (&ctx, (const guchar *) _ac, strlen (_ac));
 
-	DMAP_MD5Update (&ctx, &hashTable[hash_select * 65], 32);
+	_update (&ctx, &hashTable[hash_select * 65], 32);
 
 	if (request_id && version_major == 3) {
 		gchar scribble[20];
 
 		sprintf (scribble, "%u", request_id);
-		DMAP_MD5Update (&ctx, (const guchar *) scribble,
+		_update (&ctx, (const guchar *) scribble,
 				strlen (scribble));
 	}
 
-	DMAP_MD5Final (&ctx, buf);
-	dmap_hash_progressive_to_string (buf, (gchar *) out);
+	_final (&ctx, buf);
+	dmap_md5_progressive_to_string (buf, (gchar *) out);
 
 	return;
 }
 
-void dmap_hash_progressive_init (DMAPHashContext *context)
+void
+dmap_md5_progressive_init (DmapHashContext *context)
 {
-	/* FIXME: Share this stuff with dmap_hash_generate() */
-	if (!staticHashDone) {
-		GenerateStatic_42 ();
-		GenerateStatic_45 ();
-		staticHashDone = 1;
+	/* FIXME: Share this stuff with dmap_md5_generate() */
+	if (!_done) {
+		_generate_static_42 ();
+		_generate_static_45 ();
+		_done = 1;
 	}
 
-	DMAP_MD5Init (context, 1);
+	_init (context, 1);
 }
 
-void dmap_hash_progressive_update (DMAPHashContext *context,
+void
+dmap_md5_progressive_update (DmapHashContext *context,
                                    unsigned char const *buffer,
                                    unsigned int length)
 {
-	DMAP_MD5Update (context, buffer, length);
+	_update (context, buffer, length);
 }
 
-void dmap_hash_progressive_final (DMAPHashContext *context,
+void
+dmap_md5_progressive_final (DmapHashContext *context,
                                   unsigned char digest[16])
 {
-	/* FIXME: This is only equivalent to dmap_hash_generate()
+	/* FIXME: This is only equivalent to dmap_md5_generate()
          *        when it is called with (3, x, 2, y, 0).
          */
-	size_t i;
+	gsize i;
 
-	/* FIXME: Share this stuff with dmap_hash_generate() */
-	if (ac_unfudged == FALSE) {
-		for (i = 0; i < strlen (ac); i++) {
-			ac[i] = ac[i] - 1;
+	/* FIXME: Share this stuff with dmap_md5_generate() */
+	if (_ac_unfudged == FALSE) {
+		for (i = 0; i < strlen (_ac); i++) {
+			_ac[i] = _ac[i] - 1;
 		}
-		ac_unfudged = TRUE;
+		_ac_unfudged = TRUE;
 	}
 
-	DMAP_MD5Update (context, (const guchar *) ac, strlen (ac));
+	_update (context, (const guchar *) _ac, strlen (_ac));
 
-	DMAP_MD5Update (context, &staticHash_45[2 * 65], 32);
+	_update (context, &_45[2 * 65], 32);
 
-	DMAP_MD5Final (context, digest);
+	_final (context, digest);
 }
 
 #ifdef HAVE_CHECK
 
 #include <check.h>
 
-START_TEST(test_dmap_hash_generate_v3_h2)
+START_TEST(_test_generate_v3_h2)
 {
 	guchar hash[33] = { 0 };
 	guchar *url = (guchar *) "test://foo";
-	dmap_hash_generate (3, url, 2, hash, 0);
+	dmap_md5_generate (3, url, 2, hash, 0);
 	fail_unless (! memcmp (hash, "798A9D80B6F08E339603BE83E0FEAD03", strlen ("798A9D80B6F08E339603BE83E0FEAD03")));
 }
 END_TEST
 
-START_TEST(test_dmap_hash_progressive)
+START_TEST(_test_progressive)
 {
 	guchar buf[16] = { 0 };
 	guchar hash1[33] = { 0 };
 	guchar hash2[33] = { 0 };
 	guchar *value = (guchar *) "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
-	DMAPHashContext context;
-
-	dmap_hash_progressive_init   (&context);
-	dmap_hash_progressive_update (&context, value,      5);
-	dmap_hash_progressive_update (&context, value + 5,  5);
-	dmap_hash_progressive_update (&context, value + 10, 5);
-	dmap_hash_progressive_update (&context, value + 15, 5);
-	dmap_hash_progressive_update (&context, value + 20, 5);
-	dmap_hash_progressive_update (&context, value + 25, 1);
-	dmap_hash_progressive_final  (&context, buf);
-	dmap_hash_progressive_to_string (buf, (gchar *) hash1);
-
-	dmap_hash_generate (3, value, 2, hash2, 0);
+	DmapHashContext context;
+
+	dmap_md5_progressive_init   (&context);
+	dmap_md5_progressive_update (&context, value,      5);
+	dmap_md5_progressive_update (&context, value + 5,  5);
+	dmap_md5_progressive_update (&context, value + 10, 5);
+	dmap_md5_progressive_update (&context, value + 15, 5);
+	dmap_md5_progressive_update (&context, value + 20, 5);
+	dmap_md5_progressive_update (&context, value + 25, 1);
+	dmap_md5_progressive_final  (&context, buf);
+	dmap_md5_progressive_to_string (buf, (gchar *) hash1);
+
+	dmap_md5_generate (3, value, 2, hash2, 0);
 
 	fail_unless (! memcmp (hash1, hash2, 32));
 }
diff --git a/libdmapsharing/dmap-md5.h b/libdmapsharing/dmap-md5.h
index b28bf49..5aacdb5 100644
--- a/libdmapsharing/dmap-md5.h
+++ b/libdmapsharing/dmap-md5.h
@@ -18,8 +18,8 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA*
  */
 
-#ifndef __DMAP_MD5_H__
-#define __DMAP_MD5_H__
+#ifndef _DMAP_MD5_H__
+#define _DMAP_MD5_H__
 
 #include <glib.h>
 
@@ -27,30 +27,30 @@
 
 G_BEGIN_DECLS
 
-typedef struct DMAPHashContext
+typedef struct DmapHashContext
 {
         guint32 buf[4];
         guint32 bits[2];
         unsigned char in[64];
         gint version;
-} DMAPHashContext;
+} DmapHashContext;
 
-void dmap_hash_progressive_init      (DMAPHashContext *context);
+void dmap_md5_progressive_init      (DmapHashContext *context);
 
-void dmap_hash_progressive_update    (DMAPHashContext *context,
-                                      unsigned char const *buffer,
-                                      unsigned int length);
+void dmap_md5_progressive_update    (DmapHashContext *context,
+                                     unsigned char const *buffer,
+                                     unsigned int length);
 
-void dmap_hash_progressive_final     (DMAPHashContext *context,
-                                      unsigned char digest[16]);
+void dmap_md5_progressive_final     (DmapHashContext *context,
+                                     unsigned char digest[16]);
 
-void dmap_hash_progressive_to_string (const unsigned char *digest, gchar * string);
+void dmap_md5_progressive_to_string (const unsigned char *digest, gchar * string);
 
-void dmap_hash_generate              (short version_major,
-                                      const guchar *url,
-                                      guchar hash_select,
-                                      guchar *out,
-                                      gint request_id);
+void dmap_md5_generate              (short version_major,
+                                     const guchar *url,
+                                     guchar hash_select,
+                                     guchar *out,
+                                     gint request_id);
 
 G_END_DECLS
 #endif
diff --git a/libdmapsharing/dmap-mdns-avahi.c b/libdmapsharing/dmap-mdns-avahi.c
index d7ddc45..84e0e0b 100644
--- a/libdmapsharing/dmap-mdns-avahi.c
+++ b/libdmapsharing/dmap-mdns-avahi.c
@@ -27,14 +27,14 @@
 
 #include "dmap-mdns-avahi.h"
 
-static AvahiClient *client = NULL;
-static AvahiEntryGroup *entry_group = NULL;
-static gsize client_init = 0;
+static AvahiClient *_client = NULL;
+static AvahiEntryGroup *_entry_group = NULL;
+static gsize _client_init = 0;
 
 static void
-client_cb (AvahiClient * client, 
-           AvahiClientState state,
-           G_GNUC_UNUSED gpointer data)
+_client_cb (G_GNUC_UNUSED AvahiClient * client,
+            AvahiClientState state,
+            G_GNUC_UNUSED gpointer data)
 {
 	/* FIXME
 	 * check to make sure we're in the _RUNNING state before we publish
@@ -57,14 +57,14 @@ client_cb (AvahiClient * client,
 		 * in AVAHI_SERVER_RUNNING state we will register them
 		 * again with the new host name.
 		 */
-		if (entry_group) {
-			avahi_entry_group_reset (entry_group);
+		if (_entry_group) {
+			avahi_entry_group_reset (_entry_group);
 		}
 		break;
 
 	case AVAHI_CLIENT_FAILURE:
-		g_warning ("Client failure: %s\n",
-			   avahi_strerror (avahi_client_errno (client)));
+		g_warning ("Client failure: %s",
+			   avahi_strerror (avahi_client_errno (_client)));
 		break;
 
 	case AVAHI_CLIENT_CONNECTING:
@@ -77,7 +77,7 @@ client_cb (AvahiClient * client,
 AvahiClient *
 dmap_mdns_avahi_get_client (void)
 {
-	if (g_once_init_enter (&client_init)) {
+	if (g_once_init_enter (&_client_init)) {
 		AvahiClientFlags flags = 0;
 		AvahiGLibPoll *apoll;
 		int error = 0;
@@ -90,19 +90,19 @@ dmap_mdns_avahi_get_client (void)
 				("Unable to create AvahiGlibPoll object for mDNS");
 		}
 
-		client = avahi_client_new (avahi_glib_poll_get (apoll),
+		_client = avahi_client_new (avahi_glib_poll_get (apoll),
 					   flags,
-					   (AvahiClientCallback) client_cb,
+					   (AvahiClientCallback) _client_cb,
 					   NULL, &error);
 		if (error != 0) {
 			g_warning ("Unable to initialize mDNS: %s",
 				   avahi_strerror (error));
 		}
 
-		g_once_init_leave (&client_init, 1);
+		g_once_init_leave (&_client_init, 1);
 	}
 
-	return client;
+	return _client;
 }
 
 void
@@ -112,6 +112,6 @@ dmap_mdns_avahi_set_entry_group (AvahiEntryGroup * eg)
 	 * per process code. Refactor?
 	 * g_assert (eg == NULL || entry_group == NULL);
 	 */
-	g_assert (avahi_entry_group_get_client (eg) == client);
-	entry_group = eg;
+	g_assert (avahi_entry_group_get_client (eg) == _client);
+	_entry_group = eg;
 }
diff --git a/libdmapsharing/dmap-mdns-avahi.h b/libdmapsharing/dmap-mdns-avahi.h
index dba28fb..f52c92e 100644
--- a/libdmapsharing/dmap-mdns-avahi.h
+++ b/libdmapsharing/dmap-mdns-avahi.h
@@ -18,8 +18,8 @@
  *
  */
 
-#ifndef __DMAP_MDNS_AVAHI_H
-#define __DMAP_MDNS_AVAHI_H
+#ifndef _DMAP_MDNS_AVAHI_H
+#define _DMAP_MDNS_AVAHI_H
 
 #include <avahi-client/client.h>
 #include <avahi-client/publish.h>
diff --git a/libdmapsharing/dmap-mdns-browser-avahi.c b/libdmapsharing/dmap-mdns-browser-avahi.c
index 5f7290a..42a6104 100644
--- a/libdmapsharing/dmap-mdns-browser-avahi.c
+++ b/libdmapsharing/dmap-mdns-browser-avahi.c
@@ -40,9 +40,9 @@
 #include <avahi-glib/glib-malloc.h>
 #include <avahi-glib/glib-watch.h>
 
-struct _DMAPMdnsBrowserPrivate
+struct _DmapMdnsBrowserPrivate
 {
-	DMAPMdnsBrowserServiceType service_type;
+	DmapMdnsServiceType service_type;
 	AvahiClient *client;
 	AvahiGLibPoll *poll;
 	AvahiServiceBrowser *service_browser;
@@ -57,12 +57,12 @@ enum
 	LAST_SIGNAL
 };
 
-static void dmap_mdns_browser_class_init (DMAPMdnsBrowserClass * klass);
-static void dmap_mdns_browser_init (DMAPMdnsBrowser * browser);
-static void dmap_mdns_browser_dispose (GObject * object);
-static void dmap_mdns_browser_finalize (GObject * object);
-static void avahi_client_init (DMAPMdnsBrowser * browser);
-static void resolve_cb (AvahiServiceResolver * service_resolver,
+static void dmap_mdns_browser_class_init (DmapMdnsBrowserClass * klass);
+static void dmap_mdns_browser_init (DmapMdnsBrowser * browser);
+static void _dispose (GObject * object);
+static void _finalize (GObject * object);
+static void _client_init (DmapMdnsBrowser * browser);
+static void _resolve_cb (AvahiServiceResolver * service_resolver,
 			AvahiIfIndex interface,
 			AvahiProtocol protocol,
 			AvahiResolverEvent event,
@@ -73,28 +73,30 @@ static void resolve_cb (AvahiServiceResolver * service_resolver,
 			const AvahiAddress * address,
 			uint16_t port, AvahiStringList * text,
 			AvahiLookupResultFlags flags,
-			DMAPMdnsBrowser * browser);
-static gboolean dmap_mdns_browser_resolve (DMAPMdnsBrowser * browser,
-					   const gchar * name,
-					   const gchar * domain);
-static void browser_add_service (DMAPMdnsBrowser * browser,
-				 const gchar * service_name,
-				 const gchar * domain);
-static void browser_remove_service (DMAPMdnsBrowser * browser,
-				    const gchar * service_name);
-static void browse_cb (AvahiServiceBrowser * service_browser,
-		       AvahiIfIndex interface,
-		       AvahiProtocol protocol,
-		       AvahiBrowserEvent event,
-		       const gchar * name,
-		       const gchar * type, const gchar * domain,
-		       AvahiLookupResultFlags flags,
-		       DMAPMdnsBrowser * browser);
-static void free_service (DMAPMdnsBrowserService * service);
-
-static guint dmap_mdns_browser_signals[LAST_SIGNAL] = { 0, };
-
-G_DEFINE_TYPE_WITH_PRIVATE (DMAPMdnsBrowser, dmap_mdns_browser, G_TYPE_OBJECT);
+			DmapMdnsBrowser * browser);
+static gboolean _resolve (DmapMdnsBrowser * browser,
+                          const gchar * name,
+                          const gchar * domain);
+static void _add_service (DmapMdnsBrowser * browser,
+                          const gchar * service_name,
+                          const gchar * domain);
+static void _remove_service (DmapMdnsBrowser * browser,
+                             const gchar * service_name);
+static void _browse_cb (AvahiServiceBrowser * service_browser,
+                        AvahiIfIndex interface,
+                        AvahiProtocol protocol,
+                        AvahiBrowserEvent event,
+                        const gchar * name,
+                        const gchar * type,
+                        const gchar * domain,
+                        AvahiLookupResultFlags flags,
+                        DmapMdnsBrowser * browser);
+
+static guint _signals[LAST_SIGNAL] = { 0, };
+
+G_DEFINE_TYPE_WITH_PRIVATE (DmapMdnsBrowser,
+                            dmap_mdns_browser,
+                            G_TYPE_OBJECT);
 
 GQuark
 dmap_mdns_browser_error_quark (void)
@@ -109,61 +111,65 @@ dmap_mdns_browser_error_quark (void)
 }
 
 static void
-dmap_mdns_browser_class_init (DMAPMdnsBrowserClass * klass)
+dmap_mdns_browser_class_init (DmapMdnsBrowserClass * klass)
 {
 	GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
 	dmap_mdns_browser_parent_class = g_type_class_peek_parent (klass);
 
-	object_class->dispose = dmap_mdns_browser_dispose;
-	object_class->finalize = dmap_mdns_browser_finalize;
+	object_class->dispose  = _dispose;
+	object_class->finalize = _finalize;
 
-	dmap_mdns_browser_signals[SERVICE_ADDED] =
+	_signals[SERVICE_ADDED] =
 		g_signal_new ("service-added",
 			      G_TYPE_FROM_CLASS (object_class),
 			      G_SIGNAL_RUN_LAST,
-			      G_STRUCT_OFFSET (DMAPMdnsBrowserClass,
+			      G_STRUCT_OFFSET (DmapMdnsBrowserClass,
 					       service_added), NULL, NULL,
 			      NULL, G_TYPE_NONE,
-			      1, G_TYPE_POINTER);
-	dmap_mdns_browser_signals[SERVICE_REMOVED] =
+			      1, DMAP_TYPE_MDNS_SERVICE);
+	_signals[SERVICE_REMOVED] =
 		g_signal_new ("service-removed",
 			      G_TYPE_FROM_CLASS (object_class),
 			      G_SIGNAL_RUN_LAST,
-			      G_STRUCT_OFFSET (DMAPMdnsBrowserClass,
+			      G_STRUCT_OFFSET (DmapMdnsBrowserClass,
 					       service_removed), NULL, NULL,
 			      NULL, G_TYPE_NONE, 1,
 			      G_TYPE_STRING);
 }
 
 static void
-dmap_mdns_browser_init (DMAPMdnsBrowser * browser)
+dmap_mdns_browser_init (DmapMdnsBrowser * browser)
 {
 	browser->priv = dmap_mdns_browser_get_instance_private(browser);
-	avahi_client_init (browser);
+
+	_client_init (browser);
 }
 
 static void
-_wrapper(void *p)
+_avahi_service_resolver_free_adapter(gpointer data, G_GNUC_UNUSED gpointer user_data)
 {
-	avahi_service_resolver_free(p);
+	avahi_service_resolver_free(data);
 }
 
 static void
-dmap_mdns_browser_dispose (GObject * object)
+_dispose (GObject * object)
 {
-	DMAPMdnsBrowser *browser = DMAP_MDNS_BROWSER (object);
+	DmapMdnsBrowser *browser = DMAP_MDNS_BROWSER (object);
 	GSList *walk;
-	DMAPMdnsBrowserService *service;
+	DmapMdnsService *service;
 
 	for (walk = browser->priv->services; walk; walk = walk->next) {
-		service = (DMAPMdnsBrowserService *) walk->data;
-		free_service (service);
+		service = (DmapMdnsService *) walk->data;
+		g_object_unref (service);
 	}
 	g_slist_free (browser->priv->services);
 
 	if (browser->priv->resolvers) {
-		g_slist_free_full (browser->priv->resolvers, _wrapper);
+		g_slist_foreach (browser->priv->resolvers,
+		         (GFunc) _avahi_service_resolver_free_adapter,
+		                 NULL);
+		g_slist_free (browser->priv->resolvers);
 	}
 
 	if (browser->priv->service_browser) {
@@ -182,31 +188,30 @@ dmap_mdns_browser_dispose (GObject * object)
 }
 
 static void
-dmap_mdns_browser_finalize (GObject * object)
+_finalize (GObject * object)
 {
 	g_signal_handlers_destroy (object);
 	G_OBJECT_CLASS (dmap_mdns_browser_parent_class)->finalize (object);
 }
 
-DMAPMdnsBrowser *
-dmap_mdns_browser_new (DMAPMdnsBrowserServiceType type)
+DmapMdnsBrowser *
+dmap_mdns_browser_new (DmapMdnsServiceType type)
 {
-	DMAPMdnsBrowser *browser_object;
+	DmapMdnsBrowser *browser_object;
 
-	g_return_val_if_fail (type >= DMAP_MDNS_BROWSER_SERVICE_TYPE_INVALID
-			      && type <= DMAP_MDNS_BROWSER_SERVICE_TYPE_LAST,
-			      NULL);
+	g_assert(type >  DMAP_MDNS_SERVICE_TYPE_INVALID);
+	g_assert(type <= DMAP_MDNS_SERVICE_TYPE_LAST);
 
 	browser_object =
-		DMAP_MDNS_BROWSER (g_object_new
-				   (DMAP_TYPE_MDNS_BROWSER, NULL));
+		DMAP_MDNS_BROWSER (g_object_new (DMAP_TYPE_MDNS_BROWSER, NULL));
+
 	browser_object->priv->service_type = type;
 
 	return browser_object;
 }
 
 gboolean
-dmap_mdns_browser_start (DMAPMdnsBrowser * browser, GError ** error)
+dmap_mdns_browser_start (DmapMdnsBrowser * browser, GError ** error)
 {
 	if (browser->priv->client == NULL) {
 		g_set_error (error,
@@ -224,12 +229,12 @@ dmap_mdns_browser_start (DMAPMdnsBrowser * browser, GError ** error)
 		avahi_service_browser_new (browser->priv->client,
 					   AVAHI_IF_UNSPEC,
 					   AVAHI_PROTO_UNSPEC,
-					   service_type_name[browser->
-							     priv->service_type],
+					   _service_type_name[browser->
+		                                              priv->service_type],
 					   NULL,
 					   0,
 					   (AvahiServiceBrowserCallback)
-					   browse_cb, browser);
+					   _browse_cb, browser);
 	if (browser->priv->service_browser == NULL) {
 		g_debug ("Error starting mDNS discovery using AvahiServiceBrowser");
 		g_set_error (error,
@@ -244,7 +249,7 @@ dmap_mdns_browser_start (DMAPMdnsBrowser * browser, GError ** error)
 }
 
 gboolean
-dmap_mdns_browser_stop (DMAPMdnsBrowser * browser, GError ** error)
+dmap_mdns_browser_stop (DmapMdnsBrowser * browser, GError ** error)
 {
 	if (browser->priv->client == NULL) {
 		g_set_error (error,
@@ -267,30 +272,30 @@ dmap_mdns_browser_stop (DMAPMdnsBrowser * browser, GError ** error)
 }
 
 const GSList *
-dmap_mdns_browser_get_services (DMAPMdnsBrowser * browser)
+dmap_mdns_browser_get_services (DmapMdnsBrowser * browser)
 {
 	g_return_val_if_fail (browser != NULL, NULL);
 	return browser->priv->services;
 }
 
-DMAPMdnsBrowserServiceType
-dmap_mdns_browser_get_service_type (DMAPMdnsBrowser * browser)
+DmapMdnsServiceType
+dmap_mdns_browser_get_service_type (DmapMdnsBrowser * browser)
 {
 	g_return_val_if_fail (browser != NULL,
-			      DMAP_MDNS_BROWSER_SERVICE_TYPE_INVALID);
+			      DMAP_MDNS_SERVICE_TYPE_INVALID);
 	return browser->priv->service_type;
 }
 
 static void
-client_cb (AvahiClient * client,
-	   AvahiClientState state,
-           G_GNUC_UNUSED DMAPMdnsBrowser * browser)
+_client_cb (AvahiClient * client,
+            AvahiClientState state,
+            G_GNUC_UNUSED DmapMdnsBrowser * browser)
 {
 	/* Called whenever the client or server state changes */
 
 	switch (state) {
 	case AVAHI_CLIENT_FAILURE:
-		g_warning ("Client failure: %s\n",
+		g_warning ("Client failure: %s",
 			   avahi_strerror (avahi_client_errno (client)));
 		break;
 	default:
@@ -299,7 +304,7 @@ client_cb (AvahiClient * client,
 }
 
 static void
-avahi_client_init (DMAPMdnsBrowser * browser)
+_client_init (DmapMdnsBrowser * browser)
 {
 	gint error = 0;
 	AvahiClientFlags flags = 0;
@@ -315,30 +320,30 @@ avahi_client_init (DMAPMdnsBrowser * browser)
 	browser->priv->client =
 		avahi_client_new (avahi_glib_poll_get
 				  (browser->priv->poll), flags,
-				  (AvahiClientCallback) client_cb,
+				  (AvahiClientCallback) _client_cb,
 				  browser, &error);
 }
 
 static void
-resolve_cb (AvahiServiceResolver * service_resolver,
-	    G_GNUC_UNUSED AvahiIfIndex interface,
-	    G_GNUC_UNUSED AvahiProtocol protocol,
-	    AvahiResolverEvent event,
-	    const gchar * service_name,
-	    const gchar * type,
-	    const gchar * domain,
-	    G_GNUC_UNUSED const gchar * host_name,
-	    const AvahiAddress * address,
-	    uint16_t port, AvahiStringList * text,
-	    G_GNUC_UNUSED AvahiLookupResultFlags flags,
-	    DMAPMdnsBrowser * browser)
+_resolve_cb (AvahiServiceResolver * service_resolver,
+             G_GNUC_UNUSED AvahiIfIndex interface,
+             G_GNUC_UNUSED AvahiProtocol protocol,
+             AvahiResolverEvent event,
+             const gchar * service_name,
+             const gchar * type,
+             const gchar * domain,
+             G_GNUC_UNUSED const gchar * host_name,
+             const AvahiAddress * address,
+             uint16_t port, AvahiStringList * text,
+             G_GNUC_UNUSED AvahiLookupResultFlags flags,
+             DmapMdnsBrowser * browser)
 {
 	gchar *name = NULL;
 	gchar *pair = NULL;	/* FIXME: extract DACP-specific items into sub-class. Ensure in Howl and dns-sd code too. */
-	DMAPMdnsBrowserTransportProtocol transport_protocol = DMAP_MDNS_BROWSER_TRANSPORT_PROTOCOL_TCP; // FIXME: subclass
+	DmapMdnsServiceTransportProtocol transport_protocol = DMAP_MDNS_SERVICE_TRANSPORT_PROTOCOL_TCP; // FIXME: subclass
 	gchar host[AVAHI_ADDRESS_STR_MAX];
 	gboolean pp = FALSE;
-	DMAPMdnsBrowserService *service;
+	DmapMdnsService *service;
 
 	switch (event) {
 	case AVAHI_RESOLVER_FAILURE:
@@ -378,11 +383,13 @@ resolve_cb (AvahiServiceResolver * service_resolver,
 						pp = TRUE;
 					}
 				} else if (strcmp (key, "Machine Name") == 0) {
-					if (name == NULL)
+					if (name == NULL) {
 						name = g_strdup (value);
+					}
 				} else if (strcmp (key, "DvNm") == 0) {
-					if (name != NULL)
+					if (name != NULL) {
 						g_free (name);
+					}
 					/* Remote's name is presented as DvNm in DACP */
 					name = g_strdup (value);
 				} else if (strcmp (key, "Pair") == 0) {
@@ -391,8 +398,8 @@ resolve_cb (AvahiServiceResolver * service_resolver,
 				} else if (strcmp (key, "tp") == 0) {
 					/* RAOP transport protocol */
 					transport_protocol = strstr (value, "UDP")
-					                   ? DMAP_MDNS_BROWSER_TRANSPORT_PROTOCOL_UDP
-							   : DMAP_MDNS_BROWSER_TRANSPORT_PROTOCOL_TCP;
+					                   ? DMAP_MDNS_SERVICE_TRANSPORT_PROTOCOL_UDP
+							   : DMAP_MDNS_SERVICE_TRANSPORT_PROTOCOL_TCP;
 				}
 
 				g_free (key);
@@ -401,23 +408,28 @@ resolve_cb (AvahiServiceResolver * service_resolver,
 		}
 
 		if (name == NULL) {
-			name = g_strdup (service_name);
+			name = g_strdup(service_name);
 		}
 
 		avahi_address_snprint (host, AVAHI_ADDRESS_STR_MAX, address);
 
-		service = g_new0 (DMAPMdnsBrowserService, 1);
-		service->service_name = g_strdup (service_name);
-		service->name = name;
-		service->host = g_strdup (host);
-		service->port = port;
-		service->pair = pair; // FIXME: subclass
-		service->transport_protocol = transport_protocol; // FIXME: subclass
-		service->password_protected = pp;
+		service = g_object_new (DMAP_TYPE_MDNS_SERVICE,
+		                       "service-name", service_name,
+		                       "name", name,
+		                       "host", host,
+		                       "port", port,
+		                       "pair", pair, // FIXME: subclass.
+		                       "transport-protocol", transport_protocol, // FIXME: subclass.
+		                       "password-protected", pp,
+		                        NULL);
+
+		g_free(name);
+		g_free(pair);
+
 		browser->priv->services =
 			g_slist_append (browser->priv->services, service);
 		g_signal_emit (browser,
-			       dmap_mdns_browser_signals[SERVICE_ADDED], 0,
+			       _signals[SERVICE_ADDED], 0,
 			       service);
 		break;
 	default:
@@ -431,58 +443,61 @@ resolve_cb (AvahiServiceResolver * service_resolver,
 }
 
 static gboolean
-dmap_mdns_browser_resolve (DMAPMdnsBrowser * browser,
-			   const gchar * name, const gchar * domain)
+_resolve (DmapMdnsBrowser * browser,
+          const gchar * name, const gchar * domain)
 {
+	gboolean ok = FALSE;
 	AvahiServiceResolver *service_resolver;
 
 	service_resolver = avahi_service_resolver_new (browser->priv->client,
 						       AVAHI_IF_UNSPEC,
 						       AVAHI_PROTO_INET,
 						       name,
-						       service_type_name
-						       [browser->
-							priv->service_type],
+						       _service_type_name
+						       [browser->priv->service_type],
 						       domain,
 						       AVAHI_PROTO_UNSPEC,
 						       0,
-						       (AvahiServiceResolverCallback) resolve_cb, browser);
+						       (AvahiServiceResolverCallback) _resolve_cb, browser);
 	if (service_resolver == NULL) {
 		g_debug ("Error starting mDNS resolving using AvahiServiceResolver");
-		return FALSE;
+		goto done;
 	}
 
 	browser->priv->resolvers =
 		g_slist_prepend (browser->priv->resolvers, service_resolver);
 
-	return TRUE;
+	ok = TRUE;
+
+done:
+	return ok;
 }
 
 static void
-browser_add_service (DMAPMdnsBrowser * browser,
+_add_service (DmapMdnsBrowser * browser,
 		     const gchar * service_name, const gchar * domain)
 {
-	dmap_mdns_browser_resolve (browser, service_name, domain);
+	_resolve (browser, service_name, domain);
 }
 
 static void
-browser_remove_service (DMAPMdnsBrowser * browser, const gchar * service_name)
+_remove_service (DmapMdnsBrowser * browser, const gchar * service_name)
 {
 	g_signal_emit (browser,
-		       dmap_mdns_browser_signals[SERVICE_REMOVED],
+		       _signals[SERVICE_REMOVED],
 		       0, service_name);
 }
 
 static void
-browse_cb (G_GNUC_UNUSED AvahiServiceBrowser * service_browser,
-	   G_GNUC_UNUSED AvahiIfIndex interface,
-	   G_GNUC_UNUSED AvahiProtocol protocol,
-	   AvahiBrowserEvent event,
-	   const gchar * name,
-           G_GNUC_UNUSED const gchar * type,
-           const gchar * domain,
-	   AvahiLookupResultFlags flags,
-	   DMAPMdnsBrowser * browser)
+_browse_cb (G_GNUC_UNUSED AvahiServiceBrowser * service_browser,
+            G_GNUC_UNUSED AvahiIfIndex interface,
+            G_GNUC_UNUSED AvahiProtocol protocol,
+            AvahiBrowserEvent event,
+            const gchar * name,
+            G_GNUC_UNUSED const gchar * type,
+            const gchar * domain,
+            AvahiLookupResultFlags flags,
+            DmapMdnsBrowser * browser)
 {
 	gboolean local;
 
@@ -494,18 +509,8 @@ browse_cb (G_GNUC_UNUSED AvahiServiceBrowser * service_browser,
 	}
 
 	if (event == AVAHI_BROWSER_NEW) {
-		browser_add_service (browser, name, domain);
+		_add_service (browser, name, domain);
 	} else if (event == AVAHI_BROWSER_REMOVE) {
-		browser_remove_service (browser, name);
+		_remove_service (browser, name);
 	}
 }
-
-static void
-free_service (DMAPMdnsBrowserService * service)
-{
-	g_free (service->service_name);
-	g_free (service->name);
-	g_free (service->host);
-	g_free (service->pair);
-	g_free (service);
-}
diff --git a/libdmapsharing/dmap-mdns-browser-dnssd.c b/libdmapsharing/dmap-mdns-browser-dnssd.c
index 02823a3..1db8e02 100644
--- a/libdmapsharing/dmap-mdns-browser-dnssd.c
+++ b/libdmapsharing/dmap-mdns-browser-dnssd.c
@@ -30,9 +30,9 @@
 
 #include "dmap-mdns-browser.h"
 
-struct _DMAPMdnsBrowserPrivate
+struct _DmapMdnsBrowserPrivate
 {
-	DMAPMdnsBrowserServiceType service_type;
+	DmapMdnsServiceType service_type;
 	DNSServiceRef sd_browse_ref;
 	GSList *services;
 	GSList *backlog;
@@ -42,10 +42,10 @@ typedef struct _ServiceContext
 {
 	DNSServiceRef service_discovery_ref;
 	DNSServiceRef host_lookup_ref;
-	DMAPMdnsBrowser *browser;
+	DmapMdnsBrowser *browser;
 	DNSServiceFlags flags;
 	uint32_t interface_index;
-	DMAPMdnsBrowserService service;
+	DmapMdnsService *service;
 	gchar *domain;
 } ServiceContext;
 
@@ -56,12 +56,14 @@ enum
 	LAST_SIGNAL
 };
 
-static guint dmap_mdns_browser_signals[LAST_SIGNAL] = { 0, };
+static guint _signals[LAST_SIGNAL] = { 0, };
 
-G_DEFINE_TYPE_WITH_PRIVATE (DMAPMdnsBrowser, dmap_mdns_browser, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE (DmapMdnsBrowser,
+                            dmap_mdns_browser,
+                            G_TYPE_OBJECT);
 
 static void
-dmap_mdns_browser_init (DMAPMdnsBrowser * browser)
+dmap_mdns_browser_init (DmapMdnsBrowser * browser)
 {
 	g_assert (NULL != browser);
 
@@ -69,25 +71,12 @@ dmap_mdns_browser_init (DMAPMdnsBrowser * browser)
 }
 
 static void
-free_service (DMAPMdnsBrowserService * service)
-{
-	g_assert (NULL != service);
-
-	g_free (service->service_name);
-	g_free (service->name);
-	g_free (service->host);
-	g_free (service->pair);
-	g_free (service);
-}
-
-static void
-service_context_free (ServiceContext *ctx)
+_service_context_free (ServiceContext *ctx)
 {
 	g_assert (NULL != ctx);
 	g_assert (NULL != ctx->browser);
 
-	free_service (&ctx->service);
-
+	g_object_unref (&ctx->service);
 	g_object_unref (ctx->browser);
 
 	g_free (ctx->domain);
@@ -95,24 +84,44 @@ service_context_free (ServiceContext *ctx)
 }
 
 static gboolean
-signal_service_added (ServiceContext *context)
+_signal_service_added (ServiceContext *context)
 {
 	g_assert (NULL != context);
 
-	DMAPMdnsBrowserService *service;
-
-	service = g_new0 (DMAPMdnsBrowserService, 1);
+	gchar                           *service_name       = NULL;
+	gchar                           *name               = NULL;
+	gchar                           *host               = NULL;
+	uint16_t                         port               = 0;
+	gchar                           *pair               = NULL;
+	DmapMdnsServiceTransportProtocol transport_protocol = DMAP_MDNS_SERVICE_TRANSPORT_PROTOCOL_TCP;
+	gboolean                         password_protected = FALSE;
+
+	DmapMdnsService *service;
+
+	g_object_get(context->service,
+	            "service-name", &service_name,
+	            "name", &name,
+	            "host", &host,
+	            "port", &port,
+	            "pair", &pair,
+	            "transport-protocol", transport_protocol,
+	            "password-protected", password_protected,
+	             NULL);
 
 	// FIXME: The name and service_name variables need to be renamed.
 	// Wait until working on DACP because I think this is when
 	// they are different. See Avahi code.
-	service->service_name = g_strdup (context->service.service_name);
-	service->name = g_strdup (context->service.name);
-	service->host = g_strdup (context->service.host);
-	service->port = context->service.port;
-	service->pair = g_strdup (context->service.pair);
-	service->password_protected = context->service.password_protected;
-	service->transport_protocol = DMAP_MDNS_BROWSER_TRANSPORT_PROTOCOL_TCP;
+	service = g_object_new(DMAP_TYPE_MDNS_SERVICE,
+	                      "service-name", service_name,
+	                      "name", name,
+	                      "host", host,
+	                      "port", port,
+	                      "pair", pair,
+	                      "transport-protocol", transport_protocol,
+	                      "password-protected", password_protected,
+	                       NULL);
+
+	service = g_new0 (DmapMdnsService, 1);
 
 	// add to the services list
 	context->browser->priv->services =
@@ -120,13 +129,13 @@ signal_service_added (ServiceContext *context)
 
 	// notify all listeners
 	g_signal_emit (context->browser,
-		       dmap_mdns_browser_signals[SERVICE_ADDED], 0, service);
+		       _signals[SERVICE_ADDED], 0, service);
 
 	return TRUE;
 }
 
 static char *
-extract_name (const char *dns_name)
+_extract_name (const char *dns_name)
 {
         /* Turns "Children's\032Music._daap._tcp.local
 	 * into "Children's Music"
@@ -160,13 +169,13 @@ done:
 }
 
 static void
-dns_service_browse_reply (G_GNUC_UNUSED DNSServiceRef sd_ref,
-                          DNSServiceFlags flags,
-                          uint32_t interface_index,
-                          DNSServiceErrorType error_code,
-                          const char *service_name,
-                          G_GNUC_UNUSED const char *regtype,
-                          const char *domain, void *udata)
+_dns_service_browse_reply (G_GNUC_UNUSED DNSServiceRef sd_ref,
+                           DNSServiceFlags flags,
+                           uint32_t interface_index,
+                           DNSServiceErrorType error_code,
+                           const char *service_name,
+                           G_GNUC_UNUSED const char *regtype,
+                           const char *domain, void *udata)
 {
 	if (error_code != kDNSServiceErr_NoError) {
 		g_warning ("dnsServiceBrowserReply ():  fail");
@@ -177,14 +186,15 @@ dns_service_browse_reply (G_GNUC_UNUSED DNSServiceRef sd_ref,
 		goto done;
 	}
 
-	DMAPMdnsBrowser *browser = (DMAPMdnsBrowser *) udata;
+	DmapMdnsBrowser *browser = (DmapMdnsBrowser *) udata;
 
 	ServiceContext *context = g_new0 (ServiceContext, 1);
 	context->browser = g_object_ref (browser);
 	context->flags = flags;
 	context->interface_index = interface_index;
-	context->service.service_name = g_strdup (service_name);
 	context->domain = g_strdup (domain);
+	context->service = g_object_new(DMAP_TYPE_MDNS_SERVICE, NULL);
+	g_object_set(context->service, "service-name", service_name, NULL);
 
 	browser->priv->backlog = g_slist_prepend (browser->priv->backlog, context);
 
@@ -194,46 +204,48 @@ done:
 
 /*
 static void
-dns_host_resolve_reply (G_GNUC_UNUSED DNSServiceRef sd_ref,
-                        G_GNUC_UNUSED DNSServiceFlags flags,
-                        G_GNUC_UNUSED uint32_t interface_index,
-                        DNSServiceErrorType error_code,
-                        G_GNUC_UNUSED const char *hostname,
-                        const struct sockaddr *address,
-                        G_GNUC_UNUSED uint32_t ttl,
-                        void *udata)
+_dns_host_resolve_reply (G_GNUC_UNUSED DNSServiceRef sd_ref,
+                         G_GNUC_UNUSED DNSServiceFlags flags,
+                         G_GNUC_UNUSED uint32_t interface_index,
+                         DNSServiceErrorType error_code,
+                         G_GNUC_UNUSED const char *hostname,
+                         const struct sockaddr *address,
+                         G_GNUC_UNUSED uint32_t ttl,
+                         void *udata)
 {
 	ServiceContext *ctx = (ServiceContext *) udata;
 
 	if (error_code != kDNSServiceErr_NoError) {
-		g_warning ("dns_host_resolve_reply ():  fail");
+		g_warning ("_dns_host_resolve_reply ():  fail");
 		return;
 	}
 
 	switch(address->sa_family) {
 	case AF_INET: {
+		gchar host[INET_ADDRSTRLEN];
 		struct sockaddr_in *addr_in = (struct sockaddr_in *) address;
-		ctx->service.host = malloc(INET_ADDRSTRLEN);
-		inet_ntop(AF_INET, &(addr_in->sin_addr), ctx->service.host, INET_ADDRSTRLEN);
+		inet_ntop(AF_INET, &(addr_in->sin_addr), host, INET_ADDRSTRLEN);
+		g_object_set(&ctx->service, "host", host, NULL);
 		break;
 	}
 	case AF_INET6: {
+		gchar host[INET6_ADDRSTRLEN];
 		struct sockaddr_in6 *addr_in6 = (struct sockaddr_in6 *) address;
-		ctx->service.host = malloc(INET6_ADDRSTRLEN);
-		inet_ntop(AF_INET6, &(addr_in6->sin6_addr), ctx->service.host, INET6_ADDRSTRLEN);
+		inet_ntop(AF_INET6, &(addr_in6->sin6_addr), host, INET6_ADDRSTRLEN);
+		g_object_set(&ctx->service, "host", host, NULL);
 		break;
 	}
 	default:
-		ctx->service.host = NULL;
+		g_object_set(&ctx->service, "host", NULL, NULL);
 		break;
 	}
 }
 */
 
 static gboolean
-lookup_result_available_cb (G_GNUC_UNUSED GIOChannel * gio,
-                            GIOCondition condition,
-                            ServiceContext *context)
+_lookup_result_available_cb (G_GNUC_UNUSED GIOChannel * gio,
+                             GIOCondition condition,
+                             ServiceContext *context)
 {
 	gboolean fnval = FALSE;
 
@@ -242,27 +254,27 @@ lookup_result_available_cb (G_GNUC_UNUSED GIOChannel * gio,
 		goto done;
 	}
 
-	/* Obtain IP address (dns_host_resolve_reply) */
+	/* Obtain IP address (_dns_host_resolve_reply) */
 	DNSServiceErrorType err = DNSServiceProcessResult (context->host_lookup_ref);
 	if (err != kDNSServiceErr_NoError) {
 		g_warning ("Error processing DNS-SD service result");
 		goto done;
 	}
 
-	signal_service_added (context);
+	_signal_service_added (context);
 
 done:
 	DNSServiceRefDeallocate (context->host_lookup_ref);
 
 	if (NULL != context) {
-		service_context_free (context);
+		_service_context_free (context);
 	}
 
 	return fnval;
 }
 
 static gboolean
-add_host_lookup_to_event_loop (ServiceContext *context)
+_add_host_lookup_to_event_loop (ServiceContext *context)
 {
 	int dns_sd_fd = DNSServiceRefSockFD (context->host_lookup_ref);
 
@@ -270,7 +282,7 @@ add_host_lookup_to_event_loop (ServiceContext *context)
 
 	if (!g_io_add_watch (dns_sd_chan,
 	                     G_IO_IN | G_IO_HUP | G_IO_ERR,
-	                     (GIOFunc) lookup_result_available_cb, context)) {
+	                     (GIOFunc) _lookup_result_available_cb, context)) {
 		g_warning ("Error adding host lookup to event loop");
 	}
 
@@ -280,31 +292,33 @@ add_host_lookup_to_event_loop (ServiceContext *context)
 }
 
 static void
-dns_service_resolve_reply (G_GNUC_UNUSED DNSServiceRef sd_ref,
-                           DNSServiceFlags flags,
-                           uint32_t interface_index,
-                           DNSServiceErrorType error_code,
-                           const char *name,
-                           G_GNUC_UNUSED const char *host,
-                           uint16_t port,
-                           G_GNUC_UNUSED uint16_t txt_len,
-                           G_GNUC_UNUSED const char *txt_record,
-                           void *udata)
+_dns_service_resolve_reply (G_GNUC_UNUSED DNSServiceRef sd_ref,
+                            DNSServiceFlags flags,
+                            uint32_t interface_index,
+                            DNSServiceErrorType error_code,
+                            const char *name,
+                            G_GNUC_UNUSED const char *host,
+                            uint16_t port,
+                            G_GNUC_UNUSED uint16_t txt_len,
+                            G_GNUC_UNUSED const char *txt_record,
+                            void *udata)
 {
 	DNSServiceRef ref;
 	ServiceContext *ctx = (ServiceContext *) udata;
 
 	if (error_code != kDNSServiceErr_NoError) {
-		g_warning ("dns_service_resolve_reply ():  fail");
+		g_warning ("_dns_service_resolve_reply ():  fail");
 		return;
 	}
 
 	ctx->flags = flags;
 	ctx->interface_index = interface_index;
-	ctx->service.port = htons (port);
-	ctx->service.name = extract_name (name);
-	ctx->service.pair = NULL;
-	ctx->service.password_protected = FALSE;
+	g_object_set(ctx->service,
+	            "port", htons(port),
+	            "name", _extract_name (name),
+	            "pair", NULL,
+	            "password-protected", FALSE,
+	             NULL);
 
 	g_error("FIXME: Not implemented");
 /*
@@ -313,23 +327,23 @@ dns_service_resolve_reply (G_GNUC_UNUSED DNSServiceRef sd_ref,
 	                              ctx->interface_index,
 	                              kDNSServiceProtocol_IPv4,
 	                              host,
-	                             (DNSServiceGetAddrInfoReply) dns_host_resolve_reply,
+	                             (DNSServiceGetAddrInfoReply) _dns_host_resolve_reply,
 	                             (void *) ctx);
 	if (err != kDNSServiceErr_NoError) {
 		g_warning ("Error setting up DNS-SD address info handler");
-		service_context_free (ctx);
+		_service_context_free (ctx);
 	}
 */
 
 	ctx->host_lookup_ref = ref;
 
-	add_host_lookup_to_event_loop (ctx);
+	_add_host_lookup_to_event_loop (ctx);
 }
 
 static gboolean
-service_result_available_cb (G_GNUC_UNUSED GIOChannel * gio,
-                             GIOCondition condition,
-                             ServiceContext *context)
+_service_result_available_cb (G_GNUC_UNUSED GIOChannel * gio,
+                              GIOCondition condition,
+                              ServiceContext *context)
 {
 	gboolean fnval = FALSE;
 
@@ -338,7 +352,7 @@ service_result_available_cb (G_GNUC_UNUSED GIOChannel * gio,
 		goto done;
 	}
 
-	/* Obtain service description (dns_service_resolve_reply) */
+	/* Obtain service description (_dns_service_resolve_reply) */
 	DNSServiceErrorType err = DNSServiceProcessResult (context->service_discovery_ref);
 	if (err != kDNSServiceErr_NoError) {
 		g_warning ("Error processing DNS-SD service result");
@@ -352,7 +366,7 @@ done:
 }
 
 static gboolean
-add_service_discovery_to_event_loop (ServiceContext *context)
+_add_service_discovery_to_event_loop (ServiceContext *context)
 {
 	int dns_sd_fd = DNSServiceRefSockFD (context->service_discovery_ref);
 
@@ -360,7 +374,7 @@ add_service_discovery_to_event_loop (ServiceContext *context)
 
 	if (!g_io_add_watch (dns_sd_chan,
 	                     G_IO_IN | G_IO_HUP | G_IO_ERR,
-	                     (GIOFunc) service_result_available_cb, context)) {
+	                     (GIOFunc) _service_result_available_cb, context)) {
 		g_warning ("Error adding SD to event loop");
 	}
 
@@ -370,9 +384,9 @@ add_service_discovery_to_event_loop (ServiceContext *context)
 }
 
 static gboolean
-browse_result_available_cb (G_GNUC_UNUSED GIOChannel * gio,
-                            GIOCondition condition,
-                            DMAPMdnsBrowser * browser)
+_browse_result_available_cb (G_GNUC_UNUSED GIOChannel * gio,
+                             GIOCondition condition,
+                             DmapMdnsBrowser * browser)
 {
 	gboolean fnval = FALSE;
 
@@ -388,28 +402,31 @@ browse_result_available_cb (G_GNUC_UNUSED GIOChannel * gio,
 	}
 
 	while (browser->priv->backlog) {
+		gchar *service_name;
 		DNSServiceRef ref;
 		ServiceContext *ctx = (ServiceContext *) browser->priv->backlog->data;
 
+		g_object_get(ctx->service, "service-name", &service_name, NULL);
+
 		err = DNSServiceResolve (&ref,
 		                         ctx->flags,
 		                         ctx->interface_index,
-		                         ctx->service.service_name,
-		                         service_type_name[browser->priv->service_type],
+		                         service_name,
+		                         _service_type_name[browser->priv->service_type],
 		                         ctx->domain,
 		                         (DNSServiceResolveReply)
-		                         dns_service_resolve_reply,
+		                         _dns_service_resolve_reply,
 		                         (void *) ctx);
 
 		if (err != kDNSServiceErr_NoError) {
 			g_warning ("Error setting up DNS-SD resolve handler");
-			service_context_free (ctx);
+			_service_context_free (ctx);
 			continue;
 		}
 
 		ctx->service_discovery_ref = ref;
 
-		add_service_discovery_to_event_loop (ctx);
+		_add_service_discovery_to_event_loop (ctx);
 
 		browser->priv->backlog = g_slist_delete_link (browser->priv->backlog, browser->priv->backlog);
 
@@ -421,7 +438,7 @@ done:
 }
 
 static gboolean
-add_browse_to_event_loop (DMAPMdnsBrowser *browser)
+_add_browse_to_event_loop (DmapMdnsBrowser *browser)
 {
 	gboolean fnval = FALSE;
 
@@ -431,7 +448,7 @@ add_browse_to_event_loop (DMAPMdnsBrowser *browser)
 
 	if (!g_io_add_watch (dns_sd_chan,
 	                     G_IO_IN | G_IO_HUP | G_IO_ERR,
-	                     (GIOFunc) browse_result_available_cb, browser)) {
+	                     (GIOFunc) _browse_result_available_cb, browser)) {
 		g_warning ("Error adding SD to event loop");
 		goto done;
 	}
@@ -445,15 +462,15 @@ done:
 }
 
 static void
-dmap_mdns_browser_dispose (GObject * object)
+_dispose (GObject * object)
 {
-	DMAPMdnsBrowser *browser = DMAP_MDNS_BROWSER (object);
+	DmapMdnsBrowser *browser = DMAP_MDNS_BROWSER (object);
 	GSList *walk;
-	DMAPMdnsBrowserService *service;
+	DmapMdnsService *service;
 
 	for (walk = browser->priv->services; NULL != walk; walk = walk->next) {
-		service = (DMAPMdnsBrowserService *) walk->data;
-		free_service (service);
+		service = (DmapMdnsService *) walk->data;
+		g_object_unref (service);
 	}
 
 	g_slist_free (browser->priv->services);
@@ -462,54 +479,52 @@ dmap_mdns_browser_dispose (GObject * object)
 }
 
 static void
-dmap_mdns_browser_finalize (GObject * object)
+_finalize (GObject * object)
 {
 	g_signal_handlers_destroy (object);
 	G_OBJECT_CLASS (dmap_mdns_browser_parent_class)->finalize (object);
 }
 
 static void
-dmap_mdns_browser_class_init (DMAPMdnsBrowserClass * klass)
+dmap_mdns_browser_class_init (DmapMdnsBrowserClass * klass)
 {
 	GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
 	dmap_mdns_browser_parent_class = g_type_class_peek_parent (klass);
 
-	object_class->dispose = dmap_mdns_browser_dispose;
-	object_class->finalize = dmap_mdns_browser_finalize;
+	object_class->dispose  = _dispose;
+	object_class->finalize = _finalize;
 
 	// Signal makeup
-	dmap_mdns_browser_signals[SERVICE_ADDED] =
+	_signals[SERVICE_ADDED] =
 		g_signal_new ("service-added",
 			      G_TYPE_FROM_CLASS (object_class),
 			      G_SIGNAL_RUN_LAST,
-			      G_STRUCT_OFFSET (DMAPMdnsBrowserClass,
+			      G_STRUCT_OFFSET (DmapMdnsBrowserClass,
 					       service_added), NULL, NULL,
 			      NULL, G_TYPE_NONE,
-			      1, G_TYPE_POINTER);
+			      1, DMAP_TYPE_MDNS_SERVICE);
 
-	dmap_mdns_browser_signals[SERVICE_REMOVED] =
+	_signals[SERVICE_REMOVED] =
 		g_signal_new ("service-removed",
 			      G_TYPE_FROM_CLASS (object_class),
 			      G_SIGNAL_RUN_LAST,
-			      G_STRUCT_OFFSET (DMAPMdnsBrowserClass,
+			      G_STRUCT_OFFSET (DmapMdnsBrowserClass,
 					       service_removed), NULL, NULL,
 			      NULL, G_TYPE_NONE, 1,
 			      G_TYPE_STRING);
 }
 
-DMAPMdnsBrowser *
-dmap_mdns_browser_new (DMAPMdnsBrowserServiceType type)
+DmapMdnsBrowser *
+dmap_mdns_browser_new (DmapMdnsServiceType type)
 {
-	DMAPMdnsBrowser *browser_object = 0;
+	DmapMdnsBrowser *browser_object;
 
-	g_return_val_if_fail (type >= DMAP_MDNS_BROWSER_SERVICE_TYPE_INVALID
-			      && type <= DMAP_MDNS_BROWSER_SERVICE_TYPE_LAST,
-			      NULL);
+	g_assert(type >  DMAP_MDNS_SERVICE_TYPE_INVALID);
+	g_assert(type <= DMAP_MDNS_SERVICE_TYPE_LAST);
 
-	browser_object = DMAP_MDNS_BROWSER (g_object_new
-	                                   (DMAP_TYPE_MDNS_BROWSER,
-	                                    NULL));
+	browser_object =
+		DMAP_MDNS_BROWSER (g_object_new (DMAP_TYPE_MDNS_BROWSER, NULL));
 
 	browser_object->priv->service_type = type;
 
@@ -517,7 +532,7 @@ dmap_mdns_browser_new (DMAPMdnsBrowserServiceType type)
 }
 
 gboolean
-dmap_mdns_browser_start (DMAPMdnsBrowser * browser, GError ** error)
+dmap_mdns_browser_start (DmapMdnsBrowser * browser, GError ** error)
 {
 	gboolean fnval = FALSE;
 
@@ -526,14 +541,14 @@ dmap_mdns_browser_start (DMAPMdnsBrowser * browser, GError ** error)
 	browse_err = DNSServiceBrowse (&(browser->priv->sd_browse_ref),
 	                                 0,
 	                                 kDNSServiceInterfaceIndexAny,
-	                                 service_type_name[browser->priv->service_type],
+	                                 _service_type_name[browser->priv->service_type],
 	                                "",
-	                                (DNSServiceBrowseReply) dns_service_browse_reply,
+	                                (DNSServiceBrowseReply) _dns_service_browse_reply,
 	                                (void *) browser);
 
 	if (kDNSServiceErr_NoError == browse_err) {
 		fnval = TRUE;
-		add_browse_to_event_loop (browser);
+		_add_browse_to_event_loop (browser);
 	} else {
 		g_warning ("Error starting mDNS discovery using DNS-SD");
                 g_set_error (error,
@@ -546,7 +561,7 @@ dmap_mdns_browser_start (DMAPMdnsBrowser * browser, GError ** error)
 }
 
 gboolean
-dmap_mdns_browser_stop (DMAPMdnsBrowser * browser,
+dmap_mdns_browser_stop (DmapMdnsBrowser * browser,
                         G_GNUC_UNUSED GError ** error)
 {
 	if (NULL != browser->priv->sd_browse_ref) {
@@ -571,18 +586,17 @@ dmap_mdns_browser_error_quark (void)
 }
 
 const GSList *
-dmap_mdns_browser_get_services (DMAPMdnsBrowser * browser)
+dmap_mdns_browser_get_services (DmapMdnsBrowser * browser)
 {
-	g_return_val_if_fail (browser != NULL, NULL);
+	g_assert(NULL != browser);
 
 	return browser->priv->services;
 }
 
-DMAPMdnsBrowserServiceType
-dmap_mdns_browser_get_service_type (DMAPMdnsBrowser * browser)
+DmapMdnsServiceType
+dmap_mdns_browser_get_service_type (DmapMdnsBrowser * browser)
 {
-	g_return_val_if_fail (browser != NULL,
-			      DMAP_MDNS_BROWSER_SERVICE_TYPE_INVALID);
+	g_assert(NULL != browser);
 
 	return browser->priv->service_type;
 }
diff --git a/libdmapsharing/dmap-mdns-browser.h b/libdmapsharing/dmap-mdns-browser.h
index b027f47..4f92c0d 100644
--- a/libdmapsharing/dmap-mdns-browser.h
+++ b/libdmapsharing/dmap-mdns-browser.h
@@ -19,124 +19,90 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA*
  */
 
-#ifndef __DMAP_MDNS_BROWSER_H__
-#define __DMAP_MDNS_BROWSER_H__
+#ifndef _DMAP_MDNS_BROWSER_H
+#define _DMAP_MDNS_BROWSER_H
 
 #include <glib.h>
 #include <glib-object.h>
 
+#include <libdmapsharing/dmap-mdns-service.h>
+
 G_BEGIN_DECLS
+/**
+ * SECTION: dmap-mdns-browser
+ * @short_description: An mDNS browser.
+ *
+ * #DmapMdnsBrowser objects watch for DMAP shares.
+ */
+
 /**
  * DMAP_TYPE_MDNS_BROWSER:
  *
- * The type for #DMAPMdnsBrowser.
+ * The type for #DmapMdnsBrowser.
  */
 #define DMAP_TYPE_MDNS_BROWSER         (dmap_mdns_browser_get_type ())
 /**
  * DMAP_MDNS_BROWSER:
  * @o: Object which is subject to casting.
  *
- * Casts a #DMAPMdnsBrowser or derived pointer into a (DMAPMdnsBrowser *) pointer.
+ * Casts a #DmapMdnsBrowser or derived pointer into a (DmapMdnsBrowser *) pointer.
  * Depending on the current debugging level, this function may invoke
  * certain runtime checks to identify invalid casts.
  */
-#define DMAP_MDNS_BROWSER(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), DMAP_TYPE_MDNS_BROWSER, DMAPMdnsBrowser))
+#define DMAP_MDNS_BROWSER(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), DMAP_TYPE_MDNS_BROWSER, DmapMdnsBrowser))
 /**
  * DMAP_MDNS_BROWSER_CLASS:
- * @k: a valid #DMAPMdnsBrowserClass
+ * @k: a valid #DmapMdnsBrowserClass
  *
- * Casts a derived #DAAPShareClass structure into a #DAAPShareClass structure.
+ * Casts a derived #DmapMdnsBrowserClass structure into a #DmapMdnsBrowserClass structure.
  */
-#define DMAP_MDNS_BROWSER_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), DMAP_TYPE_MDNS_BROWSER, DMAPMdnsBrowserClass))
+#define DMAP_MDNS_BROWSER_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), DMAP_TYPE_MDNS_BROWSER, DmapMdnsBrowserClass))
 /**
- * IS_DMAP_MDNS_BROWSER:
+ * DMAP_IS_MDNS_BROWSER:
  * @o: Instance to check for being a %DMAP_TYPE_MDNS_BROWSER.
  *
- * Checks whether a valid #GTypeInstance pointer is of type %DAAP_TYPE_SHARE.
+ * Checks whether a valid #GTypeInstance pointer is of type %DAAP_TYPE_MDNS_BROWSER.
  */
-#define IS_DMAP_MDNS_BROWSER(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), DMAP_TYPE_MDNS_BROWSER))
+#define DMAP_IS_MDNS_BROWSER(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), DMAP_TYPE_MDNS_BROWSER))
 /**
- * IS_DMAP_MDNS_BROWSER_CLASS:
- * @k: a #DMAPMdnsBrowserClass
+ * DMAP_IS_MDNS_BROWSER_CLASS:
+ * @k: a #DmapMdnsBrowserClass
  *
- * Checks whether @k "is a" valid #DMAPMdnsBrowserClass structure of type
+ * Checks whether @k "is a" valid #DmapMdnsBrowserClass structure of type
  * %DMAP_MDNS_BROWSER or derived.
  */
-#define IS_DMAP_MDNS_BROWSER_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), DMAP_TYPE_MDNS_BROWSER))
+#define DMAP_IS_MDNS_BROWSER_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), DMAP_TYPE_MDNS_BROWSER))
 /**
  * DMAP_MDNS_BROWSER_GET_CLASS:
- * @o: a #DMAPMdnsBrowser instance.
+ * @o: a #DmapMdnsBrowser instance.
  *
- * Get the class structure associated to a #DMAPMdnsBrowser instance.
+ * Get the class structure associated to a #DmapMdnsBrowser instance.
  *
  * Returns: pointer to object class structure.
  */
-#define DMAP_MDNS_BROWSER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), DMAP_TYPE_MDNS_BROWSER, DMAPMdnsBrowserClass))
-typedef struct _DMAPMdnsBrowser DMAPMdnsBrowser;
-typedef struct _DMAPMdnsBrowserClass DMAPMdnsBrowserClass;
-typedef struct _DMAPMdnsBrowserPrivate DMAPMdnsBrowserPrivate;
-typedef struct _DMAPMdnsBrowserService DMAPMdnsBrowserService;
-
-typedef enum
-{
-	DMAP_MDNS_BROWSER_SERVICE_TYPE_INVALID = 0,
-	DMAP_MDNS_BROWSER_SERVICE_TYPE_DAAP,
-	DMAP_MDNS_BROWSER_SERVICE_TYPE_DPAP,
-	DMAP_MDNS_BROWSER_SERVICE_TYPE_DACP,
-	DMAP_MDNS_BROWSER_SERVICE_TYPE_RAOP,
-	DMAP_MDNS_BROWSER_SERVICE_TYPE_LAST = DMAP_MDNS_BROWSER_SERVICE_TYPE_RAOP
-} DMAPMdnsBrowserServiceType;
-
-// FIXME: this is only for RAOP and corresponds to the "tp" txt record.
-// This should be in a sub-class.
-typedef enum
-{
-	DMAP_MDNS_BROWSER_TRANSPORT_PROTOCOL_TCP = 0,
-	DMAP_MDNS_BROWSER_TRANSPORT_PROTOCOL_UDP,
-	DMAP_MDNS_BROWSER_TRANSPORT_PROTOCOL_LAST = DMAP_MDNS_BROWSER_TRANSPORT_PROTOCOL_UDP
-} DMAPMdnsBrowserTransportProtocol;
-
-static const char * const service_type_name[] = {
-	NULL,
-	"_daap._tcp",
-	"_dpap._tcp",
-	"_touch-remote._tcp",
-	"_raop._tcp"
-};
-
-typedef enum
-{
+#define DMAP_MDNS_BROWSER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), DMAP_TYPE_MDNS_BROWSER, DmapMdnsBrowserClass))
+
+typedef struct _DmapMdnsBrowserPrivate DmapMdnsBrowserPrivate;
+
+typedef enum {
 	DMAP_MDNS_BROWSER_ERROR_NOT_RUNNING = 0,
 	DMAP_MDNS_BROWSER_ERROR_FAILED,
-} DMAPMdnsBrowserError;
-
-struct _DMAPMdnsBrowserService
-{
-	gchar *service_name;
-	gchar *name;
-	gchar *host;
-	guint port;
-	gboolean password_protected;
-	gchar *pair;                                         // FIXME: subclass
-	DMAPMdnsBrowserTransportProtocol transport_protocol; // FIXME: subclass
-};
-
-struct _DMAPMdnsBrowserClass
-{
-	GObjectClass parent_class;
+} DmapMdnsBrowserError;
 
-	void (*service_added) (DMAPMdnsBrowser * browser,
-			       DMAPMdnsBrowserService * service);
-	void (*service_removed) (DMAPMdnsBrowser * browser,
-				 DMAPMdnsBrowserService * service);
-};
-
-struct _DMAPMdnsBrowser
-{
+typedef struct {
 	GObject object;
 
-	DMAPMdnsBrowserPrivate *priv;
-};
+	DmapMdnsBrowserPrivate *priv;
+} DmapMdnsBrowser;
+
+typedef struct {
+	GObjectClass parent_class;
+
+	void (*service_added) (DmapMdnsBrowser *browser,
+			       DmapMdnsService *service);
+	void (*service_removed) (DmapMdnsBrowser *browser,
+				 DmapMdnsService *service);
+} DmapMdnsBrowserClass;
 
 #define DMAP_MDNS_BROWSER_ERROR dmap_mdns_browser_error_quark ()
 
@@ -150,40 +116,47 @@ GType dmap_mdns_browser_get_type (void);
  *
  * Creates a new mDNS browser.
  *
- * Returns: a pointer to a DMAPMdnsBrowser.
+ * Returns: a pointer to a DmapMdnsBrowser.
  */
-DMAPMdnsBrowser *dmap_mdns_browser_new (DMAPMdnsBrowserServiceType type);
+DmapMdnsBrowser *dmap_mdns_browser_new (DmapMdnsServiceType type);
 
 /**
  * dmap_mdns_browser_start:
- * @browser: A DMAPMdnsBrowser.
+ * @browser: A DmapMdnsBrowser.
  * @error: A GError.
  *
- * Starts a DMAPMdnsBrowser.
+ * Starts a DmapMdnsBrowser.
  *
  * Returns: TRUE on success, else FALSE.
  */
-gboolean dmap_mdns_browser_start (DMAPMdnsBrowser * browser, GError ** error);
+gboolean dmap_mdns_browser_start (DmapMdnsBrowser * browser, GError ** error);
 
 /**
  * dmap_mdns_browser_stop:
- * @browser: A DMAPMdnsBrowser.
+ * @browser: A DmapMdnsBrowser.
  * @error: A GError.
  *
- * Stops a DMAPMdnsBrowser.
+ * Stops a DmapMdnsBrowser.
  *
  * Returns: TRUE on success, else FALSE.
  */
-gboolean dmap_mdns_browser_stop (DMAPMdnsBrowser * browser, GError ** error);
+gboolean dmap_mdns_browser_stop (DmapMdnsBrowser * browser, GError ** error);
 
-const GSList *dmap_mdns_browser_get_services (DMAPMdnsBrowser * browser);
-DMAPMdnsBrowserServiceType dmap_mdns_browser_get_service_type (DMAPMdnsBrowser
+/**
+ * dmap_mdns_browser_get_services:
+ * @browser: A DmapMdnsBrowser.
+ *
+ * Returns: (element-type DmapMdnsService) (transfer none): services available to @browser.
+ */
+const GSList *dmap_mdns_browser_get_services (DmapMdnsBrowser *
+						       browser);
+DmapMdnsServiceType dmap_mdns_browser_get_service_type (DmapMdnsBrowser
 							       * browser);
 
 /**
- * DMAPMdnsBrowser::service-added:
- * @browser: the #DMAPMdnsBrowser which received the signal.
- * @service: #DMAPMdnsBrowserService
+ * DmapMdnsBrowser::service-added:
+ * @browser: the #DmapMdnsBrowser which received the signal.
+ * @service: #DmapMdnsService
  *
  * Emitted each time a service becomes available to @browser
  */
diff --git a/libdmapsharing/dmap-mdns-publisher-avahi.c b/libdmapsharing/dmap-mdns-publisher-avahi.c
index 4b1644c..e5e8f71 100644
--- a/libdmapsharing/dmap-mdns-publisher-avahi.c
+++ b/libdmapsharing/dmap-mdns-publisher-avahi.c
@@ -38,11 +38,11 @@
 #include "dmap-mdns-avahi.h"
 #include "dmap-mdns-publisher.h"
 
-static void dmap_mdns_publisher_class_init (DMAPMdnsPublisherClass * klass);
-static void dmap_mdns_publisher_init (DMAPMdnsPublisher * publisher);
-static void dmap_mdns_publisher_finalize (GObject * object);
+static void dmap_mdns_publisher_class_init (DmapMdnsPublisherClass * klass);
+static void dmap_mdns_publisher_init (DmapMdnsPublisher * publisher);
+static void _finalize (GObject * object);
 
-struct DMAPMdnsPublisherService
+struct DmapMdnsPublisherService
 {
 	char *name;
 	guint port;
@@ -51,7 +51,7 @@ struct DMAPMdnsPublisherService
 	gchar **txt_records;
 };
 
-struct DMAPMdnsPublisherPrivate
+struct DmapMdnsPublisherPrivate
 {
 	AvahiClient *client;
 	AvahiEntryGroup *entry_group;
@@ -65,16 +65,13 @@ enum
 	LAST_SIGNAL
 };
 
-enum
-{
-	PROP_0
-};
-
-static guint signals[LAST_SIGNAL] = { 0, };
+static guint _signals[LAST_SIGNAL] = { 0, };
 
-G_DEFINE_TYPE_WITH_PRIVATE (DMAPMdnsPublisher, dmap_mdns_publisher, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE (DmapMdnsPublisher,
+                            dmap_mdns_publisher,
+                            G_TYPE_OBJECT);
 
-static gpointer publisher_object = NULL;
+static gpointer _publisher_object = NULL;
 
 GQuark
 dmap_mdns_publisher_error_quark (void)
@@ -89,34 +86,35 @@ dmap_mdns_publisher_error_quark (void)
 }
 
 static void
-emit_published (char *name, DMAPMdnsPublisher * publisher)
+_emit_published (char *name, DmapMdnsPublisher * publisher)
 {
-	g_signal_emit (publisher, signals[PUBLISHED], 0, name);
+	g_signal_emit (publisher, _signals[PUBLISHED], 0, name);
 }
 
 static void
-entry_group_cb (G_GNUC_UNUSED AvahiEntryGroup * group,
-		AvahiEntryGroupState state, DMAPMdnsPublisher * publisher)
+_entry_group_cb (G_GNUC_UNUSED AvahiEntryGroup * group,
+                 AvahiEntryGroupState state, DmapMdnsPublisher * publisher)
 {
 	if (state == AVAHI_ENTRY_GROUP_ESTABLISHED) {
 		g_slist_foreach (publisher->priv->service,
-				 (GFunc) emit_published, publisher);
+				 (GFunc) _emit_published, publisher);
 	} else if (state == AVAHI_ENTRY_GROUP_COLLISION) {
 		g_warning ("MDNS name collision");
 
 		/* FIXME: how to know which name collided?
-		 * g_signal_emit (publisher, signals [NAME_COLLISION], 0, publisher->priv->name);
+		 * g_signal_emit (publisher, _signals [NAME_COLLISION], 0, publisher->priv->name);
 		 */
-		g_signal_emit (publisher, signals[NAME_COLLISION], 0,
+		g_signal_emit (publisher, _signals[NAME_COLLISION], 0,
 			       "unknown");
 	}
 }
 
 static gboolean
-create_service (struct DMAPMdnsPublisherService *service,
-		DMAPMdnsPublisher * publisher, GError ** error)
+_create_service (struct DmapMdnsPublisherService *service,
+                 DmapMdnsPublisher * publisher, GError ** error)
 {
 	int ret;
+	gboolean ok = FALSE;
 	const char *password_record;
 	AvahiStringList *txt_records;
 
@@ -143,7 +141,8 @@ create_service (struct DMAPMdnsPublisherService *service,
 	ret = avahi_entry_group_add_service_strlst (publisher->
 						    priv->entry_group,
 						    AVAHI_IF_UNSPEC,
-						    AVAHI_PROTO_UNSPEC, 0,
+						    AVAHI_PROTO_UNSPEC,
+	                                            0,
 						    service->name,
 						    service->type_of_service,
 						    NULL, NULL, service->port,
@@ -158,23 +157,30 @@ create_service (struct DMAPMdnsPublisherService *service,
 			     "%s: %s",
 			     _("Could not add service"),
 			     avahi_strerror (ret));
-		return FALSE;
+		goto done;
 	}
 
-	return TRUE;
+	ok = TRUE;
+
+done:
+	return ok;
 }
 
 static gboolean
-create_services (DMAPMdnsPublisher * publisher, GError ** error)
+_create_services (DmapMdnsPublisher * publisher, GError ** error)
 {
-	GSList *ptr;
+	gboolean ok = FALSE;
+	static int suffix = 0;
+	gchar *name;
+	GSList *ptr1, *ptr2;
+	struct DmapMdnsPublisherService *service1, *service2;
 	int ret;
 
 	if (publisher->priv->entry_group == NULL) {
 		publisher->priv->entry_group =
 			avahi_entry_group_new (publisher->priv->client,
 					       (AvahiEntryGroupCallback)
-					       entry_group_cb, publisher);
+					       _entry_group_cb, publisher);
 
 		if (publisher->priv->entry_group == NULL) {
 			g_debug ("Could not create AvahiEntryGroup for publishing");
@@ -184,7 +190,7 @@ create_services (DMAPMdnsPublisher * publisher, GError ** error)
 				     "%s",
 				     _
 				     ("Could not create AvahiEntryGroup for publishing"));
-			return FALSE;
+			goto done;
 		}
 
 		dmap_mdns_avahi_set_entry_group (publisher->
@@ -193,9 +199,26 @@ create_services (DMAPMdnsPublisher * publisher, GError ** error)
 		avahi_entry_group_reset (publisher->priv->entry_group);
 	}
 
-	for (ptr = publisher->priv->service; ptr; ptr = g_slist_next (ptr)) {
-		if (!create_service (ptr->data, publisher, error)) {
-			return FALSE;
+	for (ptr1 = publisher->priv->service; ptr1; ptr1 = g_slist_next (ptr1)) {
+		service1 = ptr1->data;
+		name = service1->name;
+		for (ptr2 = publisher->priv->service; ptr2; ptr2 = g_slist_next (ptr2)) {
+			if (ptr1 == ptr2) {
+				continue;
+			}
+			service2 = ptr2->data;
+			if (!strcmp(service1->name, service2->name)
+			 && !strcmp(service1->type_of_service, service2->type_of_service)) {
+				name = g_strdup_printf("%s-%d", service1->name, suffix++);
+			}
+		}
+		if (strcmp(name, service1->name)) {
+			g_free(service1->name);
+			service1->name = name;
+			g_signal_emit (publisher, _signals[NAME_COLLISION], 0, name);
+		}
+		if (!_create_service (service1, publisher, error)) {
+			goto done;
 		}
 	}
 
@@ -208,42 +231,46 @@ create_services (DMAPMdnsPublisher * publisher, GError ** error)
 			     "%s: %s",
 			     _("Could not commit service"),
 			     avahi_strerror (ret));
-		return FALSE;
+		goto done;
 	}
 
-	return TRUE;
+	ok = TRUE;
+
+done:
+	return ok;
 }
 
 static gboolean
-refresh_services (DMAPMdnsPublisher * publisher, GError ** error)
+_refresh_services (DmapMdnsPublisher * publisher, GError ** error)
 {
-	return create_services (publisher, error);
+	return _create_services (publisher, error);
 }
 
-static struct DMAPMdnsPublisherService *
-find_service_by_port (GSList * list, guint port)
+static struct DmapMdnsPublisherService *
+_find_service_by_port (GSList * list, guint port)
 {
 	GSList *ptr;
 
 	for (ptr = list; ptr; ptr = g_slist_next (ptr)) {
 		if (port ==
-		    ((struct DMAPMdnsPublisherService *) ptr->data)->port)
+		    ((struct DmapMdnsPublisherService *) ptr->data)->port) {
 			break;
+		}
 	}
 
 	return ptr ? ptr->data : NULL;
 }
 
 gboolean
-dmap_mdns_publisher_rename_at_port (DMAPMdnsPublisher * publisher,
+dmap_mdns_publisher_rename_at_port (DmapMdnsPublisher * publisher,
 				    guint port,
 				    const char *name, GError ** error)
 {
-	struct DMAPMdnsPublisherService *ptr;
+	struct DmapMdnsPublisherService *ptr;
 
 	g_return_val_if_fail (publisher != NULL, FALSE);
 
-	ptr = find_service_by_port (publisher->priv->service, port);
+	ptr = _find_service_by_port (publisher->priv->service, port);
 
 	if (ptr == NULL) {
 		g_set_error (error,
@@ -257,21 +284,21 @@ dmap_mdns_publisher_rename_at_port (DMAPMdnsPublisher * publisher,
 	ptr->name = g_strdup (name);
 
 	if (publisher->priv->entry_group) {
-		refresh_services (publisher, error);
+		_refresh_services (publisher, error);
 	}
 
 	return TRUE;
 }
 
 gboolean
-dmap_mdns_publisher_publish (DMAPMdnsPublisher * publisher,
+dmap_mdns_publisher_publish (DmapMdnsPublisher * publisher,
 			     const char *name,
 			     guint port,
 			     const char *type_of_service,
 			     gboolean password_required,
 			     gchar ** txt_records, GError ** error)
 {
-	struct DMAPMdnsPublisherService *service;
+	struct DmapMdnsPublisherService *service;
 
 	if (publisher->priv->client == NULL) {
 		g_set_error (error,
@@ -282,7 +309,7 @@ dmap_mdns_publisher_publish (DMAPMdnsPublisher * publisher,
 		return FALSE;
 	}
 
-	service = g_new0 (struct DMAPMdnsPublisherService, 1);
+	service = g_new0 (struct DmapMdnsPublisherService, 1);
 
 	service->name = g_strdup (name);
 	service->port = port;
@@ -293,12 +320,11 @@ dmap_mdns_publisher_publish (DMAPMdnsPublisher * publisher,
 	publisher->priv->service =
 		g_slist_append (publisher->priv->service, service);
 
-	return create_services (publisher, error);
+	return _create_services (publisher, error);
 }
 
 static void
-free_service (struct DMAPMdnsPublisherService *service,
-              G_GNUC_UNUSED gpointer user_data)
+_free_service (struct DmapMdnsPublisherService *service, G_GNUC_UNUSED gpointer user_data)
 {
 	g_free (service->name);
 	g_free (service->type_of_service);
@@ -307,10 +333,10 @@ free_service (struct DMAPMdnsPublisherService *service,
 }
 
 gboolean
-dmap_mdns_publisher_withdraw (DMAPMdnsPublisher * publisher,
+dmap_mdns_publisher_withdraw (DmapMdnsPublisher * publisher,
 			      guint port, GError ** error)
 {
-	struct DMAPMdnsPublisherService *ptr;
+	struct DmapMdnsPublisherService *ptr;
 
 	if (publisher->priv->client == NULL) {
 		g_set_error (error,
@@ -323,23 +349,23 @@ dmap_mdns_publisher_withdraw (DMAPMdnsPublisher * publisher,
 
 	if (publisher->priv->entry_group == NULL
 	    || !(ptr =
-		 find_service_by_port (publisher->priv->service, port))) {
+		 _find_service_by_port (publisher->priv->service, port))) {
 		g_set_error (error, DMAP_MDNS_PUBLISHER_ERROR,
 			     DMAP_MDNS_PUBLISHER_ERROR_FAILED, "%s",
 			     _("The MDNS service is not published"));
 		return FALSE;
 	}
 
-	free_service (ptr, NULL);
 	publisher->priv->service =
 		g_slist_remove (publisher->priv->service, ptr);
+	_free_service (ptr, NULL);
 
 	if (publisher->priv->service == NULL) {
 		avahi_entry_group_reset (publisher->priv->entry_group);
 		avahi_entry_group_free (publisher->priv->entry_group);
 		publisher->priv->entry_group = NULL;
 	} else {
-		create_services (publisher, error);
+		_create_services (publisher, error);
 		if (error != NULL)
 			return FALSE;
 	}
@@ -347,36 +373,10 @@ dmap_mdns_publisher_withdraw (DMAPMdnsPublisher * publisher,
 	return TRUE;
 }
 
-static void
-dmap_mdns_publisher_set_property (GObject * object,
-				  guint prop_id,
-				  G_GNUC_UNUSED const GValue * value,
-                                  GParamSpec * pspec)
-{
-	switch (prop_id) {
-	default:
-		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-		break;
-	}
-}
-
-static void
-dmap_mdns_publisher_get_property (GObject * object,
-				  guint prop_id,
-				  G_GNUC_UNUSED GValue * value,
-                                  GParamSpec * pspec)
-{
-	switch (prop_id) {
-	default:
-		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-		break;
-	}
-}
-
 static GObject *
-dmap_mdns_publisher_constructor (GType type,
-				 guint n_construct_params,
-				 GObjectConstructParam * construct_params)
+_constructor (GType type,
+              guint n_construct_params,
+              GObjectConstructParam * construct_params)
 {
 	/* This class is a singleton. */
 	static GObject *self = NULL;
@@ -387,57 +387,57 @@ dmap_mdns_publisher_constructor (GType type,
 									 n_construct_params,
 									 construct_params);
 		g_object_add_weak_pointer (self, (gpointer) & self);
-		return self;
+		goto done;
 	}
 
-	return g_object_ref (self);
+	self = g_object_ref (self);
+
+done:
+	return self;
 }
 
 static void
-dmap_mdns_publisher_class_init (DMAPMdnsPublisherClass * klass)
+dmap_mdns_publisher_class_init (DmapMdnsPublisherClass * klass)
 {
 	GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
-	object_class->constructor = dmap_mdns_publisher_constructor;
-	object_class->finalize = dmap_mdns_publisher_finalize;
-	object_class->get_property = dmap_mdns_publisher_get_property;
-	object_class->set_property = dmap_mdns_publisher_set_property;
+	object_class->constructor  = _constructor;
+	object_class->finalize     = _finalize;
 
-	signals[PUBLISHED] =
+	_signals[PUBLISHED] =
 		g_signal_new ("published",
 			      G_TYPE_FROM_CLASS (object_class),
 			      G_SIGNAL_RUN_LAST,
-			      G_STRUCT_OFFSET (DMAPMdnsPublisherClass,
+			      G_STRUCT_OFFSET (DmapMdnsPublisherClass,
 					       published), NULL, NULL,
 			      NULL, G_TYPE_NONE, 1,
 			      G_TYPE_STRING);
-	signals[NAME_COLLISION] =
+	_signals[NAME_COLLISION] =
 		g_signal_new ("name-collision",
 			      G_TYPE_FROM_CLASS (object_class),
 			      G_SIGNAL_RUN_LAST,
-			      G_STRUCT_OFFSET (DMAPMdnsPublisherClass,
+			      G_STRUCT_OFFSET (DmapMdnsPublisherClass,
 					       name_collision), NULL, NULL,
 			      NULL, G_TYPE_NONE, 1,
 			      G_TYPE_STRING);
 }
 
 static void
-dmap_mdns_publisher_init (DMAPMdnsPublisher * publisher)
+dmap_mdns_publisher_init (DmapMdnsPublisher * publisher)
 {
 	publisher->priv = dmap_mdns_publisher_get_instance_private(publisher);
-
 	publisher->priv->client = dmap_mdns_avahi_get_client ();
 	publisher->priv->entry_group = NULL;
 	publisher->priv->service = NULL;
 }
 
 static void
-dmap_mdns_publisher_finalize (GObject * object)
+_finalize (GObject * object)
 {
-	DMAPMdnsPublisher *publisher;
+	DmapMdnsPublisher *publisher;
 
-	g_return_if_fail (object != NULL);
-	g_return_if_fail (IS_DMAP_MDNS_PUBLISHER (object));
+	g_assert(NULL != object);
+	g_assert(DMAP_IS_MDNS_PUBLISHER (object));
 
 	publisher = DMAP_MDNS_PUBLISHER (object);
 
@@ -458,26 +458,26 @@ dmap_mdns_publisher_finalize (GObject * object)
 	 * avahi_client_free (publisher->priv->client);
 	 */
 
-	g_slist_foreach (publisher->priv->service, (GFunc) free_service,
+	g_slist_foreach (publisher->priv->service, (GFunc) _free_service,
 			 NULL);
 	g_slist_free (publisher->priv->service);
 
-	publisher_object = NULL;
+	_publisher_object = NULL;
 
 	G_OBJECT_CLASS (dmap_mdns_publisher_parent_class)->finalize (object);
 }
 
-DMAPMdnsPublisher *
+DmapMdnsPublisher *
 dmap_mdns_publisher_new (void)
 {
-	if (publisher_object) {
-		g_object_ref (publisher_object);
+	if (_publisher_object) {
+		g_object_ref (_publisher_object);
 	} else {
-		publisher_object =
+		_publisher_object =
 			g_object_new (DMAP_TYPE_MDNS_PUBLISHER, NULL);
-		g_object_add_weak_pointer (publisher_object,
-					   (gpointer *) & publisher_object);
+		g_object_add_weak_pointer (_publisher_object,
+					   (gpointer *) &_publisher_object);
 	}
 
-	return DMAP_MDNS_PUBLISHER (publisher_object);
+	return DMAP_MDNS_PUBLISHER (_publisher_object);
 }
diff --git a/libdmapsharing/dmap-mdns-publisher-dnssd.c b/libdmapsharing/dmap-mdns-publisher-dnssd.c
index a40d3d0..da17af5 100644
--- a/libdmapsharing/dmap-mdns-publisher-dnssd.c
+++ b/libdmapsharing/dmap-mdns-publisher-dnssd.c
@@ -26,8 +26,7 @@
 
 #include "dmap-mdns-publisher.h"
 
-struct DMAPMdnsPublisherPrivate
-{
+struct DmapMdnsPublisherPrivate {
 	DNSServiceRef	 sdref;
         char            *name;
 };
@@ -38,24 +37,27 @@ enum {
 	LAST_SIGNAL
 };
 
-static guint signals [LAST_SIGNAL] = { 0, };
+static guint _signals[LAST_SIGNAL] = { 0, };
 
-G_DEFINE_TYPE_WITH_PRIVATE (DMAPMdnsPublisher, dmap_mdns_publisher, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (DmapMdnsPublisher,
+                            dmap_mdns_publisher,
+                            G_TYPE_OBJECT);
 
-static gpointer publisher_object = NULL;
+static gpointer _publisher_object = NULL;
 
 GQuark
 dmap_mdns_publisher_error_quark (void)
 {        static GQuark quark = 0;
-        if (!quark)
+        if (!quark) {
                 quark = g_quark_from_static_string ("dmap_mdns_publisher_error");
+	}
 
         return quark;
 }
 
 gboolean
-dmap_mdns_publisher_rename_at_port (G_GNUC_UNUSED DMAPMdnsPublisher *publisher,
-				    G_GNUC_UNUSED guint	             port,
+dmap_mdns_publisher_rename_at_port (G_GNUC_UNUSED DmapMdnsPublisher *publisher,
+				    G_GNUC_UNUSED guint	       port,
                                     G_GNUC_UNUSED const char        *name,
                                     G_GNUC_UNUSED GError           **error)
 {
@@ -108,7 +110,7 @@ _build_txt_record(gboolean password_required, gchar **txt_records, uint16_t *txt
 }
 
 gboolean
-dmap_mdns_publisher_publish (DMAPMdnsPublisher *publisher,
+dmap_mdns_publisher_publish (DmapMdnsPublisher *publisher,
                              const char          *name,
                              guint                port,
                              const char          *type_of_service,
@@ -143,13 +145,13 @@ dmap_mdns_publisher_publish (DMAPMdnsPublisher *publisher,
                              "%s: %d",
                              "Error publishing via DNSSD", dns_err);
 		if (dns_err == kDNSServiceErr_NameConflict) {
-			g_signal_emit (publisher, signals[NAME_COLLISION], 0, publisher->priv->name);
+			g_signal_emit (publisher, _signals[NAME_COLLISION], 0, publisher->priv->name);
 		}
 		fnval = FALSE;
 		goto done;
         }
 
-	g_signal_emit (publisher, signals[PUBLISHED], 0, publisher->priv->name);
+	g_signal_emit (publisher, _signals[PUBLISHED], 0, publisher->priv->name);
 
 done:
 	g_free(txt_record);
@@ -158,9 +160,9 @@ done:
 }
 
 gboolean
-dmap_mdns_publisher_withdraw (G_GNUC_UNUSED DMAPMdnsPublisher *publisher,
-			      G_GNUC_UNUSED                    guint port,
-                              G_GNUC_UNUSED GError           **error)
+dmap_mdns_publisher_withdraw (G_GNUC_UNUSED DmapMdnsPublisher *publisher,
+			      G_GNUC_UNUSED guint port,
+                              G_GNUC_UNUSED GError             **error)
 {
 	g_error ("Not implemented");
 
@@ -168,10 +170,10 @@ dmap_mdns_publisher_withdraw (G_GNUC_UNUSED DMAPMdnsPublisher *publisher,
 }
 
 static void
-dmap_mdns_publisher_set_property (GObject      *object,
-                                  guint         prop_id,
-                                  G_GNUC_UNUSED const GValue *value,
-                                  GParamSpec   *pspec)
+_set_property (GObject      *object,
+               guint         prop_id,
+               G_GNUC_UNUSED const GValue *value,
+               GParamSpec   *pspec)
 {
         switch (prop_id) {
         default:
@@ -181,10 +183,10 @@ dmap_mdns_publisher_set_property (GObject      *object,
 }
 
 static void
-dmap_mdns_publisher_get_property (GObject    *object,
-                                  guint       prop_id,
-                                  G_GNUC_UNUSED GValue *value,
-                                  GParamSpec *pspec)
+_get_property (GObject    *object,
+               guint       prop_id,
+               G_GNUC_UNUSED GValue *value,
+               GParamSpec *pspec)
 {
         switch (prop_id) {
         default:
@@ -194,12 +196,12 @@ dmap_mdns_publisher_get_property (GObject    *object,
 }
 
 static void
-dmap_mdns_publisher_finalize (GObject *object)
+_finalize (GObject *object)
 {
-        DMAPMdnsPublisher *publisher;
+        DmapMdnsPublisher *publisher;
 
-        g_return_if_fail (object != NULL);
-        g_return_if_fail (IS_DMAP_MDNS_PUBLISHER (object));
+	g_assert(NULL != object);
+	g_assert(DMAP_IS_MDNS_PUBLISHER(object));
 
         publisher = DMAP_MDNS_PUBLISHER (object);
 
@@ -211,29 +213,29 @@ dmap_mdns_publisher_finalize (GObject *object)
 }
 
 static void
-dmap_mdns_publisher_class_init (DMAPMdnsPublisherClass *klass)
+dmap_mdns_publisher_class_init (DmapMdnsPublisherClass *klass)
 {
         GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
-        object_class->finalize     = dmap_mdns_publisher_finalize;
-        object_class->get_property = dmap_mdns_publisher_get_property;
-        object_class->set_property = dmap_mdns_publisher_set_property;
+        object_class->finalize     = _finalize;
+        object_class->get_property = _get_property;
+        object_class->set_property = _set_property;
 
-	signals [PUBLISHED] =
+	_signals [PUBLISHED] =
                 g_signal_new ("published",
                               G_TYPE_FROM_CLASS (object_class),
                               G_SIGNAL_RUN_LAST,
-			      G_STRUCT_OFFSET (DMAPMdnsPublisherClass, published),
+			      G_STRUCT_OFFSET (DmapMdnsPublisherClass, published),
                               NULL,
                               NULL,
                               NULL,
                               G_TYPE_NONE,
                               1, G_TYPE_STRING);
-        signals [NAME_COLLISION] =
+        _signals [NAME_COLLISION] =
                 g_signal_new ("name-collision",
                               G_TYPE_FROM_CLASS (object_class),
                               G_SIGNAL_RUN_LAST,
-			      G_STRUCT_OFFSET (DMAPMdnsPublisherClass, name_collision),
+			      G_STRUCT_OFFSET (DmapMdnsPublisherClass, name_collision),
                               NULL,
                               NULL,
                               NULL,
@@ -242,21 +244,21 @@ dmap_mdns_publisher_class_init (DMAPMdnsPublisherClass *klass)
 }
 
 static void
-dmap_mdns_publisher_init (DMAPMdnsPublisher *publisher)
+dmap_mdns_publisher_init (DmapMdnsPublisher *publisher)
 {
 	publisher->priv = dmap_mdns_publisher_get_instance_private(publisher);
 }
 
-DMAPMdnsPublisher *
+DmapMdnsPublisher *
 dmap_mdns_publisher_new (void)
 {
-        if (publisher_object) {
-                g_object_ref (publisher_object);
+        if (_publisher_object) {
+                g_object_ref (_publisher_object);
         } else {
-                publisher_object = g_object_new (DMAP_TYPE_MDNS_PUBLISHER, NULL);
-                g_object_add_weak_pointer (publisher_object,
-                                           (gpointer *) &publisher_object);
+                _publisher_object = g_object_new (DMAP_TYPE_MDNS_PUBLISHER, NULL);
+                g_object_add_weak_pointer (_publisher_object,
+                                           (gpointer *) &_publisher_object);
         }
 
-        return DMAP_MDNS_PUBLISHER (publisher_object);
+        return DMAP_MDNS_PUBLISHER (_publisher_object);
 }
diff --git a/libdmapsharing/dmap-mdns-publisher.h b/libdmapsharing/dmap-mdns-publisher.h
index 25a3db5..da8290e 100644
--- a/libdmapsharing/dmap-mdns-publisher.h
+++ b/libdmapsharing/dmap-mdns-publisher.h
@@ -21,42 +21,39 @@
  *
  */
 
-#ifndef __DMAP_MDNS_PUBLISHER_H
-#define __DMAP_MDNS_PUBLISHER_H
+#ifndef _DMAP_MDNS_PUBLISHER_H
+#define _DMAP_MDNS_PUBLISHER_H
 
 #include <glib.h>
 #include <glib-object.h>
 
 G_BEGIN_DECLS
 #define DMAP_TYPE_MDNS_PUBLISHER         (dmap_mdns_publisher_get_type ())
-#define DMAP_MDNS_PUBLISHER(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), DMAP_TYPE_MDNS_PUBLISHER, DMAPMdnsPublisher))
-#define DMAP_MDNS_PUBLISHER_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), DMAP_TYPE_MDNS_PUBLISHER, DMAPMdnsPublisherClass))
-#define IS_DMAP_MDNS_PUBLISHER(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), DMAP_TYPE_MDNS_PUBLISHER))
-#define IS_DMAP_MDNS_PUBLISHER_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), DMAP_TYPE_MDNS_PUBLISHER))
-#define DMAP_MDNS_PUBLISHER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), DMAP_TYPE_MDNS_PUBLISHER, DMAPMdnsPublisherClass))
-typedef struct DMAPMdnsPublisherPrivate DMAPMdnsPublisherPrivate;
+#define DMAP_MDNS_PUBLISHER(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), DMAP_TYPE_MDNS_PUBLISHER, DmapMdnsPublisher))
+#define DMAP_MDNS_PUBLISHER_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), DMAP_TYPE_MDNS_PUBLISHER, DmapMdnsPublisherClass))
+#define DMAP_IS_MDNS_PUBLISHER(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), DMAP_TYPE_MDNS_PUBLISHER))
+#define DMAP_IS_MDNS_PUBLISHER_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), DMAP_TYPE_MDNS_PUBLISHER))
+#define DMAP_MDNS_PUBLISHER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), DMAP_TYPE_MDNS_PUBLISHER, DmapMdnsPublisherClass))
+typedef struct DmapMdnsPublisherPrivate DmapMdnsPublisherPrivate;
 
-typedef struct
-{
+typedef struct {
 	GObject object;
 
-	DMAPMdnsPublisherPrivate *priv;
-} DMAPMdnsPublisher;
+	DmapMdnsPublisherPrivate *priv;
+} DmapMdnsPublisher;
 
-typedef struct
-{
+typedef struct {
 	GObjectClass parent_class;
 
-	void (*published) (DMAPMdnsPublisher * publisher, const char *name);
-	void (*name_collision) (DMAPMdnsPublisher * publisher,
+	void (*published) (DmapMdnsPublisher * publisher, const char *name);
+	void (*name_collision) (DmapMdnsPublisher * publisher,
 				const char *name);
-} DMAPMdnsPublisherClass;
+} DmapMdnsPublisherClass;
 
-typedef enum
-{
+typedef enum {
 	DMAP_MDNS_PUBLISHER_ERROR_NOT_RUNNING,
 	DMAP_MDNS_PUBLISHER_ERROR_FAILED,
-} DMAPMdnsPublisherError;
+} DmapMdnsPublisherError;
 
 #define DMAP_MDNS_PUBLISHER_ERROR dmap_mdns_publisher_error_quark ()
 
@@ -64,19 +61,19 @@ GQuark dmap_mdns_publisher_error_quark (void);
 
 GType dmap_mdns_publisher_get_type (void);
 
-DMAPMdnsPublisher *dmap_mdns_publisher_new (void);
-gboolean dmap_mdns_publisher_publish (DMAPMdnsPublisher * publisher,
+DmapMdnsPublisher *dmap_mdns_publisher_new (void);
+gboolean dmap_mdns_publisher_publish (DmapMdnsPublisher * publisher,
 				      const char *name,
 				      guint port,
 				      const char *type_of_service,
 				      gboolean password_required,
 				      gchar ** txt_records, GError ** error);
-gboolean dmap_mdns_publisher_rename_at_port (DMAPMdnsPublisher * publisher,
+gboolean dmap_mdns_publisher_rename_at_port (DmapMdnsPublisher * publisher,
 					     guint port,
 					     const char *name,
 					     GError ** error);
-gboolean dmap_mdns_publisher_withdraw (DMAPMdnsPublisher * publisher,
+gboolean dmap_mdns_publisher_withdraw (DmapMdnsPublisher * publisher,
 				       guint port, GError ** error);
 
 G_END_DECLS
-#endif /* __DMAP_MDNS_PUBLISHER_H */
+#endif /* _DMAP_MDNS_PUBLISHER_H */
diff --git a/libdmapsharing/dmap-mdns-service.c b/libdmapsharing/dmap-mdns-service.c
new file mode 100644
index 0000000..d0d1514
--- /dev/null
+++ b/libdmapsharing/dmap-mdns-service.c
@@ -0,0 +1,250 @@
+/*
+ * Copyright (C) 2014 W. Michael Petullo <mike@flyn.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA*
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <libdmapsharing/dmap.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include <glib.h>
+#include <glib/gi18n.h>
+#include <glib-object.h>
+
+struct _DmapMdnsServicePrivate {
+	gchar *service_name;
+        gchar *name;
+        gchar *host;
+        guint port;
+        gboolean password_protected;
+        gchar *pair;                                         // FIXME: subclass
+        DmapMdnsServiceTransportProtocol transport_protocol; // FIXME: subclass
+};
+
+enum {
+        PROP_0,
+        PROP_SERVICE_NAME,
+        PROP_NAME,
+        PROP_HOST,
+        PROP_PORT,
+        PROP_PASSWORD_PROTECTED,
+        PROP_PAIR,
+        PROP_TRANSPORT_PROTOCOL
+};
+
+static void
+_set_property (GObject *object,
+               guint prop_id,
+               const GValue *value,
+               GParamSpec *pspec)
+{
+	DmapMdnsService *service = DMAP_MDNS_SERVICE (object);
+
+	switch (prop_id) {
+	case PROP_SERVICE_NAME:
+		g_free (service->priv->service_name);
+		service->priv->service_name = g_value_dup_string (value);
+		break;
+	case PROP_NAME:
+		g_free (service->priv->name);
+		service->priv->name = g_value_dup_string (value);
+		break;
+	case PROP_HOST:
+		g_free (service->priv->host);
+		service->priv->host = g_value_dup_string (value);
+		break;
+	case PROP_PORT:
+		service->priv->port = g_value_get_uint (value);
+		break;
+	case PROP_PASSWORD_PROTECTED:
+		service->priv->password_protected = g_value_get_boolean (value);
+		break;
+	case PROP_PAIR:
+		g_free (service->priv->pair);
+		service->priv->pair = g_value_dup_string (value);
+		break;
+	case PROP_TRANSPORT_PROTOCOL:
+		service->priv->transport_protocol = g_value_get_uint (value);
+		break;
+	default:
+		G_OBJECT_WARN_INVALID_PROPERTY_ID (object,
+						   prop_id,
+						   pspec);
+		break;
+	}
+}
+
+static void
+_get_property (GObject *object,
+               guint prop_id,
+               GValue *value,
+               GParamSpec *pspec)
+{
+	DmapMdnsService *service = DMAP_MDNS_SERVICE (object);
+
+	switch (prop_id) {
+	case PROP_SERVICE_NAME:
+		g_value_set_string (value, service->priv->service_name);
+		break;
+	case PROP_NAME:
+		g_value_set_string (value, service->priv->name);
+		break;
+	case PROP_HOST:
+		g_value_set_string (value, service->priv->host);
+		break;
+	case PROP_PORT:
+		g_value_set_uint (value, service->priv->port);
+		break;
+	case PROP_PASSWORD_PROTECTED:
+		g_value_set_boolean (value, service->priv->password_protected);
+		break;
+	case PROP_PAIR:
+		g_value_set_string (value, service->priv->pair);
+		break;
+	case PROP_TRANSPORT_PROTOCOL:
+		g_value_set_uint (value, service->priv->transport_protocol);
+		break;
+	default:
+		G_OBJECT_WARN_INVALID_PROPERTY_ID (object,
+						   prop_id,
+						   pspec);
+		break;
+	}
+}
+
+static void _dispose (GObject * object);
+static void _finalize (GObject * object);
+
+G_DEFINE_TYPE_WITH_PRIVATE (DmapMdnsService,
+                            dmap_mdns_service,
+                            G_TYPE_OBJECT);
+
+static void
+dmap_mdns_service_class_init (DmapMdnsServiceClass * klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+	object_class->dispose = _dispose;
+	object_class->finalize = _finalize;
+	object_class->set_property = _set_property;
+	object_class->get_property = _get_property;
+
+	dmap_mdns_service_parent_class = g_type_class_peek_parent (klass);
+
+	g_object_class_install_property (object_class,
+                                         PROP_SERVICE_NAME,
+                                         g_param_spec_string ("service-name",
+                                                              "Service Name",
+                                                              "Service Name",
+                                                              NULL,
+                                                              G_PARAM_READWRITE));
+
+	g_object_class_install_property (object_class,
+                                         PROP_NAME,
+                                         g_param_spec_string ("name",
+                                                              "Name",
+                                                              "Name",
+                                                              NULL,
+                                                              G_PARAM_READWRITE));
+
+	g_object_class_install_property (object_class,
+                                         PROP_HOST,
+                                         g_param_spec_string ("host",
+                                                              "Host",
+                                                              "Host",
+                                                              NULL,
+                                                              G_PARAM_READWRITE));
+
+	g_object_class_install_property (object_class,
+                                         PROP_PORT,
+                                         g_param_spec_uint ("port",
+                                                            "Port",
+                                                            "Port",
+                                                            0,
+	                                                    G_MAXINT,
+                                                            0,
+                                                            G_PARAM_READWRITE));
+
+	g_object_class_install_property (object_class,
+                                         PROP_PASSWORD_PROTECTED,
+                                         g_param_spec_boolean ("password-protected",
+                                                               "Password Protected",
+                                                               "Password Protected",
+                                                               FALSE,
+                                                               G_PARAM_READWRITE));
+
+	g_object_class_install_property (object_class,
+                                         PROP_PAIR,
+                                         g_param_spec_string ("pair",
+                                                              "Pair",
+                                                              "Pair",
+                                                              NULL,
+                                                              G_PARAM_READWRITE));
+
+	g_object_class_install_property (object_class,
+                                         PROP_TRANSPORT_PROTOCOL,
+                                         g_param_spec_uint ("transport-protocol",
+                                                            "Transport Protocol",
+                                                            "Transport Protocol",
+	                                                    DMAP_MDNS_SERVICE_TRANSPORT_PROTOCOL_TCP,
+	                                                    DMAP_MDNS_SERVICE_TRANSPORT_PROTOCOL_LAST,
+	                                                    DMAP_MDNS_SERVICE_TRANSPORT_PROTOCOL_TCP,
+                                                            G_PARAM_READWRITE));
+}
+
+static void
+dmap_mdns_service_init (DmapMdnsService * service)
+{
+	service->priv = dmap_mdns_service_get_instance_private(service);
+}
+
+static void
+_dispose (GObject * object)
+{
+	G_OBJECT_CLASS (dmap_mdns_service_parent_class)->dispose (object);
+}
+
+static void
+_finalize (GObject * object)
+{
+	DmapMdnsService *service = DMAP_MDNS_SERVICE (object);
+
+	g_signal_handlers_destroy (object);
+
+	if (service->priv->service_name) {
+		g_free (service->priv->service_name);
+	}
+
+	if (service->priv->name) {
+		g_free (service->priv->name);
+	}
+
+	if (service->priv->host) {
+		g_free (service->priv->host);
+	}
+
+	if (service->priv->pair) {
+		g_free (service->priv->pair);
+	}
+
+	G_OBJECT_CLASS (dmap_mdns_service_parent_class)->finalize (object);
+}
diff --git a/libdmapsharing/dmap-mdns-service.h b/libdmapsharing/dmap-mdns-service.h
new file mode 100644
index 0000000..d22d9bc
--- /dev/null
+++ b/libdmapsharing/dmap-mdns-service.h
@@ -0,0 +1,132 @@
+/*
+ * Copyright (C) 2014 W. Michael Petullo <mike@flyn.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA*
+ */
+
+#ifndef _DMAP_MDNS_SERVICE_H
+#define _DMAP_MDNS_SERVICE_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+/**
+ * SECTION: dmap-mdns-service
+ * @short_description: An mDNS service.
+ *
+ * #DmapMdnsService objects advertise DMAP shares.
+ */
+
+/**
+ * DMAP_TYPE_MDNS_SERVICE:
+ *
+ * The type for #DmapMdnsService.
+ */
+#define DMAP_TYPE_MDNS_SERVICE         (dmap_mdns_service_get_type ())
+/**
+ * DMAP_MDNS_SERVICE:
+ * @o: Object which is subject to casting.
+ *
+ * Casts a #DmapMdnsService or derived pointer into a (DmapMdnsService *) pointer.
+ * Depending on the current debugging level, this function may invoke
+ * certain runtime checks to identify invalid casts.
+ */
+#define DMAP_MDNS_SERVICE(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), DMAP_TYPE_MDNS_SERVICE, DmapMdnsService))
+/**
+ * DMAP_MDNS_SERVICE_CLASS:
+ * @k: a valid #DmapMdnsServiceClass
+ *
+ * Casts a derived #DmapMdnsServiceClass structure into a #DmapMdnsServiceClass structure.
+ */
+#define DMAP_MDNS_SERVICE_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), DMAP_TYPE_MDNS_SERVICE, DmapMdnsServiceClass))
+/**
+ * DMAP_IS_MDNS_SERVICE:
+ * @o: Instance to check for being a %DMAP_TYPE_MDNS_SERVICE.
+ *
+ * Checks whether a valid #GTypeInstance pointer is of type %DAAP_TYPE_MDNS_SERVICE.
+ */
+#define DMAP_IS_MDNS_SERVICE(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), DMAP_TYPE_MDNS_SERVICE))
+/**
+ * DMAP_IS_MDNS_SERVICE_CLASS:
+ * @k: a #DmapMdnsServiceClass
+ *
+ * Checks whether @k "is a" valid #DmapMdnsServiceClass structure of type
+ * %DMAP_MDNS_SERVICE or derived.
+ */
+#define DMAP_IS_MDNS_SERVICE_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), DMAP_TYPE_MDNS_SERVICE))
+/**
+ * DMAP_MDNS_SERVICE_GET_CLASS:
+ * @o: a #DmapMdnsService instance.
+ *
+ * Get the class structure associated to a #DmapMdnsService instance.
+ *
+ * Returns: pointer to object class structure.
+ */
+#define DMAP_MDNS_SERVICE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), DMAP_TYPE_MDNS_SERVICE, DmapMdnsServiceClass))
+
+typedef struct _DmapMdnsServicePrivate DmapMdnsServicePrivate;
+
+/**
+ * DmapMdnsServiceType:
+ * @DMAP_MDNS_SERVICE_TYPE_INVALID: an invalid service type
+ * @DMAP_MDNS_SERVICE_TYPE_DAAP: a DAAP service type
+ * @DMAP_MDNS_SERVICE_TYPE_DPAP: a DPAP service type
+ * @DMAP_MDNS_SERVICE_TYPE_DACP: a DACP service type
+ * @DMAP_MDNS_SERVICE_TYPE_RAOP: a RAOP service type
+ * @DMAP_MDNS_SERVICE_TYPE_LAST: an invalid service type
+ *
+ * Enum values used to specify the service type.
+ *
+ */
+typedef enum {
+	DMAP_MDNS_SERVICE_TYPE_INVALID = 0,
+	DMAP_MDNS_SERVICE_TYPE_DAAP,
+	DMAP_MDNS_SERVICE_TYPE_DPAP,
+	DMAP_MDNS_SERVICE_TYPE_DACP,
+	DMAP_MDNS_SERVICE_TYPE_RAOP,
+	DMAP_MDNS_SERVICE_TYPE_LAST = DMAP_MDNS_SERVICE_TYPE_RAOP
+} DmapMdnsServiceType;
+
+// FIXME: this is only for RAOP and corresponds to the "tp" txt record.
+// This should be in a sub-class.
+typedef enum {
+	DMAP_MDNS_SERVICE_TRANSPORT_PROTOCOL_TCP = 0,
+	DMAP_MDNS_SERVICE_TRANSPORT_PROTOCOL_UDP,
+	DMAP_MDNS_SERVICE_TRANSPORT_PROTOCOL_LAST = DMAP_MDNS_SERVICE_TRANSPORT_PROTOCOL_UDP
+} DmapMdnsServiceTransportProtocol;
+
+static const char * const _service_type_name[] = {
+	NULL,
+	"_daap._tcp",
+	"_dpap._tcp",
+	"_touch-remote._tcp",
+	"_raop._tcp"
+};
+
+typedef struct {
+	GObjectClass parent_class;
+} DmapMdnsServiceClass;
+
+typedef struct {
+	GObject object;
+
+	DmapMdnsServicePrivate *priv;
+} DmapMdnsService;
+
+GType dmap_mdns_service_get_type (void);
+
+G_END_DECLS
+#endif
diff --git a/libdmapsharing/dmap-private-utils.c b/libdmapsharing/dmap-private-utils.c
index a905899..02e6669 100644
--- a/libdmapsharing/dmap-private-utils.c
+++ b/libdmapsharing/dmap-private-utils.c
@@ -22,10 +22,8 @@
 
 #include "dmap-private-utils.h"
 
-#define DMAP_SHARE_CHUNK_SIZE 16384
-
 void
-dmap_write_next_chunk (SoupMessage * message, ChunkData * cd)
+dmap_private_utils_write_next_chunk (SoupServerMessage * message, ChunkData * cd)
 {
 	gssize read_size;
 	GError *error = NULL;
@@ -36,7 +34,7 @@ dmap_write_next_chunk (SoupMessage * message, ChunkData * cd)
 					 chunk,
 					 DMAP_SHARE_CHUNK_SIZE, NULL, &error);
 	if (read_size > 0) {
-		soup_message_body_append (message->response_body,
+		soup_message_body_append (soup_server_message_get_response_body(message),
 					  SOUP_MEMORY_TAKE, chunk, read_size);
 		g_debug ("Read/wrote %"G_GSSIZE_FORMAT" bytes.", read_size);
 	} else {
@@ -47,16 +45,20 @@ dmap_write_next_chunk (SoupMessage * message, ChunkData * cd)
 		}
 		g_free (chunk);
 		g_debug ("Wrote 0 bytes, sending message complete.");
-		soup_message_body_complete (message->response_body);
+		soup_message_body_complete (soup_server_message_get_response_body(message));
 	}
-	soup_server_unpause_message (cd->server, message);
+	soup_server_message_unpause (message);
 }
 
 void
-dmap_chunked_message_finished (G_GNUC_UNUSED SoupMessage * message,
-                               ChunkData * cd)
+dmap_private_utils_chunked_message_finished (G_GNUC_UNUSED SoupServerMessage * message, ChunkData * cd)
 {
 	g_debug ("Finished sending chunked file.");
 	g_input_stream_close (cd->stream, NULL, NULL);
+
+	if (cd->original_stream) {
+		g_input_stream_close (cd->original_stream, NULL, NULL);
+	}
+
 	g_free (cd);
 }
diff --git a/libdmapsharing/dmap-private-utils.h b/libdmapsharing/dmap-private-utils.h
index b0a6acc..f800189 100644
--- a/libdmapsharing/dmap-private-utils.h
+++ b/libdmapsharing/dmap-private-utils.h
@@ -17,8 +17,8 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA*
  */
 
-#ifndef __DMAP_PRIVATE_UTILS_H__
-#define __DMAP_PRIVATE_UTILS_H__
+#ifndef _DMAP_PRIVATE_UTILS_H
+#define _DMAP_PRIVATE_UTILS_H
 
 #include <glib.h>
 #include <libsoup/soup.h>
@@ -26,6 +26,9 @@
 #include <libdmapsharing/dmap-config.h>
 
 G_BEGIN_DECLS
+
+#define DMAP_SHARE_CHUNK_SIZE 16384
+
 #if DMAP_HAVE_UNALIGNED_ACCESS
 #define _DMAP_GET(__data, __size, __end) \
     (GUINT##__size##_FROM_##__end (* ((guint##__size *) (__data))))
@@ -59,10 +62,11 @@ G_BEGIN_DECLS
 {
 	SoupServer *server;
 	GInputStream *stream;
+	GInputStream *original_stream;
 } ChunkData;
 
-void   dmap_write_next_chunk (SoupMessage * message, ChunkData * cd);
-void   dmap_chunked_message_finished (SoupMessage * message, ChunkData * cd);
+void   dmap_private_utils_write_next_chunk (SoupServerMessage * message, ChunkData * cd);
+void   dmap_private_utils_chunked_message_finished (SoupServerMessage * message, ChunkData * cd);
 
 G_END_DECLS
 #endif
diff --git a/libdmapsharing/dmap-record-factory.c b/libdmapsharing/dmap-record-factory.c
index dcdf574..6e87bcb 100644
--- a/libdmapsharing/dmap-record-factory.c
+++ b/libdmapsharing/dmap-record-factory.c
@@ -1,5 +1,5 @@
 /*
- *  Database interface for a DMAPRecord Factory
+ *  Database interface for a DmapRecord Factory
  *
  *  Copyright (C) 2008 W. Michael Petullo <mike@flyn.org>
  *
@@ -20,43 +20,25 @@
 
 #include <libdmapsharing/dmap-record-factory.h>
 
-static gint dmap_record_factory_init_count = 0;
-
 static void
-dmap_record_factory_init (G_GNUC_UNUSED DMAPRecordFactoryIface * iface)
+dmap_record_factory_default_init (G_GNUC_UNUSED DmapRecordFactoryInterface * iface)
 {
-	dmap_record_factory_init_count++;
 }
 
-static void
-dmap_record_factory_finalize (G_GNUC_UNUSED DMAPRecordFactoryIface * iface)
-{
-	dmap_record_factory_init_count--;
-}
+G_DEFINE_INTERFACE(DmapRecordFactory, dmap_record_factory, G_TYPE_OBJECT)
 
-/* FIXME: No G_DEFINE_INTERFACE available in GObject headers: */
-GType
-dmap_record_factory_get_type (void)
+DmapRecord *
+dmap_record_factory_create (DmapRecordFactory *factory,
+                            gpointer user_data,
+                            GError **error)
 {
-	static GType object_type = 0;
+	DmapRecord *record = DMAP_RECORD_FACTORY_GET_INTERFACE
+		(factory)->create (factory,
+		                   user_data,
+		                   error);
 
-	if (!object_type) {
-		static const GTypeInfo object_info = {
-			class_size:     sizeof (DMAPRecordFactoryIface),
-			base_init:     (GBaseInitFunc) dmap_record_factory_init,
-			base_finalize: (GBaseFinalizeFunc) dmap_record_factory_finalize
-		};
-		object_type =
-			g_type_register_static (G_TYPE_INTERFACE,
-						"DMAPRecordFactory",
-						&object_info, 0);
-	}
-	return object_type;
-}
+	g_assert((NULL == record && (NULL == error || NULL != *error))
+	      || (NULL != record && (NULL == error || NULL == *error)));
 
-DMAPRecord *
-dmap_record_factory_create (DMAPRecordFactory * factory, gpointer user_data)
-{
-	return DMAP_RECORD_FACTORY_GET_INTERFACE (factory)->create (factory,
-								    user_data);
+	return record;
 }
diff --git a/libdmapsharing/dmap-record-factory.h b/libdmapsharing/dmap-record-factory.h
index d6773b7..c243c5e 100644
--- a/libdmapsharing/dmap-record-factory.h
+++ b/libdmapsharing/dmap-record-factory.h
@@ -1,5 +1,5 @@
 /*
- *  Database interface for a DMAPRecord factory
+ *  Database interface for a DmapRecord factory
  *
  *  Copyright (C) 2008 W. Michael Petullo <mike@flyn.org>
  *
@@ -18,74 +18,84 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef __DMAP_RECORD_FACTORY_H
-#define __DMAP_RECORD_FACTORY_H
+#ifndef _DMAP_RECORD_FACTORY_H
+#define _DMAP_RECORD_FACTORY_H
 
 #include <glib-object.h>
 
 #include <libdmapsharing/dmap-record.h>
 
 G_BEGIN_DECLS
+/**
+ * SECTION: dmap-record-factory
+ * @short_description: A factory for DmapRecord objects.
+ *
+ * #DmapRecordFactory is a factory capable of creating #DmapRecord objects.
+ */
+
 /**
  * DMAP_TYPE_RECORD_FACTORY:
  *
- * The type for #DMAPRecordFactory.
+ * The type for #DmapRecordFactory.
  */
 #define DMAP_TYPE_RECORD_FACTORY (dmap_record_factory_get_type ())
 /**
  * DMAP_RECORD_FACTORY:
  * @o: Object which is subject to casting.
  *
- * Casts a #DMAPRecordFactory or derived pointer into a (DMAPRecordFactory *)
+ * Casts a #DmapRecordFactory or derived pointer into a (DmapRecordFactory *)
  * pointer. Depending on the current debugging level, this function may invoke
  * certain runtime checks to identify invalid casts.
  */
 #define DMAP_RECORD_FACTORY(o)	 (G_TYPE_CHECK_INSTANCE_CAST ((o), \
-				  DMAP_TYPE_RECORD_FACTORY, DMAPRecordFactory))
+				  DMAP_TYPE_RECORD_FACTORY, DmapRecordFactory))
 /**
- * IS_DMAP_RECORD_FACTORY:
+ * DMAP_IS_RECORD_FACTORY:
  * @o: Instance to check for being a %DMAP_TYPE_RECORD_FACTORY.
  *
  * Checks whether a valid #GTypeInstance pointer is of type
  * %DMAP_TYPE_RECORD_FACTORY.
  */
-#define IS_DMAP_RECORD_FACTORY(o)(G_TYPE_CHECK_INSTANCE_TYPE ((o), \
+#define DMAP_IS_RECORD_FACTORY(o)(G_TYPE_CHECK_INSTANCE_TYPE ((o), \
 				  DMAP_TYPE_RECORD_FACTORY))
 /**
  * DMAP_RECORD_FACTORY_GET_INTERFACE:
- * @o: a #DMAPRecordFactory instance.
+ * @o: a #DmapRecordFactory instance.
  *
- * Get the interface structure associated to a #DMAPRecordFactory instance.
+ * Get the interface structure associated to a #DmapRecordFactory instance.
  *
  * Returns: pointer to object interface structure.
  */
 #define DMAP_RECORD_FACTORY_GET_INTERFACE(o) \
 				 (G_TYPE_INSTANCE_GET_INTERFACE ((o), \
 				  DMAP_TYPE_RECORD_FACTORY, \
-				  DMAPRecordFactoryIface))
-typedef struct _DMAPRecordFactory DMAPRecordFactory;
-typedef struct _DMAPRecordFactoryIface DMAPRecordFactoryIface;
+				  DmapRecordFactoryInterface))
+typedef struct _DmapRecordFactory DmapRecordFactory;
+typedef struct _DmapRecordFactoryInterface DmapRecordFactoryInterface;
 
-struct _DMAPRecordFactoryIface
+struct _DmapRecordFactoryInterface
 {
 	GTypeInterface parent;
 
-	DMAPRecord *(*create) (DMAPRecordFactory * factory,
-			       gpointer user_data);
+	DmapRecord *(*create) (DmapRecordFactory * factory,
+	                       gpointer user_data,
+	                       GError **error);
 };
 
 GType dmap_record_factory_get_type (void);
 
 /**
  * dmap_record_factory_create:
- * @factory: A DMAPRecordFactory.
+ * @factory: A DmapRecordFactory.
  * @user_data: Some piece of data that may be used to initialize return value.
+ * @error: return location for a GError, or NULL.
  *
- * Returns: a new DMAPRecord as read from path.
+ * Returns: (transfer full): a new DmapRecord, else NULL with error set.
  */
-DMAPRecord *dmap_record_factory_create (DMAPRecordFactory * factory,
-					gpointer user_data);
+DmapRecord *dmap_record_factory_create (DmapRecordFactory * factory,
+					gpointer user_data,
+                                        GError **error);
 
-#endif /* __DMAP_RECORD_FACTORY_H */
+#endif /* _DMAP_RECORD_FACTORY_H */
 
 G_END_DECLS
diff --git a/libdmapsharing/dmap-record.c b/libdmapsharing/dmap-record.c
index 3facae0..3ce273a 100644
--- a/libdmapsharing/dmap-record.c
+++ b/libdmapsharing/dmap-record.c
@@ -20,50 +20,21 @@
 
 #include <libdmapsharing/dmap-record.h>
 
-static gint dmap_record_init_count = 0;
-
-static void
-dmap_record_init (G_GNUC_UNUSED DMAPRecordIface * iface)
-{
-	dmap_record_init_count++;
-}
-
 static void
-dmap_record_finalize (G_GNUC_UNUSED DMAPRecordIface * iface)
+dmap_record_default_init (G_GNUC_UNUSED DmapRecordInterface * iface)
 {
-	dmap_record_init_count--;
 }
 
-/* FIXME: No G_DEFINE_INTERFACE available in GObject headers: */
-GType
-dmap_record_get_type (void)
-{
-	static GType object_type = 0;
-
-	if (!object_type) {
-		static const GTypeInfo object_info = {
-			class_size:     sizeof (DMAPRecordIface),
-			base_init:     (GBaseInitFunc) dmap_record_init,
-			base_finalize: (GBaseFinalizeFunc) dmap_record_finalize
-		};
-		object_type =
-			g_type_register_static (G_TYPE_INTERFACE,
-						"DMAPRecord",
-						&object_info, 0);
-		g_type_interface_add_prerequisite (object_type,
-						   G_TYPE_OBJECT);
-	}
-	return object_type;
-}
+G_DEFINE_INTERFACE(DmapRecord, dmap_record, G_TYPE_OBJECT)
 
-GByteArray *
-dmap_record_to_blob (DMAPRecord * record)
+GArray *
+dmap_record_to_blob (DmapRecord * record)
 {
 	return DMAP_RECORD_GET_INTERFACE (record)->to_blob (record);
 }
 
 gboolean
-dmap_record_set_from_blob (DMAPRecord * record, GByteArray * blob)
+dmap_record_set_from_blob (DmapRecord * record, GArray * blob)
 {
 	return DMAP_RECORD_GET_INTERFACE (record)->set_from_blob (record,
 								  blob);
diff --git a/libdmapsharing/dmap-record.h b/libdmapsharing/dmap-record.h
index a7856a8..598b1a4 100644
--- a/libdmapsharing/dmap-record.h
+++ b/libdmapsharing/dmap-record.h
@@ -18,87 +18,90 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef __DMAP_RECORD_H
-#define __DMAP_RECORD_H
+#ifndef _DMAP_RECORD_H
+#define _DMAP_RECORD_H
 
 #include <glib-object.h>
 
 G_BEGIN_DECLS
+
+/**
+ * SECTION: dmap-record
+ * @short_description: An abstract parent to the various record classes.
+ *
+ * #DmapRecord provides an abstract parent to the #DmapAvRecord and #DmapImageRecord classes.
+ */
+
 /**
  * DMAP_TYPE_RECORD:
  *
- * The type for #DMAPRecord.
+ * The type for #DmapRecord.
  */
 #define DMAP_TYPE_RECORD	     (dmap_record_get_type ())
 /**
  * DMAP_RECORD:
  * @o: Object which is subject to casting.
  *
- * Casts a #DMAPRecord or derived pointer into a (DMAPRecord *) pointer.
+ * Casts a #DmapRecord or derived pointer into a (DmapRecord *) pointer.
  * Depending on the current debugging level, this function may invoke
  * certain runtime checks to identify invalid casts.
  */
 #define DMAP_RECORD(o)		     (G_TYPE_CHECK_INSTANCE_CAST ((o), \
-				      DMAP_TYPE_RECORD, DMAPRecord))
+				      DMAP_TYPE_RECORD, DmapRecord))
 /**
- * IS_DMAP_RECORD:
+ * DMAP_IS_RECORD:
  * @o: Instance to check for being a %DMAP_TYPE_RECORD.
  *
  * Checks whether a valid #GTypeInstance pointer is of type %DMAP_TYPE_RECORD.
  */
-#define IS_DMAP_RECORD(o)	     (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
+#define DMAP_IS_RECORD(o)	     (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
 				      DMAP_TYPE_RECORD))
 /**
  * DMAP_RECORD_GET_INTERFACE:
- * @o: a #DAAPRecord instance.
+ * @o: a #DmapAvRecord instance.
  *
- * Get the class structure associated to a #DAAPRecord instance.
+ * Get the class structure associated to a #DmapAvRecord instance.
  *
  * Returns: pointer to object class structure.
  */
 #define DMAP_RECORD_GET_INTERFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), \
-				      DMAP_TYPE_RECORD, DMAPRecordIface))
-typedef struct _DMAPRecord DMAPRecord;
-typedef struct _DMAPRecordIface DMAPRecordIface;
+				      DMAP_TYPE_RECORD, DmapRecordInterface))
+typedef struct _DmapRecord DmapRecord;
 
-struct _DMAPRecordIface
-{
+typedef struct {
 	GTypeInterface parent;
 
-	GByteArray *(*to_blob) (DMAPRecord * record);
-	gboolean   (*set_from_blob) (DMAPRecord * record, GByteArray * blob);
-};
-
-typedef unsigned long long bitwise;
+	GArray *(*to_blob) (DmapRecord * record);
+	gboolean   (*set_from_blob) (DmapRecord * record, GArray * blob);
+} DmapRecordInterface;
 
-typedef enum
-{
+typedef enum {
 	DMAP_MEDIA_KIND_MUSIC = 1,
 	DMAP_MEDIA_KIND_MOVIE = 2,
 	DMAP_MEDIA_KIND_PODCAST = 32,
 	DMAP_MEDIA_KIND_TV_SHOW = 64 
-} DMAPMediaKind;
+} DmapMediaKind;
 
 GType dmap_record_get_type (void);
 
 /**
  * dmap_record_to_blob:
- * @record: A DMAPRecord.
+ * @record: A DmapRecord.
  *
- * Returns: A byte array representation of the record.
+ * Returns: (element-type guint8) (transfer container): A byte array representation of the record.
  */
-GByteArray *dmap_record_to_blob (DMAPRecord * record);
+GArray *dmap_record_to_blob (DmapRecord * record);
 
 /**
- * dmap_record_from_blob:
+ * dmap_record_set_from_blob:
  * @record: The record to set.
- * @blob:   A byte array representation of a record.
+ * @blob: (element-type guint8): A byte array representation of a record.
  *
  * Returns: True on success, else false.
  */
-gboolean dmap_record_set_from_blob (DMAPRecord * record,
-                                    GByteArray * blob);
+gboolean dmap_record_set_from_blob (DmapRecord * record,
+                                    GArray * blob);
 
-#endif /* __DMAP_RECORD_H */
+#endif /* _DMAP_RECORD_H */
 
 G_END_DECLS
diff --git a/libdmapsharing/dmap-share-private.h b/libdmapsharing/dmap-share-private.h
new file mode 100644
index 0000000..478776b
--- /dev/null
+++ b/libdmapsharing/dmap-share-private.h
@@ -0,0 +1,64 @@
+/* Header for DMAP (e.g., iTunes Music or iPhoto Picture) sharing
+ *
+ * Copyright (C) 2005 Charles Schmidt <cschmidt2@emich.edu>
+ *
+ * Modifications Copyright (C) 2008 W. Michael Petullo <mike@flyn.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ */
+
+#ifndef _DMAP_SHARE_PRIVATE_H
+#define _DMAP_SHARE_PRIVATE_H
+
+#include <glib-object.h>
+
+#include <libsoup/soup.h>
+
+#include <libdmapsharing/dmap-share.h>
+#include <libdmapsharing/dmap-mdns-publisher.h>
+#include <libdmapsharing/dmap-container-record.h>
+
+G_BEGIN_DECLS
+
+/* Non-virtual methods */
+guint dmap_share_get_auth_method (DmapShare * share);
+
+gboolean dmap_share_session_id_validate (DmapShare * share,
+                                         SoupServerMessage * message,
+                                         GHashTable * query,
+                                         guint32 * id);
+
+gboolean dmap_share_client_requested (DmapBits bits, gint field);
+
+void dmap_share_message_set_from_dmap_structure (DmapShare * share,
+						  SoupServerMessage * message,
+						  GNode * structure);
+
+GSList *dmap_share_build_filter (gchar * filterstr);
+
+void dmap_share_login (DmapShare * share,
+                       SoupServerMessage * message,
+                       const char *path,
+                       GHashTable * query);
+
+/* Virtual methods: MDNS callbacks */
+void dmap_share_name_collision (DmapShare * share,
+				 DmapMdnsPublisher * publisher,
+				 const char *name);
+
+#endif /* _DMAP_SHARE_PRIVATE_H */
+
+G_END_DECLS
diff --git a/libdmapsharing/dmap-share.c b/libdmapsharing/dmap-share.c
index dc82417..efc67dd 100644
--- a/libdmapsharing/dmap-share.c
+++ b/libdmapsharing/dmap-share.c
@@ -23,12 +23,14 @@
 #include "config.h"
 
 #include <time.h>
+#include <stdarg.h>
 #include <string.h>
 #include <stdlib.h>
 
 #include <glib/gi18n.h>
 
 #include <libdmapsharing/dmap.h>
+#include <libdmapsharing/dmap-share-private.h>
 #include <libdmapsharing/dmap-structure.h>
 
 #define TYPE_OF_SERVICE "_daap._tcp"
@@ -37,14 +39,6 @@
 #define DMAP_VERSION 2.0
 #define DAAP_VERSION 3.0
 #define DMAP_TIMEOUT 1800
-#define DMAP_STATUS_OK 200
-
-typedef enum
-{
-	DMAP_SHARE_AUTH_METHOD_NONE = 0,
-	DMAP_SHARE_AUTH_METHOD_NAME_AND_PASSWORD = 1,
-	DMAP_SHARE_AUTH_METHOD_PASSWORD = 2
-} DMAPShareAuthMethod;
 
 enum
 {
@@ -60,7 +54,22 @@ enum
 	PROP_TXT_RECORDS
 };
 
-struct DMAPSharePrivate
+enum
+{
+	ERROR,
+	LAST_SIGNAL
+};
+
+static guint _signals[LAST_SIGNAL] = { 0, };
+
+typedef struct {
+	gchar *name;
+	gint64 group_id;
+	gchar *artist;
+	int count;
+} GroupInfo;
+
+struct DmapSharePrivate
 {
 	gchar *name;
 	guint port;
@@ -71,20 +80,20 @@ struct DMAPSharePrivate
 	 */
 	char *transcode_mimetype;
 
-	DMAPShareAuthMethod auth_method;
+	DmapShareAuthMethod auth_method;
 
 	/* mDNS/DNS-SD publishing things */
 	gboolean server_active;
 	gboolean published;
-	DMAPMdnsPublisher *publisher;
+	DmapMdnsPublisher *publisher;
 
 	/* HTTP server things */
 	SoupServer *server;
 	guint revision_number;
 
 	/* The media database */
-	DMAPDb *db;
-	DMAPContainerDb *container_db;
+	DmapDb *db;
+	DmapContainerDb *container_db;
 
 	/* TXT-RECORDS published by mDNS */
 	gchar **txt_records;
@@ -93,40 +102,42 @@ struct DMAPSharePrivate
 };
 
 typedef void (*ShareBitwiseDestroyFunc) (void *);
-typedef DMAPRecord *(*ShareBitwiseLookupByIdFunc) (void *db, guint id);
+typedef DmapRecord *(*ShareBitwiseLookupByIdFunc) (void *db, guint id);
 
 /* FIXME: name this something else, as it is more than just share/bitwise now */
 struct share_bitwise_t
 {
-	DMAPShare *share;
-	struct MLCL_Bits mb;
+	DmapShare *share;
+	struct DmapMlclBits mb;
 	GSList *id_list;
 	guint32 size;
 
 	/* FIXME: ick, void * is DMAPDDb * or GHashTable * 
 	 * in next two fields:*/
 	void *db;
-	DMAPRecord *(*lookup_by_id) (void *db, guint id);
+	DmapRecord *(*lookup_by_id) (void *db, guint id);
 
 	void (*destroy) (void *);
 };
 
-static void dmap_share_init (DMAPShare * share);
-static void dmap_share_class_init (DMAPShareClass * klass);
+static void dmap_share_init (DmapShare * share);
+static void dmap_share_class_init (DmapShareClass * klass);
 
-G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (DMAPShare, dmap_share, G_TYPE_OBJECT)
+G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (DmapShare,
+                                     dmap_share,
+                                     G_TYPE_OBJECT);
 
 static gboolean
-_dmap_share_soup_auth_callback (G_GNUC_UNUSED SoupAuthDomain * auth_domain,
-                                SoupMessage * msg,
-                                const char *username,
-                                gpointer password,
-                                DMAPShare * share)
+_soup_auth_callback (G_GNUC_UNUSED SoupAuthDomain * auth_domain,
+                     SoupServerMessage * msg,
+                     const char *username,
+                     gpointer password,
+                     DmapShare * share)
 {
 	gboolean allowed;
 	const char *path;
 
-	path = soup_message_get_uri (msg)->path;
+	path = g_uri_get_path(soup_server_message_get_uri (msg));
 	g_debug ("Auth request for %s, user %s", path, username);
 
 	allowed = !strcmp (password, share->priv->password);
@@ -136,1943 +147,1967 @@ _dmap_share_soup_auth_callback (G_GNUC_UNUSED SoupAuthDomain * auth_domain,
 }
 
 static void
-server_info_adapter (SoupServer * server,
-		     SoupMessage * message,
-		     const char *path,
-		     GHashTable * query,
-		     SoupClientContext * context, DMAPShare * share)
+_server_info_adapter (G_GNUC_UNUSED SoupServer * server,
+                      SoupServerMessage * message,
+                      const char *path,
+                      G_GNUC_UNUSED GHashTable * query,
+                      DmapShare * share)
 {
-	DMAP_SHARE_GET_CLASS (share)->server_info (share,
-						   server,
-						   message,
-						   path, query, context);
+	DMAP_SHARE_GET_CLASS (share)->server_info (share, message, path);
 }
 
 static void
-content_codes_adapter (SoupServer * server,
-		       SoupMessage * message,
-		       const char *path,
-		       GHashTable * query,
-		       SoupClientContext * context, DMAPShare * share)
+_content_codes (DmapShare * share,
+                SoupServerMessage * message,
+                const char *path)
 {
-	DMAP_SHARE_GET_CLASS (share)->content_codes (share,
-						     server,
-						     message,
-						     path, query, context);
-}
+/* MCCR content codes response
+ * 	MSTT status
+ * 	MDCL dictionary
+ * 		MCNM content codes number
+ * 		MCNA content codes name
+ * 		MCTY content codes type
+ * 	MDCL dictionary
+ * 	...
+ */
+	const DmapContentCodeDefinition *defs;
+	guint num_defs = 0;
+	guint i;
+	GNode *mccr;
 
-static void
-login_adapter (SoupServer * server,
-	       SoupMessage * message,
-	       const char *path,
-	       GHashTable * query,
-	       SoupClientContext * context, DMAPShare * share)
-{
-	DMAP_SHARE_GET_CLASS (share)->login (share,
-					     server,
-					     message, path, query, context);
-}
+	g_debug ("Path is %s.", path);
 
-static void
-logout_adapter (SoupServer * server,
-		SoupMessage * message,
-		const char *path,
-		GHashTable * query,
-		SoupClientContext * context, DMAPShare * share)
-{
-	DMAP_SHARE_GET_CLASS (share)->logout (share,
-					      server,
-					      message, path, query, context);
+	defs = dmap_structure_content_codes (&num_defs);
+
+	mccr = dmap_structure_add (NULL, DMAP_CC_MCCR);
+	dmap_structure_add (mccr, DMAP_CC_MSTT, (gint32) SOUP_STATUS_OK);
+
+	for (i = 0; i < num_defs; i++) {
+		GNode *mdcl;
+
+		mdcl = dmap_structure_add (mccr, DMAP_CC_MDCL);
+		dmap_structure_add (mdcl, DMAP_CC_MCNM,
+				    dmap_structure_cc_string_as_int32 (defs[i].string));
+		dmap_structure_add (mdcl, DMAP_CC_MCNA, defs[i].name);
+		dmap_structure_add (mdcl, DMAP_CC_MCTY,
+				    (gint32) defs[i].type);
+	}
+
+	dmap_share_message_set_from_dmap_structure (share, message, mccr);
+	dmap_structure_destroy (mccr);
 }
 
 static void
-update_adapter (SoupServer * server,
-		SoupMessage * message,
-		const char *path,
-		GHashTable * query,
-		SoupClientContext * context, DMAPShare * share)
+_content_codes_adapter (G_GNUC_UNUSED SoupServer * server,
+                        SoupServerMessage * message,
+                        const char *path,
+                        G_GNUC_UNUSED GHashTable * query,
+                        DmapShare * share)
 {
-	DMAP_SHARE_GET_CLASS (share)->update (share,
-					      server,
-					      message, path, query, context);
+	DMAP_SHARE_GET_CLASS (share)->content_codes (share,
+						     message,
+						     path);
 }
 
 static void
-databases_adapter (SoupServer * server,
-		   SoupMessage * message,
-		   const char *path,
-		   GHashTable * query,
-		   SoupClientContext * context, DMAPShare * share)
+_login_adapter (G_GNUC_UNUSED SoupServer * server,
+	       SoupServerMessage * message,
+	       const char *path,
+	       GHashTable * query,
+               DmapShare * share)
 {
-	DMAP_SHARE_GET_CLASS (share)->databases (share,
-						 server,
-						 message,
-						 path, query, context);
+	DMAP_SHARE_GET_CLASS (share)->login (share, message, path, query);
 }
 
 static void
-ctrl_int_adapter (SoupServer * server,
-		  SoupMessage * message,
-		  const char *path,
-		  GHashTable * query,
-		  SoupClientContext * context, DMAPShare * share)
+_session_id_remove (DmapShare * share,
+                    guint32 id)
 {
-	DMAP_SHARE_GET_CLASS (share)->ctrl_int (share,
-						server,
-						message,
-						path, query, context);
+	g_hash_table_remove (share->priv->session_ids, GUINT_TO_POINTER (id));
 }
 
-gboolean
-_dmap_share_server_start (DMAPShare *share)
+static void
+_logout (DmapShare * share,
+         SoupServerMessage * message,
+         const char *path,
+         GHashTable * query)
 {
-	guint desired_port = DMAP_SHARE_GET_CLASS (share)->get_desired_port (share);
-	gboolean password_required;
-	GError *error = NULL;
-	GSList *listening_uri_list;
-	SoupURI *listening_uri;
-	gboolean ret;
-
-	share->priv->server = soup_server_new (NULL, NULL);
-
-	password_required = (share->priv->auth_method != DMAP_SHARE_AUTH_METHOD_NONE);
-
-	if (password_required) {
-		SoupAuthDomain *auth_domain;
-
-		auth_domain =
-			soup_auth_domain_basic_new (SOUP_AUTH_DOMAIN_REALM,
-						    "Music Sharing",
-						    SOUP_AUTH_DOMAIN_ADD_PATH,
-						    "/login",
-						    SOUP_AUTH_DOMAIN_ADD_PATH,
-						    "/update",
-						    SOUP_AUTH_DOMAIN_ADD_PATH,
-						    "/database",
-						    SOUP_AUTH_DOMAIN_FILTER,
-						    _dmap_share_soup_auth_filter,
-						    NULL);
-		soup_auth_domain_basic_set_auth_callback (auth_domain,
-							  (SoupAuthDomainBasicAuthCallback)
-							  _dmap_share_soup_auth_callback,
-							  g_object_ref
-							  (share),
-							  g_object_unref);
-		soup_server_add_auth_domain (share->priv->server, auth_domain);
-	}
-
-	soup_server_add_handler (share->priv->server, "/server-info",
-				 (SoupServerCallback) server_info_adapter,
-				 share, NULL);
-	soup_server_add_handler (share->priv->server, "/content-codes",
-				 (SoupServerCallback) content_codes_adapter,
-				 share, NULL);
-	soup_server_add_handler (share->priv->server, "/login",
-				 (SoupServerCallback) login_adapter,
-				 share, NULL);
-	soup_server_add_handler (share->priv->server, "/logout",
-				 (SoupServerCallback) logout_adapter,
-				 share, NULL);
-	soup_server_add_handler (share->priv->server, "/update",
-				 (SoupServerCallback) update_adapter,
-				 share, NULL);
-	soup_server_add_handler (share->priv->server, "/databases",
-				 (SoupServerCallback) databases_adapter,
-				 share, NULL);
-	soup_server_add_handler (share->priv->server, "/ctrl-int",
-				 (SoupServerCallback) ctrl_int_adapter,
-				 share, NULL);
-
-	ret = soup_server_listen_all (share->priv->server, desired_port, 0, &error);
+	int status;
+	guint32 id;
 
-	if (ret == FALSE) {
-		g_debug ("Unable to start music sharing server on port %d: %s. "
-			 "Trying any open IPv6 port", desired_port, error->message);
-		g_clear_error (&error);
+	g_debug ("Path is %s.", path);
 
-		ret = soup_server_listen_all (share->priv->server, SOUP_ADDRESS_ANY_PORT,
-					      0, &error);
-	}
+	if (dmap_share_session_id_validate
+	    (share, message, query, &id)) {
+		_session_id_remove (share, id);
 
-	listening_uri_list = soup_server_get_uris (share->priv->server);
-	if (ret == FALSE || listening_uri_list == NULL) {
-		g_warning ("Unable to start music sharing server on any port.");
-		return FALSE;
+		status = SOUP_STATUS_NO_CONTENT;
+	} else {
+		status = SOUP_STATUS_FORBIDDEN;
 	}
 
-	/* We can only expose one port, so no point checking more than one URI
-	 * here. Maybe it somehow is listening on a different port for IPv4 vs.
-	 * IPv6, but there's not much we can do.
-	 */
-	listening_uri = listening_uri_list->data;
-	share->priv->port = soup_uri_get_port (listening_uri);
-	g_slist_free_full (listening_uri_list, (GDestroyNotify) soup_uri_free);
-
-	g_debug ("Started DMAP server on port %u", share->priv->port);
-
-	/* using direct since there is no g_uint_hash or g_uint_equal */
-	share->priv->session_ids =
-		g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL,
-				       g_free);
+	soup_server_message_set_status (message, status, NULL);
+}
 
-	share->priv->server_active = TRUE;
+static void
+_logout_adapter (G_GNUC_UNUSED SoupServer * server,
+                 SoupServerMessage * message,
+                 const char *path,
+                 GHashTable * query,
+                 DmapShare * share)
+{
+	DMAP_SHARE_GET_CLASS (share)->logout (share, message, path, query);
+}
 
-	return TRUE;
+static guint
+_get_revision_number (DmapShare * share)
+{
+	return share->priv->revision_number;
 }
 
 static gboolean
-_dmap_share_server_stop (DMAPShare * share)
+_get_revision_number_from_query (GHashTable * query,
+                                 guint * number)
 {
-	g_debug ("Stopping music sharing server on port %d",
-		 share->priv->port);
+	gboolean ok = FALSE;
+	char *revision_number_str;
+	guint revision_number;
 
-	if (share->priv->server) {
-		soup_server_disconnect (share->priv->server);
-		g_object_unref (share->priv->server);
-		share->priv->server = NULL;
+	revision_number_str = g_hash_table_lookup (query, "revision-number");
+	if (revision_number_str == NULL) {
+		g_warning
+			("Client asked for an update without a rev. number");
+		goto done;
 	}
 
-	if (share->priv->session_ids) {
-		g_hash_table_destroy (share->priv->session_ids);
-		share->priv->session_ids = NULL;
+	revision_number = strtoul (revision_number_str, NULL, 10);
+	if (number != NULL) {
+		*number = revision_number;
 	}
 
-	share->priv->server_active = FALSE;
+	ok = TRUE;
 
-	return TRUE;
+done:
+	return ok;
 }
 
-gboolean
-_dmap_share_publish_start (DMAPShare * share)
+static void
+_update (DmapShare * share,
+         SoupServerMessage * message,
+         const char *path,
+         GHashTable * query)
 {
-	GError *error;
+	guint revision_number;
 	gboolean res;
-	gboolean password_required;
-
-	password_required =
-		(share->priv->auth_method != DMAP_SHARE_AUTH_METHOD_NONE);
 
-	error = NULL;
-	res = dmap_mdns_publisher_publish (share->priv->publisher,
-					   share->priv->name,
-					   share->priv->port,
-					   DMAP_SHARE_GET_CLASS (share)->
-					   get_type_of_service (share),
-					   password_required,
-					   share->priv->txt_records, &error);
+	g_debug ("Path is %s.", path);
 
-	if (res == FALSE) {
-		if (error != NULL) {
-			g_warning
-				("Unable to notify network of media sharing: %s",
-				 error->message);
-			g_error_free (error);
-		} else {
-			g_warning
-				("Unable to notify network of media sharing");
-		}
-		return FALSE;
-	} else {
-		g_debug ("Published DMAP server information to mdns");
-	}
+	res = _get_revision_number_from_query (query, &revision_number);
 
-	return TRUE;
-}
+	if (res && revision_number != _get_revision_number (share)) {
+		/* MUPD update response
+		 *      MSTT status
+		 *      MUSR server revision
+		 */
+		GNode *mupd;
 
-static gboolean
-_dmap_share_publish_stop (DMAPShare * share)
-{
-	if (share->priv->publisher) {
-		gboolean res;
-		GError *error;
+		mupd = dmap_structure_add (NULL, DMAP_CC_MUPD);
+		dmap_structure_add (mupd, DMAP_CC_MSTT,
+				    (gint32) SOUP_STATUS_OK);
+		dmap_structure_add (mupd, DMAP_CC_MUSR,
+				    (gint32)
+				    _get_revision_number (share));
 
-		error = NULL;
-		res = dmap_mdns_publisher_withdraw (share->priv->publisher,
-						    share->priv->port,
-						    &error);
-		if (error != NULL) {
-			g_warning
-				("Unable to withdraw music sharing service: %s",
-				 error->message);
-			g_error_free (error);
-		}
-		return res;
+		dmap_share_message_set_from_dmap_structure (share, message,
+							     mupd);
+		dmap_structure_destroy (mupd);
+	} else {
+		/* FIXME: This seems like a bug. It just leaks the
+		 * message (and socket) without ever replying.
+		 */
+		g_object_ref (message);
+		soup_server_message_pause (message);
 	}
-
-	share->priv->published = FALSE;
-	return TRUE;
 }
 
 static void
-_dmap_share_restart (DMAPShare * share)
+_update_adapter (G_GNUC_UNUSED SoupServer * server,
+                 SoupServerMessage * message,
+                 const char *path,
+                 GHashTable * query,
+                 DmapShare * share)
 {
-	gboolean res;
-
-	_dmap_share_server_stop (share);
-	res = _dmap_share_server_start (share);
-	if (res) {
-		/* To update information just publish again */
-		_dmap_share_publish_start (share);
-	} else {
-		_dmap_share_publish_stop (share);
-	}
+	DMAP_SHARE_GET_CLASS (share)->update (share,
+					      message, path, query);
 }
 
 static void
-_dmap_share_maybe_restart (DMAPShare * share)
+_debug_param (gpointer key, gpointer val, G_GNUC_UNUSED gpointer user_data)
 {
-	if (share->priv->published) {
-		_dmap_share_restart (share);
-	}
+	g_debug ("%s %s", (char *) key, (char *) val);
 }
 
 static void
-_dmap_share_set_name (DMAPShare * share, const char *name)
+_add_playlist_to_mlcl (G_GNUC_UNUSED guint id,
+                       DmapContainerRecord * record,
+                       gpointer _mb)
 {
-	GError *error;
+	/* MLIT listing item
+	 * MIID item id
+	 * MPER persistent item id
+	 * MINM item name
+	 * MIMC item count
+	 */
+	GNode *mlit;
+	guint num_songs;
+	gchar *name;
+	struct DmapMlclBits *mb = (struct DmapMlclBits *) _mb;
 
-	g_return_if_fail (share != NULL);
+	num_songs = dmap_container_record_get_entry_count (record);
+	g_object_get (record, "name", &name, NULL);
 
-	g_free (share->priv->name);
-	share->priv->name = g_strdup (name);
+	/* FIXME: ITEM_ID, etc. is defined in DmapAvShare, so I can't use
+	 * with dmap_share_client_requested() here (see add_entry_to_mlcl())
+	 */
 
-	if (share->priv->published) {
-		error = NULL;
-		dmap_mdns_publisher_rename_at_port (share->priv->
-						    publisher,
-						    share->priv->port,
-						    name,
-						    &error);
-		if (error != NULL) {
-			g_warning ("Unable to change MDNS service name: %s",
-				   error->message);
-			g_error_free (error);
-		}
-	}
+	mlit = dmap_structure_add (mb->mlcl, DMAP_CC_MLIT);
+	dmap_structure_add (mlit, DMAP_CC_MIID,
+			    dmap_container_record_get_id (record));
+	/* we don't have a persistant ID for playlists, unfortunately */
+	dmap_structure_add (mlit, DMAP_CC_MPER,
+			    (gint64) dmap_container_record_get_id (record));
+	dmap_structure_add (mlit, DMAP_CC_MINM, name);
+	dmap_structure_add (mlit, DMAP_CC_MIMC, (gint32) num_songs);
+
+	/* FIXME: Is this getting music-specific? */
+	dmap_structure_add (mlit, DMAP_CC_FQUESCH, 0);
+	dmap_structure_add (mlit, DMAP_CC_MPCO, 0);
+	dmap_structure_add (mlit, DMAP_CC_AESP, 0);
+	dmap_structure_add (mlit, DMAP_CC_AEPP, 0);
+	dmap_structure_add (mlit, DMAP_CC_AEPS, 0);
+	dmap_structure_add (mlit, DMAP_CC_AESG, 0);
+
+	g_free (name);
+
+	return;
 }
 
 static void
-_dmap_share_set_password (DMAPShare * share, const char *password)
+_write_dmap_preamble (SoupServerMessage * message, GNode * node)
 {
-	g_return_if_fail (share != NULL);
-
-	if (share->priv->password && password &&
-	    strcmp (password, share->priv->password) == 0) {
-		return;
-	}
+	guint length;
+	gchar *data = dmap_structure_serialize (node, &length);
 
-	g_free (share->priv->password);
-	share->priv->password = g_strdup (password);
-	if (password != NULL) {
-		share->priv->auth_method = DMAP_SHARE_AUTH_METHOD_PASSWORD;
-	} else {
-		share->priv->auth_method = DMAP_SHARE_AUTH_METHOD_NONE;
-	}
-
-	_dmap_share_maybe_restart (share);
+	soup_message_body_append (soup_server_message_get_response_body(message),
+				  SOUP_MEMORY_TAKE, data, length);
+	dmap_structure_destroy (node);
 }
 
 static void
-_dmap_share_set_property (GObject * object,
-			  guint prop_id,
-			  const GValue * value, GParamSpec * pspec)
+_write_next_mlit (SoupServerMessage * message, struct share_bitwise_t *share_bitwise)
 {
-	DMAPShare *share = DMAP_SHARE (object);
+	if (share_bitwise->id_list == NULL) {
+		g_debug ("No more ID's, sending message complete.");
+		soup_message_body_complete (soup_server_message_get_response_body(message));
+	} else {
+		gchar *data = NULL;
+		guint length;
+		DmapRecord *record;
+		struct DmapMlclBits mb = { NULL, 0, NULL };
 
-	switch (prop_id) {
-	case PROP_NAME:
-		_dmap_share_set_name (share, g_value_get_string (value));
-		break;
-	case PROP_PASSWORD:
-		_dmap_share_set_password (share, g_value_get_string (value));
-		break;
-	case PROP_DB:
-		share->priv->db = (DMAPDb *) g_value_get_pointer (value);
-		break;
-	case PROP_CONTAINER_DB:
-		share->priv->container_db =
-			(DMAPContainerDb *) g_value_get_pointer (value);
-		break;
-	case PROP_TRANSCODE_MIMETYPE:
-		/* FIXME: get or dup? */
-		share->priv->transcode_mimetype = g_value_dup_string (value);
-		break;
-	case PROP_TXT_RECORDS:
-		share->priv->txt_records = g_value_dup_boxed (value);
-		break;
-	default:
-		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-		break;
+		record = share_bitwise->lookup_by_id (share_bitwise->db,
+						      GPOINTER_TO_UINT
+						      (share_bitwise->
+						       id_list->data));
+
+		mb.bits = share_bitwise->mb.bits;
+		mb.mlcl = dmap_structure_add (NULL, DMAP_CC_MLCL);
+		mb.share = share_bitwise->mb.share;
+
+		DMAP_SHARE_GET_CLASS (share_bitwise->mb.share)->
+			add_entry_to_mlcl (GPOINTER_TO_UINT(share_bitwise->id_list->data), record, &mb);
+		data = dmap_structure_serialize (g_node_first_child (mb.mlcl),
+						 &length);
+
+		soup_message_body_append (soup_server_message_get_response_body(message),
+					  SOUP_MEMORY_TAKE, data, length);
+		g_debug ("Sending ID %u.",
+			 GPOINTER_TO_UINT (share_bitwise->id_list->data));
+		dmap_structure_destroy (mb.mlcl);
+
+		share_bitwise->id_list =
+			g_slist_remove (share_bitwise->id_list,
+					share_bitwise->id_list->data);
+
+		g_object_unref (record);
 	}
+
+	soup_server_message_unpause (message);
 }
 
 static void
-_dmap_share_get_property (GObject * object,
-			  guint prop_id, GValue * value, GParamSpec * pspec)
+_group_items (G_GNUC_UNUSED gpointer key, DmapRecord * record, GHashTable * groups)
 {
-	DMAPShare *share = DMAP_SHARE (object);
+	gchar *album, *artist;
+	GroupInfo *group_info;
+	gint64 group_id;
 
-	switch (prop_id) {
-	case PROP_SERVER:
-		g_value_set_object (value, share->priv->server);
+	g_object_get (record, "songartist", &artist, "songalbum", &album,
+		      "songalbumid", &group_id, NULL);
+	if (!album) {
+		g_free (artist);
 		return;
-	case PROP_NAME:
-		g_value_set_string (value, share->priv->name);
-		break;
-	case PROP_PASSWORD:
-		g_value_set_string (value, share->priv->password);
-		break;
-	case PROP_REVISION_NUMBER:
-		g_value_set_uint (value,
-				  _dmap_share_get_revision_number
-				  (DMAP_SHARE (object)));
-		break;
-	case PROP_AUTH_METHOD:
-		g_value_set_uint (value,
-				  _dmap_share_get_auth_method
-				  (DMAP_SHARE (object)));
-		break;
-	case PROP_DB:
-		g_value_set_pointer (value, share->priv->db);
-		break;
-	case PROP_CONTAINER_DB:
-		g_value_set_pointer (value, share->priv->container_db);
-		break;
-	case PROP_TRANSCODE_MIMETYPE:
-		g_value_set_string (value, share->priv->transcode_mimetype);
-		break;
-	case PROP_TXT_RECORDS:
-		g_value_set_boxed (value, share->priv->txt_records);
-		break;
-	default:
-		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-		break;
 	}
+	group_info = g_hash_table_lookup (groups, album);
+	if (!group_info) {
+		group_info = g_new0 (GroupInfo, 1);
+		g_hash_table_insert (groups, album, group_info);
+		// They will be freed when the hash table is freed.
+		group_info->name = album;
+		group_info->artist = artist;
+		group_info->group_id = group_id;
+	} else {
+		g_free (album);
+		g_free (artist);
+	}
+	(group_info->count)++;
 }
 
-static void
-_dmap_share_finalize (GObject * object)
+static gint
+_group_info_cmp (gconstpointer group1, gconstpointer group2)
 {
-	DMAPShare *share = DMAP_SHARE (object);
+	return g_ascii_strcasecmp (((GroupInfo *) group1)->name,
+				   ((GroupInfo *) group2)->name);
+}
 
-	g_debug ("Finalizing DMAPShare");
+static DmapRecord *
+_lookup_adapter (GHashTable * ht, guint id)
+{
+	/* NOTE: each time this is called by _write_next_mlit(), the
+	 * returned value will be unref'ed by _write_next_mlit(). We
+	 * also need to destroy the GHashTable, so bump up the reference
+	 * count so that both can happen. */
+	return g_object_ref (g_hash_table_lookup (ht, GUINT_TO_POINTER (id)));
+}
 
-	if (share->priv->published) {
-		_dmap_share_publish_stop (share);
-	}
+static void
+_accumulate_mlcl_size_and_ids (guint id,
+                               DmapRecord * record,
+                               struct share_bitwise_t *share_bitwise)
+{
+	share_bitwise->id_list = g_slist_append (share_bitwise->id_list, GUINT_TO_POINTER(id));
 
-	if (share->priv->server_active) {
-		_dmap_share_server_stop (share);
-	}
+	/* Make copy and set mlcl to NULL so real MLCL does not get changed */
+	struct DmapMlclBits mb_copy = share_bitwise->mb;
 
-	g_free (share->priv->name);
-	g_free (share->priv->password);
+	mb_copy.mlcl = dmap_structure_add (NULL, DMAP_CC_MLCL);;
 
-	g_object_unref (share->priv->db);
-	g_object_unref (share->priv->container_db);
+	DMAP_SHARE_GET_CLASS (share_bitwise->mb.share)->add_entry_to_mlcl (id,
+	                                                                   record,
+	                                                                  &mb_copy);
+	share_bitwise->size += dmap_structure_get_size (mb_copy.mlcl);
 
-	g_strfreev (share->priv->txt_records);
+	/* Minus eight because we do not want to add size of MLCL CC field + size field n times,
+	 * where n == number of records.
+	 */
+	share_bitwise->size -= 8;
 
-	if (share->priv->publisher) {
-		g_object_unref (share->priv->publisher);
-	}
+	/* Destroy created structures as we go. */
+	dmap_structure_destroy (mb_copy.mlcl);
+}
 
-	G_OBJECT_CLASS (dmap_share_parent_class)->finalize (object);
+static void
+_accumulate_mlcl_size_and_ids_adapter (gpointer id,
+                                       DmapRecord * record,
+                                       struct share_bitwise_t *share_bitwise)
+{
+	_accumulate_mlcl_size_and_ids(GPOINTER_TO_UINT(id),
+	                              record,
+	                              share_bitwise);
 }
 
 static void
-dmap_share_class_init (DMAPShareClass * klass)
+_chunked_message_finished (G_GNUC_UNUSED SoupServerMessage * message,
+                           struct share_bitwise_t *share_bitwise)
 {
-	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+	g_debug ("Finished sending chunked data.");
+	if (share_bitwise->destroy) {
+		share_bitwise->destroy (share_bitwise->db);
+	}
+	g_free (share_bitwise);
+}
 
-	object_class->get_property = _dmap_share_get_property;
-	object_class->set_property = _dmap_share_set_property;
-	object_class->finalize = _dmap_share_finalize;
+static DmapBits
+_parse_meta_str (const char *attrs, struct DmapMetaDataMap *mdm)
+{
+	guint i;
+	DmapBits bits = 0;
 
-	/* Pure virtual methods: */
-	klass->get_desired_port = NULL;
-	klass->get_type_of_service = NULL;
-	klass->message_add_standard_headers = NULL;
-	klass->get_meta_data_map = NULL;
-	klass->add_entry_to_mlcl = NULL;
-	klass->databases_browse_xxx = NULL;
-	klass->databases_items_xxx = NULL;
+	/* iTunes 8 uses meta=all for /databases/1/items query: */
+	if (strcmp (attrs, "all") == 0) {
+		bits = ~0;
+	} else {
+		gchar **attrsv;
 
-	/* Virtual methods: */
-	klass->content_codes = _dmap_share_content_codes;
-	klass->login = _dmap_share_login;
-	klass->logout = _dmap_share_logout;
-	klass->update = _dmap_share_update;
-	klass->published = _dmap_share_published;
-	klass->name_collision = _dmap_share_name_collision;
-	klass->databases = _dmap_share_databases;
-	klass->ctrl_int = _dmap_share_ctrl_int;
+		attrsv = g_strsplit (attrs, ",", -1);
 
-	g_object_class_install_property (object_class,
-					 PROP_SERVER,
-					 g_param_spec_object ("server",
-							      "Soup Server",
-							      "Soup server",
-							      SOUP_TYPE_SERVER,
-							      G_PARAM_READABLE));
+		for (i = 0; attrsv[i]; i++) {
+			guint j;
+			gboolean found = FALSE;
 
-	g_object_class_install_property (object_class,
-					 PROP_NAME,
-					 g_param_spec_string ("name",
-							      "Name",
-							      "Share Name",
-							      NULL,
-							      G_PARAM_READWRITE));
-	g_object_class_install_property (object_class,
-					 PROP_PASSWORD,
-					 g_param_spec_string ("password",
-							      "Authentication password",
-							      "Authentication password",
-							      NULL,
-							      G_PARAM_READWRITE));
+			for (j = 0; mdm[j].tag; j++) {
+				if (strcmp (mdm[j].tag, attrsv[i]) == 0) {
+					bits |= (((DmapBits) 1) << mdm[j].md);
+					found = TRUE;
+				}
+			}
 
-	g_object_class_install_property (object_class,
-					 PROP_REVISION_NUMBER,
-					 g_param_spec_uint ("revision_number",
-							    "Revision number",
-							    "Revision number",
-							    0,
-							    G_MAXINT,
-							    0,
-							    G_PARAM_READWRITE));
+			if (found == FALSE) {
+				g_debug ("Unknown meta request: %s",
+					 attrsv[i]);
+			}
+		}
+		g_strfreev (attrsv);
+	}
 
-	g_object_class_install_property (object_class,
-					 PROP_AUTH_METHOD,
-					 g_param_spec_uint ("auth_method",
-							    "Authentication method",
-							    "Authentication method",
-							    DMAP_SHARE_AUTH_METHOD_NONE,
-							    DMAP_SHARE_AUTH_METHOD_PASSWORD,
-							    0,
-							    G_PARAM_READWRITE));
-	g_object_class_install_property (object_class,
-					 PROP_DB,
-					 g_param_spec_pointer ("db",
-							       "DB",
-							       "DB object",
-							       G_PARAM_READWRITE
-							       |
-							       G_PARAM_CONSTRUCT_ONLY));
+	return bits;
+}
 
-	g_object_class_install_property (object_class,
-					 PROP_CONTAINER_DB,
-					 g_param_spec_pointer ("container-db",
-							       "Container DB",
-							       "Container DB object",
-							       G_PARAM_READWRITE
-							       |
-							       G_PARAM_CONSTRUCT_ONLY));
+static DmapBits
+_parse_meta (GHashTable * query, struct DmapMetaDataMap * mdm)
+{
+	DmapBits bits = 0;
+	const gchar *attrs;
 
-	g_object_class_install_property (object_class,
-					 PROP_TRANSCODE_MIMETYPE,
-					 g_param_spec_string
-					 ("transcode-mimetype",
-					  "Transcode mimetype",
-					  "Set mimetype of stream after transcoding",
-					  NULL,
-					  G_PARAM_READWRITE |
-					  G_PARAM_CONSTRUCT_ONLY));
+	attrs = g_hash_table_lookup (query, "meta");
+	if (attrs == NULL) {
+		goto done;
+	}
 
-	g_object_class_install_property (object_class,
-					 PROP_TXT_RECORDS,
-					 g_param_spec_boxed ("txt-records",
-							     "TXT-Records",
-							     "Set TXT-Records used for MDNS publishing",
-							     G_TYPE_STRV,
-							     G_PARAM_READWRITE));
-}
+	bits = _parse_meta_str (attrs, mdm);
 
-static void
-published_adapter (DMAPMdnsPublisher * publisher,
-		   const char *name, DMAPShare * share)
-{
-	DMAP_SHARE_GET_CLASS (share)->published (share, publisher, name);
+done:
+	return bits;
 }
 
 static void
-name_collision_adapter (DMAPMdnsPublisher * publisher,
-			const char *name, DMAPShare * share)
+_databases (DmapShare * share,
+            SoupServer * server,
+            SoupServerMessage * message,
+            const char *path,
+            GHashTable * query)
 {
-	DMAP_SHARE_GET_CLASS (share)->name_collision (share, publisher, name);
-}
+	const char *rest_of_path;
 
-static void
-dmap_share_init (DMAPShare * share)
-{
-	share->priv = dmap_share_get_instance_private(share);
+	g_debug ("Path is %s.", path);
+	g_hash_table_foreach (query, _debug_param, NULL);
 
-	share->priv->revision_number = 5;
-	share->priv->auth_method = DMAP_SHARE_AUTH_METHOD_NONE;
-	share->priv->publisher = dmap_mdns_publisher_new ();
+	if (!dmap_share_session_id_validate
+	    (share, message, query, NULL)) {
+		soup_server_message_set_status (message, SOUP_STATUS_FORBIDDEN, NULL);
+		goto done;
+	}
 
-	g_signal_connect_object (share->priv->publisher,
-				 "published",
-				 G_CALLBACK (published_adapter), share, 0);
-	g_signal_connect_object (share->priv->publisher,
-				 "name-collision",
-				 G_CALLBACK (name_collision_adapter),
-				 share, 0);
-}
+	rest_of_path = strchr (path + 1, '/');
 
-guint
-_dmap_share_get_auth_method (DMAPShare * share)
-{
-	return share->priv->auth_method;
-}
+	if (rest_of_path == NULL) {
+		/* AVDB server databases
+		 *      MSTT status
+		 *      MUTY update type
+		 *      MTCO specified total count
+		 *      MRCO returned count
+		 *      MLCL listing
+		 *              MLIT listing item
+		 *                      MIID item id
+		 *                      MPER persistent id
+		 *                      MINM item name
+		 *                      MIMC item count
+		 *                      MCTC container count
+		 */
+		GNode *avdb;
+		GNode *mlcl;
+		GNode *mlit;
 
-guint
-_dmap_share_get_revision_number (DMAPShare * share)
-{
-	return share->priv->revision_number;
-}
+		avdb = dmap_structure_add (NULL, DMAP_CC_AVDB);
+		dmap_structure_add (avdb, DMAP_CC_MSTT,
+				    (gint32) SOUP_STATUS_OK);
+		dmap_structure_add (avdb, DMAP_CC_MUTY, 0);
+		dmap_structure_add (avdb, DMAP_CC_MTCO, (gint32) 1);
+		dmap_structure_add (avdb, DMAP_CC_MRCO, (gint32) 1);
+		mlcl = dmap_structure_add (avdb, DMAP_CC_MLCL);
+		mlit = dmap_structure_add (mlcl, DMAP_CC_MLIT);
+		dmap_structure_add (mlit, DMAP_CC_MIID, (gint32) 1);
+		dmap_structure_add (mlit, DMAP_CC_MPER, (gint64) 1);
+		dmap_structure_add (mlit, DMAP_CC_MINM, share->priv->name);
+		dmap_structure_add (mlit, DMAP_CC_MIMC,
+				    dmap_db_count (share->priv->db));
+		dmap_structure_add (mlit, DMAP_CC_MCTC, (gint32) 1);
 
-static gboolean
-get_session_id (GHashTable * query, guint32 * id)
-{
-	char *session_id_str;
-	guint32 session_id;
+		dmap_share_message_set_from_dmap_structure (share, message,
+							     avdb);
+		dmap_structure_destroy (avdb);
+	} else if (g_ascii_strcasecmp ("/1/groups", rest_of_path) == 0) {
+		/* ADBS database songs
+		 *      MSTT status
+		 *      MUTY update type
+		 *      MTCO specified total count
+		 *      MRCO returned count
+		 *      MLCL listing
+		 *              MLIT
+		 *                      attrs
+		 *              MLIT
+		 *              ...
+		 */
 
-	session_id_str = g_hash_table_lookup (query, "session-id");
-	if (session_id_str == NULL) {
-		g_warning ("Session id not found.");
-		return FALSE;
-	}
+		GSList *filter_def;
+		gchar *record_query;
+		GHashTable *records = NULL;
+		GHashTable *groups;
+		GList *values;
+		GList *value;
+		gchar *sort_by;
+		GroupInfo *group_info;
+		GNode *agal;
+		GNode *mlcl;
+		GNode *mlit;
+		gint num;
 
-	session_id = (guint32) strtoul (session_id_str, NULL, 10);
-	if (id != NULL) {
-		*id = session_id;
-	}
-	return TRUE;
-}
+		if (g_strcmp0
+		    (g_hash_table_lookup (query, "group-type"),
+		     "albums") != 0) {
+			g_warning ("Unsupported grouping");
+			soup_server_message_set_status (message,
+						 SOUP_STATUS_INTERNAL_SERVER_ERROR, NULL);
+			goto done;
+		}
 
-gboolean
-_dmap_share_get_revision_number_from_query (GHashTable * query,
-					    guint * number)
-{
-	char *revision_number_str;
-	guint revision_number;
+		record_query = g_hash_table_lookup (query, "query");
+		filter_def = dmap_share_build_filter (record_query);
+		records =
+			dmap_db_apply_filter (DMAP_DB (share->priv->db),
+					      filter_def);
 
-	revision_number_str = g_hash_table_lookup (query, "revision-number");
-	if (revision_number_str == NULL) {
-		g_warning
-			("Client asked for an update without a rev. number");
-		return FALSE;
-	}
+		groups = g_hash_table_new_full (g_str_hash, g_str_equal,
+						g_free, g_free);
+		g_hash_table_foreach (records, (GHFunc) _group_items, groups);
 
-	revision_number = strtoul (revision_number_str, NULL, 10);
-	if (number != NULL) {
-		*number = revision_number;
-	}
-	return TRUE;
-}
+		agal = dmap_structure_add (NULL, DMAP_CC_AGAL);
+		dmap_structure_add (agal, DMAP_CC_MSTT,
+				    (gint32) SOUP_STATUS_OK);
+		dmap_structure_add (agal, DMAP_CC_MUTY, 0);
 
-gboolean
-_dmap_share_session_id_validate (DMAPShare * share,
-				 SoupClientContext * context,
-				 G_GNUC_UNUSED SoupMessage * message,
-				 GHashTable * query, guint32 * id)
-{
-	guint32 session_id;
-	gboolean res;
-	const char *addr;
-	const char *remote_address;
+		num = g_hash_table_size (groups);
+		dmap_structure_add (agal, DMAP_CC_MTCO, (gint32) num);
+		dmap_structure_add (agal, DMAP_CC_MRCO, (gint32) num);
 
-	if (id) {
-		*id = 0;
-	}
+		mlcl = dmap_structure_add (agal, DMAP_CC_MLCL);
 
-	res = get_session_id (query, &session_id);
-	if (!res) {
-		g_warning ("Validation failed: Unable to parse session id");
-		return FALSE;
-	}
+		values = g_hash_table_get_values (groups);
+		if (g_hash_table_lookup (query, "include-sort-headers")) {
+			sort_by = g_hash_table_lookup (query, "sort");
+			if (g_strcmp0 (sort_by, "album") == 0) {
+				values = g_list_sort (values, _group_info_cmp);
+			} else {
+				g_warning ("Unknown sort column: %s",
+					   sort_by);
+			}
+		}
 
-	/* check hash for remote address */
-	addr = g_hash_table_lookup (share->priv->session_ids,
-				    GUINT_TO_POINTER (session_id));
-	if (addr == NULL) {
-		g_warning
-			("Validation failed: Unable to lookup session id %u",
-			 session_id);
-		return FALSE;
-	}
+		for (value = values; value; value = g_list_next (value)) {
+			group_info = (GroupInfo *) value->data;
+			mlit = dmap_structure_add (mlcl, DMAP_CC_MLIT);
+			dmap_structure_add (mlit, DMAP_CC_MIID,
+					    (gint) group_info->group_id);
+			dmap_structure_add (mlit, DMAP_CC_MPER,
+					    group_info->group_id);
+			dmap_structure_add (mlit, DMAP_CC_MINM,
+					    group_info->name);
+			dmap_structure_add (mlit, DMAP_CC_ASAA,
+					    group_info->artist);
+			dmap_structure_add (mlit, DMAP_CC_MIMC,
+					    (gint32) group_info->count);
 
-	remote_address = soup_client_context_get_host (context);
-	g_debug ("Validating session id %u from %s matches %s",
-		 session_id, remote_address, addr);
-	if (remote_address == NULL || strcmp (addr, remote_address) != 0) {
-		g_warning
-			("Validation failed: Remote address does not match stored address");
-		return FALSE;
-	}
+			// Free this now, since the hash free func won't.
+			// Name will be freed when the hash table keys are freed.
+			g_free (group_info->artist);
+		}
 
-	if (id) {
-		*id = session_id;
-	}
+		g_list_free (values);
+		dmap_share_free_filter (filter_def);
 
-	return TRUE;
-}
+		dmap_share_message_set_from_dmap_structure (share, message,
+							     agal);
 
-static guint32
-session_id_generate (G_GNUC_UNUSED DMAPShare * share,
-                     G_GNUC_UNUSED SoupClientContext * context)
-{
-	guint32 id;
+		g_hash_table_destroy (records);
+		g_hash_table_destroy (groups);
+		dmap_structure_destroy (agal);
+	} else if (g_ascii_strcasecmp ("/1/items", rest_of_path) == 0) {
+		/* ADBS database songs
+		 *      MSTT status
+		 *      MUTY update type
+		 *      MTCO specified total count
+		 *      MRCO returned count
+		 *      MLCL listing
+		 *              MLIT
+		 *                      attrs
+		 *              MLIT
+		 *              ...
+		 */
+		GNode *adbs;
+		gchar *record_query;
+		GHashTable *records = NULL;
+		struct DmapMetaDataMap *map;
+		gint32 num_songs;
+		struct DmapMlclBits mb = { NULL, 0, NULL };
+		struct share_bitwise_t *share_bitwise;
 
-	id = g_random_int ();
+		record_query = g_hash_table_lookup (query, "query");
+		if (record_query) {
+			GSList *filter_def;
 
-	return id;
-}
+			filter_def = dmap_share_build_filter (record_query);
+			records =
+				dmap_db_apply_filter (DMAP_DB
+						      (share->priv->db),
+						      filter_def);
+			num_songs = g_hash_table_size (records);
+			g_debug ("Found %d records", num_songs);
+			dmap_share_free_filter (filter_def);
+		} else {
+			num_songs = dmap_db_count (share->priv->db);
+		}
 
-guint32
-_dmap_share_session_id_create (DMAPShare * share, SoupClientContext * context)
-{
-	guint32 id;
-	const char *addr;
-	char *remote_address;
+		map = DMAP_SHARE_GET_CLASS (share)->get_meta_data_map (share);
+		mb.bits = _parse_meta (query, map);
+		mb.share = share;
 
-	do {
-		/* create a unique session id */
-		id = session_id_generate (share, context);
-		g_debug ("Generated session id %u", id);
+		/* NOTE:
+		 * We previously simply called foreach...add_entry_to_mlcl and later serialized the entire
+		 * structure. This has the disadvantage that the entire response must be in memory before
+		 * libsoup sends it to the client.
+		 *
+		 * Now, we go through the database in multiple passes (as an interim solution):
+		 *
+		 * 1. Accumulate the eventual size of the MLCL by creating and then free'ing each MLIT.
+		 * 2. Generate the DAAP preamble ending with the MLCL (with size fudged for ADBS and MLCL).
+		 * 3. Setup libsoup response headers, etc.
+		 * 4. Setup callback to transmit DAAP preamble (_write_dmap_preamble)
+		 * 5. Setup callback to transmit MLIT's (_write_next_mlit)
+		 */
 
-		/* if already used, try again */
-		addr = g_hash_table_lookup (share->priv->session_ids,
-					    GUINT_TO_POINTER (id));
-	} while (addr != NULL);
+		/* 1: */
+		share_bitwise = g_new0 (struct share_bitwise_t, 1);
 
-	/* store session id and remote address */
-	/* FIXME, warning, this fails against libsoup-2.33.90-1.fc15.x86_64 with:
-	 * (dmapd:12917): libsoup-CRITICAL **: soup_address_get_physical: assertion `SOUP_IS_ADDRESS (addr)' failed
-	 * Is this a bug in libsoup or libdmapsharing?
-	 */
-	remote_address = g_strdup (soup_client_context_get_host (context));
-	g_hash_table_insert (share->priv->session_ids, GUINT_TO_POINTER (id),
-			     remote_address);
-
-	return id;
-}
+		share_bitwise->share = share;
+		share_bitwise->mb = mb;
+		share_bitwise->id_list = NULL;
+		share_bitwise->size = 0;
+		if (record_query) {
+			share_bitwise->db = records;
+			share_bitwise->lookup_by_id = (ShareBitwiseLookupByIdFunc)
+				_lookup_adapter;
+			share_bitwise->destroy = (ShareBitwiseDestroyFunc) g_hash_table_destroy;
+			g_hash_table_foreach (records,
+					     (GHFunc) _accumulate_mlcl_size_and_ids_adapter,
+					      share_bitwise);
+		} else {
+			share_bitwise->db = share->priv->db;
+			share_bitwise->lookup_by_id = (ShareBitwiseLookupByIdFunc) dmap_db_lookup_by_id;
+			share_bitwise->destroy = NULL;
+			dmap_db_foreach (share->priv->db,
+			                (DmapIdRecordFunc) _accumulate_mlcl_size_and_ids,
+					 share_bitwise);
+		}
 
-void
-_dmap_share_session_id_remove (DMAPShare * share,
-			       G_GNUC_UNUSED SoupClientContext * context,
-                               guint32 id)
-{
-	g_hash_table_remove (share->priv->session_ids, GUINT_TO_POINTER (id));
-}
+		/* 2: */
+		adbs = dmap_structure_add (NULL, DMAP_CC_ADBS);
+		dmap_structure_add (adbs, DMAP_CC_MSTT,
+				    (gint32) SOUP_STATUS_OK);
+		dmap_structure_add (adbs, DMAP_CC_MUTY, 0);
+		dmap_structure_add (adbs, DMAP_CC_MTCO, (gint32) num_songs);
+		dmap_structure_add (adbs, DMAP_CC_MRCO, (gint32) num_songs);
+		mb.mlcl = dmap_structure_add (adbs, DMAP_CC_MLCL);
+		dmap_structure_increase_by_predicted_size (adbs,
+							   share_bitwise->
+							   size);
+		dmap_structure_increase_by_predicted_size (mb.mlcl,
+							   share_bitwise->
+							   size);
 
-void
-_dmap_share_message_set_from_dmap_structure (DMAPShare * share,
-					     SoupMessage * message,
-					     GNode * structure)
-{
-	gchar *resp;
-	guint length;
+		/* 3: */
+		/* Free memory after each chunk sent out over network. */
+		soup_message_body_set_accumulate (soup_server_message_get_response_body(message),
+						  FALSE);
+		soup_message_headers_append (soup_server_message_get_response_headers(message),
+					     "Content-Type",
+					     "application/x-dmap-tagged");
+		DMAP_SHARE_GET_CLASS (share)->
+			message_add_standard_headers (share, message);
+		soup_message_headers_set_content_length (soup_server_message_get_response_headers(message),
+							 dmap_structure_get_size(adbs));
+		soup_server_message_set_status (message, SOUP_STATUS_OK, NULL);
 
-	resp = dmap_structure_serialize (structure, &length);
+		/* 4: */
+		g_signal_connect (message, "wrote_headers",
+				  G_CALLBACK (_write_dmap_preamble), adbs);
 
-	if (resp == NULL) {
-		g_warning ("Serialize gave us null?\n");
-		return;
-	}
+		/* 5: */
+		g_signal_connect (message, "wrote_chunk",
+				  G_CALLBACK (_write_next_mlit),
+				  share_bitwise);
+		g_signal_connect (message, "finished",
+				  G_CALLBACK (_chunked_message_finished),
+				  share_bitwise);
 
-	soup_message_set_response (message, "application/x-dmap-tagged",
-				   SOUP_MEMORY_TAKE, resp, length);
+	} else if (g_ascii_strcasecmp ("/1/containers", rest_of_path) == 0) {
+		/* APLY database playlists
+		 *      MSTT status
+		 *      MUTY update type
+		 *      MTCO specified total count
+		 *      MRCO returned count
+		 *      MLCL listing
+		 *              MLIT listing item
+		 *                      MIID item id
+		 *                      MPER persistent item id
+		 *                      MINM item name
+		 *                      MIMC item count
+		 *                      ABPL baseplaylist (only for base)
+		 *              MLIT
+		 *              ...
+		 */
+		GNode *aply;
+		GNode *mlit;
+		struct DmapMetaDataMap *map;
+		struct DmapMlclBits mb = { NULL, 0, NULL };
 
-	DMAP_SHARE_GET_CLASS (share)->message_add_standard_headers (share,
-								    message);
+		map = DMAP_SHARE_GET_CLASS (share)->get_meta_data_map (share);
+		mb.bits = _parse_meta (query, map);
+		mb.share = share;
 
-	soup_message_set_status (message, SOUP_STATUS_OK);
-}
+		aply = dmap_structure_add (NULL, DMAP_CC_APLY);
+		dmap_structure_add (aply, DMAP_CC_MSTT,
+				    (gint32) SOUP_STATUS_OK);
+		dmap_structure_add (aply, DMAP_CC_MUTY, 0);
+		dmap_structure_add (aply, DMAP_CC_MTCO,
+				    (gint32) dmap_container_db_count (share->
+								      priv->
+								      container_db)
+				    + 1);
+		dmap_structure_add (aply, DMAP_CC_MRCO,
+				    (gint32) dmap_container_db_count (share->
+								      priv->
+								      container_db)
+				    + 1);
+		mb.mlcl = dmap_structure_add (aply, DMAP_CC_MLCL);
 
-gboolean
-_dmap_share_client_requested (bitwise bits, gint field)
-{
-	return 0 != (bits & (((bitwise) 1) << field));
-}
+		/* Base playlist (playlist 1 contains all songs): */
+		mlit = dmap_structure_add (mb.mlcl, DMAP_CC_MLIT);
+		dmap_structure_add (mlit, DMAP_CC_MIID, (gint32) 1);
+		dmap_structure_add (mlit, DMAP_CC_MPER, (gint64) 1);
+		dmap_structure_add (mlit, DMAP_CC_MINM, share->priv->name);
+		dmap_structure_add (mlit, DMAP_CC_MIMC,
+				    dmap_db_count (share->priv->db));
+		dmap_structure_add (mlit, DMAP_CC_FQUESCH, 0);
+		dmap_structure_add (mlit, DMAP_CC_MPCO, 0);
+		dmap_structure_add (mlit, DMAP_CC_AESP, 0);
+		dmap_structure_add (mlit, DMAP_CC_AEPP, 0);
+		dmap_structure_add (mlit, DMAP_CC_AEPS, 0);
+		dmap_structure_add (mlit, DMAP_CC_AESG, 0);
 
-gboolean
-_dmap_share_uri_is_local (const char *text_uri)
-{
-	return g_str_has_prefix (text_uri, "file://");
-}
+		dmap_structure_add (mlit, DMAP_CC_ABPL, (gchar) 1);
 
-gboolean
-_dmap_share_soup_auth_filter (G_GNUC_UNUSED SoupAuthDomain * auth_domain,
-			      SoupMessage * msg,
-                              G_GNUC_UNUSED gpointer user_data)
-{
-	const char *path;
+		dmap_container_db_foreach (share->priv->container_db,
+					   (DmapIdContainerRecordFunc)
+					   _add_playlist_to_mlcl,
+					   &mb);
 
-	path = soup_message_get_uri (msg)->path;
-	if (g_str_has_prefix (path, "/databases/")) {
-		/* Subdirectories of /databases don't actually require
-		 * authentication
-		 */
-		return FALSE;
-	} else {
-		/* Everything else in auth_domain's paths, including
-		 * /databases itself, does require auth.
+		dmap_share_message_set_from_dmap_structure (share, message,
+							     aply);
+		dmap_structure_destroy (aply);
+	} else if (g_ascii_strncasecmp ("/1/containers/", rest_of_path, 14) ==
+		   0) {
+		/* APSO playlist songs
+		 *      MSTT status
+		 *      MUTY update type
+		 *      MTCO specified total count
+		 *      MRCO returned count
+		 *      MLCL listing
+		 *              MLIT listing item
+		 *                      MIKD item kind
+		 *                      MIID item id
+		 *                      MCTI container item id
+		 *              MLIT
+		 *              ...
 		 */
-		return TRUE;
-	}
-}
-
-void
-_dmap_share_published (DMAPShare * share,
-		       G_GNUC_UNUSED DMAPMdnsPublisher * publisher,
-                       const char *name)
-{
-	if (share->priv->name == NULL || name == NULL) {
-		return;
-	}
+		GNode *apso;
+		struct DmapMetaDataMap *map;
+		struct DmapMlclBits mb = { NULL, 0, NULL };
+		guint pl_id;
+		gchar *record_query;
+		GSList *filter_def;
+		GHashTable *records;
 
-	if (strcmp (share->priv->name, name) == 0) {
-		g_debug ("mDNS publish successful");
-		share->priv->published = TRUE;
-	}
-}
+		map = DMAP_SHARE_GET_CLASS (share)->get_meta_data_map (share);
+		mb.bits = _parse_meta (query, map);
+		mb.share = share;
 
-void
-_dmap_share_name_collision (DMAPShare * share,
-			    G_GNUC_UNUSED DMAPMdnsPublisher * publisher,
-                            const char *name)
-{
-	char *new_name = "FIXME";
+		apso = dmap_structure_add (NULL, DMAP_CC_APSO);
+		dmap_structure_add (apso, DMAP_CC_MSTT,
+				    (gint32) SOUP_STATUS_OK);
+		dmap_structure_add (apso, DMAP_CC_MUTY, 0);
 
-	if (share->priv->name == NULL || name == NULL) {
-		return;
-	}
+		if (g_ascii_strcasecmp ("/1/items", rest_of_path + 13) == 0) {
+			GList *id;
+			gchar *sort_by;
+			GList *keys;
 
-	if (strcmp (share->priv->name, name) == 0) {
-		g_warning ("Duplicate share name on mDNS");
+			record_query = g_hash_table_lookup (query, "query");
+			filter_def = dmap_share_build_filter (record_query);
+			records =
+				dmap_db_apply_filter (DMAP_DB
+						      (share->priv->db),
+						      filter_def);
+			gint32 num_songs = g_hash_table_size (records);
 
-		_dmap_share_set_name (DMAP_SHARE (share), new_name);
-		g_free (new_name);
-	}
+			g_debug ("Found %d records", num_songs);
+			dmap_share_free_filter (filter_def);
 
-	return;
-}
+			dmap_structure_add (apso, DMAP_CC_MTCO,
+					    (gint32) num_songs);
+			dmap_structure_add (apso, DMAP_CC_MRCO,
+					    (gint32) num_songs);
+			mb.mlcl = dmap_structure_add (apso, DMAP_CC_MLCL);
 
-void
-_dmap_share_content_codes (DMAPShare * share,
-			   G_GNUC_UNUSED SoupServer * server,
-			   SoupMessage * message,
-			   const char *path,
-			   G_GNUC_UNUSED GHashTable * query,
-                           G_GNUC_UNUSED SoupClientContext * context)
-{
-/* MCCR content codes response
- * 	MSTT status
- * 	MDCL dictionary
- * 		MCNM content codes number
- * 		MCNA content codes name
- * 		MCTY content codes type
- * 	MDCL dictionary
- * 	...
- */
-	const DMAPContentCodeDefinition *defs;
-	guint num_defs = 0;
-	guint i;
-	GNode *mccr;
+			sort_by = g_hash_table_lookup (query, "sort");
+			keys = g_hash_table_get_keys (records);
+			if (g_strcmp0 (sort_by, "album") == 0) {
+				keys = g_list_sort_with_data (keys,
+							      (GCompareDataFunc)
+							      dmap_av_record_cmp_by_album,
+							      share->priv->
+							      db);
+			} else if (sort_by != NULL) {
+				g_warning ("Unknown sort column: %s",
+					   sort_by);
+			}
 
-	g_debug ("Path is %s.", path);
+			for (id = keys; id; id = id->next) {
+				(*
+				 (DMAP_SHARE_GET_CLASS (share)->
+				  add_entry_to_mlcl)) (GPOINTER_TO_UINT(id->data),
+						       g_hash_table_lookup
+						       (records, id->data),
+						       &mb);
+			}
 
-	defs = dmap_content_codes (&num_defs);
+			g_list_free (keys);
+			g_hash_table_destroy (records);
+		} else {
+			pl_id = strtoul (rest_of_path + 14, NULL, 10);
+			if (pl_id == 1) {
+				gint32 num_songs =
+					dmap_db_count (share->priv->db);
+				dmap_structure_add (apso, DMAP_CC_MTCO,
+						    (gint32) num_songs);
+				dmap_structure_add (apso, DMAP_CC_MRCO,
+						    (gint32) num_songs);
+				mb.mlcl =
+					dmap_structure_add (apso,
+							    DMAP_CC_MLCL);
 
-	mccr = dmap_structure_add (NULL, DMAP_CC_MCCR);
-	dmap_structure_add (mccr, DMAP_CC_MSTT, (gint32) DMAP_STATUS_OK);
+				dmap_db_foreach (share->priv->db,
+						 DMAP_SHARE_GET_CLASS
+						 (share)->add_entry_to_mlcl,
+						 &mb);
+			} else {
+				DmapContainerRecord *record;
+				DmapDb *entries;
+				guint num_songs;
 
-	for (i = 0; i < num_defs; i++) {
-		GNode *mdcl;
+				record = dmap_container_db_lookup_by_id
+					(share->priv->container_db, pl_id);
+				entries =
+					dmap_container_record_get_entries
+					(record);
+				/* FIXME: what if entries is NULL (handled in dmapd but should be [also] handled here)? */
+				num_songs = dmap_db_count (entries);
 
-		mdcl = dmap_structure_add (mccr, DMAP_CC_MDCL);
-		dmap_structure_add (mdcl, DMAP_CC_MCNM,
-				    dmap_content_code_string_as_int32 (defs
-								       [i].
-								       string));
-		dmap_structure_add (mdcl, DMAP_CC_MCNA, defs[i].name);
-		dmap_structure_add (mdcl, DMAP_CC_MCTY,
-				    (gint32) defs[i].type);
+				dmap_structure_add (apso, DMAP_CC_MTCO,
+						    (gint32) num_songs);
+				dmap_structure_add (apso, DMAP_CC_MRCO,
+						    (gint32) num_songs);
+				mb.mlcl =
+					dmap_structure_add (apso,
+							    DMAP_CC_MLCL);
+
+				dmap_db_foreach (entries,
+						 DMAP_SHARE_GET_CLASS
+						 (share)->add_entry_to_mlcl,
+						 &mb);
+
+				g_object_unref (entries);
+				g_object_unref (record);
+			}
+		}
+
+		dmap_share_message_set_from_dmap_structure (share, message,
+							     apso);
+		dmap_structure_destroy (apso);
+	} else if (g_ascii_strncasecmp ("/1/browse/", rest_of_path, 9) == 0) {
+		DMAP_SHARE_GET_CLASS (share)->databases_browse_xxx (share,
+								    message,
+								    path,
+								    query);
+	} else if (g_ascii_strncasecmp ("/1/items/", rest_of_path, 9) == 0) {
+		/* just the file :) */
+		DMAP_SHARE_GET_CLASS (share)->databases_items_xxx (share,
+								   server,
+								   message,
+								   path);
+	} else if (g_str_has_prefix (rest_of_path, "/1/groups/") &&
+		   g_str_has_suffix (rest_of_path, "/extra_data/artwork")) {
+		/* We don't yet implement cover requests here, say no cover */
+		g_debug ("Assuming no artwork for requested group/album");
+		soup_server_message_set_status (message, SOUP_STATUS_NOT_FOUND, NULL);
+	} else {
+		g_warning ("Unhandled: %s", path);
 	}
 
-	_dmap_share_message_set_from_dmap_structure (share, message, mccr);
-	dmap_structure_destroy (mccr);
+done:
+	return;
 }
 
-void
-_dmap_share_login (DMAPShare * share,
-		   G_GNUC_UNUSED SoupServer * server,
-		   SoupMessage * message,
-		   const char *path,
-		   G_GNUC_UNUSED GHashTable * query,
-                   SoupClientContext * context)
+static void
+_databases_adapter (SoupServer * server,
+                    SoupServerMessage * message,
+                    const char *path,
+                    GHashTable * query,
+                    DmapShare * share)
 {
-/* MLOG login response
- * 	MSTT status
- * 	MLID session id
- */
-	GNode *mlog;
-	guint32 session_id;
+	DMAP_SHARE_GET_CLASS (share)->databases (share,
+						 server,
+						 message,
+						 path, query);
+}
 
+static void
+_ctrl_int (G_GNUC_UNUSED DmapShare * share,
+           G_GNUC_UNUSED SoupServerMessage * message,
+           const char *path,
+           GHashTable * query)
+{
 	g_debug ("Path is %s.", path);
+	if (query) {
+		g_hash_table_foreach (query, _debug_param, NULL);
+	}
 
-	session_id = _dmap_share_session_id_create (share, context);
-
-	mlog = dmap_structure_add (NULL, DMAP_CC_MLOG);
-	dmap_structure_add (mlog, DMAP_CC_MSTT, (gint32) DMAP_STATUS_OK);
-	dmap_structure_add (mlog, DMAP_CC_MLID, session_id);
+	g_debug ("ctrl-int not implemented");
+}
 
-	_dmap_share_message_set_from_dmap_structure (share, message, mlog);
-	dmap_structure_destroy (mlog);
+static void
+_ctrl_int_adapter (G_GNUC_UNUSED SoupServer * server,
+                   SoupServerMessage * message,
+                   const char *path,
+                   GHashTable * query,
+                   DmapShare * share)
+{
+	DMAP_SHARE_GET_CLASS (share)->ctrl_int (share,
+						message,
+						path, query);
 }
 
-void
-_dmap_share_logout (DMAPShare * share,
-		    G_GNUC_UNUSED SoupServer * server,
-		    SoupMessage * message,
-		    const char *path,
-		    GHashTable * query, SoupClientContext * context)
+static void
+_set_name (DmapShare * share, const char *name)
 {
-	int status;
-	guint32 id;
+	GError *error;
 
-	g_debug ("Path is %s.", path);
+	g_return_if_fail (share != NULL);
 
-	if (_dmap_share_session_id_validate
-	    (share, context, message, query, &id)) {
-		_dmap_share_session_id_remove (share, context, id);
+	g_free (share->priv->name);
+	share->priv->name = g_strdup (name);
 
-		status = SOUP_STATUS_NO_CONTENT;
-	} else {
-		status = SOUP_STATUS_FORBIDDEN;
+	if (share->priv->published) {
+		error = NULL;
+		dmap_mdns_publisher_rename_at_port (share->priv->
+						    publisher,
+						    share->priv->port,
+						    name,
+						    &error);
+		if (error != NULL) {
+			g_warning ("Unable to change MDNS service name: %s",
+				   error->message);
+			g_error_free (error);
+		}
+	}
+}
+
+static void
+_published (DmapShare * share,
+            G_GNUC_UNUSED DmapMdnsPublisher * publisher,
+            const char *name)
+{
+	if (share->priv->name == NULL || name == NULL) {
+		return;
 	}
 
-	soup_message_set_status (message, status);
+	if (strcmp (share->priv->name, name) == 0) {
+		g_debug ("mDNS publish successful");
+		share->priv->published = TRUE;
+	}
 }
 
-void
-_dmap_share_update (DMAPShare * share,
-		    SoupServer * server,
-		    SoupMessage * message,
-		    const char *path,
-		    GHashTable * query,
-                    G_GNUC_UNUSED SoupClientContext * context)
+static void
+_published_adapter (DmapMdnsPublisher * publisher,
+                    const char *name,
+                    DmapShare * share)
 {
-	guint revision_number;
-	gboolean res;
+	DMAP_SHARE_GET_CLASS (share)->published (share, publisher, name);
+}
 
-	g_debug ("Path is %s.", path);
+static void
+_name_collision (DmapShare * share,
+                 G_GNUC_UNUSED DmapMdnsPublisher * publisher,
+                 const char *name)
+{
+	g_assert(NULL != name);
+	g_assert(NULL != share->priv->name);
 
-	res = _dmap_share_get_revision_number_from_query (query,
-							  &revision_number);
+	g_warning ("Duplicate share name on mDNS; renaming share to %s", name);
 
-	if (res && revision_number != _dmap_share_get_revision_number (share)) {
-		/* MUPD update response
-		 *      MSTT status
-		 *      MUSR server revision
-		 */
-		GNode *mupd;
+	_set_name (DMAP_SHARE (share), name);
 
-		mupd = dmap_structure_add (NULL, DMAP_CC_MUPD);
-		dmap_structure_add (mupd, DMAP_CC_MSTT,
-				    (gint32) DMAP_STATUS_OK);
-		dmap_structure_add (mupd, DMAP_CC_MUSR,
-				    (gint32)
-				    _dmap_share_get_revision_number (share));
+	return;
+}
 
-		_dmap_share_message_set_from_dmap_structure (share, message,
-							     mupd);
-		dmap_structure_destroy (mupd);
-	} else {
-		/* FIXME: This seems like a bug. It just leaks the
-		 * message (and socket) without ever replying.
+static void
+_name_collision_adapter (DmapMdnsPublisher * publisher,
+			const char *name, DmapShare * share)
+{
+	DMAP_SHARE_GET_CLASS (share)->name_collision (share, publisher, name);
+}
+
+static gboolean
+_soup_auth_filter (G_GNUC_UNUSED SoupAuthDomain * auth_domain,
+                   SoupServerMessage * msg, G_GNUC_UNUSED gpointer user_data)
+{
+	gboolean ok = FALSE;
+	const char *path;
+
+	path = g_uri_get_path(soup_server_message_get_uri (msg));
+	if (g_str_has_prefix (path, "/databases/")) {
+		/* Subdirectories of /databases don't actually require
+		 * authentication
 		 */
-		g_object_ref (message);
-		soup_server_pause_message (server, message);
+		goto done;
 	}
+
+	/* Everything else in auth_domain's paths, including
+	 * /databases itself, does require auth.
+	 */
+	ok = TRUE;
+
+done:
+	return ok;
 }
 
-bitwise
-_dmap_share_parse_meta_str (const char *attrs, struct DMAPMetaDataMap *mdm)
+gboolean
+dmap_share_serve (DmapShare *share, GError **error)
 {
-	guint i;
-	bitwise bits = 0;
-
-	/* iTunes 8 uses meta=all for /databases/1/items query: */
-	if (strcmp (attrs, "all") == 0) {
-		bits = ~0;
-	} else {
-		gchar **attrsv;
+	guint desired_port = DMAP_SHARE_GET_CLASS (share)->get_desired_port (share);
+	gboolean password_required, ok = FALSE;
+	GSList *listening_uri_list;
+	GUri *listening_uri;
+	gboolean ret;
+	GError *error2 = NULL;
 
-		attrsv = g_strsplit (attrs, ",", -1);
+	password_required = (share->priv->auth_method != DMAP_SHARE_AUTH_METHOD_NONE);
 
-		for (i = 0; attrsv[i]; i++) {
-			guint j;
-			gboolean found = FALSE;
+	if (password_required) {
+		SoupAuthDomain *auth_domain;
 
-			for (j = 0; mdm[j].tag; j++) {
-				if (strcmp (mdm[j].tag, attrsv[i]) == 0) {
-					bits |= (((bitwise) 1) << mdm[j].md);
-					found = TRUE;
-				}
-			}
+		auth_domain = soup_auth_domain_basic_new (
+			"realm", "Music Sharing",
+			"add-path", "/login",
+			"add-path", "/update",
+			"add-path", "/database",
+			NULL
+		);
 
-			if (found == FALSE)
-				g_debug ("Unknown meta request: %s",
-					 attrsv[i]);
-		}
-		g_strfreev (attrsv);
+		soup_auth_domain_basic_set_auth_callback (auth_domain,
+							  (SoupAuthDomainBasicAuthCallback)
+							  _soup_auth_callback,
+							  g_object_ref
+							  (share),
+							  g_object_unref);
+		soup_auth_domain_set_filter(
+			auth_domain,
+			_soup_auth_filter,
+			NULL,
+			NULL
+		);
+		soup_server_add_auth_domain (share->priv->server, auth_domain);
 	}
 
-	return bits;
-}
+	soup_server_add_handler (share->priv->server, "/server-info",
+				 (SoupServerCallback) _server_info_adapter,
+				 share, NULL);
+	soup_server_add_handler (share->priv->server, "/content-codes",
+				 (SoupServerCallback) _content_codes_adapter,
+				 share, NULL);
+	soup_server_add_handler (share->priv->server, "/login",
+				 (SoupServerCallback) _login_adapter,
+				 share, NULL);
+	soup_server_add_handler (share->priv->server, "/logout",
+				 (SoupServerCallback) _logout_adapter,
+				 share, NULL);
+	soup_server_add_handler (share->priv->server, "/update",
+				 (SoupServerCallback) _update_adapter,
+				 share, NULL);
+	soup_server_add_handler (share->priv->server, "/databases",
+				 (SoupServerCallback) _databases_adapter,
+				 share, NULL);
+	soup_server_add_handler (share->priv->server, "/ctrl-int",
+				 (SoupServerCallback) _ctrl_int_adapter,
+				 share, NULL);
 
-bitwise
-_dmap_share_parse_meta (GHashTable * query, struct DMAPMetaDataMap * mdm)
-{
-	const gchar *attrs;
+	ret = soup_server_listen_all (share->priv->server, desired_port, 0, &error2);
+	if (ret == FALSE) {
+		g_debug ("Unable to start music sharing server on port %d: %s. "
+			 "Trying any open IPv6 port", desired_port, error2->message);
+		g_error_free(error2);
 
-	attrs = g_hash_table_lookup (query, "meta");
-	if (attrs == NULL) {
-		return 0;
+		ret = soup_server_listen_all (share->priv->server, 0, 0, error);
 	}
-	return _dmap_share_parse_meta_str (attrs, mdm);
-}
-
-void
-_dmap_share_add_playlist_to_mlcl (G_GNUC_UNUSED gpointer id,
-                                  DMAPContainerRecord * record,
-				  gpointer _mb)
-{
-	/* MLIT listing item
-	 * MIID item id
-	 * MPER persistent item id
-	 * MINM item name
-	 * MIMC item count
-	 */
-	GNode *mlit;
-	guint num_songs;
-	gchar *name;
-	struct MLCL_Bits *mb = (struct MLCL_Bits *) _mb;
 
-	num_songs = dmap_container_record_get_entry_count (record);
-	g_object_get (record, "name", &name, NULL);
+	listening_uri_list = soup_server_get_uris (share->priv->server);
+	if (ret == FALSE || listening_uri_list == NULL) {
+		goto done;
+	}
 
-	/* FIXME: ITEM_ID, etc. is defined in DAAPShare, so I can't use
-	 * with _dmap_share_client_requested() here (see add_entry_to_mlcl())
+	/* We can only expose one port, so no point checking more than one URI
+	 * here. Maybe it somehow is listening on a different port for IPv4 vs.
+	 * IPv6, but there's not much we can do.
 	 */
+	listening_uri = listening_uri_list->data;
+	share->priv->port = g_uri_get_port (listening_uri);
+	g_slist_free_full (listening_uri_list, (GDestroyNotify) g_uri_unref);
 
-	mlit = dmap_structure_add (mb->mlcl, DMAP_CC_MLIT);
-	dmap_structure_add (mlit, DMAP_CC_MIID,
-			    dmap_container_record_get_id (record));
-	/* we don't have a persistant ID for playlists, unfortunately */
-	dmap_structure_add (mlit, DMAP_CC_MPER,
-			    (gint64) dmap_container_record_get_id (record));
-	dmap_structure_add (mlit, DMAP_CC_MINM, name);
-	dmap_structure_add (mlit, DMAP_CC_MIMC, (gint32) num_songs);
+	g_debug ("Started DMAP server on port %u", share->priv->port);
 
-	/* FIXME: Is this getting music-specific? */
-	dmap_structure_add (mlit, DMAP_CC_FQUESCH, 0);
-	dmap_structure_add (mlit, DMAP_CC_MPCO, 0);
-	dmap_structure_add (mlit, DMAP_CC_AESP, 0);
-	dmap_structure_add (mlit, DMAP_CC_AEPP, 0);
-	dmap_structure_add (mlit, DMAP_CC_AEPS, 0);
-	dmap_structure_add (mlit, DMAP_CC_AESG, 0);
+	share->priv->server_active = TRUE;
 
-	g_free (name);
+	ok = TRUE;
 
-	return;
+done:
+	g_assert((!ok && (NULL == error || NULL != *error))
+	      || ( ok && (NULL == error || NULL == *error)));
+
+	return ok;
 }
 
-GSList *
-_dmap_share_build_filter (gchar * filterstr)
+static gboolean
+_server_stop (DmapShare * share)
 {
-	/* Produces a list of lists, each being a filter definition that may
-	 * be one or more filter criteria.
-	 */
+	g_debug ("Stopping music sharing server on port %d",
+		 share->priv->port);
 
-	/* A filter string looks like (iTunes):
-	 * 'daap.songgenre:Other'+'daap.songartist:Band'.
-	 * or (Roku):
-	 * 'daap.songgenre:Other' 'daap.songartist:Band'.
-	 * or
-	 * 'dmap.itemid:1000'
-	 * or
-	 * 'dmap.itemid:1000','dmap:itemid:1001'
-	 * or
-	 * 'daap.songgenre:Foo'+'daap.songartist:Bar'+'daap.songalbum:Baz'
-	 * or (iPhoto '09)
-	 * ('daap.idemid:1000','dmap:itemid:1001')
-	 * or (DACP):
-	 * ('com.apple.itunes.mediakind:1','com.apple.itunes.mediakind:32') 'daap.songartist!:'
-	 */
+	if (share->priv->server) {
+		soup_server_disconnect (share->priv->server);
+	}
 
-	gchar *next_char;
-	GString *value;
+	if (share->priv->session_ids) {
+		g_hash_table_remove_all (share->priv->session_ids);
+	}
 
-	//gboolean save_value;
-	gboolean is_key;
-	gboolean is_value;
-	gboolean new_group;
-	gboolean accept;
-	gboolean negate;
-	gint parentheses_count;
-	gint quotes_count;
-	DMAPDbFilterDefinition *def;
+	share->priv->server_active = FALSE;
 
-	GSList *list = NULL;
-	GSList *filter = NULL;
+	return TRUE;
+}
 
-	g_debug ("Filter string is %s.", filterstr);
+gboolean
+dmap_share_publish (DmapShare *share, GError **error)
+{
+	gboolean ok;
+	gboolean password_required;
 
-	if (filterstr == NULL)
-		return NULL;
+	password_required =
+		(share->priv->auth_method != DMAP_SHARE_AUTH_METHOD_NONE);
 
-	next_char = filterstr;
+	ok = dmap_mdns_publisher_publish (share->priv->publisher,
+	                                  share->priv->name,
+	                                  share->priv->port,
+	                                  DMAP_SHARE_GET_CLASS (share)->
+	                                  get_type_of_service (share),
+	                                  password_required,
+	                                  share->priv->txt_records, error);
 
-	parentheses_count = 0;
-	quotes_count = 0;
-	is_key = TRUE;
-	is_value = FALSE;
-	new_group = FALSE;
-	negate = FALSE;
-	value = NULL;
-	def = NULL;
+	if (ok == FALSE) {
+		goto done;
+	}
 
-	// The query string is divided in groups of AND separated by a space,
-	// each group containing queries of OR separated by comma enclosed in
-	// parentheses. Queries are key, value pairs separated by ':' enclosed 
-	// in quotes or not.
-	// The result from this is a list of lists. Here is an example:
-	// String is ('com.apple.itunes.mediakind:1','com.apple.itunes.mediakind:32') 'daap.songartist!:'
-	// list:
-	// |-> filter1: -> com.apple.itunes.mediakind = 1
-	// |   |        -> com.apple.itunes.mediakind = 32
-	// |-> filter1: -> daap.songartist! = (null)
-	// This basically means that the query is (filter1 AND filter2), and
-	// filter1 is (com.apple.itunes.mediakind = 1) OR (com.apple.itunes.mediakind = 32)
-	while (TRUE) {
-		// We check each character to see if it should be included in
-		// the current value (the current value will become the query key
-		// or the query value). Anything that is not a special character
-		// handled below will be accepted (this means weird characters
-		// might appear in names).
-		// Handling of unicode characters is unknown, but as long it 
-		// doesn't appear as a character handled below, it will be
-		// included.
-		// This parser will result in unknown behaviour on bad-formatted
-		// queries (it does not check for syntax errors), but should not 
-		// crash. In this way it may accept much more syntaxes then
-		// other parsers.
-		accept = FALSE;
-		// A slash can escape characters such as ', so add the character
-		// after the slash.
-		if (*next_char == '\\') {
-			accept = TRUE;
-			next_char++;
-		} else {
-			switch (*next_char) {
-			case '(':
-				if (is_value) {
-					accept = TRUE;
-				} else {
-					parentheses_count++;
-				}
-				break;
-			case ')':
-				if (is_value) {
-					accept = TRUE;
-				} else {
-					parentheses_count--;
-				}
-				break;
-			case '\'':
-				if (quotes_count > 0) {
-					quotes_count = 0;
-				} else {
-					quotes_count = 1;
-				}
-				break;
-			case ' ':
-				if (is_value) {
-					accept = TRUE;
-				} else {
-					new_group = TRUE;
-				}
-				break;
-			case ':':
-				// Inside values, they will be included in the 
-				// query string, otherwise it indicates there
-				// will be a value next.
-				if (is_value) {
-					accept = TRUE;
-				} else if (is_key) {
-					is_value = TRUE;
-				}
-				break;
-			case '!':
-				if (is_value) {
-					accept = TRUE;
-				} else if (is_key && value) {
-					negate = TRUE;
-				}
-				break;
-			case ',':
-			case '+':
-				// Accept these characters only if inside quotes
-				if (is_value) {
-					accept = TRUE;
-				}
-				break;
-			case '\0':
-				// Never accept
-				break;
-			default:
-				accept = TRUE;
-				break;
-			}
-		}
-		//g_debug ("Char: %c, Accept: %s", *next_char, accept?"TRUE":"FALSE");
-		//Is the next character to be accepted?
-		if (accept) {
-			if (!value) {
-				value = g_string_new ("");
-			}
-			g_string_append_c (value, *next_char);
-		} else if (value != NULL && *next_char != '!') {
-			// If we won't accept this character, we are ending a 
-			// query key or value, so we should save them in a new
-			// DMAPDbFilterDefinition. If is_value is TRUE, we will still
-			// parse the query value, so we must keep our def around.
-			// Otherwise, save it in the list of filters.
-			if (!def) {
-				def = g_new0 (DMAPDbFilterDefinition, 1);
-			}
-			if (is_key) {
-				def->key = value->str;
-				g_string_free (value, FALSE);
-				def->negate = negate;
-				negate = FALSE;
-				is_key = FALSE;
-			} else {
-				def->value = value->str;
-				g_string_free (value, FALSE);
-				is_value = FALSE;
-				is_key = TRUE;
-			}
-			value = NULL;
-			if (!is_value) {
-				filter = g_slist_append (filter, def);
-				def = NULL;
-			}
-		}
-		if (new_group && filter) {
-			list = g_slist_append (list, filter);
-			filter = NULL;
-			new_group = FALSE;
-		}
-		// Only handle \0 here so we can handle remaining values above.
-		if (*next_char == '\0')
-			break;
-		next_char++;
-	};
+	g_debug ("Published DMAP server information to mdns");
 
-	// Any remaining def or filter must still be handled here.
-	if (def) {
-		filter = g_slist_append (filter, def);
-	}
+done:
+	return ok;
+}
 
-	if (filter) {
-		list = g_slist_append (list, filter);
-	}
+static gboolean
+_publish_stop (DmapShare * share)
+{
+	GError *error;
+	gboolean ok = FALSE;
 
-	GSList *ptr1, *ptr2;
+	if (!share->priv->publisher) {
+		share->priv->published = FALSE;
+		goto done;
+	}
 
-	for (ptr1 = list; ptr1 != NULL; ptr1 = ptr1->next) {
-		for (ptr2 = ptr1->data; ptr2 != NULL; ptr2 = ptr2->next) {
-			g_debug ("%s = %s",
-				 ((DMAPDbFilterDefinition *) ptr2->data)->key,
-				 ((DMAPDbFilterDefinition *) ptr2->data)->value);
-		}
+	error = NULL;
+	ok = dmap_mdns_publisher_withdraw (share->priv->publisher,
+					   share->priv->port,
+					  &error);
+	if (error != NULL) {
+		g_warning
+			("Unable to withdraw music sharing service: %s",
+			 error->message);
+		g_error_free (error);
 	}
 
-	return list;
+done:
+	return ok;
 }
 
-void
-dmap_share_free_filter (GSList * filter)
+static void
+_restart (DmapShare * share)
 {
-	GSList *ptr1, *ptr2;
+	GError *error = NULL;
+	gboolean res;
 
-	for (ptr1 = filter; ptr1 != NULL; ptr1 = ptr1->next) {
-		for (ptr2 = ptr1->data; ptr2 != NULL; ptr2 = ptr2->next) {
-			g_free (((DMAPDbFilterDefinition *) ptr2->data)->value);
-			g_free (ptr2->data);
-		}
+	_server_stop (share);
+	res = dmap_share_serve (share, &error);
+	if (NULL != error) {
+		g_signal_emit (share, _signals[ERROR], 0, error);
+		_publish_stop (share);
+	} else {
+		g_assert(FALSE != res);
+
+		/* To update information just publish again */
+		dmap_share_publish (share, NULL);
 	}
 }
 
-typedef struct
+static void
+_maybe_restart (DmapShare * share)
 {
-	gchar *name;
-	gint64 group_id;
-	gchar *artist;
-	int count;
-} GroupInfo;
+	if (share->priv->published) {
+		_restart (share);
+	}
+}
 
 static void
-group_items (G_GNUC_UNUSED gpointer key, DMAPRecord * record, GHashTable * groups)
+_set_password (DmapShare * share, const char *password)
 {
-	gchar *album, *artist;
-	GroupInfo *group_info;
-	gint64 group_id;
-
-	g_object_get (record, "songartist", &artist, "songalbum", &album,
-		      "songalbumid", &group_id, NULL);
-	if (!album) {
-		g_free (artist);
-		return;
+	if (share->priv->password && password &&
+	    0 == strcmp (password, share->priv->password)) {
+		goto done;
 	}
-	group_info = g_hash_table_lookup (groups, album);
-	if (!group_info) {
-		group_info = g_new0 (GroupInfo, 1);
-		g_hash_table_insert (groups, album, group_info);
-		// They will be freed when the hash table is freed.
-		group_info->name = album;
-		group_info->artist = artist;
-		group_info->group_id = group_id;
+
+	g_free (share->priv->password);
+	share->priv->password = g_strdup (password);
+	if (password != NULL) {
+		share->priv->auth_method = DMAP_SHARE_AUTH_METHOD_PASSWORD;
 	} else {
-		g_free (album);
-		g_free (artist);
+		share->priv->auth_method = DMAP_SHARE_AUTH_METHOD_NONE;
 	}
-	(group_info->count)++;
-}
 
-static gint
-group_info_cmp (gconstpointer group1, gconstpointer group2)
-{
-	return g_ascii_strcasecmp (((GroupInfo *) group1)->name,
-				   ((GroupInfo *) group2)->name);
+	_maybe_restart (share);
+
+done:
+	return;
 }
 
 static void
-debug_param (gpointer key, gpointer val, G_GNUC_UNUSED gpointer user_data)
+_set_property (GObject * object,
+			  guint prop_id,
+			  const GValue * value, GParamSpec * pspec)
 {
-	g_debug ("%s %s", (char *) key, (char *) val);
+	DmapShare *share = DMAP_SHARE (object);
+
+	switch (prop_id) {
+	case PROP_NAME:
+		_set_name (share, g_value_get_string (value));
+		break;
+	case PROP_PASSWORD:
+		_set_password (share, g_value_get_string (value));
+		break;
+	case PROP_DB:
+		if (share->priv->db) {
+			g_object_unref(share->priv->db);
+		}
+		share->priv->db = g_value_dup_object (value);
+		break;
+	case PROP_CONTAINER_DB:
+		if (share->priv->container_db) {
+			g_object_unref(share->priv->container_db);
+		}
+		share->priv->container_db = g_value_dup_object (value);
+		break;
+	case PROP_TRANSCODE_MIMETYPE:
+		g_free(share->priv->transcode_mimetype);
+		share->priv->transcode_mimetype = g_value_dup_string (value);
+		break;
+	case PROP_TXT_RECORDS:
+		g_strfreev (share->priv->txt_records);
+		share->priv->txt_records = g_value_dup_boxed (value);
+		break;
+	default:
+		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+		break;
+	}
 }
 
-void
-_dmap_share_ctrl_int (G_GNUC_UNUSED DMAPShare * share,
-		      G_GNUC_UNUSED SoupServer * server,
-		      G_GNUC_UNUSED SoupMessage * message,
-		      const char *path,
-		      GHashTable * query,
-                      G_GNUC_UNUSED SoupClientContext * context)
+static void
+_get_property (GObject * object,
+			  guint prop_id, GValue * value, GParamSpec * pspec)
 {
-	g_debug ("Path is %s.", path);
-	if (query) {
-		g_hash_table_foreach (query, debug_param, NULL);
-	}
+	DmapShare *share = DMAP_SHARE (object);
 
-	g_debug ("ctrl-int not implemented");
+	switch (prop_id) {
+	case PROP_SERVER:
+		g_value_set_object (value, share->priv->server);
+		return;
+	case PROP_NAME:
+		g_value_set_string (value, share->priv->name);
+		break;
+	case PROP_PASSWORD:
+		g_value_set_string (value, share->priv->password);
+		break;
+	case PROP_REVISION_NUMBER:
+		g_value_set_uint (value,
+				  _get_revision_number
+				  (DMAP_SHARE (object)));
+		break;
+	case PROP_AUTH_METHOD:
+		g_value_set_uint (value,
+				  dmap_share_get_auth_method
+				  (DMAP_SHARE (object)));
+		break;
+	case PROP_DB:
+		g_value_set_object (value, share->priv->db);
+		break;
+	case PROP_CONTAINER_DB:
+		g_value_set_object (value, share->priv->container_db);
+		break;
+	case PROP_TRANSCODE_MIMETYPE:
+		g_value_set_string (value, share->priv->transcode_mimetype);
+		break;
+	case PROP_TXT_RECORDS:
+		g_value_set_boxed (value, share->priv->txt_records);
+		break;
+	default:
+		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+		break;
+	}
 }
 
 static void
-accumulate_mlcl_size_and_ids (gpointer id,
-			      DMAPRecord * record,
-			      struct share_bitwise_t *share_bitwise)
+_dispose (GObject * object)
 {
-	share_bitwise->id_list = g_slist_append (share_bitwise->id_list, id);
-
-	/* Make copy and set mlcl to NULL so real MLCL does not get changed */
-	struct MLCL_Bits mb_copy = share_bitwise->mb;
+	DmapShare *share = DMAP_SHARE (object);
 
-	mb_copy.mlcl = dmap_structure_add (NULL, DMAP_CC_MLCL);;
+	if (share->priv->published) {
+		_publish_stop (share);
+	}
 
-	DMAP_SHARE_GET_CLASS (share_bitwise->mb.share)->add_entry_to_mlcl (id,
-									record,
-									&mb_copy);
-	share_bitwise->size += dmap_structure_get_size (mb_copy.mlcl);
+	if (share->priv->server_active) {
+		_server_stop (share);
+	}
 
-	/* Minus eight because we do not want to add size of MLCL CC field + size field n times,
-	 * where n == number of records.
-	 */
-	share_bitwise->size -= 8;
+	g_clear_object (&share->priv->publisher);
+	g_clear_object (&share->priv->server);
+	g_clear_object (&share->priv->db);
+	g_clear_object (&share->priv->container_db);
 
-	/* Destroy created structures as we go. */
-	dmap_structure_destroy (mb_copy.mlcl);
+	G_OBJECT_CLASS (dmap_share_parent_class)->dispose (object);
 }
 
 static void
-write_dmap_preamble (SoupMessage * message, GNode * node)
+_finalize (GObject * object)
 {
-	guint length;
-	gchar *data = dmap_structure_serialize (node, &length);
+	DmapShare *share = DMAP_SHARE (object);
 
-	soup_message_body_append (message->response_body,
-				  SOUP_MEMORY_TAKE, data, length);
-	dmap_structure_destroy (node);
+	g_debug ("Finalizing DmapShare");
+
+	g_hash_table_destroy (share->priv->session_ids);
+	share->priv->session_ids = NULL;
+
+	g_free (share->priv->name);
+	g_free (share->priv->password);
+	g_free (share->priv->transcode_mimetype);
+	g_strfreev (share->priv->txt_records);
+
+	G_OBJECT_CLASS (dmap_share_parent_class)->finalize (object);
 }
 
 static void
-write_next_mlit (SoupMessage * message, struct share_bitwise_t *share_bitwise)
+dmap_share_class_init (DmapShareClass * klass)
 {
-	if (share_bitwise->id_list == NULL) {
-		g_debug ("No more ID's, sending message complete.");
-		soup_message_body_complete (message->response_body);
-	} else {
-		gchar *data = NULL;
-		guint length;
-		DMAPRecord *record;
-		struct MLCL_Bits mb = { NULL, 0, NULL };
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
-		record = share_bitwise->lookup_by_id (share_bitwise->db,
-						      GPOINTER_TO_UINT
-						      (share_bitwise->
-						       id_list->data));
+	object_class->get_property = _get_property;
+	object_class->set_property = _set_property;
+	object_class->dispose = _dispose;
+	object_class->finalize = _finalize;
 
-		mb.bits = share_bitwise->mb.bits;
-		mb.mlcl = dmap_structure_add (NULL, DMAP_CC_MLCL);
-		mb.share = share_bitwise->mb.share;
+	/* Pure virtual methods: */
+	klass->get_desired_port = NULL;
+	klass->get_type_of_service = NULL;
+	klass->message_add_standard_headers = NULL;
+	klass->get_meta_data_map = NULL;
+	klass->add_entry_to_mlcl = NULL;
+	klass->databases_browse_xxx = NULL;
+	klass->databases_items_xxx = NULL;
 
-		DMAP_SHARE_GET_CLASS (share_bitwise->mb.share)->
-			add_entry_to_mlcl (share_bitwise->id_list->data,
-					   record, &mb);
-		data = dmap_structure_serialize (g_node_first_child (mb.mlcl),
-						 &length);
+	/* Virtual methods: */
+	klass->content_codes = _content_codes;
+	klass->login = dmap_share_login;
+	klass->logout = _logout;
+	klass->update = _update;
+	klass->published = _published;
+	klass->name_collision = _name_collision;
+	klass->databases = _databases;
+	klass->ctrl_int = _ctrl_int;
 
-		soup_message_body_append (message->response_body,
-					  SOUP_MEMORY_TAKE, data, length);
-		g_debug ("Sending ID %u.",
-			 GPOINTER_TO_UINT (share_bitwise->id_list->data));
-		dmap_structure_destroy (mb.mlcl);
+	g_object_class_install_property (object_class,
+					 PROP_SERVER,
+					 g_param_spec_object ("server",
+							      "Soup Server",
+							      "Soup server",
+							      SOUP_TYPE_SERVER,
+							      G_PARAM_READABLE));
 
-		share_bitwise->id_list =
-			g_slist_remove (share_bitwise->id_list,
-					share_bitwise->id_list->data);
+	g_object_class_install_property (object_class,
+					 PROP_NAME,
+					 g_param_spec_string ("name",
+							      "Name",
+							      "Share Name",
+							      NULL,
+							      G_PARAM_READWRITE));
+	g_object_class_install_property (object_class,
+					 PROP_PASSWORD,
+					 g_param_spec_string ("password",
+							      "Authentication password",
+							      "Authentication password",
+							      NULL,
+							      G_PARAM_READWRITE));
 
-		g_object_unref (record);
-	}
+	g_object_class_install_property (object_class,
+					 PROP_REVISION_NUMBER,
+					 g_param_spec_uint ("revision-number",
+							    "Revision number",
+							    "Revision number",
+							    0,
+							    G_MAXINT,
+							    0,
+							    G_PARAM_READWRITE));
+
+	g_object_class_install_property (object_class,
+					 PROP_AUTH_METHOD,
+					 g_param_spec_uint ("auth-method",
+							    "Authentication method",
+							    "Authentication method",
+							    DMAP_SHARE_AUTH_METHOD_NONE,
+							    DMAP_SHARE_AUTH_METHOD_PASSWORD,
+							    0,
+							    G_PARAM_READWRITE));
+	g_object_class_install_property (object_class,
+					 PROP_DB,
+					 g_param_spec_object ("db",
+							      "DB",
+							      "DB object",
+	                                                       DMAP_TYPE_DB,
+							       G_PARAM_READWRITE |
+							       G_PARAM_CONSTRUCT_ONLY));
+
+	g_object_class_install_property (object_class,
+					 PROP_CONTAINER_DB,
+					 g_param_spec_object ("container-db",
+							      "Container DB",
+							      "Container DB object",
+	                                                       DMAP_TYPE_CONTAINER_DB,
+							       G_PARAM_READWRITE |
+							       G_PARAM_CONSTRUCT_ONLY));
+
+	g_object_class_install_property (object_class,
+					 PROP_TRANSCODE_MIMETYPE,
+					 g_param_spec_string
+					 ("transcode-mimetype",
+					  "Transcode mimetype",
+					  "Set mimetype of stream after transcoding",
+					  NULL,
+					  G_PARAM_READWRITE |
+					  G_PARAM_CONSTRUCT_ONLY));
 
-	soup_server_unpause_message (share_bitwise->share->priv->server, message);
+	g_object_class_install_property (object_class,
+					 PROP_TXT_RECORDS,
+					 g_param_spec_boxed ("txt-records",
+							     "TXT-Records",
+							     "Set TXT-Records used for MDNS publishing",
+							     G_TYPE_STRV,
+							     G_PARAM_READWRITE));
+
+	_signals[ERROR] =
+		g_signal_new ("error",
+		               G_TYPE_FROM_CLASS (object_class),
+		               G_SIGNAL_RUN_FIRST,
+		               0, NULL, NULL,
+		               NULL, G_TYPE_NONE, 1,
+		               G_TYPE_POINTER);
 }
 
 static void
-chunked_message_finished (G_GNUC_UNUSED SoupMessage * message,
-			  struct share_bitwise_t *share_bitwise)
+dmap_share_init (DmapShare * share)
 {
-	g_debug ("Finished sending chunked data.");
-	if (share_bitwise->destroy)
-		share_bitwise->destroy (share_bitwise->db);
-	g_free (share_bitwise);
+	share->priv = dmap_share_get_instance_private(share);
+
+	share->priv->revision_number = 5;
+	share->priv->auth_method = DMAP_SHARE_AUTH_METHOD_NONE;
+	share->priv->publisher = dmap_mdns_publisher_new ();
+	share->priv->server = soup_server_new (NULL, NULL);
+
+	/* using direct since there is no g_uint_hash or g_uint_equal */
+	share->priv->session_ids =
+		g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL,
+				       g_free);
+
+	g_signal_connect_object (share->priv->publisher,
+				 "published",
+				 G_CALLBACK (_published_adapter), share, 0);
+	g_signal_connect_object (share->priv->publisher,
+				 "name-collision",
+				 G_CALLBACK (_name_collision_adapter),
+				 share, 0);
 }
 
-static DMAPRecord *
-g_hash_table_lookup_adapter (GHashTable * ht, guint id)
+guint
+dmap_share_get_auth_method (DmapShare * share)
 {
-	/* NOTE: each time this is called by write_next_mlit(), the
-	 * returned value will be unref'ed by write_next_mlit(). We
-	 * also need to destroy the GHashTable, so bump up the reference
-	 * count so that both can happen. */
-	return g_object_ref (g_hash_table_lookup (ht, GUINT_TO_POINTER (id)));
+	return share->priv->auth_method;
 }
 
-void
-_dmap_share_databases (DMAPShare * share,
-		       SoupServer * server,
-		       SoupMessage * message,
-		       const char *path,
-		       GHashTable * query, SoupClientContext * context)
+static gboolean
+_get_session_id (GHashTable * query, guint32 * id)
 {
-	const char *rest_of_path;
-
-	g_debug ("Path is %s.", path);
-	g_hash_table_foreach (query, debug_param, NULL);
+	gboolean ok = FALSE;
+	char *session_id_str;
+	guint32 session_id;
 
-	if (!_dmap_share_session_id_validate
-	    (share, context, message, query, NULL)) {
-		soup_message_set_status (message, SOUP_STATUS_FORBIDDEN);
-		return;
+	session_id_str = g_hash_table_lookup (query, "session-id");
+	if (session_id_str == NULL) {
+		g_warning ("Session id not found.");
+		goto done;
 	}
 
-	rest_of_path = strchr (path + 1, '/');
+	session_id = (guint32) strtoul (session_id_str, NULL, 10);
+	if (id != NULL) {
+		*id = session_id;
+	}
 
-	if (rest_of_path == NULL) {
-		/* AVDB server databases
-		 *      MSTT status
-		 *      MUTY update type
-		 *      MTCO specified total count
-		 *      MRCO returned count
-		 *      MLCL listing
-		 *              MLIT listing item
-		 *                      MIID item id
-		 *                      MPER persistent id
-		 *                      MINM item name
-		 *                      MIMC item count
-		 *                      MCTC container count
-		 */
-		GNode *avdb;
-		GNode *mlcl;
-		GNode *mlit;
+	ok = TRUE;
 
-		avdb = dmap_structure_add (NULL, DMAP_CC_AVDB);
-		dmap_structure_add (avdb, DMAP_CC_MSTT,
-				    (gint32) DMAP_STATUS_OK);
-		dmap_structure_add (avdb, DMAP_CC_MUTY, 0);
-		dmap_structure_add (avdb, DMAP_CC_MTCO, (gint32) 1);
-		dmap_structure_add (avdb, DMAP_CC_MRCO, (gint32) 1);
-		mlcl = dmap_structure_add (avdb, DMAP_CC_MLCL);
-		mlit = dmap_structure_add (mlcl, DMAP_CC_MLIT);
-		dmap_structure_add (mlit, DMAP_CC_MIID, (gint32) 1);
-		dmap_structure_add (mlit, DMAP_CC_MPER, (gint64) 1);
-		dmap_structure_add (mlit, DMAP_CC_MINM, share->priv->name);
-		dmap_structure_add (mlit, DMAP_CC_MIMC,
-				    dmap_db_count (share->priv->db));
-		dmap_structure_add (mlit, DMAP_CC_MCTC, (gint32) 1);
+done:
+	return ok;
+}
 
-		_dmap_share_message_set_from_dmap_structure (share, message,
-							     avdb);
-		dmap_structure_destroy (avdb);
-	} else if (g_ascii_strcasecmp ("/1/groups", rest_of_path) == 0) {
-		/* ADBS database songs
-		 *      MSTT status
-		 *      MUTY update type
-		 *      MTCO specified total count
-		 *      MRCO returned count
-		 *      MLCL listing
-		 *              MLIT
-		 *                      attrs
-		 *              MLIT
-		 *              ...
-		 */
+gboolean
+dmap_share_session_id_validate (DmapShare * share,
+                                SoupServerMessage *message,
+                                GHashTable * query, guint32 * id)
+{
+	gboolean ok = FALSE;
+	guint32 session_id;
+	gboolean res;
+	const char *addr;
+	const char *remote_address;
 
-		GSList *filter_def;
-		gchar *record_query;
-		GHashTable *records = NULL;
-		GHashTable *groups;
-		GList *values;
-		GList *value;
-		gchar *sort_by;
-		GroupInfo *group_info;
-		GNode *agal;
-		GNode *mlcl;
-		GNode *mlit;
-		gint num;
+	if (id) {
+		*id = 0;
+	}
 
-		if (g_strcmp0
-		    (g_hash_table_lookup (query, "group-type"),
-		     "albums") != 0) {
-			g_warning ("Unsupported grouping");
-			soup_message_set_status (message,
-						 SOUP_STATUS_INTERNAL_SERVER_ERROR);
-			return;
-		}
+	res = _get_session_id (query, &session_id);
+	if (!res) {
+		g_warning ("Validation failed: Unable to parse session id");
+		goto done;
+	}
 
-		record_query = g_hash_table_lookup (query, "query");
-		filter_def = _dmap_share_build_filter (record_query);
-		records =
-			dmap_db_apply_filter (DMAP_DB (share->priv->db),
-					      filter_def);
+	/* check hash for remote address */
+	addr = g_hash_table_lookup (share->priv->session_ids,
+				    GUINT_TO_POINTER (session_id));
+	if (addr == NULL) {
+		g_warning
+			("Validation failed: Unable to lookup session id %u",
+			 session_id);
+		goto done;
+	}
 
-		groups = g_hash_table_new_full (g_str_hash, g_str_equal,
-						g_free, g_free);
-		g_hash_table_foreach (records, (GHFunc) group_items, groups);
+	remote_address = soup_server_message_get_remote_host (message);
+	g_debug ("Validating session id %u from %s matches %s",
+		 session_id, remote_address, addr);
+	if (remote_address == NULL || strcmp (addr, remote_address) != 0) {
+		g_warning
+			("Validation failed: Remote address does not match stored address");
+		goto done;
+	}
 
-		agal = dmap_structure_add (NULL, DMAP_CC_AGAL);
-		dmap_structure_add (agal, DMAP_CC_MSTT,
-				    (gint32) DMAP_STATUS_OK);
-		dmap_structure_add (agal, DMAP_CC_MUTY, 0);
+	if (id) {
+		*id = session_id;
+	}
 
-		num = g_hash_table_size (groups);
-		dmap_structure_add (agal, DMAP_CC_MTCO, (gint32) num);
-		dmap_structure_add (agal, DMAP_CC_MRCO, (gint32) num);
+	ok = TRUE;
 
-		mlcl = dmap_structure_add (agal, DMAP_CC_MLCL);
+done:
+	return ok;
+}
 
-		values = g_hash_table_get_values (groups);
-		if (g_hash_table_lookup (query, "include-sort-headers")) {
-			sort_by = g_hash_table_lookup (query, "sort");
-			if (g_strcmp0 (sort_by, "album") == 0) {
-				values = g_list_sort (values, group_info_cmp);
-			} else {
-				g_warning ("Unknown sort column: %s",
-					   sort_by);
-			}
-		}
+static guint32
+_session_id_generate (void)
+{
+	guint32 id;
 
-		for (value = values; value; value = g_list_next (value)) {
-			group_info = (GroupInfo *) value->data;
-			mlit = dmap_structure_add (mlcl, DMAP_CC_MLIT);
-			dmap_structure_add (mlit, DMAP_CC_MIID,
-					    (gint) group_info->group_id);
-			dmap_structure_add (mlit, DMAP_CC_MPER,
-					    group_info->group_id);
-			dmap_structure_add (mlit, DMAP_CC_MINM,
-					    group_info->name);
-			dmap_structure_add (mlit, DMAP_CC_ASAA,
-					    group_info->artist);
-			dmap_structure_add (mlit, DMAP_CC_MIMC,
-					    (gint32) group_info->count);
+	id = g_random_int ();
 
-			// Free this now, since the hash free func won't.
-			// Name will be freed when the hash table keys are freed.
-			g_free (group_info->artist);
-		}
+	return id;
+}
 
-		g_list_free (values);
-		dmap_share_free_filter (filter_def);
+static guint32
+_session_id_create (DmapShare *share, SoupServerMessage *message)
+{
+	guint32 id;
+	const char *addr;
+	char *remote_address;
 
-		_dmap_share_message_set_from_dmap_structure (share, message,
-							     agal);
+	do {
+		/* create a unique session id */
+		id = _session_id_generate ();
+		g_debug ("Generated session id %u", id);
 
-		g_hash_table_destroy (records);
-		g_hash_table_destroy (groups);
-		dmap_structure_destroy (agal);
-	} else if (g_ascii_strcasecmp ("/1/items", rest_of_path) == 0) {
-		/* ADBS database songs
-		 *      MSTT status
-		 *      MUTY update type
-		 *      MTCO specified total count
-		 *      MRCO returned count
-		 *      MLCL listing
-		 *              MLIT
-		 *                      attrs
-		 *              MLIT
-		 *              ...
-		 */
-		GNode *adbs;
-		gchar *record_query;
-		GHashTable *records = NULL;
-		struct DMAPMetaDataMap *map;
-		gint32 num_songs;
-		struct MLCL_Bits mb = { NULL, 0, NULL };
-		struct share_bitwise_t *share_bitwise;
+		/* if already used, try again */
+		addr = g_hash_table_lookup (share->priv->session_ids,
+					    GUINT_TO_POINTER (id));
+	} while (addr != NULL);
 
-		record_query = g_hash_table_lookup (query, "query");
-		if (record_query) {
-			GSList *filter_def;
+	/* store session id and remote address */
+	/* FIXME, warning, this fails against libsoup-2.33.90-1.fc15.x86_64 with:
+	 * (dmapd:12917): libsoup-CRITICAL **: soup_address_get_physical: assertion `SOUP_IS_ADDRESS (addr)' failed
+	 * Is this a bug in libsoup or libdmapsharing?
+	 */
+	remote_address = g_strdup (soup_server_message_get_remote_host (message));
+	g_hash_table_insert (share->priv->session_ids, GUINT_TO_POINTER (id),
+			     remote_address);
 
-			filter_def = _dmap_share_build_filter (record_query);
-			records =
-				dmap_db_apply_filter (DMAP_DB
-						      (share->priv->db),
-						      filter_def);
-			num_songs = g_hash_table_size (records);
-			g_debug ("Found %d records", num_songs);
-			dmap_share_free_filter (filter_def);
-		} else {
-			num_songs = dmap_db_count (share->priv->db);
-		}
+	return id;
+}
 
-		map = DMAP_SHARE_GET_CLASS (share)->get_meta_data_map (share);
-		mb.bits = _dmap_share_parse_meta (query, map);
-		mb.share = share;
+void
+dmap_share_message_set_from_dmap_structure (DmapShare * share,
+					     SoupServerMessage * message,
+					     GNode * structure)
+{
+	gchar *resp;
+	guint length;
 
-		/* NOTE:
-		 * We previously simply called foreach...add_entry_to_mlcl and later serialized the entire
-		 * structure. This has the disadvantage that the entire response must be in memory before
-		 * libsoup sends it to the client.
-		 *
-		 * Now, we go through the database in multiple passes (as an interim solution):
-		 *
-		 * 1. Accumulate the eventual size of the MLCL by creating and then free'ing each MLIT.
-		 * 2. Generate the DAAP preamble ending with the MLCL (with size fudged for ADBS and MLCL).
-		 * 3. Setup libsoup response headers, etc.
-		 * 4. Setup callback to transmit DAAP preamble (write_dmap_preamble)
-		 * 5. Setup callback to transmit MLIT's (write_next_mlit)
-		 */
+	resp = dmap_structure_serialize (structure, &length);
 
-		/* 1: */
-		share_bitwise = g_new0 (struct share_bitwise_t, 1);
+	if (resp == NULL) {
+		g_warning ("Serialize gave us null?");
+		return;
+	}
 
-		share_bitwise->share = share;
-		share_bitwise->mb = mb;
-		share_bitwise->id_list = NULL;
-		share_bitwise->size = 0;
-		if (record_query) {
-			share_bitwise->db = records;
-			share_bitwise->lookup_by_id = (ShareBitwiseLookupByIdFunc)
-				g_hash_table_lookup_adapter;
-			share_bitwise->destroy = (ShareBitwiseDestroyFunc) g_hash_table_destroy;
-			g_hash_table_foreach (records,
-					      (GHFunc)
-					      accumulate_mlcl_size_and_ids,
-					      share_bitwise);
-		} else {
-			share_bitwise->db = share->priv->db;
-			share_bitwise->lookup_by_id = (ShareBitwiseLookupByIdFunc) dmap_db_lookup_by_id;
-			share_bitwise->destroy = NULL;
-			dmap_db_foreach (share->priv->db,
-					 (GHFunc)
-					 accumulate_mlcl_size_and_ids,
-					 share_bitwise);
-		}
+	soup_server_message_set_response (
+		message,
+		"application/x-dmap-tagged",
+		SOUP_MEMORY_TAKE,
+		resp,
+		length
+	);
 
-		/* 2: */
-		adbs = dmap_structure_add (NULL, DMAP_CC_ADBS);
-		dmap_structure_add (adbs, DMAP_CC_MSTT,
-				    (gint32) DMAP_STATUS_OK);
-		dmap_structure_add (adbs, DMAP_CC_MUTY, 0);
-		dmap_structure_add (adbs, DMAP_CC_MTCO, (gint32) num_songs);
-		dmap_structure_add (adbs, DMAP_CC_MRCO, (gint32) num_songs);
-		mb.mlcl = dmap_structure_add (adbs, DMAP_CC_MLCL);
-		dmap_structure_increase_by_predicted_size (adbs,
-							   share_bitwise->
-							   size);
-		dmap_structure_increase_by_predicted_size (mb.mlcl,
-							   share_bitwise->
-							   size);
+	DMAP_SHARE_GET_CLASS (share)->message_add_standard_headers (share,
+								    message);
 
-		/* 3: */
-		/* Free memory after each chunk sent out over network. */
-		soup_message_body_set_accumulate (message->response_body,
-						  FALSE);
-		soup_message_headers_append (message->response_headers,
-					     "Content-Type",
-					     "application/x-dmap-tagged");
-		DMAP_SHARE_GET_CLASS (share)->
-			message_add_standard_headers (share, message);
-		soup_message_headers_set_content_length (message->
-							 response_headers,
-							 dmap_structure_get_size
-							 (adbs));
-		soup_message_set_status (message, SOUP_STATUS_OK);
+	soup_server_message_set_status (message, SOUP_STATUS_OK, NULL);
+}
 
-		/* 4: */
-		g_signal_connect (message, "wrote_headers",
-				  G_CALLBACK (write_dmap_preamble), adbs);
+gboolean
+dmap_share_client_requested (DmapBits bits, gint field)
+{
+	return 0 != (bits & (((DmapBits) 1) << field));
+}
 
-		/* 5: */
-		g_signal_connect (message, "wrote_chunk",
-				  G_CALLBACK (write_next_mlit),
-				  share_bitwise);
-		g_signal_connect (message, "finished",
-				  G_CALLBACK (chunked_message_finished),
-				  share_bitwise);
+void
+dmap_share_login (DmapShare * share,
+                  SoupServerMessage * message,
+                  const char *path,
+                  G_GNUC_UNUSED GHashTable * query)
+{
+/* MLOG login response
+ * 	MSTT status
+ * 	MLID session id
+ */
+	GNode *mlog;
+	guint32 session_id;
 
-	} else if (g_ascii_strcasecmp ("/1/containers", rest_of_path) == 0) {
-		/* APLY database playlists
-		 *      MSTT status
-		 *      MUTY update type
-		 *      MTCO specified total count
-		 *      MRCO returned count
-		 *      MLCL listing
-		 *              MLIT listing item
-		 *                      MIID item id
-		 *                      MPER persistent item id
-		 *                      MINM item name
-		 *                      MIMC item count
-		 *                      ABPL baseplaylist (only for base)
-		 *              MLIT
-		 *              ...
-		 */
-		GNode *aply;
-		GNode *mlit;
-		struct DMAPMetaDataMap *map;
-		struct MLCL_Bits mb = { NULL, 0, NULL };
+	g_debug ("Path is %s.", path);
 
-		map = DMAP_SHARE_GET_CLASS (share)->get_meta_data_map (share);
-		mb.bits = _dmap_share_parse_meta (query, map);
-		mb.share = share;
+	session_id = _session_id_create (share, message);
 
-		aply = dmap_structure_add (NULL, DMAP_CC_APLY);
-		dmap_structure_add (aply, DMAP_CC_MSTT,
-				    (gint32) DMAP_STATUS_OK);
-		dmap_structure_add (aply, DMAP_CC_MUTY, 0);
-		dmap_structure_add (aply, DMAP_CC_MTCO,
-				    (gint32) dmap_container_db_count (share->
-								      priv->
-								      container_db)
-				    + 1);
-		dmap_structure_add (aply, DMAP_CC_MRCO,
-				    (gint32) dmap_container_db_count (share->
-								      priv->
-								      container_db)
-				    + 1);
-		mb.mlcl = dmap_structure_add (aply, DMAP_CC_MLCL);
+	mlog = dmap_structure_add (NULL, DMAP_CC_MLOG);
+	dmap_structure_add (mlog, DMAP_CC_MSTT, (gint32) SOUP_STATUS_OK);
+	dmap_structure_add (mlog, DMAP_CC_MLID, session_id);
 
-		/* Base playlist (playlist 1 contains all songs): */
-		mlit = dmap_structure_add (mb.mlcl, DMAP_CC_MLIT);
-		dmap_structure_add (mlit, DMAP_CC_MIID, (gint32) 1);
-		dmap_structure_add (mlit, DMAP_CC_MPER, (gint64) 1);
-		dmap_structure_add (mlit, DMAP_CC_MINM, share->priv->name);
-		dmap_structure_add (mlit, DMAP_CC_MIMC,
-				    dmap_db_count (share->priv->db));
-		dmap_structure_add (mlit, DMAP_CC_FQUESCH, 0);
-		dmap_structure_add (mlit, DMAP_CC_MPCO, 0);
-		dmap_structure_add (mlit, DMAP_CC_AESP, 0);
-		dmap_structure_add (mlit, DMAP_CC_AEPP, 0);
-		dmap_structure_add (mlit, DMAP_CC_AEPS, 0);
-		dmap_structure_add (mlit, DMAP_CC_AESG, 0);
+	dmap_share_message_set_from_dmap_structure (share, message, mlog);
+	dmap_structure_destroy (mlog);
+}
 
-		dmap_structure_add (mlit, DMAP_CC_ABPL, (gchar) 1);
+GSList *
+dmap_share_build_filter (gchar * filterstr)
+{
+	/* Produces a list of lists, each being a filter definition that may
+	 * be one or more filter criteria.
+	 */
 
-		dmap_container_db_foreach (share->priv->container_db,
-					   (GHFunc)
-					   _dmap_share_add_playlist_to_mlcl,
-					   &mb);
+	/* A filter string looks like (iTunes):
+	 * 'daap.songgenre:Other'+'daap.songartist:Band'.
+	 * or (Roku):
+	 * 'daap.songgenre:Other' 'daap.songartist:Band'.
+	 * or
+	 * 'dmap.itemid:1000'
+	 * or
+	 * 'dmap.itemid:1000','dmap:itemid:1001'
+	 * or
+	 * 'daap.songgenre:Foo'+'daap.songartist:Bar'+'daap.songalbum:Baz'
+	 * or (iPhoto '09)
+	 * ('daap.idemid:1000','dmap:itemid:1001')
+	 * or (DACP):
+	 * ('com.apple.itunes.mediakind:1','com.apple.itunes.mediakind:32') 'daap.songartist!:'
+	 */
 
-		_dmap_share_message_set_from_dmap_structure (share, message,
-							     aply);
-		dmap_structure_destroy (aply);
-	} else if (g_ascii_strncasecmp ("/1/containers/", rest_of_path, 14) ==
-		   0) {
-		/* APSO playlist songs
-		 *      MSTT status
-		 *      MUTY update type
-		 *      MTCO specified total count
-		 *      MRCO returned count
-		 *      MLCL listing
-		 *              MLIT listing item
-		 *                      MIKD item kind
-		 *                      MIID item id
-		 *                      MCTI container item id
-		 *              MLIT
-		 *              ...
-		 */
-		GNode *apso;
-		struct DMAPMetaDataMap *map;
-		struct MLCL_Bits mb = { NULL, 0, NULL };
-		guint pl_id;
-		gchar *record_query;
-		GSList *filter_def;
-		GHashTable *records;
+	gchar *next_char;
+	GString *value;
 
-		map = DMAP_SHARE_GET_CLASS (share)->get_meta_data_map (share);
-		mb.bits = _dmap_share_parse_meta (query, map);
-		mb.share = share;
+	//gboolean save_value;
+	gboolean is_key;
+	gboolean is_value;
+	gboolean new_group;
+	gboolean accept;
+	gboolean negate;
+	gint parentheses_count;
+	gint quotes_count;
+	DmapDbFilterDefinition *def;
 
-		apso = dmap_structure_add (NULL, DMAP_CC_APSO);
-		dmap_structure_add (apso, DMAP_CC_MSTT,
-				    (gint32) DMAP_STATUS_OK);
-		dmap_structure_add (apso, DMAP_CC_MUTY, 0);
+	GSList *list = NULL;
+	GSList *filter = NULL;
 
-		if (g_ascii_strcasecmp ("/1/items", rest_of_path + 13) == 0) {
-			GList *id;
-			gchar *sort_by;
-			GList *keys;
+	g_debug ("Filter string is %s.", filterstr);
 
-			record_query = g_hash_table_lookup (query, "query");
-			filter_def = _dmap_share_build_filter (record_query);
-			records =
-				dmap_db_apply_filter (DMAP_DB
-						      (share->priv->db),
-						      filter_def);
-			gint32 num_songs = g_hash_table_size (records);
+	if (filterstr == NULL) {
+		goto done;
+	}
 
-			g_debug ("Found %d records", num_songs);
-			dmap_share_free_filter (filter_def);
+	next_char = filterstr;
 
-			dmap_structure_add (apso, DMAP_CC_MTCO,
-					    (gint32) num_songs);
-			dmap_structure_add (apso, DMAP_CC_MRCO,
-					    (gint32) num_songs);
-			mb.mlcl = dmap_structure_add (apso, DMAP_CC_MLCL);
+	parentheses_count = 0;
+	quotes_count = 0;
+	is_key = TRUE;
+	is_value = FALSE;
+	new_group = FALSE;
+	negate = FALSE;
+	value = NULL;
+	def = NULL;
 
-			sort_by = g_hash_table_lookup (query, "sort");
-			keys = g_hash_table_get_keys (records);
-			if (g_strcmp0 (sort_by, "album") == 0) {
-				keys = g_list_sort_with_data (keys,
-							      (GCompareDataFunc)
-							      daap_record_cmp_by_album,
-							      share->priv->
-							      db);
-			} else if (sort_by != NULL) {
-				g_warning ("Unknown sort column: %s",
-					   sort_by);
+	// The query string is divided in groups of AND separated by a space,
+	// each group containing queries of OR separated by comma enclosed in
+	// parentheses. Queries are key, value pairs separated by ':' enclosed 
+	// in quotes or not.
+	// The result from this is a list of lists. Here is an example:
+	// String is ('com.apple.itunes.mediakind:1','com.apple.itunes.mediakind:32') 'daap.songartist!:'
+	// list:
+	// |-> filter1: -> com.apple.itunes.mediakind = 1
+	// |   |        -> com.apple.itunes.mediakind = 32
+	// |-> filter1: -> daap.songartist! = (null)
+	// This basically means that the query is (filter1 AND filter2), and
+	// filter1 is (com.apple.itunes.mediakind = 1) OR (com.apple.itunes.mediakind = 32)
+	while (TRUE) {
+		// We check each character to see if it should be included in
+		// the current value (the current value will become the query key
+		// or the query value). Anything that is not a special character
+		// handled below will be accepted (this means weird characters
+		// might appear in names).
+		// Handling of unicode characters is unknown, but as long it 
+		// doesn't appear as a character handled below, it will be
+		// included.
+		// This parser will result in unknown behaviour on bad-formatted
+		// queries (it does not check for syntax errors), but should not 
+		// crash. In this way it may accept much more syntaxes then
+		// other parsers.
+		accept = FALSE;
+		// A slash can escape characters such as ', so add the character
+		// after the slash.
+		if (*next_char == '\\') {
+			accept = TRUE;
+			next_char++;
+		} else {
+			switch (*next_char) {
+			case '(':
+				if (is_value) {
+					accept = TRUE;
+				} else {
+					parentheses_count++;
+				}
+				break;
+			case ')':
+				if (is_value) {
+					accept = TRUE;
+				} else {
+					parentheses_count--;
+				}
+				break;
+			case '\'':
+				if (quotes_count > 0) {
+					quotes_count = 0;
+				} else {
+					quotes_count = 1;
+				}
+				break;
+			case ' ':
+				if (is_value) {
+					accept = TRUE;
+				} else {
+					new_group = TRUE;
+				}
+				break;
+			case ':':
+				// Inside values, they will be included in the 
+				// query string, otherwise it indicates there
+				// will be a value next.
+				if (is_value) {
+					accept = TRUE;
+				} else if (is_key) {
+					is_value = TRUE;
+				}
+				break;
+			case '!':
+				if (is_value) {
+					accept = TRUE;
+				} else if (is_key && value) {
+					negate = TRUE;
+				}
+				break;
+			case ',':
+			case '+':
+				// Accept these characters only if inside quotes
+				if (is_value) {
+					accept = TRUE;
+				}
+				break;
+			case '\0':
+				// Never accept
+				break;
+			default:
+				accept = TRUE;
+				break;
 			}
-
-			for (id = keys; id; id = id->next) {
-				(*
-				 (DMAP_SHARE_GET_CLASS (share)->
-				  add_entry_to_mlcl)) (id->data,
-						       g_hash_table_lookup
-						       (records, id->data),
-						       &mb);
+		}
+		//g_debug ("Char: %c, Accept: %s", *next_char, accept?"TRUE":"FALSE");
+		//Is the next character to be accepted?
+		if (accept) {
+			if (!value) {
+				value = g_string_new ("");
 			}
-
-			g_list_free (keys);
-			g_hash_table_destroy (records);
-		} else {
-			pl_id = strtoul (rest_of_path + 14, NULL, 10);
-			if (pl_id == 1) {
-				gint32 num_songs =
-					dmap_db_count (share->priv->db);
-				dmap_structure_add (apso, DMAP_CC_MTCO,
-						    (gint32) num_songs);
-				dmap_structure_add (apso, DMAP_CC_MRCO,
-						    (gint32) num_songs);
-				mb.mlcl =
-					dmap_structure_add (apso,
-							    DMAP_CC_MLCL);
-
-				dmap_db_foreach (share->priv->db,
-						 (GHFunc)
-						 DMAP_SHARE_GET_CLASS
-						 (share)->add_entry_to_mlcl,
-						 &mb);
+			g_string_append_c (value, *next_char);
+		} else if (value != NULL && *next_char != '!') {
+			// If we won't accept this character, we are ending a 
+			// query key or value, so we should save them in a new
+			// DmapDbFilterDefinition. If is_value is TRUE, we will still
+			// parse the query value, so we must keep our def around.
+			// Otherwise, save it in the list of filters.
+			if (!def) {
+				def = g_new0 (DmapDbFilterDefinition, 1);
+			}
+			if (is_key) {
+				def->key = value->str;
+				g_string_free (value, FALSE);
+				def->negate = negate;
+				negate = FALSE;
+				is_key = FALSE;
 			} else {
-				DMAPContainerRecord *record;
-				DMAPDb *entries;
-				guint num_songs;
+				def->value = value->str;
+				g_string_free (value, FALSE);
+				is_value = FALSE;
+				is_key = TRUE;
+			}
+			value = NULL;
+			if (!is_value) {
+				filter = g_slist_append (filter, def);
+				def = NULL;
+			}
+		}
+		if (new_group && filter) {
+			list = g_slist_append (list, filter);
+			filter = NULL;
+			new_group = FALSE;
+		}
+		// Only handle \0 here so we can handle remaining values above.
+		if (*next_char == '\0') {
+			break;
+		}
+		next_char++;
+	};
 
-				record = dmap_container_db_lookup_by_id
-					(share->priv->container_db, pl_id);
-				entries =
-					dmap_container_record_get_entries
-					(record);
-				/* FIXME: what if entries is NULL (handled in dmapd but should be [also] handled here)? */
-				num_songs = dmap_db_count (entries);
+	// Any remaining def or filter must still be handled here.
+	if (def) {
+		filter = g_slist_append (filter, def);
+	}
 
-				dmap_structure_add (apso, DMAP_CC_MTCO,
-						    (gint32) num_songs);
-				dmap_structure_add (apso, DMAP_CC_MRCO,
-						    (gint32) num_songs);
-				mb.mlcl =
-					dmap_structure_add (apso,
-							    DMAP_CC_MLCL);
+	if (filter) {
+		list = g_slist_append (list, filter);
+	}
 
-				dmap_db_foreach (entries,
-						 (GHFunc)
-						 DMAP_SHARE_GET_CLASS
-						 (share)->add_entry_to_mlcl,
-						 &mb);
+	GSList *ptr1, *ptr2;
 
-				g_object_unref (entries);
-				g_object_unref (record);
-			}
+	for (ptr1 = list; ptr1 != NULL; ptr1 = ptr1->next) {
+		for (ptr2 = ptr1->data; ptr2 != NULL; ptr2 = ptr2->next) {
+			g_debug ("%s = %s",
+				 ((DmapDbFilterDefinition *) ptr2->data)->key,
+				 ((DmapDbFilterDefinition *) ptr2->data)->value);
 		}
+	}
 
-		_dmap_share_message_set_from_dmap_structure (share, message,
-							     apso);
-		dmap_structure_destroy (apso);
-	} else if (g_ascii_strncasecmp ("/1/browse/", rest_of_path, 9) == 0) {
-		DMAP_SHARE_GET_CLASS (share)->databases_browse_xxx (share,
-								    server,
-								    message,
-								    path,
-								    query,
-								    context);
-	} else if (g_ascii_strncasecmp ("/1/items/", rest_of_path, 9) == 0) {
-		/* just the file :) */
-		DMAP_SHARE_GET_CLASS (share)->databases_items_xxx (share,
-								   server,
-								   message,
-								   path,
-								   query,
-								   context);
-	} else if (g_str_has_prefix (rest_of_path, "/1/groups/") &&
-		   g_str_has_suffix (rest_of_path, "/extra_data/artwork")) {
-		/* We don't yet implement cover requests here, say no cover */
-		g_debug ("Assuming no artwork for requested group/album");
-		soup_message_set_status (message, SOUP_STATUS_NOT_FOUND);
-	} else {
-		g_warning ("Unhandled: %s\n", path);
+done:
+	return list;
+}
+
+void
+dmap_share_free_filter (GSList * filter)
+{
+	GSList *ptr1, *ptr2;
+
+	for (ptr1 = filter; ptr1 != NULL; ptr1 = ptr1->next) {
+		for (ptr2 = ptr1->data; ptr2 != NULL; ptr2 = ptr2->next) {
+			g_free (((DmapDbFilterDefinition *) ptr2->data)->value);
+			g_free (ptr2->data);
+		}
 	}
 }
+
+void
+dmap_share_emit_error(DmapShare *share, gint code, const gchar *format, ...)
+{
+	va_list ap;
+	GError *error;
+
+	va_start(ap, format);
+	error = g_error_new_valist(DMAP_ERROR, code, format, ap);
+	g_signal_emit_by_name(share, "error", error);
+
+	va_end(ap);
+}
diff --git a/libdmapsharing/dmap-share.h b/libdmapsharing/dmap-share.h
index e96ec09..0ba4d89 100644
--- a/libdmapsharing/dmap-share.h
+++ b/libdmapsharing/dmap-share.h
@@ -20,264 +20,209 @@
  *
  */
 
-#ifndef __DMAP_SHARE_H
-#define __DMAP_SHARE_H
+#ifndef _DMAP_SHARE_H
+#define _DMAP_SHARE_H
 
 #include <glib-object.h>
 
 #include <libsoup/soup.h>
-#include <libsoup/soup-address.h>
-#include <libsoup/soup-message.h>
-#include <libsoup/soup-uri.h>
-#include <libsoup/soup-server.h>
 
 #include <libdmapsharing/dmap-record.h>
 #include <libdmapsharing/dmap-mdns-publisher.h>
 #include <libdmapsharing/dmap-container-record.h>
 
 G_BEGIN_DECLS
+/**
+ * SECTION: dmap-share
+ * @short_description: An abstract parent to the various share classes.
+ *
+ * #DmapShare provides an abstract parent to the #DmapAvShare, #DmapControlShare, and #DmapImageShare classes.
+ */
+
 /**
  * DMAP_TYPE_SHARE:
  *
- * The type for #DMAPShare.
+ * The type for #DmapShare.
  */
 #define DMAP_TYPE_SHARE         (dmap_share_get_type ())
 /**
  * DMAP_SHARE:
  * @o: Object which is subject to casting.
  *
- * Casts a #DMAPShare or derived pointer into a (DMAPShare*) pointer.
+ * Casts a #DmapShare or derived pointer into a (DmapShare*) pointer.
  * Depending on the current debugging level, this function may invoke
  * certain runtime checks to identify invalid casts.
  */
 #define DMAP_SHARE(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), \
-				 DMAP_TYPE_SHARE, DMAPShare))
+				 DMAP_TYPE_SHARE, DmapShare))
 /**
  * DMAP_SHARE_CLASS:
- * @k: a valid #DMAPShareClass
+ * @k: a valid #DmapShareClass
  *
- * Casts a derived #DMAPShareClass structure into a #DMAPShareClass structure.
+ * Casts a derived #DmapShareClass structure into a #DmapShareClass structure.
  */
 #define DMAP_SHARE_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), \
-				 DMAP_TYPE_SHARE, DMAPShareClass))
+				 DMAP_TYPE_SHARE, DmapShareClass))
 /**
- * IS_DMAP_SHARE:
+ * DMAP_IS_SHARE:
  * @o: Instance to check for being a %DMAP_TYPE_SHARE.
  *
  * Checks whether a valid #GTypeInstance pointer is of type %DMAP_TYPE_SHARE.
  */
-#define IS_DMAP_SHARE(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
+#define DMAP_IS_SHARE(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
 				 DMAP_TYPE_SHARE))
 /**
- * IS_DMAP_SHARE_CLASS:
- * @k: a #DMAPShareClass
+ * DMAP_IS_SHARE_CLASS:
+ * @k: a #DmapShareClass
  *
- * Checks whether @k "is a" valid #DMAPShareClass structure of type
+ * Checks whether @k "is a" valid #DmapShareClass structure of type
  * %DMAP_SHARE or derived.
  */
-#define IS_DMAP_SHARE_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), \
+#define DMAP_IS_SHARE_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), \
 				 DMAP_TYPE_SHARE))
 /**
  * DMAP_SHARE_GET_CLASS:
- * @o: a #DMAPShare instance.
+ * @o: a #DmapShare instance.
  *
- * Get the class structure associated to a #DMAPShare instance.
+ * Get the class structure associated to a #DmapShare instance.
  *
  * Returns: pointer to object class structure.
  */
 #define DMAP_SHARE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
-				 DMAP_TYPE_SHARE, DMAPShareClass))
-#define DMAP_STATUS_OK 200
-typedef struct DMAPSharePrivate DMAPSharePrivate;
+				 DMAP_TYPE_SHARE, DmapShareClass))
+typedef struct DmapSharePrivate DmapSharePrivate;
 
-typedef struct
-{
+typedef struct {
 	GObject parent;
-	DMAPSharePrivate *priv;
-} DMAPShare;
+	DmapSharePrivate *priv;
+} DmapShare;
 
-typedef struct DMAPMetaDataMap DMAPMetaDataMap;
+typedef struct DmapMetaDataMap DmapMetaDataMap;
 
-typedef struct
-{
+typedef enum {
+	DMAP_SHARE_AUTH_METHOD_NONE = 0,
+	DMAP_SHARE_AUTH_METHOD_NAME_AND_PASSWORD = 1,
+	DMAP_SHARE_AUTH_METHOD_PASSWORD = 2
+} DmapShareAuthMethod;
+
+typedef struct {
 	GObjectClass parent;
 
 	/* Pure virtual methods: */
-	  guint (*get_desired_port) (DMAPShare * share);
-	const char *(*get_type_of_service) (DMAPShare * share);
-	void (*message_add_standard_headers) (DMAPShare * share,
-					      SoupMessage * msg);
-	struct DMAPMetaDataMap *(*get_meta_data_map) (DMAPShare * share);
-	void (*add_entry_to_mlcl) (gpointer id,
-				   DMAPRecord * record, gpointer mb);
-	void (*databases_browse_xxx) (DMAPShare * share,
-				      SoupServer * server,
-				      SoupMessage * msg,
+	  guint (*get_desired_port) (DmapShare * share);
+	const char *(*get_type_of_service) (DmapShare * share);
+	void (*message_add_standard_headers) (DmapShare * share,
+					      SoupServerMessage * msg);
+	struct DmapMetaDataMap *(*get_meta_data_map) (DmapShare * share);
+	void (*add_entry_to_mlcl) (guint id, DmapRecord * record, gpointer mb);
+	void (*databases_browse_xxx) (DmapShare * share,
+				      SoupServerMessage * msg,
 				      const char *path,
-				      GHashTable * query,
-				      SoupClientContext * context);
-	void (*databases_items_xxx) (DMAPShare * share,
+				      GHashTable * query);
+	void (*databases_items_xxx) (DmapShare * share,
 				     SoupServer * server,
-				     SoupMessage * msg,
-				     const char *path,
-				     GHashTable * query,
-				     SoupClientContext * context);
+				     SoupServerMessage * msg,
+	                             const char *path);
 
 	/* Pure virtual methods: libsoup callbacks */
-	void (*server_info) (DMAPShare * share, SoupServer * server,
-			     SoupMessage * message, const char *path,
-			     GHashTable * query, SoupClientContext * ctx);
+	void (*server_info) (DmapShare * share,
+			     SoupServerMessage * message,
+	                     const char *path);
 
-	void (*content_codes) (DMAPShare * share, SoupServer * server,
-			       SoupMessage * message, const char *path,
-			       GHashTable * query, SoupClientContext * ctx);
+	void (*content_codes) (DmapShare * share, SoupServerMessage * message,
+                               const char *path);
 
-	void (*login) (DMAPShare * share, SoupServer * server,
-		       SoupMessage * message, const char *path,
-		       GHashTable * query, SoupClientContext * ctx);
+	void (*login) (DmapShare * share,
+		       SoupServerMessage * message, const char *path,
+                       GHashTable * query);
 
-	void (*logout) (DMAPShare * share, SoupServer * server,
-			SoupMessage * message, const char *path,
-			GHashTable * query, SoupClientContext * ctx);
+	void (*logout) (DmapShare * share, SoupServerMessage * message,
+                        const char *path, GHashTable * query);
 
-	void (*update) (DMAPShare * share, SoupServer * server,
-			SoupMessage * message, const char *path,
-			GHashTable * query, SoupClientContext * ctx);
+	void (*update) (DmapShare * share, SoupServerMessage * message,
+	                const char *path, GHashTable * query);
 
-	void (*ctrl_int) (DMAPShare * share, SoupServer * server,
-			  SoupMessage * message, const char *path,
-			  GHashTable * query, SoupClientContext * ctx);
+	void (*ctrl_int) (DmapShare * share, SoupServerMessage * message,
+	                  const char *path, GHashTable * query);
 
 	/* Virtual methods: MDNS callbacks */
-	void (*published) (DMAPShare * share,
-			   DMAPMdnsPublisher * publisher, const char *name);
+	void (*published) (DmapShare * share,
+                           DmapMdnsPublisher * publisher,
+                           const char *name);
 
-	void (*name_collision) (DMAPShare * share,
-				DMAPMdnsPublisher * publisher,
+	void (*name_collision) (DmapShare * share,
+				DmapMdnsPublisher * publisher,
 				const char *name);
 
 	/* Virtual methods: */
-	void (*databases) (DMAPShare * share,
+	void (*databases) (DmapShare * share,
 			   SoupServer * server,
-			   SoupMessage * message,
+			   SoupServerMessage * message,
 			   const char *path,
-			   GHashTable * query, SoupClientContext * context);
-} DMAPShareClass;
+			   GHashTable * query);
+} DmapShareClass;
 
-struct DMAPMetaDataMap
+struct DmapMetaDataMap
 {
 	gchar *tag;
 	guint md;
 };
 
+typedef guint64 DmapBits;
+
 /* FIXME: this is passed as user_data to various functions; 
  * need to rename. Also, get rid of initializations elsewhere: { NULL, 0, NULL };
  * instead define a function to do this.
  */
-struct MLCL_Bits
+struct DmapMlclBits
 {
 	GNode *mlcl;
-	bitwise bits;
-	DMAPShare *share;
+	DmapBits bits;
+	DmapShare *share;
 };
 
 GType dmap_share_get_type (void);
 
-/* Non-virtual methods */
-guint _dmap_share_get_auth_method (DMAPShare * share);
-
-guint _dmap_share_get_revision_number (DMAPShare * share);
-
-gboolean _dmap_share_get_revision_number_from_query (GHashTable * query,
-						     guint * number);
-
-gboolean _dmap_share_session_id_validate (DMAPShare * share,
-					  SoupClientContext * context,
-					  SoupMessage * msg,
-					  GHashTable * query, guint32 * id);
-
-guint32 _dmap_share_session_id_create (DMAPShare * share,
-				       SoupClientContext * ctx);
-
-void _dmap_share_session_id_remove (DMAPShare * share,
-				    SoupClientContext * ctx, guint32 id);
-
-gboolean _dmap_share_client_requested (bitwise bits, gint field);
-
-gboolean _dmap_share_uri_is_local (const char *text_uri);
-
-gboolean _dmap_share_soup_auth_filter (SoupAuthDomain * auth_domain,
-				       SoupMessage * msg, gpointer user_data);
-
-gboolean _dmap_share_server_start (DMAPShare * share);
-
-gboolean _dmap_share_publish_start (DMAPShare * share);
-
-void _dmap_share_message_set_from_dmap_structure (DMAPShare * share,
-						  SoupMessage * message,
-						  GNode * structure);
-
-bitwise _dmap_share_parse_meta (GHashTable * query,
-				struct DMAPMetaDataMap *mdm);
-
-bitwise _dmap_share_parse_meta_str (const char *attrs,
-				    struct DMAPMetaDataMap *mdm);
-
-void _dmap_share_add_playlist_to_mlcl (gpointer id,
-				       DMAPContainerRecord * record,
-				       gpointer mb);
+/**
+ * dmap_share_serve:
+ * @share: a #DmapShare instance.
+ * @error: return location for a GError, or NULL.
+ *
+ * Begin serving the service defined by share. A program will normally also
+ * call dmap_share_publish.
+ *
+ * Returns: TRUE if serving succeeds, else FALSE with error set.
+ */
+gboolean dmap_share_serve(DmapShare *share, GError **error);
 
-GSList *_dmap_share_build_filter (gchar * filterstr);
+/**
+ * dmap_share_publish:
+ * @share: a #DmapShare instance.
+ * @error: return location for a GError, or NULL.
+ *
+ * Publish the availability of the given share using mDNS-SD.
+ *
+ * Returns: TRUE if publishing succeeds, else FALSE.
+ */
+gboolean dmap_share_publish(DmapShare *share, GError **error);
 
+/**
+ * dmap_share_free_filter:
+ * @filter: (element-type GSList): The filter list to free.
+ *
+ * Free the given filter list.
+ */
 void dmap_share_free_filter (GSList * filter);
 
-/* Virtual methods (libsoup callbacks with default implementation): */
-void _dmap_share_content_codes (DMAPShare * share,
-				SoupServer * server,
-				SoupMessage * message,
-				const char *path,
-				GHashTable * query,
-				SoupClientContext * context);
-
-void _dmap_share_login (DMAPShare * share,
-			SoupServer * server,
-			SoupMessage * message,
-			const char *path,
-			GHashTable * query, SoupClientContext * context);
-
-void _dmap_share_logout (DMAPShare * share,
-			 SoupServer * server,
-			 SoupMessage * message,
-			 const char *path,
-			 GHashTable * query, SoupClientContext * context);
-
-void _dmap_share_update (DMAPShare * share,
-			 SoupServer * server,
-			 SoupMessage * message,
-			 const char *path,
-			 GHashTable * query, SoupClientContext * context);
-
-void
-_dmap_share_databases (DMAPShare * share,
-		       SoupServer * server,
-		       SoupMessage * message,
-		       const char *path,
-		       GHashTable * query, SoupClientContext * context);
-
-void _dmap_share_ctrl_int (DMAPShare * share,
-			   SoupServer * server,
-			   SoupMessage * message,
-			   const char *path,
-			   GHashTable * query, SoupClientContext * context);
-
-/* Virtual methods: MDNS callbacks */
-void _dmap_share_published (DMAPShare * share,
-			    DMAPMdnsPublisher * publisher, const char *name);
-
-void _dmap_share_name_collision (DMAPShare * share,
-				 DMAPMdnsPublisher * publisher,
-				 const char *name);
+/**
+ * dmap_share_emit_error:
+ * @share: a #DmapShare instance.
+ * @code: error code.
+ * @format: printf()-style format for error message
+ * @...: parameters for message format
+ */
+void dmap_share_emit_error(DmapShare *share, gint code, const gchar *format, ...);
 
-#endif /* __DMAP_SHARE_H */
+#endif /* _DMAP_SHARE_H */
 
 G_END_DECLS
diff --git a/libdmapsharing/dmap-structure.c b/libdmapsharing/dmap-structure.c
index 77ec55b..029370c 100644
--- a/libdmapsharing/dmap-structure.c
+++ b/libdmapsharing/dmap-structure.c
@@ -18,6 +18,7 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA*
  */
 
+#include "dmap-error.h"
 #include "dmap-structure.h"
 #include "dmap-private-utils.h"
 
@@ -33,10 +34,12 @@
     ( (gint32)(gchar)(ch2) << 16 ) | \
     ( (gint32)(gchar)(ch3) << 24 ) ))
 
-static const DMAPContentCodeDefinition cc_defs[] = {
+static const DmapContentCodeDefinition _cc_defs[] = {
 	{DMAP_RAW, 0, "", "", DMAP_TYPE_STRING},
 	{DMAP_CC_MDCL, MAKE_CONTENT_CODE ('m', 'd', 'c', 'l'),
 	 "dmap.dictionary", "mdcl", DMAP_TYPE_CONTAINER},
+	{DMAP_CC_MEDS, MAKE_CONTENT_CODE ('m', 'e', 'd', 's'),
+	 "dmap.editcommandssupported", "meds", DMAP_TYPE_INT},
 	{DMAP_CC_MSTT, MAKE_CONTENT_CODE ('m', 's', 't', 't'), "dmap.status",
 	 "mstt", DMAP_TYPE_INT},
 	{DMAP_CC_MIID, MAKE_CONTENT_CODE ('m', 'i', 'i', 'd'), "dmap.itemid",
@@ -121,6 +124,8 @@ static const DMAPContentCodeDefinition cc_defs[] = {
 	 "dmap.speakermachineaddress", "msma", DMAP_TYPE_INT},
 	{DMAP_CC_FQUESCH, MAKE_CONTENT_CODE ('f', '?', 'c', 'h'),
 	 "dmap.haschildcontainers", "f?ch", DMAP_TYPE_BYTE},
+	{DMAP_CC_MDBK, MAKE_CONTENT_CODE ('m', 'd', 'b', 'k'),
+	 "dmap.databasekind", "mdbk", DMAP_TYPE_INT},
 
 	{DMAP_CC_APRO, MAKE_CONTENT_CODE ('a', 'p', 'r', 'o'),
 	 "daap.protocolversion", "apro", DMAP_TYPE_VERSION},
@@ -244,6 +249,8 @@ static const DMAPContentCodeDefinition cc_defs[] = {
 	 "dpap.imagecomments", "pcmt", DMAP_TYPE_STRING},
 	{DMAP_CC_PRET, MAKE_CONTENT_CODE ('p', 'r', 'e', 't'), "dpap.pret",
 	 "pret", DMAP_TYPE_STRING},
+	{DMAP_CC_AECS, MAKE_CONTENT_CODE ('a', 'e', 'C', 's'),
+	 "com.apple.itunes.artworkchecksum", "aeCs", DMAP_TYPE_INT},
 	{DMAP_CC_AESV, MAKE_CONTENT_CODE ('a', 'e', 'S', 'V'),
 	 "com.apple.itunes.music-sharing-version", "aesv", DMAP_TYPE_INT},
 	{DMAP_CC_AEHV, MAKE_CONTENT_CODE ('a', 'e', 'H', 'V'),
@@ -258,8 +265,24 @@ static const DMAPContentCodeDefinition cc_defs[] = {
 	 "com.apple.itunes.saved-genius", "aeSG", DMAP_TYPE_BYTE},
 	{DMAP_CC_AEMK, MAKE_CONTENT_CODE ('a', 'e', 'M', 'K'),
 	 "com.apple.itunes.mediakind", "aeMK", DMAP_TYPE_BYTE},
+	{DMAP_CC_AEMK2, MAKE_CONTENT_CODE ('a', 'e', 'M', 'k'),
+	 "com.apple.itunes.extended-media-kind", "aeMk", DMAP_TYPE_INT},
 	{DMAP_CC_AEFP, MAKE_CONTENT_CODE ('a', 'e', 'F', 'P'),
 	 "com.apple.itunes.req-fplay", "aeFP", DMAP_TYPE_BYTE},
+	{DMAP_CC_ATED, MAKE_CONTENT_CODE ('a', 't', 'e', 'd'),
+	 "daap.supportsextradata", "ated", DMAP_TYPE_SHORT},
+	{DMAP_CC_ASGR, MAKE_CONTENT_CODE ('a', 's', 'g', 'r'),
+	 "daap.supportsgroups", "asgr", DMAP_TYPE_SHORT},
+	{DMAP_CC_AEMQ, MAKE_CONTENT_CODE ('a', 'e', 'M', 'Q'),
+	 "com.apple.itunes.unknown-MQ", "aeMQ", DMAP_TYPE_BYTE},
+	{DMAP_CC_AESL, MAKE_CONTENT_CODE ('a', 'e', 'S', 'L'),
+	 "com.apple.itunes.unknown-SL", "aeSL", DMAP_TYPE_BYTE},
+	{DMAP_CC_AESR, MAKE_CONTENT_CODE ('a', 'e', 'S', 'R'),
+	 "com.apple.itunes.unknown-SR", "aeSR", DMAP_TYPE_BYTE},
+	{DMAP_CC_AETR, MAKE_CONTENT_CODE ('a', 'e', 'T', 'r'),
+	 "com.apple.itunes.unknown-Tr", "aeTr", DMAP_TYPE_BYTE},
+	{DMAP_CC_MSED, MAKE_CONTENT_CODE ('m', 's', 'e', 'd'),
+	 "com.apple.itunes.unknown-ed", "msed", DMAP_TYPE_BYTE},
 
 	/* DACP */
 	{DMAP_CC_CMPA, MAKE_CONTENT_CODE ('c', 'm', 'p', 'a'),
@@ -348,66 +371,87 @@ static const DMAPContentCodeDefinition cc_defs[] = {
 
 };
 
-const gchar *
-dmap_content_code_name (DMAPContentCode code)
+static const gchar *
+_cc_name (DmapContentCode code)
 {
-	return cc_defs[code - 1].name;
+	return _cc_defs[code - 1].name;
 }
 
-DMAPType
-dmap_content_code_dmap_type (DMAPContentCode code)
+static DmapType
+_cc_dmap_type (DmapContentCode code, GError **error)
 {
-	return cc_defs[code - 1].type;
+	DmapType type = DMAP_TYPE_INVALID;
+
+	if (code < sizeof _cc_defs / sizeof(DmapContentCodeDefinition)) {
+		type = _cc_defs[code - 1].type;
+	} else {
+		g_set_error(error, DMAP_ERROR, DMAP_STATUS_INVALID_CONTENT_CODE,
+			   "Invalid content code: %d", code);
+	}
+
+	return type;
 }
 
-const gchar *
-dmap_content_code_string (DMAPContentCode code)
+static const gchar *
+_cc_string (DmapContentCode code)
 {
-	return cc_defs[code - 1].string;
+	return _cc_defs[code - 1].string;
 }
 
 static GType
-dmap_content_code_gtype (DMAPContentCode code)
+_cc_gtype (DmapContentCode code, GError **error)
 {
-	switch (dmap_content_code_dmap_type (code)) {
+	GType type = G_TYPE_NONE;
+
+	switch (_cc_dmap_type (code, error)) {
 	case DMAP_TYPE_BYTE:
 	case DMAP_TYPE_SIGNED_INT:
-		return G_TYPE_CHAR;
+		type = G_TYPE_CHAR;
+		break;
 	case DMAP_TYPE_SHORT:
 	case DMAP_TYPE_INT:
 	case DMAP_TYPE_DATE:
-		return G_TYPE_INT;
+		type = G_TYPE_INT;
+		break;
 	case DMAP_TYPE_INT64:
-		return G_TYPE_INT64;
+		type = G_TYPE_INT64;
+		break;
 	case DMAP_TYPE_VERSION:
-		return G_TYPE_DOUBLE;
+		type = G_TYPE_DOUBLE;
+		break;
 	case DMAP_TYPE_STRING:
-		return G_TYPE_STRING;
+		type = G_TYPE_STRING;
+		break;
 	case DMAP_TYPE_POINTER:
-		return G_TYPE_POINTER;
+		type = G_TYPE_POINTER;
+		break;
 	case DMAP_TYPE_CONTAINER:
+	case DMAP_TYPE_INVALID:
 	default:
-		return G_TYPE_NONE;
+		type = G_TYPE_NONE;
+		break;
 	}
+
+	return type;
 }
 
 static gboolean
-dmap_structure_node_serialize (GNode * node, GByteArray * array)
+_node_serialize (GNode * node, GByteArray * array)
 {
-	DMAPStructureItem *item = node->data;
-	DMAPType dmap_type;
+	DmapStructureItem *item = node->data;
+	DmapType dmap_type;
 	guint32 size = GINT32_TO_BE (item->size);
 
 	if (item->content_code != DMAP_RAW) {
 		g_byte_array_append (array,
 				     (const guint8 *)
-				     dmap_content_code_string (item->
+				     _cc_string (item->
 							       content_code),
 				     4);
 		g_byte_array_append (array, (const guint8 *) &size, 4);
 	}
 
-	dmap_type = dmap_content_code_dmap_type (item->content_code);
+	dmap_type = _cc_dmap_type (item->content_code, NULL);
 
 	switch (dmap_type) {
 	case DMAP_TYPE_BYTE:
@@ -482,6 +526,7 @@ dmap_structure_node_serialize (GNode * node, GByteArray * array)
 			break;
 		}
 	case DMAP_TYPE_CONTAINER:
+	case DMAP_TYPE_INVALID:
 	default:
 		break;
 	}
@@ -500,7 +545,7 @@ dmap_structure_serialize (GNode * structure, guint * length)
 	if (structure) {
 		g_node_traverse (structure, G_PRE_ORDER, G_TRAVERSE_ALL, -1,
 				 (GNodeTraverseFunc)
-				 dmap_structure_node_serialize, array);
+				 _node_serialize, array);
 	}
 
 	data = (gchar *) array->data;
@@ -510,56 +555,87 @@ dmap_structure_serialize (GNode * structure, guint * length)
 	return data;
 }
 
-DMAPContentCode
-dmap_content_code_read_from_buffer (const gchar * buf)
+static DmapContentCode
+_cc_read_from_buffer (const gchar * buf, GError **error)
 {
+	DmapContentCode cc = DMAP_CC_INVALID;
+
 	gint32 c = MAKE_CONTENT_CODE (buf[0], buf[1], buf[2], buf[3]);
 	guint i;
 
-	for (i = 0; i < G_N_ELEMENTS (cc_defs); i++) {
-		if (cc_defs[i].int_code == c) {
-			return cc_defs[i].code;
+	for (i = 0; i < G_N_ELEMENTS (_cc_defs); i++) {
+		if (_cc_defs[i].int_code == c) {
+			cc = _cc_defs[i].code;
+			goto done;
 		}
 	}
 
-	g_warning ("Content code %4s is invalid.", buf);
+	g_set_error(error, DMAP_ERROR, DMAP_STATUS_INVALID_CONTENT_CODE,
+		   "Invalid content code: %4s", buf);
 
-	return DMAP_CC_INVALID;
+done:
+	return cc;
 }
 
 static gchar *
-dmap_buffer_read_string (const gchar * buf, gssize size)
+_read_string (const guint8 * buf, gsize size)
 {
-	if (g_utf8_validate (buf, size, NULL) == TRUE) {
-		return g_strndup (buf, size);
+	gchar *str;
+
+	if (g_utf8_validate ((char *) buf, size, NULL) == TRUE) {
+		str = g_strndup ((char *) buf, size);
 	} else {
-		return g_strdup ("");
+		str = g_strdup ("");
 	}
+
+	return str;
 }
 
 static void
-dmap_structure_parse_container_buffer (GNode * parent,
-				       const guchar * buf, gint buf_length)
+_parse_container_buffer (GNode * parent, const guint8 * buf,
+                         gsize buf_length, GError **error)
 {
-	gint l = 0;
+	gsize l = 0;
 
 	while (l < buf_length) {
-		DMAPContentCode cc;
-		gint codesize = 0;
-		DMAPStructureItem *item = NULL;
+		DmapContentCode cc;
+		gsize codesize = 0;
+		DmapStructureItem *item = NULL;
 		GNode *node = NULL;
 		GType gtype;
 
-		/* we need at least 8 bytes, 4 of content_code and 4 of size */
+		if (parent
+		 && parent->parent
+		 && ((DmapStructureItem *)parent->parent->data)
+		 && (DMAP_CC_ABGN == ((DmapStructureItem *) parent->parent->data)->content_code
+		 ||  DMAP_CC_ABAR == ((DmapStructureItem *) parent->parent->data)->content_code
+		 ||  DMAP_CC_ABAL == ((DmapStructureItem *) parent->parent->data)->content_code)) {
+			/* Assume DMAP_RAW, as grandparent is ABGN or similar. */
+			item = g_new0 (DmapStructureItem, 1);
+			item->content_code = DMAP_RAW;
+			node = g_node_new (item);
+			g_node_append (parent, node);
+			gchar *s = _read_string (buf, buf_length);
+			item->size = strlen (s);
+			g_value_init (&(item->content), G_TYPE_STRING);
+			g_value_take_string (&(item->content), s);
+
+			goto done;
+		}
+
+		/*
+		 * Except in cases above, we need at least 8 bytes (4 of
+		 * content_code and 4 of size) is odd.
+		 */
 		if (buf_length - l < 8) {
-			g_debug ("Malformed response received\n");
-			return;
+			g_set_error(error, DMAP_ERROR, DMAP_STATUS_RESPONSE_TOO_SHORT,
+				   "Malformed response received");
+			goto done;
 		}
 
-		cc = dmap_content_code_read_from_buffer ((const gchar *)
-							 &(buf[l]));
+		cc = _cc_read_from_buffer ((const gchar *) &(buf[l]), error);
 		if (cc == DMAP_CC_INVALID) {
-			return;
+			goto done;
 		}
 		l += 4;
 
@@ -570,24 +646,28 @@ dmap_structure_parse_container_buffer (GNode * parent,
 		 * a codesize that is larger than the remaining data)
 		 * then get out before we start processing it
 		 */
-		if (codesize > buf_length - l - 4 || codesize < 0) {
-			g_debug ("Invalid codesize %d received in buf_length %d\n", codesize, buf_length);
-			return;
+		if (codesize > buf_length - l - 4) {
+			g_set_error(error, DMAP_ERROR,
+			            DMAP_STATUS_INVALID_CONTENT_CODE_SIZE,
+				   "Invalid codesize %"G_GSIZE_FORMAT" "
+			           "received in buffer of length %"G_GSIZE_FORMAT,
+			            codesize, buf_length);
+			goto done;
 		}
 		l += 4;
 
-		item = g_new0 (DMAPStructureItem, 1);
+		item = g_new0 (DmapStructureItem, 1);
 		item->content_code = cc;
 		node = g_node_new (item);
 		g_node_append (parent, node);
 
-		gtype = dmap_content_code_gtype (item->content_code);
+		gtype = _cc_gtype (item->content_code, error);
 
 		if (gtype != G_TYPE_NONE) {
 			g_value_init (&(item->content), gtype);
 		}
 // FIXME USE THE G_TYPE CONVERTOR FUNCTION dmap_type_to_gtype
-		switch (dmap_content_code_dmap_type (item->content_code)) {
+		switch (_cc_dmap_type (item->content_code, error)) {
 		case DMAP_TYPE_SIGNED_INT:
 		case DMAP_TYPE_BYTE:{
 				gchar c = 0;
@@ -637,11 +717,7 @@ dmap_structure_parse_container_buffer (GNode * parent,
 				break;
 			}
 		case DMAP_TYPE_STRING:{
-				gchar *s =
-					dmap_buffer_read_string ((const gchar
-								  *)
-								 &(buf[l]),
-								 codesize);
+				gchar *s = _read_string (&(buf[l]), codesize);
 
 				item->size = strlen (s);
 				g_value_take_string (&(item->content), s);
@@ -649,8 +725,8 @@ dmap_structure_parse_container_buffer (GNode * parent,
 			}
 		case DMAP_TYPE_POINTER:{
 				gpointer *data =
-					g_memdup ((const gchar *) &(buf[l]),
-						  codesize);
+					g_memdup2 ((const gchar *) &(buf[l]),
+						   codesize);
 
 				item->size = codesize;
 				g_value_set_pointer (&(item->content), data);
@@ -682,30 +758,34 @@ dmap_structure_parse_container_buffer (GNode * parent,
 				break;
 			}
 		case DMAP_TYPE_CONTAINER:{
-				dmap_structure_parse_container_buffer (node,
-								       &(buf
-									 [l]),
-								       codesize);
+				_parse_container_buffer (node, &(buf[l]), codesize, error);
 				break;
 			}
+		case DMAP_TYPE_INVALID:
+		default:
+			/*
+			 * Bad type should have been caught as bad content code
+			 * by _cc_read_from_buffer()
+			 */
+			g_assert_not_reached();
 		}
 
 		l += codesize;
 	}
 
+done:
 	return;
 }
 
 GNode *
-dmap_structure_parse (const gchar * buf, gint buf_length)
+dmap_structure_parse (const guint8 * buf, gsize buf_length, GError **error)
 {
-	GNode *root = NULL;
+	GNode *root  = NULL;
 	GNode *child = NULL;
 
 	root = g_node_new (NULL);
 
-	dmap_structure_parse_container_buffer (root, (guchar *) buf,
-					       buf_length);
+	_parse_container_buffer (root, (guchar *) buf, buf_length, error);
 
 	child = root->children;
 	if (child) {
@@ -718,54 +798,56 @@ dmap_structure_parse (const gchar * buf, gint buf_length)
 
 struct NodeFinder
 {
-	DMAPContentCode code;
+	DmapContentCode code;
 	GNode *node;
 };
 
 static gboolean
-gnode_find_node (GNode * node, gpointer data)
+_gnode_find_node (GNode * node, gpointer data)
 {
+	gboolean found = FALSE;
+
 	struct NodeFinder *finder = (struct NodeFinder *) data;
-	DMAPStructureItem *item = node->data;
+	DmapStructureItem *item = node->data;
 
 	if (item->content_code == finder->code) {
 		finder->node = node;
-		return TRUE;
+		found = TRUE;
 	}
 
-	return FALSE;
+	return found;
 }
 
-DMAPStructureItem *
-dmap_structure_find_item (GNode * structure, DMAPContentCode code)
+DmapStructureItem *
+dmap_structure_find_item (GNode * structure, DmapContentCode code)
 {
+	DmapStructureItem *item = NULL;
 	GNode *node = NULL;
 
 	node = dmap_structure_find_node (structure, code);
-
 	if (node) {
-		return node->data;
+		item = node->data;
 	}
 
-	return NULL;
+	return item;
 }
 
 GNode *
-dmap_structure_add (GNode * parent, DMAPContentCode cc, ...)
+dmap_structure_add (GNode * parent, DmapContentCode cc, ...)
 {
-	DMAPType dmap_type;
+	DmapType dmap_type;
 	GType gtype;
-	DMAPStructureItem *item;
+	DmapStructureItem *item;
 	va_list list;
 	GNode *node;
 	gchar *error = NULL;
 
 	va_start (list, cc);
 
-	dmap_type = dmap_content_code_dmap_type (cc);
-	gtype = dmap_content_code_gtype (cc);
+	dmap_type = _cc_dmap_type (cc, NULL);
+	gtype = _cc_gtype (cc, NULL);
 
-	item = g_new0 (DMAPStructureItem, 1);
+	item = g_new0 (DmapStructureItem, 1);
 	item->content_code = cc;
 
 	if (gtype != G_TYPE_NONE) {
@@ -831,12 +913,13 @@ dmap_structure_add (GNode * parent, DMAPContentCode cc, ...)
 		g_node_append (parent, node);
 
 		while (parent) {
-			DMAPStructureItem *parent_item = parent->data;
+			DmapStructureItem *parent_item = parent->data;
 
-			if (cc == DMAP_RAW)
+			if (cc == DMAP_RAW) {
 				parent_item->size += item->size;
-			else
+			} else {
 				parent_item->size += (4 + 4 + item->size);
+			}
 
 			parent = parent->parent;
 		}
@@ -846,7 +929,7 @@ dmap_structure_add (GNode * parent, DMAPContentCode cc, ...)
 }
 
 GNode *
-dmap_structure_find_node (GNode * structure, DMAPContentCode code)
+dmap_structure_find_node (GNode * structure, DmapContentCode code)
 {
 	struct NodeFinder *finder;
 	GNode *node = NULL;
@@ -856,7 +939,7 @@ dmap_structure_find_node (GNode * structure, DMAPContentCode code)
 	finder->code = code;
 
 	g_node_traverse (structure, G_IN_ORDER, G_TRAVERSE_ALL, -1,
-			 gnode_find_node, finder);
+			 _gnode_find_node, finder);
 
 	node = finder->node;
 	g_free (finder);
@@ -866,10 +949,11 @@ dmap_structure_find_node (GNode * structure, DMAPContentCode code)
 }
 
 static void
-dmap_item_free (DMAPStructureItem * item)
+_dmap_item_free (DmapStructureItem * item)
 {
-	if (dmap_content_code_dmap_type (item->content_code) !=
-	    DMAP_TYPE_CONTAINER) {
+	DmapType type = _cc_dmap_type (item->content_code, NULL);
+
+	if (DMAP_TYPE_INVALID != type && DMAP_TYPE_CONTAINER != type) {
 		g_value_unset (&(item->content));
 	}
 
@@ -877,9 +961,9 @@ dmap_item_free (DMAPStructureItem * item)
 }
 
 static gboolean
-gnode_free_dmap_item (GNode * node, G_GNUC_UNUSED gpointer data)
+_gnode_free_dmap_item (GNode * node, G_GNUC_UNUSED gpointer data)
 {
-	dmap_item_free ((DMAPStructureItem *) node->data);
+	_dmap_item_free ((DmapStructureItem *) node->data);
 
 	return FALSE;
 }
@@ -889,7 +973,7 @@ dmap_structure_destroy (GNode * structure)
 {
 	if (structure) {
 		g_node_traverse (structure, G_IN_ORDER, G_TRAVERSE_ALL, -1,
-				 gnode_free_dmap_item, NULL);
+				 _gnode_free_dmap_item, NULL);
 
 		g_node_destroy (structure);
 
@@ -897,16 +981,16 @@ dmap_structure_destroy (GNode * structure)
 	}
 }
 
-const DMAPContentCodeDefinition *
-dmap_content_codes (guint * number)
+const DmapContentCodeDefinition *
+dmap_structure_content_codes (guint * number)
 {
-	*number = G_N_ELEMENTS (cc_defs);
+	*number = G_N_ELEMENTS (_cc_defs);
 
-	return cc_defs;
+	return _cc_defs;
 }
 
 gint32
-dmap_content_code_string_as_int32 (const gchar * str)
+dmap_structure_cc_string_as_int32 (const gchar * str)
 {
 	union
 	{
@@ -921,9 +1005,9 @@ dmap_content_code_string_as_int32 (const gchar * str)
 }
 
 static gboolean
-print_dmap_item (GNode * node, G_GNUC_UNUSED gpointer data)
+_print_dmap_item (GNode * node, G_GNUC_UNUSED gpointer data)
 {
-	DMAPStructureItem *item;
+	DmapStructureItem *item;
 	const gchar *name;
 	gchar *value;
 	guint i;
@@ -934,7 +1018,7 @@ print_dmap_item (GNode * node, G_GNUC_UNUSED gpointer data)
 
 	item = node->data;
 
-	name = dmap_content_code_name (item->content_code);
+	name = _cc_name (item->content_code);
 
 	if (G_IS_VALUE (&(item->content))) {
 		value = g_strdup_value_contents (&(item->content));
@@ -954,23 +1038,23 @@ dmap_structure_print (GNode * structure)
 {
 	if (structure) {
 		g_node_traverse (structure, G_PRE_ORDER, G_TRAVERSE_ALL, -1,
-				 (GNodeTraverseFunc) print_dmap_item, NULL);
+				 (GNodeTraverseFunc) _print_dmap_item, NULL);
 	}
 }
 
 guint
 dmap_structure_get_size (GNode * structure)
 {
-	DMAPStructureItem *item = (DMAPStructureItem *) structure->data;
+	DmapStructureItem *item = (DmapStructureItem *) structure->data;
 
-	g_assert (strlen(cc_defs[item->content_code].string) == 4);
+	g_assert (strlen(_cc_defs[item->content_code].string) == 4);
 	g_assert (sizeof(item->size) == 4);
 
-	return item->size + strlen(cc_defs[item->content_code].string) + sizeof(item->size);
+	return item->size + strlen(_cc_defs[item->content_code].string) + sizeof(item->size);
 }
 
 void
 dmap_structure_increase_by_predicted_size (GNode * structure, guint size)
 {
-	((DMAPStructureItem *) structure->data)->size += size;
+	((DmapStructureItem *) structure->data)->size += size;
 }
diff --git a/libdmapsharing/dmap-structure.h b/libdmapsharing/dmap-structure.h
index e5d59ad..1ce64bb 100644
--- a/libdmapsharing/dmap-structure.h
+++ b/libdmapsharing/dmap-structure.h
@@ -18,207 +18,36 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA*
  */
 
-#ifndef __DMAP_STRUCTURE_H__
-#define __DMAP_STRUCTURE_H__
+#ifndef _DMAP_STRUCTURE_H
+#define _DMAP_STRUCTURE_H
 
 #include <glib.h>
 #include <glib-object.h>
 
-G_BEGIN_DECLS typedef enum
-{
-	DMAP_CC_INVALID = 0,
-	DMAP_RAW,		/* The RAW type does not use a content code.
-				 * Instead of:
-				 * CCCC BYTECOUNT DATA
-				 * RAW sends:
-				 * DATA
-				 */
-	DMAP_CC_MDCL,
-	DMAP_CC_MSTT,
-	DMAP_CC_MIID,
-	DMAP_CC_MINM,
-	DMAP_CC_MIKD,
-	DMAP_CC_MPER,
-	DMAP_CC_MCON,
-	DMAP_CC_MCTI,
-	DMAP_CC_MPCO,
-	DMAP_CC_MSTS,
-	DMAP_CC_MIMC,
-	DMAP_CC_MCTC,
-	DMAP_CC_MRCO,
-	DMAP_CC_MTCO,
-	DMAP_CC_MLCL,
-	DMAP_CC_MLIT,
-	DMAP_CC_MBCL,
-	DMAP_CC_MSRV,
-	DMAP_CC_MSAU,
-	DMAP_CC_MSLR,
-	DMAP_CC_MPRO,
-	DMAP_CC_MSAL,
-	DMAP_CC_MSUP,
-	DMAP_CC_MSPI,
-	DMAP_CC_MSEX,
-	DMAP_CC_MSBR,
-	DMAP_CC_MSQY,
-	DMAP_CC_MSIX,
-	DMAP_CC_MSRS,
-	DMAP_CC_MSTM,
-	DMAP_CC_MSDC,
-	DMAP_CC_MCCR,
-	DMAP_CC_MCNM,
-	DMAP_CC_MCNA,
-	DMAP_CC_MCTY,
-	DMAP_CC_MLOG,
-	DMAP_CC_MLID,
-	DMAP_CC_MUPD,
-	DMAP_CC_MUSR,
-	DMAP_CC_MUTY,
-	DMAP_CC_MUDL,
-	DMAP_CC_MSMA,
-	DMAP_CC_FQUESCH,
-
-	DMAP_CC_APRO,
-	DMAP_CC_AVDB,
-	DMAP_CC_ABRO,
-	DMAP_CC_ABAL,
-	DMAP_CC_ABAR,
-	DMAP_CC_ABCP,
-	DMAP_CC_ABGN,
-	DMAP_CC_ADBS,
-	DMAP_CC_ASAL,
-	DMAP_CC_ASAI,
-	DMAP_CC_ASAA,
-	DMAP_CC_ASAR,
-	DMAP_CC_ASBT,
-	DMAP_CC_ASBR,
-	DMAP_CC_ASCM,
-	DMAP_CC_ASCO,
-	DMAP_CC_ASDA,
-	DMAP_CC_ASDM,
-	DMAP_CC_ASDC,
-	DMAP_CC_ASDN,
-	DMAP_CC_ASDB,
-	DMAP_CC_ASEQ,
-	DMAP_CC_ASFM,
-	DMAP_CC_ASGN,
-	DMAP_CC_ASDT,
-	DMAP_CC_ASRV,
-	DMAP_CC_ASSR,
-	DMAP_CC_ASSZ,
-	DMAP_CC_ASST,
-	DMAP_CC_ASSP,
-	DMAP_CC_ASTM,
-	DMAP_CC_ASTC,
-	DMAP_CC_ASTN,
-	DMAP_CC_ASUR,
-	DMAP_CC_ASYR,
-	DMAP_CC_ASDK,
-	DMAP_CC_ASUL,
-	DMAP_CC_ASSU,
-	DMAP_CC_ASSA,
-	DMAP_CC_APLY,
-	DMAP_CC_ABPL,
-	DMAP_CC_APSO,
-	DMAP_CC_PRSV,
-	DMAP_CC_ARIF,
-	DMAP_CC_MSAS,
-	DMAP_CC_AGRP,
-	DMAP_CC_AGAL,
-	DMAP_CC_ASCP,
-	DMAP_CC_PPRO,
-	DMAP_CC_PASP,
-	DMAP_CC_PFDT,
-	DMAP_CC_PICD,
-	DMAP_CC_PIMF,
-	DMAP_CC_PFMT,
-	DMAP_CC_PIFS,
-	DMAP_CC_PLSZ,
-	DMAP_CC_PHGT,
-	DMAP_CC_PWTH,
-	DMAP_CC_PRAT,
-	DMAP_CC_PCMT,
-	DMAP_CC_PRET,
-
-	/* iTunes 6.02+ */
-	DMAP_CC_AESV,
-	DMAP_CC_AEHV,
-
-	DMAP_CC_AESP,
-	DMAP_CC_AEPP,
-	DMAP_CC_AEPS,
-	DMAP_CC_AESG,
-	DMAP_CC_AEMK,
-	DMAP_CC_AEFP,
-
-	/* DACP */
-	DMAP_CC_CMPA,
-	DMAP_CC_CMNM,
-	DMAP_CC_CMTY,
-	DMAP_CC_CMPG,
-
-	DMAP_CC_CACI,
-	DMAP_CC_CAPS,
-	DMAP_CC_CASH,
-	DMAP_CC_CARP,
-	DMAP_CC_CAAS,
-	DMAP_CC_CAAR,
-	DMAP_CC_CAIA,
-	DMAP_CC_CANP,
-	DMAP_CC_CANN,
-	DMAP_CC_CANA,
-	DMAP_CC_CANL,
-	DMAP_CC_CANG,
-	DMAP_CC_CANT,
-	DMAP_CC_CASP,
-	DMAP_CC_CASS,
-	DMAP_CC_CAST,
-	DMAP_CC_CASU,
-	DMAP_CC_CASG,
-	DMAP_CC_CACR,
-
-	DMAP_CC_CMCP,
-	DMAP_CC_CMGT,
-	DMAP_CC_CMIK,
-	DMAP_CC_CMSP,
-	DMAP_CC_CMST,
-	DMAP_CC_CMSV,
-	DMAP_CC_CMSR,
-	DMAP_CC_CMMK,
-	DMAP_CC_CMVO,
+#include <libdmapsharing/dmap-cc.h>
 
-	DMAP_CC_CMPR,
-	DMAP_CC_CAPR,
-	DMAP_CC_AEFR,
-	DMAP_CC_CAOV,
-	DMAP_CC_CMRL,
-	DMAP_CC_CAHP,
-	DMAP_CC_CAIV,
-	DMAP_CC_CAVC
-} DMAPContentCode;
+typedef struct _DmapStructureItem DmapStructureItem;
 
-typedef struct _DMAPStructureItem DMAPStructureItem;
-
-struct _DMAPStructureItem
+struct _DmapStructureItem
 {
-	DMAPContentCode content_code;
+	DmapContentCode content_code;
 	GValue content;
 	guint32 size;
 };
 
-GNode *dmap_structure_add (GNode * parent, DMAPContentCode cc, ...);
+GNode *dmap_structure_add (GNode * parent, DmapContentCode cc, ...);
 gchar *dmap_structure_serialize (GNode * structure, guint * length);
-GNode *dmap_structure_parse (const gchar * buf, gint buf_length);
-DMAPStructureItem *dmap_structure_find_item (GNode * structure,
-					     DMAPContentCode code);
-GNode *dmap_structure_find_node (GNode * structure, DMAPContentCode code);
+GNode *dmap_structure_parse (const guint8 * buf, gsize buf_length, GError **error);
+DmapStructureItem *dmap_structure_find_item (GNode * structure,
+					     DmapContentCode code);
+GNode *dmap_structure_find_node (GNode * structure, DmapContentCode code);
 void dmap_structure_print (GNode * structure);
 void dmap_structure_destroy (GNode * structure);
 guint dmap_structure_get_size (GNode * structure);
 void dmap_structure_increase_by_predicted_size (GNode * structure,
 						guint size);
 
-typedef enum
-{
+typedef enum {
 	DMAP_TYPE_BYTE = 0x0001,
 	DMAP_TYPE_SIGNED_INT = 0x0002,
 	DMAP_TYPE_SHORT = 0x0003,
@@ -228,27 +57,20 @@ typedef enum
 	DMAP_TYPE_DATE = 0x000A,
 	DMAP_TYPE_VERSION = 0x000B,
 	DMAP_TYPE_CONTAINER = 0x000C,
-	DMAP_TYPE_POINTER = 0x002A
-} DMAPType;
-
-typedef struct _DMAPContentCodeDefinition DMAPContentCodeDefinition;
+	DMAP_TYPE_POINTER = 0x002A,
+	DMAP_TYPE_INVALID = 0xFFFF
+} DmapType;
 
-struct _DMAPContentCodeDefinition
-{
-	DMAPContentCode code;
+typedef struct {
+	DmapContentCode code;
 	gint32 int_code;
 	const gchar *name;
 	const gchar *string;
-	DMAPType type;
-};
-
-const DMAPContentCodeDefinition * dmap_content_codes (guint * number);
-gint32 dmap_content_code_string_as_int32 (const gchar * str);
-const gchar *dmap_content_code_name (DMAPContentCode code);
-DMAPType dmap_content_code_dmap_type (DMAPContentCode code);
-const gchar *dmap_content_code_string (DMAPContentCode code);
+	DmapType type;
+} DmapContentCodeDefinition;
 
-DMAPContentCode dmap_content_code_read_from_buffer (const gchar * buf);
+const DmapContentCodeDefinition * dmap_structure_content_codes (guint * number);
+gint32 dmap_structure_cc_string_as_int32 (const gchar * str);
 
 G_END_DECLS
 #endif
diff --git a/libdmapsharing/dmap-gst-mp3-input-stream.c b/libdmapsharing/dmap-transcode-mp3-stream.c
similarity index 78%
rename from libdmapsharing/dmap-gst-mp3-input-stream.c
rename to libdmapsharing/dmap-transcode-mp3-stream.c
index 36f6274..a55d980 100644
--- a/libdmapsharing/dmap-gst-mp3-input-stream.c
+++ b/libdmapsharing/dmap-transcode-mp3-stream.c
@@ -1,5 +1,5 @@
 /*
- * DMAPGstMP3InputStream class: Open a URI using dmap_gst_mp3_input_stream_new ().
+ * DmapTranscodeMp3Stream class: Open a URI using dmap_transcode_mp3_stream_new ().
  * Data is decoded using GStreamer and is then reencoded as an MP3
  * stream by the class's read operations.
  *
@@ -23,12 +23,13 @@
 #include <gst/gst.h>
 #include <gst/app/gstappsink.h>
 
-#include "dmap-gst-mp3-input-stream.h"
+#include "dmap-transcode-mp3-stream.h"
+#include "dmap-transcode-stream-private.h"
 #include "gst-util.h"
 
 #define GST_APP_MAX_BUFFERS 1024
 
-struct DMAPGstMP3InputStreamPrivate
+struct DmapTranscodeMp3StreamPrivate
 {
 	GstElement *pipeline;
 	GstElement *src;
@@ -39,9 +40,9 @@ struct DMAPGstMP3InputStreamPrivate
 };
 
 static void
-pad_added_cb (G_GNUC_UNUSED GstElement * element,
-              GstPad * pad,
-              GstElement *convert)
+_pad_added_cb (G_GNUC_UNUSED GstElement * element,
+               GstPad * pad,
+               GstElement *convert)
 {
 	/* Link remaining pad after decodebin2 does its magic. */
 	GstPad *conv_pad;
@@ -49,7 +50,7 @@ pad_added_cb (G_GNUC_UNUSED GstElement * element,
 	conv_pad = gst_element_get_static_pad (convert, "sink");
 	g_assert (conv_pad != NULL);
 
-	if (pads_compatible (pad, conv_pad)) {
+	if (gst_util_pads_compatible (pad, conv_pad)) {
 		g_assert (!GST_PAD_IS_LINKED
 			  (gst_element_get_static_pad
 			   (convert, "sink")));
@@ -61,11 +62,11 @@ pad_added_cb (G_GNUC_UNUSED GstElement * element,
 }
 
 GInputStream *
-dmap_gst_mp3_input_stream_new (GInputStream * src_stream)
+dmap_transcode_mp3_stream_new (GInputStream * src_stream)
 {
 	GstStateChangeReturn sret;
 	GstState state;
-	DMAPGstMP3InputStream *stream = NULL;
+	DmapTranscodeMp3Stream *stream = NULL;
 
 	GstElement *pipeline = NULL;
 	GstElement *src = NULL;
@@ -136,9 +137,9 @@ dmap_gst_mp3_input_stream_new (GInputStream * src_stream)
 	gst_app_sink_set_max_buffers (GST_APP_SINK (sink), GST_APP_MAX_BUFFERS);
 	gst_app_sink_set_drop (GST_APP_SINK (sink), FALSE);
 
-	g_signal_connect (decode, "pad-added", G_CALLBACK (pad_added_cb), convert);
+	g_signal_connect (decode, "pad-added", G_CALLBACK (_pad_added_cb), convert);
 
-	/* FIXME: this technique is shared with dmapd-daap-share.c */
+	/* FIXME: this technique is shared with dmapd-dmap-av-share.c */
 	sret = gst_element_set_state (pipeline, GST_STATE_PLAYING);
 	if (GST_STATE_CHANGE_ASYNC == sret) {
 		if (GST_STATE_CHANGE_SUCCESS !=
@@ -151,13 +152,13 @@ dmap_gst_mp3_input_stream_new (GInputStream * src_stream)
 		goto done;
 	}
 
-	stream = DMAP_GST_MP3_INPUT_STREAM (g_object_new (DMAP_TYPE_GST_MP3_INPUT_STREAM, NULL));
+	stream = DMAP_TRANSCODE_MP3_STREAM (g_object_new (DMAP_TYPE_GST_MP3_INPUT_STREAM, NULL));
 	if (NULL == stream) {
 		goto done;
 	}
 	g_assert (G_IS_SEEKABLE (stream));
 
-	g_signal_connect (sink, "new-sample", G_CALLBACK (dmap_gst_input_stream_new_buffer_cb), stream);
+	g_signal_connect (sink, "new-sample", G_CALLBACK (dmap_transcode_stream_private_new_buffer_cb), stream);
 
 	stream->priv->pipeline = gst_object_ref (pipeline);
 	stream->priv->src = gst_object_ref (src);
@@ -195,30 +196,30 @@ done:
 }
 
 static void
-dmap_gst_mp3_input_stream_kill_pipeline (DMAPGstInputStream * stream)
+_kill_pipeline (DmapTranscodeStream * stream)
 {
-	DMAPGstMP3InputStream *mp3_stream =
-		DMAP_GST_MP3_INPUT_STREAM (stream);
+	DmapTranscodeMp3Stream *mp3_stream =
+		DMAP_TRANSCODE_MP3_STREAM (stream);
 
 	gst_element_set_state (mp3_stream->priv->pipeline, GST_STATE_NULL);
 	gst_object_unref (GST_OBJECT (mp3_stream->priv->pipeline));
 }
 
-G_DEFINE_TYPE_WITH_PRIVATE (DMAPGstMP3InputStream, dmap_gst_mp3_input_stream,
-                            DMAP_TYPE_GST_INPUT_STREAM);
+G_DEFINE_TYPE_WITH_PRIVATE (DmapTranscodeMp3Stream,
+                            dmap_transcode_mp3_stream,
+	                    DMAP_TYPE_TRANSCODE_STREAM);
 
 static void
-dmap_gst_mp3_input_stream_class_init (DMAPGstMP3InputStreamClass * klass)
+dmap_transcode_mp3_stream_class_init (DmapTranscodeMp3StreamClass * klass)
 {
-	DMAPGstInputStreamClass *parent_class =
-		DMAP_GST_INPUT_STREAM_CLASS (klass);
+	DmapTranscodeStreamClass *parent_class =
+		DMAP_TRANSCODE_STREAM_CLASS (klass);
 
-	parent_class->kill_pipeline = dmap_gst_mp3_input_stream_kill_pipeline;
+	parent_class->kill_pipeline = _kill_pipeline;
 }
 
 static void
-dmap_gst_mp3_input_stream_init (DMAPGstMP3InputStream * stream)
+dmap_transcode_mp3_stream_init (DmapTranscodeMp3Stream * stream)
 {
-	stream->priv = dmap_gst_mp3_input_stream_get_instance_private (stream);
-
+	stream->priv = dmap_transcode_mp3_stream_get_instance_private(stream);
 }
diff --git a/libdmapsharing/dmap-gst-mp3-input-stream.h b/libdmapsharing/dmap-transcode-mp3-stream.h
similarity index 54%
rename from libdmapsharing/dmap-gst-mp3-input-stream.h
rename to libdmapsharing/dmap-transcode-mp3-stream.h
index d61f78c..71f34d0 100644
--- a/libdmapsharing/dmap-gst-mp3-input-stream.h
+++ b/libdmapsharing/dmap-transcode-mp3-stream.h
@@ -1,5 +1,5 @@
 /*
- * DMAPGstMP3InputStream class: Open a URI using dmap_gst_mp3_input_stream_new ().
+ * DmapTranscodeMp3Stream class: Open a URI using dmap_transcode_mp3_stream_new ().
  * Data is decoded using GStreamer and is then reencoded as an MP3
  * stream by the class's read operations.
  *
@@ -20,44 +20,42 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef __DMAP_GST_MP3_INPUT_STREAM
-#define __DMAP_GST_MP3_INPUT_STREAM
+#ifndef _DMAP_TRANSCODE_MP3_STREAM_H
+#define _DMAP_TRANSCODE_MP3_STREAM_H
 
 #include <gio/gio.h>
 
-#include "dmap-gst-input-stream.h"
+#include "dmap-transcode-stream.h"
 
 G_BEGIN_DECLS
-#define DMAP_TYPE_GST_MP3_INPUT_STREAM         (dmap_gst_mp3_input_stream_get_type ())
-#define DMAP_GST_MP3_INPUT_STREAM(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), \
+#define DMAP_TYPE_GST_MP3_INPUT_STREAM         (dmap_transcode_mp3_stream_get_type ())
+#define DMAP_TRANSCODE_MP3_STREAM(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), \
 				               DMAP_TYPE_GST_MP3_INPUT_STREAM, \
-					       DMAPGstMP3InputStream))
-#define DMAP_GST_MP3_INPUT_STREAM_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), \
+					       DmapTranscodeMp3Stream))
+#define DMAP_TRANSCODE_MP3_STREAM_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), \
 				               DMAP_TYPE_GST_MP3_INPUT_STREAM, \
-					       DMAPGstMP3InputStreamClass))
-#define IS_DMAP_GST_MP3_INPUT_STREAM(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
+					       DmapTranscodeMp3StreamClass))
+#define DMAP_IS_GST_MP3_INPUT_STREAM(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
 				               DMAP_TYPE_GST_MP3_INPUT_STREAM))
-#define IS_DMAP_GST_MP3_INPUT_STREAM_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), \
+#define DMAP_IS_GST_MP3_INPUT_STREAM_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), \
 				               DMAP_TYPE_GST_MP3_INPUT_STREAM_CLASS))
-#define DMAP_GST_MP3_INPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
+#define DMAP_TRANSCODE_MP3_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
 				               DMAP_TYPE_GST_MP3_INPUT_STREAM, \
-					       DMAPGstMP3InputStreamClass))
-typedef struct DMAPGstMP3InputStreamPrivate DMAPGstMP3InputStreamPrivate;
+					       DmapTranscodeMp3StreamClass))
+typedef struct DmapTranscodeMp3StreamPrivate DmapTranscodeMp3StreamPrivate;
 
-typedef struct
-{
-	DMAPGstInputStream parent;
-	DMAPGstMP3InputStreamPrivate *priv;
-} DMAPGstMP3InputStream;
+typedef struct {
+	DmapTranscodeStream parent;
+	DmapTranscodeMp3StreamPrivate *priv;
+} DmapTranscodeMp3Stream;
 
-typedef struct
-{
-	DMAPGstInputStreamClass parent;
-} DMAPGstMP3InputStreamClass;
+typedef struct {
+	DmapTranscodeStreamClass parent;
+} DmapTranscodeMp3StreamClass;
 
-GType dmap_gst_mp3_input_stream_get_type (void);
+GType dmap_transcode_mp3_stream_get_type (void);
 
-GInputStream *dmap_gst_mp3_input_stream_new (GInputStream * stream);
+GInputStream *dmap_transcode_mp3_stream_new (GInputStream * stream);
 
 G_END_DECLS
-#endif /* __DMAP_GST_MP3_INPUT_STREAM */
+#endif
diff --git a/libdmapsharing/dmap-gst-qt-input-stream.c b/libdmapsharing/dmap-transcode-qt-stream.c
similarity index 80%
rename from libdmapsharing/dmap-gst-qt-input-stream.c
rename to libdmapsharing/dmap-transcode-qt-stream.c
index 7bc98c3..5c08913 100644
--- a/libdmapsharing/dmap-gst-qt-input-stream.c
+++ b/libdmapsharing/dmap-transcode-qt-stream.c
@@ -1,5 +1,5 @@
 /*
- * DMAPGstQtInputStream class: Open a URI using dmap_gst_qt_input_stream_new ().
+ * DmapTranscodeQtStream class: Open a URI using dmap_transcode_qt_stream_new ().
  * Data is decoded using GStreamer and is then reencoded as a QuickTime video
  * stream by the class's read operations.
  *
@@ -23,12 +23,13 @@
 #include <gst/gst.h>
 #include <gst/app/gstappsink.h>
 
-#include "dmap-gst-qt-input-stream.h"
+#include "dmap-transcode-qt-stream.h"
+#include "dmap-transcode-stream-private.h"
 #include "gst-util.h"
 
 #define GST_APP_MAX_BUFFERS 1024
 
-struct DMAPGstQtInputStreamPrivate
+struct DmapTranscodeQtStreamPrivate
 {
 	GstElement *pipeline;
 	GstElement *src;
@@ -40,9 +41,9 @@ struct DMAPGstQtInputStreamPrivate
 };
 
 static void
-pad_added_cb (G_GNUC_UNUSED GstElement * element,
-              GstPad * pad,
-              GstElement *convert)
+_pad_added_cb (G_GNUC_UNUSED GstElement * element,
+               GstPad * pad,
+               GstElement *convert)
 {
 	/* Link remaining pad after decodebin2 does its magic. */
 	GstPad *conv_pad;
@@ -50,7 +51,7 @@ pad_added_cb (G_GNUC_UNUSED GstElement * element,
 	conv_pad = gst_element_get_static_pad (convert, "sink");
 	g_assert (conv_pad != NULL);
 
-	if (pads_compatible (pad, conv_pad)) {
+	if (gst_util_pads_compatible (pad, conv_pad)) {
 		g_assert (!GST_PAD_IS_LINKED
 			  (gst_element_get_static_pad
 			   (convert, "sink")));
@@ -62,11 +63,11 @@ pad_added_cb (G_GNUC_UNUSED GstElement * element,
 }
 
 GInputStream *
-dmap_gst_qt_input_stream_new (GInputStream * src_stream)
+dmap_transcode_qt_stream_new (GInputStream * src_stream)
 {
 	GstStateChangeReturn sret;
 	GstState state;
-	DMAPGstQtInputStream *stream = NULL;
+	DmapTranscodeQtStream *stream = NULL;
 
 	GstElement *pipeline = NULL;
         GstElement *src = NULL;
@@ -138,9 +139,9 @@ dmap_gst_qt_input_stream_new (GInputStream * src_stream)
 	gst_app_sink_set_max_buffers (GST_APP_SINK (sink), GST_APP_MAX_BUFFERS);
 	gst_app_sink_set_drop (GST_APP_SINK (sink), FALSE);
 
-	g_signal_connect (decode, "pad-added", G_CALLBACK (pad_added_cb), convert);
+	g_signal_connect (decode, "pad-added", G_CALLBACK (_pad_added_cb), convert);
 
-	/* FIXME: this technique is shared with dmapd-daap-share.c */
+	/* FIXME: this technique is shared with dmapd-dmap-av-share.c */
 	sret = gst_element_set_state (pipeline, GST_STATE_PLAYING);
 	if (GST_STATE_CHANGE_ASYNC == sret) {
 		if (GST_STATE_CHANGE_SUCCESS !=
@@ -153,13 +154,13 @@ dmap_gst_qt_input_stream_new (GInputStream * src_stream)
 		goto done;
 	}
 
-	stream = DMAP_GST_QT_INPUT_STREAM (g_object_new (DMAP_TYPE_GST_QT_INPUT_STREAM, NULL));
+	stream = DMAP_TRANSCODE_QT_STREAM (g_object_new (DMAP_TYPE_GST_QT_INPUT_STREAM, NULL));
 	if (NULL == stream) {
                 goto done;
         }
         g_assert (G_IS_SEEKABLE (stream));
 
-	g_signal_connect (sink, "new-sample", G_CALLBACK (dmap_gst_input_stream_new_buffer_cb), stream);
+	g_signal_connect (sink, "new-sample", G_CALLBACK (dmap_transcode_stream_private_new_buffer_cb), stream);
 
 	stream->priv->pipeline = gst_object_ref (pipeline);
         stream->priv->src = gst_object_ref (src);
@@ -202,10 +203,10 @@ done:
 }
 
 static void
-dmap_gst_qt_input_stream_kill_pipeline (DMAPGstInputStream * stream)
+_kill_pipeline (DmapTranscodeStream * stream)
 {
-	DMAPGstQtInputStream *qt_stream =
-		DMAP_GST_QT_INPUT_STREAM (stream);
+	DmapTranscodeQtStream *qt_stream =
+		DMAP_TRANSCODE_QT_STREAM (stream);
 
 	// FIXME: It seems that I need to send an EOS, because QuickTime writes
 	// its headers after encoding the streams, but this does not yet work.
@@ -215,21 +216,21 @@ dmap_gst_qt_input_stream_kill_pipeline (DMAPGstInputStream * stream)
 	gst_object_unref (GST_OBJECT (qt_stream->priv->pipeline));
 }
 
-G_DEFINE_TYPE_WITH_PRIVATE (DMAPGstQtInputStream, dmap_gst_qt_input_stream,
-                            DMAP_TYPE_GST_INPUT_STREAM);
+G_DEFINE_TYPE_WITH_PRIVATE (DmapTranscodeQtStream,
+                            dmap_transcode_qt_stream,
+                            DMAP_TYPE_TRANSCODE_STREAM);
 
 static void
-dmap_gst_qt_input_stream_class_init (DMAPGstQtInputStreamClass * klass)
+dmap_transcode_qt_stream_class_init (DmapTranscodeQtStreamClass * klass)
 {
-	DMAPGstInputStreamClass *parent_class =
-		DMAP_GST_INPUT_STREAM_CLASS (klass);
+	DmapTranscodeStreamClass *parent_class =
+		DMAP_TRANSCODE_STREAM_CLASS (klass);
 
-	parent_class->kill_pipeline = dmap_gst_qt_input_stream_kill_pipeline;
+	parent_class->kill_pipeline = _kill_pipeline;
 }
 
 static void
-dmap_gst_qt_input_stream_init (DMAPGstQtInputStream * stream)
+dmap_transcode_qt_stream_init (DmapTranscodeQtStream * stream)
 {
-	stream->priv = dmap_gst_qt_input_stream_get_instance_private (stream);
-
+	stream->priv = dmap_transcode_qt_stream_get_instance_private(stream);
 }
diff --git a/libdmapsharing/dmap-gst-qt-input-stream.h b/libdmapsharing/dmap-transcode-qt-stream.h
similarity index 55%
rename from libdmapsharing/dmap-gst-qt-input-stream.h
rename to libdmapsharing/dmap-transcode-qt-stream.h
index 5569159..e9d4fba 100644
--- a/libdmapsharing/dmap-gst-qt-input-stream.h
+++ b/libdmapsharing/dmap-transcode-qt-stream.h
@@ -1,5 +1,5 @@
 /*
- * DMAPGstQtInputStream class: Open a URI using dmap_gst_qt_input_stream_new ().
+ * DmapTranscodeQtStream class: Open a URI using dmap_transcode_qt_stream_new ().
  * Data is decoded using GStreamer and is then reencoded as a QuickTime video
  * stream by the class's read operations.
  *
@@ -20,44 +20,42 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef __DMAP_GST_QT_INPUT_STREAM
-#define __DMAP_GST_QT_INPUT_STREAM
+#ifndef _DMAP_TRANSCODE_QT_STREAM_H
+#define _DMAP_TRANSCODE_QT_STREAM_H
 
 #include <gio/gio.h>
 
-#include "dmap-gst-input-stream.h"
+#include "dmap-transcode-stream.h"
 
 G_BEGIN_DECLS
-#define DMAP_TYPE_GST_QT_INPUT_STREAM         (dmap_gst_qt_input_stream_get_type ())
-#define DMAP_GST_QT_INPUT_STREAM(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), \
+#define DMAP_TYPE_GST_QT_INPUT_STREAM         (dmap_transcode_qt_stream_get_type ())
+#define DMAP_TRANSCODE_QT_STREAM(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), \
 				               DMAP_TYPE_GST_QT_INPUT_STREAM, \
-					       DMAPGstQtInputStream))
-#define DMAP_GST_QT_INPUT_STREAM_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), \
+					       DmapTranscodeQtStream))
+#define DMAP_TRANSCODE_QT_STREAM_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), \
 				               DMAP_TYPE_GST_QT_INPUT_STREAM, \
-					       DMAPGstQtInputStreamClass))
-#define IS_DMAP_GST_QT_INPUT_STREAM(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
+					       DmapTranscodeQtStreamClass))
+#define DMAP_IS_GST_QT_INPUT_STREAM(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
 				               DMAP_TYPE_GST_QT_INPUT_STREAM))
-#define IS_DMAP_GST_QT_INPUT_STREAM_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), \
+#define DMAP_IS_GST_QT_INPUT_STREAM_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), \
 				               DMAP_TYPE_GST_QT_INPUT_STREAM_CLASS))
-#define DMAP_GST_QT_INPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
+#define DMAP_TRANSCODE_QT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
 				               DMAP_TYPE_GST_QT_INPUT_STREAM, \
-					       DMAPGstQtInputStreamClass))
-typedef struct DMAPGstQtInputStreamPrivate DMAPGstQtInputStreamPrivate;
+					       DmapTranscodeQtStreamClass))
+typedef struct DmapTranscodeQtStreamPrivate DmapTranscodeQtStreamPrivate;
 
-typedef struct
-{
-	DMAPGstInputStream parent;
-	DMAPGstQtInputStreamPrivate *priv;
-} DMAPGstQtInputStream;
+typedef struct {
+	DmapTranscodeStream parent;
+	DmapTranscodeQtStreamPrivate *priv;
+} DmapTranscodeQtStream;
 
-typedef struct
-{
-	DMAPGstInputStreamClass parent;
-} DMAPGstQtInputStreamClass;
+typedef struct {
+	DmapTranscodeStreamClass parent;
+} DmapTranscodeQtStreamClass;
 
-GType dmap_gst_qt_input_stream_get_type (void);
+GType dmap_transcode_qt_stream_get_type (void);
 
-GInputStream *dmap_gst_qt_input_stream_new (GInputStream * stream);
+GInputStream *dmap_transcode_qt_stream_new (GInputStream * stream);
 
 G_END_DECLS
-#endif /* __DMAP_GST_QT_INPUT_STREAM */
+#endif
diff --git a/libdmapsharing/dmap-config.h b/libdmapsharing/dmap-transcode-stream-private.h
similarity index 71%
rename from libdmapsharing/dmap-config.h
rename to libdmapsharing/dmap-transcode-stream-private.h
index bd35444..35ccf82 100644
--- a/libdmapsharing/dmap-config.h
+++ b/libdmapsharing/dmap-transcode-stream-private.h
@@ -1,6 +1,5 @@
 /*
- * Copyright (C) 2006 INDT
- *  Andre Moreira Magalhaes <andre.magalhaes@indt.org.br>
+ * Copyright (C) 2020 W. Michael Petullo <mike@flyn.org>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -14,13 +13,13 @@
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA*
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef __DMAP_CONFIG_H__
-#define __DMAP_CONFIG_H__
+#ifndef _DMAP_TRANSCODE_STREAM_PRIVATE_H
+#define _DMAP_TRANSCODE_STREAM_PRIVATE_H
 
-/* whether or not the CPU supports unaligned access */
-#define DMAP_HAVE_UNALIGNED_ACCESS 0
+void dmap_transcode_stream_private_new_buffer_cb(GstElement *element,
+                                                 DmapTranscodeStream *stream);
 
 #endif
diff --git a/libdmapsharing/dmap-gst-input-stream.c b/libdmapsharing/dmap-transcode-stream.c
similarity index 58%
rename from libdmapsharing/dmap-gst-input-stream.c
rename to libdmapsharing/dmap-transcode-stream.c
index dfda5a7..a00ad3c 100644
--- a/libdmapsharing/dmap-gst-input-stream.c
+++ b/libdmapsharing/dmap-transcode-stream.c
@@ -1,5 +1,5 @@
 /*
- * DMAPGstInputStream class: Open a URI using dmap_gst_input_stream_new ().
+ * DmapTranscodeStream class: Open a URI using dmap_transcode_stream_new ().
  * Data is decoded using GStreamer and is then made available by the class's
  * read operations.
  *
@@ -24,10 +24,11 @@
 #include <gst/gst.h>
 #include <gst/app/gstappsink.h>
 
-#include "dmap-gst-input-stream.h"
-#include "dmap-gst-mp3-input-stream.h"
-#include "dmap-gst-wav-input-stream.h"
-#include "dmap-gst-qt-input-stream.h"
+#include "dmap-transcode-stream.h"
+#include "dmap-transcode-stream-private.h"
+#include "dmap-transcode-mp3-stream.h"
+#include "dmap-transcode-wav-stream.h"
+#include "dmap-transcode-qt-stream.h"
 #include "gst-util.h"
 
 #define GST_APP_MAX_BUFFERS 1024
@@ -35,23 +36,7 @@
 #define QUEUE_PUSH_WAIT_SECONDS 10
 #define QUEUE_POP_WAIT_SECONDS 1
 
-struct dmap_gst_format
-{
-	gchar *id;		/* E.g., used as command line arguments. */
-	gchar *extension;	/* E.g., iTunes uses URI extension to
-				 * determine stream format.
-				 */
-};
-
-/* NOTE: Roku clients require lower case extension. */
-static const struct dmap_gst_format dmap_gst_formats[] = {
-	{"raw", "raw"},
-	{"wav16", "wav"},
-	{"mp3", "mp3"},
-	{NULL, NULL}
-};
-
-struct DMAPGstInputStreamPrivate
+struct DmapTranscodeStreamPrivate
 {
 	GQueue *buffer;
 	gsize read_request;	/* Size of data asked for */
@@ -64,7 +49,7 @@ struct DMAPGstInputStreamPrivate
 };
 
 static goffset
-dmap_gst_input_stream_tell (G_GNUC_UNUSED GSeekable * seekable)
+_tell (G_GNUC_UNUSED GSeekable * seekable)
 {
 	/* FIXME: implement return current position in stream. */
 	g_error ("Not implemented");
@@ -72,22 +57,23 @@ dmap_gst_input_stream_tell (G_GNUC_UNUSED GSeekable * seekable)
 }
 
 static gboolean
-dmap_gst_input_stream_can_seek (G_GNUC_UNUSED GSeekable * seekable)
+_can_seek (G_GNUC_UNUSED GSeekable * seekable)
 {
 	return TRUE;
 }
 
 static gboolean
-dmap_gst_input_stream_seek (G_GNUC_UNUSED GSeekable * seekable,
-			    G_GNUC_UNUSED goffset offset,
-			    GSeekType type,
-			    G_GNUC_UNUSED GCancellable * cacellable,
-                            GError ** error)
+_seek (G_GNUC_UNUSED GSeekable * seekable,
+       G_GNUC_UNUSED goffset offset,
+       GSeekType type,
+       G_GNUC_UNUSED GCancellable * cacellable,
+       GError ** error)
 {
-	// FIXME: implement: DMAPGstInputStream *stream;
+	gboolean ok = FALSE;
+	// FIXME: implement: DmapTranscodeStream *stream;
 	// FIXME: implement: goffset absolute;
 
-	// FIXME: implement: stream = DMAP_GST_INPUT_STREAM (seekable);
+	// FIXME: implement: stream = DMAP_TRANSCODE_STREAM (seekable);
 
 	switch (type) {
 		/* FIXME: implement:
@@ -109,8 +95,7 @@ dmap_gst_input_stream_seek (G_GNUC_UNUSED GSeekable * seekable,
 			     G_IO_ERROR,
 			     G_IO_ERROR_INVALID_ARGUMENT,
 			     "Invalid GSeekType supplied");
-
-		return FALSE;
+		goto done;
 	}
 
 	/* FIXME: implement:
@@ -119,12 +104,12 @@ dmap_gst_input_stream_seek (G_GNUC_UNUSED GSeekable * seekable,
 	 *              G_IO_ERROR,
 	 *              G_IO_ERROR_INVALID_ARGUMENT,
 	 *              _("Invalid seek request"));
-	 *      return FALSE;
+	 *	goto done;
 	 * }
 	 */
 
 	/* FIXME:
-	 * if (! gst_element_seek_simple (DMAP_GST_INPUT_STREAM (seekable)->priv->pipeline,
+	 * if (! gst_element_seek_simple (DMAP_TRANSCODE_STREAM (seekable)->priv->pipeline,
 	 * GST_FORMAT_BYTES,
 	 * GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT,
 	 * absolute)) {
@@ -132,43 +117,46 @@ dmap_gst_input_stream_seek (G_GNUC_UNUSED GSeekable * seekable,
 	 * G_IO_ERROR,
 	 * G_IO_ERROR_FAILED,
 	 * "Seek failed");
-	 * return FALSE;
+	 * goto done;
 	 * }
 	 */
 
-	return TRUE;
+	ok = TRUE;
+
+done:
+	return ok;
 }
 
 static gboolean
-dmap_gst_input_stream_can_truncate (G_GNUC_UNUSED GSeekable * seekable)
+_can_truncate (G_GNUC_UNUSED GSeekable * seekable)
 {
 	return FALSE;
 }
 
 static gboolean
-dmap_gst_input_stream_truncate (G_GNUC_UNUSED GSeekable * seekable,
-				G_GNUC_UNUSED goffset offset,
-				G_GNUC_UNUSED GCancellable * cancellable,
-                                GError ** error)
+_truncate (G_GNUC_UNUSED GSeekable * seekable,
+           G_GNUC_UNUSED goffset offset,
+           G_GNUC_UNUSED GCancellable * cancellable,
+           GError ** error)
 {
 	g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
-		     "Cannot truncate DMAPGstInputStream");
+		     "Cannot truncate DmapTranscodeStream");
 	return FALSE;
 }
 
 static void
-dmap_gst_input_stream_seekable_iface_init (GSeekableIface * iface)
+_seekable_iface_init (GSeekableIface * iface)
 {
-	iface->tell = dmap_gst_input_stream_tell;
-	iface->can_seek = dmap_gst_input_stream_can_seek;
-	iface->seek = dmap_gst_input_stream_seek;
-	iface->can_truncate = dmap_gst_input_stream_can_truncate;
-	iface->truncate_fn = dmap_gst_input_stream_truncate;
+	iface->tell = _tell;
+	iface->can_seek = _can_seek;
+	iface->seek = _seek;
+	iface->can_truncate = _can_truncate;
+	iface->truncate_fn = _truncate;
 }
 
 void
-dmap_gst_input_stream_new_buffer_cb (GstElement * element,
-				     DMAPGstInputStream * stream)
+dmap_transcode_stream_private_new_buffer_cb (GstElement * element,
+                                             DmapTranscodeStream * stream)
 {
 	gsize i;
 	guint8 *ptr;
@@ -180,7 +168,7 @@ dmap_gst_input_stream_new_buffer_cb (GstElement * element,
 
 	/* FIXME: Is this necessary? I am trying to protect against this
 	 * thread manipulating data after the pipeline has been destroyed.
-	 * see also dmap_gst_input_stream_close ().
+	 * see also dmap_transcode_stream_close ().
 	 */
 	g_mutex_lock (&stream->priv->buffer_mutex);
 
@@ -258,7 +246,7 @@ dmap_gst_input_stream_new_buffer_cb (GstElement * element,
 }
 
 GInputStream *
-dmap_gst_input_stream_new (const gchar * transcode_mimetype,
+dmap_transcode_stream_new (const gchar * transcode_mimetype,
 			   GInputStream * src_stream)
 {
 	GInputStream *stream;
@@ -266,13 +254,13 @@ dmap_gst_input_stream_new (const gchar * transcode_mimetype,
 	if (!transcode_mimetype) {
 		stream = src_stream;
 	} else if (!strcmp (transcode_mimetype, "audio/mp3")) {
-		stream = G_INPUT_STREAM (dmap_gst_mp3_input_stream_new
+		stream = G_INPUT_STREAM (dmap_transcode_mp3_stream_new
 					 (src_stream));
 	} else if (!strcmp (transcode_mimetype, "audio/wav")) {
-		stream = G_INPUT_STREAM (dmap_gst_wav_input_stream_new
+		stream = G_INPUT_STREAM (dmap_transcode_wav_stream_new
 					 (src_stream));
 	} else if (!strcmp (transcode_mimetype, "video/quicktime")) {
-		stream = G_INPUT_STREAM (dmap_gst_qt_input_stream_new
+		stream = G_INPUT_STREAM (dmap_transcode_qt_stream_new
 					 (src_stream));
 	} else {
 		g_warning ("Transcode format %s not supported",
@@ -283,27 +271,21 @@ dmap_gst_input_stream_new (const gchar * transcode_mimetype,
 	return stream;
 }
 
-gchar *
-dmapd_input_stream_strdup_format_extension (const gint format_code)
-{
-	return g_strdup (dmap_gst_formats[format_code].extension);
-}
-
 static gssize
-min (gssize a, gssize b)
+_min (gssize a, gssize b)
 {
 	return a < b ? a : b;
 }
 
 static gssize
-dmap_gst_input_stream_read (GInputStream * stream,
-			    void *buffer,
-			    gsize count,
-			    G_GNUC_UNUSED GCancellable * cancellable,
-                            G_GNUC_UNUSED GError ** error)
+_read (GInputStream * stream,
+       void *buffer,
+       gsize count,
+       G_GNUC_UNUSED GCancellable * cancellable,
+       G_GNUC_UNUSED GError ** error)
 {
 	gsize i;
-	DMAPGstInputStream *gst_stream = DMAP_GST_INPUT_STREAM (stream);
+	DmapTranscodeStream *gst_stream = DMAP_TRANSCODE_STREAM (stream);
 	gint64 end_time;
 
 	end_time = g_get_monotonic_time () + QUEUE_POP_WAIT_SECONDS * G_TIME_SPAN_SECOND;
@@ -322,7 +304,7 @@ dmap_gst_input_stream_read (GInputStream * stream,
 		/* Depending on timing, more data may have been written
 		 * since check: do not pull more than count:
 		 */
-		count = min (count, g_queue_get_length (gst_stream->priv->buffer));
+		count = _min (count, g_queue_get_length (gst_stream->priv->buffer));
 	}
 
 	for (i = 0; i < count; i++) {
@@ -330,10 +312,11 @@ dmap_gst_input_stream_read (GInputStream * stream,
 			GPOINTER_TO_INT (g_queue_pop_head (gst_stream->priv->buffer));
 	}
 
-	if (gst_stream->priv->write_request > count)
+	if (gst_stream->priv->write_request > count) {
 		gst_stream->priv->write_request -= count;
-	else
+	} else {
 		gst_stream->priv->write_request = 0;
+	}
 
 	if (gst_stream->priv->write_request <= 0) {
 		g_cond_signal (&gst_stream->priv->buffer_write_ready);
@@ -345,29 +328,29 @@ dmap_gst_input_stream_read (GInputStream * stream,
 }
 
 static gssize
-dmap_gst_input_stream_skip (G_GNUC_UNUSED GInputStream * stream,
-			    G_GNUC_UNUSED gsize count,
-			    G_GNUC_UNUSED GCancellable * cancellable,
-                            G_GNUC_UNUSED GError ** error)
+_skip (G_GNUC_UNUSED GInputStream * stream,
+       G_GNUC_UNUSED gsize count,
+       G_GNUC_UNUSED GCancellable * cancellable,
+       G_GNUC_UNUSED GError ** error)
 {
 	g_error ("Not implemented");
 	return 0;
 }
 
 static void
-dmap_gst_input_stream_kill_pipeline (DMAPGstInputStream * stream)
+_kill_pipeline (DmapTranscodeStream * stream)
 {
-	DMAP_GST_INPUT_STREAM_GET_CLASS (stream)->kill_pipeline (stream);
+	DMAP_TRANSCODE_STREAM_GET_CLASS (stream)->kill_pipeline (stream);
 }
 
 static gboolean
-dmap_gst_input_stream_close (GInputStream * stream,
-			     G_GNUC_UNUSED GCancellable * cancellable,
-                             G_GNUC_UNUSED GError ** error)
+_close (GInputStream * stream,
+        G_GNUC_UNUSED GCancellable * cancellable,
+        G_GNUC_UNUSED GError ** error)
 {
-	DMAPGstInputStream *gst_stream = DMAP_GST_INPUT_STREAM (stream);
+	DmapTranscodeStream *gst_stream = DMAP_TRANSCODE_STREAM (stream);
 
-	dmap_gst_input_stream_kill_pipeline (gst_stream);
+	_kill_pipeline (gst_stream);
 
 	g_mutex_lock (&gst_stream->priv->buffer_mutex);
 
@@ -380,82 +363,93 @@ dmap_gst_input_stream_close (GInputStream * stream,
 }
 
 static gssize
-dmap_gst_input_stream_read_finish (G_GNUC_UNUSED GInputStream * stream,
-				   G_GNUC_UNUSED GAsyncResult * result,
-                                   G_GNUC_UNUSED GError ** error)
+_read_finish (G_GNUC_UNUSED GInputStream * stream,
+              G_GNUC_UNUSED GAsyncResult * result,
+              G_GNUC_UNUSED GError ** error)
 {
 	g_error ("Not implemented");
 	return 0;
 }
 
 static gssize
-dmap_gst_input_stream_skip_finish (G_GNUC_UNUSED GInputStream * stream,
-				   G_GNUC_UNUSED GAsyncResult * result,
-                                   G_GNUC_UNUSED GError ** error)
+_skip_finish (G_GNUC_UNUSED GInputStream * stream,
+              G_GNUC_UNUSED GAsyncResult * result,
+              G_GNUC_UNUSED GError ** error)
 {
 	g_error ("Not implemented");
 	return 0;
 }
 
 static void
-dmap_gst_input_stream_close_async (G_GNUC_UNUSED GInputStream * stream,
-				   G_GNUC_UNUSED int io_priority,
-				   G_GNUC_UNUSED GCancellable * cancellabl,
-				   G_GNUC_UNUSED GAsyncReadyCallback callback,
-				   G_GNUC_UNUSED gpointer data)
+_close_async (G_GNUC_UNUSED GInputStream * stream,
+              G_GNUC_UNUSED int io_priority,
+              G_GNUC_UNUSED GCancellable * cancellable,
+              G_GNUC_UNUSED GAsyncReadyCallback callback,
+              G_GNUC_UNUSED gpointer data)
 {
+	g_error ("Not implemented");
 }
 
 static void
-dmap_gst_input_stream_read_async (G_GNUC_UNUSED GInputStream * stream,
-				  G_GNUC_UNUSED void *buffer,
-				  G_GNUC_UNUSED gsize count,
-				  G_GNUC_UNUSED int io_priority,
-				  G_GNUC_UNUSED GCancellable * cancellable,
-				  G_GNUC_UNUSED GAsyncReadyCallback callback,
-				  G_GNUC_UNUSED gpointer user_data)
+_read_async (G_GNUC_UNUSED GInputStream * stream,
+             G_GNUC_UNUSED void *buffer,
+             G_GNUC_UNUSED gsize count,
+             G_GNUC_UNUSED int io_priority,
+             G_GNUC_UNUSED GCancellable * cancellable,
+             G_GNUC_UNUSED GAsyncReadyCallback callback,
+             G_GNUC_UNUSED gpointer user_data)
 {
+	g_error ("Not implemented");
 }
 
 static void
-dmap_gst_input_stream_skip_async (G_GNUC_UNUSED GInputStream * stream,
-				  G_GNUC_UNUSED gsize count,
-				  G_GNUC_UNUSED int io_priority,
-				  G_GNUC_UNUSED GCancellable * cancellabl,
-				  G_GNUC_UNUSED GAsyncReadyCallback callback,
-				  G_GNUC_UNUSED gpointer datae)
+_skip_async (G_GNUC_UNUSED GInputStream * stream,
+             G_GNUC_UNUSED gsize count,
+             G_GNUC_UNUSED int io_priority,
+             G_GNUC_UNUSED GCancellable * cancellabl,
+             G_GNUC_UNUSED GAsyncReadyCallback callback,
+             G_GNUC_UNUSED gpointer datae)
 {
+	g_error ("Not implemented");
 }
 
 static gboolean
-dmap_gst_input_stream_close_finish (G_GNUC_UNUSED GInputStream * stream,
-				    G_GNUC_UNUSED GAsyncResult * result,
-                                    G_GNUC_UNUSED GError ** error)
+_close_finish (G_GNUC_UNUSED GInputStream * stream,
+               G_GNUC_UNUSED GAsyncResult * result,
+               G_GNUC_UNUSED GError ** error)
 {
 	g_error ("Not implemented");
 	return FALSE;
 }
 
 static void
-dmap_gst_input_stream_class_init (DMAPGstInputStreamClass * klass)
+dmap_transcode_stream_class_init (DmapTranscodeStreamClass * klass)
 {
 	GInputStreamClass *istream_class;
 
 	istream_class = G_INPUT_STREAM_CLASS (klass);
-	istream_class->read_fn = dmap_gst_input_stream_read;
-	istream_class->skip = dmap_gst_input_stream_skip;
-	istream_class->close_fn = dmap_gst_input_stream_close;
-	istream_class->read_async = dmap_gst_input_stream_read_async;
-	istream_class->read_finish = dmap_gst_input_stream_read_finish;
-	istream_class->skip_async = dmap_gst_input_stream_skip_async;
-	istream_class->skip_finish = dmap_gst_input_stream_skip_finish;
-	istream_class->close_async = dmap_gst_input_stream_close_async;
-	istream_class->close_finish = dmap_gst_input_stream_close_finish;
+	istream_class->read_fn = _read;
+	istream_class->skip = _skip;
+	istream_class->close_fn = _close;
+	istream_class->read_async = _read_async;
+	istream_class->read_finish = _read_finish;
+	istream_class->skip_async = _skip_async;
+	istream_class->skip_finish = _skip_finish;
+	istream_class->close_async = _close_async;
+	istream_class->close_finish = _close_finish;
 }
 
+G_DEFINE_TYPE_WITH_CODE (DmapTranscodeStream, dmap_transcode_stream,
+			 G_TYPE_INPUT_STREAM,
+			 G_IMPLEMENT_INTERFACE (G_TYPE_SEEKABLE,
+						_seekable_iface_init)
+                         G_ADD_PRIVATE (DmapTranscodeStream));
+
 static void
-dmap_gst_input_stream_init (DMAPGstInputStream * stream)
+dmap_transcode_stream_init (DmapTranscodeStream * stream)
 {
+	stream->priv = dmap_transcode_stream_get_instance_private(stream);
+
 	stream->priv->buffer = g_queue_new ();
 	stream->priv->read_request = 0;
 	stream->priv->write_request = 0;
@@ -468,9 +462,3 @@ dmap_gst_input_stream_init (DMAPGstInputStream * stream)
 	g_cond_init (&stream->priv->buffer_read_ready);
 	g_cond_init (&stream->priv->buffer_write_ready);
 }
-
-G_DEFINE_TYPE_WITH_CODE (DMAPGstInputStream, dmap_gst_input_stream,
-			 G_TYPE_INPUT_STREAM,
-			 G_IMPLEMENT_INTERFACE (G_TYPE_SEEKABLE,
-						dmap_gst_input_stream_seekable_iface_init)
-                         G_ADD_PRIVATE (DMAPGstInputStream));
diff --git a/libdmapsharing/dmap-transcode-stream.h b/libdmapsharing/dmap-transcode-stream.h
new file mode 100644
index 0000000..cdca932
--- /dev/null
+++ b/libdmapsharing/dmap-transcode-stream.h
@@ -0,0 +1,80 @@
+/*
+ * DmapTranscodeStream class: Open a URI using dmap_transcode_stream_new ().
+ * Data is decoded using GStreamer and is then made available by the class's
+ * read operations.
+ *
+ * Copyright (C) 2008 W. Michael Petullo <mike@flyn.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#ifndef _DMAP_TRANSCODE_STREAM_H
+#define _DMAP_TRANSCODE_STREAM_H
+
+#include <gio/gio.h>
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+/**
+ * SECTION: dmap-transcode-stream
+ * @short_description: A transcoding #GInputStream wrapper.
+ *
+ * #DmapTranscodeStream objects wrap a #GInputStream in a way that transcodes the data therein.
+ */
+
+#define DMAP_TYPE_TRANSCODE_STREAM         (dmap_transcode_stream_get_type ())
+#define DMAP_TRANSCODE_STREAM(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), \
+                                            DMAP_TYPE_TRANSCODE_STREAM, \
+                                            DmapTranscodeStream))
+#define DMAP_TRANSCODE_STREAM_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), \
+                                            DMAP_TYPE_TRANSCODE_STREAM, \
+                                            DmapTranscodeStreamClass))
+#define DMAP_IS_TRANSCODE_STREAM(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
+                                            DMAP_TYPE_TRANSCODE_STREAM))
+#define DMAP_IS_TRANSCODE_STREAM_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), \
+                                            DMAP_TYPE_TRANSCODE_STREAM_CLASS))
+#define DMAP_TRANSCODE_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
+                                            DMAP_TYPE_TRANSCODE_STREAM, \
+                                            DmapTranscodeStreamClass))
+typedef struct DmapTranscodeStreamPrivate DmapTranscodeStreamPrivate;
+
+typedef struct {
+	GInputStream parent;
+	DmapTranscodeStreamPrivate *priv;
+} DmapTranscodeStream;
+
+typedef struct {
+	GInputStreamClass parent;
+
+	void (*kill_pipeline) (DmapTranscodeStream *stream);
+} DmapTranscodeStreamClass;
+
+GType dmap_transcode_stream_get_type (void);
+
+/* Supported transcode target formats (data read from DmapTranscodeStream
+ * will be in one of these formats): */
+enum
+{
+	RAW,			/* No transcoding performed. */
+	WAV16,
+	MP3
+};
+
+GInputStream *dmap_transcode_stream_new (const gchar * transcode_mimetype,
+					 GInputStream * src_stream);
+
+G_END_DECLS
+#endif /* _DMAP_TRANSCODE_STREAM_H */
diff --git a/libdmapsharing/dmap-gst-wav-input-stream.c b/libdmapsharing/dmap-transcode-wav-stream.c
similarity index 80%
rename from libdmapsharing/dmap-gst-wav-input-stream.c
rename to libdmapsharing/dmap-transcode-wav-stream.c
index d95e69f..4206460 100644
--- a/libdmapsharing/dmap-gst-wav-input-stream.c
+++ b/libdmapsharing/dmap-transcode-wav-stream.c
@@ -1,5 +1,5 @@
 /*
- * DMAPGstWAVInputStream class: Open a URI using dmap_gst_wav_input_stream_new ().
+ * DmapTranscodeWavStream class: Open a URI using dmap_transcode_wav_stream_new ().
  * Data is decoded using GStreamer and is then reencoded as a WAV
  * stream by the class's read operations.
  *
@@ -23,12 +23,13 @@
 #include <gst/gst.h>
 #include <gst/app/gstappsink.h>
 
-#include "dmap-gst-wav-input-stream.h"
+#include "dmap-transcode-wav-stream.h"
+#include "dmap-transcode-stream-private.h"
 #include "gst-util.h"
 
 #define GST_APP_MAX_BUFFERS 1024
 
-struct DMAPGstWAVInputStreamPrivate
+struct DmapTranscodeWavStreamPrivate
 {
 	GstElement *pipeline;
 	GstElement *src;
@@ -40,9 +41,9 @@ struct DMAPGstWAVInputStreamPrivate
 };
 
 static void
-pad_added_cb (G_GNUC_UNUSED GstElement * element,
-              GstPad * pad,
-              GstElement *convert)
+_pad_added_cb (G_GNUC_UNUSED GstElement * element,
+               GstPad * pad,
+               GstElement *convert)
 {
 	/* Link remaining pad after decodebin2 does its magic. */
 	GstPad *conv_pad;
@@ -50,7 +51,7 @@ pad_added_cb (G_GNUC_UNUSED GstElement * element,
 	conv_pad = gst_element_get_static_pad (convert, "sink");
 	g_assert (conv_pad != NULL);
 
-	if (pads_compatible (pad, conv_pad)) {
+	if (gst_util_pads_compatible (pad, conv_pad)) {
 		g_assert (!GST_PAD_IS_LINKED
 			  (gst_element_get_static_pad
 			   (convert, "sink")));
@@ -62,11 +63,11 @@ pad_added_cb (G_GNUC_UNUSED GstElement * element,
 }
 
 GInputStream *
-dmap_gst_wav_input_stream_new (GInputStream * src_stream)
+dmap_transcode_wav_stream_new (GInputStream * src_stream)
 {
 	GstStateChangeReturn sret;
 	GstState state;
-	DMAPGstWAVInputStream *stream = NULL;
+	DmapTranscodeWavStream *stream = NULL;
 
 	GstElement *pipeline = NULL;
         GstElement *src = NULL;
@@ -147,9 +148,9 @@ dmap_gst_wav_input_stream_new (GInputStream * src_stream)
 	gst_app_sink_set_max_buffers (GST_APP_SINK (sink), GST_APP_MAX_BUFFERS);
 	gst_app_sink_set_drop (GST_APP_SINK (sink), FALSE);
 
-	g_signal_connect (decode, "pad-added", G_CALLBACK (pad_added_cb), convert);
+	g_signal_connect (decode, "pad-added", G_CALLBACK (_pad_added_cb), convert);
 
-	/* FIXME: this technique is shared with dmapd-daap-share.c */
+	/* FIXME: this technique is shared with dmapd-dmap-av-share.c */
 	sret = gst_element_set_state (pipeline, GST_STATE_PLAYING);
 	if (GST_STATE_CHANGE_ASYNC == sret) {
 		if (GST_STATE_CHANGE_SUCCESS !=
@@ -162,13 +163,13 @@ dmap_gst_wav_input_stream_new (GInputStream * src_stream)
 		goto done;
 	}
 
-	stream = DMAP_GST_WAV_INPUT_STREAM (g_object_new (DMAP_TYPE_GST_WAV_INPUT_STREAM, NULL));
+	stream = DMAP_TRANSCODE_WAV_STREAM (g_object_new (DMAP_TYPE_GST_WAV_INPUT_STREAM, NULL));
         if (NULL == stream) {
                 goto done;
         }
         g_assert (G_IS_SEEKABLE (stream));
 
-	g_signal_connect (sink, "new-sample", G_CALLBACK (dmap_gst_input_stream_new_buffer_cb), stream);
+	g_signal_connect (sink, "new-sample", G_CALLBACK (dmap_transcode_stream_private_new_buffer_cb), stream);
 
 	stream->priv->pipeline = gst_object_ref (pipeline);
         stream->priv->src = gst_object_ref (src);
@@ -211,29 +212,31 @@ done:
 }
 
 static void
-dmap_gst_wav_input_stream_kill_pipeline (DMAPGstInputStream * stream)
+_kill_pipeline (DmapTranscodeStream * stream)
 {
-	DMAPGstWAVInputStream *wav_stream =
-		DMAP_GST_WAV_INPUT_STREAM (stream);
+	DmapTranscodeWavStream *wav_stream =
+		DMAP_TRANSCODE_WAV_STREAM (stream);
 
 	gst_element_set_state (wav_stream->priv->pipeline, GST_STATE_NULL);
 	gst_object_unref (GST_OBJECT (wav_stream->priv->pipeline));
 }
 
-G_DEFINE_TYPE_WITH_PRIVATE (DMAPGstWAVInputStream, dmap_gst_wav_input_stream,
-                            DMAP_TYPE_GST_INPUT_STREAM)
+G_DEFINE_TYPE_WITH_PRIVATE (DmapTranscodeWavStream,
+                            dmap_transcode_wav_stream,
+                            DMAP_TYPE_TRANSCODE_STREAM);
 
-static void
-dmap_gst_wav_input_stream_class_init (DMAPGstWAVInputStreamClass * klass)
+     static void
+	     dmap_transcode_wav_stream_class_init (DmapTranscodeWavStreamClass
+						   * klass)
 {
-	DMAPGstInputStreamClass *parent_class =
-		DMAP_GST_INPUT_STREAM_CLASS (klass);
+	DmapTranscodeStreamClass *parent_class =
+		DMAP_TRANSCODE_STREAM_CLASS (klass);
 
-	parent_class->kill_pipeline = dmap_gst_wav_input_stream_kill_pipeline;
+	parent_class->kill_pipeline = _kill_pipeline;
 }
 
 static void
-dmap_gst_wav_input_stream_init (DMAPGstWAVInputStream * stream)
+dmap_transcode_wav_stream_init (DmapTranscodeWavStream * stream)
 {
-	stream->priv = dmap_gst_wav_input_stream_get_instance_private(stream);
+	stream->priv = dmap_transcode_wav_stream_get_instance_private(stream);
 }
diff --git a/libdmapsharing/dmap-gst-wav-input-stream.h b/libdmapsharing/dmap-transcode-wav-stream.h
similarity index 54%
rename from libdmapsharing/dmap-gst-wav-input-stream.h
rename to libdmapsharing/dmap-transcode-wav-stream.h
index c83ff16..20d1224 100644
--- a/libdmapsharing/dmap-gst-wav-input-stream.h
+++ b/libdmapsharing/dmap-transcode-wav-stream.h
@@ -1,5 +1,5 @@
 /*
- * DMAPGstWAVInputStream class: Open a URI using dmap_gst_wav_input_stream_new ().
+ * DmapTranscodeWavStream class: Open a URI using dmap_transcode_wav_stream_new ().
  * Data is decoded using GStreamer and is then reencoded as a MP3
  * stream by the class's read operations.
  *
@@ -20,44 +20,42 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef __DMAP_GST_WAV_INPUT_STREAM
-#define __DMAP_GST_WAV_INPUT_STREAM
+#ifndef _DMAP_TRANSCODE_WAV_STREAM_H
+#define _DMAP_TRANSCODE_WAV_STREAM_H
 
 #include <gio/gio.h>
 
-#include "dmap-gst-input-stream.h"
+#include "dmap-transcode-stream.h"
 
 G_BEGIN_DECLS
-#define DMAP_TYPE_GST_WAV_INPUT_STREAM         (dmap_gst_wav_input_stream_get_type ())
-#define DMAP_GST_WAV_INPUT_STREAM(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), \
+#define DMAP_TYPE_GST_WAV_INPUT_STREAM         (dmap_transcode_wav_stream_get_type ())
+#define DMAP_TRANSCODE_WAV_STREAM(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), \
 				               DMAP_TYPE_GST_WAV_INPUT_STREAM, \
-					       DMAPGstWAVInputStream))
-#define DMAP_GST_WAV_INPUT_STREAM_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), \
+					       DmapTranscodeWavStream))
+#define DMAP_TRANSCODE_WAV_STREAM_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), \
 				               DMAP_TYPE_GST_WAV_INPUT_STREAM, \
-					       DMAPGstWAVInputStreamClass))
-#define IS_DMAP_GST_WAV_INPUT_STREAM(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
+					       DmapTranscodeWavStreamClass))
+#define DMAP_IS_GST_WAV_INPUT_STREAM(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
 				               DMAP_TYPE_GST_WAV_INPUT_STREAM))
-#define IS_DMAP_GST_WAV_INPUT_STREAM_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), \
+#define DMAP_IS_GST_WAV_INPUT_STREAM_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), \
 				               DMAP_TYPE_GST_WAV_INPUT_STREAM_CLASS))
-#define DMAP_GST_WAV_INPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
+#define DMAP_TRANSCODE_WAV_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
 				               DMAP_TYPE_GST_WAV_INPUT_STREAM, \
-					       DMAPGstWAVInputStreamClass))
-typedef struct DMAPGstWAVInputStreamPrivate DMAPGstWAVInputStreamPrivate;
+					       DmapTranscodeWavStreamClass))
+typedef struct DmapTranscodeWavStreamPrivate DmapTranscodeWavStreamPrivate;
 
-typedef struct
-{
-	DMAPGstInputStream parent;
-	DMAPGstWAVInputStreamPrivate *priv;
-} DMAPGstWAVInputStream;
+typedef struct {
+	DmapTranscodeStream parent;
+	DmapTranscodeWavStreamPrivate *priv;
+} DmapTranscodeWavStream;
 
-typedef struct
-{
-	DMAPGstInputStreamClass parent;
-} DMAPGstWAVInputStreamClass;
+typedef struct {
+	DmapTranscodeStreamClass parent;
+} DmapTranscodeWavStreamClass;
 
-GType dmap_gst_wav_input_stream_get_type (void);
+GType dmap_transcode_wav_stream_get_type (void);
 
-GInputStream *dmap_gst_wav_input_stream_new (GInputStream * stream);
+GInputStream *dmap_transcode_wav_stream_new (GInputStream * stream);
 
 G_END_DECLS
-#endif /* __DMAP_GST_WAV_INPUT_STREAM */
+#endif
diff --git a/libdmapsharing/dmap-utils.c b/libdmapsharing/dmap-utils.c
index 2400058..7e26b42 100644
--- a/libdmapsharing/dmap-utils.c
+++ b/libdmapsharing/dmap-utils.c
@@ -51,31 +51,31 @@ done:
 
 #include <check.h>
 
-START_TEST(dmap_utils_mime_to_format_test_wav)
+START_TEST(_mime_to_format_test_wav)
 {
 	ck_assert_str_eq(dmap_utils_mime_to_format("audio/wav"), "wav");
 }
 END_TEST
 
-START_TEST(dmap_utils_mime_to_format_test_mp3)
+START_TEST(_mime_to_format_test_mp3)
 {
 	ck_assert_str_eq(dmap_utils_mime_to_format("audio/mp3"), "mp3");
 }
 END_TEST
 
-START_TEST(dmap_utils_mime_to_format_test_quicktime)
+START_TEST(_mime_to_format_test_quicktime)
 {
 	ck_assert_str_eq(dmap_utils_mime_to_format("video/quicktime"), "mp4");
 }
 END_TEST
 
-START_TEST(dmap_utils_mime_to_format_test_null)
+START_TEST(_mime_to_format_test_null)
 {
 	ck_assert_ptr_eq(dmap_utils_mime_to_format(NULL), NULL);
 }
 END_TEST
 
-START_TEST(dmap_utils_mime_to_format_test_bad)
+START_TEST(_mime_to_format_test_bad)
 {
 	ck_assert_ptr_eq(dmap_utils_mime_to_format("bad/mime"), NULL);
 }
diff --git a/libdmapsharing/dmap-utils.h b/libdmapsharing/dmap-utils.h
index aa6d737..d10f474 100644
--- a/libdmapsharing/dmap-utils.h
+++ b/libdmapsharing/dmap-utils.h
@@ -23,6 +23,12 @@
 #include <glib.h>
 #include <libsoup/soup.h>
 
+/**
+ * dmap_utils_mime_to_format:
+ * @transcode_mimetype: a string representing a MIME type (e.g., "audio/wav").
+ *
+ * Returns: a string representing the corresponding type  (e.g., "wav").
+ */
 gchar * dmap_utils_mime_to_format (const gchar * transcode_mimetype);
 
 G_END_DECLS
diff --git a/libdmapsharing/dmap.h b/libdmapsharing/dmap.h
index 905e7a8..51e127d 100644
--- a/libdmapsharing/dmap.h
+++ b/libdmapsharing/dmap.h
@@ -1,27 +1,29 @@
-#ifndef __DMAP_H
-#define __DMAP_H
+#ifndef _DMAP_H
+#define _DMAP_H
 
-#include <libdmapsharing/daap-connection.h>
-#include <libdmapsharing/daap-record.h>
-#include <libdmapsharing/daap-share.h>
+#include <libdmapsharing/dmap-av-connection.h>
+#include <libdmapsharing/dmap-av-record.h>
+#include <libdmapsharing/dmap-av-share.h>
 #include <libdmapsharing/dmap-connection.h>
 #include <libdmapsharing/dmap-container-db.h>
 #include <libdmapsharing/dmap-container-record.h>
 #include <libdmapsharing/dmap-db.h>
 #include <libdmapsharing/dmap-enums.h>
-#include <libdmapsharing/dmap-gst-input-stream.h>
+#include <libdmapsharing/dmap-transcode-stream.h>
 #include <libdmapsharing/dmap-md5.h>
 #include <libdmapsharing/dmap-mdns-browser.h>
 #include <libdmapsharing/dmap-mdns-publisher.h>
+#include <libdmapsharing/dmap-mdns-service.h>
 #include <libdmapsharing/dmap-record.h>
 #include <libdmapsharing/dmap-record-factory.h>
 #include <libdmapsharing/dmap-share.h>
 #include <libdmapsharing/dmap-utils.h>
-#include <libdmapsharing/dpap-connection.h>
-#include <libdmapsharing/dpap-record.h>
-#include <libdmapsharing/dpap-share.h>
-#include <libdmapsharing/dacp-share.h>
-#include <libdmapsharing/dacp-player.h>
-#include <libdmapsharing/dacp-connection.h>
+#include <libdmapsharing/dmap-image-connection.h>
+#include <libdmapsharing/dmap-image-record.h>
+#include <libdmapsharing/dmap-image-share.h>
+#include <libdmapsharing/dmap-control-share.h>
+#include <libdmapsharing/dmap-control-player.h>
+#include <libdmapsharing/dmap-control-connection.h>
+#include <libdmapsharing/dmap-error.h>
 
-#endif /* __DMAP_H */
+#endif /* _DMAP_H */
diff --git a/libdmapsharing/dpap-connection.h b/libdmapsharing/dpap-connection.h
deleted file mode 100644
index 13616dc..0000000
--- a/libdmapsharing/dpap-connection.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#ifndef __DPAP_CONNECTION_H
-#define __DPAP_CONNECTION_H
-
-#include <glib-object.h>
-
-#include <libdmapsharing/dmap-connection.h>
-#include <libdmapsharing/dmap-db.h>
-
-G_BEGIN_DECLS
-/**
- * DPAP_TYPE_CONNECTION:
- *
- * The type for #DPAPConnection.
- */
-#define DPAP_TYPE_CONNECTION		(dpap_connection_get_type ())
-/**
- * DPAP_CONNECTION:
- * @o: Object which is subject to casting.
- *
- * Casts a #DPAPConnection or derived pointer into a (DPAPConnection *) pointer.
- * Depending on the current debugging level, this function may invoke
- * certain runtime checks to identify invalid casts.
- */
-#define DPAP_CONNECTION(o)		(G_TYPE_CHECK_INSTANCE_CAST ((o), DPAP_TYPE_CONNECTION, DPAPConnection))
-/**
- * DPAP_CONNECTION_CLASS:
- * @k: a valid #DPAPConnectionClass
- *
- * Casts a derived #DPAPConnectionClass structure into a #DPAPConnectionClass
- * structure.
- */
-#define DPAP_CONNECTION_CLASS(k)	(G_TYPE_CHECK_CLASS_CAST((k), DPAP_TYPE_CONNECTION, DPAPConnectionClass))
-/**
- * IS_DPAP_CONNECTION:
- * @o: Instance to check for being a %DPAP_TYPE_CONNECTION.
- *
- * Checks whether a valid #GTypeInstance pointer is of type %DPAP_TYPE_CONNECTION.
- */
-#define IS_DPAP_CONNECTION(o)	(G_TYPE_CHECK_INSTANCE_TYPE ((o), DPAP_TYPE_CONNECTION))
-/**
- * IS_DPAP_CONNECTION_CLASS:
- * @k: a #DPAPConnectionClass
- *
- * Checks whether @k "is a" valid #DPAPConnectionClass structure of type
- * %DPAP_CONNECTION or derived.
- */
-#define IS_DPAP_CONNECTION_CLASS(k)	(G_TYPE_CHECK_CLASS_TYPE ((k), DPAP_TYPE_CONNECTION))
-/**
- * DPAP_CONNECTION_GET_CLASS:
- * @o: a #DPAPConnection instance.
- *
- * Get the class structure associated to a #DPAPConnection instance.
- *
- * Returns: pointer to object class structure.
- */
-#define DPAP_CONNECTION_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), DPAP_TYPE_CONNECTION, DPAPConnectionClass))
-typedef struct DPAPConnectionPrivate DPAPConnectionPrivate;
-
-typedef struct
-{
-	DMAPConnectionClass dmap_connection_class;
-} DPAPConnectionClass;
-
-typedef struct
-{
-	DMAPConnection dmap_connection_instance;
-	DPAPConnectionPrivate *priv;
-} DPAPConnection;
-
-GType dpap_connection_get_type (void);
-
-DPAPConnection *dpap_connection_new (const char *name,
-				     const char *host,
-				     guint port,
-				     DMAPDb * db,
-				     DMAPRecordFactory * factory);
-G_END_DECLS
-#endif /* __DPAP_CONNECTION_H */
diff --git a/libdmapsharing/dpap-record.h b/libdmapsharing/dpap-record.h
deleted file mode 100644
index 0e9c1c4..0000000
--- a/libdmapsharing/dpap-record.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- *  Database record interface for DPAP sharing
- *
- *  Copyright (C) 2008 W. Michael Petullo <mike@flyn.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#ifndef __DPAP_RECORD_H
-#define __DPAP_RECORD_H
-
-#include <glib.h>
-#include <gio/gio.h>
-
-#include <libdmapsharing/dmap-record.h>
-
-G_BEGIN_DECLS
-/**
- * DPAP_TYPE_RECORD:
- *
- * The type for #DPAPRecord.
- */
-#define DPAP_TYPE_RECORD	     (dpap_record_get_type ())
-/**
- * DPAP_RECORD:
- * @o: Object which is subject to casting.
- *
- * Casts a #DPAPRecord or derived pointer into a (DPAPRecord *) pointer.
- * Depending on the current debugging level, this function may invoke
- * certain runtime checks to identify invalid casts.
- */
-#define DPAP_RECORD(o)		     (G_TYPE_CHECK_INSTANCE_CAST ((o), \
-				      DPAP_TYPE_RECORD, DPAPRecord))
-/**
- * IS_DPAP_RECORD:
- * @o: Instance to check for being a %DPAP_TYPE_RECORD.
- *
- * Checks whether a valid #GTypeInstance pointer is of type %DPAP_TYPE_RECORD.
- */
-#define IS_DPAP_RECORD(o)	     (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
-				      DPAP_TYPE_RECORD))
-/**
- * DPAP_RECORD_GET_INTERFACE:
- * @o: a #DPAPRecord instance.
- *
- * Get the class structure associated to a #DPAPRecord instance.
- *
- * Returns: pointer to object interface structure.
- */
-#define DPAP_RECORD_GET_INTERFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), \
-				      DPAP_TYPE_RECORD, DPAPRecordIface))
-typedef struct _DPAPRecord DPAPRecord;
-typedef struct _DPAPRecordIface DPAPRecordIface;
-
-struct _DPAPRecordIface
-{
-	GTypeInterface parent;
-
-	GInputStream *(*read) (DPAPRecord * record, GError ** err);
-};
-
-GType dpap_record_get_type (void);
-
-/**
- * dpap_record_read:
- * @record: a DPAPRecord.
- * @err: a GError.
- *
- * Returns: A GInputStream that provides read-only access to the data stream
- * associated with record.
- */
-GInputStream *dpap_record_read (DPAPRecord * record, GError ** err);
-
-#endif /* __DPAP_RECORD_H */
-
-G_END_DECLS
diff --git a/libdmapsharing/dpap-share.h b/libdmapsharing/dpap-share.h
deleted file mode 100644
index fd3f4f3..0000000
--- a/libdmapsharing/dpap-share.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Header for DPAP (e.g., iPhoto Picture) sharing
- *
- * Copyright (C) 2005 Charles Schmidt <cschmidt2@emich.edu>
- *
- * Modifications Copyright (C) 2008 W. Michael Petullo <mike@flyn.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- *
- */
-
-#ifndef __DPAP_SHARE_H
-#define __DPAP_SHARE_H
-
-#include <glib-object.h>
-
-#include <libdmapsharing/dmap-share.h>
-
-G_BEGIN_DECLS
-/**
- * DPAP_TYPE_SHARE:
- *
- * The type for #DPAPShare.
- */
-#define DPAP_TYPE_SHARE         (dpap_share_get_type ())
-/**
- * DPAP_SHARE:
- * @o: Object which is subject to casting.
- *
- * Casts a #DPAPShare or derived pointer into a (DPAPShare*) pointer.
- * Depending on the current debugging level, this function may invoke
- * certain runtime checks to identify invalid casts.
- */
-#define DPAP_SHARE(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), \
-				 DPAP_TYPE_SHARE, DPAPShare))
-/**
- * DPAP_SHARE_CLASS:
- * @k: a valid #DPAPShareClass
- *
- * Casts a derived #DPAPShareClass structure into a #DPAPShareClass structure.
- */
-#define DPAP_SHARE_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), \
-				 DPAP_TYPE_SHARE, DPAPShareClass))
-/**
- * IS_DPAP_SHARE:
- * @o: Instance to check for being a %DPAP_TYPE_SHARE.
- *
- * Checks whether a valid #GTypeInstance pointer is of type %DPAP_TYPE_SHARE.
- */
-#define IS_DPAP_SHARE(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
-				 DPAP_TYPE_SHARE))
-/**
- * IS_DPAP_SHARE_CLASS:
- * @k: a #DPAPShareClass
- *
- * Checks whether @k "is a" valid #DPAPShareClass structure of type
- * %DPAP_SHARE or derived.
- */
-#define IS_DPAP_SHARE_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), DPAP_TYPE_SHARE))
-/**
- * DPAP_SHARE_GET_CLASS:
- * @o: a #DPAPShare instance.
- *
- * Get the class structure associated to a #DPAPShare instance.
- *
- * Returns: pointer to object class structure.
- */
-#define DPAP_SHARE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
-				 DPAP_TYPE_SHARE, DPAPShareClass))
-typedef struct DPAPSharePrivate DPAPSharePrivate;
-
-typedef struct
-{
-	DMAPShareClass dmap_share_class;
-} DPAPShareClass;
-
-typedef struct
-{
-	DMAPShare dmap_share_instance;
-	DPAPSharePrivate *priv;
-} DPAPShare;
-
-GType dpap_share_get_type (void);
-
-/**
- * dpap_share_new:
- * @name: The name that will be published by mDNS.
- * @password: A share password or NULL.
- * @db: A media database.
- * @container_db: A container (album) database.
- * @transcode_mimetype: A transcode mimetype or NULL.
- *
- * Creates a new DPAP share and publishes it using mDNS.
- *
- * Returns: a pointer to a DPAPShare.
- */
-DPAPShare *dpap_share_new (const char *name, const char *password,
-			   gpointer db, gpointer container_db,
-			   gchar * transcode_mimetype);
-
-#endif /* __DPAP_SHARE_H */
-
-G_END_DECLS
diff --git a/libdmapsharing/generate-test-suites b/libdmapsharing/generate-test-suites
index d547441..a014896 100755
--- a/libdmapsharing/generate-test-suites
+++ b/libdmapsharing/generate-test-suites
@@ -2,7 +2,7 @@
 
 # Generate test suite for each source file containing "^START_TEST":
 for f in *.c; do
-	tests=$(grep ^START_TEST $f | cut -c 12- | sed 's/.$//')
+	tests=$(grep ^START_TEST $f | cut -c 12- | sed 's/).*//')
 	suitefn=$(echo ${f%.*} | sed 's/-/_/g')
 	cppname=$(echo ${f%.*} | sed 's/-/_/g' | tr [:lower:] [:upper:])
 
@@ -60,7 +60,7 @@ EOF
 
 for f in *.c; do
         # Get list of tests in given source file.
-        tests=$(grep ^START_TEST $f | cut -c 12- | sed 's/.$//')
+        tests=$(grep ^START_TEST $f | cut -c 12- | sed 's/).*//')
 	suitefn=$(echo ${f%.*} | sed 's/-/_/g')
 
         # Continue if no tests.
@@ -104,7 +104,7 @@ EOF
 
 for f in *.c; do
         # Get list of tests in given source file.
-        tests=$(grep ^START_TEST $f | cut -c 12- | sed 's/.$//')
+        tests=$(grep ^START_TEST $f | cut -c 12- | sed 's/).*//')
 	suitefn=$(echo ${f%.*} | sed 's/-/_/g')
 
         # Continue if no tests.
diff --git a/libdmapsharing/gst-util.c b/libdmapsharing/gst-util.c
index a1f7bb8..497e093 100644
--- a/libdmapsharing/gst-util.c
+++ b/libdmapsharing/gst-util.c
@@ -18,14 +18,11 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include <string.h>
-#include <gst/gst.h>
-
-#include "dmap-gst-input-stream.h"
 #include "gst-util.h"
+#include "dmap-transcode-stream.h"
 
 gboolean
-pads_compatible (GstPad * pad1, GstPad * pad2)
+gst_util_pads_compatible (GstPad * pad1, GstPad * pad2)
 {
 	gboolean fnval;
 	GstCaps *res, *caps1, *caps2;
diff --git a/libdmapsharing/gst-util.h b/libdmapsharing/gst-util.h
index 845eb7e..1f2d26d 100644
--- a/libdmapsharing/gst-util.h
+++ b/libdmapsharing/gst-util.h
@@ -18,16 +18,13 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef __GST_UTIL
-#define __GST_UTIL
+#ifndef _GST_UTIL_H
+#define _GST_UTIL_H
 
 #include <gst/gst.h>
 
-gboolean pads_compatible (GstPad * pad1, GstPad * pad2);
+gboolean gst_util_pads_compatible (GstPad * pad1, GstPad * pad2);
 
-void dmap_gst_input_stream_new_buffer_cb (GstElement * element,
-                                          DMAPGstInputStream * stream);
-
-#endif /* __GST_UTIL */
+#endif
 
 G_END_DECLS
diff --git a/libdmapsharing/test-daap-record-factory.c b/libdmapsharing/test-daap-record-factory.c
deleted file mode 100644
index 54109ba..0000000
--- a/libdmapsharing/test-daap-record-factory.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * DAAPRecord factory class
- *
- * Copyright (C) 2008 W. Michael Petullo <mike@flyn.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#include "test-daap-record-factory.h"
-#include "test-daap-record.h"
-
-static DMAPRecord *
-test_daap_record_factory_create  (G_GNUC_UNUSED DMAPRecordFactory *factory,
-                                  G_GNUC_UNUSED gpointer user_data)
-{
-	return DMAP_RECORD (test_daap_record_new ());
-}
-
-static void
-test_daap_record_factory_init (G_GNUC_UNUSED TestDAAPRecordFactory *factory)
-{
-}
-
-static void
-test_daap_record_factory_class_init (G_GNUC_UNUSED TestDAAPRecordFactoryClass *klass)
-{
-}
-
-static void
-test_daap_record_factory_interface_init (gpointer iface,
-                                         G_GNUC_UNUSED gpointer data)
-{
-	DMAPRecordFactoryIface *factory = iface;
-
-	g_assert (G_TYPE_FROM_INTERFACE (factory) == DMAP_TYPE_RECORD_FACTORY);
-
-	factory->create = test_daap_record_factory_create;
-}
-
-G_DEFINE_TYPE_WITH_CODE (TestDAAPRecordFactory, test_daap_record_factory, G_TYPE_OBJECT, 
-			 G_IMPLEMENT_INTERFACE (DMAP_TYPE_RECORD_FACTORY,
-					        test_daap_record_factory_interface_init))
-
-TestDAAPRecordFactory *
-test_daap_record_factory_new (void)
-{
-	TestDAAPRecordFactory *factory;
-
-	factory = TEST_DAAP_RECORD_FACTORY (g_object_new (TYPE_TEST_DAAP_RECORD_FACTORY, NULL));
-
-	return factory;
-}
diff --git a/libdmapsharing/test-daap-record-factory.h b/libdmapsharing/test-daap-record-factory.h
deleted file mode 100644
index fc8fe7f..0000000
--- a/libdmapsharing/test-daap-record-factory.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * TestDAAPRecord factory class
- *
- * Copyright (C) 2008 W. Michael Petullo <mike@flyn.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#ifndef __TEST_DAAP_RECORD_FACTORY
-#define __TEST_DAAP_RECORD_FACTORY
-
-#include <libdmapsharing/dmap.h>
-
-G_BEGIN_DECLS
-
-#define TYPE_TEST_DAAP_RECORD_FACTORY         (test_daap_record_factory_get_type ())
-#define TEST_DAAP_RECORD_FACTORY(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), \
-				               TYPE_TEST_DAAP_RECORD_FACTORY, TestDAAPRecordFactory))
-#define TEST_DAAP_RECORD_FACTORY_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), \
-				               TYPE_TEST_DAAP_RECORD_FACTORY, TestDAAPRecordFactoryClass))
-#define IS_TEST_DAAP_RECORD_FACTORY(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
-				               TYPE_TEST_DAAP_RECORD_FACTORY))
-#define IS_TEST_DAAP_RECORD_FACTORY_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), \
-				               TYPE_TEST_DAAP_RECORD_FACTORY_CLASS))
-#define TEST_DAAP_RECORD_FACTORY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
-				               TYPE_TEST_DAAP_RECORD_FACTORY, TestDAAPRecordFactoryClass))
-
-typedef struct TestDAAPRecordFactoryPrivate TestDAAPRecordFactoryPrivate;
-
-typedef struct {
-	GObject parent;
-} TestDAAPRecordFactory;
-
-typedef struct {
-	GObjectClass parent;
-} TestDAAPRecordFactoryClass;
-
-GType                  test_daap_record_factory_get_type (void);
-
-TestDAAPRecordFactory *test_daap_record_factory_new      (void);
-
-#endif /* __TEST_DAAP_RECORD_FACTORY */
-
-G_END_DECLS
diff --git a/libdmapsharing/test-daap-record.h b/libdmapsharing/test-daap-record.h
deleted file mode 100644
index 1d76797..0000000
--- a/libdmapsharing/test-daap-record.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Database record class for DAAP sharing
- *
- * Copyright (C) 2008 W. Michael Petullo <mike@flyn.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#ifndef __TEST_DAAP_RECORD
-#define __TEST_DAAP_RECORD
-
-#include <libdmapsharing/dmap.h>
-
-G_BEGIN_DECLS
-
-#define TYPE_TEST_DAAP_RECORD         (test_daap_record_get_type ())
-#define TEST_DAAP_RECORD(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), \
-				       TYPE_TEST_DAAP_RECORD, TestDAAPRecord))
-#define TEST_DAAP_RECORD_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), \
-			               TYPE_TEST_DAAP_RECORD, \
-				       TestDAAPRecordClass))
-#define IS_TEST_DAAP_RECORD(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
-				       TYPE_TEST_DAAP_RECORD))
-#define IS_TEST_DAAP_RECORD_CLASS (k) (G_TYPE_CHECK_CLASS_TYPE ((k), \
-				       TYPE_TEST_DAAP_RECORD_CLASS))
-#define TEST_DAAP_RECORD_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
-				       TYPE_TEST_DAAP_RECORD, \
-				       TestDAAPRecordClass))
-#define TEST_DAAP_RECORD_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), \
-					 TYPE_TEST_DAAP_RECORD, \
-					 TestDAAPRecordPrivate))
-
-typedef struct TestDAAPRecordPrivate TestDAAPRecordPrivate;
-
-typedef struct {
-	GObject parent;
-	TestDAAPRecordPrivate *priv;
-} TestDAAPRecord;
-
-typedef struct {
-	GObjectClass parent;
-} TestDAAPRecordClass;
-
-GType test_daap_record_get_type (void);
-
-TestDAAPRecord *test_daap_record_new           (void);
-
-#endif /* __TEST_DAAP_RECORD */
-
-G_END_DECLS
diff --git a/libdmapsharing/test-dmap-av-record-factory.c b/libdmapsharing/test-dmap-av-record-factory.c
new file mode 100644
index 0000000..10fa27b
--- /dev/null
+++ b/libdmapsharing/test-dmap-av-record-factory.c
@@ -0,0 +1,64 @@
+/*
+ * DmapAvRecord factory class
+ *
+ * Copyright (C) 2008 W. Michael Petullo <mike@flyn.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include "test-dmap-av-record-factory.h"
+#include "test-dmap-av-record.h"
+
+DmapRecord *
+test_dmap_av_record_factory_create(G_GNUC_UNUSED DmapRecordFactory *factory,
+                                   G_GNUC_UNUSED gpointer user_data,
+                                   G_GNUC_UNUSED GError **error)
+{
+	return DMAP_RECORD (test_dmap_av_record_new ());
+}
+
+static void
+test_dmap_av_record_factory_init (G_GNUC_UNUSED TestDmapAvRecordFactory *factory)
+{
+}
+
+static void
+test_dmap_av_record_factory_class_init (G_GNUC_UNUSED TestDmapAvRecordFactoryClass *klass)
+{
+}
+
+static void
+_dmap_record_factory_iface_init (gpointer iface)
+{
+	DmapRecordFactoryInterface *factory = iface;
+
+	g_assert (G_TYPE_FROM_INTERFACE (factory) == DMAP_TYPE_RECORD_FACTORY);
+
+	factory->create = test_dmap_av_record_factory_create;
+}
+
+G_DEFINE_TYPE_WITH_CODE (TestDmapAvRecordFactory, test_dmap_av_record_factory, G_TYPE_OBJECT, 
+			 G_IMPLEMENT_INTERFACE (DMAP_TYPE_RECORD_FACTORY,
+					        _dmap_record_factory_iface_init))
+
+TestDmapAvRecordFactory *
+test_dmap_av_record_factory_new (void)
+{
+	TestDmapAvRecordFactory *factory;
+
+	factory = TEST_DMAP_AV_RECORD_FACTORY (g_object_new (TYPE_TEST_DMAP_AV_RECORD_FACTORY, NULL));
+
+	return factory;
+}
diff --git a/libdmapsharing/test-dmap-av-record-factory.h b/libdmapsharing/test-dmap-av-record-factory.h
new file mode 100644
index 0000000..c13a8f7
--- /dev/null
+++ b/libdmapsharing/test-dmap-av-record-factory.h
@@ -0,0 +1,60 @@
+/*
+ * TestDmapAvRecord factory class
+ *
+ * Copyright (C) 2008 W. Michael Petullo <mike@flyn.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#ifndef _TEST_DMAP_AV_RECORD_FACTORY_H
+#define _TEST_DMAP_AV_RECORD_FACTORY_H
+
+#include <libdmapsharing/dmap.h>
+
+G_BEGIN_DECLS
+
+#define TYPE_TEST_DMAP_AV_RECORD_FACTORY         (test_dmap_av_record_factory_get_type ())
+#define TEST_DMAP_AV_RECORD_FACTORY(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), \
+				               TYPE_TEST_DMAP_AV_RECORD_FACTORY, TestDmapAvRecordFactory))
+#define TEST_DMAP_AV_RECORD_FACTORY_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), \
+				               TYPE_TEST_DMAP_AV_RECORD_FACTORY, TestDmapAvRecordFactoryClass))
+#define IS_TEST_DMAP_AV_RECORD_FACTORY(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
+				               TYPE_TEST_DMAP_AV_RECORD_FACTORY))
+#define IS_TEST_DMAP_AV_RECORD_FACTORY_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), \
+				               TYPE_TEST_DMAP_AV_RECORD_FACTORY_CLASS))
+#define TEST_DMAP_AV_RECORD_FACTORY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
+				               TYPE_TEST_DMAP_AV_RECORD_FACTORY, TestDmapAvRecordFactoryClass))
+
+typedef struct TestDmapAvRecordFactoryPrivate TestDmapAvRecordFactoryPrivate;
+
+typedef struct {
+	GObject parent;
+} TestDmapAvRecordFactory;
+
+typedef struct {
+	GObjectClass parent;
+} TestDmapAvRecordFactoryClass;
+
+GType                  test_dmap_av_record_factory_get_type(void);
+
+TestDmapAvRecordFactory *test_dmap_av_record_factory_new(void);
+
+DmapRecord            *test_dmap_av_record_factory_create(DmapRecordFactory *factory,
+                                                          gpointer user_data,
+                                                          GError **error);
+
+G_END_DECLS
+
+#endif
diff --git a/libdmapsharing/test-daap-record.c b/libdmapsharing/test-dmap-av-record.c
similarity index 74%
rename from libdmapsharing/test-daap-record.c
rename to libdmapsharing/test-dmap-av-record.c
index d1b9170..e9a5cb4 100644
--- a/libdmapsharing/test-daap-record.c
+++ b/libdmapsharing/test-dmap-av-record.c
@@ -20,9 +20,9 @@
 
 #include <string.h>
 
-#include "test-daap-record.h"
+#include "test-dmap-av-record.h"
 
-struct TestDAAPRecordPrivate {
+struct TestDmapAvRecordPrivate {
 	gint filesize;
 	gint rating;
 	char *location;
@@ -42,6 +42,9 @@ struct TestDAAPRecordPrivate {
 	gint32 track;
 	gint32 year;
 	gint8 has_video;
+	guint64 songalbumid;
+	DmapMediaKind mediakind;
+	GArray *hash;
 };
 
 enum {
@@ -64,16 +67,19 @@ enum {
         PROP_DISC,
         PROP_BITRATE,
         PROP_HAS_VIDEO,
-        PROP_REAL_FORMAT
+        PROP_REAL_FORMAT,
+        PROP_SONGALBUMID,
+        PROP_MEDIAKIND,
+        PROP_HASH
 };
 
 static void
-test_daap_record_set_property (GObject *object,
+test_dmap_av_record_set_property (GObject *object,
                                 guint prop_id,
                                 const GValue *value,
                                 GParamSpec *pspec)
 {
-        TestDAAPRecord *record = TEST_DAAP_RECORD (object);
+        TestDmapAvRecord *record = TEST_DMAP_AV_RECORD (object);
 
         switch (prop_id) {
                 case PROP_LOCATION:
@@ -142,6 +148,18 @@ test_daap_record_set_property (GObject *object,
                 case PROP_HAS_VIDEO:
                         record->priv->has_video = g_value_get_boolean (value);
                         break;
+		case PROP_SONGALBUMID:
+			record->priv->songalbumid = g_value_get_uint64 (value);
+			break;
+		case PROP_MEDIAKIND:
+			record->priv->mediakind = g_value_get_enum (value);
+			break;
+		case PROP_HASH:
+			if (record->priv->hash) {
+				g_array_unref(record->priv->hash);
+			}
+			record->priv->hash = g_array_ref(g_value_get_boxed (value));
+			break;
                 default:
                         G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
                         break;
@@ -149,12 +167,12 @@ test_daap_record_set_property (GObject *object,
 }
 
 static void
-test_daap_record_get_property (GObject *object,
+test_dmap_av_record_get_property (GObject *object,
                                 guint prop_id,
                                 GValue *value,
                                 GParamSpec *pspec)
 {
-        TestDAAPRecord *record = TEST_DAAP_RECORD (object);
+        TestDmapAvRecord *record = TEST_DMAP_AV_RECORD (object);
 
         switch (prop_id) {
                 case PROP_LOCATION:
@@ -211,19 +229,36 @@ test_daap_record_get_property (GObject *object,
                 case PROP_HAS_VIDEO:
                         g_value_set_boolean (value, record->priv->has_video);
                         break;
+		case PROP_SONGALBUMID:
+                        g_value_set_uint64 (value, record->priv->songalbumid);
+			break;
+		case PROP_MEDIAKIND:
+                        g_value_set_enum (value, record->priv->mediakind);
+			break;
+		case PROP_HASH:
+			g_value_set_boxed (value, g_array_ref(record->priv->hash));
+			break;
                 default:
                         G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
                         break;
         }
 }
 
+static gboolean
+_itunes_compat (DmapAvRecord *record)
+{
+	const gchar *format = TEST_DMAP_AV_RECORD (record)->priv->format;
+
+	return ! strcmp (format, "mp3");
+}
+
 static GInputStream *
-test_daap_record_read (DAAPRecord *record, GError **error)
+_read (DmapAvRecord *record, GError **error)
 {
 	GFile *file;
 	GInputStream *stream;
 
-	file = g_file_new_for_uri (TEST_DAAP_RECORD (record)->priv->location);
+	file = g_file_new_for_uri (TEST_DMAP_AV_RECORD (record)->priv->location);
 	stream = G_INPUT_STREAM (g_file_read (file, NULL, error));
 
 	g_object_unref (file);
@@ -231,47 +266,18 @@ test_daap_record_read (DAAPRecord *record, GError **error)
 	return stream;
 }
 
-static void
-test_daap_record_daap_iface_init (gpointer iface,
-                                  G_GNUC_UNUSED gpointer data)
-{
-	DAAPRecordIface *daap_record = iface;
-
-	g_assert (G_TYPE_FROM_INTERFACE (daap_record) == DAAP_TYPE_RECORD);
-
-	daap_record->read = test_daap_record_read;
-}
-
-static void
-test_daap_record_dmap_iface_init (gpointer iface,
-                                  G_GNUC_UNUSED gpointer data)
-{
-	DMAPRecordIface *dmap_record = iface;
-
-	g_assert (G_TYPE_FROM_INTERFACE (dmap_record) == DMAP_TYPE_RECORD);
-}
-
-G_DEFINE_TYPE_WITH_CODE (TestDAAPRecord, test_daap_record, G_TYPE_OBJECT, 
-                         G_IMPLEMENT_INTERFACE (DAAP_TYPE_RECORD, test_daap_record_daap_iface_init)
-                         G_IMPLEMENT_INTERFACE (DMAP_TYPE_RECORD, test_daap_record_dmap_iface_init)
-                         G_ADD_PRIVATE (TestDAAPRecord))
+static void test_dmap_av_record_dispose  (GObject *object);
+static void test_dmap_av_record_finalize (GObject *object);
 
 static void
-test_daap_record_init (TestDAAPRecord *record)
-{
-	record->priv = test_daap_record_get_instance_private (record);
-}
-
-static void test_daap_record_finalize (GObject *object);
-
-static void
-test_daap_record_class_init (TestDAAPRecordClass *klass)
+test_dmap_av_record_class_init (TestDmapAvRecordClass *klass)
 {
 	GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
 
-	gobject_class->set_property = test_daap_record_set_property;
-        gobject_class->get_property = test_daap_record_get_property;
-        gobject_class->finalize     = test_daap_record_finalize;
+	gobject_class->set_property = test_dmap_av_record_set_property;
+        gobject_class->get_property = test_dmap_av_record_get_property;
+        gobject_class->dispose      = test_dmap_av_record_dispose;
+        gobject_class->finalize     = test_dmap_av_record_finalize;
 
         g_object_class_override_property (gobject_class, PROP_LOCATION, "location");
         g_object_class_override_property (gobject_class, PROP_TITLE, "title");
@@ -291,6 +297,9 @@ test_daap_record_class_init (TestDAAPRecordClass *klass)
         g_object_class_override_property (gobject_class, PROP_DISC, "disc");
         g_object_class_override_property (gobject_class, PROP_BITRATE, "bitrate");
         g_object_class_override_property (gobject_class, PROP_HAS_VIDEO, "has-video");
+        g_object_class_override_property (gobject_class, PROP_SONGALBUMID, "songalbumid");
+        g_object_class_override_property (gobject_class, PROP_MEDIAKIND, "mediakind");
+        g_object_class_override_property (gobject_class, PROP_HASH, "hash");
 
         g_object_class_install_property (gobject_class, PROP_REAL_FORMAT,
                                 g_param_spec_string ("real-format",
@@ -301,46 +310,87 @@ test_daap_record_class_init (TestDAAPRecordClass *klass)
 }
 
 static void
-test_daap_record_finalize (GObject *object)
+_dmap_av_record_iface_init (gpointer iface)
+{
+	DmapAvRecordInterface *dmap_av_record = iface;
+
+	g_assert (G_TYPE_FROM_INTERFACE (dmap_av_record) == DMAP_TYPE_AV_RECORD);
+
+	dmap_av_record->itunes_compat = _itunes_compat;
+	dmap_av_record->read = _read;
+}
+
+static void
+_dmap_record_iface_init (gpointer iface)
+{
+	DmapRecordInterface *dmap_record = iface;
+
+	g_assert (G_TYPE_FROM_INTERFACE (dmap_record) == DMAP_TYPE_RECORD);
+}
+
+G_DEFINE_TYPE_WITH_CODE (TestDmapAvRecord, test_dmap_av_record, G_TYPE_OBJECT, 
+                         G_IMPLEMENT_INTERFACE (DMAP_TYPE_AV_RECORD, _dmap_av_record_iface_init)
+                         G_IMPLEMENT_INTERFACE (DMAP_TYPE_RECORD, _dmap_record_iface_init)
+                         G_ADD_PRIVATE (TestDmapAvRecord))
+
+static void
+test_dmap_av_record_init (TestDmapAvRecord *record)
+{
+	record->priv = test_dmap_av_record_get_instance_private(record);
+}
+
+static void
+test_dmap_av_record_dispose (GObject *object)
+{
+	TestDmapAvRecord *record = TEST_DMAP_AV_RECORD (object);
+
+	if (record->priv->hash) {
+		g_array_unref(record->priv->hash);
+	}
+	record->priv->hash = NULL;
+
+	G_OBJECT_CLASS (test_dmap_av_record_parent_class)->dispose (object);
+}
+
+static void
+test_dmap_av_record_finalize (GObject *object)
 {
-	TestDAAPRecord *record = TEST_DAAP_RECORD (object);
+	TestDmapAvRecord *record = TEST_DMAP_AV_RECORD (object);
 
 	g_free (record->priv->location);
 	g_free (record->priv->title);
 	g_free (record->priv->format);
+	g_free (record->priv->real_format);
 	g_free (record->priv->album);
+	g_free (record->priv->sort_album);
 	g_free (record->priv->artist);
+	g_free (record->priv->sort_artist);
 	g_free (record->priv->genre);
 
-	G_OBJECT_CLASS (test_daap_record_parent_class)->finalize (object);
+	G_OBJECT_CLASS (test_dmap_av_record_parent_class)->finalize (object);
 }
 
 
-TestDAAPRecord *test_daap_record_new (void)
+TestDmapAvRecord *test_dmap_av_record_new (void)
 {
 	gchar *ext, *dir;
-	TestDAAPRecord *record;
+	TestDmapAvRecord *record;
 
-	record = TEST_DAAP_RECORD (g_object_new (TYPE_TEST_DAAP_RECORD, NULL));
+	record = TEST_DMAP_AV_RECORD (g_object_new (TYPE_TEST_DMAP_AV_RECORD, NULL));
 
 	dir = g_get_current_dir ();
 	record->priv->location = g_strdup_printf ("file://%s/media/test.mp3", dir);
 	g_free (dir);
 
 	record->priv->title = g_strdup ("Unknown");
-
 	record->priv->album = g_strdup ("Unknown");
-
+	record->priv->sort_album = g_strdup ("Unknown");
 	record->priv->artist = g_strdup ("Unknown");
-
+	record->priv->sort_artist = g_strdup ("Unknown");
 	record->priv->bitrate = 128;
-
 	record->priv->firstseen = 1;
-
 	record->priv->mtime = 1;
-
 	record->priv->disc = 1;
-
 	record->priv->genre = g_strdup ("Unknown");
 
 	ext = strrchr (record->priv->location, '.');
@@ -350,6 +400,7 @@ TestDAAPRecord *test_daap_record_new (void)
 		ext++;
 	}
 	record->priv->format = g_strdup (ext);
+	record->priv->real_format = g_strdup (ext);
 
 	record->priv->filesize = 33729;
 
@@ -360,6 +411,9 @@ TestDAAPRecord *test_daap_record_new (void)
 	record->priv->year = 2008;
 
 	record->priv->has_video = 0;
+	record->priv->songalbumid = 0;
+	record->priv->mediakind = DMAP_MEDIA_KIND_MUSIC;
+	record->priv->hash = NULL;
 
 	return record;
 }
diff --git a/libdmapsharing/test-dmap-av-record.h b/libdmapsharing/test-dmap-av-record.h
new file mode 100644
index 0000000..a12cc22
--- /dev/null
+++ b/libdmapsharing/test-dmap-av-record.h
@@ -0,0 +1,61 @@
+/*
+ * Database record class for DAAP sharing
+ *
+ * Copyright (C) 2008 W. Michael Petullo <mike@flyn.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#ifndef _TEST_DMAP_AV_RECORD_H
+#define _TEST_DMAP_AV_RECORD_H
+
+#include <libdmapsharing/dmap.h>
+
+G_BEGIN_DECLS
+
+#define TYPE_TEST_DMAP_AV_RECORD         (test_dmap_av_record_get_type ())
+#define TEST_DMAP_AV_RECORD(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), \
+				       TYPE_TEST_DMAP_AV_RECORD, TestDmapAvRecord))
+#define TEST_DMAP_AV_RECORD_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), \
+			               TYPE_TEST_DMAP_AV_RECORD, \
+				       TestDmapAvRecordClass))
+#define IS_TEST_DMAP_AV_RECORD(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
+				       TYPE_TEST_DMAP_AV_RECORD))
+#define IS_TEST_DMAP_AV_RECORD_CLASS (k) (G_TYPE_CHECK_CLASS_TYPE ((k), \
+				       TYPE_TEST_DMAP_AV_RECORD_CLASS))
+#define TEST_DMAP_AV_RECORD_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
+				       TYPE_TEST_DMAP_AV_RECORD, \
+				       TestDmapAvRecordClass))
+
+typedef struct TestDmapAvRecordPrivate TestDmapAvRecordPrivate;
+
+typedef struct {
+	GObject parent;
+	TestDmapAvRecordPrivate *priv;
+} TestDmapAvRecord;
+
+typedef struct {
+	GObjectClass parent;
+} TestDmapAvRecordClass;
+
+GType test_dmap_av_record_get_type (void);
+
+TestDmapAvRecord *test_dmap_av_record_new           (void);
+
+GInputStream   *test_dmap_av_record_read          (DmapAvRecord *record, GError **err);
+
+G_END_DECLS
+
+#endif
diff --git a/tests/test-dmap-container-db.c b/libdmapsharing/test-dmap-container-db.c
similarity index 64%
rename from tests/test-dmap-container-db.c
rename to libdmapsharing/test-dmap-container-db.c
index e65279d..3ecd658 100644
--- a/tests/test-dmap-container-db.c
+++ b/libdmapsharing/test-dmap-container-db.c
@@ -20,49 +20,50 @@
 
 #include "test-dmap-container-db.h"
 
-/* This test implementation of the DMAPContainerDb interface allows for one
+/* This test implementation of the DmapContainerDb interface allows for one
  * record.  Normally, one would befine some data structure to contain
  * multiple records.
  */
-static DMAPContainerRecord *record = NULL;
+static DmapContainerRecord *_record = NULL;
 
-static DMAPContainerRecord *
-test_dmap_container_db_lookup_by_id (DMAPContainerDb *db, guint id)
+static DmapContainerRecord *
+test_dmap_container_db_lookup_by_id (G_GNUC_UNUSED DmapContainerDb *db,
+                                     G_GNUC_UNUSED guint id)
 {
 	/* In reality, lookup the proper record and return it. */
-	return g_object_ref (record);
+	return g_object_ref (_record);
 }
 
 static void
-test_dmap_container_db_foreach (DMAPContainerDb *db,
-				GHFunc func,
+test_dmap_container_db_foreach (G_GNUC_UNUSED DmapContainerDb *db,
+				DmapIdContainerRecordFunc func,
 				gpointer data)
 {
 	/* In reality, pull each record from the db and execute func on it. */
-        func (GUINT_TO_POINTER (1), record, data);
+        func (1, _record, data);
 }
 
 static gint64
-test_dmap_container_db_count (DMAPContainerDb *db)
+test_dmap_container_db_count (G_GNUC_UNUSED DmapContainerDb *db)
 {
 	/* In reality, return the record count. */
 	return 1;
 }
 
 static void
-test_dmap_container_db_init (TestDMAPContainerDb *db)
+test_dmap_container_db_init (G_GNUC_UNUSED TestDmapContainerDb *db)
 {
 }
 
 static void
-test_dmap_container_db_class_init (TestDMAPContainerDbClass *klass)
+test_dmap_container_db_class_init (G_GNUC_UNUSED TestDmapContainerDbClass *klass)
 {
 }
 
 static void
-test_dmap_container_db_interface_init (gpointer iface, gpointer data)
+_dmap_container_db_iface_init (gpointer iface)
 {
-	DMAPContainerDbIface *dmap_container_db = iface;
+	DmapContainerDbInterface *dmap_container_db = iface;
 
 	g_assert (G_TYPE_FROM_INTERFACE (dmap_container_db) == DMAP_TYPE_CONTAINER_DB);
 
@@ -71,18 +72,18 @@ test_dmap_container_db_interface_init (gpointer iface, gpointer data)
 	dmap_container_db->count = test_dmap_container_db_count;
 }
 
-G_DEFINE_TYPE_WITH_CODE (TestDMAPContainerDb, test_dmap_container_db, G_TYPE_OBJECT, 
+G_DEFINE_TYPE_WITH_CODE (TestDmapContainerDb, test_dmap_container_db, G_TYPE_OBJECT, 
 			 G_IMPLEMENT_INTERFACE (DMAP_TYPE_CONTAINER_DB,
-						test_dmap_container_db_interface_init))
+						_dmap_container_db_iface_init))
 
-TestDMAPContainerDb *
-test_dmap_container_db_new (DMAPContainerRecord *r)
+TestDmapContainerDb *
+test_dmap_container_db_new (DmapContainerRecord *r)
 {
-	TestDMAPContainerDb *db;
+	TestDmapContainerDb *db;
 
 	db = TEST_DMAP_CONTAINER_DB (g_object_new (TYPE_TEST_DMAP_CONTAINER_DB, NULL));
 
-	record = r;
+	_record = r;
 
 	return db;
 }
diff --git a/tests/test-dmap-container-db.h b/libdmapsharing/test-dmap-container-db.h
similarity index 76%
rename from tests/test-dmap-container-db.h
rename to libdmapsharing/test-dmap-container-db.h
index 6e9b275..82bfba1 100644
--- a/tests/test-dmap-container-db.h
+++ b/libdmapsharing/test-dmap-container-db.h
@@ -18,8 +18,8 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef __TEST_DMAP_CONTAINER_DB
-#define __TEST_DMAP_CONTAINER_DB
+#ifndef _TEST_DMAP_CONTAINER_DB_H
+#define _TEST_DMAP_CONTAINER_DB_H
 
 #include <libdmapsharing/dmap.h>
 
@@ -27,30 +27,30 @@ G_BEGIN_DECLS
 
 #define TYPE_TEST_DMAP_CONTAINER_DB         (test_dmap_container_db_get_type ())
 #define TEST_DMAP_CONTAINER_DB(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), \
-				   TYPE_TEST_DMAP_CONTAINER_DB, TestDMAPContainerDb))
+				   TYPE_TEST_DMAP_CONTAINER_DB, TestDmapContainerDb))
 #define TEST_DMAP_CONTAINER_DB_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), \
-				   TYPE_TEST_DMAP_CONTAINER_DB, TestDMAPContainerDbClass))
+				   TYPE_TEST_DMAP_CONTAINER_DB, TestDmapContainerDbClass))
 #define IS_TEST_DMAP_CONTAINER_DB(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
 				   TYPE_TEST_DMAP_CONTAINER_DB))
 #define IS_TEST_DMAP_CONTAINER_DB_CLASS (k) (G_TYPE_CHECK_CLASS_TYPE ((k), \
 				   TYPE_TEST_DMAP_CONTAINER_DB_CLASS))
 #define TEST_DMAP_CONTAINER_DB_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
-				   TYPE_TEST_DMAP_CONTAINER_DB, TestDMAPContainerDbClass))
+				   TYPE_TEST_DMAP_CONTAINER_DB, TestDmapContainerDbClass))
 
-typedef struct TestDMAPContainerDbPrivate TestDMAPContainerDbPrivate;
+typedef struct TestDmapContainerDbPrivate TestDmapContainerDbPrivate;
 
 typedef struct {
 	GObject parent;
-} TestDMAPContainerDb;
+} TestDmapContainerDb;
 
 typedef struct {
 	GObjectClass parent;
-} TestDMAPContainerDbClass;
+} TestDmapContainerDbClass;
 
-TestDMAPContainerDb *test_dmap_container_db_new             (DMAPContainerRecord *record);
+TestDmapContainerDb *test_dmap_container_db_new             (DmapContainerRecord *record);
 
 GType       test_dmap_container_db_get_type        (void);
 
-#endif /* __TEST_DMAP_CONTAINER_DB */
-
 G_END_DECLS
+
+#endif
diff --git a/tests/test-dmap-container-record.c b/libdmapsharing/test-dmap-container-record.c
similarity index 66%
rename from tests/test-dmap-container-record.c
rename to libdmapsharing/test-dmap-container-record.c
index ab49422..1c1e259 100644
--- a/tests/test-dmap-container-record.c
+++ b/libdmapsharing/test-dmap-container-record.c
@@ -25,12 +25,12 @@ enum {
 	PROP_NAME
 };
 
-static DMAPDb *entries = NULL;
+static DmapDb *_entries = NULL;
 
 static void
 test_dmap_container_record_set_property (GObject *object,
                                          guint prop_id,
-                                         const GValue *value,
+                                         G_GNUC_UNUSED const GValue *value,
                                          GParamSpec *pspec)
 {
         switch (prop_id) {
@@ -60,39 +60,40 @@ test_dmap_container_record_get_property (GObject *object,
 }
 
 
-guint
-test_dmap_container_record_get_id (DMAPContainerRecord *record)
+static guint
+_get_id (G_GNUC_UNUSED DmapContainerRecord *record)
 {
 	return 2;
 }
 
-void
-test_dmap_container_record_add_entry (DMAPContainerRecord *container_record,
-				      DMAPRecord *record,
-				      gint id)
+static void
+_add_entry (G_GNUC_UNUSED DmapContainerRecord *container_record,
+            G_GNUC_UNUSED DmapRecord *record,
+            G_GNUC_UNUSED gint id,
+            G_GNUC_UNUSED GError **error)
 {
 }
 
-guint64 
-test_dmap_container_record_get_entry_count (DMAPContainerRecord *record)
+static guint64
+_get_entry_count (G_GNUC_UNUSED DmapContainerRecord *record)
 {
         return 1;
 }
 
-DMAPDb *
-test_dmap_container_record_get_entries (DMAPContainerRecord *record)
+static DmapDb *
+_get_entries (G_GNUC_UNUSED DmapContainerRecord *record)
 {
-	return g_object_ref (entries);
+	return g_object_ref (_entries);
 }
 
 static void
-test_dmap_container_record_init (TestDMAPContainerRecord *record)
+test_dmap_container_record_init (G_GNUC_UNUSED TestDmapContainerRecord *record)
 {
-	entries = DMAP_DB (test_dmap_db_new ());
+	_entries = DMAP_DB (test_dmap_db_new ());
 }
 
 static void
-test_dmap_container_record_class_init (TestDMAPContainerRecordClass *klass)
+test_dmap_container_record_class_init (TestDmapContainerRecordClass *klass)
 {
 	GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
 
@@ -103,25 +104,25 @@ test_dmap_container_record_class_init (TestDMAPContainerRecordClass *klass)
 }
 
 static void
-test_dmap_container_record_interface_init (gpointer iface, gpointer data)
+_dmap_container_record_iface_init (gpointer iface)
 {
-	DMAPContainerRecordIface *dmap_container_record = iface;
+	DmapContainerRecordInterface *dmap_container_record = iface;
 
 	g_assert (G_TYPE_FROM_INTERFACE (dmap_container_record) == DMAP_TYPE_CONTAINER_RECORD);
 
-	dmap_container_record->get_id = test_dmap_container_record_get_id;
-	dmap_container_record->add_entry = test_dmap_container_record_add_entry;
-	dmap_container_record->get_entry_count = test_dmap_container_record_get_entry_count;
-	dmap_container_record->get_entries = test_dmap_container_record_get_entries;
+	dmap_container_record->get_id = _get_id;
+	dmap_container_record->add_entry = _add_entry;
+	dmap_container_record->get_entry_count = _get_entry_count;
+	dmap_container_record->get_entries = _get_entries;
 }
 
-G_DEFINE_TYPE_WITH_CODE (TestDMAPContainerRecord, test_dmap_container_record, G_TYPE_OBJECT, 
+G_DEFINE_TYPE_WITH_CODE (TestDmapContainerRecord, test_dmap_container_record, G_TYPE_OBJECT, 
 			G_IMPLEMENT_INTERFACE (DMAP_TYPE_CONTAINER_RECORD,
-					       test_dmap_container_record_interface_init))
+					       _dmap_container_record_iface_init))
 
-TestDMAPContainerRecord *test_dmap_container_record_new (void)
+TestDmapContainerRecord *test_dmap_container_record_new (void)
 {
-	TestDMAPContainerRecord *record;
+	TestDmapContainerRecord *record;
 
 	record = TEST_DMAP_CONTAINER_RECORD (g_object_new (TYPE_TEST_DMAP_CONTAINER_RECORD, NULL));
 
diff --git a/tests/test-dmap-container-record.h b/libdmapsharing/test-dmap-container-record.h
similarity index 76%
rename from tests/test-dmap-container-record.h
rename to libdmapsharing/test-dmap-container-record.h
index 85c5abc..7f2cbb9 100644
--- a/tests/test-dmap-container-record.h
+++ b/libdmapsharing/test-dmap-container-record.h
@@ -18,45 +18,44 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef __TEST_DMAP_CONTAINER_RECORD
-#define __TEST_DMAP_CONTAINER_RECORD
+#ifndef _TEST_DMAP_CONTAINER_RECORD_H
+#define _TEST_DMAP_CONTAINER_RECORD_H
 
 #include <libdmapsharing/dmap.h>
-
-#include "test-dmap-db.h"
+#include <libdmapsharing/test-dmap-db.h>
 
 G_BEGIN_DECLS
 
 #define TYPE_TEST_DMAP_CONTAINER_RECORD         (test_dmap_container_record_get_type ())
 #define TEST_DMAP_CONTAINER_RECORD(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), \
-				       TYPE_TEST_DMAP_CONTAINER_RECORD, TestDMAPContainerRecord))
+				       TYPE_TEST_DMAP_CONTAINER_RECORD, TestDmapContainerRecord))
 #define TEST_DMAP_CONTAINER_RECORD_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), \
 			               TYPE_TEST_DMAP_CONTAINER_RECORD, \
-				       TestDMAPContainerRecordClass))
+				       TestDmapContainerRecordClass))
 #define IS_TEST_DMAP_CONTAINER_RECORD(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
 				       TYPE_TEST_DMAP_CONTAINER_RECORD))
 #define IS_TEST_DMAP_CONTAINER_RECORD_CLASS (k) (G_TYPE_CHECK_CLASS_TYPE ((k), \
 				       TYPE_TEST_DMAP_CONTAINER_RECORD_CLASS))
 #define TEST_DMAP_CONTAINER_RECORD_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
 				       TYPE_TEST_DMAP_CONTAINER_RECORD, \
-				       TestDMAPContainerRecordClass))
+				       TestDmapContainerRecordClass))
 
-typedef struct TestDMAPContainerRecordPrivate TestDMAPContainerRecordPrivate;
+typedef struct TestDmapContainerRecordPrivate TestDmapContainerRecordPrivate;
 
 typedef struct {
 	GObject parent;
-} TestDMAPContainerRecord;
+} TestDmapContainerRecord;
 
 typedef struct {
 	GObjectClass parent;
-} TestDMAPContainerRecordClass;
+} TestDmapContainerRecordClass;
 
 GType test_dmap_container_record_get_type (void);
 
-TestDMAPContainerRecord *test_dmap_container_record_new           (void);
-
-guint            test_dmap_container_record_get_id        (DMAPContainerRecord *record);
+TestDmapContainerRecord *test_dmap_container_record_new           (void);
 
-#endif /* __TEST_DMAP_CONTAINER_RECORD */
+guint            test_dmap_container_record_get_id        (DmapContainerRecord *record);
 
 G_END_DECLS
+
+#endif
diff --git a/tests/test-dmap-db.c b/libdmapsharing/test-dmap-db.c
similarity index 52%
rename from tests/test-dmap-db.c
rename to libdmapsharing/test-dmap-db.c
index 6e63894..f181da5 100644
--- a/tests/test-dmap-db.c
+++ b/libdmapsharing/test-dmap-db.c
@@ -22,36 +22,49 @@
 
 #include "test-dmap-db.h"
 
-struct TestDMAPDbPrivate {
+struct TestDmapDbPrivate {
 	GHashTable *db;
 	guint nextid;
 };
 
-static DMAPRecord *
-test_dmap_db_lookup_by_id (const DMAPDb *db, guint id)
+static DmapRecord *
+test_dmap_db_lookup_by_id (const DmapDb *db, guint id)
 {
-	DMAPRecord *record;
+	DmapRecord *record;
 	record = g_hash_table_lookup (TEST_DMAP_DB (db)->priv->db, GUINT_TO_POINTER (id));
-	g_object_ref (record);
-	return record;
+	return g_object_ref(record);
+}
+
+struct package {
+	DmapIdRecordFunc func;
+	gpointer data;
+};
+
+static void
+_adapter(gpointer id, DmapRecord *record, gpointer user_data)
+{
+	struct package *p = user_data;
+	return p->func(GPOINTER_TO_UINT(id), record, p->data);
 }
 
 static void
-test_dmap_db_foreach	     (const DMAPDb *db,
-			      GHFunc func,
-			      gpointer data)
+test_dmap_db_foreach(const DmapDb *db,
+                     DmapIdRecordFunc func,
+                     gpointer data)
 {
-	g_hash_table_foreach (TEST_DMAP_DB (db)->priv->db, (GHFunc) func, data);
+	g_hash_table_foreach (TEST_DMAP_DB (db)->priv->db,
+                             (GHFunc) _adapter,
+	                      &(struct package) { func, data });
 }
 
 static gint64
-test_dmap_db_count (const DMAPDb *db)
+test_dmap_db_count (const DmapDb *db)
 {
 	return g_hash_table_size (TEST_DMAP_DB (db)->priv->db);
 }
 
 static guint
-test_dmap_db_add (DMAPDb *db, DMAPRecord *record)
+test_dmap_db_add (DmapDb *db, DmapRecord *record, G_GNUC_UNUSED GError **error)
 {
         guint id;
 	id = TEST_DMAP_DB (db)->priv->nextid--;
@@ -61,10 +74,29 @@ test_dmap_db_add (DMAPDb *db, DMAPRecord *record)
 }
 
 static void
-test_dmap_db_init (TestDMAPDb *db)
+_dmap_db_iface_init (gpointer iface)
+{
+	DmapDbInterface *dmap_db = iface;
+
+	g_assert (G_TYPE_FROM_INTERFACE (dmap_db) == DMAP_TYPE_DB);
+
+	dmap_db->add = test_dmap_db_add;
+	dmap_db->lookup_by_id = test_dmap_db_lookup_by_id;
+	dmap_db->foreach = test_dmap_db_foreach;
+	dmap_db->count = test_dmap_db_count;
+}
+
+G_DEFINE_TYPE_WITH_CODE (TestDmapDb, test_dmap_db, G_TYPE_OBJECT, 
+                         G_IMPLEMENT_INTERFACE (DMAP_TYPE_DB,
+                                                _dmap_db_iface_init)
+                         G_ADD_PRIVATE (TestDmapDb))
+
+static void
+test_dmap_db_init (TestDmapDb *db)
 {
-	db->priv = TEST_DMAP_DB_GET_PRIVATE (db);
-	db->priv->db = g_hash_table_new (g_direct_hash, g_direct_equal);
+	db->priv = test_dmap_db_get_instance_private(db);
+
+	db->priv->db = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, g_object_unref);
 
 	/* Media ID's start at max and go down.
 	 * Container ID's start at 1 and go up.
@@ -73,32 +105,26 @@ test_dmap_db_init (TestDMAPDb *db)
 }
 
 static void
-test_dmap_db_class_init (TestDMAPDbClass *klass)
+_finalize(GObject *object)
 {
-	g_type_class_add_private (klass, sizeof (TestDMAPDbPrivate));
+	TestDmapDb *db = TEST_DMAP_DB(object);
+	g_hash_table_destroy(db->priv->db);
+
+	G_OBJECT_CLASS (test_dmap_db_parent_class)->finalize (object);
 }
 
 static void
-test_dmap_db_interface_init (gpointer iface, gpointer data)
+test_dmap_db_class_init (TestDmapDbClass *klass)
 {
-	DMAPDbIface *dmap_db = iface;
+	GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
 
-	g_assert (G_TYPE_FROM_INTERFACE (dmap_db) == DMAP_TYPE_DB);
-
-	dmap_db->add = test_dmap_db_add;
-	dmap_db->lookup_by_id = test_dmap_db_lookup_by_id;
-	dmap_db->foreach = test_dmap_db_foreach;
-	dmap_db->count = test_dmap_db_count;
+	gobject_class->finalize = _finalize;
 }
 
-G_DEFINE_TYPE_WITH_CODE (TestDMAPDb, test_dmap_db, G_TYPE_OBJECT, 
-			 G_IMPLEMENT_INTERFACE (DMAP_TYPE_DB,
-					        test_dmap_db_interface_init))
-
-TestDMAPDb *
+TestDmapDb *
 test_dmap_db_new (void)
 {
-	TestDMAPDb *db;
+	TestDmapDb *db;
 
 	db = TEST_DMAP_DB (g_object_new (TYPE_TEST_DMAP_DB, NULL));
 
diff --git a/tests/test-dmap-db.h b/libdmapsharing/test-dmap-db.h
similarity index 75%
rename from tests/test-dmap-db.h
rename to libdmapsharing/test-dmap-db.h
index 5871f47..47caeea 100644
--- a/tests/test-dmap-db.h
+++ b/libdmapsharing/test-dmap-db.h
@@ -18,8 +18,8 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef __TEST_DMAP_DB
-#define __TEST_DMAP_DB
+#ifndef _TEST_DMAP_DB_H
+#define _TEST_DMAP_DB_H
 
 #include <libdmapsharing/dmap.h>
 
@@ -27,33 +27,31 @@ G_BEGIN_DECLS
 
 #define TYPE_TEST_DMAP_DB           (test_dmap_db_get_type ())
 #define TEST_DMAP_DB(o)             (G_TYPE_CHECK_INSTANCE_CAST ((o), \
-				     TYPE_TEST_DMAP_DB, TestDMAPDb))
+				     TYPE_TEST_DMAP_DB, TestDmapDb))
 #define TEST_DMAP_DB_CLASS(k)       (G_TYPE_CHECK_CLASS_CAST((k), \
-				     TYPE_TEST_DMAP_DB, TestDMAPDbClass))
+				     TYPE_TEST_DMAP_DB, TestDmapDbClass))
 #define IS_TEST_DMAP_DB(o)          (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
 				     TYPE_TEST_DMAP_DB))
 #define IS_TEST_DMAP_DB_CLASS (k)   (G_TYPE_CHECK_CLASS_TYPE ((k), \
 				     TYPE_TEST_DMAP_DB_CLASS))
 #define TEST_DMAP_DB_GET_CLASS(o)   (G_TYPE_INSTANCE_GET_CLASS ((o), \
-				     TYPE_TEST_DMAP_DB, TestDMAPDbClass))
-#define TEST_DMAP_DB_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), \
-				     TYPE_TEST_DMAP_DB, \
-				     TestDMAPDbPrivate))
+				     TYPE_TEST_DMAP_DB, TestDmapDbClass))
 
-typedef struct TestDMAPDbPrivate TestDMAPDbPrivate;
+typedef struct TestDmapDbPrivate TestDmapDbPrivate;
 
 typedef struct {
 	GObject parent;
-	TestDMAPDbPrivate *priv;
-} TestDMAPDb;
+	TestDmapDbPrivate *priv;
+} TestDmapDb;
 
 typedef struct {
 	GObjectClass parent;
-} TestDMAPDbClass;
+} TestDmapDbClass;
 
-TestDMAPDb *test_dmap_db_new (void);
+TestDmapDb *test_dmap_db_new (void);
 GType test_dmap_db_get_type (void);
 
-#endif /* __TEST_DMAP_DB */
-
 G_END_DECLS
+
+#endif
+
diff --git a/libdmapsharing/test-dmap-image-record-factory.c b/libdmapsharing/test-dmap-image-record-factory.c
new file mode 100644
index 0000000..6c89f83
--- /dev/null
+++ b/libdmapsharing/test-dmap-image-record-factory.c
@@ -0,0 +1,64 @@
+/*
+ * DmapImageRecord factory class
+ *
+ * Copyright (C) 2008 W. Michael Petullo <mike@flyn.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include "test-dmap-image-record-factory.h"
+#include "test-dmap-image-record.h"
+
+DmapRecord *
+test_dmap_image_record_factory_create(G_GNUC_UNUSED DmapRecordFactory *factory,
+                                      G_GNUC_UNUSED gpointer user_data,
+                                      G_GNUC_UNUSED GError **error)
+{
+	return DMAP_RECORD (test_dmap_image_record_new ());
+}
+
+static void
+test_dmap_image_record_factory_init (G_GNUC_UNUSED TestDmapImageRecordFactory *factory)
+{
+}
+
+static void
+test_dmap_image_record_factory_class_init (G_GNUC_UNUSED TestDmapImageRecordFactoryClass *klass)
+{
+}
+
+static void
+_dmap_record_factory_iface_init (gpointer iface)
+{
+	DmapRecordFactoryInterface *factory = iface;
+
+	g_assert (G_TYPE_FROM_INTERFACE (factory) == DMAP_TYPE_RECORD_FACTORY);
+
+	factory->create = test_dmap_image_record_factory_create;
+}
+
+G_DEFINE_TYPE_WITH_CODE (TestDmapImageRecordFactory, test_dmap_image_record_factory, G_TYPE_OBJECT, 
+			 G_IMPLEMENT_INTERFACE (DMAP_TYPE_RECORD_FACTORY,
+					        _dmap_record_factory_iface_init))
+
+TestDmapImageRecordFactory *
+test_dmap_image_record_factory_new (void)
+{
+	TestDmapImageRecordFactory *factory;
+
+	factory = TEST_DMAP_IMAGE_RECORD_FACTORY (g_object_new (TYPE_TEST_DMAP_IMAGE_RECORD_FACTORY, NULL));
+
+	return factory;
+}
diff --git a/libdmapsharing/test-dmap-image-record-factory.h b/libdmapsharing/test-dmap-image-record-factory.h
new file mode 100644
index 0000000..cf8a5e6
--- /dev/null
+++ b/libdmapsharing/test-dmap-image-record-factory.h
@@ -0,0 +1,60 @@
+/*
+ * TestDmapImageRecord factory class
+ *
+ * Copyright (C) 2008 W. Michael Petullo <mike@flyn.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#ifndef _TEST_DMAP_IMAGE_RECORD_FACTORY_H
+#define _TEST_DMAP_IMAGE_RECORD_FACTORY_H
+
+#include <libdmapsharing/dmap.h>
+
+G_BEGIN_DECLS
+
+#define TYPE_TEST_DMAP_IMAGE_RECORD_FACTORY         (test_dmap_image_record_factory_get_type ())
+#define TEST_DMAP_IMAGE_RECORD_FACTORY(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), \
+				               TYPE_TEST_DMAP_IMAGE_RECORD_FACTORY, TestDmapImageRecordFactory))
+#define TEST_DMAP_IMAGE_RECORD_FACTORY_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), \
+				               TYPE_TEST_DMAP_IMAGE_RECORD_FACTORY, TestDmapImageRecordFactoryClass))
+#define IS_TEST_DMAP_IMAGE_RECORD_FACTORY(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
+				               TYPE_TEST_DMAP_IMAGE_RECORD_FACTORY))
+#define IS_TEST_DMAP_IMAGE_RECORD_FACTORY_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), \
+				               TYPE_TEST_DMAP_IMAGE_RECORD_FACTORY_CLASS))
+#define TEST_DMAP_IMAGE_RECORD_FACTORY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
+				               TYPE_TEST_DMAP_IMAGE_RECORD_FACTORY, TestDmapImageRecordFactoryClass))
+
+typedef struct TestDmapImageRecordFactoryPrivate TestDmapImageRecordFactoryPrivate;
+
+typedef struct {
+	GObject parent;
+} TestDmapImageRecordFactory;
+
+typedef struct {
+	GObjectClass parent;
+} TestDmapImageRecordFactoryClass;
+
+GType                  test_dmap_image_record_factory_get_type(void);
+
+TestDmapImageRecordFactory *test_dmap_image_record_factory_new(void);
+
+DmapRecord            *test_dmap_image_record_factory_create(DmapRecordFactory *factory,
+                                                             gpointer user_data,
+                                                             GError **error);
+
+G_END_DECLS
+
+#endif
diff --git a/libdmapsharing/test-dpap-record.c b/libdmapsharing/test-dmap-image-record.c
similarity index 67%
rename from libdmapsharing/test-dpap-record.c
rename to libdmapsharing/test-dmap-image-record.c
index 70b5ec8..dc7745b 100644
--- a/libdmapsharing/test-dpap-record.c
+++ b/libdmapsharing/test-dmap-image-record.c
@@ -18,21 +18,24 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include "test-dpap-record.h"
+#include <libdmapsharing/dmap-utils.h>
+#include <string.h>
 
-struct TestDPAPRecordPrivate {
+#include "test-dmap-image-record.h"
+
+struct TestDmapImageRecordPrivate {
 	gint largefilesize;
 	gint pixelheight;
 	gint pixelwidth;
 	gint rating;
 	gint creationdate;
 	char *location;
-	char *title;
 	char *aspectratio;
 	char *filename;
 	char *format;
 	char *comments;
-	GByteArray *thumbnail;
+	GArray *thumbnail;
+	GArray *hash;
 };
 
 enum {
@@ -46,16 +49,18 @@ enum {
         PROP_PIXEL_HEIGHT,
         PROP_PIXEL_WIDTH,
         PROP_FORMAT,
+        PROP_THUMBNAIL,
+	PROP_HASH,
         PROP_COMMENTS
 };
 
 static void
-test_dpap_record_set_property (GObject *object,
+test_dmap_image_record_set_property (GObject *object,
                                guint prop_id,
                                const GValue *value,
                                GParamSpec *pspec)
 {
-        TestDPAPRecord *record = TEST_DPAP_RECORD (object);
+        TestDmapImageRecord *record = TEST_DMAP_IMAGE_RECORD (object);
 
         switch (prop_id) {
                 case PROP_LARGE_FILESIZE:
@@ -81,13 +86,26 @@ test_dpap_record_set_property (GObject *object,
                         break;
                 case PROP_PIXEL_HEIGHT:
                         record->priv->pixelheight = g_value_get_int (value);
-                        break;                case PROP_PIXEL_WIDTH:
+                        break;
+		case PROP_PIXEL_WIDTH:
                         record->priv->pixelwidth = g_value_get_int (value);
                         break;
                 case PROP_FORMAT:
 			g_free (record->priv->format);
                         record->priv->format = g_value_dup_string (value);
                         break;
+                case PROP_THUMBNAIL:
+			if (record->priv->thumbnail) {
+				g_array_unref(record->priv->thumbnail);
+			}
+                        record->priv->thumbnail = g_array_ref(g_value_get_boxed (value));
+                        break;
+                case PROP_HASH:
+			if (record->priv->hash) {
+				g_array_unref(record->priv->hash);
+			}
+                        record->priv->hash = g_array_ref(g_value_get_boxed (value));
+                        break;
                 case PROP_COMMENTS:
 			g_free (record->priv->comments);
                         record->priv->comments = g_value_dup_string (value);
@@ -100,12 +118,12 @@ test_dpap_record_set_property (GObject *object,
 }
 
 static void
-test_dpap_record_get_property (GObject *object,
+test_dmap_image_record_get_property (GObject *object,
                                 guint prop_id,
                                 GValue *value,
                                 GParamSpec *pspec)
 {
-        TestDPAPRecord *record = TEST_DPAP_RECORD (object);
+        TestDmapImageRecord *record = TEST_DMAP_IMAGE_RECORD (object);
 
         switch (prop_id) {
                 case PROP_LARGE_FILESIZE:
@@ -135,22 +153,28 @@ test_dpap_record_get_property (GObject *object,
                 case PROP_FORMAT:
                         g_value_set_string (value, record->priv->format);
                         break;
+                case PROP_THUMBNAIL:
+			g_value_set_boxed (value, g_array_ref(record->priv->thumbnail));
+                        break;
+                case PROP_HASH:
+			g_value_set_boxed (value, g_array_ref(record->priv->hash));
+                        break;
                 case PROP_COMMENTS:
                         g_value_set_string (value, record->priv->comments);
                         break;
-                default:                        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+                default:
+			G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
                         break;
 
         }
 }
 
-static GInputStream *
-test_dpap_record_read (DPAPRecord *record, GError **error)
+GInputStream *test_dmap_image_record_read (DmapImageRecord *record, GError **error)
 {
 	GFile *file;
 	GInputStream *stream;
 
-	file = g_file_new_for_uri (TEST_DPAP_RECORD (record)->priv->location);
+	file = g_file_new_for_uri (TEST_DMAP_IMAGE_RECORD (record)->priv->location);
 	stream = G_INPUT_STREAM (g_file_read (file, NULL, error));
 
 	g_object_unref (file);
@@ -158,91 +182,98 @@ test_dpap_record_read (DPAPRecord *record, GError **error)
 	return stream;
 }
 
+static void test_dmap_image_record_finalize (GObject *object);
+
 static void
-test_dpap_record_dpap_iface_init (gpointer iface, G_GNUC_UNUSED gpointer data)
+test_dmap_image_record_class_init (TestDmapImageRecordClass *klass)
 {
-	DPAPRecordIface *dpap_record = iface;
+	GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
 
-	g_assert (G_TYPE_FROM_INTERFACE (dpap_record) == DPAP_TYPE_RECORD);
+	gobject_class->set_property = test_dmap_image_record_set_property;
+        gobject_class->get_property = test_dmap_image_record_get_property;
+        gobject_class->finalize     = test_dmap_image_record_finalize;
 
-	dpap_record->read = test_dpap_record_read;
+        g_object_class_override_property (gobject_class, PROP_LARGE_FILESIZE, "large-filesize");
+        g_object_class_override_property (gobject_class, PROP_CREATION_DATE, "creation-date");
+        g_object_class_override_property (gobject_class, PROP_RATING, "rating");
+        g_object_class_override_property (gobject_class, PROP_LOCATION, "location");
+        g_object_class_override_property (gobject_class, PROP_FILENAME, "filename");
+        g_object_class_override_property (gobject_class, PROP_ASPECT_RATIO, "aspect-ratio");
+        g_object_class_override_property (gobject_class, PROP_PIXEL_HEIGHT, "pixel-height");
+        g_object_class_override_property (gobject_class, PROP_PIXEL_WIDTH, "pixel-width");
+        g_object_class_override_property (gobject_class, PROP_FORMAT, "format");
+        g_object_class_override_property (gobject_class, PROP_THUMBNAIL, "thumbnail");
+        g_object_class_override_property (gobject_class, PROP_HASH, "hash");
+        g_object_class_override_property (gobject_class, PROP_COMMENTS, "comments");
 }
 
 static void
-test_dpap_record_dmap_iface_init (gpointer iface, G_GNUC_UNUSED gpointer data)
+_dmap_image_record_iface_init (gpointer iface)
 {
-        DMAPRecordIface *dmap_record = iface;
+	DmapImageRecordInterface *dmap_image_record = iface;
 
-	g_assert (G_TYPE_FROM_INTERFACE (dmap_record) == DMAP_TYPE_RECORD);
-}
+	g_assert (G_TYPE_FROM_INTERFACE (dmap_image_record) == DMAP_TYPE_IMAGE_RECORD);
 
-G_DEFINE_TYPE_WITH_CODE (TestDPAPRecord, test_dpap_record, G_TYPE_OBJECT, 
-                         G_IMPLEMENT_INTERFACE (DPAP_TYPE_RECORD, test_dpap_record_dpap_iface_init)
-                         G_IMPLEMENT_INTERFACE (DMAP_TYPE_RECORD, test_dpap_record_dmap_iface_init)
-                         G_ADD_PRIVATE (TestDPAPRecord))
+	dmap_image_record->read = test_dmap_image_record_read;
+}
 
 static void
-test_dpap_record_init (TestDPAPRecord *record)
+_dmap_record_iface_init (gpointer iface)
 {
-	record->priv = test_dpap_record_get_instance_private (record);
+        DmapRecordInterface *dmap_record = iface;
+
+	g_assert (G_TYPE_FROM_INTERFACE (dmap_record) == DMAP_TYPE_RECORD);
 }
 
-static void test_dpap_record_finalize (GObject *object);
+G_DEFINE_TYPE_WITH_CODE (TestDmapImageRecord, test_dmap_image_record, G_TYPE_OBJECT, 
+                         G_IMPLEMENT_INTERFACE (DMAP_TYPE_IMAGE_RECORD, _dmap_image_record_iface_init)
+                         G_IMPLEMENT_INTERFACE (DMAP_TYPE_RECORD, _dmap_record_iface_init)
+                         G_ADD_PRIVATE (TestDmapImageRecord))
 
 static void
-test_dpap_record_class_init (TestDPAPRecordClass *klass)
+test_dmap_image_record_init (TestDmapImageRecord *record)
 {
-	GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
-
-	gobject_class->set_property = test_dpap_record_set_property;
-        gobject_class->get_property = test_dpap_record_get_property;
-        gobject_class->finalize     = test_dpap_record_finalize;
-
-        g_object_class_override_property (gobject_class, PROP_LARGE_FILESIZE, "large-filesize");
-        g_object_class_override_property (gobject_class, PROP_CREATION_DATE, "creation-date");
-        g_object_class_override_property (gobject_class, PROP_RATING, "rating");
-        g_object_class_override_property (gobject_class, PROP_LOCATION, "location");
-        g_object_class_override_property (gobject_class, PROP_FILENAME, "filename");
-        g_object_class_override_property (gobject_class, PROP_ASPECT_RATIO, "aspect-ratio");
-        g_object_class_override_property (gobject_class, PROP_PIXEL_HEIGHT, "pixel-height");
-        g_object_class_override_property (gobject_class, PROP_PIXEL_WIDTH, "pixel-width");
-        g_object_class_override_property (gobject_class, PROP_FORMAT, "format");
-        g_object_class_override_property (gobject_class, PROP_COMMENTS, "comments");
+	record->priv = test_dmap_image_record_get_instance_private(record);
 }
 
 static void
-test_dpap_record_finalize (GObject *object)
+test_dmap_image_record_finalize (GObject *object)
 {
-	TestDPAPRecord *record = TEST_DPAP_RECORD (object);
+	TestDmapImageRecord *record = TEST_DMAP_IMAGE_RECORD (object);
 
 	g_free (record->priv->location);
-	g_free (record->priv->title);
 	g_free (record->priv->aspectratio);
 	g_free (record->priv->filename);
 	g_free (record->priv->format);
 	g_free (record->priv->comments);
-	g_byte_array_unref (record->priv->thumbnail);
 
-	G_OBJECT_CLASS (test_dpap_record_parent_class)->finalize (object);
+	if (record->priv->thumbnail) {
+		g_array_unref (record->priv->thumbnail);
+	}
+
+	if (record->priv->hash) {
+		g_array_unref (record->priv->hash);
+	}
+
+	G_OBJECT_CLASS (test_dmap_image_record_parent_class)->finalize (object);
 }
 
-TestDPAPRecord *
-test_dpap_record_new (void)
+TestDmapImageRecord *
+test_dmap_image_record_new (void)
 {
 	unsigned char *thumbnail;
 	GError *error;
 	gchar *path;
 	gsize size;
-	TestDPAPRecord *record;
+	TestDmapImageRecord *record;
+	guchar hash[DMAP_HASH_SIZE];
 
-	record = TEST_DPAP_RECORD (g_object_new (TYPE_TEST_DPAP_RECORD, NULL));
+	record = TEST_DMAP_IMAGE_RECORD (g_object_new (TYPE_TEST_DMAP_IMAGE_RECORD, NULL));
 
 	/* Must be a URI. */
 	record->priv->location = g_strdup_printf ("file://%s/media/test.jpeg",
 						  g_get_current_dir ());
 
-	record->priv->title = g_strdup ("Title of Photograph");
-
 	/* Width / Height as a string. */
 	record->priv->aspectratio = g_strdup ("1.333");
 
@@ -269,8 +300,12 @@ test_dpap_record_new (void)
 	path = g_strdup_printf ("%s/media/test.jpeg", g_get_current_dir ());
 	g_file_get_contents (path, (gchar **) &thumbnail, &size, &error);
 	g_free (path);
-	record->priv->thumbnail = g_byte_array_sized_new (size);
-	g_byte_array_append (record->priv->thumbnail, thumbnail, size);
+	record->priv->thumbnail = g_array_sized_new (FALSE, FALSE, 1, size);
+	g_array_append_vals (record->priv->thumbnail, thumbnail, size);
+
+	record->priv->hash = g_array_sized_new (FALSE, FALSE, 1, size);
+	memset(hash, 0xaa, DMAP_HASH_SIZE);
+	g_array_append_vals (record->priv->hash, hash, DMAP_HASH_SIZE);
 
 	return record;
 }
diff --git a/libdmapsharing/test-dmap-image-record.h b/libdmapsharing/test-dmap-image-record.h
new file mode 100644
index 0000000..7a47cd8
--- /dev/null
+++ b/libdmapsharing/test-dmap-image-record.h
@@ -0,0 +1,62 @@
+/*
+ * Database class for DAAP sharing
+ *
+ * Copyright (C) 2008 W. Michael Petullo <mike@flyn.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#ifndef _TEST_DMAP_IMAGE_RECORD_H
+#define _TEST_DMAP_IMAGE_RECORD_H
+
+#include <libdmapsharing/dmap.h>
+
+G_BEGIN_DECLS
+
+#define TYPE_TEST_DMAP_IMAGE_RECORD		(test_dmap_image_record_get_type ())
+#define TEST_DMAP_IMAGE_RECORD(o)		(G_TYPE_CHECK_INSTANCE_CAST ((o), \
+					 TYPE_TEST_DMAP_IMAGE_RECORD, TestDmapImageRecord))
+#define TEST_DMAP_IMAGE_RECORD_CLASS(k)	(G_TYPE_CHECK_CLASS_CAST((k), \
+					 TYPE_TEST_DMAP_IMAGE_RECORD, \
+					 TestDmapImageRecordClass))
+#define IS_TEST_DMAP_IMAGE_RECORD(o)		(G_TYPE_CHECK_INSTANCE_TYPE ((o), \
+					 TYPE_TEST_DMAP_IMAGE_RECORD))
+#define IS_TEST_DMAP_IMAGE_RECORD_CLASS (k)	(G_TYPE_CHECK_CLASS_TYPE ((k), \
+					 TYPE_TEST_DMAP_IMAGE_RECORD_CLASS))
+#define TEST_DMAP_IMAGE_RECORD_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), \
+				         TYPE_TEST_DMAP_IMAGE_RECORD, \
+				         TestDmapImageRecordClass))
+
+typedef struct TestDmapImageRecordPrivate TestDmapImageRecordPrivate;
+
+typedef struct {
+	GObject parent;
+	TestDmapImageRecordPrivate *priv;
+} TestDmapImageRecord;
+
+typedef struct {
+	GObjectClass parent;
+} TestDmapImageRecordClass;
+
+GType           test_dmap_image_record_get_type          (void);
+
+TestDmapImageRecord *test_dmap_image_record_new               (void);
+
+GInputStream   *test_dmap_image_record_read              (DmapImageRecord *record,
+						    GError **err);
+
+G_END_DECLS
+
+#endif
diff --git a/libdmapsharing/test-dpap-record-factory.c b/libdmapsharing/test-dpap-record-factory.c
deleted file mode 100644
index 86cdd77..0000000
--- a/libdmapsharing/test-dpap-record-factory.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * DPAPRecord factory class
- *
- * Copyright (C) 2008 W. Michael Petullo <mike@flyn.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#include "test-dpap-record-factory.h"
-#include "test-dpap-record.h"
-
-static DMAPRecord *
-test_dpap_record_factory_create  (G_GNUC_UNUSED DMAPRecordFactory *factory,
-                                  G_GNUC_UNUSED gpointer user_data)
-{
-	return DMAP_RECORD (test_dpap_record_new ());
-}
-
-static void
-test_dpap_record_factory_init (G_GNUC_UNUSED TestDPAPRecordFactory *factory)
-{
-}
-
-static void
-test_dpap_record_factory_class_init (G_GNUC_UNUSED TestDPAPRecordFactoryClass *klass)
-{
-}
-
-static void
-test_dpap_record_factory_interface_init (gpointer iface,
-                                         G_GNUC_UNUSED gpointer data)
-{
-	DMAPRecordFactoryIface *factory = iface;
-
-	g_assert (G_TYPE_FROM_INTERFACE (factory) == DMAP_TYPE_RECORD_FACTORY);
-
-	factory->create = test_dpap_record_factory_create;
-}
-
-G_DEFINE_TYPE_WITH_CODE (TestDPAPRecordFactory, test_dpap_record_factory, G_TYPE_OBJECT, 
-			 G_IMPLEMENT_INTERFACE (DMAP_TYPE_RECORD_FACTORY,
-					        test_dpap_record_factory_interface_init))
-
-TestDPAPRecordFactory *
-test_dpap_record_factory_new (void)
-{
-	TestDPAPRecordFactory *factory;
-
-	factory = TEST_DPAP_RECORD_FACTORY (g_object_new (TYPE_TEST_DPAP_RECORD_FACTORY, NULL));
-
-	return factory;
-}
diff --git a/libdmapsharing/test-dpap-record-factory.h b/libdmapsharing/test-dpap-record-factory.h
deleted file mode 100644
index eeca4ec..0000000
--- a/libdmapsharing/test-dpap-record-factory.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * TestDPAPRecord factory class
- *
- * Copyright (C) 2008 W. Michael Petullo <mike@flyn.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#ifndef __TEST_DPAP_RECORD_FACTORY
-#define __TEST_DPAP_RECORD_FACTORY
-
-#include <libdmapsharing/dmap.h>
-
-G_BEGIN_DECLS
-
-#define TYPE_TEST_DPAP_RECORD_FACTORY         (test_dpap_record_factory_get_type ())
-#define TEST_DPAP_RECORD_FACTORY(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), \
-				               TYPE_TEST_DPAP_RECORD_FACTORY, TestDPAPRecordFactory))
-#define TEST_DPAP_RECORD_FACTORY_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), \
-				               TYPE_TEST_DPAP_RECORD_FACTORY, TestDPAPRecordFactoryClass))
-#define IS_TEST_DPAP_RECORD_FACTORY(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
-				               TYPE_TEST_DPAP_RECORD_FACTORY))
-#define IS_TEST_DPAP_RECORD_FACTORY_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), \
-				               TYPE_TEST_DPAP_RECORD_FACTORY_CLASS))
-#define TEST_DPAP_RECORD_FACTORY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
-				               TYPE_TEST_DPAP_RECORD_FACTORY, TestDPAPRecordFactoryClass))
-
-typedef struct TestDPAPRecordFactoryPrivate TestDPAPRecordFactoryPrivate;
-
-typedef struct {
-	GObject parent;
-} TestDPAPRecordFactory;
-
-typedef struct {
-	GObjectClass parent;
-} TestDPAPRecordFactoryClass;
-
-GType                  test_dpap_record_factory_get_type (void);
-
-TestDPAPRecordFactory *test_dpap_record_factory_new      (void);
-
-#endif /* __TEST_DPAP_RECORD_FACTORY */
-
-G_END_DECLS
diff --git a/libdmapsharing/test-dpap-record.h b/libdmapsharing/test-dpap-record.h
deleted file mode 100644
index b439cb5..0000000
--- a/libdmapsharing/test-dpap-record.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Database class for DAAP sharing
- *
- * Copyright (C) 2008 W. Michael Petullo <mike@flyn.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#ifndef __TEST_DPAP_RECORD
-#define __TEST_DPAP_RECORD
-
-#include <libdmapsharing/dmap.h>
-
-G_BEGIN_DECLS
-
-#define TYPE_TEST_DPAP_RECORD		(test_dpap_record_get_type ())
-#define TEST_DPAP_RECORD(o)		(G_TYPE_CHECK_INSTANCE_CAST ((o), \
-					 TYPE_TEST_DPAP_RECORD, TestDPAPRecord))
-#define TEST_DPAP_RECORD_CLASS(k)	(G_TYPE_CHECK_CLASS_CAST((k), \
-					 TYPE_TEST_DPAP_RECORD, \
-					 TestDPAPRecordClass))
-#define IS_TEST_DPAP_RECORD(o)		(G_TYPE_CHECK_INSTANCE_TYPE ((o), \
-					 TYPE_TEST_DPAP_RECORD))
-#define IS_TEST_DPAP_RECORD_CLASS (k)	(G_TYPE_CHECK_CLASS_TYPE ((k), \
-					 TYPE_TEST_DPAP_RECORD_CLASS))
-#define TEST_DPAP_RECORD_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), \
-				         TYPE_TEST_DPAP_RECORD, \
-				         TestDPAPRecordClass))
-#define TEST_DPAP_RECORD_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), \
-					 TYPE_TEST_DPAP_RECORD, \
-					 TestDPAPRecordPrivate))
-
-typedef struct TestDPAPRecordPrivate TestDPAPRecordPrivate;
-
-typedef struct {
-	GObject parent;
-	TestDPAPRecordPrivate *priv;
-} TestDPAPRecord;
-
-typedef struct {
-	GObjectClass parent;
-} TestDPAPRecordClass;
-
-GType           test_dpap_record_get_type          (void);
-
-TestDPAPRecord *test_dpap_record_new               (void);
-
-#endif /* __TEST_DPAP_RECORD */
-
-G_END_DECLS
diff --git a/ltmain.sh b/ltmain.sh
index 7f3523d..49fcad1 100644
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -1,12 +1,12 @@
-#! /bin/sh
+#! /usr/bin/env sh
 ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in
-##               by inline-source v2014-01-03.01
+##               by inline-source v2019-02-19.15
 
-# libtool (GNU libtool) 2.4.6
+# libtool (GNU libtool) 2.4.7
 # Provide generalized library-building support services.
 # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
 
-# Copyright (C) 1996-2015 Free Software Foundation, Inc.
+# Copyright (C) 1996-2019, 2021-2022 Free Software Foundation, Inc.
 # This is free software; see the source for copying conditions.  There is NO
 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
@@ -31,8 +31,8 @@
 
 PROGRAM=libtool
 PACKAGE=libtool
-VERSION=2.4.6
-package_revision=2.4.6
+VERSION=2.4.7
+package_revision=2.4.7
 
 
 ## ------ ##
@@ -64,34 +64,25 @@ package_revision=2.4.6
 # libraries, which are installed to $pkgauxdir.
 
 # Set a version string for this script.
-scriptversion=2015-01-20.17; # UTC
+scriptversion=2019-02-19.15; # UTC
 
 # General shell script boiler plate, and helper functions.
 # Written by Gary V. Vaughan, 2004
 
-# Copyright (C) 2004-2015 Free Software Foundation, Inc.
-# This is free software; see the source for copying conditions.  There is NO
-# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-
-# As a special exception to the GNU General Public License, if you distribute
-# this file as part of a program or library that is built using GNU Libtool,
-# you may include this file under the same distribution terms that you use
-# for the rest of that program.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# This is free software.  There is NO warranty; not even for
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+#
+# Copyright (C) 2004-2019, 2021 Bootstrap Authors
+#
+# This file is dual licensed under the terms of the MIT license
+# <https://opensource.org/license/MIT>, and GPL version 2 or later
+# <http://www.gnu.org/licenses/gpl-2.0.html>.  You must apply one of
+# these licenses when using or redistributing this software or any of
+# the files within it.  See the URLs above, or the file `LICENSE`
+# included in the Bootstrap distribution for the full license texts.
 
-# Please report bugs or propose patches to gary@gnu.org.
+# Please report bugs or propose patches to:
+# <https://github.com/gnulib-modules/bootstrap/issues>
 
 
 ## ------ ##
@@ -139,9 +130,12 @@ do
 	  _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\"
 	fi"
 done
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+# These NLS vars are set unconditionally (bootstrap issue #24).  Unset those
+# in case the environment reset is needed later and the $save_* variant is not
+# defined (see the code above).
+LC_ALL=C
+LANGUAGE=C
+export LANGUAGE LC_ALL
 
 # Make sure IFS has a sensible default
 sp=' '
@@ -159,6 +153,26 @@ if test "${PATH_SEPARATOR+set}" != set; then
 fi
 
 
+# func_unset VAR
+# --------------
+# Portably unset VAR.
+# In some shells, an 'unset VAR' statement leaves a non-zero return
+# status if VAR is already unset, which might be problematic if the
+# statement is used at the end of a function (thus poisoning its return
+# value) or when 'set -e' is active (causing even a spurious abort of
+# the script in this case).
+func_unset ()
+{
+    { eval $1=; (eval unset $1) >/dev/null 2>&1 && eval unset $1 || : ; }
+}
+
+
+# Make sure CDPATH doesn't cause `cd` commands to output the target dir.
+func_unset CDPATH
+
+# Make sure ${,E,F}GREP behave sanely.
+func_unset GREP_OPTIONS
+
 
 ## ------------------------- ##
 ## Locate command utilities. ##
@@ -259,7 +273,7 @@ test -z "$SED" && {
     rm -f conftest.in conftest.tmp conftest.nl conftest.out
   }
 
-  func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin
+  func_path_progs "sed gsed" func_check_prog_sed "$PATH:/usr/xpg4/bin"
   rm -f conftest.sed
   SED=$func_path_progs_result
 }
@@ -295,7 +309,7 @@ test -z "$GREP" && {
     rm -f conftest.in conftest.tmp conftest.nl conftest.out
   }
 
-  func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin
+  func_path_progs "grep ggrep" func_check_prog_grep "$PATH:/usr/xpg4/bin"
   GREP=$func_path_progs_result
 }
 
@@ -360,6 +374,35 @@ sed_double_backslash="\
   s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g
   s/\n//g"
 
+# require_check_ifs_backslash
+# ---------------------------
+# Check if we can use backslash as IFS='\' separator, and set
+# $check_ifs_backshlash_broken to ':' or 'false'.
+require_check_ifs_backslash=func_require_check_ifs_backslash
+func_require_check_ifs_backslash ()
+{
+  _G_save_IFS=$IFS
+  IFS='\'
+  _G_check_ifs_backshlash='a\\b'
+  for _G_i in $_G_check_ifs_backshlash
+  do
+  case $_G_i in
+  a)
+    check_ifs_backshlash_broken=false
+    ;;
+  '')
+    break
+    ;;
+  *)
+    check_ifs_backshlash_broken=:
+    break
+    ;;
+  esac
+  done
+  IFS=$_G_save_IFS
+  require_check_ifs_backslash=:
+}
+
 
 ## ----------------- ##
 ## Global variables. ##
@@ -580,16 +623,16 @@ if test yes = "$_G_HAVE_PLUSEQ_OP"; then
   {
     $debug_cmd
 
-    func_quote_for_eval "$2"
-    eval "$1+=\\ \$func_quote_for_eval_result"
+    func_quote_arg pretty "$2"
+    eval "$1+=\\ \$func_quote_arg_result"
   }'
 else
   func_append_quoted ()
   {
     $debug_cmd
 
-    func_quote_for_eval "$2"
-    eval "$1=\$$1\\ \$func_quote_for_eval_result"
+    func_quote_arg pretty "$2"
+    eval "$1=\$$1\\ \$func_quote_arg_result"
   }
 fi
 
@@ -1091,85 +1134,203 @@ func_relative_path ()
 }
 
 
-# func_quote_for_eval ARG...
-# --------------------------
-# Aesthetically quote ARGs to be evaled later.
-# This function returns two values:
-#   i) func_quote_for_eval_result
-#      double-quoted, suitable for a subsequent eval
-#  ii) func_quote_for_eval_unquoted_result
-#      has all characters that are still active within double
-#      quotes backslashified.
-func_quote_for_eval ()
+# func_quote_portable EVAL ARG
+# ----------------------------
+# Internal function to portably implement func_quote_arg.  Note that we still
+# keep attention to performance here so we as much as possible try to avoid
+# calling sed binary (so far O(N) complexity as long as func_append is O(1)).
+func_quote_portable ()
 {
     $debug_cmd
 
-    func_quote_for_eval_unquoted_result=
-    func_quote_for_eval_result=
-    while test 0 -lt $#; do
-      case $1 in
-        *[\\\`\"\$]*)
-	  _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;;
-        *)
-          _G_unquoted_arg=$1 ;;
-      esac
-      if test -n "$func_quote_for_eval_unquoted_result"; then
-	func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg"
-      else
-        func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg"
+    $require_check_ifs_backslash
+
+    func_quote_portable_result=$2
+
+    # one-time-loop (easy break)
+    while true
+    do
+      if $1; then
+        func_quote_portable_result=`$ECHO "$2" | $SED \
+          -e "$sed_double_quote_subst" -e "$sed_double_backslash"`
+        break
       fi
 
-      case $_G_unquoted_arg in
-        # Double-quote args containing shell metacharacters to delay
-        # word splitting, command substitution and variable expansion
-        # for a subsequent eval.
-        # Many Bourne shells cannot handle close brackets correctly
-        # in scan sets, so we specify it separately.
-        *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-          _G_quoted_arg=\"$_G_unquoted_arg\"
+      # Quote for eval.
+      case $func_quote_portable_result in
+        *[\\\`\"\$]*)
+          # Fallback to sed for $func_check_bs_ifs_broken=:, or when the string
+          # contains the shell wildcard characters.
+          case $check_ifs_backshlash_broken$func_quote_portable_result in
+            :*|*[\[\*\?]*)
+              func_quote_portable_result=`$ECHO "$func_quote_portable_result" \
+                  | $SED "$sed_quote_subst"`
+              break
+              ;;
+          esac
+
+          func_quote_portable_old_IFS=$IFS
+          for _G_char in '\' '`' '"' '$'
+          do
+            # STATE($1) PREV($2) SEPARATOR($3)
+            set start "" ""
+            func_quote_portable_result=dummy"$_G_char$func_quote_portable_result$_G_char"dummy
+            IFS=$_G_char
+            for _G_part in $func_quote_portable_result
+            do
+              case $1 in
+              quote)
+                func_append func_quote_portable_result "$3$2"
+                set quote "$_G_part" "\\$_G_char"
+                ;;
+              start)
+                set first "" ""
+                func_quote_portable_result=
+                ;;
+              first)
+                set quote "$_G_part" ""
+                ;;
+              esac
+            done
+          done
+          IFS=$func_quote_portable_old_IFS
           ;;
-        *)
-          _G_quoted_arg=$_G_unquoted_arg
-	  ;;
+        *) ;;
       esac
-
-      if test -n "$func_quote_for_eval_result"; then
-	func_append func_quote_for_eval_result " $_G_quoted_arg"
-      else
-        func_append func_quote_for_eval_result "$_G_quoted_arg"
-      fi
-      shift
+      break
     done
+
+    func_quote_portable_unquoted_result=$func_quote_portable_result
+    case $func_quote_portable_result in
+      # double-quote args containing shell metacharacters to delay
+      # word splitting, command substitution and variable expansion
+      # for a subsequent eval.
+      # many bourne shells cannot handle close brackets correctly
+      # in scan sets, so we specify it separately.
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+        func_quote_portable_result=\"$func_quote_portable_result\"
+        ;;
+    esac
 }
 
 
-# func_quote_for_expand ARG
-# -------------------------
-# Aesthetically quote ARG to be evaled later; same as above,
-# but do not quote variable references.
-func_quote_for_expand ()
-{
-    $debug_cmd
+# func_quotefast_eval ARG
+# -----------------------
+# Quote one ARG (internal).  This is equivalent to 'func_quote_arg eval ARG',
+# but optimized for speed.  Result is stored in $func_quotefast_eval.
+if test xyes = `(x=; printf -v x %q yes; echo x"$x") 2>/dev/null`; then
+  printf -v _GL_test_printf_tilde %q '~'
+  if test '\~' = "$_GL_test_printf_tilde"; then
+    func_quotefast_eval ()
+    {
+      printf -v func_quotefast_eval_result %q "$1"
+    }
+  else
+    # Broken older Bash implementations.  Make those faster too if possible.
+    func_quotefast_eval ()
+    {
+      case $1 in
+        '~'*)
+          func_quote_portable false "$1"
+          func_quotefast_eval_result=$func_quote_portable_result
+          ;;
+        *)
+          printf -v func_quotefast_eval_result %q "$1"
+          ;;
+      esac
+    }
+  fi
+else
+  func_quotefast_eval ()
+  {
+    func_quote_portable false "$1"
+    func_quotefast_eval_result=$func_quote_portable_result
+  }
+fi
 
-    case $1 in
-      *[\\\`\"]*)
-	_G_arg=`$ECHO "$1" | $SED \
-	    -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;;
-      *)
-        _G_arg=$1 ;;
+
+# func_quote_arg MODEs ARG
+# ------------------------
+# Quote one ARG to be evaled later.  MODEs argument may contain zero or more
+# specifiers listed below separated by ',' character.  This function returns two
+# values:
+#   i) func_quote_arg_result
+#      double-quoted (when needed), suitable for a subsequent eval
+#  ii) func_quote_arg_unquoted_result
+#      has all characters that are still active within double
+#      quotes backslashified.  Available only if 'unquoted' is specified.
+#
+# Available modes:
+# ----------------
+# 'eval' (default)
+#       - escape shell special characters
+# 'expand'
+#       - the same as 'eval';  but do not quote variable references
+# 'pretty'
+#       - request aesthetic output, i.e. '"a b"' instead of 'a\ b'.  This might
+#         be used later in func_quote to get output like: 'echo "a b"' instead
+#         of 'echo a\ b'.  This is slower than default on some shells.
+# 'unquoted'
+#       - produce also $func_quote_arg_unquoted_result which does not contain
+#         wrapping double-quotes.
+#
+# Examples for 'func_quote_arg pretty,unquoted string':
+#
+#   string      | *_result              | *_unquoted_result
+#   ------------+-----------------------+-------------------
+#   "           | \"                    | \"
+#   a b         | "a b"                 | a b
+#   "a b"       | "\"a b\""             | \"a b\"
+#   *           | "*"                   | *
+#   z="${x-$y}" | "z=\"\${x-\$y}\""     | z=\"\${x-\$y}\"
+#
+# Examples for 'func_quote_arg pretty,unquoted,expand string':
+#
+#   string        |   *_result          |  *_unquoted_result
+#   --------------+---------------------+--------------------
+#   z="${x-$y}"   | "z=\"${x-$y}\""     | z=\"${x-$y}\"
+func_quote_arg ()
+{
+    _G_quote_expand=false
+    case ,$1, in
+      *,expand,*)
+        _G_quote_expand=:
+        ;;
     esac
 
-    case $_G_arg in
-      # Double-quote args containing shell metacharacters to delay
-      # word splitting and command substitution for a subsequent eval.
-      # Many Bourne shells cannot handle close brackets correctly
-      # in scan sets, so we specify it separately.
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-        _G_arg=\"$_G_arg\"
+    case ,$1, in
+      *,pretty,*|*,expand,*|*,unquoted,*)
+        func_quote_portable $_G_quote_expand "$2"
+        func_quote_arg_result=$func_quote_portable_result
+        func_quote_arg_unquoted_result=$func_quote_portable_unquoted_result
+        ;;
+      *)
+        # Faster quote-for-eval for some shells.
+        func_quotefast_eval "$2"
+        func_quote_arg_result=$func_quotefast_eval_result
         ;;
     esac
+}
 
-    func_quote_for_expand_result=$_G_arg
+
+# func_quote MODEs ARGs...
+# ------------------------
+# Quote all ARGs to be evaled later and join them into single command.  See
+# func_quote_arg's description for more info.
+func_quote ()
+{
+    $debug_cmd
+    _G_func_quote_mode=$1 ; shift
+    func_quote_result=
+    while test 0 -lt $#; do
+      func_quote_arg "$_G_func_quote_mode" "$1"
+      if test -n "$func_quote_result"; then
+        func_append func_quote_result " $func_quote_arg_result"
+      else
+        func_append func_quote_result "$func_quote_arg_result"
+      fi
+      shift
+    done
 }
 
 
@@ -1215,8 +1376,8 @@ func_show_eval ()
     _G_cmd=$1
     _G_fail_exp=${2-':'}
 
-    func_quote_for_expand "$_G_cmd"
-    eval "func_notquiet $func_quote_for_expand_result"
+    func_quote_arg pretty,expand "$_G_cmd"
+    eval "func_notquiet $func_quote_arg_result"
 
     $opt_dry_run || {
       eval "$_G_cmd"
@@ -1241,8 +1402,8 @@ func_show_eval_locale ()
     _G_fail_exp=${2-':'}
 
     $opt_quiet || {
-      func_quote_for_expand "$_G_cmd"
-      eval "func_echo $func_quote_for_expand_result"
+      func_quote_arg expand,pretty "$_G_cmd"
+      eval "func_echo $func_quote_arg_result"
     }
 
     $opt_dry_run || {
@@ -1369,30 +1530,26 @@ func_lt_ver ()
 # End:
 #! /bin/sh
 
-# Set a version string for this script.
-scriptversion=2014-01-07.03; # UTC
-
 # A portable, pluggable option parser for Bourne shell.
 # Written by Gary V. Vaughan, 2010
 
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
-# This is free software; see the source for copying conditions.  There is NO
-# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
+# This is free software.  There is NO warranty; not even for
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+#
+# Copyright (C) 2010-2019, 2021 Bootstrap Authors
+#
+# This file is dual licensed under the terms of the MIT license
+# <https://opensource.org/license/MIT>, and GPL version 2 or later
+# <http://www.gnu.org/licenses/gpl-2.0.html>.  You must apply one of
+# these licenses when using or redistributing this software or any of
+# the files within it.  See the URLs above, or the file `LICENSE`
+# included in the Bootstrap distribution for the full license texts.
 
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+# Please report bugs or propose patches to:
+# <https://github.com/gnulib-modules/bootstrap/issues>
 
-# Please report bugs or propose patches to gary@gnu.org.
+# Set a version string for this script.
+scriptversion=2019-02-19.15; # UTC
 
 
 ## ------ ##
@@ -1415,7 +1572,7 @@ scriptversion=2014-01-07.03; # UTC
 #
 # In order for the '--version' option to work, you will need to have a
 # suitably formatted comment like the one at the top of this file
-# starting with '# Written by ' and ending with '# warranty; '.
+# starting with '# Written by ' and ending with '# Copyright'.
 #
 # For '-h' and '--help' to work, you will also need a one line
 # description of your script's purpose in a comment directly above the
@@ -1427,7 +1584,7 @@ scriptversion=2014-01-07.03; # UTC
 # to display verbose messages only when your user has specified
 # '--verbose'.
 #
-# After sourcing this file, you can plug processing for additional
+# After sourcing this file, you can plug in processing for additional
 # options by amending the variables from the 'Configuration' section
 # below, and following the instructions in the 'Option parsing'
 # section further down.
@@ -1476,8 +1633,8 @@ fatal_help="Try '\$progname --help' for more information."
 ## ------------------------- ##
 
 # This section contains functions for adding, removing, and running hooks
-# to the main code.  A hook is just a named list of of function, that can
-# be run in order later on.
+# in the main code.  A hook is just a list of function names that can be
+# run in order later on.
 
 # func_hookable FUNC_NAME
 # -----------------------
@@ -1510,7 +1667,8 @@ func_add_hook ()
 
 # func_remove_hook FUNC_NAME HOOK_FUNC
 # ------------------------------------
-# Remove HOOK_FUNC from the list of functions called by FUNC_NAME.
+# Remove HOOK_FUNC from the list of hook functions to be called by
+# FUNC_NAME.
 func_remove_hook ()
 {
     $debug_cmd
@@ -1519,10 +1677,28 @@ func_remove_hook ()
 }
 
 
+# func_propagate_result FUNC_NAME_A FUNC_NAME_B
+# ---------------------------------------------
+# If the *_result variable of FUNC_NAME_A _is set_, assign its value to
+# *_result variable of FUNC_NAME_B.
+func_propagate_result ()
+{
+    $debug_cmd
+
+    func_propagate_result_result=:
+    if eval "test \"\${${1}_result+set}\" = set"
+    then
+      eval "${2}_result=\$${1}_result"
+    else
+      func_propagate_result_result=false
+    fi
+}
+
+
 # func_run_hooks FUNC_NAME [ARG]...
 # ---------------------------------
 # Run all hook functions registered to FUNC_NAME.
-# It is assumed that the list of hook functions contains nothing more
+# It's assumed that the list of hook functions contains nothing more
 # than a whitespace-delimited list of legal shell function names, and
 # no effort is wasted trying to catch shell meta-characters or preserve
 # whitespace.
@@ -1532,22 +1708,19 @@ func_run_hooks ()
 
     case " $hookable_fns " in
       *" $1 "*) ;;
-      *) func_fatal_error "'$1' does not support hook funcions.n" ;;
+      *) func_fatal_error "'$1' does not support hook functions." ;;
     esac
 
     eval _G_hook_fns=\$$1_hooks; shift
 
     for _G_hook in $_G_hook_fns; do
-      eval $_G_hook '"$@"'
-
-      # store returned options list back into positional
-      # parameters for next 'cmd' execution.
-      eval _G_hook_result=\$${_G_hook}_result
-      eval set dummy "$_G_hook_result"; shift
+      func_unset "${_G_hook}_result"
+      eval $_G_hook '${1+"$@"}'
+      func_propagate_result $_G_hook func_run_hooks
+      if $func_propagate_result_result; then
+        eval set dummy "$func_run_hooks_result"; shift
+      fi
     done
-
-    func_quote_for_eval ${1+"$@"}
-    func_run_hooks_result=$func_quote_for_eval_result
 }
 
 
@@ -1557,10 +1730,18 @@ func_run_hooks ()
 ## --------------- ##
 
 # In order to add your own option parsing hooks, you must accept the
-# full positional parameter list in your hook function, remove any
-# options that you action, and then pass back the remaining unprocessed
-# options in '<hooked_function_name>_result', escaped suitably for
-# 'eval'.  Like this:
+# full positional parameter list from your hook function.  You may remove
+# or edit any options that you action, and then pass back the remaining
+# unprocessed options in '<hooked_function_name>_result', escaped
+# suitably for 'eval'.
+#
+# The '<hooked_function_name>_result' variable is automatically unset
+# before your hook gets called; for best performance, only set the
+# *_result variable when necessary (i.e. don't call the 'func_quote'
+# function unnecessarily because it can be an expensive operation on some
+# machines).
+#
+# Like this:
 #
 #    my_options_prep ()
 #    {
@@ -1570,9 +1751,8 @@ func_run_hooks ()
 #        usage_message=$usage_message'
 #      -s, --silent       don'\''t print informational messages
 #    '
-#
-#        func_quote_for_eval ${1+"$@"}
-#        my_options_prep_result=$func_quote_for_eval_result
+#        # No change in '$@' (ignored completely by this hook).  Leave
+#        # my_options_prep_result variable intact.
 #    }
 #    func_add_hook func_options_prep my_options_prep
 #
@@ -1581,25 +1761,36 @@ func_run_hooks ()
 #    {
 #        $debug_cmd
 #
-#        # Note that for efficiency, we parse as many options as we can
+#        args_changed=false
+#
+#        # Note that, for efficiency, we parse as many options as we can
 #        # recognise in a loop before passing the remainder back to the
 #        # caller on the first unrecognised argument we encounter.
 #        while test $# -gt 0; do
 #          opt=$1; shift
 #          case $opt in
-#            --silent|-s) opt_silent=: ;;
+#            --silent|-s) opt_silent=:
+#                         args_changed=:
+#                         ;;
 #            # Separate non-argument short options:
 #            -s*)         func_split_short_opt "$_G_opt"
 #                         set dummy "$func_split_short_opt_name" \
 #                             "-$func_split_short_opt_arg" ${1+"$@"}
 #                         shift
+#                         args_changed=:
 #                         ;;
-#            *)            set dummy "$_G_opt" "$*"; shift; break ;;
+#            *)           # Make sure the first unrecognised option "$_G_opt"
+#                         # is added back to "$@" in case we need it later,
+#                         # if $args_changed was set to 'true'.
+#                         set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
 #          esac
 #        done
 #
-#        func_quote_for_eval ${1+"$@"}
-#        my_silent_option_result=$func_quote_for_eval_result
+#        # Only call 'func_quote' here if we processed at least one argument.
+#        if $args_changed; then
+#          func_quote eval ${1+"$@"}
+#          my_silent_option_result=$func_quote_result
+#        fi
 #    }
 #    func_add_hook func_parse_options my_silent_option
 #
@@ -1610,17 +1801,26 @@ func_run_hooks ()
 #
 #        $opt_silent && $opt_verbose && func_fatal_help "\
 #    '--silent' and '--verbose' options are mutually exclusive."
-#
-#        func_quote_for_eval ${1+"$@"}
-#        my_option_validation_result=$func_quote_for_eval_result
 #    }
 #    func_add_hook func_validate_options my_option_validation
 #
-# You'll alse need to manually amend $usage_message to reflect the extra
+# You'll also need to manually amend $usage_message to reflect the extra
 # options you parse.  It's preferable to append if you can, so that
 # multiple option parsing hooks can be added safely.
 
 
+# func_options_finish [ARG]...
+# ----------------------------
+# Finishing the option parse loop (call 'func_options' hooks ATM).
+func_options_finish ()
+{
+    $debug_cmd
+
+    func_run_hooks func_options ${1+"$@"}
+    func_propagate_result func_run_hooks func_options_finish
+}
+
+
 # func_options [ARG]...
 # ---------------------
 # All the functions called inside func_options are hookable. See the
@@ -1630,17 +1830,27 @@ func_options ()
 {
     $debug_cmd
 
-    func_options_prep ${1+"$@"}
-    eval func_parse_options \
-        ${func_options_prep_result+"$func_options_prep_result"}
-    eval func_validate_options \
-        ${func_parse_options_result+"$func_parse_options_result"}
+    _G_options_quoted=false
 
-    eval func_run_hooks func_options \
-        ${func_validate_options_result+"$func_validate_options_result"}
+    for my_func in options_prep parse_options validate_options options_finish
+    do
+      func_unset func_${my_func}_result
+      func_unset func_run_hooks_result
+      eval func_$my_func '${1+"$@"}'
+      func_propagate_result func_$my_func func_options
+      if $func_propagate_result_result; then
+        eval set dummy "$func_options_result"; shift
+        _G_options_quoted=:
+      fi
+    done
 
-    # save modified positional parameters for caller
-    func_options_result=$func_run_hooks_result
+    $_G_options_quoted || {
+      # As we (func_options) are top-level options-parser function and
+      # nobody quoted "$@" for us yet, we need to do it explicitly for
+      # caller.
+      func_quote eval ${1+"$@"}
+      func_options_result=$func_quote_result
+    }
 }
 
 
@@ -1649,9 +1859,8 @@ func_options ()
 # All initialisations required before starting the option parse loop.
 # Note that when calling hook functions, we pass through the list of
 # positional parameters.  If a hook function modifies that list, and
-# needs to propogate that back to rest of this script, then the complete
-# modified list must be put in 'func_run_hooks_result' before
-# returning.
+# needs to propagate that back to rest of this script, then the complete
+# modified list must be put in 'func_run_hooks_result' before returning.
 func_hookable func_options_prep
 func_options_prep ()
 {
@@ -1662,9 +1871,7 @@ func_options_prep ()
     opt_warning_types=
 
     func_run_hooks func_options_prep ${1+"$@"}
-
-    # save modified positional parameters for caller
-    func_options_prep_result=$func_run_hooks_result
+    func_propagate_result func_run_hooks func_options_prep
 }
 
 
@@ -1676,25 +1883,32 @@ func_parse_options ()
 {
     $debug_cmd
 
-    func_parse_options_result=
-
+    _G_parse_options_requote=false
     # this just eases exit handling
     while test $# -gt 0; do
       # Defer to hook functions for initial option parsing, so they
       # get priority in the event of reusing an option name.
       func_run_hooks func_parse_options ${1+"$@"}
-
-      # Adjust func_parse_options positional parameters to match
-      eval set dummy "$func_run_hooks_result"; shift
+      func_propagate_result func_run_hooks func_parse_options
+      if $func_propagate_result_result; then
+        eval set dummy "$func_parse_options_result"; shift
+        # Even though we may have changed "$@", we passed the "$@" array
+        # down into the hook and it quoted it for us (because we are in
+        # this if-branch).  No need to quote it again.
+        _G_parse_options_requote=false
+      fi
 
       # Break out of the loop if we already parsed every option.
       test $# -gt 0 || break
 
+      # We expect that one of the options parsed in this function matches
+      # and thus we remove _G_opt from "$@" and need to re-quote.
+      _G_match_parse_options=:
       _G_opt=$1
       shift
       case $_G_opt in
         --debug|-x)   debug_cmd='set -x'
-                      func_echo "enabling shell trace mode"
+                      func_echo "enabling shell trace mode" >&2
                       $debug_cmd
                       ;;
 
@@ -1704,7 +1918,10 @@ func_parse_options ()
 		      ;;
 
         --warnings|--warning|-W)
-                      test $# = 0 && func_missing_arg $_G_opt && break
+                      if test $# = 0 && func_missing_arg $_G_opt; then
+                        _G_parse_options_requote=:
+                        break
+                      fi
                       case " $warning_categories $1" in
                         *" $1 "*)
                           # trailing space prevents matching last $1 above
@@ -1757,15 +1974,24 @@ func_parse_options ()
                       shift
                       ;;
 
-        --)           break ;;
+        --)           _G_parse_options_requote=: ; break ;;
         -*)           func_fatal_help "unrecognised option: '$_G_opt'" ;;
-        *)            set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
+        *)            set dummy "$_G_opt" ${1+"$@"}; shift
+                      _G_match_parse_options=false
+                      break
+                      ;;
       esac
+
+      if $_G_match_parse_options; then
+        _G_parse_options_requote=:
+      fi
     done
 
-    # save modified positional parameters for caller
-    func_quote_for_eval ${1+"$@"}
-    func_parse_options_result=$func_quote_for_eval_result
+    if $_G_parse_options_requote; then
+      # save modified positional parameters for caller
+      func_quote eval ${1+"$@"}
+      func_parse_options_result=$func_quote_result
+    fi
 }
 
 
@@ -1782,12 +2008,10 @@ func_validate_options ()
     test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
 
     func_run_hooks func_validate_options ${1+"$@"}
+    func_propagate_result func_run_hooks func_validate_options
 
     # Bail if the options were screwed!
     $exit_cmd $EXIT_FAILURE
-
-    # save modified positional parameters for caller
-    func_validate_options_result=$func_run_hooks_result
 }
 
 
@@ -1843,8 +2067,8 @@ func_missing_arg ()
 
 # func_split_equals STRING
 # ------------------------
-# Set func_split_equals_lhs and func_split_equals_rhs shell variables after
-# splitting STRING at the '=' sign.
+# Set func_split_equals_lhs and func_split_equals_rhs shell variables
+# after splitting STRING at the '=' sign.
 test -z "$_G_HAVE_XSI_OPS" \
     && (eval 'x=a/b/c;
       test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
@@ -1859,8 +2083,9 @@ then
 
       func_split_equals_lhs=${1%%=*}
       func_split_equals_rhs=${1#*=}
-      test "x$func_split_equals_lhs" = "x$1" \
-        && func_split_equals_rhs=
+      if test "x$func_split_equals_lhs" = "x$1"; then
+        func_split_equals_rhs=
+      fi
   }'
 else
   # ...otherwise fall back to using expr, which is often a shell builtin.
@@ -1870,7 +2095,7 @@ else
 
       func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'`
       func_split_equals_rhs=
-      test "x$func_split_equals_lhs" = "x$1" \
+      test "x$func_split_equals_lhs=" = "x$1" \
         || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'`
   }
 fi #func_split_equals
@@ -1896,7 +2121,7 @@ else
   {
       $debug_cmd
 
-      func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'`
+      func_split_short_opt_name=`expr "x$1" : 'x\(-.\)'`
       func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'`
   }
 fi #func_split_short_opt
@@ -1938,31 +2163,44 @@ func_usage_message ()
 # func_version
 # ------------
 # Echo version message to standard output and exit.
+# The version message is extracted from the calling file's header
+# comments, with leading '# ' stripped:
+#   1. First display the progname and version
+#   2. Followed by the header comment line matching  /^# Written by /
+#   3. Then a blank line followed by the first following line matching
+#      /^# Copyright /
+#   4. Immediately followed by any lines between the previous matches,
+#      except lines preceding the intervening completely blank line.
+# For example, see the header comments of this file.
 func_version ()
 {
     $debug_cmd
 
     printf '%s\n' "$progname $scriptversion"
     $SED -n '
-        /(C)/!b go
-        :more
-        /\./!{
-          N
-          s|\n# | |
-          b more
-        }
-        :go
-        /^# Written by /,/# warranty; / {
-          s|^# ||
-          s|^# *$||
-          s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2|
-          p
+        /^# Written by /!b
+        s|^# ||; p; n
+
+        :fwd2blnk
+        /./ {
+          n
+          b fwd2blnk
         }
-        /^# Written by / {
-          s|^# ||
-          p
+        p; n
+
+        :holdwrnt
+        s|^# ||
+        s|^# *$||
+        /^Copyright /!{
+          /./H
+          n
+          b holdwrnt
         }
-        /^warranty; /q' < "$progpath"
+
+        s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2|
+        G
+        s|\(\n\)\n*|\1|g
+        p; q' < "$progpath"
 
     exit $?
 }
@@ -1972,12 +2210,12 @@ func_version ()
 # mode: shell-script
 # sh-indentation: 2
 # eval: (add-hook 'before-save-hook 'time-stamp)
-# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
+# time-stamp-pattern: "30/scriptversion=%:y-%02m-%02d.%02H; # UTC"
 # time-stamp-time-zone: "UTC"
 # End:
 
 # Set a version string.
-scriptversion='(GNU libtool) 2.4.6'
+scriptversion='(GNU libtool) 2.4.7'
 
 
 # func_echo ARG...
@@ -2068,7 +2306,7 @@ include the following information:
        compiler:       $LTCC
        compiler flags: $LTCFLAGS
        linker:         $LD (gnu? $with_gnu_ld)
-       version:        $progname (GNU libtool) 2.4.6
+       version:        $progname (GNU libtool) 2.4.7
        automake:       `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
        autoconf:       `($AUTOCONF --version) 2>/dev/null |$SED 1q`
 
@@ -2270,6 +2508,8 @@ libtool_options_prep ()
     nonopt=
     preserve_args=
 
+    _G_rc_lt_options_prep=:
+
     # Shorthand for --mode=foo, only valid as the first argument
     case $1 in
     clean|clea|cle|cl)
@@ -2293,11 +2533,16 @@ libtool_options_prep ()
     uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
       shift; set dummy --mode uninstall ${1+"$@"}; shift
       ;;
+    *)
+      _G_rc_lt_options_prep=false
+      ;;
     esac
 
-    # Pass back the list of options.
-    func_quote_for_eval ${1+"$@"}
-    libtool_options_prep_result=$func_quote_for_eval_result
+    if $_G_rc_lt_options_prep; then
+      # Pass back the list of options.
+      func_quote eval ${1+"$@"}
+      libtool_options_prep_result=$func_quote_result
+    fi
 }
 func_add_hook func_options_prep libtool_options_prep
 
@@ -2309,9 +2554,12 @@ libtool_parse_options ()
 {
     $debug_cmd
 
+    _G_rc_lt_parse_options=false
+
     # Perform our own loop to consume as many options as possible in
     # each iteration.
     while test $# -gt 0; do
+      _G_match_lt_parse_options=:
       _G_opt=$1
       shift
       case $_G_opt in
@@ -2386,15 +2634,20 @@ libtool_parse_options ()
                         func_append preserve_args " $_G_opt"
                         ;;
 
-	# An option not handled by this hook function:
-        *)		set dummy "$_G_opt" ${1+"$@"};	shift; break  ;;
+        # An option not handled by this hook function:
+        *)              set dummy "$_G_opt" ${1+"$@"} ; shift
+                        _G_match_lt_parse_options=false
+                        break
+                        ;;
       esac
+      $_G_match_lt_parse_options && _G_rc_lt_parse_options=:
     done
 
-
-    # save modified positional parameters for caller
-    func_quote_for_eval ${1+"$@"}
-    libtool_parse_options_result=$func_quote_for_eval_result
+    if $_G_rc_lt_parse_options; then
+      # save modified positional parameters for caller
+      func_quote eval ${1+"$@"}
+      libtool_parse_options_result=$func_quote_result
+    fi
 }
 func_add_hook func_parse_options libtool_parse_options
 
@@ -2415,17 +2668,10 @@ libtool_validate_options ()
     # preserve --debug
     test : = "$debug_cmd" || func_append preserve_args " --debug"
 
-    case $host in
-      # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452
-      # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788
-      *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
-        # don't eliminate duplications in $postdeps and $predeps
-        opt_duplicate_compiler_generated_deps=:
-        ;;
-      *)
-        opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
-        ;;
-    esac
+    # Keeping compiler generated duplicates in $postdeps and $predeps is not
+    # harmful, and is necessary in a majority of systems that use it to satisfy
+    # symbol dependencies.
+    opt_duplicate_compiler_generated_deps=:
 
     $opt_help || {
       # Sanity checks first:
@@ -2451,8 +2697,8 @@ libtool_validate_options ()
     }
 
     # Pass back the unparsed argument list
-    func_quote_for_eval ${1+"$@"}
-    libtool_validate_options_result=$func_quote_for_eval_result
+    func_quote eval ${1+"$@"}
+    libtool_validate_options_result=$func_quote_result
 }
 func_add_hook func_validate_options libtool_validate_options
 
@@ -3418,8 +3664,8 @@ func_mode_compile ()
       esac
     done
 
-    func_quote_for_eval "$libobj"
-    test "X$libobj" != "X$func_quote_for_eval_result" \
+    func_quote_arg pretty "$libobj"
+    test "X$libobj" != "X$func_quote_arg_result" \
       && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"'	 &()|`$[]' \
       && func_warning "libobj name '$libobj' may not contain shell special characters."
     func_dirname_and_basename "$obj" "/" ""
@@ -3492,8 +3738,8 @@ compiler."
 
     func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
     srcfile=$func_to_tool_file_result
-    func_quote_for_eval "$srcfile"
-    qsrcfile=$func_quote_for_eval_result
+    func_quote_arg pretty "$srcfile"
+    qsrcfile=$func_quote_arg_result
 
     # Only build a PIC object if we are building libtool libraries.
     if test yes = "$build_libtool_libs"; then
@@ -3648,7 +3894,8 @@ This mode accepts the following additional options:
   -prefer-non-pic   try to build non-PIC objects only
   -shared           do not build a '.o' file suitable for static linking
   -static           only build a '.o' file suitable for static linking
-  -Wc,FLAG          pass FLAG directly to the compiler
+  -Wc,FLAG
+  -Xcompiler FLAG   pass FLAG directly to the compiler
 
 COMPILE-COMMAND is a command to be used in creating a 'standard' object file
 from the given SOURCEFILE.
@@ -3754,6 +4001,8 @@ The following components of LINK-COMMAND are treated specially:
   -weak LIBNAME     declare that the target provides the LIBNAME interface
   -Wc,FLAG
   -Xcompiler FLAG   pass linker-specific FLAG directly to the compiler
+  -Wa,FLAG
+  -Xassembler FLAG  pass linker-specific FLAG directly to the assembler
   -Wl,FLAG
   -Xlinker FLAG     pass linker-specific FLAG directly to the linker
   -XCClinker FLAG   pass link-specific FLAG to the compiler driver (CC)
@@ -4096,8 +4345,8 @@ func_mode_install ()
        case $nonopt in *shtool*) :;; *) false;; esac
     then
       # Aesthetically quote it.
-      func_quote_for_eval "$nonopt"
-      install_prog="$func_quote_for_eval_result "
+      func_quote_arg pretty "$nonopt"
+      install_prog="$func_quote_arg_result "
       arg=$1
       shift
     else
@@ -4107,8 +4356,8 @@ func_mode_install ()
 
     # The real first argument should be the name of the installation program.
     # Aesthetically quote it.
-    func_quote_for_eval "$arg"
-    func_append install_prog "$func_quote_for_eval_result"
+    func_quote_arg pretty "$arg"
+    func_append install_prog "$func_quote_arg_result"
     install_shared_prog=$install_prog
     case " $install_prog " in
       *[\\\ /]cp\ *) install_cp=: ;;
@@ -4165,12 +4414,12 @@ func_mode_install ()
       esac
 
       # Aesthetically quote the argument.
-      func_quote_for_eval "$arg"
-      func_append install_prog " $func_quote_for_eval_result"
+      func_quote_arg pretty "$arg"
+      func_append install_prog " $func_quote_arg_result"
       if test -n "$arg2"; then
-	func_quote_for_eval "$arg2"
+	func_quote_arg pretty "$arg2"
       fi
-      func_append install_shared_prog " $func_quote_for_eval_result"
+      func_append install_shared_prog " $func_quote_arg_result"
     done
 
     test -z "$install_prog" && \
@@ -4181,8 +4430,8 @@ func_mode_install ()
 
     if test -n "$install_override_mode" && $no_mode; then
       if $install_cp; then :; else
-	func_quote_for_eval "$install_override_mode"
-	func_append install_shared_prog " -m $func_quote_for_eval_result"
+	func_quote_arg pretty "$install_override_mode"
+	func_append install_shared_prog " -m $func_quote_arg_result"
       fi
     fi
 
@@ -4478,8 +4727,8 @@ func_mode_install ()
 	        relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
 
 	        $opt_quiet || {
-	          func_quote_for_expand "$relink_command"
-		  eval "func_echo $func_quote_for_expand_result"
+	          func_quote_arg expand,pretty "$relink_command"
+		  eval "func_echo $func_quote_arg_result"
 	        }
 	        if eval "$relink_command"; then :
 	          else
@@ -5258,7 +5507,8 @@ else
   if test \"\$libtool_execute_magic\" != \"$magic\"; then
     file=\"\$0\""
 
-    qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
+    func_quote_arg pretty "$ECHO"
+    qECHO=$func_quote_arg_result
     $ECHO "\
 
 # A function that is used when there is no print builtin or printf.
@@ -5268,7 +5518,7 @@ func_fallback_echo ()
 \$1
 _LTECHO_EOF'
 }
-    ECHO=\"$qECHO\"
+    ECHO=$qECHO
   fi
 
 # Very basic option parsing. These options are (a) specific to
@@ -6611,9 +6861,9 @@ func_mode_link ()
     while test "$#" -gt 0; do
       arg=$1
       shift
-      func_quote_for_eval "$arg"
-      qarg=$func_quote_for_eval_unquoted_result
-      func_append libtool_args " $func_quote_for_eval_result"
+      func_quote_arg pretty,unquoted "$arg"
+      qarg=$func_quote_arg_unquoted_result
+      func_append libtool_args " $func_quote_arg_result"
 
       # If the previous option needs an argument, assign it.
       if test -n "$prev"; then
@@ -6849,6 +7099,13 @@ func_mode_link ()
 	  prev=
 	  continue
 	  ;;
+	xassembler)
+	  func_append compiler_flags " -Xassembler $qarg"
+	  prev=
+	  func_append compile_command " -Xassembler $qarg"
+	  func_append finalize_command " -Xassembler $qarg"
+	  continue
+	  ;;
 	xcclinker)
 	  func_append linker_flags " $qarg"
 	  func_append compiler_flags " $qarg"
@@ -7019,7 +7276,7 @@ func_mode_link ()
 	    # These systems don't actually have a C library (as such)
 	    test X-lc = "X$arg" && continue
 	    ;;
-	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*)
 	    # Do not include libc due to us having libc/libc_r.
 	    test X-lc = "X$arg" && continue
 	    ;;
@@ -7039,7 +7296,7 @@ func_mode_link ()
 	  esac
 	elif test X-lc_r = "X$arg"; then
 	 case $host in
-	 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
+	 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*)
 	   # Do not include libc_r directly, use -pthread flag.
 	   continue
 	   ;;
@@ -7069,8 +7326,20 @@ func_mode_link ()
 	prev=xcompiler
 	continue
 	;;
-
-      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+     # Solaris ld rejects as of 11.4. Refer to Oracle bug 22985199.
+     -pthread)
+	case $host in
+	  *solaris2*) ;;
+	  *)
+	    case "$new_inherited_linker_flags " in
+	        *" $arg "*) ;;
+	        * ) func_append new_inherited_linker_flags " $arg" ;;
+	    esac
+	  ;;
+	esac
+	continue
+	;;
+      -mt|-mthreads|-kthread|-Kthread|-pthreads|--thread-safe \
       |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
 	func_append compiler_flags " $arg"
 	func_append compile_command " $arg"
@@ -7211,9 +7480,9 @@ func_mode_link ()
 	save_ifs=$IFS; IFS=,
 	for flag in $args; do
 	  IFS=$save_ifs
-          func_quote_for_eval "$flag"
-	  func_append arg " $func_quote_for_eval_result"
-	  func_append compiler_flags " $func_quote_for_eval_result"
+          func_quote_arg pretty "$flag"
+	  func_append arg " $func_quote_arg_result"
+	  func_append compiler_flags " $func_quote_arg_result"
 	done
 	IFS=$save_ifs
 	func_stripname ' ' '' "$arg"
@@ -7227,16 +7496,21 @@ func_mode_link ()
 	save_ifs=$IFS; IFS=,
 	for flag in $args; do
 	  IFS=$save_ifs
-          func_quote_for_eval "$flag"
-	  func_append arg " $wl$func_quote_for_eval_result"
-	  func_append compiler_flags " $wl$func_quote_for_eval_result"
-	  func_append linker_flags " $func_quote_for_eval_result"
+          func_quote_arg pretty "$flag"
+	  func_append arg " $wl$func_quote_arg_result"
+	  func_append compiler_flags " $wl$func_quote_arg_result"
+	  func_append linker_flags " $func_quote_arg_result"
 	done
 	IFS=$save_ifs
 	func_stripname ' ' '' "$arg"
 	arg=$func_stripname_result
 	;;
 
+      -Xassembler)
+        prev=xassembler
+        continue
+        ;;
+
       -Xcompiler)
 	prev=xcompiler
 	continue
@@ -7254,8 +7528,8 @@ func_mode_link ()
 
       # -msg_* for osf cc
       -msg_*)
-	func_quote_for_eval "$arg"
-	arg=$func_quote_for_eval_result
+	func_quote_arg pretty "$arg"
+	arg=$func_quote_arg_result
 	;;
 
       # Flags to be passed through unchanged, with rationale:
@@ -7274,12 +7548,15 @@ func_mode_link ()
       # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
       # -specs=*             GCC specs files
       # -stdlib=*            select c++ std lib with clang
+      # -fsanitize=*         Clang/GCC memory and address sanitizer
+      # -fuse-ld=*           Linker select flags for GCC
+      # -Wa,*                Pass flags directly to the assembler
       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
       -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
       -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
-      -specs=*)
-        func_quote_for_eval "$arg"
-	arg=$func_quote_for_eval_result
+      -specs=*|-fsanitize=*|-fuse-ld=*|-Wa,*)
+        func_quote_arg pretty "$arg"
+	arg=$func_quote_arg_result
         func_append compile_command " $arg"
         func_append finalize_command " $arg"
         func_append compiler_flags " $arg"
@@ -7300,15 +7577,15 @@ func_mode_link ()
 	  continue
         else
 	  # Otherwise treat like 'Some other compiler flag' below
-	  func_quote_for_eval "$arg"
-	  arg=$func_quote_for_eval_result
+	  func_quote_arg pretty "$arg"
+	  arg=$func_quote_arg_result
         fi
 	;;
 
       # Some other compiler flag.
       -* | +*)
-        func_quote_for_eval "$arg"
-	arg=$func_quote_for_eval_result
+        func_quote_arg pretty "$arg"
+	arg=$func_quote_arg_result
 	;;
 
       *.$objext)
@@ -7428,8 +7705,8 @@ func_mode_link ()
       *)
 	# Unknown arguments in both finalize_command and compile_command need
 	# to be aesthetically quoted because they are evaled later.
-	func_quote_for_eval "$arg"
-	arg=$func_quote_for_eval_result
+	func_quote_arg pretty "$arg"
+	arg=$func_quote_arg_result
 	;;
       esac # arg
 
@@ -8634,7 +8911,7 @@ func_mode_link ()
       test CXX = "$tagname" && {
         case $host_os in
         linux*)
-          case `$CC -V 2>&1 | sed 5q` in
+          case `$CC -V 2>&1 | $SED 5q` in
           *Sun\ C*) # Sun C++ 5.9
             func_suncc_cstd_abi
 
@@ -8807,7 +9084,7 @@ func_mode_link ()
 	  #
 	  case $version_type in
 	  # correct linux to gnu/linux during the next big refactor
-	  darwin|freebsd-elf|linux|osf|windows|none)
+	  darwin|freebsd-elf|linux|midnightbsd-elf|osf|windows|none)
 	    func_arith $number_major + $number_minor
 	    current=$func_arith_result
 	    age=$number_minor
@@ -8898,7 +9175,7 @@ func_mode_link ()
 	  versuffix=.$current.$revision
 	  ;;
 
-	freebsd-elf)
+	freebsd-elf | midnightbsd-elf)
 	  func_arith $current - $age
 	  major=.$func_arith_result
 	  versuffix=$major.$age.$revision
@@ -9124,7 +9401,7 @@ func_mode_link ()
 	  *-*-netbsd*)
 	    # Don't link with libc until the a.out ld.so is fixed.
 	    ;;
-	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-midnightbsd*)
 	    # Do not include libc due to us having libc/libc_r.
 	    ;;
 	  *-*-sco3.2v5* | *-*-sco5v6*)
@@ -9935,8 +10212,8 @@ EOF
 	    for cmd in $concat_cmds; do
 	      IFS=$save_ifs
 	      $opt_quiet || {
-		  func_quote_for_expand "$cmd"
-		  eval "func_echo $func_quote_for_expand_result"
+		  func_quote_arg expand,pretty "$cmd"
+		  eval "func_echo $func_quote_arg_result"
 	      }
 	      $opt_dry_run || eval "$cmd" || {
 		lt_exit=$?
@@ -10029,8 +10306,8 @@ EOF
 	  eval cmd=\"$cmd\"
 	  IFS=$save_ifs
 	  $opt_quiet || {
-	    func_quote_for_expand "$cmd"
-	    eval "func_echo $func_quote_for_expand_result"
+	    func_quote_arg expand,pretty "$cmd"
+	    eval "func_echo $func_quote_arg_result"
 	  }
 	  $opt_dry_run || eval "$cmd" || {
 	    lt_exit=$?
@@ -10504,12 +10781,13 @@ EOF
 	  elif eval var_value=\$$var; test -z "$var_value"; then
 	    relink_command="$var=; export $var; $relink_command"
 	  else
-	    func_quote_for_eval "$var_value"
-	    relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+	    func_quote_arg pretty "$var_value"
+	    relink_command="$var=$func_quote_arg_result; export $var; $relink_command"
 	  fi
 	done
-	relink_command="(cd `pwd`; $relink_command)"
-	relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
+	func_quote eval cd "`pwd`"
+	func_quote_arg pretty,unquoted "($func_quote_result; $relink_command)"
+	relink_command=$func_quote_arg_unquoted_result
       fi
 
       # Only actually do things if not in dry run mode.
@@ -10749,13 +11027,15 @@ EOF
 	elif eval var_value=\$$var; test -z "$var_value"; then
 	  relink_command="$var=; export $var; $relink_command"
 	else
-	  func_quote_for_eval "$var_value"
-	  relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+	  func_quote_arg pretty,unquoted "$var_value"
+	  relink_command="$var=$func_quote_arg_unquoted_result; export $var; $relink_command"
 	fi
       done
       # Quote the link command for shipping.
-      relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
-      relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
+      func_quote eval cd "`pwd`"
+      relink_command="($func_quote_result; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+      func_quote_arg pretty,unquoted "$relink_command"
+      relink_command=$func_quote_arg_unquoted_result
       if test yes = "$hardcode_automatic"; then
 	relink_command=
       fi
diff --git a/m4/Makefile.in b/m4/Makefile.in
index f80ad6f..ffb1acf 100644
--- a/m4/Makefile.in
+++ b/m4/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -141,6 +141,8 @@ CHECK_CFLAGS = @CHECK_CFLAGS@
 CHECK_LIBS = @CHECK_LIBS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
@@ -152,8 +154,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@
 GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@
 GEE_CFLAGS = @GEE_CFLAGS@
@@ -280,6 +284,7 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -337,7 +342,6 @@ ctags CTAGS:
 
 cscope cscopelist:
 
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index a644432..e3adeda 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -1,6 +1,7 @@
 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
 #
-#   Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
+#   Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software
+#   Foundation, Inc.
 #   Written by Gordon Matzigkeit, 1996
 #
 # This file is free software; the Free Software Foundation gives
@@ -31,7 +32,7 @@ m4_define([_LT_COPYING], [dnl
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ])
 
-# serial 58 LT_INIT
+# serial 59 LT_INIT
 
 
 # LT_PREREQ(VERSION)
@@ -181,6 +182,7 @@ m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
 m4_require([_LT_CMD_RELOAD])dnl
+m4_require([_LT_DECL_FILECMD])dnl
 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
@@ -219,8 +221,8 @@ esac
 ofile=libtool
 can_build_shared=yes
 
-# All known linkers require a '.a' archive for static linking (except MSVC,
-# which needs '.lib').
+# All known linkers require a '.a' archive for static linking (except MSVC and
+# ICC, which need '.lib').
 libext=a
 
 with_gnu_ld=$lt_cv_prog_gnu_ld
@@ -778,7 +780,7 @@ _LT_EOF
   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
   # text mode, it properly converts lines to CR/LF.  This bash problem
   # is reportedly fixed, but why not run on old versions too?
-  sed '$q' "$ltmain" >> "$cfgfile" \
+  $SED '$q' "$ltmain" >> "$cfgfile" \
      || (rm -f "$cfgfile"; exit 1)
 
    mv -f "$cfgfile" "$ofile" ||
@@ -1042,8 +1044,8 @@ int forced_loaded() { return 2;}
 _LT_EOF
       echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
       $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
-      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
-      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
+      echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
+      $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
       echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
       $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
       cat > conftest.c << _LT_EOF
@@ -1067,17 +1069,12 @@ _LT_EOF
       _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
     darwin1.*)
       _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
-    darwin*) # darwin 5.x on
-      # if running on 10.5 or later, the deployment target defaults
-      # to the OS version, if on x86, and 10.4, the deployment
-      # target defaults to 10.4. Don't you love it?
-      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
-	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
-	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
-	10.[[012]][[,.]]*)
-	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
-	10.*)
-	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+    darwin*)
+      case $MACOSX_DEPLOYMENT_TARGET,$host in
+        10.[[012]],*|,*powerpc*-darwin[[5-8]]*)
+          _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
+        *)
+          _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
       esac
     ;;
   esac
@@ -1126,12 +1123,12 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
     output_verbose_link_cmd=func_echo_all
     _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
     _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
-    _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
-    _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
+    _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
+    _LT_TAGVAR(module_expsym_cmds, $1)="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
     m4_if([$1], [CXX],
 [   if test yes != "$lt_cv_apple_cc_single_mod"; then
       _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
-      _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
+      _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
     fi
 ],[])
   else
@@ -1245,7 +1242,8 @@ _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
 # _LT_WITH_SYSROOT
 # ----------------
 AC_DEFUN([_LT_WITH_SYSROOT],
-[AC_MSG_CHECKING([for sysroot])
+[m4_require([_LT_DECL_SED])dnl
+AC_MSG_CHECKING([for sysroot])
 AC_ARG_WITH([sysroot],
 [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
   [Search for dependent libraries within DIR (or the compiler's sysroot
@@ -1262,7 +1260,7 @@ case $with_sysroot in #(
    fi
    ;; #(
  /*)
-   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+   lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
    ;; #(
  no|'')
    ;; #(
@@ -1292,7 +1290,7 @@ ia64-*-hpux*)
   # options accordingly.
   echo 'int i;' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
-    case `/usr/bin/file conftest.$ac_objext` in
+    case `$FILECMD conftest.$ac_objext` in
       *ELF-32*)
 	HPUX_IA64_MODE=32
 	;;
@@ -1309,7 +1307,7 @@ ia64-*-hpux*)
   echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
     if test yes = "$lt_cv_prog_gnu_ld"; then
-      case `/usr/bin/file conftest.$ac_objext` in
+      case `$FILECMD conftest.$ac_objext` in
 	*32-bit*)
 	  LD="${LD-ld} -melf32bsmip"
 	  ;;
@@ -1321,7 +1319,7 @@ ia64-*-hpux*)
 	;;
       esac
     else
-      case `/usr/bin/file conftest.$ac_objext` in
+      case `$FILECMD conftest.$ac_objext` in
 	*32-bit*)
 	  LD="${LD-ld} -32"
 	  ;;
@@ -1343,7 +1341,7 @@ mips64*-*linux*)
   echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
     emul=elf
-    case `/usr/bin/file conftest.$ac_objext` in
+    case `$FILECMD conftest.$ac_objext` in
       *32-bit*)
 	emul="${emul}32"
 	;;
@@ -1351,7 +1349,7 @@ mips64*-*linux*)
 	emul="${emul}64"
 	;;
     esac
-    case `/usr/bin/file conftest.$ac_objext` in
+    case `$FILECMD conftest.$ac_objext` in
       *MSB*)
 	emul="${emul}btsmip"
 	;;
@@ -1359,7 +1357,7 @@ mips64*-*linux*)
 	emul="${emul}ltsmip"
 	;;
     esac
-    case `/usr/bin/file conftest.$ac_objext` in
+    case `$FILECMD conftest.$ac_objext` in
       *N32*)
 	emul="${emul}n32"
 	;;
@@ -1379,14 +1377,14 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
   # not appear in the list.
   echo 'int i;' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
-    case `/usr/bin/file conftest.o` in
+    case `$FILECMD conftest.o` in
       *32-bit*)
 	case $host in
 	  x86_64-*kfreebsd*-gnu)
 	    LD="${LD-ld} -m elf_i386_fbsd"
 	    ;;
 	  x86_64-*linux*)
-	    case `/usr/bin/file conftest.o` in
+	    case `$FILECMD conftest.o` in
 	      *x86-64*)
 		LD="${LD-ld} -m elf32_x86_64"
 		;;
@@ -1454,7 +1452,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
   # options accordingly.
   echo 'int i;' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
-    case `/usr/bin/file conftest.o` in
+    case `$FILECMD conftest.o` in
     *64-bit*)
       case $lt_cv_prog_gnu_ld in
       yes*)
@@ -1493,9 +1491,22 @@ need_locks=$enable_libtool_lock
 m4_defun([_LT_PROG_AR],
 [AC_CHECK_TOOLS(AR, [ar], false)
 : ${AR=ar}
-: ${AR_FLAGS=cru}
 _LT_DECL([], [AR], [1], [The archiver])
-_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
+
+# Use ARFLAGS variable as AR's operation code to sync the variable naming with
+# Automake.  If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
+# higher priority because thats what people were doing historically (setting
+# ARFLAGS for automake and AR_FLAGS for libtool).  FIXME: Make the AR_FLAGS
+# variable obsoleted/removed.
+
+test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
+lt_ar_flags=$AR_FLAGS
+_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)])
+
+# Make AR_FLAGS overridable by 'make ARFLAGS='.  Don't try to run-time override
+# by AR_FLAGS because that was never working and AR_FLAGS is about to die.
+_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}],
+         [Flags to create an archive])
 
 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
   [lt_cv_ar_at_file=no
@@ -1714,7 +1725,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
     lt_cv_sys_max_cmd_len=8192;
     ;;
 
-  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
+  bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
     # This has been around since 386BSD, at least.  Likely further.
     if test -x /sbin/sysctl; then
       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
@@ -1757,7 +1768,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
   sysv5* | sco5v6* | sysv4.2uw2*)
     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
     if test -n "$kargmax"; then
-      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
+      lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[	 ]]//'`
     else
       lt_cv_sys_max_cmd_len=32768
     fi
@@ -2207,26 +2218,35 @@ m4_defun([_LT_CMD_STRIPLIB],
 striplib=
 old_striplib=
 AC_MSG_CHECKING([whether stripping libraries is possible])
-if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
-  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
-  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
-  AC_MSG_RESULT([yes])
+if test -z "$STRIP"; then
+  AC_MSG_RESULT([no])
 else
-# FIXME - insert some real tests, host_os isn't really good enough
-  case $host_os in
-  darwin*)
-    if test -n "$STRIP"; then
+  if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+    old_striplib="$STRIP --strip-debug"
+    striplib="$STRIP --strip-unneeded"
+    AC_MSG_RESULT([yes])
+  else
+    case $host_os in
+    darwin*)
+      # FIXME - insert some real tests, host_os isn't really good enough
       striplib="$STRIP -x"
       old_striplib="$STRIP -S"
       AC_MSG_RESULT([yes])
-    else
+      ;;
+    freebsd*)
+      if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
+        old_striplib="$STRIP --strip-debug"
+        striplib="$STRIP --strip-unneeded"
+        AC_MSG_RESULT([yes])
+      else
+        AC_MSG_RESULT([no])
+      fi
+      ;;
+    *)
       AC_MSG_RESULT([no])
-    fi
-    ;;
-  *)
-    AC_MSG_RESULT([no])
-    ;;
-  esac
+      ;;
+    esac
+  fi
 fi
 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
 _LT_DECL([], [striplib], [1])
@@ -2549,7 +2569,7 @@ cygwin* | mingw* | pw32* | cegcc*)
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
+      soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
 m4_if([$1], [],[
       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
       ;;
@@ -2559,14 +2579,14 @@ m4_if([$1], [],[
       ;;
     pw32*)
       # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
+      library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
       ;;
     esac
     dynamic_linker='Win32 ld.exe'
     ;;
 
-  *,cl*)
-    # Native MSVC
+  *,cl* | *,icl*)
+    # Native MSVC or ICC
     libname_spec='$name'
     soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
     library_names_spec='$libname.dll.lib'
@@ -2585,7 +2605,7 @@ m4_if([$1], [],[
       done
       IFS=$lt_save_ifs
       # Convert to MSYS style.
-      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
+      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
       ;;
     cygwin*)
       # Convert to unix form, then to dos form, then back to unix form
@@ -2622,7 +2642,7 @@ m4_if([$1], [],[
     ;;
 
   *)
-    # Assume MSVC wrapper
+    # Assume MSVC and ICC wrapper
     library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
     dynamic_linker='Win32 ld.exe'
     ;;
@@ -2655,7 +2675,7 @@ dgux*)
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
-freebsd* | dragonfly*)
+freebsd* | dragonfly* | midnightbsd*)
   # DragonFly does not have aout.  When/if they implement a new
   # versioning mechanism, adjust this.
   if test -x /usr/bin/objformat; then
@@ -3457,7 +3477,7 @@ beos*)
 
 bsdi[[45]]*)
   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
-  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  lt_cv_file_magic_cmd='$FILECMD -L'
   lt_cv_file_magic_test_file=/shlib/libc.so
   ;;
 
@@ -3491,14 +3511,14 @@ darwin* | rhapsody*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-freebsd* | dragonfly*)
+freebsd* | dragonfly* | midnightbsd*)
   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
     case $host_cpu in
     i*86 )
       # Not sure whether the presence of OpenBSD here was a mistake.
       # Let's accept both of them until this is cleared up.
       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
-      lt_cv_file_magic_cmd=/usr/bin/file
+      lt_cv_file_magic_cmd=$FILECMD
       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
       ;;
     esac
@@ -3512,7 +3532,7 @@ haiku*)
   ;;
 
 hpux10.20* | hpux11*)
-  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_cmd=$FILECMD
   case $host_cpu in
   ia64*)
     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
@@ -3559,7 +3579,7 @@ netbsd*)
 
 newos6*)
   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
-  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_cmd=$FILECMD
   lt_cv_file_magic_test_file=/usr/lib/libnls.so
   ;;
 
@@ -3686,13 +3706,13 @@ else
 	mingw*) lt_bad_file=conftest.nm/nofile ;;
 	*) lt_bad_file=/dev/null ;;
 	esac
-	case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
+	case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
 	*$lt_bad_file* | *'Invalid file or object type'*)
 	  lt_cv_path_NM="$tmp_nm -B"
 	  break 2
 	  ;;
 	*)
-	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+	  case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in
 	  */dev/null*)
 	    lt_cv_path_NM="$tmp_nm -p"
 	    break 2
@@ -3718,7 +3738,7 @@ else
     # Let the user override the test.
   else
     AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
-    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
+    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in
     *COFF*)
       DUMPBIN="$DUMPBIN -symbols -headers"
       ;;
@@ -3958,7 +3978,7 @@ esac
 
 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
   # Gets list of data symbols to import.
-  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
+  lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'"
   # Adjust the below global symbol transforms to fixup imported variables.
   lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
   lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
@@ -3976,20 +3996,20 @@ fi
 # Transform an extracted symbol line into a proper C declaration.
 # Some systems (esp. on ia64) link data and code symbols differently,
 # so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n"\
+lt_cv_sys_global_symbol_to_cdecl="$SED -n"\
 $lt_cdecl_hook\
 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
 
 # Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
+lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\
 $lt_c_name_hook\
 " -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
 " -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
 
 # Transform an extracted symbol line into symbol name with lib prefix and
 # symbol address.
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\
 $lt_c_name_lib_hook\
 " -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
 " -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
@@ -4013,7 +4033,7 @@ for ac_symprfx in "" "_"; do
   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
     # Fake it for dumpbin and say T for any non-static function,
     # D for any global variable and I for any imported variable.
-    # Also find C++ and __fastcall symbols from MSVC++,
+    # Also find C++ and __fastcall symbols from MSVC++ or ICC,
     # which start with @ or ?.
     lt_cv_sys_global_symbol_pipe="$AWK ['"\
 "     {last_section=section; section=\$ 3};"\
@@ -4031,9 +4051,9 @@ for ac_symprfx in "" "_"; do
 "     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
 "     ' prfx=^$ac_symprfx]"
   else
-    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+    lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
   fi
-  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
+  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'"
 
   # Check to see that the pipe works correctly.
   pipe_works=no
@@ -4320,7 +4340,7 @@ m4_if([$1], [CXX], [
 	    ;;
 	esac
 	;;
-      freebsd* | dragonfly*)
+      freebsd* | dragonfly* | midnightbsd*)
 	# FreeBSD uses GNU C++
 	;;
       hpux9* | hpux10* | hpux11*)
@@ -4403,7 +4423,7 @@ m4_if([$1], [CXX], [
 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
 	    ;;
 	  *)
-	    case `$CC -V 2>&1 | sed 5q` in
+	    case `$CC -V 2>&1 | $SED 5q` in
 	    *Sun\ C*)
 	      # Sun C++ 5.9
 	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
@@ -4739,7 +4759,7 @@ m4_if([$1], [CXX], [
 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
 	;;
       *)
-	case `$CC -V 2>&1 | sed 5q` in
+	case `$CC -V 2>&1 | $SED 5q` in
 	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
 	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
 	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
@@ -4922,7 +4942,7 @@ m4_if([$1], [CXX], [
     if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
       _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
     else
-      _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
+      _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
     fi
     ;;
   pw32*)
@@ -4930,7 +4950,7 @@ m4_if([$1], [CXX], [
     ;;
   cygwin* | mingw* | cegcc*)
     case $cc_basename in
-    cl*)
+    cl* | icl*)
       _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
       ;;
     *)
@@ -4987,15 +5007,15 @@ dnl Note also adjust exclude_expsyms for C++ above.
 
   case $host_os in
   cygwin* | mingw* | pw32* | cegcc*)
-    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
     # When not using gcc, we currently assume that we are using
-    # Microsoft Visual C++.
+    # Microsoft Visual C++ or Intel C++ Compiler.
     if test yes != "$GCC"; then
       with_gnu_ld=no
     fi
     ;;
   interix*)
-    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
     with_gnu_ld=yes
     ;;
   openbsd* | bitrig*)
@@ -5047,7 +5067,7 @@ dnl Note also adjust exclude_expsyms for C++ above.
       _LT_TAGVAR(whole_archive_flag_spec, $1)=
     fi
     supports_anon_versioning=no
-    case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
+    case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in
       *GNU\ gold*) supports_anon_versioning=yes ;;
       *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
@@ -5159,6 +5179,7 @@ _LT_EOF
 	emximp -o $lib $output_objdir/$libname.def'
       _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      _LT_TAGVAR(file_list_spec, $1)='@'
       ;;
 
     interix[[3-9]]*)
@@ -5173,7 +5194,7 @@ _LT_EOF
       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
       ;;
 
     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
@@ -5216,7 +5237,7 @@ _LT_EOF
 	  _LT_TAGVAR(compiler_needs_object, $1)=yes
 	  ;;
 	esac
-	case `$CC -V 2>&1 | sed 5q` in
+	case `$CC -V 2>&1 | $SED 5q` in
 	*Sun\ C*)			# Sun C 5.9
 	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
 	  _LT_TAGVAR(compiler_needs_object, $1)=yes
@@ -5228,7 +5249,7 @@ _LT_EOF
 
         if test yes = "$supports_anon_versioning"; then
           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
-            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+            cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
             echo "local: *; };" >> $output_objdir/$libname.ver~
             $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
         fi
@@ -5244,7 +5265,7 @@ _LT_EOF
 	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
 	  if test yes = "$supports_anon_versioning"; then
 	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
-              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+              cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
               echo "local: *; };" >> $output_objdir/$libname.ver~
               $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
 	  fi
@@ -5376,7 +5397,7 @@ _LT_EOF
 	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
 	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
 	else
-	  _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
+	  _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
 	fi
 	aix_use_runtimelinking=no
 
@@ -5559,12 +5580,12 @@ _LT_EOF
 
     cygwin* | mingw* | pw32* | cegcc*)
       # When not using gcc, we currently assume that we are using
-      # Microsoft Visual C++.
+      # Microsoft Visual C++ or Intel C++ Compiler.
       # hardcode_libdir_flag_spec is actually meaningless, as there is
       # no search path for DLLs.
       case $cc_basename in
-      cl*)
-	# Native MSVC
+      cl* | icl*)
+	# Native MSVC or ICC
 	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
 	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 	_LT_TAGVAR(always_export_symbols, $1)=yes
@@ -5605,7 +5626,7 @@ _LT_EOF
           fi'
 	;;
       *)
-	# Assume MSVC wrapper
+	# Assume MSVC and ICC wrapper
 	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
 	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 	# Tell ltmain to make .lib files, not .a files.
@@ -5653,7 +5674,7 @@ _LT_EOF
       ;;
 
     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-    freebsd* | dragonfly*)
+    freebsd* | dragonfly* | midnightbsd*)
       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
       _LT_TAGVAR(hardcode_direct, $1)=yes
@@ -5864,6 +5885,7 @@ _LT_EOF
 	emximp -o $lib $output_objdir/$libname.def'
       _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      _LT_TAGVAR(file_list_spec, $1)='@'
       ;;
 
     osf3*)
@@ -6634,8 +6656,8 @@ if test yes != "$_lt_caught_CXX_error"; then
 
       cygwin* | mingw* | pw32* | cegcc*)
 	case $GXX,$cc_basename in
-	,cl* | no,cl*)
-	  # Native MSVC
+	,cl* | no,cl* | ,icl* | no,icl*)
+	  # Native MSVC or ICC
 	  # hardcode_libdir_flag_spec is actually meaningless, as there is
 	  # no search path for DLLs.
 	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
@@ -6733,6 +6755,7 @@ if test yes != "$_lt_caught_CXX_error"; then
 	  emximp -o $lib $output_objdir/$libname.def'
 	_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
 	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+	_LT_TAGVAR(file_list_spec, $1)='@'
 	;;
 
       dgux*)
@@ -6763,7 +6786,7 @@ if test yes != "$_lt_caught_CXX_error"; then
         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
         ;;
 
-      freebsd* | dragonfly*)
+      freebsd* | dragonfly* | midnightbsd*)
         # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
         # conventions
         _LT_TAGVAR(ld_shlibs, $1)=yes
@@ -6900,7 +6923,7 @@ if test yes != "$_lt_caught_CXX_error"; then
 	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
 	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
 	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
 	;;
       irix5* | irix6*)
         case $cc_basename in
@@ -7040,13 +7063,13 @@ if test yes != "$_lt_caught_CXX_error"; then
 	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
 	    if test yes = "$supports_anon_versioning"; then
 	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
-                cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+                cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
                 echo "local: *; };" >> $output_objdir/$libname.ver~
                 $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
 	    fi
 	    ;;
 	  *)
-	    case `$CC -V 2>&1 | sed 5q` in
+	    case `$CC -V 2>&1 | $SED 5q` in
 	    *Sun\ C*)
 	      # Sun C++ 5.9
 	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
@@ -8192,6 +8215,14 @@ _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
 AC_SUBST([DLLTOOL])
 ])
 
+# _LT_DECL_FILECMD
+# ----------------
+# Check for a file(cmd) program that can be used to detect file type and magic
+m4_defun([_LT_DECL_FILECMD],
+[AC_CHECK_TOOL([FILECMD], [file], [:])
+_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types])
+])# _LD_DECL_FILECMD
+
 # _LT_DECL_SED
 # ------------
 # Check for a fully-functional sed program, that truncates
diff --git a/m4/ltoptions.m4 b/m4/ltoptions.m4
index 94b0829..b0b5e9c 100644
--- a/m4/ltoptions.m4
+++ b/m4/ltoptions.m4
@@ -1,7 +1,7 @@
 # Helper functions for option handling.                    -*- Autoconf -*-
 #
-#   Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
-#   Foundation, Inc.
+#   Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free
+#   Software Foundation, Inc.
 #   Written by Gary V. Vaughan, 2004
 #
 # This file is free software; the Free Software Foundation gives
diff --git a/m4/ltsugar.m4 b/m4/ltsugar.m4
index 48bc934..902508b 100644
--- a/m4/ltsugar.m4
+++ b/m4/ltsugar.m4
@@ -1,6 +1,6 @@
 # ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
 #
-# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
+# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software
 # Foundation, Inc.
 # Written by Gary V. Vaughan, 2004
 #
diff --git a/m4/ltversion.m4 b/m4/ltversion.m4
index fa04b52..b155d0a 100644
--- a/m4/ltversion.m4
+++ b/m4/ltversion.m4
@@ -1,6 +1,7 @@
 # ltversion.m4 -- version numbers			-*- Autoconf -*-
 #
-#   Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
+#   Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation,
+#   Inc.
 #   Written by Scott James Remnant, 2004
 #
 # This file is free software; the Free Software Foundation gives
@@ -9,15 +10,15 @@
 
 # @configure_input@
 
-# serial 4179 ltversion.m4
+# serial 4245 ltversion.m4
 # This file is part of GNU Libtool
 
-m4_define([LT_PACKAGE_VERSION], [2.4.6])
-m4_define([LT_PACKAGE_REVISION], [2.4.6])
+m4_define([LT_PACKAGE_VERSION], [2.4.7])
+m4_define([LT_PACKAGE_REVISION], [2.4.7])
 
 AC_DEFUN([LTVERSION_VERSION],
-[macro_version='2.4.6'
-macro_revision='2.4.6'
+[macro_version='2.4.7'
+macro_revision='2.4.7'
 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
 _LT_DECL(, macro_revision, 0)
 ])
diff --git a/m4/lt~obsolete.m4 b/m4/lt~obsolete.m4
index c6b26f8..0f7a875 100644
--- a/m4/lt~obsolete.m4
+++ b/m4/lt~obsolete.m4
@@ -1,7 +1,7 @@
 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
 #
-#   Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
-#   Foundation, Inc.
+#   Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free
+#   Software Foundation, Inc.
 #   Written by Scott James Remnant, 2004.
 #
 # This file is free software; the Free Software Foundation gives
diff --git a/media/Makefile.in b/media/Makefile.in
index e189598..ad1fb4c 100644
--- a/media/Makefile.in
+++ b/media/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -141,6 +141,8 @@ CHECK_CFLAGS = @CHECK_CFLAGS@
 CHECK_LIBS = @CHECK_LIBS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
@@ -152,8 +154,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@
 GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@
 GEE_CFLAGS = @GEE_CFLAGS@
@@ -280,6 +284,7 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -338,7 +343,6 @@ ctags CTAGS:
 
 cscope cscopelist:
 
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/missing b/missing
index 625aeb1..1fe1611 100755
--- a/missing
+++ b/missing
@@ -3,7 +3,7 @@
 
 scriptversion=2018-03-07.03; # UTC
 
-# Copyright (C) 1996-2018 Free Software Foundation, Inc.
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
 # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 2b892b6..4ecb34a 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -11,15 +11,13 @@ endif
 
 # Automake documentation mentions LDADD, but it does not work;
 # LIBS does.
-LIBS += $(top_builddir)/libdmapsharing/libdmapsharing-3.0.la
+LIBS += $(top_builddir)/libdmapsharing/libdmapsharing-4.0.la
 
 if HAVE_CHECK
 noinst_PROGRAMS += unit-test
 endif
-endif
 
 test_dmap_client_SOURCES = \
-	test-dmap-db.c \
 	test-dmap-client.c
 
 test_dmap_client_LDADD = \
@@ -33,9 +31,6 @@ test_dmap_client_LDADD = \
 	$(MDNS_LIBS)
 
 test_dmap_server_SOURCES = \
-	test-dmap-db.c \
-	test-dmap-container-record.c \
-	test-dmap-container-db.c \
 	test-dmap-server.c
 
 test_dmap_server_LDADD = \
@@ -49,16 +44,16 @@ test_dmap_server_LDADD = \
 	$(MDNS_LIBS)
 
 dacplisten.c: $(dacplisten_VALASOURCES)
-	$(VALAC) --vapidir=../vala --pkg gee-0.8 --pkg gstreamer-1.0 --pkg libdmapsharing-3.0 --pkg libsoup-2.4 --pkg gio-2.0 --pkg avahi-gobject  $^ -C
+	$(VALAC) --vapidir=../vala --pkg gee-0.8 --pkg gstreamer-1.0 --pkg libdmapsharing-4.0 --pkg libsoup-3.0 --pkg gio-2.0 --pkg avahi-gobject  $^ -C
 
 dpapview.c: $(dpapview_VALASOURCES)
-	$(VALAC) --vapidir=../vala --pkg gee-0.8 --pkg gtk+-3.0 --pkg gstreamer-1.0 --pkg libdmapsharing-3.0 --pkg libsoup-2.4 --pkg gio-2.0 --pkg avahi-gobject $^ -C
+	$(VALAC) --vapidir=../vala --pkg gee-0.8 --pkg gtk+-3.0 --pkg gstreamer-1.0 --pkg libdmapsharing-4.0 --pkg libsoup-3.0 --pkg gio-2.0 --pkg avahi-gobject $^ -C
 
 dmapcopy.c: $(dmapcopy_VALASOURCES)
-	$(VALAC) --vapidir=../vala --pkg gee-0.8 --pkg gstreamer-1.0 --pkg libdmapsharing-3.0 --pkg libsoup-2.4 --pkg gio-2.0 --pkg avahi-gobject $^ -C
+	$(VALAC) --vapidir=../vala --pkg gee-0.8 --pkg gstreamer-1.0 --pkg libdmapsharing-4.0 --pkg libsoup-3.0 --pkg gio-2.0 --pkg avahi-gobject $^ -C
 
 dmapserve.c: $(dmapserve_VALASOURCES)
-	$(VALAC) --vapidir=../vala --pkg gee-0.8 --pkg gstreamer-1.0 --pkg libdmapsharing-3.0 --pkg libsoup-2.4 --pkg gio-2.0 --pkg avahi-gobject $^ -C
+	$(VALAC) --vapidir=../vala --pkg gee-0.8 --pkg gstreamer-1.0 --pkg libdmapsharing-4.0 --pkg libsoup-3.0 --pkg gio-2.0 --pkg avahi-gobject $^ -C
 
 dacplisten_VALASOURCES = \
 	dacplisten.vala \
@@ -76,7 +71,7 @@ dacplisten_LDADD = \
 dpapview_VALASOURCES = \
 	dpapview.vala \
 	vala-dmap-db.vala \
-	vala-dpap-record.vala
+	vala-image-record.vala
 
 dpapview_VALABUILTSOURCES = $(dpapview_VALASOURCES:.vala=.c)
 
@@ -90,7 +85,7 @@ dpapview_LDADD = \
 dmapcopy_VALASOURCES = \
 	dmapcopy.vala \
 	vala-dmap-db.vala \
-	vala-dpap-record.vala
+	vala-image-record.vala
 
 dmapcopy_VALABUILTSOURCES = $(dmapcopy_VALASOURCES:.vala=.c)
 
@@ -103,7 +98,7 @@ dmapcopy_LDADD = \
 dmapserve_VALASOURCES = \
 	dmapserve.vala \
 	vala-dmap-db.vala \
-	vala-dpap-record.vala \
+	vala-image-record.vala \
 	vala-dmap-container-db.vala
 
 dmapserve_VALABUILTSOURCES = $(dmapserve_VALASOURCES:.vala=.c)
@@ -135,11 +130,6 @@ AM_CPPFLAGS = \
 	$(MDNS_CFLAGS) \
 	$(SOUP_CFLAGS)
 
-noinst_HEADERS = \
-	test-dmap-container-record.h \
-	test-dmap-container-db.h \
-	test-dmap-db.h
-
 EXTRA_DIST = \
 	$(dacplisten_VALABUILTSOURCES) \
 	$(dacplisten_VALASOURCES) \
@@ -159,3 +149,4 @@ CLEANFILES = \
 	$(dpapview_VALABUILTSOURCES) \
 	$(dpapview_VALABUILTSOURCES)
 endif
+endif
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 66ac8f1..495d13e 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,7 +14,6 @@
 
 @SET_MAKE@
 
-
 VPATH = @srcdir@
 am__is_gnu_make = { \
   if test -z '$(MAKELEVEL)'; then \
@@ -97,7 +96,7 @@ host_triplet = @host@
 
 # Automake documentation mentions LDADD, but it does not work;
 # LIBS does.
-@TESTS_ENABLED_TRUE@am__append_3 = $(top_builddir)/libdmapsharing/libdmapsharing-3.0.la
+@TESTS_ENABLED_TRUE@am__append_3 = $(top_builddir)/libdmapsharing/libdmapsharing-4.0.la
 @HAVE_CHECK_TRUE@@TESTS_ENABLED_TRUE@am__append_4 = unit-test
 subdir = tests
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -108,8 +107,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/as-compiler-flag.m4 \
 	$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
-	$(am__DIST_COMMON)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -123,54 +121,79 @@ CONFIG_CLEAN_VPATH_FILES =
 @HAVE_CHECK_TRUE@@TESTS_ENABLED_TRUE@am__EXEEXT_3 =  \
 @HAVE_CHECK_TRUE@@TESTS_ENABLED_TRUE@	unit-test$(EXEEXT)
 PROGRAMS = $(noinst_PROGRAMS)
-am__objects_1 = dacplisten.$(OBJEXT) vala-dmap-db.$(OBJEXT) \
-	vala-dmap-container-db.$(OBJEXT)
-am__objects_2 = $(am__objects_1)
-am_dacplisten_OBJECTS = $(am__objects_2)
+am__dacplisten_SOURCES_DIST = dacplisten.c vala-dmap-db.c \
+	vala-dmap-container-db.c
+@TESTS_ENABLED_TRUE@am__objects_1 = dacplisten.$(OBJEXT) \
+@TESTS_ENABLED_TRUE@	vala-dmap-db.$(OBJEXT) \
+@TESTS_ENABLED_TRUE@	vala-dmap-container-db.$(OBJEXT)
+@TESTS_ENABLED_TRUE@am__objects_2 = $(am__objects_1)
+@TESTS_ENABLED_TRUE@am_dacplisten_OBJECTS = $(am__objects_2)
 dacplisten_OBJECTS = $(am_dacplisten_OBJECTS)
 am__DEPENDENCIES_1 =
-dacplisten_DEPENDENCIES = $(am__DEPENDENCIES_1)
+@TESTS_ENABLED_TRUE@dacplisten_DEPENDENCIES = $(am__DEPENDENCIES_1)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
 am__v_lt_0 = --silent
 am__v_lt_1 = 
-am__objects_3 = dmapcopy.$(OBJEXT) vala-dmap-db.$(OBJEXT) \
-	vala-dpap-record.$(OBJEXT)
-am__objects_4 = $(am__objects_3)
-am_dmapcopy_OBJECTS = $(am__objects_4)
+am__dmapcopy_SOURCES_DIST = dmapcopy.c vala-dmap-db.c \
+	vala-image-record.c
+@TESTS_ENABLED_TRUE@am__objects_3 = dmapcopy.$(OBJEXT) \
+@TESTS_ENABLED_TRUE@	vala-dmap-db.$(OBJEXT) \
+@TESTS_ENABLED_TRUE@	vala-image-record.$(OBJEXT)
+@TESTS_ENABLED_TRUE@am__objects_4 = $(am__objects_3)
+@TESTS_ENABLED_TRUE@am_dmapcopy_OBJECTS = $(am__objects_4)
 dmapcopy_OBJECTS = $(am_dmapcopy_OBJECTS)
-dmapcopy_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_5 = dmapserve.$(OBJEXT) vala-dmap-db.$(OBJEXT) \
-	vala-dpap-record.$(OBJEXT) vala-dmap-container-db.$(OBJEXT)
-am__objects_6 = $(am__objects_5)
-am_dmapserve_OBJECTS = $(am__objects_6)
+@TESTS_ENABLED_TRUE@dmapcopy_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__dmapserve_SOURCES_DIST = dmapserve.c vala-dmap-db.c \
+	vala-image-record.c vala-dmap-container-db.c
+@TESTS_ENABLED_TRUE@am__objects_5 = dmapserve.$(OBJEXT) \
+@TESTS_ENABLED_TRUE@	vala-dmap-db.$(OBJEXT) \
+@TESTS_ENABLED_TRUE@	vala-image-record.$(OBJEXT) \
+@TESTS_ENABLED_TRUE@	vala-dmap-container-db.$(OBJEXT)
+@TESTS_ENABLED_TRUE@am__objects_6 = $(am__objects_5)
+@TESTS_ENABLED_TRUE@am_dmapserve_OBJECTS = $(am__objects_6)
 dmapserve_OBJECTS = $(am_dmapserve_OBJECTS)
-dmapserve_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_7 = dpapview.$(OBJEXT) vala-dmap-db.$(OBJEXT) \
-	vala-dpap-record.$(OBJEXT)
-am__objects_8 = $(am__objects_7)
-am_dpapview_OBJECTS = $(am__objects_8)
+@TESTS_ENABLED_TRUE@dmapserve_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__dpapview_SOURCES_DIST = dpapview.c vala-dmap-db.c \
+	vala-image-record.c
+@TESTS_ENABLED_TRUE@am__objects_7 = dpapview.$(OBJEXT) \
+@TESTS_ENABLED_TRUE@	vala-dmap-db.$(OBJEXT) \
+@TESTS_ENABLED_TRUE@	vala-image-record.$(OBJEXT)
+@TESTS_ENABLED_TRUE@am__objects_8 = $(am__objects_7)
+@TESTS_ENABLED_TRUE@am_dpapview_OBJECTS = $(am__objects_8)
 dpapview_OBJECTS = $(am_dpapview_OBJECTS)
-dpapview_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
-am_test_dmap_client_OBJECTS = test-dmap-db.$(OBJEXT) \
-	test-dmap-client.$(OBJEXT)
+@TESTS_ENABLED_TRUE@dpapview_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+@TESTS_ENABLED_TRUE@	$(am__DEPENDENCIES_1)
+am__test_dmap_client_SOURCES_DIST = test-dmap-client.c
+@TESTS_ENABLED_TRUE@am_test_dmap_client_OBJECTS =  \
+@TESTS_ENABLED_TRUE@	test-dmap-client.$(OBJEXT)
 test_dmap_client_OBJECTS = $(am_test_dmap_client_OBJECTS)
-test_dmap_client_DEPENDENCIES = $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
-am_test_dmap_server_OBJECTS = test-dmap-db.$(OBJEXT) \
-	test-dmap-container-record.$(OBJEXT) \
-	test-dmap-container-db.$(OBJEXT) test-dmap-server.$(OBJEXT)
+@TESTS_ENABLED_TRUE@test_dmap_client_DEPENDENCIES =  \
+@TESTS_ENABLED_TRUE@	$(am__DEPENDENCIES_1) \
+@TESTS_ENABLED_TRUE@	$(am__DEPENDENCIES_1) \
+@TESTS_ENABLED_TRUE@	$(am__DEPENDENCIES_1) \
+@TESTS_ENABLED_TRUE@	$(am__DEPENDENCIES_1) \
+@TESTS_ENABLED_TRUE@	$(am__DEPENDENCIES_1) \
+@TESTS_ENABLED_TRUE@	$(am__DEPENDENCIES_1) \
+@TESTS_ENABLED_TRUE@	$(am__DEPENDENCIES_1)
+am__test_dmap_server_SOURCES_DIST = test-dmap-server.c
+@TESTS_ENABLED_TRUE@am_test_dmap_server_OBJECTS =  \
+@TESTS_ENABLED_TRUE@	test-dmap-server.$(OBJEXT)
 test_dmap_server_OBJECTS = $(am_test_dmap_server_OBJECTS)
-test_dmap_server_DEPENDENCIES = $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
-am_unit_test_OBJECTS = unit-test.$(OBJEXT)
+@TESTS_ENABLED_TRUE@test_dmap_server_DEPENDENCIES =  \
+@TESTS_ENABLED_TRUE@	$(am__DEPENDENCIES_1) \
+@TESTS_ENABLED_TRUE@	$(am__DEPENDENCIES_1) \
+@TESTS_ENABLED_TRUE@	$(am__DEPENDENCIES_1) \
+@TESTS_ENABLED_TRUE@	$(am__DEPENDENCIES_1) \
+@TESTS_ENABLED_TRUE@	$(am__DEPENDENCIES_1) \
+@TESTS_ENABLED_TRUE@	$(am__DEPENDENCIES_1) \
+@TESTS_ENABLED_TRUE@	$(am__DEPENDENCIES_1)
+am__unit_test_SOURCES_DIST = unit-test.c
+@TESTS_ENABLED_TRUE@am_unit_test_OBJECTS = unit-test.$(OBJEXT)
 unit_test_OBJECTS = $(am_unit_test_OBJECTS)
-unit_test_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1)
+@TESTS_ENABLED_TRUE@unit_test_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+@TESTS_ENABLED_TRUE@	$(am__DEPENDENCIES_1) \
+@TESTS_ENABLED_TRUE@	$(am__DEPENDENCIES_1)
 AM_V_P = $(am__v_P_@AM_V@)
 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
 am__v_P_0 = false
@@ -189,11 +212,9 @@ am__maybe_remake_depfiles = depfiles
 am__depfiles_remade = ./$(DEPDIR)/dacplisten.Po \
 	./$(DEPDIR)/dmapcopy.Po ./$(DEPDIR)/dmapserve.Po \
 	./$(DEPDIR)/dpapview.Po ./$(DEPDIR)/test-dmap-client.Po \
-	./$(DEPDIR)/test-dmap-container-db.Po \
-	./$(DEPDIR)/test-dmap-container-record.Po \
-	./$(DEPDIR)/test-dmap-db.Po ./$(DEPDIR)/test-dmap-server.Po \
-	./$(DEPDIR)/unit-test.Po ./$(DEPDIR)/vala-dmap-container-db.Po \
-	./$(DEPDIR)/vala-dmap-db.Po ./$(DEPDIR)/vala-dpap-record.Po
+	./$(DEPDIR)/test-dmap-server.Po ./$(DEPDIR)/unit-test.Po \
+	./$(DEPDIR)/vala-dmap-container-db.Po \
+	./$(DEPDIR)/vala-dmap-db.Po ./$(DEPDIR)/vala-image-record.Po
 am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -217,16 +238,17 @@ SOURCES = $(dacplisten_SOURCES) $(dmapcopy_SOURCES) \
 	$(dmapserve_SOURCES) $(dpapview_SOURCES) \
 	$(test_dmap_client_SOURCES) $(test_dmap_server_SOURCES) \
 	$(unit_test_SOURCES)
-DIST_SOURCES = $(dacplisten_SOURCES) $(dmapcopy_SOURCES) \
-	$(dmapserve_SOURCES) $(dpapview_SOURCES) \
-	$(test_dmap_client_SOURCES) $(test_dmap_server_SOURCES) \
-	$(unit_test_SOURCES)
+DIST_SOURCES = $(am__dacplisten_SOURCES_DIST) \
+	$(am__dmapcopy_SOURCES_DIST) $(am__dmapserve_SOURCES_DIST) \
+	$(am__dpapview_SOURCES_DIST) \
+	$(am__test_dmap_client_SOURCES_DIST) \
+	$(am__test_dmap_server_SOURCES_DIST) \
+	$(am__unit_test_SOURCES_DIST)
 am__can_run_installinfo = \
   case $$AM_UPDATE_INFO_DIR in \
     n|no|NO) false;; \
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
-HEADERS = $(noinst_HEADERS)
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
 # Read a list of newline-separated strings from the standard input,
 # and print each of them once, without duplicates.  Input order is
@@ -244,8 +266,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -266,6 +286,8 @@ CHECK_CFLAGS = @CHECK_CFLAGS@
 CHECK_LIBS = @CHECK_LIBS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
@@ -277,8 +299,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@
 GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@
 GEE_CFLAGS = @GEE_CFLAGS@
@@ -405,6 +429,7 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -413,129 +438,120 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-test_dmap_client_SOURCES = \
-	test-dmap-db.c \
-	test-dmap-client.c
-
-test_dmap_client_LDADD = \
-	$(GLIB_LIBS) \
-	$(GTHREAD_LIBS) \
-	$(GSTREAMERAPP_LIBS) \
-	$(GOBJECT_LIBS) \
-	$(GDKPIXBUF_LIBS) \
-	$(SOUP_LIBS) \
-	$(IMAGEMAGICK_LIBS) \
-	$(MDNS_LIBS)
-
-test_dmap_server_SOURCES = \
-	test-dmap-db.c \
-	test-dmap-container-record.c \
-	test-dmap-container-db.c \
-	test-dmap-server.c
-
-test_dmap_server_LDADD = \
-	$(GLIB_LIBS) \
-	$(GTHREAD_LIBS) \
-	$(GSTREAMERAPP_LIBS) \
-	$(GOBJECT_LIBS) \
-	$(GDKPIXBUF_LIBS) \
-	$(SOUP_LIBS) \
-	$(IMAGEMAGICK_LIBS) \
-	$(MDNS_LIBS)
-
-dacplisten_VALASOURCES = \
-	dacplisten.vala \
-	vala-dmap-db.vala \
-	vala-dmap-container-db.vala
-
-dacplisten_VALABUILTSOURCES = $(dacplisten_VALASOURCES:.vala=.c)
-dacplisten_SOURCES = \
-	$(dacplisten_VALABUILTSOURCES)
-
-dacplisten_LDADD = \
-	$(GEE_LIBS)
-
-dpapview_VALASOURCES = \
-	dpapview.vala \
-	vala-dmap-db.vala \
-	vala-dpap-record.vala
-
-dpapview_VALABUILTSOURCES = $(dpapview_VALASOURCES:.vala=.c)
-dpapview_SOURCES = \
-	$(dpapview_VALABUILTSOURCES)
-
-dpapview_LDADD = \
-	$(GTK_LIBS) \
-	$(GEE_LIBS)
-
-dmapcopy_VALASOURCES = \
-	dmapcopy.vala \
-	vala-dmap-db.vala \
-	vala-dpap-record.vala
-
-dmapcopy_VALABUILTSOURCES = $(dmapcopy_VALASOURCES:.vala=.c)
-dmapcopy_SOURCES = \
-	$(dmapcopy_VALABUILTSOURCES)
-
-dmapcopy_LDADD = \
-	$(GEE_LIBS)
-
-dmapserve_VALASOURCES = \
-	dmapserve.vala \
-	vala-dmap-db.vala \
-	vala-dpap-record.vala \
-	vala-dmap-container-db.vala
-
-dmapserve_VALABUILTSOURCES = $(dmapserve_VALASOURCES:.vala=.c)
-dmapserve_SOURCES = \
-	$(dmapserve_VALABUILTSOURCES)
-
-dmapserve_LDADD = \
-	$(GEE_LIBS)
-
-unit_test_SOURCES = \
-	unit-test.c
-
-unit_test_LDADD = \
-	$(CHECK_LIBS) \
-	$(GLIB_LIBS) \
-	$(GOBJECT_LIBS)
-
-AM_CPPFLAGS = \
-	-I$(top_srcdir) \
-	$(GDKPIXBUF_CFLAGS) \
-	$(GEE_CFLAGS) \
-	$(GLIB_CFLAGS) \
-	$(GOBJECT_CFLAGS) \
-	$(GSTREAMERAPP_CFLAGS) \
-	$(GTHREAD_CFLAGS) \
-	$(GTK_CFLAGS) \
-	$(IMAGEMAGICK_CFLAGS) \
-	$(MDNS_CFLAGS) \
-	$(SOUP_CFLAGS)
-
-noinst_HEADERS = \
-	test-dmap-container-record.h \
-	test-dmap-container-db.h \
-	test-dmap-db.h
-
-EXTRA_DIST = \
-	$(dacplisten_VALABUILTSOURCES) \
-	$(dacplisten_VALASOURCES) \
-	$(dmapcopy_VALABUILTSOURCES) \
-	$(dmapcopy_VALASOURCES) \
-	$(dmapserve_VALABUILTSOURCES) \
-	$(dmapserve_VALASOURCES) \
-	$(dpapview_VALABUILTSOURCES) \
-	$(dpapview_VALASOURCES) \
-	dpapview.ui
-
-@HAVE_VALAC_TRUE@CLEANFILES = \
-@HAVE_VALAC_TRUE@	$(dacplisten_VALABUILTSOURCES) \
-@HAVE_VALAC_TRUE@	$(dmapcopy_VALABUILTSOURCES) \
-@HAVE_VALAC_TRUE@	$(dmapserve_VALABUILTSOURCES) \
-@HAVE_VALAC_TRUE@	$(dpapview_VALABUILTSOURCES) \
-@HAVE_VALAC_TRUE@	$(dpapview_VALABUILTSOURCES)
+@TESTS_ENABLED_TRUE@test_dmap_client_SOURCES = \
+@TESTS_ENABLED_TRUE@	test-dmap-client.c
+
+@TESTS_ENABLED_TRUE@test_dmap_client_LDADD = \
+@TESTS_ENABLED_TRUE@	$(GLIB_LIBS) \
+@TESTS_ENABLED_TRUE@	$(GTHREAD_LIBS) \
+@TESTS_ENABLED_TRUE@	$(GSTREAMERAPP_LIBS) \
+@TESTS_ENABLED_TRUE@	$(GOBJECT_LIBS) \
+@TESTS_ENABLED_TRUE@	$(GDKPIXBUF_LIBS) \
+@TESTS_ENABLED_TRUE@	$(SOUP_LIBS) \
+@TESTS_ENABLED_TRUE@	$(IMAGEMAGICK_LIBS) \
+@TESTS_ENABLED_TRUE@	$(MDNS_LIBS)
+
+@TESTS_ENABLED_TRUE@test_dmap_server_SOURCES = \
+@TESTS_ENABLED_TRUE@	test-dmap-server.c
+
+@TESTS_ENABLED_TRUE@test_dmap_server_LDADD = \
+@TESTS_ENABLED_TRUE@	$(GLIB_LIBS) \
+@TESTS_ENABLED_TRUE@	$(GTHREAD_LIBS) \
+@TESTS_ENABLED_TRUE@	$(GSTREAMERAPP_LIBS) \
+@TESTS_ENABLED_TRUE@	$(GOBJECT_LIBS) \
+@TESTS_ENABLED_TRUE@	$(GDKPIXBUF_LIBS) \
+@TESTS_ENABLED_TRUE@	$(SOUP_LIBS) \
+@TESTS_ENABLED_TRUE@	$(IMAGEMAGICK_LIBS) \
+@TESTS_ENABLED_TRUE@	$(MDNS_LIBS)
+
+@TESTS_ENABLED_TRUE@dacplisten_VALASOURCES = \
+@TESTS_ENABLED_TRUE@	dacplisten.vala \
+@TESTS_ENABLED_TRUE@	vala-dmap-db.vala \
+@TESTS_ENABLED_TRUE@	vala-dmap-container-db.vala
+
+@TESTS_ENABLED_TRUE@dacplisten_VALABUILTSOURCES = $(dacplisten_VALASOURCES:.vala=.c)
+@TESTS_ENABLED_TRUE@dacplisten_SOURCES = \
+@TESTS_ENABLED_TRUE@	$(dacplisten_VALABUILTSOURCES)
+
+@TESTS_ENABLED_TRUE@dacplisten_LDADD = \
+@TESTS_ENABLED_TRUE@	$(GEE_LIBS)
+
+@TESTS_ENABLED_TRUE@dpapview_VALASOURCES = \
+@TESTS_ENABLED_TRUE@	dpapview.vala \
+@TESTS_ENABLED_TRUE@	vala-dmap-db.vala \
+@TESTS_ENABLED_TRUE@	vala-image-record.vala
+
+@TESTS_ENABLED_TRUE@dpapview_VALABUILTSOURCES = $(dpapview_VALASOURCES:.vala=.c)
+@TESTS_ENABLED_TRUE@dpapview_SOURCES = \
+@TESTS_ENABLED_TRUE@	$(dpapview_VALABUILTSOURCES)
+
+@TESTS_ENABLED_TRUE@dpapview_LDADD = \
+@TESTS_ENABLED_TRUE@	$(GTK_LIBS) \
+@TESTS_ENABLED_TRUE@	$(GEE_LIBS)
+
+@TESTS_ENABLED_TRUE@dmapcopy_VALASOURCES = \
+@TESTS_ENABLED_TRUE@	dmapcopy.vala \
+@TESTS_ENABLED_TRUE@	vala-dmap-db.vala \
+@TESTS_ENABLED_TRUE@	vala-image-record.vala
+
+@TESTS_ENABLED_TRUE@dmapcopy_VALABUILTSOURCES = $(dmapcopy_VALASOURCES:.vala=.c)
+@TESTS_ENABLED_TRUE@dmapcopy_SOURCES = \
+@TESTS_ENABLED_TRUE@	$(dmapcopy_VALABUILTSOURCES)
+
+@TESTS_ENABLED_TRUE@dmapcopy_LDADD = \
+@TESTS_ENABLED_TRUE@	$(GEE_LIBS)
+
+@TESTS_ENABLED_TRUE@dmapserve_VALASOURCES = \
+@TESTS_ENABLED_TRUE@	dmapserve.vala \
+@TESTS_ENABLED_TRUE@	vala-dmap-db.vala \
+@TESTS_ENABLED_TRUE@	vala-image-record.vala \
+@TESTS_ENABLED_TRUE@	vala-dmap-container-db.vala
+
+@TESTS_ENABLED_TRUE@dmapserve_VALABUILTSOURCES = $(dmapserve_VALASOURCES:.vala=.c)
+@TESTS_ENABLED_TRUE@dmapserve_SOURCES = \
+@TESTS_ENABLED_TRUE@	$(dmapserve_VALABUILTSOURCES)
+
+@TESTS_ENABLED_TRUE@dmapserve_LDADD = \
+@TESTS_ENABLED_TRUE@	$(GEE_LIBS)
+
+@TESTS_ENABLED_TRUE@unit_test_SOURCES = \
+@TESTS_ENABLED_TRUE@	unit-test.c
+
+@TESTS_ENABLED_TRUE@unit_test_LDADD = \
+@TESTS_ENABLED_TRUE@	$(CHECK_LIBS) \
+@TESTS_ENABLED_TRUE@	$(GLIB_LIBS) \
+@TESTS_ENABLED_TRUE@	$(GOBJECT_LIBS)
+
+@TESTS_ENABLED_TRUE@AM_CPPFLAGS = \
+@TESTS_ENABLED_TRUE@	-I$(top_srcdir) \
+@TESTS_ENABLED_TRUE@	$(GDKPIXBUF_CFLAGS) \
+@TESTS_ENABLED_TRUE@	$(GEE_CFLAGS) \
+@TESTS_ENABLED_TRUE@	$(GLIB_CFLAGS) \
+@TESTS_ENABLED_TRUE@	$(GOBJECT_CFLAGS) \
+@TESTS_ENABLED_TRUE@	$(GSTREAMERAPP_CFLAGS) \
+@TESTS_ENABLED_TRUE@	$(GTHREAD_CFLAGS) \
+@TESTS_ENABLED_TRUE@	$(GTK_CFLAGS) \
+@TESTS_ENABLED_TRUE@	$(IMAGEMAGICK_CFLAGS) \
+@TESTS_ENABLED_TRUE@	$(MDNS_CFLAGS) \
+@TESTS_ENABLED_TRUE@	$(SOUP_CFLAGS)
+
+@TESTS_ENABLED_TRUE@EXTRA_DIST = \
+@TESTS_ENABLED_TRUE@	$(dacplisten_VALABUILTSOURCES) \
+@TESTS_ENABLED_TRUE@	$(dacplisten_VALASOURCES) \
+@TESTS_ENABLED_TRUE@	$(dmapcopy_VALABUILTSOURCES) \
+@TESTS_ENABLED_TRUE@	$(dmapcopy_VALASOURCES) \
+@TESTS_ENABLED_TRUE@	$(dmapserve_VALABUILTSOURCES) \
+@TESTS_ENABLED_TRUE@	$(dmapserve_VALASOURCES) \
+@TESTS_ENABLED_TRUE@	$(dpapview_VALABUILTSOURCES) \
+@TESTS_ENABLED_TRUE@	$(dpapview_VALASOURCES) \
+@TESTS_ENABLED_TRUE@	dpapview.ui
+
+@HAVE_VALAC_TRUE@@TESTS_ENABLED_TRUE@CLEANFILES = \
+@HAVE_VALAC_TRUE@@TESTS_ENABLED_TRUE@	$(dacplisten_VALABUILTSOURCES) \
+@HAVE_VALAC_TRUE@@TESTS_ENABLED_TRUE@	$(dmapcopy_VALABUILTSOURCES) \
+@HAVE_VALAC_TRUE@@TESTS_ENABLED_TRUE@	$(dmapserve_VALABUILTSOURCES) \
+@HAVE_VALAC_TRUE@@TESTS_ENABLED_TRUE@	$(dpapview_VALABUILTSOURCES) \
+@HAVE_VALAC_TRUE@@TESTS_ENABLED_TRUE@	$(dpapview_VALABUILTSOURCES)
 
 all: all-am
 
@@ -619,14 +635,11 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmapserve.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dpapview.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dmap-client.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dmap-container-db.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dmap-container-record.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dmap-db.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dmap-server.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit-test.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vala-dmap-container-db.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vala-dmap-db.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vala-dpap-record.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vala-image-record.Po@am__quote@ # am--include-marker
 
 $(am__depfiles_remade):
 	@$(MKDIR_P) $(@D)
@@ -712,7 +725,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
@@ -748,7 +760,7 @@ distdir-am: $(DISTFILES)
 	done
 check-am: all-am
 check: check-am
-all-am: Makefile $(PROGRAMS) $(HEADERS)
+all-am: Makefile $(PROGRAMS)
 installdirs:
 install: install-am
 install-exec: install-exec-am
@@ -792,14 +804,11 @@ distclean: distclean-am
 	-rm -f ./$(DEPDIR)/dmapserve.Po
 	-rm -f ./$(DEPDIR)/dpapview.Po
 	-rm -f ./$(DEPDIR)/test-dmap-client.Po
-	-rm -f ./$(DEPDIR)/test-dmap-container-db.Po
-	-rm -f ./$(DEPDIR)/test-dmap-container-record.Po
-	-rm -f ./$(DEPDIR)/test-dmap-db.Po
 	-rm -f ./$(DEPDIR)/test-dmap-server.Po
 	-rm -f ./$(DEPDIR)/unit-test.Po
 	-rm -f ./$(DEPDIR)/vala-dmap-container-db.Po
 	-rm -f ./$(DEPDIR)/vala-dmap-db.Po
-	-rm -f ./$(DEPDIR)/vala-dpap-record.Po
+	-rm -f ./$(DEPDIR)/vala-image-record.Po
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
 	distclean-tags
@@ -850,14 +859,11 @@ maintainer-clean: maintainer-clean-am
 	-rm -f ./$(DEPDIR)/dmapserve.Po
 	-rm -f ./$(DEPDIR)/dpapview.Po
 	-rm -f ./$(DEPDIR)/test-dmap-client.Po
-	-rm -f ./$(DEPDIR)/test-dmap-container-db.Po
-	-rm -f ./$(DEPDIR)/test-dmap-container-record.Po
-	-rm -f ./$(DEPDIR)/test-dmap-db.Po
 	-rm -f ./$(DEPDIR)/test-dmap-server.Po
 	-rm -f ./$(DEPDIR)/unit-test.Po
 	-rm -f ./$(DEPDIR)/vala-dmap-container-db.Po
 	-rm -f ./$(DEPDIR)/vala-dmap-db.Po
-	-rm -f ./$(DEPDIR)/vala-dpap-record.Po
+	-rm -f ./$(DEPDIR)/vala-image-record.Po
 	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 
@@ -895,17 +901,17 @@ uninstall-am:
 .PRECIOUS: Makefile
 
 
-dacplisten.c: $(dacplisten_VALASOURCES)
-	$(VALAC) --vapidir=../vala --pkg gee-0.8 --pkg gstreamer-1.0 --pkg libdmapsharing-3.0 --pkg libsoup-2.4 --pkg gio-2.0 --pkg avahi-gobject  $^ -C
+@TESTS_ENABLED_TRUE@dacplisten.c: $(dacplisten_VALASOURCES)
+@TESTS_ENABLED_TRUE@	$(VALAC) --vapidir=../vala --pkg gee-0.8 --pkg gstreamer-1.0 --pkg libdmapsharing-4.0 --pkg libsoup-3.0 --pkg gio-2.0 --pkg avahi-gobject  $^ -C
 
-dpapview.c: $(dpapview_VALASOURCES)
-	$(VALAC) --vapidir=../vala --pkg gee-0.8 --pkg gtk+-3.0 --pkg gstreamer-1.0 --pkg libdmapsharing-3.0 --pkg libsoup-2.4 --pkg gio-2.0 --pkg avahi-gobject $^ -C
+@TESTS_ENABLED_TRUE@dpapview.c: $(dpapview_VALASOURCES)
+@TESTS_ENABLED_TRUE@	$(VALAC) --vapidir=../vala --pkg gee-0.8 --pkg gtk+-3.0 --pkg gstreamer-1.0 --pkg libdmapsharing-4.0 --pkg libsoup-3.0 --pkg gio-2.0 --pkg avahi-gobject $^ -C
 
-dmapcopy.c: $(dmapcopy_VALASOURCES)
-	$(VALAC) --vapidir=../vala --pkg gee-0.8 --pkg gstreamer-1.0 --pkg libdmapsharing-3.0 --pkg libsoup-2.4 --pkg gio-2.0 --pkg avahi-gobject $^ -C
+@TESTS_ENABLED_TRUE@dmapcopy.c: $(dmapcopy_VALASOURCES)
+@TESTS_ENABLED_TRUE@	$(VALAC) --vapidir=../vala --pkg gee-0.8 --pkg gstreamer-1.0 --pkg libdmapsharing-4.0 --pkg libsoup-3.0 --pkg gio-2.0 --pkg avahi-gobject $^ -C
 
-dmapserve.c: $(dmapserve_VALASOURCES)
-	$(VALAC) --vapidir=../vala --pkg gee-0.8 --pkg gstreamer-1.0 --pkg libdmapsharing-3.0 --pkg libsoup-2.4 --pkg gio-2.0 --pkg avahi-gobject $^ -C
+@TESTS_ENABLED_TRUE@dmapserve.c: $(dmapserve_VALASOURCES)
+@TESTS_ENABLED_TRUE@	$(VALAC) --vapidir=../vala --pkg gee-0.8 --pkg gstreamer-1.0 --pkg libdmapsharing-4.0 --pkg libsoup-3.0 --pkg gio-2.0 --pkg avahi-gobject $^ -C
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/tests/dacplisten.c b/tests/dacplisten.c
index 833d2e7..9479dbb 100644
--- a/tests/dacplisten.c
+++ b/tests/dacplisten.c
@@ -1,4 +1,4 @@
-/* dacplisten.c generated by valac 0.48.6, the Vala compiler
+/* dacplisten.c generated by valac 0.56.3, the Vala compiler
  * generated from dacplisten.vala, do not modify */
 
 /*   FILE: dacplisten.vala -- Listen to DACP remotes
@@ -30,16 +30,26 @@
 #include <stdlib.h>
 #include <string.h>
 
+#if !defined(VALA_EXTERN)
+#if defined(_MSC_VER)
+#define VALA_EXTERN __declspec(dllexport) extern
+#elif __GNUC__ >= 4
+#define VALA_EXTERN __attribute__((visibility("default"))) extern
+#else
+#define VALA_EXTERN extern
+#endif
+#endif
+
 #define TYPE_VALA_DACP_PLAYER (vala_dacp_player_get_type ())
-#define VALA_DACP_PLAYER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DACP_PLAYER, ValaDACPPlayer))
-#define VALA_DACP_PLAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DACP_PLAYER, ValaDACPPlayerClass))
+#define VALA_DACP_PLAYER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DACP_PLAYER, ValaDacpPlayer))
+#define VALA_DACP_PLAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DACP_PLAYER, ValaDacpPlayerClass))
 #define IS_VALA_DACP_PLAYER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DACP_PLAYER))
 #define IS_VALA_DACP_PLAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DACP_PLAYER))
-#define VALA_DACP_PLAYER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DACP_PLAYER, ValaDACPPlayerClass))
+#define VALA_DACP_PLAYER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DACP_PLAYER, ValaDacpPlayerClass))
 
-typedef struct _ValaDACPPlayer ValaDACPPlayer;
-typedef struct _ValaDACPPlayerClass ValaDACPPlayerClass;
-typedef struct _ValaDACPPlayerPrivate ValaDACPPlayerPrivate;
+typedef struct _ValaDacpPlayer ValaDacpPlayer;
+typedef struct _ValaDacpPlayerClass ValaDacpPlayerClass;
+typedef struct _ValaDacpPlayerPrivate ValaDacpPlayerPrivate;
 enum  {
 	VALA_DACP_PLAYER_0_PROPERTY,
 	VALA_DACP_PLAYER_NUM_PROPERTIES
@@ -47,15 +57,15 @@ enum  {
 static GParamSpec* vala_dacp_player_properties[VALA_DACP_PLAYER_NUM_PROPERTIES];
 
 #define TYPE_DACP_LISTENER (dacp_listener_get_type ())
-#define DACP_LISTENER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DACP_LISTENER, DACPListener))
-#define DACP_LISTENER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DACP_LISTENER, DACPListenerClass))
+#define DACP_LISTENER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DACP_LISTENER, DacpListener))
+#define DACP_LISTENER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DACP_LISTENER, DacpListenerClass))
 #define IS_DACP_LISTENER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DACP_LISTENER))
 #define IS_DACP_LISTENER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DACP_LISTENER))
-#define DACP_LISTENER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DACP_LISTENER, DACPListenerClass))
+#define DACP_LISTENER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DACP_LISTENER, DacpListenerClass))
 
-typedef struct _DACPListener DACPListener;
-typedef struct _DACPListenerClass DACPListenerClass;
-typedef struct _DACPListenerPrivate DACPListenerPrivate;
+typedef struct _DacpListener DacpListener;
+typedef struct _DacpListenerClass DacpListenerClass;
+typedef struct _DacpListenerPrivate DacpListenerPrivate;
 enum  {
 	DACP_LISTENER_0_PROPERTY,
 	DACP_LISTENER_NUM_PROPERTIES
@@ -64,239 +74,230 @@ static GParamSpec* dacp_listener_properties[DACP_LISTENER_NUM_PROPERTIES];
 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
 
 #define TYPE_VALA_DMAP_DB (vala_dmap_db_get_type ())
-#define VALA_DMAP_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DMAP_DB, ValaDMAPDb))
-#define VALA_DMAP_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DMAP_DB, ValaDMAPDbClass))
+#define VALA_DMAP_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DMAP_DB, ValaDmapDb))
+#define VALA_DMAP_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DMAP_DB, ValaDmapDbClass))
 #define IS_VALA_DMAP_DB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DMAP_DB))
 #define IS_VALA_DMAP_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DMAP_DB))
-#define VALA_DMAP_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DMAP_DB, ValaDMAPDbClass))
+#define VALA_DMAP_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DMAP_DB, ValaDmapDbClass))
 
-typedef struct _ValaDMAPDb ValaDMAPDb;
-typedef struct _ValaDMAPDbClass ValaDMAPDbClass;
+typedef struct _ValaDmapDb ValaDmapDb;
+typedef struct _ValaDmapDbClass ValaDmapDbClass;
 
 #define TYPE_VALA_DMAP_CONTAINER_DB (vala_dmap_container_db_get_type ())
-#define VALA_DMAP_CONTAINER_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DMAP_CONTAINER_DB, ValaDMAPContainerDb))
-#define VALA_DMAP_CONTAINER_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DMAP_CONTAINER_DB, ValaDMAPContainerDbClass))
+#define VALA_DMAP_CONTAINER_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DMAP_CONTAINER_DB, ValaDmapContainerDb))
+#define VALA_DMAP_CONTAINER_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DMAP_CONTAINER_DB, ValaDmapContainerDbClass))
 #define IS_VALA_DMAP_CONTAINER_DB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DMAP_CONTAINER_DB))
 #define IS_VALA_DMAP_CONTAINER_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DMAP_CONTAINER_DB))
-#define VALA_DMAP_CONTAINER_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DMAP_CONTAINER_DB, ValaDMAPContainerDbClass))
+#define VALA_DMAP_CONTAINER_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DMAP_CONTAINER_DB, ValaDmapContainerDbClass))
 
-typedef struct _ValaDMAPContainerDb ValaDMAPContainerDb;
-typedef struct _ValaDMAPContainerDbClass ValaDMAPContainerDbClass;
+typedef struct _ValaDmapContainerDb ValaDmapContainerDb;
+typedef struct _ValaDmapContainerDbClass ValaDmapContainerDbClass;
 #define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
 
-struct _ValaDACPPlayer {
+struct _ValaDacpPlayer {
 	GObject parent_instance;
-	ValaDACPPlayerPrivate * priv;
+	ValaDacpPlayerPrivate * priv;
 };
 
-struct _ValaDACPPlayerClass {
+struct _ValaDacpPlayerClass {
 	GObjectClass parent_class;
 };
 
-struct _DACPListener {
+struct _DacpListener {
 	GObject parent_instance;
-	DACPListenerPrivate * priv;
+	DacpListenerPrivate * priv;
 };
 
-struct _DACPListenerClass {
+struct _DacpListenerClass {
 	GObjectClass parent_class;
 };
 
-struct _DACPListenerPrivate {
-	DMAPDb* db;
-	DMAPContainerDb* container_db;
-	DACPPlayer* player;
-	DACPShare* share;
+struct _DacpListenerPrivate {
+	DmapDb* db;
+	DmapContainerDb* container_db;
+	DmapControlPlayer* player;
+	DmapControlShare* share;
 };
 
 static gpointer vala_dacp_player_parent_class = NULL;
-static DACPPlayerIface * vala_dacp_player_dacp_player_parent_iface = NULL;
-static gint DACPListener_private_offset;
+static DmapControlPlayerInterface * vala_dacp_player_dmap_control_player_parent_iface = NULL;
+static gint DacpListener_private_offset;
 static gpointer dacp_listener_parent_class = NULL;
 
-GType vala_dacp_player_get_type (void) G_GNUC_CONST;
-G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaDACPPlayer, g_object_unref)
-static DAAPRecord* vala_dacp_player_real_now_playing_record (DACPPlayer* base);
-static guchar* vala_dacp_player_real_now_playing_artwork (DACPPlayer* base,
-                                                   guint width,
-                                                   guint height,
-                                                   gint* result_length1);
-static void vala_dacp_player_real_play_pause (DACPPlayer* base);
-static void vala_dacp_player_real_pause (DACPPlayer* base);
-static void vala_dacp_player_real_next_item (DACPPlayer* base);
-static void vala_dacp_player_real_prev_item (DACPPlayer* base);
-static void vala_dacp_player_real_cue_clear (DACPPlayer* base);
-static void vala_dacp_player_real_cue_play (DACPPlayer* base,
+VALA_EXTERN GType vala_dacp_player_get_type (void) G_GNUC_CONST ;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaDacpPlayer, g_object_unref)
+static DmapAvRecord* vala_dacp_player_real_now_playing_record (DmapControlPlayer* base);
+static const gchar* vala_dacp_player_real_now_playing_artwork (DmapControlPlayer* base,
+                                                        guint width,
+                                                        guint height);
+static void vala_dacp_player_real_play_pause (DmapControlPlayer* base);
+static void vala_dacp_player_real_pause (DmapControlPlayer* base);
+static void vala_dacp_player_real_next_item (DmapControlPlayer* base);
+static void vala_dacp_player_real_prev_item (DmapControlPlayer* base);
+static void vala_dacp_player_real_cue_clear (DmapControlPlayer* base);
+static void vala_dacp_player_real_cue_play (DmapControlPlayer* base,
                                      GList* records,
                                      guint index);
-ValaDACPPlayer* vala_dacp_player_new (void);
-ValaDACPPlayer* vala_dacp_player_construct (GType object_type);
+VALA_EXTERN ValaDacpPlayer* vala_dacp_player_new (void);
+VALA_EXTERN ValaDacpPlayer* vala_dacp_player_construct (GType object_type);
 static GType vala_dacp_player_get_type_once (void);
-GType dacp_listener_get_type (void) G_GNUC_CONST;
-G_DEFINE_AUTOPTR_CLEANUP_FUNC (DACPListener, g_object_unref)
-DACPListener* dacp_listener_new (void);
-DACPListener* dacp_listener_construct (GType object_type);
-ValaDMAPDb* vala_dmap_db_new (void);
-ValaDMAPDb* vala_dmap_db_construct (GType object_type);
-GType vala_dmap_db_get_type (void) G_GNUC_CONST;
-G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaDMAPDb, g_object_unref)
-ValaDMAPContainerDb* vala_dmap_container_db_new (void);
-ValaDMAPContainerDb* vala_dmap_container_db_construct (GType object_type);
-GType vala_dmap_container_db_get_type (void) G_GNUC_CONST;
-G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaDMAPContainerDb, g_object_unref)
-static void __lambda4_ (DACPListener* self,
+VALA_EXTERN GType dacp_listener_get_type (void) G_GNUC_CONST ;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (DacpListener, g_object_unref)
+VALA_EXTERN DacpListener* dacp_listener_new (void);
+VALA_EXTERN DacpListener* dacp_listener_construct (GType object_type);
+VALA_EXTERN ValaDmapDb* vala_dmap_db_new (void);
+VALA_EXTERN ValaDmapDb* vala_dmap_db_construct (GType object_type);
+VALA_EXTERN GType vala_dmap_db_get_type (void) G_GNUC_CONST ;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaDmapDb, g_object_unref)
+VALA_EXTERN ValaDmapContainerDb* vala_dmap_container_db_new (void);
+VALA_EXTERN ValaDmapContainerDb* vala_dmap_container_db_construct (GType object_type);
+VALA_EXTERN GType vala_dmap_container_db_get_type (void) G_GNUC_CONST ;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaDmapContainerDb, g_object_unref)
+static void __lambda4_ (DacpListener* self,
                  const gchar* service_name,
                  const gchar* display_name);
-static void ___lambda4__dacp_share_remote_found (DACPShare* _sender,
-                                          const gchar* service_name,
-                                          const gchar* remote_name,
-                                          gpointer self);
-static void __lambda5_ (DACPListener* self,
+static void ___lambda4__dmap_control_share_remote_found (DmapControlShare* _sender,
+                                                  const gchar* service_name,
+                                                  const gchar* remote_name,
+                                                  gpointer self);
+static void __lambda5_ (DacpListener* self,
                  const gchar* guid);
-static void ___lambda5__dacp_share_add_guid (DACPShare* _sender,
-                                      const gchar* guid,
-                                      gpointer self);
+static void ___lambda5__dmap_control_share_add_guid (DmapControlShare* _sender,
+                                              const gchar* guid,
+                                              gpointer self);
 static void dacp_listener_finalize (GObject * obj);
 static GType dacp_listener_get_type_once (void);
-gint _vala_main (gchar** args,
+static gint _vala_main (gchar** args,
                  gint args_length1);
 
-static DAAPRecord*
-vala_dacp_player_real_now_playing_record (DACPPlayer* base)
+static DmapAvRecord*
+vala_dacp_player_real_now_playing_record (DmapControlPlayer* base)
 {
-	ValaDACPPlayer * self;
+	ValaDacpPlayer * self;
 	FILE* _tmp0_;
-	DAAPRecord* result = NULL;
-	self = (ValaDACPPlayer*) base;
+	DmapAvRecord* result;
+	self = (ValaDacpPlayer*) base;
 	_tmp0_ = stdout;
 	fprintf (_tmp0_, "Now playing record request received\n");
 	result = NULL;
 	return result;
 }
 
-static guchar*
-vala_dacp_player_real_now_playing_artwork (DACPPlayer* base,
+static const gchar*
+vala_dacp_player_real_now_playing_artwork (DmapControlPlayer* base,
                                            guint width,
-                                           guint height,
-                                           gint* result_length1)
+                                           guint height)
 {
-	ValaDACPPlayer * self;
+	ValaDacpPlayer * self;
 	FILE* _tmp0_;
-	guchar* _tmp1_;
-	gint _tmp1__length1;
-	guchar* result = NULL;
-	self = (ValaDACPPlayer*) base;
+	const gchar* result;
+	self = (ValaDacpPlayer*) base;
 	_tmp0_ = stdout;
 	fprintf (_tmp0_, "Now playing artwork request received\n");
-	_tmp1_ = NULL;
-	_tmp1__length1 = 0;
-	if (result_length1) {
-		*result_length1 = _tmp1__length1;
-	}
-	result = _tmp1_;
+	result = NULL;
 	return result;
 }
 
 static void
-vala_dacp_player_real_play_pause (DACPPlayer* base)
+vala_dacp_player_real_play_pause (DmapControlPlayer* base)
 {
-	ValaDACPPlayer * self;
+	ValaDacpPlayer * self;
 	FILE* _tmp0_;
-	self = (ValaDACPPlayer*) base;
+	self = (ValaDacpPlayer*) base;
 	_tmp0_ = stdout;
 	fprintf (_tmp0_, "Play/pause request received\n");
 }
 
 static void
-vala_dacp_player_real_pause (DACPPlayer* base)
+vala_dacp_player_real_pause (DmapControlPlayer* base)
 {
-	ValaDACPPlayer * self;
+	ValaDacpPlayer * self;
 	FILE* _tmp0_;
-	self = (ValaDACPPlayer*) base;
+	self = (ValaDacpPlayer*) base;
 	_tmp0_ = stdout;
 	fprintf (_tmp0_, "Pause request received\n");
 }
 
 static void
-vala_dacp_player_real_next_item (DACPPlayer* base)
+vala_dacp_player_real_next_item (DmapControlPlayer* base)
 {
-	ValaDACPPlayer * self;
+	ValaDacpPlayer * self;
 	FILE* _tmp0_;
-	self = (ValaDACPPlayer*) base;
+	self = (ValaDacpPlayer*) base;
 	_tmp0_ = stdout;
 	fprintf (_tmp0_, "Next item request received\n");
 }
 
 static void
-vala_dacp_player_real_prev_item (DACPPlayer* base)
+vala_dacp_player_real_prev_item (DmapControlPlayer* base)
 {
-	ValaDACPPlayer * self;
+	ValaDacpPlayer * self;
 	FILE* _tmp0_;
-	self = (ValaDACPPlayer*) base;
+	self = (ValaDacpPlayer*) base;
 	_tmp0_ = stdout;
 	fprintf (_tmp0_, "Previous item request received\n");
 }
 
 static void
-vala_dacp_player_real_cue_clear (DACPPlayer* base)
+vala_dacp_player_real_cue_clear (DmapControlPlayer* base)
 {
-	ValaDACPPlayer * self;
+	ValaDacpPlayer * self;
 	FILE* _tmp0_;
-	self = (ValaDACPPlayer*) base;
+	self = (ValaDacpPlayer*) base;
 	_tmp0_ = stdout;
 	fprintf (_tmp0_, "Cue clear request received\n");
 }
 
 static void
-vala_dacp_player_real_cue_play (DACPPlayer* base,
+vala_dacp_player_real_cue_play (DmapControlPlayer* base,
                                 GList* records,
                                 guint index)
 {
-	ValaDACPPlayer * self;
+	ValaDacpPlayer * self;
 	FILE* _tmp0_;
-	self = (ValaDACPPlayer*) base;
+	self = (ValaDacpPlayer*) base;
 	_tmp0_ = stdout;
 	fprintf (_tmp0_, "Cue play request received\n");
 }
 
-ValaDACPPlayer*
+ValaDacpPlayer*
 vala_dacp_player_construct (GType object_type)
 {
-	ValaDACPPlayer * self = NULL;
-	self = (ValaDACPPlayer*) g_object_new (object_type, NULL);
+	ValaDacpPlayer * self = NULL;
+	self = (ValaDacpPlayer*) g_object_new (object_type, NULL);
 	return self;
 }
 
-ValaDACPPlayer*
+ValaDacpPlayer*
 vala_dacp_player_new (void)
 {
 	return vala_dacp_player_construct (TYPE_VALA_DACP_PLAYER);
 }
 
 static void
-vala_dacp_player_class_init (ValaDACPPlayerClass * klass,
+vala_dacp_player_class_init (ValaDacpPlayerClass * klass,
                              gpointer klass_data)
 {
 	vala_dacp_player_parent_class = g_type_class_peek_parent (klass);
 }
 
 static void
-vala_dacp_player_dacp_player_interface_init (DACPPlayerIface * iface,
-                                             gpointer iface_data)
+vala_dacp_player_dmap_control_player_interface_init (DmapControlPlayerInterface * iface,
+                                                     gpointer iface_data)
 {
-	vala_dacp_player_dacp_player_parent_iface = g_type_interface_peek_parent (iface);
-	iface->now_playing_record = (DAAPRecord* (*) (DACPPlayer*)) vala_dacp_player_real_now_playing_record;
-	iface->now_playing_artwork = (guchar* (*) (DACPPlayer*, guint, guint, gint*)) vala_dacp_player_real_now_playing_artwork;
-	iface->play_pause = (void (*) (DACPPlayer*)) vala_dacp_player_real_play_pause;
-	iface->pause = (void (*) (DACPPlayer*)) vala_dacp_player_real_pause;
-	iface->next_item = (void (*) (DACPPlayer*)) vala_dacp_player_real_next_item;
-	iface->prev_item = (void (*) (DACPPlayer*)) vala_dacp_player_real_prev_item;
-	iface->cue_clear = (void (*) (DACPPlayer*)) vala_dacp_player_real_cue_clear;
-	iface->cue_play = (void (*) (DACPPlayer*, GList*, guint)) vala_dacp_player_real_cue_play;
+	vala_dacp_player_dmap_control_player_parent_iface = g_type_interface_peek_parent (iface);
+	iface->now_playing_record = (DmapAvRecord* (*) (DmapControlPlayer*)) vala_dacp_player_real_now_playing_record;
+	iface->now_playing_artwork = (const gchar* (*) (DmapControlPlayer*, guint, guint)) vala_dacp_player_real_now_playing_artwork;
+	iface->play_pause = (void (*) (DmapControlPlayer*)) vala_dacp_player_real_play_pause;
+	iface->pause = (void (*) (DmapControlPlayer*)) vala_dacp_player_real_pause;
+	iface->next_item = (void (*) (DmapControlPlayer*)) vala_dacp_player_real_next_item;
+	iface->prev_item = (void (*) (DmapControlPlayer*)) vala_dacp_player_real_prev_item;
+	iface->cue_clear = (void (*) (DmapControlPlayer*)) vala_dacp_player_real_cue_clear;
+	iface->cue_play = (void (*) (DmapControlPlayer*, GList*, guint)) vala_dacp_player_real_cue_play;
 }
 
 static void
-vala_dacp_player_instance_init (ValaDACPPlayer * self,
+vala_dacp_player_instance_init (ValaDacpPlayer * self,
                                 gpointer klass)
 {
 }
@@ -304,34 +305,34 @@ vala_dacp_player_instance_init (ValaDACPPlayer * self,
 static GType
 vala_dacp_player_get_type_once (void)
 {
-	static const GTypeInfo g_define_type_info = { sizeof (ValaDACPPlayerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_dacp_player_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaDACPPlayer), 0, (GInstanceInitFunc) vala_dacp_player_instance_init, NULL };
-	static const GInterfaceInfo dacp_player_info = { (GInterfaceInitFunc) vala_dacp_player_dacp_player_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
+	static const GTypeInfo g_define_type_info = { sizeof (ValaDacpPlayerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_dacp_player_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaDacpPlayer), 0, (GInstanceInitFunc) vala_dacp_player_instance_init, NULL };
+	static const GInterfaceInfo dmap_control_player_info = { (GInterfaceInitFunc) vala_dacp_player_dmap_control_player_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
 	GType vala_dacp_player_type_id;
-	vala_dacp_player_type_id = g_type_register_static (G_TYPE_OBJECT, "ValaDACPPlayer", &g_define_type_info, 0);
-	g_type_add_interface_static (vala_dacp_player_type_id, DACP_TYPE_PLAYER, &dacp_player_info);
+	vala_dacp_player_type_id = g_type_register_static (G_TYPE_OBJECT, "ValaDacpPlayer", &g_define_type_info, 0);
+	g_type_add_interface_static (vala_dacp_player_type_id, DMAP_TYPE_CONTROL_PLAYER, &dmap_control_player_info);
 	return vala_dacp_player_type_id;
 }
 
 GType
 vala_dacp_player_get_type (void)
 {
-	static volatile gsize vala_dacp_player_type_id__volatile = 0;
-	if (g_once_init_enter (&vala_dacp_player_type_id__volatile)) {
+	static volatile gsize vala_dacp_player_type_id__once = 0;
+	if (g_once_init_enter (&vala_dacp_player_type_id__once)) {
 		GType vala_dacp_player_type_id;
 		vala_dacp_player_type_id = vala_dacp_player_get_type_once ();
-		g_once_init_leave (&vala_dacp_player_type_id__volatile, vala_dacp_player_type_id);
+		g_once_init_leave (&vala_dacp_player_type_id__once, vala_dacp_player_type_id);
 	}
-	return vala_dacp_player_type_id__volatile;
+	return vala_dacp_player_type_id__once;
 }
 
 static inline gpointer
-dacp_listener_get_instance_private (DACPListener* self)
+dacp_listener_get_instance_private (DacpListener* self)
 {
-	return G_STRUCT_MEMBER_P (self, DACPListener_private_offset);
+	return G_STRUCT_MEMBER_P (self, DacpListener_private_offset);
 }
 
 static void
-__lambda4_ (DACPListener* self,
+__lambda4_ (DacpListener* self,
             const gchar* service_name,
             const gchar* display_name)
 {
@@ -343,16 +344,16 @@ __lambda4_ (DACPListener* self,
 }
 
 static void
-___lambda4__dacp_share_remote_found (DACPShare* _sender,
-                                     const gchar* service_name,
-                                     const gchar* remote_name,
-                                     gpointer self)
+___lambda4__dmap_control_share_remote_found (DmapControlShare* _sender,
+                                             const gchar* service_name,
+                                             const gchar* remote_name,
+                                             gpointer self)
 {
-	__lambda4_ ((DACPListener*) self, service_name, remote_name);
+	__lambda4_ ((DacpListener*) self, service_name, remote_name);
 }
 
 static void
-__lambda5_ (DACPListener* self,
+__lambda5_ (DacpListener* self,
             const gchar* guid)
 {
 	FILE* _tmp0_;
@@ -362,69 +363,75 @@ __lambda5_ (DACPListener* self,
 }
 
 static void
-___lambda5__dacp_share_add_guid (DACPShare* _sender,
-                                 const gchar* guid,
-                                 gpointer self)
+___lambda5__dmap_control_share_add_guid (DmapControlShare* _sender,
+                                         const gchar* guid,
+                                         gpointer self)
 {
-	__lambda5_ ((DACPListener*) self, guid);
+	__lambda5_ ((DacpListener*) self, guid);
 }
 
-DACPListener*
+DacpListener*
 dacp_listener_construct (GType object_type)
 {
-	DACPListener * self = NULL;
-	ValaDMAPDb* _tmp0_;
-	ValaDMAPContainerDb* _tmp1_;
-	ValaDACPPlayer* _tmp2_;
-	DACPPlayer* _tmp3_;
-	DMAPDb* _tmp4_;
-	DMAPContainerDb* _tmp5_;
-	DACPShare* _tmp6_;
-	DACPShare* _tmp7_;
-	DACPShare* _tmp8_;
-	DACPShare* _tmp9_;
-	self = (DACPListener*) g_object_new (object_type, NULL);
+	DacpListener * self = NULL;
+	ValaDmapDb* _tmp0_;
+	ValaDmapContainerDb* _tmp1_;
+	ValaDacpPlayer* _tmp2_;
+	DmapControlPlayer* _tmp3_;
+	DmapDb* _tmp4_;
+	DmapContainerDb* _tmp5_;
+	DmapControlShare* _tmp6_;
+	DmapControlShare* _tmp7_;
+	DmapControlShare* _tmp8_;
+	DmapControlShare* _tmp9_;
+	GError* _inner_error0_ = NULL;
+	self = (DacpListener*) g_object_new (object_type, NULL);
 	_tmp0_ = vala_dmap_db_new ();
 	_g_object_unref0 (self->priv->db);
-	self->priv->db = (DMAPDb*) _tmp0_;
+	self->priv->db = (DmapDb*) _tmp0_;
 	_tmp1_ = vala_dmap_container_db_new ();
 	_g_object_unref0 (self->priv->container_db);
-	self->priv->container_db = (DMAPContainerDb*) _tmp1_;
+	self->priv->container_db = (DmapContainerDb*) _tmp1_;
 	_tmp2_ = vala_dacp_player_new ();
 	_g_object_unref0 (self->priv->player);
-	self->priv->player = (DACPPlayer*) _tmp2_;
+	self->priv->player = (DmapControlPlayer*) _tmp2_;
 	_tmp3_ = self->priv->player;
 	_tmp4_ = self->priv->db;
 	_tmp5_ = self->priv->container_db;
-	_tmp6_ = dacp_share_new ("dacplisten", _tmp3_, _tmp4_, _tmp5_);
+	_tmp6_ = dmap_control_share_new ("dacplisten", _tmp3_, _tmp4_, _tmp5_);
 	_g_object_unref0 (self->priv->share);
 	self->priv->share = _tmp6_;
 	_tmp7_ = self->priv->share;
-	g_signal_connect_object (_tmp7_, "remote-found", (GCallback) ___lambda4__dacp_share_remote_found, self, 0);
+	g_signal_connect_object (_tmp7_, "remote-found", (GCallback) ___lambda4__dmap_control_share_remote_found, self, 0);
 	_tmp8_ = self->priv->share;
-	g_signal_connect_object (_tmp8_, "add-guid", (GCallback) ___lambda5__dacp_share_add_guid, self, 0);
+	g_signal_connect_object (_tmp8_, "add-guid", (GCallback) ___lambda5__dmap_control_share_add_guid, self, 0);
 	_tmp9_ = self->priv->share;
-	dacp_share_start_lookup (_tmp9_);
+	dmap_control_share_start_lookup (_tmp9_, &_inner_error0_);
+	if (G_UNLIKELY (_inner_error0_ != NULL)) {
+		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
+		g_clear_error (&_inner_error0_);
+		return NULL;
+	}
 	return self;
 }
 
-DACPListener*
+DacpListener*
 dacp_listener_new (void)
 {
 	return dacp_listener_construct (TYPE_DACP_LISTENER);
 }
 
 static void
-dacp_listener_class_init (DACPListenerClass * klass,
+dacp_listener_class_init (DacpListenerClass * klass,
                           gpointer klass_data)
 {
 	dacp_listener_parent_class = g_type_class_peek_parent (klass);
-	g_type_class_adjust_private_offset (klass, &DACPListener_private_offset);
+	g_type_class_adjust_private_offset (klass, &DacpListener_private_offset);
 	G_OBJECT_CLASS (klass)->finalize = dacp_listener_finalize;
 }
 
 static void
-dacp_listener_instance_init (DACPListener * self,
+dacp_listener_instance_init (DacpListener * self,
                              gpointer klass)
 {
 	self->priv = dacp_listener_get_instance_private (self);
@@ -433,8 +440,8 @@ dacp_listener_instance_init (DACPListener * self,
 static void
 dacp_listener_finalize (GObject * obj)
 {
-	DACPListener * self;
-	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_DACP_LISTENER, DACPListener);
+	DacpListener * self;
+	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_DACP_LISTENER, DacpListener);
 	_g_object_unref0 (self->priv->db);
 	_g_object_unref0 (self->priv->container_db);
 	_g_object_unref0 (self->priv->player);
@@ -445,34 +452,34 @@ dacp_listener_finalize (GObject * obj)
 static GType
 dacp_listener_get_type_once (void)
 {
-	static const GTypeInfo g_define_type_info = { sizeof (DACPListenerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dacp_listener_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DACPListener), 0, (GInstanceInitFunc) dacp_listener_instance_init, NULL };
+	static const GTypeInfo g_define_type_info = { sizeof (DacpListenerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dacp_listener_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DacpListener), 0, (GInstanceInitFunc) dacp_listener_instance_init, NULL };
 	GType dacp_listener_type_id;
-	dacp_listener_type_id = g_type_register_static (G_TYPE_OBJECT, "DACPListener", &g_define_type_info, 0);
-	DACPListener_private_offset = g_type_add_instance_private (dacp_listener_type_id, sizeof (DACPListenerPrivate));
+	dacp_listener_type_id = g_type_register_static (G_TYPE_OBJECT, "DacpListener", &g_define_type_info, 0);
+	DacpListener_private_offset = g_type_add_instance_private (dacp_listener_type_id, sizeof (DacpListenerPrivate));
 	return dacp_listener_type_id;
 }
 
 GType
 dacp_listener_get_type (void)
 {
-	static volatile gsize dacp_listener_type_id__volatile = 0;
-	if (g_once_init_enter (&dacp_listener_type_id__volatile)) {
+	static volatile gsize dacp_listener_type_id__once = 0;
+	if (g_once_init_enter (&dacp_listener_type_id__once)) {
 		GType dacp_listener_type_id;
 		dacp_listener_type_id = dacp_listener_get_type_once ();
-		g_once_init_leave (&dacp_listener_type_id__volatile, dacp_listener_type_id);
+		g_once_init_leave (&dacp_listener_type_id__once, dacp_listener_type_id);
 	}
-	return dacp_listener_type_id__volatile;
+	return dacp_listener_type_id__once;
 }
 
-gint
+static gint
 _vala_main (gchar** args,
             gint args_length1)
 {
 	GMainLoop* loop = NULL;
 	GMainLoop* _tmp0_;
-	DACPListener* dacplistener = NULL;
-	DACPListener* _tmp1_;
-	gint result = 0;
+	DacpListener* dacplistener = NULL;
+	DacpListener* _tmp1_;
+	gint result;
 	_tmp0_ = g_main_loop_new (NULL, FALSE);
 	loop = _tmp0_;
 	_tmp1_ = dacp_listener_new ();
diff --git a/tests/dacplisten.vala b/tests/dacplisten.vala
index 572e353..1475819 100644
--- a/tests/dacplisten.vala
+++ b/tests/dacplisten.vala
@@ -20,14 +20,14 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-private class ValaDACPPlayer : GLib.Object, DACP.Player {
+private class ValaDacpPlayer : GLib.Object, Dmap.ControlPlayer {
 
-	unowned DAAP.Record now_playing_record () {
+	unowned Dmap.AvRecord now_playing_record () {
 		stdout.printf ("Now playing record request received\n");
 		return null;
 	}
 
-	unowned uchar[] now_playing_artwork (uint width, uint height) {
+	unowned string now_playing_artwork (uint width, uint height) {
 		stdout.printf ("Now playing artwork request received\n");
 		return null;
 	}
@@ -57,17 +57,17 @@ private class ValaDACPPlayer : GLib.Object, DACP.Player {
 	}
 }
 
-private class DACPListener : GLib.Object {
-	private DMAP.Db db;
-	private DMAP.ContainerDb container_db;
-	private DACP.Player player;
-	private DACP.Share share;
+private class DacpListener : GLib.Object {
+	private Dmap.Db db;
+	private Dmap.ContainerDb container_db;
+	private Dmap.ControlPlayer player;
+	private Dmap.ControlShare share;
 
-	public DACPListener () {
-		db = new ValaDMAPDb ();
-		container_db = new ValaDMAPContainerDb ();
-		player = new ValaDACPPlayer ();
-		share = new DACP.Share ("dacplisten", player, db, container_db);
+	public DacpListener () {
+		db = new ValaDmapDb ();
+		container_db = new ValaDmapContainerDb ();
+		player = new ValaDacpPlayer ();
+		share = new Dmap.ControlShare ("dacplisten", player, db, container_db);
 
 		share.remote_found.connect ((service_name, display_name) => {
 			stdout.printf ("Found remote: %s, %s\n", service_name, display_name);
@@ -84,7 +84,7 @@ private class DACPListener : GLib.Object {
 int main (string[] args) {     
 	var loop = new GLib.MainLoop ();
 
-	var dacplistener = new DACPListener ();
+	var dacplistener = new DacpListener ();
 
 	loop.run ();
 
diff --git a/tests/dmapcopy.c b/tests/dmapcopy.c
index ceb1c7f..c5cdfe7 100644
--- a/tests/dmapcopy.c
+++ b/tests/dmapcopy.c
@@ -1,4 +1,4 @@
-/* dmapcopy.c generated by valac 0.48.6, the Vala compiler
+/* dmapcopy.c generated by valac 0.56.3, the Vala compiler
  * generated from dmapcopy.vala, do not modify */
 
 /*   FILE: dmapcopy.vala -- Copy files from a DMAP server
@@ -31,6 +31,16 @@
 #include <stdio.h>
 #include <gobject/gvaluecollector.h>
 
+#if !defined(VALA_EXTERN)
+#if defined(_MSC_VER)
+#define VALA_EXTERN __declspec(dllexport) extern
+#elif __GNUC__ >= 4
+#define VALA_EXTERN __attribute__((visibility("default"))) extern
+#else
+#define VALA_EXTERN extern
+#endif
+#endif
+
 #define TYPE_DPAP_COPY (dpap_copy_get_type ())
 #define DPAP_COPY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DPAP_COPY, DPAPCopy))
 #define DPAP_COPY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DPAP_COPY, DPAPCopyClass))
@@ -43,35 +53,36 @@ typedef struct _DPAPCopyClass DPAPCopyClass;
 typedef struct _DPAPCopyPrivate DPAPCopyPrivate;
 
 #define TYPE_VALA_DMAP_DB (vala_dmap_db_get_type ())
-#define VALA_DMAP_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DMAP_DB, ValaDMAPDb))
-#define VALA_DMAP_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DMAP_DB, ValaDMAPDbClass))
+#define VALA_DMAP_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DMAP_DB, ValaDmapDb))
+#define VALA_DMAP_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DMAP_DB, ValaDmapDbClass))
 #define IS_VALA_DMAP_DB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DMAP_DB))
 #define IS_VALA_DMAP_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DMAP_DB))
-#define VALA_DMAP_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DMAP_DB, ValaDMAPDbClass))
+#define VALA_DMAP_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DMAP_DB, ValaDmapDbClass))
 
-typedef struct _ValaDMAPDb ValaDMAPDb;
-typedef struct _ValaDMAPDbClass ValaDMAPDbClass;
+typedef struct _ValaDmapDb ValaDmapDb;
+typedef struct _ValaDmapDbClass ValaDmapDbClass;
 
-#define TYPE_VALA_DPAP_RECORD_FACTORY (vala_dpap_record_factory_get_type ())
-#define VALA_DPAP_RECORD_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DPAP_RECORD_FACTORY, ValaDPAPRecordFactory))
-#define VALA_DPAP_RECORD_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DPAP_RECORD_FACTORY, ValaDPAPRecordFactoryClass))
-#define IS_VALA_DPAP_RECORD_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DPAP_RECORD_FACTORY))
-#define IS_VALA_DPAP_RECORD_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DPAP_RECORD_FACTORY))
-#define VALA_DPAP_RECORD_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DPAP_RECORD_FACTORY, ValaDPAPRecordFactoryClass))
+#define TYPE_VALA_IMAGE_RECORD_FACTORY (vala_image_record_factory_get_type ())
+#define VALA_IMAGE_RECORD_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_IMAGE_RECORD_FACTORY, ValaImageRecordFactory))
+#define VALA_IMAGE_RECORD_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_IMAGE_RECORD_FACTORY, ValaImageRecordFactoryClass))
+#define IS_VALA_IMAGE_RECORD_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_IMAGE_RECORD_FACTORY))
+#define IS_VALA_IMAGE_RECORD_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_IMAGE_RECORD_FACTORY))
+#define VALA_IMAGE_RECORD_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_IMAGE_RECORD_FACTORY, ValaImageRecordFactoryClass))
 
-typedef struct _ValaDPAPRecordFactory ValaDPAPRecordFactory;
-typedef struct _ValaDPAPRecordFactoryClass ValaDPAPRecordFactoryClass;
+typedef struct _ValaImageRecordFactory ValaImageRecordFactory;
+typedef struct _ValaImageRecordFactoryClass ValaImageRecordFactoryClass;
 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
 
-#define TYPE_VALA_DPAP_RECORD (vala_dpap_record_get_type ())
-#define VALA_DPAP_RECORD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DPAP_RECORD, ValaDPAPRecord))
-#define VALA_DPAP_RECORD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DPAP_RECORD, ValaDPAPRecordClass))
-#define IS_VALA_DPAP_RECORD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DPAP_RECORD))
-#define IS_VALA_DPAP_RECORD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DPAP_RECORD))
-#define VALA_DPAP_RECORD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DPAP_RECORD, ValaDPAPRecordClass))
+#define TYPE_VALA_IMAGE_RECORD (vala_image_record_get_type ())
+#define VALA_IMAGE_RECORD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_IMAGE_RECORD, ValaImageRecord))
+#define VALA_IMAGE_RECORD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_IMAGE_RECORD, ValaImageRecordClass))
+#define IS_VALA_IMAGE_RECORD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_IMAGE_RECORD))
+#define IS_VALA_IMAGE_RECORD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_IMAGE_RECORD))
+#define VALA_IMAGE_RECORD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_IMAGE_RECORD, ValaImageRecordClass))
 
-typedef struct _ValaDPAPRecord ValaDPAPRecord;
-typedef struct _ValaDPAPRecordClass ValaDPAPRecordClass;
+typedef struct _ValaImageRecord ValaImageRecord;
+typedef struct _ValaImageRecordClass ValaImageRecordClass;
+#define _g_free0(var) (var = (g_free (var), NULL))
 #define _dpap_copy_unref0(var) ((var == NULL) ? NULL : (var = (dpap_copy_unref (var), NULL)))
 typedef struct _ParamSpecDPAPCopy ParamSpecDPAPCopy;
 #define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
@@ -88,10 +99,10 @@ struct _DPAPCopyClass {
 };
 
 struct _DPAPCopyPrivate {
-	DMAPMdnsBrowser* browser;
-	DMAPConnection* connection;
-	ValaDMAPDb* db;
-	ValaDPAPRecordFactory* factory;
+	DmapMdnsBrowser* browser;
+	DmapConnection* connection;
+	ValaDmapDb* db;
+	ValaImageRecordFactory* factory;
 };
 
 struct _ParamSpecDPAPCopy {
@@ -101,62 +112,63 @@ struct _ParamSpecDPAPCopy {
 static gint DPAPCopy_private_offset;
 static gpointer dpap_copy_parent_class = NULL;
 
-gpointer dpap_copy_ref (gpointer instance);
-void dpap_copy_unref (gpointer instance);
-GParamSpec* param_spec_dpap_copy (const gchar* name,
+VALA_EXTERN gpointer dpap_copy_ref (gpointer instance);
+VALA_EXTERN void dpap_copy_unref (gpointer instance);
+VALA_EXTERN GParamSpec* param_spec_dpap_copy (const gchar* name,
                                   const gchar* nick,
                                   const gchar* blurb,
                                   GType object_type,
                                   GParamFlags flags);
-void value_set_dpap_copy (GValue* value,
+VALA_EXTERN void value_set_dpap_copy (GValue* value,
                           gpointer v_object);
-void value_take_dpap_copy (GValue* value,
+VALA_EXTERN void value_take_dpap_copy (GValue* value,
                            gpointer v_object);
-gpointer value_get_dpap_copy (const GValue* value);
-GType dpap_copy_get_type (void) G_GNUC_CONST;
+VALA_EXTERN gpointer value_get_dpap_copy (const GValue* value);
+VALA_EXTERN GType dpap_copy_get_type (void) G_GNUC_CONST ;
 G_DEFINE_AUTOPTR_CLEANUP_FUNC (DPAPCopy, dpap_copy_unref)
-GType vala_dmap_db_get_type (void) G_GNUC_CONST;
-G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaDMAPDb, g_object_unref)
-GType vala_dpap_record_factory_get_type (void) G_GNUC_CONST;
-G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaDPAPRecordFactory, g_object_unref)
-static gboolean dpap_copy_connected_cb (DPAPCopy* self,
-                                 DMAPConnection* connection,
-                                 gboolean _result_,
-                                 const gchar* reason);
+VALA_EXTERN GType vala_dmap_db_get_type (void) G_GNUC_CONST ;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaDmapDb, g_object_unref)
+VALA_EXTERN GType vala_image_record_factory_get_type (void) G_GNUC_CONST ;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaImageRecordFactory, g_object_unref)
+static void dpap_copy_connected_cb (DPAPCopy* self,
+                             DmapConnection* connection,
+                             gboolean _result_,
+                             const gchar* reason);
 static void __lambda4_ (DPAPCopy* self,
-                 gconstpointer k,
-                 gconstpointer v);
-GType vala_dpap_record_get_type (void) G_GNUC_CONST;
-G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaDPAPRecord, g_object_unref)
-const gchar* vala_dpap_record_get_location (ValaDPAPRecord* self);
-static void ___lambda4__gh_func (gconstpointer key,
-                          gconstpointer value,
-                          gpointer self);
-static void dpap_copy_service_added_cb (DPAPCopy* self,
-                                 DMAPMdnsBrowserService* service);
-static gboolean _dpap_copy_connected_cb_dmap_connection_callback (DMAPConnection* connection,
-                                                           gboolean _result_,
-                                                           const gchar* reason,
-                                                           gpointer self);
-DPAPCopy* dpap_copy_new (GError** error);
-DPAPCopy* dpap_copy_construct (GType object_type,
+                 guint k,
+                 DmapRecord* v);
+VALA_EXTERN GType vala_image_record_get_type (void) G_GNUC_CONST ;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaImageRecord, g_object_unref)
+VALA_EXTERN const gchar* vala_image_record_get_location (ValaImageRecord* self);
+static void ___lambda4__dmap_id_record_func (guint id,
+                                      DmapRecord* record,
+                                      gpointer self);
+VALA_EXTERN DPAPCopy* dpap_copy_new (GError** error);
+VALA_EXTERN DPAPCopy* dpap_copy_construct (GType object_type,
                                GError** error);
-ValaDMAPDb* vala_dmap_db_new (void);
-ValaDMAPDb* vala_dmap_db_construct (GType object_type);
-ValaDPAPRecordFactory* vala_dpap_record_factory_new (void);
-ValaDPAPRecordFactory* vala_dpap_record_factory_construct (GType object_type);
-static void _dpap_copy_service_added_cb_dmap_mdns_browser_service_added (DMAPMdnsBrowser* _sender,
-                                                                  void* service,
-                                                                  gpointer self);
+VALA_EXTERN ValaDmapDb* vala_dmap_db_new (void);
+VALA_EXTERN ValaDmapDb* vala_dmap_db_construct (GType object_type);
+VALA_EXTERN ValaImageRecordFactory* vala_image_record_factory_new (void);
+VALA_EXTERN ValaImageRecordFactory* vala_image_record_factory_construct (GType object_type);
+static void __lambda5_ (DPAPCopy* self,
+                 DmapMdnsBrowser* browser,
+                 DmapMdnsService* service);
+static void _dpap_copy_connected_cb_dmap_connection_func (DmapConnection* connection,
+                                                   gboolean _result_,
+                                                   const gchar* reason,
+                                                   gpointer self);
+static void ___lambda5__dmap_mdns_browser_service_added (DmapMdnsBrowser* _sender,
+                                                  DmapMdnsService* service,
+                                                  gpointer self);
 static void dpap_copy_finalize (DPAPCopy * obj);
 static GType dpap_copy_get_type_once (void);
-void debug_printf (const gchar* log_domain,
+VALA_EXTERN void debug_printf (const gchar* log_domain,
                    GLogLevelFlags log_level,
                    const gchar* message);
-void debug_null (const gchar* log_domain,
+VALA_EXTERN void debug_null (const gchar* log_domain,
                  GLogLevelFlags log_level,
                  const gchar* message);
-gint _vala_main (gchar** args,
+static gint _vala_main (gchar** args,
                  gint args_length1);
 static void _debug_null_glog_func (const gchar* log_domain,
                             GLogLevelFlags log_levels,
@@ -171,84 +183,96 @@ dpap_copy_get_instance_private (DPAPCopy* self)
 
 static void
 __lambda4_ (DPAPCopy* self,
-            gconstpointer k,
-            gconstpointer v)
+            guint k,
+            DmapRecord* v)
 {
 	FILE* _tmp0_;
 	const gchar* _tmp1_;
 	const gchar* _tmp2_;
+	g_return_if_fail (v != NULL);
 	_tmp0_ = stdout;
-	_tmp1_ = vala_dpap_record_get_location (G_TYPE_CHECK_INSTANCE_CAST (v, TYPE_VALA_DPAP_RECORD, ValaDPAPRecord));
+	_tmp1_ = vala_image_record_get_location (G_TYPE_CHECK_INSTANCE_CAST (v, TYPE_VALA_IMAGE_RECORD, ValaImageRecord));
 	_tmp2_ = _tmp1_;
 	fprintf (_tmp0_, "%s\n", _tmp2_);
 }
 
 static void
-___lambda4__gh_func (gconstpointer key,
-                     gconstpointer value,
-                     gpointer self)
+___lambda4__dmap_id_record_func (guint id,
+                                 DmapRecord* record,
+                                 gpointer self)
 {
-	__lambda4_ ((DPAPCopy*) self, key, value);
+	__lambda4_ ((DPAPCopy*) self, id, record);
 }
 
-static gboolean
+static void
 dpap_copy_connected_cb (DPAPCopy* self,
-                        DMAPConnection* connection,
+                        DmapConnection* connection,
                         gboolean _result_,
                         const gchar* reason)
 {
-	ValaDMAPDb* _tmp0_;
-	ValaDMAPDb* _tmp1_;
-	gboolean result = FALSE;
-	g_return_val_if_fail (self != NULL, FALSE);
-	g_return_val_if_fail (connection != NULL, FALSE);
+	ValaDmapDb* _tmp0_;
+	ValaDmapDb* _tmp1_;
+	g_return_if_fail (self != NULL);
+	g_return_if_fail (connection != NULL);
 	_tmp0_ = self->priv->db;
-	g_debug ("%" G_GINT64_FORMAT " entries\n", dmap_db_count ((DMAPDb*) _tmp0_));
+	g_debug ("%" G_GINT64_FORMAT " entries\n", dmap_db_count ((DmapDb*) _tmp0_));
 	_tmp1_ = self->priv->db;
-	dmap_db_foreach ((DMAPDb*) _tmp1_, ___lambda4__gh_func, self);
-	result = TRUE;
-	return result;
+	dmap_db_foreach ((DmapDb*) _tmp1_, ___lambda4__dmap_id_record_func, self);
 }
 
-static gboolean
-_dpap_copy_connected_cb_dmap_connection_callback (DMAPConnection* connection,
-                                                  gboolean _result_,
-                                                  const gchar* reason,
-                                                  gpointer self)
+static void
+_dpap_copy_connected_cb_dmap_connection_func (DmapConnection* connection,
+                                              gboolean _result_,
+                                              const gchar* reason,
+                                              gpointer self)
 {
-	gboolean result;
-	result = dpap_copy_connected_cb ((DPAPCopy*) self, connection, _result_, reason);
-	return result;
+	dpap_copy_connected_cb ((DPAPCopy*) self, connection, _result_, reason);
 }
 
 static void
-dpap_copy_service_added_cb (DPAPCopy* self,
-                            DMAPMdnsBrowserService* service)
+__lambda5_ (DPAPCopy* self,
+            DmapMdnsBrowser* browser,
+            DmapMdnsService* service)
 {
-	const gchar* _tmp0_;
-	const gchar* _tmp1_;
-	ValaDMAPDb* _tmp2_;
-	ValaDPAPRecordFactory* _tmp3_;
-	DPAPConnection* _tmp4_;
-	DMAPConnection* _tmp5_;
-	g_return_if_fail (self != NULL);
-	_tmp0_ = service->service_name;
-	_tmp1_ = service->host;
-	_tmp2_ = self->priv->db;
-	_tmp3_ = self->priv->factory;
-	_tmp4_ = dpap_connection_new (_tmp0_, _tmp1_, service->port, (DMAPDb*) _tmp2_, (DMAPRecordFactory*) _tmp3_);
+	gchar* _tmp0_;
+	gchar* _tmp1_;
+	gchar* _tmp2_;
+	gchar* _tmp3_;
+	gchar* _tmp4_;
+	gchar* _tmp5_;
+	guint _tmp6_;
+	guint _tmp7_;
+	ValaDmapDb* _tmp8_;
+	ValaImageRecordFactory* _tmp9_;
+	DmapImageConnection* _tmp10_;
+	DmapConnection* _tmp11_;
+	g_return_if_fail (browser != NULL);
+	g_return_if_fail (service != NULL);
+	g_object_get (service, "service-name", &_tmp0_, NULL);
+	_tmp1_ = _tmp0_;
+	_tmp2_ = _tmp1_;
+	g_object_get (service, "host", &_tmp3_, NULL);
+	_tmp4_ = _tmp3_;
+	_tmp5_ = _tmp4_;
+	g_object_get (service, "port", &_tmp6_, NULL);
+	_tmp7_ = _tmp6_;
+	_tmp8_ = self->priv->db;
+	_tmp9_ = self->priv->factory;
+	_tmp10_ = dmap_image_connection_new (_tmp2_, _tmp5_, _tmp7_, (DmapDb*) _tmp8_, (DmapRecordFactory*) _tmp9_);
 	_g_object_unref0 (self->priv->connection);
-	self->priv->connection = G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, DMAP_TYPE_CONNECTION, DMAPConnection);
-	_tmp5_ = self->priv->connection;
-	dmap_connection_connect (_tmp5_, _dpap_copy_connected_cb_dmap_connection_callback, self);
+	self->priv->connection = G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, DMAP_TYPE_CONNECTION, DmapConnection);
+	_g_free0 (_tmp5_);
+	_g_free0 (_tmp2_);
+	_tmp11_ = self->priv->connection;
+	dmap_connection_start (_tmp11_, _dpap_copy_connected_cb_dmap_connection_func, self);
 }
 
 static void
-_dpap_copy_service_added_cb_dmap_mdns_browser_service_added (DMAPMdnsBrowser* _sender,
-                                                             void* service,
-                                                             gpointer self)
+___lambda5__dmap_mdns_browser_service_added (DmapMdnsBrowser* _sender,
+                                             DmapMdnsService* service,
+                                             gpointer self)
 {
-	dpap_copy_service_added_cb ((DPAPCopy*) self, service);
+	__lambda5_ ((DPAPCopy*) self, _sender, service);
 }
 
 DPAPCopy*
@@ -256,24 +280,24 @@ dpap_copy_construct (GType object_type,
                      GError** error)
 {
 	DPAPCopy* self = NULL;
-	ValaDMAPDb* _tmp0_;
-	ValaDPAPRecordFactory* _tmp1_;
-	DMAPMdnsBrowser* _tmp2_;
-	DMAPMdnsBrowser* _tmp3_;
-	DMAPMdnsBrowser* _tmp4_;
+	ValaDmapDb* _tmp0_;
+	ValaImageRecordFactory* _tmp1_;
+	DmapMdnsBrowser* _tmp2_;
+	DmapMdnsBrowser* _tmp3_;
+	DmapMdnsBrowser* _tmp4_;
 	GError* _inner_error0_ = NULL;
 	self = (DPAPCopy*) g_type_create_instance (object_type);
 	_tmp0_ = vala_dmap_db_new ();
 	_g_object_unref0 (self->priv->db);
 	self->priv->db = _tmp0_;
-	_tmp1_ = vala_dpap_record_factory_new ();
+	_tmp1_ = vala_image_record_factory_new ();
 	_g_object_unref0 (self->priv->factory);
 	self->priv->factory = _tmp1_;
-	_tmp2_ = dmap_mdns_browser_new (DMAP_MDNS_BROWSER_SERVICE_TYPE_DPAP);
+	_tmp2_ = dmap_mdns_browser_new (DMAP_MDNS_SERVICE_TYPE_DPAP);
 	_g_object_unref0 (self->priv->browser);
 	self->priv->browser = _tmp2_;
 	_tmp3_ = self->priv->browser;
-	g_signal_connect (_tmp3_, "service-added", (GCallback) _dpap_copy_service_added_cb_dmap_mdns_browser_service_added, self);
+	g_signal_connect (_tmp3_, "service-added", (GCallback) ___lambda5__dmap_mdns_browser_service_added, self);
 	_tmp4_ = self->priv->browser;
 	dmap_mdns_browser_start (_tmp4_, &_inner_error0_);
 	if (G_UNLIKELY (_inner_error0_ != NULL)) {
@@ -467,13 +491,13 @@ dpap_copy_get_type_once (void)
 GType
 dpap_copy_get_type (void)
 {
-	static volatile gsize dpap_copy_type_id__volatile = 0;
-	if (g_once_init_enter (&dpap_copy_type_id__volatile)) {
+	static volatile gsize dpap_copy_type_id__once = 0;
+	if (g_once_init_enter (&dpap_copy_type_id__once)) {
 		GType dpap_copy_type_id;
 		dpap_copy_type_id = dpap_copy_get_type_once ();
-		g_once_init_leave (&dpap_copy_type_id__volatile, dpap_copy_type_id);
+		g_once_init_leave (&dpap_copy_type_id__once, dpap_copy_type_id);
 	}
-	return dpap_copy_type_id__volatile;
+	return dpap_copy_type_id__once;
 }
 
 gpointer
@@ -522,7 +546,7 @@ _debug_null_glog_func (const gchar* log_domain,
 	debug_null (log_domain, log_levels, message);
 }
 
-gint
+static gint
 _vala_main (gchar** args,
             gint args_length1)
 {
@@ -531,7 +555,7 @@ _vala_main (gchar** args,
 	DPAPCopy* dmapcopy = NULL;
 	DPAPCopy* _tmp1_;
 	GError* _inner_error0_ = NULL;
-	gint result = 0;
+	gint result;
 	_tmp0_ = g_main_loop_new (NULL, FALSE);
 	loop = _tmp0_;
 	g_log_set_handler ("libdmapsharing", G_LOG_LEVEL_DEBUG, _debug_null_glog_func, NULL);
diff --git a/tests/dmapcopy.vala b/tests/dmapcopy.vala
index 434bc04..c80c5a2 100644
--- a/tests/dmapcopy.vala
+++ b/tests/dmapcopy.vala
@@ -21,17 +21,16 @@
  */
 
 private class DPAPCopy {
-	private DMAP.MdnsBrowser browser;
-	private DMAP.Connection connection;
-	private ValaDMAPDb db;
-	private ValaDPAPRecordFactory factory;
+	private Dmap.MdnsBrowser browser;
+	private Dmap.Connection connection;
+	private ValaDmapDb db;
+	private ValaImageRecordFactory factory;
 
-	private bool connected_cb (DMAP.Connection connection, bool result, string? reason) {
+	private void connected_cb (Dmap.Connection connection, bool result, string? reason) {
 		GLib.debug ("%" + int64.FORMAT + " entries\n", db.count ());
 
 		db.foreach ((k, v) => {
-
-			stdout.printf ("%s\n", ((ValaDPAPRecord) v).location);
+			stdout.printf ("%s\n", ((ValaImageRecord) v).location);
 
 			/* Uncomment to copy the data:
 			var session = new Soup.SessionAsync ();
@@ -54,21 +53,17 @@ private class DPAPCopy {
 			data_stream.write (message.response_body.data, (size_t) message.response_body.length, null);
 			*/
 		});
-
-		return true;
-	}
-
-	private void service_added_cb (DMAP.MdnsBrowserService *service) {
-		connection = (DMAP.Connection) new DPAP.Connection (service->service_name, service->host, service->port, db, factory);
-		connection.connect (connected_cb);
 	}
 
 	public DPAPCopy () throws GLib.Error {
-		db = new ValaDMAPDb ();
-		factory = new ValaDPAPRecordFactory ();
+		db = new ValaDmapDb ();
+		factory = new ValaImageRecordFactory ();
 
-		browser = new DMAP.MdnsBrowser (DMAP.MdnsBrowserServiceType.DPAP);
-		browser.service_added.connect (service_added_cb);
+		browser = new Dmap.MdnsBrowser (Dmap.MdnsServiceType.DPAP);
+		browser.service_added.connect ((browser, service) => {
+			connection = (Dmap.Connection) new Dmap.ImageConnection (service.service_name, service.host, service.port, db, factory);
+			connection.start (connected_cb);
+		});
 		browser.start ();
 	}
 }
diff --git a/tests/dmapserve.c b/tests/dmapserve.c
index 05179cd..bce99d7 100644
--- a/tests/dmapserve.c
+++ b/tests/dmapserve.c
@@ -1,4 +1,4 @@
-/* dmapserve.c generated by valac 0.48.6, the Vala compiler
+/* dmapserve.c generated by valac 0.56.3, the Vala compiler
  * generated from dmapserve.vala, do not modify */
 
 /*   FILE: dmapserve.vala -- Serve media using DMAP
@@ -26,11 +26,21 @@
 #include <glib-object.h>
 #include <libdmapsharing/dmap.h>
 #include <glib.h>
-#include <gobject/gvaluecollector.h>
 #include <stdlib.h>
 #include <string.h>
+#include <gobject/gvaluecollector.h>
 #include <stdio.h>
 
+#if !defined(VALA_EXTERN)
+#if defined(_MSC_VER)
+#define VALA_EXTERN __declspec(dllexport) extern
+#elif __GNUC__ >= 4
+#define VALA_EXTERN __attribute__((visibility("default"))) extern
+#else
+#define VALA_EXTERN extern
+#endif
+#endif
+
 #define TYPE_DPAP_SERVE (dpap_serve_get_type ())
 #define DPAP_SERVE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DPAP_SERVE, DPAPServe))
 #define DPAP_SERVE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DPAP_SERVE, DPAPServeClass))
@@ -42,39 +52,40 @@ typedef struct _DPAPServe DPAPServe;
 typedef struct _DPAPServeClass DPAPServeClass;
 typedef struct _DPAPServePrivate DPAPServePrivate;
 
-#define TYPE_VALA_DPAP_RECORD (vala_dpap_record_get_type ())
-#define VALA_DPAP_RECORD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DPAP_RECORD, ValaDPAPRecord))
-#define VALA_DPAP_RECORD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DPAP_RECORD, ValaDPAPRecordClass))
-#define IS_VALA_DPAP_RECORD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DPAP_RECORD))
-#define IS_VALA_DPAP_RECORD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DPAP_RECORD))
-#define VALA_DPAP_RECORD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DPAP_RECORD, ValaDPAPRecordClass))
+#define TYPE_VALA_IMAGE_RECORD (vala_image_record_get_type ())
+#define VALA_IMAGE_RECORD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_IMAGE_RECORD, ValaImageRecord))
+#define VALA_IMAGE_RECORD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_IMAGE_RECORD, ValaImageRecordClass))
+#define IS_VALA_IMAGE_RECORD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_IMAGE_RECORD))
+#define IS_VALA_IMAGE_RECORD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_IMAGE_RECORD))
+#define VALA_IMAGE_RECORD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_IMAGE_RECORD, ValaImageRecordClass))
 
-typedef struct _ValaDPAPRecord ValaDPAPRecord;
-typedef struct _ValaDPAPRecordClass ValaDPAPRecordClass;
+typedef struct _ValaImageRecord ValaImageRecord;
+typedef struct _ValaImageRecordClass ValaImageRecordClass;
 
 #define TYPE_VALA_DMAP_DB (vala_dmap_db_get_type ())
-#define VALA_DMAP_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DMAP_DB, ValaDMAPDb))
-#define VALA_DMAP_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DMAP_DB, ValaDMAPDbClass))
+#define VALA_DMAP_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DMAP_DB, ValaDmapDb))
+#define VALA_DMAP_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DMAP_DB, ValaDmapDbClass))
 #define IS_VALA_DMAP_DB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DMAP_DB))
 #define IS_VALA_DMAP_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DMAP_DB))
-#define VALA_DMAP_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DMAP_DB, ValaDMAPDbClass))
+#define VALA_DMAP_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DMAP_DB, ValaDmapDbClass))
 
-typedef struct _ValaDMAPDb ValaDMAPDb;
-typedef struct _ValaDMAPDbClass ValaDMAPDbClass;
+typedef struct _ValaDmapDb ValaDmapDb;
+typedef struct _ValaDmapDbClass ValaDmapDbClass;
 
 #define TYPE_VALA_DMAP_CONTAINER_DB (vala_dmap_container_db_get_type ())
-#define VALA_DMAP_CONTAINER_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DMAP_CONTAINER_DB, ValaDMAPContainerDb))
-#define VALA_DMAP_CONTAINER_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DMAP_CONTAINER_DB, ValaDMAPContainerDbClass))
+#define VALA_DMAP_CONTAINER_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DMAP_CONTAINER_DB, ValaDmapContainerDb))
+#define VALA_DMAP_CONTAINER_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DMAP_CONTAINER_DB, ValaDmapContainerDbClass))
 #define IS_VALA_DMAP_CONTAINER_DB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DMAP_CONTAINER_DB))
 #define IS_VALA_DMAP_CONTAINER_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DMAP_CONTAINER_DB))
-#define VALA_DMAP_CONTAINER_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DMAP_CONTAINER_DB, ValaDMAPContainerDbClass))
+#define VALA_DMAP_CONTAINER_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DMAP_CONTAINER_DB, ValaDmapContainerDbClass))
 
-typedef struct _ValaDMAPContainerDb ValaDMAPContainerDb;
-typedef struct _ValaDMAPContainerDbClass ValaDMAPContainerDbClass;
+typedef struct _ValaDmapContainerDb ValaDmapContainerDb;
+typedef struct _ValaDmapContainerDbClass ValaDmapContainerDbClass;
 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
+#define _dpap_serve_unref0(var) ((var == NULL) ? NULL : (var = (dpap_serve_unref (var), NULL)))
+#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
 typedef struct _ParamSpecDPAPServe ParamSpecDPAPServe;
 #define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
-#define _dpap_serve_unref0(var) ((var == NULL) ? NULL : (var = (dpap_serve_unref (var), NULL)))
 
 struct _DPAPServe {
 	GTypeInstance parent_instance;
@@ -88,10 +99,10 @@ struct _DPAPServeClass {
 };
 
 struct _DPAPServePrivate {
-	ValaDPAPRecord* record;
-	ValaDMAPDb* db;
-	ValaDMAPContainerDb* container_db;
-	DPAPShare* share;
+	ValaImageRecord* record;
+	ValaDmapDb* db;
+	ValaDmapContainerDb* container_db;
+	DmapImageShare* share;
 };
 
 struct _ParamSpecDPAPServe {
@@ -101,44 +112,44 @@ struct _ParamSpecDPAPServe {
 static gint DPAPServe_private_offset;
 static gpointer dpap_serve_parent_class = NULL;
 
-gpointer dpap_serve_ref (gpointer instance);
-void dpap_serve_unref (gpointer instance);
-GParamSpec* param_spec_dpap_serve (const gchar* name,
+VALA_EXTERN gpointer dpap_serve_ref (gpointer instance);
+VALA_EXTERN void dpap_serve_unref (gpointer instance);
+VALA_EXTERN GParamSpec* param_spec_dpap_serve (const gchar* name,
                                    const gchar* nick,
                                    const gchar* blurb,
                                    GType object_type,
                                    GParamFlags flags);
-void value_set_dpap_serve (GValue* value,
+VALA_EXTERN void value_set_dpap_serve (GValue* value,
                            gpointer v_object);
-void value_take_dpap_serve (GValue* value,
+VALA_EXTERN void value_take_dpap_serve (GValue* value,
                             gpointer v_object);
-gpointer value_get_dpap_serve (const GValue* value);
-GType dpap_serve_get_type (void) G_GNUC_CONST;
+VALA_EXTERN gpointer value_get_dpap_serve (const GValue* value);
+VALA_EXTERN GType dpap_serve_get_type (void) G_GNUC_CONST ;
 G_DEFINE_AUTOPTR_CLEANUP_FUNC (DPAPServe, dpap_serve_unref)
-GType vala_dpap_record_get_type (void) G_GNUC_CONST;
-G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaDPAPRecord, g_object_unref)
-GType vala_dmap_db_get_type (void) G_GNUC_CONST;
-G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaDMAPDb, g_object_unref)
-GType vala_dmap_container_db_get_type (void) G_GNUC_CONST;
-G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaDMAPContainerDb, g_object_unref)
-DPAPServe* dpap_serve_new (GError** error);
-DPAPServe* dpap_serve_construct (GType object_type,
+VALA_EXTERN GType vala_image_record_get_type (void) G_GNUC_CONST ;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaImageRecord, g_object_unref)
+VALA_EXTERN GType vala_dmap_db_get_type (void) G_GNUC_CONST ;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaDmapDb, g_object_unref)
+VALA_EXTERN GType vala_dmap_container_db_get_type (void) G_GNUC_CONST ;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaDmapContainerDb, g_object_unref)
+VALA_EXTERN DPAPServe* dpap_serve_new (GError** error);
+VALA_EXTERN DPAPServe* dpap_serve_construct (GType object_type,
                                  GError** error);
-ValaDPAPRecord* vala_dpap_record_new (void);
-ValaDPAPRecord* vala_dpap_record_construct (GType object_type);
-ValaDMAPDb* vala_dmap_db_new (void);
-ValaDMAPDb* vala_dmap_db_construct (GType object_type);
-ValaDMAPContainerDb* vala_dmap_container_db_new (void);
-ValaDMAPContainerDb* vala_dmap_container_db_construct (GType object_type);
+VALA_EXTERN ValaImageRecord* vala_image_record_new (void);
+VALA_EXTERN ValaImageRecord* vala_image_record_construct (GType object_type);
+VALA_EXTERN ValaDmapDb* vala_dmap_db_new (void);
+VALA_EXTERN ValaDmapDb* vala_dmap_db_construct (GType object_type);
+VALA_EXTERN ValaDmapContainerDb* vala_dmap_container_db_new (void);
+VALA_EXTERN ValaDmapContainerDb* vala_dmap_container_db_construct (GType object_type);
 static void dpap_serve_finalize (DPAPServe * obj);
 static GType dpap_serve_get_type_once (void);
-void debug_printf (const gchar* log_domain,
+VALA_EXTERN void debug_printf (const gchar* log_domain,
                    GLogLevelFlags log_level,
                    const gchar* message);
-void debug_null (const gchar* log_domain,
+VALA_EXTERN void debug_null (const gchar* log_domain,
                  GLogLevelFlags log_level,
                  const gchar* message);
-gint _vala_main (gchar** args,
+static gint _vala_main (gchar** args,
                  gint args_length1);
 static void _debug_printf_glog_func (const gchar* log_domain,
                               GLogLevelFlags log_levels,
@@ -156,16 +167,17 @@ dpap_serve_construct (GType object_type,
                       GError** error)
 {
 	DPAPServe* self = NULL;
-	ValaDPAPRecord* _tmp0_;
-	ValaDMAPDb* _tmp1_;
-	ValaDMAPDb* _tmp2_;
-	ValaDPAPRecord* _tmp3_;
-	ValaDMAPContainerDb* _tmp4_;
-	ValaDMAPDb* _tmp5_;
-	ValaDMAPContainerDb* _tmp6_;
-	DPAPShare* _tmp7_;
+	ValaImageRecord* _tmp0_;
+	ValaDmapDb* _tmp1_;
+	ValaDmapDb* _tmp2_;
+	ValaImageRecord* _tmp3_;
+	ValaDmapContainerDb* _tmp4_;
+	ValaDmapDb* _tmp5_;
+	ValaDmapContainerDb* _tmp6_;
+	DmapImageShare* _tmp7_;
+	GError* _inner_error0_ = NULL;
 	self = (DPAPServe*) g_type_create_instance (object_type);
-	_tmp0_ = vala_dpap_record_new ();
+	_tmp0_ = vala_image_record_new ();
 	_g_object_unref0 (self->priv->record);
 	self->priv->record = _tmp0_;
 	_tmp1_ = vala_dmap_db_new ();
@@ -173,15 +185,51 @@ dpap_serve_construct (GType object_type,
 	self->priv->db = _tmp1_;
 	_tmp2_ = self->priv->db;
 	_tmp3_ = self->priv->record;
-	dmap_db_add ((DMAPDb*) _tmp2_, (DMAPRecord*) _tmp3_);
+	dmap_db_add ((DmapDb*) _tmp2_, (DmapRecord*) _tmp3_, &_inner_error0_);
+	if (G_UNLIKELY (_inner_error0_ != NULL)) {
+		g_propagate_error (error, _inner_error0_);
+		_dpap_serve_unref0 (self);
+		return NULL;
+	}
 	_tmp4_ = vala_dmap_container_db_new ();
 	_g_object_unref0 (self->priv->container_db);
 	self->priv->container_db = _tmp4_;
 	_tmp5_ = self->priv->db;
 	_tmp6_ = self->priv->container_db;
-	_tmp7_ = dpap_share_new ("dmapserve", NULL, _tmp5_, _tmp6_, NULL);
+	_tmp7_ = dmap_image_share_new ("dmapserve", NULL, _tmp5_, _tmp6_, NULL);
 	_g_object_unref0 (self->priv->share);
 	self->priv->share = _tmp7_;
+	{
+		DmapImageShare* _tmp8_;
+		DmapImageShare* _tmp9_;
+		_tmp8_ = self->priv->share;
+		dmap_share_serve ((DmapShare*) _tmp8_, &_inner_error0_);
+		if (G_UNLIKELY (_inner_error0_ != NULL)) {
+			goto __catch0_g_error;
+		}
+		_tmp9_ = self->priv->share;
+		dmap_share_publish ((DmapShare*) _tmp9_, &_inner_error0_);
+		if (G_UNLIKELY (_inner_error0_ != NULL)) {
+			goto __catch0_g_error;
+		}
+	}
+	goto __finally0;
+	__catch0_g_error:
+	{
+		GError* e = NULL;
+		const gchar* _tmp10_;
+		e = _inner_error0_;
+		_inner_error0_ = NULL;
+		_tmp10_ = e->message;
+		g_error ("dmapserve.vala:39: Error starting server: %s", _tmp10_);
+		_g_error_free0 (e);
+	}
+	__finally0:
+	if (G_UNLIKELY (_inner_error0_ != NULL)) {
+		g_propagate_error (error, _inner_error0_);
+		_dpap_serve_unref0 (self);
+		return NULL;
+	}
 	return self;
 }
 
@@ -368,13 +416,13 @@ dpap_serve_get_type_once (void)
 GType
 dpap_serve_get_type (void)
 {
-	static volatile gsize dpap_serve_type_id__volatile = 0;
-	if (g_once_init_enter (&dpap_serve_type_id__volatile)) {
+	static volatile gsize dpap_serve_type_id__once = 0;
+	if (g_once_init_enter (&dpap_serve_type_id__once)) {
 		GType dpap_serve_type_id;
 		dpap_serve_type_id = dpap_serve_get_type_once ();
-		g_once_init_leave (&dpap_serve_type_id__volatile, dpap_serve_type_id);
+		g_once_init_leave (&dpap_serve_type_id__once, dpap_serve_type_id);
 	}
-	return dpap_serve_type_id__volatile;
+	return dpap_serve_type_id__once;
 }
 
 gpointer
@@ -423,7 +471,7 @@ _debug_printf_glog_func (const gchar* log_domain,
 	debug_printf (log_domain, log_levels, message);
 }
 
-gint
+static gint
 _vala_main (gchar** args,
             gint args_length1)
 {
@@ -432,7 +480,7 @@ _vala_main (gchar** args,
 	DPAPServe* dmapcopy = NULL;
 	DPAPServe* _tmp1_;
 	GError* _inner_error0_ = NULL;
-	gint result = 0;
+	gint result;
 	_tmp0_ = g_main_loop_new (NULL, FALSE);
 	loop = _tmp0_;
 	g_log_set_handler ("libdmapsharing", G_LOG_LEVEL_DEBUG, _debug_printf_glog_func, NULL);
diff --git a/tests/dmapserve.vala b/tests/dmapserve.vala
index 5f5b260..9cba6bd 100644
--- a/tests/dmapserve.vala
+++ b/tests/dmapserve.vala
@@ -21,17 +21,23 @@
  */
 
 private class DPAPServe {
-	ValaDPAPRecord record;
-	ValaDMAPDb db;
-	ValaDMAPContainerDb container_db;
-	DPAP.Share share;
+	ValaImageRecord record;
+	ValaDmapDb db;
+	ValaDmapContainerDb container_db;
+	Dmap.ImageShare share;
 
 	public DPAPServe () throws GLib.Error {
-		record = new ValaDPAPRecord ();
-		db = new ValaDMAPDb ();
+		record = new ValaImageRecord ();
+		db = new ValaDmapDb ();
 		db.add (record);
-		container_db = new ValaDMAPContainerDb ();
-		share = new DPAP.Share ("dmapserve", null, db, container_db, null);
+		container_db = new ValaDmapContainerDb ();
+		share = new Dmap.ImageShare ("dmapserve", null, db, container_db, null);
+		try {
+			share.serve();
+			share.publish();
+		} catch (GLib.Error e) {
+			GLib.error("Error starting server: %s", e.message);
+		}
 	}
 }
 
diff --git a/tests/dpapview.c b/tests/dpapview.c
index 76c91bb..565f75c 100644
--- a/tests/dpapview.c
+++ b/tests/dpapview.c
@@ -1,4 +1,4 @@
-/* dpapview.c generated by valac 0.48.6, the Vala compiler
+/* dpapview.c generated by valac 0.56.3, the Vala compiler
  * generated from dpapview.vala, do not modify */
 
 /*   FILE: dpapviewer.vala -- View DPAP data
@@ -35,147 +35,158 @@
 #include <gobject/gvaluecollector.h>
 #include <stdio.h>
 
+#if !defined(VALA_EXTERN)
+#if defined(_MSC_VER)
+#define VALA_EXTERN __declspec(dllexport) extern
+#elif __GNUC__ >= 4
+#define VALA_EXTERN __attribute__((visibility("default"))) extern
+#else
+#define VALA_EXTERN extern
+#endif
+#endif
+
 #define TYPE_DPAP_VIEWER (dpap_viewer_get_type ())
-#define DPAP_VIEWER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DPAP_VIEWER, DPAPViewer))
-#define DPAP_VIEWER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DPAP_VIEWER, DPAPViewerClass))
+#define DPAP_VIEWER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DPAP_VIEWER, DpapViewer))
+#define DPAP_VIEWER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DPAP_VIEWER, DpapViewerClass))
 #define IS_DPAP_VIEWER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DPAP_VIEWER))
 #define IS_DPAP_VIEWER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DPAP_VIEWER))
-#define DPAP_VIEWER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DPAP_VIEWER, DPAPViewerClass))
+#define DPAP_VIEWER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DPAP_VIEWER, DpapViewerClass))
 
-typedef struct _DPAPViewer DPAPViewer;
-typedef struct _DPAPViewerClass DPAPViewerClass;
-typedef struct _DPAPViewerPrivate DPAPViewerPrivate;
+typedef struct _DpapViewer DpapViewer;
+typedef struct _DpapViewerClass DpapViewerClass;
+typedef struct _DpapViewerPrivate DpapViewerPrivate;
 
 #define TYPE_VALA_DMAP_DB (vala_dmap_db_get_type ())
-#define VALA_DMAP_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DMAP_DB, ValaDMAPDb))
-#define VALA_DMAP_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DMAP_DB, ValaDMAPDbClass))
+#define VALA_DMAP_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DMAP_DB, ValaDmapDb))
+#define VALA_DMAP_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DMAP_DB, ValaDmapDbClass))
 #define IS_VALA_DMAP_DB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DMAP_DB))
 #define IS_VALA_DMAP_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DMAP_DB))
-#define VALA_DMAP_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DMAP_DB, ValaDMAPDbClass))
+#define VALA_DMAP_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DMAP_DB, ValaDmapDbClass))
 
-typedef struct _ValaDMAPDb ValaDMAPDb;
-typedef struct _ValaDMAPDbClass ValaDMAPDbClass;
+typedef struct _ValaDmapDb ValaDmapDb;
+typedef struct _ValaDmapDbClass ValaDmapDbClass;
 
-#define TYPE_VALA_DPAP_RECORD_FACTORY (vala_dpap_record_factory_get_type ())
-#define VALA_DPAP_RECORD_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DPAP_RECORD_FACTORY, ValaDPAPRecordFactory))
-#define VALA_DPAP_RECORD_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DPAP_RECORD_FACTORY, ValaDPAPRecordFactoryClass))
-#define IS_VALA_DPAP_RECORD_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DPAP_RECORD_FACTORY))
-#define IS_VALA_DPAP_RECORD_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DPAP_RECORD_FACTORY))
-#define VALA_DPAP_RECORD_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DPAP_RECORD_FACTORY, ValaDPAPRecordFactoryClass))
+#define TYPE_VALA_IMAGE_RECORD_FACTORY (vala_image_record_factory_get_type ())
+#define VALA_IMAGE_RECORD_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_IMAGE_RECORD_FACTORY, ValaImageRecordFactory))
+#define VALA_IMAGE_RECORD_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_IMAGE_RECORD_FACTORY, ValaImageRecordFactoryClass))
+#define IS_VALA_IMAGE_RECORD_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_IMAGE_RECORD_FACTORY))
+#define IS_VALA_IMAGE_RECORD_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_IMAGE_RECORD_FACTORY))
+#define VALA_IMAGE_RECORD_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_IMAGE_RECORD_FACTORY, ValaImageRecordFactoryClass))
 
-typedef struct _ValaDPAPRecordFactory ValaDPAPRecordFactory;
-typedef struct _ValaDPAPRecordFactoryClass ValaDPAPRecordFactoryClass;
+typedef struct _ValaImageRecordFactory ValaImageRecordFactory;
+typedef struct _ValaImageRecordFactoryClass ValaImageRecordFactoryClass;
 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
 
-#define TYPE_VALA_DPAP_RECORD (vala_dpap_record_get_type ())
-#define VALA_DPAP_RECORD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DPAP_RECORD, ValaDPAPRecord))
-#define VALA_DPAP_RECORD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DPAP_RECORD, ValaDPAPRecordClass))
-#define IS_VALA_DPAP_RECORD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DPAP_RECORD))
-#define IS_VALA_DPAP_RECORD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DPAP_RECORD))
-#define VALA_DPAP_RECORD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DPAP_RECORD, ValaDPAPRecordClass))
+#define TYPE_VALA_IMAGE_RECORD (vala_image_record_get_type ())
+#define VALA_IMAGE_RECORD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_IMAGE_RECORD, ValaImageRecord))
+#define VALA_IMAGE_RECORD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_IMAGE_RECORD, ValaImageRecordClass))
+#define IS_VALA_IMAGE_RECORD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_IMAGE_RECORD))
+#define IS_VALA_IMAGE_RECORD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_IMAGE_RECORD))
+#define VALA_IMAGE_RECORD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_IMAGE_RECORD, ValaImageRecordClass))
 
-typedef struct _ValaDPAPRecord ValaDPAPRecord;
-typedef struct _ValaDPAPRecordClass ValaDPAPRecordClass;
+typedef struct _ValaImageRecord ValaImageRecord;
+typedef struct _ValaImageRecordClass ValaImageRecordClass;
 #define _g_free0(var) (var = (g_free (var), NULL))
 #define _dpap_viewer_unref0(var) ((var == NULL) ? NULL : (var = (dpap_viewer_unref (var), NULL)))
-typedef struct _ParamSpecDPAPViewer ParamSpecDPAPViewer;
+typedef struct _ParamSpecDpapViewer ParamSpecDpapViewer;
 #define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
 
-struct _DPAPViewer {
+struct _DpapViewer {
 	GTypeInstance parent_instance;
 	volatile int ref_count;
-	DPAPViewerPrivate * priv;
+	DpapViewerPrivate * priv;
 };
 
-struct _DPAPViewerClass {
+struct _DpapViewerClass {
 	GTypeClass parent_class;
-	void (*finalize) (DPAPViewer *self);
+	void (*finalize) (DpapViewer *self);
 };
 
-struct _DPAPViewerPrivate {
-	DMAPMdnsBrowser* browser;
-	DMAPConnection* connection;
+struct _DpapViewerPrivate {
+	DmapMdnsBrowser* browser;
+	DmapConnection* connection;
 	GtkListStore* liststore;
-	ValaDMAPDb* db;
-	ValaDPAPRecordFactory* factory;
+	ValaDmapDb* db;
+	ValaImageRecordFactory* factory;
 };
 
-struct _ParamSpecDPAPViewer {
+struct _ParamSpecDpapViewer {
 	GParamSpec parent_instance;
 };
 
-static gint DPAPViewer_private_offset;
+static gint DpapViewer_private_offset;
 static gpointer dpap_viewer_parent_class = NULL;
 
-gpointer dpap_viewer_ref (gpointer instance);
-void dpap_viewer_unref (gpointer instance);
-GParamSpec* param_spec_dpap_viewer (const gchar* name,
+VALA_EXTERN gpointer dpap_viewer_ref (gpointer instance);
+VALA_EXTERN void dpap_viewer_unref (gpointer instance);
+VALA_EXTERN GParamSpec* param_spec_dpap_viewer (const gchar* name,
                                     const gchar* nick,
                                     const gchar* blurb,
                                     GType object_type,
                                     GParamFlags flags);
-void value_set_dpap_viewer (GValue* value,
+VALA_EXTERN void value_set_dpap_viewer (GValue* value,
                             gpointer v_object);
-void value_take_dpap_viewer (GValue* value,
+VALA_EXTERN void value_take_dpap_viewer (GValue* value,
                              gpointer v_object);
-gpointer value_get_dpap_viewer (const GValue* value);
-GType dpap_viewer_get_type (void) G_GNUC_CONST;
-G_DEFINE_AUTOPTR_CLEANUP_FUNC (DPAPViewer, dpap_viewer_unref)
-GType vala_dmap_db_get_type (void) G_GNUC_CONST;
-G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaDMAPDb, g_object_unref)
-GType vala_dpap_record_factory_get_type (void) G_GNUC_CONST;
-G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaDPAPRecordFactory, g_object_unref)
-static gboolean dpap_viewer_connected_cb (DPAPViewer* self,
-                                   DMAPConnection* connection,
-                                   gboolean _result_,
-                                   const gchar* reason);
-static void __lambda4_ (DPAPViewer* self,
-                 gconstpointer k,
-                 gconstpointer v);
-GType vala_dpap_record_get_type (void) G_GNUC_CONST;
-G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaDPAPRecord, g_object_unref)
-GByteArray* vala_dpap_record_get_thumbnail (ValaDPAPRecord* self);
-const gchar* vala_dpap_record_get_filename (ValaDPAPRecord* self);
-static void ___lambda4__gh_func (gconstpointer key,
-                          gconstpointer value,
-                          gpointer self);
-static void dpap_viewer_service_added_cb (DPAPViewer* self,
-                                   DMAPMdnsBrowserService* service);
-static gboolean _dpap_viewer_connected_cb_dmap_connection_callback (DMAPConnection* connection,
-                                                             gboolean _result_,
-                                                             const gchar* reason,
-                                                             gpointer self);
-DPAPViewer* dpap_viewer_new (GtkBuilder* builder,
+VALA_EXTERN gpointer value_get_dpap_viewer (const GValue* value);
+VALA_EXTERN GType dpap_viewer_get_type (void) G_GNUC_CONST ;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (DpapViewer, dpap_viewer_unref)
+VALA_EXTERN GType vala_dmap_db_get_type (void) G_GNUC_CONST ;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaDmapDb, g_object_unref)
+VALA_EXTERN GType vala_image_record_factory_get_type (void) G_GNUC_CONST ;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaImageRecordFactory, g_object_unref)
+static void dpap_viewer_connected_cb (DpapViewer* self,
+                               DmapConnection* connection,
+                               gboolean _result_,
+                               const gchar* reason);
+static void __lambda4_ (DpapViewer* self,
+                 guint k,
+                 DmapRecord* v);
+VALA_EXTERN GType vala_image_record_get_type (void) G_GNUC_CONST ;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaImageRecord, g_object_unref)
+VALA_EXTERN GArray* vala_image_record_get_thumbnail (ValaImageRecord* self);
+VALA_EXTERN const gchar* vala_image_record_get_filename (ValaImageRecord* self);
+static void ___lambda4__dmap_id_record_func (guint id,
+                                      DmapRecord* record,
+                                      gpointer self);
+VALA_EXTERN DpapViewer* dpap_viewer_new (GtkBuilder* builder,
                              GError** error);
-DPAPViewer* dpap_viewer_construct (GType object_type,
+VALA_EXTERN DpapViewer* dpap_viewer_construct (GType object_type,
                                    GtkBuilder* builder,
                                    GError** error);
-ValaDMAPDb* vala_dmap_db_new (void);
-ValaDMAPDb* vala_dmap_db_construct (GType object_type);
-ValaDPAPRecordFactory* vala_dpap_record_factory_new (void);
-ValaDPAPRecordFactory* vala_dpap_record_factory_construct (GType object_type);
-static void _dpap_viewer_service_added_cb_dmap_mdns_browser_service_added (DMAPMdnsBrowser* _sender,
-                                                                    void* service,
-                                                                    gpointer self);
-static void dpap_viewer_finalize (DPAPViewer * obj);
+VALA_EXTERN ValaDmapDb* vala_dmap_db_new (void);
+VALA_EXTERN ValaDmapDb* vala_dmap_db_construct (GType object_type);
+VALA_EXTERN ValaImageRecordFactory* vala_image_record_factory_new (void);
+VALA_EXTERN ValaImageRecordFactory* vala_image_record_factory_construct (GType object_type);
+static void __lambda5_ (DpapViewer* self,
+                 DmapMdnsBrowser* browser,
+                 DmapMdnsService* service);
+static void _dpap_viewer_connected_cb_dmap_connection_func (DmapConnection* connection,
+                                                     gboolean _result_,
+                                                     const gchar* reason,
+                                                     gpointer self);
+static void ___lambda5__dmap_mdns_browser_service_added (DmapMdnsBrowser* _sender,
+                                                  DmapMdnsService* service,
+                                                  gpointer self);
+static void dpap_viewer_finalize (DpapViewer * obj);
 static GType dpap_viewer_get_type_once (void);
-gint _vala_main (gchar** args,
+static gint _vala_main (gchar** args,
                  gint args_length1);
 
 static inline gpointer
-dpap_viewer_get_instance_private (DPAPViewer* self)
+dpap_viewer_get_instance_private (DpapViewer* self)
 {
-	return G_STRUCT_MEMBER_P (self, DPAPViewer_private_offset);
+	return G_STRUCT_MEMBER_P (self, DpapViewer_private_offset);
 }
 
 static void
-__lambda4_ (DPAPViewer* self,
-            gconstpointer k,
-            gconstpointer v)
+__lambda4_ (DpapViewer* self,
+            guint k,
+            DmapRecord* v)
 {
 	GdkPixbuf* pixbuf = NULL;
-	GByteArray* _tmp0_;
-	GByteArray* _tmp1_;
+	GArray* _tmp0_;
+	GArray* _tmp1_;
 	GtkTreeIter iter = {0};
 	GtkListStore* _tmp13_;
 	GtkTreeIter _tmp14_ = {0};
@@ -185,8 +196,9 @@ __lambda4_ (DPAPViewer* self,
 	const gchar* _tmp18_;
 	const gchar* _tmp19_;
 	GError* _inner_error0_ = NULL;
+	g_return_if_fail (v != NULL);
 	pixbuf = NULL;
-	_tmp0_ = vala_dpap_record_get_thumbnail (G_TYPE_CHECK_INSTANCE_CAST (v, TYPE_VALA_DPAP_RECORD, ValaDPAPRecord));
+	_tmp0_ = vala_image_record_get_thumbnail (G_TYPE_CHECK_INSTANCE_CAST (v, TYPE_VALA_IMAGE_RECORD, ValaImageRecord));
 	_tmp1_ = _tmp0_;
 	if (_tmp1_ != NULL) {
 		gchar* path = NULL;
@@ -194,9 +206,9 @@ __lambda4_ (DPAPViewer* self,
 		gchar* _tmp2_ = NULL;
 		gint _tmp3_;
 		const gchar* _tmp4_;
-		GByteArray* _tmp5_;
-		GByteArray* _tmp6_;
-		guint8* _tmp7_;
+		GArray* _tmp5_;
+		GArray* _tmp6_;
+		gpointer* _tmp7_;
 		gint _tmp7__length1;
 		GdkPixbuf* _tmp8_ = NULL;
 		const gchar* _tmp9_;
@@ -215,11 +227,11 @@ __lambda4_ (DPAPViewer* self,
 			return;
 		}
 		_tmp4_ = path;
-		_tmp5_ = vala_dpap_record_get_thumbnail (G_TYPE_CHECK_INSTANCE_CAST (v, TYPE_VALA_DPAP_RECORD, ValaDPAPRecord));
+		_tmp5_ = vala_image_record_get_thumbnail (G_TYPE_CHECK_INSTANCE_CAST (v, TYPE_VALA_IMAGE_RECORD, ValaImageRecord));
 		_tmp6_ = _tmp5_;
 		_tmp7_ = _tmp6_->data;
 		_tmp7__length1 = _tmp6_->len;
-		g_file_set_contents (_tmp4_, (const char*) _tmp7_, (size_t) _tmp7__length1, &_inner_error0_);
+		g_file_set_contents (_tmp4_, (const char*) ((guint8*) _tmp7_), (gsize) _tmp7__length1, &_inner_error0_);
 		if (G_UNLIKELY (_inner_error0_ != NULL)) {
 			_g_free0 (path);
 			_g_object_unref0 (pixbuf);
@@ -253,92 +265,103 @@ __lambda4_ (DPAPViewer* self,
 	_tmp15_ = self->priv->liststore;
 	_tmp16_ = iter;
 	_tmp17_ = pixbuf;
-	_tmp18_ = vala_dpap_record_get_filename (G_TYPE_CHECK_INSTANCE_CAST (v, TYPE_VALA_DPAP_RECORD, ValaDPAPRecord));
+	_tmp18_ = vala_image_record_get_filename (G_TYPE_CHECK_INSTANCE_CAST (v, TYPE_VALA_IMAGE_RECORD, ValaImageRecord));
 	_tmp19_ = _tmp18_;
 	gtk_list_store_set (_tmp15_, &_tmp16_, 0, _tmp17_, 1, _tmp19_, -1);
 	_g_object_unref0 (pixbuf);
 }
 
 static void
-___lambda4__gh_func (gconstpointer key,
-                     gconstpointer value,
-                     gpointer self)
+___lambda4__dmap_id_record_func (guint id,
+                                 DmapRecord* record,
+                                 gpointer self)
 {
-	__lambda4_ ((DPAPViewer*) self, key, value);
+	__lambda4_ ((DpapViewer*) self, id, record);
 }
 
-static gboolean
-dpap_viewer_connected_cb (DPAPViewer* self,
-                          DMAPConnection* connection,
+static void
+dpap_viewer_connected_cb (DpapViewer* self,
+                          DmapConnection* connection,
                           gboolean _result_,
                           const gchar* reason)
 {
-	ValaDMAPDb* _tmp0_;
-	ValaDMAPDb* _tmp1_;
-	gboolean result = FALSE;
-	g_return_val_if_fail (self != NULL, FALSE);
-	g_return_val_if_fail (connection != NULL, FALSE);
+	ValaDmapDb* _tmp0_;
+	ValaDmapDb* _tmp1_;
+	g_return_if_fail (self != NULL);
+	g_return_if_fail (connection != NULL);
 	_tmp0_ = self->priv->db;
-	g_debug ("%" G_GINT64_FORMAT " entries\n", dmap_db_count ((DMAPDb*) _tmp0_));
+	g_debug ("%" G_GINT64_FORMAT " entries\n", dmap_db_count ((DmapDb*) _tmp0_));
 	_tmp1_ = self->priv->db;
-	dmap_db_foreach ((DMAPDb*) _tmp1_, ___lambda4__gh_func, self);
-	result = TRUE;
-	return result;
+	dmap_db_foreach ((DmapDb*) _tmp1_, ___lambda4__dmap_id_record_func, self);
 }
 
-static gboolean
-_dpap_viewer_connected_cb_dmap_connection_callback (DMAPConnection* connection,
-                                                    gboolean _result_,
-                                                    const gchar* reason,
-                                                    gpointer self)
+static gpointer
+_g_object_ref0 (gpointer self)
 {
-	gboolean result;
-	result = dpap_viewer_connected_cb ((DPAPViewer*) self, connection, _result_, reason);
-	return result;
+	return self ? g_object_ref (self) : NULL;
 }
 
 static void
-dpap_viewer_service_added_cb (DPAPViewer* self,
-                              DMAPMdnsBrowserService* service)
+_dpap_viewer_connected_cb_dmap_connection_func (DmapConnection* connection,
+                                                gboolean _result_,
+                                                const gchar* reason,
+                                                gpointer self)
 {
-	const gchar* _tmp0_;
-	const gchar* _tmp1_;
-	ValaDMAPDb* _tmp2_;
-	ValaDPAPRecordFactory* _tmp3_;
-	DPAPConnection* _tmp4_;
-	DMAPConnection* _tmp5_;
-	g_return_if_fail (self != NULL);
-	_tmp0_ = service->service_name;
-	_tmp1_ = service->host;
-	_tmp2_ = self->priv->db;
-	_tmp3_ = self->priv->factory;
-	_tmp4_ = dpap_connection_new (_tmp0_, _tmp1_, service->port, (DMAPDb*) _tmp2_, (DMAPRecordFactory*) _tmp3_);
-	_g_object_unref0 (self->priv->connection);
-	self->priv->connection = G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, DMAP_TYPE_CONNECTION, DMAPConnection);
-	_tmp5_ = self->priv->connection;
-	dmap_connection_connect (_tmp5_, _dpap_viewer_connected_cb_dmap_connection_callback, self);
+	dpap_viewer_connected_cb ((DpapViewer*) self, connection, _result_, reason);
 }
 
-static gpointer
-_g_object_ref0 (gpointer self)
+static void
+__lambda5_ (DpapViewer* self,
+            DmapMdnsBrowser* browser,
+            DmapMdnsService* service)
 {
-	return self ? g_object_ref (self) : NULL;
+	gchar* _tmp0_;
+	gchar* _tmp1_;
+	gchar* _tmp2_;
+	gchar* _tmp3_;
+	gchar* _tmp4_;
+	gchar* _tmp5_;
+	guint _tmp6_;
+	guint _tmp7_;
+	ValaDmapDb* _tmp8_;
+	ValaImageRecordFactory* _tmp9_;
+	DmapImageConnection* _tmp10_;
+	DmapConnection* _tmp11_;
+	g_return_if_fail (browser != NULL);
+	g_return_if_fail (service != NULL);
+	g_object_get (service, "service-name", &_tmp0_, NULL);
+	_tmp1_ = _tmp0_;
+	_tmp2_ = _tmp1_;
+	g_object_get (service, "host", &_tmp3_, NULL);
+	_tmp4_ = _tmp3_;
+	_tmp5_ = _tmp4_;
+	g_object_get (service, "port", &_tmp6_, NULL);
+	_tmp7_ = _tmp6_;
+	_tmp8_ = self->priv->db;
+	_tmp9_ = self->priv->factory;
+	_tmp10_ = dmap_image_connection_new (_tmp2_, _tmp5_, _tmp7_, (DmapDb*) _tmp8_, (DmapRecordFactory*) _tmp9_);
+	_g_object_unref0 (self->priv->connection);
+	self->priv->connection = G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, DMAP_TYPE_CONNECTION, DmapConnection);
+	_g_free0 (_tmp5_);
+	_g_free0 (_tmp2_);
+	_tmp11_ = self->priv->connection;
+	dmap_connection_start (_tmp11_, _dpap_viewer_connected_cb_dmap_connection_func, self);
 }
 
 static void
-_dpap_viewer_service_added_cb_dmap_mdns_browser_service_added (DMAPMdnsBrowser* _sender,
-                                                               void* service,
-                                                               gpointer self)
+___lambda5__dmap_mdns_browser_service_added (DmapMdnsBrowser* _sender,
+                                             DmapMdnsService* service,
+                                             gpointer self)
 {
-	dpap_viewer_service_added_cb ((DPAPViewer*) self, service);
+	__lambda5_ ((DpapViewer*) self, _sender, service);
 }
 
-DPAPViewer*
+DpapViewer*
 dpap_viewer_construct (GType object_type,
                        GtkBuilder* builder,
                        GError** error)
 {
-	DPAPViewer* self = NULL;
+	DpapViewer* self = NULL;
 	GtkWidget* widget = NULL;
 	GObject* _tmp0_;
 	GtkWidget* _tmp1_;
@@ -347,14 +370,14 @@ dpap_viewer_construct (GType object_type,
 	GtkIconView* _tmp3_;
 	GObject* _tmp4_;
 	GtkListStore* _tmp5_;
-	ValaDMAPDb* _tmp6_;
-	ValaDPAPRecordFactory* _tmp7_;
-	DMAPMdnsBrowser* _tmp8_;
-	DMAPMdnsBrowser* _tmp9_;
-	DMAPMdnsBrowser* _tmp10_;
+	ValaDmapDb* _tmp6_;
+	ValaImageRecordFactory* _tmp7_;
+	DmapMdnsBrowser* _tmp8_;
+	DmapMdnsBrowser* _tmp9_;
+	DmapMdnsBrowser* _tmp10_;
 	GError* _inner_error0_ = NULL;
 	g_return_val_if_fail (builder != NULL, NULL);
-	self = (DPAPViewer*) g_type_create_instance (object_type);
+	self = (DpapViewer*) g_type_create_instance (object_type);
 	gtk_builder_connect_signals (builder, self);
 	_tmp0_ = gtk_builder_get_object (builder, "window");
 	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, gtk_widget_get_type ()) ? ((GtkWidget*) _tmp0_) : NULL);
@@ -369,17 +392,17 @@ dpap_viewer_construct (GType object_type,
 	_tmp6_ = vala_dmap_db_new ();
 	_g_object_unref0 (self->priv->db);
 	self->priv->db = _tmp6_;
-	_tmp7_ = vala_dpap_record_factory_new ();
+	_tmp7_ = vala_image_record_factory_new ();
 	_g_object_unref0 (self->priv->factory);
 	self->priv->factory = _tmp7_;
 	gtk_icon_view_set_pixbuf_column (iconview, 0);
 	gtk_icon_view_set_text_column (iconview, 1);
 	gtk_widget_show_all (widget);
-	_tmp8_ = dmap_mdns_browser_new (DMAP_MDNS_BROWSER_SERVICE_TYPE_DPAP);
+	_tmp8_ = dmap_mdns_browser_new (DMAP_MDNS_SERVICE_TYPE_DPAP);
 	_g_object_unref0 (self->priv->browser);
 	self->priv->browser = _tmp8_;
 	_tmp9_ = self->priv->browser;
-	g_signal_connect (_tmp9_, "service-added", (GCallback) _dpap_viewer_service_added_cb_dmap_mdns_browser_service_added, self);
+	g_signal_connect (_tmp9_, "service-added", (GCallback) ___lambda5__dmap_mdns_browser_service_added, self);
 	_tmp10_ = self->priv->browser;
 	dmap_mdns_browser_start (_tmp10_, &_inner_error0_);
 	if (G_UNLIKELY (_inner_error0_ != NULL)) {
@@ -394,7 +417,7 @@ dpap_viewer_construct (GType object_type,
 	return self;
 }
 
-DPAPViewer*
+DpapViewer*
 dpap_viewer_new (GtkBuilder* builder,
                  GError** error)
 {
@@ -439,7 +462,7 @@ value_dpap_viewer_collect_value (GValue* value,
                                  guint collect_flags)
 {
 	if (collect_values[0].v_pointer) {
-		DPAPViewer * object;
+		DpapViewer * object;
 		object = collect_values[0].v_pointer;
 		if (object->parent_instance.g_class == NULL) {
 			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
@@ -459,7 +482,7 @@ value_dpap_viewer_lcopy_value (const GValue* value,
                                GTypeCValue* collect_values,
                                guint collect_flags)
 {
-	DPAPViewer ** object_p;
+	DpapViewer ** object_p;
 	object_p = collect_values[0].v_pointer;
 	if (!object_p) {
 		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
@@ -481,7 +504,7 @@ param_spec_dpap_viewer (const gchar* name,
                         GType object_type,
                         GParamFlags flags)
 {
-	ParamSpecDPAPViewer* spec;
+	ParamSpecDpapViewer* spec;
 	g_return_val_if_fail (g_type_is_a (object_type, TYPE_DPAP_VIEWER), NULL);
 	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
 	G_PARAM_SPEC (spec)->value_type = object_type;
@@ -499,7 +522,7 @@ void
 value_set_dpap_viewer (GValue* value,
                        gpointer v_object)
 {
-	DPAPViewer * old;
+	DpapViewer * old;
 	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_DPAP_VIEWER));
 	old = value->data[0].v_pointer;
 	if (v_object) {
@@ -519,7 +542,7 @@ void
 value_take_dpap_viewer (GValue* value,
                         gpointer v_object)
 {
-	DPAPViewer * old;
+	DpapViewer * old;
 	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_DPAP_VIEWER));
 	old = value->data[0].v_pointer;
 	if (v_object) {
@@ -535,16 +558,16 @@ value_take_dpap_viewer (GValue* value,
 }
 
 static void
-dpap_viewer_class_init (DPAPViewerClass * klass,
+dpap_viewer_class_init (DpapViewerClass * klass,
                         gpointer klass_data)
 {
 	dpap_viewer_parent_class = g_type_class_peek_parent (klass);
-	((DPAPViewerClass *) klass)->finalize = dpap_viewer_finalize;
-	g_type_class_adjust_private_offset (klass, &DPAPViewer_private_offset);
+	((DpapViewerClass *) klass)->finalize = dpap_viewer_finalize;
+	g_type_class_adjust_private_offset (klass, &DpapViewer_private_offset);
 }
 
 static void
-dpap_viewer_instance_init (DPAPViewer * self,
+dpap_viewer_instance_init (DpapViewer * self,
                            gpointer klass)
 {
 	self->priv = dpap_viewer_get_instance_private (self);
@@ -552,10 +575,10 @@ dpap_viewer_instance_init (DPAPViewer * self,
 }
 
 static void
-dpap_viewer_finalize (DPAPViewer * obj)
+dpap_viewer_finalize (DpapViewer * obj)
 {
-	DPAPViewer * self;
-	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_DPAP_VIEWER, DPAPViewer);
+	DpapViewer * self;
+	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_DPAP_VIEWER, DpapViewer);
 	g_signal_handlers_destroy (self);
 	_g_object_unref0 (self->priv->browser);
 	_g_object_unref0 (self->priv->connection);
@@ -568,30 +591,30 @@ static GType
 dpap_viewer_get_type_once (void)
 {
 	static const GTypeValueTable g_define_type_value_table = { value_dpap_viewer_init, value_dpap_viewer_free_value, value_dpap_viewer_copy_value, value_dpap_viewer_peek_pointer, "p", value_dpap_viewer_collect_value, "p", value_dpap_viewer_lcopy_value };
-	static const GTypeInfo g_define_type_info = { sizeof (DPAPViewerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dpap_viewer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DPAPViewer), 0, (GInstanceInitFunc) dpap_viewer_instance_init, &g_define_type_value_table };
+	static const GTypeInfo g_define_type_info = { sizeof (DpapViewerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dpap_viewer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DpapViewer), 0, (GInstanceInitFunc) dpap_viewer_instance_init, &g_define_type_value_table };
 	static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
 	GType dpap_viewer_type_id;
-	dpap_viewer_type_id = g_type_register_fundamental (g_type_fundamental_next (), "DPAPViewer", &g_define_type_info, &g_define_type_fundamental_info, 0);
-	DPAPViewer_private_offset = g_type_add_instance_private (dpap_viewer_type_id, sizeof (DPAPViewerPrivate));
+	dpap_viewer_type_id = g_type_register_fundamental (g_type_fundamental_next (), "DpapViewer", &g_define_type_info, &g_define_type_fundamental_info, 0);
+	DpapViewer_private_offset = g_type_add_instance_private (dpap_viewer_type_id, sizeof (DpapViewerPrivate));
 	return dpap_viewer_type_id;
 }
 
 GType
 dpap_viewer_get_type (void)
 {
-	static volatile gsize dpap_viewer_type_id__volatile = 0;
-	if (g_once_init_enter (&dpap_viewer_type_id__volatile)) {
+	static volatile gsize dpap_viewer_type_id__once = 0;
+	if (g_once_init_enter (&dpap_viewer_type_id__once)) {
 		GType dpap_viewer_type_id;
 		dpap_viewer_type_id = dpap_viewer_get_type_once ();
-		g_once_init_leave (&dpap_viewer_type_id__volatile, dpap_viewer_type_id);
+		g_once_init_leave (&dpap_viewer_type_id__once, dpap_viewer_type_id);
 	}
-	return dpap_viewer_type_id__volatile;
+	return dpap_viewer_type_id__once;
 }
 
 gpointer
 dpap_viewer_ref (gpointer instance)
 {
-	DPAPViewer * self;
+	DpapViewer * self;
 	self = instance;
 	g_atomic_int_inc (&self->ref_count);
 	return instance;
@@ -600,7 +623,7 @@ dpap_viewer_ref (gpointer instance)
 void
 dpap_viewer_unref (gpointer instance)
 {
-	DPAPViewer * self;
+	DpapViewer * self;
 	self = instance;
 	if (g_atomic_int_dec_and_test (&self->ref_count)) {
 		DPAP_VIEWER_GET_CLASS (self)->finalize (self);
@@ -608,20 +631,20 @@ dpap_viewer_unref (gpointer instance)
 	}
 }
 
-gint
+static gint
 _vala_main (gchar** args,
             gint args_length1)
 {
 	GError* _inner_error0_ = NULL;
-	gint result = 0;
+	gint result;
 	gtk_init ((gint*) (&args_length1), &args);
 	{
 		GtkBuilder* builder = NULL;
 		GtkBuilder* _tmp0_;
 		GtkBuilder* _tmp1_;
-		DPAPViewer* dpapviewer = NULL;
+		DpapViewer* dpapviewer = NULL;
 		GtkBuilder* _tmp2_;
-		DPAPViewer* _tmp3_;
+		DpapViewer* _tmp3_;
 		_tmp0_ = gtk_builder_new ();
 		builder = _tmp0_;
 		_tmp1_ = builder;
diff --git a/tests/dpapview.vala b/tests/dpapview.vala
index 3e8901a..d319e8d 100644
--- a/tests/dpapview.vala
+++ b/tests/dpapview.vala
@@ -20,22 +20,22 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-private class DPAPViewer {
-	private DMAP.MdnsBrowser browser;
-	private DMAP.Connection connection;
+private class DpapViewer {
+	private Dmap.MdnsBrowser browser;
+	private Dmap.Connection connection;
 	private Gtk.ListStore liststore;
-	private ValaDMAPDb db;
-	private ValaDPAPRecordFactory factory;
+	private ValaDmapDb db;
+	private ValaImageRecordFactory factory;
 
-	private bool connected_cb (DMAP.Connection connection, bool result, string? reason) {
+	private void connected_cb (Dmap.Connection connection, bool result, string? reason) {
 		GLib.debug ("%" + int64.FORMAT + " entries\n", db.count ());
 
 		db.foreach ((k, v) => {
 			Gdk.Pixbuf pixbuf = null;
-			if (((ValaDPAPRecord) v).thumbnail != null) {
+			if (((ValaImageRecord) v).thumbnail != null) {
 				string path;
 				int fd = GLib.FileUtils.open_tmp ("dpapview.XXXXXX", out path);
-				GLib.FileUtils.set_data (path, ((ValaDPAPRecord) v).thumbnail.data);
+				GLib.FileUtils.set_data (path, (uint8[]) ((ValaImageRecord) v).thumbnail.data);
 				GLib.FileUtils.close (fd);
 				pixbuf = new Gdk.Pixbuf.from_file (path);
 				GLib.FileUtils.unlink (path);
@@ -43,33 +43,29 @@ private class DPAPViewer {
 
 			Gtk.TreeIter iter;
 			liststore.append (out iter);
-			liststore.set (iter, 0, pixbuf, 1, ((ValaDPAPRecord) v).filename);
+			liststore.set (iter, 0, pixbuf, 1, ((ValaImageRecord) v).filename);
 		});
-
-		return true;
-	}
-
-	private void service_added_cb (DMAP.MdnsBrowserService *service) {
-		connection = (DMAP.Connection) new DPAP.Connection (service->service_name, service->host, service->port, db, factory);
-		connection.connect (connected_cb);
 	}
 
-	public DPAPViewer (Gtk.Builder builder) throws GLib.Error {
+	public DpapViewer (Gtk.Builder builder) throws GLib.Error {
 		builder.connect_signals (this);
 
 		Gtk.Widget widget = builder.get_object ("window") as Gtk.Widget;
 		Gtk.IconView iconview = builder.get_object ("iconview") as Gtk.IconView;
 		liststore = builder.get_object ("liststore") as Gtk.ListStore;
-		db = new ValaDMAPDb ();
-		factory = new ValaDPAPRecordFactory ();
+		db = new ValaDmapDb ();
+		factory = new ValaImageRecordFactory ();
 
 		iconview.set_pixbuf_column (0);
 		iconview.set_text_column (1);
 
 		widget.show_all ();
 
-		browser = new DMAP.MdnsBrowser (DMAP.MdnsBrowserServiceType.DPAP);
-		browser.service_added.connect (service_added_cb);
+		browser = new Dmap.MdnsBrowser (Dmap.MdnsServiceType.DPAP);
+		browser.service_added.connect ((browser, service) =>  {
+			connection = (Dmap.Connection) new Dmap.ImageConnection (service.service_name, service.host, service.port, db, factory);
+			connection.start (connected_cb);
+		});
 		browser.start ();
 	}
 }
@@ -81,7 +77,7 @@ int main (string[] args) {
 		var builder = new Gtk.Builder ();
 		builder.add_from_file ("tests/dpapview.ui");
 
-		var dpapviewer = new DPAPViewer (builder);
+		var dpapviewer = new DpapViewer (builder);
 
 		Gtk.main ();
 
diff --git a/tests/test-dmap-client.c b/tests/test-dmap-client.c
index 86b406f..d2c87dd 100644
--- a/tests/test-dmap-client.c
+++ b/tests/test-dmap-client.c
@@ -23,10 +23,9 @@
 #include <string.h>
 
 #include <libdmapsharing/dmap.h>
-#include <libdmapsharing/test-daap-record-factory.h>
-#include <libdmapsharing/test-dpap-record-factory.h>
-
-#include "test-dmap-db.h"
+#include <libdmapsharing/test-dmap-av-record-factory.h>
+#include <libdmapsharing/test-dmap-image-record-factory.h>
+#include <libdmapsharing/test-dmap-db.h>
 
 enum {
     DAAP,
@@ -37,42 +36,65 @@ static GMainLoop *loop;
 static guint conn_type = DAAP;
 
 static void
-print_record (gpointer id, DMAPRecord *record, gpointer user_data)
+print_record (gpointer id, DmapRecord *record, G_GNUC_UNUSED gpointer user_data)
 {
-	gboolean has_video;
-	gchar   *artist, *title;
-
-	g_object_get (record,
-	             "has-video", &has_video,
-	             "songartist", &artist,
-	             "title",  &title,
-	              NULL);
-
-	g_print ("%d: %s %s (has video: %s)\n", GPOINTER_TO_UINT (id), artist, title, has_video ? "Y" : "N");
+	if (DMAP_IS_AV_RECORD(record)) {
+		gboolean has_video;
+		gchar   *artist, *title;
+
+		g_object_get (record,
+			     "has-video", &has_video,
+			     "songartist", &artist,
+			     "title",  &title,
+			      NULL);
+
+		g_print ("%d: %s %s (has video: %s)\n", GPOINTER_TO_UINT(id), artist, title, has_video ? "Y" : "N");
+
+		g_free (artist);
+		g_free (title);
+	} else if (DMAP_IS_IMAGE_RECORD(record)) {
+		gchar   *format, *location;
+
+		g_object_get (record,
+			     "format", &format,
+			     "location", &location,
+			      NULL);
+
+		g_print ("%d: %s %s\n", GPOINTER_TO_UINT(id), format, location);
+
+		g_free (format);
+		g_free (location);
+	} else {
+		g_assert_not_reached();
+	}
+}
 
-	g_free (artist);
-	g_free (title);
+static void error_cb(G_GNUC_UNUSED DmapConnection *connection,
+                     GError *error,
+                     G_GNUC_UNUSED gpointer user_data)
+{
+	g_error("%s", error->message);
 }
 
 static void
-connected_cb (DMAPConnection *connection,
-			 gboolean        result,
-			 const char     *reason,
-			 DMAPDb         *db)
+connected_cb (G_GNUC_UNUSED DmapConnection *connection,
+              G_GNUC_UNUSED gboolean        result,
+              G_GNUC_UNUSED const char     *reason,
+              DmapDb         *db)
 {
 	g_print ("Connection cb., DB has %lu entries\n", dmap_db_count (db));
 
-	dmap_db_foreach (db, (GHFunc) print_record, NULL);
+	dmap_db_foreach (db, (DmapIdRecordFunc) print_record, NULL);
 }
 
 static void
-authenticate_cb (DMAPConnection *connection,
-		 const char *name,
+authenticate_cb (DmapConnection *connection,
+		 G_GNUC_UNUSED const char *name,
 		 SoupSession *session,
 		 SoupMessage *msg,
 		 SoupAuth *auth,
-		 gboolean retrying,
-		 gpointer user_data)
+		 G_GNUC_UNUSED gboolean retrying,
+		 G_GNUC_UNUSED gpointer user_data)
 {
 	char *username, password[BUFSIZ + 1], *rc;
 	g_object_get (connection, "username", &username, NULL);
@@ -84,25 +106,33 @@ authenticate_cb (DMAPConnection *connection,
 	}
 
 	password[strlen(password) - 1] = 0x00; // Remove newline.
-	g_object_set (connection, "password", password, NULL);
-	soup_auth_authenticate (auth, username, password);
-	soup_session_unpause_message (session, msg);
+
+	dmap_connection_authenticate_message(connection, session, msg, auth, password);
+
+	g_free(username);
 }
 
 static void
-service_added_cb (DMAPMdnsBrowser *browser,
-                  DMAPMdnsBrowserService *service,
-                  gpointer user_data)
+service_added_cb (G_GNUC_UNUSED DmapMdnsBrowser *browser,
+                  DmapMdnsService *service,
+                  G_GNUC_UNUSED gpointer user_data)
 {
-    DMAPRecordFactory *factory;
-    DMAPConnection *conn;
-    DMAPDb *db;
+    DmapRecordFactory *factory;
+    DmapConnection *conn;
+    DmapDb *db;
+    guint port;
+    gchar *service_name, *name, *host;
+
+    g_object_get(service, "service-name", &service_name,
+                          "name", &name,
+                          "host", &host,
+                          "port", &port, NULL);
 
     g_debug ("service added %s:%s:%s:%d",
-             service->service_name,
-             service->name,
-             service->host,
-             service->port);
+             service_name,
+             name,
+             host,
+             port);
 
     db = DMAP_DB (test_dmap_db_new ());
     if (db == NULL) {
@@ -110,36 +140,61 @@ service_added_cb (DMAPMdnsBrowser *browser,
     }
 
     if (conn_type == DAAP) {
-        factory = DMAP_RECORD_FACTORY (test_daap_record_factory_new ());
+        factory = DMAP_RECORD_FACTORY (test_dmap_av_record_factory_new ());
         if (factory == NULL) {
    	    g_error ("Error creating record factory");
         }
-        conn = DMAP_CONNECTION (daap_connection_new (service->name, service->host, service->port, db, factory));
+        conn = DMAP_CONNECTION (dmap_av_connection_new (name, host, port, db, factory));
     } else {
-        factory = DMAP_RECORD_FACTORY (test_dpap_record_factory_new ());
+        factory = DMAP_RECORD_FACTORY (test_dmap_image_record_factory_new ());
         if (factory == NULL) {
    	    g_error ("Error creating record factory");
         }
-        conn = DMAP_CONNECTION (dpap_connection_new (service->name, service->host, service->port, db, factory));
+        conn = DMAP_CONNECTION (dmap_image_connection_new (name, host, port, db, factory));
     }
     g_signal_connect (DMAP_CONNECTION (conn), "authenticate", G_CALLBACK(authenticate_cb), NULL);
-    dmap_connection_connect (DMAP_CONNECTION (conn), (DMAPConnectionCallback) connected_cb, db);
+    g_signal_connect (DMAP_CONNECTION (conn), "error", G_CALLBACK(error_cb), NULL);
+
+    dmap_connection_start (DMAP_CONNECTION (conn), (DmapConnectionFunc) connected_cb, db);
+
+    g_free(service_name);
+    g_free(name);
+    g_free(host);
+}
+
+static void
+_log_printf(const char *log_domain,
+            G_GNUC_UNUSED GLogLevelFlags level,
+            const gchar *message,
+            G_GNUC_UNUSED gpointer user_data)
+{
+    g_printerr("%s: %s\n", log_domain, message);
 }
 
 int main(int argc, char **argv)
 {
-    DMAPMdnsBrowser *browser;
+    DmapMdnsBrowser *browser;
     GError *error = NULL;
 
+    g_log_set_handler ("libdmapsharing",
+                        G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION,
+                        _log_printf,
+                        NULL);
+
+    g_log_set_handler ("dmapd",
+                        G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION,
+                        _log_printf,
+                        NULL);
+
     if (argc == 2)
         conn_type = atoi (argv[1]);
 
     loop = g_main_loop_new (NULL, FALSE);
 
     if (conn_type == DAAP)
-        browser = dmap_mdns_browser_new (DMAP_MDNS_BROWSER_SERVICE_TYPE_DAAP);
+        browser = dmap_mdns_browser_new (DMAP_MDNS_SERVICE_TYPE_DAAP);
     else
-        browser = dmap_mdns_browser_new (DMAP_MDNS_BROWSER_SERVICE_TYPE_DPAP);
+        browser = dmap_mdns_browser_new (DMAP_MDNS_SERVICE_TYPE_DPAP);
     g_signal_connect (G_OBJECT (browser),
                       "service-added",
                       G_CALLBACK (service_added_cb),
diff --git a/tests/test-dmap-server.c b/tests/test-dmap-server.c
index b67910f..35c5fcc 100644
--- a/tests/test-dmap-server.c
+++ b/tests/test-dmap-server.c
@@ -24,14 +24,13 @@
 #include <glib.h>
 
 #include <libdmapsharing/dmap.h>
-#include <libdmapsharing/test-daap-record.h>
-#include <libdmapsharing/test-daap-record-factory.h>
-#include <libdmapsharing/test-dpap-record.h>
-#include <libdmapsharing/test-dpap-record-factory.h>
-
-#include "test-dmap-container-record.h"
-#include "test-dmap-container-db.h"
-#include "test-dmap-db.h"
+#include <libdmapsharing/test-dmap-av-record.h>
+#include <libdmapsharing/test-dmap-image-record.h>
+#include <libdmapsharing/test-dmap-av-record-factory.h>
+#include <libdmapsharing/test-dmap-image-record-factory.h>
+#include <libdmapsharing/test-dmap-db.h>
+#include <libdmapsharing/test-dmap-container-record.h>
+#include <libdmapsharing/test-dmap-container-db.h>
 
 /* For use when deciding whether to test DAAP or DPAP. */
 enum {
@@ -53,55 +52,98 @@ dmap_sharing_default_share_name ()
 }
 
 static void
-create_share (guint conn_type)
+error_cb(G_GNUC_UNUSED DmapShare *share, GError *error, G_GNUC_UNUSED gpointer user_data)
+{
+	g_error("%s", error->message);
+}
+
+static gboolean
+_quit(gpointer user_data)
+{
+	g_main_loop_quit(user_data);
+	return FALSE;
+}
+
+static DmapShare *
+create_share (guint conn_type, GMainLoop *loop)
 {
 	char *name = dmap_sharing_default_share_name ();
-	DMAPContainerRecord *dmap_container_record = \
+	DmapContainerRecord *dmap_container_record = \
 		DMAP_CONTAINER_RECORD (test_dmap_container_record_new ());
-	DMAPContainerDb *dmap_container_db = \
+	DmapContainerDb *container_db = \
 		DMAP_CONTAINER_DB (test_dmap_container_db_new
 					(dmap_container_record));
-	DMAPRecordFactory *factory;
-	DMAPRecord *record;
-	DMAPShare *share = NULL;
-	DMAPDb *db;
-
-	if (conn_type == DAAP) { 
-		factory = DMAP_RECORD_FACTORY (test_daap_record_factory_new ());
-
-	} else {
-		factory = DMAP_RECORD_FACTORY (test_dpap_record_factory_new ());
+	DmapRecordFactory *factory;
+	DmapRecord *record;
+	DmapShare *share = NULL;
+	GError *error = NULL;
+	gboolean ok;
+	DmapDb *db;
+
+	switch (conn_type) {
+	default:
+		g_idle_add(_quit, loop);
+		factory = DMAP_RECORD_FACTORY (test_dmap_av_record_factory_new ());
+		break;
+	case DAAP:
+		factory = DMAP_RECORD_FACTORY (test_dmap_av_record_factory_new ());
+		break;
+	case DPAP:
+		factory = DMAP_RECORD_FACTORY (test_dmap_image_record_factory_new ());
+		break;
 	}
 
-	record = DMAP_RECORD (dmap_record_factory_create (factory, NULL));
+	record = DMAP_RECORD (dmap_record_factory_create (factory, NULL, NULL));
 	db = DMAP_DB (test_dmap_db_new ());
-	dmap_db_add (db, record);
+	dmap_db_add (db, record, NULL);
 	g_object_unref (record);
 
 	g_warning ("initialize DAAP sharing");
 
-	if (conn_type == DAAP) {
-		share = DMAP_SHARE (daap_share_new (name,
-						    NULL,
-						    db,
-						    dmap_container_db,
-						    NULL));
-	} else {
-		share = DMAP_SHARE (dpap_share_new (name,
-						    NULL,
-						    db,
-						    dmap_container_db,
-						    NULL));
+	switch (conn_type) {
+	default:
+	case DAAP:
+		share = DMAP_SHARE (dmap_av_share_new (name,
+                                                       NULL,
+                                                       db,
+                                                       container_db,
+		                                       NULL));
+		break;
+	case DPAP:
+		share = DMAP_SHARE (dmap_image_share_new (name,
+                                                          NULL,
+                                                          db,
+                                                          container_db,
+                                                          NULL));
+		break;
 	}
 
 	g_assert (NULL != share);
 
+	g_signal_connect(share, "error", G_CALLBACK(error_cb), NULL);
+
+	ok = dmap_share_serve(share, &error);
+	if (!ok) {
+		g_error("Error starting server: %s", error->message);
+	}
+
+	ok = dmap_share_publish(share, &error);
+	if (!ok) {
+		g_error("Error publishing server: %s", error->message);
+	}
+
+	g_object_unref (factory);
+	g_object_unref (container_db);
+	g_object_unref (db);
 	g_free (name);
+
+	return share;
 }
 
 int
 main (int argc, char *argv[])
 {
+	DmapShare *share = NULL;
 	guint conn_type = DAAP;
 	static GMainLoop *loop;
 
@@ -110,9 +152,11 @@ main (int argc, char *argv[])
 
 	loop = g_main_loop_new (NULL, FALSE);
 
-	create_share (conn_type);
+	share = create_share (conn_type, loop);
 
 	g_main_loop_run (loop);
 
+	g_object_unref(share);
+
 	exit(EXIT_SUCCESS);
 }
diff --git a/tests/unit-test.c b/tests/unit-test.c
index 2a15259..2c4f62e 100644
--- a/tests/unit-test.c
+++ b/tests/unit-test.c
@@ -5,7 +5,10 @@
 #include <stdlib.h>
 #include <libdmapsharing/dmap.h>
 
-#include "../libdmapsharing/daap-connection-suite.h"
+#include "../libdmapsharing/dmap-av-connection-suite.h"
+#include "../libdmapsharing/dmap-av-record-suite.h"
+#include "../libdmapsharing/dmap-av-share-suite.h"
+#include "../libdmapsharing/dmap-connection-suite.h"
 #include "../libdmapsharing/dmap-md5-suite.h"
 #include "../libdmapsharing/dmap-utils-suite.h"
 
@@ -35,7 +38,10 @@ int main(void)
 {
         g_log_set_handler ("libdmapsharing", G_LOG_LEVEL_DEBUG, debug_null, NULL);
         g_log_set_handler (NULL, G_LOG_LEVEL_DEBUG, debug_null, NULL);
-        run_suite(dmap_test_daap_connection());
+        run_suite(dmap_test_dmap_av_connection());
+        run_suite(dmap_test_dmap_av_record());
+        run_suite(dmap_test_dmap_av_share());
+        run_suite(dmap_test_dmap_connection());
         run_suite(dmap_test_dmap_md5());
         run_suite(dmap_test_dmap_utils());
 
diff --git a/tests/vala-dmap-container-db.c b/tests/vala-dmap-container-db.c
index 2d252e0..7edc52c 100644
--- a/tests/vala-dmap-container-db.c
+++ b/tests/vala-dmap-container-db.c
@@ -1,7 +1,7 @@
-/* vala-dmap-container-db.c generated by valac 0.48.6, the Vala compiler
+/* vala-dmap-container-db.c generated by valac 0.56.3, the Vala compiler
  * generated from vala-dmap-container-db.vala, do not modify */
 
-/*   FILE: vala-dmap-db.vala -- A DMAPContainerDb implementation in Vala
+/*   FILE: vala-dmap-db.vala -- A DmapContainerDb implementation in Vala
  * AUTHOR: W. Michael Petullo <mike@flyn.org>
  *   DATE: 21 December 2010 
  *
@@ -28,16 +28,26 @@
 #include <gee.h>
 #include <glib.h>
 
+#if !defined(VALA_EXTERN)
+#if defined(_MSC_VER)
+#define VALA_EXTERN __declspec(dllexport) extern
+#elif __GNUC__ >= 4
+#define VALA_EXTERN __attribute__((visibility("default"))) extern
+#else
+#define VALA_EXTERN extern
+#endif
+#endif
+
 #define TYPE_VALA_DMAP_CONTAINER_DB (vala_dmap_container_db_get_type ())
-#define VALA_DMAP_CONTAINER_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DMAP_CONTAINER_DB, ValaDMAPContainerDb))
-#define VALA_DMAP_CONTAINER_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DMAP_CONTAINER_DB, ValaDMAPContainerDbClass))
+#define VALA_DMAP_CONTAINER_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DMAP_CONTAINER_DB, ValaDmapContainerDb))
+#define VALA_DMAP_CONTAINER_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DMAP_CONTAINER_DB, ValaDmapContainerDbClass))
 #define IS_VALA_DMAP_CONTAINER_DB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DMAP_CONTAINER_DB))
 #define IS_VALA_DMAP_CONTAINER_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DMAP_CONTAINER_DB))
-#define VALA_DMAP_CONTAINER_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DMAP_CONTAINER_DB, ValaDMAPContainerDbClass))
+#define VALA_DMAP_CONTAINER_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DMAP_CONTAINER_DB, ValaDmapContainerDbClass))
 
-typedef struct _ValaDMAPContainerDb ValaDMAPContainerDb;
-typedef struct _ValaDMAPContainerDbClass ValaDMAPContainerDbClass;
-typedef struct _ValaDMAPContainerDbPrivate ValaDMAPContainerDbPrivate;
+typedef struct _ValaDmapContainerDb ValaDmapContainerDb;
+typedef struct _ValaDmapContainerDbClass ValaDmapContainerDbClass;
+typedef struct _ValaDmapContainerDbPrivate ValaDmapContainerDbPrivate;
 enum  {
 	VALA_DMAP_CONTAINER_DB_0_PROPERTY,
 	VALA_DMAP_CONTAINER_DB_NUM_PROPERTIES
@@ -45,53 +55,54 @@ enum  {
 static GParamSpec* vala_dmap_container_db_properties[VALA_DMAP_CONTAINER_DB_NUM_PROPERTIES];
 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
 
-struct _ValaDMAPContainerDb {
+struct _ValaDmapContainerDb {
 	GObject parent_instance;
-	ValaDMAPContainerDbPrivate * priv;
+	ValaDmapContainerDbPrivate * priv;
 };
 
-struct _ValaDMAPContainerDbClass {
+struct _ValaDmapContainerDbClass {
 	GObjectClass parent_class;
 };
 
-struct _ValaDMAPContainerDbPrivate {
+struct _ValaDmapContainerDbPrivate {
 	GeeArrayList* db;
 };
 
-static gint ValaDMAPContainerDb_private_offset;
+static gint ValaDmapContainerDb_private_offset;
 static gpointer vala_dmap_container_db_parent_class = NULL;
-static DMAPContainerDbIface * vala_dmap_container_db_dmap_container_db_parent_iface = NULL;
+static DmapContainerDbInterface * vala_dmap_container_db_dmap_container_db_parent_iface = NULL;
 
-GType vala_dmap_container_db_get_type (void) G_GNUC_CONST;
-G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaDMAPContainerDb, g_object_unref)
-static gint64 vala_dmap_container_db_real_count (DMAPContainerDb* base);
-static void vala_dmap_container_db_real_foreach (DMAPContainerDb* base,
-                                          GHFunc func,
+VALA_EXTERN GType vala_dmap_container_db_get_type (void) G_GNUC_CONST ;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaDmapContainerDb, g_object_unref)
+static gint64 vala_dmap_container_db_real_count (DmapContainerDb* base);
+static void vala_dmap_container_db_real_foreach (DmapContainerDb* base,
+                                          DmapIdContainerRecordFunc func,
                                           gpointer func_target);
-static DMAPContainerRecord* vala_dmap_container_db_real_lookup_by_id (DMAPContainerDb* base,
+static DmapContainerRecord* vala_dmap_container_db_real_lookup_by_id (DmapContainerDb* base,
                                                                guint id);
-static void vala_dmap_container_db_real_add (DMAPContainerDb* base,
-                                      DMAPContainerRecord* record);
-ValaDMAPContainerDb* vala_dmap_container_db_new (void);
-ValaDMAPContainerDb* vala_dmap_container_db_construct (GType object_type);
+static void vala_dmap_container_db_real_add (DmapContainerDb* base,
+                                      DmapContainerRecord* record,
+                                      GError** error);
+VALA_EXTERN ValaDmapContainerDb* vala_dmap_container_db_new (void);
+VALA_EXTERN ValaDmapContainerDb* vala_dmap_container_db_construct (GType object_type);
 static void vala_dmap_container_db_finalize (GObject * obj);
 static GType vala_dmap_container_db_get_type_once (void);
 
 static inline gpointer
-vala_dmap_container_db_get_instance_private (ValaDMAPContainerDb* self)
+vala_dmap_container_db_get_instance_private (ValaDmapContainerDb* self)
 {
-	return G_STRUCT_MEMBER_P (self, ValaDMAPContainerDb_private_offset);
+	return G_STRUCT_MEMBER_P (self, ValaDmapContainerDb_private_offset);
 }
 
 static gint64
-vala_dmap_container_db_real_count (DMAPContainerDb* base)
+vala_dmap_container_db_real_count (DmapContainerDb* base)
 {
-	ValaDMAPContainerDb * self;
+	ValaDmapContainerDb * self;
 	GeeArrayList* _tmp0_;
 	gint _tmp1_;
 	gint _tmp2_;
-	gint64 result = 0LL;
-	self = (ValaDMAPContainerDb*) base;
+	gint64 result;
+	self = (ValaDmapContainerDb*) base;
 	_tmp0_ = self->priv->db;
 	_tmp1_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp0_);
 	_tmp2_ = _tmp1_;
@@ -100,13 +111,13 @@ vala_dmap_container_db_real_count (DMAPContainerDb* base)
 }
 
 static void
-vala_dmap_container_db_real_foreach (DMAPContainerDb* base,
-                                     GHFunc func,
+vala_dmap_container_db_real_foreach (DmapContainerDb* base,
+                                     DmapIdContainerRecordFunc func,
                                      gpointer func_target)
 {
-	ValaDMAPContainerDb * self;
+	ValaDmapContainerDb * self;
 	gint i = 0;
-	self = (ValaDMAPContainerDb*) base;
+	self = (ValaDmapContainerDb*) base;
 	{
 		gboolean _tmp0_ = FALSE;
 		i = 0;
@@ -115,9 +126,9 @@ vala_dmap_container_db_real_foreach (DMAPContainerDb* base,
 			GeeArrayList* _tmp2_;
 			gint _tmp3_;
 			gint _tmp4_;
-			void* _tmp5_;
-			GeeArrayList* _tmp6_;
-			gpointer _tmp7_;
+			GeeArrayList* _tmp5_;
+			gpointer _tmp6_;
+			DmapContainerRecord* _tmp7_;
 			if (!_tmp0_) {
 				gint _tmp1_;
 				_tmp1_ = i;
@@ -130,82 +141,84 @@ vala_dmap_container_db_real_foreach (DMAPContainerDb* base,
 			if (!(i < _tmp4_)) {
 				break;
 			}
-			_tmp5_ = GINT_TO_POINTER (i);
-			_tmp6_ = self->priv->db;
-			_tmp7_ = gee_abstract_list_get ((GeeAbstractList*) _tmp6_, i);
-			func (_tmp5_, (DMAPRecord*) _tmp7_, func_target);
+			_tmp5_ = self->priv->db;
+			_tmp6_ = gee_abstract_list_get ((GeeAbstractList*) _tmp5_, i);
+			_tmp7_ = (DmapContainerRecord*) _tmp6_;
+			func ((guint) i, _tmp7_, func_target);
+			_g_object_unref0 (_tmp7_);
 		}
 	}
 }
 
-static DMAPContainerRecord*
-vala_dmap_container_db_real_lookup_by_id (DMAPContainerDb* base,
+static DmapContainerRecord*
+vala_dmap_container_db_real_lookup_by_id (DmapContainerDb* base,
                                           guint id)
 {
-	ValaDMAPContainerDb * self;
-	self = (ValaDMAPContainerDb*) base;
-	g_error ("vala-dmap-container-db.vala:41: lookup_by_id not implemented");
+	ValaDmapContainerDb * self;
+	self = (ValaDmapContainerDb*) base;
+	g_error ("vala-dmap-container-db.vala:40: lookup_by_id not implemented");
 }
 
 static void
-vala_dmap_container_db_real_add (DMAPContainerDb* base,
-                                 DMAPContainerRecord* record)
+vala_dmap_container_db_real_add (DmapContainerDb* base,
+                                 DmapContainerRecord* record,
+                                 GError** error)
 {
-	ValaDMAPContainerDb * self;
-	self = (ValaDMAPContainerDb*) base;
+	ValaDmapContainerDb * self;
+	self = (ValaDmapContainerDb*) base;
 	g_return_if_fail (record != NULL);
-	g_error ("vala-dmap-container-db.vala:45: add not implemented");
+	g_error ("vala-dmap-container-db.vala:44: add not implemented");
 }
 
-ValaDMAPContainerDb*
+ValaDmapContainerDb*
 vala_dmap_container_db_construct (GType object_type)
 {
-	ValaDMAPContainerDb * self = NULL;
-	self = (ValaDMAPContainerDb*) g_object_new (object_type, NULL);
+	ValaDmapContainerDb * self = NULL;
+	self = (ValaDmapContainerDb*) g_object_new (object_type, NULL);
 	return self;
 }
 
-ValaDMAPContainerDb*
+ValaDmapContainerDb*
 vala_dmap_container_db_new (void)
 {
 	return vala_dmap_container_db_construct (TYPE_VALA_DMAP_CONTAINER_DB);
 }
 
 static void
-vala_dmap_container_db_class_init (ValaDMAPContainerDbClass * klass,
+vala_dmap_container_db_class_init (ValaDmapContainerDbClass * klass,
                                    gpointer klass_data)
 {
 	vala_dmap_container_db_parent_class = g_type_class_peek_parent (klass);
-	g_type_class_adjust_private_offset (klass, &ValaDMAPContainerDb_private_offset);
+	g_type_class_adjust_private_offset (klass, &ValaDmapContainerDb_private_offset);
 	G_OBJECT_CLASS (klass)->finalize = vala_dmap_container_db_finalize;
 }
 
 static void
-vala_dmap_container_db_dmap_container_db_interface_init (DMAPContainerDbIface * iface,
+vala_dmap_container_db_dmap_container_db_interface_init (DmapContainerDbInterface * iface,
                                                          gpointer iface_data)
 {
 	vala_dmap_container_db_dmap_container_db_parent_iface = g_type_interface_peek_parent (iface);
-	iface->count = (gint64 (*) (DMAPContainerDb*)) vala_dmap_container_db_real_count;
-	iface->foreach = (void (*) (DMAPContainerDb*, GHFunc, gpointer)) vala_dmap_container_db_real_foreach;
-	iface->lookup_by_id = (DMAPContainerRecord* (*) (DMAPContainerDb*, guint)) vala_dmap_container_db_real_lookup_by_id;
-	iface->add = (void (*) (DMAPContainerDb*, DMAPContainerRecord*)) vala_dmap_container_db_real_add;
+	iface->count = (gint64 (*) (DmapContainerDb*)) vala_dmap_container_db_real_count;
+	iface->foreach = (void (*) (DmapContainerDb*, DmapIdContainerRecordFunc, gpointer)) vala_dmap_container_db_real_foreach;
+	iface->lookup_by_id = (DmapContainerRecord* (*) (DmapContainerDb*, guint)) vala_dmap_container_db_real_lookup_by_id;
+	iface->add = (void (*) (DmapContainerDb*, DmapContainerRecord*, GError**)) vala_dmap_container_db_real_add;
 }
 
 static void
-vala_dmap_container_db_instance_init (ValaDMAPContainerDb * self,
+vala_dmap_container_db_instance_init (ValaDmapContainerDb * self,
                                       gpointer klass)
 {
 	GeeArrayList* _tmp0_;
 	self->priv = vala_dmap_container_db_get_instance_private (self);
-	_tmp0_ = gee_array_list_new (DMAP_TYPE_RECORD, NULL, NULL, NULL, NULL, NULL);
+	_tmp0_ = gee_array_list_new (DMAP_TYPE_CONTAINER_RECORD, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
 	self->priv->db = _tmp0_;
 }
 
 static void
 vala_dmap_container_db_finalize (GObject * obj)
 {
-	ValaDMAPContainerDb * self;
-	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_VALA_DMAP_CONTAINER_DB, ValaDMAPContainerDb);
+	ValaDmapContainerDb * self;
+	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_VALA_DMAP_CONTAINER_DB, ValaDmapContainerDb);
 	_g_object_unref0 (self->priv->db);
 	G_OBJECT_CLASS (vala_dmap_container_db_parent_class)->finalize (obj);
 }
@@ -213,24 +226,24 @@ vala_dmap_container_db_finalize (GObject * obj)
 static GType
 vala_dmap_container_db_get_type_once (void)
 {
-	static const GTypeInfo g_define_type_info = { sizeof (ValaDMAPContainerDbClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_dmap_container_db_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaDMAPContainerDb), 0, (GInstanceInitFunc) vala_dmap_container_db_instance_init, NULL };
+	static const GTypeInfo g_define_type_info = { sizeof (ValaDmapContainerDbClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_dmap_container_db_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaDmapContainerDb), 0, (GInstanceInitFunc) vala_dmap_container_db_instance_init, NULL };
 	static const GInterfaceInfo dmap_container_db_info = { (GInterfaceInitFunc) vala_dmap_container_db_dmap_container_db_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
 	GType vala_dmap_container_db_type_id;
-	vala_dmap_container_db_type_id = g_type_register_static (G_TYPE_OBJECT, "ValaDMAPContainerDb", &g_define_type_info, 0);
+	vala_dmap_container_db_type_id = g_type_register_static (G_TYPE_OBJECT, "ValaDmapContainerDb", &g_define_type_info, 0);
 	g_type_add_interface_static (vala_dmap_container_db_type_id, DMAP_TYPE_CONTAINER_DB, &dmap_container_db_info);
-	ValaDMAPContainerDb_private_offset = g_type_add_instance_private (vala_dmap_container_db_type_id, sizeof (ValaDMAPContainerDbPrivate));
+	ValaDmapContainerDb_private_offset = g_type_add_instance_private (vala_dmap_container_db_type_id, sizeof (ValaDmapContainerDbPrivate));
 	return vala_dmap_container_db_type_id;
 }
 
 GType
 vala_dmap_container_db_get_type (void)
 {
-	static volatile gsize vala_dmap_container_db_type_id__volatile = 0;
-	if (g_once_init_enter (&vala_dmap_container_db_type_id__volatile)) {
+	static volatile gsize vala_dmap_container_db_type_id__once = 0;
+	if (g_once_init_enter (&vala_dmap_container_db_type_id__once)) {
 		GType vala_dmap_container_db_type_id;
 		vala_dmap_container_db_type_id = vala_dmap_container_db_get_type_once ();
-		g_once_init_leave (&vala_dmap_container_db_type_id__volatile, vala_dmap_container_db_type_id);
+		g_once_init_leave (&vala_dmap_container_db_type_id__once, vala_dmap_container_db_type_id);
 	}
-	return vala_dmap_container_db_type_id__volatile;
+	return vala_dmap_container_db_type_id__once;
 }
 
diff --git a/tests/vala-dmap-container-db.vala b/tests/vala-dmap-container-db.vala
index 8aee03d..c3c1272 100644
--- a/tests/vala-dmap-container-db.vala
+++ b/tests/vala-dmap-container-db.vala
@@ -1,4 +1,4 @@
-/*   FILE: vala-dmap-db.vala -- A DMAPContainerDb implementation in Vala
+/*   FILE: vala-dmap-db.vala -- A DmapContainerDb implementation in Vala
  * AUTHOR: W. Michael Petullo <mike@flyn.org>
  *   DATE: 21 December 2010 
  *
@@ -20,28 +20,27 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-private class ValaDMAPContainerDb : GLib.Object, DMAP.ContainerDb {
+private class ValaDmapContainerDb : GLib.Object, Dmap.ContainerDb {
 	// A dumb database that stores everything in an array
 
-	/* FIXME: What is with this unowned? */
-	private Gee.ArrayList<unowned DMAP.Record> db = new Gee.ArrayList<unowned DMAP.Record> ();
+	private Gee.ArrayList<Dmap.ContainerRecord> db = new Gee.ArrayList<Dmap.ContainerRecord> ();
 
 	public int64 count () {
 		return db.size;
 	}
 
-	public void @foreach (GLib.HFunc func) {
+	public void @foreach (Dmap.IdContainerRecordFunc func) {
 		int i;
 		for (i = 0; i < db.size; i++) {
-			func (i.to_pointer (), db[i]);
+			func (i, db[i]);
 		}
 	}
 
-	public unowned DMAP.ContainerRecord lookup_by_id (uint id) {
+	public unowned Dmap.ContainerRecord lookup_by_id (uint id) {
 		GLib.error ("lookup_by_id not implemented");
 	}
 
-	public void add (DMAP.ContainerRecord record) {
+	public void add (Dmap.ContainerRecord record) {
 		GLib.error ("add not implemented");
 	}
 }
diff --git a/tests/vala-dmap-db.c b/tests/vala-dmap-db.c
index 617392a..67e045f 100644
--- a/tests/vala-dmap-db.c
+++ b/tests/vala-dmap-db.c
@@ -1,7 +1,7 @@
-/* vala-dmap-db.c generated by valac 0.48.6, the Vala compiler
+/* vala-dmap-db.c generated by valac 0.56.3, the Vala compiler
  * generated from vala-dmap-db.vala, do not modify */
 
-/*   FILE: vala-dmap-db.vala -- A DMAPDb implementation in Vala
+/*   FILE: vala-dmap-db.vala -- A DmapDb implementation in Vala
  * AUTHOR: W. Michael Petullo <mike@flyn.org>
  *   DATE: 21 December 2010 
  *
@@ -30,16 +30,26 @@
 #include <stdlib.h>
 #include <string.h>
 
+#if !defined(VALA_EXTERN)
+#if defined(_MSC_VER)
+#define VALA_EXTERN __declspec(dllexport) extern
+#elif __GNUC__ >= 4
+#define VALA_EXTERN __attribute__((visibility("default"))) extern
+#else
+#define VALA_EXTERN extern
+#endif
+#endif
+
 #define TYPE_VALA_DMAP_DB (vala_dmap_db_get_type ())
-#define VALA_DMAP_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DMAP_DB, ValaDMAPDb))
-#define VALA_DMAP_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DMAP_DB, ValaDMAPDbClass))
+#define VALA_DMAP_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DMAP_DB, ValaDmapDb))
+#define VALA_DMAP_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DMAP_DB, ValaDmapDbClass))
 #define IS_VALA_DMAP_DB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DMAP_DB))
 #define IS_VALA_DMAP_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DMAP_DB))
-#define VALA_DMAP_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DMAP_DB, ValaDMAPDbClass))
+#define VALA_DMAP_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DMAP_DB, ValaDmapDbClass))
 
-typedef struct _ValaDMAPDb ValaDMAPDb;
-typedef struct _ValaDMAPDbClass ValaDMAPDbClass;
-typedef struct _ValaDMAPDbPrivate ValaDMAPDbPrivate;
+typedef struct _ValaDmapDb ValaDmapDb;
+typedef struct _ValaDmapDbClass ValaDmapDbClass;
+typedef struct _ValaDmapDbPrivate ValaDmapDbPrivate;
 enum  {
 	VALA_DMAP_DB_0_PROPERTY,
 	VALA_DMAP_DB_NUM_PROPERTIES
@@ -47,65 +57,69 @@ enum  {
 static GParamSpec* vala_dmap_db_properties[VALA_DMAP_DB_NUM_PROPERTIES];
 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
 
-struct _ValaDMAPDb {
+struct _ValaDmapDb {
 	GObject parent_instance;
-	ValaDMAPDbPrivate * priv;
+	ValaDmapDbPrivate * priv;
 };
 
-struct _ValaDMAPDbClass {
+struct _ValaDmapDbClass {
 	GObjectClass parent_class;
 };
 
-struct _ValaDMAPDbPrivate {
+struct _ValaDmapDbPrivate {
 	GeeArrayList* db;
 };
 
-static gint ValaDMAPDb_private_offset;
+static gint ValaDmapDb_private_offset;
 static gpointer vala_dmap_db_parent_class = NULL;
-static DMAPDbIface * vala_dmap_db_dmap_db_parent_iface = NULL;
+static DmapDbInterface * vala_dmap_db_dmap_db_parent_iface = NULL;
 
-GType vala_dmap_db_get_type (void) G_GNUC_CONST;
-G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaDMAPDb, g_object_unref)
-static guint vala_dmap_db_real_add (DMAPDb* base,
-                             DMAPRecord* record);
-static guint vala_dmap_db_real_add_path (DMAPDb* base,
-                                  const gchar* path);
-static guint vala_dmap_db_real_add_with_id (DMAPDb* base,
-                                     DMAPRecord* record,
-                                     guint id);
-static gint64 vala_dmap_db_real_count (DMAPDb* base);
-static void vala_dmap_db_real_foreach (DMAPDb* base,
-                                GHFunc func,
+VALA_EXTERN GType vala_dmap_db_get_type (void) G_GNUC_CONST ;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaDmapDb, g_object_unref)
+static guint vala_dmap_db_real_add (DmapDb* base,
+                             DmapRecord* record,
+                             GError** error);
+static guint vala_dmap_db_real_add_path (DmapDb* base,
+                                  const gchar* path,
+                                  GError** error);
+static guint vala_dmap_db_real_add_with_id (DmapDb* base,
+                                     DmapRecord* record,
+                                     guint id,
+                                     GError** error);
+static gint64 vala_dmap_db_real_count (DmapDb* base);
+static void vala_dmap_db_real_foreach (DmapDb* base,
+                                DmapIdRecordFunc func,
                                 gpointer func_target);
-static DMAPRecord* vala_dmap_db_real_lookup_by_id (DMAPDb* base,
+static DmapRecord* vala_dmap_db_real_lookup_by_id (DmapDb* base,
                                             guint id);
-static guint vala_dmap_db_real_lookup_id_by_location (DMAPDb* base,
+static guint vala_dmap_db_real_lookup_id_by_location (DmapDb* base,
                                                const gchar* location);
-ValaDMAPDb* vala_dmap_db_new (void);
-ValaDMAPDb* vala_dmap_db_construct (GType object_type);
+VALA_EXTERN ValaDmapDb* vala_dmap_db_new (void);
+VALA_EXTERN ValaDmapDb* vala_dmap_db_construct (GType object_type);
 static void vala_dmap_db_finalize (GObject * obj);
 static GType vala_dmap_db_get_type_once (void);
 
 static inline gpointer
-vala_dmap_db_get_instance_private (ValaDMAPDb* self)
+vala_dmap_db_get_instance_private (ValaDmapDb* self)
 {
-	return G_STRUCT_MEMBER_P (self, ValaDMAPDb_private_offset);
+	return G_STRUCT_MEMBER_P (self, ValaDmapDb_private_offset);
 }
 
 static guint
-vala_dmap_db_real_add (DMAPDb* base,
-                       DMAPRecord* record)
+vala_dmap_db_real_add (DmapDb* base,
+                       DmapRecord* record,
+                       GError** error)
 {
-	ValaDMAPDb * self;
+	ValaDmapDb * self;
 	GeeArrayList* _tmp0_;
 	GeeArrayList* _tmp1_;
 	gint _tmp2_;
 	gint _tmp3_;
-	guint result = 0U;
-	self = (ValaDMAPDb*) base;
+	guint result;
+	self = (ValaDmapDb*) base;
 	g_return_val_if_fail (record != NULL, 0U);
 	_tmp0_ = self->priv->db;
-	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp0_, G_TYPE_CHECK_INSTANCE_CAST (record, DMAP_TYPE_RECORD, DMAPRecord));
+	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp0_, G_TYPE_CHECK_INSTANCE_CAST (record, DMAP_TYPE_RECORD, DmapRecord));
 	_tmp1_ = self->priv->db;
 	_tmp2_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp1_);
 	_tmp3_ = _tmp2_;
@@ -114,35 +128,37 @@ vala_dmap_db_real_add (DMAPDb* base,
 }
 
 static guint
-vala_dmap_db_real_add_path (DMAPDb* base,
-                            const gchar* path)
+vala_dmap_db_real_add_path (DmapDb* base,
+                            const gchar* path,
+                            GError** error)
 {
-	ValaDMAPDb * self;
-	self = (ValaDMAPDb*) base;
+	ValaDmapDb * self;
+	self = (ValaDmapDb*) base;
 	g_return_val_if_fail (path != NULL, 0U);
 	g_error ("vala-dmap-db.vala:35: add_path not implemented");
 }
 
 static guint
-vala_dmap_db_real_add_with_id (DMAPDb* base,
-                               DMAPRecord* record,
-                               guint id)
+vala_dmap_db_real_add_with_id (DmapDb* base,
+                               DmapRecord* record,
+                               guint id,
+                               GError** error)
 {
-	ValaDMAPDb * self;
-	self = (ValaDMAPDb*) base;
+	ValaDmapDb * self;
+	self = (ValaDmapDb*) base;
 	g_return_val_if_fail (record != NULL, 0U);
 	g_error ("vala-dmap-db.vala:39: add_with_id not implemented");
 }
 
 static gint64
-vala_dmap_db_real_count (DMAPDb* base)
+vala_dmap_db_real_count (DmapDb* base)
 {
-	ValaDMAPDb * self;
+	ValaDmapDb * self;
 	GeeArrayList* _tmp0_;
 	gint _tmp1_;
 	gint _tmp2_;
-	gint64 result = 0LL;
-	self = (ValaDMAPDb*) base;
+	gint64 result;
+	self = (ValaDmapDb*) base;
 	_tmp0_ = self->priv->db;
 	_tmp1_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp0_);
 	_tmp2_ = _tmp1_;
@@ -151,13 +167,13 @@ vala_dmap_db_real_count (DMAPDb* base)
 }
 
 static void
-vala_dmap_db_real_foreach (DMAPDb* base,
-                           GHFunc func,
+vala_dmap_db_real_foreach (DmapDb* base,
+                           DmapIdRecordFunc func,
                            gpointer func_target)
 {
-	ValaDMAPDb * self;
+	ValaDmapDb * self;
 	gint i = 0;
-	self = (ValaDMAPDb*) base;
+	self = (ValaDmapDb*) base;
 	{
 		gboolean _tmp0_ = FALSE;
 		i = 0;
@@ -166,9 +182,8 @@ vala_dmap_db_real_foreach (DMAPDb* base,
 			GeeArrayList* _tmp2_;
 			gint _tmp3_;
 			gint _tmp4_;
-			void* _tmp5_;
-			GeeArrayList* _tmp6_;
-			gpointer _tmp7_;
+			GeeArrayList* _tmp5_;
+			gpointer _tmp6_;
 			if (!_tmp0_) {
 				gint _tmp1_;
 				_tmp1_ = i;
@@ -181,78 +196,80 @@ vala_dmap_db_real_foreach (DMAPDb* base,
 			if (!(i < _tmp4_)) {
 				break;
 			}
-			_tmp5_ = GINT_TO_POINTER (i + 1);
-			_tmp6_ = self->priv->db;
-			_tmp7_ = gee_abstract_list_get ((GeeAbstractList*) _tmp6_, i);
-			func (_tmp5_, (DMAPRecord*) _tmp7_, func_target);
+			_tmp5_ = self->priv->db;
+			_tmp6_ = gee_abstract_list_get ((GeeAbstractList*) _tmp5_, i);
+			func ((guint) (i + 1), (DmapRecord*) _tmp6_, func_target);
 		}
 	}
 }
 
-static DMAPRecord*
-vala_dmap_db_real_lookup_by_id (DMAPDb* base,
+static DmapRecord*
+vala_dmap_db_real_lookup_by_id (DmapDb* base,
                                 guint id)
 {
-	ValaDMAPDb * self;
+	ValaDmapDb * self;
+	DmapRecord* record = NULL;
 	GeeArrayList* _tmp0_;
 	gpointer _tmp1_;
-	DMAPRecord* result = NULL;
-	self = (ValaDMAPDb*) base;
+	DmapRecord* result;
+	self = (ValaDmapDb*) base;
 	_tmp0_ = self->priv->db;
 	_tmp1_ = gee_abstract_list_get ((GeeAbstractList*) _tmp0_, ((gint) id) - 1);
-	result = (DMAPRecord*) _tmp1_;
+	record = (DmapRecord*) _tmp1_;
+	g_object_ref ((GObject*) record);
+	result = record;
 	return result;
 }
 
 static guint
-vala_dmap_db_real_lookup_id_by_location (DMAPDb* base,
+vala_dmap_db_real_lookup_id_by_location (DmapDb* base,
                                          const gchar* location)
 {
-	ValaDMAPDb * self;
-	self = (ValaDMAPDb*) base;
+	ValaDmapDb * self;
+	self = (ValaDmapDb*) base;
 	g_return_val_if_fail (location != NULL, 0U);
-	g_error ("vala-dmap-db.vala:63: lookup_id_by_location not implemented");
+	g_error ("vala-dmap-db.vala:65: lookup_id_by_location not implemented");
 }
 
-ValaDMAPDb*
+ValaDmapDb*
 vala_dmap_db_construct (GType object_type)
 {
-	ValaDMAPDb * self = NULL;
-	self = (ValaDMAPDb*) g_object_new (object_type, NULL);
+	ValaDmapDb * self = NULL;
+	self = (ValaDmapDb*) g_object_new (object_type, NULL);
 	return self;
 }
 
-ValaDMAPDb*
+ValaDmapDb*
 vala_dmap_db_new (void)
 {
 	return vala_dmap_db_construct (TYPE_VALA_DMAP_DB);
 }
 
 static void
-vala_dmap_db_class_init (ValaDMAPDbClass * klass,
+vala_dmap_db_class_init (ValaDmapDbClass * klass,
                          gpointer klass_data)
 {
 	vala_dmap_db_parent_class = g_type_class_peek_parent (klass);
-	g_type_class_adjust_private_offset (klass, &ValaDMAPDb_private_offset);
+	g_type_class_adjust_private_offset (klass, &ValaDmapDb_private_offset);
 	G_OBJECT_CLASS (klass)->finalize = vala_dmap_db_finalize;
 }
 
 static void
-vala_dmap_db_dmap_db_interface_init (DMAPDbIface * iface,
+vala_dmap_db_dmap_db_interface_init (DmapDbInterface * iface,
                                      gpointer iface_data)
 {
 	vala_dmap_db_dmap_db_parent_iface = g_type_interface_peek_parent (iface);
-	iface->add = (guint (*) (DMAPDb*, DMAPRecord*)) vala_dmap_db_real_add;
-	iface->add_path = (guint (*) (DMAPDb*, const gchar*)) vala_dmap_db_real_add_path;
-	iface->add_with_id = (guint (*) (DMAPDb*, DMAPRecord*, guint)) vala_dmap_db_real_add_with_id;
-	iface->count = (gint64 (*) (DMAPDb*)) vala_dmap_db_real_count;
-	iface->foreach = (void (*) (DMAPDb*, GHFunc, gpointer)) vala_dmap_db_real_foreach;
-	iface->lookup_by_id = (DMAPRecord* (*) (DMAPDb*, guint)) vala_dmap_db_real_lookup_by_id;
-	iface->lookup_id_by_location = (guint (*) (DMAPDb*, const gchar*)) vala_dmap_db_real_lookup_id_by_location;
+	iface->add = (guint (*) (DmapDb*, DmapRecord*, GError**)) vala_dmap_db_real_add;
+	iface->add_path = (guint (*) (DmapDb*, const gchar*, GError**)) vala_dmap_db_real_add_path;
+	iface->add_with_id = (guint (*) (DmapDb*, DmapRecord*, guint, GError**)) vala_dmap_db_real_add_with_id;
+	iface->count = (gint64 (*) (DmapDb*)) vala_dmap_db_real_count;
+	iface->foreach = (void (*) (DmapDb*, DmapIdRecordFunc, gpointer)) vala_dmap_db_real_foreach;
+	iface->lookup_by_id = (DmapRecord* (*) (DmapDb*, guint)) vala_dmap_db_real_lookup_by_id;
+	iface->lookup_id_by_location = (guint (*) (DmapDb*, const gchar*)) vala_dmap_db_real_lookup_id_by_location;
 }
 
 static void
-vala_dmap_db_instance_init (ValaDMAPDb * self,
+vala_dmap_db_instance_init (ValaDmapDb * self,
                             gpointer klass)
 {
 	GeeArrayList* _tmp0_;
@@ -264,8 +281,8 @@ vala_dmap_db_instance_init (ValaDMAPDb * self,
 static void
 vala_dmap_db_finalize (GObject * obj)
 {
-	ValaDMAPDb * self;
-	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_VALA_DMAP_DB, ValaDMAPDb);
+	ValaDmapDb * self;
+	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_VALA_DMAP_DB, ValaDmapDb);
 	_g_object_unref0 (self->priv->db);
 	G_OBJECT_CLASS (vala_dmap_db_parent_class)->finalize (obj);
 }
@@ -273,24 +290,24 @@ vala_dmap_db_finalize (GObject * obj)
 static GType
 vala_dmap_db_get_type_once (void)
 {
-	static const GTypeInfo g_define_type_info = { sizeof (ValaDMAPDbClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_dmap_db_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaDMAPDb), 0, (GInstanceInitFunc) vala_dmap_db_instance_init, NULL };
+	static const GTypeInfo g_define_type_info = { sizeof (ValaDmapDbClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_dmap_db_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaDmapDb), 0, (GInstanceInitFunc) vala_dmap_db_instance_init, NULL };
 	static const GInterfaceInfo dmap_db_info = { (GInterfaceInitFunc) vala_dmap_db_dmap_db_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
 	GType vala_dmap_db_type_id;
-	vala_dmap_db_type_id = g_type_register_static (G_TYPE_OBJECT, "ValaDMAPDb", &g_define_type_info, 0);
+	vala_dmap_db_type_id = g_type_register_static (G_TYPE_OBJECT, "ValaDmapDb", &g_define_type_info, 0);
 	g_type_add_interface_static (vala_dmap_db_type_id, DMAP_TYPE_DB, &dmap_db_info);
-	ValaDMAPDb_private_offset = g_type_add_instance_private (vala_dmap_db_type_id, sizeof (ValaDMAPDbPrivate));
+	ValaDmapDb_private_offset = g_type_add_instance_private (vala_dmap_db_type_id, sizeof (ValaDmapDbPrivate));
 	return vala_dmap_db_type_id;
 }
 
 GType
 vala_dmap_db_get_type (void)
 {
-	static volatile gsize vala_dmap_db_type_id__volatile = 0;
-	if (g_once_init_enter (&vala_dmap_db_type_id__volatile)) {
+	static volatile gsize vala_dmap_db_type_id__once = 0;
+	if (g_once_init_enter (&vala_dmap_db_type_id__once)) {
 		GType vala_dmap_db_type_id;
 		vala_dmap_db_type_id = vala_dmap_db_get_type_once ();
-		g_once_init_leave (&vala_dmap_db_type_id__volatile, vala_dmap_db_type_id);
+		g_once_init_leave (&vala_dmap_db_type_id__once, vala_dmap_db_type_id);
 	}
-	return vala_dmap_db_type_id__volatile;
+	return vala_dmap_db_type_id__once;
 }
 
diff --git a/tests/vala-dmap-db.vala b/tests/vala-dmap-db.vala
index 171f548..eb33174 100644
--- a/tests/vala-dmap-db.vala
+++ b/tests/vala-dmap-db.vala
@@ -1,4 +1,4 @@
-/*   FILE: vala-dmap-db.vala -- A DMAPDb implementation in Vala
+/*   FILE: vala-dmap-db.vala -- A DmapDb implementation in Vala
  * AUTHOR: W. Michael Petullo <mike@flyn.org>
  *   DATE: 21 December 2010 
  *
@@ -20,14 +20,14 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-private class ValaDMAPDb : GLib.Object, DMAP.Db {
+private class ValaDmapDb : GLib.Object, Dmap.Db {
 	// A dumb database that stores everything in an array
 
 	/* FIXME: What is with this unowned? */
-	private Gee.ArrayList<unowned DMAP.Record> db = new Gee.ArrayList<unowned DMAP.Record> ();
+	private Gee.ArrayList<unowned Dmap.Record> db = new Gee.ArrayList<weak Dmap.Record> ();
 
-	public uint add (DMAP.Record record) {
-		db.add (((DMAP.Record) record));
+	public uint add (Dmap.Record record) {
+		db.add (((Dmap.Record) record));
 		return db.size;
 	}
 
@@ -35,7 +35,7 @@ private class ValaDMAPDb : GLib.Object, DMAP.Db {
 		GLib.error ("add_path not implemented");
 	}
 
-	public uint add_with_id (DMAP.Record record, uint id) {
+	public uint add_with_id (Dmap.Record record, uint id) {
 		GLib.error ("add_with_id not implemented");
 	}
 
@@ -43,19 +43,21 @@ private class ValaDMAPDb : GLib.Object, DMAP.Db {
 		return db.size;
 	}
 
-	public void @foreach (GLib.HFunc func) {
+	public void @foreach (Dmap.IdRecordFunc func) {
 		int i;
 		for (i = 0; i < db.size; i++) {
 			// NOTE: iPhoto does not like a record ID of 0,
 			// so we pretend to start with 1
-			func ((i + 1).to_pointer (), db[i]);
+			func (i + 1, db[i]);
 		}
 	}
 
-	public unowned DMAP.Record lookup_by_id (uint id) {
+	public unowned Dmap.Record lookup_by_id (uint id) {
 		// NOTE: iPhoto does not like a record ID of 0,
 		// so we pretend to start with 1
-		return db.get ((int) id - 1);
+		unowned Dmap.Record record = db.get ((int) id - 1);
+		record.ref();
+		return record;
 	}
 
 
diff --git a/tests/vala-dpap-record.c b/tests/vala-dpap-record.c
deleted file mode 100644
index 08ddca8..0000000
--- a/tests/vala-dpap-record.c
+++ /dev/null
@@ -1,787 +0,0 @@
-/* vala-dpap-record.c generated by valac 0.48.6, the Vala compiler
- * generated from vala-dpap-record.vala, do not modify */
-
-/*   FILE: vala-dpap-record.vala -- A DPAPRecord implementation in Vala
- * AUTHOR: W. Michael Petullo <mike@flyn.org>
- *   DATE: 21 December 2010
- *
- * Copyright (c) 2010 W. Michael Petullo <new@flyn.org>
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#include <glib-object.h>
-#include <libdmapsharing/dmap.h>
-#include <stdlib.h>
-#include <string.h>
-#include <glib.h>
-#include <gio/gio.h>
-#include <glib/gstdio.h>
-
-#define TYPE_VALA_DPAP_RECORD (vala_dpap_record_get_type ())
-#define VALA_DPAP_RECORD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DPAP_RECORD, ValaDPAPRecord))
-#define VALA_DPAP_RECORD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DPAP_RECORD, ValaDPAPRecordClass))
-#define IS_VALA_DPAP_RECORD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DPAP_RECORD))
-#define IS_VALA_DPAP_RECORD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DPAP_RECORD))
-#define VALA_DPAP_RECORD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DPAP_RECORD, ValaDPAPRecordClass))
-
-typedef struct _ValaDPAPRecord ValaDPAPRecord;
-typedef struct _ValaDPAPRecordClass ValaDPAPRecordClass;
-typedef struct _ValaDPAPRecordPrivate ValaDPAPRecordPrivate;
-enum  {
-	VALA_DPAP_RECORD_0_PROPERTY,
-	VALA_DPAP_RECORD_LOCATION_PROPERTY,
-	VALA_DPAP_RECORD_FILENAME_PROPERTY,
-	VALA_DPAP_RECORD_ASPECT_RATIO_PROPERTY,
-	VALA_DPAP_RECORD_FORMAT_PROPERTY,
-	VALA_DPAP_RECORD_THUMBNAIL_PROPERTY,
-	VALA_DPAP_RECORD_COMMENTS_PROPERTY,
-	VALA_DPAP_RECORD_LARGE_FILESIZE_PROPERTY,
-	VALA_DPAP_RECORD_PIXEL_HEIGHT_PROPERTY,
-	VALA_DPAP_RECORD_PIXEL_WIDTH_PROPERTY,
-	VALA_DPAP_RECORD_RATING_PROPERTY,
-	VALA_DPAP_RECORD_CREATION_DATE_PROPERTY,
-	VALA_DPAP_RECORD_NUM_PROPERTIES
-};
-static GParamSpec* vala_dpap_record_properties[VALA_DPAP_RECORD_NUM_PROPERTIES];
-#define _g_free0(var) (var = (g_free (var), NULL))
-#define _g_byte_array_unref0(var) ((var == NULL) ? NULL : (var = (g_byte_array_unref (var), NULL)))
-
-#define TYPE_VALA_DPAP_RECORD_FACTORY (vala_dpap_record_factory_get_type ())
-#define VALA_DPAP_RECORD_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DPAP_RECORD_FACTORY, ValaDPAPRecordFactory))
-#define VALA_DPAP_RECORD_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DPAP_RECORD_FACTORY, ValaDPAPRecordFactoryClass))
-#define IS_VALA_DPAP_RECORD_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DPAP_RECORD_FACTORY))
-#define IS_VALA_DPAP_RECORD_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DPAP_RECORD_FACTORY))
-#define VALA_DPAP_RECORD_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DPAP_RECORD_FACTORY, ValaDPAPRecordFactoryClass))
-
-typedef struct _ValaDPAPRecordFactory ValaDPAPRecordFactory;
-typedef struct _ValaDPAPRecordFactoryClass ValaDPAPRecordFactoryClass;
-typedef struct _ValaDPAPRecordFactoryPrivate ValaDPAPRecordFactoryPrivate;
-enum  {
-	VALA_DPAP_RECORD_FACTORY_0_PROPERTY,
-	VALA_DPAP_RECORD_FACTORY_NUM_PROPERTIES
-};
-static GParamSpec* vala_dpap_record_factory_properties[VALA_DPAP_RECORD_FACTORY_NUM_PROPERTIES];
-
-struct _ValaDPAPRecord {
-	GObject parent_instance;
-	ValaDPAPRecordPrivate * priv;
-};
-
-struct _ValaDPAPRecordClass {
-	GObjectClass parent_class;
-};
-
-struct _ValaDPAPRecordPrivate {
-	gchar* _location;
-	gchar* _filename;
-	gchar* _aspect_ratio;
-	gchar* _format;
-	gchar* _comments;
-	GByteArray* _thumbnail;
-	gint _large_filesize;
-	gint _pixel_height;
-	gint _pixel_width;
-	gint _rating;
-	gint _creation_date;
-};
-
-struct _ValaDPAPRecordFactory {
-	GObject parent_instance;
-	ValaDPAPRecordFactoryPrivate * priv;
-};
-
-struct _ValaDPAPRecordFactoryClass {
-	GObjectClass parent_class;
-};
-
-static gint ValaDPAPRecord_private_offset;
-static gpointer vala_dpap_record_parent_class = NULL;
-static DMAPRecordIface * vala_dpap_record_dmap_record_parent_iface = NULL;
-static DPAPRecordIface * vala_dpap_record_dpap_record_parent_iface = NULL;
-static gpointer vala_dpap_record_factory_parent_class = NULL;
-static DMAPRecordFactoryIface * vala_dpap_record_factory_dmap_record_factory_parent_iface = NULL;
-
-GType vala_dpap_record_get_type (void) G_GNUC_CONST;
-G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaDPAPRecord, g_object_unref)
-static GInputStream* vala_dpap_record_real_read (DPAPRecord* base,
-                                          GError** error);
-static gboolean vala_dpap_record_real_set_from_blob (DMAPRecord* base,
-                                              GByteArray* blob);
-static GByteArray* vala_dpap_record_real_to_blob (DMAPRecord* base);
-ValaDPAPRecord* vala_dpap_record_new (void);
-ValaDPAPRecord* vala_dpap_record_construct (GType object_type);
-const gchar* vala_dpap_record_get_location (ValaDPAPRecord* self);
-void vala_dpap_record_set_location (ValaDPAPRecord* self,
-                                    const gchar* value);
-const gchar* vala_dpap_record_get_filename (ValaDPAPRecord* self);
-void vala_dpap_record_set_filename (ValaDPAPRecord* self,
-                                    const gchar* value);
-const gchar* vala_dpap_record_get_aspect_ratio (ValaDPAPRecord* self);
-void vala_dpap_record_set_aspect_ratio (ValaDPAPRecord* self,
-                                        const gchar* value);
-const gchar* vala_dpap_record_get_format (ValaDPAPRecord* self);
-void vala_dpap_record_set_format (ValaDPAPRecord* self,
-                                  const gchar* value);
-GByteArray* vala_dpap_record_get_thumbnail (ValaDPAPRecord* self);
-void vala_dpap_record_set_thumbnail (ValaDPAPRecord* self,
-                                     GByteArray* value);
-const gchar* vala_dpap_record_get_comments (ValaDPAPRecord* self);
-void vala_dpap_record_set_comments (ValaDPAPRecord* self,
-                                    const gchar* value);
-gint vala_dpap_record_get_large_filesize (ValaDPAPRecord* self);
-void vala_dpap_record_set_large_filesize (ValaDPAPRecord* self,
-                                          gint value);
-gint vala_dpap_record_get_pixel_height (ValaDPAPRecord* self);
-void vala_dpap_record_set_pixel_height (ValaDPAPRecord* self,
-                                        gint value);
-gint vala_dpap_record_get_pixel_width (ValaDPAPRecord* self);
-void vala_dpap_record_set_pixel_width (ValaDPAPRecord* self,
-                                       gint value);
-gint vala_dpap_record_get_rating (ValaDPAPRecord* self);
-void vala_dpap_record_set_rating (ValaDPAPRecord* self,
-                                  gint value);
-gint vala_dpap_record_get_creation_date (ValaDPAPRecord* self);
-void vala_dpap_record_set_creation_date (ValaDPAPRecord* self,
-                                         gint value);
-static void vala_dpap_record_finalize (GObject * obj);
-static GType vala_dpap_record_get_type_once (void);
-static void _vala_vala_dpap_record_get_property (GObject * object,
-                                          guint property_id,
-                                          GValue * value,
-                                          GParamSpec * pspec);
-static void _vala_vala_dpap_record_set_property (GObject * object,
-                                          guint property_id,
-                                          const GValue * value,
-                                          GParamSpec * pspec);
-GType vala_dpap_record_factory_get_type (void) G_GNUC_CONST;
-G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaDPAPRecordFactory, g_object_unref)
-static DMAPRecord* vala_dpap_record_factory_real_create (DMAPRecordFactory* base,
-                                                  void* user_data);
-ValaDPAPRecordFactory* vala_dpap_record_factory_new (void);
-ValaDPAPRecordFactory* vala_dpap_record_factory_construct (GType object_type);
-static GType vala_dpap_record_factory_get_type_once (void);
-
-static inline gpointer
-vala_dpap_record_get_instance_private (ValaDPAPRecord* self)
-{
-	return G_STRUCT_MEMBER_P (self, ValaDPAPRecord_private_offset);
-}
-
-static GInputStream*
-vala_dpap_record_real_read (DPAPRecord* base,
-                            GError** error)
-{
-	ValaDPAPRecord * self;
-	self = (ValaDPAPRecord*) base;
-	g_error ("vala-dpap-record.vala:95: read not implemented");
-}
-
-static gboolean
-vala_dpap_record_real_set_from_blob (DMAPRecord* base,
-                                     GByteArray* blob)
-{
-	ValaDPAPRecord * self;
-	self = (ValaDPAPRecord*) base;
-	g_return_val_if_fail (blob != NULL, FALSE);
-	g_error ("vala-dpap-record.vala:99: set_from_blob not implemented");
-}
-
-static GByteArray*
-vala_dpap_record_real_to_blob (DMAPRecord* base)
-{
-	ValaDPAPRecord * self;
-	self = (ValaDPAPRecord*) base;
-	g_error ("vala-dpap-record.vala:103: to_blob not implemented");
-}
-
-ValaDPAPRecord*
-vala_dpap_record_construct (GType object_type)
-{
-	ValaDPAPRecord * self = NULL;
-	gchar* _tmp0_;
-	gchar* _tmp1_;
-	gchar* _tmp2_;
-	gchar* _tmp3_;
-	gchar* _tmp4_;
-	gchar* _tmp5_;
-	const gchar* _tmp6_;
-	gchar* _tmp7_;
-	gchar* _tmp8_;
-	gchar* _tmp9_;
-	gchar* path = NULL;
-	gchar* _tmp10_;
-	gchar* _tmp11_;
-	gchar* _tmp12_;
-	gchar* _tmp13_;
-	guint8* data = NULL;
-	gint data_length1 = 0;
-	gint _data_size_ = 0;
-	guint8* _tmp14_ = NULL;
-	size_t _tmp15_ = 0;
-	GByteArray* _tmp16_;
-	GByteArray* _tmp17_;
-	GError* _inner_error0_ = NULL;
-	self = (ValaDPAPRecord*) g_object_new (object_type, NULL);
-	_tmp0_ = g_get_current_dir ();
-	_tmp1_ = _tmp0_;
-	_tmp2_ = g_strconcat ("file://", _tmp1_, NULL);
-	_tmp3_ = _tmp2_;
-	_tmp4_ = g_strconcat (_tmp3_, "/media/test.jpeg", NULL);
-	_g_free0 (self->priv->_location);
-	self->priv->_location = _tmp4_;
-	_g_free0 (_tmp3_);
-	_g_free0 (_tmp1_);
-	_tmp5_ = g_strdup ("1.333");
-	_g_free0 (self->priv->_aspect_ratio);
-	self->priv->_aspect_ratio = _tmp5_;
-	_tmp6_ = self->priv->_location;
-	_tmp7_ = g_path_get_basename (_tmp6_);
-	_g_free0 (self->priv->_filename);
-	self->priv->_filename = _tmp7_;
-	_tmp8_ = g_strdup ("JPEG");
-	_g_free0 (self->priv->_format);
-	self->priv->_format = _tmp8_;
-	_tmp9_ = g_strdup ("Comments");
-	_g_free0 (self->priv->_comments);
-	self->priv->_comments = _tmp9_;
-	self->priv->_large_filesize = 13953;
-	self->priv->_pixel_height = 480;
-	self->priv->_pixel_width = 640;
-	self->priv->_rating = 5;
-	self->priv->_creation_date = 0;
-	_tmp10_ = g_get_current_dir ();
-	_tmp11_ = _tmp10_;
-	_tmp12_ = g_strconcat (_tmp11_, "/media/test.jpeg", NULL);
-	_tmp13_ = _tmp12_;
-	_g_free0 (_tmp11_);
-	path = _tmp13_;
-	g_file_get_contents (path, (gchar**) (&_tmp14_), &_tmp15_, &_inner_error0_);
-	data = (g_free (data), NULL);
-	data = _tmp14_;
-	data_length1 = _tmp15_;
-	_data_size_ = data_length1;
-	if (G_UNLIKELY (_inner_error0_ != NULL)) {
-		data = (g_free (data), NULL);
-		_g_free0 (path);
-		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
-		g_clear_error (&_inner_error0_);
-		return NULL;
-	}
-	_tmp16_ = g_byte_array_new ();
-	_g_byte_array_unref0 (self->priv->_thumbnail);
-	self->priv->_thumbnail = _tmp16_;
-	_tmp17_ = self->priv->_thumbnail;
-	g_byte_array_append (_tmp17_, data, (gint) data_length1);
-	data = (g_free (data), NULL);
-	_g_free0 (path);
-	return self;
-}
-
-ValaDPAPRecord*
-vala_dpap_record_new (void)
-{
-	return vala_dpap_record_construct (TYPE_VALA_DPAP_RECORD);
-}
-
-const gchar*
-vala_dpap_record_get_location (ValaDPAPRecord* self)
-{
-	const gchar* result;
-	const gchar* _tmp0_;
-	g_return_val_if_fail (self != NULL, NULL);
-	_tmp0_ = self->priv->_location;
-	result = _tmp0_;
-	return result;
-}
-
-void
-vala_dpap_record_set_location (ValaDPAPRecord* self,
-                               const gchar* value)
-{
-	gchar* _tmp0_;
-	g_return_if_fail (self != NULL);
-	_tmp0_ = g_strdup (value);
-	_g_free0 (self->priv->_location);
-	self->priv->_location = _tmp0_;
-	g_object_notify_by_pspec ((GObject *) self, vala_dpap_record_properties[VALA_DPAP_RECORD_LOCATION_PROPERTY]);
-}
-
-const gchar*
-vala_dpap_record_get_filename (ValaDPAPRecord* self)
-{
-	const gchar* result;
-	const gchar* _tmp0_;
-	g_return_val_if_fail (self != NULL, NULL);
-	_tmp0_ = self->priv->_filename;
-	result = _tmp0_;
-	return result;
-}
-
-void
-vala_dpap_record_set_filename (ValaDPAPRecord* self,
-                               const gchar* value)
-{
-	gchar* _tmp0_;
-	g_return_if_fail (self != NULL);
-	_tmp0_ = g_strdup (value);
-	_g_free0 (self->priv->_filename);
-	self->priv->_filename = _tmp0_;
-	g_object_notify_by_pspec ((GObject *) self, vala_dpap_record_properties[VALA_DPAP_RECORD_FILENAME_PROPERTY]);
-}
-
-const gchar*
-vala_dpap_record_get_aspect_ratio (ValaDPAPRecord* self)
-{
-	const gchar* result;
-	const gchar* _tmp0_;
-	g_return_val_if_fail (self != NULL, NULL);
-	_tmp0_ = self->priv->_aspect_ratio;
-	result = _tmp0_;
-	return result;
-}
-
-void
-vala_dpap_record_set_aspect_ratio (ValaDPAPRecord* self,
-                                   const gchar* value)
-{
-	gchar* _tmp0_;
-	g_return_if_fail (self != NULL);
-	_tmp0_ = g_strdup (value);
-	_g_free0 (self->priv->_aspect_ratio);
-	self->priv->_aspect_ratio = _tmp0_;
-	g_object_notify_by_pspec ((GObject *) self, vala_dpap_record_properties[VALA_DPAP_RECORD_ASPECT_RATIO_PROPERTY]);
-}
-
-const gchar*
-vala_dpap_record_get_format (ValaDPAPRecord* self)
-{
-	const gchar* result;
-	const gchar* _tmp0_;
-	g_return_val_if_fail (self != NULL, NULL);
-	_tmp0_ = self->priv->_format;
-	result = _tmp0_;
-	return result;
-}
-
-void
-vala_dpap_record_set_format (ValaDPAPRecord* self,
-                             const gchar* value)
-{
-	gchar* _tmp0_;
-	g_return_if_fail (self != NULL);
-	_tmp0_ = g_strdup (value);
-	_g_free0 (self->priv->_format);
-	self->priv->_format = _tmp0_;
-	g_object_notify_by_pspec ((GObject *) self, vala_dpap_record_properties[VALA_DPAP_RECORD_FORMAT_PROPERTY]);
-}
-
-GByteArray*
-vala_dpap_record_get_thumbnail (ValaDPAPRecord* self)
-{
-	GByteArray* result;
-	GByteArray* _tmp0_;
-	g_return_val_if_fail (self != NULL, NULL);
-	_tmp0_ = self->priv->_thumbnail;
-	result = _tmp0_;
-	return result;
-}
-
-void
-vala_dpap_record_set_thumbnail (ValaDPAPRecord* self,
-                                GByteArray* value)
-{
-	GByteArray* _tmp0_;
-	GByteArray* _tmp1_;
-	guint8* _tmp2_;
-	gint _tmp2__length1;
-	g_return_if_fail (self != NULL);
-	_tmp0_ = g_byte_array_new ();
-	_g_byte_array_unref0 (self->priv->_thumbnail);
-	self->priv->_thumbnail = _tmp0_;
-	_tmp1_ = self->priv->_thumbnail;
-	_tmp2_ = value->data;
-	_tmp2__length1 = value->len;
-	g_byte_array_append (_tmp1_, _tmp2_, (gint) _tmp2__length1);
-	g_object_notify_by_pspec ((GObject *) self, vala_dpap_record_properties[VALA_DPAP_RECORD_THUMBNAIL_PROPERTY]);
-}
-
-const gchar*
-vala_dpap_record_get_comments (ValaDPAPRecord* self)
-{
-	const gchar* result;
-	const gchar* _tmp0_;
-	g_return_val_if_fail (self != NULL, NULL);
-	_tmp0_ = self->priv->_comments;
-	result = _tmp0_;
-	return result;
-}
-
-void
-vala_dpap_record_set_comments (ValaDPAPRecord* self,
-                               const gchar* value)
-{
-	gchar* _tmp0_;
-	g_return_if_fail (self != NULL);
-	_tmp0_ = g_strdup (value);
-	_g_free0 (self->priv->_comments);
-	self->priv->_comments = _tmp0_;
-	g_object_notify_by_pspec ((GObject *) self, vala_dpap_record_properties[VALA_DPAP_RECORD_COMMENTS_PROPERTY]);
-}
-
-gint
-vala_dpap_record_get_large_filesize (ValaDPAPRecord* self)
-{
-	gint result;
-	g_return_val_if_fail (self != NULL, 0);
-	result = self->priv->_large_filesize;
-	return result;
-}
-
-void
-vala_dpap_record_set_large_filesize (ValaDPAPRecord* self,
-                                     gint value)
-{
-	g_return_if_fail (self != NULL);
-	self->priv->_large_filesize = value;
-	g_object_notify_by_pspec ((GObject *) self, vala_dpap_record_properties[VALA_DPAP_RECORD_LARGE_FILESIZE_PROPERTY]);
-}
-
-gint
-vala_dpap_record_get_pixel_height (ValaDPAPRecord* self)
-{
-	gint result;
-	g_return_val_if_fail (self != NULL, 0);
-	result = self->priv->_pixel_height;
-	return result;
-}
-
-void
-vala_dpap_record_set_pixel_height (ValaDPAPRecord* self,
-                                   gint value)
-{
-	g_return_if_fail (self != NULL);
-	self->priv->_pixel_height = value;
-	g_object_notify_by_pspec ((GObject *) self, vala_dpap_record_properties[VALA_DPAP_RECORD_PIXEL_HEIGHT_PROPERTY]);
-}
-
-gint
-vala_dpap_record_get_pixel_width (ValaDPAPRecord* self)
-{
-	gint result;
-	g_return_val_if_fail (self != NULL, 0);
-	result = self->priv->_pixel_width;
-	return result;
-}
-
-void
-vala_dpap_record_set_pixel_width (ValaDPAPRecord* self,
-                                  gint value)
-{
-	g_return_if_fail (self != NULL);
-	self->priv->_pixel_width = value;
-	g_object_notify_by_pspec ((GObject *) self, vala_dpap_record_properties[VALA_DPAP_RECORD_PIXEL_WIDTH_PROPERTY]);
-}
-
-gint
-vala_dpap_record_get_rating (ValaDPAPRecord* self)
-{
-	gint result;
-	g_return_val_if_fail (self != NULL, 0);
-	result = self->priv->_rating;
-	return result;
-}
-
-void
-vala_dpap_record_set_rating (ValaDPAPRecord* self,
-                             gint value)
-{
-	g_return_if_fail (self != NULL);
-	self->priv->_rating = value;
-	g_object_notify_by_pspec ((GObject *) self, vala_dpap_record_properties[VALA_DPAP_RECORD_RATING_PROPERTY]);
-}
-
-gint
-vala_dpap_record_get_creation_date (ValaDPAPRecord* self)
-{
-	gint result;
-	g_return_val_if_fail (self != NULL, 0);
-	result = self->priv->_creation_date;
-	return result;
-}
-
-void
-vala_dpap_record_set_creation_date (ValaDPAPRecord* self,
-                                    gint value)
-{
-	g_return_if_fail (self != NULL);
-	self->priv->_creation_date = value;
-	g_object_notify_by_pspec ((GObject *) self, vala_dpap_record_properties[VALA_DPAP_RECORD_CREATION_DATE_PROPERTY]);
-}
-
-static void
-vala_dpap_record_class_init (ValaDPAPRecordClass * klass,
-                             gpointer klass_data)
-{
-	vala_dpap_record_parent_class = g_type_class_peek_parent (klass);
-	g_type_class_adjust_private_offset (klass, &ValaDPAPRecord_private_offset);
-	G_OBJECT_CLASS (klass)->get_property = _vala_vala_dpap_record_get_property;
-	G_OBJECT_CLASS (klass)->set_property = _vala_vala_dpap_record_set_property;
-	G_OBJECT_CLASS (klass)->finalize = vala_dpap_record_finalize;
-	g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_DPAP_RECORD_LOCATION_PROPERTY, vala_dpap_record_properties[VALA_DPAP_RECORD_LOCATION_PROPERTY] = g_param_spec_string ("location", "location", "location", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
-	g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_DPAP_RECORD_FILENAME_PROPERTY, vala_dpap_record_properties[VALA_DPAP_RECORD_FILENAME_PROPERTY] = g_param_spec_string ("filename", "filename", "filename", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
-	g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_DPAP_RECORD_ASPECT_RATIO_PROPERTY, vala_dpap_record_properties[VALA_DPAP_RECORD_ASPECT_RATIO_PROPERTY] = g_param_spec_string ("aspect-ratio", "aspect-ratio", "aspect-ratio", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
-	g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_DPAP_RECORD_FORMAT_PROPERTY, vala_dpap_record_properties[VALA_DPAP_RECORD_FORMAT_PROPERTY] = g_param_spec_string ("format", "format", "format", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
-	g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_DPAP_RECORD_THUMBNAIL_PROPERTY, vala_dpap_record_properties[VALA_DPAP_RECORD_THUMBNAIL_PROPERTY] = g_param_spec_boxed ("thumbnail", "thumbnail", "thumbnail", G_TYPE_BYTE_ARRAY, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
-	g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_DPAP_RECORD_COMMENTS_PROPERTY, vala_dpap_record_properties[VALA_DPAP_RECORD_COMMENTS_PROPERTY] = g_param_spec_string ("comments", "comments", "comments", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
-	g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_DPAP_RECORD_LARGE_FILESIZE_PROPERTY, vala_dpap_record_properties[VALA_DPAP_RECORD_LARGE_FILESIZE_PROPERTY] = g_param_spec_int ("large-filesize", "large-filesize", "large-filesize", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
-	g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_DPAP_RECORD_PIXEL_HEIGHT_PROPERTY, vala_dpap_record_properties[VALA_DPAP_RECORD_PIXEL_HEIGHT_PROPERTY] = g_param_spec_int ("pixel-height", "pixel-height", "pixel-height", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
-	g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_DPAP_RECORD_PIXEL_WIDTH_PROPERTY, vala_dpap_record_properties[VALA_DPAP_RECORD_PIXEL_WIDTH_PROPERTY] = g_param_spec_int ("pixel-width", "pixel-width", "pixel-width", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
-	g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_DPAP_RECORD_RATING_PROPERTY, vala_dpap_record_properties[VALA_DPAP_RECORD_RATING_PROPERTY] = g_param_spec_int ("rating", "rating", "rating", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
-	g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_DPAP_RECORD_CREATION_DATE_PROPERTY, vala_dpap_record_properties[VALA_DPAP_RECORD_CREATION_DATE_PROPERTY] = g_param_spec_int ("creation-date", "creation-date", "creation-date", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
-}
-
-static void
-vala_dpap_record_dmap_record_interface_init (DMAPRecordIface * iface,
-                                             gpointer iface_data)
-{
-	vala_dpap_record_dmap_record_parent_iface = g_type_interface_peek_parent (iface);
-	iface->set_from_blob = (gboolean (*) (DMAPRecord*, GByteArray*)) vala_dpap_record_real_set_from_blob;
-	iface->to_blob = (GByteArray* (*) (DMAPRecord*)) vala_dpap_record_real_to_blob;
-}
-
-static void
-vala_dpap_record_dpap_record_interface_init (DPAPRecordIface * iface,
-                                             gpointer iface_data)
-{
-	vala_dpap_record_dpap_record_parent_iface = g_type_interface_peek_parent (iface);
-	iface->read = (GInputStream* (*) (DPAPRecord*, GError**)) vala_dpap_record_real_read;
-}
-
-static void
-vala_dpap_record_instance_init (ValaDPAPRecord * self,
-                                gpointer klass)
-{
-	self->priv = vala_dpap_record_get_instance_private (self);
-}
-
-static void
-vala_dpap_record_finalize (GObject * obj)
-{
-	ValaDPAPRecord * self;
-	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_VALA_DPAP_RECORD, ValaDPAPRecord);
-	_g_free0 (self->priv->_location);
-	_g_free0 (self->priv->_filename);
-	_g_free0 (self->priv->_aspect_ratio);
-	_g_free0 (self->priv->_format);
-	_g_free0 (self->priv->_comments);
-	_g_byte_array_unref0 (self->priv->_thumbnail);
-	G_OBJECT_CLASS (vala_dpap_record_parent_class)->finalize (obj);
-}
-
-static GType
-vala_dpap_record_get_type_once (void)
-{
-	static const GTypeInfo g_define_type_info = { sizeof (ValaDPAPRecordClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_dpap_record_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaDPAPRecord), 0, (GInstanceInitFunc) vala_dpap_record_instance_init, NULL };
-	static const GInterfaceInfo dmap_record_info = { (GInterfaceInitFunc) vala_dpap_record_dmap_record_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
-	static const GInterfaceInfo dpap_record_info = { (GInterfaceInitFunc) vala_dpap_record_dpap_record_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
-	GType vala_dpap_record_type_id;
-	vala_dpap_record_type_id = g_type_register_static (G_TYPE_OBJECT, "ValaDPAPRecord", &g_define_type_info, 0);
-	g_type_add_interface_static (vala_dpap_record_type_id, DMAP_TYPE_RECORD, &dmap_record_info);
-	g_type_add_interface_static (vala_dpap_record_type_id, DPAP_TYPE_RECORD, &dpap_record_info);
-	ValaDPAPRecord_private_offset = g_type_add_instance_private (vala_dpap_record_type_id, sizeof (ValaDPAPRecordPrivate));
-	return vala_dpap_record_type_id;
-}
-
-GType
-vala_dpap_record_get_type (void)
-{
-	static volatile gsize vala_dpap_record_type_id__volatile = 0;
-	if (g_once_init_enter (&vala_dpap_record_type_id__volatile)) {
-		GType vala_dpap_record_type_id;
-		vala_dpap_record_type_id = vala_dpap_record_get_type_once ();
-		g_once_init_leave (&vala_dpap_record_type_id__volatile, vala_dpap_record_type_id);
-	}
-	return vala_dpap_record_type_id__volatile;
-}
-
-static void
-_vala_vala_dpap_record_get_property (GObject * object,
-                                     guint property_id,
-                                     GValue * value,
-                                     GParamSpec * pspec)
-{
-	ValaDPAPRecord * self;
-	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_VALA_DPAP_RECORD, ValaDPAPRecord);
-	switch (property_id) {
-		case VALA_DPAP_RECORD_LOCATION_PROPERTY:
-		g_value_set_string (value, vala_dpap_record_get_location (self));
-		break;
-		case VALA_DPAP_RECORD_FILENAME_PROPERTY:
-		g_value_set_string (value, vala_dpap_record_get_filename (self));
-		break;
-		case VALA_DPAP_RECORD_ASPECT_RATIO_PROPERTY:
-		g_value_set_string (value, vala_dpap_record_get_aspect_ratio (self));
-		break;
-		case VALA_DPAP_RECORD_FORMAT_PROPERTY:
-		g_value_set_string (value, vala_dpap_record_get_format (self));
-		break;
-		case VALA_DPAP_RECORD_THUMBNAIL_PROPERTY:
-		g_value_set_boxed (value, vala_dpap_record_get_thumbnail (self));
-		break;
-		case VALA_DPAP_RECORD_COMMENTS_PROPERTY:
-		g_value_set_string (value, vala_dpap_record_get_comments (self));
-		break;
-		case VALA_DPAP_RECORD_LARGE_FILESIZE_PROPERTY:
-		g_value_set_int (value, vala_dpap_record_get_large_filesize (self));
-		break;
-		case VALA_DPAP_RECORD_PIXEL_HEIGHT_PROPERTY:
-		g_value_set_int (value, vala_dpap_record_get_pixel_height (self));
-		break;
-		case VALA_DPAP_RECORD_PIXEL_WIDTH_PROPERTY:
-		g_value_set_int (value, vala_dpap_record_get_pixel_width (self));
-		break;
-		case VALA_DPAP_RECORD_RATING_PROPERTY:
-		g_value_set_int (value, vala_dpap_record_get_rating (self));
-		break;
-		case VALA_DPAP_RECORD_CREATION_DATE_PROPERTY:
-		g_value_set_int (value, vala_dpap_record_get_creation_date (self));
-		break;
-		default:
-		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
-		break;
-	}
-}
-
-static void
-_vala_vala_dpap_record_set_property (GObject * object,
-                                     guint property_id,
-                                     const GValue * value,
-                                     GParamSpec * pspec)
-{
-	ValaDPAPRecord * self;
-	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_VALA_DPAP_RECORD, ValaDPAPRecord);
-	switch (property_id) {
-		case VALA_DPAP_RECORD_LOCATION_PROPERTY:
-		vala_dpap_record_set_location (self, g_value_get_string (value));
-		break;
-		case VALA_DPAP_RECORD_FILENAME_PROPERTY:
-		vala_dpap_record_set_filename (self, g_value_get_string (value));
-		break;
-		case VALA_DPAP_RECORD_ASPECT_RATIO_PROPERTY:
-		vala_dpap_record_set_aspect_ratio (self, g_value_get_string (value));
-		break;
-		case VALA_DPAP_RECORD_FORMAT_PROPERTY:
-		vala_dpap_record_set_format (self, g_value_get_string (value));
-		break;
-		case VALA_DPAP_RECORD_THUMBNAIL_PROPERTY:
-		vala_dpap_record_set_thumbnail (self, g_value_get_boxed (value));
-		break;
-		case VALA_DPAP_RECORD_COMMENTS_PROPERTY:
-		vala_dpap_record_set_comments (self, g_value_get_string (value));
-		break;
-		case VALA_DPAP_RECORD_LARGE_FILESIZE_PROPERTY:
-		vala_dpap_record_set_large_filesize (self, g_value_get_int (value));
-		break;
-		case VALA_DPAP_RECORD_PIXEL_HEIGHT_PROPERTY:
-		vala_dpap_record_set_pixel_height (self, g_value_get_int (value));
-		break;
-		case VALA_DPAP_RECORD_PIXEL_WIDTH_PROPERTY:
-		vala_dpap_record_set_pixel_width (self, g_value_get_int (value));
-		break;
-		case VALA_DPAP_RECORD_RATING_PROPERTY:
-		vala_dpap_record_set_rating (self, g_value_get_int (value));
-		break;
-		case VALA_DPAP_RECORD_CREATION_DATE_PROPERTY:
-		vala_dpap_record_set_creation_date (self, g_value_get_int (value));
-		break;
-		default:
-		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
-		break;
-	}
-}
-
-static DMAPRecord*
-vala_dpap_record_factory_real_create (DMAPRecordFactory* base,
-                                      void* user_data)
-{
-	ValaDPAPRecordFactory * self;
-	ValaDPAPRecord* _tmp0_;
-	DMAPRecord* result = NULL;
-	self = (ValaDPAPRecordFactory*) base;
-	_tmp0_ = vala_dpap_record_new ();
-	result = (DMAPRecord*) _tmp0_;
-	return result;
-}
-
-ValaDPAPRecordFactory*
-vala_dpap_record_factory_construct (GType object_type)
-{
-	ValaDPAPRecordFactory * self = NULL;
-	self = (ValaDPAPRecordFactory*) g_object_new (object_type, NULL);
-	return self;
-}
-
-ValaDPAPRecordFactory*
-vala_dpap_record_factory_new (void)
-{
-	return vala_dpap_record_factory_construct (TYPE_VALA_DPAP_RECORD_FACTORY);
-}
-
-static void
-vala_dpap_record_factory_class_init (ValaDPAPRecordFactoryClass * klass,
-                                     gpointer klass_data)
-{
-	vala_dpap_record_factory_parent_class = g_type_class_peek_parent (klass);
-}
-
-static void
-vala_dpap_record_factory_dmap_record_factory_interface_init (DMAPRecordFactoryIface * iface,
-                                                             gpointer iface_data)
-{
-	vala_dpap_record_factory_dmap_record_factory_parent_iface = g_type_interface_peek_parent (iface);
-	iface->create = (DMAPRecord* (*) (DMAPRecordFactory*, void*)) vala_dpap_record_factory_real_create;
-}
-
-static void
-vala_dpap_record_factory_instance_init (ValaDPAPRecordFactory * self,
-                                        gpointer klass)
-{
-}
-
-static GType
-vala_dpap_record_factory_get_type_once (void)
-{
-	static const GTypeInfo g_define_type_info = { sizeof (ValaDPAPRecordFactoryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_dpap_record_factory_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaDPAPRecordFactory), 0, (GInstanceInitFunc) vala_dpap_record_factory_instance_init, NULL };
-	static const GInterfaceInfo dmap_record_factory_info = { (GInterfaceInitFunc) vala_dpap_record_factory_dmap_record_factory_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
-	GType vala_dpap_record_factory_type_id;
-	vala_dpap_record_factory_type_id = g_type_register_static (G_TYPE_OBJECT, "ValaDPAPRecordFactory", &g_define_type_info, 0);
-	g_type_add_interface_static (vala_dpap_record_factory_type_id, DMAP_TYPE_RECORD_FACTORY, &dmap_record_factory_info);
-	return vala_dpap_record_factory_type_id;
-}
-
-GType
-vala_dpap_record_factory_get_type (void)
-{
-	static volatile gsize vala_dpap_record_factory_type_id__volatile = 0;
-	if (g_once_init_enter (&vala_dpap_record_factory_type_id__volatile)) {
-		GType vala_dpap_record_factory_type_id;
-		vala_dpap_record_factory_type_id = vala_dpap_record_factory_get_type_once ();
-		g_once_init_leave (&vala_dpap_record_factory_type_id__volatile, vala_dpap_record_factory_type_id);
-	}
-	return vala_dpap_record_factory_type_id__volatile;
-}
-
diff --git a/tests/vala-image-record.c b/tests/vala-image-record.c
new file mode 100644
index 0000000..78629f4
--- /dev/null
+++ b/tests/vala-image-record.c
@@ -0,0 +1,803 @@
+/* vala-image-record.c generated by valac 0.56.3, the Vala compiler
+ * generated from vala-image-record.vala, do not modify */
+
+/*   FILE: vala-dmap-image-record.vala -- A DMAP.ImageRecord implementation in Vala
+ * AUTHOR: W. Michael Petullo <mike@flyn.org>
+ *   DATE: 21 December 2010
+ *
+ * Copyright (c) 2010 W. Michael Petullo <new@flyn.org>
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include <glib-object.h>
+#include <libdmapsharing/dmap.h>
+#include <stdlib.h>
+#include <string.h>
+#include <glib.h>
+#include <gio/gio.h>
+#include <glib/gstdio.h>
+
+#if !defined(VALA_EXTERN)
+#if defined(_MSC_VER)
+#define VALA_EXTERN __declspec(dllexport) extern
+#elif __GNUC__ >= 4
+#define VALA_EXTERN __attribute__((visibility("default"))) extern
+#else
+#define VALA_EXTERN extern
+#endif
+#endif
+
+#define TYPE_VALA_IMAGE_RECORD (vala_image_record_get_type ())
+#define VALA_IMAGE_RECORD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_IMAGE_RECORD, ValaImageRecord))
+#define VALA_IMAGE_RECORD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_IMAGE_RECORD, ValaImageRecordClass))
+#define IS_VALA_IMAGE_RECORD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_IMAGE_RECORD))
+#define IS_VALA_IMAGE_RECORD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_IMAGE_RECORD))
+#define VALA_IMAGE_RECORD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_IMAGE_RECORD, ValaImageRecordClass))
+
+typedef struct _ValaImageRecord ValaImageRecord;
+typedef struct _ValaImageRecordClass ValaImageRecordClass;
+typedef struct _ValaImageRecordPrivate ValaImageRecordPrivate;
+enum  {
+	VALA_IMAGE_RECORD_0_PROPERTY,
+	VALA_IMAGE_RECORD_LOCATION_PROPERTY,
+	VALA_IMAGE_RECORD_FILENAME_PROPERTY,
+	VALA_IMAGE_RECORD_ASPECT_RATIO_PROPERTY,
+	VALA_IMAGE_RECORD_FORMAT_PROPERTY,
+	VALA_IMAGE_RECORD_THUMBNAIL_PROPERTY,
+	VALA_IMAGE_RECORD_COMMENTS_PROPERTY,
+	VALA_IMAGE_RECORD_LARGE_FILESIZE_PROPERTY,
+	VALA_IMAGE_RECORD_PIXEL_HEIGHT_PROPERTY,
+	VALA_IMAGE_RECORD_PIXEL_WIDTH_PROPERTY,
+	VALA_IMAGE_RECORD_RATING_PROPERTY,
+	VALA_IMAGE_RECORD_CREATION_DATE_PROPERTY,
+	VALA_IMAGE_RECORD_NUM_PROPERTIES
+};
+static GParamSpec* vala_image_record_properties[VALA_IMAGE_RECORD_NUM_PROPERTIES];
+#define _g_free0(var) (var = (g_free (var), NULL))
+#define _g_array_unref0(var) ((var == NULL) ? NULL : (var = (g_array_unref (var), NULL)))
+
+#define TYPE_VALA_IMAGE_RECORD_FACTORY (vala_image_record_factory_get_type ())
+#define VALA_IMAGE_RECORD_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_IMAGE_RECORD_FACTORY, ValaImageRecordFactory))
+#define VALA_IMAGE_RECORD_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_IMAGE_RECORD_FACTORY, ValaImageRecordFactoryClass))
+#define IS_VALA_IMAGE_RECORD_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_IMAGE_RECORD_FACTORY))
+#define IS_VALA_IMAGE_RECORD_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_IMAGE_RECORD_FACTORY))
+#define VALA_IMAGE_RECORD_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_IMAGE_RECORD_FACTORY, ValaImageRecordFactoryClass))
+
+typedef struct _ValaImageRecordFactory ValaImageRecordFactory;
+typedef struct _ValaImageRecordFactoryClass ValaImageRecordFactoryClass;
+typedef struct _ValaImageRecordFactoryPrivate ValaImageRecordFactoryPrivate;
+enum  {
+	VALA_IMAGE_RECORD_FACTORY_0_PROPERTY,
+	VALA_IMAGE_RECORD_FACTORY_NUM_PROPERTIES
+};
+static GParamSpec* vala_image_record_factory_properties[VALA_IMAGE_RECORD_FACTORY_NUM_PROPERTIES];
+
+struct _ValaImageRecord {
+	GObject parent_instance;
+	ValaImageRecordPrivate * priv;
+};
+
+struct _ValaImageRecordClass {
+	GObjectClass parent_class;
+};
+
+struct _ValaImageRecordPrivate {
+	gchar* _location;
+	gchar* _filename;
+	gchar* _aspect_ratio;
+	gchar* _format;
+	gchar* _comments;
+	GArray* _thumbnail;
+	gint _large_filesize;
+	gint _pixel_height;
+	gint _pixel_width;
+	gint _rating;
+	gint _creation_date;
+};
+
+struct _ValaImageRecordFactory {
+	GObject parent_instance;
+	ValaImageRecordFactoryPrivate * priv;
+};
+
+struct _ValaImageRecordFactoryClass {
+	GObjectClass parent_class;
+};
+
+static gint ValaImageRecord_private_offset;
+static gpointer vala_image_record_parent_class = NULL;
+static DmapRecordInterface * vala_image_record_dmap_record_parent_iface = NULL;
+static DmapImageRecordInterface * vala_image_record_dmap_image_record_parent_iface = NULL;
+static gpointer vala_image_record_factory_parent_class = NULL;
+static DmapRecordFactoryInterface * vala_image_record_factory_dmap_record_factory_parent_iface = NULL;
+
+VALA_EXTERN GType vala_image_record_get_type (void) G_GNUC_CONST ;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaImageRecord, g_object_unref)
+static GInputStream* vala_image_record_real_read (DmapImageRecord* base,
+                                           GError** error);
+static gboolean vala_image_record_real_set_from_blob (DmapRecord* base,
+                                               GArray* blob);
+static GArray* vala_image_record_real_to_blob (DmapRecord* base);
+VALA_EXTERN ValaImageRecord* vala_image_record_new (void);
+VALA_EXTERN ValaImageRecord* vala_image_record_construct (GType object_type);
+VALA_EXTERN const gchar* vala_image_record_get_location (ValaImageRecord* self);
+VALA_EXTERN void vala_image_record_set_location (ValaImageRecord* self,
+                                     const gchar* value);
+VALA_EXTERN const gchar* vala_image_record_get_filename (ValaImageRecord* self);
+VALA_EXTERN void vala_image_record_set_filename (ValaImageRecord* self,
+                                     const gchar* value);
+VALA_EXTERN const gchar* vala_image_record_get_aspect_ratio (ValaImageRecord* self);
+VALA_EXTERN void vala_image_record_set_aspect_ratio (ValaImageRecord* self,
+                                         const gchar* value);
+VALA_EXTERN const gchar* vala_image_record_get_format (ValaImageRecord* self);
+VALA_EXTERN void vala_image_record_set_format (ValaImageRecord* self,
+                                   const gchar* value);
+VALA_EXTERN GArray* vala_image_record_get_thumbnail (ValaImageRecord* self);
+VALA_EXTERN void vala_image_record_set_thumbnail (ValaImageRecord* self,
+                                      GArray* value);
+VALA_EXTERN const gchar* vala_image_record_get_comments (ValaImageRecord* self);
+VALA_EXTERN void vala_image_record_set_comments (ValaImageRecord* self,
+                                     const gchar* value);
+VALA_EXTERN gint vala_image_record_get_large_filesize (ValaImageRecord* self);
+VALA_EXTERN void vala_image_record_set_large_filesize (ValaImageRecord* self,
+                                           gint value);
+VALA_EXTERN gint vala_image_record_get_pixel_height (ValaImageRecord* self);
+VALA_EXTERN void vala_image_record_set_pixel_height (ValaImageRecord* self,
+                                         gint value);
+VALA_EXTERN gint vala_image_record_get_pixel_width (ValaImageRecord* self);
+VALA_EXTERN void vala_image_record_set_pixel_width (ValaImageRecord* self,
+                                        gint value);
+VALA_EXTERN gint vala_image_record_get_rating (ValaImageRecord* self);
+VALA_EXTERN void vala_image_record_set_rating (ValaImageRecord* self,
+                                   gint value);
+VALA_EXTERN gint vala_image_record_get_creation_date (ValaImageRecord* self);
+VALA_EXTERN void vala_image_record_set_creation_date (ValaImageRecord* self,
+                                          gint value);
+static void vala_image_record_finalize (GObject * obj);
+static GType vala_image_record_get_type_once (void);
+static void _vala_vala_image_record_get_property (GObject * object,
+                                           guint property_id,
+                                           GValue * value,
+                                           GParamSpec * pspec);
+static void _vala_vala_image_record_set_property (GObject * object,
+                                           guint property_id,
+                                           const GValue * value,
+                                           GParamSpec * pspec);
+VALA_EXTERN GType vala_image_record_factory_get_type (void) G_GNUC_CONST ;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaImageRecordFactory, g_object_unref)
+static DmapRecord* vala_image_record_factory_real_create (DmapRecordFactory* base,
+                                                   void* user_data,
+                                                   GError** error);
+VALA_EXTERN ValaImageRecordFactory* vala_image_record_factory_new (void);
+VALA_EXTERN ValaImageRecordFactory* vala_image_record_factory_construct (GType object_type);
+static GType vala_image_record_factory_get_type_once (void);
+
+static inline gpointer
+vala_image_record_get_instance_private (ValaImageRecord* self)
+{
+	return G_STRUCT_MEMBER_P (self, ValaImageRecord_private_offset);
+}
+
+static GInputStream*
+vala_image_record_real_read (DmapImageRecord* base,
+                             GError** error)
+{
+	ValaImageRecord * self;
+	self = (ValaImageRecord*) base;
+	g_error ("vala-image-record.vala:95: read not implemented");
+}
+
+static gboolean
+vala_image_record_real_set_from_blob (DmapRecord* base,
+                                      GArray* blob)
+{
+	ValaImageRecord * self;
+	self = (ValaImageRecord*) base;
+	g_return_val_if_fail (blob != NULL, FALSE);
+	g_error ("vala-image-record.vala:99: set_from_blob not implemented");
+}
+
+static GArray*
+vala_image_record_real_to_blob (DmapRecord* base)
+{
+	ValaImageRecord * self;
+	self = (ValaImageRecord*) base;
+	g_error ("vala-image-record.vala:103: to_blob not implemented");
+}
+
+ValaImageRecord*
+vala_image_record_construct (GType object_type)
+{
+	ValaImageRecord * self = NULL;
+	gchar* _tmp0_;
+	gchar* _tmp1_;
+	gchar* _tmp2_;
+	gchar* _tmp3_;
+	gchar* _tmp4_;
+	gchar* _tmp5_;
+	const gchar* _tmp6_;
+	gchar* _tmp7_;
+	gchar* _tmp8_;
+	gchar* _tmp9_;
+	gchar* path = NULL;
+	gchar* _tmp10_;
+	gchar* _tmp11_;
+	gchar* _tmp12_;
+	gchar* _tmp13_;
+	guint8* data = NULL;
+	gint data_length1 = 0;
+	gint _data_size_ = 0;
+	guint8* _tmp14_ = NULL;
+	gsize _tmp15_ = 0;
+	GArray* _tmp16_;
+	GArray* _tmp17_;
+	GError* _inner_error0_ = NULL;
+	self = (ValaImageRecord*) g_object_new (object_type, NULL);
+	_tmp0_ = g_get_current_dir ();
+	_tmp1_ = _tmp0_;
+	_tmp2_ = g_strconcat ("file://", _tmp1_, NULL);
+	_tmp3_ = _tmp2_;
+	_tmp4_ = g_strconcat (_tmp3_, "/media/test.jpeg", NULL);
+	_g_free0 (self->priv->_location);
+	self->priv->_location = _tmp4_;
+	_g_free0 (_tmp3_);
+	_g_free0 (_tmp1_);
+	_tmp5_ = g_strdup ("1.333");
+	_g_free0 (self->priv->_aspect_ratio);
+	self->priv->_aspect_ratio = _tmp5_;
+	_tmp6_ = self->priv->_location;
+	_tmp7_ = g_path_get_basename (_tmp6_);
+	_g_free0 (self->priv->_filename);
+	self->priv->_filename = _tmp7_;
+	_tmp8_ = g_strdup ("JPEG");
+	_g_free0 (self->priv->_format);
+	self->priv->_format = _tmp8_;
+	_tmp9_ = g_strdup ("Comments");
+	_g_free0 (self->priv->_comments);
+	self->priv->_comments = _tmp9_;
+	self->priv->_large_filesize = 13953;
+	self->priv->_pixel_height = 480;
+	self->priv->_pixel_width = 640;
+	self->priv->_rating = 5;
+	self->priv->_creation_date = 0;
+	_tmp10_ = g_get_current_dir ();
+	_tmp11_ = _tmp10_;
+	_tmp12_ = g_strconcat (_tmp11_, "/media/test.jpeg", NULL);
+	_tmp13_ = _tmp12_;
+	_g_free0 (_tmp11_);
+	path = _tmp13_;
+	g_file_get_contents (path, (gchar**) (&_tmp14_), &_tmp15_, &_inner_error0_);
+	data = (g_free (data), NULL);
+	data = _tmp14_;
+	data_length1 = _tmp15_;
+	_data_size_ = data_length1;
+	if (G_UNLIKELY (_inner_error0_ != NULL)) {
+		data = (g_free (data), NULL);
+		_g_free0 (path);
+		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
+		g_clear_error (&_inner_error0_);
+		return NULL;
+	}
+	_tmp16_ = g_array_new (FALSE, FALSE, (gulong) 1);
+	_g_array_unref0 (self->priv->_thumbnail);
+	self->priv->_thumbnail = _tmp16_;
+	_tmp17_ = self->priv->_thumbnail;
+	g_array_append_vals (_tmp17_, data, (guint) data_length1);
+	data = (g_free (data), NULL);
+	_g_free0 (path);
+	return self;
+}
+
+ValaImageRecord*
+vala_image_record_new (void)
+{
+	return vala_image_record_construct (TYPE_VALA_IMAGE_RECORD);
+}
+
+const gchar*
+vala_image_record_get_location (ValaImageRecord* self)
+{
+	const gchar* result;
+	const gchar* _tmp0_;
+	g_return_val_if_fail (self != NULL, NULL);
+	_tmp0_ = self->priv->_location;
+	result = _tmp0_;
+	return result;
+}
+
+void
+vala_image_record_set_location (ValaImageRecord* self,
+                                const gchar* value)
+{
+	gchar* _tmp0_;
+	g_return_if_fail (self != NULL);
+	_tmp0_ = g_strdup (value);
+	_g_free0 (self->priv->_location);
+	self->priv->_location = _tmp0_;
+	g_object_notify_by_pspec ((GObject *) self, vala_image_record_properties[VALA_IMAGE_RECORD_LOCATION_PROPERTY]);
+}
+
+const gchar*
+vala_image_record_get_filename (ValaImageRecord* self)
+{
+	const gchar* result;
+	const gchar* _tmp0_;
+	g_return_val_if_fail (self != NULL, NULL);
+	_tmp0_ = self->priv->_filename;
+	result = _tmp0_;
+	return result;
+}
+
+void
+vala_image_record_set_filename (ValaImageRecord* self,
+                                const gchar* value)
+{
+	gchar* _tmp0_;
+	g_return_if_fail (self != NULL);
+	_tmp0_ = g_strdup (value);
+	_g_free0 (self->priv->_filename);
+	self->priv->_filename = _tmp0_;
+	g_object_notify_by_pspec ((GObject *) self, vala_image_record_properties[VALA_IMAGE_RECORD_FILENAME_PROPERTY]);
+}
+
+const gchar*
+vala_image_record_get_aspect_ratio (ValaImageRecord* self)
+{
+	const gchar* result;
+	const gchar* _tmp0_;
+	g_return_val_if_fail (self != NULL, NULL);
+	_tmp0_ = self->priv->_aspect_ratio;
+	result = _tmp0_;
+	return result;
+}
+
+void
+vala_image_record_set_aspect_ratio (ValaImageRecord* self,
+                                    const gchar* value)
+{
+	gchar* _tmp0_;
+	g_return_if_fail (self != NULL);
+	_tmp0_ = g_strdup (value);
+	_g_free0 (self->priv->_aspect_ratio);
+	self->priv->_aspect_ratio = _tmp0_;
+	g_object_notify_by_pspec ((GObject *) self, vala_image_record_properties[VALA_IMAGE_RECORD_ASPECT_RATIO_PROPERTY]);
+}
+
+const gchar*
+vala_image_record_get_format (ValaImageRecord* self)
+{
+	const gchar* result;
+	const gchar* _tmp0_;
+	g_return_val_if_fail (self != NULL, NULL);
+	_tmp0_ = self->priv->_format;
+	result = _tmp0_;
+	return result;
+}
+
+void
+vala_image_record_set_format (ValaImageRecord* self,
+                              const gchar* value)
+{
+	gchar* _tmp0_;
+	g_return_if_fail (self != NULL);
+	_tmp0_ = g_strdup (value);
+	_g_free0 (self->priv->_format);
+	self->priv->_format = _tmp0_;
+	g_object_notify_by_pspec ((GObject *) self, vala_image_record_properties[VALA_IMAGE_RECORD_FORMAT_PROPERTY]);
+}
+
+GArray*
+vala_image_record_get_thumbnail (ValaImageRecord* self)
+{
+	GArray* result;
+	GArray* _tmp0_;
+	g_return_val_if_fail (self != NULL, NULL);
+	_tmp0_ = self->priv->_thumbnail;
+	result = _tmp0_;
+	return result;
+}
+
+void
+vala_image_record_set_thumbnail (ValaImageRecord* self,
+                                 GArray* value)
+{
+	GArray* _tmp0_;
+	GArray* _tmp1_;
+	gpointer* _tmp2_;
+	gint _tmp2__length1;
+	gpointer* _tmp3_;
+	gint _tmp3__length1;
+	g_return_if_fail (self != NULL);
+	_tmp0_ = g_array_new (FALSE, FALSE, (gulong) 1);
+	_g_array_unref0 (self->priv->_thumbnail);
+	self->priv->_thumbnail = _tmp0_;
+	_tmp1_ = self->priv->_thumbnail;
+	_tmp2_ = value->data;
+	_tmp2__length1 = value->len;
+	_tmp3_ = value->data;
+	_tmp3__length1 = value->len;
+	g_array_append_vals (_tmp1_, _tmp2_, (guint) _tmp3__length1);
+	g_object_notify_by_pspec ((GObject *) self, vala_image_record_properties[VALA_IMAGE_RECORD_THUMBNAIL_PROPERTY]);
+}
+
+const gchar*
+vala_image_record_get_comments (ValaImageRecord* self)
+{
+	const gchar* result;
+	const gchar* _tmp0_;
+	g_return_val_if_fail (self != NULL, NULL);
+	_tmp0_ = self->priv->_comments;
+	result = _tmp0_;
+	return result;
+}
+
+void
+vala_image_record_set_comments (ValaImageRecord* self,
+                                const gchar* value)
+{
+	gchar* _tmp0_;
+	g_return_if_fail (self != NULL);
+	_tmp0_ = g_strdup (value);
+	_g_free0 (self->priv->_comments);
+	self->priv->_comments = _tmp0_;
+	g_object_notify_by_pspec ((GObject *) self, vala_image_record_properties[VALA_IMAGE_RECORD_COMMENTS_PROPERTY]);
+}
+
+gint
+vala_image_record_get_large_filesize (ValaImageRecord* self)
+{
+	gint result;
+	g_return_val_if_fail (self != NULL, 0);
+	result = self->priv->_large_filesize;
+	return result;
+}
+
+void
+vala_image_record_set_large_filesize (ValaImageRecord* self,
+                                      gint value)
+{
+	g_return_if_fail (self != NULL);
+	self->priv->_large_filesize = value;
+	g_object_notify_by_pspec ((GObject *) self, vala_image_record_properties[VALA_IMAGE_RECORD_LARGE_FILESIZE_PROPERTY]);
+}
+
+gint
+vala_image_record_get_pixel_height (ValaImageRecord* self)
+{
+	gint result;
+	g_return_val_if_fail (self != NULL, 0);
+	result = self->priv->_pixel_height;
+	return result;
+}
+
+void
+vala_image_record_set_pixel_height (ValaImageRecord* self,
+                                    gint value)
+{
+	g_return_if_fail (self != NULL);
+	self->priv->_pixel_height = value;
+	g_object_notify_by_pspec ((GObject *) self, vala_image_record_properties[VALA_IMAGE_RECORD_PIXEL_HEIGHT_PROPERTY]);
+}
+
+gint
+vala_image_record_get_pixel_width (ValaImageRecord* self)
+{
+	gint result;
+	g_return_val_if_fail (self != NULL, 0);
+	result = self->priv->_pixel_width;
+	return result;
+}
+
+void
+vala_image_record_set_pixel_width (ValaImageRecord* self,
+                                   gint value)
+{
+	g_return_if_fail (self != NULL);
+	self->priv->_pixel_width = value;
+	g_object_notify_by_pspec ((GObject *) self, vala_image_record_properties[VALA_IMAGE_RECORD_PIXEL_WIDTH_PROPERTY]);
+}
+
+gint
+vala_image_record_get_rating (ValaImageRecord* self)
+{
+	gint result;
+	g_return_val_if_fail (self != NULL, 0);
+	result = self->priv->_rating;
+	return result;
+}
+
+void
+vala_image_record_set_rating (ValaImageRecord* self,
+                              gint value)
+{
+	g_return_if_fail (self != NULL);
+	self->priv->_rating = value;
+	g_object_notify_by_pspec ((GObject *) self, vala_image_record_properties[VALA_IMAGE_RECORD_RATING_PROPERTY]);
+}
+
+gint
+vala_image_record_get_creation_date (ValaImageRecord* self)
+{
+	gint result;
+	g_return_val_if_fail (self != NULL, 0);
+	result = self->priv->_creation_date;
+	return result;
+}
+
+void
+vala_image_record_set_creation_date (ValaImageRecord* self,
+                                     gint value)
+{
+	g_return_if_fail (self != NULL);
+	self->priv->_creation_date = value;
+	g_object_notify_by_pspec ((GObject *) self, vala_image_record_properties[VALA_IMAGE_RECORD_CREATION_DATE_PROPERTY]);
+}
+
+static void
+vala_image_record_class_init (ValaImageRecordClass * klass,
+                              gpointer klass_data)
+{
+	vala_image_record_parent_class = g_type_class_peek_parent (klass);
+	g_type_class_adjust_private_offset (klass, &ValaImageRecord_private_offset);
+	G_OBJECT_CLASS (klass)->get_property = _vala_vala_image_record_get_property;
+	G_OBJECT_CLASS (klass)->set_property = _vala_vala_image_record_set_property;
+	G_OBJECT_CLASS (klass)->finalize = vala_image_record_finalize;
+	g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_IMAGE_RECORD_LOCATION_PROPERTY, vala_image_record_properties[VALA_IMAGE_RECORD_LOCATION_PROPERTY] = g_param_spec_string ("location", "location", "location", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
+	g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_IMAGE_RECORD_FILENAME_PROPERTY, vala_image_record_properties[VALA_IMAGE_RECORD_FILENAME_PROPERTY] = g_param_spec_string ("filename", "filename", "filename", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
+	g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_IMAGE_RECORD_ASPECT_RATIO_PROPERTY, vala_image_record_properties[VALA_IMAGE_RECORD_ASPECT_RATIO_PROPERTY] = g_param_spec_string ("aspect-ratio", "aspect-ratio", "aspect-ratio", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
+	g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_IMAGE_RECORD_FORMAT_PROPERTY, vala_image_record_properties[VALA_IMAGE_RECORD_FORMAT_PROPERTY] = g_param_spec_string ("format", "format", "format", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
+	g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_IMAGE_RECORD_THUMBNAIL_PROPERTY, vala_image_record_properties[VALA_IMAGE_RECORD_THUMBNAIL_PROPERTY] = g_param_spec_boxed ("thumbnail", "thumbnail", "thumbnail", G_TYPE_ARRAY, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
+	g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_IMAGE_RECORD_COMMENTS_PROPERTY, vala_image_record_properties[VALA_IMAGE_RECORD_COMMENTS_PROPERTY] = g_param_spec_string ("comments", "comments", "comments", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
+	g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_IMAGE_RECORD_LARGE_FILESIZE_PROPERTY, vala_image_record_properties[VALA_IMAGE_RECORD_LARGE_FILESIZE_PROPERTY] = g_param_spec_int ("large-filesize", "large-filesize", "large-filesize", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
+	g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_IMAGE_RECORD_PIXEL_HEIGHT_PROPERTY, vala_image_record_properties[VALA_IMAGE_RECORD_PIXEL_HEIGHT_PROPERTY] = g_param_spec_int ("pixel-height", "pixel-height", "pixel-height", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
+	g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_IMAGE_RECORD_PIXEL_WIDTH_PROPERTY, vala_image_record_properties[VALA_IMAGE_RECORD_PIXEL_WIDTH_PROPERTY] = g_param_spec_int ("pixel-width", "pixel-width", "pixel-width", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
+	g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_IMAGE_RECORD_RATING_PROPERTY, vala_image_record_properties[VALA_IMAGE_RECORD_RATING_PROPERTY] = g_param_spec_int ("rating", "rating", "rating", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
+	g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_IMAGE_RECORD_CREATION_DATE_PROPERTY, vala_image_record_properties[VALA_IMAGE_RECORD_CREATION_DATE_PROPERTY] = g_param_spec_int ("creation-date", "creation-date", "creation-date", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
+}
+
+static void
+vala_image_record_dmap_record_interface_init (DmapRecordInterface * iface,
+                                              gpointer iface_data)
+{
+	vala_image_record_dmap_record_parent_iface = g_type_interface_peek_parent (iface);
+	iface->set_from_blob = (gboolean (*) (DmapRecord*, GArray*)) vala_image_record_real_set_from_blob;
+	iface->to_blob = (GArray* (*) (DmapRecord*)) vala_image_record_real_to_blob;
+}
+
+static void
+vala_image_record_dmap_image_record_interface_init (DmapImageRecordInterface * iface,
+                                                    gpointer iface_data)
+{
+	vala_image_record_dmap_image_record_parent_iface = g_type_interface_peek_parent (iface);
+	iface->read = (GInputStream* (*) (DmapImageRecord*, GError**)) vala_image_record_real_read;
+}
+
+static void
+vala_image_record_instance_init (ValaImageRecord * self,
+                                 gpointer klass)
+{
+	self->priv = vala_image_record_get_instance_private (self);
+}
+
+static void
+vala_image_record_finalize (GObject * obj)
+{
+	ValaImageRecord * self;
+	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_VALA_IMAGE_RECORD, ValaImageRecord);
+	_g_free0 (self->priv->_location);
+	_g_free0 (self->priv->_filename);
+	_g_free0 (self->priv->_aspect_ratio);
+	_g_free0 (self->priv->_format);
+	_g_free0 (self->priv->_comments);
+	_g_array_unref0 (self->priv->_thumbnail);
+	G_OBJECT_CLASS (vala_image_record_parent_class)->finalize (obj);
+}
+
+static GType
+vala_image_record_get_type_once (void)
+{
+	static const GTypeInfo g_define_type_info = { sizeof (ValaImageRecordClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_image_record_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaImageRecord), 0, (GInstanceInitFunc) vala_image_record_instance_init, NULL };
+	static const GInterfaceInfo dmap_record_info = { (GInterfaceInitFunc) vala_image_record_dmap_record_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
+	static const GInterfaceInfo dmap_image_record_info = { (GInterfaceInitFunc) vala_image_record_dmap_image_record_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
+	GType vala_image_record_type_id;
+	vala_image_record_type_id = g_type_register_static (G_TYPE_OBJECT, "ValaImageRecord", &g_define_type_info, 0);
+	g_type_add_interface_static (vala_image_record_type_id, DMAP_TYPE_RECORD, &dmap_record_info);
+	g_type_add_interface_static (vala_image_record_type_id, DMAP_TYPE_IMAGE_RECORD, &dmap_image_record_info);
+	ValaImageRecord_private_offset = g_type_add_instance_private (vala_image_record_type_id, sizeof (ValaImageRecordPrivate));
+	return vala_image_record_type_id;
+}
+
+GType
+vala_image_record_get_type (void)
+{
+	static volatile gsize vala_image_record_type_id__once = 0;
+	if (g_once_init_enter (&vala_image_record_type_id__once)) {
+		GType vala_image_record_type_id;
+		vala_image_record_type_id = vala_image_record_get_type_once ();
+		g_once_init_leave (&vala_image_record_type_id__once, vala_image_record_type_id);
+	}
+	return vala_image_record_type_id__once;
+}
+
+static void
+_vala_vala_image_record_get_property (GObject * object,
+                                      guint property_id,
+                                      GValue * value,
+                                      GParamSpec * pspec)
+{
+	ValaImageRecord * self;
+	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_VALA_IMAGE_RECORD, ValaImageRecord);
+	switch (property_id) {
+		case VALA_IMAGE_RECORD_LOCATION_PROPERTY:
+		g_value_set_string (value, vala_image_record_get_location (self));
+		break;
+		case VALA_IMAGE_RECORD_FILENAME_PROPERTY:
+		g_value_set_string (value, vala_image_record_get_filename (self));
+		break;
+		case VALA_IMAGE_RECORD_ASPECT_RATIO_PROPERTY:
+		g_value_set_string (value, vala_image_record_get_aspect_ratio (self));
+		break;
+		case VALA_IMAGE_RECORD_FORMAT_PROPERTY:
+		g_value_set_string (value, vala_image_record_get_format (self));
+		break;
+		case VALA_IMAGE_RECORD_THUMBNAIL_PROPERTY:
+		g_value_set_boxed (value, vala_image_record_get_thumbnail (self));
+		break;
+		case VALA_IMAGE_RECORD_COMMENTS_PROPERTY:
+		g_value_set_string (value, vala_image_record_get_comments (self));
+		break;
+		case VALA_IMAGE_RECORD_LARGE_FILESIZE_PROPERTY:
+		g_value_set_int (value, vala_image_record_get_large_filesize (self));
+		break;
+		case VALA_IMAGE_RECORD_PIXEL_HEIGHT_PROPERTY:
+		g_value_set_int (value, vala_image_record_get_pixel_height (self));
+		break;
+		case VALA_IMAGE_RECORD_PIXEL_WIDTH_PROPERTY:
+		g_value_set_int (value, vala_image_record_get_pixel_width (self));
+		break;
+		case VALA_IMAGE_RECORD_RATING_PROPERTY:
+		g_value_set_int (value, vala_image_record_get_rating (self));
+		break;
+		case VALA_IMAGE_RECORD_CREATION_DATE_PROPERTY:
+		g_value_set_int (value, vala_image_record_get_creation_date (self));
+		break;
+		default:
+		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+		break;
+	}
+}
+
+static void
+_vala_vala_image_record_set_property (GObject * object,
+                                      guint property_id,
+                                      const GValue * value,
+                                      GParamSpec * pspec)
+{
+	ValaImageRecord * self;
+	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_VALA_IMAGE_RECORD, ValaImageRecord);
+	switch (property_id) {
+		case VALA_IMAGE_RECORD_LOCATION_PROPERTY:
+		vala_image_record_set_location (self, g_value_get_string (value));
+		break;
+		case VALA_IMAGE_RECORD_FILENAME_PROPERTY:
+		vala_image_record_set_filename (self, g_value_get_string (value));
+		break;
+		case VALA_IMAGE_RECORD_ASPECT_RATIO_PROPERTY:
+		vala_image_record_set_aspect_ratio (self, g_value_get_string (value));
+		break;
+		case VALA_IMAGE_RECORD_FORMAT_PROPERTY:
+		vala_image_record_set_format (self, g_value_get_string (value));
+		break;
+		case VALA_IMAGE_RECORD_THUMBNAIL_PROPERTY:
+		vala_image_record_set_thumbnail (self, g_value_get_boxed (value));
+		break;
+		case VALA_IMAGE_RECORD_COMMENTS_PROPERTY:
+		vala_image_record_set_comments (self, g_value_get_string (value));
+		break;
+		case VALA_IMAGE_RECORD_LARGE_FILESIZE_PROPERTY:
+		vala_image_record_set_large_filesize (self, g_value_get_int (value));
+		break;
+		case VALA_IMAGE_RECORD_PIXEL_HEIGHT_PROPERTY:
+		vala_image_record_set_pixel_height (self, g_value_get_int (value));
+		break;
+		case VALA_IMAGE_RECORD_PIXEL_WIDTH_PROPERTY:
+		vala_image_record_set_pixel_width (self, g_value_get_int (value));
+		break;
+		case VALA_IMAGE_RECORD_RATING_PROPERTY:
+		vala_image_record_set_rating (self, g_value_get_int (value));
+		break;
+		case VALA_IMAGE_RECORD_CREATION_DATE_PROPERTY:
+		vala_image_record_set_creation_date (self, g_value_get_int (value));
+		break;
+		default:
+		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+		break;
+	}
+}
+
+static DmapRecord*
+vala_image_record_factory_real_create (DmapRecordFactory* base,
+                                       void* user_data,
+                                       GError** error)
+{
+	ValaImageRecordFactory * self;
+	ValaImageRecord* _tmp0_;
+	DmapRecord* result;
+	self = (ValaImageRecordFactory*) base;
+	_tmp0_ = vala_image_record_new ();
+	result = (DmapRecord*) _tmp0_;
+	return result;
+}
+
+ValaImageRecordFactory*
+vala_image_record_factory_construct (GType object_type)
+{
+	ValaImageRecordFactory * self = NULL;
+	self = (ValaImageRecordFactory*) g_object_new (object_type, NULL);
+	return self;
+}
+
+ValaImageRecordFactory*
+vala_image_record_factory_new (void)
+{
+	return vala_image_record_factory_construct (TYPE_VALA_IMAGE_RECORD_FACTORY);
+}
+
+static void
+vala_image_record_factory_class_init (ValaImageRecordFactoryClass * klass,
+                                      gpointer klass_data)
+{
+	vala_image_record_factory_parent_class = g_type_class_peek_parent (klass);
+}
+
+static void
+vala_image_record_factory_dmap_record_factory_interface_init (DmapRecordFactoryInterface * iface,
+                                                              gpointer iface_data)
+{
+	vala_image_record_factory_dmap_record_factory_parent_iface = g_type_interface_peek_parent (iface);
+	iface->create = (DmapRecord* (*) (DmapRecordFactory*, void*, GError**)) vala_image_record_factory_real_create;
+}
+
+static void
+vala_image_record_factory_instance_init (ValaImageRecordFactory * self,
+                                         gpointer klass)
+{
+}
+
+static GType
+vala_image_record_factory_get_type_once (void)
+{
+	static const GTypeInfo g_define_type_info = { sizeof (ValaImageRecordFactoryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_image_record_factory_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaImageRecordFactory), 0, (GInstanceInitFunc) vala_image_record_factory_instance_init, NULL };
+	static const GInterfaceInfo dmap_record_factory_info = { (GInterfaceInitFunc) vala_image_record_factory_dmap_record_factory_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
+	GType vala_image_record_factory_type_id;
+	vala_image_record_factory_type_id = g_type_register_static (G_TYPE_OBJECT, "ValaImageRecordFactory", &g_define_type_info, 0);
+	g_type_add_interface_static (vala_image_record_factory_type_id, DMAP_TYPE_RECORD_FACTORY, &dmap_record_factory_info);
+	return vala_image_record_factory_type_id;
+}
+
+GType
+vala_image_record_factory_get_type (void)
+{
+	static volatile gsize vala_image_record_factory_type_id__once = 0;
+	if (g_once_init_enter (&vala_image_record_factory_type_id__once)) {
+		GType vala_image_record_factory_type_id;
+		vala_image_record_factory_type_id = vala_image_record_factory_get_type_once ();
+		g_once_init_leave (&vala_image_record_factory_type_id__once, vala_image_record_factory_type_id);
+	}
+	return vala_image_record_factory_type_id__once;
+}
+
diff --git a/tests/vala-dpap-record.vala b/tests/vala-image-record.vala
similarity index 79%
rename from tests/vala-dpap-record.vala
rename to tests/vala-image-record.vala
index dd76c43..cde5353 100644
--- a/tests/vala-dpap-record.vala
+++ b/tests/vala-image-record.vala
@@ -1,4 +1,4 @@
-/*   FILE: vala-dpap-record.vala -- A DPAPRecord implementation in Vala
+/*   FILE: vala-dmap-image-record.vala -- A DMAP.ImageRecord implementation in Vala
  * AUTHOR: W. Michael Petullo <mike@flyn.org>
  *   DATE: 21 December 2010
  *
@@ -20,13 +20,13 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-private class ValaDPAPRecord : GLib.Object, DMAP.Record, DPAP.Record {
+private class ValaImageRecord : GLib.Object, Dmap.Record, Dmap.ImageRecord {
 	private string _location;
 	private string _filename;
 	private string _aspect_ratio;
 	private string _format;
 	private string _comments;
-	GLib.ByteArray _thumbnail;
+	GLib.Array _thumbnail;
 	private int _large_filesize;
 	private int _pixel_height;
 	private int _pixel_width;
@@ -53,11 +53,11 @@ private class ValaDPAPRecord : GLib.Object, DMAP.Record, DPAP.Record {
 		set { _format = value; }
 	}
 
-	public GLib.ByteArray thumbnail {
+	public GLib.Array thumbnail {
 		get { return _thumbnail; }
-		set { /* C implementations just use g_byte_array_ref (value); */
-			_thumbnail = new GLib.ByteArray ();
-			_thumbnail.append (value.data);
+		set {
+			_thumbnail = new GLib.Array<uint8> (false, false, 1);
+			_thumbnail.append_vals (value.data, value.data.length);
 		}
 	}
 
@@ -95,15 +95,15 @@ private class ValaDPAPRecord : GLib.Object, DMAP.Record, DPAP.Record {
 		GLib.error ("read not implemented");
 	}
 
-	public unowned bool set_from_blob (GLib.ByteArray blob) {
+	public unowned bool set_from_blob (GLib.Array blob) {
 		GLib.error ("set_from_blob not implemented");
 	}
 
-	public unowned GLib.ByteArray to_blob () {
+	public unowned GLib.Array to_blob () {
 		GLib.error ("to_blob not implemented");
 	}
 
-	public ValaDPAPRecord () {
+	public ValaImageRecord () {
 		_location = "file://" + GLib.Environment.get_current_dir () + "/media/test.jpeg";
 		_aspect_ratio = "1.333";
 		_filename = GLib.Path.get_basename (_location);
@@ -118,13 +118,13 @@ private class ValaDPAPRecord : GLib.Object, DMAP.Record, DPAP.Record {
 		string path = GLib.Environment.get_current_dir () + "/media/test.jpeg";
 		uint8[] data;
 		GLib.FileUtils.get_data (path, out data);
-		_thumbnail = new GLib.ByteArray ();
-		_thumbnail.append (data);
+		_thumbnail = new GLib.Array<uint8> (false, false, 1);
+		_thumbnail.append_vals (data, data.length);
 	}
 }
 
-private class ValaDPAPRecordFactory : GLib.Object, DMAP.RecordFactory {
-	public DMAP.Record create (void* user_data) {
-		return new ValaDPAPRecord ();
+private class ValaImageRecordFactory : GLib.Object, Dmap.RecordFactory {
+	public Dmap.Record create (void* user_data) {
+		return new ValaImageRecord ();
 	}
 }
diff --git a/vala/Makefile.am b/vala/Makefile.am
index d8551ce..f38a4be 100644
--- a/vala/Makefile.am
+++ b/vala/Makefile.am
@@ -1,53 +1,11 @@
 if BUILD_VAPI
-libdmapsharing-@API_VERSION@-daap/libdmapsharing-@API_VERSION@.gi: libdmapsharing-@API_VERSION@-daap/libdmapsharing-@API_VERSION@-uninstalled.files libdmapsharing-@API_VERSION@-daap/libdmapsharing-@API_VERSION@-uninstalled.namespace
-	PKG_CONFIG_PATH=$(top_builddir):${PKG_CONFIG_PATH} $(VALA_GEN_INTROSPECT) libdmapsharing-@API_VERSION@-uninstalled libdmapsharing-@API_VERSION@-daap
-	@mv libdmapsharing-@API_VERSION@-daap/libdmapsharing-@API_VERSION@-uninstalled.gi libdmapsharing-@API_VERSION@-daap/libdmapsharing-@API_VERSION@.gi
+libdmapsharing-@API_VERSION@.gi: libdmapsharing-@API_VERSION@-uninstalled.files libdmapsharing-@API_VERSION@-uninstalled.namespace
+	PKG_CONFIG_PATH=$(top_builddir):${PKG_CONFIG_PATH} $(VALA_GEN_INTROSPECT) libdmapsharing-@API_VERSION@-uninstalled .
+	@mv libdmapsharing-@API_VERSION@-uninstalled.gi libdmapsharing-@API_VERSION@.gi
 
-libdmapsharing-@API_VERSION@-dacp/libdmapsharing-@API_VERSION@.gi: libdmapsharing-@API_VERSION@-dacp/libdmapsharing-@API_VERSION@-uninstalled.files libdmapsharing-@API_VERSION@-dacp/libdmapsharing-@API_VERSION@-uninstalled.namespace
-	PKG_CONFIG_PATH=$(top_builddir):${PKG_CONFIG_PATH} $(VALA_GEN_INTROSPECT) libdmapsharing-@API_VERSION@-uninstalled libdmapsharing-@API_VERSION@-dacp
-	@mv libdmapsharing-@API_VERSION@-dacp/libdmapsharing-@API_VERSION@-uninstalled.gi libdmapsharing-@API_VERSION@-dacp/libdmapsharing-@API_VERSION@.gi
+libdmapsharing-@API_VERSION@.vapi: libdmapsharing-@API_VERSION@.gi libdmapsharing-@API_VERSION@.metadata
+	$(VAPIGEN) --pkg=avahi-gobject --pkg=libsoup-3.0 --pkg=glib-2.0 --pkg=gio-2.0 --pkg=gstreamer-1.0 --library libdmapsharing-@API_VERSION@ libdmapsharing-@API_VERSION@.gi
 
-libdmapsharing-@API_VERSION@-dmap/libdmapsharing-@API_VERSION@.gi: libdmapsharing-@API_VERSION@-dmap/libdmapsharing-@API_VERSION@-uninstalled.files libdmapsharing-@API_VERSION@-dmap/libdmapsharing-@API_VERSION@-uninstalled.namespace
-	PKG_CONFIG_PATH=$(top_builddir):${PKG_CONFIG_PATH} $(VALA_GEN_INTROSPECT) libdmapsharing-@API_VERSION@-uninstalled libdmapsharing-@API_VERSION@-dmap
-	@mv libdmapsharing-@API_VERSION@-dmap/libdmapsharing-@API_VERSION@-uninstalled.gi libdmapsharing-@API_VERSION@-dmap/libdmapsharing-@API_VERSION@.gi
-
-libdmapsharing-@API_VERSION@-dpap/libdmapsharing-@API_VERSION@.gi: libdmapsharing-@API_VERSION@-dpap/libdmapsharing-@API_VERSION@-uninstalled.files libdmapsharing-@API_VERSION@-dpap/libdmapsharing-@API_VERSION@-uninstalled.namespace
-	PKG_CONFIG_PATH=$(top_builddir):${PKG_CONFIG_PATH} $(VALA_GEN_INTROSPECT) libdmapsharing-@API_VERSION@-uninstalled libdmapsharing-@API_VERSION@-dpap
-	@mv libdmapsharing-@API_VERSION@-dpap/libdmapsharing-@API_VERSION@-uninstalled.gi libdmapsharing-@API_VERSION@-dpap/libdmapsharing-@API_VERSION@.gi
-
-libdmapsharing-@API_VERSION@-daap.vapi: libdmapsharing-@API_VERSION@-daap/libdmapsharing-@API_VERSION@.gi libdmapsharing-@API_VERSION@-daap/libdmapsharing-@API_VERSION@.metadata
-	$(VAPIGEN) --pkg=avahi-gobject --pkg=libsoup-2.4 --pkg=glib-2.0 --pkg=gio-2.0 --pkg=gstreamer-1.0 --library libdmapsharing-@API_VERSION@-daap libdmapsharing-@API_VERSION@-daap/libdmapsharing-@API_VERSION@.gi
-
-libdmapsharing-@API_VERSION@-dacp.vapi: libdmapsharing-@API_VERSION@-dacp/libdmapsharing-@API_VERSION@.gi libdmapsharing-@API_VERSION@-dacp/libdmapsharing-@API_VERSION@.metadata
-	$(VAPIGEN) --pkg=avahi-gobject --pkg=libsoup-2.4 --pkg=glib-2.0 --pkg=gio-2.0 --pkg=gstreamer-1.0 --library libdmapsharing-@API_VERSION@-dacp libdmapsharing-@API_VERSION@-dacp/libdmapsharing-@API_VERSION@.gi
-
-libdmapsharing-@API_VERSION@-dmap.vapi: libdmapsharing-@API_VERSION@-dmap/libdmapsharing-@API_VERSION@.gi libdmapsharing-@API_VERSION@-dmap/libdmapsharing-@API_VERSION@.metadata
-	$(VAPIGEN) --pkg=avahi-gobject --pkg=libsoup-2.4 --pkg=glib-2.0 --pkg=gio-2.0 --pkg=gstreamer-1.0 --library libdmapsharing-@API_VERSION@-dmap libdmapsharing-@API_VERSION@-dmap/libdmapsharing-@API_VERSION@.gi
-
-libdmapsharing-@API_VERSION@-dpap.vapi: libdmapsharing-@API_VERSION@-dpap/libdmapsharing-@API_VERSION@.gi libdmapsharing-@API_VERSION@-dpap/libdmapsharing-@API_VERSION@.metadata
-	$(VAPIGEN) --pkg=avahi-gobject --pkg=libsoup-2.4 --pkg=glib-2.0 --pkg=gio-2.0 --pkg=gstreamer-1.0 --library libdmapsharing-@API_VERSION@-dpap libdmapsharing-@API_VERSION@-dpap/libdmapsharing-@API_VERSION@.gi
-
-# NOTE: Sed is used to fix a problem I don't know how to handle in
-# vapigen. I have several namespaces (DMAP, DAAP, ...) in libdmapsharing. In
-# order to support this, I generate four Vala API files and then concatenate
-# them. But, each has its own definition of DMAP.Db, DAAP.DMAPDb, etc. The
-# use of sed fixes this:
-libdmapsharing-@API_VERSION@.vapi: libdmapsharing-@API_VERSION@-daap.vapi libdmapsharing-@API_VERSION@-dacp.vapi libdmapsharing-@API_VERSION@-dmap.vapi libdmapsharing-@API_VERSION@-dpap.vapi
-	cat libdmapsharing-@API_VERSION@-daap.vapi libdmapsharing-@API_VERSION@-dacp.vapi libdmapsharing-@API_VERSION@-dmap.vapi libdmapsharing-@API_VERSION@-dpap.vapi > libdmapsharing-@API_VERSION@.vapi
-	cat libdmapsharing-@API_VERSION@.vapi | \
-		sed 's/DAAP\.DMAPDb/DMAP.Db/g' | \
-		sed 's/DPAP\.DMAPDb/DMAP.Db/g' | \
-		sed 's/DACP\.DMAPDb/DMAP.Db/g' | \
-		sed 's/DAAP\.DMAPContainerDb/DMAP.ContainerDb/g' | \
-		sed 's/DPAP\.DMAPContainerDb/DMAP.ContainerDb/g' | \
-		sed 's/DACP\.DMAPContainerDb/DMAP.ContainerDb/g' | \
-		sed 's/DAAP\.DMAPRecordFactory/DMAP.RecordFactory/g' | \
-		sed 's/DPAP\.DMAPRecordFactory/DMAP.RecordFactory/g' | \
-		sed 's/DACP\.DAAPRecord/DAAP.Record/g' | \
-		cat > libdmapsharing-@API_VERSION@.vapi.tmp
-	mv libdmapsharing-@API_VERSION@.vapi.tmp libdmapsharing-@API_VERSION@.vapi
-	rm -f libdmapsharing-@API_VERSION@-daap.vapi libdmapsharing-@API_VERSION@-dacp.vapi libdmapsharing-@API_VERSION@-dmap.vapi libdmapsharing-@API_VERSION@-dpap.vapi
-	
 all: libdmapsharing-@API_VERSION@.vapi
 
 vapidir = $(datadir)/vala/vapi
@@ -57,38 +15,17 @@ dist_vapi_DATA = \
 
 EXTRA_DIST = \
 	libdmapsharing-@API_VERSION@.vapi \
-	libdmapsharing-@API_VERSION@-daap/libdmapsharing-@API_VERSION@-uninstalled.excludes \
-	libdmapsharing-@API_VERSION@-daap/libdmapsharing-@API_VERSION@-uninstalled.files \
-	libdmapsharing-@API_VERSION@-daap/libdmapsharing-@API_VERSION@.metadata \
-	libdmapsharing-@API_VERSION@-daap/libdmapsharing-@API_VERSION@-uninstalled.namespace \
-	libdmapsharing-@API_VERSION@-dacp/libdmapsharing-@API_VERSION@-uninstalled.excludes \
-	libdmapsharing-@API_VERSION@-dacp/libdmapsharing-@API_VERSION@-uninstalled.files \
-	libdmapsharing-@API_VERSION@-dacp/libdmapsharing-@API_VERSION@.metadata \
-	libdmapsharing-@API_VERSION@-dacp/libdmapsharing-@API_VERSION@-uninstalled.namespace \
-	libdmapsharing-@API_VERSION@-dmap/libdmapsharing-@API_VERSION@-uninstalled.excludes \
-	libdmapsharing-@API_VERSION@-dmap/libdmapsharing-@API_VERSION@-uninstalled.files \
-	libdmapsharing-@API_VERSION@-dmap/libdmapsharing-@API_VERSION@.metadata \
-	libdmapsharing-@API_VERSION@-dmap/libdmapsharing-@API_VERSION@-uninstalled.namespace \
-	libdmapsharing-@API_VERSION@-dpap/libdmapsharing-@API_VERSION@-uninstalled.excludes \
-	libdmapsharing-@API_VERSION@-dpap/libdmapsharing-@API_VERSION@-uninstalled.files \
-	libdmapsharing-@API_VERSION@-dpap/libdmapsharing-@API_VERSION@.metadata \
-	libdmapsharing-@API_VERSION@-dpap/libdmapsharing-@API_VERSION@-uninstalled.namespace
+	libdmapsharing-@API_VERSION@-uninstalled.excludes \
+	libdmapsharing-@API_VERSION@-uninstalled.files \
+	libdmapsharing-@API_VERSION@.metadata \
+	libdmapsharing-@API_VERSION@-uninstalled.namespace
 
 CLEANFILES = \
-	libdmapsharing-@API_VERSION@-daap/libdmapsharing-@API_VERSION@.gi \
-	libdmapsharing-@API_VERSION@-dacp/libdmapsharing-@API_VERSION@.gi \
-	libdmapsharing-@API_VERSION@-dmap/libdmapsharing-@API_VERSION@.gi \
-	libdmapsharing-@API_VERSION@-dpap/libdmapsharing-@API_VERSION@.gi \
-	libdmapsharing-@API_VERSION@-daap.vapi \
-	libdmapsharing-@API_VERSION@-dacp.vapi \
-	libdmapsharing-@API_VERSION@-dmap.vapi \
-	libdmapsharing-@API_VERSION@-dpap.vapi
+	libdmapsharing-@API_VERSION@.gi \
+	libdmapsharing-@API_VERSION@.vapi
 
 DISTCLEANFILES = \
-	libdmapsharing-@API_VERSION@-daap/libdmapsharing-@API_VERSION@-uninstalled.files \
-	libdmapsharing-@API_VERSION@-dacp/libdmapsharing-@API_VERSION@-uninstalled.files \
-	libdmapsharing-@API_VERSION@-dmap/libdmapsharing-@API_VERSION@-uninstalled.files \
-	libdmapsharing-@API_VERSION@-dpap/libdmapsharing-@API_VERSION@-uninstalled.files
+	libdmapsharing-@API_VERSION@-uninstalled.files
 
 CLEANFILES += \
 	libdmapsharing-@API_VERSION@.vapi
diff --git a/vala/Makefile.in b/vala/Makefile.in
index c38c3a2..674e61f 100644
--- a/vala/Makefile.in
+++ b/vala/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -101,7 +101,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(am__dist_vapi_DATA_DIST) \
 	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_FILES = libdmapsharing-${API_VERSION}-uninstalled.files
 CONFIG_CLEAN_VPATH_FILES =
 AM_V_P = $(am__v_P_@AM_V@)
 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
@@ -153,7 +153,8 @@ am__uninstall_files_from_dir = { \
 am__installdirs = "$(DESTDIR)$(vapidir)"
 DATA = $(dist_vapi_DATA)
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
-am__DIST_COMMON = $(srcdir)/Makefile.in
+am__DIST_COMMON = $(srcdir)/Makefile.in \
+	$(srcdir)/libdmapsharing-${API_VERSION}-uninstalled.files.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -173,6 +174,8 @@ CHECK_CFLAGS = @CHECK_CFLAGS@
 CHECK_LIBS = @CHECK_LIBS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
@@ -184,8 +187,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@
 GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@
 GEE_CFLAGS = @GEE_CFLAGS@
@@ -312,6 +317,7 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -326,37 +332,16 @@ top_srcdir = @top_srcdir@
 
 @BUILD_VAPI_TRUE@EXTRA_DIST = \
 @BUILD_VAPI_TRUE@	libdmapsharing-@API_VERSION@.vapi \
-@BUILD_VAPI_TRUE@	libdmapsharing-@API_VERSION@-daap/libdmapsharing-@API_VERSION@-uninstalled.excludes \
-@BUILD_VAPI_TRUE@	libdmapsharing-@API_VERSION@-daap/libdmapsharing-@API_VERSION@-uninstalled.files \
-@BUILD_VAPI_TRUE@	libdmapsharing-@API_VERSION@-daap/libdmapsharing-@API_VERSION@.metadata \
-@BUILD_VAPI_TRUE@	libdmapsharing-@API_VERSION@-daap/libdmapsharing-@API_VERSION@-uninstalled.namespace \
-@BUILD_VAPI_TRUE@	libdmapsharing-@API_VERSION@-dacp/libdmapsharing-@API_VERSION@-uninstalled.excludes \
-@BUILD_VAPI_TRUE@	libdmapsharing-@API_VERSION@-dacp/libdmapsharing-@API_VERSION@-uninstalled.files \
-@BUILD_VAPI_TRUE@	libdmapsharing-@API_VERSION@-dacp/libdmapsharing-@API_VERSION@.metadata \
-@BUILD_VAPI_TRUE@	libdmapsharing-@API_VERSION@-dacp/libdmapsharing-@API_VERSION@-uninstalled.namespace \
-@BUILD_VAPI_TRUE@	libdmapsharing-@API_VERSION@-dmap/libdmapsharing-@API_VERSION@-uninstalled.excludes \
-@BUILD_VAPI_TRUE@	libdmapsharing-@API_VERSION@-dmap/libdmapsharing-@API_VERSION@-uninstalled.files \
-@BUILD_VAPI_TRUE@	libdmapsharing-@API_VERSION@-dmap/libdmapsharing-@API_VERSION@.metadata \
-@BUILD_VAPI_TRUE@	libdmapsharing-@API_VERSION@-dmap/libdmapsharing-@API_VERSION@-uninstalled.namespace \
-@BUILD_VAPI_TRUE@	libdmapsharing-@API_VERSION@-dpap/libdmapsharing-@API_VERSION@-uninstalled.excludes \
-@BUILD_VAPI_TRUE@	libdmapsharing-@API_VERSION@-dpap/libdmapsharing-@API_VERSION@-uninstalled.files \
-@BUILD_VAPI_TRUE@	libdmapsharing-@API_VERSION@-dpap/libdmapsharing-@API_VERSION@.metadata \
-@BUILD_VAPI_TRUE@	libdmapsharing-@API_VERSION@-dpap/libdmapsharing-@API_VERSION@-uninstalled.namespace
-
-@BUILD_VAPI_TRUE@CLEANFILES = libdmapsharing-@API_VERSION@-daap/libdmapsharing-@API_VERSION@.gi \
-@BUILD_VAPI_TRUE@	libdmapsharing-@API_VERSION@-dacp/libdmapsharing-@API_VERSION@.gi \
-@BUILD_VAPI_TRUE@	libdmapsharing-@API_VERSION@-dmap/libdmapsharing-@API_VERSION@.gi \
-@BUILD_VAPI_TRUE@	libdmapsharing-@API_VERSION@-dpap/libdmapsharing-@API_VERSION@.gi \
-@BUILD_VAPI_TRUE@	libdmapsharing-@API_VERSION@-daap.vapi \
-@BUILD_VAPI_TRUE@	libdmapsharing-@API_VERSION@-dacp.vapi \
-@BUILD_VAPI_TRUE@	libdmapsharing-@API_VERSION@-dmap.vapi \
-@BUILD_VAPI_TRUE@	libdmapsharing-@API_VERSION@-dpap.vapi \
+@BUILD_VAPI_TRUE@	libdmapsharing-@API_VERSION@-uninstalled.excludes \
+@BUILD_VAPI_TRUE@	libdmapsharing-@API_VERSION@-uninstalled.files \
+@BUILD_VAPI_TRUE@	libdmapsharing-@API_VERSION@.metadata \
+@BUILD_VAPI_TRUE@	libdmapsharing-@API_VERSION@-uninstalled.namespace
+
+@BUILD_VAPI_TRUE@CLEANFILES = libdmapsharing-@API_VERSION@.gi \
+@BUILD_VAPI_TRUE@	libdmapsharing-@API_VERSION@.vapi \
 @BUILD_VAPI_TRUE@	libdmapsharing-@API_VERSION@.vapi
 @BUILD_VAPI_TRUE@DISTCLEANFILES = \
-@BUILD_VAPI_TRUE@	libdmapsharing-@API_VERSION@-daap/libdmapsharing-@API_VERSION@-uninstalled.files \
-@BUILD_VAPI_TRUE@	libdmapsharing-@API_VERSION@-dacp/libdmapsharing-@API_VERSION@-uninstalled.files \
-@BUILD_VAPI_TRUE@	libdmapsharing-@API_VERSION@-dmap/libdmapsharing-@API_VERSION@-uninstalled.files \
-@BUILD_VAPI_TRUE@	libdmapsharing-@API_VERSION@-dpap/libdmapsharing-@API_VERSION@-uninstalled.files
+@BUILD_VAPI_TRUE@	libdmapsharing-@API_VERSION@-uninstalled.files
 
 all: all-am
 
@@ -390,6 +375,8 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(am__aclocal_m4_deps):
+libdmapsharing-${API_VERSION}-uninstalled.files: $(top_builddir)/config.status $(srcdir)/libdmapsharing-${API_VERSION}-uninstalled.files.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 
 mostlyclean-libtool:
 	-rm -f *.lo
@@ -423,7 +410,6 @@ ctags CTAGS:
 
 cscope cscopelist:
 
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
@@ -579,54 +565,12 @@ uninstall-am: uninstall-dist_vapiDATA
 
 .PRECIOUS: Makefile
 
-@BUILD_VAPI_TRUE@libdmapsharing-@API_VERSION@-daap/libdmapsharing-@API_VERSION@.gi: libdmapsharing-@API_VERSION@-daap/libdmapsharing-@API_VERSION@-uninstalled.files libdmapsharing-@API_VERSION@-daap/libdmapsharing-@API_VERSION@-uninstalled.namespace
-@BUILD_VAPI_TRUE@	PKG_CONFIG_PATH=$(top_builddir):${PKG_CONFIG_PATH} $(VALA_GEN_INTROSPECT) libdmapsharing-@API_VERSION@-uninstalled libdmapsharing-@API_VERSION@-daap
-@BUILD_VAPI_TRUE@	@mv libdmapsharing-@API_VERSION@-daap/libdmapsharing-@API_VERSION@-uninstalled.gi libdmapsharing-@API_VERSION@-daap/libdmapsharing-@API_VERSION@.gi
-
-@BUILD_VAPI_TRUE@libdmapsharing-@API_VERSION@-dacp/libdmapsharing-@API_VERSION@.gi: libdmapsharing-@API_VERSION@-dacp/libdmapsharing-@API_VERSION@-uninstalled.files libdmapsharing-@API_VERSION@-dacp/libdmapsharing-@API_VERSION@-uninstalled.namespace
-@BUILD_VAPI_TRUE@	PKG_CONFIG_PATH=$(top_builddir):${PKG_CONFIG_PATH} $(VALA_GEN_INTROSPECT) libdmapsharing-@API_VERSION@-uninstalled libdmapsharing-@API_VERSION@-dacp
-@BUILD_VAPI_TRUE@	@mv libdmapsharing-@API_VERSION@-dacp/libdmapsharing-@API_VERSION@-uninstalled.gi libdmapsharing-@API_VERSION@-dacp/libdmapsharing-@API_VERSION@.gi
-
-@BUILD_VAPI_TRUE@libdmapsharing-@API_VERSION@-dmap/libdmapsharing-@API_VERSION@.gi: libdmapsharing-@API_VERSION@-dmap/libdmapsharing-@API_VERSION@-uninstalled.files libdmapsharing-@API_VERSION@-dmap/libdmapsharing-@API_VERSION@-uninstalled.namespace
-@BUILD_VAPI_TRUE@	PKG_CONFIG_PATH=$(top_builddir):${PKG_CONFIG_PATH} $(VALA_GEN_INTROSPECT) libdmapsharing-@API_VERSION@-uninstalled libdmapsharing-@API_VERSION@-dmap
-@BUILD_VAPI_TRUE@	@mv libdmapsharing-@API_VERSION@-dmap/libdmapsharing-@API_VERSION@-uninstalled.gi libdmapsharing-@API_VERSION@-dmap/libdmapsharing-@API_VERSION@.gi
-
-@BUILD_VAPI_TRUE@libdmapsharing-@API_VERSION@-dpap/libdmapsharing-@API_VERSION@.gi: libdmapsharing-@API_VERSION@-dpap/libdmapsharing-@API_VERSION@-uninstalled.files libdmapsharing-@API_VERSION@-dpap/libdmapsharing-@API_VERSION@-uninstalled.namespace
-@BUILD_VAPI_TRUE@	PKG_CONFIG_PATH=$(top_builddir):${PKG_CONFIG_PATH} $(VALA_GEN_INTROSPECT) libdmapsharing-@API_VERSION@-uninstalled libdmapsharing-@API_VERSION@-dpap
-@BUILD_VAPI_TRUE@	@mv libdmapsharing-@API_VERSION@-dpap/libdmapsharing-@API_VERSION@-uninstalled.gi libdmapsharing-@API_VERSION@-dpap/libdmapsharing-@API_VERSION@.gi
-
-@BUILD_VAPI_TRUE@libdmapsharing-@API_VERSION@-daap.vapi: libdmapsharing-@API_VERSION@-daap/libdmapsharing-@API_VERSION@.gi libdmapsharing-@API_VERSION@-daap/libdmapsharing-@API_VERSION@.metadata
-@BUILD_VAPI_TRUE@	$(VAPIGEN) --pkg=avahi-gobject --pkg=libsoup-2.4 --pkg=glib-2.0 --pkg=gio-2.0 --pkg=gstreamer-1.0 --library libdmapsharing-@API_VERSION@-daap libdmapsharing-@API_VERSION@-daap/libdmapsharing-@API_VERSION@.gi
-
-@BUILD_VAPI_TRUE@libdmapsharing-@API_VERSION@-dacp.vapi: libdmapsharing-@API_VERSION@-dacp/libdmapsharing-@API_VERSION@.gi libdmapsharing-@API_VERSION@-dacp/libdmapsharing-@API_VERSION@.metadata
-@BUILD_VAPI_TRUE@	$(VAPIGEN) --pkg=avahi-gobject --pkg=libsoup-2.4 --pkg=glib-2.0 --pkg=gio-2.0 --pkg=gstreamer-1.0 --library libdmapsharing-@API_VERSION@-dacp libdmapsharing-@API_VERSION@-dacp/libdmapsharing-@API_VERSION@.gi
-
-@BUILD_VAPI_TRUE@libdmapsharing-@API_VERSION@-dmap.vapi: libdmapsharing-@API_VERSION@-dmap/libdmapsharing-@API_VERSION@.gi libdmapsharing-@API_VERSION@-dmap/libdmapsharing-@API_VERSION@.metadata
-@BUILD_VAPI_TRUE@	$(VAPIGEN) --pkg=avahi-gobject --pkg=libsoup-2.4 --pkg=glib-2.0 --pkg=gio-2.0 --pkg=gstreamer-1.0 --library libdmapsharing-@API_VERSION@-dmap libdmapsharing-@API_VERSION@-dmap/libdmapsharing-@API_VERSION@.gi
-
-@BUILD_VAPI_TRUE@libdmapsharing-@API_VERSION@-dpap.vapi: libdmapsharing-@API_VERSION@-dpap/libdmapsharing-@API_VERSION@.gi libdmapsharing-@API_VERSION@-dpap/libdmapsharing-@API_VERSION@.metadata
-@BUILD_VAPI_TRUE@	$(VAPIGEN) --pkg=avahi-gobject --pkg=libsoup-2.4 --pkg=glib-2.0 --pkg=gio-2.0 --pkg=gstreamer-1.0 --library libdmapsharing-@API_VERSION@-dpap libdmapsharing-@API_VERSION@-dpap/libdmapsharing-@API_VERSION@.gi
-
-# NOTE: Sed is used to fix a problem I don't know how to handle in
-# vapigen. I have several namespaces (DMAP, DAAP, ...) in libdmapsharing. In
-# order to support this, I generate four Vala API files and then concatenate
-# them. But, each has its own definition of DMAP.Db, DAAP.DMAPDb, etc. The
-# use of sed fixes this:
-@BUILD_VAPI_TRUE@libdmapsharing-@API_VERSION@.vapi: libdmapsharing-@API_VERSION@-daap.vapi libdmapsharing-@API_VERSION@-dacp.vapi libdmapsharing-@API_VERSION@-dmap.vapi libdmapsharing-@API_VERSION@-dpap.vapi
-@BUILD_VAPI_TRUE@	cat libdmapsharing-@API_VERSION@-daap.vapi libdmapsharing-@API_VERSION@-dacp.vapi libdmapsharing-@API_VERSION@-dmap.vapi libdmapsharing-@API_VERSION@-dpap.vapi > libdmapsharing-@API_VERSION@.vapi
-@BUILD_VAPI_TRUE@	cat libdmapsharing-@API_VERSION@.vapi | \
-@BUILD_VAPI_TRUE@		sed 's/DAAP\.DMAPDb/DMAP.Db/g' | \
-@BUILD_VAPI_TRUE@		sed 's/DPAP\.DMAPDb/DMAP.Db/g' | \
-@BUILD_VAPI_TRUE@		sed 's/DACP\.DMAPDb/DMAP.Db/g' | \
-@BUILD_VAPI_TRUE@		sed 's/DAAP\.DMAPContainerDb/DMAP.ContainerDb/g' | \
-@BUILD_VAPI_TRUE@		sed 's/DPAP\.DMAPContainerDb/DMAP.ContainerDb/g' | \
-@BUILD_VAPI_TRUE@		sed 's/DACP\.DMAPContainerDb/DMAP.ContainerDb/g' | \
-@BUILD_VAPI_TRUE@		sed 's/DAAP\.DMAPRecordFactory/DMAP.RecordFactory/g' | \
-@BUILD_VAPI_TRUE@		sed 's/DPAP\.DMAPRecordFactory/DMAP.RecordFactory/g' | \
-@BUILD_VAPI_TRUE@		sed 's/DACP\.DAAPRecord/DAAP.Record/g' | \
-@BUILD_VAPI_TRUE@		cat > libdmapsharing-@API_VERSION@.vapi.tmp
-@BUILD_VAPI_TRUE@	mv libdmapsharing-@API_VERSION@.vapi.tmp libdmapsharing-@API_VERSION@.vapi
-@BUILD_VAPI_TRUE@	rm -f libdmapsharing-@API_VERSION@-daap.vapi libdmapsharing-@API_VERSION@-dacp.vapi libdmapsharing-@API_VERSION@-dmap.vapi libdmapsharing-@API_VERSION@-dpap.vapi
+@BUILD_VAPI_TRUE@libdmapsharing-@API_VERSION@.gi: libdmapsharing-@API_VERSION@-uninstalled.files libdmapsharing-@API_VERSION@-uninstalled.namespace
+@BUILD_VAPI_TRUE@	PKG_CONFIG_PATH=$(top_builddir):${PKG_CONFIG_PATH} $(VALA_GEN_INTROSPECT) libdmapsharing-@API_VERSION@-uninstalled .
+@BUILD_VAPI_TRUE@	@mv libdmapsharing-@API_VERSION@-uninstalled.gi libdmapsharing-@API_VERSION@.gi
+
+@BUILD_VAPI_TRUE@libdmapsharing-@API_VERSION@.vapi: libdmapsharing-@API_VERSION@.gi libdmapsharing-@API_VERSION@.metadata
+@BUILD_VAPI_TRUE@	$(VAPIGEN) --pkg=avahi-gobject --pkg=libsoup-3.0 --pkg=glib-2.0 --pkg=gio-2.0 --pkg=gstreamer-1.0 --library libdmapsharing-@API_VERSION@ libdmapsharing-@API_VERSION@.gi
 
 @BUILD_VAPI_TRUE@all: libdmapsharing-@API_VERSION@.vapi
 
diff --git a/vala/libdmapsharing-3.0-daap/libdmapsharing-3.0-uninstalled.excludes b/vala/libdmapsharing-3.0-daap/libdmapsharing-3.0-uninstalled.excludes
deleted file mode 100644
index 927815d..0000000
--- a/vala/libdmapsharing-3.0-daap/libdmapsharing-3.0-uninstalled.excludes
+++ /dev/null
@@ -1,5 +0,0 @@
-test-*
-dacp-*
-dpap-*
-dmap-gst-*
-gst-util.h
diff --git a/vala/libdmapsharing-3.0-daap/libdmapsharing-3.0-uninstalled.files b/vala/libdmapsharing-3.0-daap/libdmapsharing-3.0-uninstalled.files
deleted file mode 100644
index 8c20cef..0000000
--- a/vala/libdmapsharing-3.0-daap/libdmapsharing-3.0-uninstalled.files
+++ /dev/null
@@ -1,2 +0,0 @@
-./../libdmapsharing/
-./../libdmapsharing/.libs/libdmapsharing-3.0.so
diff --git a/vala/libdmapsharing-3.0-daap/libdmapsharing-3.0-uninstalled.files.in b/vala/libdmapsharing-3.0-daap/libdmapsharing-3.0-uninstalled.files.in
deleted file mode 100644
index eae3c60..0000000
--- a/vala/libdmapsharing-3.0-daap/libdmapsharing-3.0-uninstalled.files.in
+++ /dev/null
@@ -1,2 +0,0 @@
-@srcdir@/../libdmapsharing/
-@builddir@/../libdmapsharing/.libs/libdmapsharing-3.0.so
diff --git a/vala/libdmapsharing-3.0-daap/libdmapsharing-3.0-uninstalled.namespace b/vala/libdmapsharing-3.0-daap/libdmapsharing-3.0-uninstalled.namespace
deleted file mode 100644
index 854c866..0000000
--- a/vala/libdmapsharing-3.0-daap/libdmapsharing-3.0-uninstalled.namespace
+++ /dev/null
@@ -1 +0,0 @@
-DAAP
diff --git a/vala/libdmapsharing-3.0-daap/libdmapsharing-3.0.metadata b/vala/libdmapsharing-3.0-daap/libdmapsharing-3.0.metadata
deleted file mode 100644
index e11c8a3..0000000
--- a/vala/libdmapsharing-3.0-daap/libdmapsharing-3.0.metadata
+++ /dev/null
@@ -1,5 +0,0 @@
-DAAP cheader_filename="libdmapsharing/dmap.h"
-DACPPlayState common_prefix="DACP_PLAY_" rename_to="DACPPlayState"
-DACPRepeatState common_prefix="DACP_REPEAT_" rename_to="DACPRepeatState"
-AvahiClient name="Client" namespace="Avahi"
-AvahiEntryGroup name="EntryGroup" namespace="Avahi"
diff --git a/vala/libdmapsharing-3.0-dacp/libdmapsharing-3.0-uninstalled.files b/vala/libdmapsharing-3.0-dacp/libdmapsharing-3.0-uninstalled.files
deleted file mode 100644
index 8c20cef..0000000
--- a/vala/libdmapsharing-3.0-dacp/libdmapsharing-3.0-uninstalled.files
+++ /dev/null
@@ -1,2 +0,0 @@
-./../libdmapsharing/
-./../libdmapsharing/.libs/libdmapsharing-3.0.so
diff --git a/vala/libdmapsharing-3.0-dacp/libdmapsharing-3.0-uninstalled.files.in b/vala/libdmapsharing-3.0-dacp/libdmapsharing-3.0-uninstalled.files.in
deleted file mode 100644
index eae3c60..0000000
--- a/vala/libdmapsharing-3.0-dacp/libdmapsharing-3.0-uninstalled.files.in
+++ /dev/null
@@ -1,2 +0,0 @@
-@srcdir@/../libdmapsharing/
-@builddir@/../libdmapsharing/.libs/libdmapsharing-3.0.so
diff --git a/vala/libdmapsharing-3.0-dacp/libdmapsharing-3.0-uninstalled.namespace b/vala/libdmapsharing-3.0-dacp/libdmapsharing-3.0-uninstalled.namespace
deleted file mode 100644
index bf320bd..0000000
--- a/vala/libdmapsharing-3.0-dacp/libdmapsharing-3.0-uninstalled.namespace
+++ /dev/null
@@ -1 +0,0 @@
-DACP
diff --git a/vala/libdmapsharing-3.0-dacp/libdmapsharing-3.0.metadata b/vala/libdmapsharing-3.0-dacp/libdmapsharing-3.0.metadata
deleted file mode 100644
index cad4981..0000000
--- a/vala/libdmapsharing-3.0-dacp/libdmapsharing-3.0.metadata
+++ /dev/null
@@ -1,3 +0,0 @@
-DACP cheader_filename="libdmapsharing/dmap.h"
-AvahiClient name="Client" namespace="Avahi"
-AvahiEntryGroup name="EntryGroup" namespace="Avahi"
diff --git a/vala/libdmapsharing-3.0-dmap/libdmapsharing-3.0-uninstalled.excludes b/vala/libdmapsharing-3.0-dmap/libdmapsharing-3.0-uninstalled.excludes
deleted file mode 100644
index 3ef0a96..0000000
--- a/vala/libdmapsharing-3.0-dmap/libdmapsharing-3.0-uninstalled.excludes
+++ /dev/null
@@ -1,6 +0,0 @@
-test-*
-daap-*
-dacp-*
-dpap-*
-dmap-gst-*
-gst-util.h
diff --git a/vala/libdmapsharing-3.0-dmap/libdmapsharing-3.0-uninstalled.files b/vala/libdmapsharing-3.0-dmap/libdmapsharing-3.0-uninstalled.files
deleted file mode 100644
index 8c20cef..0000000
--- a/vala/libdmapsharing-3.0-dmap/libdmapsharing-3.0-uninstalled.files
+++ /dev/null
@@ -1,2 +0,0 @@
-./../libdmapsharing/
-./../libdmapsharing/.libs/libdmapsharing-3.0.so
diff --git a/vala/libdmapsharing-3.0-dmap/libdmapsharing-3.0-uninstalled.files.in b/vala/libdmapsharing-3.0-dmap/libdmapsharing-3.0-uninstalled.files.in
deleted file mode 100644
index eae3c60..0000000
--- a/vala/libdmapsharing-3.0-dmap/libdmapsharing-3.0-uninstalled.files.in
+++ /dev/null
@@ -1,2 +0,0 @@
-@srcdir@/../libdmapsharing/
-@builddir@/../libdmapsharing/.libs/libdmapsharing-3.0.so
diff --git a/vala/libdmapsharing-3.0-dmap/libdmapsharing-3.0-uninstalled.namespace b/vala/libdmapsharing-3.0-dmap/libdmapsharing-3.0-uninstalled.namespace
deleted file mode 100644
index 662af03..0000000
--- a/vala/libdmapsharing-3.0-dmap/libdmapsharing-3.0-uninstalled.namespace
+++ /dev/null
@@ -1 +0,0 @@
-DMAP
diff --git a/vala/libdmapsharing-3.0-dmap/libdmapsharing-3.0.metadata b/vala/libdmapsharing-3.0-dmap/libdmapsharing-3.0.metadata
deleted file mode 100644
index 4d548dd..0000000
--- a/vala/libdmapsharing-3.0-dmap/libdmapsharing-3.0.metadata
+++ /dev/null
@@ -1,8 +0,0 @@
-DMAP cheader_filename="libdmapsharing/dmap.h"
-dmap_container_db_foreach.data hidden="1"
-dmap_db_foreach.data hidden="1"
-dmap_record_factory_create transfer_ownership="1"
-DACPPlayState common_prefix="DACP_PLAY_" rename_to="DACPPlayState"
-DACPRepeatState common_prefix="DACP_REPEAT_" rename_to="DACPRepeatState"
-AvahiClient name="Client" namespace="Avahi"
-AvahiEntryGroup name="EntryGroup" namespace="Avahi"
diff --git a/vala/libdmapsharing-3.0-dpap/libdmapsharing-3.0-uninstalled.excludes b/vala/libdmapsharing-3.0-dpap/libdmapsharing-3.0-uninstalled.excludes
deleted file mode 100644
index f005682..0000000
--- a/vala/libdmapsharing-3.0-dpap/libdmapsharing-3.0-uninstalled.excludes
+++ /dev/null
@@ -1,5 +0,0 @@
-test-*
-daap-*
-dacp-*
-dmap-gst-*
-gst-util.h
diff --git a/vala/libdmapsharing-3.0-dpap/libdmapsharing-3.0-uninstalled.files b/vala/libdmapsharing-3.0-dpap/libdmapsharing-3.0-uninstalled.files
deleted file mode 100644
index 8c20cef..0000000
--- a/vala/libdmapsharing-3.0-dpap/libdmapsharing-3.0-uninstalled.files
+++ /dev/null
@@ -1,2 +0,0 @@
-./../libdmapsharing/
-./../libdmapsharing/.libs/libdmapsharing-3.0.so
diff --git a/vala/libdmapsharing-3.0-dpap/libdmapsharing-3.0-uninstalled.files.in b/vala/libdmapsharing-3.0-dpap/libdmapsharing-3.0-uninstalled.files.in
deleted file mode 100644
index eae3c60..0000000
--- a/vala/libdmapsharing-3.0-dpap/libdmapsharing-3.0-uninstalled.files.in
+++ /dev/null
@@ -1,2 +0,0 @@
-@srcdir@/../libdmapsharing/
-@builddir@/../libdmapsharing/.libs/libdmapsharing-3.0.so
diff --git a/vala/libdmapsharing-3.0-dpap/libdmapsharing-3.0-uninstalled.namespace b/vala/libdmapsharing-3.0-dpap/libdmapsharing-3.0-uninstalled.namespace
deleted file mode 100644
index 0480a5e..0000000
--- a/vala/libdmapsharing-3.0-dpap/libdmapsharing-3.0-uninstalled.namespace
+++ /dev/null
@@ -1 +0,0 @@
-DPAP
diff --git a/vala/libdmapsharing-3.0-dpap/libdmapsharing-3.0.metadata b/vala/libdmapsharing-3.0-dpap/libdmapsharing-3.0.metadata
deleted file mode 100644
index ae92246..0000000
--- a/vala/libdmapsharing-3.0-dpap/libdmapsharing-3.0.metadata
+++ /dev/null
@@ -1,5 +0,0 @@
-DPAP cheader_filename="libdmapsharing/dmap.h"
-DACPPlayState common_prefix="DACP_PLAY_" rename_to="DACPPlayState"
-DACPRepeatState common_prefix="DACP_REPEAT_" rename_to="DACPRepeatState"
-AvahiClient name="Client" namespace="Avahi"
-AvahiEntryGroup name="EntryGroup" namespace="Avahi"
diff --git a/vala/libdmapsharing-3.0.vapi b/vala/libdmapsharing-3.0.vapi
deleted file mode 100644
index 8ea9954..0000000
--- a/vala/libdmapsharing-3.0.vapi
+++ /dev/null
@@ -1,2303 +0,0 @@
-/* libdmapsharing-3.0-daap.vapi generated by vapigen, do not modify. */
-
-namespace DAAP {
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	[Compact]
-	public class ChunkData {
-		public weak Soup.Server server;
-		public weak GLib.InputStream stream;
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public class Connection : DAAP.DMAPConnection {
-		[CCode (has_construct_function = false)]
-		public Connection (string name, string host, uint port, DMAP.Db db, DMAP.RecordFactory factory);
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public class DMAPConnection : GLib.Object {
-		[CCode (has_construct_function = false)]
-		protected DMAPConnection ();
-		[CCode (cname = "dmap_connection_authenticate_message")]
-		public static void authenticate_message (DAAP.DMAPConnection connection, Soup.Session session, Soup.Message message, Soup.Auth auth, string password);
-		[CCode (cname = "dmap_connection_build_message")]
-		public virtual unowned Soup.Message build_message (DAAP.DMAPConnection connection, string path, bool need_hash, double version, int req_id, bool send_close);
-		[CCode (cname = "dmap_connection_connect")]
-		public static void connect (DAAP.DMAPConnection connection, DAAP.DMAPConnectionCallback callback);
-		[CCode (cname = "dmap_connection_disconnect")]
-		public static void disconnect (DAAP.DMAPConnection connection, DAAP.DMAPConnectionCallback callback);
-		[CCode (cname = "dmap_connection_get")]
-		public bool @get (string path, bool need_hash, DAAP.DMAPResponseHandler handler);
-		[CCode (cname = "dmap_connection_get_headers")]
-		public static unowned Soup.MessageHeaders get_headers (DAAP.DMAPConnection connection, string uri);
-		[CCode (cname = "dmap_connection_get_playlists")]
-		public static unowned GLib.SList get_playlists (DAAP.DMAPConnection connection);
-		[NoWrapper]
-		public virtual DAAP.DMAPContentCode get_protocol_version_cc (DAAP.DMAPConnection connection);
-		[NoWrapper]
-		public virtual unowned string get_query_metadata (DAAP.DMAPConnection connection);
-		[NoWrapper]
-		public virtual unowned DAAP.DMAPRecord handle_mlcl (DAAP.DMAPConnection connection, DMAP.RecordFactory factory, GLib.Node mlcl, int item_id);
-		[CCode (cname = "dmap_connection_is_connected")]
-		public static bool is_connected (DAAP.DMAPConnection connection);
-		[CCode (cname = "dmap_connection_setup")]
-		public static void setup (DAAP.DMAPConnection connection);
-		[NoAccessorMethod]
-		public void* base_uri { get; set; }
-		[NoAccessorMethod]
-		public int database_id { get; set; }
-		[NoAccessorMethod]
-		public void* db { get; construct; }
-		[NoAccessorMethod]
-		public double dmap_version { get; set; }
-		[NoAccessorMethod]
-		public void* factory { get; construct; }
-		[NoAccessorMethod]
-		public string host { owned get; construct; }
-		[NoAccessorMethod]
-		public string name { owned get; construct; }
-		[NoAccessorMethod]
-		public string password { set; }
-		[NoAccessorMethod]
-		public uint port { get; construct; }
-		[NoAccessorMethod]
-		public int revision_number { get; set; }
-		[NoAccessorMethod]
-		public int session_id { get; set; }
-		[NoAccessorMethod]
-		public string username { owned get; construct; }
-		public virtual signal void authenticate (string name, Soup.Session p1, Soup.Message p2, Soup.Auth p3, bool p4);
-		public virtual signal void connected ();
-		public virtual signal void connecting (ulong state, float progress);
-		public virtual signal void disconnected ();
-		public virtual signal void operation_done ();
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	[Compact]
-	public class DMAPContentCodeDefinition {
-		public DAAP.DMAPContentCode code;
-		public int32 int_code;
-		public weak string name;
-		[CCode (cname = "string")]
-		public weak string str;
-		public DAAP.DMAPType type;
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	[Compact]
-	public class DMAPDbFilterDefinition {
-		public weak string key;
-		public bool negate;
-		public weak string value;
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	[Compact]
-	public class DMAPHashContext {
-		[CCode (array_length = false)]
-		public weak uint32[] bits;
-		[CCode (array_length = false)]
-		public weak uint32[] buf;
-		[CCode (array_length = false)]
-		public weak uint[] @in;
-		public int version;
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public class DMAPMdnsBrowser : GLib.Object {
-		[CCode (cname = "dmap_mdns_browser_new", has_construct_function = false, type = "DMAPMdnsBrowser*")]
-		public DMAPMdnsBrowser (DAAP.DMAPMdnsBrowserServiceType type);
-		[CCode (cname = "dmap_mdns_browser_error_quark")]
-		public static GLib.Quark error_quark ();
-		[CCode (cname = "dmap_mdns_browser_get_service_type")]
-		public static DAAP.DMAPMdnsBrowserServiceType get_service_type (DAAP.DMAPMdnsBrowser browser);
-		[CCode (cname = "dmap_mdns_browser_get_services")]
-		public static unowned GLib.SList get_services (DAAP.DMAPMdnsBrowser browser);
-		[CCode (cname = "dmap_mdns_browser_start")]
-		public static bool start (DAAP.DMAPMdnsBrowser browser) throws GLib.Error;
-		[CCode (cname = "dmap_mdns_browser_stop")]
-		public static bool stop (DAAP.DMAPMdnsBrowser browser) throws GLib.Error;
-		public virtual signal void service_added (void* service);
-		public virtual signal void service_removed (string service);
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	[Compact]
-	public class DMAPMdnsBrowserService {
-		public weak string host;
-		public weak string name;
-		public weak string pair;
-		public bool password_protected;
-		public uint port;
-		public weak string service_name;
-		public DAAP.DMAPMdnsBrowserTransportProtocol transport_protocol;
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public class DMAPMdnsPublisher : GLib.Object {
-		[CCode (cname = "dmap_mdns_publisher_new", has_construct_function = false, type = "DMAPMdnsPublisher*")]
-		public DMAPMdnsPublisher ();
-		[CCode (cname = "dmap_mdns_publisher_error_quark")]
-		public static GLib.Quark error_quark ();
-		[CCode (cname = "dmap_mdns_publisher_publish")]
-		public static bool publish (DAAP.DMAPMdnsPublisher publisher, string name, uint port, string type_of_service, bool password_required, string txt_records) throws GLib.Error;
-		[CCode (cname = "dmap_mdns_publisher_rename_at_port")]
-		public static bool rename_at_port (DAAP.DMAPMdnsPublisher publisher, uint port, string name) throws GLib.Error;
-		[CCode (cname = "dmap_mdns_publisher_withdraw")]
-		public static bool withdraw (DAAP.DMAPMdnsPublisher publisher, uint port) throws GLib.Error;
-		public virtual signal void name_collision (string name);
-		public virtual signal void published (string name);
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	[Compact]
-	public class DMAPMetaDataMap {
-		public uint md;
-		public weak string tag;
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	[Compact]
-	public class DMAPPlaylist {
-		public int id;
-		public weak string name;
-		public weak GLib.List uris;
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public class DMAPShare : GLib.Object {
-		[CCode (has_construct_function = false)]
-		protected DMAPShare ();
-		[NoWrapper]
-		public virtual void add_entry_to_mlcl (void* id, DAAP.DMAPRecord record, void* mb);
-		[NoWrapper]
-		public virtual void content_codes (DAAP.DMAPShare share, Soup.Server server, Soup.Message message, string path, GLib.HashTable query, Soup.ClientContext ctx);
-		[NoWrapper]
-		public virtual void ctrl_int (DAAP.DMAPShare share, Soup.Server server, Soup.Message message, string path, GLib.HashTable query, Soup.ClientContext ctx);
-		[NoWrapper]
-		public virtual void databases (DAAP.DMAPShare share, Soup.Server server, Soup.Message message, string path, GLib.HashTable query, Soup.ClientContext context);
-		[NoWrapper]
-		public virtual void databases_browse_xxx (DAAP.DMAPShare share, Soup.Server server, Soup.Message msg, string path, GLib.HashTable query, Soup.ClientContext context);
-		[NoWrapper]
-		public virtual void databases_items_xxx (DAAP.DMAPShare share, Soup.Server server, Soup.Message msg, string path, GLib.HashTable query, Soup.ClientContext context);
-		[CCode (cname = "dmap_share_free_filter")]
-		public static void free_filter (GLib.SList filter);
-		[NoWrapper]
-		public virtual uint get_desired_port (DAAP.DMAPShare share);
-		[NoWrapper]
-		public virtual void* get_meta_data_map (DAAP.DMAPShare share);
-		[NoWrapper]
-		public virtual unowned string get_type_of_service (DAAP.DMAPShare share);
-		[NoWrapper]
-		public virtual void login (DAAP.DMAPShare share, Soup.Server server, Soup.Message message, string path, GLib.HashTable query, Soup.ClientContext ctx);
-		[NoWrapper]
-		public virtual void logout (DAAP.DMAPShare share, Soup.Server server, Soup.Message message, string path, GLib.HashTable query, Soup.ClientContext ctx);
-		[NoWrapper]
-		public virtual void message_add_standard_headers (DAAP.DMAPShare share, Soup.Message msg);
-		[NoWrapper]
-		public virtual void name_collision (DAAP.DMAPShare share, DAAP.DMAPMdnsPublisher publisher, string name);
-		[NoWrapper]
-		public virtual void published (DAAP.DMAPShare share, DAAP.DMAPMdnsPublisher publisher, string name);
-		[NoWrapper]
-		public virtual void server_info (DAAP.DMAPShare share, Soup.Server server, Soup.Message message, string path, GLib.HashTable query, Soup.ClientContext ctx);
-		[NoWrapper]
-		public virtual void update (DAAP.DMAPShare share, Soup.Server server, Soup.Message message, string path, GLib.HashTable query, Soup.ClientContext ctx);
-		[NoAccessorMethod]
-		public uint auth_method { get; set; }
-		[NoAccessorMethod]
-		public void* container_db { get; construct; }
-		[NoAccessorMethod]
-		public void* db { get; construct; }
-		[NoAccessorMethod]
-		public string name { owned get; set; }
-		[NoAccessorMethod]
-		public string password { owned get; set; }
-		[NoAccessorMethod]
-		public uint revision_number { get; set; }
-		[NoAccessorMethod]
-		public Soup.Server server { owned get; }
-		[NoAccessorMethod]
-		public string transcode_mimetype { owned get; construct; }
-		[CCode (array_length = false, array_null_terminated = true)]
-		[NoAccessorMethod]
-		public string[] txt_records { owned get; set; }
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	[Compact]
-	public class DMAPStructureItem {
-		public GLib.Value content;
-		public DAAP.DMAPContentCode content_code;
-		public uint32 size;
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public class Share : DAAP.DMAPShare {
-		[CCode (has_construct_function = false)]
-		public Share (string name, string password, DMAP.Db db, DMAP.ContainerDb container_db, string transcode_mimetype);
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	[Compact]
-	public class bitwise {
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public interface DMAPContainerDb : GLib.Object {
-		[CCode (cname = "dmap_container_db_add")]
-		public abstract void add (DMAP.ContainerDb db, DAAP.DMAPContainerRecord record);
-		[CCode (cname = "dmap_container_db_count")]
-		public abstract int64 count (DMAP.ContainerDb db);
-		[CCode (cname = "dmap_container_db_foreach")]
-		public abstract void @foreach (DMAP.ContainerDb db, GLib.HFunc func, void* data);
-		[CCode (cname = "dmap_container_db_lookup_by_id")]
-		public abstract unowned DAAP.DMAPContainerRecord lookup_by_id (DMAP.ContainerDb db, uint id);
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public interface DMAPContainerRecord {
-		[CCode (cname = "dmap_container_record_add_entry")]
-		public abstract void add_entry (DAAP.DMAPContainerRecord container_record, DAAP.DMAPRecord record, int id);
-		[CCode (cname = "dmap_container_record_get_entries")]
-		public abstract unowned DMAP.Db get_entries (DAAP.DMAPContainerRecord record);
-		[CCode (cname = "dmap_container_record_get_entry_count")]
-		public abstract uint64 get_entry_count (DAAP.DMAPContainerRecord record);
-		[CCode (cname = "dmap_container_record_get_id")]
-		public abstract uint get_id (DAAP.DMAPContainerRecord record);
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public interface DMAPDb : GLib.Object {
-		[CCode (cname = "dmap_db_add")]
-		public abstract uint add (DMAP.Db db, DAAP.DMAPRecord record);
-		[CCode (cname = "dmap_db_add_path")]
-		public abstract uint add_path (DMAP.Db db, string path);
-		[CCode (cname = "dmap_db_add_with_id")]
-		public abstract uint add_with_id (DMAP.Db db, DAAP.DMAPRecord record, uint id);
-		[CCode (cname = "dmap_db_apply_filter")]
-		public static unowned GLib.HashTable apply_filter (DMAP.Db db, GLib.SList filter_def);
-		[CCode (cname = "dmap_db_count")]
-		public abstract int64 count (DMAP.Db db);
-		[CCode (cname = "dmap_db_foreach")]
-		public abstract void @foreach (DMAP.Db db, GLib.HFunc func, void* data);
-		[CCode (cname = "dmap_db_lookup_by_id")]
-		public abstract unowned DAAP.DMAPRecord lookup_by_id (DMAP.Db db, uint id);
-		[CCode (cname = "dmap_db_lookup_id_by_location")]
-		public abstract uint lookup_id_by_location (DMAP.Db db, string location);
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public interface DMAPRecord : GLib.Object {
-		[CCode (cname = "dmap_record_set_from_blob")]
-		public abstract bool set_from_blob (DAAP.DMAPRecord record, GLib.ByteArray blob);
-		[CCode (cname = "dmap_record_to_blob")]
-		public abstract unowned GLib.ByteArray to_blob (DAAP.DMAPRecord record);
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public interface DMAPRecordFactory {
-		[CCode (cname = "dmap_record_factory_create")]
-		public abstract unowned DAAP.DMAPRecord create (DMAP.RecordFactory factory);
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public interface Record {
-		public static int cmp_by_album (void* a, void* b, DMAP.Db db);
-		public abstract bool itunes_compat ();
-		public abstract unowned GLib.InputStream read () throws GLib.Error;
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DACP_PLAY_")]
-	public enum DACPPlayState {
-		STOPPED,
-		PAUSED,
-		PLAYING
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DACP_REPEAT_")]
-	public enum DACPRepeatState {
-		NONE,
-		SINGLE,
-		ALL
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_")]
-	public enum DMAPConnectionState {
-		GET_INFO,
-		LOGIN,
-		GET_REVISION_NUMBER,
-		GET_DB_INFO,
-		GET_SONGS,
-		GET_PLAYLISTS,
-		GET_PLAYLIST_ENTRIES,
-		LOGOUT,
-		DONE
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_", has_type_id = false)]
-	public enum DMAPContentCode {
-		CC_INVALID,
-		RAW,
-		CC_MDCL,
-		CC_MSTT,
-		CC_MIID,
-		CC_MINM,
-		CC_MIKD,
-		CC_MPER,
-		CC_MCON,
-		CC_MCTI,
-		CC_MPCO,
-		CC_MSTS,
-		CC_MIMC,
-		CC_MCTC,
-		CC_MRCO,
-		CC_MTCO,
-		CC_MLCL,
-		CC_MLIT,
-		CC_MBCL,
-		CC_MSRV,
-		CC_MSAU,
-		CC_MSLR,
-		CC_MPRO,
-		CC_MSAL,
-		CC_MSUP,
-		CC_MSPI,
-		CC_MSEX,
-		CC_MSBR,
-		CC_MSQY,
-		CC_MSIX,
-		CC_MSRS,
-		CC_MSTM,
-		CC_MSDC,
-		CC_MCCR,
-		CC_MCNM,
-		CC_MCNA,
-		CC_MCTY,
-		CC_MLOG,
-		CC_MLID,
-		CC_MUPD,
-		CC_MUSR,
-		CC_MUTY,
-		CC_MUDL,
-		CC_MSMA,
-		CC_FQUESCH,
-		CC_APRO,
-		CC_AVDB,
-		CC_ABRO,
-		CC_ABAL,
-		CC_ABAR,
-		CC_ABCP,
-		CC_ABGN,
-		CC_ADBS,
-		CC_ASAL,
-		CC_ASAI,
-		CC_ASAA,
-		CC_ASAR,
-		CC_ASBT,
-		CC_ASBR,
-		CC_ASCM,
-		CC_ASCO,
-		CC_ASDA,
-		CC_ASDM,
-		CC_ASDC,
-		CC_ASDN,
-		CC_ASDB,
-		CC_ASEQ,
-		CC_ASFM,
-		CC_ASGN,
-		CC_ASDT,
-		CC_ASRV,
-		CC_ASSR,
-		CC_ASSZ,
-		CC_ASST,
-		CC_ASSP,
-		CC_ASTM,
-		CC_ASTC,
-		CC_ASTN,
-		CC_ASUR,
-		CC_ASYR,
-		CC_ASDK,
-		CC_ASUL,
-		CC_ASSU,
-		CC_ASSA,
-		CC_APLY,
-		CC_ABPL,
-		CC_APSO,
-		CC_PRSV,
-		CC_ARIF,
-		CC_MSAS,
-		CC_AGRP,
-		CC_AGAL,
-		CC_ASCP,
-		CC_PPRO,
-		CC_PASP,
-		CC_PFDT,
-		CC_PICD,
-		CC_PIMF,
-		CC_PFMT,
-		CC_PIFS,
-		CC_PLSZ,
-		CC_PHGT,
-		CC_PWTH,
-		CC_PRAT,
-		CC_PCMT,
-		CC_PRET,
-		CC_AESV,
-		CC_AEHV,
-		CC_AESP,
-		CC_AEPP,
-		CC_AEPS,
-		CC_AESG,
-		CC_AEMK,
-		CC_AEFP,
-		CC_CMPA,
-		CC_CMNM,
-		CC_CMTY,
-		CC_CMPG,
-		CC_CACI,
-		CC_CAPS,
-		CC_CASH,
-		CC_CARP,
-		CC_CAAS,
-		CC_CAAR,
-		CC_CAIA,
-		CC_CANP,
-		CC_CANN,
-		CC_CANA,
-		CC_CANL,
-		CC_CANG,
-		CC_CANT,
-		CC_CASP,
-		CC_CASS,
-		CC_CAST,
-		CC_CASU,
-		CC_CASG,
-		CC_CACR,
-		CC_CMCP,
-		CC_CMGT,
-		CC_CMIK,
-		CC_CMSP,
-		CC_CMST,
-		CC_CMSV,
-		CC_CMSR,
-		CC_CMMK,
-		CC_CMVO,
-		CC_CMPR,
-		CC_CAPR,
-		CC_AEFR,
-		CC_CAOV,
-		CC_CMRL,
-		CC_CAHP,
-		CC_CAIV,
-		CC_CAVC
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_MDNS_BROWSER_ERROR_")]
-	public enum DMAPMdnsBrowserError {
-		NOT_RUNNING,
-		FAILED
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_MDNS_BROWSER_SERVICE_TYPE_")]
-	public enum DMAPMdnsBrowserServiceType {
-		INVALID,
-		DAAP,
-		DPAP,
-		DACP,
-		RAOP,
-		LAST
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_MDNS_BROWSER_TRANSPORT_PROTOCOL_")]
-	public enum DMAPMdnsBrowserTransportProtocol {
-		TCP,
-		UDP,
-		LAST
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_MDNS_PUBLISHER_ERROR_")]
-	public enum DMAPMdnsPublisherError {
-		NOT_RUNNING,
-		FAILED
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_MEDIA_KIND_")]
-	public enum DMAPMediaKind {
-		MUSIC,
-		MOVIE,
-		PODCAST,
-		TV_SHOW
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_TYPE_")]
-	public enum DMAPType {
-		BYTE,
-		SIGNED_INT,
-		SHORT,
-		INT,
-		INT64,
-		STRING,
-		DATE,
-		VERSION,
-		CONTAINER,
-		POINTER
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public delegate bool DMAPConnectionCallback (DAAP.DMAPConnection connection, bool result, string reason);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public delegate void DMAPResponseHandler (DAAP.DMAPConnection connection, uint status, GLib.Node structure);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", has_target = false)]
-	public delegate unowned string RecordGetValueFunc (DAAP.DMAPRecord record);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public const int DMAP_HASH_SIZE;
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public const int DMAP_HAVE_UNALIGNED_ACCESS;
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public const int DMAP_STATUS_OK;
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_chunked_message_finished")]
-	public static void dmap_chunked_message_finished (Soup.Message message, DAAP.ChunkData cd);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_content_code_dmap_type")]
-	public static DAAP.DMAPType dmap_content_code_dmap_type (DAAP.DMAPContentCode code);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_content_code_name")]
-	public static unowned string dmap_content_code_name (DAAP.DMAPContentCode code);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_content_code_read_from_buffer")]
-	public static DAAP.DMAPContentCode dmap_content_code_read_from_buffer (string buf);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_content_code_string")]
-	public static unowned string dmap_content_code_string (DAAP.DMAPContentCode code);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_content_code_string_as_int32")]
-	public static int32 dmap_content_code_string_as_int32 (string str);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_content_codes")]
-	public static unowned DAAP.DMAPContentCodeDefinition dmap_content_codes (uint number);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_hash_generate")]
-	public static void dmap_hash_generate (short version_major, uchar[] url, uchar hash_select, uchar[] @out, int request_id);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_hash_progressive_final")]
-	public static void dmap_hash_progressive_final (DAAP.DMAPHashContext context, uint[] digest);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_hash_progressive_init")]
-	public static void dmap_hash_progressive_init (DAAP.DMAPHashContext context);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_hash_progressive_to_string")]
-	public static void dmap_hash_progressive_to_string (uint digest, string str);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_hash_progressive_update")]
-	public static void dmap_hash_progressive_update (DAAP.DMAPHashContext context, uint buffer, uint length);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_mdns_avahi_get_client")]
-	public static unowned Avahi.Client dmap_mdns_avahi_get_client ();
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_mdns_avahi_set_entry_group")]
-	public static void dmap_mdns_avahi_set_entry_group (Avahi.EntryGroup group);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_add")]
-	public static unowned GLib.Node dmap_structure_add (GLib.Node parent, DAAP.DMAPContentCode cc);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_destroy")]
-	public static void dmap_structure_destroy (GLib.Node structure);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_find_item")]
-	public static unowned DAAP.DMAPStructureItem dmap_structure_find_item (GLib.Node structure, DAAP.DMAPContentCode code);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_find_node")]
-	public static unowned GLib.Node dmap_structure_find_node (GLib.Node structure, DAAP.DMAPContentCode code);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_get_size")]
-	public static uint dmap_structure_get_size (GLib.Node structure);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_increase_by_predicted_size")]
-	public static void dmap_structure_increase_by_predicted_size (GLib.Node structure, uint size);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_parse")]
-	public static unowned GLib.Node dmap_structure_parse (string buf, int buf_length);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_print")]
-	public static void dmap_structure_print (GLib.Node structure);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_serialize")]
-	public static unowned string dmap_structure_serialize (GLib.Node structure, uint length);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_utils_mime_to_format")]
-	public static unowned string dmap_utils_mime_to_format (string transcode_mimetype);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_write_next_chunk")]
-	public static void dmap_write_next_chunk (Soup.Message message, DAAP.ChunkData cd);
-}
-/* libdmapsharing-3.0-dacp.vapi generated by vapigen, do not modify. */
-
-namespace DACP {
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	[Compact]
-	public class ChunkData {
-		public weak Soup.Server server;
-		public weak GLib.InputStream stream;
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public class Connection : DACP.DMAPConnection {
-		[CCode (has_construct_function = false)]
-		public Connection (string name, string host, uint port, DMAP.Db db, DACP.DMAPRecordFactory factory);
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public class DAAPConnection : DACP.DMAPConnection {
-		[CCode (cname = "daap_connection_new", has_construct_function = false, type = "DAAPConnection*")]
-		public DAAPConnection (string name, string host, uint port, DMAP.Db db, DACP.DMAPRecordFactory factory);
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public class DAAPShare : DACP.DMAPShare {
-		[CCode (cname = "daap_share_new", has_construct_function = false, type = "DAAPShare*")]
-		public DAAPShare (string name, string password, DMAP.Db db, DMAP.ContainerDb container_db, string transcode_mimetype);
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public class DMAPConnection : GLib.Object {
-		[CCode (has_construct_function = false)]
-		protected DMAPConnection ();
-		[CCode (cname = "dmap_connection_authenticate_message")]
-		public static void authenticate_message (DACP.DMAPConnection connection, Soup.Session session, Soup.Message message, Soup.Auth auth, string password);
-		[CCode (cname = "dmap_connection_build_message")]
-		public virtual unowned Soup.Message build_message (DACP.DMAPConnection connection, string path, bool need_hash, double version, int req_id, bool send_close);
-		[CCode (cname = "dmap_connection_connect")]
-		public static void connect (DACP.DMAPConnection connection, DACP.DMAPConnectionCallback callback);
-		[CCode (cname = "dmap_connection_disconnect")]
-		public static void disconnect (DACP.DMAPConnection connection, DACP.DMAPConnectionCallback callback);
-		[CCode (cname = "dmap_connection_get")]
-		public bool @get (string path, bool need_hash, DACP.DMAPResponseHandler handler);
-		[CCode (cname = "dmap_connection_get_headers")]
-		public static unowned Soup.MessageHeaders get_headers (DACP.DMAPConnection connection, string uri);
-		[CCode (cname = "dmap_connection_get_playlists")]
-		public static unowned GLib.SList get_playlists (DACP.DMAPConnection connection);
-		[NoWrapper]
-		public virtual DACP.DMAPContentCode get_protocol_version_cc (DACP.DMAPConnection connection);
-		[NoWrapper]
-		public virtual unowned string get_query_metadata (DACP.DMAPConnection connection);
-		[NoWrapper]
-		public virtual unowned DACP.DMAPRecord handle_mlcl (DACP.DMAPConnection connection, DACP.DMAPRecordFactory factory, GLib.Node mlcl, int item_id);
-		[CCode (cname = "dmap_connection_is_connected")]
-		public static bool is_connected (DACP.DMAPConnection connection);
-		[CCode (cname = "dmap_connection_setup")]
-		public static void setup (DACP.DMAPConnection connection);
-		[NoAccessorMethod]
-		public void* base_uri { get; set; }
-		[NoAccessorMethod]
-		public int database_id { get; set; }
-		[NoAccessorMethod]
-		public void* db { get; construct; }
-		[NoAccessorMethod]
-		public double dmap_version { get; set; }
-		[NoAccessorMethod]
-		public void* factory { get; construct; }
-		[NoAccessorMethod]
-		public string host { owned get; construct; }
-		[NoAccessorMethod]
-		public string name { owned get; construct; }
-		[NoAccessorMethod]
-		public string password { set; }
-		[NoAccessorMethod]
-		public uint port { get; construct; }
-		[NoAccessorMethod]
-		public int revision_number { get; set; }
-		[NoAccessorMethod]
-		public int session_id { get; set; }
-		[NoAccessorMethod]
-		public string username { owned get; construct; }
-		public virtual signal void authenticate (string name, Soup.Session p1, Soup.Message p2, Soup.Auth p3, bool p4);
-		public virtual signal void connected ();
-		public virtual signal void connecting (ulong state, float progress);
-		public virtual signal void disconnected ();
-		public virtual signal void operation_done ();
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	[Compact]
-	public class DMAPContentCodeDefinition {
-		public DACP.DMAPContentCode code;
-		public int32 int_code;
-		public weak string name;
-		[CCode (cname = "string")]
-		public weak string str;
-		public DACP.DMAPType type;
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	[Compact]
-	public class DMAPDbFilterDefinition {
-		public weak string key;
-		public bool negate;
-		public weak string value;
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	[Compact]
-	public class DMAPHashContext {
-		[CCode (array_length = false)]
-		public weak uint32[] bits;
-		[CCode (array_length = false)]
-		public weak uint32[] buf;
-		[CCode (array_length = false)]
-		public weak uint[] @in;
-		public int version;
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public class DMAPMdnsBrowser : GLib.Object {
-		[CCode (cname = "dmap_mdns_browser_new", has_construct_function = false, type = "DMAPMdnsBrowser*")]
-		public DMAPMdnsBrowser (DACP.DMAPMdnsBrowserServiceType type);
-		[CCode (cname = "dmap_mdns_browser_error_quark")]
-		public static GLib.Quark error_quark ();
-		[CCode (cname = "dmap_mdns_browser_get_service_type")]
-		public static DACP.DMAPMdnsBrowserServiceType get_service_type (DACP.DMAPMdnsBrowser browser);
-		[CCode (cname = "dmap_mdns_browser_get_services")]
-		public static unowned GLib.SList get_services (DACP.DMAPMdnsBrowser browser);
-		[CCode (cname = "dmap_mdns_browser_start")]
-		public static bool start (DACP.DMAPMdnsBrowser browser) throws GLib.Error;
-		[CCode (cname = "dmap_mdns_browser_stop")]
-		public static bool stop (DACP.DMAPMdnsBrowser browser) throws GLib.Error;
-		public virtual signal void service_added (void* service);
-		public virtual signal void service_removed (string service);
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	[Compact]
-	public class DMAPMdnsBrowserService {
-		public weak string host;
-		public weak string name;
-		public weak string pair;
-		public bool password_protected;
-		public uint port;
-		public weak string service_name;
-		public DACP.DMAPMdnsBrowserTransportProtocol transport_protocol;
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public class DMAPMdnsPublisher : GLib.Object {
-		[CCode (cname = "dmap_mdns_publisher_new", has_construct_function = false, type = "DMAPMdnsPublisher*")]
-		public DMAPMdnsPublisher ();
-		[CCode (cname = "dmap_mdns_publisher_error_quark")]
-		public static GLib.Quark error_quark ();
-		[CCode (cname = "dmap_mdns_publisher_publish")]
-		public static bool publish (DACP.DMAPMdnsPublisher publisher, string name, uint port, string type_of_service, bool password_required, string txt_records) throws GLib.Error;
-		[CCode (cname = "dmap_mdns_publisher_rename_at_port")]
-		public static bool rename_at_port (DACP.DMAPMdnsPublisher publisher, uint port, string name) throws GLib.Error;
-		[CCode (cname = "dmap_mdns_publisher_withdraw")]
-		public static bool withdraw (DACP.DMAPMdnsPublisher publisher, uint port) throws GLib.Error;
-		public virtual signal void name_collision (string name);
-		public virtual signal void published (string name);
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	[Compact]
-	public class DMAPMetaDataMap {
-		public uint md;
-		public weak string tag;
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	[Compact]
-	public class DMAPPlaylist {
-		public int id;
-		public weak string name;
-		public weak GLib.List uris;
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public class DMAPShare : GLib.Object {
-		[CCode (has_construct_function = false)]
-		protected DMAPShare ();
-		[NoWrapper]
-		public virtual void add_entry_to_mlcl (void* id, DACP.DMAPRecord record, void* mb);
-		[NoWrapper]
-		public virtual void content_codes (DACP.DMAPShare share, Soup.Server server, Soup.Message message, string path, GLib.HashTable query, Soup.ClientContext ctx);
-		[NoWrapper]
-		public virtual void ctrl_int (DACP.DMAPShare share, Soup.Server server, Soup.Message message, string path, GLib.HashTable query, Soup.ClientContext ctx);
-		[NoWrapper]
-		public virtual void databases (DACP.DMAPShare share, Soup.Server server, Soup.Message message, string path, GLib.HashTable query, Soup.ClientContext context);
-		[NoWrapper]
-		public virtual void databases_browse_xxx (DACP.DMAPShare share, Soup.Server server, Soup.Message msg, string path, GLib.HashTable query, Soup.ClientContext context);
-		[NoWrapper]
-		public virtual void databases_items_xxx (DACP.DMAPShare share, Soup.Server server, Soup.Message msg, string path, GLib.HashTable query, Soup.ClientContext context);
-		[CCode (cname = "dmap_share_free_filter")]
-		public static void free_filter (GLib.SList filter);
-		[NoWrapper]
-		public virtual uint get_desired_port (DACP.DMAPShare share);
-		[NoWrapper]
-		public virtual void* get_meta_data_map (DACP.DMAPShare share);
-		[NoWrapper]
-		public virtual unowned string get_type_of_service (DACP.DMAPShare share);
-		[NoWrapper]
-		public virtual void login (DACP.DMAPShare share, Soup.Server server, Soup.Message message, string path, GLib.HashTable query, Soup.ClientContext ctx);
-		[NoWrapper]
-		public virtual void logout (DACP.DMAPShare share, Soup.Server server, Soup.Message message, string path, GLib.HashTable query, Soup.ClientContext ctx);
-		[NoWrapper]
-		public virtual void message_add_standard_headers (DACP.DMAPShare share, Soup.Message msg);
-		[NoWrapper]
-		public virtual void name_collision (DACP.DMAPShare share, DACP.DMAPMdnsPublisher publisher, string name);
-		[NoWrapper]
-		public virtual void published (DACP.DMAPShare share, DACP.DMAPMdnsPublisher publisher, string name);
-		[NoWrapper]
-		public virtual void server_info (DACP.DMAPShare share, Soup.Server server, Soup.Message message, string path, GLib.HashTable query, Soup.ClientContext ctx);
-		[NoWrapper]
-		public virtual void update (DACP.DMAPShare share, Soup.Server server, Soup.Message message, string path, GLib.HashTable query, Soup.ClientContext ctx);
-		[NoAccessorMethod]
-		public uint auth_method { get; set; }
-		[NoAccessorMethod]
-		public void* container_db { get; construct; }
-		[NoAccessorMethod]
-		public void* db { get; construct; }
-		[NoAccessorMethod]
-		public string name { owned get; set; }
-		[NoAccessorMethod]
-		public string password { owned get; set; }
-		[NoAccessorMethod]
-		public uint revision_number { get; set; }
-		[NoAccessorMethod]
-		public Soup.Server server { owned get; }
-		[NoAccessorMethod]
-		public string transcode_mimetype { owned get; construct; }
-		[CCode (array_length = false, array_null_terminated = true)]
-		[NoAccessorMethod]
-		public string[] txt_records { owned get; set; }
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	[Compact]
-	public class DMAPStructureItem {
-		public GLib.Value content;
-		public DACP.DMAPContentCode content_code;
-		public uint32 size;
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public class Share : DACP.DAAPShare {
-		[CCode (has_construct_function = false)]
-		public Share (string library_name, DACP.Player player, DMAP.Db db, DMAP.ContainerDb container_db);
-		public void pair (string service_name, char[] passcode);
-		public void player_updated ();
-		public void start_lookup ();
-		public void stop_lookup ();
-		[NoAccessorMethod]
-		public string library_name { owned get; set; }
-		[NoAccessorMethod]
-		public GLib.Object player { owned get; construct; }
-		public virtual signal void add_guid (string guid);
-		public virtual signal bool lookup_guid (string guid);
-		public virtual signal void remote_found (string service_name, string remote_name);
-		public virtual signal void remote_lost (string service_name);
-		public virtual signal void remote_paired (string service_name, bool connected);
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	[Compact]
-	public class bitwise {
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public interface DAAPRecord {
-		[CCode (cname = "daap_record_cmp_by_album")]
-		public static int cmp_by_album (void* a, void* b, DMAP.Db db);
-		[CCode (cname = "daap_record_itunes_compat")]
-		public abstract bool itunes_compat (DAAP.Record record);
-		[CCode (cname = "daap_record_read")]
-		public abstract unowned GLib.InputStream read (DAAP.Record record) throws GLib.Error;
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public interface DMAPContainerDb : GLib.Object {
-		[CCode (cname = "dmap_container_db_add")]
-		public abstract void add (DMAP.ContainerDb db, DACP.DMAPContainerRecord record);
-		[CCode (cname = "dmap_container_db_count")]
-		public abstract int64 count (DMAP.ContainerDb db);
-		[CCode (cname = "dmap_container_db_foreach")]
-		public abstract void @foreach (DMAP.ContainerDb db, GLib.HFunc func, void* data);
-		[CCode (cname = "dmap_container_db_lookup_by_id")]
-		public abstract unowned DACP.DMAPContainerRecord lookup_by_id (DMAP.ContainerDb db, uint id);
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public interface DMAPContainerRecord {
-		[CCode (cname = "dmap_container_record_add_entry")]
-		public abstract void add_entry (DACP.DMAPContainerRecord container_record, DACP.DMAPRecord record, int id);
-		[CCode (cname = "dmap_container_record_get_entries")]
-		public abstract unowned DMAP.Db get_entries (DACP.DMAPContainerRecord record);
-		[CCode (cname = "dmap_container_record_get_entry_count")]
-		public abstract uint64 get_entry_count (DACP.DMAPContainerRecord record);
-		[CCode (cname = "dmap_container_record_get_id")]
-		public abstract uint get_id (DACP.DMAPContainerRecord record);
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public interface DMAPDb : GLib.Object {
-		[CCode (cname = "dmap_db_add")]
-		public abstract uint add (DMAP.Db db, DACP.DMAPRecord record);
-		[CCode (cname = "dmap_db_add_path")]
-		public abstract uint add_path (DMAP.Db db, string path);
-		[CCode (cname = "dmap_db_add_with_id")]
-		public abstract uint add_with_id (DMAP.Db db, DACP.DMAPRecord record, uint id);
-		[CCode (cname = "dmap_db_apply_filter")]
-		public static unowned GLib.HashTable apply_filter (DMAP.Db db, GLib.SList filter_def);
-		[CCode (cname = "dmap_db_count")]
-		public abstract int64 count (DMAP.Db db);
-		[CCode (cname = "dmap_db_foreach")]
-		public abstract void @foreach (DMAP.Db db, GLib.HFunc func, void* data);
-		[CCode (cname = "dmap_db_lookup_by_id")]
-		public abstract unowned DACP.DMAPRecord lookup_by_id (DMAP.Db db, uint id);
-		[CCode (cname = "dmap_db_lookup_id_by_location")]
-		public abstract uint lookup_id_by_location (DMAP.Db db, string location);
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public interface DMAPRecord : GLib.Object {
-		[CCode (cname = "dmap_record_set_from_blob")]
-		public abstract bool set_from_blob (DACP.DMAPRecord record, GLib.ByteArray blob);
-		[CCode (cname = "dmap_record_to_blob")]
-		public abstract unowned GLib.ByteArray to_blob (DACP.DMAPRecord record);
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public interface DMAPRecordFactory {
-		[CCode (cname = "dmap_record_factory_create")]
-		public abstract unowned DACP.DMAPRecord create (DACP.DMAPRecordFactory factory);
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public interface Player : GLib.Object {
-		public abstract void cue_clear ();
-		public abstract void cue_play (GLib.List records, uint index);
-		public abstract void next_item ();
-		public abstract unowned uchar[] now_playing_artwork (uint width, uint height);
-		public abstract unowned DAAP.Record now_playing_record ();
-		public abstract void pause ();
-		public abstract void play_pause ();
-		public abstract void prev_item ();
-		[NoAccessorMethod]
-		public DACP.PlayState play_state { get; set; }
-		[NoAccessorMethod]
-		public ulong playing_time { get; set; }
-		[NoAccessorMethod]
-		public DACP.RepeatState repeat_state { get; set; }
-		[NoAccessorMethod]
-		public bool shuffle_state { get; set; }
-		[NoAccessorMethod]
-		public ulong volume { get; set; }
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_")]
-	public enum DMAPConnectionState {
-		GET_INFO,
-		LOGIN,
-		GET_REVISION_NUMBER,
-		GET_DB_INFO,
-		GET_SONGS,
-		GET_PLAYLISTS,
-		GET_PLAYLIST_ENTRIES,
-		LOGOUT,
-		DONE
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_", has_type_id = false)]
-	public enum DMAPContentCode {
-		CC_INVALID,
-		RAW,
-		CC_MDCL,
-		CC_MSTT,
-		CC_MIID,
-		CC_MINM,
-		CC_MIKD,
-		CC_MPER,
-		CC_MCON,
-		CC_MCTI,
-		CC_MPCO,
-		CC_MSTS,
-		CC_MIMC,
-		CC_MCTC,
-		CC_MRCO,
-		CC_MTCO,
-		CC_MLCL,
-		CC_MLIT,
-		CC_MBCL,
-		CC_MSRV,
-		CC_MSAU,
-		CC_MSLR,
-		CC_MPRO,
-		CC_MSAL,
-		CC_MSUP,
-		CC_MSPI,
-		CC_MSEX,
-		CC_MSBR,
-		CC_MSQY,
-		CC_MSIX,
-		CC_MSRS,
-		CC_MSTM,
-		CC_MSDC,
-		CC_MCCR,
-		CC_MCNM,
-		CC_MCNA,
-		CC_MCTY,
-		CC_MLOG,
-		CC_MLID,
-		CC_MUPD,
-		CC_MUSR,
-		CC_MUTY,
-		CC_MUDL,
-		CC_MSMA,
-		CC_FQUESCH,
-		CC_APRO,
-		CC_AVDB,
-		CC_ABRO,
-		CC_ABAL,
-		CC_ABAR,
-		CC_ABCP,
-		CC_ABGN,
-		CC_ADBS,
-		CC_ASAL,
-		CC_ASAI,
-		CC_ASAA,
-		CC_ASAR,
-		CC_ASBT,
-		CC_ASBR,
-		CC_ASCM,
-		CC_ASCO,
-		CC_ASDA,
-		CC_ASDM,
-		CC_ASDC,
-		CC_ASDN,
-		CC_ASDB,
-		CC_ASEQ,
-		CC_ASFM,
-		CC_ASGN,
-		CC_ASDT,
-		CC_ASRV,
-		CC_ASSR,
-		CC_ASSZ,
-		CC_ASST,
-		CC_ASSP,
-		CC_ASTM,
-		CC_ASTC,
-		CC_ASTN,
-		CC_ASUR,
-		CC_ASYR,
-		CC_ASDK,
-		CC_ASUL,
-		CC_ASSU,
-		CC_ASSA,
-		CC_APLY,
-		CC_ABPL,
-		CC_APSO,
-		CC_PRSV,
-		CC_ARIF,
-		CC_MSAS,
-		CC_AGRP,
-		CC_AGAL,
-		CC_ASCP,
-		CC_PPRO,
-		CC_PASP,
-		CC_PFDT,
-		CC_PICD,
-		CC_PIMF,
-		CC_PFMT,
-		CC_PIFS,
-		CC_PLSZ,
-		CC_PHGT,
-		CC_PWTH,
-		CC_PRAT,
-		CC_PCMT,
-		CC_PRET,
-		CC_AESV,
-		CC_AEHV,
-		CC_AESP,
-		CC_AEPP,
-		CC_AEPS,
-		CC_AESG,
-		CC_AEMK,
-		CC_AEFP,
-		CC_CMPA,
-		CC_CMNM,
-		CC_CMTY,
-		CC_CMPG,
-		CC_CACI,
-		CC_CAPS,
-		CC_CASH,
-		CC_CARP,
-		CC_CAAS,
-		CC_CAAR,
-		CC_CAIA,
-		CC_CANP,
-		CC_CANN,
-		CC_CANA,
-		CC_CANL,
-		CC_CANG,
-		CC_CANT,
-		CC_CASP,
-		CC_CASS,
-		CC_CAST,
-		CC_CASU,
-		CC_CASG,
-		CC_CACR,
-		CC_CMCP,
-		CC_CMGT,
-		CC_CMIK,
-		CC_CMSP,
-		CC_CMST,
-		CC_CMSV,
-		CC_CMSR,
-		CC_CMMK,
-		CC_CMVO,
-		CC_CMPR,
-		CC_CAPR,
-		CC_AEFR,
-		CC_CAOV,
-		CC_CMRL,
-		CC_CAHP,
-		CC_CAIV,
-		CC_CAVC
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_MDNS_BROWSER_ERROR_")]
-	public enum DMAPMdnsBrowserError {
-		NOT_RUNNING,
-		FAILED
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_MDNS_BROWSER_SERVICE_TYPE_")]
-	public enum DMAPMdnsBrowserServiceType {
-		INVALID,
-		DAAP,
-		DPAP,
-		DACP,
-		RAOP,
-		LAST
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_MDNS_BROWSER_TRANSPORT_PROTOCOL_")]
-	public enum DMAPMdnsBrowserTransportProtocol {
-		TCP,
-		UDP,
-		LAST
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_MDNS_PUBLISHER_ERROR_")]
-	public enum DMAPMdnsPublisherError {
-		NOT_RUNNING,
-		FAILED
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_MEDIA_KIND_")]
-	public enum DMAPMediaKind {
-		MUSIC,
-		MOVIE,
-		PODCAST,
-		TV_SHOW
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_TYPE_")]
-	public enum DMAPType {
-		BYTE,
-		SIGNED_INT,
-		SHORT,
-		INT,
-		INT64,
-		STRING,
-		DATE,
-		VERSION,
-		CONTAINER,
-		POINTER
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DACP_PLAY_")]
-	public enum PlayState {
-		STOPPED,
-		PAUSED,
-		PLAYING
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DACP_REPEAT_")]
-	public enum RepeatState {
-		NONE,
-		SINGLE,
-		ALL
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public delegate bool DMAPConnectionCallback (DACP.DMAPConnection connection, bool result, string reason);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public delegate void DMAPResponseHandler (DACP.DMAPConnection connection, uint status, GLib.Node structure);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", has_target = false)]
-	public delegate unowned string RecordGetValueFunc (DACP.DMAPRecord record);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public const int DMAP_HASH_SIZE;
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public const int DMAP_HAVE_UNALIGNED_ACCESS;
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public const int DMAP_STATUS_OK;
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_chunked_message_finished")]
-	public static void dmap_chunked_message_finished (Soup.Message message, DACP.ChunkData cd);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_content_code_dmap_type")]
-	public static DACP.DMAPType dmap_content_code_dmap_type (DACP.DMAPContentCode code);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_content_code_name")]
-	public static unowned string dmap_content_code_name (DACP.DMAPContentCode code);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_content_code_read_from_buffer")]
-	public static DACP.DMAPContentCode dmap_content_code_read_from_buffer (string buf);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_content_code_string")]
-	public static unowned string dmap_content_code_string (DACP.DMAPContentCode code);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_content_code_string_as_int32")]
-	public static int32 dmap_content_code_string_as_int32 (string str);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_content_codes")]
-	public static unowned DACP.DMAPContentCodeDefinition dmap_content_codes (uint number);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_hash_generate")]
-	public static void dmap_hash_generate (short version_major, uchar[] url, uchar hash_select, uchar[] @out, int request_id);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_hash_progressive_final")]
-	public static void dmap_hash_progressive_final (DACP.DMAPHashContext context, uint[] digest);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_hash_progressive_init")]
-	public static void dmap_hash_progressive_init (DACP.DMAPHashContext context);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_hash_progressive_to_string")]
-	public static void dmap_hash_progressive_to_string (uint digest, string str);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_hash_progressive_update")]
-	public static void dmap_hash_progressive_update (DACP.DMAPHashContext context, uint buffer, uint length);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_mdns_avahi_get_client")]
-	public static unowned Avahi.Client dmap_mdns_avahi_get_client ();
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_mdns_avahi_set_entry_group")]
-	public static void dmap_mdns_avahi_set_entry_group (Avahi.EntryGroup group);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_add")]
-	public static unowned GLib.Node dmap_structure_add (GLib.Node parent, DACP.DMAPContentCode cc);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_destroy")]
-	public static void dmap_structure_destroy (GLib.Node structure);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_find_item")]
-	public static unowned DACP.DMAPStructureItem dmap_structure_find_item (GLib.Node structure, DACP.DMAPContentCode code);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_find_node")]
-	public static unowned GLib.Node dmap_structure_find_node (GLib.Node structure, DACP.DMAPContentCode code);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_get_size")]
-	public static uint dmap_structure_get_size (GLib.Node structure);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_increase_by_predicted_size")]
-	public static void dmap_structure_increase_by_predicted_size (GLib.Node structure, uint size);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_parse")]
-	public static unowned GLib.Node dmap_structure_parse (string buf, int buf_length);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_print")]
-	public static void dmap_structure_print (GLib.Node structure);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_serialize")]
-	public static unowned string dmap_structure_serialize (GLib.Node structure, uint length);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_utils_mime_to_format")]
-	public static unowned string dmap_utils_mime_to_format (string transcode_mimetype);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_write_next_chunk")]
-	public static void dmap_write_next_chunk (Soup.Message message, DACP.ChunkData cd);
-}
-/* libdmapsharing-3.0-dmap.vapi generated by vapigen, do not modify. */
-
-namespace DMAP {
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	[Compact]
-	public class ChunkData {
-		public weak Soup.Server server;
-		public weak GLib.InputStream stream;
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public class Connection : GLib.Object {
-		[CCode (has_construct_function = false)]
-		protected Connection ();
-		public void authenticate_message (Soup.Session session, Soup.Message message, Soup.Auth auth, string password);
-		public virtual unowned Soup.Message build_message (string path, bool need_hash, double version, int req_id, bool send_close);
-		public void connect (DMAP.ConnectionCallback callback);
-		public void disconnect (DMAP.ConnectionCallback callback);
-		public bool @get (string path, bool need_hash, DMAP.ResponseHandler handler);
-		public unowned Soup.MessageHeaders get_headers (string uri);
-		public unowned GLib.SList get_playlists ();
-		[NoWrapper]
-		public virtual DMAP.ContentCode get_protocol_version_cc ();
-		[NoWrapper]
-		public virtual unowned string get_query_metadata ();
-		[NoWrapper]
-		public virtual unowned DMAP.Record handle_mlcl (DMAP.RecordFactory factory, GLib.Node mlcl, int item_id);
-		public bool is_connected ();
-		public void setup ();
-		[NoAccessorMethod]
-		public void* base_uri { get; set; }
-		[NoAccessorMethod]
-		public int database_id { get; set; }
-		[NoAccessorMethod]
-		public void* db { get; construct; }
-		[NoAccessorMethod]
-		public double dmap_version { get; set; }
-		[NoAccessorMethod]
-		public void* factory { get; construct; }
-		[NoAccessorMethod]
-		public string host { owned get; construct; }
-		[NoAccessorMethod]
-		public string name { owned get; construct; }
-		[NoAccessorMethod]
-		public string password { set; }
-		[NoAccessorMethod]
-		public uint port { get; construct; }
-		[NoAccessorMethod]
-		public int revision_number { get; set; }
-		[NoAccessorMethod]
-		public int session_id { get; set; }
-		[NoAccessorMethod]
-		public string username { owned get; construct; }
-		public virtual signal void authenticate (string name, Soup.Session p1, Soup.Message p2, Soup.Auth p3, bool p4);
-		public virtual signal void connected ();
-		public virtual signal void connecting (ulong state, float progress);
-		public virtual signal void disconnected ();
-		public virtual signal void operation_done ();
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	[Compact]
-	public class ContentCodeDefinition {
-		public DMAP.ContentCode code;
-		public int32 int_code;
-		public weak string name;
-		[CCode (cname = "string")]
-		public weak string str;
-		public DMAP.Type type;
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	[Compact]
-	public class DbFilterDefinition {
-		public weak string key;
-		public bool negate;
-		public weak string value;
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	[Compact]
-	public class HashContext {
-		[CCode (array_length = false)]
-		public weak uint32[] bits;
-		[CCode (array_length = false)]
-		public weak uint32[] buf;
-		[CCode (array_length = false)]
-		public weak uint[] @in;
-		public int version;
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public class MdnsBrowser : GLib.Object {
-		[CCode (has_construct_function = false)]
-		public MdnsBrowser (DMAP.MdnsBrowserServiceType type);
-		public static GLib.Quark error_quark ();
-		public DMAP.MdnsBrowserServiceType get_service_type ();
-		public unowned GLib.SList get_services ();
-		public bool start () throws GLib.Error;
-		public bool stop () throws GLib.Error;
-		public virtual signal void service_added (void* service);
-		public virtual signal void service_removed (string service);
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	[Compact]
-	public class MdnsBrowserService {
-		public weak string host;
-		public weak string name;
-		public weak string pair;
-		public bool password_protected;
-		public uint port;
-		public weak string service_name;
-		public DMAP.MdnsBrowserTransportProtocol transport_protocol;
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public class MdnsPublisher : GLib.Object {
-		[CCode (has_construct_function = false)]
-		public MdnsPublisher ();
-		public static GLib.Quark error_quark ();
-		public bool publish (string name, uint port, string type_of_service, bool password_required, string txt_records) throws GLib.Error;
-		public bool rename_at_port (uint port, string name) throws GLib.Error;
-		public bool withdraw (uint port) throws GLib.Error;
-		public virtual signal void name_collision (string name);
-		public virtual signal void published (string name);
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	[Compact]
-	public class MetaDataMap {
-		public uint md;
-		public weak string tag;
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	[Compact]
-	public class Playlist {
-		public int id;
-		public weak string name;
-		public weak GLib.List uris;
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public class Share : GLib.Object {
-		[CCode (has_construct_function = false)]
-		protected Share ();
-		[NoWrapper]
-		public virtual void add_entry_to_mlcl (void* id, DMAP.Record record, void* mb);
-		[NoWrapper]
-		public virtual void content_codes (Soup.Server server, Soup.Message message, string path, GLib.HashTable query, Soup.ClientContext ctx);
-		[NoWrapper]
-		public virtual void ctrl_int (Soup.Server server, Soup.Message message, string path, GLib.HashTable query, Soup.ClientContext ctx);
-		[NoWrapper]
-		public virtual void databases (Soup.Server server, Soup.Message message, string path, GLib.HashTable query, Soup.ClientContext context);
-		[NoWrapper]
-		public virtual void databases_browse_xxx (Soup.Server server, Soup.Message msg, string path, GLib.HashTable query, Soup.ClientContext context);
-		[NoWrapper]
-		public virtual void databases_items_xxx (Soup.Server server, Soup.Message msg, string path, GLib.HashTable query, Soup.ClientContext context);
-		public static void free_filter (GLib.SList filter);
-		[NoWrapper]
-		public virtual uint get_desired_port ();
-		[NoWrapper]
-		public virtual void* get_meta_data_map ();
-		[NoWrapper]
-		public virtual unowned string get_type_of_service ();
-		[NoWrapper]
-		public virtual void login (Soup.Server server, Soup.Message message, string path, GLib.HashTable query, Soup.ClientContext ctx);
-		[NoWrapper]
-		public virtual void logout (Soup.Server server, Soup.Message message, string path, GLib.HashTable query, Soup.ClientContext ctx);
-		[NoWrapper]
-		public virtual void message_add_standard_headers (Soup.Message msg);
-		[NoWrapper]
-		public virtual void name_collision (DMAP.MdnsPublisher publisher, string name);
-		[NoWrapper]
-		public virtual void published (DMAP.MdnsPublisher publisher, string name);
-		[NoWrapper]
-		public virtual void server_info (Soup.Server server, Soup.Message message, string path, GLib.HashTable query, Soup.ClientContext ctx);
-		[NoWrapper]
-		public virtual void update (Soup.Server server, Soup.Message message, string path, GLib.HashTable query, Soup.ClientContext ctx);
-		[NoAccessorMethod]
-		public uint auth_method { get; set; }
-		[NoAccessorMethod]
-		public void* container_db { get; construct; }
-		[NoAccessorMethod]
-		public void* db { get; construct; }
-		[NoAccessorMethod]
-		public string name { owned get; set; }
-		[NoAccessorMethod]
-		public string password { owned get; set; }
-		[NoAccessorMethod]
-		public uint revision_number { get; set; }
-		[NoAccessorMethod]
-		public Soup.Server server { owned get; }
-		[NoAccessorMethod]
-		public string transcode_mimetype { owned get; construct; }
-		[CCode (array_length = false, array_null_terminated = true)]
-		[NoAccessorMethod]
-		public string[] txt_records { owned get; set; }
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	[Compact]
-	public class StructureItem {
-		public GLib.Value content;
-		public DMAP.ContentCode content_code;
-		public uint32 size;
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	[Compact]
-	public class bitwise {
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public interface ContainerDb : GLib.Object {
-		public abstract void add (DMAP.ContainerRecord record);
-		public abstract int64 count ();
-		public abstract void @foreach (GLib.HFunc func);
-		public abstract unowned DMAP.ContainerRecord lookup_by_id (uint id);
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public interface ContainerRecord {
-		public abstract void add_entry (DMAP.Record record, int id);
-		public abstract unowned DMAP.Db get_entries ();
-		public abstract uint64 get_entry_count ();
-		public abstract uint get_id ();
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public interface Db : GLib.Object {
-		public abstract uint add (DMAP.Record record);
-		public abstract uint add_path (string path);
-		public abstract uint add_with_id (DMAP.Record record, uint id);
-		public unowned GLib.HashTable apply_filter (GLib.SList filter_def);
-		public abstract int64 count ();
-		public abstract void @foreach (GLib.HFunc func);
-		public abstract unowned DMAP.Record lookup_by_id (uint id);
-		public abstract uint lookup_id_by_location (string location);
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public interface Record : GLib.Object {
-		public abstract bool set_from_blob (GLib.ByteArray blob);
-		public abstract unowned GLib.ByteArray to_blob ();
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public interface RecordFactory {
-		public abstract DMAP.Record create (void* user_data);
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_")]
-	public enum ConnectionState {
-		GET_INFO,
-		LOGIN,
-		GET_REVISION_NUMBER,
-		GET_DB_INFO,
-		GET_SONGS,
-		GET_PLAYLISTS,
-		GET_PLAYLIST_ENTRIES,
-		LOGOUT,
-		DONE
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_", has_type_id = false)]
-	public enum ContentCode {
-		CC_INVALID,
-		RAW,
-		CC_MDCL,
-		CC_MSTT,
-		CC_MIID,
-		CC_MINM,
-		CC_MIKD,
-		CC_MPER,
-		CC_MCON,
-		CC_MCTI,
-		CC_MPCO,
-		CC_MSTS,
-		CC_MIMC,
-		CC_MCTC,
-		CC_MRCO,
-		CC_MTCO,
-		CC_MLCL,
-		CC_MLIT,
-		CC_MBCL,
-		CC_MSRV,
-		CC_MSAU,
-		CC_MSLR,
-		CC_MPRO,
-		CC_MSAL,
-		CC_MSUP,
-		CC_MSPI,
-		CC_MSEX,
-		CC_MSBR,
-		CC_MSQY,
-		CC_MSIX,
-		CC_MSRS,
-		CC_MSTM,
-		CC_MSDC,
-		CC_MCCR,
-		CC_MCNM,
-		CC_MCNA,
-		CC_MCTY,
-		CC_MLOG,
-		CC_MLID,
-		CC_MUPD,
-		CC_MUSR,
-		CC_MUTY,
-		CC_MUDL,
-		CC_MSMA,
-		CC_FQUESCH,
-		CC_APRO,
-		CC_AVDB,
-		CC_ABRO,
-		CC_ABAL,
-		CC_ABAR,
-		CC_ABCP,
-		CC_ABGN,
-		CC_ADBS,
-		CC_ASAL,
-		CC_ASAI,
-		CC_ASAA,
-		CC_ASAR,
-		CC_ASBT,
-		CC_ASBR,
-		CC_ASCM,
-		CC_ASCO,
-		CC_ASDA,
-		CC_ASDM,
-		CC_ASDC,
-		CC_ASDN,
-		CC_ASDB,
-		CC_ASEQ,
-		CC_ASFM,
-		CC_ASGN,
-		CC_ASDT,
-		CC_ASRV,
-		CC_ASSR,
-		CC_ASSZ,
-		CC_ASST,
-		CC_ASSP,
-		CC_ASTM,
-		CC_ASTC,
-		CC_ASTN,
-		CC_ASUR,
-		CC_ASYR,
-		CC_ASDK,
-		CC_ASUL,
-		CC_ASSU,
-		CC_ASSA,
-		CC_APLY,
-		CC_ABPL,
-		CC_APSO,
-		CC_PRSV,
-		CC_ARIF,
-		CC_MSAS,
-		CC_AGRP,
-		CC_AGAL,
-		CC_ASCP,
-		CC_PPRO,
-		CC_PASP,
-		CC_PFDT,
-		CC_PICD,
-		CC_PIMF,
-		CC_PFMT,
-		CC_PIFS,
-		CC_PLSZ,
-		CC_PHGT,
-		CC_PWTH,
-		CC_PRAT,
-		CC_PCMT,
-		CC_PRET,
-		CC_AESV,
-		CC_AEHV,
-		CC_AESP,
-		CC_AEPP,
-		CC_AEPS,
-		CC_AESG,
-		CC_AEMK,
-		CC_AEFP,
-		CC_CMPA,
-		CC_CMNM,
-		CC_CMTY,
-		CC_CMPG,
-		CC_CACI,
-		CC_CAPS,
-		CC_CASH,
-		CC_CARP,
-		CC_CAAS,
-		CC_CAAR,
-		CC_CAIA,
-		CC_CANP,
-		CC_CANN,
-		CC_CANA,
-		CC_CANL,
-		CC_CANG,
-		CC_CANT,
-		CC_CASP,
-		CC_CASS,
-		CC_CAST,
-		CC_CASU,
-		CC_CASG,
-		CC_CACR,
-		CC_CMCP,
-		CC_CMGT,
-		CC_CMIK,
-		CC_CMSP,
-		CC_CMST,
-		CC_CMSV,
-		CC_CMSR,
-		CC_CMMK,
-		CC_CMVO,
-		CC_CMPR,
-		CC_CAPR,
-		CC_AEFR,
-		CC_CAOV,
-		CC_CMRL,
-		CC_CAHP,
-		CC_CAIV,
-		CC_CAVC
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DACP_PLAY_")]
-	public enum DACPPlayState {
-		STOPPED,
-		PAUSED,
-		PLAYING
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DACP_REPEAT_")]
-	public enum DACPRepeatState {
-		NONE,
-		SINGLE,
-		ALL
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_MDNS_BROWSER_ERROR_")]
-	public enum MdnsBrowserError {
-		NOT_RUNNING,
-		FAILED
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_MDNS_BROWSER_SERVICE_TYPE_")]
-	public enum MdnsBrowserServiceType {
-		INVALID,
-		DAAP,
-		DPAP,
-		DACP,
-		RAOP,
-		LAST
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_MDNS_BROWSER_TRANSPORT_PROTOCOL_")]
-	public enum MdnsBrowserTransportProtocol {
-		TCP,
-		UDP,
-		LAST
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_MDNS_PUBLISHER_ERROR_")]
-	public enum MdnsPublisherError {
-		NOT_RUNNING,
-		FAILED
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_MEDIA_KIND_")]
-	public enum MediaKind {
-		MUSIC,
-		MOVIE,
-		PODCAST,
-		TV_SHOW
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_TYPE_")]
-	public enum Type {
-		BYTE,
-		SIGNED_INT,
-		SHORT,
-		INT,
-		INT64,
-		STRING,
-		DATE,
-		VERSION,
-		CONTAINER,
-		POINTER
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public delegate bool ConnectionCallback (DMAP.Connection connection, bool result, string reason);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", has_target = false)]
-	public delegate unowned string RecordGetValueFunc (DMAP.Record record);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public delegate void ResponseHandler (DMAP.Connection connection, uint status, GLib.Node structure);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public const int HASH_SIZE;
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public const int HAVE_UNALIGNED_ACCESS;
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public const int STATUS_OK;
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public static void chunked_message_finished (Soup.Message message, DMAP.ChunkData cd);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public static DMAP.Type content_code_dmap_type (DMAP.ContentCode code);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public static unowned string content_code_name (DMAP.ContentCode code);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public static DMAP.ContentCode content_code_read_from_buffer (string buf);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public static unowned string content_code_string (DMAP.ContentCode code);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public static int32 content_code_string_as_int32 (string str);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public static unowned DMAP.ContentCodeDefinition content_codes (uint number);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public static void hash_generate (short version_major, uchar[] url, uchar hash_select, uchar[] @out, int request_id);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public static void hash_progressive_final (DMAP.HashContext context, uint[] digest);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public static void hash_progressive_init (DMAP.HashContext context);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public static void hash_progressive_to_string (uint digest, string str);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public static void hash_progressive_update (DMAP.HashContext context, uint buffer, uint length);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public static unowned Avahi.Client mdns_avahi_get_client ();
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public static void mdns_avahi_set_entry_group (Avahi.EntryGroup group);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public static unowned GLib.Node structure_add (GLib.Node parent, DMAP.ContentCode cc);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public static void structure_destroy (GLib.Node structure);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public static unowned DMAP.StructureItem structure_find_item (GLib.Node structure, DMAP.ContentCode code);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public static unowned GLib.Node structure_find_node (GLib.Node structure, DMAP.ContentCode code);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public static uint structure_get_size (GLib.Node structure);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public static void structure_increase_by_predicted_size (GLib.Node structure, uint size);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public static unowned GLib.Node structure_parse (string buf, int buf_length);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public static void structure_print (GLib.Node structure);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public static unowned string structure_serialize (GLib.Node structure, uint length);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public static unowned string utils_mime_to_format (string transcode_mimetype);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public static void write_next_chunk (Soup.Message message, DMAP.ChunkData cd);
-}
-/* libdmapsharing-3.0-dpap.vapi generated by vapigen, do not modify. */
-
-namespace DPAP {
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	[Compact]
-	public class ChunkData {
-		public weak Soup.Server server;
-		public weak GLib.InputStream stream;
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public class Connection : DPAP.DMAPConnection {
-		[CCode (has_construct_function = false)]
-		public Connection (string name, string host, uint port, DMAP.Db db, DMAP.RecordFactory factory);
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public class DMAPConnection : GLib.Object {
-		[CCode (has_construct_function = false)]
-		protected DMAPConnection ();
-		[CCode (cname = "dmap_connection_authenticate_message")]
-		public static void authenticate_message (DPAP.DMAPConnection connection, Soup.Session session, Soup.Message message, Soup.Auth auth, string password);
-		[CCode (cname = "dmap_connection_build_message")]
-		public virtual unowned Soup.Message build_message (DPAP.DMAPConnection connection, string path, bool need_hash, double version, int req_id, bool send_close);
-		[CCode (cname = "dmap_connection_connect")]
-		public static void connect (DPAP.DMAPConnection connection, DPAP.DMAPConnectionCallback callback);
-		[CCode (cname = "dmap_connection_disconnect")]
-		public static void disconnect (DPAP.DMAPConnection connection, DPAP.DMAPConnectionCallback callback);
-		[CCode (cname = "dmap_connection_get")]
-		public bool @get (string path, bool need_hash, DPAP.DMAPResponseHandler handler);
-		[CCode (cname = "dmap_connection_get_headers")]
-		public static unowned Soup.MessageHeaders get_headers (DPAP.DMAPConnection connection, string uri);
-		[CCode (cname = "dmap_connection_get_playlists")]
-		public static unowned GLib.SList get_playlists (DPAP.DMAPConnection connection);
-		[NoWrapper]
-		public virtual DPAP.DMAPContentCode get_protocol_version_cc (DPAP.DMAPConnection connection);
-		[NoWrapper]
-		public virtual unowned string get_query_metadata (DPAP.DMAPConnection connection);
-		[NoWrapper]
-		public virtual unowned DPAP.DMAPRecord handle_mlcl (DPAP.DMAPConnection connection, DMAP.RecordFactory factory, GLib.Node mlcl, int item_id);
-		[CCode (cname = "dmap_connection_is_connected")]
-		public static bool is_connected (DPAP.DMAPConnection connection);
-		[CCode (cname = "dmap_connection_setup")]
-		public static void setup (DPAP.DMAPConnection connection);
-		[NoAccessorMethod]
-		public void* base_uri { get; set; }
-		[NoAccessorMethod]
-		public int database_id { get; set; }
-		[NoAccessorMethod]
-		public void* db { get; construct; }
-		[NoAccessorMethod]
-		public double dmap_version { get; set; }
-		[NoAccessorMethod]
-		public void* factory { get; construct; }
-		[NoAccessorMethod]
-		public string host { owned get; construct; }
-		[NoAccessorMethod]
-		public string name { owned get; construct; }
-		[NoAccessorMethod]
-		public string password { set; }
-		[NoAccessorMethod]
-		public uint port { get; construct; }
-		[NoAccessorMethod]
-		public int revision_number { get; set; }
-		[NoAccessorMethod]
-		public int session_id { get; set; }
-		[NoAccessorMethod]
-		public string username { owned get; construct; }
-		public virtual signal void authenticate (string name, Soup.Session p1, Soup.Message p2, Soup.Auth p3, bool p4);
-		public virtual signal void connected ();
-		public virtual signal void connecting (ulong state, float progress);
-		public virtual signal void disconnected ();
-		public virtual signal void operation_done ();
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	[Compact]
-	public class DMAPContentCodeDefinition {
-		public DPAP.DMAPContentCode code;
-		public int32 int_code;
-		public weak string name;
-		[CCode (cname = "string")]
-		public weak string str;
-		public DPAP.DMAPType type;
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	[Compact]
-	public class DMAPDbFilterDefinition {
-		public weak string key;
-		public bool negate;
-		public weak string value;
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	[Compact]
-	public class DMAPHashContext {
-		[CCode (array_length = false)]
-		public weak uint32[] bits;
-		[CCode (array_length = false)]
-		public weak uint32[] buf;
-		[CCode (array_length = false)]
-		public weak uint[] @in;
-		public int version;
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public class DMAPMdnsBrowser : GLib.Object {
-		[CCode (cname = "dmap_mdns_browser_new", has_construct_function = false, type = "DMAPMdnsBrowser*")]
-		public DMAPMdnsBrowser (DPAP.DMAPMdnsBrowserServiceType type);
-		[CCode (cname = "dmap_mdns_browser_error_quark")]
-		public static GLib.Quark error_quark ();
-		[CCode (cname = "dmap_mdns_browser_get_service_type")]
-		public static DPAP.DMAPMdnsBrowserServiceType get_service_type (DPAP.DMAPMdnsBrowser browser);
-		[CCode (cname = "dmap_mdns_browser_get_services")]
-		public static unowned GLib.SList get_services (DPAP.DMAPMdnsBrowser browser);
-		[CCode (cname = "dmap_mdns_browser_start")]
-		public static bool start (DPAP.DMAPMdnsBrowser browser) throws GLib.Error;
-		[CCode (cname = "dmap_mdns_browser_stop")]
-		public static bool stop (DPAP.DMAPMdnsBrowser browser) throws GLib.Error;
-		public virtual signal void service_added (void* service);
-		public virtual signal void service_removed (string service);
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	[Compact]
-	public class DMAPMdnsBrowserService {
-		public weak string host;
-		public weak string name;
-		public weak string pair;
-		public bool password_protected;
-		public uint port;
-		public weak string service_name;
-		public DPAP.DMAPMdnsBrowserTransportProtocol transport_protocol;
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public class DMAPMdnsPublisher : GLib.Object {
-		[CCode (cname = "dmap_mdns_publisher_new", has_construct_function = false, type = "DMAPMdnsPublisher*")]
-		public DMAPMdnsPublisher ();
-		[CCode (cname = "dmap_mdns_publisher_error_quark")]
-		public static GLib.Quark error_quark ();
-		[CCode (cname = "dmap_mdns_publisher_publish")]
-		public static bool publish (DPAP.DMAPMdnsPublisher publisher, string name, uint port, string type_of_service, bool password_required, string txt_records) throws GLib.Error;
-		[CCode (cname = "dmap_mdns_publisher_rename_at_port")]
-		public static bool rename_at_port (DPAP.DMAPMdnsPublisher publisher, uint port, string name) throws GLib.Error;
-		[CCode (cname = "dmap_mdns_publisher_withdraw")]
-		public static bool withdraw (DPAP.DMAPMdnsPublisher publisher, uint port) throws GLib.Error;
-		public virtual signal void name_collision (string name);
-		public virtual signal void published (string name);
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	[Compact]
-	public class DMAPMetaDataMap {
-		public uint md;
-		public weak string tag;
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	[Compact]
-	public class DMAPPlaylist {
-		public int id;
-		public weak string name;
-		public weak GLib.List uris;
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public class DMAPShare : GLib.Object {
-		[CCode (has_construct_function = false)]
-		protected DMAPShare ();
-		[NoWrapper]
-		public virtual void add_entry_to_mlcl (void* id, DPAP.DMAPRecord record, void* mb);
-		[NoWrapper]
-		public virtual void content_codes (DPAP.DMAPShare share, Soup.Server server, Soup.Message message, string path, GLib.HashTable query, Soup.ClientContext ctx);
-		[NoWrapper]
-		public virtual void ctrl_int (DPAP.DMAPShare share, Soup.Server server, Soup.Message message, string path, GLib.HashTable query, Soup.ClientContext ctx);
-		[NoWrapper]
-		public virtual void databases (DPAP.DMAPShare share, Soup.Server server, Soup.Message message, string path, GLib.HashTable query, Soup.ClientContext context);
-		[NoWrapper]
-		public virtual void databases_browse_xxx (DPAP.DMAPShare share, Soup.Server server, Soup.Message msg, string path, GLib.HashTable query, Soup.ClientContext context);
-		[NoWrapper]
-		public virtual void databases_items_xxx (DPAP.DMAPShare share, Soup.Server server, Soup.Message msg, string path, GLib.HashTable query, Soup.ClientContext context);
-		[CCode (cname = "dmap_share_free_filter")]
-		public static void free_filter (GLib.SList filter);
-		[NoWrapper]
-		public virtual uint get_desired_port (DPAP.DMAPShare share);
-		[NoWrapper]
-		public virtual void* get_meta_data_map (DPAP.DMAPShare share);
-		[NoWrapper]
-		public virtual unowned string get_type_of_service (DPAP.DMAPShare share);
-		[NoWrapper]
-		public virtual void login (DPAP.DMAPShare share, Soup.Server server, Soup.Message message, string path, GLib.HashTable query, Soup.ClientContext ctx);
-		[NoWrapper]
-		public virtual void logout (DPAP.DMAPShare share, Soup.Server server, Soup.Message message, string path, GLib.HashTable query, Soup.ClientContext ctx);
-		[NoWrapper]
-		public virtual void message_add_standard_headers (DPAP.DMAPShare share, Soup.Message msg);
-		[NoWrapper]
-		public virtual void name_collision (DPAP.DMAPShare share, DPAP.DMAPMdnsPublisher publisher, string name);
-		[NoWrapper]
-		public virtual void published (DPAP.DMAPShare share, DPAP.DMAPMdnsPublisher publisher, string name);
-		[NoWrapper]
-		public virtual void server_info (DPAP.DMAPShare share, Soup.Server server, Soup.Message message, string path, GLib.HashTable query, Soup.ClientContext ctx);
-		[NoWrapper]
-		public virtual void update (DPAP.DMAPShare share, Soup.Server server, Soup.Message message, string path, GLib.HashTable query, Soup.ClientContext ctx);
-		[NoAccessorMethod]
-		public uint auth_method { get; set; }
-		[NoAccessorMethod]
-		public void* container_db { get; construct; }
-		[NoAccessorMethod]
-		public void* db { get; construct; }
-		[NoAccessorMethod]
-		public string name { owned get; set; }
-		[NoAccessorMethod]
-		public string password { owned get; set; }
-		[NoAccessorMethod]
-		public uint revision_number { get; set; }
-		[NoAccessorMethod]
-		public Soup.Server server { owned get; }
-		[NoAccessorMethod]
-		public string transcode_mimetype { owned get; construct; }
-		[CCode (array_length = false, array_null_terminated = true)]
-		[NoAccessorMethod]
-		public string[] txt_records { owned get; set; }
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	[Compact]
-	public class DMAPStructureItem {
-		public GLib.Value content;
-		public DPAP.DMAPContentCode content_code;
-		public uint32 size;
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public class Share : DPAP.DMAPShare {
-		[CCode (has_construct_function = false)]
-		public Share (string name, string password, void* db, void* container_db, string transcode_mimetype);
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	[Compact]
-	public class bitwise {
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public interface DMAPContainerDb : GLib.Object {
-		[CCode (cname = "dmap_container_db_add")]
-		public abstract void add (DMAP.ContainerDb db, DPAP.DMAPContainerRecord record);
-		[CCode (cname = "dmap_container_db_count")]
-		public abstract int64 count (DMAP.ContainerDb db);
-		[CCode (cname = "dmap_container_db_foreach")]
-		public abstract void @foreach (DMAP.ContainerDb db, GLib.HFunc func, void* data);
-		[CCode (cname = "dmap_container_db_lookup_by_id")]
-		public abstract unowned DPAP.DMAPContainerRecord lookup_by_id (DMAP.ContainerDb db, uint id);
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public interface DMAPContainerRecord {
-		[CCode (cname = "dmap_container_record_add_entry")]
-		public abstract void add_entry (DPAP.DMAPContainerRecord container_record, DPAP.DMAPRecord record, int id);
-		[CCode (cname = "dmap_container_record_get_entries")]
-		public abstract unowned DMAP.Db get_entries (DPAP.DMAPContainerRecord record);
-		[CCode (cname = "dmap_container_record_get_entry_count")]
-		public abstract uint64 get_entry_count (DPAP.DMAPContainerRecord record);
-		[CCode (cname = "dmap_container_record_get_id")]
-		public abstract uint get_id (DPAP.DMAPContainerRecord record);
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public interface DMAPDb : GLib.Object {
-		[CCode (cname = "dmap_db_add")]
-		public abstract uint add (DMAP.Db db, DPAP.DMAPRecord record);
-		[CCode (cname = "dmap_db_add_path")]
-		public abstract uint add_path (DMAP.Db db, string path);
-		[CCode (cname = "dmap_db_add_with_id")]
-		public abstract uint add_with_id (DMAP.Db db, DPAP.DMAPRecord record, uint id);
-		[CCode (cname = "dmap_db_apply_filter")]
-		public static unowned GLib.HashTable apply_filter (DMAP.Db db, GLib.SList filter_def);
-		[CCode (cname = "dmap_db_count")]
-		public abstract int64 count (DMAP.Db db);
-		[CCode (cname = "dmap_db_foreach")]
-		public abstract void @foreach (DMAP.Db db, GLib.HFunc func, void* data);
-		[CCode (cname = "dmap_db_lookup_by_id")]
-		public abstract unowned DPAP.DMAPRecord lookup_by_id (DMAP.Db db, uint id);
-		[CCode (cname = "dmap_db_lookup_id_by_location")]
-		public abstract uint lookup_id_by_location (DMAP.Db db, string location);
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public interface DMAPRecord : GLib.Object {
-		[CCode (cname = "dmap_record_set_from_blob")]
-		public abstract bool set_from_blob (DPAP.DMAPRecord record, GLib.ByteArray blob);
-		[CCode (cname = "dmap_record_to_blob")]
-		public abstract unowned GLib.ByteArray to_blob (DPAP.DMAPRecord record);
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public interface DMAPRecordFactory {
-		[CCode (cname = "dmap_record_factory_create")]
-		public abstract unowned DPAP.DMAPRecord create (DMAP.RecordFactory factory);
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public interface Record {
-		public abstract unowned GLib.InputStream read () throws GLib.Error;
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DACP_PLAY_")]
-	public enum DACPPlayState {
-		STOPPED,
-		PAUSED,
-		PLAYING
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DACP_REPEAT_")]
-	public enum DACPRepeatState {
-		NONE,
-		SINGLE,
-		ALL
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_")]
-	public enum DMAPConnectionState {
-		GET_INFO,
-		LOGIN,
-		GET_REVISION_NUMBER,
-		GET_DB_INFO,
-		GET_SONGS,
-		GET_PLAYLISTS,
-		GET_PLAYLIST_ENTRIES,
-		LOGOUT,
-		DONE
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_", has_type_id = false)]
-	public enum DMAPContentCode {
-		CC_INVALID,
-		RAW,
-		CC_MDCL,
-		CC_MSTT,
-		CC_MIID,
-		CC_MINM,
-		CC_MIKD,
-		CC_MPER,
-		CC_MCON,
-		CC_MCTI,
-		CC_MPCO,
-		CC_MSTS,
-		CC_MIMC,
-		CC_MCTC,
-		CC_MRCO,
-		CC_MTCO,
-		CC_MLCL,
-		CC_MLIT,
-		CC_MBCL,
-		CC_MSRV,
-		CC_MSAU,
-		CC_MSLR,
-		CC_MPRO,
-		CC_MSAL,
-		CC_MSUP,
-		CC_MSPI,
-		CC_MSEX,
-		CC_MSBR,
-		CC_MSQY,
-		CC_MSIX,
-		CC_MSRS,
-		CC_MSTM,
-		CC_MSDC,
-		CC_MCCR,
-		CC_MCNM,
-		CC_MCNA,
-		CC_MCTY,
-		CC_MLOG,
-		CC_MLID,
-		CC_MUPD,
-		CC_MUSR,
-		CC_MUTY,
-		CC_MUDL,
-		CC_MSMA,
-		CC_FQUESCH,
-		CC_APRO,
-		CC_AVDB,
-		CC_ABRO,
-		CC_ABAL,
-		CC_ABAR,
-		CC_ABCP,
-		CC_ABGN,
-		CC_ADBS,
-		CC_ASAL,
-		CC_ASAI,
-		CC_ASAA,
-		CC_ASAR,
-		CC_ASBT,
-		CC_ASBR,
-		CC_ASCM,
-		CC_ASCO,
-		CC_ASDA,
-		CC_ASDM,
-		CC_ASDC,
-		CC_ASDN,
-		CC_ASDB,
-		CC_ASEQ,
-		CC_ASFM,
-		CC_ASGN,
-		CC_ASDT,
-		CC_ASRV,
-		CC_ASSR,
-		CC_ASSZ,
-		CC_ASST,
-		CC_ASSP,
-		CC_ASTM,
-		CC_ASTC,
-		CC_ASTN,
-		CC_ASUR,
-		CC_ASYR,
-		CC_ASDK,
-		CC_ASUL,
-		CC_ASSU,
-		CC_ASSA,
-		CC_APLY,
-		CC_ABPL,
-		CC_APSO,
-		CC_PRSV,
-		CC_ARIF,
-		CC_MSAS,
-		CC_AGRP,
-		CC_AGAL,
-		CC_ASCP,
-		CC_PPRO,
-		CC_PASP,
-		CC_PFDT,
-		CC_PICD,
-		CC_PIMF,
-		CC_PFMT,
-		CC_PIFS,
-		CC_PLSZ,
-		CC_PHGT,
-		CC_PWTH,
-		CC_PRAT,
-		CC_PCMT,
-		CC_PRET,
-		CC_AESV,
-		CC_AEHV,
-		CC_AESP,
-		CC_AEPP,
-		CC_AEPS,
-		CC_AESG,
-		CC_AEMK,
-		CC_AEFP,
-		CC_CMPA,
-		CC_CMNM,
-		CC_CMTY,
-		CC_CMPG,
-		CC_CACI,
-		CC_CAPS,
-		CC_CASH,
-		CC_CARP,
-		CC_CAAS,
-		CC_CAAR,
-		CC_CAIA,
-		CC_CANP,
-		CC_CANN,
-		CC_CANA,
-		CC_CANL,
-		CC_CANG,
-		CC_CANT,
-		CC_CASP,
-		CC_CASS,
-		CC_CAST,
-		CC_CASU,
-		CC_CASG,
-		CC_CACR,
-		CC_CMCP,
-		CC_CMGT,
-		CC_CMIK,
-		CC_CMSP,
-		CC_CMST,
-		CC_CMSV,
-		CC_CMSR,
-		CC_CMMK,
-		CC_CMVO,
-		CC_CMPR,
-		CC_CAPR,
-		CC_AEFR,
-		CC_CAOV,
-		CC_CMRL,
-		CC_CAHP,
-		CC_CAIV,
-		CC_CAVC
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_MDNS_BROWSER_ERROR_")]
-	public enum DMAPMdnsBrowserError {
-		NOT_RUNNING,
-		FAILED
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_MDNS_BROWSER_SERVICE_TYPE_")]
-	public enum DMAPMdnsBrowserServiceType {
-		INVALID,
-		DAAP,
-		DPAP,
-		DACP,
-		RAOP,
-		LAST
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_MDNS_BROWSER_TRANSPORT_PROTOCOL_")]
-	public enum DMAPMdnsBrowserTransportProtocol {
-		TCP,
-		UDP,
-		LAST
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_MDNS_PUBLISHER_ERROR_")]
-	public enum DMAPMdnsPublisherError {
-		NOT_RUNNING,
-		FAILED
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_MEDIA_KIND_")]
-	public enum DMAPMediaKind {
-		MUSIC,
-		MOVIE,
-		PODCAST,
-		TV_SHOW
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_TYPE_")]
-	public enum DMAPType {
-		BYTE,
-		SIGNED_INT,
-		SHORT,
-		INT,
-		INT64,
-		STRING,
-		DATE,
-		VERSION,
-		CONTAINER,
-		POINTER
-	}
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public delegate bool DMAPConnectionCallback (DPAP.DMAPConnection connection, bool result, string reason);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public delegate void DMAPResponseHandler (DPAP.DMAPConnection connection, uint status, GLib.Node structure);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", has_target = false)]
-	public delegate unowned string RecordGetValueFunc (DPAP.DMAPRecord record);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public const int DMAP_HASH_SIZE;
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public const int DMAP_HAVE_UNALIGNED_ACCESS;
-	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
-	public const int DMAP_STATUS_OK;
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_chunked_message_finished")]
-	public static void dmap_chunked_message_finished (Soup.Message message, DPAP.ChunkData cd);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_content_code_dmap_type")]
-	public static DPAP.DMAPType dmap_content_code_dmap_type (DPAP.DMAPContentCode code);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_content_code_name")]
-	public static unowned string dmap_content_code_name (DPAP.DMAPContentCode code);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_content_code_read_from_buffer")]
-	public static DPAP.DMAPContentCode dmap_content_code_read_from_buffer (string buf);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_content_code_string")]
-	public static unowned string dmap_content_code_string (DPAP.DMAPContentCode code);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_content_code_string_as_int32")]
-	public static int32 dmap_content_code_string_as_int32 (string str);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_content_codes")]
-	public static unowned DPAP.DMAPContentCodeDefinition dmap_content_codes (uint number);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_hash_generate")]
-	public static void dmap_hash_generate (short version_major, uchar[] url, uchar hash_select, uchar[] @out, int request_id);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_hash_progressive_final")]
-	public static void dmap_hash_progressive_final (DPAP.DMAPHashContext context, uint[] digest);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_hash_progressive_init")]
-	public static void dmap_hash_progressive_init (DPAP.DMAPHashContext context);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_hash_progressive_to_string")]
-	public static void dmap_hash_progressive_to_string (uint digest, string str);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_hash_progressive_update")]
-	public static void dmap_hash_progressive_update (DPAP.DMAPHashContext context, uint buffer, uint length);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_mdns_avahi_get_client")]
-	public static unowned Avahi.Client dmap_mdns_avahi_get_client ();
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_mdns_avahi_set_entry_group")]
-	public static void dmap_mdns_avahi_set_entry_group (Avahi.EntryGroup group);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_add")]
-	public static unowned GLib.Node dmap_structure_add (GLib.Node parent, DPAP.DMAPContentCode cc);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_destroy")]
-	public static void dmap_structure_destroy (GLib.Node structure);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_find_item")]
-	public static unowned DPAP.DMAPStructureItem dmap_structure_find_item (GLib.Node structure, DPAP.DMAPContentCode code);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_find_node")]
-	public static unowned GLib.Node dmap_structure_find_node (GLib.Node structure, DPAP.DMAPContentCode code);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_get_size")]
-	public static uint dmap_structure_get_size (GLib.Node structure);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_increase_by_predicted_size")]
-	public static void dmap_structure_increase_by_predicted_size (GLib.Node structure, uint size);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_parse")]
-	public static unowned GLib.Node dmap_structure_parse (string buf, int buf_length);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_print")]
-	public static void dmap_structure_print (GLib.Node structure);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_serialize")]
-	public static unowned string dmap_structure_serialize (GLib.Node structure, uint length);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_utils_mime_to_format")]
-	public static unowned string dmap_utils_mime_to_format (string transcode_mimetype);
-	[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_write_next_chunk")]
-	public static void dmap_write_next_chunk (Soup.Message message, DPAP.ChunkData cd);
-}
diff --git a/vala/libdmapsharing-3.0-dacp/libdmapsharing-3.0-uninstalled.excludes b/vala/libdmapsharing-4.0-uninstalled.excludes
similarity index 50%
rename from vala/libdmapsharing-3.0-dacp/libdmapsharing-3.0-uninstalled.excludes
rename to vala/libdmapsharing-4.0-uninstalled.excludes
index 5aa0af5..6314211 100644
--- a/vala/libdmapsharing-3.0-dacp/libdmapsharing-3.0-uninstalled.excludes
+++ b/vala/libdmapsharing-4.0-uninstalled.excludes
@@ -1,4 +1,3 @@
 test-*
-dpap-*
-dmap-gst-*
 gst-util.h
+dmap-transcode-*
diff --git a/vala/libdmapsharing-4.0-uninstalled.files b/vala/libdmapsharing-4.0-uninstalled.files
new file mode 100644
index 0000000..e109377
--- /dev/null
+++ b/vala/libdmapsharing-4.0-uninstalled.files
@@ -0,0 +1,2 @@
+./../libdmapsharing/
+./../libdmapsharing/.libs/libdmapsharing-4.0.so
diff --git a/vala/libdmapsharing-4.0-uninstalled.files.in b/vala/libdmapsharing-4.0-uninstalled.files.in
new file mode 100644
index 0000000..cf6497b
--- /dev/null
+++ b/vala/libdmapsharing-4.0-uninstalled.files.in
@@ -0,0 +1,2 @@
+@srcdir@/../libdmapsharing/
+@builddir@/../libdmapsharing/.libs/libdmapsharing-4.0.so
diff --git a/vala/libdmapsharing-4.0-uninstalled.namespace b/vala/libdmapsharing-4.0-uninstalled.namespace
new file mode 100644
index 0000000..d80a1ba
--- /dev/null
+++ b/vala/libdmapsharing-4.0-uninstalled.namespace
@@ -0,0 +1 @@
+Dmap
diff --git a/vala/libdmapsharing-4.0.metadata b/vala/libdmapsharing-4.0.metadata
new file mode 100644
index 0000000..d2890db
--- /dev/null
+++ b/vala/libdmapsharing-4.0.metadata
@@ -0,0 +1,16 @@
+Dmap cheader_filename="libdmapsharing/dmap.h"
+AvahiClient name="Client" namespace="Avahi"
+AvahiEntryGroup name="EntryGroup" namespace="Avahi"
+
+DmapContainerDb type_cname="DmapContainerDbInterface"
+DmapControlPlayer type_cname="DmapControlPlayerInterface"
+DmapDb type_cname="DmapDbInterface"
+DmapImageRecord type_cname="DmapImageRecordInterface"
+DmapRecordFactory type_cname="DmapRecordFactoryInterface"
+DmapRecord type_cname="DmapRecordInterface"
+
+dmap_container_db_foreach.data hidden="1"
+dmap_db_foreach.data hidden="1"
+
+# Why is this needed? The comment on the function should be sufficient.
+dmap_record_factory_create transfer_ownership="1"
diff --git a/vala/libdmapsharing-4.0.vapi b/vala/libdmapsharing-4.0.vapi
new file mode 100644
index 0000000..34598d2
--- /dev/null
+++ b/vala/libdmapsharing-4.0.vapi
@@ -0,0 +1,719 @@
+/* libdmapsharing-4.0.vapi generated by vapigen, do not modify. */
+
+namespace Dmap {
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	public class AvConnection : Dmap.Connection {
+		[CCode (has_construct_function = false)]
+		public AvConnection (string name, string host, uint port, Dmap.Db db, Dmap.RecordFactory factory);
+	}
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	public class AvShare : Dmap.Share {
+		[CCode (has_construct_function = false)]
+		public AvShare (string name, string password, Dmap.Db db, Dmap.ContainerDb container_db, string transcode_mimetype);
+	}
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	[Compact]
+	public class Bits {
+	}
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	[Compact]
+	public class ChunkData {
+		public weak GLib.InputStream original_stream;
+		public weak Soup.Server server;
+		public weak GLib.InputStream stream;
+	}
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	public class Connection : GLib.Object {
+		[CCode (has_construct_function = false)]
+		protected Connection ();
+		public void authenticate_message (Soup.Session session, Soup.Message message, Soup.Auth auth, string password);
+		[NoWrapper]
+		public virtual unowned Soup.Message build_message (string path, bool need_hash, double version, int req_id, bool send_close);
+		public void emit_error (int code, string format);
+		public bool @get (string path, Dmap.ResponseHandler handler);
+		public unowned Soup.MessageHeaders get_headers (string uri);
+		public unowned GLib.SList get_playlists ();
+		[NoWrapper]
+		public virtual Dmap.ContentCode get_protocol_version_cc ();
+		[NoWrapper]
+		public virtual unowned string get_query_metadata ();
+		[NoWrapper]
+		public virtual unowned Dmap.Record handle_mlcl (Dmap.RecordFactory factory, GLib.Node mlcl, int item_id);
+		public bool is_connected ();
+		public void setup ();
+		public void start (Dmap.ConnectionFunc callback);
+		public void stop (Dmap.ConnectionFunc callback);
+		[NoAccessorMethod]
+		public GLib.Uri base_uri { owned get; set; }
+		[NoAccessorMethod]
+		public int database_id { get; set; }
+		[NoAccessorMethod]
+		public Dmap.Db db { owned get; construct; }
+		[NoAccessorMethod]
+		public double dmap_version { get; set; }
+		[NoAccessorMethod]
+		public Dmap.RecordFactory factory { owned get; construct; }
+		[NoAccessorMethod]
+		public string host { owned get; construct; }
+		[NoAccessorMethod]
+		public string name { owned get; construct; }
+		[NoAccessorMethod]
+		public string password { set; }
+		[NoAccessorMethod]
+		public uint port { get; construct; }
+		[NoAccessorMethod]
+		public int revision_number { get; set; }
+		[NoAccessorMethod]
+		public int session_id { get; set; }
+		[NoAccessorMethod]
+		public string username { owned get; construct; }
+		public virtual signal void authenticate (string name, Soup.Session p1, Soup.Message p2, Soup.Auth p3, bool p4);
+		public virtual signal void connected ();
+		public virtual signal void connecting (ulong state, float progress);
+		public virtual signal void disconnected ();
+		public virtual signal void error (void* p0);
+		public virtual signal void operation_done ();
+	}
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	[Compact]
+	public class ContentCodeDefinition {
+		public Dmap.ContentCode code;
+		public int32 int_code;
+		public weak string name;
+		[CCode (cname = "string")]
+		public weak string str;
+		public Dmap.Type type;
+	}
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	public class ControlConnection : Dmap.Connection {
+		[CCode (has_construct_function = false)]
+		public ControlConnection (string name, string host, uint port, Dmap.Db db, Dmap.RecordFactory factory);
+	}
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	public class ControlShare : Dmap.Share {
+		[CCode (has_construct_function = false)]
+		public ControlShare (string library_name, Dmap.ControlPlayer player, Dmap.Db db, Dmap.ContainerDb container_db);
+		public void pair (string service_name, char[] passcode);
+		public void player_updated ();
+		public bool start_lookup () throws GLib.Error;
+		public bool stop_lookup () throws GLib.Error;
+		[NoAccessorMethod]
+		public string library_name { owned get; set; }
+		[NoAccessorMethod]
+		public GLib.Object player { owned get; construct; }
+		public virtual signal void add_guid (string guid);
+		public virtual signal bool lookup_guid (string guid);
+		public virtual signal void remote_found (string service_name, string remote_name);
+		public virtual signal void remote_lost (string service_name);
+		public virtual signal void remote_paired (string service_name, bool connected);
+	}
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	[Compact]
+	public class DbFilterDefinition {
+		public weak string key;
+		public bool negate;
+		public weak string value;
+	}
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	[Compact]
+	public class HashContext {
+		[CCode (array_length = false)]
+		public weak uint32[] bits;
+		[CCode (array_length = false)]
+		public weak uint32[] buf;
+		[CCode (array_length = false)]
+		public weak uint[] @in;
+		public int version;
+	}
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	public class ImageConnection : Dmap.Connection {
+		[CCode (has_construct_function = false)]
+		public ImageConnection (string name, string host, uint port, Dmap.Db db, Dmap.RecordFactory factory);
+	}
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	public class ImageShare : Dmap.Share {
+		[CCode (has_construct_function = false)]
+		public ImageShare (string name, string password, void* db, void* container_db, string transcode_mimetype);
+	}
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	public class MdnsBrowser : GLib.Object {
+		[CCode (has_construct_function = false)]
+		public MdnsBrowser (Dmap.MdnsServiceType type);
+		public static GLib.Quark error_quark ();
+		public Dmap.MdnsServiceType get_service_type ();
+		public unowned GLib.SList get_services ();
+		public bool start () throws GLib.Error;
+		public bool stop () throws GLib.Error;
+		public virtual signal void service_added (Dmap.MdnsService service);
+		public virtual signal void service_removed (string service);
+	}
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	public class MdnsPublisher : GLib.Object {
+		[CCode (has_construct_function = false)]
+		public MdnsPublisher ();
+		public static GLib.Quark error_quark ();
+		public bool publish (string name, uint port, string type_of_service, bool password_required, string txt_records) throws GLib.Error;
+		public bool rename_at_port (uint port, string name) throws GLib.Error;
+		public bool withdraw (uint port) throws GLib.Error;
+		public virtual signal void name_collision (string name);
+		public virtual signal void published (string name);
+	}
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	public class MdnsService : GLib.Object {
+		[CCode (has_construct_function = false)]
+		protected MdnsService ();
+		[NoAccessorMethod]
+		public string host { owned get; set; }
+		[NoAccessorMethod]
+		public string name { owned get; set; }
+		[NoAccessorMethod]
+		public string pair { owned get; set; }
+		[NoAccessorMethod]
+		public bool password_protected { get; set; }
+		[NoAccessorMethod]
+		public uint port { get; set; }
+		[NoAccessorMethod]
+		public string service_name { owned get; set; }
+		[NoAccessorMethod]
+		public uint transport_protocol { get; set; }
+	}
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	[Compact]
+	public class MetaDataMap {
+		public uint md;
+		public weak string tag;
+	}
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	[Compact]
+	public class Playlist {
+		public int id;
+		public weak string name;
+		public weak GLib.List uris;
+	}
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	public class Share : GLib.Object {
+		[CCode (has_construct_function = false)]
+		protected Share ();
+		[NoWrapper]
+		public virtual void add_entry_to_mlcl (uint id, Dmap.Record record, void* mb);
+		public static unowned GLib.SList build_filter (string filterstr);
+		public static bool client_requested (Dmap.Bits bits, int field);
+		[NoWrapper]
+		public virtual void content_codes (Soup.ServerMessage message, string path);
+		[NoWrapper]
+		public virtual void ctrl_int (Soup.ServerMessage message, string path, GLib.HashTable query);
+		[NoWrapper]
+		public virtual void databases (Soup.Server server, Soup.ServerMessage message, string path, GLib.HashTable query);
+		[NoWrapper]
+		public virtual void databases_browse_xxx (Soup.ServerMessage msg, string path, GLib.HashTable query);
+		[NoWrapper]
+		public virtual void databases_items_xxx (Soup.Server server, Soup.ServerMessage msg, string path);
+		public void emit_error (int code, string format);
+		public static void free_filter (GLib.SList filter);
+		public uint get_auth_method ();
+		[NoWrapper]
+		public virtual uint get_desired_port ();
+		[NoWrapper]
+		public virtual void* get_meta_data_map ();
+		[NoWrapper]
+		public virtual unowned string get_type_of_service ();
+		public virtual void login (Soup.ServerMessage message, string path, GLib.HashTable query);
+		[NoWrapper]
+		public virtual void logout (Soup.ServerMessage message, string path, GLib.HashTable query);
+		[NoWrapper]
+		public virtual void message_add_standard_headers (Soup.ServerMessage msg);
+		public void message_set_from_dmap_structure (Soup.ServerMessage message, GLib.Node structure);
+		public virtual void name_collision (Dmap.MdnsPublisher publisher, string name);
+		public bool publish () throws GLib.Error;
+		[NoWrapper]
+		public virtual void published (Dmap.MdnsPublisher publisher, string name);
+		public bool serve () throws GLib.Error;
+		[NoWrapper]
+		public virtual void server_info (Soup.ServerMessage message, string path);
+		public bool session_id_validate (Soup.ServerMessage message, GLib.HashTable query, uint32 id);
+		[NoWrapper]
+		public virtual void update (Soup.ServerMessage message, string path, GLib.HashTable query);
+		[NoAccessorMethod]
+		public uint auth_method { get; set; }
+		[NoAccessorMethod]
+		public Dmap.ContainerDb container_db { owned get; construct; }
+		[NoAccessorMethod]
+		public Dmap.Db db { owned get; construct; }
+		[NoAccessorMethod]
+		public string name { owned get; set; }
+		[NoAccessorMethod]
+		public string password { owned get; set; }
+		[NoAccessorMethod]
+		public uint revision_number { get; set; }
+		[NoAccessorMethod]
+		public Soup.Server server { owned get; }
+		[NoAccessorMethod]
+		public string transcode_mimetype { owned get; construct; }
+		[CCode (array_length = false, array_null_terminated = true)]
+		[NoAccessorMethod]
+		public string[] txt_records { owned get; set; }
+		public virtual signal void error (void* p0);
+	}
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	[Compact]
+	public class StructureItem {
+		public GLib.Value content;
+		public Dmap.ContentCode content_code;
+		public uint32 size;
+	}
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	public interface AvRecord : GLib.Object {
+		public static int cmp_by_album (void* a, void* b, Dmap.Db db);
+		public abstract bool itunes_compat ();
+		public abstract unowned GLib.InputStream read () throws GLib.Error;
+		[NoAccessorMethod]
+		public int bitrate { get; set; }
+		[NoAccessorMethod]
+		public int disc { get; set; }
+		[NoAccessorMethod]
+		public int duration { get; set; }
+		[NoAccessorMethod]
+		public uint64 filesize { get; set; }
+		[NoAccessorMethod]
+		public int firstseen { get; set; }
+		[NoAccessorMethod]
+		public string format { owned get; set; }
+		[NoAccessorMethod]
+		public bool has_video { get; set; }
+		[NoAccessorMethod]
+		public GLib.Array hash { owned get; set; }
+		[NoAccessorMethod]
+		public string location { owned get; set; }
+		[NoAccessorMethod]
+		public Dmap.MediaKind mediakind { get; set; }
+		[NoAccessorMethod]
+		public int mtime { get; set; }
+		[NoAccessorMethod]
+		public int rating { get; set; }
+		[NoAccessorMethod]
+		public string songalbum { owned get; set; }
+		[NoAccessorMethod]
+		public int64 songalbumid { get; set; }
+		[NoAccessorMethod]
+		public string songartist { owned get; set; }
+		[NoAccessorMethod]
+		public string songgenre { owned get; set; }
+		[NoAccessorMethod]
+		public string sort_album { owned get; set; }
+		[NoAccessorMethod]
+		public string sort_artist { owned get; set; }
+		[NoAccessorMethod]
+		public string title { owned get; set; }
+		[NoAccessorMethod]
+		public int track { get; set; }
+		[NoAccessorMethod]
+		public int year { get; set; }
+	}
+	[CCode (cheader_filename = "libdmapsharing/dmap.h", type_cname = "DmapContainerDbInterface")]
+	public interface ContainerDb : GLib.Object {
+		public abstract void add (Dmap.ContainerRecord record) throws GLib.Error;
+		public abstract int64 count ();
+		public abstract void @foreach (Dmap.IdContainerRecordFunc func);
+		public abstract unowned Dmap.ContainerRecord lookup_by_id (uint id);
+	}
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	public interface ContainerRecord : GLib.Object {
+		public abstract void add_entry (Dmap.Record record, int id) throws GLib.Error;
+		public abstract unowned Dmap.Db get_entries ();
+		public abstract uint64 get_entry_count ();
+		public abstract uint get_id ();
+		[NoAccessorMethod]
+		public string name { owned get; set; }
+	}
+	[CCode (cheader_filename = "libdmapsharing/dmap.h", type_cname = "DmapControlPlayerInterface")]
+	public interface ControlPlayer : GLib.Object {
+		public abstract void cue_clear ();
+		public abstract void cue_play (GLib.List records, uint index);
+		public abstract void next_item ();
+		public abstract unowned string now_playing_artwork (uint width, uint height);
+		public abstract unowned Dmap.AvRecord now_playing_record ();
+		public abstract void pause ();
+		public abstract void play_pause ();
+		public abstract void prev_item ();
+		[NoAccessorMethod]
+		public Dmap.ControlPlayState play_state { get; set; }
+		[NoAccessorMethod]
+		public ulong playing_time { get; set; }
+		[NoAccessorMethod]
+		public Dmap.ControlRepeatState repeat_state { get; set; }
+		[NoAccessorMethod]
+		public bool shuffle_state { get; set; }
+		[NoAccessorMethod]
+		public ulong volume { get; set; }
+	}
+	[CCode (cheader_filename = "libdmapsharing/dmap.h", type_cname = "DmapDbInterface")]
+	public interface Db : GLib.Object {
+		public abstract uint add (Dmap.Record record) throws GLib.Error;
+		public abstract uint add_path (string path) throws GLib.Error;
+		public abstract uint add_with_id (Dmap.Record record, uint id) throws GLib.Error;
+		public unowned GLib.HashTable apply_filter (GLib.SList filter_def);
+		public abstract int64 count ();
+		public abstract void @foreach (Dmap.IdRecordFunc func);
+		public abstract unowned Dmap.Record lookup_by_id (uint id);
+		public abstract uint lookup_id_by_location (string location);
+	}
+	[CCode (cheader_filename = "libdmapsharing/dmap.h", type_cname = "DmapImageRecordInterface")]
+	public interface ImageRecord : GLib.Object {
+		public abstract unowned GLib.InputStream read () throws GLib.Error;
+		[NoAccessorMethod]
+		public string aspect_ratio { owned get; set; }
+		[NoAccessorMethod]
+		public string comments { owned get; set; }
+		[NoAccessorMethod]
+		public int creation_date { get; set; }
+		[NoAccessorMethod]
+		public string filename { owned get; set; }
+		[NoAccessorMethod]
+		public string format { owned get; set; }
+		[NoAccessorMethod]
+		public GLib.Array hash { owned get; set; }
+		[NoAccessorMethod]
+		public int large_filesize { get; set; }
+		[NoAccessorMethod]
+		public string location { owned get; set; }
+		[NoAccessorMethod]
+		public int pixel_height { get; set; }
+		[NoAccessorMethod]
+		public int pixel_width { get; set; }
+		[NoAccessorMethod]
+		public int rating { get; set; }
+		[NoAccessorMethod]
+		public GLib.Array thumbnail { owned get; set; }
+	}
+	[CCode (cheader_filename = "libdmapsharing/dmap.h", type_cname = "DmapRecordInterface")]
+	public interface Record : GLib.Object {
+		public abstract bool set_from_blob (GLib.Array blob);
+		public abstract unowned GLib.Array to_blob ();
+	}
+	[CCode (cheader_filename = "libdmapsharing/dmap.h", type_cname = "DmapRecordFactoryInterface")]
+	public interface RecordFactory : GLib.Object {
+		public abstract Dmap.Record create (void* user_data) throws GLib.Error;
+	}
+	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_")]
+	public enum ConnectionState {
+		GET_INFO,
+		LOGIN,
+		GET_REVISION_NUMBER,
+		GET_DB_INFO,
+		GET_MEDIA,
+		GET_PLAYLISTS,
+		GET_PLAYLIST_ENTRIES,
+		LOGOUT,
+		DONE
+	}
+	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_")]
+	public enum ContentCode {
+		CC_INVALID,
+		RAW,
+		CC_MDCL,
+		CC_MEDS,
+		CC_MSTT,
+		CC_MIID,
+		CC_MINM,
+		CC_MIKD,
+		CC_MPER,
+		CC_MCON,
+		CC_MCTI,
+		CC_MPCO,
+		CC_MSTS,
+		CC_MIMC,
+		CC_MCTC,
+		CC_MRCO,
+		CC_MTCO,
+		CC_MLCL,
+		CC_MLIT,
+		CC_MBCL,
+		CC_MSRV,
+		CC_MSAU,
+		CC_MSLR,
+		CC_MPRO,
+		CC_MSAL,
+		CC_MSUP,
+		CC_MSPI,
+		CC_MSEX,
+		CC_MSBR,
+		CC_MSQY,
+		CC_MSIX,
+		CC_MSRS,
+		CC_MSTM,
+		CC_MSDC,
+		CC_MCCR,
+		CC_MCNM,
+		CC_MCNA,
+		CC_MCTY,
+		CC_MLOG,
+		CC_MLID,
+		CC_MUPD,
+		CC_MUSR,
+		CC_MUTY,
+		CC_MUDL,
+		CC_MSMA,
+		CC_FQUESCH,
+		CC_MDBK,
+		CC_APRO,
+		CC_AVDB,
+		CC_ABRO,
+		CC_ABAL,
+		CC_ABAR,
+		CC_ABCP,
+		CC_ABGN,
+		CC_ADBS,
+		CC_ASAL,
+		CC_ASAI,
+		CC_ASAA,
+		CC_ASAR,
+		CC_ASBT,
+		CC_ASBR,
+		CC_ASCM,
+		CC_ASCO,
+		CC_ASDA,
+		CC_ASDM,
+		CC_ASDC,
+		CC_ASDN,
+		CC_ASDB,
+		CC_ASEQ,
+		CC_ASFM,
+		CC_ASGN,
+		CC_ASDT,
+		CC_ASRV,
+		CC_ASSR,
+		CC_ASSZ,
+		CC_ASST,
+		CC_ASSP,
+		CC_ASTM,
+		CC_ASTC,
+		CC_ASTN,
+		CC_ASUR,
+		CC_ASYR,
+		CC_ASDK,
+		CC_ASUL,
+		CC_ASSU,
+		CC_ASSA,
+		CC_APLY,
+		CC_ABPL,
+		CC_APSO,
+		CC_PRSV,
+		CC_ARIF,
+		CC_MSAS,
+		CC_AGRP,
+		CC_AGAL,
+		CC_ASCP,
+		CC_PPRO,
+		CC_PASP,
+		CC_PFDT,
+		CC_PICD,
+		CC_PIMF,
+		CC_PFMT,
+		CC_PIFS,
+		CC_PLSZ,
+		CC_PHGT,
+		CC_PWTH,
+		CC_PRAT,
+		CC_PCMT,
+		CC_PRET,
+		CC_AECS,
+		CC_AESV,
+		CC_AEHV,
+		CC_AESP,
+		CC_AEPP,
+		CC_AEPS,
+		CC_AESG,
+		CC_AEMK,
+		CC_AEMK2,
+		CC_AEFP,
+		CC_ATED,
+		CC_ASGR,
+		CC_AEMQ,
+		CC_AESL,
+		CC_AESR,
+		CC_AETR,
+		CC_MSED,
+		CC_CMPA,
+		CC_CMNM,
+		CC_CMTY,
+		CC_CMPG,
+		CC_CACI,
+		CC_CAPS,
+		CC_CASH,
+		CC_CARP,
+		CC_CAAS,
+		CC_CAAR,
+		CC_CAIA,
+		CC_CANP,
+		CC_CANN,
+		CC_CANA,
+		CC_CANL,
+		CC_CANG,
+		CC_CANT,
+		CC_CASP,
+		CC_CASS,
+		CC_CAST,
+		CC_CASU,
+		CC_CASG,
+		CC_CACR,
+		CC_CMCP,
+		CC_CMGT,
+		CC_CMIK,
+		CC_CMSP,
+		CC_CMST,
+		CC_CMSV,
+		CC_CMSR,
+		CC_CMMK,
+		CC_CMVO,
+		CC_CMPR,
+		CC_CAPR,
+		CC_AEFR,
+		CC_CAOV,
+		CC_CMRL,
+		CC_CAHP,
+		CC_CAIV,
+		CC_CAVC
+	}
+	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_CONTROL_PLAY_")]
+	public enum ControlPlayState {
+		STOPPED,
+		PAUSED,
+		PLAYING
+	}
+	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_CONTROL_REPEAT_")]
+	public enum ControlRepeatState {
+		NONE,
+		SINGLE,
+		ALL
+	}
+	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_DB_ID_")]
+	public enum DbId {
+		BAD
+	}
+	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_STATUS_")]
+	public enum Error {
+		OK,
+		FAILED,
+		INVALID_CONTENT_CODE,
+		INVALID_CONTENT_CODE_SIZE,
+		RESPONSE_TOO_SHORT,
+		BAD_FORMAT,
+		BAD_BROWSE_CATEGORY,
+		RECORD_MISSING_FIELD,
+		DB_BAD_ID,
+		OPEN_FAILED,
+		CLOSE_FAILED,
+		SEEK_FAILED,
+		NUM_ERRORS
+	}
+	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_MDNS_BROWSER_ERROR_")]
+	public enum MdnsBrowserError {
+		NOT_RUNNING,
+		FAILED
+	}
+	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_MDNS_PUBLISHER_ERROR_")]
+	public enum MdnsPublisherError {
+		NOT_RUNNING,
+		FAILED
+	}
+	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_MDNS_SERVICE_TRANSPORT_PROTOCOL_")]
+	public enum MdnsServiceTransportProtocol {
+		TCP,
+		UDP,
+		LAST
+	}
+	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_MDNS_SERVICE_TYPE_")]
+	public enum MdnsServiceType {
+		INVALID,
+		DAAP,
+		DPAP,
+		DACP,
+		RAOP,
+		LAST
+	}
+	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_MEDIA_KIND_")]
+	public enum MediaKind {
+		MUSIC,
+		MOVIE,
+		PODCAST,
+		TV_SHOW
+	}
+	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_SHARE_AUTH_METHOD_")]
+	public enum ShareAuthMethod {
+		NONE,
+		NAME_AND_PASSWORD,
+		PASSWORD
+	}
+	[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_TYPE_", has_type_id = false)]
+	public enum Type {
+		BYTE,
+		SIGNED_INT,
+		SHORT,
+		INT,
+		INT64,
+		STRING,
+		DATE,
+		VERSION,
+		CONTAINER,
+		POINTER,
+		INVALID
+	}
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	public delegate void ConnectionFunc (Dmap.Connection connection, bool result, string reason);
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	public delegate void IdContainerRecordFunc (uint id, Dmap.ContainerRecord record);
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	public delegate void IdRecordFunc (uint id, Dmap.Record record);
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	public delegate void ResponseHandler (Dmap.Connection connection, uint status, GLib.Node structure);
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	public const int HASH_SIZE;
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	public const int HAVE_UNALIGNED_ACCESS;
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	public const int SHARE_CHUNK_SIZE;
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	public static GLib.Quark error_quark ();
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	public static void md5_generate (short version_major, uchar[] url, uchar hash_select, uchar[] @out, int request_id);
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	public static void md5_progressive_final (Dmap.HashContext context, uint[] digest);
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	public static void md5_progressive_init (Dmap.HashContext context);
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	public static void md5_progressive_to_string (uint digest, string str);
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	public static void md5_progressive_update (Dmap.HashContext context, uint buffer, uint length);
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	public static unowned Avahi.Client mdns_avahi_get_client ();
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	public static void mdns_avahi_set_entry_group (Avahi.EntryGroup group);
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	public static void private_utils_chunked_message_finished (Soup.ServerMessage message, Dmap.ChunkData cd);
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	public static void private_utils_write_next_chunk (Soup.ServerMessage message, Dmap.ChunkData cd);
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	public static unowned GLib.Node structure_add (GLib.Node parent, Dmap.ContentCode cc);
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	public static int32 structure_cc_string_as_int32 (string str);
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	public static unowned Dmap.ContentCodeDefinition structure_content_codes (uint number);
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	public static void structure_destroy (GLib.Node structure);
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	public static unowned Dmap.StructureItem structure_find_item (GLib.Node structure, Dmap.ContentCode code);
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	public static unowned GLib.Node structure_find_node (GLib.Node structure, Dmap.ContentCode code);
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	public static uint structure_get_size (GLib.Node structure);
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	public static void structure_increase_by_predicted_size (GLib.Node structure, uint size);
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	public static unowned GLib.Node structure_parse (uchar buf, size_t buf_length) throws GLib.Error;
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	public static void structure_print (GLib.Node structure);
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	public static unowned string structure_serialize (GLib.Node structure, uint length);
+	[CCode (cheader_filename = "libdmapsharing/dmap.h")]
+	public static unowned string utils_mime_to_format (string transcode_mimetype);
+}

More details

Full run details

Historical runs